On Tue, Mar 22, 2016 at 11:04:43AM +0100, Fabiano Fidêncio wrote: > Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx> > --- > .../libvirt-gconfig-domain-graphics-spice.c | 18 ++++++++++++++++++ > .../libvirt-gconfig-domain-graphics-spice.h | 4 ++++ > libvirt-gconfig/libvirt-gconfig.sym | 2 ++ > 3 files changed, 24 insertions(+) > > diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c > index b781537..38ee3e6 100644 > --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c > +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c > @@ -181,3 +181,21 @@ void gvir_config_domain_graphics_spice_set_gl(GVirConfigDomainGraphicsSpice *gra > gvir_config_object_replace_child_with_attribute_enum > (GVIR_CONFIG_OBJECT(graphics), "gl", "enable", G_TYPE_BOOLEAN, gl); > } > + > +const gchar *gvir_config_domain_graphics_spice_get_host(GVirConfigDomainGraphicsSpice *graphics) > +{ > + g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_SPICE(graphics), NULL); > + > + return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(graphics), > + NULL, "listen"); > +} > + > +void gvir_config_domain_graphics_spice_set_host(GVirConfigDomainGraphicsSpice *graphics, > + const gchar *host) > +{ > + g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_SPICE(graphics)); > + > + gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(graphics), > + "listen", G_TYPE_STRING, host, > + NULL); > +} I think I'd try to keep "listen" in the function name to make it explicit what the "host" is for. My understanding is that the "listen" syntax (and VNC "socket") is more or less deprecated, and that <listen> nodes are preferred instead. So I'm not sure whether we should add these accessors/setters now, and in this way, or if we should look at a more extensive solution with <listen> nodes. Christophe
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list