From: Luiz Augusto von Dentz <redacted>
This is convenient as some callbacks don't provide the client which
the proxy belongs.
---
gdbus/client.c | 8 ++++++++
gdbus/gdbus.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/gdbus/client.c b/gdbus/client.c
index ea56023..3c5784b 100644
--- a/gdbus/client.c
+++ b/gdbus/client.c
@@ -478,6 +478,14 @@ const char *g_dbus_proxy_get_interface(GDBusProxy *proxy)
return proxy->interface;
}
+GDBusClient *g_dbus_proxy_get_client(GDBusProxy *proxy)
+{
+ if (proxy == NULL)
+ return NULL;
+
+ return proxy->client;
+}
+
gboolean g_dbus_proxy_get_property(GDBusProxy *proxy, const char *name,
DBusMessageIter *iter)
{diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index 77bd069..83e41c7 100644
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -313,6 +313,7 @@ void g_dbus_proxy_unref(GDBusProxy *proxy);
const char *g_dbus_proxy_get_path(GDBusProxy *proxy);
const char *g_dbus_proxy_get_interface(GDBusProxy *proxy);
+GDBusClient *g_dbus_proxy_get_client(GDBusProxy *proxy);
gboolean g_dbus_proxy_get_property(GDBusProxy *proxy, const char *name,
DBusMessageIter *iter);
--
1.8.0.1