Remain only essential functions for Tizen RT's BT device 72/208572/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 26 Jun 2019 05:27:12 +0000 (14:27 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 26 Jun 2019 05:27:12 +0000 (14:27 +0900)
Change-Id: Ife8ffbb8b287f4fafea94c8a4e8674fe670c9368
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/bluetooth-device.c

index 7c08a9268875215bfc5fe939c14a1d5c137ca6a3..5f03494c76e3dde2a6f6b1d9a0eaaadd5f84f4b6 100644 (file)
 #include "bluetooth_internal.h"
 #include "bluetooth_private.h"
 
-typedef struct {
-       unsigned int uuid;
-       bt_service_class_t service_mask;
-} bt_uuid2svc_table_t;
-
-static bt_uuid2svc_table_t uuid2svc_mask[] = {
-       { BLUETOOTH_SPP_PROFILE_UUID, BT_SC_SPP_SERVICE_MASK },
-       { BLUETOOTH_LAP_PROFILE_UUID, BT_SC_LAP_SERVICE_MASK },
-       { BLUETOOTH_DUN_PROFILE_UUID, BT_SC_DUN_SERVICE_MASK },
-       { BLUETOOTH_OBEX_IR_MC_SYNC_SERVICE_UUID, BT_SC_SYNC_SERVICE_MASK },
-       { BLUETOOTH_OBEX_OBJECT_PUSH_SERVICE_UUID, BT_SC_OPP_SERVICE_MASK },
-       { BLUETOOTH_OBEX_MESSAGE_ACCESS_SERVICE_UUID, BT_SC_MAP_SERVICE_MASK },
-       { BLUETOOTH_OBEX_FILE_TRANSFER_UUID, BT_SC_FTP_SERVICE_MASK },
-       { BLUETOOTH_HS_PROFILE_UUID, BT_SC_HSP_SERVICE_MASK },
-       { BLUETOOTH_CTP_PROFILE_UUID, BT_SC_CTP_SERVICE_MASK  },
-       { BLUETOOTH_AUDIO_SOURCE_UUID, BT_SC_A2DP_SOURCE_SERVICE_MASK },
-       { BLUETOOTH_AUDIO_SINK_UUID, BT_SC_A2DP_SERVICE_MASK },
-       { BLUETOOTH_AV_REMOTE_CONTROL_UUID, BT_SC_AVRCP_SERVICE_MASK },
-       { BLUETOOTH_ICP_PROFILE_UUID, BT_SC_ICP_SERVICE_MASK },
-       { BLUETOOTH_FAX_PROFILE_UUID, BT_SC_FAX_SERVICE_MASK },
-       { BLUETOOTH_PAN_PANU_PROFILE_UUID, BT_SC_PANU_SERVICE_MASK },
-       { BLUETOOTH_PAN_NAP_PROFILE_UUID, BT_SC_NAP_SERVICE_MASK },
-       { BLUETOOTH_PAN_GN_PROFILE_UUID, BT_SC_GN_SERVICE_MASK },
-       { BLUETOOTH_OBEX_IMAGING_RESPONDER_UUID, BT_SC_BIP_SERVICE_MASK },
-       { BLUETOOTH_HF_PROFILE_UUID, BT_SC_HFP_SERVICE_MASK },
-       { BLUETOOTH_HID_PROFILE_UUID, BT_SC_HID_SERVICE_MASK },
-       { BLUETOOTH_SIM_ACCESS_PROFILE_UUID, BT_SC_SAP_SERVICE_MASK },
-       { BLUETOOTH_OBEX_PBA_PROFILE_UUID, BT_SC_PBAP_SERVICE_MASK },
-       { BLUETOOTH_OBEX_BPPS_PROFILE_UUID, BT_SC_BPP_SERVICE_MASK },
-       { BLUETOOTH_OBEX_PRINTING_STATUS_UUID, BT_SC_BPP_SERVICE_MASK },
-       { BLUETOOTH_PNP_INFORMATION_UUID, BT_SC_NONE },
-       { BLUETOOTH_AV_REMOTE_CONTROL_TARGET_UUID, BT_SC_NONE },
-       { BLUETOOTH_VIDEO_SINK_UUID, BT_SC_NONE },
-       { BLUETOOTH_VIDEO_SOURCE_UUID, BT_SC_NONE },
-       { BLUETOOTH_HEADSET_AG_SERVICE_UUID, BT_SC_NONE },
-       { BLUETOOTH_REFERENCE_PRINTING, BT_SC_NONE },
-       { BLUETOOTH_OBEX_IMAGING_UUID, BT_SC_NONE },
-       { BLUETOOTH_HFG_PROFILE_UUID, BT_SC_NONE },
-       { BLUETOOTH_DIRECT_PRINTING_REFERENCE_OBJ_UUID, BT_SC_NONE },
-       { BLUETOOTH_BASIC_PRINTING, BT_SC_NONE },
-       { BLUETOOTH_HCR_PROFILE_UUID, BT_SC_NONE },
-       { BLUETOOTH_OBEX_SYNCML_TRANSFER_UUID, BT_SC_NONE },
-       { 0, BT_SC_NONE }
-};
-
 /* LCOV_EXCL_START */
 int bt_device_disconnect(const char *remote_address)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       int error_code = BT_ERROR_NONE;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_address);
