Short lived, or "private", objects on the bus

Mikkel Kamstrup Erlandsen mikkel.kamstrup at gmail.com
Fri May 18 01:47:00 PDT 2007


Hi list,

Considering Havocs blog post http://log.ometer.com/2007-05.html, I have some
questions about temporary/short lived objects on the bus, which is of
concern for the xesam project[1].

The Setup:
A xesam compliant search engine will spawn Search objects in response to
application requests, and each Search object is considered "private" to the
application requesting it (see API at [2]). Also it is to be expected that
these Search objects are short lived in the sense that they wont last the
entire session. Many apps will just use them by reading a batch of results,
maybe listen for changes a a short while, and then discard the Search (maybe
to make another one).

The Problem:
After the app is done using the Search object any traces of it should be
removed. It is my understanding that you can't generally just remove an
object from the bus since other apps might be using it. (Partly) because of
this we use handles instead of real objects to represent Search objects and
pass the handle to the methods of the Search object as you would to a C
funtion in glib (fx org.freedesktop.xesam.search.CloseSearch
(search_handle)).

The Question:
So my question is; is this the way to do it? Or is there a clean way to let
Search objects be real disposable objects on the bus?

Cheers,
Mikkel

[1]: http://wiki.freedesktop.org/wiki/XesamAbout
[2]: http://wiki.freedesktop.org/wiki/XesamSearchLive
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20070518/d8663d64/attachment.htm 


More information about the dbus mailing list