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

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Tue Nov 20 20:27:56 UTC 2012


On Tue, Nov 20, 2012 at 8:24 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> 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,

The API in my existing patch.

> but my gut feeling is that installers that
> support a single image format are the exception rather than the norm.

Same here.

>> 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 ;)

How so?

> 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.

Without any example of such cases at hand, I dont know how to say
which is more likely. While it might not be most appropriate for your
former case, it will nicely work for both. What you proposed will only
work for the former. We could device a different API when we actually
have an example/use-case at hand.

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124




More information about the virt-tools-list mailing list