[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [libvirt-glib] gconfig: API for SPICE image compression options

On Tue, Mar 12, 2013 at 06:28:36PM +0200, Zeeshan Ali (Khattak) wrote:
> On Tue, Mar 12, 2013 at 3:16 PM, Christophe Fergeau <cfergeau redhat com> wrote:
> > On Sat, Mar 09, 2013 at 04:44:14PM +0200, Zeeshan Ali (Khattak) wrote:
> >> From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>
> >>
> >> This patch adds API to set/get image compression options on
> >> domain/graphics[ type='spice'] nodes.
> >>
> >> Also included are simple tests for this API.
> >
> > Do we really need a dedicated gobject for this? I would have gone with
> > gvir_config_domain_graphics_spice_[gs]et_image_compression()
> It would have been easier to go w/o a separate object but I went this
> way since 'image' is a separate node in the config and I would assume
> its for a reason. One reason that comes to mind is that in future
> there might be some other options being added here?

We don't always go with 'one node' = 'one class', see the <os> node for
example, or gvir_config_domain_disk_set_startup_policy (various other
similar examples in this case).
For xml nodes that are very simple, they generally are modelled along with
the parent node, we can always deprecate the simple setter in the parent
node if the node gets more complex in the future.
It's something to decide on a case by case basis, but here I'd tend to go
with the simpler approach.


Attachment: pgpxf9LWrNzPC.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]