#include <dbus/dbus.h>
#include <glib.h>
-typedef void (* GDBusWatchFunction) (void *user_data);
+typedef void (* GDBusWatchFunction) (DBusConnection *connection,
+ void *user_data);
typedef gboolean (* GDBusSignalFunction) (DBusConnection *connection,
DBusMessage *message, void *user_data);
for (l = data->callbacks; l != NULL; l = l->next) {
struct name_callback *cb = l->data;
if (cb->func)
- cb->func(cb->user_data);
+ cb->func(data->connection, cb->user_data);
g_free(cb);
}
for (l = data->callbacks; l != NULL; l = l->next) {
struct name_callback *cb = l->data;
- cb->func(cb->user_data);
+ cb->func(connection, cb->user_data);
}
name_listeners = g_slist_remove(name_listeners, data);