[PATCH libvirt-glib 3/5] config: add spice gl child

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

 



Learn to set  "gl" on spice (to have -spice gl=on on qemu)

Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
---
 examples/config-demo.py                                 | 1 +
 libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c | 9 +++++++++
 libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h | 3 +++
 libvirt-gconfig/libvirt-gconfig.sym                     | 4 ++++
 4 files changed, 17 insertions(+)

diff --git a/examples/config-demo.py b/examples/config-demo.py
index c28d8b9..952640a 100644
--- a/examples/config-demo.py
+++ b/examples/config-demo.py
@@ -58,6 +58,7 @@ domain.add_device(input)
 
 graphics = LibvirtGConfig.DomainGraphicsSpice.new()
 graphics.set_port(1234)
+graphics.set_gl(True)
 domain.add_device(graphics)
 
 video = LibvirtGConfig.DomainVideo.new()
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
index c8b45d6..079ea27 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
@@ -156,3 +156,12 @@ void gvir_config_domain_graphics_spice_set_image_compression
         GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION,
         compression);
 }
+
+void gvir_config_domain_graphics_spice_set_gl(GVirConfigDomainGraphicsSpice *graphics,
+                                              gboolean gl)
+{
+    g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_SPICE(graphics));
+
+    gvir_config_object_replace_child_with_attribute_enum
+      (GVIR_CONFIG_OBJECT(graphics), "gl", "enable", G_TYPE_BOOLEAN, gl);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
index 1410c22..25c132e 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
@@ -92,6 +92,9 @@ int
 gvir_config_domain_graphics_spice_get_image_compression
                         (GVirConfigDomainGraphicsSpice *graphics);
 
+void gvir_config_domain_graphics_spice_set_gl(GVirConfigDomainGraphicsSpice *graphics,
+                                              gboolean gl);
+
 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 89dd589..b8c600e 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -733,4 +733,8 @@ global:
 	gvir_config_domain_video_set_vgamem;
 } LIBVIRT_GCONFIG_0.2.1;
 
+LIBVIRT_GCONFIG_0.2.4 {
+	gvir_config_domain_graphics_spice_set_gl;
+} LIBVIRT_GCONFIG_0.2.2;
+
 # .... define new API here using predicted next version number ....
-- 
2.5.0

--
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]