diff options
author | Bastien Nocera <hadess@hadess.net> | 2009-06-09 21:21:40 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2009-06-09 21:21:40 +0100 |
commit | 5ee34a9e33f1215d955a2f7b4169595f032e6575 (patch) | |
tree | 5df420838278d6ebd48c8aa067d6f39dc4bbe8e6 | |
parent | ce6e7127aa58c95efd72151925c8a23f83bd92de (diff) | |
download | gnome-bluetooth-5ee34a9e33f1215d955a2f7b4169595f032e6575.tar.gz |
Bug 585203 – BluetoothClientConnectFunc should pass BluetoothClient
Pass BluetoothClient as the first arguments to the callbacks
for the connect, disconnect and create_device functions.
-rw-r--r-- | lib/bluetooth-client.c | 6 | ||||
-rw-r--r-- | lib/bluetooth-client.h | 4 | ||||
-rw-r--r-- | wizard/main.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c index 1089e626..b94ead14 100644 --- a/lib/bluetooth-client.c +++ b/lib/bluetooth-client.c @@ -1335,7 +1335,7 @@ static void create_device_callback(DBusGProxy *proxy, } if (devdata->func) - devdata->func(path, devdata->data); + devdata->func(bluetooth_client, path, devdata->data); g_object_unref(proxy); } @@ -1431,7 +1431,7 @@ static void connect_callback(DBusGProxy *proxy, g_error_free(error); if (conndata->func) - conndata->func(conndata->data); + conndata->func(bluetooth_client, conndata->data); g_object_unref(proxy); } @@ -1525,7 +1525,7 @@ static void disconnect_callback(DBusGProxy *proxy, } if (conndata->func) - conndata->func(conndata->data); + conndata->func(bluetooth_client, conndata->data); g_object_unref(proxy); g_free (conndata); diff --git a/lib/bluetooth-client.h b/lib/bluetooth-client.h index 70f3ee5b..d0198eeb 100644 --- a/lib/bluetooth-client.h +++ b/lib/bluetooth-client.h @@ -94,7 +94,7 @@ DBusGProxy *bluetooth_client_get_default_adapter(BluetoothClient *client); gboolean bluetooth_client_start_discovery(BluetoothClient *client); gboolean bluetooth_client_stop_discovery(BluetoothClient *client); -typedef void (*BluetoothClientCreateDeviceFunc) (const char *path, gpointer data); +typedef void (*BluetoothClientCreateDeviceFunc) (BluetoothClient *client, const char *path, gpointer data); gboolean bluetooth_client_create_device(BluetoothClient *client, const char *address, const char *agent, @@ -103,7 +103,7 @@ gboolean bluetooth_client_create_device(BluetoothClient *client, gboolean bluetooth_client_set_trusted(BluetoothClient *client, const char *device, gboolean trusted); -typedef void (*BluetoothClientConnectFunc) (gpointer data); +typedef void (*BluetoothClientConnectFunc) (BluetoothClient *client, gpointer data); gboolean bluetooth_client_connect_service(BluetoothClient *client, const char *device, diff --git a/wizard/main.c b/wizard/main.c index 01261b7e..52973797 100644 --- a/wizard/main.c +++ b/wizard/main.c @@ -195,7 +195,7 @@ static gboolean cancel_callback(DBusGMethodInvocation *context, return TRUE; } -static void connect_callback(gpointer user_data) +static void connect_callback(BluetoothClient *_client, gpointer user_data) { GtkAssistant *assistant = user_data; @@ -205,7 +205,7 @@ static void connect_callback(gpointer user_data) gtk_assistant_set_page_complete(assistant, page_setup, TRUE); } -static void create_callback(const char *path, gpointer user_data) +static void create_callback(BluetoothClient *_client, const char *path, gpointer user_data) { GtkAssistant *assistant = user_data; gboolean complete = FALSE; |