Add a new wifi error type for association failure
[platform/core/api/wifi-manager.git] / include / wifi-manager.h
1 /*
2  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef __TIZEN_WIFI_MANAGER_H__
18 #define __TIZEN_WIFI_MANAGER_H__
19
20 #include <tizen.h>
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /**
27  * @file wifi-manager.h
28  */
29
30 /**
31 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_MODULE
32 * @{
33 */
34
35 /**
36  * @brief The Wi-Fi manager handle.
37  * @since_tizen 3.0
38 */
39 typedef void *wifi_manager_h;
40
41 /**
42  * @brief Enumeration for the Wi-Fi error type.
43  * @since_tizen 3.0
44  */
45 typedef enum {
46         /**
47          * Successful
48          */
49         WIFI_MANAGER_ERROR_NONE = TIZEN_ERROR_NONE,
50
51         /**
52          * Invalid parameter
53          */
54         WIFI_MANAGER_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,
55
56         /**
57          * Out of memory error
58          */
59         WIFI_MANAGER_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,
60
61         /**
62          * Invalid operation
63          */
64         WIFI_MANAGER_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION,
65
66         /**
67          * Address family not supported
68          */
69         WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED,
70
71         /**
72          * Operation failed
73          */
74         WIFI_MANAGER_ERROR_OPERATION_FAILED = TIZEN_ERROR_WIFI_MANAGER|0x01,
75
76         /**
77          * There is no connected AP
78          */
79         WIFI_MANAGER_ERROR_NO_CONNECTION = TIZEN_ERROR_WIFI_MANAGER|0x02,
80
81         /**
82          * Now in progress
83          */
84         WIFI_MANAGER_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS,
85
86         /**
87          * Already exists
88          */
89         WIFI_MANAGER_ERROR_ALREADY_EXISTS = TIZEN_ERROR_WIFI_MANAGER|0x03,
90
91         /**
92          * Operation is aborted
93          */
94         WIFI_MANAGER_ERROR_OPERATION_ABORTED = TIZEN_ERROR_WIFI_MANAGER|0x04,
95
96         /**
97          * DHCP failed
98          */
99         WIFI_MANAGER_ERROR_DHCP_FAILED = TIZEN_ERROR_WIFI_MANAGER|0x05,
100
101         /**
102          * Invalid key
103          */
104         WIFI_MANAGER_ERROR_INVALID_KEY = TIZEN_ERROR_WIFI_MANAGER|0x06,
105
106         /**
107          * No reply
108          */
109         WIFI_MANAGER_ERROR_NO_REPLY = TIZEN_ERROR_WIFI_MANAGER|0x07,
110
111         /**
112          * Restricted by security system policy
113          */
114         WIFI_MANAGER_ERROR_SECURITY_RESTRICTED = TIZEN_ERROR_WIFI_MANAGER|0x08,
115
116         /**
117          * Already initialized
118          */
119         WIFI_MANAGER_ERROR_ALREADY_INITIALIZED = TIZEN_ERROR_WIFI_MANAGER|0x09,
120
121         /**
122          * Out of range
123          */
124         WIFI_MANAGER_ERROR_OUT_OF_RANGE = TIZEN_ERROR_WIFI_MANAGER|0x0A,
125
126         /**
127          * Connect failed
128          */
129         WIFI_MANAGER_ERROR_CONNECT_FAILED = TIZEN_ERROR_WIFI_MANAGER|0x0B,
130
131         /**
132          * Login failed
133          */
134         WIFI_MANAGER_ERROR_LOGIN_FAILED = TIZEN_ERROR_WIFI_MANAGER|0x0C,
135
136         /**
137          * Authentication failed
138          */
139         WIFI_MANAGER_ERROR_AUTHENTICATION_FAILED = TIZEN_ERROR_WIFI_MANAGER|0x0D,
140
141         /**
142          * PIN missing
143          */
144         WIFI_MANAGER_ERROR_PIN_MISSING = TIZEN_ERROR_WIFI_MANAGER|0x0E,
145
146         /**
147          * WPS Overlap (Since 4.0)
148          */
149         WIFI_MANAGER_ERROR_WPS_OVERLAP = TIZEN_ERROR_WIFI_MANAGER|0x0F,
150
151         /**
152          * WPS Timeout (Since 4.0)
153          */
154         WIFI_MANAGER_ERROR_WPS_TIMEOUT = TIZEN_ERROR_WIFI_MANAGER|0x10,
155
156         /**
157          * WPS WEP Prohibited (Since 4.0)
158          */
159         WIFI_MANAGER_ERROR_WPS_WEP_PROHIBITED = TIZEN_ERROR_WIFI_MANAGER|0x11,
160
161         /**
162          * Permission Denied
163          */
164         WIFI_MANAGER_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,
165
166         /**
167          * Connection Offline (Since 5.0)
168          */
169         WIFI_MANAGER_ERROR_OFFLINE = TIZEN_ERROR_WIFI_MANAGER|0x12,
170
171         /**
172          * Invalid Gateway (Since 5.0)
173          */
174         WIFI_MANAGER_ERROR_INVALID_GATEWAY = TIZEN_ERROR_WIFI_MANAGER|0x13,
175
176         /**
177          * Not Supported
178          */
179         WIFI_MANAGER_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED,
180
181         /**
182          * Not initialized (Since 5.0)
183          */
184         WIFI_MANAGER_ERROR_NOT_INITIALIZED = TIZEN_ERROR_WIFI_MANAGER|0x14,
185
186         /**
187          * Association failed (Since 7.0)
188          */
189         WIFI_MANAGER_ERROR_ASSOCIATION_FAILED = TIZEN_ERROR_WIFI_MANAGER|0x15,
190 } wifi_manager_error_e;
191
192
193 /**
194 * @}
195 */
196
197 /**
198 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_MONITOR_MODULE
199 * @{
200 */
201
202 /**
203  * @brief Enumeration for the state of the Wi-Fi device.
204  * @since_tizen 3.0
205  */
206 typedef enum {
207         WIFI_MANAGER_DEVICE_STATE_DEACTIVATED = 0,    /**< Wi-Fi is Deactivated */
208         WIFI_MANAGER_DEVICE_STATE_ACTIVATED = 1,      /**< Wi-Fi is activated */
209 } wifi_manager_device_state_e;
210
211 /**
212  * @brief Enumeration for the state of the Wi-Fi connection.
213  * @since_tizen 3.0
214  */
215 typedef enum {
216         WIFI_MANAGER_CONNECTION_STATE_FAILURE = -1,       /**< Connection failed state */
217         WIFI_MANAGER_CONNECTION_STATE_DISCONNECTED = 0,   /**< Disconnected state */
218         WIFI_MANAGER_CONNECTION_STATE_ASSOCIATION = 1,    /**< Association state */
219         WIFI_MANAGER_CONNECTION_STATE_CONFIGURATION = 2,  /**< Configuration state */
220         WIFI_MANAGER_CONNECTION_STATE_CONNECTED = 3,      /**< Connected state */
221 } wifi_manager_connection_state_e;
222
223 /**
224  * @brief Enumeration for the state of the static IP conflict.
225  * @since_tizen 5.0
226  */
227 typedef enum {
228         WIFI_MANAGER_IP_CONFLICT_STATE_UNKNOWN = 0,            /**< Unknown state */
229         WIFI_MANAGER_IP_CONFLICT_STATE_CONFLICT_NOT_DETECTED = 1,  /**< Resolved state */
230         WIFI_MANAGER_IP_CONFLICT_STATE_CONFLICT_DETECTED = 2,  /**< Conflict state */
231 } wifi_manager_ip_conflict_state_e;
232
233 /**
234  * @brief Enumeration for the RSSI level.
235  * @since_tizen 3.0
236  */
237 typedef enum {
238         WIFI_MANAGER_RSSI_LEVEL_0 = 0,      /**< No signal */
239         WIFI_MANAGER_RSSI_LEVEL_1 = 1,      /**< Very weak signal ~ -83dBm */
240         WIFI_MANAGER_RSSI_LEVEL_2 = 2,      /**< Weak signal -82 ~ -75dBm */
241         WIFI_MANAGER_RSSI_LEVEL_3 = 3,      /**< Strong signal -74 ~ -64dBm */
242         WIFI_MANAGER_RSSI_LEVEL_4 = 4,      /**< Very strong signal -63dBm ~ */
243 } wifi_manager_rssi_level_e;
244
245 /**
246  * @brief Enumeration for the wifi scanning state.
247  * @since_tizen 4.0
248  */
249 typedef enum {
250         WIFI_MANAGER_SCAN_STATE_NOT_SCANNING = 0,  /**< Scan is not running */
251         WIFI_MANAGER_SCAN_STATE_SCANNING = 1,      /**< Scan is in progress */
252 } wifi_manager_scan_state_e;
253
254 /**
255  * @brief Enumeration for the TDLS Discovery State.
256  * @since_tizen 4.0
257  */
258 typedef enum {
259         WIFI_MANAGER_TDLS_DISCOVERY_STATE_ONGOING = 0,    /**< Discovery is in progress */
260         WIFI_MANAGER_TDLS_DISCOVERY_STATE_FINISHED = 1,   /**< Discovery is finished */
261 } wifi_manager_tdls_discovery_state_e;
262
263 /**
264  * @brief Enumeration for the Wi-Fi Module state.
265  * @since_tizen 4.0
266  */
267 typedef enum {
268         WIFI_MANAGER_MODULE_STATE_DETACHED = 0,  /**< Wi-Fi Module is detached */
269         WIFI_MANAGER_MODULE_STATE_ATTACHED = 1,  /**< Wi-Fi Module is attached */
270 } wifi_manager_module_state_e;
271
272 /**
273 * @}
274 */
275
276
277 /**
278 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_AP_NETWORK_MODULE
279 * @{
280 */
281
282 /**
283  * @brief Enumeration for the Net IP configuration type.
284  * @since_tizen 3.0
285  */
286 typedef enum {
287         /**
288          * Not defined
289          */
290         WIFI_MANAGER_IP_CONFIG_TYPE_NONE = 0,
291
292         /**
293          * Manual IP configuration
294          */
295         WIFI_MANAGER_IP_CONFIG_TYPE_STATIC  = 1,
296
297         /**
298          * Config IP using DHCP client (IPv4 Only)
299          */
300         WIFI_MANAGER_IP_CONFIG_TYPE_DYNAMIC = 2,
301
302         /**
303          * Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available
304          */
305         WIFI_MANAGER_IP_CONFIG_TYPE_AUTO = 3,
306
307         /**
308          * Indicates an IP address that can not be modified (IPv4 Only)
309          */
310         WIFI_MANAGER_IP_CONFIG_TYPE_FIXED = 4,
311
312 } wifi_manager_ip_config_type_e;
313
314 /**
315  * @brief Enumeration for DNS Configuration type.
316  * @since_tizen 4.0
317  */
318 typedef enum {
319         WIFI_MANAGER_DNS_CONFIG_TYPE_NONE = 0,     /**< Not defined */
320         WIFI_MANAGER_DNS_CONFIG_TYPE_STATIC = 1,   /**< Manual DNS configuration */
321         WIFI_MANAGER_DNS_CONFIG_TYPE_DYNAMIC = 2,  /**< Config DNS using DHCP client*/
322 } wifi_manager_dns_config_type_e;
323
324 /**
325  * @brief Enumeration for the address type.
326  * @since_tizen 3.0
327  */
328 typedef enum {
329         WIFI_MANAGER_ADDRESS_FAMILY_IPV4 = 0,       /**< IPV4 Address family */
330         WIFI_MANAGER_ADDRESS_FAMILY_IPV6 = 1,       /**< IPV6 Address family */
331 } wifi_manager_address_family_e;
332
333 /**
334  * @brief Enumeration for the proxy method type.
335  * @since_tizen 3.0
336  */
337 typedef enum {
338         /**
339          * Direct connection
340          */
341         WIFI_MANAGER_PROXY_TYPE_DIRECT = 0,
342
343         /**
344          * Auto configuration(Use PAC file). If URL property is not set,
345          * DHCP/WPAD auto-discover will be tried
346          */
347         WIFI_MANAGER_PROXY_TYPE_AUTO = 1,
348
349         /**
350          * Manual configuration
351          */
352         WIFI_MANAGER_PROXY_TYPE_MANUAL = 2
353
354 } wifi_manager_proxy_type_e;
355
356 /**
357 * @}
358 */
359
360
361 /**
362 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_AP_SECURITY_MODULE
363 * @{
364 */
365
366 /**
367  * @brief Enumeration for Wi-Fi security type.
368  * @details The following security modes are used in infrastructure and ad-hoc mode.
369  * For now all EAP security mechanisms are provided only in infrastructure mode.
370  *
371  * @since_tizen 3.0
372  */
373 typedef enum {
374         WIFI_MANAGER_SECURITY_TYPE_NONE = 0,        /**< Security disabled */
375         WIFI_MANAGER_SECURITY_TYPE_WEP = 1,         /**< WEP */
376         WIFI_MANAGER_SECURITY_TYPE_WPA_PSK = 2,     /**< WPA-PSK */
377         WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK = 3,    /**< WPA2-PSK */
378         WIFI_MANAGER_SECURITY_TYPE_EAP = 4,         /**< EAP */
379         WIFI_MANAGER_SECURITY_TYPE_WPA_FT_PSK = 5,  /**< FT-PSK (Since 5.0) */
380         WIFI_MANAGER_SECURITY_TYPE_SAE = 6,         /**< SAE (Since 5.5) */
381         WIFI_MANAGER_SECURITY_TYPE_OWE = 7,         /**< OWE (Since 5.5) */
382         WIFI_MANAGER_SECURITY_TYPE_DPP = 8,         /**< DPP (Since 5.5) */
383 } wifi_manager_security_type_e;
384
385 /**
386  * @brief Enumeration for Wi-Fi encryption type.
387  * @details The following encryption modes are used in infrastructure and ad-hoc mode.
388  * @since_tizen 3.0
389  */
390 typedef enum {
391         WIFI_MANAGER_ENCRYPTION_TYPE_NONE = 0,            /**< Encryption disabled */
392         WIFI_MANAGER_ENCRYPTION_TYPE_WEP = 1,             /**< WEP */
393         WIFI_MANAGER_ENCRYPTION_TYPE_TKIP = 2,            /**< TKIP */
394         WIFI_MANAGER_ENCRYPTION_TYPE_AES = 3,             /**< AES */
395         WIFI_MANAGER_ENCRYPTION_TYPE_TKIP_AES_MIXED = 4,  /**< TKIP and AES are both supported */
396 } wifi_manager_encryption_type_e;
397
398 /**
399 * @}
400 */
401
402
403 /**
404 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_AP_SECURITY_EAP_MODULE
405 * @{
406 */
407
408 /**
409  * @brief Enumeration for EAP type.
410  * @since_tizen 3.0
411  */
412 typedef enum {
413         WIFI_MANAGER_EAP_TYPE_PEAP = 0,         /**< EAP PEAP type */
414         WIFI_MANAGER_EAP_TYPE_TLS = 1,          /**< EAP TLS type */
415         WIFI_MANAGER_EAP_TYPE_TTLS = 2,         /**< EAP TTLS type */
416         WIFI_MANAGER_EAP_TYPE_SIM = 3,          /**< EAP SIM type */
417         WIFI_MANAGER_EAP_TYPE_AKA = 4,          /**< EAP AKA type */
418         WIFI_MANAGER_EAP_TYPE_AKA_PRIME = 5,    /**< EAP AKA Prime type */
419         WIFI_MANAGER_EAP_TYPE_FAST = 6,         /**< EAP FAST type */
420         WIFI_MANAGER_EAP_TYPE_PWD = 7,          /**< EAP PWD type */
421 } wifi_manager_eap_type_e;
422
423 /**
424  * @brief Enumeration for EAP phase2 authentication type.
425  * @since_tizen 3.0
426  */
427 typedef enum {
428         WIFI_MANAGER_EAP_AUTH_TYPE_NONE = 0,      /**< EAP phase2 authentication none */
429         WIFI_MANAGER_EAP_AUTH_TYPE_PAP = 1,       /**< EAP phase2 authentication PAP */
430         WIFI_MANAGER_EAP_AUTH_TYPE_MSCHAP = 2,    /**< EAP phase2 authentication MSCHAP */
431         WIFI_MANAGER_EAP_AUTH_TYPE_MSCHAPV2 = 3,  /**< EAP phase2 authentication MSCHAPv2 */
432         WIFI_MANAGER_EAP_AUTH_TYPE_GTC = 4,       /**< EAP phase2 authentication GTC */
433         WIFI_MANAGER_EAP_AUTH_TYPE_MD5 = 5,       /**< EAP phase2 authentication MD5 */
434 } wifi_manager_eap_auth_type_e;
435
436 /**
437  * @brief Enumeration for Wi-Fi disconnect reason, provided by the supplicant.
438  * @since_tizen 4.0
439  */
440 typedef enum {
441         /**
442          * Locally Generate Disconnect from user side (Since 5.0)
443          */
444         WIFI_REASON_LOCAL_GENERATE_FROM_USER = -3,
445
446         /**
447          * Unspecified reason
448          */
449         WIFI_REASON_UNSPECIFIED = 1,
450
451         /**
452          * Previous authentication no longer valid
453          */
454         WIFI_REASON_PREV_AUTH_NOT_VALID = 2,
455
456         /**
457          * Deauthenticated because sending STA is leaving (or has left) IBSS or ESS
458          */
459         WIFI_REASON_DEAUTH_LEAVING = 3,
460
461         /**
462          * Disassociated due to inactivity
463          */
464         WIFI_REASON_DISASSOC_DUE_TO_INACTIVITY = 4,
465
466         /**
467          * Disassociated because AP is unable to handle all currently associated STAs
468          */
469         WIFI_REASON_DISASSOC_AP_BUSY = 5,
470
471         /**
472          * Class 2 frame received from nonauthenticated STA
473          */
474         WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA = 6,
475
476         /**
477          * Class 3 frame received from nonassociated STA
478          */
479         WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA = 7,
480
481         /**
482          * Disassociated because sending STA is leaving (or has left) BSS
483          */
484         WIFI_REASON_DISASSOC_STA_HAS_LEFT = 8,
485
486         /**
487          * STA requesting (re)association is not authenticated with responding STA
488          */
489         WIFI_REASON_STA_REQ_ASSOC_WITHOUT_AUTH = 9,
490
491         /**
492          * Disassociated because the information in the Power Capability
493          * element is unacceptable
494          */
495         WIFI_REASON_PWR_CAPABILITY_NOT_VALID = 10,
496
497         /**
498          * Disassociated because the information in the Supported Channels
499          * element is unacceptable
500          */
501         WIFI_REASON_SUPPORTED_CHANNEL_NOT_VALID = 11,
502
503         /**
504          * Invalid element i.e., an element defined in this standard for which the
505          * content does not meet the specifications in Clause 8
506          */
507         WIFI_REASON_INVALID_IE = 13,
508
509         /**
510          * Message Integrity Code (MIC) failure
511          */
512         WIFI_REASON_MICHAEL_MIC_FAILURE = 14,
513
514         /**
515          * 4-Way Handshake timeout
516          */
517         WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15,
518
519         /**
520          * Group Key Handshake timeout
521          */
522         WIFI_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16,
523
524         /**
525          * Element in 4-Way Handshake different from (Re)Association Request/Probe
526          * Response/Beacon frame
527          */
528         WIFI_REASON_IE_IN_4WAY_DIFFERS = 17,
529
530         /**
531          * Invalid group cipher
532          */
533         WIFI_REASON_GROUP_CIPHER_NOT_VALID = 18,
534
535         /**
536          * Invalid pairwise cipher
537          */
538         WIFI_REASON_PAIRWISE_CIPHER_NOT_VALID = 19,
539
540         /**
541          * Invalid AKMP
542          */
543         WIFI_REASON_AKMP_NOT_VALID = 20,
544
545         /**
546          * Unsupported RSNE version
547          */
548         WIFI_REASON_UNSUPPORTED_RSN_IE_VERSION = 21,
549
550         /**
551          * Invalid RSNE capabilities
552          */
553         WIFI_REASON_INVALID_RSN_IE_CAPAB = 22,
554
555         /**
556          * IEEE 802.1X authentication failed
557          */
558         WIFI_REASON_IEEE_802_1X_AUTH_FAILED = 23,
559
560         /**
561          * Cipher suite rejected because of the security policy
562          */
563         WIFI_REASON_CIPHER_SUITE_REJECTED = 24,
564
565         /**
566          * TDLS direct-link teardown due to TDLS peer STA unreachable via the
567          * TDLS direct link
568          */
569         WIFI_REASON_TDLS_TEARDOWN_UNREACHABLE = 25,
570
571         /**
572          * TDLS direct-link teardown for unspecified reason
573          */
574         WIFI_REASON_TDLS_TEARDOWN_UNSPECIFIED = 26,
575
576         /**
577          * Disassociated because excessive number of frames need to be acknowledged,
578          * but are not acknowledged due to AP transmissions and/or poor channel conditions
579          */
580         WIFI_REASON_DISASSOC_LOW_ACK = 34,
581
582         /**
583          * SME cancels the mesh peering instance with the reason other than reaching
584          * the maximum number of peer mesh STAs
585          */
586         WIFI_REASON_MESH_PEERING_CANCELLED = 52,
587
588         /**
589          * The mesh STA has reached the supported maximum number of peer mesh STAs
590          */
591         WIFI_REASON_MESH_MAX_PEERS = 53,
592
593         /**
594          * The received information violates the Mesh Configuration policy
595          * configured in the mesh STA profile
596          */
597         WIFI_REASON_MESH_CONFIG_POLICY_VIOLATION = 54,
598
599         /**
600          * The mesh STA has received a Mesh Peering Close message requesting
601          * to close the mesh peering
602          */
603         WIFI_REASON_MESH_CLOSE_RCVD = 55,
604
605         /**
606          * The mesh STA has resent dot11MeshMaxRetries Mesh Peering Open messages,
607          * without receiving a Mesh Peering Confirm message
608          */
609         WIFI_REASON_MESH_MAX_RETRIES = 56,
610
611         /**
612          * The confirmTimer for the mesh peering instance times out
613          */
614         WIFI_REASON_MESH_CONFIRM_TIMEOUT = 57,
615
616         /**
617          * The mesh STA fails to unwrap the GTK or the values in the wrapped
618          * contents do not match
619          */
620         WIFI_REASON_MESH_INVALID_GTK = 58,
621
622         /**
623          * The mesh STA receives inconsistent information about the mesh parameters
624          * between Mesh Peering Management frames
625          */
626         WIFI_REASON_MESH_INCONSISTENT_PARAMS = 59,
627
628         /**
629          * The mesh STA does not have proxy information for this external destination
630          */
631         WIFI_REASON_MESH_INVALID_SECURITY_CAP = 60,
632
633 } wifi_manager_disconnect_reason_e;
634
635 /**
636  * @brief Enumeration for Wi-Fi Association Status code, provided by the supplicant.
637  * @details The Wi-Fi Standard Reference : Status codes (IEEE 802.11-2007, 7.3.1.9, Table 7-23).
638  * @since_tizen 5.0
639  */
640 typedef enum {
641         /**
642          * Successful
643          */
644         WLAN_STATUS_SUCCESS = 0,
645
646         /**
647          * Unspecified failure
648          */
649         WLAN_STATUS_UNSPECIFIED_FAILURE = 1,
650
651         /**
652          * Responding STA does not support the specified authentication
653          * algorithm
654          */
655         WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG = 13,
656
657         /**
658          * Association denied because AP is unable to handle additional
659          * associated STAs
660          */
661         WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA = 17,
662
663         /**
664          * Association denied because the requesting STA does not support
665          * HT feature
666          */
667         WLAN_STATUS_ASSOC_DENIED_NO_HT = 27,
668
669         /**
670          * Association request rejected temporarily
671          */
672         WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY = 30,
673
674         /**
675          * Robust management frame policy violation
676          */
677         WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION = 31,
678
679         /**
680          * Invalid element
681          */
682         WLAN_STATUS_INVALID_IE = 40,
683
684         /**
685          * Invalid group cipher
686          */
687         WLAN_STATUS_GROUP_CIPHER_NOT_VALID = 41,
688
689         /**
690          * Invalid pairwise cipher
691          */
692         WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID = 42,
693
694         /**
695          * Invalid AKMP
696          */
697         WLAN_STATUS_AKMP_NOT_VALID = 43,
698
699         /**
700          * Cipher suite rejected because of security policy
701          */
702         WLAN_STATUS_CIPHER_REJECTED_PER_POLICY = 46,
703
704         /**
705          * Association denied because the Listen interval is too large
706          */
707         WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE = 51,
708
709         /**
710          * Invalid pairwise master key identifier (PKMID)
711          */
712         WLAN_STATUS_INVALID_PMKID = 53,
713
714         /**
715          * Invalid MDE
716          */
717         WLAN_STATUS_INVALID_MDIE = 54,
718
719         /**
720          * Invalid FTE
721          */
722         WLAN_STATUS_INVALID_FTIE = 55,
723
724         /**
725          * Association denied because the requesting STA does not support
726          * VHT feature
727          */
728         WLAN_STATUS_ASSOC_DENIED_NO_VHT = 104,
729 } wifi_manager_assoc_status_code_e;
730
731 /**
732  * @}
733  */
734
735 /**
736  * @addtogroup CAPI_NETWORK_WIFI_MANAGER_TDLS_MODULE
737  * @{
738  */
739
740 /**
741  * @brief Enumeration for the state of the Wi-Fi TDLS.
742  * @since_tizen 3.0
743  */
744 typedef enum {
745         WIFI_MANAGER_TDLS_STATE_DISCONNECTED = 0,  /**< Wi-Fi TDLS is Disconnected */
746         WIFI_MANAGER_TDLS_STATE_CONNECTED = 1,     /**< Wi-Fi TDLS is Connected */
747 } wifi_manager_tdls_state_e;
748
749 /**
750  * @}
751  */
752
753 /**
754  * @addtogroup CAPI_NETWORK_WIFI_MANAGER_MANAGEMENT_MODULE
755  * @{
756  */
757
758 /**
759  * @brief The Wi-Fi specific ap scan handle.
760  * @since_tizen 4.0
761  */
762 typedef void *wifi_manager_specific_scan_h;
763
764 /**
765  * @}
766  */
767
768 /**
769  * @addtogroup CAPI_NETWORK_WIFI_MANAGER_AP_MODULE
770  * @{
771  */
772
773 /**
774  * @brief The Wi-Fi access point handle.
775  * @since_tizen 3.0
776  */
777 typedef void *wifi_manager_ap_h;
778
779 /**
780 * @}
781 */
782
783 /**
784 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_CONFIG_MODULE
785 * @{
786 */
787
788 /**
789  * @brief The Wi-Fi access point configuration handle.
790  * @since_tizen 3.0
791  */
792 typedef void *wifi_manager_config_h;
793
794 /**
795 * @}
796 */
797
798 /**
799 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_MANAGEMENT_MODULE
800 * @{
801 */
802
803 /**
804  * @brief Enumeration for Wi-Fi Frame type.
805  * @since_tizen 5.0
806  * @see wifi_manager_add_vsie()
807  * @see wifi_manager_remove_vsie()
808  * @see wifi_manager_get_vsie()
809  */
810 typedef enum {
811         /**
812          * WiFi probe request frame
813          */
814         WIFI_MANAGER_VSIE_FRAME_PROBE_REQ,
815
816         /**
817          * WiFi association request frame
818          */
819         WIFI_MANAGER_VSIE_FRAME_ASSOC_REQ,
820
821         /**
822          * WiFi re-association request frame
823          */
824         WIFI_MANAGER_VSIE_FRAME_REASSOC,
825
826         /**
827          * WiFi authentication request frame
828          */
829         WIFI_MANAGER_VSIE_FRAME_AUTH_REQ,
830
831         /**
832          * WiFi action frame
833          */
834         WIFI_MANAGER_VSIE_FRAME_ACTION,
835
836 } wifi_manager_vsie_frames_e;
837
838 /**
839  * @brief Called for each found access point.
840  * @since_tizen 3.0
841  * @remarks @a ap is valid only in this function. In order to use @a ap outside this function, you must copy the @a ap with wifi_manager_ap_clone().
842  * @param[in]  ap           The access point
843  * @param[in]  user_data    The user data passed from the request function
844  * @return  @c true to continue with the next iteration of the loop, \n
845  *     otherwise @c false to break out of the loop
846  * @pre  wifi_manager_foreach_found_ap() will invoke this callback.
847  * @pre  wifi_manager_foreach_found_specific_ap() will invoke this callback.
848  * @see  wifi_manager_foreach_found_ap()
849  * @see  wifi_manager_foreach_found_specific_ap()
850  */
851 typedef bool(*wifi_manager_found_ap_cb)(wifi_manager_ap_h ap, void *user_data);
852
853 /**
854  * @brief Called when the scan is finished.
855  * @details The following error codes can be received: \n
856  *              #WIFI_MANAGER_ERROR_NONE                 Successful \n
857  *              #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed \n
858  * @since_tizen 3.0
859  * @param[in] error_code    The error code
860  * @param[in] user_data     The user data passed from the callback registration function
861  * @see wifi_manager_scan()
862  * @see wifi_manager_set_background_scan_cb()
863  * @see wifi_manager_unset_background_scan_cb()
864  */
865 typedef void(*wifi_manager_scan_finished_cb)(wifi_manager_error_e error_code, void *user_data);
866
867 /**
868  * @brief Called when the scanning state is changed.
869  * @since_tizen 4.0
870  * @param[in] state         The wifi scanning state
871  * @param[in] user_data     The user data passed from the callback registration function
872  * @see wifi_manager_set_scan_state_changed_cb()
873  * @see wifi_manager_unset_scan_state_changed_cb()
874  */
875 typedef void(*wifi_manager_scan_state_changed_cb)(wifi_manager_scan_state_e state, void *user_data);
876
877 /**
878  * @brief Called after wifi_manager_activate() or wifi_manager_activate_with_wifi_picker_tested() is completed.
879  * @details The following error codes can be received: \n
880  *              #WIFI_MANAGER_ERROR_NONE                 Successful \n
881  *              #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed \n
882  *              #WIFI_MANAGER_ERROR_SECURITY_RESTRICTED  Restricted by security system policy
883  * @since_tizen 3.0
884  * @param[in] result        The result
885  * @param[in] user_data     The user data passed from wifi_manager_activate() and wifi_manager_activate_with_wifi_picker_tested()
886  * @pre wifi_manager_activate() or wifi_manager_activate_with_wifi_picker_tested() will invoke this callback function.
887  * @see wifi_manager_activate()
888  * @see wifi_manager_activate_with_wifi_picker_tested()
889  */
890 typedef void(*wifi_manager_activated_cb)(wifi_manager_error_e result, void *user_data);
891
892 /**
893  * @brief Called after wifi_manager_deactivate() is completed.
894  * @details The following error codes can be received: \n
895  *              #WIFI_MANAGER_ERROR_NONE                 Successful \n
896  *              #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed \n
897  *              #WIFI_MANAGER_ERROR_SECURITY_RESTRICTED  Restricted by security system policy
898  * @since_tizen 3.0
899  * @param[in] result        The result
900  * @param[in] user_data     The user data passed from wifi_manager_deactivate()
901  * @pre wifi_manager_deactivate() will invoke this callback function.
902  * @see wifi_manager_deactivate()
903  */
904 typedef void(*wifi_manager_deactivated_cb)(wifi_manager_error_e result, void *user_data);
905
906 /**
907  * @brief Called when the connection process is completed.
908  * @details The following functions start the connection process and will
909  *          result in the callback being called:
910  *     - wifi_manager_connect()
911  *     - wifi_manager_connect_by_wps_pbc()
912  *     - wifi_manager_connect_by_wps_pin()
913  *     - wifi_manager_connect_by_wps_pbc_without_ssid()
914  *     - wifi_manager_connect_by_wps_pin_without_ssid()
915  *     - wifi_manager_connect_hidden_ap() \n\n
916  * The following error codes can be received: \n
917  *              #WIFI_MANAGER_ERROR_NONE                     Successful \n
918  *              #WIFI_MANAGER_ERROR_OPERATION_FAILED         Operation failed \n
919  *              #WIFI_MANAGER_ERROR_OPERATION_ABORTED        Operation aborted \n
920  *              #WIFI_MANAGER_ERROR_ALREADY_EXISTS           Connection already exists \n
921  *              #WIFI_MANAGER_ERROR_OUT_OF_RANGE             Out of range \n
922  *              #WIFI_MANAGER_ERROR_DHCP_FAILED              DHCP failed \n
923  *              #WIFI_MANAGER_ERROR_CONNECT_FAILED           Connect failed \n
924  *              #WIFI_MANAGER_ERROR_LOGIN_FAILED             Login failed \n
925  *              #WIFI_MANAGER_ERROR_AUTHENTICATION_FAILED    Authentication failed \n
926  *              #WIFI_MANAGER_ERROR_ASSOCIATION_FAILED       Association failed \n
927  *              #WIFI_MANAGER_ERROR_INVALID_KEY              Invalid key \n
928  *              #WIFI_MANAGER_ERROR_PIN_MISSING              PIN missing \n
929  *              #WIFI_MANAGER_ERROR_WPS_OVERLAP              WPS Overlap \n
930  *              #WIFI_MANAGER_ERROR_WPS_TIMEOUT              WPS Timeout \n
931  *              #WIFI_MANAGER_ERROR_WPS_WEP_PROHIBITED       WPS WEP Prohibited
932  * @since_tizen 3.0
933  * @param[in] result        The result
934  * @param[in] user_data     The user data passed from the connection function.
935  * @pre Any connection function will invoke this callback.
936  * @see wifi_manager_connect()
937  * @see wifi_manager_connect_by_wps_pbc()
938  * @see wifi_manager_connect_by_wps_pin()
939  * @see wifi_manager_connect_by_wps_pbc_without_ssid()
940  * @see wifi_manager_connect_by_wps_pin_without_ssid()
941  * @see wifi_manager_connect_hidden_ap()
942  */
943 typedef void(*wifi_manager_connected_cb)(wifi_manager_error_e result, void *user_data);
944
945 /**
946  * @brief Called after wifi_manager_disconnect() is completed.
947  * @details The following error codes can be received: \n
948  *              #WIFI_MANAGER_ERROR_NONE                 Successful \n
949  *              #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
950  * @since_tizen 3.0
951  * @param[in] result        The result
952  * @param[in] user_data     The user data passed from wifi_manager_disconnect()
953  * @pre wifi_manager_disconnect() will invoke this callback function.
954  * @see wifi_manager_disconnect()
955  */
956 typedef void(*wifi_manager_disconnected_cb)(wifi_manager_error_e result, void *user_data);
957
958 /**
959  * @brief Called after wifi_manager_forget_ap_async() is completed.
960  * @details The following error codes can be received: \n
961  *              #WIFI_MANAGER_ERROR_NONE                 Successful \n
962  *              #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
963  * @since_tizen 5.0
964  * @param[in] result        The result
965  * @param[in] user_data     The user data passed from wifi_manager_forget_ap_async()
966  * @pre wifi_manager_forget_ap_async() will invoke this callback function.
967  * @see wifi_manager_forget_ap_async()
968  */
969 typedef void(*wifi_manager_forget_ap_finished_cb)(wifi_manager_error_e result, void *user_data);
970
971 /**
972  * @brief Called when the BSSID scan is finished.
973  * @details The following error codes can be received: \n
974  *              #WIFI_MANAGER_ERROR_NONE                 Successful \n
975  *              #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
976  * @since_tizen 4.0
977  * @param[in] error_code    The error code
978  * @param[in] user_data     The user data passed from the callback registration function
979  * @see wifi_manager_scan()
980  * @see wifi_manager_bssid_scan()
981  * @see wifi_manager_set_background_scan_cb()
982  * @see wifi_manager_unset_background_scan_cb()
983  */
984 typedef void(*wifi_manager_bssid_scan_finished_cb)(wifi_manager_error_e error_code, void *user_data);
985
986 /**
987 * @}
988 */
989
990
991 /**
992 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_MONITOR_MODULE
993 * @{
994 */
995
996 /**
997  * @brief Called when the device state is changed.
998  * @since_tizen 3.0
999  * @param[in] state         The device state
1000  * @param[in] user_data     The user data passed from the callback registration function
1001  * @see wifi_manager_set_device_state_changed_cb()
1002  * @see wifi_manager_unset_device_state_changed_cb()
1003  */
1004 typedef void(*wifi_manager_device_state_changed_cb)(wifi_manager_device_state_e state, void *user_data);
1005
1006 /**
1007  * @brief Called when the connection state is changed.
1008  * @since_tizen 3.0
1009  * @param[in] state         The connection state
1010  * @param[in] ap            The access point
1011  * @param[in] user_data     The user data passed from the callback registration function
1012  * @see wifi_manager_set_connection_state_changed_cb()
1013  * @see wifi_manager_unset_connection_state_changed_cb()
1014  */
1015 typedef void(*wifi_manager_connection_state_changed_cb)(wifi_manager_connection_state_e state, wifi_manager_ap_h ap, void *user_data);
1016
1017 /**
1018  * @brief Called when the IP conflict state is changed.
1019  * @since_tizen 5.0
1020  * @remarks @a mac should not be freed. @a mac is available only in the callback. To use
1021  *          outside the callback, make a copy.
1022  * @param[in] mac           The destination MAC address causing conflict
1023  * @param[in] state         The current state
1024  * @param[in] user_data     The user data passed from the callback registration function
1025  * @see wifi_manager_set_ip_conflict_cb()
1026  * @see wifi_manager_unset_ip_conflict_cb()
1027  */
1028 typedef void(*wifi_manager_ip_conflict_cb)(char *mac, wifi_manager_ip_conflict_state_e state, void *user_data);
1029
1030 /**
1031  * @brief Called when the RSSI of connected Wi-Fi is changed.
1032  * @since_tizen 3.0
1033  * @param[in] rssi_level    The level of RSSI
1034  * @param[in] user_data     The user data passed from the callback registration function
1035  * @see wifi_manager_set_rssi_level_changed_cb()
1036  * @see wifi_manager_unset_rssi_level_changed_cb()
1037  */
1038 typedef void(*wifi_manager_rssi_level_changed_cb)(wifi_manager_rssi_level_e rssi_level, void *user_data);
1039
1040 /**
1041  * @brief Called when the Wi-Fi Module state is changed.
1042  * @since_tizen 4.0
1043  * @param[in] wifi_module_state    The Wi-Fi Module state
1044  * @param[in] user_data            The user data passed from the callback registration function
1045  * @see wifi_manager_set_module_state_changed_cb()
1046  * @see wifi_manager_unset_module_state_changed_cb()
1047  */
1048 typedef void(*wifi_manager_module_state_changed_cb)(wifi_manager_module_state_e wifi_module_state,
1049                 void *user_data);
1050
1051 /**
1052 * @}
1053 */
1054
1055 /**
1056 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_CONFIG_MODULE
1057 * @{
1058 */
1059
1060 /**
1061  * @brief Called for each found access point configuration.
1062  * @since_tizen 3.0
1063  * @remarks @a config is valid only in this function. In order to use @a config outside this function, you must copy the config with wifi_manager_config_clone().
1064  *
1065  * @param[in]  config       The access point configuration handle
1066  * @param[in]  user_data    The user data passed from the request function
1067  *
1068  * @return  @c true to continue with the next iteration of the loop, otherwise @c false to break out of the loop \n
1069  * @pre  wifi_manager_config_foreach_configuration() will invoke this callback.
1070  * @see  wifi_manager_config_foreach_configuration()
1071  */
1072 typedef bool (*wifi_manager_config_list_cb)(const wifi_manager_config_h config, void *user_data);
1073
1074 /**
1075 * @}
1076 */
1077
1078 /**
1079  * @addtogroup CAPI_NETWORK_WIFI_MANAGER_TDLS_MODULE
1080  * @{
1081  */
1082
1083 /**
1084  * @brief Called when the Wi-Fi TDLS state is changed.
1085  * @since_tizen 3.0
1086  *
1087  * @param[in] state          The TDLS state
1088  * @param[in] peer_mac_addr  The MAC address of the TDLS peer
1089  * @param[in] user_data      The user data passed from the callback registration function
1090  * @see wifi_manager_tdls_set_state_changed_cb()
1091  * @see wifi_manager_tdls_unset_state_changed_cb()
1092  */
1093 typedef void(*wifi_manager_tdls_state_changed_cb)(wifi_manager_tdls_state_e state,
1094                 char *peer_mac_addr, void *user_data);
1095
1096 /**
1097  * @brief Called when the Wi-Fi TDLS is discovered.
1098  * @since_tizen 4.0
1099  * @remarks @a peer_mac_addr is usable only in the callback. To use outside the callback, make a copy.
1100  * @param[in] state          The TDLS state
1101  * @param[in] peer_mac_addr  The MAC address of the TDLS peer
1102  * @param[in] user_data      The user data passed from the callback registration function
1103  * @see wifi_manager_tdls_set_discovered_cb()
1104  * @see wifi_manager_tdls_unset_discovered_cb()
1105  */
1106 typedef void(*wifi_manager_tdls_discovered_cb)(wifi_manager_tdls_discovery_state_e state,
1107                 char *peer_mac_addr, void *user_data);
1108
1109 /**
1110  * @}
1111  */
1112
1113 /**
1114 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_MODULE
1115 * @{
1116 */
1117
1118 /**
1119  * @brief Initializes Wi-Fi.
1120  * @since_tizen 3.0
1121  * @privlevel public
1122  * @privilege %http://tizen.org/privilege/network.get
1123  * @remarks You must release @a wifi using wifi_manager_deinitialize().
1124  * @param[out] wifi        The Wi-Fi handle
1125  * @return @c 0 on success, otherwise negative error value
1126  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1127  * @retval #WIFI_MANAGER_ERROR_ALREADY_INITIALIZED  Already initialized
1128  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1129  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1130  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1131  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1132  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
1133  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1134  */
1135 int wifi_manager_initialize(wifi_manager_h *wifi);
1136
1137 /**
1138  * @brief Deinitializes Wi-Fi.
1139  * @since_tizen 3.0
1140  * @param[in] wifi        The Wi-Fi handle
1141  * @return 0 on success, otherwise negative error value
1142  * @retval #WIFI_MANAGER_ERROR_NONE               Successful
1143  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED    Not initialized
1144  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER  Invalid parameter
1145  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION  Invalid operation
1146  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED   Operation failed
1147  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED      Not supported
1148  */
1149 int wifi_manager_deinitialize(wifi_manager_h wifi);
1150
1151 /**
1152 * @}
1153 */
1154
1155
1156 /**
1157 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_MANAGEMENT_MODULE
1158 * @{
1159 */
1160
1161 /**
1162  * @brief Activates Wi-Fi asynchronously.
1163  * @since_tizen 3.0
1164  * @privlevel public
1165  * @privilege %http://tizen.org/privilege/network.set \n
1166  *            %http://tizen.org/privilege/network.get
1167  * @remarks This function needs both privileges.
1168  * @param[in] wifi          The Wi-Fi handle
1169  * @param[in] callback      The callback function to be called \n
1170  *            This can be @c NULL if you don't want to get the notification.
1171  * @param[in] user_data     The user data passed to the callback function
1172  * @return 0 on success, otherwise negative error value
1173  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1174  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1175  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1176  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1177  * @retval #WIFI_MANAGER_ERROR_NOW_IN_PROGRESS      Now in progress
1178  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1179  * @retval #WIFI_MANAGER_ERROR_SECURITY_RESTRICTED  Restricted by security system policy
1180  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1181  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1182  * @post wifi_manager_activated_cb() will be invoked.
1183  * @see wifi_manager_activated_cb()
1184  * @see wifi_manager_deactivate()
1185  */
1186 int wifi_manager_activate(wifi_manager_h wifi, wifi_manager_activated_cb callback, void *user_data);
1187
1188 /**
1189  * @brief Activates Wi-Fi asynchronously and displays Wi-Fi picker (popup) when Wi-Fi is not automatically connected.
1190  * @since_tizen 3.0
1191  * @privlevel public
1192  * @privilege %http://tizen.org/privilege/network.set \n
1193  *            %http://tizen.org/privilege/network.get
1194  * @remarks This function needs both privileges.
1195  * @param[in] wifi          The Wi-Fi handle
1196  * @param[in] callback      The callback function to be called \n
1197  *            This can be @c NULL if you don't want to get the notification.
1198  * @param[in] user_data     The user data passed to the callback function
1199  * @return 0 on success, otherwise negative error value
1200  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1201  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1202  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1203  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1204  * @retval #WIFI_MANAGER_ERROR_NOW_IN_PROGRESS      Now in progress
1205  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1206  * @retval #WIFI_MANAGER_ERROR_SECURITY_RESTRICTED  Restricted by security system policy
1207  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1208  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1209  * @post wifi_manager_activated_cb() will be invoked.
1210  * @see wifi_manager_activated_cb()
1211  * @see wifi_manager_deactivate()
1212  */
1213 int wifi_manager_activate_with_wifi_picker_tested(wifi_manager_h wifi,
1214                 wifi_manager_activated_cb callback, void *user_data);
1215
1216 /**
1217  * @brief Deactivates Wi-Fi asynchronously.
1218  * @since_tizen 3.0
1219  * @privlevel public
1220  * @privilege %http://tizen.org/privilege/network.set \n
1221  *            %http://tizen.org/privilege/network.get
1222  * @remarks This function needs both privileges.
1223  * @param[in] wifi          The Wi-Fi handle
1224  * @param[in] callback      The callback function to be called \n
1225  *            This can be @c NULL if you don't want to get the notification.
1226  * @param[in] user_data     The user data passed to the callback function
1227  * @return 0 on success, otherwise negative error value
1228  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1229  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1230  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1231  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1232  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1233  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1234  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1235  * @post wifi_manager_deactivated_cb() will be invoked.
1236  * @see wifi_manager_deactivated_cb()
1237  * @see wifi_manager_activate()
1238  */
1239 int wifi_manager_deactivate(wifi_manager_h wifi, wifi_manager_deactivated_cb callback, void *user_data);
1240
1241 /**
1242  * @brief Checks whether Wi-Fi is activated.
1243  * @since_tizen 3.0
1244  * @privlevel public
1245  * @privilege %http://tizen.org/privilege/network.get
1246  * @param[in] wifi        The Wi-Fi handle
1247  * @param[out] activated  @c true if Wi-Fi is activated,
1248  *             otherwise @c false if Wi-Fi is not activated.
1249  * @return 0 on success, otherwise negative error value
1250  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1251  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1252  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1253  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1254  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1255  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1256  */
1257 int wifi_manager_is_activated(wifi_manager_h wifi, bool *activated);
1258
1259 /**
1260  * @brief Gets the local MAC address.
1261  * @since_tizen 3.0
1262  * @remarks You must release @a mac_address using free().
1263  * @param[in] wifi          The Wi-Fi handle
1264  * @param[out] mac_address  The MAC address
1265  * @return 0 on success, otherwise negative error value
1266  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1267  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1268  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1269  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1270  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1271  */
1272 int wifi_manager_get_mac_address(wifi_manager_h wifi, char **mac_address);
1273
1274 /**
1275  * @brief Gets the name of the network interface.
1276  * @since_tizen 3.0
1277  * @privlevel public
1278  * @privilege %http://tizen.org/privilege/network.get
1279  * @remarks You must release @a name using free().
1280  * @param[in] wifi        The Wi-Fi handle
1281  * @param[out] name       The name of network interface
1282  * @return 0 on success, otherwise negative error value
1283  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1284  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1285  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1286  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
1287  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1288  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1289  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1290  */
1291 int wifi_manager_get_network_interface_name(wifi_manager_h wifi, char **name);
1292
1293 /**
1294  * @brief Starts scan asynchronously.
1295  * @since_tizen 3.0
1296  * @privlevel public
1297  * @privilege %http://tizen.org/privilege/network.set \n
1298  *            %http://tizen.org/privilege/network.get
1299  * @remarks This function needs both privileges.
1300  * @param[in] wifi            The Wi-Fi handle
1301  * @param[in] callback        The callback function to be called
1302  * @param[in] user_data       The user data passed to the callback function
1303  * @return 0 on success, otherwise negative error value
1304  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1305  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1306  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1307  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1308  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1309  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1310  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1311  * @post This function invokes wifi_manager_scan_finished_cb().
1312  */
1313 int wifi_manager_scan(wifi_manager_h wifi, wifi_manager_scan_finished_cb callback, void *user_data);
1314
1315 /**
1316  * @brief Gets the Wi-Fi scan state.
1317  * @since_tizen 4.0
1318  * @param[in] wifi            The Wi-Fi handle
1319  * @param[in] scan_state      The Wi-Fi scan state
1320  * @return 0 on success, otherwise negative error value
1321  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1322  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1323  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1324  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1325  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1326  */
1327 int wifi_manager_get_scan_state(wifi_manager_h wifi, wifi_manager_scan_state_e *scan_state);
1328
1329 /**
1330  * @brief Starts specific AP scan, asynchronously.
1331  * @since_tizen 3.0
1332  * @privlevel public
1333  * @privilege %http://tizen.org/privilege/network.set \n
1334  *            %http://tizen.org/privilege/network.get
1335  * @remarks This function needs both privileges.
1336  * @param[in] wifi            The Wi-Fi handle
1337  * @param[in] essid           The essid of specific AP
1338  * @param[in] callback        The callback function to be called
1339  * @param[in] user_data       The user data passed to the callback function
1340  * @return 0 on success, otherwise negative error value.
1341  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1342  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1343  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1344  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1345  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1346  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1347  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1348  * @post This function invokes wifi_manager_scan_finished_cb().
1349  */
1350 int wifi_manager_scan_specific_ap(wifi_manager_h wifi,
1351                 const char *essid, wifi_manager_scan_finished_cb callback, void *user_data);
1352
1353 /**
1354  * @brief Creates a Wi-Fi specific AP scan handle.
1355  * @since_tizen 4.0
1356  * @remarks You must release @a specific_scan using wifi_manager_specific_scan_destroy().
1357  * @param[in] wifi              The Wi-Fi handle
1358  * @param[out] specific_scan    The Wi-Fi specific AP scan handle
1359  *
1360  * @return 0 on success, otherwise negative error value
1361  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1362  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1363  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1364  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
1365  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1366  * @pre This function needs a wifi_manager_initialize() call before use.
1367  * @see wifi_manager_specific_scan_destroy()
1368  */
1369 int wifi_manager_specific_scan_create(wifi_manager_h wifi, wifi_manager_specific_scan_h *specific_scan);
1370
1371 /**
1372  * @brief Destroys a Wi-Fi specific AP scan handle.
1373  * @since_tizen 4.0
1374  * @param[in] wifi              The Wi-Fi handle
1375  * @param[in] specific_scan     The Wi-Fi specific AP scan handle
1376  *
1377  * @return 0 on success, otherwise negative error value
1378  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1379  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1380  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1381  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
1382  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1383  * @pre This function needs a wifi_manager_initialize() call before use.
1384  * @see wifi_manager_specific_scan_create()
1385  */
1386 int wifi_manager_specific_scan_destroy(wifi_manager_h wifi, wifi_manager_specific_scan_h specific_scan);
1387
1388 /**
1389  * @brief Gets the maximum number of SSIDs supported by the Wi-Fi chipset for the scan operation.
1390  * @since_tizen 5.5
1391  * @privlevel public
1392  * @privilege %http://tizen.org/privilege/network.get
1393  * @param[in] wifi              The Wi-Fi handle
1394  * @param[out] max_scan_ssids   The maximum number of SSIDs supported by the Wi-Fi \n
1395  *                              chipset for the scan operation.
1396  * @return 0 on success, otherwise negative error value
1397  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1398  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1399  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1400  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1401  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1402  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1403  * @see wifi_manager_specific_scan_set_ssid()
1404  */
1405 int wifi_manager_specific_scan_get_max_ssids(wifi_manager_h wifi, int *max_scan_ssids);
1406
1407 /**
1408  * @brief Sets the SSID of a specific AP scan.
1409  * @since_tizen 4.0
1410  * @param[in] specific_scan     The Wi-Fi specific AP scan handle
1411  * @param[in] essid             The SSID of specific AP scan
1412  *
1413  * @return 0 on success, otherwise negative error value
1414  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1415  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1416  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1417  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
1418  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1419  * @see wifi_manager_specific_scan_get_max_ssids()
1420  */
1421 int wifi_manager_specific_scan_set_ssid(wifi_manager_specific_scan_h specific_scan, const char *essid);
1422
1423 /**
1424  * @brief Sets the channel frequency of a specific AP scan.
1425  * @since_tizen 4.0
1426  * @param[in] specific_scan     The Wi-Fi specific AP scan handle
1427  * @param[in] freq              The channel frequency of specific AP scan
1428  *
1429  * @return 0 on success, otherwise negative error value
1430  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1431  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1432  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1433  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
1434  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1435  */
1436 int wifi_manager_specific_scan_set_freq(wifi_manager_specific_scan_h specific_scan, int freq);
1437
1438 /**
1439  * @brief Starts multi SSID and multi channel specific scan, asynchronously.
1440  * @since_tizen 4.0
1441  * @privlevel public
1442  * @privilege %http://tizen.org/privilege/network.set \n
1443  *            %http://tizen.org/privilege/network.get
1444  * @remarks This function needs both privileges.
1445  * @param[in] wifi            The Wi-Fi handle
1446  * @param[in] specific_scan   The Wi-Fi specific AP scan handle
1447  * @param[in] callback        The callback function to be called
1448  * @param[in] user_data       The user data passed to the callback function
1449  * @return 0 on success, otherwise negative error value.
1450  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1451  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1452  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1453  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1454  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1455  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1456  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
1457  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1458  * @post This function invokes wifi_manager_scan_finished_cb().
1459  */
1460 int wifi_manager_specific_ap_start_multi_scan(wifi_manager_h wifi,
1461                 wifi_manager_specific_scan_h specific_scan,
1462                 wifi_manager_scan_finished_cb callback, void *user_data);
1463
1464 /**
1465  * @brief Flushes BSS entries from the cache.
1466  * @since_tizen 7.0
1467  * @privlevel public
1468  * @privilege %http://tizen.org/privilege/network.set \n
1469  *            %http://tizen.org/privilege/network.get
1470  * @remarks This function needs both privileges.
1471  * @param[in] wifi           The Wi-Fi handle
1472  * @return 0 on success, otherwise negative error value.
1473  * @retval #WIFI_MANAGER_ERROR_NONE  Successful
1474  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1475  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1476  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1477  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1478  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1479  */
1480 int wifi_manager_flush_bss(wifi_manager_h wifi);
1481
1482 /**
1483  * @brief Connects to the hidden AP, asynchronously.
1484  * @since_tizen 4.0
1485  * @privlevel public
1486  * @privilege %http://tizen.org/privilege/network.set \n
1487  *            %http://tizen.org/privilege/network.get \n
1488  *            %http://tizen.org/privilege/network.profile
1489  * @remarks This function needs all listed privileges.
1490  * @param[in] wifi            The Wi-Fi handle
1491  * @param[in] essid           The ESSID of the hidden AP
1492  * @param[in] sec_type        The security type of the hidden AP
1493  * @param[in] passphrase      The passphrase of the hidden AP
1494  * @param[in] callback        The callback function to be called
1495  * @param[in] user_data       The user data passed to the callback function
1496  * @return 0 on success, otherwise negative error value.
1497  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1498  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1499  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1500  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1501  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1502  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1503  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1504  * @pre This function needs wifi_manager_scan() before use.
1505  * @post This function invokes wifi_manager_connected_cb().
1506  */
1507 int wifi_manager_connect_hidden_ap(wifi_manager_h wifi,
1508                 const char *essid, wifi_manager_security_type_e sec_type,
1509                 const char *passphrase, wifi_manager_connected_cb callback, void *user_data);
1510
1511 /**
1512  * @brief Gets the handle of the connected access point.
1513  * @since_tizen 3.0
1514  * @privlevel public
1515  * @privilege %http://tizen.org/privilege/network.get
1516  * @remarks You must release @a ap using wifi_manager_ap_destroy().
1517  * @param[in] wifi            The Wi-Fi handle
1518  * @param[out] ap             The access point handle
1519  * @return 0 on success, otherwise negative error value
1520  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1521  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1522  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1523  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1524  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
1525  * @retval #WIFI_MANAGER_ERROR_NO_CONNECTION        There is no connected AP
1526  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1527  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1528  */
1529 int wifi_manager_get_connected_ap(wifi_manager_h wifi, wifi_manager_ap_h *ap);
1530
1531 /**
1532  * @brief Gets the result of the scan.
1533  * @since_tizen 3.0
1534  * @privlevel public
1535  * @privilege %http://tizen.org/privilege/network.get
1536  * @param[in] wifi            The Wi-Fi handle
1537  * @param[in] callback        The callback to be called
1538  * @param[in] user_data       The user data passed to the callback function
1539  * @return 0 on success, otherwise negative error value
1540  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1541  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1542  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1543  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1544  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1545  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1546  * @post This function invokes wifi_manager_found_ap_cb().
1547  */
1548 int wifi_manager_foreach_found_ap(wifi_manager_h wifi, wifi_manager_found_ap_cb callback, void *user_data);
1549
1550 /**
1551  * @brief Gets the result of specific AP scan.
1552  * @since_tizen 3.0
1553  * @privlevel public
1554  * @privilege %http://tizen.org/privilege/network.get
1555  * @param[in] wifi            The Wi-Fi handle
1556  * @param[in] callback        The callback to be called
1557  * @param[in] user_data       The user data passed to the callback function
1558  * @return 0 on success, otherwise negative error value.
1559  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1560  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1561  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1562  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1563  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1564  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1565  * @post This function invokes wifi_manager_found_ap_cb().
1566  * @see wifi_manager_scan_specific_ap()
1567  */
1568 int wifi_manager_foreach_found_specific_ap(wifi_manager_h wifi,
1569                 wifi_manager_found_ap_cb callback, void *user_data);
1570
1571 /**
1572  * @brief Gets the result of the BSSID scan (i.e. BSSID, ESSID & RSSI).
1573  * @since_tizen 4.0
1574  * @privlevel public
1575  * @privilege %http://tizen.org/privilege/network.get
1576  * @param[in] wifi            The Wi-Fi handle
1577  * @param[in] callback        The callback to be called
1578  * @param[in] user_data       The user data passed to the callback function
1579  * @return 0 on success, otherwise negative error value
1580  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1581  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1582  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1583  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1584  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1585  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1586  * @post This function invokes wifi_manager_found_ap_cb().
1587  * @see wifi_manager_scan()
1588  * @see wifi_manager_scan_specific_ap()
1589  */
1590 int wifi_manager_foreach_found_bssid_ap(wifi_manager_h wifi,
1591                                 wifi_manager_found_ap_cb callback, void *user_data);
1592
1593
1594 /**
1595  * @brief Connects to the access point asynchronously.
1596  * @since_tizen 3.0
1597  * @privlevel public
1598  * @privilege %http://tizen.org/privilege/network.set \n
1599  *            %http://tizen.org/privilege/network.get
1600  * @remarks This function needs both privileges.
1601  * @param[in] wifi            The Wi-Fi handle
1602  * @param[in] ap              The access point handle
1603  * @param[in] callback        The callback function to be called \n
1604  *            This can be @c NULL if you don't want to get the notification.
1605  * @param[in] user_data       The user data passed to the callback function
1606  * @return 0 on success, otherwise negative error value
1607  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1608  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1609  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1610  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1611  * @retval #WIFI_MANAGER_ERROR_NOW_IN_PROGRESS      Now in progress
1612  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1613  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1614  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1615  * @post This function invokes wifi_manager_connected_cb().
1616  * @see wifi_manager_connected_cb()
1617  * @see wifi_manager_connect_by_wps_pbc()
1618  * @see wifi_manager_connect_by_wps_pin()
1619  * @see wifi_manager_disconnect()
1620  */
1621 int wifi_manager_connect(wifi_manager_h wifi, wifi_manager_ap_h ap, wifi_manager_connected_cb callback, void *user_data);
1622
1623 /**
1624  * @brief Disconnects to the access point asynchronously.
1625  * @since_tizen 3.0
1626  * @privlevel public
1627  * @privilege %http://tizen.org/privilege/network.set \n
1628  *            %http://tizen.org/privilege/network.get
1629  * @remarks This function needs both privileges.
1630  * @param[in] wifi            The Wi-Fi handle
1631  * @param[in] ap              The access point handle
1632  * @param[in] callback        The callback function to be called \n
1633  *            This can be @c NULL if you don't want to get the notification.
1634  * @param[in] user_data        The user data passed to the callback function
1635  * @return 0 on success, otherwise negative error value
1636  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1637  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1638  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1639  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1640  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1641  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1642  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1643  * @post This function invokes wifi_manager_disconnected_cb().
1644  * @see wifi_manager_disconnected_cb()
1645  * @see wifi_manager_connect_by_wps_pbc()
1646  * @see wifi_manager_connect_by_wps_pin()
1647  * @see wifi_manager_connect()
1648  */
1649 int wifi_manager_disconnect(wifi_manager_h wifi, wifi_manager_ap_h ap, wifi_manager_disconnected_cb callback, void *user_data);
1650
1651 /**
1652  * @brief Connects to the access point with WPS PBC asynchronously.
1653  * @since_tizen 3.0
1654  * @privlevel public
1655  * @privilege %http://tizen.org/privilege/network.profile \n
1656  *            %http://tizen.org/privilege/network.get
1657  * @remarks This function needs both privileges.
1658  * @param[in] wifi            The Wi-Fi handle
1659  * @param[in] ap              The access point handle
1660  * @param[in] callback        The callback function to be called \n
1661  *            This can be NULL if you don't want to get the notification.
1662  * @param[in] user_data       The user data passed to the callback function
1663  * @return 0 on success, otherwise negative error value
1664  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1665  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1666  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1667  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1668  * @retval #WIFI_MANAGER_ERROR_NOW_IN_PROGRESS      Now in progress
1669  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1670  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1671  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1672  * @post This function invokes wifi_manager_connected_cb().
1673  * @see wifi_manager_connected_cb()
1674  * @see wifi_manager_connect()
1675  * @see wifi_manager_disconnect()
1676  * @see wifi_manager_ap_is_wps_supported()
1677  */
1678 int wifi_manager_connect_by_wps_pbc(wifi_manager_h wifi,
1679                 wifi_manager_ap_h ap, wifi_manager_connected_cb callback, void *user_data);
1680
1681 /**
1682  * @brief Connects to the access point with WPS PIN asynchronously.
1683  * @since_tizen 3.0
1684  * @privlevel public
1685  * @privilege %http://tizen.org/privilege/network.profile \n
1686  *            %http://tizen.org/privilege/network.get
1687  * @remarks This function needs both privileges.
1688  * @param[in] wifi            The Wi-Fi handle
1689  * @param[in] ap              The access point handle
1690  * @param[in] pin             The WPS PIN is a non-NULL string with length greater than 0 and less than or equal to 8
1691  * @param[in] callback        The callback function to be called (this can be NULL if you don't want to get the notification)
1692  * @param[in] user_data       The user data passed to the callback function
1693  * @return 0 on success, otherwise negative error value
1694  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1695  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1696  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1697  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1698  * @retval #WIFI_MANAGER_ERROR_NOW_IN_PROGRESS      Now in progress
1699  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1700  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1701  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1702  * @post This function invokes wifi_manager_connected_cb().
1703  * @see wifi_manager_connected_cb()
1704  * @see wifi_manager_connect()
1705  * @see wifi_manager_disconnect()
1706  * @see wifi_manager_ap_is_wps_supported()
1707  */
1708 int wifi_manager_connect_by_wps_pin(wifi_manager_h wifi,
1709                 wifi_manager_ap_h ap, const char *pin, wifi_manager_connected_cb callback, void *user_data);
1710
1711 /**
1712  * @brief Connects to the access point with WPS PBC without entering SSID.
1713  * @since_tizen 4.0
1714  * @privlevel public
1715  * @privilege %http://tizen.org/privilege/network.set \n
1716  *            %http://tizen.org/privilege/network.get \n
1717  *            %http://tizen.org/privilege/network.profile
1718  * @remarks This function needs all listed privileges.
1719  * @param[in] wifi      The Wi-Fi handle
1720  * @param[in] callback  The callback function to be called \n
1721  *                      This can be NULL if you don't want to get the notification.
1722  * @param[in] user_data The user data passed to the callback function
1723  * @return 0 on success, otherwise negative error value
1724  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1725  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1726  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1727  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1728  * @retval #WIFI_MANAGER_ERROR_NOW_IN_PROGRESS      Now in progress
1729  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1730  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission denied
1731  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1732  * @post This function invokes wifi_manager_connected_cb().
1733  * @see wifi_manager_connected_cb()
1734  * @see wifi_manager_connect()
1735  * @see wifi_manager_disconnect()
1736  * @see wifi_manager_ap_is_wps_supported()
1737  */
1738 int wifi_manager_connect_by_wps_pbc_without_ssid(wifi_manager_h wifi,
1739                 wifi_manager_connected_cb callback, void *user_data);
1740
1741 /**
1742  * @brief Connects to the access point with WPS PIN without entering SSID.
1743  * @since_tizen 4.0
1744  * @privlevel public
1745  * @privilege %http://tizen.org/privilege/network.set \n
1746  *            %http://tizen.org/privilege/network.get \n
1747  *            %http://tizen.org/privilege/network.profile
1748  * @remarks This function needs all listed privileges.
1749  * @param[in] wifi      The Wi-Fi handle
1750  * @param[in] pin       The WPS PIN, a non-NULL string with length greater \n
1751  *                      than 0 and less than or equal to 8
1752  * @param[in] callback  The callback function to be called \n
1753  *                      This can be NULL if you don't want to get the notification.
1754  * @param[in] user_data The user data passed to the callback function
1755  * @return 0 on success, otherwise negative error value
1756  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1757  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1758  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1759  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1760  * @retval #WIFI_MANAGER_ERROR_NOW_IN_PROGRESS      Now in progress
1761  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1762  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission denied
1763  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1764  * @post This function invokes wifi_manager_connected_cb().
1765  * @see wifi_manager_connected_cb()
1766  * @see wifi_manager_connect()
1767  * @see wifi_manager_disconnect()
1768  * @see wifi_manager_ap_is_wps_supported()
1769  */
1770 int wifi_manager_connect_by_wps_pin_without_ssid(wifi_manager_h wifi,
1771                  const char *pin, wifi_manager_connected_cb callback, void *user_data);
1772
1773 /**
1774  * @brief Stops ongoing WPS provisioning / disconnects from the connected access point.
1775  * @since_tizen 4.0
1776  * @privlevel public
1777  * @privilege %http://tizen.org/privilege/network.set \n
1778  *            %http://tizen.org/privilege/network.get
1779  * @remarks This function needs both privileges.
1780  * @param[in] wifi      The Wi-Fi handle
1781  * @return 0 on success, otherwise negative error value
1782  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1783  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1784  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1785  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1786  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1787  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission denied
1788  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1789 */
1790 int wifi_manager_cancel_wps(wifi_manager_h wifi);
1791
1792 /**
1793  * @brief Gets the WPS generated PIN code.
1794  * @since_tizen 5.0
1795  * @privlevel public
1796  * @privilege %http://tizen.org/privilege/network.get
1797  * @remarks You must release @a wps_pin using free().
1798  * @param[in] wifi            The Wi-Fi handle
1799  * @param[out] wps_pin        The WPS PIN
1800  * @return 0 on success, otherwise negative error value
1801  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1802  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1803  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1804  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1805  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1806  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1807  */
1808 int wifi_manager_get_wps_generated_pin(wifi_manager_h wifi, char **wps_pin);
1809
1810 /**
1811  * @brief Deletes the information of a stored access point and disconnects from it if it was connected to.
1812  * @details If an AP is connected to, then connection information will be stored.
1813  * This information is used when a connection to that AP is established automatically.
1814  * @since_tizen 3.0
1815  * @privlevel public
1816  * @privilege %http://tizen.org/privilege/network.profile \n
1817  *            %http://tizen.org/privilege/network.get
1818  * @remarks This function needs both privileges.
1819  * @param[in] wifi            The Wi-Fi handle
1820  * @param[in] ap              The access point handle
1821  * @return 0 on success, otherwise negative error value
1822  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1823  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1824  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1825  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1826  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1827  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1828  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1829  */
1830 int wifi_manager_forget_ap(wifi_manager_h wifi, wifi_manager_ap_h ap);
1831
1832 /**
1833  * @brief Deletes stored access point's information and disconnects from it if connected, asynchronously.
1834  * @since_tizen 5.0
1835  * @privlevel public
1836  * @privilege %http://tizen.org/privilege/network.profile \n
1837  *            %http://tizen.org/privilege/network.get
1838  * @remarks This function needs both privileges.
1839  * @param[in] wifi            The Wi-Fi handle
1840  * @param[in] ap              The access point handle
1841  * @param[in] callback        The callback function to be called
1842  * @param[in] user_data       The user data passed to the callback function
1843  * @return 0 on success, otherwise negative error value
1844  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1845  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1846  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1847  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1848  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1849  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1850  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1851  * @post This function invokes wifi_manager_forget_ap_finished_cb().
1852  */
1853 int wifi_manager_forget_ap_async(wifi_manager_h wifi, wifi_manager_ap_h ap,
1854                 wifi_manager_forget_ap_finished_cb callback, void *user_data);
1855
1856 /**
1857  * @brief Updates an existing AP.
1858  * @details When a AP is changed, these changes will be not applied to the Connection Manager immediately.
1859  * When you call this function, your changes affect the Connection Manager and the existing AP is updated.
1860  * @since_tizen 3.0
1861  * @privlevel public
1862  * @privilege %http://tizen.org/privilege/network.profile \n
1863  *            %http://tizen.org/privilege/network.get
1864  * @remarks This function needs both privileges.
1865  * @param[in] wifi            The Wi-Fi handle
1866  * @param[in] ap              The access point handle
1867  * @return 0 on success, otherwise negative error value
1868  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1869  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1870  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1871  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1872  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1873  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1874  */
1875 int wifi_manager_update_ap(wifi_manager_h wifi, wifi_manager_ap_h ap);
1876
1877 /**
1878  * @brief Adds the Wi-Fi Vendor Specific Information Element (VSIE) to a specific frame type.
1879  * @since_tizen 5.0
1880  * @privlevel public
1881  * @privilege %http://tizen.org/privilege/network.set
1882  * @remarks @a vsie_str for @a frame_id will be in effect until Wi-Fi is deactivated.
1883  *
1884  * @param[in] wifi           The Wi-Fi handle
1885  * @param[in] frame_id       The frame ID for setting VSIE
1886  * @param[in] vsie_str       The VSIE data
1887  *
1888  * @return 0 on success, otherwise negative error value
1889  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1890  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1891  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1892  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1893  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1894  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1895  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1896  * @pre Wi-Fi service must be activated by wifi_manager_activate().
1897  * @see wifi_manager_activate()
1898  * @see wifi_manager_remove_vsie()
1899  * @see wifi_manager_get_vsie()
1900  */
1901 int wifi_manager_add_vsie(wifi_manager_h wifi,
1902                 wifi_manager_vsie_frames_e frame_id, const char *vsie_str);
1903
1904 /**
1905  * @brief Gets the Wi-Fi Vendor Specific Information Elements (VSIE) from a specific frame.
1906  * @since_tizen 5.0
1907  * @privlevel public
1908  * @privilege %http://tizen.org/privilege/network.get
1909  * @remarks @a vsie_str must be released with free().
1910  *
1911  * @param[in] wifi           The Wi-Fi handle
1912  * @param[in] frame_id       The frame ID for getting VSIE
1913  * @param[out] vsie_str      The VSIE data
1914  *
1915  * @return 0 on success, otherwise negative error value
1916  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1917  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1918  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1919  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1920  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1921  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1922  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1923  * @pre Wi-Fi service must be activated by wifi_manager_activate()
1924  *      and VSIE for a specific frame must be set with wifi_manager_add_vsie().
1925  * @see wifi_manager_activate()
1926  * @see wifi_manager_remove_vsie()
1927  * @see wifi_manager_add_vsie()
1928  */
1929 int wifi_manager_get_vsie(wifi_manager_h wifi,
1930                 wifi_manager_vsie_frames_e frame_id, char **vsie_str);
1931
1932 /**
1933  * @brief Removes the Wi-Fi Vendor Specific Information Element (VSIE) from specific frame.
1934  * @since_tizen 5.0
1935  * @privlevel public
1936  * @privilege %http://tizen.org/privilege/network.set
1937  * @remarks @a vsie_str for @a frame_id will be in effect until Wi-Fi is deactivated.
1938  *
1939  * @param[in] wifi           The wifi handle
1940  * @param[in] frame_id       The frame ID for removing VSIE
1941  * @param[in] vsie_str       The VSIE data
1942  *
1943  * @return 0 on success, otherwise negative error value
1944  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1945  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1946  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1947  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1948  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1949  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1950  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1951  * @pre Wi-Fi service must be activated by wifi_manager_activate()
1952  *      and VSIE for a specific frame must be set with wifi_manager_add_vsie().
1953  * @see wifi_manager_activate()
1954  * @see wifi_manager_get_vsie()
1955  * @see wifi_manager_add_vsie()
1956  */
1957 int wifi_manager_remove_vsie(wifi_manager_h wifi,
1958                 wifi_manager_vsie_frames_e frame_id, const char *vsie_str);
1959
1960 /**
1961 * @}
1962 */
1963
1964 /**
1965 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_MONITOR_MODULE
1966 * @{
1967 */
1968
1969 /**
1970  * @brief Gets the connection state.
1971  * @since_tizen 3.0
1972  * @privlevel public
1973  * @privilege %http://tizen.org/privilege/network.get
1974  * @param[in] wifi                The Wi-Fi handle
1975  * @param[out] connection_state   The connection state
1976  * @return 0 on success, otherwise negative error value
1977  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1978  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1979  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
1980  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
1981  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1982  */
1983 int wifi_manager_get_connection_state(wifi_manager_h wifi,
1984                 wifi_manager_connection_state_e *connection_state);
1985
1986 /**
1987  * @brief Registers the callback called when the device state is changed.
1988  * @since_tizen 3.0
1989  * @param[in] wifi            The Wi-Fi handle
1990  * @param[in] callback        The callback function to be called
1991  * @param[in] user_data       The user data passed to the callback function
1992  * @return 0 on success, otherwise negative error value
1993  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
1994  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
1995  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
1996  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
1997  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
1998  */
1999 int wifi_manager_set_device_state_changed_cb(wifi_manager_h wifi,
2000                 wifi_manager_device_state_changed_cb callback, void *user_data);
2001
2002 /**
2003  * @brief Unregisters the callback called when the device state is changed.
2004  * @since_tizen 3.0
2005  * @param[in] wifi            The Wi-Fi handle
2006  * @return 0 on success, otherwise negative error value
2007  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2008  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2009  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2010  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2011  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2012  */
2013 int wifi_manager_unset_device_state_changed_cb(wifi_manager_h wifi);
2014
2015 /**
2016  * @brief Registers the callback called when the background scan is finished.
2017  * @since_tizen 3.0
2018  * @param[in] wifi            The Wi-Fi handle
2019  * @param[in] callback        The callback function to be called
2020  * @param[in] user_data       The user data passed to the callback function
2021  * @return 0 on success, otherwise negative error value
2022  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2023  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2024  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2025  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2026  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2027  */
2028 int wifi_manager_set_background_scan_cb(wifi_manager_h wifi,
2029                 wifi_manager_scan_finished_cb callback, void *user_data);
2030
2031 /**
2032  * @brief Unregisters the callback called when the scan is finished.
2033  * @since_tizen 3.0
2034  * @param[in] wifi            The Wi-Fi handle
2035  * @return 0 on success, otherwise negative error value
2036  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2037  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2038  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2039  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2040  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2041  */
2042 int wifi_manager_unset_background_scan_cb(wifi_manager_h wifi);
2043
2044 /**
2045  * @brief Registers the callback called when the scanning state is changed.
2046  * @since_tizen 4.0
2047  * @param[in] wifi            The Wi-Fi handle
2048  * @param[in] callback        The callback function to be called
2049  * @param[in] user_data       The user data passed to the callback function
2050  * @return 0 on success, otherwise negative error value
2051  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2052  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2053  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2054  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2055  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2056  */
2057 int wifi_manager_set_scan_state_changed_cb(wifi_manager_h wifi,
2058                 wifi_manager_scan_state_changed_cb callback, void *user_data);
2059
2060 /**
2061  * @brief Unregisters the callback called when the scanning state is changed.
2062  * @since_tizen 4.0
2063  * @param[in] wifi            The Wi-Fi handle
2064  * @return 0 on success, otherwise negative error value
2065  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2066  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2067  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2068  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2069  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2070  */
2071 int wifi_manager_unset_scan_state_changed_cb(wifi_manager_h wifi);
2072
2073 /**
2074  * @brief Registers the callback called when the connection state is changed.
2075  * @since_tizen 3.0
2076  * @param[in] wifi            The Wi-Fi handle
2077  * @param[in] callback        The callback function to be called
2078  * @param[in] user_data       The user data passed to the callback function
2079  * @return 0 on success, otherwise negative error value
2080  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2081  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2082  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2083  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2084  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2085  */
2086 int wifi_manager_set_connection_state_changed_cb(wifi_manager_h wifi,
2087                 wifi_manager_connection_state_changed_cb callback, void *user_data);
2088
2089 /**
2090  * @brief Unregisters the callback called when the connection state is changed.
2091  * @since_tizen 3.0
2092  * @param[in] wifi            The Wi-Fi handle
2093  * @return 0 on success, otherwise negative error value
2094  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2095  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2096  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2097  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2098  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2099  */
2100 int wifi_manager_unset_connection_state_changed_cb(wifi_manager_h wifi);
2101
2102 /**
2103  * @brief Registers callback called when the RSSI of connected Wi-Fi is changed.
2104  * @since_tizen 3.0
2105  * @param[in] wifi            The Wi-Fi handle
2106  * @param[in] callback        The callback function to be called
2107  * @param[in] user_data       The user data passed to the callback function
2108  * @return 0 on success, otherwise negative error value
2109  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2110  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2111  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2112  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2113  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2114  */
2115 int wifi_manager_set_rssi_level_changed_cb(wifi_manager_h wifi,
2116                 wifi_manager_rssi_level_changed_cb callback, void *user_data);
2117
2118 /**
2119  * @brief Unregisters callback called when the RSSI of connected Wi-Fi is changed.
2120  * @since_tizen 3.0
2121  * @param[in] wifi            The Wi-Fi handle
2122  * @return 0 on success, otherwise negative error value
2123  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2124  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2125  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2126  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2127  */
2128 int wifi_manager_unset_rssi_level_changed_cb(wifi_manager_h wifi);
2129
2130 /**
2131  * @brief Registers a callback called when the Wi-Fi Module state is changed.
2132  * @since_tizen 4.0
2133  * @param[in] wifi            The Wi-Fi handle
2134  * @param[in] callback        The callback function to be called
2135  * @param[in] user_data       The user data passed to the callback function
2136  * @return @c 0 on success, otherwise negative error value
2137  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2138  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2139  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2140  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2141  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2142  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2143  * @see wifi_manager_module_state_changed_cb()
2144  * @see wifi_manager_unset_module_state_changed_cb()
2145 */
2146 int wifi_manager_set_module_state_changed_cb(wifi_manager_h wifi,
2147                 wifi_manager_module_state_changed_cb callback, void *user_data);
2148
2149 /**
2150  * @brief Unregisters the callback called when the Wi-Fi Module state is changed.
2151  * @since_tizen 4.0
2152  * @param[in] wifi            The Wi-Fi handle
2153  * @return @c 0 on success, otherwise negative error value
2154  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2155  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2156  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2157  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2158  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2159  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2160  * @see wifi_manager_module_state_changed_cb()
2161  * @see wifi_manager_set_module_state_changed_cb()
2162  */
2163 int wifi_manager_unset_module_state_changed_cb(wifi_manager_h wifi);
2164
2165 /**
2166  * @brief Gets the Wi-Fi Module state.
2167  * @since_tizen 4.0
2168  * @param[in] wifi            The Wi-Fi handle
2169  * @param[out] state          The Wi-Fi Module state
2170  * @return @c 0 on success, otherwise negative error value
2171  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2172  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2173  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2174  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2175  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2176  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2177  */
2178 int wifi_manager_get_module_state(wifi_manager_h wifi, wifi_manager_module_state_e *state);
2179
2180 /**
2181  * @brief Starts BSSID scan asynchronously.
2182  * @since_tizen 4.0
2183  * @privlevel public
2184  * @privilege %http://tizen.org/privilege/network.set \n
2185  *            %http://tizen.org/privilege/network.get
2186  * @remarks This function needs both privileges.
2187  * @param[in] wifi            The Wi-Fi handle
2188  * @param[in] callback        The callback function to be called
2189  * @param[in] user_data       The user data passed to the callback function
2190  * @return 0 on success, otherwise negative error value
2191  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2192  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2193  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2194  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2195  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2196  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
2197  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2198  * @post This function invokes wifi_manager_bssid_scan_finished_cb().
2199  */
2200 int wifi_manager_bssid_scan(wifi_manager_h wifi,
2201                 wifi_manager_bssid_scan_finished_cb callback, void *user_data);
2202
2203 /**
2204 * @}
2205 */
2206
2207
2208 /**
2209 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_AP_MODULE
2210 * @{
2211 */
2212
2213 /**
2214  * @brief Creates the access point handle.
2215  * @since_tizen 3.0
2216  * @remarks You must release @a ap using wifi_manager_ap_destroy().
2217  * @param[in] wifi            The Wi-Fi handle
2218  * @param[in] essid           The ESSID (Extended Service Set Identifier) should be null-terminated and can be UTF-8 encoded
2219  * @param[out] ap             The access point handle
2220  * @return 0 on success, otherwise negative error value
2221  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2222  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2223  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2224  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2225  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
2226  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2227  * @see wifi_manager_ap_destroy()
2228  */
2229 int wifi_manager_ap_create(wifi_manager_h wifi, const char *essid, wifi_manager_ap_h *ap);
2230
2231 /**
2232  * @brief Creates the hidden access point handle.
2233  * @since_tizen 3.0
2234  * @remarks You must release @a ap using wifi_manager_ap_destroy().
2235  * @param[in] wifi            The Wi-Fi handle
2236  * @param[in] essid           The ESSID (Extended Service Set Identifier) should be null-terminated and can be UTF-8 encoded
2237  * @param[out] ap             The access point handle
2238  * @return 0 on success, otherwise negative error value
2239  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2240  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2241  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2242  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2243  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2244  * @see wifi_manager_ap_destroy()
2245  */
2246 int wifi_manager_ap_hidden_create(wifi_manager_h wifi, const char *essid, wifi_manager_ap_h *ap);
2247
2248 /**
2249  * @brief Destroys the access point handle.
2250  * @since_tizen 3.0
2251  * @param[in] ap              The access point handle
2252  * @return 0 on success, otherwise negative error value
2253  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2254  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2255  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2256  * @see wifi_manager_ap_create()
2257  */
2258 int wifi_manager_ap_destroy(wifi_manager_ap_h ap);
2259
2260 /**
2261  * @brief Clones the access point handle.
2262  * @since_tizen 3.0
2263  * @remarks You must release @a cloned_ap using wifi_manager_ap_destroy().
2264  * @param[out] cloned_ap      The cloned access point handle
2265  * @param[in] origin          The origin access point handle
2266  * @return 0 on success, otherwise negative error value
2267  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2268  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2269  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2270  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2271  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2272  * @see wifi_manager_ap_destroy()
2273  */
2274 int wifi_manager_ap_clone(wifi_manager_ap_h *cloned_ap, wifi_manager_ap_h origin);
2275
2276 /**
2277  * @brief Refreshes the access point information.
2278  * @since_tizen 3.0
2279  * @privlevel public
2280  * @privilege %http://tizen.org/privilege/network.get
2281  * @remarks You should call this function in order to get the current access point information, because the information can be changed.
2282  * @param[in] ap              The access point handle
2283  * @return 0 on success, otherwise negative error value
2284  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2285  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2286  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2287  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2288  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2289  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
2290  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2291  */
2292 int wifi_manager_ap_refresh(wifi_manager_ap_h ap);
2293
2294
2295 /**
2296 * @}
2297 */
2298
2299
2300 /**
2301 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_AP_NETWORK_MODULE
2302 * @{
2303 */
2304
2305 /**
2306  * @brief Gets ESSID (Extended Service Set Identifier).
2307  * @since_tizen 3.0
2308  * @remarks You must release @a essid using free().
2309  * @param[in] ap              The access point handle
2310  * @param[out] essid          The ESSID
2311  * @return 0 on success, otherwise negative error value
2312  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2313  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2314  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2315  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2316  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2317  */
2318 int wifi_manager_ap_get_essid(wifi_manager_ap_h ap, char **essid);
2319
2320 /**
2321  * @brief Gets raw SSID (Service Set Identifier).
2322  * @since_tizen 4.0
2323  * @remarks You must release @a ssid using free().
2324  * @param[in] ap              The access point handle
2325  * @param[out] ssid           The raw SSID bytes
2326  * @param[out] ssid_len       The raw SSID length
2327  * @return 0 on success, otherwise negative error value
2328  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2329  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2330  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2331  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2332  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2333  */
2334 int wifi_manager_ap_get_raw_ssid(wifi_manager_ap_h ap, char **ssid, int *ssid_len);
2335
2336 /**
2337  * @brief Gets BSSID (Basic Service Set Identifier).
2338  * @since_tizen 3.0
2339  * @remarks You must release @a bssid using free().
2340  * @param[in] ap              The access point handle
2341  * @param[out] bssid          The BSSID
2342  * @return 0 on success, otherwise negative error value
2343  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2344  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2345  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2346  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2347  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2348  */
2349 int wifi_manager_ap_get_bssid(wifi_manager_ap_h ap, char **bssid);
2350
2351 /**
2352  * @brief Gets the RSSI.
2353  * @since_tizen 3.0
2354  * @param[in] ap              The access point handle
2355  * @param[out] rssi           The RSSI value (in dBm)
2356  * @return 0 on success, otherwise negative error value
2357  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2358  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2359  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2360  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2361  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2362  */
2363 int wifi_manager_ap_get_rssi(wifi_manager_ap_h ap, int *rssi);
2364
2365 /**
2366  * @brief Gets the RSSI level.
2367  * @since_tizen 4.0
2368  * @param[in] ap              The access point handle
2369  * @param[out] rssi_level     The RSSI level
2370  * @return 0 on success, otherwise negative error value
2371  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2372  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2373  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2374  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2375  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2376  */
2377 int wifi_manager_ap_get_rssi_level(wifi_manager_ap_h ap, wifi_manager_rssi_level_e *rssi_level);
2378
2379 /**
2380  * @brief Gets the frequency band (MHz).
2381  * @since_tizen 3.0
2382  * @param[in] ap              The access point handle
2383  * @param[out] frequency      The frequency
2384  * @return 0 on success, otherwise negative error value
2385  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2386  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2387  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2388  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2389  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2390  */
2391 int wifi_manager_ap_get_frequency(wifi_manager_ap_h ap, int *frequency);
2392
2393 /**
2394  * @brief Gets the max speed (Mbps).
2395  * @since_tizen 3.0
2396  * @param[in] ap              The access point handle
2397  * @param[out] max_speed      The max speed
2398  * @return 0 on success, otherwise negative error value
2399  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2400  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2401  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2402  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2403  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2404  */
2405 int wifi_manager_ap_get_max_speed(wifi_manager_ap_h ap, int *max_speed);
2406
2407 /**
2408  * @brief Checks whether the access point is favorite or not.
2409  * @since_tizen 3.0
2410  * @param[in] ap              The access point handle
2411  * @param[out] favorite  @c true if access point is favorite,
2412  *             otherwise @c false if access point is not favorite
2413  * @return 0 on success, otherwise negative error value
2414  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2415  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2416  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2417  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2418  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2419  */
2420 int wifi_manager_ap_is_favorite(wifi_manager_ap_h ap, bool *favorite);
2421
2422 /**
2423  * @brief Checks whether the access point is passpoint or not.
2424  * @since_tizen 3.0
2425  * @param[in] ap              The access point handle
2426  * @param[out] passpoint  @c true if access point is passpoint,
2427  *              otherwise @c false if access point is not passpoint.
2428  * @return 0 on success, otherwise negative error value
2429  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2430  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2431  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2432  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2433  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2434  */
2435 int wifi_manager_ap_is_passpoint(wifi_manager_ap_h ap, bool *passpoint);
2436
2437 /**
2438  * @brief Checks whether the access point is hidden or not.
2439  * @since_tizen 5.5
2440  * @param[in] ap              The access point handle
2441  * @param[out] is_hidden  @c true if the access point is hidden,
2442  *                        @c false if the access point is not hidden.
2443  * @return 0 on success, otherwise negative error value
2444  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2445  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2446  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2447  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2448  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2449  */
2450 int wifi_manager_ap_is_hidden(wifi_manager_ap_h ap, bool *is_hidden);
2451
2452 /**
2453  * @brief Gets the connection state.
2454  * @since_tizen 3.0
2455  * @param[in] ap              The access point handle
2456  * @param[out] state          The connection state
2457  * @return 0 on success, otherwise negative error value
2458  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2459  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2460  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2461  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2462  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2463  */
2464 int wifi_manager_ap_get_connection_state(wifi_manager_ap_h ap, wifi_manager_connection_state_e *state);
2465
2466 /**
2467  * @brief Gets the config type of IP.
2468  * @since_tizen 3.0
2469  * @param[in] ap              The access point handle
2470  * @param[in] address_family  The address family
2471  * @param[out] type           The type of IP config
2472  * @return 0 on success, otherwise negative error value
2473  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2474  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2475  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2476  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2477  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
2478  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED           Not supported
2479  */
2480 int wifi_manager_ap_get_ip_config_type(wifi_manager_ap_h ap,
2481                 wifi_manager_address_family_e address_family, wifi_manager_ip_config_type_e *type);
2482
2483 /**
2484  * @brief Sets the config type of IP.
2485  * @details If you set IP config type to #WIFI_MANAGER_IP_CONFIG_TYPE_STATIC,
2486  * then IP address, Gateway and Subnet mask will be set to the initial value "0.0.0.0".
2487  * @since_tizen 3.0
2488  * @param[in] ap              The access point handle
2489  * @param[in] address_family  The address family
2490  * @param[in] type            The type of IP config
2491  * @return 0 on success, otherwise negative error value
2492  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2493  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2494  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2495  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2496  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
2497  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
2498  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2499  * @see wifi_manager_update_ap()
2500  */
2501 int wifi_manager_ap_set_ip_config_type(wifi_manager_ap_h ap,
2502                 wifi_manager_address_family_e address_family, wifi_manager_ip_config_type_e type);
2503
2504 /**
2505  * @brief Gets the IP address.
2506  * @since_tizen 3.0
2507  * @remarks You must release @a ip_address using free().
2508  * @param[in] ap              The access point handle
2509  * @param[in] address_family  The address family
2510  * @param[out] ip_address     The IP address; this value is for default address \n
2511  *                            e.g, IPv6 can have multiple addresses. but you can only obtain a representative address \n
2512  *                            if you want to get all IPv6 address, you can use the wifi_manager_ap_foreach_ipv6_address().
2513  * @return 0 on success, otherwise negative error value
2514  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2515  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2516  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2517  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2518  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
2519  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2520  * @see  wifi_manager_ap_foreach_ipv6_address()
2521  */
2522 int wifi_manager_ap_get_ip_address(wifi_manager_ap_h ap,
2523                 wifi_manager_address_family_e address_family, char **ip_address);
2524
2525 /**
2526  * @brief Sets the IP address.
2527  * @since_tizen 3.0
2528  * @param[in] ap              The access point handle
2529  * @param[in] address_family  The address family
2530  * @param[in] ip_address      The IP address; if you set this value to NULL, then the existing value will be deleted
2531  * @return 0 on success, otherwise negative error value
2532  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2533  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2534  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2535  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2536  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
2537  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
2538  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2539  * @see wifi_manager_update_ap()
2540  */
2541 int wifi_manager_ap_set_ip_address(wifi_manager_ap_h ap,
2542                 wifi_manager_address_family_e address_family, const char *ip_address);
2543
2544 /**
2545  * @brief Called with an IPv6 address.
2546  * @since_tizen 4.0
2547  * @remarks  If @a ipv6_address is needed outside the callback, a copy should be
2548  *           made. @a ipv6_address will be freed automatically after the execution
2549  *           of this callback.
2550  * @param[in]  ipv6_address  The IPv6 address
2551  * @param[in]  user_data  The user data passed from the foreach function
2552  * @return  @c true to continue with the next iteration of the loop, \n
2553  *          @c false to break out of the loop
2554  * @pre  wifi_manager_ap_foreach_ipv6_address() will invoke this callback.
2555  * @see  wifi_manager_ap_foreach_ipv6_address()
2556  */
2557 typedef bool(*wifi_manager_ap_ipv6_address_cb)(char *ipv6_address, void *user_data);
2558
2559 /**
2560  * @brief Gets all IPv6 addresses assigned to the Wi-Fi interface.
2561  * @since_tizen 4.0
2562  * @param[in] ap        The access point handle
2563  * @param[in] callback  The callback to be called for each IPv6 address
2564  * @param[in] user_data The user data passed to the callback function
2565  * @return 0 on success, otherwise negative error value.
2566  * @retval #WIFI_MANAGER_ERROR_NONE               Successful
2567  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2568  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER  Invalid parameter
2569  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED   Operation failed
2570  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED      Not supported
2571  */
2572 int wifi_manager_ap_foreach_ipv6_address(wifi_manager_ap_h ap,
2573                 wifi_manager_ap_ipv6_address_cb callback, void *user_data);
2574
2575 /**
2576  * @brief Gets the subnet mask.
2577  * @since_tizen 3.0
2578  * @remarks You must release @a subnet_mask using free().
2579  * @param[in] ap              The access point handle
2580  * @param[in] address_family  The address family
2581  * @param[out] subnet_mask    The subnet mask
2582  * @return 0 on success, otherwise negative error value
2583  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2584  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2585  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2586  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2587  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
2588  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2589  */
2590 int wifi_manager_ap_get_subnet_mask(wifi_manager_ap_h ap,
2591                 wifi_manager_address_family_e address_family, char **subnet_mask);
2592
2593 /**
2594  * @brief Sets the subnet mask.
2595  * @since_tizen 3.0
2596  * @param[in] ap              The access point handle
2597  * @param[in] address_family  The address family
2598  * @param[in] subnet_mask     The subnet mask; if you set this value to NULL, then the existing value will be deleted
2599  * @return 0 on success, otherwise negative error value
2600  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2601  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2602  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2603  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2604  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
2605  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
2606  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2607  * @see wifi_manager_update_ap()
2608  */
2609 int wifi_manager_ap_set_subnet_mask(wifi_manager_ap_h ap,
2610                 wifi_manager_address_family_e address_family, const char *subnet_mask);
2611
2612 /**
2613  * @brief Gets the gateway address.
2614  * @since_tizen 3.0
2615  * @remarks You must release @a gateway_address using free().
2616  * @param[in] ap                The access point handle
2617  * @param[in] address_family    The address family
2618  * @param[out] gateway_address  The gateway address
2619  * @return 0 on success, otherwise negative error value
2620  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2621  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2622  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2623  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2624  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
2625  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2626  */
2627 int wifi_manager_ap_get_gateway_address(wifi_manager_ap_h ap,
2628                 wifi_manager_address_family_e address_family, char **gateway_address);
2629
2630 /**
2631  * @brief Sets the gateway address.
2632  * @since_tizen 3.0
2633  * @param[in] ap                The access point handle
2634  * @param[in] address_family    The address family
2635  * @param[in] gateway_address   The gateway address \n
2636  *                   If you set this value to @c NULL, then the existing value will be deleted.
2637  * @return 0 on success, otherwise negative error value
2638  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2639  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2640  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2641  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2642  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
2643  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
2644  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2645  * @see wifi_manager_update_ap()
2646  */
2647 int wifi_manager_ap_set_gateway_address(wifi_manager_ap_h ap,
2648                 wifi_manager_address_family_e address_family, const char *gateway_address);
2649
2650 /**
2651  * @brief Gets the DHCP Server address.
2652  * @since_tizen 4.0
2653  * @remarks You must release @a dhcp_server using g_free().
2654  *          This function is supported only for IPv4 address family.
2655  * @param[in] ap                The access point handle
2656  * @param[in] address_family    The address family
2657  * @param[out] dhcp_server      The DHCP server address
2658  * @return 0 on success, otherwise negative error value
2659  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2660  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2661  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2662  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2663  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2664  */
2665 int wifi_manager_ap_get_dhcp_server_address(wifi_manager_ap_h ap,
2666                 wifi_manager_address_family_e address_family, char **dhcp_server);
2667
2668 /**
2669  * @brief Gets the DHCP lease duration.
2670  * @since_tizen 4.0
2671  * @param[in] ap                        The access point handle
2672  * @param[in] address_family            The address family
2673  * @param[out] dhcp_lease_duration      The DHCP lease duration in seconds
2674  * @return 0 on success, otherwise negative error value
2675  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2676  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2677  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2678  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2679  */
2680 int wifi_manager_ap_get_dhcp_lease_duration(wifi_manager_ap_h ap,
2681                 wifi_manager_address_family_e address_family, int *dhcp_lease_duration);
2682
2683 /**
2684  * @brief Gets the proxy address.
2685  * @since_tizen 3.0
2686  * @remarks You must release @a proxy_address using free().
2687  * @param[in] ap                The access point handle
2688  * @param[in] address_family    The address family
2689  * @param[out] proxy_address    The proxy address
2690  * @return 0 on success, otherwise negative error value
2691  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2692  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2693  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2694  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2695  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
2696  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2697  */
2698 int wifi_manager_ap_get_proxy_address(wifi_manager_ap_h ap,
2699                 wifi_manager_address_family_e address_family, char **proxy_address);
2700
2701 /**
2702  * @brief Sets the proxy address.
2703  * @since_tizen 3.0
2704  * @param[in] ap                The access point handle
2705  * @param[in] address_family    The address family
2706  * @param[in] proxy_address        The proxy address \n
2707  *                 If you set this value to @c NULL, then the existing value will be deleted.
2708  * @return 0 on success, otherwise negative error value
2709  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2710  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2711  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2712  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2713  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
2714  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
2715  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2716  * @see wifi_manager_update_ap()
2717  */
2718 int wifi_manager_ap_set_proxy_address(wifi_manager_ap_h ap,
2719                 wifi_manager_address_family_e address_family, const char *proxy_address);
2720
2721 /**
2722  * @brief Gets the Proxy type.
2723  * @since_tizen 3.0
2724  * @param[in] ap                The access point handle
2725  * @param[out] proxy_type       The type of proxy
2726  * @return 0 on success, otherwise negative error value
2727  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2728  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2729  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2730  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2731  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2732  */
2733 int wifi_manager_ap_get_proxy_type(wifi_manager_ap_h ap,
2734                 wifi_manager_proxy_type_e *proxy_type);
2735
2736 /**
2737  * @brief Sets the Proxy address.
2738  * @details If you set Proxy type to #WIFI_MANAGER_PROXY_TYPE_AUTO or #WIFI_MANAGER_PROXY_TYPE_MANUAL, then Proxy will be restored.
2739  * @since_tizen 3.0
2740  * @param[in] ap                The access point handle
2741  * @param[in] proxy_type        The type of proxy
2742  * @return 0 on success, otherwise negative error value
2743  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2744  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2745  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2746  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2747  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
2748  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2749  * @see wifi_manager_update_ap()
2750  */
2751 int wifi_manager_ap_set_proxy_type(wifi_manager_ap_h ap,
2752                 wifi_manager_proxy_type_e proxy_type);
2753
2754 /**
2755  * @brief Gets the DNS address.
2756  * @since_tizen 3.0
2757  * @remarks The allowance of DNS address is @c 2.You must release @a dns_address using free().
2758  * @param[in] ap                The access point handle
2759  * @param[in] order             The order of DNS address; it starts from 1, which means first DNS address
2760  * @param[in] address_family    The address family
2761  * @param[out] dns_address      The DNS address
2762  * @return 0 on success, otherwise negative error value
2763  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2764  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2765  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2766  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2767  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
2768  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2769  */
2770 int wifi_manager_ap_get_dns_address(wifi_manager_ap_h ap,
2771                 int order, wifi_manager_address_family_e address_family, char **dns_address);
2772
2773 /**
2774  * @brief Sets the DNS address.
2775  * @since_tizen 3.0
2776  * @remarks The allowance of DNS address is @c 2 \n
2777  * @param[in] ap                The access point handle
2778  * @param[in] order             The order of DNS address \n
2779  *                It starts from @c 1, which means first DNS address.
2780  * @param[in] address_family    The address family
2781  * @param[in] dns_address       The DNS address \n
2782  *                If you set this value to @c NULL, then the existing value will be deleted.
2783  * @return 0 on success, otherwise negative error value
2784  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2785  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2786  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2787  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2788  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
2789  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
2790  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2791  * @see wifi_manager_update_ap()
2792  */
2793 int wifi_manager_ap_set_dns_address(wifi_manager_ap_h ap,
2794                 int order, wifi_manager_address_family_e address_family, const char *dns_address);
2795
2796 /**
2797  * @brief Gets the DNS config type.
2798  * @since_tizen 4.0
2799  * @param[in] ap              The access point handle
2800  * @param[in] address_family  The address family
2801  * @param[out] type           The DNS config type
2802  * @return 0 on success, otherwise negative error value.
2803  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2804  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2805  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2806  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2807  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2808  */
2809 int wifi_manager_ap_get_dns_config_type(wifi_manager_ap_h ap,
2810                 wifi_manager_address_family_e address_family, wifi_manager_dns_config_type_e *type);
2811
2812 /**
2813  * @brief Sets the DNS config type.
2814  * @since_tizen 4.0
2815  * @param[in] ap              The access point handle
2816  * @param[in] address_family  The address family
2817  * @param[in] type            The DNS config type
2818  * @return 0 on success, otherwise negative error value.
2819  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2820  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2821  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2822  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2823  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2824  * @see wifi_manager_update_ap()
2825  */
2826 int wifi_manager_ap_set_dns_config_type(wifi_manager_ap_h ap,
2827                 wifi_manager_address_family_e address_family, wifi_manager_dns_config_type_e type);
2828
2829 /**
2830  * @brief Gets the network prefix length.
2831  * @since_tizen 4.0
2832  * @param[in] ap              The access point handle
2833  * @param[in] address_family  The address family
2834  * @param[out] prefix_len     The network prefix length. \n
2835  *                            In case of IPv4, it means netmask length \n
2836  *                            (also called a prefix, e.g. 8, 16, 24, 32)
2837  * @return 0 on success, otherwise negative error value.
2838  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2839  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2840  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2841  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2842  */
2843 int wifi_manager_ap_get_prefix_length(wifi_manager_ap_h ap,
2844                 wifi_manager_address_family_e address_family, int *prefix_len);
2845
2846 /**
2847  * @brief Sets the network prefix length.
2848  * @since_tizen 4.0
2849  * @param[in] ap              The access point handle
2850  * @param[in] address_family  The address family
2851  * @param[in] prefix_len      The network prefix length. \n
2852  *                            In case of IPv4, it means netmask length \n
2853  *                            (also called a prefix, e.g. 8, 16, 24, 32)
2854  * @return 0 on success, otherwise negative error value.
2855  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2856  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2857  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2858  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2859  * @see wifi_manager_update_ap()
2860  */
2861 int wifi_manager_ap_set_prefix_length(wifi_manager_ap_h ap,
2862                 wifi_manager_address_family_e address_family, int prefix_len);
2863
2864 /**
2865  * @brief Gets the Wi-Fi disconnect reason from the supplicant.
2866  * @since_tizen 3.0
2867  * @param[in] ap                    The access point handle
2868  * @param[out] disconnect_reason    The supplicant disconnect reason
2869  * @return 0 on success, otherwise negative error value
2870  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2871  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2872  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2873  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2874  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2875  */
2876 int wifi_manager_ap_get_disconnect_reason(wifi_manager_ap_h ap,
2877                 wifi_manager_disconnect_reason_e *disconnect_reason);
2878
2879 /**
2880  * @brief Gets the error state.
2881  * @since_tizen 4.0
2882  * @param[in] ap              The access point handle
2883  * @param[out] error_state    The Wi-Fi connection error state
2884  * @return 0 on success, otherwise negative error value
2885  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2886  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2887  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2888  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2889  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2890  */
2891 int wifi_manager_ap_get_error_state(wifi_manager_ap_h ap, wifi_manager_error_e *error_state);
2892
2893 /**
2894  * @brief Gets the Wi-Fi Association Status Code from the supplicant.
2895  * @since_tizen 5.0
2896  * @param[in] ap              The access point handle
2897  * @param[out] status_code    The supplicant Wi-Fi association status code
2898  * @return 0 on success, otherwise negative error value
2899  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2900  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2901  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
2902  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2903  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2904  */
2905
2906 int wifi_manager_ap_get_assoc_status_code(wifi_manager_ap_h ap,
2907                 wifi_manager_assoc_status_code_e *status_code);
2908 /**
2909  * @brief Called with VSIE data and length of VSIE.
2910  * @since_tizen 5.0
2911  * @remarks  If @a vsie is needed outside the callback, a copy should be
2912  *           made. @a vsie will be freed automatically after the execution
2913  *           of this callback.
2914  * @param[in] vsie             The vendor specific data
2915  * @param[in] length         The length of vendor specific data
2916  * @param[in] user_data        The user data passed from the foreach function
2917  * @return  @c true to continue with the next iteration of the loop, \n
2918  *          @c false to break out of the loop
2919  * @pre  wifi_manager_ap_foreach_vsie() will invoke this callback.
2920  * @see  wifi_manager_ap_foreach_vsie().
2921  */
2922 typedef bool(*wifi_manager_ap_vsie_cb)(unsigned char *vsie, int length, void *user_data);
2923
2924 /**
2925  * @brief Gets all VSIE of AP.
2926  * @since_tizen 5.0
2927  * @param[in] ap               The access point handle
2928  * @param[in] callback         The callback to be called for each VSIE of AP
2929  * @param[in] user_data        The user data passed to the callback function
2930  * @return 0 on success, otherwise negative error value.
2931  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2932  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2933  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2934  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2935  */
2936 int wifi_manager_ap_foreach_vsie(wifi_manager_ap_h ap,
2937                 wifi_manager_ap_vsie_cb callback, void *user_data);
2938
2939 /**
2940  * @brief Gets the raw country code.
2941  * @since_tizen 5.0
2942  * @remarks You must release @a country_code using free().
2943  * @param[in] ap  The access point handle
2944  * @param[out] country_code  The country code, NULL if M/W does not have the country code
2945  * @return 0 on success, otherwise negative error value
2946  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2947  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2948  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2949  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
2950  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2951  */
2952 int wifi_manager_ap_get_countrycode(wifi_manager_ap_h ap, char **country_code);
2953
2954 /**
2955  * @brief Called for each found BSSID.
2956  * @since_tizen 5.0
2957  * @remarks  The @a bssid can be used only in the callback. To use it outside, make a copy.
2958  *           @a bssid is managed by the platform and will be released after the execution
2959  *           of this callback.
2960  * @param[in]  bssid  The BSSID
2961  * @param[in]  rssi  The RSSI
2962  * @param[in]  freq  The frequency
2963  * @param[in]  user_data  The user data passed from the foreach function
2964  * @return  @c true to continue with the next iteration of the loop, otherwise @c false to break out of the loop
2965  * @pre  wifi_manager_foreach_found_bssid() will invoke this callback.
2966  */
2967 typedef bool(*wifi_manager_found_bssid_cb)(const char *bssid, int rssi, int freq, void *user_data);
2968
2969 /**
2970  * @brief Gets the BSSID list.
2971  * @since_tizen 5.0
2972  * @param[in] ap  The access point handle
2973  * @param[in] callback  The callback to be called
2974  * @param[in] user_data The user data passed to the callback function
2975  * @return 0 on success, otherwise negative error value
2976  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
2977  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
2978  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
2979  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
2980  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
2981  * @post This function invokes wifi_manager_found_bssid_cb().
2982  */
2983 int wifi_manager_foreach_found_bssid(wifi_manager_ap_h ap, wifi_manager_found_bssid_cb callback, void *user_data);
2984
2985 /**
2986 * @}
2987 */
2988
2989
2990 /**
2991 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_AP_SECURITY_MODULE
2992 * @{
2993 */
2994
2995 /**
2996  * @brief Gets the Wi-Fi security mode.
2997  * @since_tizen 3.0
2998  * @param[in] ap                The access point handle
2999  * @param[out] type             The type of Wi-Fi security
3000  * @return 0 on success, otherwise negative error value
3001  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3002  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3003  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3004  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
3005  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3006  */
3007 int wifi_manager_ap_get_security_type(wifi_manager_ap_h ap, wifi_manager_security_type_e *type);
3008
3009 /**
3010  * @brief Checks whether a given security type is available in a given AP..
3011  * @details An AP may support several types of security modes together.
3012  * You can check all supported security modes with this function.
3013  * @since_tizen 7.0
3014  * @param[in] ap             The access point handle
3015  * @param[in] type           Wi-Fi security type
3016  * @param[out] supported     true when enabled and false when disabled
3017  * @return 0 on success, otherwise negative error value
3018  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3019  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3020  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3021  */
3022 int wifi_manager_ap_is_security_type_supported(wifi_manager_ap_h ap,
3023                                         wifi_manager_security_type_e type, bool *supported);
3024
3025 /**
3026  * @brief Sets the Wi-Fi security mode.
3027  * @since_tizen 3.0
3028  * @param[in] ap                The access point handle
3029  * @param[in] type              The type of Wi-Fi security
3030  * @return 0 on success, otherwise negative error value
3031  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3032  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3033  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3034  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
3035  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3036  */
3037 int wifi_manager_ap_set_security_type(wifi_manager_ap_h ap, wifi_manager_security_type_e type);
3038
3039 /**
3040  * @brief Gets the Wi-Fi encryption type.
3041  * @since_tizen 3.0
3042  * @param[in] ap                The access point handle
3043  * @param[out] type             The type of Wi-Fi encryption
3044  * @return 0 on success, otherwise negative error value
3045  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3046  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3047  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3048  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
3049  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3050  */
3051 int wifi_manager_ap_get_encryption_type(wifi_manager_ap_h ap, wifi_manager_encryption_type_e *type);
3052
3053 /**
3054  * @brief Sets the Wi-Fi encryption type.
3055  * @since_tizen 3.0
3056  * @param[in] ap                The access point handle
3057  * @param[in] type              The type of Wi-Fi encryption
3058  * @return 0 on success, otherwise negative error value
3059  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3060  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3061  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3062  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
3063  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3064  */
3065 int wifi_manager_ap_set_encryption_type(wifi_manager_ap_h ap, wifi_manager_encryption_type_e type);
3066
3067 /**
3068  * @brief Checks whether the passphrase is required or not.
3069  * @since_tizen 3.0
3070  * @remarks This function is not valid if security type is #WIFI_MANAGER_SECURITY_TYPE_EAP.
3071  * @param[in] ap                The access point handle
3072  * @param[out] required  @c true if passphrase is required,
3073  *             @c false if passphrase is not required.
3074  * @return 0 on success, otherwise negative error value
3075  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3076  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3077  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3078  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
3079  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3080  */
3081 int wifi_manager_ap_is_passphrase_required(wifi_manager_ap_h ap, bool *required);
3082
3083 /**
3084  * @brief Sets the passphrase.
3085  * @since_tizen 3.0
3086  * @param[in] ap                The access point handle
3087  * @param[in] passphrase        The passphrase of access point
3088  * @return 0 on success, otherwise negative error value
3089  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3090  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3091  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3092  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
3093  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3094  */
3095 int wifi_manager_ap_set_passphrase(wifi_manager_ap_h ap, const char *passphrase);
3096
3097 /**
3098  * @brief Checks whether the WPS(Wi-Fi Protected Setup) is supported or not.
3099  * @since_tizen 3.0
3100  * @param[in] ap                The access point handle
3101  * @param[out] supported  @c true if WPS is supported,
3102  *              otherwise @c false is WPS is not supported.
3103  * @return 0 on success, otherwise negative error value
3104  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3105  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3106  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3107  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
3108  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3109  * @see wifi_manager_connect_by_wps_pbc()
3110  * @see wifi_manager_connect_by_wps_pin()
3111  */
3112 int wifi_manager_ap_is_wps_supported(wifi_manager_ap_h ap, bool *supported);
3113
3114 /**
3115  * @brief Checks whether Protected Management Frame is required.
3116  * @since_tizen 7.0
3117  * @param[in] ap             The access point handle
3118  * @param[out] required      true when required and false when not required
3119  * @return 0 on success, otherwise negative error value
3120  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3121  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3122  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3123  */
3124 int wifi_manager_ap_is_pmf_required(wifi_manager_ap_h ap, bool *required);
3125 /**
3126 * @}
3127 */
3128
3129
3130 /**
3131 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_AP_SECURITY_EAP_MODULE
3132 * @{
3133 */
3134
3135 /**
3136  * @brief Sets the passphrase of EAP.
3137  * @details You can set one of @a user_name and @a password as @c NULL.
3138  * In this case, the value of a parameter which is set as @c NULL will be the previous value.
3139  * But it is not allowed that both @a user_name and @a password are set as @c NULL.
3140  * @since_tizen 3.0
3141  * @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_PEAP or #WIFI_MANAGER_EAP_TYPE_TTLS.
3142  * @param[in] ap                The access point handle
3143  * @param[in] user_name         The user name \n
3144  *            This value can be @c NULL.
3145  * @param[in] password          The password \n
3146  *            This value can be @c NULL.
3147  * @return 0 on success, otherwise negative error value
3148  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3149  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3150  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3151  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3152  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3153  */
3154 int wifi_manager_ap_set_eap_passphrase(wifi_manager_ap_h ap, const char *user_name, const char *password);
3155
3156 /**
3157  * @brief Gets the passphrase of EAP.
3158  * @since_tizen 3.0
3159  * @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_PEAP or #WIFI_MANAGER_EAP_TYPE_TTLS.
3160  *            You must release @a user_name using free().
3161  * @param[in] ap                The access point handle
3162  * @param[out] user_name        The user name
3163  * @param[out] is_password_set  @c true if password is set,
3164  *                otherwise @c false if password is not set.
3165  * @return 0 on success, otherwise negative error value
3166  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3167  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3168  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3169  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
3170  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3171  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3172  */
3173 int wifi_manager_ap_get_eap_passphrase(wifi_manager_ap_h ap, char **user_name, bool *is_password_set);
3174
3175 /**
3176  * @brief Sets access point anonymous identity.
3177  * @since_tizen 5.5
3178  * @param[in] ap                    The access point handle
3179  * @param[in] anonymous_identity    The anonymous identity
3180  * @return 0 on success, otherwise negative error value
3181  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3182  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3183  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION            Invalid operation
3184  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED                Not supported
3185  */
3186 int wifi_manager_ap_set_eap_anonymous_identity(wifi_manager_ap_h ap, const char *anonymous_identity);
3187
3188 /**
3189  * @brief Gets access point anonymous identity.
3190  * @since_tizen 5.5
3191  * @remarks You must release @a anonymous_identity using free().
3192  * @param[in] ap                    The access point handle
3193  * @param[out] anonymous_identity   The anonymous identity of access point
3194  * @return 0 on success, otherwise negative error value
3195  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3196  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3197  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY                Out of memory
3198  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION            Invalid operation
3199  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED                Not supported
3200  */
3201 int wifi_manager_ap_get_eap_anonymous_identity(wifi_manager_ap_h ap, char **anonymous_identity);
3202
3203 /**
3204  * @brief Gets the CA Certificate of EAP.
3205  * @since_tizen 3.0
3206  * @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS.
3207  *            You must release @a file using free().
3208  * @param[in] ap                The access point handle
3209  * @param[out] file             The file path of CA Certificate
3210  * @return 0 on success, otherwise negative error value
3211  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3212  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3213  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3214  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
3215  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3216  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3217  */
3218 int wifi_manager_ap_get_eap_ca_cert_file(wifi_manager_ap_h ap, char **file);
3219
3220 /**
3221  * @brief Sets the CA Certificate of EAP.
3222  * @since_tizen 3.0
3223  * @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS.
3224  * @param[in] ap                The access point handle
3225  * @param[in] file              The file path of CA Certificate
3226  * @return 0 on success, otherwise negative error value
3227  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3228  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3229  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3230  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3231  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3232  */
3233 int wifi_manager_ap_set_eap_ca_cert_file(wifi_manager_ap_h ap, const char *file);
3234
3235 /**
3236  * @brief Gets the Client Certificate of EAP.
3237  * @since_tizen 3.0
3238  * @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS.
3239  *            You must release @a file using free().
3240  * @param[in] ap                The access point handle
3241  * @param[out] file             The file path of Client Certificate
3242  * @return 0 on success, otherwise negative error value
3243  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3244  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3245  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3246  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
3247  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3248  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3249  */
3250 int wifi_manager_ap_get_eap_client_cert_file(wifi_manager_ap_h ap, char **file);
3251
3252 /**
3253  * @brief Sets the Client Certificate of EAP.
3254  * @since_tizen 3.0
3255  * @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS.
3256  * @param[in] ap                The access point handle
3257  * @param[in] file              The file path of Client Certificate
3258  * @return 0 on success, otherwise negative error value
3259  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3260  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3261  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3262  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3263  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3264  */
3265 int wifi_manager_ap_set_eap_client_cert_file(wifi_manager_ap_h ap, const char *file);
3266
3267 /**
3268  * @brief Gets the private key file of EAP.
3269  * @since_tizen 3.0
3270  * @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS.
3271  *            You must release @a file using free().
3272  * @param[in] ap                The access point handle
3273  * @param[out] file             The file path of private key
3274  * @return 0 on success, otherwise negative error value
3275  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3276  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3277  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3278  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
3279  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3280  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3281  */
3282 int wifi_manager_ap_get_eap_private_key_file(wifi_manager_ap_h ap, char **file);
3283
3284 /**
3285  * @brief Sets the private key information of EAP.
3286  * @since_tizen 3.0
3287  * @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS.
3288  * @param[in] ap                The access point handle
3289  * @param[in] file              The file path of private key
3290  * @param[in] password          The password
3291  * @return 0 on success, otherwise negative error value
3292  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3293  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3294  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3295  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3296  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3297  */
3298 int wifi_manager_ap_set_eap_private_key_info(wifi_manager_ap_h ap,
3299                 const char *file, const char *password);
3300
3301 /**
3302  * @brief Gets the EAP type of Wi-Fi.
3303  * @since_tizen 3.0
3304  * @param[in] ap                The access point handle
3305  * @param[out] type             The type of EAP
3306  * @return 0 on success, otherwise negative error value
3307  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3308  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3309  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3310  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3311  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
3312  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3313  */
3314 int wifi_manager_ap_get_eap_type(wifi_manager_ap_h ap, wifi_manager_eap_type_e *type);
3315
3316 /**
3317  * @brief Sets the EAP type of Wi-Fi.
3318  * @since_tizen 3.0
3319  * @param[in] ap                The access point handle
3320  * @param[in] type              The type of EAP
3321  * @return 0 on success, otherwise negative error value
3322  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3323  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3324  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3325  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3326  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3327  */
3328 int wifi_manager_ap_set_eap_type(wifi_manager_ap_h ap, wifi_manager_eap_type_e type);
3329
3330 /**
3331  * @brief Gets the type of EAP phase2 authentication of Wi-Fi.
3332  * @since_tizen 3.0
3333  * @param[in] ap                The access point handle
3334  * @param[out] type             The type of EAP phase2 authentication
3335  * @return 0 on success, otherwise negative error value
3336  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3337  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3338  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3339  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3340  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
3341  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3342  */
3343 int wifi_manager_ap_get_eap_auth_type(wifi_manager_ap_h ap, wifi_manager_eap_auth_type_e *type);
3344
3345 /**
3346  * @brief Sets the type of EAP phase2 authentication of Wi-Fi.
3347  * @since_tizen 3.0
3348  * @param[in] ap                The access point handle
3349  * @param[in] type              The type of EAP phase2 authentication
3350  * @return 0 on success, otherwise negative error value
3351  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3352  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3353  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3354  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3355  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3356  */
3357 int wifi_manager_ap_set_eap_auth_type(wifi_manager_ap_h ap, wifi_manager_eap_auth_type_e type);
3358
3359 /**
3360 * @}
3361 */
3362
3363 /**
3364 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_CONFIG_MODULE
3365 * @{
3366 */
3367
3368 /**
3369  * @brief Gets access point configuration handle.
3370  * @since_tizen 3.0
3371  * @remarks You must release @a config using wifi_manager_config_destroy().
3372  *
3373  * @param[in] wifi              The Wi-Fi handle
3374  * @param[in] name              The access point name
3375  * @param[in] passphrase        The access point passphrase
3376  * @param[in] security_type     The access point security type
3377  * @param[out] config           The access point configuration handle
3378  *
3379  * @return 0 on success, otherwise negative error value
3380  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3381  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3382  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3383  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3384  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
3385  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3386  * @pre This function needs a wifi_manager_initialize() call before use
3387  * @see wifi_manager_config_destroy()
3388  */
3389 int wifi_manager_config_create(wifi_manager_h wifi, const char *name,
3390                 const char *passphrase, wifi_manager_security_type_e security_type, wifi_manager_config_h *config);
3391
3392 /**
3393  * @brief Clones the access point configuration handle.
3394  * @since_tizen 3.0
3395  * @remarks You must release @a cloned_config using wifi_manager_config_destroy().
3396  *
3397  * @param[in] origin            The origin access point configuration handle
3398  * @param[out] cloned_config    The cloned access point configuration handle
3399  *
3400  * @return 0 on success, otherwise negative error value
3401  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3402  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3403  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3404  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3405  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
3406  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3407  * @see wifi_manager_config_destroy()
3408  */
3409 int wifi_manager_config_clone(wifi_manager_config_h origin, wifi_manager_config_h *cloned_config);
3410
3411 /**
3412  * @brief Destroys the access point configuration handle.
3413  * @since_tizen 3.0
3414  *
3415  * @param[in] config            The access point configuration handle
3416  *
3417  * @return 0 on success, otherwise negative error value
3418  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3419  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3420  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3421  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3422  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3423  * @see wifi_manager_config_create()
3424  * @see wifi_manager_config_clone()
3425  */
3426 int wifi_manager_config_destroy(wifi_manager_config_h config);
3427
3428 /**
3429  * @brief Saves Wi-Fi configuration of access point.
3430  * @details When a configuration is changed, these changes will be not applied to the Connection Manager immediately.\n
3431  *            When you call this function, your changes affect the Connection Manager and the existing configuration is updated.
3432  * @since_tizen 3.0
3433  * @privlevel public
3434  * @privilege %http://tizen.org/privilege/network.profile
3435  *
3436  * @param[in] wifi              The Wi-Fi handle
3437  * @param[in] config            The access point configuration handle
3438  *
3439  * @return 0 on success, otherwise negative error value
3440  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3441  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3442  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3443  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3444  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission denied
3445  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3446  * @see wifi_manager_config_create()
3447  */
3448 int wifi_manager_config_save(wifi_manager_h wifi, wifi_manager_config_h config);
3449
3450 /**
3451  * @brief Removes Wi-Fi configuration of access point.
3452  * @since_tizen 3.0
3453  * @privlevel public
3454  * @privilege %http://tizen.org/privilege/network.profile
3455  *
3456  * @param[in] wifi              The Wi-Fi handle
3457  * @param[in] config            The access point configuration handle
3458  *
3459  * @return 0 on success, otherwise negative error value
3460  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3461  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3462  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3463  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3464  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission denied
3465  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3466  * @see wifi_manager_config_create()
3467  * @see wifi_manager_config_foreach_configuration()
3468  */
3469 int wifi_manager_config_remove(wifi_manager_h wifi, wifi_manager_config_h config);
3470
3471 /**
3472  * @brief Gets configurations of an access point.
3473  * @since_tizen 3.0
3474  * @privlevel public
3475  * @privilege %http://tizen.org/privilege/network.profile
3476  *
3477  * @param[in] wifi              The Wi-Fi handle
3478  * @param[in] callback          The callback to be called
3479  * @param[in] user_data         The user data passed to the callback function
3480  *
3481  * @return 0 on success, otherwise negative error value
3482  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3483  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3484  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3485  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3486  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission denied
3487  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3488  * @pre This function needs wifi_manager_initialize() before use.
3489  * @post This function invokes wifi_manager_config_list_cb().
3490  */
3491 int wifi_manager_config_foreach_configuration(wifi_manager_h wifi,
3492                 wifi_manager_config_list_cb callback, void *user_data);
3493
3494 /**
3495  * @brief Gets the name of access point from configuration.
3496  * @since_tizen 3.0
3497  * @remarks You must release @a name using free().
3498  *
3499  * @param[in] config            The access point configuration handle
3500  * @param[out] name             The name of access point
3501  *
3502  * @return 0 on success, otherwise negative error value
3503  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3504  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3505  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3506  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3507  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
3508  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3509  */
3510 int wifi_manager_config_get_name(wifi_manager_config_h config, char **name);
3511
3512 /**
3513  * @brief Gets the security type of access point from configuration.
3514  * @since_tizen 3.0
3515  *
3516  * @param[in] config            The access point configuration handle
3517  * @param[out] security_type    The security type of access point
3518  *
3519  * @return 0 on success, otherwise negative error value
3520  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3521  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3522  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3523  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3524  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3525  */
3526 int wifi_manager_config_get_security_type(wifi_manager_config_h config,
3527                 wifi_manager_security_type_e *security_type);
3528
3529 /**
3530  * @brief Sets access point proxy address configuration.
3531  * @since_tizen 3.0
3532  *
3533  * @param[in] config            The access point configuration handle
3534  * @param[in] address_family    The address family
3535  * @param[in] proxy_address     The proxy address
3536  *
3537  * @return 0 on success, otherwise negative error value
3538  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3539  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3540  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3541  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3542  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission denied
3543  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
3544  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3545  * @see wifi_manager_config_save()
3546  */
3547 int wifi_manager_config_set_proxy_address(wifi_manager_config_h config,
3548                 wifi_manager_address_family_e address_family, const char *proxy_address);
3549
3550 /**
3551  * @brief Gets the proxy address of access point from configuration.
3552  * @since_tizen 3.0
3553  * @remarks You must release @a proxy_address using free().
3554  *
3555  * @param[in] config            The access point configuration handle
3556  * @param[out] address_family   The address family
3557  * @param[out] proxy_address    The proxy address
3558  *
3559  * @return 0 on success, otherwise negative error value
3560  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3561  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3562  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3563  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3564  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
3565  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3566  */
3567 int wifi_manager_config_get_proxy_address(wifi_manager_config_h config,
3568                 wifi_manager_address_family_e *address_family, char **proxy_address);
3569
3570 /**
3571  * @brief Sets the hidden property of access point from the configuration.
3572  * @since_tizen 3.0
3573  *
3574  * @param[in] config            The access point configuration handle
3575  * @param[in] is_hidden         The new value of the hidden property
3576  *
3577  * @return 0 on success, otherwise negative error value
3578  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3579  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3580  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3581  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3582  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission denied
3583  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3584  * @see wifi_manager_config_save()
3585  */
3586 int wifi_manager_config_set_hidden_ap_property(wifi_manager_config_h config, bool is_hidden);
3587
3588 /**
3589  * @brief Gets the hidden property of access point from the configuration.
3590  * @since_tizen 3.0
3591  *
3592  * @param[in] config            The access point configuration handle
3593  * @param[out] is_hidden        The hidden property of access point
3594  *
3595  * @return 0 on success, otherwise negative error value
3596  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3597  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3598  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
3599  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3600  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3601  */
3602 int wifi_manager_config_get_hidden_ap_property(wifi_manager_config_h config, bool *is_hidden);
3603
3604 /**
3605  * @brief Gets access point IP config type from configuration.
3606  * @since_tizen 5.0
3607  *
3608  * @param[in] config            The access point configuration handle
3609  * @param[in] address_family    The address family
3610  * @param[out] type             The type of IP configuration
3611  *
3612  * @return 0 on success, otherwise negative error value
3613  * @retval #WIFI_MANAGER_ERROR_NONE                     Successful
3614  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED          Not initialized
3615  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER        Invalid parameter
3616  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED     Address family not supported
3617  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED            Not supported
3618  */
3619 int wifi_manager_config_get_ip_config_type(wifi_manager_config_h config,
3620                 wifi_manager_address_family_e address_family,
3621                 wifi_manager_ip_config_type_e *type);
3622
3623 /**
3624  * @brief Sets access point IP config type to configuration.
3625  * @since_tizen 5.0
3626  *
3627  * @param[in] config            The access point configuration handle
3628  * @param[in] address_family    The address family
3629  * @param[in] type              The type of IP configuration
3630  *
3631  * @return 0 on success, otherwise negative error value
3632  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3633  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3634  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3635  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
3636  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3637  * @see wifi_manager_config_save()
3638  */
3639 int wifi_manager_config_set_ip_config_type(wifi_manager_config_h config,
3640                 wifi_manager_address_family_e address_family,
3641                 wifi_manager_ip_config_type_e type);
3642
3643 /**
3644  * @brief Gets access point IP address from configuration.
3645  * @since_tizen 5.0
3646  * @remarks You must release @a ip_address using free().
3647  *
3648  * @param[in] config            The access point configuration handle
3649  * @param[in] address_family    The address family
3650  * @param[out] ip_address       The IP address; this value is for default address
3651  *
3652  * @return 0 on success, otherwise negative error value
3653  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3654  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3655  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3656  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
3657  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
3658  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3659  */
3660 int wifi_manager_config_get_ip_address(wifi_manager_config_h config,
3661                 wifi_manager_address_family_e address_family, char **ip_address);
3662
3663 /**
3664  * @brief Sets access point IP address to configuration.
3665  * @since_tizen 5.0
3666  *
3667  * @param[in] config                    The access point configuration handle
3668  * @param[in] address_family    The address family
3669  * @param[in] ip_address                The IP address; if you set this value to NULL, then
3670  *                              the existing value will be deleted.
3671  *
3672  * @return 0 on success, otherwise negative error value
3673  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3674  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3675  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3676  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
3677  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3678  * @see wifi_manager_config_save()
3679  */
3680 int wifi_manager_config_set_ip_address(wifi_manager_config_h config,
3681                 wifi_manager_address_family_e address_family, const char *ip_address);
3682
3683 /**
3684  * @brief Gets access point subnet mask from configuration.
3685  * @since_tizen 5.0
3686  * @remarks You must release @a subnet_mask using free().
3687  *
3688  * @param[in] config            The access point configuration handle
3689  * @param[in] address_family    The address family
3690  * @param[out] subnet_mask      The subnet mask
3691  *
3692  * @return 0 on success, otherwise negative error value
3693  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3694  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3695  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3696  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
3697  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
3698  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3699  */
3700 int wifi_manager_config_get_subnet_mask(wifi_manager_config_h config,
3701                 wifi_manager_address_family_e address_family, char **subnet_mask);
3702
3703 /**
3704  * @brief Sets access point subnet mask to configuration.
3705  * @since_tizen 5.0
3706  *
3707  * @param[in] config            The access point configuration handle
3708  * @param[in] address_family    The address family
3709  * @param[in] subnet_mask       The subnet mask; if you set this value to NULL, then
3710  *                              the existing value will be deleted.
3711  *
3712  * @return 0 on success, otherwise negative error value
3713  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3714  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3715  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3716  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
3717  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3718  * @see wifi_manager_config_save()
3719  */
3720 int wifi_manager_config_set_subnet_mask(wifi_manager_config_h config,
3721                 wifi_manager_address_family_e address_family, const char *subnet_mask);
3722
3723 /**
3724  * @brief Gets the network prefix length from configuration.
3725  * @since_tizen 5.0
3726  *
3727  * @param[in] config          The access point configuration handle
3728  * @param[in] address_family  The address family
3729  * @param[out] prefix_len     The network prefix length. \n
3730  *                            In case of IPv4, it means netmask length \n
3731  *                            (also called a prefix, e.g. 8, 16, 24, 32)
3732  *
3733  * @return 0 on success, otherwise negative error value
3734  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3735  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3736  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3737  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
3738  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
3739  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3740  */
3741 int wifi_manager_config_get_prefix_length(wifi_manager_config_h config,
3742                 wifi_manager_address_family_e address_family, int *prefix_len);
3743
3744 /**
3745  * @brief Sets the network prefix length to configuration.
3746  * @since_tizen 5.0
3747  *
3748  * @param[in] config          The access point configuration handle
3749  * @param[in] address_family  The address family
3750  * @param[in] prefix_len      The network prefix length. \n
3751  *                            In case of IPv4, it means netmask length \n
3752  *                            (also called a prefix, e.g. 8, 16, 24, 32)
3753  *
3754  * @return 0 on success, otherwise negative error value
3755  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3756  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3757  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3758  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
3759  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3760  * @see wifi_manager_config_save()
3761  */
3762 int wifi_manager_config_set_prefix_length(wifi_manager_config_h config,
3763                 wifi_manager_address_family_e address_family, int prefix_len);
3764
3765 /**
3766  * @brief Gets access point gateway address from configuration.
3767  * @since_tizen 5.0
3768  * @remarks You must release @a gateway_address using free().
3769  *
3770  * @param[in] config            The access point configuration handle
3771  * @param[in] address_family    The address family
3772  * @param[out] gateway_address  The gateway address; this value is for default address
3773  *
3774  * @return 0 on success, otherwise negative error value
3775  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3776  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3777  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3778  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
3779  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
3780  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3781  */
3782 int wifi_manager_config_get_gateway_address(wifi_manager_config_h config,
3783                 wifi_manager_address_family_e address_family, char **gateway_address);
3784
3785 /**
3786  * @brief Sets access point gateway address to configuration.
3787  * @since_tizen 5.0
3788  *
3789  * @param[in] config            The access point configuration handle
3790  * @param[in] address_family    The address family
3791  * @param[in] gateway_address   The gateway address; if you set this value to NULL, then
3792  *                              the existing value will be deleted.
3793  *
3794  * @return 0 on success, otherwise negative error value
3795  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3796  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3797  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3798  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
3799  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3800  * @see wifi_manager_config_save()
3801  */
3802 int wifi_manager_config_set_gateway_address(wifi_manager_config_h config,
3803                 wifi_manager_address_family_e address_family,
3804                 const char *gateway_address);
3805
3806 /**
3807  * @brief Gets access point dns config type from configuration.
3808  * @since_tizen 5.0
3809  *
3810  * @param[in] config            The access point configuration handle
3811  * @param[in] address_family    The address family
3812  * @param[out] type             The type of dns configuration
3813  *
3814  * @return 0 on success, otherwise negative error value
3815  * @retval #WIFI_MANAGER_ERROR_NONE                     Successful
3816  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED          Not initialized
3817  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER        Invalid parameter
3818  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED     Address family not supported
3819  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED            Not supported
3820  */
3821 int wifi_manager_config_get_dns_config_type(wifi_manager_config_h config,
3822                 wifi_manager_address_family_e address_family,
3823                 wifi_manager_dns_config_type_e *type);
3824
3825 /**
3826  * @brief Sets access point dns config type to configuration.
3827  * @since_tizen 5.0
3828  *
3829  * @param[in] config            The access point configuration handle
3830  * @param[in] address_family    The address family
3831  * @param[in] type              The type of DNS configuration
3832  *
3833  * @return 0 on success, otherwise negative error value
3834  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3835  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3836  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3837  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
3838  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3839  * @see wifi_manager_config_save()
3840  */
3841 int wifi_manager_config_set_dns_config_type(wifi_manager_config_h config,
3842                 wifi_manager_address_family_e address_family,
3843                 wifi_manager_dns_config_type_e type);
3844
3845 /**
3846  * @brief Gets access point dns address from configuration.
3847  * @since_tizen 5.0
3848  * @remarks The allowance of DNS address is @c 2.You must release @a dns_address using free().
3849  *
3850  * @param[in] config            The access point configuration handle
3851  * @param[in] order             The order of DNS address; it starts from 1, which means first DNS address
3852  * @param[in] address_family    The address family
3853  * @param[out] dns_address      The DNS address
3854  *
3855  * @return 0 on success, otherwise negative error value
3856  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3857  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3858  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3859  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
3860  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
3861  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3862  */
3863 int wifi_manager_config_get_dns_address(wifi_manager_config_h config,
3864                 int order, wifi_manager_address_family_e address_family,
3865                 char **dns_address);
3866
3867 /**
3868  * @brief Sets access point dns address to configuration.
3869  * @since_tizen 5.0
3870  *
3871  * @param[in] config            The access point configuration handle
3872  * @param[in] order             The order of DNS address \n
3873  *                              It starts from 1, which means first DNS address.
3874  * @param[in] address_family    The address family
3875  * @param[in] dns_address       The dns address; if you set this value to NULL, then
3876  *                              the existing value will be deleted.
3877  *
3878  * @return 0 on success, otherwise negative error value
3879  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3880  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3881  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3882  * @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
3883  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
3884  * @see wifi_manager_config_save()
3885  */
3886 int wifi_manager_config_set_dns_address(wifi_manager_config_h config,
3887                 int order, wifi_manager_address_family_e address_family,
3888                 const char *dns_address);
3889
3890 /**
3891  * @brief Gets access point anonymous identity from configuration.
3892  * @since_tizen 3.0
3893  * @remarks You must release @a anonymous_identity using free().
3894  *
3895  * @param[in] config                The access point configuration handle
3896  * @param[out] anonymous_identity   The anonymous identity of access point
3897  *
3898  * @return 0 on success, otherwise negative error value
3899  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3900  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3901  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3902  */
3903 int wifi_manager_config_get_eap_anonymous_identity(wifi_manager_config_h config,
3904                 char **anonymous_identity);
3905
3906 /**
3907  * @brief Sets access point anonymous identity to configuration.
3908  * @since_tizen 3.0
3909  *
3910  * @param[in] config                The access point configuration handle
3911  * @param[in] anonymous_identity    The anonymous identity
3912  *
3913  * @return 0 on success, otherwise negative error value
3914  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3915  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3916  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3917  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
3918  * @see wifi_manager_config_save()
3919  */
3920 int wifi_manager_config_set_eap_anonymous_identity(wifi_manager_config_h config,
3921                 const char *anonymous_identity);
3922
3923 /**
3924  * @brief Gets access point cacert file from configuration.
3925  * @since_tizen 3.0
3926  * @remarks You must release @a ca_cert using free().
3927  * @remarks The mediastorage privilege %http://tizen.org/privilege/mediastorage is needed \n
3928  *            if @a ca_cert is relevant to media storage.\n
3929  *            The externalstorage privilege %http://tizen.org/privilege/externalstorage is needed \n
3930  *            if @a ca_cert is relevant to external storage.
3931  *
3932  * @param[in] config           The access point configuration handle
3933  * @param[out] ca_cert         The certification authority(CA) certificates file of access point
3934  *
3935  * @return 0 on success, otherwise negative error value
3936  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3937  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3938  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3939  */
3940 int wifi_manager_config_get_eap_ca_cert_file(wifi_manager_config_h config, char **ca_cert);
3941
3942 /**
3943  * @brief Sets access point cacert file to configuration.
3944  * @since_tizen 3.0
3945  * @remarks The mediastorage privilege %http://tizen.org/privilege/mediastorage is needed \n
3946  *            if @a ca_cert is relevant to media storage.\n
3947  *            The externalstorage privilege %http://tizen.org/privilege/externalstorage is needed \n
3948  *            if @a ca_cert is relevant to external storage.
3949  *
3950  * @param[in] config           The access point configuration handle
3951  * @param[in] ca_cert          The certification authority(CA) certificates file of access point
3952  *
3953  * @return 0 on success, otherwise negative error value
3954  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3955  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3956  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3957  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
3958  * @see wifi_manager_config_save()
3959  */
3960 int wifi_manager_config_set_eap_ca_cert_file(wifi_manager_config_h config, const char *ca_cert);
3961
3962 /**
3963  * @brief Gets access point client cert file from configuration.
3964  * @since_tizen 3.0
3965  * @remarks You must release @a client_cert using free().
3966  *
3967  * @param[in] config           The access point configuration handle
3968  * @param[out] client_cert     The certification authority(CA) certificates file of access point
3969  *
3970  * @return 0 on success, otherwise negative error value
3971  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3972  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3973  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3974  */
3975 int wifi_manager_config_get_eap_client_cert_file(wifi_manager_config_h config, char **client_cert);
3976
3977 /**
3978  * @brief Sets access point client cert file to configuration.
3979  * @since_tizen 3.0
3980  *
3981  * @param[in] config           The access point configuration handle
3982  * @param[in] private_key      The private key file
3983  * @param[in] client_cert      The certification authority(CA) certificates file of access point
3984  *
3985  * @return 0 on success, otherwise negative error value
3986  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
3987  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
3988  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
3989  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
3990  * @see wifi_manager_config_save()
3991  */
3992 int wifi_manager_config_set_eap_client_cert_file(wifi_manager_config_h config,
3993                 const char *private_key, const char *client_cert);
3994
3995 /**
3996  * @brief Gets the private key file of EAP.
3997  * @since_tizen 5.0
3998  * @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS.
3999  *            You must release @a file using free().
4000  *
4001  * @param[in] config           The access point configuration handle
4002  * @param[out] file            The file path of private key
4003  *
4004  * @return 0 on success, otherwise negative error value
4005  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4006  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4007  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4008  * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
4009  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4010  */
4011 int wifi_manager_config_get_eap_private_key_file(wifi_manager_config_h config, char **file);
4012
4013 /**
4014  * @brief Sets the private key information of EAP.
4015  * @since_tizen 5.0
4016  * @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS.
4017  *
4018  * @param[in] config           The access point configuration handle
4019  * @param[in] file             The file path of private key
4020  * @param[in] password         The password
4021  *
4022  * @return 0 on success, otherwise negative error value
4023  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4024  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4025  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4026  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4027  * @see wifi_manager_config_save()
4028  */
4029 int wifi_manager_config_set_eap_private_key_info(wifi_manager_config_h config,
4030                 const char *file, const char *password);
4031
4032 /**
4033  * @brief Gets access point identity from configuration.
4034  * @since_tizen 3.0
4035  * @remarks You must release @a identity using free().
4036  *
4037  * @param[in] config           The access point configuration handle
4038  * @param[out] identity        The identity of access point
4039  *
4040  * @return 0 on success, otherwise negative error value
4041  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4042  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4043  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4044  */
4045 int wifi_manager_config_get_eap_identity(wifi_manager_config_h config, char **identity);
4046
4047 /**
4048  * @brief Sets access point identity to configuration.
4049  * @since_tizen 3.0
4050  *
4051  * @param[in] config           The access point configuration handle
4052  * @param[in] identity         The identity
4053  *
4054  * @return 0 on success, otherwise negative error value
4055  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4056  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4057  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4058  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
4059  * @see wifi_manager_config_save()
4060  */
4061 int wifi_manager_config_set_eap_identity(wifi_manager_config_h config, const char *identity);
4062
4063 /**
4064  * @brief Gets access point EAP type from configuration.
4065  * @since_tizen 3.0
4066  *
4067  * @param[in] config           The access point configuration handle
4068  * @param[out] eap_type        The EAP type of access point
4069  *
4070  * @return 0 on success, otherwise negative error value
4071  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4072  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4073  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4074  */
4075 int wifi_manager_config_get_eap_type(wifi_manager_config_h config, wifi_manager_eap_type_e *eap_type);
4076
4077 /**
4078  * @brief Sets access point EAP type to configuration.
4079  * @since_tizen 3.0
4080  *
4081  * @param[in] config           The access point configuration handle
4082  * @param[in] eap_type         The EAP type
4083  *
4084  * @return 0 on success, otherwise negative error value
4085  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4086  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4087  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4088  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
4089  * @see wifi_manager_config_save()
4090  */
4091 int wifi_manager_config_set_eap_type(wifi_manager_config_h config, wifi_manager_eap_type_e eap_type);
4092
4093 /**
4094  * @brief Gets access point EAP auth type from configuration.
4095  * @since_tizen 3.0
4096  *
4097  * @param[in] config           The access point configuration handle
4098  * @param[out] eap_auth_type   The EAP auth type of access point
4099  *
4100  * @return 0 on success, otherwise negative error value
4101  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4102  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4103  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4104  */
4105 int wifi_manager_config_get_eap_auth_type(wifi_manager_config_h config,
4106                 wifi_manager_eap_auth_type_e *eap_auth_type);
4107
4108 /**
4109  * @brief Sets access point EAP auth type to configuration.
4110  * @since_tizen 3.0
4111  *
4112  * @param[in] config           The access point configuration handle
4113  * @param[in] eap_auth_type    The EAP auth type
4114  *
4115  * @return 0 on success, otherwise negative error value
4116  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4117  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4118  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4119  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
4120  * @see wifi_manager_config_save()
4121  */
4122 int wifi_manager_config_set_eap_auth_type(wifi_manager_config_h config,
4123                 wifi_manager_eap_auth_type_e eap_auth_type);
4124
4125 /**
4126  * @brief Gets access point subject match from configuration.
4127  * @since_tizen 3.0
4128  * @remarks You must release @a subject_match using free().
4129  *
4130  * @param[in] config           The access point configuration handle
4131  * @param[out] subject_match   The subject match of access point
4132  *
4133  * @return 0 on success, otherwise negative error value
4134  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4135  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4136  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4137  */
4138 int wifi_manager_config_get_eap_subject_match(wifi_manager_config_h config,
4139                 char **subject_match);
4140
4141 /**
4142  * @brief Sets access point subject match to configuration.
4143  * @since_tizen 3.0
4144  *
4145  * @param[in] config           The access point configuration handle
4146  * @param[in] subject_match    The subject match
4147  *
4148  * @return 0 on success, otherwise negative error value
4149  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4150  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4151  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4152  * @see wifi_manager_config_save()
4153  */
4154 int wifi_manager_config_set_eap_subject_match(wifi_manager_config_h config,
4155                 const char *subject_match);
4156
4157 /**
4158  * @}
4159  */
4160
4161 /**
4162  * @addtogroup CAPI_NETWORK_WIFI_MANAGER_TDLS_MODULE
4163  * @{
4164  */
4165
4166 /**
4167  * @brief Registers the callback called when a TDLS device is found.
4168  * @since_tizen 4.0
4169  *
4170  * @param[in] wifi             The Wi-Fi handle
4171  * @param[in] callback         The callback function to be called
4172  * @param[in] user_data The user data passed to the callback function
4173  *
4174  * @return @c 0 on success, otherwise negative error value
4175  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4176  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4177  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
4178  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4179  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4180  */
4181 int wifi_manager_tdls_set_discovered_cb(wifi_manager_h wifi,
4182                 wifi_manager_tdls_discovered_cb callback, void *user_data);
4183
4184 /**
4185  * @brief Unregisters the callback called when TDLS device is found.
4186  * @since_tizen 4.0
4187  *
4188  * @param[in] wifi             The Wi-Fi handle
4189  *
4190  * @return @c 0 on success, otherwise negative error value
4191  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4192  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4193  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
4194  */
4195 int wifi_manager_tdls_unset_discovered_cb(wifi_manager_h wifi);
4196
4197 /**
4198  * @brief Discovers devices that support TDLS.
4199  * @since_tizen 4.0
4200  * @privlevel public
4201  * @privilege %http://tizen.org/privilege/network.set
4202  *
4203  * @param[in] wifi             The Wi-Fi handle
4204  * @param[in] peer_mac_addr    The MAC address (e.g., ff:ff:ff:ff:ff:ff,
4205  *                             AA:BB:CC:DD:EE:FF) of the peer to be discovered
4206  *
4207  * @return @c 0 on success, otherwise negative error value
4208  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4209  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4210  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
4211  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
4212  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
4213  */
4214 int wifi_manager_tdls_start_discovery(wifi_manager_h wifi, const char *peer_mac_addr);
4215
4216 /**
4217  * @brief Connects to a peer device.
4218  * @since_tizen 4.0
4219  * @privlevel public
4220  * @privilege %http://tizen.org/privilege/network.set
4221  *
4222  * @param[in] wifi             The Wi-Fi handle
4223  * @param[in] peer_mac_addr    The MAC address of the peer device to be connected
4224  *
4225  * @return @c 0 on success, otherwise negative error value
4226  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4227  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4228  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
4229  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4230  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
4231  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
4232  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4233  */
4234 int wifi_manager_tdls_connect(wifi_manager_h wifi, const char *peer_mac_addr);
4235
4236 /**
4237  * @brief Disconnects the connected peer.
4238  * @since_tizen 3.0
4239  * @privlevel public
4240  * @privilege %http://tizen.org/privilege/network.set
4241  *
4242  * @param[in] wifi                The Wi-Fi handle
4243  * @param[in] peer_mac_addr       The MAC address of the connected peer
4244  *
4245  * @return @c 0 on success, otherwise negative error value
4246  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4247  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4248  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
4249  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4250  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
4251  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
4252  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4253  */
4254 int wifi_manager_tdls_disconnect(wifi_manager_h wifi, const char *peer_mac_addr);
4255
4256 /**
4257  * @brief Gets Peer Mac address of Connected peer.
4258  * @since_tizen 3.0
4259  * @privlevel public
4260  * @privilege %http://tizen.org/privilege/network.get
4261  *
4262  * @remarks The @a peer_mac_addr should be freed using free().
4263  * @param[in] wifi                The Wi-Fi handle
4264  * @param[out] peer_mac_addr      The MAC address of the connected peer
4265  *
4266  * @return @c 0 on success, otherwise negative error value
4267  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4268  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4269  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
4270  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4271  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
4272  * @retval #WIFI_MANAGER_ERROR_NO_CONNECTION        No active TDLS Connection
4273  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
4274  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4275  */
4276 int wifi_manager_tdls_get_connected_peer(wifi_manager_h wifi, char **peer_mac_addr);
4277
4278 /**
4279  * @brief Registers the callback called when TDLS state is changed.
4280  * @since_tizen 3.0
4281  *
4282  * @param[in] wifi            The Wi-Fi handle
4283  * @param[in] callback        The callback function to be called
4284  * @param[in] user_data       The user data passed to the callback function
4285  *
4286  * @return @c 0 on success, otherwise negative error value
4287  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4288  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4289  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
4290  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4291  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4292  */
4293 int wifi_manager_tdls_set_state_changed_cb(wifi_manager_h wifi,
4294                 wifi_manager_tdls_state_changed_cb callback, void *user_data);
4295
4296 /**
4297  * @brief Unregisters the callback called when TDLS state is changed.
4298  * @since_tizen 3.0
4299  *
4300  * @param[in] wifi            The Wi-Fi handle
4301  * @return @c 0 on success, otherwise negative error value
4302  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4303  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4304  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4305  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
4306  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4307  */
4308 int wifi_manager_tdls_unset_state_changed_cb(wifi_manager_h wifi);
4309
4310
4311 /**
4312  * @brief Enables a TDLS channel switching request.
4313  * @since_tizen 4.0
4314  * @privlevel public
4315  * @privilege %http://tizen.org/privilege/network.set
4316  *
4317  * @param[in] wifi            The Wi-Fi handle
4318  * @param[in] peer_mac_addr   The MAC address of the connected TDLS peer
4319  * @param[in] freq            The new frequency [MHz]
4320  *
4321  * @return @c 0 on success, otherwise negative error value
4322  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4323  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4324  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4325  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
4326  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission denied
4327  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4328  */
4329
4330 int wifi_manager_tdls_enable_channel_switching(wifi_manager_h wifi,
4331                 const char *peer_mac_addr, int freq);
4332
4333
4334 /**
4335  * @brief Disables a TDLS channel switching request.
4336  * @since_tizen 4.0
4337  * @privlevel public
4338  * @privilege %http://tizen.org/privilege/network.set
4339  *
4340  * @param[in] wifi            The Wi-Fi handle
4341  * @param[in] peer_mac_addr   The MAC address of the connected TDLS peer
4342  *
4343  * @return @c 0 on success, otherwise negative error value
4344  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4345  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4346  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4347  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
4348  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission denied
4349  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4350  */
4351
4352 int wifi_manager_tdls_disable_channel_switching(wifi_manager_h wifi,
4353                 const char *peer_mac_addr);
4354
4355
4356 /**
4357  * @brief Registers the callback called when IP conflict state is changed.
4358  * @since_tizen 5.0
4359  * @param[in] wifi            The Wi-Fi handle
4360  * @param[in] callback        The callback function to be called
4361  * @param[in] user_data       The user data passed to the callback function
4362  * @return 0 on success, otherwise negative error value
4363  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4364  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4365  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
4366  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4367  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4368  */
4369 int wifi_manager_set_ip_conflict_cb(wifi_manager_h wifi,
4370                 wifi_manager_ip_conflict_cb callback, void *user_data);
4371
4372 /**
4373  * @brief Unregisters the callback called when IP conflict state is changed.
4374  * @since_tizen 5.0
4375  * @param[in] wifi            The Wi-Fi handle
4376  * @return 0 on success, otherwise negative error value
4377  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4378  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4379  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
4380  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4381  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4382  */
4383 int wifi_manager_unset_ip_conflict_cb(wifi_manager_h wifi);
4384
4385 /**
4386  * @brief Enables or disables IP conflict detection.
4387  * @since_tizen 5.0
4388  * @privlevel public
4389  * @privilege %http://tizen.org/privilege/network.set
4390  *
4391  * @param[in] wifi            The Wi-Fi handle
4392  * @param[in] detect          True or false boolean to enable or disable
4393  *
4394  * @return @c 0 on success, otherwise negative error value
4395  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4396  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4397  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4398  * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
4399  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission denied
4400  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4401  */
4402 int wifi_manager_set_ip_conflict_detect_enable(wifi_manager_h wifi,
4403                 bool detect);
4404
4405 /**
4406  * @brief Checks whether IP conflict detection is enabled.
4407  * @since_tizen 5.0
4408  * @privlevel public
4409  * @privilege %http://tizen.org/privilege/network.get
4410  * @param[in] wifi        The Wi-Fi handle
4411  * @param[out] state     @c true if IP conflict detection is enabled,
4412  *             otherwise @c false if IP conflict detection is disabled.
4413  * @return 0 on success, otherwise negative error value
4414  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4415  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4416  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4417  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
4418  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
4419  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4420  */
4421 int wifi_manager_ip_conflict_detect_is_enabled(wifi_manager_h wifi, bool *state);
4422
4423 /**
4424  * @brief Gets the state of the IP conflict.
4425  * @since_tizen 5.0
4426  * @privlevel public
4427  * @privilege %http://tizen.org/privilege/network.get
4428  * @param[in] wifi          The Wi-Fi handle
4429  * @param[out] state        The current state of IP conflict
4430  * @return 0 on success, otherwise negative error value
4431  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4432  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4433  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4434  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
4435  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
4436  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4437  */
4438 int wifi_manager_get_ip_conflict_state(wifi_manager_h wifi,
4439                 wifi_manager_ip_conflict_state_e *state);
4440
4441 /**
4442  * @brief Gets whether 5Ghz Wi-Fi band is supported.
4443  * @since_tizen 5.5
4444  * @privlevel public
4445  * @privilege %http://tizen.org/privilege/network.get
4446  * @param[in] wifi          The Wi-Fi handle
4447  * @param[out] supported   @c true if 5Ghz Wi-Fi band is supported,
4448  *             otherwise   @c false if 5Ghz Wi-Fi band is not supported.
4449  * @return 0 on success, otherwise negative error value
4450  * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
4451  * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
4452  * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
4453  * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
4454  * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
4455  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
4456  */
4457 int wifi_manager_is_5ghz_band_supported(wifi_manager_h wifi, bool *supported);
4458
4459 /**
4460  * @}
4461  */
4462
4463
4464 #ifdef __cplusplus
4465 }
4466 #endif
4467
4468 #endif /* __TIZEN_WIFI_MANAGER_H__ */