Now that there is a gvir_config_object_get_attribute_boolean(), these are trivial to implement. --- .../libvirt-gconfig-domain-graphics-desktop.c | 24 +++++++++++++++++++++- .../libvirt-gconfig-domain-graphics-desktop.h | 4 +++- .../libvirt-gconfig-domain-graphics-rdp.c | 24 +++++++++++++++++++++- .../libvirt-gconfig-domain-graphics-rdp.h | 4 +++- libvirt-gconfig/libvirt-gconfig.sym | 5 +++++ 5 files changed, 57 insertions(+), 4 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c index 41b1112..a7743f6 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c @@ -1,7 +1,7 @@ /* * libvirt-gconfig-domain-graphics-desktop.c: libvirt domain desktop configuration * - * Copyright (C) 2011 Red Hat, Inc. + * Copyright (C) 2011, 2014 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -85,6 +85,17 @@ void gvir_config_domain_graphics_desktop_set_display(GVirConfigDomainGraphicsDes NULL); } + +const gchar *gvir_config_domain_graphics_desktop_get_display(GVirConfigDomainGraphicsDesktop *graphics) +{ + g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_DESKTOP(graphics), NULL); + + return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(graphics), + NULL, + "display"); +} + + void gvir_config_domain_graphics_desktop_set_fullscreen(GVirConfigDomainGraphicsDesktop *graphics, gboolean fullscreen) { @@ -96,3 +107,14 @@ void gvir_config_domain_graphics_desktop_set_fullscreen(GVirConfigDomainGraphics fullscreen, NULL); } + + +gboolean gvir_config_domain_graphics_desktop_get_fullscreen(GVirConfigDomainGraphicsDesktop *graphics) +{ + g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_DESKTOP(graphics), FALSE); + + return gvir_config_object_get_attribute_boolean(GVIR_CONFIG_OBJECT(graphics), + NULL, + "fullscreen", + FALSE); +} diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.h index d16e3d8..7e7e635 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.h +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.h @@ -1,7 +1,7 @@ /* * libvirt-gconfig-domain-graphics-desktop.h: libvirt domain desktop configuration * - * Copyright (C) 2011 Red Hat, Inc. + * Copyright (C) 2011, 2014 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -61,8 +61,10 @@ GType gvir_config_domain_graphics_desktop_get_type(void); GVirConfigDomainGraphicsDesktop *gvir_config_domain_graphics_desktop_new(void); GVirConfigDomainGraphicsDesktop *gvir_config_domain_graphics_desktop_new_from_xml(const gchar *xml, GError **error); +const gchar *gvir_config_domain_graphics_desktop_get_display(GVirConfigDomainGraphicsDesktop *graphics); void gvir_config_domain_graphics_desktop_set_display(GVirConfigDomainGraphicsDesktop *graphics, const gchar *disp); +gboolean gvir_config_domain_graphics_desktop_get_fullscreen(GVirConfigDomainGraphicsDesktop *graphics); void gvir_config_domain_graphics_desktop_set_fullscreen(GVirConfigDomainGraphicsDesktop *graphics, gboolean fullscreen); diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c index 8a4084e..3d8357d 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c @@ -1,7 +1,7 @@ /* * libvirt-gconfig-domain-graphics-rdp.c: libvirt domain RDP configuration * - * Copyright (C) 2011 Red Hat, Inc. + * Copyright (C) 2011, 2014 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -117,6 +117,17 @@ void gvir_config_domain_graphics_rdp_set_replace_user(GVirConfigDomainGraphicsRd } +gboolean gvir_config_domain_graphics_rdp_get_replace_user(GVirConfigDomainGraphicsRdp *graphics) +{ + g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_RDP(graphics), FALSE); + + return gvir_config_object_get_attribute_boolean(GVIR_CONFIG_OBJECT(graphics), + NULL, + "replaceUser", + FALSE); +} + + void gvir_config_domain_graphics_rdp_set_multi_user(GVirConfigDomainGraphicsRdp *graphics, gboolean multi_user) { @@ -128,3 +139,14 @@ void gvir_config_domain_graphics_rdp_set_multi_user(GVirConfigDomainGraphicsRdp multi_user, NULL); } + + +gboolean gvir_config_domain_graphics_rdp_get_multi_user(GVirConfigDomainGraphicsRdp *graphics) +{ + g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_RDP(graphics), FALSE); + + return gvir_config_object_get_attribute_boolean(GVIR_CONFIG_OBJECT(graphics), + NULL, + "multiUser", + FALSE); +} diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.h index fb47834..a048ff8 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.h +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.h @@ -1,7 +1,7 @@ /* * libvirt-gconfig-domain-graphics-rdp.h: libvirt domain RDP graphics configuration * - * Copyright (C) 2011 Red Hat, Inc. + * Copyright (C) 2011, 2014 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -69,8 +69,10 @@ int gvir_config_domain_graphics_rdp_get_port(GVirConfigDomainGraphicsRdp *graphi void gvir_config_domain_graphics_rdp_set_port(GVirConfigDomainGraphicsRdp *graphics, int port); +gboolean gvir_config_domain_graphics_rdp_get_multi_user(GVirConfigDomainGraphicsRdp *graphics); void gvir_config_domain_graphics_rdp_set_multi_user(GVirConfigDomainGraphicsRdp *graphics, gboolean multi_user); +gboolean gvir_config_domain_graphics_rdp_get_replace_user(GVirConfigDomainGraphicsRdp *graphics); void gvir_config_domain_graphics_rdp_set_replace_user(GVirConfigDomainGraphicsRdp *graphics, gboolean replace_user); diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym index 27e8e91..9c35f97 100644 --- a/libvirt-gconfig/libvirt-gconfig.sym +++ b/libvirt-gconfig/libvirt-gconfig.sym @@ -647,6 +647,11 @@ global: gvir_config_domain_get_uuid; + gvir_config_domain_graphics_desktop_get_display; + gvir_config_domain_graphics_desktop_get_fullscreen; + + gvir_config_domain_graphics_rdp_get_multi_user; + gvir_config_domain_graphics_rdp_get_replace_user; gvir_config_domain_graphics_rdp_set_multi_user; gvir_config_domain_graphics_rdp_set_replace_user; -- 1.8.4.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list