[libvirt-glib 14/20] gconfig: Adapt GVirConfigDomainGraphicsRdp to GVirConfigDomainGraphicsRemote

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Fabiano Fidêncio <fidencio@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.h | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c
index 7a2cb4d..b3958c8 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)
@@ -87,8 +87,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,
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.h
index a048ff8..a549e46 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.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]