DBus Un-activation
David Boucher
boudav at gmail.com
Mon Sep 8 12:05:16 PDT 2008
Hi,
In my application, the DBus activation of the server works well :-)
When I start a client, if the server is not running, DBus starts it alone.
Now, I want that when all my clients are closed, the server to stop too.
For that, I have two methods in my server interface : Ref and Unref.
Then, each time a client starts, it "refs" the server, and when it
finishes, it "unrefs" the server.
That way, it is possible to stop the server when ref_count <=0.
Is there a better way to stop the server when it is not used ?
When, in my client, the following line is executed:
proxy = dbus_g_proxy_new_for_name(connection, "toto", "/",
"toto.server");
is there a simple way for the server to know there is a client
"knocking on the door" ?
Thanks, I hope my question is not too stupid...
David.
More information about the dbus
mailing list