3cb997502b0930998df555a7acd2435bb3dd2372
[framework/connectivity/libnet-client.git] / include / common / network-cm-error.h
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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
18 #ifndef __NETWORK_CM_ERROR_H__
19 #define __NETWORK_CM_ERROR_H__
20
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /**
27  * @defgroup NETLIB Network Client Library
28  \{
29  <h1 class="pg">Introduction</h1>
30  Network Client Library provides specific APIs for interacting with the Network F/W.\n
31  Network F/W is based on ConnMan(Connection Manager), which provides cellular and Wi-Fi based network connection.
32  <h1 class="pg">Notice</h2>
33  Network Client Library doesn't provide certain thread-safety guarantees.\n
34  Application should use this library on a single thread only.
35  \}
36 */
37
38 /**
39  * @defgroup NETLIB
40  \{
41  *      \defgroup common_basic  Basic APIs(connection, registration, etc...)
42  *      \defgroup common_info  APIs for get network information
43  *      \defgroup common_extended  Extended APIs
44  *      \defgroup profile_managing  profile managing APIs
45  *      \defgroup wifi_specific  Wi-Fi specific APIs
46  *      \defgroup pdp_specific  PDP specific APIs
47  \}
48 */
49
50 /**
51  * @file network-cm-error.h
52  * @brief This file defines the common error code.
53 */
54
55 /**
56  * \addtogroup  common_basic
57  * \{
58 */
59
60 /*
61 ==================================================================================================
62                                          INCLUDE FILES
63 ==================================================================================================
64 */
65
66 /*
67 ==================================================================================================
68                                            CONSTANTS
69 ==================================================================================================
70 */
71 /*
72 ==================================================================================================
73                                             MACROS
74 ==================================================================================================
75 */
76
77 /*
78 ==================================================================================================
79                                             Enum
80 ==================================================================================================
81 */
82
83 /**
84  * @enum net_err_t
85  * Error Definition
86  */
87
88 typedef enum {
89         /** No error */
90         NET_ERR_NONE = 0x00,
91
92         /* Common Error value */
93
94         /** Error unknown */
95         NET_ERR_UNKNOWN = -999,
96
97         /* Client Register related Errors used in API return */
98
99         /** Application is already registered */
100         NET_ERR_APP_ALREADY_REGISTERED = -990,
101         /** Application is not registered */
102         NET_ERR_APP_NOT_REGISTERED = -989,
103
104         /* Connection Related Error */
105
106         /** No active connection exists for the given profile name */
107         NET_ERR_NO_ACTIVE_CONNECTIONS = -899,
108         /** Active connection already exists for the given profile name  */
109         NET_ERR_ACTIVE_CONNECTION_EXISTS = -898,
110
111         /** Connection failure : out of range */
112         NET_ERR_CONNECTION_OUT_OF_RANGE = -897,
113         /** Connection failure : pin missing */
114         NET_ERR_CONNECTION_PIN_MISSING = -896,
115         /** Connection failure : dhcp failed */
116         NET_ERR_CONNECTION_DHCP_FAILED = -895,
117         /** Connection failure */
118         NET_ERR_CONNECTION_CONNECT_FAILED = -894,
119         /** Connection failure : login failed */
120         NET_ERR_CONNECTION_LOGIN_FAILED = -893,
121         /** Connection failure : authentication failed */
122         NET_ERR_CONNECTION_AUTH_FAILED = -892,
123         /** Connection failure : invalid key */
124         NET_ERR_CONNECTION_INVALID_KEY = -891,
125
126         /* Other Error */
127
128         /** Access(permission) denied */
129         NET_ERR_ACCESS_DENIED = -799,
130         /** Operation is in progress */
131         NET_ERR_IN_PROGRESS = -798,
132         /** Operation was aborted by client or network*/
133         NET_ERR_OPERATION_ABORTED = -797,
134         /** Invalid value of API parameter */
135         NET_ERR_INVALID_PARAM = -796,
136         /** Invalid operation depending on current state */
137         NET_ERR_INVALID_OPERATION = -795,
138
139         /** Feature not supported */
140         NET_ERR_NOT_SUPPORTED = -794,
141         /** TimeOut Error */
142         NET_ERR_TIME_OUT = -793,
143         /** Network service is not available */
144         NET_ERR_NO_SERVICE = -792,
145         /** DBus can't find appropriate method */
146         NET_ERR_UNKNOWN_METHOD = -791,
147         /** Operation is restricted */
148         NET_ERR_SECURITY_RESTRICTED = -790,
149
150         /** WiFi driver on/off failed */
151         NET_ERR_WIFI_DRIVER_FAILURE = -699,
152 } net_err_t;
153
154 /*
155 ==================================================================================================
156                                  STRUCTURES AND OTHER TYPEDEFS
157 ==================================================================================================
158 */
159
160 /*
161 ==================================================================================================
162                                      FUNCTION PROTOTYPES
163 ==================================================================================================
164 */
165
166 /**
167  * \}
168  */
169
170 #ifdef __cplusplus
171 }
172 #endif
173  
174 #endif
175