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

[libvirt] [libvirt-glib] API to set SPICE password



From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>

---
 .../libvirt-gconfig-domain-graphics-spice.c        |   10 ++++++++++
 .../libvirt-gconfig-domain-graphics-spice.h        |    3 +++
 libvirt-gconfig/libvirt-gconfig.sym                |    1 +
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
index 483f7d7..f7828c1 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
@@ -104,3 +104,13 @@ void gvir_config_domain_graphics_spice_set_tls_port(GVirConfigDomainGraphicsSpic
                                                "tlsPort", G_TYPE_INT, port,
                                                NULL);
 }
+
+void gvir_config_domain_graphics_spice_set_password(GVirConfigDomainGraphicsSpice *graphics,
+                                                    const char *password)
+{
+    g_return_if_fail(GVIR_IS_CONFIG_DOMAIN_GRAPHICS_SPICE(graphics));
+
+    gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(graphics),
+                                     "passwd", password,
+                                     NULL);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
index b1b8361..a4004eb 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
@@ -71,6 +71,9 @@ void gvir_config_domain_graphics_spice_set_port(GVirConfigDomainGraphicsSpice *g
 void gvir_config_domain_graphics_spice_set_tls_port(GVirConfigDomainGraphicsSpice *graphics,
                                                     int port);
 
+void gvir_config_domain_graphics_spice_set_password(GVirConfigDomainGraphicsSpice *graphics,
+                                                    const char *password);
+
 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 39f39d4..53f84d4 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -96,6 +96,7 @@ LIBVIRT_GCONFIG_0.0.3 {
 	gvir_config_domain_graphics_spice_set_autoport;
 	gvir_config_domain_graphics_spice_set_port;
 	gvir_config_domain_graphics_spice_set_tls_port;
+	gvir_config_domain_graphics_spice_set_password;
 
 	gvir_config_domain_graphics_vnc_get_type;
 	gvir_config_domain_graphics_vnc_new;
-- 
1.7.7.4


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