From: Fabiano FidĂȘncio <fidencio(a)redhat.com>
This patch adapts GVirConfigDomainGraphicsVnc to the new
GVirConfigDomainGraphicsRemote, inheriting from it and using its helper
functions for getting auport and port properties.
As GVirConfigDomainGraphicsVnc now inherits from
GVirConfigDomainGraphicsRemote, this patch also introduces an ABI
breakage.
Signed-off-by: Fabiano FidĂȘncio <fidencio(a)redhat.com>
---
libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c | 5 ++---
libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h | 4 ++--
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
index 3bc5b8c..0927cc9 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
@@ -34,7 +34,7 @@ struct _GVirConfigDomainGraphicsVncPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainGraphicsVnc, gvir_config_domain_graphics_vnc,
GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
+G_DEFINE_TYPE(GVirConfigDomainGraphicsVnc, gvir_config_domain_graphics_vnc,
GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS_REMOTE);
static void gvir_config_domain_graphics_vnc_class_init(GVirConfigDomainGraphicsVncClass
*klass)
@@ -107,8 +107,7 @@ int
gvir_config_domain_graphics_vnc_get_port(GVirConfigDomainGraphicsVnc *graphi
{
g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_VNC(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_vnc_set_port(GVirConfigDomainGraphicsVnc *graphics,
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
index e4d4fc3..482070a 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
@@ -42,7 +42,7 @@ typedef struct _GVirConfigDomainGraphicsVncClass
GVirConfigDomainGraphicsVncClas
struct _GVirConfigDomainGraphicsVnc
{
- GVirConfigDomainGraphics parent;
+ GVirConfigDomainGraphicsRemote parent;
GVirConfigDomainGraphicsVncPrivate *priv;
@@ -51,7 +51,7 @@ struct _GVirConfigDomainGraphicsVnc
struct _GVirConfigDomainGraphicsVncClass
{
- GVirConfigDomainGraphicsClass parent_class;
+ GVirConfigDomainGraphicsRemoteClass parent_class;
gpointer padding[20];
};
--
2.7.4