modify API doxygen (Most are about alignment)
[platform/framework/native/net.git] / inc / FNetWifiWifiTypes.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file    FNetWifiWifiTypes.h
20  * @brief   This is the header file for the enumerations of the Wifi namespace.
21  *
22  * This header file contains the type declarations of the Wifi namespace.
23  */
24 #ifndef _FNET_WIFI_WIFI_TYPES_H_
25 #define _FNET_WIFI_WIFI_TYPES_H_
26
27 #include <FBaseTypes.h>
28 #include <FBaseByteBuffer.h>
29
30 namespace Tizen { namespace Net { namespace Wifi
31 {
32
33 /**
34  * The Wi-Fi Direct Device ID.
35  *
36  * @since   2.0
37  */
38 typedef int WifiDirectDeviceId;
39
40 /**
41  * The maximum number of associated clients.
42  *
43  * @since   2.0
44  */
45 static const int MAX_WIFI_DIRECT_CONNECTED_CLIENTS = 8;
46
47 /**
48  * The maximum number of group owners intent for negotiation.
49  *
50  * @since   2.0
51  */
52 static const int MAX_WIFI_DIRECT_GROUP_OWNER_INTENT = 15;
53
54 /**
55  * @enum    WifiPowerStatus
56  *
57  * Defines the power status of the local Wi-Fi device.
58  *
59  * @since   2.0
60  * @see     WifiManager::GetPowerStatus()
61  */
62 enum WifiPowerStatus
63 {
64     WIFI_POWER_STATUS_OFF = 0,      /**<  The local Wi-Fi device is turned off */
65     WIFI_POWER_STATUS_ON,           /**<  The local Wi-Fi device is turned on */
66     WIFI_POWER_STATUS_DEEP_SLEEP,   /**<  The local Wi-Fi device enters deep sleep mode */
67 };
68
69 /**
70  * @enum    WifiBssType
71  *
72  * Defines the type of Basic Service Set (BSS).
73  *
74  * @since   2.0
75  */
76 enum WifiBssType
77 {
78     WIFI_BSS_TYPE_INFRASTRUCTURE = 0,   /**< The infrastructure type which usually consists of a single Access Point (AP) @n
79                                          *   However, in order to provide sufficient coverage, it could be necessary to use two
80                                          *   or more APs. @n
81                                          *    Logically, there needs to be an interconnection among APs, and this concept is
82                                          *   called Distribution %System (DS). @n
83                                          *   Connecting with multiple APs through DS creates a wireless network of an arbitrary
84                                          *   size. @n
85                                          *   This is called Extended Service Set (ESS). Finally, a logical connection point to
86                                          *   the wired LAN is supported by a concept designated as Portal. */
87     WIFI_BSS_TYPE_INDEPENDENT,          /**<  The simplest Wi-Fi configuration is called as Independent Basic Service Set (IBSS)
88                                          *    or ad hoc @n
89                                          *    The IBSS is a self-contained network that only supports direct communication
90                                          *    between Stations (STAs) that belong to the same BSS. @n
91                                          *    The most common example of this connection is the use of Wi-Fi to establish
92                                          *    peer-to-peer network connection between two STAs. */
93     WIFI_BSS_TYPE_ANY,                  /**<  The type with no specification */
94     WIFI_BSS_TYPE_MAX = 65535           // This enum value is for internal use only. Using this enum value can cause behavioral,
95                                         // security-related, and consistency-related issues in the application.
96 };
97
98 /**
99  * @enum    WifiAuthenticationType
100  *
101  * Defines IEEE 802.11 authentication. @n
102  * IEEE 802.11 authentication operates at the link level between IEEE 802.11 stations (STAs).
103  * IEEE 802.11 does not provide end-to-end (message origin to message destination) or user-to-user authentication.
104  *
105  * @since   2.0
106  */
107 enum WifiAuthenticationType
108 {
109     WIFI_AUTHENTICATION_OPEN = 0,           /**<  The Open %System Authentication that admits any STA to the DS */
110     WIFI_AUTHENTICATION_SHARED,             /**<  The Shared Key Authentication relies on the WEP to demonstrate knowledge of a
111                                              *    WEP encryption key */
112     WIFI_AUTHENTICATION_WPA,                /**<  The Enterprise Authentication that supports WPA (Wi-Fi Protected Access) */
113     WIFI_AUTHENTICATION_WPA_PSK,            /**<  The Personal Authentication that supports WPA; PSK stands for PreShared Key */
114     WIFI_AUTHENTICATION_WPA2,               /**<  The Enterprise Authentication that supports WPA2 */
115     WIFI_AUTHENTICATION_WPA2_PSK,           /**<  The Personal Authentication that supports WPA2; PSK stands for PreShared Key */
116     WIFI_AUTHENTICATION_WPA_WPA2_MIXED_PSK, /**<  The Personal Authentication that supports both WPA and WPA2; PSK stands for
117                                              *    PreShared Key */
118     WIFI_AUTHENTICATION_MAX = 65535         // This enum value is for internal use only. Using this enum value can cause
119                                             // behavioral, security-related, and consistency-related issues in the application.
120 };
121
122 /**
123  * @enum    WifiEncryptionType
124  *
125  * Defines the IEEE 802.11 encryption that provides the data confidentiality aspects of a closed wired media.
126  *
127  * @since   2.0
128  */
129 enum WifiEncryptionType
130 {
131     WIFI_ENCRYPTION_NONE = 0,       /**<  The type with no encryption */
132     WIFI_ENCRYPTION_WEP,            /**<  The Wired Equivalent Privacy @n This is only used for open and shared methods. */
133     WIFI_ENCRYPTION_TKIP,           /**<  The Temporal Key Integrity Protocol */
134     WIFI_ENCRYPTION_AES,            /**<  The Advanced Encryption Standard */
135     WIFI_ENCRYPTION_TKIP_AES_MIXED, /**<  The TKIP and AES are both supported */
136     WIFI_ENCRYPTION_MAX = 65535     // This enum value is for internal use only. Using this enum value can cause behavioral,
137                                     // security-related, and consistency-related issues in the application.
138 };
139
140 /**
141  * @enum    WifiEapType
142  *
143  * Defines the Extensible Authentication Protocol (EAP) method types that provide a specific authentication mechanism.
144  *
145  * @since   2.0
146  */
147 enum WifiEapType
148 {
149     WIFI_EAP_NONE = 0,       /**<  The method type where no EAP method is used */
150     WIFI_EAP_SIM,            /**<  The EAP-SIM; EAP for GSM Subscriber Identity */
151     WIFI_EAP_AKA,            /**<  The EAP-AKA; EAP for UMTS Authentication and Key Agreement */
152     WIFI_EAP_TTLS_MSCHAPV2,  /**<  The EAP-TTLS/MSCHAPv2; Tunnel MSCHAPv2 through TTLS(Tunneled Transport Layer Security) */
153     WIFI_EAP_PEAP_MSCHAPV2,  /**<  The PEAPv0/EAP-MSCHAPv2; Tunnel MSCHAPv2 through PEAP(Protected Extensible Authentication
154                               *    Protocol) */
155     WIFI_EAP_PEAP_GTC,       /**<  The PEAPv1/EAP-GTC; Tunnel GTC through PEAP(Protected Extensible Authentication Protocol) */
156     WIFI_EAP_TLS             /**<  The EAP-TLS, Not supported yet */
157 };
158
159 /**
160  * @if OSPDEPREC
161  * @enum        WifiWepKeyLen
162  *
163  * Defines the Wired Equivalent Privacy (WEP) key length.
164  *
165  * @brief       <i> [Deprecated] </i>
166  * @deprecated  This enum is deprecated because the WifiSecurityInfo::SetNetworkKeyWep() method is also deprecated.
167  *
168  * @since       2.0
169  * @endif
170  */
171 enum WifiWepKeyLen
172 {
173     WIFI_WEP_KEY_LEN_64BIT = 0,     /**< @if OSPDEPREC The WEP key of length 64bits @n
174                                      *   The minimum length of the WEP key is 5 digits (40bits). @endif */
175     WIFI_WEP_KEY_LEN_128BIT,        /**< @if OSPDEPREC The WEP key of length 128bits @n
176                                      *   The minimum length of the WEP key is 13 digits (104bits). @endif */
177     WIFI_WEP_KEY_LEN_MAX = 65535    // This enum value is for internal use only. Using this enum value can cause behavioral,
178                                     // security-related, and consistency-related issues in the application.
179 };
180
181 /**
182  * @if OSPDEPREC
183  * @enum        WifiWepKeyIndex
184  *
185  * Defines the Wired Equivalent Privacy (WEP) key index.
186  *
187  * @brief       <i> [Deprecated] </i>
188  * @deprecated  This enum is deprecated because the WifiSecurityInfo::SetNetworkKeyWep() method is also deprecated.
189  *
190  * @since       2.0
191  *
192  * @remarks     Only WIFI_WEP_KEY_INDEX_1 is supported now.
193  * @endif
194  */
195 enum WifiWepKeyIndex
196 {
197     WIFI_WEP_KEY_INDEX_1 = 1,   /**< @if OSPDEPREC The WEP Key Index 1 @endif */
198     WIFI_WEP_KEY_INDEX_2 = 2,   /**< @if OSPDEPREC The WEP Key Index 2 @endif */
199     WIFI_WEP_KEY_INDEX_3 = 3,   /**< @if OSPDEPREC The WEP Key Index 3 @endif */
200     WIFI_WEP_KEY_INDEX_4 = 4,   /**< @if OSPDEPREC The WEP Key Index 4 @endif */
201 };
202
203 /**
204  * @enum    WifiRadioChannel
205  *
206  * Defines the BSS radio channel.
207  *
208  * @since   2.0
209  */
210 enum WifiRadioChannel
211 {
212     WIFI_RADIO_CHANNEL_1        = 1,        /**< The Radio Channel 1 */
213     WIFI_RADIO_CHANNEL_2        = 2,        /**< The Radio Channel 2 */
214     WIFI_RADIO_CHANNEL_3        = 4,        /**< The Radio Channel 3 */
215     WIFI_RADIO_CHANNEL_4        = 8,        /**< The Radio Channel 4 */
216     WIFI_RADIO_CHANNEL_5        = 16,       /**< The Radio Channel 5 */
217     WIFI_RADIO_CHANNEL_6        = 32,       /**< The Radio Channel 6 */
218     WIFI_RADIO_CHANNEL_7        = 64,       /**< The Radio Channel 7 */
219     WIFI_RADIO_CHANNEL_8        = 128,      /**< The Radio Channel 8 */
220     WIFI_RADIO_CHANNEL_9        = 256,      /**< The Radio Channel 9 */
221     WIFI_RADIO_CHANNEL_10       = 512,      /**< The Radio Channel 10 */
222     WIFI_RADIO_CHANNEL_11       = 1024,     /**< The Radio Channel 11 */
223     WIFI_RADIO_CHANNEL_12       = 2048,     /**< The Radio Channel 12 */
224     WIFI_RADIO_CHANNEL_13       = 4096,     /**< The Radio Channel 13 */
225     WIFI_RADIO_CHANNEL_14       = 8192,     /**< The Radio Channel 14 */
226     WIFI_RADIO_CHANNEL_UNKNOWN = 0          // This enum value is for internal use only. Using this enum value can cause
227                                             // behavioral, security-related, and consistency-related issues in the application.
228 };
229
230 /**
231  * @enum    WifiDirectDeviceStatus
232  *
233  * Defines the status of a Wi-Fi Direct device.
234  *
235  * @since   2.0
236  */
237 enum WifiDirectDeviceStatus
238 {
239     WIFI_DIRECT_DEVICE_DEACTIVATED = 0,     /**< The Wi-Fi interface is deactivated */
240     WIFI_DIRECT_DEVICE_ACTIVATED            /**< The Wi-Fi interface is activated */
241 };
242
243 /**
244  * @enum    WifiDirectGroupMemberType
245  *
246  * Defines the type of a Wi-Fi Direct device.
247  *
248  * @since   2.0
249  */
250 enum WifiDirectGroupMemberType
251 {
252     WIFI_DIRECT_GROUP_MEMBER_TYPE_NONE = 0,  /**< The Wi-Fi Direct Group Non-member @n That is, the device does not belong to any
253                                               * group. */
254     WIFI_DIRECT_GROUP_MEMBER_TYPE_OWNER,     /**< The Wi-Fi Direct Group Owner */
255     WIFI_DIRECT_GROUP_MEMBER_TYPE_CLIENT     /**< The Wi-Fi Direct Group Client */
256 };
257
258 /**
259  * @enum    WifiDirectDeviceTypeCategory
260  *
261  * Defines the category of the Wi-Fi Direct device type.
262  *
263  * @since   2.0
264  */
265 enum WifiDirectDeviceTypeCategory
266 {
267     WIFI_DIRECT_DEVICE_TYPE_CATEGORY_COMPUTER = 0,               /**< The PC, Server, %Media Center, UMPC, Notebook, Desktop,
268                                                                   *   MID, Netbook, and so on */
269     WIFI_DIRECT_DEVICE_TYPE_CATEGORY_INPUT_DEVICE,               /**< The Keyboard, Mouse, Joystick, Trackball, Gaming
270                                                                   *   controller, Remote, Touchscreen, Biometric reader, Barcode
271                                                                   *   reader, and so on */
272     WIFI_DIRECT_DEVICE_TYPE_CATEGORY_PRINTER_SCANNER_FAX_COPIER, /**< The Printer, Print Server, Scanner, Fax, Copier,
273                                                                   *   All-in-one, and so on */
274     WIFI_DIRECT_DEVICE_TYPE_CATEGORY_CAMERA,                     /**< The Digital still camera, Video camera, %Web camera,
275                                                                   *   %Security camera, and so on */
276     WIFI_DIRECT_DEVICE_TYPE_CATEGORY_STORAGE,                    /**< The NAS */
277     WIFI_DIRECT_DEVICE_TYPE_CATEGORY_NETWORK_INFRASTRUCTURE,     /**< The AP, Router, Switch, Gateway, and so on */
278     WIFI_DIRECT_DEVICE_TYPE_CATEGORY_DISPLAY,                    /**< The Television, Electronic picture frame, Projector,
279                                                                   *   Monitor, and so on */
280     WIFI_DIRECT_DEVICE_TYPE_CATEGORY_MULTIMEDIA_DEVICE,          /**< The DAR, PVR, MCX, Set-top box, %Media server, %Media
281                                                                   *   adapter, %Media extender, Portable video player, and so
282                                                                   *   on */
283     WIFI_DIRECT_DEVICE_TYPE_CATEGORY_GAMING_DEVICE,              /**< The Xbox, Playstation, Game console, Game console adaptor,
284                                                                   *   Portable gaming device, and so on */
285     WIFI_DIRECT_DEVICE_TYPE_CATEGORY_TELEPHONE,                  /**< The Windows Mobile, Phone, Smartphone, and so on */
286     WIFI_DIRECT_DEVICE_TYPE_CATEGORY_AUDIO_DEVICE,               /**< The Audio tuner, Audio receiver, Speaker, Portable Music
287                                                                   *   Player, Headset, Headphone, Microphone, and so on */
288     WIFI_DIRECT_DEVICE_TYPE_CATEGORY_OTHERS = 255                /**< A device which is not classified into the above types */
289 };
290
291 /**
292  * @if OSPDEPREC
293  * @enum        WifiDirectAssociationTerminationReason
294  *
295  * Defines the reason for the Wi-Fi Direct group client association's termination.
296  *
297  * @brief       <i> [Deprecated] </i>
298  * @deprecated  This method is deprecated because the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease
299  *              irrespective of the role (for example, group owner, group client, and so on). @n
300  *              Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role and so it was necessary to use these
301  *              APIs.
302  *
303  * @since       2.0
304  * @endif
305  */
306 enum WifiDirectAssociationTerminationReason
307 {
308     WIFI_DIRECT_ASSOCIATION_TERMINATION_REASON_SELF_INITIATED = 0, /**< @if OSPDEPREC The enumerator that is delivered to a group
309                                                                     *   owner or group client who initiates the disassociation
310                                                                     *   request @endif */
311     WIFI_DIRECT_ASSOCIATION_TERMINATION_REASON_DISCONNECTED        /**< @if OSPDEPREC The enumerator that is delivered to a group
312                                                                     *   owner or group client who receives the disassociation
313                                                                     *   request or when a client is disconnected due to out of
314                                                                     *   range or abrupt connection loss to the group owner
315                                                                     *   @endif */
316 };
317
318 /**
319  * @enum WifiWpsConfigurationMode
320  *
321  * Defines the configuration method for the Wi-Fi Protected Setup (WPS).
322  *
323  * @since     2.0
324  */
325 enum WifiWpsConfigurationMode
326 {
327     WIFI_WPS_CONFIG_MODE_NONE = 0,          /**< The configuration mode with no method to be provided */
328     WIFI_WPS_CONFIG_MODE_PIN_DISPLAY,       /**< A method to display the PIN code */
329     WIFI_WPS_CONFIG_MODE_PIN_KEYPAD,        /**< A method to provide the keypad to input the PIN */
330     WIFI_WPS_CONFIG_MODE_PBC                /**< A method of Push Button Configuration (PBC) */
331 };
332
333 /**
334  * @enum    WifiConnectionState
335  *
336  * Defines the state of the Wi-Fi connection.
337  *
338  * @since   2.0
339  */
340 enum WifiConnectionState
341 {
342     WIFI_CONN_STATE_NOT_CONNECTED = 0,  /**< The local device is not connected */
343     WIFI_CONN_STATE_ASSOCIATING,        /**< The local device is associating with an AP */
344     WIFI_CONN_STATE_CONFIGURING,        /**< The local device is configuring after association */
345     WIFI_CONN_STATE_CONNECTED           /**< The local device is completely connected after configuration */
346 };
347
348 /**
349  * @enum    WifiSystemScanMode
350  *
351  * Defines the mode of the Wi-Fi background system behaviors, mainly about background scanning.
352  *
353  * @since   2.0
354  */
355 enum WifiSystemScanMode
356 {
357     WIFI_SYSTEM_SCAN_MODE_ACTIVE = 0,   /**< The background scanning is performed with the short and fixed time interval
358                                          *   (10 seconds) during which the Wi-Fi connection is not established @n The Wi-Fi
359                                          *   target picker popup for connection is not launched when Wi-Fi is turned on. @n
360                                          *   Generally, this mode is for the case that the Wi-Fi setting app is running on
361                                          *   foreground. */
362     WIFI_SYSTEM_SCAN_MODE_PASSIVE       /**< The background scanning is performed with the exponential backoff time interval
363                                          *   (4, 8, ..., and finally 128 seconds) during which the Wi-Fi connection is not
364                                          *   established @n
365                                          *   The Wi-Fi target picker popup for connection is launched when Wi-Fi is turned on. @n
366                                          *   Generally, this mode is for the both cases that the Wi-Fi setting app is running on
367                                          *   background and terminated. */
368 };
369
370 } } } // Tizen::Net::Wifi
371 #endif // _FNET_WIFI_WIFI_TYPES_H_