[Spice-devel] [spice-server 5/5] channel-client: Implement red_channel_client_get_pipe_item_name
Christophe Fergeau
cfergeau at redhat.com
Wed Oct 18 07:33:28 UTC 2017
On Tue, Oct 17, 2017 at 03:34:14PM -0500, Jonathon Jongsma wrote:
> To be honest, to me it feels like the benefit from this change is not
> worth the added complexity of generating GEnums and modifying the
> channel clients, etc. Do you have plans to use this somewhere? Or do
> you just call it from gdb or something?
Was useful during testing when I wanted to get a better feel of what was
being sent, something like:
red_channel_message(channel, "%s", red_channel_client_get_pipe_item_name(..));
But this was indeed just a debugging thing, and I agree it's quite
invasive for a debug feature ;)
Would it be more acceptable with no RedChannelClass changes, and instead
have a
void red_channel_debug_register_pipe_item_type(GType red_channel_type, GType pipe_item_type);
(this would populate a hash table which would be used instead of
the new RedChannelClass member).
This would mean just one added call in each class_init(), the rest of
the code could be moved to a separate file, and even disabled by default
as it might be a bit expensive.
But I can keep that on the side for now, and push it again when it
becomes a must-have ;)
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20171018/e10d2ea5/attachment.sig>
More information about the Spice-devel
mailing list