
On Fri, Dec 02, 2011 at 02:40:03PM +0100, Christophe Fergeau wrote:
Hi,
This patch series adds support for setting <console> nodes as has been discussed in the "[PATCH libvirt-glib 02/15] Add objects for dealing with <console> devices" thread.
It introduces a GVirConfigDomainChardev which derives from GVirConfigDomainDevice. The actual classes to create <console>, <serial>, <parallel> nodes will inherit from this parent class.
Then we have GVirConfigDomainChardevSource which derives from GVirConfigObject (with a dummy root node name) and from which derives GVirConfigDomainChardevSourcePty.
A GVirConfigDomainChardevSourcePty is associated to a GVirConfigDomainConsole object through GVirConfigDomainChardev::add_source. Maybe it should be ::set_source, I'm unsure... The code from ::add_source directly messes with the xml nodes so a careful review won't hurt :)
At this point I consider this to be at least 50% RFC so we can still redesign the whole thing.
I think it looks ok to me, if we use 'set_source' as you suggest, since there is only one which can be associated at a time. 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 :|