On Wed, Aug 17, 2016 at 06:58:49PM +0300, Visarion Alexandru wrote: > From: Visarion Alexandru <viorel.visar...@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 <cferg...@redhat.com> Christophe
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list