dbus tutorial terminology
Havoc Pennington
hp at redhat.com
Sun Jun 26 08:33:45 PDT 2005
On Sat, 2005-06-25 at 19:11 -0700, Don Park wrote:
> proxy = dbus_g_proxy_new_for_name (connection,
> DBUS_SERVICE_ORG_FREEDESKTOP_DBUS,
> DBUS_PATH_ORG_FREEDESKTOP_DBUS,
> DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS);
>
> PATH obviously corresponds to DBUS_PATH_ORG_FREEDESKTOP_DBUS and the
> Interface obviously corresponds to DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS.
> What about DBUS_SERVICE_ORG_FREEDESKTOP_DBUS? There is no mention of how
> this name fits in the model.
DBUS_SERVICE_DBUS (as it's now renamed) is the bus name. A service is a
program that owns well-known bus names. You are probably right that we
should rename the macro.
> The help text for dbus-send is:
> Usage: dbus-send [--help] [--system | --session] [--dest=SERVICE]
> [--type=TYPE] [--print-reply] [--reply-timeout=MSEC] <destination object
> path> <message name> [contents ...]
>
> Using the familiar terms of path, interface, and method, only path shows
> up in this text. I can make the leap between message name and method, but
> what is dest and type? I assume one of those corresponds to interface from
> the diagram, but that leaves one field name.
--dest=SERVICE should be fixed to =BUSNAME
--type is the kind of message to send (signal, method call, etc.)
See also the man page on this one.
> dbus-send --dest=org.freedesktop.DBus /org/freedesktop/DBus
> org.freedesktop.DBus.ListNothings
>
> still nothing. No error given.
Try --print-reply, by default dbus-send just sends, it doesn't block
waiting to see if anything comes back (error or otherwise)
> ps. for dbus-0.34, the tutorial is out of sync with the new constants.
> proxy = dbus_g_proxy_new_for_name (connection,
> DBUS_SERVICE_DBUS,
> DBUS_PATH_DBUS,
> DBUS_INTERFACE_DBUS);
>
Good catch, if you could file a bug (or make a patch if feeling
ambitious) that would be helpful so we don't forget.
Havoc
More information about the dbus
mailing list