On Tue, Sep 25, 2012 at 02:47:30PM +0200, Christophe Fergeau wrote:
On Tue, Sep 25, 2012 at 02:07:39PM +0200, Michal Privoznik wrote:
Hey,
> libvirt supports listen on IP address or a network and I think we need
> to distinguish these.
As I understand it, to listen on an IP address or a network, you'd use a
<listen> child node to the <graphics> node. This patch sets the
'listen'
attribute on the <graphics> node, which is only about listening on an IP
address if I didn't miss anything (?).
<listen> nodes would be handled in a separate class, but there could
indeed be an ambiguity between a setter for an object of this type, and
this API.
I wonder if we should simply not expose an API for the listen= attribute
at all. Only have APIs for reading/writing the <listen> elements, and
then for the first <listen> element propagate writes to the listen=
attribute when applicable. Likewise if no <listen> element is found
when parsing, auto-create one based on the listen= attribute.
IOW, I don't think applications should need to care about the listen=
attribute at all.
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|