[gnome-bluetooth] Bug 585203 – BluetoothClientConnectFunc should pass BluetoothClient



commit 5ee34a9e33f1215d955a2f7b4169595f032e6575
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jun 9 21:21:40 2009 +0100

    Bug 585203 â?? BluetoothClientConnectFunc should pass BluetoothClient
    
    Pass BluetoothClient as the first arguments to the callbacks
    for the connect, disconnect and create_device functions.
---
 lib/bluetooth-client.c |    6 +++---
 lib/bluetooth-client.h |    4 ++--
 wizard/main.c          |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index 1089e62..b94ead1 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 70f3ee5..d0198ee 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 01261b7..5297379 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]