On Mon, 2008-04-28 at 17:05 +0800, wendy wrote: > Hi Philip, > > I think we should take into account of using the "xesam-glib", which > will simplify the implementation of "xesam-support" on tracker.
Hey Wendy, Xesam-glib has a few classes that provide an abstract GLib GObject. You can implement it and get everything DBus related for free. Which is nice, indeed. However. The DBus related things for the Xesam support for trackerd have already been done in a very similar way to how xesam-glib works. For now ain't the code actually doing things asynchronously because none of the existing trackerd infrastructure and code is prepared for asynchronous operations (there's insufficient locking and data isolating in place, SQLite wouldn't cope with multiple threads accessing it, etc). We could indeed solve this with a little queue system and I have last Friday converted the DBus frontend to use the DBusMethodInvocation and Async=true way of using the dbus-binding-tool (just like xesam-glib). I have implemented the DBus methods themselves to dbus_g_method_return in the methods themselves. This makes it again synchronous, indeed. That's also on purpose: none of the existing trackerd infrastructure would cope with truly asynchronously handling. Xesam-glib's abstract class more or less seems to expect things to be dispatched to a worker queue. Xesam-glib is very cool, indeed. But we already have all that it provides. Maybe we can replace our frontend with this? I don't think that would add really a lot. Martyn has, in the indexer-split branch, redone all of the DBus work. I purposely based the Xesam DBus frontend on what he has done so far. This is to be consistent in the code everywhere. Although quite similar (also using the DBus glib bindings) wouldn't xesam-glib be consistent. Anyway, the files mentioned in my initial post show how it is done right now. Xesam-glib is code that could replace the tracker-xesam-search.c file, the generated tracker-xesam-search-glue.h file and the tracker- xesam-search.h file. It would require being plumbed it into the rest of tracker's DBus infrastructure in tracker-dbus.c. Note that xesam-glib's code was indeed used to get certain things about these files right and that, as a result of studying it, I even contacted Mikkel Kamstrup about a tiny glitch in xesam-glib that got me confused (a GStrv* instead of a GStrv somewhere). > 在 2008-04-24四的 14:15 +0200,Philip Van Hoof写道: > > Hackers! Ping > > > > A group of people, including myself, have started a branch called > > "xesam-support" where we are doing an attempt at adding support for > > Xesam in the trackerd service. > > > > We branched from the indexer-split branch where all the cool new DBus > > things are being done by people like frade, martyn and garnacho. > > > > http://svn.gnome.org/svn/tracker/branches/xesam-support > > > > http://svn.gnome.org/svn/tracker/branches/indexer-split > > > > Interesting new files: > > > > Types that represent a Xesam Session and a Xesam Search: > > http://svn.gnome.org/svn/tracker/branches/xesam-support/src/trackerd/tracker-xesam-session.c > > http://svn.gnome.org/svn/tracker/branches/xesam-support/src/trackerd/tracker-xesam-session.h > > http://svn.gnome.org/svn/tracker/branches/xesam-support/src/trackerd/tracker-xesam-live-search.h > > http://svn.gnome.org/svn/tracker/branches/xesam-support/src/trackerd/tracker-xesam-live-search.c > > > > The glib-dbus DBus proxy type (sorry for the confusion between "Search" > > and "LiveSearch" (above), we decided on this name because of consistency > > with the existing TrackerDBusSearch for /org/freedesktop/Tracker/Search. > > This one serves as object for /org/freedesktop/xesam/Search (which is > > consistent in naming within the existing infrastructure of trackerd's > > code) > > > > http://svn.gnome.org/svn/tracker/branches/xesam-support/src/trackerd/tracker-xesam-search.c > > http://svn.gnome.org/svn/tracker/branches/xesam-support/src/trackerd/tracker-xesam-search.h > > > > Some global API: > > http://svn.gnome.org/svn/tracker/branches/xesam-support/src/trackerd/tracker-xesam.c > > http://svn.gnome.org/svn/tracker/branches/xesam-support/src/trackerd/tracker-xesam.h > > > > > > In the code, you'll notice that we aligned the Xesam specification > > documentation for http://xesam.org/main/XesamSearchAPI to the types > > TrackerXesamSearch 's and TrackerXesamSession 's gtk-doc comments. This > > will make it more easy to get their implementations right and according > > to spec. > > > > There are "todo" markers and "not-sure" markers in the current code. > > > > SO ... if you feel a sudden urge to just go for it, and help us with the > > effort of getting it done: you are absolutely more than welcome. Meet us > > (otella, pvanhoof, martyn, garnacho, frade, konttori) on #tracker at > > irc.gimpnet.org. > > > > Just svn co http://svn.gnome.org/svn/tracker/branches/xesam-support or > > svn co svn+ssh://svn.gnome.org/svn/tracker/branches/xesam-support > > > > ... and start coding! > > > > > -- Philip Van Hoof, freelance software developer home: me at pvanhoof dot be gnome: pvanhoof at gnome dot org http://pvanhoof.be/blog http://codeminded.be _______________________________________________ tracker-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/tracker-list
