BuildRequires: pkgconfig(capi-network-http)
BuildRequires: pkgconfig(capi-media-streamer)
BuildRequires: pkgconfig(d2d-conv-manager)
+BuildRequires: pkgconfig(capi-network-wifi-manager)
+
+
%if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
BuildRequires: pkgconfig(capi-messaging-email)
BuildRequires: pkgconfig(contacts-service2)
CTs-platform-permission-media-streamer.c
CTs-platform-permission-http.c
CTs-platform-permission-d2d-conv-manager.c
+ CTs-platform-permission-wifi-manager.c
)
ENDIF()
CTs-platform-permission-http.c
CTs-platform-permission-media-streamer.c
CTs-platform-permission-d2d-conv-manager.c
+ CTs-platform-permission-wifi-manager.c
)
ENDIF()
capi-ui-efl-util
badge
storage
+ capi-network-wifi-manager
+
)
ENDIF()
badge
storage
stt
+ capi-network-wifi-manager
)
ENDIF()
#include <wav_player.h>
#include <account.h>
#include <badge.h>
+#include <wifi-manager.h>
+
#ifdef MOBILE
#include <shortcut_manager.h>
#include <ckmc/ckmc-manager.h>
--- /dev/null
+#include "CTs-platform-permission-common.h"
+
+
+/**
+* @function WifiManagerGetError
+* @description Display the details error information
+* @parameter nRet : error code returned
+* @return error string
+*/
+char* WifiManagerGetError(int nRet)
+{
+ char *pszErrorVal = NULL;
+
+ switch ( nRet )
+ {
+ case WIFI_MANAGER_ERROR_NONE: pszErrorVal = "WIFI_MANAGER_ERROR_NONE"; break;
+ case WIFI_MANAGER_ERROR_INVALID_PARAMETER: pszErrorVal = "WIFI_MANAGER_ERROR_INVALID_PARAMETER"; break;
+ case WIFI_MANAGER_ERROR_OUT_OF_MEMORY: pszErrorVal = "WIFI_MANAGER_ERROR_OUT_OF_MEMORY"; break;
+ case WIFI_MANAGER_ERROR_INVALID_OPERATION: pszErrorVal = "WIFI_MANAGER_ERROR_INVALID_OPERATION"; break;
+ case WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED: pszErrorVal = "WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED"; break;
+ case WIFI_MANAGER_ERROR_OPERATION_FAILED: pszErrorVal = "WIFI_MANAGER_ERROR_OPERATION_FAILED"; break;
+ case WIFI_MANAGER_ERROR_NO_CONNECTION: pszErrorVal = "WIFI_MANAGER_ERROR_NO_CONNECTION"; break;
+ case WIFI_MANAGER_ERROR_NOW_IN_PROGRESS: pszErrorVal = "WIFI_MANAGER_ERROR_NOW_IN_PROGRESS"; break;
+ case WIFI_MANAGER_ERROR_ALREADY_EXISTS: pszErrorVal = "WIFI_MANAGER_ERROR_ALREADY_EXISTS"; break;
+ case WIFI_MANAGER_ERROR_OPERATION_ABORTED: pszErrorVal = "WIFI_MANAGER_ERROR_OPERATION_ABORTED"; break;
+ case WIFI_MANAGER_ERROR_DHCP_FAILED: pszErrorVal = "WIFI_MANAGER_ERROR_DHCP_FAILED"; break;
+ case WIFI_MANAGER_ERROR_INVALID_KEY: pszErrorVal = "WIFI_MANAGER_ERROR_INVALID_KEY"; break;
+ case WIFI_MANAGER_ERROR_NO_REPLY: pszErrorVal = "WIFI_MANAGER_ERROR_NO_REPLY"; break;
+ case WIFI_MANAGER_ERROR_SECURITY_RESTRICTED: pszErrorVal = "WIFI_MANAGER_ERROR_SECURITY_RESTRICTED"; break;
+ default: pszErrorVal = "Unknown Error"; break;
+ }
+ return pszErrorVal;
+}
+/**
+* @function CTs_platform_permission_wifi_manager_startup
+* @description Called before each test
+* @parameter NA
+* @return NA
+*/
+void CTs_platform_permission_wifi_manager_startup(void)
+{
+ struct stat stBuff;
+ if ( stat(ERR_LOG, &stBuff) == 0 )
+ {
+ remove(ERR_LOG);
+ }
+
+#if DEBUG
+ FPRINTF("[Line : %d][%s] TEST SUIT start-up: CTs_platform_permission_wifi_manager_startup\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+/**
+* @function CTs_platform_permission_wifi_manager_cleanup
+* @description Called after each test
+* @parameter NA
+* @return NA
+*/
+void CTs_platform_permission_wifi_manager_cleanup(void)
+{
+#if DEBUG
+ FPRINTF("[Line : %d][%s] TEST SUIT clean-up: CTs_platform_permission_wifi_manager_cleanup\\n", __LINE__, API_NAMESPACE);
+#endif
+ return;
+}
+
+//& purpose: Checking http://tizen.org/privilege/network.get privilege
+//& type: auto
+/**
+* @testcase CTc_Wifi_Manager_Privilege_NetworkGet
+* @since_tizen 3.0
+* @author SRID(shilpa.j)
+* @reviewer SRID()
+* @type auto
+* @scenario Initializes Wi-Fi Manager\n
+* Deinitializes Wi-Fi Manager
+* @apicovered wifi_manager_initialize and wifi_manager_deinitialize
+* @passcase If target privileged API returns TIZEN_ERROR_PERMISSION_DENIED
+* @failcase If target privileged API does not return TIZEN_ERROR_PERMISSION_DENIED
+* @precondition NA
+* @postcondition NA
+*/
+int CTc_Wifi_Manager_Privilege_NetworkGet(void)
+{
+ START_TEST;
+ wifi_manager_h hWifi;
+ IS_FEATURE_SUPPORTED(WIFI_FEATURE, g_bIsSupported, API_NAMESPACE);
+ if ( !g_bIsSupported )
+ {
+ FPRINTF("[Line : %d][%s] [%s] is not supported\\n", __LINE__, API_NAMESPACE, WIFI_FEATURE);
+ return 0;
+ }
+
+
+ int nRet = wifi_manager_initialize(&hWifi);
+ PRINT_RESULT_ERROR_NONE(TIZEN_ERROR_PERMISSION_DENIED, nRet, "wifi_manager_initialize", WifiManagerGetError(nRet), wifi_manager_deinitialize(hWifi), WIFI_MANAGER_ERROR_NONE);
+
+ return 0;
+}
extern void CTs_platform_permission_wifi_cleanup(void);
extern void CTs_platform_permission_iotcon_startup(void);
extern void CTs_platform_permission_iotcon_cleanup(void);
-
extern void CTs_platform_permission_phonenumber_utils_startup(void);
extern void CTs_platform_permission_phonenumber_utils_cleanup(void);
extern void CTs_platform_permission_media_streamer_startup(void);
extern void CTs_platform_permission_media_streamer_cleanup(void);
+extern void CTs_platform_permission_wifi_manager_startup(void);
+extern void CTs_platform_permission_wifi_manager_cleanup(void);
+
extern int CTc_PhoneNumber_PrivilegePhoneNumberUtils_get_normalized_number(void);
extern int CTc_MediaStreamer_PrivilegeMediaStorage_node_create_src(void);
extern void CTs_platform_permission_http_startup(void);
extern void CTs_platform_permission_http_cleanup(void);
extern int CTc_Http_PrivilegeInternet_http_transaction_submit(void);
+extern int CTc_Wifi_Manager_Privilege_NetworkGet(void);
testcase tc_array[] = {
{"CTc_AccountManager_PrivilegeAccountReadWrite_query_label_by_locale", CTc_AccountManager_PrivilegeAccountReadWrite_query_label_by_locale, CTs_platform_permission_accountsvc_startup, CTs_platform_permission_accountsvc_cleanup},
{"CTc_MediaStreamer_PrivilegeMediaStorage_node_set_params", CTc_MediaStreamer_PrivilegeMediaStorage_node_set_params, CTs_platform_permission_media_streamer_startup, CTs_platform_permission_media_streamer_cleanup},
{"CTc_D2D_PrivilegeD2DConv_d2d_conv_discovery_start", CTc_D2D_PrivilegeD2DConv_d2d_conv_discovery_start, CTs_platform_permission_d2d_conv_manager_startup, CTs_platform_permission_d2d_conv_manager_cleanup},
+ {"CTc_Wifi_Manager_Privilege_NetworkGet", CTc_Wifi_Manager_Privilege_NetworkGet, CTs_platform_permission_wifi_manager_startup, CTs_platform_permission_wifi_manager_cleanup},
{NULL, NULL}
};
extern void CTs_platform_permission_WidgetViewer_cleanup(void);
extern void CTs_platform_permission_wifi_startup(void);
extern void CTs_platform_permission_wifi_cleanup(void);
+extern void CTs_platform_permission_wifi_manager_startup(void);
+extern void CTs_platform_permission_wifi_manager_cleanup(void);
+
extern int CTc_MediaStreamer_PrivilegeMediaStorage_node_create_src(void);
extern int CTc_MediaStreamer_PrivilegeMediaStorage_node_create_sink(void);
extern int CTc_MediaStreamer_PrivilegeMediaStorage_node_set_param(void);
extern void CTs_platform_permission_http_startup(void);
extern void CTs_platform_permission_http_cleanup(void);
extern int CTc_Http_PrivilegeInternet_http_transaction_submit(void);
+extern int CTc_Wifi_Manager_Privilege_NetworkGet(void);
+
testcase tc_array[] = {
{"CTc_AppManager_Privilege_PackagemanagerInfo_app_control_send_launch_request", CTc_AppManager_Privilege_PackagemanagerInfo_app_control_send_launch_request, CTs_platform_permission_appmanager_startup, CTs_platform_permission_appmanager_cleanup},
{"CTc_Application_PrivilegeAlarmSet_alarm_schedule_once_after_delay", CTc_Application_PrivilegeAlarmSet_alarm_schedule_once_after_delay, CTs_platform_permission_Application_startup, CTs_platform_permission_Application_cleanup},
{"CTc_MediaStreamer_PrivilegeMediaStorage_node_set_param", CTc_MediaStreamer_PrivilegeMediaStorage_node_set_param, CTs_platform_permission_media_streamer_startup, CTs_platform_permission_media_streamer_cleanup},
{"CTc_MediaStreamer_PrivilegeMediaStorage_node_set_params", CTc_MediaStreamer_PrivilegeMediaStorage_node_set_params, CTs_platform_permission_media_streamer_startup, CTs_platform_permission_media_streamer_cleanup},
- {"CTc_D2D_PrivilegeD2DConv_d2d_conv_discovery_start", CTc_D2D_PrivilegeD2DConv_d2d_conv_discovery_start, CTs_platform_permission_d2d_conv_manager_startup, CTs_platform_permission_d2d_conv_manager_cleanup},
+ {"CTc_D2D_PrivilegeD2DConv_d2d_conv_discovery_start", CTc_D2D_PrivilegeD2DConv_d2d_conv_discovery_start, CTs_platform_permission_d2d_conv_manager_startup, CTs_platform_permission_d2d_conv_manager_cleanup},
+ {"CTc_Wifi_Manager_Privilege_NetworkGet", CTc_Wifi_Manager_Privilege_NetworkGet, CTs_platform_permission_wifi_manager_startup, CTs_platform_permission_wifi_manager_cleanup},
{NULL, NULL}
};