This patch adapts GVirConfigDomainGraphicsRdp to the new
GVirConfigDomainGraphicsRemote, inheriting from it and using its helper
functions for getting autoport and port properties.
As GVirConfigDomainGraphicsRdp 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-rdp.c | 11 ++++-------
libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.h | 4 ++--
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c
index b4d1735..4671b13 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c
@@ -33,7 +33,7 @@ struct _GVirConfigDomainGraphicsRdpPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirConfigDomainGraphicsRdp, gvir_config_domain_graphics_rdp,
GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
+G_DEFINE_TYPE(GVirConfigDomainGraphicsRdp, gvir_config_domain_graphics_rdp,
GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS_REMOTE);
static void gvir_config_domain_graphics_rdp_class_init(GVirConfigDomainGraphicsRdpClass
*klass)
@@ -77,8 +77,7 @@ gboolean
gvir_config_domain_graphics_rdp_get_autoport(GVirConfigDomainGraphicsRd
{
g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_RDP(graphics), FALSE);
- return gvir_config_object_get_attribute_boolean(GVIR_CONFIG_OBJECT(graphics),
- NULL, "autoport", FALSE);
+ return
gvir_config_domain_graphics_remote_get_autoport(GVIR_CONFIG_DOMAIN_GRAPHICS_REMOTE(graphics));
}
void gvir_config_domain_graphics_rdp_set_autoport(GVirConfigDomainGraphicsRdp *graphics,
@@ -95,8 +94,7 @@ int gvir_config_domain_graphics_rdp_get_port(GVirConfigDomainGraphicsRdp
*graphi
{
g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_RDP(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_rdp_set_port(GVirConfigDomainGraphicsRdp *graphics,
@@ -161,8 +159,7 @@ const gchar
*gvir_config_domain_graphics_rdp_get_host(GVirConfigDomainGraphicsRd
{
g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_RDP(graphics), NULL);
- return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(graphics),
- NULL, "listen");
+ return
gvir_config_domain_graphics_remote_get_host(GVIR_CONFIG_DOMAIN_GRAPHICS_REMOTE(graphics));
}
void gvir_config_domain_graphics_rdp_set_host(GVirConfigDomainGraphicsRdp *graphics,
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.h
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.h
index e2bb782..df4d2d3 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.h
@@ -42,7 +42,7 @@ typedef struct _GVirConfigDomainGraphicsRdpClass
GVirConfigDomainGraphicsRdpClas
struct _GVirConfigDomainGraphicsRdp
{
- GVirConfigDomainGraphics parent;
+ GVirConfigDomainGraphicsRemote parent;
GVirConfigDomainGraphicsRdpPrivate *priv;
@@ -51,7 +51,7 @@ struct _GVirConfigDomainGraphicsRdp
struct _GVirConfigDomainGraphicsRdpClass
{
- GVirConfigDomainGraphicsClass parent_class;
+ GVirConfigDomainGraphicsRemoteClass parent_class;
gpointer padding[20];
};
--
2.5.0