From: Visarion Alexandru <viorel.visarion(a)gmail.com>
Learn to set the address that spice is listening on.
---
libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c | 10 ++++++++++
libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h | 3 +++
libvirt-gconfig/libvirt-gconfig.sym | 1 +
3 files changed, 14 insertions(+)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
index 079ea27..fa1dd31 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
@@ -157,6 +157,16 @@ void gvir_config_domain_graphics_spice_set_image_compression
compression);
}
+
+void gvir_config_domain_graphics_spice_set_host(GVirConfigDomainGraphicsSpice *graphics,
+ const char *address)
+{
+ g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_SPICE(graphics));
+
+ gvir_config_object_delete_child(GVIR_CONFIG_OBJECT(graphics), "listen",
NULL);
+ gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(graphics), "listen",
address, NULL);
+}
+
void gvir_config_domain_graphics_spice_set_gl(GVirConfigDomainGraphicsSpice *graphics,
gboolean gl)
{
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
index 25c132e..9f55724 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
@@ -95,6 +95,9 @@ gvir_config_domain_graphics_spice_get_image_compression
void gvir_config_domain_graphics_spice_set_gl(GVirConfigDomainGraphicsSpice *graphics,
gboolean gl);
+void gvir_config_domain_graphics_spice_set_host(GVirConfigDomainGraphicsSpice *graphics,
+ const char *address);
+
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 3153a83..9d349fc 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -765,6 +765,7 @@ global:
gvir_config_domain_video_get_model;
gvir_config_domain_video_set_accel3d;
gvir_config_domain_graphics_vnc_set_host;
+ gvir_config_domain_graphics_spice_set_host;
} LIBVIRT_GCONFIG_0.2.2;
# .... define new API here using predicted next version number ....
--
2.7.4