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

[libvirt] [libvirt-glib/libvirt-gconfig 07/17] gconfig: Implement gvir_config_domain_graphics_spice_{get, set}_host()



Signed-off-by: Fabiano Fidêncio <fidencio redhat com>
---
 .../libvirt-gconfig-domain-graphics-spice.c            | 18 ++++++++++++++++++
 .../libvirt-gconfig-domain-graphics-spice.h            |  4 ++++
 libvirt-gconfig/libvirt-gconfig.sym                    |  2 ++
 3 files changed, 24 insertions(+)

diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
index b781537..38ee3e6 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
@@ -181,3 +181,21 @@ void gvir_config_domain_graphics_spice_set_gl(GVirConfigDomainGraphicsSpice *gra
     gvir_config_object_replace_child_with_attribute_enum
       (GVIR_CONFIG_OBJECT(graphics), "gl", "enable", G_TYPE_BOOLEAN, gl);
 }
+
+const gchar *gvir_config_domain_graphics_spice_get_host(GVirConfigDomainGraphicsSpice *graphics)
+{
+    g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_SPICE(graphics), NULL);
+
+    return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(graphics),
+                                            NULL, "listen");
+}
+
+void gvir_config_domain_graphics_spice_set_host(GVirConfigDomainGraphicsSpice *graphics,
+                                                const gchar *host)
+{
+    g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_SPICE(graphics));
+
+    gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(graphics),
+                                               "listen", G_TYPE_STRING, host,
+                                               NULL);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
index 9703fdd..40d0e86 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
@@ -97,6 +97,10 @@ gvir_config_domain_graphics_spice_get_image_compression
 void gvir_config_domain_graphics_spice_set_gl(GVirConfigDomainGraphicsSpice *graphics,
                                               gboolean gl);
 
+const gchar *gvir_config_domain_graphics_spice_get_host(GVirConfigDomainGraphicsSpice *graphics);
+void gvir_config_domain_graphics_spice_set_host(GVirConfigDomainGraphicsSpice *graphics,
+                                                const gchar *host);
+
 G_END_DECLS
 
 #endif /* __LIBVIRT_GCONFIG_DOMAIN_GRAPHICS_SPICE_H__ */
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index be9887c..bb72f33 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -738,8 +738,10 @@ LIBVIRT_GCONFIG_0.2.4 {
 	gvir_config_domain_graphics_sdl_get_display;
 	gvir_config_domain_graphics_sdl_get_fullscreen;
 	gvir_config_domain_graphics_spice_get_autoport;
+	gvir_config_domain_graphics_spice_get_host;
 	gvir_config_domain_graphics_spice_get_tls_port;
 	gvir_config_domain_graphics_spice_set_gl;
+	gvir_config_domain_graphics_spice_set_host;
 	gvir_config_domain_graphics_vnc_get_autoport;
 	gvir_config_domain_video_set_accel3d;
 } LIBVIRT_GCONFIG_0.2.2;
-- 
2.5.0


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