Given a gobject service:<br> dbus_g_connection_register_g_object (bus, "/SomeObject", G_OBJECT (obj));<br><br>This gobject could release the service he provides, this way:<br>g_object_unref (obj);<br>
and dbus_g_proxy_call (bus_proxy, "ReleaseName", &error,<br>
G_TYPE_STRING, "org.designfu.SampleService",<br>
G_TYPE_INVALID,<br>
G_TYPE_UINT, &request_name_result,<br>
G_TYPE_INVALID))<br><br>I would like to have a proxy notified when the gobject service has released the service, or <br>has been destroyed.<br> proxy = dbus_g_proxy_new_for_name_owner (bus, "org.designfu.SampleService
", <br>
"/SomeObject", "org.designfu.SampleInterface", &error);<br>
either with a weak ref: <br> g_object_weak_ref (proxy, (GWeakNotify)_proxy_destroy, NULL);<br>or a distroy signal (I use the "name_owner" proxy):<br> g_signal_connect(proxy, "destroy", <br> G_CALLBACK(_proxy_destroy), proxy);
<br><br>Unfortunately, the proxy destroy signal is emited only when the process <br>where the service-object is living is terminated (killed or exited). <br><br>I think it's related to a "1:xxx" id still on the bus after the unref...
<br><br>I hope you will understand what I am talking about, I am sorry to have a so<br>poor english and not a deep understanding of dbus...<br><br>Thanks, <br><br><div><span class="gmail_quote">On 7/31/06, <b class="gmail_sendername">
John (J5) Palmieri</b> <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm not totally sure what you want either. What exactly should be<br>happening? Is destroy not getting called when you do the unref? The<br>ReleaseName call should generate a NameOwnerChanged signal. If not it<br>is a bug.
<br><br>On Mon, 2006-07-31 at 15:47 -0400, Havoc Pennington wrote:<br>><br>> Marc-André Lureau wrote:<br>> > The two process exist in my project, but I can't get the signal<br>> > in the proxy process owner.
<br>> ><br>> > And in the modified example-service.c, there is only one process<br>> > and no notification neither.<br>> ><br>> > Should I read some DBus code now?<br>> ><br>> > (cf.
<a href="http://pastebin.ca/108858">http://pastebin.ca/108858</a>)<br>> ><br>> ><br>><br>> I think I don't understand what you're asking...<br>><br>> Havoc<br>> _______________________________________________
<br>> dbus mailing list<br>> <a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a><br>> <a href="http://lists.freedesktop.org/mailman/listinfo/dbus">http://lists.freedesktop.org/mailman/listinfo/dbus
</a><br>--<br>John (J5) Palmieri <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>><br><br></blockquote></div><br><br clear="all"><br>-- <br>Marc-André Lureau, GSmartMix