From: DoHyun Pyun Date: Thu, 3 Nov 2016 02:37:14 +0000 (+0900) Subject: Merge the code from private X-Git-Tag: submit/tizen/20161107.085724~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22bdbf3b945e292a9ad324f173e03ed3d81666af;p=platform%2Fcore%2Fapi%2Fbluetooth.git Merge the code from private branch:devel/bluetooth/master ================================================= commit e1867146dceebc8550edb1431f40fe0c89d2353f Author: Deokhyun Kim Date: Mon Oct 24 18:26:12 2016 +0900 ================================================== Change-Id: I3917b9d13076820f5aa7352649a9c9a81e32dda8 Signed-off-by: DoHyun Pyun --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d06fc7a..626b0ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/include/mobile/bluetooth_internal.h b/include/mobile/bluetooth_internal.h index 36c1e44..a072372 100644 --- a/include/mobile/bluetooth_internal.h +++ b/include/mobile/bluetooth_internal.h @@ -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 diff --git a/include/wearable/bluetooth_internal.h b/include/wearable/bluetooth_internal.h index a256820..7132276 100644 --- a/include/wearable/bluetooth_internal.h +++ b/include/wearable/bluetooth_internal.h @@ -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). diff --git a/packaging/capi-network-bluetooth.spec b/packaging/capi-network-bluetooth.spec index f934bfb..502fb68 100644 --- a/packaging/capi-network-bluetooth.spec +++ b/packaging/capi-network-bluetooth.spec @@ -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 diff --git a/src/bluetooth-adapter.c b/src/bluetooth-adapter.c index b94441f..c62fc9b 100644 --- a/src/bluetooth-adapter.c +++ b/src/bluetooth-adapter.c @@ -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; diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index 06d3685..e27f6f8 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -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; diff --git a/src/bluetooth-device.c b/src/bluetooth-device.c index b80620b..6962ea8 100644 --- a/src/bluetooth-device.c +++ b/src/bluetooth-device.c @@ -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) { diff --git a/src/bluetooth-gatt.c b/src/bluetooth-gatt.c index 39f5cd5..a17cd5b 100644 --- a/src/bluetooth-gatt.c +++ b/src/bluetooth-gatt.c @@ -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)) { diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt old mode 100755 new mode 100644 index 04d3041..69cdc4c --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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) diff --git a/test/bt_unit_test.c b/test/bt_unit_test.c index 6b6c612..5a88368 100644 --- a/test/bt_unit_test.c +++ b/test/bt_unit_test.c @@ -37,6 +37,8 @@ #include #include #include +#include +#include #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; diff --git a/test/bt_unit_test.h b/test/bt_unit_test.h index edcc964..64c9bdd 100644 --- a/test/bt_unit_test.h +++ b/test/bt_unit_test.h @@ -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;