Re: Operation options (filtering, sorting and more)



On Tue, 2011-03-15 at 19:14 +0100, Guillaume Emont wrote:
> >> I wouldn't be against something like:
> >> typedef struct {
> >>   GrlFilter *filter;
> >>   GrlSortParameters *sort_params;
> >> } _GrlOperationOptionsPriv;
> >>
> >> void grl_operation_options_set_filter (GrlFilter *filter);
> >> void grl_operation_options_set_sort_parameters (GrlFilter *filter);
> >>
> >> But I am not sure it is really needed, and it would need slightly
> more
> >> work on the caller side. 
> > 
> > 
> > What I mean is having a GrlFilter and related operations for
> filtering;
> > GrlSort and related operations for sort.
> > 
> > And have one api to add GrlFilter and GrlSort in a GrlOptions that
> would
> > be passed to the plugin. The same to recover them.
> Is that different to the small example I gave above? Granted, the
> parameter to _set_sort_parameters() is wrong, and I didn't list
> accessors, but they were implied. 


Well, probably it is mostly the same. I couldn't check from your
example. 

I don't mind about how to implement the OptionsPriv structure (either a
structure, an array, or whatever), as it is an internal structure.

And if your example meant having the sort-related functions a
GrlSortParameters struct and filter-related functions a GrlFilter
struct, then I agree we are talking about the same.


	J.A.




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