[libvirt-glib 2/4] config: Add 2 more setters to GVirConfigDomainDisplayVnc

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

 



Implement gvir_config_domain_graphics_vnc_set_listen and
gvir_config_domain_graphics_vnc_set_socket.
---
 libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c | 19 +++++++++++++++++++
 libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h |  6 ++++++
 libvirt-gconfig/libvirt-gconfig.sym                   |  3 +++
 3 files changed, 28 insertions(+)

diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
index d9d1303..46cc723 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
@@ -74,6 +74,25 @@ gvir_config_domain_graphics_vnc_new_from_xml(const gchar *xml,
     return GVIR_CONFIG_DOMAIN_GRAPHICS_VNC(object);
 }
 
+void gvir_config_domain_graphics_vnc_set_listen(GVirConfigDomainGraphicsVnc *graphics,
+                                                const char *listen_ip)
+{
+    g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_VNC(graphics));
+
+    gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(graphics),
+                                     "listen", listen_ip,
+                                     NULL);
+}
+
+void gvir_config_domain_graphics_vnc_set_socket(GVirConfigDomainGraphicsVnc *graphics,
+                                                const char *socket)
+{
+    g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_VNC(graphics));
+
+    gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(graphics),
+                                     "socket", socket,
+                                     NULL);
+}
 
 void gvir_config_domain_graphics_vnc_set_autoport(GVirConfigDomainGraphicsVnc *graphics,
                                                   gboolean autoport)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
index e3183d7..f2bc402 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
@@ -62,6 +62,12 @@ GVirConfigDomainGraphicsVnc *gvir_config_domain_graphics_vnc_new(void);
 GVirConfigDomainGraphicsVnc *gvir_config_domain_graphics_vnc_new_from_xml(const gchar *xml,
                                                                           GError **error);
 
+void gvir_config_domain_graphics_vnc_set_listen(GVirConfigDomainGraphicsVnc *graphics,
+                                                const char *listen_ip);
+
+void gvir_config_domain_graphics_vnc_set_socket(GVirConfigDomainGraphicsVnc *graphics,
+                                                const char *socket);
+
 void gvir_config_domain_graphics_vnc_set_autoport(GVirConfigDomainGraphicsVnc *graphics,
                                                   gboolean autoport);
 
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 0f41d78..11d1d81 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -466,6 +466,9 @@ LIBVIRT_GCONFIG_0.1.3 {
 	gvir_config_domain_set_current_memory;
 
 	gvir_config_domain_graphics_spice_set_listen;
+
+	gvir_config_domain_graphics_vnc_set_listen;
+	gvir_config_domain_graphics_vnc_set_socket;
 } LIBVIRT_GCONFIG_0.1.0;
 
 # .... define new API here using predicted next version number ....
-- 
1.7.11.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]