diff options
author | Havoc Pennington <hp@redhat.com> | 2007-06-18 19:32:51 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2007-06-18 19:32:51 +0000 |
commit | 54b943432c7c947db88066751dd36a372cc9a618 (patch) | |
tree | 9b3eb7bc94cc0058c3fbcf2dc361fac40561a210 /dbus/dbus-transport.c | |
parent | ded479fda43da9dbe5780d0a2b287b5b1dcac64e (diff) |
2007-06-18 Havoc Pennington <hp@redhat.com>
* doc/dbus-specification.xml: document org.freedesktop.DBus.GetId()
* bus/driver.c (bus_driver_handle_get_id): implement org.freedesktop.DBus.GetId()
* bus/bus.c (bus_context_new): generate a unique ID for each bus context
* dbus/dbus-connection.c (dbus_connection_get_server_id): new function
* dbus/dbus-bus.c (dbus_bus_get_id): new function
* dbus/dbus-server.c (dbus_server_get_id): new function
Diffstat (limited to 'dbus/dbus-transport.c')
-rw-r--r-- | dbus/dbus-transport.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dbus/dbus-transport.c b/dbus/dbus-transport.c index 3edef937..d78727cf 100644 --- a/dbus/dbus-transport.c +++ b/dbus/dbus-transport.c @@ -792,6 +792,22 @@ _dbus_transport_get_address (DBusTransport *transport) } /** + * Gets the id of the server we are connected to (see + * dbus_server_get_id()). Only works on client side. + * + * @param transport the transport + * @returns transport's server's id or #NULL if we are the server side + */ +const char* +_dbus_transport_get_server_id (DBusTransport *transport) +{ + if (transport->is_server) + return NULL; + else + return transport->expected_guid; +} + +/** * Handles a watch by reading data, writing data, or disconnecting * the transport, as appropriate for the given condition. * |