Getting method call metadata in dbus-glib servers

Colin Walters walters at verbum.org
Thu May 29 09:43:47 PDT 2008


On Thu, May 29, 2008 at 12:32 PM, Ross Burton <ross at burtonini.com> wrote:

> On Thu, 2008-05-29 at 11:28 -0500, Matt Hoosier wrote:
> > On Thu, May 29, 2008 at 11:02 AM, Ross Burton <ross at burtonini.com>
> wrote:
> > > If you make your methods asynchronous, then you'll be given a context
> > > object which lets you get the sender's bus name.
> >
> > Thanks. So if I understand the approach here: it looks like you don't
> > really want the method to be asynchronous (every path through it
> > either returns an explicit error or uses dbus_g_method_return()); this
> > is just a hack to get at the context information?
>
> That's right.  It's not the best, but it works.  Another annotation to
> get the context for non-async methods would be nice.


A possible fix in dbus-glib is to use an internal thread-local context,
exposed as a global function like
dbus_g_get_context() or the like.

But yeah, it is issues like this I think that show what we really want is a
nicer direct interface to DBus, not to export GObjects.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20080529/a4c4716a/attachment.html 


More information about the dbus mailing list