[gnome-bluetooth] applet: Update for new connect API
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] applet: Update for new connect API
- Date: Tue, 18 Oct 2011 15:56:01 +0000 (UTC)
commit c16469eef801df6e06a2f6c7888e6c17b2a85053
Author: Bastien Nocera <hadess hadess net>
Date: Tue Oct 18 15:53:06 2011 +0100
applet: Update for new connect API
applet/bluetooth-applet.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/applet/bluetooth-applet.c b/applet/bluetooth-applet.c
index a68223f..5709b83 100644
--- a/applet/bluetooth-applet.c
+++ b/applet/bluetooth-applet.c
@@ -611,9 +611,15 @@ typedef struct {
} ConnectionClosure;
static void
-connection_callback (BluetoothClient* client, gboolean success, gpointer data)
+
+connection_callback (GObject *source_object,
+ GAsyncResult *res,
+ gpointer user_data)
{
- ConnectionClosure *closure = (ConnectionClosure*) data;
+ ConnectionClosure *closure = (ConnectionClosure*) user_data;
+ gboolean success;
+
+ success = bluetooth_client_connect_service_finish (BLUETOOTH_CLIENT (source_object), res, NULL);
(*(closure->func)) (closure->self, success, closure->user_data);
@@ -645,7 +651,9 @@ bluetooth_applet_connect_device (BluetoothApplet* applet,
closure->func = func;
closure->user_data = data;
- return bluetooth_client_connect_service (applet->client, device, connection_callback, closure);
+ bluetooth_client_connect_service (applet->client, device, TRUE, NULL, connection_callback, closure);
+
+ return TRUE;
}
/**
@@ -673,7 +681,9 @@ bluetooth_applet_disconnect_device (BluetoothApplet* applet,
closure->func = func;
closure->user_data = data;
- return bluetooth_client_disconnect_service (applet->client, device, connection_callback, closure);
+ bluetooth_client_connect_service (applet->client, device, FALSE, NULL, connection_callback, closure);
+
+ return TRUE;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]