2 * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_NETWORK_WIFI_H__
18 #define __TIZEN_NETWORK_WIFI_H__
27 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_MODULE
32 * @brief The Wi-Fi error type
36 WIFI_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
37 WIFI_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
38 WIFI_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory error */
39 WIFI_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Invalid operation */
40 WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED, /**< Address family not supported */
41 WIFI_ERROR_OPERATION_FAILED = TIZEN_ERROR_NETWORK_CLASS|0x0301, /**< Operation failed */
42 WIFI_ERROR_NO_CONNECTION = TIZEN_ERROR_NETWORK_CLASS|0x0302, /**< There is no connected AP */
43 WIFI_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS, /** Now in progress */
44 WIFI_ERROR_ALREADY_EXISTS = TIZEN_ERROR_NETWORK_CLASS|0x0303, /**< Already exists */
45 WIFI_ERROR_OPERATION_ABORTED = TIZEN_ERROR_NETWORK_CLASS|0x0304, /**< Operation is aborted */
46 WIFI_ERROR_DHCP_FAILED = TIZEN_ERROR_NETWORK_CLASS|0x0306, /**< DHCP failed */
47 WIFI_ERROR_INVALID_KEY = TIZEN_ERROR_NETWORK_CLASS|0x0307, /**< Invalid key */
48 WIFI_ERROR_NO_REPLY = TIZEN_ERROR_NETWORK_CLASS|0x0308, /**< No reply */
49 WIFI_ERROR_SECURITY_RESTRICTED = TIZEN_ERROR_NETWORK_CLASS|0x0309, /**< Restricted by security system policy */
58 * @addtogroup CAPI_NETWORK_WIFI_MONITOR_MODULE
63 * @brief The state of Wi-Fi device
67 WIFI_DEVICE_STATE_DEACTIVATED = 0, /**< Wi-Fi is Deactivated */
68 WIFI_DEVICE_STATE_ACTIVATED = 1, /**< Wi-Fi is activated */
69 } wifi_device_state_e;
72 * @brief The state of Wi-Fi connection
76 WIFI_CONNECTION_STATE_DISCONNECTED = 0, /**< Disconnected state */
77 WIFI_CONNECTION_STATE_ASSOCIATION = 1, /**< Association state */
78 WIFI_CONNECTION_STATE_CONFIGURATION = 2, /**< Configuration state */
79 WIFI_CONNECTION_STATE_CONNECTED = 3, /**< Connected state */
80 } wifi_connection_state_e;
83 * @brief The RSSI level
87 WIFI_RSSI_LEVEL_0 = 0, /**< level 0 */
88 WIFI_RSSI_LEVEL_1 = 1, /**< level 1 */
89 WIFI_RSSI_LEVEL_2 = 2, /**< level 2 */
90 WIFI_RSSI_LEVEL_3 = 3, /**< level 3 */
91 WIFI_RSSI_LEVEL_4 = 4, /**< level 4 */
100 * @addtogroup CAPI_NETWORK_WIFI_AP_NETWORK_MODULE
105 * @brief Net IP configuration Type
109 WIFI_IP_CONFIG_TYPE_NONE = 0, /**< Not defined */
110 WIFI_IP_CONFIG_TYPE_STATIC = 1, /**< Manual IP configuration */
111 WIFI_IP_CONFIG_TYPE_DYNAMIC = 2, /**< Config IP using DHCP client*/
112 WIFI_IP_CONFIG_TYPE_AUTO = 3, /**< Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available */
113 WIFI_IP_CONFIG_TYPE_FIXED = 4, /**< Indicates an IP address that can not be modified */
114 } wifi_ip_config_type_e;
117 * @brief Address type
121 WIFI_ADDRESS_FAMILY_IPV4 = 0, /**< IPV4 Address family */
122 WIFI_ADDRESS_FAMILY_IPV6 = 1, /**< IPV6 Address family */
123 } wifi_address_family_e;
126 * @brief This enumeration defines the proxy method type.
130 WIFI_PROXY_TYPE_DIRECT = 0, /**< Direct connection */
131 WIFI_PROXY_TYPE_AUTO = 1, /**< Auto configuration(Use PAC file). If URL property is not set, DHCP/WPAD auto-discover will be tried */
132 WIFI_PROXY_TYPE_MANUAL = 2 /**< Manual configuration */
141 * @addtogroup CAPI_NETWORK_WIFI_AP_SECURITY_MODULE
146 * @brief Below security modes are used in infrastructure and ad-hoc mode
147 * For now all EAP security mechanisms are provided only in infrastructure mode
151 WIFI_SECURITY_TYPE_NONE = 0, /**< Security disabled */
152 WIFI_SECURITY_TYPE_WEP = 1, /**< WEP */
153 WIFI_SECURITY_TYPE_WPA_PSK = 2, /**< WPA-PSK */
154 WIFI_SECURITY_TYPE_WPA2_PSK = 3, /**< WPA2-PSK */
155 WIFI_SECURITY_TYPE_EAP = 4, /**< EAP */
156 } wifi_security_type_e;
159 * @brief Below encryption modes are used in infrastructure and ad-hoc mode
163 WIFI_ENCRYPTION_TYPE_NONE = 0, /**< Encryption disabled */
164 WIFI_ENCRYPTION_TYPE_WEP = 1, /**< WEP */
165 WIFI_ENCRYPTION_TYPE_TKIP = 2, /**< TKIP */
166 WIFI_ENCRYPTION_TYPE_AES = 3, /**< AES */
167 WIFI_ENCRYPTION_TYPE_TKIP_AES_MIXED = 4, /**< TKIP and AES are both supported */
168 } wifi_encryption_type_e;
176 * @addtogroup CAPI_NETWORK_WIFI_AP_SECURITY_EAP_MODULE
185 WIFI_EAP_TYPE_PEAP = 0, /**< EAP PEAP type */
186 WIFI_EAP_TYPE_TLS = 1, /**< EAP TLS type */
187 WIFI_EAP_TYPE_TTLS = 2, /**< EAP TTLS type */
188 WIFI_EAP_TYPE_SIM = 3, /**< EAP SIM type */
189 WIFI_EAP_TYPE_AKA = 4, /**< EAP AKA type */
193 * @brief EAP phase2 authentication type
197 WIFI_EAP_AUTH_TYPE_NONE = 0, /**< EAP phase2 authentication none */
198 WIFI_EAP_AUTH_TYPE_PAP = 1, /**< EAP phase2 authentication PAP */
199 WIFI_EAP_AUTH_TYPE_MSCHAP = 2, /**< EAP phase2 authentication MSCHAP */
200 WIFI_EAP_AUTH_TYPE_MSCHAPV2 = 3, /**< EAP phase2 authentication MSCHAPv2 */
201 WIFI_EAP_AUTH_TYPE_GTC = 4, /**< EAP phase2 authentication GTC */
202 WIFI_EAP_AUTH_TYPE_MD5 = 5, /**< EAP phase2 authentication MD5 */
203 } wifi_eap_auth_type_e;
211 * @addtogroup CAPI_NETWORK_WIFI_AP_MODULE
216 * @brief The handle for Wi-Fi access point.
218 typedef void* wifi_ap_h;
226 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_MODULE
231 * @brief Called when you get the found access point repeatedly.
232 * @remarks @a ap is valid only in this function. In order to use the ap outside this function, you must copy the ap with wifi_ap_clone().
233 * @param[in] ap The access point
234 * @param[in] user_data The user data passed from the request function
235 * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
236 * @pre wifi_foreach_found_aps() and wifi_foreach_found_hidden_aps() will invoke this callback.
237 * @see wifi_foreach_found_aps()
238 * @see wifi_foreach_found_hidden_aps()
240 typedef bool(*wifi_found_ap_cb)(wifi_ap_h ap, void* user_data);
243 * @brief Called when the scan is finished.
244 * @param[in] error_code The error code
245 * @param[in] user_data The user data passed from the callback registration function
247 * @see wifi_scan_hidden_ap()
248 * @see wifi_set_background_scan_cb()
249 * @see wifi_unset_background_scan_cb()
251 typedef void(*wifi_scan_finished_cb)(wifi_error_e error_code, void* user_data);
254 * @brief Called after wifi_activate() is completed.
255 * @param[in] result The result
256 * @param[in] user_data The user data passed from wifi_activate()
257 * @pre wifi_activate() will invoke this callback function.
258 * @see wifi_activate()
260 typedef void(*wifi_activated_cb)(wifi_error_e result, void* user_data);
263 * @brief Called after wifi_deactivate() is completed.
264 * @param[in] result The result
265 * @param[in] user_data The user data passed from wifi_deactivate()
266 * @pre wifi_deactivate() will invoke this callback function.
267 * @see wifi_deactivate()
269 typedef void(*wifi_deactivated_cb)(wifi_error_e result, void* user_data);
272 * @brief Called after either wifi_connect() or wifi_connect_by_wps_pbc() are completed.
273 * @param[in] result The result
274 * @param[in] user_data The user data passed from either wifi_connect() or wifi_connect_by_wps_pbc()
275 * @pre Either wifi_connect() or wifi_connect_by_wps_pbc() will invoke this callback function.
276 * @see wifi_connect()
277 * @see wifi_connect_by_wps_pbc()
279 typedef void(*wifi_connected_cb)(wifi_error_e result, void* user_data);
282 * @brief Called after wifi_disconnect() is completed.
283 * @param[in] result The result
284 * @param[in] user_data The user data passed from wifi_disconnect()
285 * @pre wifi_disconnect() will invoke this callback function.
286 * @see wifi_disconnect()
288 typedef void(*wifi_disconnected_cb)(wifi_error_e result, void* user_data);
296 * @addtogroup CAPI_NETWORK_WIFI_MONITOR_MODULE
301 * @brief Called when the device state is changed.
302 * @param[in] state The device state
303 * @param[in] user_data The user data passed from the callback registration function
304 * @see wifi_set_device_state_changed_cb()
305 * @see wifi_unset_device_state_changed_cb()
307 typedef void(*wifi_device_state_changed_cb)(wifi_device_state_e state, void* user_data);
310 * @brief Called when the connection state is changed.
311 * @param[in] state The connection state
312 * @param[in] ap The access point
313 * @param[in] user_data The user data passed from the callback registration function
314 * @see wifi_set_connection_state_changed_cb()
315 * @see wifi_unset_connection_state_changed_cb()
317 typedef void(*wifi_connection_state_changed_cb)(wifi_connection_state_e state, wifi_ap_h ap, void* user_data);
320 * @brief Called when the RSSI of connected Wi-Fi changed.
321 * @param[in] rssi_level The level of RSSI
322 * @param[in] user_data The user data passed from the callback registration function
323 * @see wifi_set_rssi_level_changed_cb()
324 * @see wifi_unset_rssi_level_changed_cb()
326 typedef void(*wifi_rssi_level_changed_cb)(wifi_rssi_level_e rssi_level, void* user_data);
334 * @addtogroup CAPI_NETWORK_WIFI_MODULE
339 * @brief Initializes Wi-Fi
340 * @return 0 on success, otherwise negative error value.
341 * @retval #WIFI_ERROR_NONE Successful
342 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
343 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
345 int wifi_initialize(void);
348 * @brief Deinitializes Wi-Fi
349 * @return 0 on success, otherwise negative error value.
350 * @retval #WIFI_ERROR_NONE Successful
351 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
352 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
354 int wifi_deinitialize(void);
362 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_MODULE
367 * @brief Activates Wi-Fi, asynchronously.
368 * @param[in] callback The callback function to be called. This can be NULL if you don't want to get the notification.
369 * @param[in] user_data The user data passed to the callback function
370 * @return 0 on success, otherwise negative error value.
371 * @retval #WIFI_ERROR_NONE Successful
372 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
373 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
374 * @retval #WIFI_ERROR_SECURITY_RESTRICTED Restricted by security system policy
375 * @post wifi_activated_cb() will be invoked
376 * @see wifi_activated_cb()
377 * @see wifi_deactivate()
379 int wifi_activate(wifi_activated_cb callback, void* user_data);
382 * @brief Deactivates Wi-Fi, asynchronously.
383 * @param[in] callback The callback function to be called. This can be NULL if you don't want to get the notification.
384 * @param[in] user_data The user data passed to the callback function
385 * @return 0 on success, otherwise negative error value.
386 * @retval #WIFI_ERROR_NONE Successful
387 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
388 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
389 * @post wifi_deactivated_cb() will be invoked
390 * @see wifi_deactivated_cb()
391 * @see wifi_activate()
393 int wifi_deactivate(wifi_deactivated_cb callback, void* user_data);
396 * @brief Check whether Wi-Fi is activated.
397 * @param[out] activated Indicates whether wifi is activated or not
398 * @return 0 on success, otherwise negative error value.
399 * @retval #WIFI_ERROR_NONE Successful
400 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
401 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
403 int wifi_is_activated(bool* activated);
406 * @brief Gets the local MAC address.
407 * @remarks @a mac_address must be released with free() by you.
408 * @param[out] mac_address The mac address
409 * @return 0 on success, otherwise negative error value.
410 * @retval #WIFI_ERROR_NONE Successful
411 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
412 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
414 int wifi_get_mac_address(char** mac_address);
417 * @brief Gets the name of network interface.
418 * @remarks @a name must be released with free() by you.
419 * @param[out] name The name of network interface
420 * @return 0 on success, otherwise negative error value.
421 * @retval #WIFI_ERROR_NONE Successful
422 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
423 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
424 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
426 int wifi_get_network_interface_name(char** name);
429 * @brief Starts scan, asynchronously.
430 * @param[in] callback The callback function to be called
431 * @param[in] user_data The user data passed to the callback function
432 * @return 0 on success, otherwise negative error value.
433 * @retval #WIFI_ERROR_NONE Successful
434 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
435 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
436 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
437 * @post This function invokes wifi_scan_finished_cb().
439 int wifi_scan(wifi_scan_finished_cb callback, void* user_data);
442 * @brief Starts hidden ap scan, asynchronously.
443 * @param[in] essid The essid of hidden ap
444 * @param[in] callback The callback function to be called
445 * @param[in] user_data The user data passed to the callback function
446 * @return 0 on success, otherwise negative error value.
447 * @retval #WIFI_ERROR_NONE Successful
448 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
449 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
450 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
451 * @post This function invokes wifi_scan_finished_cb().
453 int wifi_scan_hidden_ap(const char* essid, wifi_scan_finished_cb callback, void* user_data);
456 * @brief Gets the handle of connected access point.
457 * @remarks @a handle must be released with wifi_ap_destroy().
458 * @param[out] ap The handle of access point
459 * @return 0 on success, otherwise negative error value.
460 * @retval #WIFI_ERROR_NONE Successful
461 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
462 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
463 * @retval #WIFI_ERROR_NO_CONNECTION There is no connected AP
465 int wifi_get_connected_ap(wifi_ap_h* ap);
468 * @brief Gets the result of scan.
469 * @param[in] callback The callback to be called
470 * @param[in] user_data The user data passed to the callback function
471 * @return 0 on success, otherwise negative error value.
472 * @retval #WIFI_ERROR_NONE Successful
473 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
474 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
475 * @post This function invokes wifi_found_ap_cb().
477 int wifi_foreach_found_aps(wifi_found_ap_cb callback, void* user_data);
480 * @brief Gets the result of hidden ap scan.
481 * @param[in] callback The callback to be called
482 * @param[in] user_data The user data passed to the callback function
483 * @return 0 on success, otherwise negative error value.
484 * @retval #WIFI_ERROR_NONE Successful
485 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
486 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
487 * @post This function invokes wifi_found_ap_cb().
489 int wifi_foreach_found_hidden_aps(wifi_found_ap_cb callback, void* user_data);
492 * @brief Connects the access point, asynchronously.
493 * @param[in] ap The handle of access point
494 * @param[in] callback The callback function to be called. This can be NULL if you don't want to get the notification.
495 * @param[in] user_data The user data passed to the callback function
496 * @return 0 on success, otherwise negative error value.
497 * @retval #WIFI_ERROR_NONE Successful
498 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
499 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
500 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
501 * @post This function invokes wifi_connected_cb().
502 * @see wifi_connected_cb()
503 * @see wifi_connect_by_wps_pbc()
504 * @see wifi_disconnect()
506 int wifi_connect(wifi_ap_h ap, wifi_connected_cb callback, void* user_data);
509 * @brief Disconnects the access point, asynchronously.
510 * @param[in] ap The handle of access point
511 * @param[in] callback The callback function to be called. This can be NULL if you don't want to get the notification.
512 * @param[in] user_data The user data passed to the callback function
513 * @return 0 on success, otherwise negative error value.
514 * @retval #WIFI_ERROR_NONE Successful
515 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
516 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
517 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
518 * @post This function invokes wifi_disconnected_cb().
519 * @see wifi_disconnected_cb()
520 * @see wifi_connect_by_wps_pbc()
521 * @see wifi_connect()
523 int wifi_disconnect(wifi_ap_h ap, wifi_disconnected_cb callback, void* user_data);
526 * @brief Connects the access point with WPS PBC, asynchronously.
527 * @param[in] ap The handle of access point
528 * @param[in] callback The callback function to be called. This can be NULL if you don't want to get the notification.
529 * @param[in] user_data The user data passed to the callback function
530 * @return 0 on success, otherwise negative error value.
531 * @retval #WIFI_ERROR_NONE Successful
532 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
533 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
534 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
535 * @post This function invokes wifi_connected_cb().
536 * @see wifi_connected_cb()
537 * @see wifi_connect()
538 * @see wifi_disconnect()
539 * @see wifi_ap_is_wps_supported()
541 int wifi_connect_by_wps_pbc(wifi_ap_h ap, wifi_connected_cb callback, void* user_data);
544 * @brief Deletes the information of stored access point.
545 * @details If an AP is connected, then connection information will be stored.
546 * This information is used when a connection to that AP is established automatically.
547 * @param[in] ap The handle of access point
548 * @return 0 on success, otherwise negative error value.
549 * @retval #WIFI_ERROR_NONE Successful
550 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
551 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
552 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
554 int wifi_forget_ap(wifi_ap_h ap);
562 * @addtogroup CAPI_NETWORK_WIFI_MONITOR_MODULE
567 * @brief Gets connection state
568 * @param[out] connection_state The connection state
569 * @return 0 on success, otherwise negative error value.
570 * @retval #WIFI_ERROR_NONE Successful
571 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
572 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
574 int wifi_get_connection_state(wifi_connection_state_e* connection_state);
577 * @brief Registers the callback called when the device state is changed.
578 * @param[in] callback The callback function to be called
579 * @param[in] user_data The user data passed to the callback function
580 * @return 0 on success, otherwise negative error value.
581 * @retval #WIFI_ERROR_NONE Successful
582 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
583 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
585 int wifi_set_device_state_changed_cb(wifi_device_state_changed_cb callback, void* user_data);
588 * @brief Unregisters the callback called when the device state is changed.
589 * @return 0 on success, otherwise negative error value.
590 * @retval #WIFI_ERROR_NONE Successful
591 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
593 int wifi_unset_device_state_changed_cb(void);
596 * @brief Registers the callback called when the background scan is finished periodically.
597 * @param[in] callback The callback function to be called
598 * @param[in] user_data The user data passed to the callback function
599 * @return 0 on success, otherwise negative error value.
600 * @retval #WIFI_ERROR_NONE Successful
601 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
602 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
604 int wifi_set_background_scan_cb(wifi_scan_finished_cb callback, void* user_data);
607 * @brief Unregisters the callback called when the scan is finished periodically.
608 * @return 0 on success, otherwise negative error value.
609 * @retval #WIFI_ERROR_NONE Successful
610 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
612 int wifi_unset_background_scan_cb(void);
615 * @brief Registers the callback called when the connection state is changed.
616 * @param[in] callback The callback function to be called
617 * @param[in] user_data The user data passed to the callback function
618 * @return 0 on success, otherwise negative error value.
619 * @retval #WIFI_ERROR_NONE Successful
620 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
621 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
623 int wifi_set_connection_state_changed_cb(wifi_connection_state_changed_cb callback, void* user_data);
626 * @brief Unregisters the callback called when the connection state is changed.
627 * @return 0 on success, otherwise negative error value.
628 * @retval #WIFI_ERROR_NONE Successful
629 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
631 int wifi_unset_connection_state_changed_cb(void);
634 * @brief Registers callback called when the RSSI of connected Wi-Fi changed.
635 * @param[in] callback The callback function to be called
636 * @param[in] user_data The user data passed to the callback function
637 * @return 0 on success, otherwise negative error value.
638 * @retval #WIFI_ERROR_NONE Successful
639 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
640 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
642 int wifi_set_rssi_level_changed_cb(wifi_rssi_level_changed_cb callback, void* user_data);
645 * @brief Unregisters callback called when the RSSI of connected Wi-Fi changed.
646 * @return 0 on success, otherwise negative error value.
647 * @retval #WIFI_ERROR_NONE Successful
648 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
650 int wifi_unset_rssi_level_changed_cb(void);
658 * @addtogroup CAPI_NETWORK_WIFI_AP_MODULE
663 * @brief Creates the handle of access point.
664 * @remarks @a ap must be released with wifi_ap_destroy().
665 * @param[in] essid The ESSID(Extended Service Set Identifier)
666 * @param[out] ap The handle of access point
667 * @return 0 on success, otherwise negative error value.
668 * @retval #WIFI_ERROR_NONE Successful
669 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
670 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
671 * @see wifi_ap_destroy()
673 int wifi_ap_create(const char* essid, wifi_ap_h* ap);
676 * @brief Destroys the handle of access point.
677 * @param[in] ap The handle of access point
678 * @return 0 on success, otherwise negative error value.
679 * @retval #WIFI_ERROR_NONE Successful
680 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
681 * @see wifi_ap_create()
683 int wifi_ap_destroy(wifi_ap_h ap);
686 * @brief Clons the handle of access point.
687 * @remarks @a cloned_ap must be released with wifi_ap_destroy().
688 * @param[out] cloned_ap The handle of cloned access point
689 * @param[in] origin The handle of origin access point
690 * @return 0 on success, otherwise negative error value.
691 * @retval #WIFI_ERROR_NONE Successful
692 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
693 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
694 * @see wifi_ap_destroy()
696 int wifi_ap_clone(wifi_ap_h* cloned_ap, wifi_ap_h origin);
699 * @brief Refresh the information of access point.
700 * @remarks You should call this function in order to get the current information because the information of access point can be changed.
701 * @param[in] ap The handle of access point
702 * @return 0 on success, otherwise negative error value.
703 * @retval #WIFI_ERROR_NONE Successful
704 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
705 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
706 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
708 int wifi_ap_refresh(wifi_ap_h ap);
716 * @addtogroup CAPI_NETWORK_WIFI_AP_NETWORK_MODULE
721 * @brief Gets ESSID(Extended Service Set Identifier).
722 * @remarks @a essid must be released with free() by you.
723 * @param[in] ap The handle of access point
724 * @param[out] essid The ESSID
725 * @return 0 on success, otherwise negative error value.
726 * @retval #WIFI_ERROR_NONE Successful
727 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
728 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
730 int wifi_ap_get_essid(wifi_ap_h ap, char** essid);
733 * @brief Gets BSSID(Basic Service Set Identifier).
734 * @remarks @a bssid must be released with free() by you.
735 * @param[in] ap The handle of access point
736 * @param[out] bssid The BSSID
737 * @return 0 on success, otherwise negative error value.
738 * @retval #WIFI_ERROR_NONE Successful
739 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
740 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
742 int wifi_ap_get_bssid(wifi_ap_h ap, char** bssid);
745 * @brief Gets the RSSI.
746 * @param[in] ap The handle of access point
747 * @param[out] rssi The RSSI
748 * @return 0 on success, otherwise negative error value.
749 * @retval #WIFI_ERROR_NONE Successful
750 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
751 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
753 int wifi_ap_get_rssi(wifi_ap_h ap, int* rssi);
756 * @brief Gets the Frequency band (MHz).
757 * @param[in] ap The handle of access point
758 * @param[out] frequency The frequency
759 * @return 0 on success, otherwise negative error value.
760 * @retval #WIFI_ERROR_NONE Successful
761 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
762 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
764 int wifi_ap_get_frequency(wifi_ap_h ap, int* frequency);
767 * @brief Gets the max speed (Mbps).
768 * @param[in] ap The handle of access point
769 * @param[out] max_speed The max speed
770 * @return 0 on success, otherwise negative error value.
771 * @retval #WIFI_ERROR_NONE Successful
772 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
773 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
775 int wifi_ap_get_max_speed(wifi_ap_h ap, int* max_speed);
778 * @brief Indicates whether the access point is favorite or not.
779 * @param[in] ap The handle of access point
780 * @param[out] favourite Indicates whether access point is favorite or not.
781 * @return 0 on success, otherwise negative error value.
782 * @retval #WIFI_ERROR_NONE Successful
783 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
784 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
786 int wifi_ap_is_favorite(wifi_ap_h ap, bool* favorite);
789 * @brief Gets the connection state.
790 * @param[in] ap The handle of access point
791 * @param[out] state The connection state
792 * @return 0 on success, otherwise negative error value.
793 * @retval #WIFI_ERROR_NONE Successful
794 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
795 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
797 int wifi_ap_get_connection_state(wifi_ap_h ap, wifi_connection_state_e* state);
800 * @brief Gets the config type of IP.
801 * @param[in] ap The handle of access point
802 * @param[in] address_family The address family
803 * @param[out] type The type of IP config
804 * @return 0 on success, otherwise negative error value.
805 * @retval #WIFI_ERROR_NONE Successful
806 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
807 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
808 * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported
810 int wifi_ap_get_ip_config_type(wifi_ap_h ap, wifi_address_family_e address_family, wifi_ip_config_type_e* type);
813 * @brief Sets the config type of IP.
814 * @details If you set IP config type to #WIFI_IP_CONFIG_TYPE_STATIC,
815 * then IP address, Gateway and Subnet mask will be set to the initial value "0.0.0.0".
816 * @param[in] ap The handle of access point
817 * @param[in] address_family The address family
818 * @param[in] type The type of IP config
819 * @return 0 on success, otherwise negative error value.
820 * @retval #WIFI_ERROR_NONE Successful
821 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
822 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
823 * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported
825 int wifi_ap_set_ip_config_type(wifi_ap_h ap, wifi_address_family_e address_family, wifi_ip_config_type_e type);
828 * @brief Gets the IP address.
829 * @remarks @a ip_address must be released with free() by you.
830 * @param[in] ap The handle of access point
831 * @param[in] address_family The address family
832 * @param[out] ip_address The IP address
833 * @return 0 on success, otherwise negative error value.
834 * @retval #WIFI_ERROR_NONE Successful
835 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
836 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
837 * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported
839 int wifi_ap_get_ip_address(wifi_ap_h ap, wifi_address_family_e address_family, char** ip_address);
842 * @brief Sets the IP address.
843 * @param[in] ap The handle of access point
844 * @param[in] address_family The address family
845 * @param[in] ip_address The IP address. If you set this value to NULL, then the existing value will be deleted.
846 * @return 0 on success, otherwise negative error value.
847 * @retval #WIFI_ERROR_NONE Successful
848 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
849 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
850 * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported
852 int wifi_ap_set_ip_address(wifi_ap_h ap, wifi_address_family_e address_family, const char* ip_address);
855 * @brief Gets the subnet mask.
856 * @remarks @a subnet_mask must be released with free() by you.
857 * @param[in] ap The handle of access point
858 * @param[in] address_family The address family
859 * @param[out] subnet_mask The subnet mask
860 * @return 0 on success, otherwise negative error value.
861 * @retval #WIFI_ERROR_NONE Successful
862 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
863 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
864 * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported
866 int wifi_ap_get_subnet_mask(wifi_ap_h ap, wifi_address_family_e address_family, char** subnet_mask);
869 * @brief Sets the subnet mask.
870 * @param[in] ap The handle of access point
871 * @param[in] address_family The address family
872 * @param[in] subnet_mask The subnet mask. If you set this value to NULL, then the existing value will be deleted.
873 * @return 0 on success, otherwise negative error value.
874 * @retval #WIFI_ERROR_NONE Successful
875 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
876 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
877 * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported
879 int wifi_ap_set_subnet_mask(wifi_ap_h ap, wifi_address_family_e address_family, const char* subnet_mask);
882 * @brief Gets the gateway address.
883 * @remarks @a gateway_address must be released with free() by you.
884 * @param[in] ap The handle of access point
885 * @param[in] address_family The address family
886 * @param[out] gateway_address The gateway address
887 * @return 0 on success, otherwise negative error value.
888 * @retval #WIFI_ERROR_NONE Successful
889 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
890 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
891 * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported
893 int wifi_ap_get_gateway_address(wifi_ap_h ap, wifi_address_family_e address_family, char** gateway_address);
896 * @brief Sets the gateway address.
897 * @param[in] ap The handle of access point
898 * @param[in] address_family The address family
899 * @param[in] gateway_address The gateway address. If you set this value to NULL, then the existing value will be deleted.
900 * @return 0 on success, otherwise negative error value.
901 * @retval #WIFI_ERROR_NONE Successful
902 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
903 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
904 * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported
906 int wifi_ap_set_gateway_address(wifi_ap_h ap, wifi_address_family_e address_family, const char* gateway_address);
909 * @brief Gets the proxy address.
910 * @remarks @a proxy_address must be released with free() by you.
911 * @param[in] ap The handle of access point
912 * @param[in] address_family The address family
913 * @param[out] proxy_address The proxy address
914 * @return 0 on success, otherwise negative error value.
915 * @retval #WIFI_ERROR_NONE Successful
916 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
917 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
918 * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported
920 int wifi_ap_get_proxy_address(wifi_ap_h ap, wifi_address_family_e address_family, char** proxy_address);
923 * @brief Sets the proxy address.
924 * @param[in] ap The handle of access point
925 * @param[in] address_family The address family
926 * @param[in] proxy_address The proxy address. If you set this value to NULL, then the existing value will be deleted.
927 * @return 0 on success, otherwise negative error value.
928 * @retval #WIFI_ERROR_NONE Successful
929 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
930 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
931 * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported
933 int wifi_ap_set_proxy_address(wifi_ap_h ap, wifi_address_family_e address_family, const char* proxy_address);
936 * @brief Gets the Proxy type.
937 * @param[in] ap The handle of access point
938 * @param[out] type The type of proxy
939 * @return 0 on success, otherwise negative error value.
940 * @retval #WIFI_ERROR_NONE Successful
941 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
942 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
944 int wifi_ap_get_proxy_type(wifi_ap_h ap, wifi_proxy_type_e* type);
947 * @brief Sets the Proxy address.
948 * @details If you set Proxy type to #WIFI_PROXY_TYPE_AUTO or #WIFI_PROXY_TYPE_MANUAL, then Proxy will be restored.
949 * @param[in] ap The handle of access point
950 * @param[in] type The type of proxy
951 * @return 0 on success, otherwise negative error value.
952 * @retval #WIFI_ERROR_NONE Successful
953 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
954 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
956 int wifi_ap_set_proxy_type(wifi_ap_h ap, wifi_proxy_type_e proxy_type);
959 * @brief Gets the DNS address.
960 * @remarks The allowance of DNS address is 2. @a dns_address must be released with free() by you.
961 * @param[in] ap The handle of access point
962 * @param[in] order The order of DNS address. It starts from 1, which means first DNS address.
963 * @param[in] address_family The address family
964 * @param[out] dns_address The DNS address
965 * @return 0 on success, otherwise negative error value.
966 * @retval #WIFI_ERROR_NONE Successful
967 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
968 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
969 * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported
971 int wifi_ap_get_dns_address(wifi_ap_h ap, int order, wifi_address_family_e address_family, char** dns_address);
974 * @brief Sets the DNS address.
975 * @remarks The allowance of DNS address is 2.
976 * @param[in] ap The handle of access point
977 * @param[in] order The order of DNS address. It starts from 1, which means first DNS address.
978 * @param[in] address_family The address family
979 * @param[in] dns_address The DNS address. If you set this value to NULL, then the existing value will be deleted.
980 * @return 0 on success, otherwise negative error value.
981 * @retval #WIFI_ERROR_NONE Successful
982 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
983 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
984 * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported
986 int wifi_ap_set_dns_address(wifi_ap_h ap, int order, wifi_address_family_e address_family, const char* dns_address);
994 * @addtogroup CAPI_NETWORK_WIFI_AP_SECURITY_MODULE
999 * @brief Gets the security mode of Wi-Fi.
1000 * @param[in] ap The handle of access point
1001 * @param[out] type The type of Wi-Fi security
1002 * @return 0 on success, otherwise negative error value.
1003 * @retval #WIFI_ERROR_NONE Successful
1004 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1005 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
1007 int wifi_ap_get_security_type(wifi_ap_h ap, wifi_security_type_e* type);
1010 * @brief Sets the security mode of Wi-Fi.
1011 * @param[in] ap The handle of access point
1012 * @param[in] type The type of Wi-Fi security
1013 * @return 0 on success, otherwise negative error value.
1014 * @retval #WIFI_ERROR_NONE Successful
1015 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1016 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
1018 int wifi_ap_set_security_type(wifi_ap_h ap, wifi_security_type_e type);
1021 * @brief Gets the encryption type of Wi-Fi.
1022 * @param[in] ap The handle of access point
1023 * @param[out] type The type of Wi-Fi encryption
1024 * @return 0 on success, otherwise negative error value.
1025 * @retval #WIFI_ERROR_NONE Successful
1026 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1027 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
1029 int wifi_ap_get_encryption_type(wifi_ap_h ap, wifi_encryption_type_e* type);
1032 * @brief Sets the encryption type of Wi-Fi.
1033 * @param[in] ap The handle of access point
1034 * @param[in] type The type of Wi-Fi encryption
1035 * @return 0 on success, otherwise negative error value.
1036 * @retval #WIFI_ERROR_NONE Successful
1037 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1038 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
1040 int wifi_ap_set_encryption_type(wifi_ap_h ap, wifi_encryption_type_e type);
1043 * @brief Indicates whether the passphrase is required or not.
1044 * @remarks This function is not valid if security type is #WIFI_SECURITY_TYPE_EAP.
1045 * @param[in] ap The handle of access point
1046 * @param[out] required Indicates whether passphrase is required or not
1047 * @return 0 on success, otherwise negative error value.
1048 * @retval #WIFI_ERROR_NONE Successful
1049 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1050 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
1052 int wifi_ap_is_passphrase_required(wifi_ap_h ap, bool* required);
1055 * @brief Sets the passphrase.
1056 * @param[in] ap The handle of access point
1057 * @param[in] passphrase The passphrase of access point
1058 * @return 0 on success, otherwise negative error value.
1059 * @retval #WIFI_ERROR_NONE Successful
1060 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1061 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
1063 int wifi_ap_set_passphrase(wifi_ap_h ap, const char* passphrase);
1066 * @brief Indicates whether the WPS(Wi-Fi Protected Setup) is supported or not.
1067 * @param[in] ap The handle of access point
1068 * @param[out] supported Indicates whether WPS is supported or not
1069 * @return 0 on success, otherwise negative error value.
1070 * @retval #WIFI_ERROR_NONE Successful
1071 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1072 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
1073 * @see wifi_connect_by_wps_pbc()
1075 int wifi_ap_is_wps_supported(wifi_ap_h ap, bool* supported);
1083 * @addtogroup CAPI_NETWORK_WIFI_AP_SECURITY_EAP_MODULE
1088 * @brief Sets the passphrase of EAP.
1089 * @details You can set one of @a user_name and @a password as NULL.
1090 * In this case, the value of a parameter which is set as NULL will be the previous value.
1091 * But it is not allowed that both @a user_name and @a password are set as NULL.
1092 * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_PEAP or #WIFI_EAP_TYPE_TTLS.
1093 * @param[in] ap The handle of access point
1094 * @param[in] user_name The user name. This value can be NULL.
1095 * @param[in] password The password. This value can be NULL.
1096 * @return 0 on success, otherwise negative error value.
1097 * @retval #WIFI_ERROR_NONE Successful
1098 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1099 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
1101 int wifi_ap_set_eap_passphrase(wifi_ap_h ap, const char* user_name, const char* password);
1104 * @brief Gets the passphrase of EAP.
1105 * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_PEAP or #WIFI_EAP_TYPE_TTLS.
1106 * @a user_name must be released with free() by you.
1107 * @param[in] ap The handle of access point
1108 * @param[out] user_name The user name
1109 * @param[out] password Indicates whether password is set or not (@c true = set, @c false = not set)
1110 * @return 0 on success, otherwise negative error value.
1111 * @retval #WIFI_ERROR_NONE Successful
1112 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1113 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
1114 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
1116 int wifi_ap_get_eap_passphrase(wifi_ap_h ap, char** user_name, bool* is_password_set);
1119 * @brief Gets the CA Certificate of EAP.
1120 * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
1121 * @a file must be released with free() by you.
1122 * @param[in] ap The handle of access point
1123 * @param[out] file The file path of CA Certificate
1124 * @return 0 on success, otherwise negative error value.
1125 * @retval #WIFI_ERROR_NONE Successful
1126 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1127 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
1128 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
1130 int wifi_ap_get_eap_ca_cert_file(wifi_ap_h ap, char** file);
1133 * @brief Sets the CA Certificate of EAP.
1134 * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
1135 * @param[in] ap The handle of access point
1136 * @param[in] file The file path of CA Certificate
1137 * @return 0 on success, otherwise negative error value.
1138 * @retval #WIFI_ERROR_NONE Successful
1139 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1140 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
1142 int wifi_ap_set_eap_ca_cert_file(wifi_ap_h ap, const char* file);
1145 * @brief Gets the Client Certificate of EAP.
1146 * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
1147 * @a file must be released with free() by you.
1148 * @param[in] ap The handle of access point
1149 * @param[out] file The file path of Client Certificate
1150 * @return 0 on success, otherwise negative error value.
1151 * @retval #WIFI_ERROR_NONE Successful
1152 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1153 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
1154 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
1156 int wifi_ap_get_eap_client_cert_file(wifi_ap_h ap, char** file);
1159 * @brief Sets the CA Certificate of EAP.
1160 * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
1161 * @param[in] ap The handle of access point
1162 * @param[in] file The file path of Client Certificate
1163 * @return 0 on success, otherwise negative error value.
1164 * @retval #WIFI_ERROR_NONE Successful
1165 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1166 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
1168 int wifi_ap_set_eap_client_cert_file(wifi_ap_h ap, const char* file);
1171 * @brief Gets the private key file of EAP.
1172 * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
1173 * @a file must be released with free() by you.
1174 * @param[in] ap The handle of access point
1175 * @param[out] file The file path of private key
1176 * @return 0 on success, otherwise negative error value.
1177 * @retval #WIFI_ERROR_NONE Successful
1178 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1179 * @retval #WIFI_ERROR_OUT_OF_MEMORY Out of memory
1180 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
1182 int wifi_ap_get_eap_private_key_file(wifi_ap_h ap, char** file);
1185 * @brief Sets the private key information of EAP.
1186 * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
1187 * @param[in] ap The handle of access point
1188 * @param[in] file The file path of private key
1189 * @param[in] password The password
1190 * @return 0 on success, otherwise negative error value.
1191 * @retval #WIFI_ERROR_NONE Successful
1192 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1193 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
1195 int wifi_ap_set_eap_private_key_info(wifi_ap_h ap, const char* file, const char* password);
1198 * @brief Gets the EAP type of Wi-Fi.
1199 * @param[in] ap The handle of access point
1200 * @param[out] type The type of EAP
1201 * @return 0 on success, otherwise negative error value.
1202 * @retval #WIFI_ERROR_NONE Successful
1203 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1204 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
1205 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
1207 int wifi_ap_get_eap_type(wifi_ap_h ap, wifi_eap_type_e* type);
1210 * @brief Sets the EAP type of Wi-Fi.
1211 * @param[in] ap The handle of access point
1212 * @param[in] type The type of EAP
1213 * @return 0 on success, otherwise negative error value.
1214 * @retval #WIFI_ERROR_NONE Successful
1215 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1216 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
1218 int wifi_ap_set_eap_type(wifi_ap_h ap, wifi_eap_type_e type);
1221 * @brief Gets the type of EAP phase2 authentication of Wi-Fi.
1222 * @param[in] ap The handle of access point
1223 * @param[out] type The type of EAP phase2 authentication
1224 * @return 0 on success, otherwise negative error value.
1225 * @retval #WIFI_ERROR_NONE Successful
1226 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1227 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
1228 * @retval #WIFI_ERROR_OPERATION_FAILED Operation failed
1230 int wifi_ap_get_eap_auth_type(wifi_ap_h ap, wifi_eap_auth_type_e* type);
1233 * @brief Sets the type of EAP phase2 authentication of Wi-Fi.
1234 * @param[in] ap The handle of access point
1235 * @param[in] type The type of EAP phase2 authentication
1236 * @return 0 on success, otherwise negative error value.
1237 * @retval #WIFI_ERROR_NONE Successful
1238 * @retval #WIFI_ERROR_INVALID_PARAMETER Invalid parameter
1239 * @retval #WIFI_ERROR_INVALID_OPERATION Invalid operation
1241 int wifi_ap_set_eap_auth_type(wifi_ap_h ap, wifi_eap_auth_type_e type);
1252 #endif /* __TIZEN_NETWORK_WIFI_H__ */