[ITC][Bluetooth][ACR-1694][Bluetooth LE L2CAP APIs added] 89/274789/6
authormanu.tiwari <manu.tiwari@samsung.com>
Mon, 9 May 2022 10:31:35 +0000 (16:01 +0530)
committershobhit verma <shobhit.v@samsung.com>
Wed, 11 May 2022 06:12:36 +0000 (06:12 +0000)
Change-Id: Icdb7103d127856336ebd6fb745d9fc06aea072d4
Signed-off-by: manu.tiwari <manu.tiwari@samsung.com>
src/itc/bluetooth/CMakeLists.txt
src/itc/bluetooth/ITs-bluetooth-common.h
src/itc/bluetooth/ITs-bluetooth-le_l2Cap.c [new file with mode: 0755]
src/itc/bluetooth/tct-bluetooth-native_mobile.h
src/itc/bluetooth/tct-bluetooth-native_tizeniot.h
src/itc/bluetooth/tct-bluetooth-native_wearable.h

index f1e690db22a07d3591ef81ee4ceab99a3de09752..bbae627edb31025c34fa9a514cdb5149ba4aa174 100755 (executable)
@@ -14,6 +14,7 @@ SET(TC_SOURCES
        ITs-bluetooth-adapter.c
        ITs-bluetooth-OPP.c
        ITs-bluetooth-socket.c
+       ITs-bluetooth-le_l2Cap.c
 )
 ENDIF()
 
@@ -26,6 +27,7 @@ SET(TC_SOURCES
        ITs-bluetooth-adapter.c
        ITs-bluetooth-OPP.c
        ITs-bluetooth-socket.c
+       ITs-bluetooth-le_l2Cap.c
 )
 ENDIF()
 
@@ -38,6 +40,7 @@ SET(TC_SOURCES
        ITs-bluetooth-adapter.c
        ITs-bluetooth-OPP.c
        ITs-bluetooth-socket.c
+       ITs-bluetooth-le_l2Cap.c
 )
 ENDIF()
 
index 8bdf42e2ed2fbfe4515c1ab16cdad3cfa2081d71..da2686db6242b17b9126fa76020904d498358f59 100755 (executable)
@@ -50,7 +50,7 @@
 #define BLUETOOTH_LE_FEATURE                   "http://tizen.org/feature/network.bluetooth.le"
 #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"
 
 bool g_bBluetoothInit;
 bool g_bBluetoothMismatch;
@@ -118,6 +118,19 @@ gboolean TimeoutFunction(gpointer data);
        g_main_loop_run(g_pMainLoop);\
        g_source_remove(nTimeoutId);\
 
+#define CHECK_LE_COC_FEATURE_ERROR {\
+    if (g_bBtLeCocFeature == false)\
+       {\
+                if (g_bL2cap_FeatureError == true)\
+                {\
+                        return 1;\
+                }\
+                else\
+                        return 0;\
+       }\
+    if (g_bL2cap_channel == false)\
+        return 1;\
+}
 
 char* BluetoothGetError(int nRet);
 char* BluetoothGetEnumString(bt_adapter_visibility_mode_e enum_discoverable_mode);
