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

[libvirt] [libvirt-glib/libvirt-gconfig 15/17] gconfig: Adapt GVirConfigDomainGraphicsSdl to GVirConfigDomainGraphicsLocal



This patch adapts GVirConfigDomainGraphicsSdl to the new
GVirConfigDomainGraphicsLocal, inheriting from it and using its helper
functions for getting the display and fullscreen properties.

As GVirConfigDomainGraphicsSdl now inherits from
GVirConfigDomainGraphicsLocal, this patch also introduces an ABI
breakage.

Signed-off-by: Fabiano Fidêncio <fidencio redhat com>
---
 libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c | 11 +++--------
 libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.h |  4 ++--
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c
index 63d9bb3..55d0012 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c
@@ -33,7 +33,7 @@ struct _GVirConfigDomainGraphicsSdlPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainGraphicsSdl, gvir_config_domain_graphics_sdl, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
+G_DEFINE_TYPE(GVirConfigDomainGraphicsSdl, gvir_config_domain_graphics_sdl, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS_LOCAL);
 
 
 static void gvir_config_domain_graphics_sdl_class_init(GVirConfigDomainGraphicsSdlClass *klass)
@@ -97,9 +97,7 @@ const gchar *gvir_config_domain_graphics_sdl_get_display(GVirConfigDomainGraphic
 {
     g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_SDL(graphics), NULL);
 
-    return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(graphics),
-                                            NULL,
-                                            "display");
+    return gvir_config_domain_graphics_local_get_display(GVIR_CONFIG_DOMAIN_GRAPHICS_LOCAL(graphics));
 }
 
 void gvir_config_domain_graphics_sdl_set_fullscreen(GVirConfigDomainGraphicsSdl *graphics,
@@ -118,8 +116,5 @@ gboolean gvir_config_domain_graphics_sdl_get_fullscreen(GVirConfigDomainGraphics
 {
     g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_SDL(graphics), FALSE);
 
-    return gvir_config_object_get_attribute_boolean(GVIR_CONFIG_OBJECT(graphics),
-                                                    NULL,
-                                                    "fullscreen",
-                                                    FALSE);
+    return gvir_config_domain_graphics_local_get_fullscreen(GVIR_CONFIG_DOMAIN_GRAPHICS_LOCAL(graphics));
 }
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.h
index f1b9842..70c9aeb 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.h
@@ -42,7 +42,7 @@ typedef struct _GVirConfigDomainGraphicsSdlClass GVirConfigDomainGraphicsSdlClas
 
 struct _GVirConfigDomainGraphicsSdl
 {
-    GVirConfigDomainGraphics parent;
+    GVirConfigDomainGraphicsLocal parent;
 
     GVirConfigDomainGraphicsSdlPrivate *priv;
 
@@ -51,7 +51,7 @@ struct _GVirConfigDomainGraphicsSdl
 
 struct _GVirConfigDomainGraphicsSdlClass
 {
-    GVirConfigDomainGraphicsClass parent_class;
+    GVirConfigDomainGraphicsLocalClass parent_class;
 
     gpointer padding[20];
 };
-- 
2.5.0


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