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

[libvirt] [libvirt-glib] Add gvir_config_domain_graphics_vnc_set_password



Based on the similar patch for SPICE
---
 .../libvirt-gconfig-domain-graphics-vnc.c          |   10 ++++++++++
 .../libvirt-gconfig-domain-graphics-vnc.h          |    3 +++
 libvirt-gconfig/libvirt-gconfig.sym                |    1 +
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
index d4554df..b00a155 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
@@ -94,3 +94,13 @@ void gvir_config_domain_graphics_vnc_set_port(GVirConfigDomainGraphicsVnc *graph
                                                "port", G_TYPE_INT, port,
                                                NULL);
 }
+
+void gvir_config_domain_graphics_vnc_set_password(GVirConfigDomainGraphicsVnc *graphics,
+                                                  const char *password)
+{
+    g_return_if_fail(GVIR_IS_CONFIG_DOMAIN_GRAPHICS_VNC(graphics));
+
+    gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(graphics),
+                                     "passwd", password,
+                                     NULL);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
index e69ec54..6dbe32c 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
@@ -68,6 +68,9 @@ void gvir_config_domain_graphics_vnc_set_autoport(GVirConfigDomainGraphicsVnc *g
 void gvir_config_domain_graphics_vnc_set_port(GVirConfigDomainGraphicsVnc *graphics,
                                               int port);
 
+void gvir_config_domain_graphics_vnc_set_password(GVirConfigDomainGraphicsVnc *graphics,
+                                                  const char *password);
+
 G_END_DECLS
 
 #endif /* __LIBVIRT_GCONFIG_DOMAIN_GRAPHICS_VNC_H__ */
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index bf1948a..20dc969 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -111,6 +111,7 @@ LIBVIRT_GCONFIG_0.0.3 {
 	gvir_config_domain_graphics_vnc_new;
 	gvir_config_domain_graphics_vnc_new_from_xml;
 	gvir_config_domain_graphics_vnc_set_autoport;
+	gvir_config_domain_graphics_vnc_set_password;
 	gvir_config_domain_graphics_vnc_set_port;
 
 	gvir_config_domain_input_bus_get_type;
-- 
1.7.7.4


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