Learn to set the address the domain is listening on.
---
.../libvirt-gconfig-domain-graphics-spice.c | 18 ++++++++++++++++++
.../libvirt-gconfig-domain-graphics-spice.h | 3 +++
libvirt-gconfig/libvirt-gconfig.sym | 1 +
3 files changed, 22 insertions(+)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
index 079ea27..a773084 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
@@ -165,3 +165,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);
}
+
+void gvir_config_domain_graphics_spice_set_listen_address(GVirConfigDomainGraphicsSpice
*graphics,
+ const char *address)
+{
+ g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_SPICE(graphics));
+
+ gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(graphics), "listen",
address, NULL);
+
+ gvir_config_object_add_child_with_attribute(GVIR_CONFIG_OBJECT(graphics),
+ "listen",
+ "address",
+ address);
+
+ gvir_config_object_add_child_with_attribute(GVIR_CONFIG_OBJECT(graphics),
+ "listen",
+ "type",
+ "address");
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
index 25c132e..4bca850 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_listen_address(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 f11f97a..86768ae 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -736,6 +736,7 @@ global:
LIBVIRT_GCONFIG_0.2.4 {
gvir_config_domain_graphics_spice_set_gl;
gvir_config_domain_video_set_accel3d;
+ gvir_config_domain_graphics_spice_set_listen_address;
} LIBVIRT_GCONFIG_0.2.2;
# .... define new API here using predicted next version number ....
--
2.5.5
Show replies by date