From: Fabiano Fidêncio <fidencio@xxxxxxxxxx> This patch adapts GVirConfigDomainGraphicsSpice to the new GVirConfigDomainGraphicsRemote, inheriting from it and using its helper functions for getting autoport and port properties. As GVirConfigDomainGraphicsSpice now inherits from GVirConfigDomainGraphicsRemote, this patch also introduces an ABI breakage. Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx> --- libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c | 5 ++--- libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c index d66b362..4538820 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c @@ -35,7 +35,7 @@ struct _GVirConfigDomainGraphicsSpicePrivate gboolean unused; }; -G_DEFINE_TYPE(GVirConfigDomainGraphicsSpice, gvir_config_domain_graphics_spice, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS); +G_DEFINE_TYPE(GVirConfigDomainGraphicsSpice, gvir_config_domain_graphics_spice, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS_REMOTE); static void gvir_config_domain_graphics_spice_class_init(GVirConfigDomainGraphicsSpiceClass *klass) @@ -99,8 +99,7 @@ int gvir_config_domain_graphics_spice_get_port(GVirConfigDomainGraphicsSpice *gr { g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_SPICE(graphics), 0); - return gvir_config_object_get_attribute_uint64(GVIR_CONFIG_OBJECT(graphics), - NULL, "port", 0); + return gvir_config_domain_graphics_remote_get_port(GVIR_CONFIG_DOMAIN_GRAPHICS_REMOTE(graphics)); } void gvir_config_domain_graphics_spice_set_port(GVirConfigDomainGraphicsSpice *graphics, diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h index 54da02a..b33c693 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h @@ -43,7 +43,7 @@ typedef struct _GVirConfigDomainGraphicsSpiceClass GVirConfigDomainGraphicsSpice struct _GVirConfigDomainGraphicsSpice { - GVirConfigDomainGraphics parent; + GVirConfigDomainGraphicsRemote parent; GVirConfigDomainGraphicsSpicePrivate *priv; @@ -52,7 +52,7 @@ struct _GVirConfigDomainGraphicsSpice struct _GVirConfigDomainGraphicsSpiceClass { - GVirConfigDomainGraphicsClass parent_class; + GVirConfigDomainGraphicsRemoteClass parent_class; gpointer padding[20]; }; -- 2.7.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list