/**
* @brief Callback funtions
*/
+
+static void Bluetooth_adapter_le_new_scan_result_cb(int nResult, bt_new_scan_result_h handle, void *user_data)
+{
+ FPRINTF("[Line : %d][%s] Callback invoked for LE Start Scan\\n", __LINE__, API_NAMESPACE);
+ FPRINTF("[Line : %d][%s] Result value: %d\\n", __LINE__, API_NAMESPACE, nResult);
+ g_bCallbackResult = true;
+ if ( g_pMainLoop )
+ {
+ g_main_loop_quit(g_pMainLoop);
+ }
+}
+
+
static void Bluetooth_adapter_state_changed_cb_p(int nResult, bt_adapter_state_e adapter_state, void *user_data)
{
FPRINTF("[Line : %d][%s] Callback invoked for Adapter state change\\n", __LINE__, API_NAMESPACE);
#if (defined(MOBILE) || defined(WEARABLE) || defined(TIZENIOT)) //Starts MOBILE or WEARABLE or TIZENIOT
g_bBluetoothIsSupported = TCTCheckSystemInfoFeatureSupported(BLUETOOTH_FEATURE, API_NAMESPACE);
g_bBluetoothIsOOBSupported = TCTCheckSystemInfoFeatureSupported(BLUETOOTH_OOB_FEATURE, API_NAMESPACE);
+ g_bBluetoothIsLEAdvExtSupported = TCTCheckSystemInfoFeatureSupported(BLUETOOTH_LE_ADV_EXT_FEATURE, API_NAMESPACE);
#else
g_bBluetoothIsSupported = true;
#endif // End MOBILE or WEARABLE or TIZENIOT
}
+//& purpose: Starts the LE scan to find LE advertisement
+//& type: auto
+/**
+* @testcase ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p
+* @since 8.0
+* @author SRID(shobhit.v)
+* @reviewer SRID(tarun1.kumar)
+* @type auto
+* @description Starts the LE scan to find LE advertisement, If a LE advertisement is found, calback will be invoked
+* @scenario Call bt_adapter_le_start_scan_new API and check is callback is invoked in case LE advertisement found
+* @apicovered bt_adapter_le_start_scan_new
+* @passcase When bt_adapter_le_start_scan_new is successful
+* @failcase If target APIs bt_adapter_le_start_scan_new fails
+* @precondition Bluetooth must be initialized
+* @postcondition Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p(void)
+{
+ START_TEST;
+
+ //Target API
+ int nRetVal = bt_adapter_le_start_scan_new(Bluetooth_adapter_le_new_scan_result_cb, NULL);
+ if (g_bBluetoothIsLEAdvExtSupported == false)
+ {
+ PRINT_RESULT(BT_ERROR_NOT_SUPPORTED, nRetVal, "bt_adapter_le_start_scan_new", BluetoothGetError(nRetVal));
+ return 0;
+ }
+ PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_adapter_le_start_scan_new", BluetoothGetError(nRetVal));
+ wait_for_async();
+
+ bt_adapter_le_stop_scan();
+ return 0;
+}
+
+//& purpose: Sets Bluetooth LE scan role
+//& type: auto
+/**
+* @testcase ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p
+* @since 8.0
+* @author SRID(shobhit.v)
+* @reviewer SRID(tarun1.kumar)
+* @type auto
+* @description Sets Bluetooth LE scan role
+* @scenario Sets Bluetooth LE scan role
+* @apicovered bt_adapter_le_set_scan_role
+* @passcase When bt_adapter_le_set_scan_role is successful
+* @failcase If target APIs bt_adapter_le_set_scan_role fails
+* @precondition Bluetooth must be initialized
+* @postcondition Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p(void)
+{
+ START_TEST;
+
+ int nRetVal = 0;
+ bt_adapter_le_scan_role_e eScanRole[]=
+ {
+ BT_ADAPTER_LE_SCAN_ALL,
+ BT_ADAPTER_LE_SCAN_LEGACY_ONLY,
+ BT_ADAPTER_LE_SCAN_EXTENDED_ONLY
+ };
+ int nEnumSize = sizeof(eScanRole) / sizeof(eScanRole[0]);
+
+ for (int enum_counter =0; enum_counter< nEnumSize; enum_counter++)
+ {
+ FPRINTF("[Line : %d][%s] bt_adapter_le_set_scan_role API called for enum: [ %s ]\\n", __LINE__, API_NAMESPACE, BluetoothGetLEScanRoleEnumString(eScanRole[enum_counter]));
+ nRetVal = bt_adapter_le_set_scan_role(eScanRole[enum_counter]);
+ if (g_bBluetoothIsLEAdvExtSupported == false)
+ {
+ PRINT_RESULT(BT_ERROR_NOT_SUPPORTED, nRetVal, "bt_adapter_le_set_scan_role", BluetoothGetError(nRetVal));
+ }
+ else
+ {
+ PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_adapter_le_set_scan_role", BluetoothGetError(nRetVal));
+ }
+ }
+ return 0;
+}
+
+
+//& purpose: Sets Bluetooth LE scan phy
+//& type: auto
+/**
+* @testcase ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p
+* @since 8.0
+* @author SRID(shobhit.v)
+* @reviewer SRID(tarun1.kumar)
+* @type auto
+* @description Sets Bluetooth LE scan phy
+* @scenario Sets Bluetooth LE scan phy
+* @apicovered bt_adapter_le_set_scan_phy
+* @passcase When bt_adapter_le_set_scan_phy is successful
+* @failcase If target APIs bt_adapter_le_set_scan_phy fails
+* @precondition Bluetooth must be initialized
+* @postcondition Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p(void)
+{
+ START_TEST;
+
+ int nRetVal = 0;
+ bt_adapter_le_phy_e eScanPhy[]=
+ {
+ BT_LE_ALL_PHY,
+ BT_LE_1M_PHY,
+ BT_LE_2M_PHY,
+ BT_LE_CODED_PHY
+ };
+ int nEnumSize = sizeof(eScanPhy) / sizeof(eScanPhy[0]);
+ for (int enum_counter =0; enum_counter< nEnumSize; enum_counter++)
+ {
+ FPRINTF("[Line : %d][%s] bt_adapter_le_set_scan_phy API is called for enum: [ %s ]\\n", __LINE__, API_NAMESPACE, BluetoothGetLEScanPhyEnumString(eScanPhy[enum_counter]));
+ nRetVal = bt_adapter_le_set_scan_phy(eScanPhy[enum_counter]);
+ if (g_bBluetoothIsLEAdvExtSupported == false)
+ {
+ PRINT_RESULT(BT_ERROR_NOT_SUPPORTED, nRetVal, "bt_adapter_le_set_scan_phy", BluetoothGetError(nRetVal));
+ }
+ else
+ {
+ PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_adapter_le_set_scan_phy", BluetoothGetError(nRetVal));
+ }
+ }
+ return 0;
+}
+
+
+//& purpose: Sets Bluetooth LE advertising legacy mode
+//& type: auto
+/**
+* @testcase ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p
+* @since 8.0
+* @author SRID(shobhit.v)
+* @reviewer SRID(tarun1.kumar)
+* @type auto
+* @description Sets Bluetooth LE advertising legacy mode
+* @scenario Create advertiser and sets Bluetooth LE advertising legacy mode
+* @apicovered bt_adapter_le_create_advertiser, bt_adapter_le_set_advertising_legacy_mode and bt_adapter_le_destroy_advertiser
+* @passcase When bt_adapter_le_set_advertising_legacy_mode is successful
+* @failcase If target APIs bt_adapter_le_set_advertising_legacy_mode fails
+* @precondition Bluetooth must be initialized
+* @postcondition Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p(void)
+{
+ START_TEST;
+ bt_advertiser_h hAdvertiser = NULL;
+ int nRetVal = 0;
+
+ nRetVal = bt_adapter_le_create_advertiser(&hAdvertiser);
+ PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_adapter_le_create_advertiser", BluetoothGetError(nRetVal));
+ CHECK_HANDLE(hAdvertiser,"bt_adapter_le_create_advertiser");
+
+ if (g_bBluetoothIsLEAdvExtSupported == false)
+ {
+ nRetVal = bt_adapter_le_set_advertising_legacy_mode(hAdvertiser, true);
+ PRINT_RESULT_CLEANUP(BT_ERROR_NOT_SUPPORTED, nRetVal, "bt_adapter_le_set_advertising_legacy_mode", BluetoothGetError(nRetVal), bt_adapter_le_destroy_advertiser(hAdvertiser));
+ bt_adapter_le_destroy_advertiser(hAdvertiser);
+ return 0;
+ }
+
+ nRetVal = bt_adapter_le_set_advertising_legacy_mode(hAdvertiser, true);
+ PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRetVal, "bt_adapter_le_set_advertising_legacy_mode", BluetoothGetError(nRetVal), bt_adapter_le_destroy_advertiser(hAdvertiser));
+
+ nRetVal = bt_adapter_le_destroy_advertiser(hAdvertiser);
+ PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_adapter_le_destroy_advertiser", BluetoothGetError(nRetVal));
+
+ return 0;
+}
+
+
+//& purpose: Sets Bluetooth LE advertising primary and secondary phy
+//& type: auto
+/**
+* @testcase ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p
+* @since 8.0
+* @author SRID(shobhit.v)
+* @reviewer SRID(tarun1.kumar)
+* @type auto
+* @description Sets Bluetooth LE advertising primary & secondary phy
+* @scenario Sets Bluetooth LE advertising primary & secondary phy
+* @apicovered bt_adapter_le_set_advertising_primary_phy and bt_adapter_le_set_advertising_secondary_phy
+* @passcase When bt_adapter_le_set_advertising_primary_phy and bt_adapter_le_set_advertising_secondary_phy is successful
+* @failcase If target APIs bt_adapter_le_set_advertising_primary_phy Or bt_adapter_le_set_advertising_secondary_phy fails
+* @precondition Bluetooth must be initialized
+* @postcondition Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p(void)
+{
+ START_TEST;
+ bt_advertiser_h hAdvertiser = NULL;
+ int nRetVal = 0;
+ bt_adapter_le_phy_e eScanPhy[]=
+ {
+ BT_LE_ALL_PHY,
+ BT_LE_1M_PHY,
+ BT_LE_2M_PHY,
+ BT_LE_CODED_PHY
+ };
+ int nEnumSize = sizeof(eScanPhy) / sizeof(eScanPhy[0]);
+
+ nRetVal = bt_adapter_le_create_advertiser(&hAdvertiser);
+ PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_adapter_le_create_advertiser", BluetoothGetError(nRetVal));
+ CHECK_HANDLE(hAdvertiser,"bt_adapter_le_create_advertiser");
+
+ for (int enum_counter =0; enum_counter< nEnumSize; enum_counter++)
+ {
+ if (g_bBluetoothIsLEAdvExtSupported == false)
+ {
+ FPRINTF("[Line : %d][%s] bt_adapter_le_set_advertising_primary_phy API is called for enum: [ %s ]\\n", __LINE__, API_NAMESPACE, BluetoothGetLEScanPhyEnumString(eScanPhy[enum_counter]));
+ nRetVal = bt_adapter_le_set_advertising_primary_phy(hAdvertiser, eScanPhy[enum_counter]);
+ PRINT_RESULT_CLEANUP(BT_ERROR_NOT_SUPPORTED, nRetVal, "bt_adapter_le_set_advertising_primary_phy", BluetoothGetError(nRetVal), bt_adapter_le_destroy_advertiser(hAdvertiser));
+
+ FPRINTF("[Line : %d][%s] bt_adapter_le_set_advertising_secondary_phy API is called for enum: [ %s ]\\n", __LINE__, API_NAMESPACE, BluetoothGetLEScanPhyEnumString(eScanPhy[enum_counter]));
+ nRetVal = bt_adapter_le_set_advertising_secondary_phy(hAdvertiser, eScanPhy[enum_counter]);
+ PRINT_RESULT_CLEANUP(BT_ERROR_NOT_SUPPORTED, nRetVal, "bt_adapter_le_set_advertising_secondary_phy", BluetoothGetError(nRetVal), bt_adapter_le_destroy_advertiser(hAdvertiser));
+ }
+ else
+ {
+ FPRINTF("[Line : %d][%s] bt_adapter_le_set_advertising_primary_phy API is called for enum: [ %s ]\\n", __LINE__, API_NAMESPACE, BluetoothGetLEScanPhyEnumString(eScanPhy[enum_counter]));
+ nRetVal = bt_adapter_le_set_advertising_primary_phy(hAdvertiser, eScanPhy[enum_counter]);
+ PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRetVal, "bt_adapter_le_set_advertising_primary_phy", BluetoothGetError(nRetVal), bt_adapter_le_destroy_advertiser(hAdvertiser));
+
+ FPRINTF("[Line : %d][%s] bt_adapter_le_set_advertising_secondary_phy API is called for enum: [ %s ]\\n", __LINE__, API_NAMESPACE, BluetoothGetLEScanPhyEnumString(eScanPhy[enum_counter]));
+ nRetVal = bt_adapter_le_set_advertising_secondary_phy(hAdvertiser, eScanPhy[enum_counter]);
+ PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRetVal, "bt_adapter_le_set_advertising_secondary_phy", BluetoothGetError(nRetVal), bt_adapter_le_destroy_advertiser(hAdvertiser));
+ }
+ }
+
+ nRetVal = bt_adapter_le_destroy_advertiser(hAdvertiser);
+ PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_adapter_le_destroy_advertiser", BluetoothGetError(nRetVal));
+
+ return 0;
+}
+
+
+
+//& purpose: Checks if LE Extended Advertising feature is supported or not
+//& type: auto
+/**
+* @testcase ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p
+* @since 8.0
+* @author SRID(shobhit.v)
+* @reviewer SRID(tarun1.kumar)
+* @type auto
+* @description Check LE Extended Advertising feature is supported or not
+* @scenario Check LE Extended Advertising feature is supported or not
+* @apicovered bt_adapter_le_is_extended_advertising_supported
+* @passcase When bt_adapter_le_is_extended_advertising_supported is successful
+* @failcase If target APIs bt_adapter_le_is_extended_advertising_supported fails
+* @precondition Bluetooth must be initialized
+* @postcondition Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p(void)
+{
+ START_TEST;
+ int nRetVal = 0;
+ bool bIsSupported = false;
+
+ nRetVal = bt_adapter_le_is_extended_advertising_supported(&bIsSupported);
+ if (g_bBluetoothIsLEAdvExtSupported == false)
+ {
+ PRINT_RESULT(BT_ERROR_NOT_SUPPORTED, nRetVal, "bt_adapter_le_is_extended_advertising_supported", BluetoothGetError(nRetVal));
+ }
+ else
+ {
+ PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_adapter_le_is_extended_advertising_supported", BluetoothGetError(nRetVal));
+ }
+
+ return 0;
+}
+
+
+//& purpose: Checks if LE Extended Scan feature is supported or not
+//& type: auto
+/**
+* @testcase ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p
+* @since 8.0
+* @author SRID(shobhit.v)
+* @reviewer SRID(tarun1.kumar)
+* @type auto
+* @description Check LE Extended Scan feature is supported or not
+* @scenario Check LE Extended Scan feature is supported or not
+* @apicovered bt_adapter_le_is_extended_scan_supported
+* @passcase When bt_adapter_le_is_extended_scan_supported is successful
+* @failcase If target APIs bt_adapter_le_is_extended_scan_supported fails
+* @precondition Bluetooth must be initialized
+* @postcondition Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p(void)
+{
+ START_TEST;
+ int nRetVal = 0;
+ bool bIsSupported = false;
+
+ nRetVal = bt_adapter_le_is_extended_scan_supported(&bIsSupported);
+ if (g_bBluetoothIsLEAdvExtSupported == false)
+ {
+ PRINT_RESULT(BT_ERROR_NOT_SUPPORTED, nRetVal, "bt_adapter_le_is_extended_scan_supported", BluetoothGetError(nRetVal));
+ }
+ else
+ {
+ PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_adapter_le_is_extended_scan_supported", BluetoothGetError(nRetVal));
+ }
+
+ return 0;
+}
+
+//& purpose: Gets maximum advertisement data length supported by controller.
+//& type: auto
+/**
+* @testcase ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p
+* @since 8.0
+* @author SRID(shobhit.v)
+* @reviewer SRID(tarun1.kumar)
+* @type auto
+* @description Gets maximum advertisement data length supported by controller.
+* @scenario Gets maximum advertisement data length supported by controller.
+* @apicovered bt_adapter_le_get_maximum_advertising_data_length
+* @passcase When bt_adapter_le_get_maximum_advertising_data_length is successful
+* @failcase If target APIs bt_adapter_le_get_maximum_advertising_data_length fails
+* @precondition Bluetooth must be initialized
+* @postcondition Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p(void)
+{
+ START_TEST;
+ int nRetVal = 0;
+ int nLength = 0;
+
+ nRetVal = bt_adapter_le_get_maximum_advertising_data_length(&nLength);
+ if (g_bBluetoothIsLEAdvExtSupported == false)
+ {
+ PRINT_RESULT(BT_ERROR_NOT_SUPPORTED, nRetVal, "bt_adapter_le_get_maximum_advertising_data_length", BluetoothGetError(nRetVal));
+ }
+ else
+ {
+ PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_adapter_le_get_maximum_advertising_data_length", BluetoothGetError(nRetVal));
+ }
+
+ return 0;
+}
\ No newline at end of file
char *pszEnumString = "UNKNOWN";
switch ( enum_discoverable_mode )
{
- case BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE:
- pszEnumString = "BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE";
- break;
- case BT_ADAPTER_VISIBILITY_MODE_GENERAL_DISCOVERABLE:
- pszEnumString = "BT_ADAPTER_VISIBILITY_MODE_GENERAL_DISCOVERABLE";
- break;
- case BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE:
- pszEnumString = "BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE";
- break;
+ case BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE:
+ pszEnumString = "BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE";
+ break;
+ case BT_ADAPTER_VISIBILITY_MODE_GENERAL_DISCOVERABLE:
+ pszEnumString = "BT_ADAPTER_VISIBILITY_MODE_GENERAL_DISCOVERABLE";
+ break;
+ case BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE:
+ pszEnumString = "BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE";
+ break;
}
return pszEnumString;
}
switch ( nRet )
{
case BT_ADAPTER_LE_PACKET_ADVERTISING:
- pszEnumString = "BT_ADAPTER_LE_PACKET_ADVERTISING";
+ pszEnumString = "BT_ADAPTER_LE_PACKET_ADVERTISING";
break;
case BT_ADAPTER_LE_PACKET_SCAN_RESPONSE:
- pszEnumString = "BT_ADAPTER_LE_PACKET_SCAN_RESPONSE";
+ pszEnumString = "BT_ADAPTER_LE_PACKET_SCAN_RESPONSE";
break;
- default :
- pszEnumString = "UNKNOWN";
+ default :
+ pszEnumString = "UNKNOWN";
break;
}
return pszEnumString;
}
+/**
+* @function BluetoothGetLEScanRoleEnumString
+* @description Maps type enums to string values
+* @parameter[IN] enum_scan_role: enum value
+* @return pszEnumString: enum value as a string
+*/
+char* BluetoothGetLEScanRoleEnumString(bt_adapter_le_scan_role_e enum_scan_role)
+{
+ char *pszEnumString = NULL;
+ switch ( enum_scan_role )
+ {
+ case BT_ADAPTER_LE_SCAN_ALL:
+ pszEnumString = "BT_ADAPTER_LE_SCAN_ALL";
+ break;
+ case BT_ADAPTER_LE_SCAN_LEGACY_ONLY:
+ pszEnumString = "BT_ADAPTER_LE_SCAN_LEGACY_ONLY";
+ break;
+ case BT_ADAPTER_LE_SCAN_EXTENDED_ONLY:
+ pszEnumString = "BT_ADAPTER_LE_SCAN_EXTENDED_ONLY";
+ break;
+ default :
+ pszEnumString = "UNKNOWN";
+ break;
+ }
+ return pszEnumString;
+}
+
+/**
+* @function BluetoothGetLEScanPhyEnumString
+* @description Maps type enums to string values
+* @parameter[IN] enum_scan_phy: enum value
+* @return pszEnumString: enum value as a string
+*/
+char* BluetoothGetLEScanPhyEnumString(bt_adapter_le_phy_e enum_scan_phy)
+{
+ char *pszEnumString = NULL;
+ switch ( enum_scan_phy )
+ {
+ case BT_LE_ALL_PHY:
+ pszEnumString = "BT_LE_ALL_PHY";
+ break;
+ case BT_LE_1M_PHY:
+ pszEnumString = "BT_LE_1M_PHY";
+ break;
+ case BT_LE_2M_PHY:
+ pszEnumString = "BT_LE_2M_PHY";
+ break;
+ case BT_LE_CODED_PHY:
+ pszEnumString = "BT_LE_CODED_PHY";
+ break;
+ default :
+ pszEnumString = "UNKNOWN";
+ break;
+ }
+ return pszEnumString;
+}
/**
* @function BluetoothInitAudio
* @description Initialize bluetooth audio and create device bond
#define BLUETOOTH_OOB_FEATURE "http://tizen.org/feature/network.bluetooth.oob"
#define BLUETOOTH_LE5_FEATURE "http://tizen.org/feature/network.bluetooth.le.5_0"
#define BLUETOOTH_LE_COC_FEATURE "http://tizen.org/feature/network.bluetooth.le.coc"
+#define BLUETOOTH_LE_ADV_EXT_FEATURE "http://tizen.org/feature/network.bluetooth.le.adv_ext"
bool g_bBluetoothInit;
bool g_bBluetoothMismatch;
bool g_bBluetoothIsAudioSupported;
bool g_bBluetoothIsLESupported;
bool g_bBluetoothIsOOBSupported;
+bool g_bBluetoothIsLEAdvExtSupported;
bool g_bCallbackResult;
bool BluetoothGetStorageDownloadsPath(char *pszPath);
bool BluetoothGetDataPath(char* pPath);
char* StorageGetError(storage_error_e nRet);
+char* BluetoothGetLEScanPhyEnumString(bt_adapter_le_phy_e enum_scan_phy);
+char* BluetoothGetLEScanRoleEnumString(bt_adapter_le_scan_role_e enum_scan_role);
+
/** @} */
#endif //_ITS_BLUETOOTH_COMMON_H_
extern int ITc_bluetooth_bt_socket_listen_l2cap_channel_p(void);
extern int ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p(void);
extern int ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p(void);
testcase tc_array[] = {
{"ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p",ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p,ITs_bluetooth_audio_startup,ITs_bluetooth_audio_cleanup},
{"ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p", ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
{"ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p", ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
{"ITc_bt_adapter_le_set_advertising_flags_p", ITc_bt_adapter_le_set_advertising_flags_p, ITs_bluetooth_adapter_le_startup, ITs_bluetooth_adapter_le_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p", ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p", ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p", ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p", ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p", ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p", ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p", ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p", ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
{NULL, NULL}
};
extern int ITc_bluetooth_bt_socket_listen_l2cap_channel_p(void);
extern int ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p(void);
extern int ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p(void);
testcase tc_array[] = {
{"ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p",ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p,ITs_bluetooth_audio_startup,ITs_bluetooth_audio_cleanup},
{"ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p", ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
{"ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p", ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
{"ITc_bt_adapter_le_set_advertising_flags_p", ITc_bt_adapter_le_set_advertising_flags_p, ITs_bluetooth_adapter_le_startup, ITs_bluetooth_adapter_le_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p", ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p", ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p", ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p", ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p", ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p", ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p", ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p", ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
{NULL, NULL}
};
extern int ITc_bt_adapter_le_is_2m_phy_supported_p(void);
extern int ITc_bt_adapter_le_is_coded_phy_supported_p(void);
extern int ITc_bt_adapter_le_is_discovering_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p(void);
testcase tc_array[] = {
{"ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p",ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p,ITs_bluetooth_audio_startup,ITs_bluetooth_audio_cleanup},
{"ITc_bt_adapter_le_is_2m_phy_supported_p", ITc_bt_adapter_le_is_2m_phy_supported_p, ITs_bluetooth_adapter_le_startup, ITs_bluetooth_adapter_le_cleanup},
{"ITc_bt_adapter_le_is_coded_phy_supported_p", ITc_bt_adapter_le_is_coded_phy_supported_p, ITs_bluetooth_adapter_le_startup, ITs_bluetooth_adapter_le_cleanup},
{"ITc_bt_adapter_le_is_discovering_p", ITc_bt_adapter_le_is_discovering_p, ITs_bluetooth_adapter_le_startup, ITs_bluetooth_adapter_le_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p", ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p", ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p", ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p", ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p", ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p", ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p", ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p", ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
{NULL, NULL}
};
extern int ITc_bluetooth_bt_socket_listen_l2cap_channel_p(void);
extern int ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p(void);
extern int ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p(void);
testcase tc_array[] = {
{"ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p",ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p,ITs_bluetooth_audio_startup,ITs_bluetooth_audio_cleanup},
{"ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p", ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
{"ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p", ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
{"ITc_bt_adapter_le_set_advertising_flags_p", ITc_bt_adapter_le_set_advertising_flags_p, ITs_bluetooth_adapter_le_startup, ITs_bluetooth_adapter_le_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p", ITc_bluetooth_adapter_bt_adapter_le_start_scan_new_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p", ITc_bluetooth_adapter_bt_adapter_le_set_scan_role_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p", ITc_bluetooth_adapter_bt_adapter_le_set_scan_phy_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p", ITc_bluetooth_adapter_bt_adapter_le_set_advertising_legacy_mode_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p", ITc_bluetooth_adapter_bt_adapter_le_set_advertising_primary_secondary_phy_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p", ITc_bluetooth_adapter_bt_adapter_le_is_extended_advertising_supported_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p", ITc_bluetooth_adapter_bt_adapter_le_is_extended_scan_supported_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+ {"ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p", ITc_bluetooth_adapter_bt_adapter_le_get_maximum_advertising_data_length_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
{NULL, NULL}
};