Request for the 1.0 release
hp at redhat.com
Sat Feb 25 19:58:12 PST 2006
On Sun, 2006-02-26 at 02:48 +0100, Thiago Macieira wrote:
> It works if the bindings play nice with each other. Currently, we don't.
> We don't register the objects because the tree is dynamic and can change
> without calling "registerObject".
I'm not sure I understand all the issues - do you think this is
Is the problem you can't reliably tell if another binding registers the
> And now getting to what I wanted to know: if you call
> dbus_g_proxy_get_interface() on the "destroyed" signal, what interface do
> you get?
get_interface() is something you call on the proxy itself, not on the
signal; so you'd always get whatever interface you created the proxy
with (the dbus interface name of the remote object). If a remote object
has two interfaces, with DBusGProxy you have to create two proxies, or I
think you can just pass in NULL for the interface (which will then omit
it in the DBusMessage as well).
The destroy signal is just a member of the DBusGProxy local class; it's
not conceptually a signal on the remote object or a member of any dbus
interface, in fact it's only emitted in response to bus events - it
would not be emitted if the remote object were finalized. The signal
should really be called "disconnected" or "name_owner_changed" or
DBusGProxy does not map remote signals to regular GObject signals,
instead there's a special dbus_g_proxy_connect_signal() that you use
instead of g_signal_connect() for remote signals. To map remote signals
to regular GObject signals, a new proxy *class* would have to be
generated for each remote object, while right now the proxy instances
all have the class DBusGProxy.
> I should have said so before: if I'm going to mimic the behaviour, I
> should could just as well use the same interface names.
The glib bindings aren't very heavily tested or evolved, they could kind
of use some love even...
I sort of started on the glib bindings, then Colin sort of
mostly-finished them, now they are kind of not maintained enough.
> >com_example_StateMachine_get_info (DBusGProxy *proxy, char ** OUT_name,
> >char ** OUT_state, GError **error)
> > return dbus_g_proxy_call (proxy, "GetInfo", error, G_TYPE_INVALID,
> >G_TYPE_STRING, OUT_name, G_TYPE_STRING, OUT_state, G_TYPE_INVALID);
> /me notes the naming-style conversion
This is one of the strange things about the glib bindings really,
probably the full "glib style" conversion would be
"com_example_state_machine_get_info()" and the "keep it all dbus" would
I'm not sure what's up with the hybrid approach, it looks pretty weird.
> The idea of doing that to reduce relocation counts isn't ours. See
> http://people.redhat.com/drepper/dsohowto.pdf section 2.4.3.
Uli strikes again ;-)
More information about the dbus