diff --git a/src/itc/bluetooth/ITs-bluetooth-le_l2Cap.c b/src/itc/bluetooth/ITs-bluetooth-le_l2Cap.c
new file mode 100755 (executable)
index 0000000..c674fe1
--- /dev/null
@@ -0,0 +1,367 @@
+//
+// Copyright (c) 2022 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "ITs-bluetooth-common.h"
+
+/** @addtogroup itc-bluetooth
+*  @ingroup itc
+*  @{
+*/
+
+int g_nL2cap_test_psm = 37;
+int g_nSocketFd = 0;
+bool g_bBtLeCocFeature = false;
+bool g_bL2cap_channel = false;
+bool g_bL2cap_FeatureError = false;
+/**
+* @brief Callback funtions
+*/
+
+static void Bluetooth_socket_connection_requested_cb(int socket_fd, const char *remote_address, void *user_data)
+{
+       FPRINTF("[Line : %d][%s] Callback invoked for connection request.\\n", __LINE__, API_NAMESPACE);
+}
+
+
+static void Bluetooth_socket_l2cap_channel_connection_state_changed_cb(int result, bt_socket_connection_state_e connection_state, bt_socket_l2cap_le_connection_s *connection, void *user_data)
+{
+       FPRINTF("[Line : %d][%s] Callback invoked for connection state change\\n", __LINE__, API_NAMESPACE);
+}
+
+/**
+* @function            ITs_bluetooth_l2cap_channel_startup
+* @description Called before each test, Bluetooth is initialized
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_bluetooth_l2cap_channel_startup(void)
+{
+       struct stat stBuff;
+       int nBtLeFeature = false;
+    g_bL2cap_FeatureError = false;
+    g_bL2cap_channel = false;
+
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Bluetooth_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bBluetoothIsSupported = TCTCheckSystemInfoFeatureSupported(BLUETOOTH_FEATURE, API_NAMESPACE);
+       nBtLeFeature = TCTCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE, API_NAMESPACE);
+       g_bBtLeCocFeature = TCTCheckSystemInfoFeatureSupported(BLUETOOTH_LE_COC_FEATURE, API_NAMESPACE);
+
+       int nRetVal = bt_initialize();
+       if ( (false == g_bBluetoothIsSupported) || (false == nBtLeFeature) )
+       {
+               if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       g_bBluetoothMismatch = true;
+               }
+               else
+               {
+                       g_bBluetoothNotSupported = true;
+               }
+               return;
+       }
+
+       if ( nRetVal != BT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Bluetooth initialization failed, error returned = %s\\n", __LINE__, API_NAMESPACE, BluetoothGetError(nRetVal));
+               g_bBluetoothInit = false;
+               return;
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Bluetooth initialized successfully\\n", __LINE__, API_NAMESPACE);
+               g_bBluetoothInit = true;
+       }
+
+       bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+       nRetVal = bt_adapter_get_state(&adapter_state);
+       if (adapter_state != BT_ADAPTER_ENABLED)
+       {
+                       FPRINTF("[Line : %d][%s] Bluetooth adaptor is not enabled.\\n", __LINE__, API_NAMESPACE);
+                       g_bBluetoothInit = false;
+       }
+
+        nRetVal = bt_socket_create_l2cap_channel(g_nL2cap_test_psm, &g_nSocketFd);
+        if ( false == g_bBtLeCocFeature )
+        {
+               if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][%s] Feature is not supported, bt_socket_create_l2cap_channel API didn't returned TIZEN_ERROR_NOT_SUPPORTED error code.\\n", __LINE__, API_NAMESPACE);
+                       g_bL2cap_FeatureError =  true;
+               }
+               else
+                       FPRINTF("[Line : %d][%s] Feature is not supported, bt_socket_create_l2cap_channel API returned TIZEN_ERROR_NOT_SUPPORTED error code.\\n", __LINE__, API_NAMESPACE);
+
+               return;
+        }
+
+       if ( nRetVal != BT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] bt_socket_create_l2cap_channel API failed, error returned = %s\\n", __LINE__, API_NAMESPACE, BluetoothGetError(nRetVal));
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] bt_socket_create_l2cap_channel API success.\\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line : %d][%s] Socket ID is: %d\\n", __LINE__, API_NAMESPACE, g_nSocketFd);
+               g_bL2cap_channel = true;
+       }
+
+       return;
+}
+
+/**
+* @function            ITs_bluetooth_l2cap_channel_cleanup
+* @description Called after each test, Bluetooth is de-initialized
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_bluetooth_l2cap_channel_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Bluetooth_p\\n", __LINE__, API_NAMESPACE);
+#endif
+    int nRetVal = -1;
+
+       if ( g_bL2cap_channel == true )
+       {
+               nRetVal = bt_socket_destroy_l2cap_channel(g_nSocketFd);
+           PRINT_RESULT_NORETURN(BT_ERROR_NONE, nRetVal, "bt_socket_destroy_l2cap_channel", BluetoothGetError(nRetVal));
+       }
+
+       if ( g_bBluetoothInit )
+       {
+               nRetVal = bt_deinitialize();
+               if ( nRetVal != BT_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] Bluetooth de-initialization failed, error returned = %s\\n", __LINE__, API_NAMESPACE, BluetoothGetError(nRetVal));
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][%s] Bluetooth de-initialized successfully\\n", __LINE__, API_NAMESPACE);
+               }
+       }
+
+       return;
+}
+
+
+//& purpose: Create and Destroy l2 Cap channel
+//& type: auto
+/**
+* @testcase                            ITc_bluetooth_bt_socket_create_destroy_l2cap_channel_p
+* @since_tizen                 7.0
+* @type                                        auto
+* @description                 Create l2 Cap channel if bluetooth is supported and initialized and destroy
+* @scenario                            Create l2 Cap channel \n
+*                                                              Destroy RFCOMM socket
+* @apicovered                  bt_socket_create_l2cap_channel and bt_socket_destroy_l2cap_channel
+* @passcase                            When bt_socket_create_l2cap_channel and bt_socket_destroy_l2cap_channel are successful.
+* @failcase                                    If targest APIs bt_socket_create_l2cap_channel or bt_socket_destroy_l2cap_channel fails.
+* @precondition                        Bluetooth must be initialized and adaptor must be enabled
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_bt_socket_create_destroy_l2cap_channel_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+
+       CHECK_LE_COC_FEATURE_ERROR;
+
+       nRetVal = bt_socket_destroy_l2cap_channel(g_nSocketFd);
+       PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_socket_destroy_l2cap_channel", BluetoothGetError(nRetVal));
+
+       nRetVal = bt_socket_create_l2cap_channel(g_nL2cap_test_psm, &g_nSocketFd);
+       PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_socket_create_l2cap_channel", BluetoothGetError(nRetVal));
+       FPRINTF("[Line : %d][%s] Socket ID is: %d\\n", __LINE__, API_NAMESPACE, g_nSocketFd);
+
+       nRetVal = bt_socket_destroy_l2cap_channel(g_nSocketFd);
+       PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_socket_destroy_l2cap_channel", BluetoothGetError(nRetVal));
+
+       nRetVal = bt_socket_create_l2cap_channel(g_nL2cap_test_psm, &g_nSocketFd);
+       PRINT_RESULT(BT_ERROR_NONE, nRetVal, "bt_socket_create_l2cap_channel", BluetoothGetError(nRetVal));
+       FPRINTF("[Line : %d][%s] Socket ID is: %d\\n", __LINE__, API_NAMESPACE, g_nSocketFd);
+
+       return 0;
+}
+
+
+
+//& purpose: Listen and Accept l2 Cap channel
+//& type: auto
+/**
+* @testcase                            ITc_bluetooth_bt_socket_listen_and_accept_l2cap_channel_p
+* @since_tizen                 7.0
+* @type                                        auto
+* @description                 listen l2 Cap channel if bluetooth is supported and initialized and accept
+* @scenario                            Listen l2 Cap channel \n
+*                                                              Accept RFCOMM socket
+* @apicovered                  bt_socket_listen_and_accept_l2cap_channel
+* @passcase                            When bt_socket_listen_and_accept_l2cap_channel is successful.
+* @failcase                                    If targest API bt_socket_listen_and_accept_l2cap_channel fails.
+* @precondition                        Bluetooth must be initialized and adaptor must be enabled
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_bt_socket_listen_and_accept_l2cap_channel_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+
+       CHECK_LE_COC_FEATURE_ERROR;
+
+       nRetVal = bt_socket_listen_and_accept_l2cap_channel(g_nSocketFd, 1);
+       PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRetVal, "bt_socket_listen_and_accept_l2cap_channel", BluetoothGetError(nRetVal), bt_socket_destroy_l2cap_channel(g_nSocketFd));
+
+       return 0;
+}
+
+
+//& purpose: Get l2 Cap psm
+//& type: auto
+/**
+* @testcase                            ITc_bluetooth_bt_socket_get_l2cap_psm_p
+* @since_tizen                 7.0
+* @type                                        auto
+* @description                 Get l2 Cap psm if bluetooth is supported and initialized
+* @scenario                            Get l2 Cap psm
+* @apicovered                  bt_socket_get_l2cap_psm
+* @passcase                            When bt_socket_get_l2cap_psm is successful.
+* @failcase                                    If targest API bt_socket_get_l2cap_psm fails.
+* @precondition                        Bluetooth must be initialized and adaptor must be enabled
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_bt_socket_get_l2cap_psm_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       int nPsm = -1;
+
+       CHECK_LE_COC_FEATURE_ERROR;
+
+       nRetVal = bt_socket_listen_and_accept_l2cap_channel(g_nSocketFd, 1);
+       PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRetVal, "bt_socket_listen_and_accept_l2cap_channel", BluetoothGetError(nRetVal), bt_socket_destroy_l2cap_channel(g_nSocketFd));
+
+       nRetVal = bt_socket_get_l2cap_psm(g_nSocketFd, &nPsm);
+       PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRetVal, "bt_socket_get_l2cap_psm", BluetoothGetError(nRetVal), bt_socket_destroy_l2cap_channel(g_nSocketFd));
+
+       return 0;
+}
+
+
+//& purpose: listen for l2cap connection
+//& type: auto
+/**
+* @testcase                            ITc_bluetooth_bt_socket_listen_l2cap_channel_p
+* @since_tizen                 7.0
+* @type                                        auto
+* @description                 listen for l2cap connection if bluetooth is supported and initialized
+* @scenario                            listen for l2cap connection
+* @apicovered                  bt_socket_listen_l2cap_channel
+* @passcase                            When bt_socket_listen_l2cap_channel is successful.
+* @failcase                                    If targest API bt_socket_listen_l2cap_channel fails.
+* @precondition                        Bluetooth must be initialized and adaptor must be enabled
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_bt_socket_listen_l2cap_channel_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       int nPsm = -1;
+
+       CHECK_LE_COC_FEATURE_ERROR;
+
+       nRetVal = bt_socket_listen_l2cap_channel(g_nSocketFd, 1);
+       PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRetVal, "bt_socket_listen_l2cap_channel", BluetoothGetError(nRetVal), bt_socket_destroy_l2cap_channel(g_nSocketFd));
+
+       return 0;
+}
+
+
+//& purpose: Set and Unset connection requested callback
+//& type: auto
+/**
+* @testcase                            ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p
+* @since_tizen                 7.0
+* @type                                        auto
+* @description                 Set and Unset connection requested callback if bluetooth is supported and initialized
+* @scenario                            Set connection requested callback\n
+*                                                              Unset connection requested callback\n
+* @apicovered                  bt_socket_set_l2cap_channel_connection_requested_cb and bt_socket_unset_l2cap_channel_connection_requested_cb
+* @passcase                            When bt_socket_set_l2cap_channel_connection_requested_cb and bt_socket_unset_l2cap_channel_connection_requested_cb is successful.
+* @failcase                                    If targest API bt_socket_set_l2cap_channel_connection_requested_cb Or bt_socket_unset_l2cap_channel_connection_requested_cb fails.
+* @precondition                        Bluetooth must be initialized and adaptor must be enabled
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       int nPsm = -1;
+
+       CHECK_LE_COC_FEATURE_ERROR;
+
+       nRetVal = bt_socket_set_l2cap_channel_connection_requested_cb(Bluetooth_socket_connection_requested_cb, NULL);
+       PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRetVal, "bt_socket_set_l2cap_channel_connection_requested_cb", BluetoothGetError(nRetVal), bt_socket_destroy_l2cap_channel(g_nSocketFd));
+
+       nRetVal = bt_socket_unset_l2cap_channel_connection_requested_cb();
+       PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRetVal, "bt_socket_unset_l2cap_channel_connection_requested_cb", BluetoothGetError(nRetVal), bt_socket_destroy_l2cap_channel(g_nSocketFd));
+
+       return 0;
+}
+
+
+
+//& purpose: Set and Unset connection state changed callback
+//& type: auto
+/**
+* @testcase                            ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p
+* @since_tizen                 7.0
+* @type                                        auto
+* @description                 Set and Unset connection state changed callback if bluetooth is supported and initialized
+* @scenario                            Set connection state changed callback\n
+*                                                              Unset connection state changed callback\n
+* @apicovered                  bt_socket_set_l2cap_channel_connection_state_changed_cb and bt_socket_unset_l2cap_channel_connection_state_changed_cb
+* @passcase                            When bt_socket_set_l2cap_channel_connection_state_changed_cb and bt_socket_unset_l2cap_channel_connection_state_changed_cb is successful.
+* @failcase                                    If targest API bt_socket_set_l2cap_channel_connection_state_changed_cb Or bt_socket_unset_l2cap_channel_connection_state_changed_cb fails.
+* @precondition                        Bluetooth must be initialized and adaptor must be enabled
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       int nPsm = -1;
+
+       CHECK_LE_COC_FEATURE_ERROR;
+
+       nRetVal = bt_socket_set_l2cap_channel_connection_state_changed_cb(Bluetooth_socket_l2cap_channel_connection_state_changed_cb, NULL);
+       PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRetVal, "bt_socket_set_l2cap_channel_connection_state_changed_cb", BluetoothGetError(nRetVal), bt_socket_destroy_l2cap_channel(g_nSocketFd));
+
+       nRetVal = bt_socket_unset_l2cap_channel_connection_state_changed_cb();
+       PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRetVal, "bt_socket_unset_l2cap_channel_connection_state_changed_cb", BluetoothGetError(nRetVal), bt_socket_destroy_l2cap_channel(g_nSocketFd));
+
+       return 0;
+}
+
+/** @} */
+/** @} */
+
index 5f74f5cc85776d45bdcfe456915548c92c004ac9..ed5af2f0f946b0b54802d21e06c9ef769722d63b 100755 (executable)
@@ -31,6 +31,8 @@ extern void ITs_bluetooth_OPP_startup(void);
 extern void ITs_bluetooth_OPP_cleanup(void);
 extern void ITs_bluetooth_socket_startup(void);
 extern void ITs_bluetooth_socket_cleanup(void);