-
-       _bt_convert_address_to_hex(&addr_hex, remote_address);
-       error_code = _bt_get_error_code(bluetooth_disconnect_device(&addr_hex));
-       if (error_code != BT_ERROR_NONE)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
-       return error_code;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 /* LCOV_EXCL_STOP */
 
@@ -107,34 +50,13 @@ int bt_device_create_bond(const char *device_address)
 int bt_device_create_bond_by_type(const char *device_address,
                        bt_device_connection_link_type_e conn_type)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       int error_code = BT_ERROR_NONE;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(device_address);
-
-       _bt_convert_address_to_hex(&addr_hex, device_address);
-       error_code = _bt_get_error_code(bluetooth_bond_device_by_type(&addr_hex, conn_type));
-       if (error_code != BT_ERROR_NONE)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
-       return error_code;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 /* LCOV_EXCL_STOP */
 
 int bt_device_cancel_bonding(void)
 {
-       int error_code = BT_ERROR_NONE;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       error_code = _bt_get_error_code(bluetooth_cancel_bonding()); /* LCOV_EXCL_LINE */
-       if (error_code != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); /* LCOV_EXCL_LINE */
-       }
-
-       return error_code; /* LCOV_EXCL_LINE */
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_destroy_bond(const char *device_address)
@@ -157,116 +79,29 @@ int bt_device_destroy_bond(const char *device_address)
 
 int bt_device_set_alias(const char *device_address, const char *alias)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       int error_code = BT_ERROR_NONE;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(device_address);
