[Spice-devel] [spice-gtk v1 1/3] Improve debug log for preferred compression message

Christophe Fergeau cfergeau at redhat.com
Wed Dec 20 16:34:04 UTC 2017


On Wed, Dec 20, 2017 at 03:47:25PM +0100, Victor Toso wrote:
> To be honest, I wrote this patch 3 times because of this. There
> are other places in the source code that we do enum-to-string
> conversion and I was thinking in making this better now too.
> 
> But then I thought that I was complicating things :)
> 
> I was thinking in a similar approach as you wrote above but if we
> do that, we should make it in spice-common to benefit spice
> server too, agree?

For this specific case, spice-server already has some hack to feed the
image compression enum through glib-mkenums
https://cgit.freedesktop.org/spice/spice/tree/server/spice-server.h#n74

Once you have this, you can already use some generic code to convert
enum value to a string:
https://git.gnome.org/browse/libgovirt/tree/govirt/ovirt-utils.c#n230
-------------- 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/20171220/5315e6c9/attachment.sig>


More information about the Spice-devel mailing list