From: Sangchul Lee Date: Tue, 11 Jan 2022 05:53:34 +0000 (+0900) Subject: [ITC][webrtc][non-ACR] Add ITc_media_webrtc_data_channel_send_and_receive_p() X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F269285%2F5;p=test%2Ftct%2Fnative%2Fapi.git [ITC][webrtc][non-ACR] Add ITc_media_webrtc_data_channel_send_and_receive_p() Change-Id: I19fb8e9eb26971f546b522459a3d22ef0918395d Signed-off-by: Sangchul Lee --- diff --git a/src/itc/webrtc/ITs-webrtc.c b/src/itc/webrtc/ITs-webrtc.c index 8522f77f9..03825c4eb 100644 --- a/src/itc/webrtc/ITs-webrtc.c +++ b/src/itc/webrtc/ITs-webrtc.c @@ -17,6 +17,8 @@ #define TEST_DATA_CHANNEL_LABEL "test data channel" #define TEST_STRING_DATA "test string" #define TEST_BUFFER_SIZE 16 +char g_test_buffer[TEST_BUFFER_SIZE] = {'t', 'e', 's', 't', 'b', 'u', 'f', '\0', }; + #include "ITs-webrtc-common.h" #include static Evas_Object *g_win = NULL; @@ -111,6 +113,7 @@ static void webrtcStateChangedCB(webrtc_h webrtc, webrtc_state_e previous, webrt callback_data *cb_data = (callback_data *)user_data; FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB called\\n", __LINE__, API_NAMESPACE); + dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] webrtc[%p], state[%d -> %d]", __FUNCTION__, __LINE__, webrtc, previous, current); if (!cb_data) return; @@ -128,6 +131,7 @@ static void webrtcTrackAddedCB(webrtc_h webrtc, webrtc_media_type_e type, unsign callback_data *cb_data = (callback_data *)user_data; FPRINTF("[Line : %d][%s] Callback webrtcTrackAddedCB called\\n", __LINE__, API_NAMESPACE); + dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] webrtc[%p], track_id[%u]", __FUNCTION__, __LINE__, webrtc, track_id); if (!cb_data) return; @@ -145,6 +149,7 @@ static void webrtcSignalingStateChangeCB(webrtc_h webrtc, webrtc_signaling_state callback_data *cb_data = (callback_data *)user_data; FPRINTF("[Line : %d][%s] Callback webrtcSignalingStateChangeCB called\\n", __LINE__, API_NAMESPACE); + dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] webrtc[%p], state[%d]", __FUNCTION__, __LINE__, webrtc, state); if (!cb_data || state != WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER) return; @@ -180,6 +185,79 @@ static void webrtcIceGatheringStateChangeCB(webrtc_h webrtc, webrtc_ice_gatherin QUIT_LOOP(cb_data->mainloop); } +/** +* @function webrtcDataChannelOpenCB +* @parameter webrtc_data_channel_h channel, void *user_data +* @return NA +*/ +static void webrtcDataChannelOpenCB(webrtc_data_channel_h channel, void *user_data) +{ + callback_data *cb_data = (callback_data *)user_data; + + FPRINTF("[Line : %d][%s] Callback webrtcDataChannelOpenCB called\\n", __LINE__, API_NAMESPACE); + dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] channel[%p]", __FUNCTION__, __LINE__, channel); + + if (!cb_data) + return; + cb_data->is_invoked = true; + QUIT_LOOP(cb_data->mainloop); +} + +/** +* @function webrtcDataChannelMessageCB +* @parameter webrtc_data_channel_h channel, webrtc_data_channel_type_e type, void *message, void *user_data +* @return NA +*/ +static void webrtcDataChannelMessageCB(webrtc_data_channel_h channel, webrtc_data_channel_type_e type, void *message, void *user_data) +{ + callback_data *cb_data = (callback_data *)user_data; + + FPRINTF("[Line : %d][%s] Callback webrtcDataChannelMessageCB called\\n", __LINE__, API_NAMESPACE); + dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] channel[%p], type[%d], message[%p]", __FUNCTION__, __LINE__, channel, type, message); + + if (!cb_data || !message) + return; + + if (type == WEBRTC_DATA_CHANNEL_TYPE_STRING) { + dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] channel[%p], received string message[%s]", __FUNCTION__, __LINE__, channel, (const char *)message); + if (!strcmp(TEST_STRING_DATA, message)) { + cb_data->is_invoked = true; + QUIT_LOOP(cb_data->mainloop); + } + } else if (type == WEBRTC_DATA_CHANNEL_TYPE_BYTES) { + webrtc_bytes_data_h *data = message; + const char *data_p; + unsigned long size; + int nRet = webrtc_get_data(data, &data_p, &size); + PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_get_data", WebRtcGetError(nRet)); + + dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] channel[%p], received bytes message[%s] size[%lu]", __FUNCTION__, __LINE__, channel, data_p, size); + if (!memcmp(g_test_buffer, data_p, TEST_BUFFER_SIZE)) { + cb_data->is_invoked = true; + QUIT_LOOP(cb_data->mainloop); + } + } +} + +/** +* @function webrtcDataChannelCB +* @parameter webrtc_h webrtc, webrtc_data_channel_h channel, void *user_data +* @return NA +*/ +static void webrtcDataChannelCB(webrtc_h webrtc, webrtc_data_channel_h channel, void *user_data) +{ + int nRet; + + FPRINTF("[Line : %d][%s] Callback webrtcDataChannelCB called\\n", __LINE__, API_NAMESPACE); + dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] webrtc[%p], channel[%p]", __FUNCTION__, __LINE__, webrtc, channel); + + nRet = webrtc_data_channel_set_open_cb(channel, webrtcDataChannelOpenCB, user_data); + PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_data_channel_set_open_cb", WebRtcGetError(nRet)); + + nRet = webrtc_data_channel_set_message_cb(channel, webrtcDataChannelMessageCB, user_data); + PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_data_channel_set_message_cb", WebRtcGetError(nRet)); +} + /** * @function webrtcTurnServerCB * @parameter const char *turn_server, void *user_data @@ -2097,7 +2175,6 @@ int ITc_media_webrtc_start_and_finish_negotiation_p(void) return 0; } - //& purpose: Gets the buffered amount of the data channel. //& type: auto /** @@ -2218,5 +2295,187 @@ int ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p(void) return 0; } + +//& purpose: Sends and receives data via data channel between two handles. +//& type: auto +/** +* @testcase ITc_media_webrtc_data_channel_send_and_receive_p +* @since_tizen 7.0 +* @author SR(sc11.lee) +* @reviewer SR(seungbae.shin) +* @type auto +* @description Sends and receives data via data channel between two handles. +* @scenario Sends and receives data via data channel between two handles. +* @apicovered webrtc_start,webrtc_create_offer,webrtc_create_answer,webrtc_data_channel_send_string,webrtc_data_channel_send_bytes +* @passcase If webrtc_start,webrtc_create_offer,webrtc_create_answer,webrtc_data_channel_send_string,webrtc_data_channel_send_bytes is successful +* @failcase If webrtc_start,webrtc_create_offer,webrtc_create_answer,webrtc_data_channel_send_string,webrtc_data_channel_send_bytes fails +* @precondition NA +* @postcondition NA +*/ +int ITc_media_webrtc_data_channel_send_and_receive_p(void) +{ + webrtc_h webrtcOfferer; + webrtc_h webrtcAnswerer; + webrtc_data_channel_h datachannelOfferer; + int nRet; + char *offerSDP; + char *answerSDP; + GList *offerICECandidates = NULL; + GList *answerICECandidates = NULL; + callback_data cb_data = { .mainloop = NULL, .is_invoked = false }; + callback_data cb_data2 = { .mainloop = NULL, .is_invoked = false }; + + START_TEST; + + /* initialize and start offerer */ + nRet = webrtc_create(&webrtcOfferer); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create", WebRtcGetError(nRet)); + + nRet = webrtc_set_ice_candidate_cb(webrtcOfferer, webrtcIceCandidateCB, &offerICECandidates); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_ice_candidate_cb", WebRtcGetError(nRet)); + + nRet = webrtc_set_state_changed_cb(webrtcOfferer, webrtcStateChangedCB, &cb_data); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_state_changed_cb", WebRtcGetError(nRet)); + + nRet = webrtc_set_signaling_state_change_cb(webrtcOfferer, webrtcSignalingStateChangeCB, NULL); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_signaling_state_change_cb", WebRtcGetError(nRet)); + + nRet = webrtc_set_ice_gathering_state_change_cb(webrtcOfferer, webrtcIceGatheringStateChangeCB, &cb_data); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_ice_gathering_state_change_cb", WebRtcGetError(nRet)); + + nRet = webrtc_create_data_channel(webrtcOfferer, TEST_DATA_CHANNEL_LABEL, NULL, &datachannelOfferer); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create_data_channel", WebRtcGetError(nRet)); + + nRet = webrtc_start(webrtcOfferer); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet)); + + RUN_POLLING_LOOP(cb_data.mainloop, cb_data.is_invoked); + if (!cb_data.is_invoked) { + FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE); + return 1; + } + cb_data.is_invoked = false; + + /* initialize and start answerer */ + nRet = webrtc_create(&webrtcAnswerer); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create", WebRtcGetError(nRet)); + + nRet = webrtc_set_ice_candidate_cb(webrtcAnswerer, webrtcIceCandidateCB, &answerICECandidates); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_ice_candidate_cb", WebRtcGetError(nRet)); + + nRet = webrtc_set_state_changed_cb(webrtcAnswerer, webrtcStateChangedCB, &cb_data); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_state_changed_cb", WebRtcGetError(nRet)); + + nRet = webrtc_set_signaling_state_change_cb(webrtcAnswerer, webrtcSignalingStateChangeCB, &cb_data); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_signaling_state_change_cb", WebRtcGetError(nRet)); + + nRet = webrtc_set_ice_gathering_state_change_cb(webrtcAnswerer, webrtcIceGatheringStateChangeCB, &cb_data); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_ice_gathering_state_change_cb", WebRtcGetError(nRet)); + + nRet = webrtc_set_data_channel_cb(webrtcAnswerer, webrtcDataChannelCB, &cb_data2); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_data_channel_cb", WebRtcGetError(nRet)); + + nRet = webrtc_start(webrtcAnswerer); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet)); + RUN_POLLING_LOOP(cb_data.mainloop, cb_data.is_invoked); + if (!cb_data.is_invoked) { + FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE); + return 1; + } + cb_data.is_invoked = false; + + /* do negotiate */ + nRet = webrtc_create_offer(webrtcOfferer, NULL, &offerSDP); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create_offer", WebRtcGetError(nRet)); + + nRet = webrtc_set_local_description(webrtcOfferer, offerSDP); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_local_description", WebRtcGetError(nRet)); + + RUN_POLLING_LOOP(cb_data.mainloop, cb_data.is_invoked); + if (!cb_data.is_invoked) { + FPRINTF("[Line : %d][%s] Callback webrtcIceGatheringStateChangeCB not invoked\\n", __LINE__, API_NAMESPACE); + return 1; + } + cb_data.is_invoked = false; + + nRet = webrtc_set_remote_description(webrtcAnswerer, offerSDP); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_remote_description", WebRtcGetError(nRet)); + FREE_MEMORY(offerSDP); + + RUN_POLLING_LOOP(cb_data.mainloop, cb_data.is_invoked); + if (!cb_data.is_invoked) { + FPRINTF("[Line : %d][%s] Callback webrtcSignalingStateChangeCB not invoked\\n", __LINE__, API_NAMESPACE); + return 1; + } + cb_data.is_invoked = false; + + nRet = webrtc_create_answer(webrtcAnswerer, NULL, &answerSDP); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create_answer", WebRtcGetError(nRet)); + + nRet = webrtc_set_local_description(webrtcAnswerer, answerSDP); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_local_description", WebRtcGetError(nRet)); + + RUN_POLLING_LOOP(cb_data.mainloop, cb_data.is_invoked); + if (!cb_data.is_invoked) { + FPRINTF("[Line : %d][%s] Callback webrtcIceGatheringStateChangeCB not invoked\\n", __LINE__, API_NAMESPACE); + return 1; + } + + g_list_foreach(offerICECandidates, __foreach_ice_candidate, webrtcAnswerer); + g_list_foreach(answerICECandidates, __foreach_ice_candidate, webrtcOfferer); + + nRet = webrtc_set_remote_description(webrtcOfferer, answerSDP); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_remote_description", WebRtcGetError(nRet)); + FREE_MEMORY(answerSDP); + + /* wait for channel open of answerer */ + RUN_POLLING_LOOP(cb_data2.mainloop, cb_data2.is_invoked); + if (!cb_data2.is_invoked) { + FPRINTF("[Line : %d][%s] Callback webrtcDataChannelOpenCB not invoked\\n", __LINE__, API_NAMESPACE); + return 1; + } + cb_data2.is_invoked = false; + + /* send data to answerer */ + nRet = webrtc_data_channel_send_string(datachannelOfferer, TEST_STRING_DATA); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_data_channel_send_string", WebRtcGetError(nRet)); + + RUN_POLLING_LOOP(cb_data2.mainloop, cb_data2.is_invoked); + if (!cb_data2.is_invoked) { + FPRINTF("[Line : %d][%s] Callback webrtcDataChannelMessageCB not invoked\\n", __LINE__, API_NAMESPACE); + return 1; + } + cb_data2.is_invoked = false; + + nRet = webrtc_data_channel_send_bytes(datachannelOfferer, g_test_buffer, TEST_BUFFER_SIZE); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_data_channel_send_bytes", WebRtcGetError(nRet)); + + RUN_POLLING_LOOP(cb_data2.mainloop, cb_data2.is_invoked); + if (!cb_data2.is_invoked) { + FPRINTF("[Line : %d][%s] Callback webrtcDataChannelMessageCB not invoked\\n", __LINE__, API_NAMESPACE); + return 1; + } + + /* Stop and de-initialize the both handles */ + nRet = webrtc_stop(webrtcOfferer); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_stop", WebRtcGetError(nRet)); + + nRet = webrtc_destroy_data_channel(datachannelOfferer); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_destroy_data_channel", WebRtcGetError(nRet)); + + nRet = webrtc_destroy(webrtcOfferer); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_destroy", WebRtcGetError(nRet)); + + nRet = webrtc_stop(webrtcAnswerer); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_stop", WebRtcGetError(nRet)); + + nRet = webrtc_destroy(webrtcAnswerer); + PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_destroy", WebRtcGetError(nRet)); + + g_list_free_full(offerICECandidates, free); + g_list_free_full(answerICECandidates, free); + + return 0; +} /** @} */ /** @} */ diff --git a/src/itc/webrtc/tct-webrtc-native_mobile.h b/src/itc/webrtc/tct-webrtc-native_mobile.h index f0e0483bb..eb54c6b43 100644 --- a/src/itc/webrtc/tct-webrtc-native_mobile.h +++ b/src/itc/webrtc/tct-webrtc-native_mobile.h @@ -76,6 +76,7 @@ extern int ITc_media_webrtc_set_get_display_mode_p(void); extern int ITc_media_webrtc_set_get_display_visible_p(void); extern int ITc_media_webrtc_set_get_ice_transport_policy_p(void); extern int ITc_media_webrtc_start_and_finish_negotiation_p(void); +extern int ITc_media_webrtc_data_channel_send_and_receive_p(void); extern int ITc_webrtc_file_source_set_get_looping_p(void); extern int ITc_webrtc_file_source_set_path_p(void); extern int ITc_media_webrtc_data_channel_get_buffered_amount_p(void); @@ -135,6 +136,7 @@ testcase tc_array[] = { {"ITc_media_webrtc_data_channel_set_unset_close_cb_p",ITc_media_webrtc_data_channel_set_unset_close_cb_p,ITs_webrtc_callback_startup, ITs_webrtc_callback_cleanup}, {"ITc_webrtc_set_unset_track_added_cb_p",ITc_webrtc_set_unset_track_added_cb_p,ITs_webrtc_callback_startup, ITs_webrtc_callback_cleanup}, {"ITc_media_webrtc_start_and_finish_negotiation_p", ITc_media_webrtc_start_and_finish_negotiation_p, NULL, NULL}, + {"ITc_media_webrtc_data_channel_send_and_receive_p", ITc_media_webrtc_data_channel_send_and_receive_p, NULL, NULL}, {"ITc_webrtc_file_source_set_get_looping_p", ITc_webrtc_file_source_set_get_looping_p, ITs_webrtc_startup, ITs_webrtc_cleanup}, {"ITc_webrtc_file_source_set_path_p", ITc_webrtc_file_source_set_path_p, ITs_webrtc_startup, ITs_webrtc_cleanup}, {"ITc_media_webrtc_data_channel_get_buffered_amount_p", ITc_media_webrtc_data_channel_get_buffered_amount_p, ITs_webrtc_startup, ITs_webrtc_cleanup}, diff --git a/src/itc/webrtc/tct-webrtc-native_tizeniot.h b/src/itc/webrtc/tct-webrtc-native_tizeniot.h index 11ccd592c..dafe19b1c 100644 --- a/src/itc/webrtc/tct-webrtc-native_tizeniot.h +++ b/src/itc/webrtc/tct-webrtc-native_tizeniot.h @@ -76,6 +76,7 @@ extern int ITc_media_webrtc_set_get_display_mode_p(void); extern int ITc_media_webrtc_set_get_display_visible_p(void); extern int ITc_media_webrtc_set_get_ice_transport_policy_p(void); extern int ITc_media_webrtc_start_and_finish_negotiation_p(void); +extern int ITc_media_webrtc_data_channel_send_and_receive_p(void); extern int ITc_webrtc_file_source_set_get_looping_p(void); extern int ITc_webrtc_file_source_set_path_p(void); extern int ITc_media_webrtc_data_channel_get_buffered_amount_p(void); @@ -135,6 +136,7 @@ testcase tc_array[] = { {"ITc_media_webrtc_data_channel_set_unset_close_cb_p",ITc_media_webrtc_data_channel_set_unset_close_cb_p,ITs_webrtc_callback_startup, ITs_webrtc_callback_cleanup}, {"ITc_webrtc_set_unset_track_added_cb_p",ITc_webrtc_set_unset_track_added_cb_p,ITs_webrtc_callback_startup, ITs_webrtc_callback_cleanup}, {"ITc_media_webrtc_start_and_finish_negotiation_p", ITc_media_webrtc_start_and_finish_negotiation_p, NULL, NULL}, + {"ITc_media_webrtc_data_channel_send_and_receive_p", ITc_media_webrtc_data_channel_send_and_receive_p, NULL, NULL}, {"ITc_webrtc_file_source_set_get_looping_p", ITc_webrtc_file_source_set_get_looping_p, ITs_webrtc_startup, ITs_webrtc_cleanup}, {"ITc_webrtc_file_source_set_path_p", ITc_webrtc_file_source_set_path_p, ITs_webrtc_startup, ITs_webrtc_cleanup}, {"ITc_media_webrtc_data_channel_get_buffered_amount_p", ITc_media_webrtc_data_channel_get_buffered_amount_p, ITs_webrtc_startup, ITs_webrtc_cleanup }, diff --git a/src/itc/webrtc/tct-webrtc-native_tv.h b/src/itc/webrtc/tct-webrtc-native_tv.h index 11ccd592c..dafe19b1c 100644 --- a/src/itc/webrtc/tct-webrtc-native_tv.h +++ b/src/itc/webrtc/tct-webrtc-native_tv.h @@ -76,6 +76,7 @@ extern int ITc_media_webrtc_set_get_display_mode_p(void); extern int ITc_media_webrtc_set_get_display_visible_p(void); extern int ITc_media_webrtc_set_get_ice_transport_policy_p(void); extern int ITc_media_webrtc_start_and_finish_negotiation_p(void); +extern int ITc_media_webrtc_data_channel_send_and_receive_p(void); extern int ITc_webrtc_file_source_set_get_looping_p(void); extern int ITc_webrtc_file_source_set_path_p(void); extern int ITc_media_webrtc_data_channel_get_buffered_amount_p(void); @@ -135,6 +136,7 @@ testcase tc_array[] = { {"ITc_media_webrtc_data_channel_set_unset_close_cb_p",ITc_media_webrtc_data_channel_set_unset_close_cb_p,ITs_webrtc_callback_startup, ITs_webrtc_callback_cleanup}, {"ITc_webrtc_set_unset_track_added_cb_p",ITc_webrtc_set_unset_track_added_cb_p,ITs_webrtc_callback_startup, ITs_webrtc_callback_cleanup}, {"ITc_media_webrtc_start_and_finish_negotiation_p", ITc_media_webrtc_start_and_finish_negotiation_p, NULL, NULL}, + {"ITc_media_webrtc_data_channel_send_and_receive_p", ITc_media_webrtc_data_channel_send_and_receive_p, NULL, NULL}, {"ITc_webrtc_file_source_set_get_looping_p", ITc_webrtc_file_source_set_get_looping_p, ITs_webrtc_startup, ITs_webrtc_cleanup}, {"ITc_webrtc_file_source_set_path_p", ITc_webrtc_file_source_set_path_p, ITs_webrtc_startup, ITs_webrtc_cleanup}, {"ITc_media_webrtc_data_channel_get_buffered_amount_p", ITc_media_webrtc_data_channel_get_buffered_amount_p, ITs_webrtc_startup, ITs_webrtc_cleanup }, diff --git a/src/itc/webrtc/tct-webrtc-native_wearable.h b/src/itc/webrtc/tct-webrtc-native_wearable.h index 11ccd592c..dafe19b1c 100644 --- a/src/itc/webrtc/tct-webrtc-native_wearable.h +++ b/src/itc/webrtc/tct-webrtc-native_wearable.h @@ -76,6 +76,7 @@ extern int ITc_media_webrtc_set_get_display_mode_p(void); extern int ITc_media_webrtc_set_get_display_visible_p(void); extern int ITc_media_webrtc_set_get_ice_transport_policy_p(void); extern int ITc_media_webrtc_start_and_finish_negotiation_p(void); +extern int ITc_media_webrtc_data_channel_send_and_receive_p(void); extern int ITc_webrtc_file_source_set_get_looping_p(void); extern int ITc_webrtc_file_source_set_path_p(void); extern int ITc_media_webrtc_data_channel_get_buffered_amount_p(void); @@ -135,6 +136,7 @@ testcase tc_array[] = { {"ITc_media_webrtc_data_channel_set_unset_close_cb_p",ITc_media_webrtc_data_channel_set_unset_close_cb_p,ITs_webrtc_callback_startup, ITs_webrtc_callback_cleanup}, {"ITc_webrtc_set_unset_track_added_cb_p",ITc_webrtc_set_unset_track_added_cb_p,ITs_webrtc_callback_startup, ITs_webrtc_callback_cleanup}, {"ITc_media_webrtc_start_and_finish_negotiation_p", ITc_media_webrtc_start_and_finish_negotiation_p, NULL, NULL}, + {"ITc_media_webrtc_data_channel_send_and_receive_p", ITc_media_webrtc_data_channel_send_and_receive_p, NULL, NULL}, {"ITc_webrtc_file_source_set_get_looping_p", ITc_webrtc_file_source_set_get_looping_p, ITs_webrtc_startup, ITs_webrtc_cleanup}, {"ITc_webrtc_file_source_set_path_p", ITc_webrtc_file_source_set_path_p, ITs_webrtc_startup, ITs_webrtc_cleanup}, {"ITc_media_webrtc_data_channel_get_buffered_amount_p", ITc_media_webrtc_data_channel_get_buffered_amount_p, ITs_webrtc_startup, ITs_webrtc_cleanup },