DBUS service using glib: question
Xavier Claessens
xclaesse at gmail.com
Sun Jun 25 02:33:10 PDT 2006
Hello,
I'm writing a simple dbus service using GLIB interface. My problem is
that I have to keep some information about each client. For example how
can I emit a signal on the object only for one specific client, or with
different data for each client ?
Another problem I have is how to know when a client connect/disconnect ?
Because I keep some data in a hash table, I want to know when a client
disconnect to delete corresponding data.
How can I make that properly with dbus ?!?
Here is what I imagined, but I don't know if that's the right way:
- I register a main object with a connect method which returns an ID to
the client. The connect method also create and register a new object
just for this client which is stored in a list. The client, using the ID
can get the remote object and use it. Signals and method on this object
will have special effects depending on what the client does with it and
not interfering with what other clients does with other objects.
- The main object has also a disconnect method which takes the ID in
param and remove all data related to this client.
Is that the good way ? Does someone knows if other projects does the
same thing, like that I can see how they do...
Thanks,
Xavier Claessens.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Ceci est une partie de message
=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.freedesktop.org/archives/dbus/attachments/20060625/ad3de911/attachment.pgp
More information about the dbus
mailing list