From: Nibha Sharma Date: Mon, 14 Jun 2021 12:17:20 +0000 (+0530) Subject: [ITC][capi-network-ua][NonACR][Testcase restructuring and modification] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b1af7cd27227669dc5c8153d60af1b587020c13;p=test%2Ftct%2Fnative%2Fapi.git [ITC][capi-network-ua][NonACR][Testcase restructuring and modification] Change-Id: I3c75e37d19ff812c7e61a92465f663d7eb040908 Signed-off-by: Nibha Sharma --- diff --git a/src/itc/capi-network-ua/ITs-capi-network-ua-common.h b/src/itc/capi-network-ua/ITs-capi-network-ua-common.h index 251afbc5c..69a0abdeb 100755 --- a/src/itc/capi-network-ua/ITs-capi-network-ua-common.h +++ b/src/itc/capi-network-ua/ITs-capi-network-ua-common.h @@ -30,6 +30,9 @@ * @{ */ //Add global variables here +ua_monitor_h g_hMonitor; +ua_user_h g_hUser; +ua_service_h g_hService; bool g_bUaInit; bool g_bIsUaFeatureSupported; ua_service_h g_hService; diff --git a/src/itc/capi-network-ua/ITs-capi-network-ua-device.c b/src/itc/capi-network-ua/ITs-capi-network-ua-device.c index 94de519b6..57b14b938 100755 --- a/src/itc/capi-network-ua/ITs-capi-network-ua-device.c +++ b/src/itc/capi-network-ua/ITs-capi-network-ua-device.c @@ -133,23 +133,23 @@ int ITc_capi_network_ua_device_create_destroy_p(void) return 0; } -//& purpose: Gets device type info, device's MAC address, device ID from the device. +//& purpose: Gets device type info. //& type: auto /** -* @testcase ITc_capi_network_ua_device_get_mac_type_address_device_id_p +* @testcase ITc_capi_network_ua_device_get_mac_type_p * @since_tizen 6.5 * @author SRID(manu.tiwari) * @reviewer SRID(shobhit.v) * @type auto -* @description Gets device type info, device's MAC address, device ID from the device. -* @scenario Gets device type info, device's MAC address, device ID from the device. -* @apicovered ua_device_get_mac_type, ua_device_get_mac_address, ua_device_get_device_id -* @passcase If ua_device_get_mac_type, ua_device_get_mac_address, ua_device_get_device_id is successfull -* @failcase If ua_device_get_mac_type, ua_device_get_mac_address, ua_device_get_device_id fails +* @description Gets device type info. +* @scenario Gets device type info. +* @apicovered ua_device_get_mac_type +* @passcase If ua_device_get_mac_type is successfull +* @failcase If ua_device_get_mac_type fails * @precondition call ua_device_create API * @postcondition call ua_device_destroy API */ -int ITc_capi_network_ua_device_get_mac_type_address_device_id_p(void) +int ITc_capi_network_ua_device_get_mac_type_p(void) { START_TEST; @@ -157,8 +157,6 @@ int ITc_capi_network_ua_device_get_mac_type_address_device_id_p(void) ua_device_h hDevice = NULL; char pszMacAddrStr[] = {"30:AB:6A:09:1B:4C"}; char pszDeviceIdStr[] = {"18:54:CF:06:37:FE"}; - char *pszMac = NULL; - char *pszDeviceId = NULL; ua_mac_type_e eMacType = UA_MAC_TYPE_INVALID; int nEnumCounter1 = 0; for ( nEnumCounter1 = 0; nEnumCounter1 < g_nEnumSize1; nEnumCounter1++) @@ -172,11 +170,93 @@ int ITc_capi_network_ua_device_get_mac_type_address_device_id_p(void) PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_device_get_mac_type", UaGetError(nRet), ua_device_destroy(hDevice)); PRINT_RESULT_CLEANUP(g_eMacType[nEnumCounter1], eMacType, "ua_device_get_mac_type", "get value is wrong", ua_device_destroy(hDevice)); + nRet = ua_device_destroy(hDevice); + PRINT_RESULT_NORETURN(UA_ERROR_NONE, nRet, "ua_device_destroy", UaGetError(nRet)); + } + return 0; +} + +//& purpose: Gets device's MAC address. +//& type: auto +/** +* @testcase ITc_capi_network_ua_device_get_mac_type_address_device_id_p +* @since_tizen 6.5 +* @author SRID(manu.tiwari) +* @reviewer SRID(shobhit.v) +* @type auto +* @description Gets device's MAC address. +* @scenario Gets device's MAC address. +* @apicovered ua_device_get_mac_address +* @passcase If ua_device_get_mac_address is successfull +* @failcase If ua_device_get_mac_address fails +* @precondition call ua_device_create API +* @postcondition call ua_device_destroy API +*/ +int ITc_capi_network_ua_device_get_mac_address_p(void) +{ + START_TEST; + + int nRet = UA_ERROR_NONE; + ua_device_h hDevice = NULL; + char pszMacAddrStr[] = {"30:AB:6A:09:1B:4C"}; + char pszDeviceIdStr[] = {"18:54:CF:06:37:FE"}; + char *pszMac = NULL; + char *pszDeviceId = NULL; + ua_mac_type_e eMacType = UA_MAC_TYPE_INVALID; + int nEnumCounter1 = 0; + for ( nEnumCounter1 = 0; nEnumCounter1 < g_nEnumSize1; nEnumCounter1++) + { + FPRINTF("[Line : %d][%s] Device:[%s]\\n", __LINE__, API_NAMESPACE, UaGetEnumMacTypeString(g_eMacType[nEnumCounter1])); + nRet = ua_device_create(g_eMacType[nEnumCounter1], pszMacAddrStr, pszDeviceIdStr, &hDevice); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_device_create", UaGetError(nRet)); + CHECK_HANDLE(hDevice, "ua_device_create"); + //Target API nRet = ua_device_get_mac_address(hDevice, &pszMac); PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_device_get_mac_address", UaGetError(nRet), ua_device_destroy(hDevice)); CHECK_HANDLE_CLEANUP(pszMac, "ua_device_get_mac_address", ua_device_destroy(hDevice)); FREE_MEMORY(pszMac); + + nRet = ua_device_destroy(hDevice); + PRINT_RESULT_NORETURN(UA_ERROR_NONE, nRet, "ua_device_destroy", UaGetError(nRet)); + } + return 0; +} + +//& purpose: Gets device ID from the device. +//& type: auto +/** +* @testcase ITc_capi_network_ua_device_get_device_id_p +* @since_tizen 6.5 +* @author SRID(manu.tiwari) +* @reviewer SRID(shobhit.v) +* @type auto +* @description Gets device ID from the device. +* @scenario Gets device ID from the device. +* @apicovered ua_device_get_device_id +* @passcase If ua_device_get_device_id is successfull +* @failcase If ua_device_get_device_id fails +* @precondition call ua_device_create API +* @postcondition call ua_device_destroy API +*/ +int ITc_capi_network_ua_device_get_device_id_p(void) +{ + START_TEST; + + int nRet = UA_ERROR_NONE; + ua_device_h hDevice = NULL; + char pszMacAddrStr[] = {"30:AB:6A:09:1B:4C"}; + char pszDeviceIdStr[] = {"18:54:CF:06:37:FE"}; + char *pszDeviceId = NULL; + ua_mac_type_e eMacType = UA_MAC_TYPE_INVALID; + int nEnumCounter1 = 0; + for ( nEnumCounter1 = 0; nEnumCounter1 < g_nEnumSize1; nEnumCounter1++) + { + FPRINTF("[Line : %d][%s] Device:[%s]\\n", __LINE__, API_NAMESPACE, UaGetEnumMacTypeString(g_eMacType[nEnumCounter1])); + nRet = ua_device_create(g_eMacType[nEnumCounter1], pszMacAddrStr, pszDeviceIdStr, &hDevice); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_device_create", UaGetError(nRet)); + CHECK_HANDLE(hDevice, "ua_device_create"); + //Target API nRet = ua_device_get_device_id(hDevice, &pszDeviceId); PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_device_get_device_id", UaGetError(nRet), ua_device_destroy(hDevice)); @@ -188,6 +268,7 @@ int ITc_capi_network_ua_device_get_mac_type_address_device_id_p(void) } return 0; } + //& purpose: Sets and Gets device's operating system info //& type: auto /** @@ -374,28 +455,23 @@ int ITc_capi_network_ua_device_get_last_presence_p(void) return 0; } -//& purpose: Gets whether pairing is required for the user device, Gets device handle by MAC address, -//Gets device handle by device ID. +//& purpose: Gets whether pairing is required for the user device //& type: auto /** -* @testcase ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p +* @testcase ITc_capi_network_ua_device_get_pairing_required_p * @since_tizen 6.5 * @author SRID(manu.tiwari) * @reviewer SRID(shobhit.v) * @type auto * @description Gets whether pairing is required for the user device - Gets device handle by MAC address - Gets device handle by device ID * @scenario Gets whether pairing is required for the user device - Gets device handle by MAC address - Gets device handle by device ID -* @apicovered ua_device_get_pairing_required, ua_device_get_by_mac_address, ua_device_get_by_device_id -* @passcase If ua_device_get_pairing_required, ua_device_get_by_mac_address, ua_device_get_by_device_id is successfull -* @failcase If ua_device_get_pairing_required, ua_device_get_by_mac_address, ua_device_get_by_device_id fails +* @apicovered ua_device_get_pairing_required +* @passcase If ua_device_get_pairing_required is successfull +* @failcase If ua_device_get_pairing_required fails * @precondition call ua_device_create API * @postcondition call ua_device_destroy API */ -int ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p(void) +int ITc_capi_network_ua_device_get_pairing_required_p(void) { START_TEST; @@ -404,8 +480,6 @@ int ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p(vo char pszMacAddrStr[] = {"30:AB:6A:09:1B:4C"}; char pszDeviceIdStr[] = {"18:54:CF:06:37:FE"}; bool bRequired = false; - ua_device_h hGetDevice = NULL; - ua_mac_type_e eMacType = UA_MAC_TYPE_INVALID; int nEnumCounter1 = 0; for ( nEnumCounter1 = 0; nEnumCounter1 < g_nEnumSize1; nEnumCounter1++) { @@ -418,11 +492,96 @@ int ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p(vo PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_device_get_pairing_required", UaGetError(nRet), ua_device_destroy(hDevice)); PRINT_RESULT_CLEANUP(true, bRequired, "ua_device_get_pairing_required", "pairing required returning wrong value", ua_device_destroy(hDevice)); + nRet = ua_device_destroy(hDevice); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_device_destroy", UaGetError(nRet)); + } + return 0; +} + +//& purpose: Gets device handle by MAC address +//& type: auto +/** +* @testcase ITc_capi_network_ua_device_get_by_mac_address_p +* @since_tizen 6.5 +* @author SRID(manu.tiwari) +* @reviewer SRID(shobhit.v) +* @type auto +* @description Gets device handle by MAC address +* @scenario Gets device handle by MAC address +* @apicovered ua_device_get_by_mac_address +* @passcase If ua_device_get_by_mac_address is successfull +* @failcase If ua_device_get_by_mac_address fails +* @precondition call ua_device_create API +* @postcondition call ua_device_destroy API +*/ +int ITc_capi_network_ua_device_get_by_mac_address_p(void) +{ + START_TEST; + + int nRet = UA_ERROR_NONE; + ua_device_h hDevice = NULL; + char pszMacAddrStr[] = {"30:AB:6A:09:1B:4C"}; + char pszDeviceIdStr[] = {"18:54:CF:06:37:FE"}; + bool bRequired = false; + ua_device_h hGetDevice = NULL; + int nEnumCounter1 = 0; + for ( nEnumCounter1 = 0; nEnumCounter1 < g_nEnumSize1; nEnumCounter1++) + { + FPRINTF("[Line : %d][%s] Device:[%s]\\n", __LINE__, API_NAMESPACE, UaGetEnumMacTypeString(g_eMacType[nEnumCounter1])); + nRet = ua_device_create(g_eMacType[nEnumCounter1], pszMacAddrStr, pszDeviceIdStr, &hDevice); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_device_create", UaGetError(nRet)); + CHECK_HANDLE(hDevice, "ua_device_create"); + //Target API nRet = ua_device_get_by_mac_address(pszMacAddrStr, &hGetDevice); PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_device_get_by_mac_address", UaGetError(nRet), ua_device_destroy(hDevice)); CHECK_HANDLE_CLEANUP(hGetDevice, "ua_device_get_by_mac_address", ua_device_destroy(hDevice)); + nRet = ua_device_destroy(hDevice); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_device_destroy", UaGetError(nRet)); + } + return 0; +} + +//& purpose: Gets device handle by device ID. +//& type: auto +/** +* @testcase ITc_capi_network_ua_device_get_by_device_id_p +* @since_tizen 6.5 +* @author SRID(manu.tiwari) +* @reviewer SRID(shobhit.v) +* @type auto +* @description Gets device handle by device ID +* @scenario Gets device handle by device ID +* @apicovered ua_device_get_by_device_id +* @passcase If ua_device_get_by_device_id is successfull +* @failcase If ua_device_get_by_device_id fails +* @precondition call ua_device_create API +* @postcondition call ua_device_destroy API +*/ +int ITc_capi_network_ua_device_get_by_device_id_p(void) +{ + START_TEST; + + int nRet = UA_ERROR_NONE; + ua_device_h hDevice = NULL; + char pszMacAddrStr[] = {"30:AB:6A:09:1B:4C"}; + char pszDeviceIdStr[] = {"18:54:CF:06:37:FE"}; + bool bRequired = false; + ua_device_h hGetDevice = NULL; + ua_mac_type_e eMacType = UA_MAC_TYPE_INVALID; + int nEnumCounter1 = 0; + for ( nEnumCounter1 = 0; nEnumCounter1 < g_nEnumSize1; nEnumCounter1++) + { + FPRINTF("[Line : %d][%s] Device:[%s]\\n", __LINE__, API_NAMESPACE, UaGetEnumMacTypeString(g_eMacType[nEnumCounter1])); + nRet = ua_device_create(g_eMacType[nEnumCounter1], pszMacAddrStr, pszDeviceIdStr, &hDevice); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_device_create", UaGetError(nRet)); + CHECK_HANDLE(hDevice, "ua_device_create"); + + nRet = ua_device_get_by_mac_address(pszMacAddrStr, &hGetDevice); + PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_device_get_by_mac_address", UaGetError(nRet), ua_device_destroy(hDevice)); + CHECK_HANDLE_CLEANUP(hGetDevice, "ua_device_get_by_mac_address", ua_device_destroy(hDevice)); + //Target API nRet = ua_device_get_by_device_id(pszDeviceIdStr, g_eMacType[nEnumCounter1], &hGetDevice); PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_device_get_by_device_id", UaGetError(nRet), ua_device_destroy(hDevice)); diff --git a/src/itc/capi-network-ua/ITs-capi-network-ua-monitor.c b/src/itc/capi-network-ua/ITs-capi-network-ua-monitor.c index 83d67b9ab..27f741a54 100755 --- a/src/itc/capi-network-ua/ITs-capi-network-ua-monitor.c +++ b/src/itc/capi-network-ua/ITs-capi-network-ua-monitor.c @@ -47,6 +47,7 @@ void ITs_capi_network_ua_monitor_startup(void) { g_bUaInit = false; g_bIsUaFeatureSupported = false; + g_hMonitor = NULL; struct stat stBuff; if ( stat(ERR_LOG, &stBuff) == 0 ) @@ -70,13 +71,27 @@ void ITs_capi_network_ua_monitor_startup(void) g_bUaInit = true; return; } - else if (nRet == UA_ERROR_NONE || nRet == UA_ERROR_ALREADY_DONE) - g_bUaInit = true; - else + else if (nRet != UA_ERROR_NONE && nRet != UA_ERROR_ALREADY_DONE) { FPRINTF("[%s:%d] ua_initialize failed, error returned =(%d)\\n", __FILE__, __LINE__, nRet); g_bUaInit = false; + return; + } + + nRet = ua_monitor_create(&g_hMonitor); + if (nRet != UA_ERROR_NONE ) + { + FPRINTF("[%s:%d] ua_monitor_create fail\\n", __FILE__, __LINE__); + g_bUaInit = false; + return; + } + if(g_hMonitor == NULL) + { + FPRINTF("[%s:%d] g_hMonitor handle is NULL\\n", __FILE__, __LINE__); + g_bUaInit = false; + return; } + g_bUaInit = true; } @@ -92,6 +107,14 @@ void ITs_capi_network_ua_monitor_cleanup(void) if (g_bIsUaFeatureSupported && g_bUaInit) { + if(g_hMonitor) + { + nRet = ua_monitor_destroy(g_hMonitor); + if ( nRet != UA_ERROR_NONE ) + { + FPRINTF("[%s:%d] ua_monitor_destroy failed, error returned =(%d)\\n", __FILE__, __LINE__, nRet); + } + } nRet = ua_deinitialize(); if ( nRet != UA_ERROR_NONE ) { @@ -251,16 +274,15 @@ int ITc_capi_network_ua_monitor_create_destroy_p(void) START_TEST; int nRet = UA_ERROR_NONE; - ua_monitor_h hMonitor = NULL; //Target API - nRet = ua_monitor_create(&hMonitor); - PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_create", UaGetError(nRet)); - CHECK_HANDLE(hMonitor, "ua_monitor_create"); + nRet = ua_monitor_destroy(g_hMonitor); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_destroy", UaGetError(nRet)); //Target API - nRet = ua_monitor_destroy(hMonitor); - PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_destroy", UaGetError(nRet)); + nRet = ua_monitor_create(&g_hMonitor); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_create", UaGetError(nRet)); + CHECK_HANDLE(g_hMonitor, "ua_monitor_create"); return 0; } @@ -285,34 +307,27 @@ int ITc_capi_network_ua_monitor_add_remove_sensor_p(void) START_TEST; int nRet = UA_ERROR_NONE; - ua_monitor_h hMonitor = NULL; bool bAvail = false; int nEnumCounter1 = 0; - nRet = ua_monitor_create(&hMonitor); - PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_create", UaGetError(nRet)); - CHECK_HANDLE(hMonitor, "ua_monitor_create"); - for ( nEnumCounter1 = 0; nEnumCounter1 < g_nEnumSize; nEnumCounter1++) { bAvail = false; //precondition API nRet = ua_monitor_is_sensor_available(g_eSensorType[nEnumCounter1], &bAvail); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_is_sensor_available", UaGetError(nRet), ua_monitor_destroy(hMonitor)); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_is_sensor_available", UaGetError(nRet)); if(bAvail == true) { //Target API - nRet = ua_monitor_add_sensor(hMonitor, g_eSensorType[nEnumCounter1]); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_add_sensor", UaGetError(nRet), ua_monitor_destroy(hMonitor)); + nRet = ua_monitor_add_sensor(g_hMonitor, g_eSensorType[nEnumCounter1]); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_add_sensor", UaGetError(nRet)); //Target API - nRet = ua_monitor_remove_sensor(hMonitor, g_eSensorType[nEnumCounter1]); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_remove_sensor", UaGetError(nRet), ua_monitor_destroy(hMonitor)); + nRet = ua_monitor_remove_sensor(g_hMonitor, g_eSensorType[nEnumCounter1]); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_remove_sensor", UaGetError(nRet)); } else FPRINTF("[Line : %d][%s] sensor [%s] is not available\\n", __LINE__, API_NAMESPACE, UaGetEnumSensorString(g_eSensorType[nEnumCounter1])); } - nRet = ua_monitor_destroy(hMonitor); - PRINT_RESULT_NORETURN(UA_ERROR_NONE, nRet, "ua_monitor_destroy", UaGetError(nRet)); return 0; } @@ -342,33 +357,27 @@ int ITc_capi_network_ua_monitor_foreach_sensor_p(void) bool bAvail = false; int nEnumCounter1 = 0; - nRet = ua_monitor_create(&hMonitor); - PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_create", UaGetError(nRet)); - CHECK_HANDLE(hMonitor, "ua_monitor_create"); - for ( nEnumCounter1 = 0; nEnumCounter1 < g_nEnumSize; nEnumCounter1++) { bAvail = false; //precondition API nRet = ua_monitor_is_sensor_available(g_eSensorType[nEnumCounter1], &bAvail); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_is_sensor_available", UaGetError(nRet), ua_monitor_destroy(hMonitor)); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_is_sensor_available", UaGetError(nRet)); if(bAvail == true) { - nRet = ua_monitor_add_sensor(hMonitor, g_eSensorType[nEnumCounter1]); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_add_sensor", UaGetError(nRet), ua_monitor_destroy(hMonitor)); + nRet = ua_monitor_add_sensor(g_hMonitor, g_eSensorType[nEnumCounter1]); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_add_sensor", UaGetError(nRet)); //Target API - nRet = ua_monitor_foreach_sensor(hMonitor, CapiNetworkUaMonitorForeachSensorCallBack, NULL); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_foreach_sensor", UaGetError(nRet), ua_monitor_remove_sensor(hMonitor, g_eSensorType[nEnumCounter1]); ua_monitor_destroy(hMonitor)); - PRINT_RESULT_CLEANUP(true, g_bCallBackHit, "ua_monitor_foreach_sensor", "CallBack Not Invoked", ua_monitor_remove_sensor(hMonitor, g_eSensorType[nEnumCounter1]); ua_monitor_destroy(hMonitor)); + nRet = ua_monitor_foreach_sensor(g_hMonitor, CapiNetworkUaMonitorForeachSensorCallBack, NULL); + PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_foreach_sensor", UaGetError(nRet), ua_monitor_remove_sensor(g_hMonitor, g_eSensorType[nEnumCounter1])); + PRINT_RESULT_CLEANUP(true, g_bCallBackHit, "ua_monitor_foreach_sensor", "CallBack Not Invoked", ua_monitor_remove_sensor(g_hMonitor, g_eSensorType[nEnumCounter1])); - nRet = ua_monitor_remove_sensor(hMonitor, g_eSensorType[nEnumCounter1]); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_remove_sensor", UaGetError(nRet), ua_monitor_destroy(hMonitor)); + nRet = ua_monitor_remove_sensor(g_hMonitor, g_eSensorType[nEnumCounter1]); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_remove_sensor", UaGetError(nRet)); } else FPRINTF("[Line : %d][%s] sensor is not available\\n", __LINE__, API_NAMESPACE); } - nRet = ua_monitor_destroy(hMonitor); - PRINT_RESULT_NORETURN(UA_ERROR_NONE, nRet, "ua_monitor_destroy", UaGetError(nRet)); return 0; } @@ -393,20 +402,15 @@ int ITc_capi_network_ua_monitor_is_sensor_available_p(void) START_TEST; int nRet = UA_ERROR_NONE; - ua_monitor_h hMonitor = NULL; bool bAvail = false; int nEnumCounter1 = 0; - nRet = ua_monitor_create(&hMonitor); - PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_create", UaGetError(nRet)); - CHECK_HANDLE(hMonitor, "ua_monitor_create"); - for ( nEnumCounter1 = 0; nEnumCounter1 < g_nEnumSize; nEnumCounter1++) { bAvail = false; //Target API nRet = ua_monitor_is_sensor_available(g_eSensorType[nEnumCounter1], &bAvail); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_is_sensor_available", UaGetError(nRet), ua_monitor_destroy(hMonitor)); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_is_sensor_available", UaGetError(nRet)); if(bAvail == true) { FPRINTF("[Line : %d][%s] [%s]sensor is available\\n", __LINE__, API_NAMESPACE, UaGetEnumSensorString(g_eSensorType[nEnumCounter1])); @@ -415,9 +419,6 @@ int ITc_capi_network_ua_monitor_is_sensor_available_p(void) FPRINTF("[Line : %d][%s] sensor [%s] is not available\\n", __LINE__, API_NAMESPACE, UaGetEnumSensorString(g_eSensorType[nEnumCounter1])); } - nRet = ua_monitor_destroy(hMonitor); - PRINT_RESULT_NORETURN(UA_ERROR_NONE, nRet, "ua_monitor_destroy", UaGetError(nRet)); - return 0; } //& purpose: Sets and unsets sensor status changed callback @@ -445,19 +446,12 @@ int ITc_capi_network_ua_monitor_set_unset_sensor_status_changed_cb_p(void) int nRet = UA_ERROR_NONE; ua_monitor_h hMonitor = NULL; - nRet = ua_monitor_create(&hMonitor); - PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_create", UaGetError(nRet)); - CHECK_HANDLE(hMonitor, "ua_monitor_create"); - //Target API - nRet = ua_monitor_set_sensor_status_changed_cb(hMonitor, CapiNetworkUaMonitorSensorStatusChangedCallback, NULL); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_set_sensor_status_changed_cb", UaGetError(nRet), ua_monitor_destroy(hMonitor)); + nRet = ua_monitor_set_sensor_status_changed_cb(g_hMonitor, CapiNetworkUaMonitorSensorStatusChangedCallback, NULL); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_set_sensor_status_changed_cb", UaGetError(nRet)); //Target API - nRet = ua_monitor_unset_sensor_status_changed_cb(hMonitor); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_unset_sensor_status_changed_cb", UaGetError(nRet), ua_monitor_destroy(hMonitor)); - - nRet = ua_monitor_destroy(hMonitor); - PRINT_RESULT_NORETURN(UA_ERROR_NONE, nRet, "ua_monitor_destroy", UaGetError(nRet)); + nRet = ua_monitor_unset_sensor_status_changed_cb(g_hMonitor); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_unset_sensor_status_changed_cb", UaGetError(nRet)); return 0; } @@ -482,40 +476,33 @@ int ITc_capi_network_ua_monitor_start_stop_scan_p(void) START_TEST; int nRet = UA_ERROR_NONE; - ua_monitor_h hMonitor = NULL; int hScanTimeMultiplier = 4; bool bAvail = false; int nEnumCounter1 = 0; - nRet = ua_monitor_create(&hMonitor); - PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_create", UaGetError(nRet)); - CHECK_HANDLE(hMonitor, "ua_monitor_create"); - for ( nEnumCounter1 = 0; nEnumCounter1 < g_nEnumSize; nEnumCounter1++) { bAvail = false; //precondition API nRet = ua_monitor_is_sensor_available(g_eSensorType[nEnumCounter1], &bAvail); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_is_sensor_available", UaGetError(nRet), ua_monitor_destroy(hMonitor)); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_is_sensor_available", UaGetError(nRet)); if(bAvail == true) { - nRet = ua_monitor_add_sensor(hMonitor, g_eSensorType[nEnumCounter1]); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_add_sensor", UaGetError(nRet), ua_monitor_destroy(hMonitor)); + nRet = ua_monitor_add_sensor(g_hMonitor, g_eSensorType[nEnumCounter1]); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_add_sensor", UaGetError(nRet)); //Target API - nRet = ua_monitor_start_scan(hMonitor, hScanTimeMultiplier, CapiNetworkUaMonitorScanCompletedCallback, NULL); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_start_scan", UaGetError(nRet), ua_monitor_remove_sensor(hMonitor, g_eSensorType[nEnumCounter1]); ua_monitor_destroy(hMonitor)); + nRet = ua_monitor_start_scan(g_hMonitor, hScanTimeMultiplier, CapiNetworkUaMonitorScanCompletedCallback, NULL); + PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_start_scan", UaGetError(nRet), ua_monitor_remove_sensor(g_hMonitor, g_eSensorType[nEnumCounter1])); //Target API - nRet = ua_monitor_stop_scan(hMonitor); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_stop_scan", UaGetError(nRet), ua_monitor_remove_sensor(hMonitor, g_eSensorType[nEnumCounter1]); ua_monitor_destroy(hMonitor)); + nRet = ua_monitor_stop_scan(g_hMonitor); + PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_stop_scan", UaGetError(nRet), ua_monitor_remove_sensor(g_hMonitor, g_eSensorType[nEnumCounter1])); - nRet = ua_monitor_remove_sensor(hMonitor, g_eSensorType[nEnumCounter1]); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_monitor_remove_sensor", UaGetError(nRet), ua_monitor_destroy(hMonitor)); + nRet = ua_monitor_remove_sensor(g_hMonitor, g_eSensorType[nEnumCounter1]); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_monitor_remove_sensor", UaGetError(nRet)); } else FPRINTF("[Line : %d][%s] sensor [%s] is not available\\n", __LINE__, API_NAMESPACE, UaGetEnumSensorString(g_eSensorType[nEnumCounter1])); } - nRet = ua_monitor_destroy(hMonitor); - PRINT_RESULT_NORETURN(UA_ERROR_NONE, nRet, "ua_monitor_destroy", UaGetError(nRet)); return 0; } diff --git a/src/itc/capi-network-ua/ITs-capi-network-ua-service.c b/src/itc/capi-network-ua/ITs-capi-network-ua-service.c index 6770e7977..ac36e159a 100755 --- a/src/itc/capi-network-ua/ITs-capi-network-ua-service.c +++ b/src/itc/capi-network-ua/ITs-capi-network-ua-service.c @@ -32,6 +32,7 @@ void ITs_capi_network_ua_service_startup(void) { g_bUaInit = false; g_bIsUaFeatureSupported = false; + g_hService = NULL; struct stat stBuff; if ( stat(ERR_LOG, &stBuff) == 0 ) @@ -55,13 +56,25 @@ void ITs_capi_network_ua_service_startup(void) g_bUaInit = true; return; } - else if (nRet == UA_ERROR_NONE || nRet == UA_ERROR_ALREADY_DONE) - g_bUaInit = true; - else + else if (nRet != UA_ERROR_NONE && nRet != UA_ERROR_ALREADY_DONE) { FPRINTF("[%s:%d] ua_initialize failed, error returned =(%d)\\n", __FILE__, __LINE__, nRet); g_bUaInit = false; + return; + } + nRet = ua_service_create(g_hServiceStr, &g_hService); + if ( nRet != UA_ERROR_NONE ) + { + FPRINTF("[%s:%d] ua_service_create fail , error returned = (%d)\\n", __FILE__, __LINE__,nRet); + g_bUaInit = false; + return; + } + if(g_hService == NULL) + { + g_bUaInit = false; + return; } + g_bUaInit = true; } @@ -77,6 +90,14 @@ void ITs_capi_network_ua_service_cleanup(void) if (g_bIsUaFeatureSupported && g_bUaInit) { + if(g_hService) + { + nRet = ua_service_destroy(g_hService); + if ( nRet != UA_ERROR_NONE ) + { + FPRINTF("[%s:%d] ua_service_destroy failed, error returned =(%d)\\n", __FILE__, __LINE__, nRet); + } + } nRet = ua_deinitialize(); if ( nRet != UA_ERROR_NONE ) { @@ -106,56 +127,81 @@ static bool CapiNetworkUaServiceForeachAddedUserCallBack( ua_service_h service_h { return true; } -//& purpose: Creates, Adds, Removes and Destroys the service handle +//& purpose: Creates and Destroys the service handle //& type: auto /** -* @testcase ITc_capi_network_ua_service_create_add_remove_destroy_p +* @testcase ITc_capi_network_ua_service_create_destroy_p * @since_tizen 6.5 * @author SRID(manu.tiwari) * @reviewer SRID(shobhit.v) * @type auto -* @description Creates, Adds, Removes and Destroys the service handle. -* @scenario Creates, Adds, Removes and Destroys the service handle. -* @apicovered ua_service_create,ua_service_add,ua_service_remove,ua_service_destroy -* @passcase If ua_service_create,ua_service_add,ua_service_remove,ua_service_destroy is successfull -* @failcase If ua_service_create,ua_service_add,ua_service_remove,ua_service_destroy fails +* @description Creates and Destroys the service handle. +* @scenario Creates and Destroys the service handle. +* @apicovered ua_service_create,ua_service_destroy +* @passcase If ua_service_create,ua_service_destroy is successfull +* @failcase If ua_service_create,ua_service_destroy fails * @precondition NA * @postcondition NA */ -int ITc_capi_network_ua_service_create_add_remove_destroy_p(void) +int ITc_capi_network_ua_service_create_destroy_p(void) { START_TEST; int nRet = UA_ERROR_NONE; - ua_service_h hService = NULL; //Target API - nRet = ua_service_create(g_hServiceStr, &hService); + nRet = ua_service_destroy(g_hService); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_service_destroy", UaGetError(nRet)); + + //Target API + nRet = ua_service_create(g_hServiceStr, &g_hService); PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_service_create", UaGetError(nRet)); - CHECK_HANDLE(hService, "ua_service_create"); + CHECK_HANDLE(g_hService, "ua_service_create"); + + return 0; +} + + +//& purpose: Adds and Removes the service handle +//& type: auto +/** +* @testcase ITc_capi_network_ua_service_add_remove_p +* @since_tizen 6.5 +* @author SRID(manu.tiwari) +* @reviewer SRID(shobhit.v) +* @type auto +* @description Adds and Removes the service handle. +* @scenario Adds and Removes the service handle. +* @apicovered ua_service_add,ua_service_remove +* @passcase If ua_service_add,ua_service_remove is successfull +* @failcase If ua_service_add,ua_service_remove fails +* @precondition NA +* @postcondition NA +*/ +int ITc_capi_network_ua_service_add_remove_p(void) +{ + START_TEST; + + int nRet = UA_ERROR_NONE; + //Target API - nRet = ua_service_add(hService); + nRet = ua_service_add(g_hService); if (nRet != UA_ERROR_NONE && nRet != UA_ERROR_ALREADY_REGISTERED) { FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "ua_service_add", UaGetError(nRet), nRet); - ua_service_destroy(hService); return 1; } else FPRINTF("[Line : %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, "ua_service_add"); //Target API - nRet = ua_service_remove(hService); + nRet = ua_service_remove(g_hService); if (nRet != UA_ERROR_NONE && nRet != UA_ERROR_NOT_REGISTERED) { FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "ua_service_remove", UaGetError(nRet), nRet); - ua_service_destroy(hService); return 1; } else FPRINTF("[Line : %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, "ua_service_remove"); - //Target API - nRet = ua_service_destroy(hService); - PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_service_destroy", UaGetError(nRet)); return 0; } @@ -298,25 +344,18 @@ int ITc_capi_network_ua_service_get_name_p(void) START_TEST; int nRet = UA_ERROR_NONE; - ua_service_h hService = NULL; char *pszServiceName = NULL; - nRet = ua_service_create(g_hServiceStr, &hService); - PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_service_create", UaGetError(nRet)); - CHECK_HANDLE(hService, "ua_service_create"); //Target API - nRet = ua_service_get_name(hService, &pszServiceName); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_service_get_name", UaGetError(nRet), ua_service_destroy(hService)); + nRet = ua_service_get_name(g_hService, &pszServiceName); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_service_get_name", UaGetError(nRet)); if(strcmp(g_hServiceStr,pszServiceName) != 0) { FPRINTF("[Line : %d][%s] ua_service_get_name, error = service name is not same. service name = %s output service name = %s \\n", __LINE__, API_NAMESPACE, g_hServiceStr, pszServiceName); FREE_MEMORY(pszServiceName); - ua_service_destroy(hService); return 1; } FREE_MEMORY(pszServiceName); - nRet = ua_service_destroy(hService); - PRINT_RESULT_NORETURN(UA_ERROR_NONE, nRet, "ua_service_destroy", UaGetError(nRet)); return 0; } //& purpose: Sets and Gets detection threshold for service handle @@ -346,23 +385,17 @@ int ITc_capi_network_ua_service_set_get_detection_threshold_p(void) unsigned int nGetPresenceThresh = 0; unsigned int nGetAbsenceThresh = 0; - nRet = ua_service_create(g_hServiceStr, &hService); - PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_service_create", UaGetError(nRet)); - CHECK_HANDLE(hService, "ua_service_create"); //Target API - nRet = ua_service_set_detection_threshold(hService, nSetPresenceThresh, nSetAbsenceThresh); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_service_set_detection_threshold", UaGetError(nRet), ua_service_destroy(hService)); + nRet = ua_service_set_detection_threshold(g_hService, nSetPresenceThresh, nSetAbsenceThresh); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_service_set_detection_threshold", UaGetError(nRet)); //Target API - nRet = ua_service_get_detection_threshold(hService, &nGetPresenceThresh, &nGetAbsenceThresh); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_service_get_detection_threshold", UaGetError(nRet), ua_service_destroy(hService)); + nRet = ua_service_get_detection_threshold(g_hService, &nGetPresenceThresh, &nGetAbsenceThresh); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_service_get_detection_threshold", UaGetError(nRet)); if( (nSetPresenceThresh != nGetPresenceThresh) || (nSetAbsenceThresh != nGetAbsenceThresh) ) { FPRINTF("\\n [Line : %d][%s] ua_service_detection_threshold set and get values mismatch\\n", __LINE__, API_NAMESPACE); - ua_service_destroy(hService); return 1; } - nRet = ua_service_destroy(hService); - PRINT_RESULT_NORETURN(UA_ERROR_NONE, nRet, "ua_service_destroy", UaGetError(nRet)); return 0; } @@ -387,19 +420,11 @@ int ITc_capi_network_ua_get_service_by_name_p(void) START_TEST; int nRet = UA_ERROR_NONE; - ua_service_h hService = NULL; - ua_service_h hGetService = NULL; - nRet = ua_service_create(g_hServiceStr, &hService); - PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_service_create", UaGetError(nRet)); - CHECK_HANDLE(hService, "ua_service_create"); //Target API - nRet = ua_get_service_by_name(g_hServiceStr, &hGetService); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_get_service_by_name", UaGetError(nRet), ua_service_destroy(hService)); - CHECK_HANDLE_CLEANUP(hGetService, "ua_get_service_by_name", ua_service_destroy(hService)); - - nRet = ua_service_destroy(hService); - PRINT_RESULT_NORETURN(UA_ERROR_NONE, nRet, "ua_service_destroy", UaGetError(nRet)); + nRet = ua_get_service_by_name(g_hServiceStr, &g_hService); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_get_service_by_name", UaGetError(nRet)); + CHECK_HANDLE(g_hService, "ua_get_service_by_name"); return 0; } diff --git a/src/itc/capi-network-ua/ITs-capi-network-ua-user.c b/src/itc/capi-network-ua/ITs-capi-network-ua-user.c index 08d272578..bb8294230 100755 --- a/src/itc/capi-network-ua/ITs-capi-network-ua-user.c +++ b/src/itc/capi-network-ua/ITs-capi-network-ua-user.c @@ -30,7 +30,9 @@ void ITs_capi_network_ua_user_startup(void) { g_bUaInit = false; + g_hUser = NULL; g_bIsUaFeatureSupported = false; + char pszAccountStr[] = {"default@default.com"}; struct stat stBuff; if ( stat(ERR_LOG, &stBuff) == 0 ) @@ -54,13 +56,26 @@ void ITs_capi_network_ua_user_startup(void) g_bUaInit = true; return; } - else if (nRet == UA_ERROR_NONE || nRet == UA_ERROR_ALREADY_DONE) - g_bUaInit = true; - else + else if (nRet != UA_ERROR_NONE && nRet != UA_ERROR_ALREADY_DONE) { FPRINTF("[%s:%d] ua_initialize failed, error returned =(%d)\\n", __FILE__, __LINE__, nRet); g_bUaInit = false; + return; + } + nRet = ua_user_create(pszAccountStr, &g_hUser); + if ( nRet != UA_ERROR_NONE ) + { + FPRINTF("[%s:%d] ua_user_create failed ,error returned = (%d)\\n", __FILE__, __LINE__,nRet); + g_bUaInit = false; + return; } + if(g_hUser == NULL) + { + FPRINTF("[%s:%d] g_hUser is NULL\\n", __FILE__, __LINE__); + g_bUaInit = false; + return; + } + g_bUaInit = true; } /** @@ -75,6 +90,14 @@ void ITs_capi_network_ua_user_cleanup(void) if (g_bIsUaFeatureSupported && g_bUaInit) { + if(g_hUser) + { + nRet = ua_user_destroy(g_hUser); + if ( nRet != UA_ERROR_NONE ) + { + FPRINTF("[%s:%d] ua_user_destroy fail, error returned =(%d)\\n", __FILE__, __LINE__, nRet); + } + } nRet = ua_deinitialize(); if ( nRet != UA_ERROR_NONE ) { @@ -84,50 +107,74 @@ void ITs_capi_network_ua_user_cleanup(void) return; } -//& purpose: Creates, Adds, Removes and Destroys the user handle. +//& purpose: Creates and Destroys the user handle. //& type: auto /** -* @testcase ITc_capi_network_ua_user_create_add_remove_destroy_p +* @testcase ITc_capi_network_ua_user_create_destroy_p * @since_tizen 6.5 * @author SRID(manu.tiwari) * @reviewer SRID(shobhit.v) * @type auto -* @description Creates, Adds, Removes and Destroys the user handle. -* @scenario Creates, Adds, Removes and Destroys the user handle. -* @apicovered ua_user_create,ua_user_add,ua_user_remove,ua_user_destroy -* @passcase If ua_user_create,ua_user_add,ua_user_remove,ua_user_destroy is successfull -* @failcase If ua_user_create,ua_user_add,ua_user_remove,ua_user_destroy fails +* @description Creates and Destroys the user handle. +* @scenario Creates and Destroys the user handle. +* @apicovered ua_user_create,ua_user_destroy +* @passcase If ua_user_create,ua_user_destroy is successfull +* @failcase If ua_user_create,ua_user_destroy fails * @precondition NA * @postcondition NA */ -int ITc_capi_network_ua_user_create_add_remove_destroy_p(void) +int ITc_capi_network_ua_user_create_destroy_p(void) { START_TEST; - ua_user_h hUser = NULL; char pszAccountStr[] = {"default@default.com"}; //Target API - int nRet = ua_user_create(pszAccountStr, &hUser); + int nRet = ua_user_destroy(g_hUser); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_user_destroy", UaGetError(nRet)); + + //Target API + nRet = ua_user_create(pszAccountStr, &g_hUser); PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_user_create", UaGetError(nRet)); - CHECK_HANDLE(hUser, "ua_user_create"); + CHECK_HANDLE(g_hUser, "ua_user_create"); + + return 0; +} + +//& purpose: Adds, Removes the user handle. +//& type: auto +/** +* @testcase ITc_capi_network_ua_user_add_remove_p +* @since_tizen 6.5 +* @author SRID(manu.tiwari) +* @reviewer SRID(shobhit.v) +* @type auto +* @description Adds, Removes the user handle. +* @scenario Adds, Removes the user handle. +* @apicovered ua_user_add,ua_user_remove +* @passcase If ua_user_add,ua_user_remove is successfull +* @failcase If ua_user_add,ua_user_remove fails +* @precondition NA +* @postcondition NA +*/ +int ITc_capi_network_ua_user_add_remove_p(void) +{ + START_TEST; + //Target API - nRet = ua_user_add(hUser); + int nRet = ua_user_add(g_hUser); if (nRet != UA_ERROR_NONE && nRet != UA_ERROR_ALREADY_REGISTERED) { FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "ua_user_add", UaGetError(nRet), nRet); - ua_user_destroy(hUser); return 1; } //Target API - nRet = ua_user_remove(hUser); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_user_remove", UaGetError(nRet), ua_user_destroy(hUser)); - //Target API - nRet = ua_user_destroy(hUser); - PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_user_destroy", UaGetError(nRet)); + nRet = ua_user_remove(g_hUser); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_user_remove", UaGetError(nRet)); return 0; } + //& purpose: Gets account info for user handle //& type: auto /** @@ -148,21 +195,13 @@ int ITc_capi_network_ua_user_get_account_p(void) { START_TEST; - ua_user_h hUser = NULL; - char pszAccountStr[] = {"default@default.com"}; char *pszAccount = NULL; - int nRet = ua_user_create(pszAccountStr, &hUser); - PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_user_create", UaGetError(nRet)); - CHECK_HANDLE(hUser, "ua_user_create"); //Target API - nRet = ua_user_get_account(hUser, &pszAccount); - PRINT_RESULT_CLEANUP(UA_ERROR_NONE, nRet, "ua_user_get_account", UaGetError(nRet), ua_user_destroy(hUser)); - CHECK_HANDLE_CLEANUP(pszAccount, "ua_user_get_account", ua_user_destroy(hUser)); + int nRet = ua_user_get_account(g_hUser, &pszAccount); + PRINT_RESULT(UA_ERROR_NONE, nRet, "ua_user_get_account", UaGetError(nRet)); + CHECK_HANDLE(pszAccount, "ua_user_get_account"); FREE_MEMORY(pszAccount); - nRet = ua_user_destroy(hUser); - PRINT_RESULT_NORETURN(UA_ERROR_NONE, nRet, "ua_user_destroy", UaGetError(nRet)); - return 0; } \ No newline at end of file diff --git a/src/itc/capi-network-ua/tct-capi-network-ua-native_mobile.h b/src/itc/capi-network-ua/tct-capi-network-ua-native_mobile.h index 84f3335d1..5c3772277 100755 --- a/src/itc/capi-network-ua/tct-capi-network-ua-native_mobile.h +++ b/src/itc/capi-network-ua/tct-capi-network-ua-native_mobile.h @@ -31,7 +31,8 @@ extern void ITs_capi_network_ua_device_cleanup(void); extern void ITs_capi_network_ua_user_startup(void); extern void ITs_capi_network_ua_user_cleanup(void); -extern int ITc_capi_network_ua_service_create_add_remove_destroy_p(void); +extern int ITc_capi_network_ua_service_add_remove_p(void); +extern int ITc_capi_network_ua_service_create_destroy_p(void); extern int ITc_capi_network_ua_get_default_service_p(void); extern int ITc_capi_network_ua_service_update_p(void); extern int ITc_capi_network_ua_service_get_name_p(void); @@ -52,18 +53,24 @@ extern int ITc_capi_network_ua_monitor_start_stop_presence_detection_p(void); extern int ITc_capi_network_ua_monitor_start_stop_absence_detection_p(void); extern int ITc_capi_network_ua_device_create_destroy_p(void); -extern int ITc_capi_network_ua_device_get_mac_type_address_device_id_p(void); +extern int ITc_capi_network_ua_device_get_mac_type_p(void); +extern int ITc_capi_network_ua_device_get_mac_address_p(void); +extern int ITc_capi_network_ua_device_get_device_id_p(void); extern int ITc_capi_network_ua_device_set_get_os_info_p(void); extern int ITc_capi_network_ua_device_set_get_wifi_bssid_p(void); extern int ITc_capi_network_ua_device_set_get_wifi_ipv4_address(void); extern int ITc_capi_network_ua_device_get_last_presence_p(void); -extern int ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p(void); +extern int ITc_capi_network_ua_device_get_pairing_required_p(void); +extern int ITc_capi_network_ua_device_get_by_mac_address_p(void); +extern int ITc_capi_network_ua_device_get_by_device_id_p(void); -extern int ITc_capi_network_ua_user_create_add_remove_destroy_p(void); +extern int ITc_capi_network_ua_user_create_destroy_p(void); +extern int ITc_capi_network_ua_user_add_remove_p(void); extern int ITc_capi_network_ua_user_get_account_p(void); testcase tc_array[] = { - {"ITc_capi_network_ua_service_create_add_remove_destroy_p", ITc_capi_network_ua_service_create_add_remove_destroy_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, + {"ITc_capi_network_ua_service_add_remove_p", ITc_capi_network_ua_service_add_remove_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, + {"ITc_capi_network_ua_service_create_destroy_p", ITc_capi_network_ua_service_create_destroy_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, {"ITc_capi_network_ua_get_default_service_p", ITc_capi_network_ua_get_default_service_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, {"ITc_capi_network_ua_service_update_p", ITc_capi_network_ua_service_update_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, {"ITc_capi_network_ua_service_get_name_p", ITc_capi_network_ua_service_get_name_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, @@ -84,14 +91,19 @@ testcase tc_array[] = { {"ITc_capi_network_ua_monitor_start_stop_absence_detection_p", ITc_capi_network_ua_monitor_start_stop_absence_detection_p, ITs_capi_network_ua_monitor_startup, ITs_capi_network_ua_monitor_cleanup}, {"ITc_capi_network_ua_device_create_destroy_p", ITc_capi_network_ua_device_create_destroy_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, - {"ITc_capi_network_ua_device_get_mac_type_address_device_id_p", ITc_capi_network_ua_device_get_mac_type_address_device_id_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_mac_type_p", ITc_capi_network_ua_device_get_mac_type_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_mac_address_p", ITc_capi_network_ua_device_get_mac_address_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_device_id_p", ITc_capi_network_ua_device_get_device_id_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_set_get_os_info_p", ITc_capi_network_ua_device_set_get_os_info_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_set_get_wifi_bssid_p", ITc_capi_network_ua_device_set_get_wifi_bssid_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_set_get_wifi_ipv4_address", ITc_capi_network_ua_device_set_get_wifi_ipv4_address, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_get_last_presence_p", ITc_capi_network_ua_device_get_last_presence_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, - {"ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p", ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_pairing_required_p", ITc_capi_network_ua_device_get_pairing_required_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_by_mac_address_p", ITc_capi_network_ua_device_get_by_mac_address_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_by_device_id_p", ITc_capi_network_ua_device_get_by_device_id_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, - {"ITc_capi_network_ua_user_create_add_remove_destroy_p", ITc_capi_network_ua_user_create_add_remove_destroy_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, + {"ITc_capi_network_ua_user_create_destroy_p", ITc_capi_network_ua_user_create_destroy_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, + {"ITc_capi_network_ua_user_add_remove_p", ITc_capi_network_ua_user_add_remove_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, {"ITc_capi_network_ua_user_get_account_p", ITc_capi_network_ua_user_get_account_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, {NULL, NULL} }; diff --git a/src/itc/capi-network-ua/tct-capi-network-ua-native_tizeniot.h b/src/itc/capi-network-ua/tct-capi-network-ua-native_tizeniot.h old mode 100644 new mode 100755 index 240df82b8..c36367d28 --- a/src/itc/capi-network-ua/tct-capi-network-ua-native_tizeniot.h +++ b/src/itc/capi-network-ua/tct-capi-network-ua-native_tizeniot.h @@ -31,7 +31,8 @@ extern void ITs_capi_network_ua_device_cleanup(void); extern void ITs_capi_network_ua_user_startup(void); extern void ITs_capi_network_ua_user_cleanup(void); -extern int ITc_capi_network_ua_service_create_add_remove_destroy_p(void); +extern int ITc_capi_network_ua_service_add_remove_p(void); +extern int ITc_capi_network_ua_service_create_destroy_p(void); extern int ITc_capi_network_ua_get_default_service_p(void); extern int ITc_capi_network_ua_service_update_p(void); extern int ITc_capi_network_ua_service_get_name_p(void); @@ -52,18 +53,24 @@ extern int ITc_capi_network_ua_monitor_start_stop_presence_detection_p(void); extern int ITc_capi_network_ua_monitor_start_stop_absence_detection_p(void); extern int ITc_capi_network_ua_device_create_destroy_p(void); -extern int ITc_capi_network_ua_device_get_mac_type_address_device_id_p(void); +extern int ITc_capi_network_ua_device_get_mac_type_p(void); +extern int ITc_capi_network_ua_device_get_mac_address_p(void); +extern int ITc_capi_network_ua_device_get_device_id_p(void); extern int ITc_capi_network_ua_device_set_get_os_info_p(void); extern int ITc_capi_network_ua_device_set_get_wifi_bssid_p(void); extern int ITc_capi_network_ua_device_set_get_wifi_ipv4_address(void); extern int ITc_capi_network_ua_device_get_last_presence_p(void); -extern int ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p(void); +extern int ITc_capi_network_ua_device_get_pairing_required_p(void); +extern int ITc_capi_network_ua_device_get_by_mac_address_p(void); +extern int ITc_capi_network_ua_device_get_by_device_id_p(void); -extern int ITc_capi_network_ua_user_create_add_remove_destroy_p(void); +extern int ITc_capi_network_ua_user_create_destroy_p(void); +extern int ITc_capi_network_ua_user_add_remove_p(void); extern int ITc_capi_network_ua_user_get_account_p(void); testcase tc_array[] = { - {"ITc_capi_network_ua_service_create_add_remove_destroy_p", ITc_capi_network_ua_service_create_add_remove_destroy_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, + {"ITc_capi_network_ua_service_add_remove_p", ITc_capi_network_ua_service_add_remove_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, + {"ITc_capi_network_ua_service_create_destroy_p", ITc_capi_network_ua_service_create_destroy_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, {"ITc_capi_network_ua_get_default_service_p", ITc_capi_network_ua_get_default_service_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, {"ITc_capi_network_ua_service_update_p", ITc_capi_network_ua_service_update_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, {"ITc_capi_network_ua_service_get_name_p", ITc_capi_network_ua_service_get_name_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, @@ -84,14 +91,19 @@ testcase tc_array[] = { {"ITc_capi_network_ua_monitor_start_stop_absence_detection_p", ITc_capi_network_ua_monitor_start_stop_absence_detection_p, ITs_capi_network_ua_monitor_startup, ITs_capi_network_ua_monitor_cleanup}, {"ITc_capi_network_ua_device_create_destroy_p", ITc_capi_network_ua_device_create_destroy_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, - {"ITc_capi_network_ua_device_get_mac_type_address_device_id_p", ITc_capi_network_ua_device_get_mac_type_address_device_id_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_mac_type_p", ITc_capi_network_ua_device_get_mac_type_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_mac_address_p", ITc_capi_network_ua_device_get_mac_address_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_device_id_p", ITc_capi_network_ua_device_get_device_id_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_set_get_os_info_p", ITc_capi_network_ua_device_set_get_os_info_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_set_get_wifi_bssid_p", ITc_capi_network_ua_device_set_get_wifi_bssid_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_set_get_wifi_ipv4_address", ITc_capi_network_ua_device_set_get_wifi_ipv4_address, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_get_last_presence_p", ITc_capi_network_ua_device_get_last_presence_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, - {"ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p", ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_pairing_required_p", ITc_capi_network_ua_device_get_pairing_required_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_by_mac_address_p", ITc_capi_network_ua_device_get_by_mac_address_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_by_device_id_p", ITc_capi_network_ua_device_get_by_device_id_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, - {"ITc_capi_network_ua_user_create_add_remove_destroy_p", ITc_capi_network_ua_user_create_add_remove_destroy_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, + {"ITc_capi_network_ua_user_create_destroy_p", ITc_capi_network_ua_user_create_destroy_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, + {"ITc_capi_network_ua_user_add_remove_p", ITc_capi_network_ua_user_add_remove_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, {"ITc_capi_network_ua_user_get_account_p", ITc_capi_network_ua_user_get_account_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, {NULL, NULL} }; diff --git a/src/itc/capi-network-ua/tct-capi-network-ua-native_tv.h b/src/itc/capi-network-ua/tct-capi-network-ua-native_tv.h index 240df82b8..c36367d28 100755 --- a/src/itc/capi-network-ua/tct-capi-network-ua-native_tv.h +++ b/src/itc/capi-network-ua/tct-capi-network-ua-native_tv.h @@ -31,7 +31,8 @@ extern void ITs_capi_network_ua_device_cleanup(void); extern void ITs_capi_network_ua_user_startup(void); extern void ITs_capi_network_ua_user_cleanup(void); -extern int ITc_capi_network_ua_service_create_add_remove_destroy_p(void); +extern int ITc_capi_network_ua_service_add_remove_p(void); +extern int ITc_capi_network_ua_service_create_destroy_p(void); extern int ITc_capi_network_ua_get_default_service_p(void); extern int ITc_capi_network_ua_service_update_p(void); extern int ITc_capi_network_ua_service_get_name_p(void); @@ -52,18 +53,24 @@ extern int ITc_capi_network_ua_monitor_start_stop_presence_detection_p(void); extern int ITc_capi_network_ua_monitor_start_stop_absence_detection_p(void); extern int ITc_capi_network_ua_device_create_destroy_p(void); -extern int ITc_capi_network_ua_device_get_mac_type_address_device_id_p(void); +extern int ITc_capi_network_ua_device_get_mac_type_p(void); +extern int ITc_capi_network_ua_device_get_mac_address_p(void); +extern int ITc_capi_network_ua_device_get_device_id_p(void); extern int ITc_capi_network_ua_device_set_get_os_info_p(void); extern int ITc_capi_network_ua_device_set_get_wifi_bssid_p(void); extern int ITc_capi_network_ua_device_set_get_wifi_ipv4_address(void); extern int ITc_capi_network_ua_device_get_last_presence_p(void); -extern int ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p(void); +extern int ITc_capi_network_ua_device_get_pairing_required_p(void); +extern int ITc_capi_network_ua_device_get_by_mac_address_p(void); +extern int ITc_capi_network_ua_device_get_by_device_id_p(void); -extern int ITc_capi_network_ua_user_create_add_remove_destroy_p(void); +extern int ITc_capi_network_ua_user_create_destroy_p(void); +extern int ITc_capi_network_ua_user_add_remove_p(void); extern int ITc_capi_network_ua_user_get_account_p(void); testcase tc_array[] = { - {"ITc_capi_network_ua_service_create_add_remove_destroy_p", ITc_capi_network_ua_service_create_add_remove_destroy_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, + {"ITc_capi_network_ua_service_add_remove_p", ITc_capi_network_ua_service_add_remove_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, + {"ITc_capi_network_ua_service_create_destroy_p", ITc_capi_network_ua_service_create_destroy_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, {"ITc_capi_network_ua_get_default_service_p", ITc_capi_network_ua_get_default_service_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, {"ITc_capi_network_ua_service_update_p", ITc_capi_network_ua_service_update_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, {"ITc_capi_network_ua_service_get_name_p", ITc_capi_network_ua_service_get_name_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, @@ -84,14 +91,19 @@ testcase tc_array[] = { {"ITc_capi_network_ua_monitor_start_stop_absence_detection_p", ITc_capi_network_ua_monitor_start_stop_absence_detection_p, ITs_capi_network_ua_monitor_startup, ITs_capi_network_ua_monitor_cleanup}, {"ITc_capi_network_ua_device_create_destroy_p", ITc_capi_network_ua_device_create_destroy_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, - {"ITc_capi_network_ua_device_get_mac_type_address_device_id_p", ITc_capi_network_ua_device_get_mac_type_address_device_id_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_mac_type_p", ITc_capi_network_ua_device_get_mac_type_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_mac_address_p", ITc_capi_network_ua_device_get_mac_address_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_device_id_p", ITc_capi_network_ua_device_get_device_id_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_set_get_os_info_p", ITc_capi_network_ua_device_set_get_os_info_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_set_get_wifi_bssid_p", ITc_capi_network_ua_device_set_get_wifi_bssid_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_set_get_wifi_ipv4_address", ITc_capi_network_ua_device_set_get_wifi_ipv4_address, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_get_last_presence_p", ITc_capi_network_ua_device_get_last_presence_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, - {"ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p", ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_pairing_required_p", ITc_capi_network_ua_device_get_pairing_required_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_by_mac_address_p", ITc_capi_network_ua_device_get_by_mac_address_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_by_device_id_p", ITc_capi_network_ua_device_get_by_device_id_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, - {"ITc_capi_network_ua_user_create_add_remove_destroy_p", ITc_capi_network_ua_user_create_add_remove_destroy_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, + {"ITc_capi_network_ua_user_create_destroy_p", ITc_capi_network_ua_user_create_destroy_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, + {"ITc_capi_network_ua_user_add_remove_p", ITc_capi_network_ua_user_add_remove_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, {"ITc_capi_network_ua_user_get_account_p", ITc_capi_network_ua_user_get_account_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, {NULL, NULL} }; diff --git a/src/itc/capi-network-ua/tct-capi-network-ua-native_wearable.h b/src/itc/capi-network-ua/tct-capi-network-ua-native_wearable.h index 84f3335d1..5c3772277 100755 --- a/src/itc/capi-network-ua/tct-capi-network-ua-native_wearable.h +++ b/src/itc/capi-network-ua/tct-capi-network-ua-native_wearable.h @@ -31,7 +31,8 @@ extern void ITs_capi_network_ua_device_cleanup(void); extern void ITs_capi_network_ua_user_startup(void); extern void ITs_capi_network_ua_user_cleanup(void); -extern int ITc_capi_network_ua_service_create_add_remove_destroy_p(void); +extern int ITc_capi_network_ua_service_add_remove_p(void); +extern int ITc_capi_network_ua_service_create_destroy_p(void); extern int ITc_capi_network_ua_get_default_service_p(void); extern int ITc_capi_network_ua_service_update_p(void); extern int ITc_capi_network_ua_service_get_name_p(void); @@ -52,18 +53,24 @@ extern int ITc_capi_network_ua_monitor_start_stop_presence_detection_p(void); extern int ITc_capi_network_ua_monitor_start_stop_absence_detection_p(void); extern int ITc_capi_network_ua_device_create_destroy_p(void); -extern int ITc_capi_network_ua_device_get_mac_type_address_device_id_p(void); +extern int ITc_capi_network_ua_device_get_mac_type_p(void); +extern int ITc_capi_network_ua_device_get_mac_address_p(void); +extern int ITc_capi_network_ua_device_get_device_id_p(void); extern int ITc_capi_network_ua_device_set_get_os_info_p(void); extern int ITc_capi_network_ua_device_set_get_wifi_bssid_p(void); extern int ITc_capi_network_ua_device_set_get_wifi_ipv4_address(void); extern int ITc_capi_network_ua_device_get_last_presence_p(void); -extern int ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p(void); +extern int ITc_capi_network_ua_device_get_pairing_required_p(void); +extern int ITc_capi_network_ua_device_get_by_mac_address_p(void); +extern int ITc_capi_network_ua_device_get_by_device_id_p(void); -extern int ITc_capi_network_ua_user_create_add_remove_destroy_p(void); +extern int ITc_capi_network_ua_user_create_destroy_p(void); +extern int ITc_capi_network_ua_user_add_remove_p(void); extern int ITc_capi_network_ua_user_get_account_p(void); testcase tc_array[] = { - {"ITc_capi_network_ua_service_create_add_remove_destroy_p", ITc_capi_network_ua_service_create_add_remove_destroy_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, + {"ITc_capi_network_ua_service_add_remove_p", ITc_capi_network_ua_service_add_remove_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, + {"ITc_capi_network_ua_service_create_destroy_p", ITc_capi_network_ua_service_create_destroy_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, {"ITc_capi_network_ua_get_default_service_p", ITc_capi_network_ua_get_default_service_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, {"ITc_capi_network_ua_service_update_p", ITc_capi_network_ua_service_update_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, {"ITc_capi_network_ua_service_get_name_p", ITc_capi_network_ua_service_get_name_p, ITs_capi_network_ua_service_startup, ITs_capi_network_ua_service_cleanup}, @@ -84,14 +91,19 @@ testcase tc_array[] = { {"ITc_capi_network_ua_monitor_start_stop_absence_detection_p", ITc_capi_network_ua_monitor_start_stop_absence_detection_p, ITs_capi_network_ua_monitor_startup, ITs_capi_network_ua_monitor_cleanup}, {"ITc_capi_network_ua_device_create_destroy_p", ITc_capi_network_ua_device_create_destroy_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, - {"ITc_capi_network_ua_device_get_mac_type_address_device_id_p", ITc_capi_network_ua_device_get_mac_type_address_device_id_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_mac_type_p", ITc_capi_network_ua_device_get_mac_type_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_mac_address_p", ITc_capi_network_ua_device_get_mac_address_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_device_id_p", ITc_capi_network_ua_device_get_device_id_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_set_get_os_info_p", ITc_capi_network_ua_device_set_get_os_info_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_set_get_wifi_bssid_p", ITc_capi_network_ua_device_set_get_wifi_bssid_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_set_get_wifi_ipv4_address", ITc_capi_network_ua_device_set_get_wifi_ipv4_address, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, {"ITc_capi_network_ua_device_get_last_presence_p", ITc_capi_network_ua_device_get_last_presence_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, - {"ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p", ITc_capi_network_ua_device_get_by_mac_address_by_device_id_pairing_reqd_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_pairing_required_p", ITc_capi_network_ua_device_get_pairing_required_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_by_mac_address_p", ITc_capi_network_ua_device_get_by_mac_address_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, + {"ITc_capi_network_ua_device_get_by_device_id_p", ITc_capi_network_ua_device_get_by_device_id_p, ITs_capi_network_ua_device_startup, ITs_capi_network_ua_device_cleanup}, - {"ITc_capi_network_ua_user_create_add_remove_destroy_p", ITc_capi_network_ua_user_create_add_remove_destroy_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, + {"ITc_capi_network_ua_user_create_destroy_p", ITc_capi_network_ua_user_create_destroy_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, + {"ITc_capi_network_ua_user_add_remove_p", ITc_capi_network_ua_user_add_remove_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, {"ITc_capi_network_ua_user_get_account_p", ITc_capi_network_ua_user_get_account_p, ITs_capi_network_ua_user_startup, ITs_capi_network_ua_user_cleanup}, {NULL, NULL} };