
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