Re: new dbus api: SearchNotesSorted?
- From: Casey Harkins <caseyharkins gmail com>
- To: gnote-list gnome org
- Subject: Re: new dbus api: SearchNotesSorted?
- Date: Wed, 19 Oct 2011 16:52:48 -0500
On Wed, 2011-10-19 at 23:38 +0300, Aurimas Černius wrote:
> Hi,
>
> > > In this case I think we should modify the existing search API.
> > > Currently search returns notes at random order (from users
> > > perspective). Changing it to a defined order should not hurt, so I
> > > think there's no need to introduce a new API.
Agreed. I will update the existing patch to return the sorted list with
the existing function (and your other suggested changes) and file a bug
with the new patch attached.
> > Being able to select an order with an argument would be even better.
> > But the change to the API is bigger with that.
>
> That applies only when an argument determines by what we are ordering
> (title, last change time, search matches count, ...).
Also agree with this. However, adding an additional argument would
change the existing API, which could break anyone relying on it. As far
as I can tell, DBUS doesn't allow for optional parameters or method
overloading. So this should probably be new API if implemented.
Another possibility would be to add new API which returns an array of
search result objects with uri, title, last change time, search matches
count, etc. The caller could then implementing any sorting as needed.
-casey
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]