[virt-tools-list] [libosinfo] API to query required user avatar format

Christophe Fergeau cfergeau at redhat.com
Tue Nov 20 18:24:18 UTC 2012


On Tue, Nov 20, 2012 at 07:53:46PM +0200, Zeeshan Ali (Khattak) wrote:
> > To have a friendly external API rather than forcing internal implementation
> > issues onto the library user.
> 
> Thinking more about this, other restrictions could theoretically also
> be >1. Since I'm not sure we'll actually be encountering such
> installers, I think we currently go with this API

Not sure what you call this API, but my gut feeling is that installers that
support a single image format are the exception rather than the norm.

> and when we actually
> encounter such an installer, we:
> 
> 1. Allow multiple avatar formats, i-e add a
> osinfo_install_script_get_avatar_formats()
> 2. Make _get_avatar_format() return the first restriction in the list
> 3. Document in _get_avatar_format() about #2 and that apps should use
> the new API

Could get a bit ugly with respect to gobject properties, so better if we
can avoid going down that road ;) Also, I think we are more likely to have
installers needing ((PNG or JPEG) and (64x64 or 128x128)) rather than ((PNG
and 64x64) or (JPEG and 128x128)). The API you suggest seems appropriate in
the latter case, not the former.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20121120/77eff5c9/attachment.sig>


More information about the virt-tools-list mailing list