summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbus/dbus-transport.c')
-rw-r--r--dbus/dbus-transport.c16
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.
*