Re: [gconfig v2 1/2] config: Add vnc host setter

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

 



Hey,

On Thu, Jul 28, 2016 at 06:16:38PM +0300, Visarion Alexandru wrote:
> From: Visarion Alexandru <viorel.visarion@xxxxxxxxx>
> 
> 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@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]