2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_COMMON_ERROR_H__
18 #define __TIZEN_COMMON_ERROR_H__
27 * @addtogroup CAPI_COMMON_ERROR
31 #define TIZEN_ERROR_MAX_PLATFORM_ERROR 0
32 #define TIZEN_ERROR_MIN_PLATFORM_ERROR (-1073741824LL) /* = -2147483648 / 2 */
34 /* Use this constant macro as the value of the first module specific error */
35 #define TIZEN_ERROR_MIN_MODULE_ERROR (-2147483648LL)
37 /* Module errors cannot be greater than the following constant */
38 #define TIZEN_ERROR_MAX_MODULE_ERROR (TIZEN_ERROR_MIN_PLATFORM_ERROR - 1)
40 /* Check if error or not */
41 #define TIZEN_ERROR_IS_OK(x) (0 <= (x))
43 /* Check if error or not */
44 #define TIZEN_ERROR_IS_ERROR(x) (!TIZEN_ERROR_IS_OK(x))
46 /* Check if slp error or not */
47 #define TIZEN_ERROR_IS_PLATFORM_ERROR(x) (TIZEN_ERROR_MIN_PLATFORM_ERROR <= (x) && (x) < 0)
49 /* Application Error Class */
50 #define TIZEN_ERROR_APPLICATION_CLASS -0x00000200
51 /* Base Error Class */
52 #define TIZEN_ERROR_BASE_CLASS -0x00000400
53 /* Content Error Class */
54 #define TIZEN_ERROR_CONTENT_CLASS -0x00000800
55 /* Location Error Class */
56 #define TIZEN_ERROR_LOCATION_CLASS -0x00001000
57 /* Multimedia Error Class */
58 #define TIZEN_ERROR_MULTIMEDIA_CLASS -0x00002000
59 /* Messaging Error Class */
60 #define TIZEN_ERROR_MESSAGING_CLASS -0x00004000
61 /* Network Error Class */
62 #define TIZEN_ERROR_NETWORK_CLASS -0x00008000
63 /* Social Error Class */
64 #define TIZEN_ERROR_SOCIAL_CLASS -0x00010000
65 /* System Error Class */
66 #define TIZEN_ERROR_SYSTEM_CLASS -0x00020000
67 /* Telephony Error Class */
68 #define TIZEN_ERROR_TELEPHONY_CLASS -0x00040000
70 #define TIZEN_ERROR_UI_CLASS -0x00080000
72 #define TIZEN_ERROR_UIX_CLASS -0x00100000
74 #define TIZEN_ERROR_AD_CLASS -0x00200000
76 #define TIZEN_ERROR_WEB_CLASS -0x00400000
78 #define TIZEN_ERROR_DRM_CLASS -0x00800000
79 /* Account Error class */
80 #define TIZEN_ERROR_ACCOUNT_CLASS -0x01000000
82 /* Tizen Account Error */
83 #define TIZEN_ERROR_ACCOUNT -0x01000000
84 /* Tizen Account Oauth Error */
85 #define TIZEN_ERROR_ACCOUNT_OAUTH -0x01010000
86 /* Tizen SYNC MANAGER Error */
87 #define TIZEN_ERROR_SYNC_MANAGER -0x01020000
88 /* Tizen FIDO Error */
89 #define TIZEN_ERROR_FIDO -0x01030000
90 /* Tizen Application Error */
91 #define TIZEN_ERROR_APPLICATION -0x01100000
92 /* Tizen Application Manager Error */
93 #define TIZEN_ERROR_APPLICATION_MANAGER -0x01110000
94 /* Tizen Badge Error */
95 #define TIZEN_ERROR_BADGE -0x01120000
96 /* Tizen Message Port Error */
97 #define TIZEN_ERROR_MESSAGE_PORT -0x01130000
98 /* Tizen Notification Error */
99 #define TIZEN_ERROR_NOTIFICATION -0x01140000
100 /* Tizen Package Manager Error */
101 #define TIZEN_ERROR_PACKAGE_MANAGER -0x01150000
102 /* Tizen Shortcut Error */
103 #define TIZEN_ERROR_SHORTCUT -0x01160000
104 /* Tizen Bundle Error */
105 #define TIZEN_ERROR_BUNDLE -0x01180000
106 /* Tizen Data Control Error */
107 #define TIZEN_ERROR_DATA_CONTROL -0x01190000
108 /* Tizen Service Application Error */
109 #define TIZEN_ERROR_SERVICE_APPLICATION -0x01200000
110 /* Tizen MINICONTROL Error */
111 #define TIZEN_ERROR_MINICONTROL -0x01210000
112 /* Tizen Utility ICU Error */
113 #define TIZEN_ERROR_UTILITY_ICU -0x01500000
114 /* Tizen Mime Type Error */
115 #define TIZEN_ERROR_MIME_TYPE -0x01600000
116 /* Tizen Media Content Error */
117 #define TIZEN_ERROR_MEDIA_CONTENT -0x01610000
118 /* Tizen Email Service Error */
119 #define TIZEN_ERROR_EMAIL_SERVICE -0x01700000
120 /* Tizen Messaging Service Error */
121 #define TIZEN_ERROR_MESSAGING_SERVICE -0x01710000
122 /* Tizen Push Error */
123 #define TIZEN_ERROR_PUSH -0x01720000
124 /* Tizen Audio IO Error */
125 #define TIZEN_ERROR_AUDIO_IO -0x01900000
126 /* Tizen Camera Error */
127 #define TIZEN_ERROR_CAMERA -0x01910000
128 /* Tizen Image Util Error */
129 #define TIZEN_ERROR_IMAGE_UTIL -0x01920000
130 /* Tizen Metadata Extractor Error */
131 #define TIZEN_ERROR_METADATA_EXTRACTOR -0x01930000
132 /* Tizen Player Error */
133 #define TIZEN_ERROR_PLAYER -0x01940000
134 /* Tizen Recorder Error */
135 #define TIZEN_ERROR_RECORDER -0x01950000
136 /* Tizen Sound Manager Error */
137 #define TIZEN_ERROR_SOUND_MANAGER -0x01960000
138 /* Tizen Tone Player Error */
139 #define TIZEN_ERROR_TONE_PLAYER -0x01970000
140 /* Tizen Video Util Error */
141 #define TIZEN_ERROR_VIDEO_UTIL -0x01980000
142 /* Tizen Wav Player Error */
143 #define TIZEN_ERROR_WAV_PLAYER -0x01990000
144 /* Tizen Radio Error */
145 #define TIZEN_ERROR_RADIO -0x019A0000
146 /* Tizen MEDIA CODEC Error */
147 #define TIZEN_ERROR_MEDIACODEC -0x019B0000
148 /* Tizen Metadata Editor Error */
149 #define TIZEN_ERROR_METADATA_EDITOR -0x019C0000
150 /* Tizen Vision Error */
151 #define TIZEN_ERROR_MEDIA_VISION -0x019D0000
152 /* Tizen MEDIA DEMUXER Error */
153 #define TIZEN_ERROR_MEDIA_DEMUXER -0x019E0000
154 /* Tizen MEDIA MUXER Error */
155 #define TIZEN_ERROR_MEDIA_MUXER -0x019F0000
156 /* Tizen MEDIA STREAMER Error */
157 #define TIZEN_ERROR_MEDIA_STREAMER -0x01A00000
158 /* Tizen MEDIA STREAMRECORDER Error */
159 #define TIZEN_ERROR_STREAMRECORDER -0x01A10000
160 /* Tizen MEDIA STREAMRECORDER Error */
161 #define TIZEN_ERROR_MEDIA_TOOL -0x01A20000
162 /* Tizen Bluetooth Error */
163 #define TIZEN_ERROR_BLUETOOTH -0x01C00000
164 /* Tizen Connection Error */
165 #define TIZEN_ERROR_CONNECTION -0x01C10000
166 /* Tizen NFC Error */
167 #define TIZEN_ERROR_NFC -0x01C20000
168 /* Tizen Serial Error */
169 #define TIZEN_ERROR_SERIAL -0x01C30000
170 /* Tizen Tethering Error */
171 #define TIZEN_ERROR_TETHERING -0x01C40000
172 /* Tizen Wifi Error */
173 #define TIZEN_ERROR_WIFI -0x01C50000
174 /* Tizen Wifi Direct Error */
175 #define TIZEN_ERROR_WIFI_DIRECT -0x01C60000
176 /* Tizen Smart Card Error */
177 #define TIZEN_ERROR_SMARTCARD -0x01C70000
178 /* Tizen IotCon Error */
179 #define TIZEN_ERROR_IOTCON -0x01C80000
180 /* Tizen SSDP Error */
181 #define TIZEN_ERROR_SSDP -0x01C90000
182 /* Tizen DNSSD Error */
183 #define TIZEN_ERROR_DNSSD -0x01CA0000
184 /* Tizen VPNSVC Error */
185 #define TIZEN_ERROR_VPNSVC -0x01CB0000
186 /* Tizen MTP Error */
187 #define TIZEN_ERROR_MTP -0x01CC0000
188 /* Tizen Http Error */
189 #define TIZEN_ERROR_HTTP -0x01CD0000
190 /* Tizen Privacy Manager Error */
191 #define TIZEN_ERROR_PRIVACY_MANAGER -0x01E00000
192 /* Tizen Key Manager Error */
193 #define TIZEN_ERROR_KEY_MANAGER -0x01E10000
194 /* Tizen PRIVILEGE INFO Error */
195 #define TIZEN_ERROR_PRIVILEGE_INFORMATION -0x01E20000
196 /* Tizen Calendar Error */
197 #define TIZEN_ERROR_CALENDAR -0x02000000
198 /* Tizen Contacts Error */
199 #define TIZEN_ERROR_CONTACTS -0x02010000
200 /* Tizen Phonenumber utils Error */
201 #define TIZEN_ERROR_PHONENUMBER_UTILS -0x02020000
202 /* Tizen Storage Error */
203 #define TIZEN_ERROR_STORAGE -0x02200000
204 /* Tizen Vconf Error */
205 #define TIZEN_ERROR_VCONF -0x02210000
206 /* Tizen Device Error */
207 #define TIZEN_ERROR_DEVICE -0x02400000
208 /* Tizen Dlog Error */
209 #define TIZEN_ERROR_DLOG -0x02410000
210 /* Tizen Media Key Error */
211 #define TIZEN_ERROR_MEDIA_KEY -0x02420000
212 /* Tizen Runetime Info Error */
213 #define TIZEN_ERROR_RUNTIME_INFORMATION -0x02430000
214 /* Tizen Sensor Error */
215 #define TIZEN_ERROR_SENSOR -0x02440000
216 /* Tizen System Info Error */
217 #define TIZEN_ERROR_SYSTEM_INFORMATION -0x02450000
218 /* Tizen System Setting Error */
219 #define TIZEN_ERROR_SYSTEM_SETTING -0x02460000
220 /* Tizen System Resource Error */
221 #define TIZEN_ERROR_SYSTEM_RESOURCE -0x02470000
222 /* Tizen Context Error */
223 #define TIZEN_ERROR_CONTEXT -0x02480000
224 /* Tizen Health Error */
225 #define TIZEN_ERROR_HEALTH -0x02490000
226 /* Tizen Feedback Error */
227 #define TIZEN_ERROR_FEEDBACK -0x024A0000
228 /* Tizen Telephony Error */
229 #define TIZEN_ERROR_TELEPHONY -0x02600000
230 /* Tizen EFL Util Error */
231 #define TIZEN_ERROR_EFL_UTIL -0x02800000
232 /* Tizen UtilX Error */
233 #define TIZEN_ERROR_UTILX -0x02810000
234 /* Tizen Native Buffer Error */
235 #define TIZEN_ERROR_NATIVE_BUFFER -0x02820000
236 /* Tizen Buffer Manager Error */
237 #define TIZEN_ERROR_TBM -0x02830000
238 /* Tizen EOM Error */
239 #define TIZEN_ERROR_EOM -0x02840000
240 /* Tizen PANEL Error */
241 #define TIZEN_ERROR_PANEL -0x02850000
242 /* Tizen TZSH Error */
243 #define TIZEN_ERROR_TZSH -0x02860000
244 /* Tizen Download Error */
245 #define TIZEN_ERROR_DOWNLOAD -0x02A00000
246 /* Tizen WebView Error */
247 #define TIZEN_ERROR_WEBVIEW -0x02A10000
248 /* Tizen Location Manager Error */
249 #define TIZEN_ERROR_LOCATION_MANAGER -0x02C00000
250 /* Tizen Geofence Manager Error */
251 #define TIZEN_ERROR_GEOFENCE_MANAGER -0x02C10000
252 /* Tizen Maps Service Error */
253 #define TIZEN_ERROR_MAPS_SERVICE -0x02C20000
254 /* Tizen STT Error */
255 #define TIZEN_ERROR_STT -0x02F00000
256 /* Tizen TTS Error */
257 #define TIZEN_ERROR_TTS -0x02F10000
258 /* Tizen IME Error */
259 #define TIZEN_ERROR_IME -0x02F20000
260 /* Tizen Service Adaptor Error */
261 #define TIZEN_ERROR_SERVICE_ADAPTOR -0x02F30000
262 /* Tizen Widget Error */
263 #define TIZEN_ERROR_WIDGET -0x02F40000
264 /* Tizen Voice Control Error */
265 #define TIZEN_ERROR_VOICE_CONTROL -0x02F50000
268 * @brief Enumeration for tizen errors.
269 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
273 TIZEN_ERROR_NONE = 0,
275 TIZEN_ERROR_NOT_PERMITTED = -EPERM,
276 /**< Operation not permitted */
277 TIZEN_ERROR_NO_SUCH_FILE = -ENOENT,
278 /**< No such file or directory */
279 TIZEN_ERROR_NO_SUCH_PROCESS = -ESRCH,
280 /**< No such process */
281 TIZEN_ERROR_INTERRUPTED_SYS_CALL = -EINTR,
282 /**< Interrupted system call */
283 TIZEN_ERROR_IO_ERROR = -EIO,
285 TIZEN_ERROR_NO_SUCH_DEVICE = -ENXIO,
286 /**< No such device or address */
287 TIZEN_ERROR_ARGUMENT_LIST_TOO_LONG = -E2BIG,
288 /**< Argument list too long */
289 TIZEN_ERROR_EXEC_FORMAT_ERROR = -ENOEXEC,
290 /**< Exec format error */
291 TIZEN_ERROR_BAD_FILE_NUMBER = -EBADF,
292 /**< Bad file number */
294 TIZEN_ERROR_TRY_AGAIN = -EAGAIN,
296 TIZEN_ERROR_OUT_OF_MEMORY = -ENOMEM,
297 /**< Out of memory */
298 TIZEN_ERROR_PERMISSION_DENIED = -EACCES,
299 /**< Permission denied */
300 TIZEN_ERROR_BAD_ADDRESS = -EFAULT,
302 TIZEN_ERROR_BLOCK_DEVICE_REQUIRED = -ENOTBLK,
303 /**< Block device required */
304 TIZEN_ERROR_RESOURCE_BUSY = -EBUSY,
305 /**< Device or resource busy */
306 TIZEN_ERROR_FILE_EXISTS = -EEXIST,
308 TIZEN_ERROR_CROSS_DEVICE_LINK = -EXDEV,
309 /**< Cross-device link */
310 TIZEN_ERROR_NOT_A_DIRECTORY = -ENOTDIR,
311 /**< Not a directory */
313 TIZEN_ERROR_IS_A_DIRECTORY = -EISDIR,
314 /**< Is a directory */
315 TIZEN_ERROR_INVALID_PARAMETER = -EINVAL,
316 /**< Invalid function parameter */
317 TIZEN_ERROR_FILE_TABLE_OVERFLOW = -ENFILE,
318 /**< File table overflow */
319 TIZEN_ERROR_TOO_MANY_OPEN_FILES = -EMFILE,
320 /**< Too many open files */
321 TIZEN_ERROR_TOO_NOT_A_TERMINAL = -ENOTTY,
322 /**< Not a terminal */
323 TIZEN_ERROR_TOO_TEXT_FILE_BUSY = -ETXTBSY,
324 /**< Not a terminal */
325 TIZEN_ERROR_FILE_TOO_LARGE = -EFBIG,
326 /**< File too large */
327 TIZEN_ERROR_FILE_NO_SPACE_ON_DEVICE = -ENOSPC,
328 /**< No space left on device */
329 TIZEN_ERROR_ILLEGAL_SEEK = -ESPIPE,
331 TIZEN_ERROR_READ_ONLY_FILESYSTEM = -EROFS,
332 /**< Read-only file system */
333 TIZEN_ERROR_NO_DATA = -ENODATA,
334 /**< No data available */
336 TIZEN_ERROR_TOO_MANY_LINKS = -EMLINK,
337 /**< Too many links */
338 TIZEN_ERROR_BROKEN_PIPE = -EPIPE,
340 TIZEN_ERROR_ARGUMENT_OUT_OF_DOMAIN = -EDOM,
341 /**< Math argument out of domain of func */
342 TIZEN_ERROR_RESULT_OUT_OF_RANGE = -ERANGE,
343 /**< Math result not representable */
344 TIZEN_ERROR_WOULD_CAUSE_DEADLOCK = -EDEADLK,
345 /**< Resource deadlock would occur */
346 TIZEN_ERROR_FILE_NAME_TOO_LONG = -ENAMETOOLONG,
347 /**< File name too long */
348 TIZEN_ERROR_FILE_NO_LOCKS_AVAILABLE = -ENOLCK,
349 /**< No record locks available */
350 TIZEN_ERROR_INVALID_OPERATION = -ENOSYS,
351 /**< Function not implemented */
352 TIZEN_ERROR_DIR_NOT_EMPTY = -ENOTEMPTY,
353 /**< Directory not empty */
354 TIZEN_ERROR_TOO_MANY_SYMBOLIC_LINKS = -ELOOP,
355 /**< Too many symbolic links encountered */
356 TIZEN_ERROR_WOULD_BLOCK = TIZEN_ERROR_TRY_AGAIN,
357 /**< Operation would block */
358 TIZEN_ERROR_CORRUPTED_SHARED_LIB = -ELIBBAD,
359 /**< Accessing a corrupted shared library */
360 TIZEN_ERROR_LIB_SECTION_CORRUPTED = -ELIBSCN,
361 /**< .lib section in a.out corrupted */
362 TIZEN_ERROR_LINK_TOO_MANY_SHARED_LIB = -ELIBMAX,
363 /**< Attempting to link in too many shared libraries */
364 TIZEN_ERROR_SHARED_LIB_EXEC = -ELIBEXEC,
365 /**< Cannot exec a shared library directly */
366 TIZEN_ERROR_ILLEGAL_BYTE_SEQ = -EILSEQ,
367 /**< Illegal byte sequence */
368 TIZEN_ERROR_SYSTEM_CALL_RESTART = -ERESTART,
369 /**< Interrupted system call should be restarted */
370 TIZEN_ERROR_STREAMS_PIPE = -ESTRPIPE,
371 /**< Streams pipe error */
372 TIZEN_ERROR_TOO_MANY_USERS = -EUSERS,
373 /**< Too many users */
374 TIZEN_ERROR_NON_SOCKET = -ENOTSOCK,
375 /**< Socket operation on non-socket */
376 TIZEN_ERROR_NO_DEST_ADDRESS = -EDESTADDRREQ,
377 /**< Destination address required */
378 TIZEN_ERROR_MSG_TOO_LONG = -EMSGSIZE,
379 /**< Message too long */
380 TIZEN_ERROR_PROTOCOL_WRONG_TYPE = -EPROTOTYPE,
381 /**< Protocol wrong type for socket */
382 TIZEN_ERROR_PROTOCOL_NOT_AVALIABLE = -ENOPROTOOPT,
383 /**< Protocol not available */
384 TIZEN_ERROR_PROTOCOL_NOT_SUPPORTED = -EPROTONOSUPPORT,
385 /**< Protocol not supported */
386 TIZEN_ERROR_SOCKET_TYPE_NOT_SUPPORTED = -ESOCKTNOSUPPORT,
387 /**< Socket type not supported */
388 TIZEN_ERROR_ENDPOINT_OPERATIN_NOT_SUPPORTED = -EOPNOTSUPP,
389 /**< Operation not supported on transport endpoint */
390 TIZEN_ERROR_PROTOCOL_FAMILY_NOT_SUPPORTED = -EPFNOSUPPORT,
391 /**< Protocol family not supported */
392 TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = -EAFNOSUPPORT,
393 /**< Address family not supported by protocol */
394 TIZEN_ERROR_ADDRES_IN_USE = -EADDRINUSE,
395 /**< Address already in use */
396 TIZEN_ERROR_CANNOT_ASSIGN_ADDRESS = -EADDRNOTAVAIL,
397 /**< Cannot assign requested address */
398 TIZEN_ERROR_NETWORK_DOWN = -ENETDOWN,
399 /**< Network is down */
400 TIZEN_ERROR_NETWORK_UNREACHABLE = -ENETUNREACH,
401 /**< Network is unreachable */
402 TIZEN_ERROR_NETWORK_RESET = -ENETRESET,
403 /**< Network dropped connection because of reset */
404 TIZEN_ERROR_CONNECTION_ABORTED = -ECONNABORTED,
405 /**< Software caused connection abort */
406 TIZEN_ERROR_CONNECTION_RESET_BY_PEER = -ECONNRESET,
407 /**< Connection reset by peer */
408 TIZEN_ERROR_BUFFER_SPACE = -ENOBUFS,
409 /**< No buffer space available */
410 TIZEN_ERROR_ENDPOINT_CONNECTED = -EISCONN,
411 /**< Transport endpoint is already connected */
412 TIZEN_ERROR_ENDPOINT_NOT_CONNECTED = -ENOTCONN,
413 /**< Transport endpoint is not connected */
414 TIZEN_ERROR_ENDPOINT_SHUTDOWN = -ESHUTDOWN,
415 /**< Cannot send after transport endpoint shutdown */
416 TIZEN_ERROR_TOO_MANY_REFERENCES = -ETOOMANYREFS,
417 /**< Too many references: cannot splice */
418 TIZEN_ERROR_CONNECTION_TIME_OUT = -ETIMEDOUT,
419 /**< Connection timed out */
420 TIZEN_ERROR_CONNECTION_REFUSED = -ECONNREFUSED,
421 /**< Connection refused */
422 TIZEN_ERROR_HOST_DOWN = -EHOSTDOWN,
424 TIZEN_ERROR_NO_ROUTE_TO_HOST = -EHOSTUNREACH,
425 /**< No route to host */
426 TIZEN_ERROR_ALREADY_IN_PROGRESS = -EALREADY,
427 /**< Operation already in progress */
428 TIZEN_ERROR_NOW_IN_PROGRESS = -EINPROGRESS,
429 /**< Operation now in progress */
430 TIZEN_ERROR_STALE_NFS_FILE_HANDLE = -ESTALE,
431 /**< Stale NFS file handle */
432 TIZEN_ERROR_STRUCTURE_UNCLEAN = -EUCLEAN,
433 /**< Structure needs cleaning */
434 TIZEN_ERROR_NOT_XENIX_NAMED_TYPE_FILE = -ENOTNAM,
435 /**< Not a XENIX named type file */
436 TIZEN_ERROR_NO_XENIX_SEMAPHORES_AVAILABLE = -ENAVAIL,
437 /**< No XENIX semaphores available */
438 TIZEN_ERROR_IS_NAMED_TYPE_FILE = -EISNAM,
439 /**< Is a named type file */
440 TIZEN_ERROR_REMOTE_IO = -EREMOTEIO,
441 /**< Remote I/O error */
442 TIZEN_ERROR_QUOTA_EXCEEDED = -EDQUOT,
443 /**< Quota exceeded */
444 TIZEN_ERROR_NO_MEDIUM = -ENOMEDIUM,
445 /**< No medium found */
446 TIZEN_ERROR_WRONG_MEDIUM_TYPE = -EMEDIUMTYPE,
447 /**< Wrong medium type */
448 TIZEN_ERROR_CANCELED = -ECANCELED,
449 /**< Operation Canceled */
450 TIZEN_ERROR_KEY_NOT_AVAILABLE = -ENOKEY,
451 /**< Required key not available */
452 TIZEN_ERROR_KEY_EXPIRED = -EKEYEXPIRED,
453 /**< Key has expired */
454 TIZEN_ERROR_KEY_REVOKED = -EKEYREVOKED,
455 /**< Key has been revoked */
456 TIZEN_ERROR_KEY_REJECTED = -EKEYREJECTED,
457 /**< Key was rejected by service */
459 TIZEN_ERROR_OWNER_DEAD = -EOWNERDEAD,
460 /**< Owner died (for robust mutexes) */
462 TIZEN_ERROR_UNKNOWN = TIZEN_ERROR_MIN_PLATFORM_ERROR,
463 /**< Unknown error */
465 /* This is a place to add new errors here.
466 * Do not assign integer values explicitly. Values are auto-assigned.
468 TIZEN_ERROR_TIMED_OUT,
470 TIZEN_ERROR_NOT_SUPPORTED,
471 /**< Not supported */
472 TIZEN_ERROR_USER_NOT_CONSENTED,
473 /**< Not Consented */
474 TIZEN_ERROR_DEVICE_POLICY_RESTRICTION,
475 /**< Restriction by Device Policy */
476 TIZEN_ERROR_END_OF_COLLECTION,
480 * @brief Gets the last error code in the thread.
481 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
483 * @details This function retrieves the last error code which is set by set_last_result()
485 * @return One of #tizen_error_e
487 * @see #tizen_error_e
488 * @see set_last_result()
490 int get_last_result(void);
493 * @brief Sets the last error code to be returned in the thread.
494 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
496 * @param[in] err The error code to be returned
498 * @see #tizen_error_e
499 * @see get_last_result()
501 void set_last_result(int err);
504 * @brief Gets the message for given the error code.
505 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
507 * @remark This function returns a static pointer; subsequent calls will overwrite it.
508 * @param[in] err The error value to be returned
509 * @return The error's message
511 * @see #tizen_error_e
516 * location_manager_h location_handle;
517 * int result = location_manager_create(LOCATION_METHOD_GPS, &location_handle);
519 * if (LOCATIONS_ERROR_NONE != result)
521 * errMsg = get_error_message(result);
522 * dlog_print(DLOG_INFO, "MyTag", "%s", errMsg);
528 char *get_error_message(int err);
536 #endif /**<__TIZEN_COMMON_ERROR_H__ */