[Docygen] Update @feature tag.
[platform/framework/native/net.git] / inc / FNetNetTypes.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                 FNetNetTypes.h
20 * @brief                This is the header file for defining the types for the Net namespace.
21 *
22 * This header file contains the definitions of the various types and enumerators for the NetConnection operations.
23 */
24 #ifndef _FNET_NET_TYPES_H_
25 #define _FNET_NET_TYPES_H_
26
27 #include <FBase.h>
28 #include <FBaseObject.h>
29 #include <FBaseString.h>
30 #include <FBaseErrorDefine.h>
31
32
33 namespace Tizen { namespace Net
34 {
35
36 /**
37  * The network account ID.
38  *
39  * @since 2.0
40  */
41 typedef int NetAccountId;
42
43 /**
44  * @enum        NetConnectionState
45  *
46  * Defines the state of the network connection.
47  *
48  * @since       2.0
49  */
50 enum NetConnectionState
51 {
52         NET_CONNECTION_STATE_NONE,          /**< The initial state */
53         NET_CONNECTION_STATE_STARTING,      /**< The network connection is being established */
54         NET_CONNECTION_STATE_STARTED,       /**< The network connection has been established */
55         NET_CONNECTION_STATE_STOPPING,      /**< The network connection is being disconnected */
56         NET_CONNECTION_STATE_STOPPED,       /**< The network connection has been disconnected */
57         NET_CONNECTION_STATE_SUSPENDED,     /**< The network connection has been suspended */
58         NET_CONNECTION_STATE_SUSPEND = 5,   // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
59         NET_CONNECTION_STATE_RESUMED,       /**< The network connection is established, and recovered from SUSPEND state - enable to send/receive packet data */
60         NET_CONNECTION_STATE_AVAILABLE,     // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
61         NET_CONNECTION_STATE_UNAVAILABLE,   // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
62 };
63
64 /**
65  * @enum    NetConnectionStoppedReason
66  *
67  * Defines the reason for stoppage of the network connection.
68  *
69  * @since 2.0
70  */
71 enum NetConnectionStoppedReason
72 {
73         NET_CONNECTION_STOPPED_REASON_RESOURCE_RELEASED,    /**< The network connection managed by system stopped because the network resources have been released */
74         NET_CONNECTION_STOPPED_REASON_NETWORK_FAILED,       /**< The network has failed */
75         NET_CONNECTION_STOPPED_REASON_DEVICE_OFFLINE,       /**< The operation has failed because the device is in offline mode */
76         NET_CONNECTION_STOPPED_REASON_SERVICE_UNAVAILABLE,  /**< The device is out of the coverage area or in an emergency mode */
77         NET_CONNECTION_STOPPED_REASON_RESOURCE_UNAVAILABLE, /**< The network resource is unavailable */
78         NET_CONNECTION_STOPPED_REASON_SYSTEM                /**< A system error has occurred */
79 };
80
81 /**
82  * @enum    NetProtocolType
83  *
84  * Defines the network protocol type.
85  *
86  * @since       2.0
87  */
88 enum NetProtocolType
89 {
90         NET_PROTO_TYPE_IPV4 = 1,            /**< The IPV4 type */
91         NET_PROTO_TYPE_PPP,                             /**< The PPP type */
92         NET_PROTO_TYPE_IPV6,                            /**< The IPV6 type, currently NOT supported */
93         NET_PROTO_TYPE_NONE = 0         // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. Network Protocol type not set
94 };
95
96 /**
97  * @enum    NetAddressFamily
98  *
99  * Defines the network address family.
100  *
101  * @since       2.0
102  */
103 enum NetAddressFamily
104 {
105
106         NET_AF_IPV4 = 1,                /**< The default @n An IPv4 address [RFC791] is represented in decimal format with dots as delimiters. */
107         NET_AF_IPV6,                                    /**< An IPv6 address [RFC2373] is generally represented in hexadecimal numbers with colons as delimiters @n It can also be a combination of hexadecimal and decimal numbers with dots and colons as delimiters. */
108         NET_AF_ALPHANUMERIC,    /**< A generic alphanumeric address (as defined by alphanum in [RFC2396]) */
109         NET_AF_APN,                             /**< A GPRS APN as defined in [GENFORM] */
110         NET_AF_NONE = 0                 // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. Network Address Family not set
111 };
112
113 /////////////////////////////////////////////////////////////////////////////////////////////
114
115 /**
116  * @enum    NetStatisticsInfoType
117  *
118  * Defines the various kinds of data call statistics information.
119  *
120  * @since       2.0
121  */
122 enum NetStatisticsInfoType
123 {
124         NET_STAT_SENT_SIZE = 2,                                                         /**< The size of the packet sent, since the time the network is last reactivated */
125         NET_STAT_RCVD_SIZE = 3,                                                         /**< The size of the packet received, since the time the network is last reactivated */
126         NET_STAT_TOTAL_SENT_SIZE = 8,                                   /**< The cumulated size of the packet sent since the last reset */
127         NET_STAT_TOTAL_RCVD_SIZE = 9,                                   /**< The cumulated size of the packet received since the last reset */
128         NET_STAT_NONE = 0                                                       // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. Network Statistics Info Type not set
129 };
130
131 /**
132  * @enum    NetPreferenceType
133  *
134  * Defines the preferred network.
135  *
136  * @since       2.0
137  */
138 enum NetPreferenceType
139 {
140         NET_WIFI_FIRST,                                 /**< The preference type to follow preferred mode (Wi-Fi first) @n
141                                                                         *       This preference type works like NET_PS_ONLY on the Emulator. */
142         NET_PS_ONLY,                                            /**< The preference type to only operate services for the PS domain */
143         NET_CS_ONLY,                     // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
144         NET_WIFI_ONLY                    /**< The preference type to only operate services for Wi-Fi */
145 };
146
147 /**
148  * @enum    NetBearerType
149  *
150  * Defines the bearer type.
151  *
152  * @since       2.0
153  */
154 enum NetBearerType
155 {
156         NET_BEARER_PS = 1,                 /**< The bearer type for the PS domain */
157         NET_BEARER_CS,                                  // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
158         NET_BEARER_WIFI,                        /**< The bearer type for Wi-Fi */
159         NET_BEARER_WIFI_DIRECT,         /**< The bearer type for Wi-Fi Direct @n
160                                                                                 *       This bearer type cannot be tested on the Emulator. */
161         NET_BEARER_USB,                         /**< The bearer type for USB NDIS mode @n
162                                                                                 *       Can use this bearer type via USB Tethering mode. @n
163                                                                                 *       This bearer type cannot be tested on the Emulator. */
164         NET_BEARER_MMS,                         /**< The bearer type for MMS */
165         NET_BEARER_NONE = 0             // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. Network Bearer Type not set
166 };
167
168 /**
169  * @enum    NetAddressScheme
170  *
171  * Defines the network IP or Domain Name %System (DNS) scheme.
172  *
173  * @since       2.0
174  */
175 enum NetAddressScheme
176 {
177         NET_ADDRESS_SCHEME_DYNAMIC = 1, /**< The Dynamic IP or DNS Address */
178         NET_ADDRESS_SCHEME_STATIC,      /**< The Static IP or DNS Address */
179         NET_ADDRESS_SCHEME_NONE = 0     // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. Network Address Scheme not set
180 };
181
182 /**
183  * @enum    NetNapAuthType
184  *
185  * Defines the authentication type of the network.
186  *
187  * @since       2.0
188  *
189  * @remarks  There is no relevant data.
190  */
191 enum NetNapAuthType
192 {
193         NET_NAPAUTH_PAP = 1,                                            /**< The PAP (Password Authentication Protocol) type */
194         NET_NAPAUTH_CHAP,                                                       /**< The CHAP (Challenge/Handshake Authentication Protocol) type */
195         NET_NAPAUTH_NONE = 0                                    // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. Network NAP Authentication Type not set
196 };
197
198 /**
199  * @enum    NetProxyType
200  *
201  * Defines the proxy type of the network.
202  *
203  * @since 2.0
204  */
205 enum NetProxyType
206 {
207     NET_PROXY_TYPE_NONE = 0,  /**< No use of proxy */
208     NET_PROXY_TYPE_MANUAL     /**< Manual configuration */
209 };
210
211
212 } } //Tizen::Net
213
214 #endif // _FNET_NET_TYPES_H_