
On Wed, May 15, 2013 at 01:09:44PM -0400, Laine Stump wrote:
On 05/15/2013 07:23 AM, Osier Yang wrote:
On 15/05/13 19:09, Daniel P. Berrange wrote:
Instead of adding many parameters to the API, we could provide a struct
Agreed, many params is always not good. .
containing all the various callbacks needed in one go.
Daniel
Maybe each device object could have a "hidden" part (i.e. not necessarily visible in the XML) that can be setup before calling qemuBuildCommandLine(), and qemuBuildCommandline could use that info if it's there, otherwise fills in "null" args on the commandline.
I'm not against using a callback when it's appropriate, but I think they hinder proper understanding of code by newcomers, and should be used sparingly unless necessary.
I'm strongly against adding any driver specific data to the "def" objects. They should be exclusively used for representing the XML configuration data, that is agnostic to any particular driver. 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 :|