[Adapt] Adapt changes related to Tizen Wearable profile 72/112972/2
authorAnupam Roy <anupam.r@samsung.com>
Fri, 3 Feb 2017 12:38:11 +0000 (18:08 +0530)
committerAnupam Roy <anupam.r@samsung.com>
Fri, 3 Feb 2017 12:41:01 +0000 (18:11 +0530)
a/ Change macro name from TIZEN_WEARABLE to TIZEN_PROFILE_WEARABLE
b/ Adapt changes from tizen_3.0 branch related to wearable profile

Change-Id: I911169818e0a7d8c1cb3edd21c536b3868262df3
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
bt-oal/bluez_hal/src/bt-hal-agent.c
bt-service-adaptation/services/adapter/bt-service-core-adapter.c
bt-service-adaptation/services/audio/bt-service-audio.c

index 92b5cc5..074d70a 100644 (file)
@@ -557,31 +557,6 @@ static gboolean __bt_hal_confirm_request(GapAgentPrivate *agent, GDBusProxy *dev
 
        if (!name)
                name = address;
-#ifdef TIZEN_WEARABLE
-       uint32_t major_class;
-
-
-       major_class = (device_class & 0x1f00) >> 8;
-
-       if (major_class == BLUETOOTH_DEVICE_MAJOR_CLASS_AUDIO) {
-               DBG("Audio device. Launch passkey pop-up");
-               _bt_hal_launch_system_popup(BT_HAL_AGENT_EVENT_PASSKEY_CONFIRM_REQUEST, name,
-                               str_passkey, NULL, _gap_agent_get_path(agent));
-               goto done;
-       }
-
-       if (__is_reset_required(address)) {
-               DBG("Launch system reset pop-up");
-               _bt_hal_launch_system_popup(BT_HAL_AGENT_EVENT_SYSTEM_RESET_REQUEST, name,
-                               NULL, NULL, _gap_agent_get_path(agent));
-       } else {
-               DBG("Launch passkey pop-up");
-               _bt_hal_launch_system_popup(BT_HAL_AGENT_EVENT_PASSKEY_AUTO_ACCEPTED, name,
-                               str_passkey, NULL, _gap_agent_get_path(agent));
-
-               gap_agent_reply_confirmation(agent, GAP_AGENT_ACCEPT, NULL);
-       }
-#else
 
 #ifdef TIZEN_SYSPOPUP_SUPPORTED
        DBG("Launch BT Syspopup");
@@ -594,7 +569,6 @@ static gboolean __bt_hal_confirm_request(GapAgentPrivate *agent, GDBusProxy *dev
        __bt_hal_send_ssp_request_events(address, name, passkey,
                        device_class, BT_SSP_VARIANT_PASSKEY_CONFIRMATION);
 #endif //TIZEN_SYSPOPUP_SUPPORTED
-#endif //TIZEN_WEARABLE
 
 done:
        g_variant_unref(reply);
@@ -792,13 +766,6 @@ int _bt_hal_launch_system_popup(bt_hal_agent_event_type_t event_type,
                case BT_HAL_AGENT_EVENT_MAP_REQUEST:
                        g_strlcpy(event_str, "message-request", sizeof(event_str));
                        break;
-#ifdef TIZEN_WEARABLE
-               case BT_HAL_AGENT_EVENT_SYSTEM_RESET_REQUEST:
-                       __bt_register_popup_event_signal();
-                       g_strlcpy(event_str, "system-reset-request", sizeof(event_str));
-                       break;
-#endif
-
                case BT_HAL_AGENT_EVENT_LEGACY_PAIR_FAILED_FROM_REMOTE:
                        g_strlcpy(event_str, "remote-legacy-pair-failed", sizeof(event_str));
                        break;
index 4801676..b69ced0 100644 (file)
@@ -298,7 +298,7 @@ static int __bt_visibility_alarm_cb(alarm_id_t alarm_id, void* user_param)
                visible_timer.event_id = 0;
                visible_timer.timeout = 0;
 
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
                if (vconf_set_int(BT_FILE_VISIBLE_TIME, 0) != 0)
                        BT_ERR("Set vconf failed\n");
 #endif
@@ -329,7 +329,7 @@ static gboolean __bt_timeout_handler(gpointer user_data)
                visible_timer.event_id = 0;
                visible_timer.timeout = 0;
 
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
                if (vconf_set_int(BT_FILE_VISIBLE_TIME, 0) != 0)
                        BT_ERR("Set vconf failed\n");
 #endif
@@ -362,7 +362,7 @@ static int __bt_set_visible_time(int timeout)
 
        visible_timer.timeout = timeout;
 
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
 #ifdef TIZEN_DPM_ENABLE
        if (_bt_dpm_get_bluetooth_limited_discoverable_state() != DPM_RESTRICTED) {
 #endif
index 98e806c..f9d5433 100644 (file)
 #include "bt-service-a2dp-src.h"
 #include "bt-service-hf.h"
 
+#ifdef TIZEN_SUPPORT_DUAL_HF
+#ifdef TIZEN_PROFILE_WEARABLE
+#define VCONF_KEY_BT_HOST_BT_MAC_ADDR "db/wms/host_bt_mac"
+#endif
+#endif
+
 /* Static variables and Macros */
 static GList *g_connected_list;
 static bt_headset_wait_t *g_wait_data;
@@ -182,7 +188,7 @@ static void __bt_set_headset_disconnection_type(const char *address)
 #ifdef TIZEN_SUPPORT_DUAL_HF
 gboolean __bt_is_companion_device(const char *addr)
 {
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
        char *host_device_address = NULL;
        host_device_address = vconf_get_str(VCONF_KEY_BT_HOST_BT_MAC_ADDR);