[libvirt] [libvirt-glib 30/37] Add basic GVirConfigGraphicsSpice

Christophe Fergeau cfergeau at redhat.com
Tue Nov 15 18:33:45 UTC 2011


On Fri, Nov 11, 2011 at 08:40:58PM +0100, Marc-André Lureau wrote:
> Same comment as for "interface", do we want to have specialized
> classes for various type.
> 
> In this case, you should also add a base Graphics class.

Looking at the format again
(http://libvirt.org/formatdomain.html#elementsGraphics ) I think we do. I
was probably lazy when I did this :)

> > +GVirConfigGraphicsSpice *gvir_config_graphics_spice_new_from_xml(const gchar *xml,
> > +                                                                 GError **error)
> > +{
> > +    GVirConfigObject *object;
> > +
> > +    object = gvir_config_object_new_from_xml(GVIR_TYPE_CONFIG_GRAPHICS_SPICE,
> > +                                             "graphics", NULL, xml, error);
> > +//    xmlNewProp(doc->children, (xmlChar*)"type", (xmlChar*)"spice");
> > +    return GVIR_CONFIG_GRAPHICS_SPICE(object);
> > +}
> 
> This surely shouldn't be commented out.

yes this is a mistake, I noticed it after sending the patch series

> Perhaps it should be done in _init().

I'm not a big fan of that, if we enforce type="spice" in _init() then it
would seem logical to also force the root node name to be "graphics".

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111115/9353792a/attachment-0001.sig>


More information about the libvir-list mailing list