return BT_ERROR_NONE;
}
+
+int bt_gatt_get_uuid_specification_name(const char *uuid, char **name)
+{
+ int error_code = BT_ERROR_NONE;
+
+ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
+ BT_CHECK_INPUT_PARAMETER(uuid);
+ BT_CHECK_INPUT_PARAMETER(name);
+
+ BT_INFO("UUID [%s]", uuid);
+
+ error_code = _bt_get_error_code(bluetooth_get_uuid_name(uuid, name));
+ if (error_code != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), /* LCOV_EXCL_LINE */
+ error_code); /* LCOV_EXCL_LINE */
+ return error_code; /* LCOV_EXCL_LINE */
+ }
+
+ BT_INFO("Specification Name [%s]", *name);
+ return BT_ERROR_NONE;
+}
, BT_UNIT_TEST_FUNCTION_GATT_SERVER_CHANGE_CUSTOM_VAL},
{"Start Server"
, BT_UNIT_TEST_FUNCTION_GATT_START_SERVER},
+ {"Get Specification Name from UUID"
+ , BT_UNIT_TEST_FUNCTION_GATT_GET_SPEC_NAME_FROM_UUID},
{"ANCS (Pair)"
, BT_UNIT_TEST_FUNCTION_ANCS_PAIR},
{"ANCS (Watch notification)"
TC_PRT("bt_gatt_server_register_service : %s\n", __bt_get_error_message(ret));
break;
}
+ case BT_UNIT_TEST_FUNCTION_GATT_GET_SPEC_NAME_FROM_UUID: {
+ char *name = NULL;
+ char *uuid = "0000180F-0000-1000-8000-00805F9B34FB";
+ ret = bt_gatt_get_uuid_specification_name(uuid, &name);
+ TC_PRT("bt_gatt_get_uuid_specification_name : %s\n", __bt_get_error_message(ret));
+ if (BT_ERROR_NONE == ret) {
+ TC_PRT("UUID [%s] Specification Name [%s]", uuid, name);
+ free(name);
+ }
+ break;
+ }
case BT_UNIT_TEST_FUNCTION_GATT_SERVER_FOREACH_SERVICES: {
#ifdef ARCH64
ret = bt_gatt_server_foreach_services(server,
BT_UNIT_TEST_FUNCTION_GATT_SERVER_REGISTER_CUSTOM_SVC,
BT_UNIT_TEST_FUNCTION_GATT_SERVER_CHANGE_CUSTOM_VAL,
BT_UNIT_TEST_FUNCTION_GATT_START_SERVER,
+ BT_UNIT_TEST_FUNCTION_GATT_GET_SPEC_NAME_FROM_UUID,
BT_UNIT_TEST_FUNCTION_ANCS_PAIR,
BT_UNIT_TEST_FUNCTION_ANCS_WATCH,
BT_UNIT_TEST_FUNCTION_ANCS_POSITIVE_ACTION,