+extern void ITs_bluetooth_l2cap_channel_startup(void);
+extern void ITs_bluetooth_l2cap_channel_cleanup(void);
 
 extern int ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p(void);
 extern int ITc_bluetooth_audio_bt_audio_set_unset_connection_state_changed_cb_p(void);
@@ -98,6 +100,12 @@ extern int ITc_bt_adapter_le_scan_filter_set_manufacturer_data_with_mask_p(void)
 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_bt_socket_create_destroy_l2cap_channel_p(void);
+extern int ITc_bluetooth_bt_socket_listen_and_accept_l2cap_channel_p(void);
+extern int ITc_bluetooth_bt_socket_get_l2cap_psm_p(void);
+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);
 
 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},
@@ -166,6 +174,12 @@ testcase tc_array[] = {
        {"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_bt_socket_create_destroy_l2cap_channel_p", ITc_bluetooth_bt_socket_create_destroy_l2cap_channel_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
+       {"ITc_bluetooth_bt_socket_listen_and_accept_l2cap_channel_p", ITc_bluetooth_bt_socket_listen_and_accept_l2cap_channel_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
+       {"ITc_bluetooth_bt_socket_get_l2cap_psm_p", ITc_bluetooth_bt_socket_get_l2cap_psm_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
+       {"ITc_bluetooth_bt_socket_listen_l2cap_channel_p", ITc_bluetooth_bt_socket_listen_l2cap_channel_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_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},
        {NULL, NULL}
 };
 
index 5f74f5cc85776d45bdcfe456915548c92c004ac9..a9c836ac40d93a54c1cd97c606bf3b935d795bab 100755 (executable)
@@ -31,6 +31,8 @@ extern void ITs_bluetooth_OPP_startup(void);
 extern void ITs_bluetooth_OPP_cleanup(void);
 extern void ITs_bluetooth_socket_startup(void);
 extern void ITs_bluetooth_socket_cleanup(void);
+extern void ITs_bluetooth_l2cap_channel_startup(void);
+extern void ITs_bluetooth_l2cap_channel_cleanup(void);
 
 extern int ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p(void);
 extern int ITc_bluetooth_audio_bt_audio_set_unset_connection_state_changed_cb_p(void);
@@ -98,6 +100,12 @@ extern int ITc_bt_adapter_le_scan_filter_set_manufacturer_data_with_mask_p(void)
 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_bt_socket_create_destroy_l2cap_channel_p(void);
+extern int ITc_bluetooth_bt_socket_listen_and_accept_l2cap_channel_p(void);
+extern int ITc_bluetooth_bt_socket_get_l2cap_psm_p(void);
+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);
 
 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},
@@ -166,6 +174,12 @@ testcase tc_array[] = {
        {"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_bt_socket_create_destroy_l2cap_channel_p", ITc_bluetooth_bt_socket_create_destroy_l2cap_channel_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
+       {"ITc_bluetooth_bt_socket_listen_and_accept_l2cap_channel_p", ITc_bluetooth_bt_socket_listen_and_accept_l2cap_channel_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
+       {"ITc_bluetooth_bt_socket_get_l2cap_psm_p", ITc_bluetooth_bt_socket_get_l2cap_psm_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
+       {"ITc_bluetooth_bt_socket_listen_l2cap_channel_p", ITc_bluetooth_bt_socket_listen_l2cap_channel_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_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},     
        {NULL, NULL}
 };
 
index 57a16837fe7fbdefb199c0f215cd5c8f37c3b352..641d1cb6c1fa5e0afad2af30a104568edf3e7e4c 100755 (executable)
@@ -31,6 +31,8 @@ extern void ITs_bluetooth_OPP_startup(void);
 extern void ITs_bluetooth_OPP_cleanup(void);
 extern void ITs_bluetooth_socket_startup(void);
 extern void ITs_bluetooth_socket_cleanup(void);
+extern void ITs_bluetooth_l2cap_channel_startup(void);
+extern void ITs_bluetooth_l2cap_channel_cleanup(void);
 
 extern int ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p(void);
 extern int ITc_bluetooth_audio_bt_audio_set_unset_connection_state_changed_cb_p(void);
@@ -98,6 +100,12 @@ extern int ITc_bt_adapter_le_scan_filter_set_manufacturer_data_with_mask_p(void)
 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_bt_socket_create_destroy_l2cap_channel_p(void);
+extern int ITc_bluetooth_bt_socket_listen_and_accept_l2cap_channel_p(void);
+extern int ITc_bluetooth_bt_socket_get_l2cap_psm_p(void);
+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);
 
 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},
@@ -166,6 +174,12 @@ testcase tc_array[] = {
        {"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_bt_socket_create_destroy_l2cap_channel_p", ITc_bluetooth_bt_socket_create_destroy_l2cap_channel_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
+       {"ITc_bluetooth_bt_socket_listen_and_accept_l2cap_channel_p", ITc_bluetooth_bt_socket_listen_and_accept_l2cap_channel_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
+       {"ITc_bluetooth_bt_socket_get_l2cap_psm_p", ITc_bluetooth_bt_socket_get_l2cap_psm_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
+       {"ITc_bluetooth_bt_socket_listen_l2cap_channel_p", ITc_bluetooth_bt_socket_listen_l2cap_channel_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_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},
        {NULL, NULL}
 };