On 12.09.2012 15:55, Christophe Fergeau wrote: > Implement gvir_config_domain_graphics_vnc_set_listen and > gvir_config_domain_graphics_vnc_set_socket. > --- > libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c | 19 +++++++++++++++++++ > libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h | 6 ++++++ > libvirt-gconfig/libvirt-gconfig.sym | 3 +++ > 3 files changed, 28 insertions(+) > > diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c > index d9d1303..46cc723 100644 > --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c > +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c > @@ -74,6 +74,25 @@ gvir_config_domain_graphics_vnc_new_from_xml(const gchar *xml, > return GVIR_CONFIG_DOMAIN_GRAPHICS_VNC(object); > } > > +void gvir_config_domain_graphics_vnc_set_listen(GVirConfigDomainGraphicsVnc *graphics, > + const char *listen_ip) > +{ > + g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_VNC(graphics)); > + > + gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(graphics), > + "listen", listen_ip, > + NULL); > +} > + > +void gvir_config_domain_graphics_vnc_set_socket(GVirConfigDomainGraphicsVnc *graphics, > + const char *socket) > +{ > + g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_VNC(graphics)); > + > + gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(graphics), > + "socket", socket, > + NULL); > +} > > void gvir_config_domain_graphics_vnc_set_autoport(GVirConfigDomainGraphicsVnc *graphics, > gboolean autoport) > diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h > index e3183d7..f2bc402 100644 > --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h > +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h > @@ -62,6 +62,12 @@ GVirConfigDomainGraphicsVnc *gvir_config_domain_graphics_vnc_new(void); > GVirConfigDomainGraphicsVnc *gvir_config_domain_graphics_vnc_new_from_xml(const gchar *xml, > GError **error); > > +void gvir_config_domain_graphics_vnc_set_listen(GVirConfigDomainGraphicsVnc *graphics, > + const char *listen_ip); > + > +void gvir_config_domain_graphics_vnc_set_socket(GVirConfigDomainGraphicsVnc *graphics, > + const char *socket); > + > void gvir_config_domain_graphics_vnc_set_autoport(GVirConfigDomainGraphicsVnc *graphics, > gboolean autoport); > > diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym > index 0f41d78..11d1d81 100644 > --- a/libvirt-gconfig/libvirt-gconfig.sym > +++ b/libvirt-gconfig/libvirt-gconfig.sym > @@ -466,6 +466,9 @@ LIBVIRT_GCONFIG_0.1.3 { > gvir_config_domain_set_current_memory; > > gvir_config_domain_graphics_spice_set_listen; > + > + gvir_config_domain_graphics_vnc_set_listen; > + gvir_config_domain_graphics_vnc_set_socket; > } LIBVIRT_GCONFIG_0.1.0; > > # .... define new API here using predicted next version number .... > ACK to socket part; for _set_listen() see my previous e-mail. NB we should update libvirt docs as well as listening to network is mentioned only for SPICE not VNC but libvirt does support both. Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list