char *match_rule;
GDBusPropertyFunction prop_func;
void *prop_data;
+ GDBusProxyFunction removed_func;
+ void *removed_data;
};
struct prop_entry {
proxy->client = NULL;
}
+ if (proxy->removed_func)
+ proxy->removed_func(proxy, proxy->removed_data);
+
g_dbus_proxy_unref(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;
gboolean g_dbus_proxy_set_property_watch(GDBusProxy *proxy,
GDBusPropertyFunction function, void *user_data);
+gboolean g_dbus_proxy_set_removed_watch(GDBusProxy *proxy,
+ GDBusProxyFunction destroy, void *user_data);
+
GDBusClient *g_dbus_client_new(DBusConnection *connection,
const char *service, const char *path);