Merge the code from private 09/95809/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 3 Nov 2016 02:37:14 +0000 (11:37 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Sun, 6 Nov 2016 23:42:40 +0000 (08:42 +0900)
branch:devel/bluetooth/master
=================================================
commit e1867146dceebc8550edb1431f40fe0c89d2353f
Author: Deokhyun Kim <dukan.kim@samsung.com>
Date:   Mon Oct 24 18:26:12 2016 +0900
==================================================

Change-Id: I3917b9d13076820f5aa7352649a9c9a81e32dda8
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
CMakeLists.txt
include/mobile/bluetooth_internal.h
include/wearable/bluetooth_internal.h
packaging/capi-network-bluetooth.spec
src/bluetooth-adapter.c
src/bluetooth-common.c
src/bluetooth-device.c
src/bluetooth-gatt.c
test/CMakeLists.txt [changed mode: 0755->0644]
test/bt_unit_test.c
test/bt_unit_test.h

index d06fc7a5df5765788f1fbe58fe67ed1d9fb7fb35..626b0bac215398d5c77472f032ef38d4322cba5c 100644 (file)
@@ -20,9 +20,9 @@ ELSE ()
 ENDIF (TIZEN_PROFILE_TV)
 
 IF (TIZEN_PROFILE_TV)
-       SET(dependents "dlog glib-2.0 capi-base-common bluetooth-api db-util capi-system-info")
+       SET(dependents "dlog glib-2.0 capi-base-common capi-system-info bluetooth-api db-util")
 ELSE ()
-       SET(dependents "dlog glib-2.0 capi-base-common bluetooth-api capi-system-info")
+       SET(dependents "dlog glib-2.0 capi-base-common capi-system-info bluetooth-api")
 ENDIF (TIZEN_PROFILE_TV)
 SET(pc_dependents "capi-base-common glib-2.0")
 
index 36c1e447549adf2313efd0a0d385443a8cf66690..a0723725c4cda285c3b8f9f5b6a2d4ad8df685c3 100644 (file)
@@ -2162,6 +2162,27 @@ int bt_panu_disconnect(const char *remote_address);
 int bt_device_le_conn_update(const char *device_address,
                             const bt_le_conn_update_s *parameters);
 
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
+ * @brief Gets the is_alias_set property of a bonded device.
+ * @since_tizen 3.0
+ *
+ * @param [in] remote_address The address of remote device
+ * @param [out] is_alias_set The is_alias_set property of device
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #BT_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
+ */
+int bt_adapter_get_bonded_device_is_alias_set(const char *remote_address, gboolean *is_alias_set);
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_HID_MODULE
  * @brief Registers the method for HID Device role
index a2568200d7b0adf025f526f46e6abccb5def89f7..7132276b1f2141cd5ac19e75569cbfb9fb755857 100644 (file)
@@ -2508,6 +2508,27 @@ int bt_panu_disconnect(const char *remote_address);
 int bt_device_le_conn_update(const char *device_address,
                             const bt_le_conn_update_s *parameters);
 
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE
+ * @brief Gets the is_alias_set property of a bonded device.
+ * @since_tizen 3.0
+ *
+ * @param [in] remote_address The address of remote device
+ * @param [out] is_alias_set The is_alias_set property of device
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #BT_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+  * @retval #BT_ERROR_NOT_SUPPORTED  Not supported
+ *
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
+ */
+int bt_adapter_get_bonded_device_is_alias_set(const char *remote_address, gboolean *is_alias_set);
+
 /**
  * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
  * @brief Sets Restriction for BT mode(BT allowed or not).
index f934bfbc69afd9170bfe8b90241077201921d6ff..502fb68a9dc566ce2f16ddf5b4d760a6d0f9b21c 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-network-bluetooth
 Summary:    Network Bluetooth Framework
-Version:    0.1.53
+Version:    0.3.2
 Release:    1
 Group:      Connectivity/API
 License:    Apache-2.0
@@ -15,11 +15,10 @@ BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(vconf)
 %if "%{?profile}" == "tv"
-BuildRequires:  pkgconfig(bluetooth-api)
 BuildRequires:  pkgconfig(db-util)
-%else
-BuildRequires:  pkgconfig(bluetooth-api)
 %endif
+BuildRequires:  pkgconfig(bluetooth-api)
+BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  pkgconfig(capi-base-common)
 BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  cmake
index b94441f825e3fc3f1fcc98579ea5935e080a308d..c62fc9b067b57920d782bf42c938836594ead7e2 100644 (file)
@@ -3290,8 +3290,7 @@ int bt_adapter_le_get_scan_result_manufacturer_data(const bt_adapter_le_device_s
                        *manufacturer_id = remain_data[3] << 8;
                        *manufacturer_id += remain_data[2];
 
-                       *manufacturer_data = g_memdup(&adv_data[4],
-                                                       field_len - 3);
+                       *manufacturer_data = g_memdup(&remain_data[4], field_len - 3);
                        *manufacturer_data_len = field_len - 3;
 
                        return BT_ERROR_NONE;
index 06d36857ebdba7618f7fd1ee6bf3a7a0ac026855..e27f6f868b80676ff5d11f724db71a4a2da64e0c 100644 (file)
@@ -413,11 +413,6 @@ int _bt_get_bt_device_info_s(bt_device_info_s **dest_dev, bluetooth_device_info_
        else
                (*dest_dev)->remote_name = NULL;
 
-#if 0
-       (*dest_dev)->is_alias_set = source_dev->is_alias_set;
-       BT_DBG("is_alias_set: [%s]", (*dest_dev)->is_alias_set ? "TRUE" : "FALSE");
-#endif
-
        _bt_convert_address_to_string(&((*dest_dev)->remote_address), &(source_dev->device_address));
 
        (*dest_dev)->bt_class.major_device_class = source_dev->device_class.major_class;
index b80620be2f5028318c4072cfcbc681c9c58da11b..6962ea87e2f64d0f50e6686442c968978e04bd91 100644 (file)
@@ -388,6 +388,14 @@ int bt_device_unset_connection_state_changed_cb(void)
        return BT_ERROR_NONE;
 }
 
+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;
+}
+
 int bt_device_unset_att_mtu_changed_cb(void)
 {
        BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
@@ -938,6 +946,31 @@ int bt_device_get_profile_restricted(const char *device_address,
        return error_code;
 }
 
+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;
+}
+
 int bt_device_le_set_data_length(const char *remote_address,
                unsigned int max_tx_Octets,  unsigned int max_tx_Time)
 {
index 39f5cd51bbf3b3183973993435bee953c7347aac..a17cd5bd1a5ce7cc453c65f6d9e433164299a5cf 100644 (file)
@@ -2766,7 +2766,7 @@ int bt_gatt_client_create(const char *remote_address, bt_gatt_client_h *client)
        BT_CHECK_INIT_STATUS();
        BT_CHECK_INPUT_PARAMETER(remote_address); /* LCOV_EXCL_START */
 
-       for (l = gatt_client_list; l; l = g_slist_next(gatt_client_list)) {
+       for (l = gatt_client_list; l; l = g_slist_next(l)) {
                bt_gatt_client_s *c = (bt_gatt_client_s *)l->data;
 
                if (!g_ascii_strcasecmp(c->remote_address, remote_address)) {
old mode 100755 (executable)
new mode 100644 (file)
index 04d3041..69cdc4c
@@ -1,7 +1,7 @@
 SET(fw_test "${fw_name}-test")
 
 INCLUDE(FindPkgConfig)
-pkg_check_modules(${fw_test} REQUIRED glib-2.0)
+pkg_check_modules(${fw_test} REQUIRED glib-2.0 capi-appfw-application)
 FOREACH(flag ${${fw_test}_CFLAGS})
     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
index 6b6c6121d3933c86305489029d27a84fa3affa19..5a8836876c2a5837f75e8b07ba85415bdff04b60 100644 (file)
@@ -37,6 +37,8 @@
 #include <sys/types.h>
 #include <ifaddrs.h>
 #include <linux/if_link.h>
+#include <app_control.h>
+#include <system_info.h>
 
 #include "bluetooth.h"
 #include "bluetooth_internal.h"
@@ -175,8 +177,8 @@ tc_table_t tc_main[] = {
        {"PBAP Client"
                , BT_UNIT_TEST_TABLE_PBAP_CLIENT},
 #endif
-       {"Automated test"
-               , BT_UNIT_TEST_TABLE_AUTOMATED_TEST},
+       {"etc.(Automated test, AppControl)"
+               , BT_UNIT_TEST_TABLE_ETC},
        {"Initialize All"
                , BT_UNIT_TEST_FUNCTION_INITIALIZE_ALL},
        {"FINISH"
@@ -1033,14 +1035,17 @@ tc_table_t tc_pbap_client[] = {
 
 tc_table_t tc_automated_test[] = {
        /* Automated test Functions*/
-       {"BACK"
-               , BT_UNIT_TEST_FUNCTION_BACK},
-       {"On/Off repeat test()"
-               , BT_UNIT_TEST_FUNCTION_ON_OFF_REPEAT_TEST},
-       {"On/Off repeat(1sec delay) test()"
-               , BT_UNIT_TEST_FUNCTION_ON_OFF_REPEAT_TEST_1_SEC_DELAY},
-       {"On/Off repeat(Nsec delay) test()"
-               , BT_UNIT_TEST_FUNCTION_ON_OFF_REPEAT_TEST_N_SEC_DELAY},
+       {"BACK"                                                         , BT_UNIT_TEST_FUNCTION_BACK},
+       {"On/Off repeat test()"                                         , BT_UNIT_TEST_FUNCTION_ON_OFF_REPEAT_TEST},
+       {"On/Off repeat(1sec delay) test()"                             , BT_UNIT_TEST_FUNCTION_ON_OFF_REPEAT_TEST_1_SEC_DELAY},
+       {"On/Off repeat(Nsec delay) test()"                             , BT_UNIT_TEST_FUNCTION_ON_OFF_REPEAT_TEST_N_SEC_DELAY},
+       {"AppControl 2.3 BT onoff"                                      , BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_3_BT_ONOFF},
+       {"AppControl 2.3 BT Visibility"                         , BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_3_BT_VISIBILITY},
+       {"AppControl 2.4 BT onoff"                                      , BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_4_BT_ONOFF},
+       {"AppControl 2.4 BT Visibility"                                 , BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_4_BT_VISIBILITY},
+       {"Check feature(ex.tizen.org/feature/network.bluetooth)"        , BT_UNIT_TEST_FUNCTION_CHECK_FEATURE},
+
+       {"Select this menu to set parameters and then select the function again."                       , BT_UNIT_TEST_FUNCTION_ACTIVATE_FLAG_TO_SET_PARAMETERS},
        {NULL                                   , 0x0000},
 };
 
@@ -1110,7 +1115,7 @@ void tc_usage_print(void)
                tc_table = tc_pbap_client;
                break;
 #endif
-       case BT_UNIT_TEST_TABLE_AUTOMATED_TEST:
+       case BT_UNIT_TEST_TABLE_ETC:
                if (input_automated_test_delay == true) {
                        TC_PRT("Input the delay for automated"
                                "test.(e.g., 10)\n\n");
@@ -1454,6 +1459,7 @@ static void __bt_adapter_le_scan_result_cb(
                return;
        }
 
+       TC_PRT(" ");
        TC_PRT("%s Adv %d Scan resp %d RSSI %d Addr_type %d",
                        info->remote_address, info->adv_data_len,
                        info->scan_data_len, info->rssi,
@@ -3255,6 +3261,58 @@ int test_set_params(int test_id, char *param)
        }
        case BT_UNIT_TEST_TABLE_SOCKET: {
                switch (test_id) {
+               case BT_UNIT_TEST_FUNCTION_SOCKET_CREATE_RFCOMM_CUSTOM_UUID: {
+                       if (param_index == 0) {
+                               g_test_param.param_count = 1;
+                               g_test_param.params = g_malloc0(sizeof(char *) * g_test_param.param_count);
+                               param_type = BT_UNIT_TEST_PARAM_TYPE_STRING;
+                       }
+
+                       if (param_index > 0) {
+                               int len = strlen(param);
+                               g_test_param.params[param_index - 1] = g_malloc0(len + 1);
+                               /* Remove new line character */
+                               param[len - 1] = '\0';
+                               strcpy(g_test_param.params[param_index - 1], param);
+                       }
+
+                       if (param_index == g_test_param.param_count) {
+                               need_to_set_params = false;
+                               test_input_callback((void *)test_id);
+                               param_index = 0;
+                               return 0;
+                       }
+
+                       TC_PRT("Input param(%d) type:%s", param_index + 1, param_type);
+                       param_index++;
+                       break;
+               }
+               case BT_UNIT_TEST_FUNCTION_SOCKET_CONNECT_RFCOMM_CUSTOM_UUID: {
+                       if (param_index == 0) {
+                               g_test_param.param_count = 1;
+                               g_test_param.params = g_malloc0(sizeof(char *) * g_test_param.param_count);
+                               param_type = BT_UNIT_TEST_PARAM_TYPE_STRING;
+                       }
+
+                       if (param_index > 0) {
+                               int len = strlen(param);
+                               g_test_param.params[param_index - 1] = g_malloc0(len + 1);
+                               /* Remove new line character */
+                               param[len - 1] = '\0';
+                               strcpy(g_test_param.params[param_index - 1], param);
+                       }
+
+                       if (param_index == g_test_param.param_count) {
+                               need_to_set_params = false;
+                               test_input_callback((void *)test_id);
+                               param_index = 0;
+                               return 0;
+                       }
+
+                       TC_PRT("Input param(%d) type:%s", param_index + 1, param_type);
+                       param_index++;
+                       break;
+               }
                case BT_UNIT_TEST_FUNCTION_SOCKET_SEND_DATA: {
                        if (param_index == 0) {
                                g_test_param.param_count = 1;
@@ -4246,6 +4304,42 @@ int test_set_params(int test_id, char *param)
                break;
        }
 #endif
+       case BT_UNIT_TEST_TABLE_ETC: {
+               switch (test_id) {
+               case BT_UNIT_TEST_FUNCTION_CHECK_FEATURE: {
+                       if (param_index == 0) {
+                               g_test_param.param_count = 1;
+                               g_test_param.params = g_malloc0(sizeof(char *) * g_test_param.param_count);
+                               param_type = BT_UNIT_TEST_PARAM_TYPE_STRING;
+                       }
+
+                       if (param_index > 0) {
+                               int len = strlen(param);
+                               g_test_param.params[param_index - 1] = g_malloc0(len + 1);
+                               /* Remove new line character */
+                               param[len - 1] = '\0';
+                               strcpy(g_test_param.params[param_index - 1], param);
+                       }
+
+                       if (param_index == g_test_param.param_count) {
+                               need_to_set_params = false;
+                               test_input_callback((void *)test_id);
+                               param_index = 0;
+                               return 0;
+                       }
+
+                       TC_PRT("Input feature string(ex. tizen.org/feature/network.bluetooth)");
+                       param_index++;
+                       break;
+               }
+               default:
+                       TC_PRT("There is no param to set\n");
+                       need_to_set_params = false;
+                       break;
+               }
+
+               break;
+       }
        default:
                TC_PRT("There is no param to set\n");
                need_to_set_params = false;
@@ -5486,7 +5580,14 @@ int test_input_callback(void *data)
                case BT_UNIT_TEST_FUNCTION_SOCKET_CREATE_RFCOMM_CUSTOM_UUID: {
                        int socket_fd = 0;
 
-                       ret = bt_socket_create_rfcomm(custom_uuid, &socket_fd);
+                       if (g_test_param.param_count > 0) {
+                               ret = bt_socket_create_rfcomm(g_test_param.params[0], &socket_fd);
+
+                               __bt_free_test_param(&g_test_param);
+                       } else {
+                               ret = bt_socket_create_rfcomm(custom_uuid, &socket_fd);
+                       }
+
                        if (ret < BT_ERROR_NONE) {
                                TC_PRT("returns %s\n", __bt_get_error_message(ret));
                        } else {
@@ -5504,7 +5605,14 @@ int test_input_callback(void *data)
                        TC_PRT("returns %s\n", __bt_get_error_message(ret));
                        break;
                case BT_UNIT_TEST_FUNCTION_SOCKET_CONNECT_RFCOMM_CUSTOM_UUID: {
-                       ret = bt_socket_connect_rfcomm(remote_addr, custom_uuid);
+                       if (g_test_param.param_count > 0) {
+                               ret = bt_socket_connect_rfcomm(remote_addr, g_test_param.params[0]);
+
+                               __bt_free_test_param(&g_test_param);
+                       } else {
+                               ret = bt_socket_connect_rfcomm(remote_addr, custom_uuid);
+                       }
+
                        TC_PRT("returns %s\n", __bt_get_error_message(ret));
                        break;
                }
@@ -8970,7 +9078,7 @@ int test_input_callback(void *data)
                break;
        }
 #endif
-       case BT_UNIT_TEST_TABLE_AUTOMATED_TEST: {
+       case BT_UNIT_TEST_TABLE_ETC: {
                static unsigned int delay = 0;
                bt_onoff_cnt = 0;
                bt_onoff_cnt_success = 0;
@@ -9044,6 +9152,87 @@ int test_input_callback(void *data)
                                bt_adapter_disable();
                        break;
                }
+               case BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_3_BT_ONOFF: {
+                       app_control_h service = NULL;
+
+                       app_control_create(&service);
+                       app_control_set_operation(service, APP_CONTROL_OPERATION_EDIT);
+                       app_control_set_mime(service, "application/x-bluetooth-on-off");
+
+                       ret = app_control_send_launch_request(service, NULL, NULL);
+                       TC_PRT("returns %d", ret);
+
+                       app_control_destroy(service);
+
+                       break;
+               }
+               case BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_3_BT_VISIBILITY: {
+                       app_control_h service = NULL;
+
+                       app_control_create(&service);
+                       app_control_set_operation(service, APP_CONTROL_OPERATION_EDIT);
+                       app_control_set_mime(service, "application/x-bluetooth-visibility");
+
+                       ret = app_control_send_launch_request(service, NULL, NULL);
+                       TC_PRT("returns %d", ret);
+
+                       app_control_destroy(service);
+
+                       break;
+               }
+               case BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_4_BT_ONOFF: {
+                       app_control_h service = NULL;
+
+                       app_control_create(&service);
+                       app_control_set_operation(service, APP_CONTROL_OPERATION_SETTING_BT_ENABLE);
+
+                       ret = app_control_send_launch_request(service, NULL, NULL);
+                       TC_PRT("returns %d", ret);
+
+                       app_control_destroy(service);
+
+                       break;
+               }
+               case BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_4_BT_VISIBILITY: {
+                       app_control_h service = NULL;
+
+                       app_control_create(&service);
+                       app_control_set_operation(service, APP_CONTROL_OPERATION_SETTING_BT_VISIBILITY);
+
+                       ret = app_control_send_launch_request(service, NULL, NULL);
+                       TC_PRT("returns %d", ret);
+
+                       app_control_destroy(service);
+
+                       break;
+               }
+               case BT_UNIT_TEST_FUNCTION_CHECK_FEATURE: {
+                       int ret;
+                       bool is_supported = false;
+
+                       if (g_test_param.param_count > 0) {
+                               ret = system_info_get_custom_bool(
+                                       g_test_param.params[0], &is_supported);
+                               if (ret != 0)
+                                       TC_PRT("returns %d", ret);
+                               TC_PRT("%s is %s", g_test_param.params[0],
+                                       is_supported ? "true" : "false");
+                               __bt_free_test_param(&g_test_param);
+                       } else {
+                               ret = system_info_get_custom_bool(
+                                       "tizen.org/feature/network.bluetooth", &is_supported);
+                               if (ret != 0)
+                                       TC_PRT("returns %d", ret);
+                               TC_PRT("tizen.org/feature/network.bluetooth is %s",
+                                       is_supported ? "true" : "false");
+                       }
+
+                       break;
+               }
+               case BT_UNIT_TEST_FUNCTION_ACTIVATE_FLAG_TO_SET_PARAMETERS:
+                       need_to_set_params = true;
+                       TC_PRT("Select the function again");
+                       break;
                default:
                        break;
                }
@@ -9108,7 +9297,7 @@ static gboolean key_event_cb(GIOChannel *chan,
        }  else {
                if (buf[0] == '0' && buf[2] == 0) {
                        current_tc_table = BT_UNIT_TEST_TABLE_MAIN;
-               } else if (current_tc_table == BT_UNIT_TEST_TABLE_AUTOMATED_TEST
+               } else if (current_tc_table == BT_UNIT_TEST_TABLE_ETC
                                        && test_id == BT_UNIT_TEST_FUNCTION_ON_OFF_REPEAT_TEST_N_SEC_DELAY
                                        && input_automated_test_delay == false) {
                                input_automated_test_delay = true;
index edcc964465ec03182d3f21970fbb0fc1d87d81c4..64c9bdd031f63e4928d469fc0d654fab4841fed9 100644 (file)
@@ -50,7 +50,7 @@ typedef enum {
        BT_UNIT_TEST_TABLE_HF,
        BT_UNIT_TEST_TABLE_PBAP_CLIENT,
 #endif
-       BT_UNIT_TEST_TABLE_AUTOMATED_TEST,
+       BT_UNIT_TEST_TABLE_ETC,
        BT_UNIT_TEST_FUNCTION_INITIALIZE_ALL,
        BT_UNIT_TEST_TABLE_FINISH = 0xFF,
 } bt_unit_test_table_e;
@@ -432,10 +432,53 @@ typedef enum {
        BT_UNIT_TEST_FUNCTION_ON_OFF_REPEAT_TEST = 1,
        BT_UNIT_TEST_FUNCTION_ON_OFF_REPEAT_TEST_1_SEC_DELAY,
        BT_UNIT_TEST_FUNCTION_ON_OFF_REPEAT_TEST_N_SEC_DELAY,
+       BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_3_BT_ONOFF,
+       BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_3_BT_VISIBILITY,
+       BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_4_BT_ONOFF,
+       BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_4_BT_VISIBILITY,
+       BT_UNIT_TEST_FUNCTION_CHECK_FEATURE,
 
        BT_UNIT_TEST_FUNCTION_ACTIVATE_FLAG_TO_SET_PARAMETERS = 0XFF,
 } bt_unit_test_function_e;
 
+/**
+ * AMS EntityID type.
+ */
+typedef enum {
+       BT_AMS_ENTITY_ID_PLAYER = 0x00, /**< Player */
+       BT_AMS_ENTITY_ID_QUEUE = 0x01, /**< Queue */
+       BT_AMS_ENTITY_ID_TRACK = 0x02 /**< Track */
+} bt_ams_entity_id_type_e;
+
+/**
+ * AMS Entity Player's Attribute IDs type.
+ */
+typedef enum {
+       BT_AMS_PLAYER_ATTR_ID_NAME = 0x00, /**< PlayerAttributeIDName */
+       BT_AMS_PLAYER_ATTR_ID_PLAYBACK_INFO = 0x01, /**< PlayerAttributeIDPlaybackInfo */
+       BT_AMS_PLAYER_ATTR_ID_VOLUME = 0x02 /**< PlayerAttributeIDVolume */
+} bt_ams_player_attr_id_type_e;
+
+/**
+ * AMS Entity Queue's Attribute IDs type.
+ */
+typedef enum {
+       BT_AMS_QUEUE_ATTR_ID_INDEX = 0x00, /**< QueueAttributeIDIndex */
+       BT_AMS_QUEUE_ATTR_ID_COUNT = 0x01, /**< QueueAttributeIDCount */
+       BT_AMS_QUEUE_ATTR_ID_SHUFFLE_MODE = 0x02, /**< QueueAttributeIDShuffleMode */
+       BT_AMS_QUEUE_ATTR_ID_REPEAT_MODE = 0x03 /**< QueueAttributeIDRepeatMode */
+} bt_ams_queue_attr_id_type_e;
+
+/**
+ * AMS Entity Track's Attribute IDs type.
+ */
+typedef enum {
+       BT_AMS_TRACK_ATTR_ID_ARTIST = 0x00, /**< TrackAttributeIDArtist */
+       BT_AMS_TRACK_ATTR_ID_ALBUM = 0x01, /**< TrackAttributeIDAlbum */
+       BT_AMS_TRACK_ATTR_ID_TITLE = 0x02, /**< TrackAttributeIDTitle */
+       BT_AMS_TRACK_ATTR_ID_DURATION = 0x03 /**< TrackAttributeIDDuration */
+} bt_ams_track_attr_id_type_e;
+
 typedef struct {
        const char *tc_name;
        int tc_code;