[libvirt-glib 3/4] config: Add a few GVirConfigDomainGraphicsVnc getters

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

 



---
 .../libvirt-gconfig-domain-graphics-vnc.c          | 24 ++++++++++++++++++++++
 .../libvirt-gconfig-domain-graphics-vnc.h          |  3 +++
 libvirt-gconfig/libvirt-gconfig.sym                |  3 +++
 3 files changed, 30 insertions(+)

diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
index 46cc723..353a789 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
@@ -74,6 +74,14 @@ gvir_config_domain_graphics_vnc_new_from_xml(const gchar *xml,
     return GVIR_CONFIG_DOMAIN_GRAPHICS_VNC(object);
 }
 
+const char *gvir_config_domain_graphics_vnc_get_listen(GVirConfigDomainGraphicsVnc *graphics)
+{
+    g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_VNC(graphics), NULL);
+
+    return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(graphics),
+                                            NULL, "listen");
+}
+
 void gvir_config_domain_graphics_vnc_set_listen(GVirConfigDomainGraphicsVnc *graphics,
                                                 const char *listen_ip)
 {
@@ -84,6 +92,14 @@ void gvir_config_domain_graphics_vnc_set_listen(GVirConfigDomainGraphicsVnc *gra
                                      NULL);
 }
 
+const char *gvir_config_domain_graphics_vnc_get_socket(GVirConfigDomainGraphicsVnc *graphics)
+{
+    g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_VNC(graphics), NULL);
+
+    return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(graphics),
+                                            NULL, "socket");
+}
+
 void gvir_config_domain_graphics_vnc_set_socket(GVirConfigDomainGraphicsVnc *graphics,
                                                 const char *socket)
 {
@@ -104,6 +120,14 @@ void gvir_config_domain_graphics_vnc_set_autoport(GVirConfigDomainGraphicsVnc *g
                                                NULL);
 }
 
+int gvir_config_domain_graphics_vnc_get_port(GVirConfigDomainGraphicsVnc *graphics)
+{
+    g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_VNC(graphics), 0);
+
+    return gvir_config_object_get_attribute_uint64(GVIR_CONFIG_OBJECT(graphics),
+                                                   NULL, "port", 0);
+}
+
 void gvir_config_domain_graphics_vnc_set_port(GVirConfigDomainGraphicsVnc *graphics,
                                               int port)
 {
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
index f2bc402..2caf9fb 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
@@ -62,15 +62,18 @@ GVirConfigDomainGraphicsVnc *gvir_config_domain_graphics_vnc_new(void);
 GVirConfigDomainGraphicsVnc *gvir_config_domain_graphics_vnc_new_from_xml(const gchar *xml,
                                                                           GError **error);
 
+const char *gvir_config_domain_graphics_vnc_get_listen(GVirConfigDomainGraphicsVnc *graphics);
 void gvir_config_domain_graphics_vnc_set_listen(GVirConfigDomainGraphicsVnc *graphics,
                                                 const char *listen_ip);
 
+const char *gvir_config_domain_graphics_vnc_get_socket(GVirConfigDomainGraphicsVnc *graphics);
 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);
 
+int gvir_config_domain_graphics_vnc_get_port(GVirConfigDomainGraphicsVnc *graphics);
 void gvir_config_domain_graphics_vnc_set_port(GVirConfigDomainGraphicsVnc *graphics,
                                               int port);
 
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 11d1d81..b66b28e 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -467,7 +467,10 @@ LIBVIRT_GCONFIG_0.1.3 {
 
 	gvir_config_domain_graphics_spice_set_listen;
 
+	gvir_config_domain_graphics_vnc_get_listen;
 	gvir_config_domain_graphics_vnc_set_listen;
+	gvir_config_domain_graphics_vnc_get_port;
+	gvir_config_domain_graphics_vnc_get_socket;
 	gvir_config_domain_graphics_vnc_set_socket;
 } LIBVIRT_GCONFIG_0.1.0;
 
-- 
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]