Hey,

On Thu, Jul 28, 2016 at 06:16:38PM +0300, Visarion Alexandru wrote:
> From: Visarion Alexandru <viorel.visar...@gmail.com>
> 
> Learn to set the address that vnc is listening on.
> ---
>  libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c | 9 +++++++++
>  libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h | 3 +++
>  libvirt-gconfig/libvirt-gconfig.sym                   | 1 +
>  3 files changed, 13 insertions(+)
> 
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c 
> b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
> index fc26bb9..dfec2d8 100644
> --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
> +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
> @@ -120,6 +120,15 @@ void 
> gvir_config_domain_graphics_vnc_set_port(GVirConfigDomainGraphicsVnc *graph
>                                                 NULL);
>  }
>  
> +void gvir_config_domain_graphics_vnc_set_host(GVirConfigDomainGraphicsVnc 
> *graphics,
> +                                              const char *address)

Why not gvir_config_domain_graphics_set_listen_address?

Overall, the patch looks good (adding some short API documentation would
be nice). However, the "listen" attribute really is deprecated at this
point in favour of "listen" nodes. Adding an API setting the "listen"
attribute and removing the "listen" node really looks like we are adding
already obsolete API to libvirt-glib.

Ideally we'd add
void
gvir_config_domain_graphics_vnc_set_listen(GVirConfigDomainGraphicsVnc
*graphics, GList *listens);
and a GVirConfigDomainGraphicsListen base class +
GVirConfigDomainGraphicsListenAddress derived class

This would allow us to support only the preferred XML format.

Christophe

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to