Re: RFC: Operation Options API proposal



On 24/03/2011 12:20, Juan A. Suárez Romero wrote:
> On Wed, 2011-03-23 at 14:50 +0100, Guillaume Emont wrote:
>>   /* whether source supports pagination (skip & count)
>>   void grl_caps_set_pagination (GrlCaps *caps, gboolean pagination);
>>   gboolean grl_caps_get_pagination (GrlCaps *caps);
>>   /* flags the source can honour. Only GRL_RESOLVE_FAST_ONLY makes
>> sense, since
>>    * the other flags are entirely handled by core */
>>   void grl_caps_set_flags (GrlCaps *caps, GrlMetadataResolutionFlags
>> flags);
>>   GrlMetadataResolutionFlags grl_caps_get_falgs (GrlCaps *caps);
>>
>>
> 
> IMO pagination is a must, so sources shouldn't tell if they support it
> or not: they must.

I'm not sure I agree. Maybe the limit is a must, but not sure pagination
per se is. If the underlying API doesn't support it (such as
g_file_enumerate_children() in the case of filesystem), then the plugin
writer has to bend backwards to implement a support for it that would be
no better than a generic support in core. For the sake of maximising
source simplicity, I think this should be a capability  from the point
of view of the plugin (i.e. something optional), even though it would
always look "available" for the application writer (core would modify
the caps before passing them for that).

> 
> Regarding the flags, I think more or less the same: it is the core who
> handles the flags, so it will support them.
> 
> Regarding the GRL_RESOLVE_FAST_ONLY, it is something that sources must
> honour. 
> 
> So I would make this caps not optional, but compulsory.
If something is compulsory, then I think it shouldn't be listed in the caps.

> 
> 	J.A.
> 
> 
> _______________________________________________
> grilo-list mailing list
> grilo-list gnome org
> http://mail.gnome.org/mailman/listinfo/grilo-list
> 



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