diff options
-rwxr-xr-x | doc/wifi_doc.h | 171 | ||||
-rwxr-xr-x | include/net_wifi_private.h | 13 | ||||
-rwxr-xr-x | include/wifi.h | 198 | ||||
-rwxr-xr-x | include/wifi_config_private.h | 6 |
4 files changed, 169 insertions, 219 deletions
diff --git a/doc/wifi_doc.h b/doc/wifi_doc.h index ad12a20..8237899 100755 --- a/doc/wifi_doc.h +++ b/doc/wifi_doc.h @@ -18,11 +18,11 @@ #ifndef __TIZEN_NETWORK_WIFI_DOC_H__ #define __TIZEN_NETWORK_WIFI_DOC_H__ + /** - * @defgroup CAPI_NETWORK_WIFI_MODULE Wi-Fi (Deprecated) + * @ingroup CAPI_NETWORK_FRAMEWORK + * @defgroup CAPI_NETWORK_WIFI_MODULE Wi-Fi (Deprecated) * @brief The Wi-Fi API provides functions for managing Wi-Fi and monitoring the state of Wi-Fi. - * @ingroup CAPI_NETWORK_WIFI_PACKAGE - * * @section CAPI_NETWORK_WIFI_MODULE_HEADER Required Header * \#include <wifi.h> * @@ -30,25 +30,21 @@ * Wi-Fi allows your application to connect to a Wireless Local Area Network (WLAN) and to transfer data over the network. * The Wi-Fi Manager enables your application to activate and deactivate a local Wi-Fi device, and to connect to a WLAN network * in the infrastructure mode. + * * @section CAPI_NETWORK_WIFI_MODULE_FEATURE Related Features * This API is related with the following features:\n * - http://tizen.org/feature/network.wifi\n - * - * It is recommended to design applications with regard to features, for reliability.\n - * - * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.\n - * + * It is recommended to design feature related codes in your application for reliability.\n + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n - * - * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> - * + * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> */ + /** - * @defgroup CAPI_NETWORK_WIFI_MANAGEMENT_MODULE Wi-Fi Management - * @brief The Wi-Fi API provides functions for managing Wi-Fi. * @ingroup CAPI_NETWORK_WIFI_MODULE - * + * @defgroup CAPI_NETWORK_WIFI_MANAGEMENT_MODULE Wi-Fi Management + * @brief The Wi-Fi API provides functions for managing Wi-Fi. * @section CAPI_NETWORK_WIFI_MANAGEMENT_MODULE_HEADER Required Header * \#include <wifi.h> * @@ -58,188 +54,155 @@ * - Activate / Deactivate the Wi-Fi device * - Connect to the access point * - Scans the access points + * * @section CAPI_NETWORK_WIFI_MANAGEMENT_MODULE_FEATURE Related Features * This API is related with the following features:\n * - http://tizen.org/feature/network.wifi\n - * - * It is recommended to design applications with regard to features, for reliability.\n - * - * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.\n - * + * It is recommended to design feature related codes in your application for reliability.\n + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n - * - * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> - * + * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> */ + /** - * @defgroup CAPI_NETWORK_WIFI_MONITOR_MODULE Wi-Fi Monitor - * @brief The Wi-Fi API provides functions for monitoring the state of Wi-Fi. * @ingroup CAPI_NETWORK_WIFI_MODULE - * + * @defgroup CAPI_NETWORK_WIFI_MONITOR_MODULE Wi-Fi Monitor + * @brief The Wi-Fi API provides functions for monitoring the state of Wi-Fi. * @section CAPI_NETWORK_WIFI_MONITOR_MODULE_HEADER Required Header * \#include <wifi.h> * * @section CAPI_NETWORK_WIFI_MONITOR_MODULE_OVERVIEW Overview * The Wi-Fi Monitor allows monitoring the changes of Wi-Fi. + * * @section CAPI_NETWORK_WIFI_MONITOR_MODULE_FEATURE Related Features * This API is related with the following features:\n * - http://tizen.org/feature/network.wifi\n - * - * It is recommended to design applications with regard to features, for reliability.\n - * - * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.\n - * + * It is recommended to design feature related codes in your application for reliability.\n + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n - * - * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> - * + * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> */ + /** - * @defgroup CAPI_NETWORK_WIFI_AP_MODULE AP + * @ingroup CAPI_NETWORK_WIFI_MANAGER_MODULE + * @defgroup CAPI_NETWORK_WIFI_AP_MODULE AP * @brief The Access Point API provides functions for managing the Access Point. - * @ingroup CAPI_NETWORK_WIFI_MANAGEMENT_MODULE - * - * @section CAPI_NETWORK_WIFI_AP_MODULE Required Header + * @section CAPI_NETWORK_WIFI_AP_MODULE Required Header * \#include <wifi.h> * * @section CAPI_NETWORK_WIFI_AP_MODULE_OVERVIEW Overview * The Access Point API provides functions for managing the Access Point. You need to create the @a ap handle for using the functions. * You can use Wi-Fi information with the handle. + * * @section CAPI_NETWORK_WIFI_AP_MODULE_FEATURE Related Features * This API is related with the following features:\n * - http://tizen.org/feature/network.wifi\n - * - * It is recommended to design applications with regard to features, for reliability.\n - * - * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.\n - * + * It is recommended to design feature related codes in your application for reliability.\n + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n - * - * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> - * + * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> */ + /** - * @defgroup CAPI_NETWORK_WIFI_AP_NETWORK_MODULE Network Information - * @brief The Connection Information API provides functions for managing the network information. * @ingroup CAPI_NETWORK_WIFI_AP_MODULE - * + * @defgroup CAPI_NETWORK_WIFI_AP_NETWORK_MODULE Network Information + * @brief The Connection Information API provides functions for managing the network information. * @section CAPI_NETWORK_WIFI_AP_CONNECTION_MODULE Required Header * \#include <wifi.h> * * @section CAPI_NETWORK_WIFI_AP_CONNECTION_MODULE_OVERVIEW Overview * The Connection Information API provides functions for managing the network information. You can manage the network information using the functions. + * * @section CAPI_NETWORK_WIFI_AP_MODULE_FEATURE Related Features * This API is related with the following features:\n * - http://tizen.org/feature/network.wifi\n - * - * It is recommended to design applications with regard to features, for reliability.\n - * - * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.\n - * + * It is recommended to design feature related codes in your application for reliability.\n + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n - * - * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> - * + * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> */ + /** - * @defgroup CAPI_NETWORK_WIFI_AP_SECURITY_MODULE Security Information - * @brief The Security Information API provides functions for managing the Security information. * @ingroup CAPI_NETWORK_WIFI_AP_MODULE - * - * @section CAPI_NETWORK_WIFI_AP_SECURITY_MODULE Required Header + * @defgroup CAPI_NETWORK_WIFI_AP_SECURITY_MODULE Security Information + * @brief The Security Information API provides functions for managing the Security information. + * @section CAPI_NETWORK_WIFI_AP_SECURITY_MODULE Required Header * \#include <wifi.h> * * @section CAPI_NETWORK_WIFI_AP_SECURITY_MODULE_OVERVIEW Overview * The Security Information API provides functions for managing the Security information. You can manage the Security information using the functions. + * * @section CAPI_NETWORK_WIFI_AP_SECURITY_MODULE_FEATURE Related Features * This API is related with the following features:\n * - http://tizen.org/feature/network.wifi\n - * - * It is recommended to design applications with regard to features, for reliability.\n - * - * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.\n - * + * It is recommended to design feature related codes in your application for reliability.\n + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n - * - * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> - * + * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> */ + /** - * @defgroup CAPI_NETWORK_WIFI_AP_SECURITY_EAP_MODULE EAP - * @brief The EAP API provides functions for managing the EAP information. * @ingroup CAPI_NETWORK_WIFI_AP_SECURITY_MODULE - * - * @section CAPI_NETWORK_WIFI_AP_SECURITY_EAP_MODULE Required Header + * @defgroup CAPI_NETWORK_WIFI_AP_SECURITY_EAP_MODULE EAP + * @brief The EAP API provides functions for managing the EAP information. + * @section CAPI_NETWORK_WIFI_AP_SECURITY_EAP_MODULE Required Header * \#include <wifi.h> * * @section CAPI_NETWORK_WIFI_AP_SECURITY_EAP_MODULE_OVERVIEW Overview * The EAP API provides functions for managing the EAP information. You can manage the EAP information using the functions. + * * @section CAPI_NETWORK_WIFI_AP_SECURITY_EAP_MODULE_FEATURE Related Features * This API is related with the following features:\n * - http://tizen.org/feature/network.wifi\n - * - * It is recommended to design applications with regard to features, for reliability.\n - * - * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.\n - * + * It is recommended to design feature related codes in your application for reliability.\n + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n - * - * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> - * + * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> */ /** - * @defgroup CAPI_NETWORK_WIFI_CONFIG_MODULE Wi-Fi Configuration - * @brief The Configuration API provides functions for managing the configuration of Wi-Fi. * @ingroup CAPI_NETWORK_WIFI_MODULE - * - * @section CAPI_NETWORK_WIFI_CONFIG_MODULE Required Header + * @defgroup CAPI_NETWORK_WIFI_CONFIG_MODULE Wi-Fi Configuration + * @brief The Configuration API provides functions for managing the configuration of Wi-Fi. + * @section CAPI_NETWORK_WIFI_CONFIG_MODULE Required Header * \#include <wifi.h> * * @section CAPI_NETWORK_WIFI_CONFIG_MODULE_OVERVIEW Overview * The Configuration API provides functions for managing the configuration of Wi-Fi. You can manage the configuration information using the functions. + * * @section CAPI_NETWORK_WIFI_CONFIG_MODULE Related Features * This API is related with the following features:\n * - http://tizen.org/feature/network.wifi\n - * - * It is recommended to design applications with regard to features, for reliability.\n - * - * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.\n - * + * It is recommended to design feature related codes in your application for reliability.\n + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n - * - * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> - * + * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> */ + /** - * @defgroup CAPI_NETWORK_WIFI_TDLS_MODULE Wi-Fi TDLS + * @ingroup CAPI_NETWORK_WIFI_MANAGER_MODULE + * @defgroup CAPI_NETWORK_WIFI_TDLS_MODULE TDLS * @brief The TDLS APIs for managing TDLS. - * @ingroup CAPI_NETWORK_WIFI_MODULE - * - * @section CAPI_NETWORK_WIFI_TDLS_MODULE Required Header + * @section CAPI_NETWORK_WIFI_TDLS_MODULE Required Header * \#include <wifi.h> * * @section CAPI_NETWORK_WIFI_TDLS_MODULE_OVERVIEW Overview * The TDLS APIs for managing TDLS. + * * @section CAPI_NETWORK_WIFI_TDLS_MODULE Related Features * This API is related with the following features:\n * - http://tizen.org/feature/network.wifi.tdls\n - * - * It is recommended to design applications with regard to features, for reliability.\n - * - * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly. - * + * It is recommended to design feature related codes in your application for reliability.\n + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application. * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n - * - * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a> - * + * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>. */ diff --git a/include/net_wifi_private.h b/include/net_wifi_private.h index 08347fc..ec11dad 100755 --- a/include/net_wifi_private.h +++ b/include/net_wifi_private.h @@ -39,8 +39,7 @@ extern "C" { #define WIFI_FEATURE "http://tizen.org/feature/network.wifi" #define WIFI_TDLS_FEATURE "http://tizen.org/feature/network.wifi.tdls" -typedef enum -{ +typedef enum { WIFI_SUPPORTED_FEATURE_WIFI, WIFI_SUPPORTED_FEATURE_WIFI_TDLS, WIFI_SUPPORTED_FEATURE_MAX, @@ -50,15 +49,15 @@ typedef enum #define CHECK_FEATURE_SUPPORTED(...) \ do { \ int rv = _wifi_check_feature_supported(__VA_ARGS__, NULL); \ - if( rv != WIFI_ERROR_NONE ) \ + if (rv != WIFI_ERROR_NONE) \ return rv; \ - } while(0) + } while (0) #define DEPRECATED_LOG(origin, substitution) \ do { \ LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed " \ "from next release. Use %s() instead.", origin, substitution); \ - } while(0) + } while (0) #define WIFI_LOG(log_level, format, args...) \ do { \ @@ -72,7 +71,7 @@ typedef enum default: \ LOGI(format, ## args); \ } \ - } while(0) + } while (0) #define SECURE_WIFI_LOG(log_level, format, args...) \ do { \ @@ -86,7 +85,7 @@ typedef enum default: \ SECURE_LOGI(format, ## args); \ } \ - } while(0) + } while (0) bool _wifi_is_init(void); diff --git a/include/wifi.h b/include/wifi.h index ce3e615..761b29d 100755 --- a/include/wifi.h +++ b/include/wifi.h @@ -37,24 +37,23 @@ extern "C" { * @brief Enumeration for the Wi-Fi error type. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ - WIFI_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ - WIFI_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ - WIFI_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory error */ - WIFI_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented or Invalid operation (e.g., already initialized)*/ - WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED, /**< Address family not supported */ - WIFI_ERROR_OPERATION_FAILED = TIZEN_ERROR_WIFI|0x0301, /**< Operation failed */ - WIFI_ERROR_NO_CONNECTION = TIZEN_ERROR_WIFI|0x0302, /**< There is no connected AP */ - WIFI_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS, /**< Now in progress */ - WIFI_ERROR_ALREADY_EXISTS = TIZEN_ERROR_WIFI|0x0303, /**< Already exists */ - WIFI_ERROR_OPERATION_ABORTED = TIZEN_ERROR_WIFI|0x0304, /**< Operation is aborted */ - WIFI_ERROR_DHCP_FAILED = TIZEN_ERROR_WIFI|0x0306, /**< DHCP failed */ - WIFI_ERROR_INVALID_KEY = TIZEN_ERROR_WIFI|0x0307, /**< Invalid key */ - WIFI_ERROR_NO_REPLY = TIZEN_ERROR_WIFI|0x0308, /**< No reply */ - WIFI_ERROR_SECURITY_RESTRICTED = TIZEN_ERROR_WIFI|0x0309, /**< Restricted by security system policy */ - WIFI_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission Denied */ - WIFI_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED /**< Not Supported */ +typedef enum { + WIFI_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ + WIFI_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ + WIFI_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory error */ + WIFI_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented or Invalid operation (e.g., already initialized)*/ + WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED, /**< Address family not supported */ + WIFI_ERROR_OPERATION_FAILED = TIZEN_ERROR_WIFI|0x0301, /**< Operation failed */ + WIFI_ERROR_NO_CONNECTION = TIZEN_ERROR_WIFI|0x0302, /**< There is no connected AP */ + WIFI_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS, /**< Now in progress */ + WIFI_ERROR_ALREADY_EXISTS = TIZEN_ERROR_WIFI|0x0303, /**< Already exists */ + WIFI_ERROR_OPERATION_ABORTED = TIZEN_ERROR_WIFI|0x0304, /**< Operation is aborted */ + WIFI_ERROR_DHCP_FAILED = TIZEN_ERROR_WIFI|0x0306, /**< DHCP failed */ + WIFI_ERROR_INVALID_KEY = TIZEN_ERROR_WIFI|0x0307, /**< Invalid key */ + WIFI_ERROR_NO_REPLY = TIZEN_ERROR_WIFI|0x0308, /**< No reply */ + WIFI_ERROR_SECURITY_RESTRICTED = TIZEN_ERROR_WIFI|0x0309, /**< Restricted by security system policy */ + WIFI_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission Denied */ + WIFI_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED /**< Not Supported */ } wifi_error_e; /** @@ -72,10 +71,9 @@ typedef enum * @brief Enumeration for the state of the Wi-Fi device. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ - WIFI_DEVICE_STATE_DEACTIVATED = 0, /**< Wi-Fi is Deactivated */ - WIFI_DEVICE_STATE_ACTIVATED = 1, /**< Wi-Fi is activated */ +typedef enum { + WIFI_DEVICE_STATE_DEACTIVATED = 0, /**< Wi-Fi is Deactivated */ + WIFI_DEVICE_STATE_ACTIVATED = 1, /**< Wi-Fi is activated */ } wifi_device_state_e; /** @@ -83,8 +81,7 @@ typedef enum * @brief Enumeration for the state of the Wi-Fi connection. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ +typedef enum { WIFI_CONNECTION_STATE_FAILURE = -1, /**< Connection failed state */ WIFI_CONNECTION_STATE_DISCONNECTED = 0, /**< Disconnected state */ WIFI_CONNECTION_STATE_ASSOCIATION = 1, /**< Association state */ @@ -97,13 +94,12 @@ typedef enum * @brief Enumeration for the RSSI level. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ - WIFI_RSSI_LEVEL_0 = 0, /**< level 0 */ - WIFI_RSSI_LEVEL_1 = 1, /**< level 1 */ - WIFI_RSSI_LEVEL_2 = 2, /**< level 2 */ - WIFI_RSSI_LEVEL_3 = 3, /**< level 3 */ - WIFI_RSSI_LEVEL_4 = 4, /**< level 4 */ +typedef enum { + WIFI_RSSI_LEVEL_0 = 0, /**< level 0 */ + WIFI_RSSI_LEVEL_1 = 1, /**< level 1 */ + WIFI_RSSI_LEVEL_2 = 2, /**< level 2 */ + WIFI_RSSI_LEVEL_3 = 3, /**< level 3 */ + WIFI_RSSI_LEVEL_4 = 4, /**< level 4 */ } wifi_rssi_level_e; /** @@ -121,13 +117,12 @@ typedef enum * @brief Enumeration for the Net IP configuration type. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ - WIFI_IP_CONFIG_TYPE_NONE = 0, /**< Not defined */ - WIFI_IP_CONFIG_TYPE_STATIC = 1, /**< Manual IP configuration */ - WIFI_IP_CONFIG_TYPE_DYNAMIC = 2, /**< Config IP using DHCP client*/ - WIFI_IP_CONFIG_TYPE_AUTO = 3, /**< Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available */ - WIFI_IP_CONFIG_TYPE_FIXED = 4, /**< Indicates an IP address that can not be modified */ +typedef enum { + WIFI_IP_CONFIG_TYPE_NONE = 0, /**< Not defined */ + WIFI_IP_CONFIG_TYPE_STATIC = 1, /**< Manual IP configuration */ + WIFI_IP_CONFIG_TYPE_DYNAMIC = 2, /**< Config IP using DHCP client*/ + WIFI_IP_CONFIG_TYPE_AUTO = 3, /**< Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available */ + WIFI_IP_CONFIG_TYPE_FIXED = 4, /**< Indicates an IP address that can not be modified */ } wifi_ip_config_type_e; /** @@ -135,10 +130,9 @@ typedef enum * @brief Enumeration for the address type. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ - WIFI_ADDRESS_FAMILY_IPV4 = 0, /**< IPV4 Address family */ - WIFI_ADDRESS_FAMILY_IPV6 = 1, /**< IPV6 Address family */ +typedef enum { + WIFI_ADDRESS_FAMILY_IPV4 = 0, /**< IPV4 Address family */ + WIFI_ADDRESS_FAMILY_IPV6 = 1, /**< IPV6 Address family */ } wifi_address_family_e; /** @@ -146,11 +140,10 @@ typedef enum * @brief Enumeration for the proxy method type. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ - WIFI_PROXY_TYPE_DIRECT = 0, /**< Direct connection */ - WIFI_PROXY_TYPE_AUTO = 1, /**< Auto configuration(Use PAC file). If URL property is not set, DHCP/WPAD auto-discover will be tried */ - WIFI_PROXY_TYPE_MANUAL = 2 /**< Manual configuration */ +typedef enum { + WIFI_PROXY_TYPE_DIRECT = 0, /**< Direct connection */ + WIFI_PROXY_TYPE_AUTO = 1, /**< Auto configuration(Use PAC file). If URL property is not set, DHCP/WPAD auto-discover will be tried */ + WIFI_PROXY_TYPE_MANUAL = 2 /**< Manual configuration */ } wifi_proxy_type_e; /** @@ -171,13 +164,12 @@ typedef enum * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ - WIFI_SECURITY_TYPE_NONE = 0, /**< Security disabled */ - WIFI_SECURITY_TYPE_WEP = 1, /**< WEP */ - WIFI_SECURITY_TYPE_WPA_PSK = 2, /**< WPA-PSK */ - WIFI_SECURITY_TYPE_WPA2_PSK = 3, /**< WPA2-PSK */ - WIFI_SECURITY_TYPE_EAP = 4, /**< EAP */ +typedef enum { + WIFI_SECURITY_TYPE_NONE = 0, /**< Security disabled */ + WIFI_SECURITY_TYPE_WEP = 1, /**< WEP */ + WIFI_SECURITY_TYPE_WPA_PSK = 2, /**< WPA-PSK */ + WIFI_SECURITY_TYPE_WPA2_PSK = 3, /**< WPA2-PSK */ + WIFI_SECURITY_TYPE_EAP = 4, /**< EAP */ } wifi_security_type_e; /** @@ -186,13 +178,12 @@ typedef enum * @details The following encryption modes are used in infrastructure and ad-hoc mode. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ - WIFI_ENCRYPTION_TYPE_NONE = 0, /**< Encryption disabled */ - WIFI_ENCRYPTION_TYPE_WEP = 1, /**< WEP */ - WIFI_ENCRYPTION_TYPE_TKIP = 2, /**< TKIP */ - WIFI_ENCRYPTION_TYPE_AES = 3, /**< AES */ - WIFI_ENCRYPTION_TYPE_TKIP_AES_MIXED = 4, /**< TKIP and AES are both supported */ +typedef enum { + WIFI_ENCRYPTION_TYPE_NONE = 0, /**< Encryption disabled */ + WIFI_ENCRYPTION_TYPE_WEP = 1, /**< WEP */ + WIFI_ENCRYPTION_TYPE_TKIP = 2, /**< TKIP */ + WIFI_ENCRYPTION_TYPE_AES = 3, /**< AES */ + WIFI_ENCRYPTION_TYPE_TKIP_AES_MIXED = 4, /**< TKIP and AES are both supported */ } wifi_encryption_type_e; /** @@ -210,13 +201,12 @@ typedef enum * @brief Enumeration for EAP type. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ - WIFI_EAP_TYPE_PEAP = 0, /**< EAP PEAP type */ - WIFI_EAP_TYPE_TLS = 1, /**< EAP TLS type */ - WIFI_EAP_TYPE_TTLS = 2, /**< EAP TTLS type */ - WIFI_EAP_TYPE_SIM = 3, /**< EAP SIM type */ - WIFI_EAP_TYPE_AKA = 4, /**< EAP AKA type */ +typedef enum { + WIFI_EAP_TYPE_PEAP = 0, /**< EAP PEAP type */ + WIFI_EAP_TYPE_TLS = 1, /**< EAP TLS type */ + WIFI_EAP_TYPE_TTLS = 2, /**< EAP TTLS type */ + WIFI_EAP_TYPE_SIM = 3, /**< EAP SIM type */ + WIFI_EAP_TYPE_AKA = 4, /**< EAP AKA type */ } wifi_eap_type_e; /** @@ -224,14 +214,13 @@ typedef enum * @brief Enumeration for EAP phase2 authentication type. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -typedef enum -{ - WIFI_EAP_AUTH_TYPE_NONE = 0, /**< EAP phase2 authentication none */ - WIFI_EAP_AUTH_TYPE_PAP = 1, /**< EAP phase2 authentication PAP */ - WIFI_EAP_AUTH_TYPE_MSCHAP = 2, /**< EAP phase2 authentication MSCHAP */ - WIFI_EAP_AUTH_TYPE_MSCHAPV2 = 3, /**< EAP phase2 authentication MSCHAPv2 */ - WIFI_EAP_AUTH_TYPE_GTC = 4, /**< EAP phase2 authentication GTC */ - WIFI_EAP_AUTH_TYPE_MD5 = 5, /**< EAP phase2 authentication MD5 */ +typedef enum { + WIFI_EAP_AUTH_TYPE_NONE = 0, /**< EAP phase2 authentication none */ + WIFI_EAP_AUTH_TYPE_PAP = 1, /**< EAP phase2 authentication PAP */ + WIFI_EAP_AUTH_TYPE_MSCHAP = 2, /**< EAP phase2 authentication MSCHAP */ + WIFI_EAP_AUTH_TYPE_MSCHAPV2 = 3, /**< EAP phase2 authentication MSCHAPv2 */ + WIFI_EAP_AUTH_TYPE_GTC = 4, /**< EAP phase2 authentication GTC */ + WIFI_EAP_AUTH_TYPE_MD5 = 5, /**< EAP phase2 authentication MD5 */ } wifi_eap_auth_type_e; /** @@ -471,10 +460,10 @@ int wifi_deinitialize(void) TIZEN_DEPRECATED_API; * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.set \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] callback The callback function to be called \n - * This can be @c NULL if you don't want to get the notification. + * This can be @c NULL if you don't want to get the notification. * @param[in] user_data The user data passed to the callback function * @return 0 on success, otherwise negative error value * @retval #WIFI_ERROR_NONE Successful @@ -495,10 +484,10 @@ int wifi_activate(wifi_activated_cb callback, void *user_data) TIZEN_DEPRECATED_ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.set \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] callback The callback function to be called \n - * This can be @c NULL if you don't want to get the notification. + * This can be @c NULL if you don't want to get the notification. * @param[in] user_data The user data passed to the callback function * @return 0 on success, otherwise negative error value * @retval #WIFI_ERROR_NONE Successful @@ -519,7 +508,7 @@ int wifi_activate_with_wifi_picker_tested(wifi_activated_cb callback, void *user * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.set \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] callback The callback function to be called \n * This can be @c NULL if you don't want to get the notification. @@ -591,7 +580,7 @@ int wifi_get_network_interface_name(char** name) TIZEN_DEPRECATED_API; * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.set \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] callback The callback function to be called * @param[in] user_data The user data passed to the callback function @@ -689,7 +678,7 @@ int wifi_foreach_found_specific_aps(wifi_found_ap_cb callback, void* user_data) * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.set \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] ap The access point handle * @param[in] callback The callback function to be called \n @@ -716,7 +705,7 @@ int wifi_connect(wifi_ap_h ap, wifi_connected_cb callback, void *user_data) TIZE * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.set \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] ap The access point handle * @param[in] callback The callback function to be called \n @@ -743,7 +732,7 @@ int wifi_disconnect(wifi_ap_h ap, wifi_disconnected_cb callback, void *user_data * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.profile \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] ap The access point handle * @param[in] callback The callback function to be called \n @@ -770,7 +759,7 @@ int wifi_connect_by_wps_pbc(wifi_ap_h ap, wifi_connected_cb callback, void *user * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.profile \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] ap The access point handle * @param[in] pin The WPS PIN is a non-NULL string with length greater than 0 and less than or equal to 8 @@ -799,7 +788,7 @@ int wifi_connect_by_wps_pin(wifi_ap_h ap, const char *pin, wifi_connected_cb cal * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.profile \n -* %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] ap The access point handle * @return 0 on success, otherwise negative error value @@ -1216,7 +1205,7 @@ int wifi_ap_get_ip_address(wifi_ap_h ap, wifi_address_family_e address_family, c * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.profile \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] ap The access point handle * @param[in] address_family The address family @@ -1254,7 +1243,7 @@ int wifi_ap_get_subnet_mask(wifi_ap_h ap, wifi_address_family_e address_family, * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.profile \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] ap The access point handle * @param[in] address_family The address family @@ -1292,7 +1281,7 @@ int wifi_ap_get_gateway_address(wifi_ap_h ap, wifi_address_family_e address_fami * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.profile \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] ap The access point handle * @param[in] address_family The address family @@ -1331,7 +1320,7 @@ int wifi_ap_get_proxy_address(wifi_ap_h ap, wifi_address_family_e address_family * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.profile \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] ap The access point handle * @param[in] address_family The address family @@ -1368,7 +1357,7 @@ int wifi_ap_get_proxy_type(wifi_ap_h ap, wifi_proxy_type_e* type) TIZEN_DEPRECAT * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.profile \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remark This API needs both privileges. * @param[in] ap The access point handle * @param[in] proxy_type The type of proxy @@ -1405,7 +1394,7 @@ int wifi_ap_get_dns_address(wifi_ap_h ap, int order, wifi_address_family_e addre * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/network.profile \n - * %http://tizen.org/privilege/network.get + * %http://tizen.org/privilege/network.get * @remarks The allowance of DNS address is @c 2 \n * This API needs both privileges. * @param[in] ap The access point handle @@ -1573,7 +1562,7 @@ int wifi_ap_set_eap_passphrase(wifi_ap_h ap, const char* user_name, const char* * @brief Gets the passphrase of EAP. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_PEAP or #WIFI_EAP_TYPE_TTLS. - * You must release @a user_name using free(). + * You must release @a user_name using free(). * @param[in] ap The access point handle * @param[out] user_name The user name * @param[out] is_password_set @c ture if password is set, @@ -1592,7 +1581,7 @@ int wifi_ap_get_eap_passphrase(wifi_ap_h ap, char** user_name, bool* is_password * @brief Gets the CA Certificate of EAP. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS. - * You must release @a file using free(). + * You must release @a file using free(). * @param[in] ap The access point handle * @param[out] file The file path of CA Certificate * @return 0 on success, otherwise negative error value @@ -1624,7 +1613,7 @@ int wifi_ap_set_eap_ca_cert_file(wifi_ap_h ap, const char* file) TIZEN_DEPRECATE * @brief Gets the Client Certificate of EAP. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS. - * You must release @a file using free(). + * You must release @a file using free(). * @param[in] ap The access point handle * @param[out] file The file path of Client Certificate * @return 0 on success, otherwise negative error value @@ -1656,7 +1645,7 @@ int wifi_ap_set_eap_client_cert_file(wifi_ap_h ap, const char* file) TIZEN_DEPRE * @brief Gets the private key file of EAP. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS. - * You must release @a file using free(). + * You must release @a file using free(). * @param[in] ap The access point handle * @param[out] file The file path of private key * @return 0 on success, otherwise negative error value @@ -2017,9 +2006,9 @@ int wifi_config_set_eap_anonymous_identity(wifi_config_h config, const char* ano * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @remarks You must release @a ca_cert using free(). * @remarks The mediastorage privilege http://tizen.org/privilege/mediastorage is needed \n - * if @a image_path is relevant to media storage.\n - * The externalstorage privilege http://tizen.org/privilege/externalstorage is needed \n - * if @a image_path is relevant to external storage. + * if @a image_path is relevant to media storage.\n + * The externalstorage privilege http://tizen.org/privilege/externalstorage is needed \n + * if @a image_path is relevant to external storage. * * @param[in] config The access point configuration handle * @param[out] ca_cert The certification authority(CA) certificates file of access point @@ -2037,9 +2026,9 @@ int wifi_config_get_eap_ca_cert_file(wifi_config_h config, char** ca_cert) TIZEN * @privlevel public * @privilege %http://tizen.org/privilege/network.profile * @remarks The mediastorage privilege http://tizen.org/privilege/mediastorage is needed \n - * if @a image_path is relevant to media storage.\n - * The externalstorage privilege http://tizen.org/privilege/externalstorage is needed \n - * if @a image_path is relevant to external storage. + * if @a image_path is relevant to media storage.\n + * The externalstorage privilege http://tizen.org/privilege/externalstorage is needed \n + * if @a image_path is relevant to external storage. * * @param[in] config The access point configuration handle * @param[in] ca_cert The certification authority(CA) certificates file of access point @@ -2224,8 +2213,7 @@ int wifi_config_set_eap_subject_match(wifi_config_h config, const char* subject_ * @brief Enumeration for the state of the Wi-Fi TDLS. * @since_tizen 3.0 */ -typedef enum -{ +typedef enum { WIFI_TDLS_STATE_DISCONNECTED = 0, /**< Wi-Fi TDLS is Disconnected */ WIFI_TDLS_STATE_CONNECTED = 1, /**< Wi-Fi TDLS is Connected */ } wifi_tdls_state_e; diff --git a/include/wifi_config_private.h b/include/wifi_config_private.h index f509eb3..11fd883 100755 --- a/include/wifi_config_private.h +++ b/include/wifi_config_private.h @@ -34,13 +34,13 @@ struct _wifi_eap_config { }; struct _wifi_config { - // mandatory + /* mandatory */ gchar *name; gchar *passphrase; wifi_security_type_e security_type; gboolean is_saved; - // optional field is set using wifi_config_set_field + /* optional field is set using wifi_config_set_field */ gboolean is_hidden; gchar *proxy_address; wifi_address_family_e address_family; @@ -60,7 +60,7 @@ int wifi_configuration_set_field(wifi_dbus *handle, const gchar *config_id, cons int wifi_configuration_get_passphrase(wifi_dbus *handle, const gchar *config_id, gchar **passphrase); int wifi_save_eap_configurations(wifi_dbus *handle, const gchar *name, const gchar *passphrase, wifi_security_type_e security_type, const gchar *proxy_address, struct _wifi_eap_config *eap_config, gboolean is_hidden); -int wifi_load_eap_configurations(wifi_dbus *handle, const gchar *config_id, gchar **name, wifi_security_type_e *security_type, gchar **proxy_address, gboolean *is_hidden, struct _wifi_eap_config **eap_config,wifi_error_e *last_error); +int wifi_load_eap_configurations(wifi_dbus *handle, const gchar *config_id, gchar **name, wifi_security_type_e *security_type, gchar **proxy_address, gboolean *is_hidden, struct _wifi_eap_config **eap_config, wifi_error_e *last_error); wifi_eap_type_e wifi_eap_type_to_int(const gchar *type); wifi_eap_auth_type_e wifi_eap_auth_type_to_int(const gchar *type); gchar *wifi_eap_type_to_string(wifi_eap_type_e eap_type); |