summaryrefslogtreecommitdiff
path: root/gdbus/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdbus/client.c')
-rw-r--r--gdbus/client.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdbus/client.c b/gdbus/client.c
index 0311f9a4..369e3acf 100644
--- a/gdbus/client.c
+++ b/gdbus/client.c
@@ -62,6 +62,8 @@ struct GDBusProxy {
char *match_rule;
GDBusPropertyFunction prop_func;
void *prop_data;
+ GDBusProxyFunction removed_func;
+ void *removed_data;
};
struct prop_entry {
@@ -394,6 +396,9 @@ static void proxy_free(gpointer data)
proxy->client = NULL;
}
+ if (proxy->removed_func)
+ proxy->removed_func(proxy, proxy->removed_data);
+
g_dbus_proxy_unref(proxy);
}
@@ -761,6 +766,18 @@ gboolean g_dbus_proxy_set_property_watch(GDBusProxy *proxy,
return TRUE;
}
+gboolean g_dbus_proxy_set_removed_watch(GDBusProxy *proxy,
+ GDBusProxyFunction function, void *user_data)
+{
+ if (proxy == NULL)
+ return FALSE;
+
+ proxy->removed_func = function;
+ proxy->removed_data = user_data;
+
+ return TRUE;
+}
+
static void refresh_properties(GDBusClient *client)
{
GList *list;