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
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel