Handle bluetooth-meshd life cycle
[platform/core/connectivity/bluetooth-frwk.git] / plugin / headed.c
index 8ed7698..ce3e261 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 #include <stdio.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
@@ -104,6 +105,7 @@ static gboolean _bt_agent_system_popup_timer_cb(gpointer user_data)
 
 int bt_launch_system_popup(bt_agent_event_type_t event_type,
                                                        const char *device_name,
+                                                       const char *remote_address,
                                                        const unsigned char *auth_info,
                                                        char *passkey,
                                                        const char *filename,
@@ -120,6 +122,7 @@ int bt_launch_system_popup(bt_agent_event_type_t event_type,
        }
 
        bundle_add(b, "device-name", device_name);
+       bundle_add(b, "address", remote_address);
        bundle_add(b, "auth-info", (const char *)auth_info);
        bundle_add(b, "passkey", passkey);
        bundle_add(b, "file", filename);
@@ -206,7 +209,7 @@ int bt_launch_system_popup(bt_agent_event_type_t event_type,
        return 0;
 }
 
-gboolean bt_launch_unable_to_pairing_syspopup(int result)
+bool bt_launch_unable_to_pairing_syspopup(int result)
 {
        BT_DBG("+");
        int ret = 0;
@@ -214,7 +217,7 @@ gboolean bt_launch_unable_to_pairing_syspopup(int result)
 
        b = bundle_create();
        if (b == NULL)
-               return FALSE;
+               return false;
 
        bundle_add(b, "event-type", "unable-to-pairing");
 
@@ -235,11 +238,11 @@ gboolean bt_launch_unable_to_pairing_syspopup(int result)
        }
 
        BT_DBG("-");
-       return TRUE;
+       return true;
 }
 
 
-gboolean bt_is_tethering_enabled(void)
+bool bt_is_tethering_enabled(void)
 {
        BT_DBG("+");
 
@@ -264,7 +267,7 @@ gboolean bt_is_tethering_enabled(void)
        if (ret != TETHERING_ERROR_NONE)
                BT_ERR("Fail to destroy tethering: %d", ret);
 
-       return (gboolean)enabled;
+       return enabled;
 }
 
 int bt_get_mime_type(char *file_name, char **mime_type)