thoughts on conversations

Colin Walters walters at verbum.org
Wed Aug 10 11:29:48 PDT 2005


On Wed, 2005-08-10 at 10:13 +0100, Ross Burton wrote:
> On Tue, 2005-08-09 at 20:03 -0400, Colin Walters wrote:
> > Probably the best example is Ross' post from June about needing a way to
> > asynchronously communicate progress messages back to an individual
> > client, without broadcasting to all client.
> 
> I should explain what I'm currently doing.  The get() method on the
> factory object takes a string which is the address of the client.
>  This
> is needed as the glib bindings don't let the server get to the original
> message so can't get the source address manually.  It then stores the
> address and makes calls to the address (which also exposes an object).,

Right...this sounds to me a lot like BeginConversation.  The
DBusGConversation object is a subclass of DBusGProxy, so you can e.g. do
dbus_g_proxy_begin_call on it.

> The server also listens for NameChanged signals and uses those to detect
> when a client disconnects from the bus without releasing the objects.

Yeah, this would be handled automatically.  Although in my opinion it is
still a bug if the client doesn't release the proxy (end the
conversation).

> I'm not entirely convinced by the need for arguments.  Can't Begin/End
> have no in arguments and its up to the other interfaces on the object to
> define any required arguments?

I guess, yeah.

> Basically I'm torn over if a client obtains references to multiple
> objects on the server, is that a single conversation or multiple
> conversations?

Multiple.  In this design a conversation is with a particular *object*.
Does that match what you need?

> Would the conversation object also track the name changes and close
> itself when the other end disappears from the bus?

Yep, it'd signal "destroyed" just like a "name owner" DBusGProxy.  Also
it would emit that signal when the client sends EndConversation.

> I'll have a think about how this would work in EDS for a bit and reply
> again probably.

Ok cool, that's what I'm looking for :)  My proposal is just a rough
sketch attempting to address several apps, but yours is one of the
primary motivations.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050810/04552e60/attachment.pgp


More information about the dbus mailing list