[libvirt] [gconfig v2 4/6] config: Add vnc listen getter/setter

Christophe Fergeau cfergeau at redhat.com
Fri Sep 2 14:17:52 UTC 2016


On Wed, Aug 17, 2016 at 06:58:49PM +0300, Visarion Alexandru wrote:
> From: Visarion Alexandru <viorel.visarion at gmail.com>
> 
> Learn to get/set the listen devices that vnc is using.
> 
> When setting the listen devices, first remove the 'listen' attribute
> to avoid inconsistencies checks between the 'listen' attribute and the
> 'address' attribute of the 'listen' node.
> ---
>  .../libvirt-gconfig-domain-graphics-vnc.c          | 84 ++++++++++++++++++++++
>  .../libvirt-gconfig-domain-graphics-vnc.h          |  4 ++
>  libvirt-gconfig/libvirt-gconfig.sym                |  2 +
>  3 files changed, 90 insertions(+)
> 
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
> index fc26bb9..46f3a4b 100644
> --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
> +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
> @@ -120,6 +120,90 @@ void gvir_config_domain_graphics_vnc_set_port(GVirConfigDomainGraphicsVnc *graph
>                                                 NULL);
>  }
>  
> +/**
> + * gvir_config_domain_graphics_vnc_set_listen_devices:
> + * @graphics: a #GVirConfigDomainGraphicsVnc
> + * @listens: (in) (element-type LibvirtGConfig.DomainGraphicsListen):
> + *
> + * This method is used to set the various listen nodes a #GVirConfigDomainGraphicsVnc
> + * device can handle.
> +*/
> +void gvir_config_domain_graphics_vnc_set_listen_devices(GVirConfigDomainGraphicsVnc *graphics,
> +                                                        GList *listens)

Patch is good overall, but the naming needs improving, these <listen>
nodes are not devices. I'm not exactly sure how to name the API though.
_set_listen_nodes() is the only thing which comes to mind, and I don't
think it's great. Another options would be just _set_listens(), but
that's odd too. Any better suggestion?

Apart from this naming issue (which has to be fixed before pushing),

Acked-by: Christophe Fergeau <cfergeau at redhat.com>

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160902/5914b457/attachment-0001.sig>


More information about the libvir-list mailing list