add data parameter to bt_pairing_agent_on() 65/27765/3
authorCorentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
Thu, 18 Sep 2014 14:49:52 +0000 (16:49 +0200)
committerCorentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
Wed, 24 Sep 2014 09:15:32 +0000 (11:15 +0200)
It allows to forward pairing data to plugin

Change-Id: I89ef12f1cd27aec3e253f43946e4ec7746964f01
Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
include/vertical.h
plugins/bluetooth-geek.c
plugins/bluetooth-mobile.c
src/pairing.c
src/vertical.c

index 7f9b005..976d23e 100644 (file)
@@ -27,11 +27,7 @@ struct bluetooth_vertical_driver {
        int (*disabled)(void);
        int (*transfer)(double);
        int (*opp_agent_on)(void);
-#ifdef TIZEN_3
        int (*pairing_agent_on)(void*);
-#else
-       int (*pairing_agent_on)(void);
-#endif
 };
 
 void comms_service_register_bt_vertical_driver(
@@ -45,11 +41,8 @@ int vertical_notify_bt_enabled(void);
 void vertical_notify_bt_disabled(void);
 
 void vertical_notify_bt_transfer(double progress);
-#ifdef TIZEN_3
+
 void vertical_notify_bt_pairing_agent_on(void* data);
-#else
-void vertical_notify_bt_pairing_agent_on(void);
-#endif
 
 void vertical_notify_bt_opp_agent_on(void);
 #endif
index c231f57..7084069 100644 (file)
@@ -130,7 +130,7 @@ static int bt_transfer(double progress)
        return 0;
 }
 
-static int bt_pairing_agent_on(void)
+static int bt_pairing_agent_on(void *data)
 {
        /*TODO:
         * In Geek, it should startup Application that using
index 23b02bf..692592b 100644 (file)
@@ -276,7 +276,7 @@ static int bt_transfer(double progress)
        return 0;
 }
 
-static int bt_pairing_agent_on(void)
+static int bt_pairing_agent_on(void *data)
 {
        bundle *b;
        int ret;
index cd13c10..7bd0712 100644 (file)
@@ -675,7 +675,7 @@ static void handle_pairing_agent_method_call(GDBusConnection *connection,
        }
 
 #ifndef TIZEN_3
-       vertical_notify_bt_pairing_agent_on();
+       vertical_notify_bt_pairing_agent_on(NULL);
 
        relay_agent_timeout_id = g_timeout_add(5000,
                                        relay_agent_timeout_cb, NULL);
index 05b08d7..1661744 100644 (file)
@@ -83,7 +83,6 @@ void vertical_notify_bt_disabled(void)
                bluetooth_driver->disabled();
 }
 
-#ifdef TIZEN_3
 void vertical_notify_bt_pairing_agent_on(void *data)
 {
        if (!bluetooth_driver)
@@ -92,16 +91,7 @@ void vertical_notify_bt_pairing_agent_on(void *data)
        if (bluetooth_driver->pairing_agent_on)
                bluetooth_driver->pairing_agent_on(data);
 }
-#else
-void vertical_notify_bt_pairing_agent_on(void)
-{
-       if (!bluetooth_driver)
-               return;
 
-       if (bluetooth_driver->pairing_agent_on)
-               bluetooth_driver->pairing_agent_on();
-}
-#endif
 void vertical_notify_bt_opp_agent_on(void)
 {
        if (!bluetooth_driver)