-       BT_CHECK_INPUT_PARAMETER(alias); /* LCOV_EXCL_LINE */
-
-       _bt_convert_address_to_hex(&addr_hex, device_address); /* LCOV_EXCL_LINE */
-       error_code = _bt_get_error_code(bluetooth_set_alias(&addr_hex, alias)); /* LCOV_EXCL_LINE */
-       if (error_code != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); /* LCOV_EXCL_LINE */
-       }
-       return error_code; /* LCOV_EXCL_LINE */
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_set_authorization(const char *device_address, bt_device_authorization_e authorization)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       gboolean trusted = FALSE;
-       int error_code = BT_ERROR_NONE;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(device_address);
-
-       _bt_convert_address_to_hex(&addr_hex, device_address); /* LCOV_EXCL_LINE */
-       if (authorization == BT_DEVICE_AUTHORIZED) /* LCOV_EXCL_LINE */
-               trusted = TRUE; /* LCOV_EXCL_LINE */
-
-       error_code = _bt_get_error_code(bluetooth_authorize_device(&addr_hex, trusted)); /* LCOV_EXCL_LINE */
-       if (error_code != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code); /* LCOV_EXCL_LINE */
-       }
-       return error_code; /* LCOV_EXCL_LINE */
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_start_service_search(const char *device_address)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       int ret = 0;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(device_address);
-
-       _bt_convert_address_to_hex(&addr_hex, device_address); /* LCOV_EXCL_LINE */
-       ret = _bt_get_error_code(bluetooth_search_service(&addr_hex));
-
-       /* In service search, BT_ERROR_SERVICE_SEARCH_FAILED is returned instead of BT_ERROR_OPERATION_FAILED. */
-       if (ret == BT_ERROR_OPERATION_FAILED)
-               ret = BT_ERROR_SERVICE_SEARCH_FAILED;
-
-       if (ret != BT_ERROR_NONE)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
-
-       return ret;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 /* LCOV_EXCL_START */
 int bt_device_cancel_service_search(void)
 {
-       int ret = 0;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       ret = _bt_get_error_code(bluetooth_cancel_service_search());
-       if (ret != BT_ERROR_NONE)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
-
-       return ret;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 /* LCOV_EXCL_STOP */
 
 int bt_device_foreach_connected_profiles(const char *remote_address, bt_device_connected_profile callback, void *user_data)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       gboolean is_connected = FALSE;
-       int ret;
-       int i = 0;
-       int profiles[] = {BT_PROFILE_RFCOMM, BT_PROFILE_A2DP,
-                       BT_PROFILE_HSP, BT_PROFILE_HID, BT_PROFILE_NAP,
-                       BT_PROFILE_AG, BT_PROFILE_GATT, BT_PROFILE_NAP_SERVER,
-                       0};
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_address);
-       BT_CHECK_INPUT_PARAMETER(callback); /* LCOV_EXCL_LINE */
-
-       _bt_convert_address_to_hex(&addr_hex, remote_address); /* LCOV_EXCL_LINE */
-
-       while (profiles[i] != 0) {
-               ret = _bt_get_error_code(bluetooth_is_device_connected(&addr_hex,
-                                                               profiles[i],
-                                                               &is_connected));
-               if (ret != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
-                       BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); /* LCOV_EXCL_LINE */
-                       return ret;
-               }
-
-               if (is_connected == TRUE) { /* LCOV_EXCL_LINE */
-                       if (!callback(profiles[i], user_data)) /* LCOV_EXCL_LINE */
-                               break;
-               }
-
-               i++; /* LCOV_EXCL_LINE */
-       }
-
-       return BT_ERROR_NONE;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_is_profile_connected(const char *remote_address, bt_profile_e bt_profile,
@@ -321,73 +156,19 @@ int bt_device_set_bond_destroyed_cb(bt_device_bond_destroyed_cb callback, void *
 
 int bt_device_set_authorization_changed_cb(bt_device_authorization_changed_cb callback, void *user_data)
 {
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(callback);
-       _bt_set_cb(BT_EVENT_AUTHORIZATION_CHANGED, callback, user_data);
-
-       return BT_ERROR_NONE;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_set_service_searched_cb(bt_device_service_searched_cb callback, void *user_data)
 {
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(callback);
-       _bt_set_cb(BT_EVENT_SERVICE_SEARCHED, callback, user_data);
-
-       return BT_ERROR_NONE;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 /* LCOV_EXCL_START */
 int bt_device_get_connection_state(const char *remote_address,
                bt_device_connection_link_type_e link_type, bool *connected)
 {
-       int ret;
-       bluetooth_device_address_t addr_hex = { {0,} };
-       bluetooth_connected_link_t connected_link = BLUETOOTH_CONNECTED_LINK_NONE;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_address);
-       BT_CHECK_INPUT_PARAMETER(connected);
-
-       if (link_type != BT_DEVICE_CONNECTION_LINK_BREDR &&
-           link_type != BT_DEVICE_CONNECTION_LINK_LE)
-               return BT_ERROR_INVALID_PARAMETER;
-
-       _bt_convert_address_to_hex(&addr_hex, remote_address);
-
-       ret = _bt_get_error_code(bluetooth_get_connected_link_type(&addr_hex, &connected_link));
-       if (ret != BT_ERROR_NONE) {
-               BT_ERR("%s(0x%08x) : Failed to run function",
-                               _bt_convert_error_to_string(ret), ret);
-               return ret;
-       }
-
-       if (connected_link == BLUETOOTH_CONNECTED_LINK_NONE) {
-               *connected = false;
-               return BT_ERROR_NONE;
-       }
-
-       if (connected_link == BLUETOOTH_CONNECTED_LINK_BREDR_LE) {
-               *connected = true;
-               return BT_ERROR_NONE;
-       }
-
-       if (link_type == BT_DEVICE_CONNECTION_LINK_BREDR) {
-               if (connected_link == BLUETOOTH_CONNECTED_LINK_BREDR)
-                       *connected = true;
-               else
-                       *connected = false;
-       } else if (link_type == BT_DEVICE_CONNECTION_LINK_LE) {
-               if (connected_link == BLUETOOTH_CONNECTED_LINK_LE)
-                       *connected = true;
-               else
-                       *connected = false;
-       }
-
-       return BT_ERROR_NONE;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 /* LCOV_EXCL_STOP */
@@ -404,12 +185,7 @@ int bt_device_set_connection_state_changed_cb(bt_device_connection_state_changed
 /* LCOV_EXCL_START */
 int bt_device_set_att_mtu_changed_cb(bt_device_att_mtu_changed_cb callback, void *user_data)
 {
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(callback);
-       _bt_set_cb(BT_EVENT_GATT_ATT_MTU_CHANGE_STATUS, callback, user_data);
-
-       return BT_ERROR_NONE;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 /* LCOV_EXCL_STOP */
 
@@ -437,18 +213,12 @@ int bt_device_unset_bond_destroyed_cb(void)
 
 int bt_device_unset_authorization_changed_cb(void)
 {
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       _bt_unset_cb(BT_EVENT_AUTHORIZATION_CHANGED);
-       return BT_ERROR_NONE;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_unset_service_searched_cb(void)
 {
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       _bt_unset_cb(BT_EVENT_SERVICE_SEARCHED);
-       return BT_ERROR_NONE;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_unset_connection_state_changed_cb(void)
@@ -462,18 +232,12 @@ int bt_device_unset_connection_state_changed_cb(void)
 /* LCOV_EXCL_START */
 int bt_device_unset_rssi_alert_cb(void)
 {
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       _bt_unset_cb(BT_EVENT_RSSI_ALERT_EVENT);
-       return BT_ERROR_NONE;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_unset_att_mtu_changed_cb(void)
 {
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       _bt_unset_cb(BT_EVENT_GATT_ATT_MTU_CHANGE_STATUS);
-       return BT_ERROR_NONE;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_enable_rssi_monitor(const char *remote_address,
@@ -484,28 +248,7 @@ int bt_device_enable_rssi_monitor(const char *remote_address,
                                bt_rssi_alert_cb cb_alert,
                                void *user_data_alert)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       int error_code = BT_ERROR_NONE;
-       bt_rssi_threshold_t rssi_threshold = { 0, };
-       BT_DBG("Enable RSSI");
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_address);
-
-       _bt_convert_address_to_hex(&addr_hex, remote_address);
-       rssi_threshold.high_threshold = 127;
-       rssi_threshold.low_threshold = low_threshold;
-       rssi_threshold.in_range_threshold = in_range_threshold;
-
-       error_code = _bt_get_error_code(bluetooth_enable_rssi(&addr_hex, link_type, &rssi_threshold));
-       if (error_code != BT_ERROR_NONE) {
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-       } else {
-               _bt_set_cb(BT_EVENT_RSSI_ENABLED_EVENT, cb_enable, user_data_enable);
-               _bt_set_cb(BT_EVENT_RSSI_ALERT_EVENT, cb_alert, user_data_alert);
-       }
-
-       return error_code;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_disable_rssi_monitor(const char *remote_address,
@@ -513,420 +256,111 @@ int bt_device_disable_rssi_monitor(const char *remote_address,
                                bt_rssi_monitor_enabled_cb cb_disable,
                                void *user_data_disable)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       int error_code = BT_ERROR_NONE;
-       bt_rssi_threshold_t rssi_threshold = { 0, };
-       BT_DBG("Enable RSSI");
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_address);
-
-       _bt_convert_address_to_hex(&addr_hex, remote_address);
-       error_code = _bt_get_error_code(bluetooth_enable_rssi(&addr_hex, link_type, &rssi_threshold));
-       if (error_code != BT_ERROR_NONE)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-       else
-               _bt_set_cb(BT_EVENT_RSSI_ENABLED_EVENT, cb_disable, user_data_disable);
-
-       return error_code;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_get_rssi_strength(const char *remote_address,
                                bt_device_connection_link_type_e link_type,
                                bt_rssi_strength_cb callback, void *user_data)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       int error_code = BT_ERROR_NONE;
-       BT_DBG("Get RSSI Strength");
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_address);
-
-       _bt_convert_address_to_hex(&addr_hex, remote_address);
-       error_code = _bt_get_error_code(bluetooth_get_rssi_strength(&addr_hex, link_type));
-       if (error_code != BT_ERROR_NONE)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-       else
-               _bt_set_cb(BT_EVENT_GET_RSSI_EVENT, callback, user_data);
-
-       return error_code;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 
 int bt_device_le_conn_update(const char *device_address,
        const bt_le_conn_update_s *parameters)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       bluetooth_le_connection_param_t param = { 0 };
-       int ret = BT_ERROR_NONE;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(device_address);
-       BT_CHECK_INPUT_PARAMETER(parameters);
-
-       _bt_convert_address_to_hex(&addr_hex, device_address);
-       param.interval_min = parameters->interval_min;
-       param.interval_max = parameters->interval_max;
-       param.latency = parameters->latency;
-       param.timeout = parameters->time_out;
-
-       ret = _bt_get_error_code(bluetooth_le_conn_update(&addr_hex, &param));
-
-       if (BT_ERROR_NONE != ret)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
-
-       return ret;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 /* LCOV_EXCL_STOP */
 
-static bt_service_class_t __bt_device_get_service_mask_value(unsigned int service)
-{
-       int i;
-
-       for (i = 0; uuid2svc_mask[i].uuid != 0; i++) {
-               if (uuid2svc_mask[i].uuid == service)
-                       return uuid2svc_mask[i].service_mask;
-       }
-
-       return BT_SC_NONE; /* LCOV_EXCL_LINE */
-}
-
 int bt_device_get_service_mask_from_uuid_list(char **uuids,
                                      int no_of_service,
                                      bt_service_class_t *service_mask_list)
 {
-       int i = 0;
-       unsigned int service = 0;
-       char **parts = NULL;
-       bt_service_class_t service_mask = 0;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INPUT_PARAMETER(uuids);
-       BT_CHECK_INPUT_PARAMETER(service_mask_list);
-       BT_CHECK_INIT_STATUS();
-
-       BT_DBG("Get service mask from uuid list");
-       BT_DBG("no_of_service = %d", no_of_service);
-
-       for (i = 0; i < no_of_service; i++) {
-               parts = g_strsplit(uuids[i], "-", -1);
-
-               if (parts == NULL || parts[0] == NULL) {
-                       g_strfreev(parts); /* LCOV_EXCL_LINE */
-                       continue; /* LCOV_EXCL_LINE */
-               }
-
-               service = g_ascii_strtoull(parts[0], NULL, 16);
-               g_strfreev(parts);
-
-               service_mask |= __bt_device_get_service_mask_value(service);
-       }
-
-       *service_mask_list = service_mask;
-       BT_DBG("service_mask = %x, service_mask_list = %x", (int)(uintptr_t)service_mask,
-              (int)(uintptr_t)service_mask_list);
-
-       return BT_ERROR_NONE;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 /* LCOV_EXCL_START */
 int bt_device_set_pin_code(const char *remote_address, const char *pin_code)
 {
-       int error_code = BT_ERROR_NONE;
-       bluetooth_device_address_t addr_hex = { {0,} };
-       bluetooth_device_pin_code_t pin = { {0} };
-
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_address);
-       BT_CHECK_INPUT_PARAMETER(pin_code);
-       if (strlen(pin_code) > BLUETOOTH_PIN_CODE_MAX_LENGTH) {
-               BT_ERR("INVALID_PARAMETER(0x%08x)", BT_ERROR_INVALID_PARAMETER);
-               return BT_ERROR_INVALID_PARAMETER;
-       }
-
-       _bt_convert_address_to_hex(&addr_hex, remote_address);
-       strncpy(pin.pin_code, pin_code, BLUETOOTH_PIN_CODE_MAX_LENGTH);
-       pin.pin_code[BLUETOOTH_PIN_CODE_MAX_LENGTH] = '\0';
-
-       error_code = _bt_get_error_code(bluetooth_set_pin_code(&addr_hex, &pin));
-       if (error_code != BT_ERROR_NONE)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
-       return error_code;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_unset_pin_code(const char *remote_address)
 {
-       int error_code = BT_ERROR_NONE;
-       bluetooth_device_address_t addr_hex = { {0,} };
-
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_address);
-
-       _bt_convert_address_to_hex(&addr_hex, remote_address);
-
-       error_code = _bt_get_error_code(bluetooth_unset_pin_code(&addr_hex));
-       if (error_code != BT_ERROR_NONE)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
-       return error_code;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_update_le_connection_mode(const char *remote_address, bt_device_le_connection_mode_e mode)
 {
-       int ret;
-       bluetooth_device_address_t addr_hex = { {0,} };
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_address);
-
-       if (mode < BT_DEVICE_LE_CONNECTION_MODE_BALANCED ||
-           mode > BT_DEVICE_LE_CONNECTION_MODE_LOW_ENERGY) {
-               return BT_ERROR_INVALID_PARAMETER;
-       }
-
-       _bt_convert_address_to_hex(&addr_hex, remote_address);
-
-       ret = _bt_get_error_code(bluetooth_update_le_connection_mode(&addr_hex, mode));
-       if (BT_ERROR_NONE != ret)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
-
-       return ret;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_request_att_mtu(const char *remote_address, unsigned int mtu)
 {
-       int ret;
-       bluetooth_device_address_t addr_hex = { {0,} };
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_address);
-
-       _bt_convert_address_to_hex(&addr_hex, remote_address);
-
-       ret = _bt_get_error_code(bluetooth_request_att_mtu(&addr_hex, mtu));
-       if (BT_ERROR_NONE != ret)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
-
-       return ret;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_get_att_mtu(const char *remote_address, unsigned int *mtu)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       int ret;
-       unsigned int mtu_value = 0;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_address);
-
-       _bt_convert_address_to_hex(&addr_hex, remote_address);
-
-       ret = _bt_get_error_code(bluetooth_get_att_mtu(&addr_hex, &mtu_value));
-
-       if (ret != BT_ERROR_NONE) {
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
-               return ret;
-       }
-
-       *mtu = mtu_value;
-
-       return ret;
+       return BT_ERROR_NOT_SUPPORTED;
 
 }
 
 int bt_device_get_id_address(const char *remote_rpa, char **id_address)
 {
-       bluetooth_device_address_t id_addr = { {0} };
-       bluetooth_device_address_t addr_hex = { {0,} };
-       int ret = BT_ERROR_NONE;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_rpa);
-
-       _bt_convert_address_to_hex(&addr_hex, remote_rpa);
-
-       ret = _bt_get_error_code(bluetooth_get_device_ida(&addr_hex, &id_addr));
-
-       if (ret != BT_ERROR_NONE) {
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
-               return ret;
-       }
-
-       ret = _bt_convert_address_to_string(id_address, &id_addr);
-       if (ret != BT_ERROR_NONE) {
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
-               return ret;
-       }
-
-       return ret;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_set_profile_trusted(const char *device_address,
                bt_trusted_profile_t profile, bool trust)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       int error_code = BT_ERROR_NONE;
-
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(device_address);
-
-       _bt_convert_address_to_hex(&addr_hex, device_address);
-       error_code = _bt_get_error_code(bluetooth_set_profile_trusted(&addr_hex,
-                       profile, trust));
-       if (error_code != BT_ERROR_NONE)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
-       return error_code;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_get_profile_trusted(const char *device_address,
                bt_trusted_profile_t profile, int *trust)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       int profile_trusted;
-       int error_code = BT_ERROR_NONE;
-
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(device_address);
-
-       _bt_convert_address_to_hex(&addr_hex, device_address);
-       error_code = _bt_get_error_code(bluetooth_get_profile_trusted(&addr_hex,
-                       profile, &profile_trusted));
-
-       if (error_code != BT_ERROR_NONE)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
-       if (trust)
-               *trust = profile_trusted;
-       return error_code;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_set_trusted_profile_cb(bt_device_trusted_profiles_cb callback, void *user_data)
 {
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(callback);
-       _bt_set_cb(BT_EVENT_SUPPORTED_TRUSTED_PROFILE_EVENT, callback, user_data);
-
-       return BT_ERROR_NONE;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_unset_trusted_profile_cb(void)
 {
-       BT_CHECK_INIT_STATUS();
-       _bt_unset_cb(BT_EVENT_SUPPORTED_TRUSTED_PROFILE_EVENT);
-       return BT_ERROR_NONE;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_set_profile_restricted(const char *device_address,
                bt_restricted_profile_t profile, bool restricted)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       int error_code = BT_ERROR_NONE;
-
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(device_address);
-
-       _bt_convert_address_to_hex(&addr_hex, device_address);
-       error_code = _bt_get_error_code(bluetooth_set_profile_trusted(&addr_hex,
-                       profile, !restricted));
-
-       if (error_code != BT_ERROR_NONE)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
-       return error_code;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_get_profile_restricted(const char *device_address,
                bt_restricted_profile_t profile, int *restricted)
 {
-       bluetooth_device_address_t addr_hex = { {0,} };
-       int profile_trusted;
-       int error_code = BT_ERROR_NONE;
-
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(device_address);
-
-       _bt_convert_address_to_hex(&addr_hex, device_address);
-       error_code = _bt_get_error_code(bluetooth_get_profile_trusted(&addr_hex,
-                       profile, &profile_trusted));
-
-       if (error_code != BT_ERROR_NONE)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
-
-       if (restricted)
-               *restricted = !profile_trusted;
-       return error_code;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_adapter_get_bonded_device_is_alias_set(const char *remote_address, gboolean *alias_set)
 {
-       int ret;
-       bluetooth_device_address_t addr_hex = { {0,} };
-       gboolean is_alias_set = FALSE;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_address);
-       BT_CHECK_INPUT_PARAMETER(alias_set);
-
-       _bt_convert_address_to_hex(&addr_hex, remote_address);
-
-       ret = _bt_get_error_code(bluetooth_get_is_alias_set(&addr_hex, &is_alias_set));
-       if (ret != BT_ERROR_NONE) {
-               BT_ERR("%s(0x%08x) : Failed to run function",
-                                       _bt_convert_error_to_string(ret), ret);
-       } else {
-               *alias_set = is_alias_set;
-               BT_DBG("alias_set: %s", is_alias_set ? "TRUE" : "FALSE");
-       }
-
-       return ret;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_le_set_data_length(const char *remote_address,
                unsigned int max_tx_Octets,  unsigned int max_tx_Time)
 {
-       int ret = BT_ERROR_NONE;
-
-       BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(remote_address);
-
-       bluetooth_device_address_t addr_hex = { {0, } };
-
-       /* Range for host suggested txtime is 0x001B-0x00FB  and
-        * txocets is 0x0148- 0x0848 as per BT 4.2 spec */
-       if ((max_tx_Octets < 0x001B || max_tx_Octets > 0x00FB)
-               && (max_tx_Time < 0x0148 || max_tx_Time > 0x0848)) {
-               return BT_ERROR_INVALID_PARAMETER;
-       }
-
-       _bt_convert_address_to_hex(&addr_hex, remote_address);
-
-       ret = _bt_get_error_code(bluetooth_le_set_data_length(
-                                       &addr_hex,
-                                       max_tx_Octets,
-                                       max_tx_Time));
-
-       if (ret != BT_ERROR_NONE)
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
-
-       return ret;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 
 int bt_device_le_set_data_length_change_cb(
        _bt_le_set_data_length_changed_cb callback, void *user_data)
 {
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(callback);
-       _bt_set_cb(BT_EVENT_LE_DATA_LENGTH_CHANGED, callback, user_data);
-
-       return BT_ERROR_NONE;
+       return BT_ERROR_NOT_SUPPORTED;
 }
 /* LCOV_EXCL_STOP */