Can i call dbus_g_proxy_new_for_name without the application that implements the D-Bus method to be up and running ?
I’m not sure if it is good practice to do so, or if is usual.
Can i call dbus_g_proxy_new_for_name without the application that implements the D-Bus method to be
Share
Before I answer, I’d like to point out that DBus-GLib is deprecated. However, the answer applies to g_dbus_proxy_new (which is basically the replacement for dbus_g_proxy_new_for_name) as well.
Yes. The the dbus_g_proxy_new_for_name talks about how the owner can change over time, though it doesn’t explicitly mention the case of when there is no owner at the time of the call (original emphasis):
It’s actually very common to use this with D-Bus activation. Check out the “Client Implementation” section of Raphaël Slinckx’ DBus Activation Tutorial. It includes this snippet (pay attention to the comments):
D-Bus activation doesn’t even get triggered until after a method is called, so obviously the name doesn’t necessarily exist before then.