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 Bluetooth Error */
161 #define TIZEN_ERROR_BLUETOOTH -0x01C00000
162 /* Tizen Connection Error */
163 #define TIZEN_ERROR_CONNECTION -0x01C10000
164 /* Tizen NFC Error */
165 #define TIZEN_ERROR_NFC -0x01C20000
166 /* Tizen Serial Error */
167 #define TIZEN_ERROR_SERIAL -0x01C30000
168 /* Tizen Tethering Error */
169 #define TIZEN_ERROR_TETHERING -0x01C40000
170 /* Tizen Wifi Error */
171 #define TIZEN_ERROR_WIFI -0x01C50000
172 /* Tizen Wifi Direct Error */
173 #define TIZEN_ERROR_WIFI_DIRECT -0x01C60000
174 /* Tizen Smart Card Error */
175 #define TIZEN_ERROR_SMARTCARD -0x01C70000
176 /* Tizen IotCon Error */
177 #define TIZEN_ERROR_IOTCON -0x01C80000
178 /* Tizen SSDP Error */
179 #define TIZEN_ERROR_SSDP -0x01C90000
180 /* Tizen DNSSD Error */
181 #define TIZEN_ERROR_DNSSD -0x01CA0000
182 /* Tizen VPNSVC Error */
183 #define TIZEN_ERROR_VPNSVC -0x01CB0000
184 /* Tizen MTP Error */
185 #define TIZEN_ERROR_MTP -0x01CC0000
186 /* Tizen Privacy Manager Error */
187 #define TIZEN_ERROR_PRIVACY_MANAGER -0x01E00000
188 /* Tizen Key Manager Error */
189 #define TIZEN_ERROR_KEY_MANAGER -0x01E10000
190 /* Tizen PRIVILEGE INFO Error */
191 #define TIZEN_ERROR_PRIVILEGE_INFORMATION -0x01E20000
192 /* Tizen Calendar Error */
193 #define TIZEN_ERROR_CALENDAR -0x02000000
194 /* Tizen Contacts Error */
195 #define TIZEN_ERROR_CONTACTS -0x02010000
196 /* Tizen Storage Error */
197 #define TIZEN_ERROR_STORAGE -0x02200000
198 /* Tizen Vconf Error */
199 #define TIZEN_ERROR_VCONF -0x02210000
200 /* Tizen Device Error */
201 #define TIZEN_ERROR_DEVICE -0x02400000
202 /* Tizen Dlog Error */
203 #define TIZEN_ERROR_DLOG -0x02410000
204 /* Tizen Media Key Error */
205 #define TIZEN_ERROR_MEDIA_KEY -0x02420000
206 /* Tizen Runetime Info Error */
207 #define TIZEN_ERROR_RUNTIME_INFORMATION -0x02430000
208 /* Tizen Sensor Error */
209 #define TIZEN_ERROR_SENSOR -0x02440000
210 /* Tizen System Info Error */
211 #define TIZEN_ERROR_SYSTEM_INFORMATION -0x02450000
212 /* Tizen System Setting Error */
213 #define TIZEN_ERROR_SYSTEM_SETTING -0x02460000
214 /* Tizen System Resource Error */
215 #define TIZEN_ERROR_SYSTEM_RESOURCE -0x02470000
216 /* Tizen Context Error */
217 #define TIZEN_ERROR_CONTEXT -0x02480000
218 /* Tizen Health Error */
219 #define TIZEN_ERROR_HEALTH -0x02490000
220 /* Tizen Feedback Error */
221 #define TIZEN_ERROR_FEEDBACK -0x024A0000
222 /* Tizen Telephony Error */
223 #define TIZEN_ERROR_TELEPHONY -0x02600000
224 /* Tizen EFL Util Error */
225 #define TIZEN_ERROR_EFL_UTIL -0x02800000
226 /* Tizen UtilX Error */
227 #define TIZEN_ERROR_UTILX -0x02810000
228 /* Tizen Native Buffer Error */
229 #define TIZEN_ERROR_NATIVE_BUFFER -0x02820000
230 /* Tizen Buffer Manager Error */
231 #define TIZEN_ERROR_TBM -0x02830000
232 /* Tizen EOM Error */
233 #define TIZEN_ERROR_EOM -0x02840000
234 /* Tizen PANEL Error */
235 #define TIZEN_ERROR_PANEL -0x02850000
236 /* Tizen TZSH Error */
237 #define TIZEN_ERROR_TZSH -0x02860000
238 /* Tizen Download Error */
239 #define TIZEN_ERROR_DOWNLOAD -0x02A00000
240 /* Tizen WebView Error */
241 #define TIZEN_ERROR_WEBVIEW -0x02A10000
242 /* Tizen Location Manager Error */
243 #define TIZEN_ERROR_LOCATION_MANAGER -0x02C00000
244 /* Tizen Geofence Manager Error */
245 #define TIZEN_ERROR_GEOFENCE_MANAGER -0x02C10000
246 /* Tizen Maps Service Error */
247 #define TIZEN_ERROR_MAPS_SERVICE -0x02C20000
248 /* Tizen STT Error */
249 #define TIZEN_ERROR_STT -0x02F00000
250 /* Tizen TTS Error */
251 #define TIZEN_ERROR_TTS -0x02F10000
252 /* Tizen IME Error */
253 #define TIZEN_ERROR_IME -0x02F20000
254 /* Tizen Service Adaptor Error */
255 #define TIZEN_ERROR_SERVICE_ADAPTOR -0x02F30000
256 /* Tizen Widget Error */
257 #define TIZEN_ERROR_WIDGET -0x02F40000
258 /* Tizen Voice Control Error */
259 #define TIZEN_ERROR_VOICE_CONTROL -0x02F50000
262 * @brief Enumeration for tizen errors.
263 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
267 TIZEN_ERROR_NONE = 0,
269 TIZEN_ERROR_NOT_PERMITTED = -EPERM,
270 /**< Operation not permitted */
271 TIZEN_ERROR_NO_SUCH_FILE = -ENOENT,
272 /**< No such file or directory */
273 TIZEN_ERROR_NO_SUCH_PROCESS = -ESRCH,
274 /**< No such process */
275 TIZEN_ERROR_INTERRUPTED_SYS_CALL = -EINTR,
276 /**< Interrupted system call */
277 TIZEN_ERROR_IO_ERROR = -EIO,
279 TIZEN_ERROR_NO_SUCH_DEVICE = -ENXIO,
280 /**< No such device or address */
281 TIZEN_ERROR_ARGUMENT_LIST_TOO_LONG = -E2BIG,
282 /**< Argument list too long */
283 TIZEN_ERROR_EXEC_FORMAT_ERROR = -ENOEXEC,
284 /**< Exec format error */
285 TIZEN_ERROR_BAD_FILE_NUMBER = -EBADF,
286 /**< Bad file number */
288 TIZEN_ERROR_TRY_AGAIN = -EAGAIN,
290 TIZEN_ERROR_OUT_OF_MEMORY = -ENOMEM,
291 /**< Out of memory */
292 TIZEN_ERROR_PERMISSION_DENIED = -EACCES,
293 /**< Permission denied */
294 TIZEN_ERROR_BAD_ADDRESS = -EFAULT,
296 TIZEN_ERROR_BLOCK_DEVICE_REQUIRED = -ENOTBLK,
297 /**< Block device required */
298 TIZEN_ERROR_RESOURCE_BUSY = -EBUSY,
299 /**< Device or resource busy */
300 TIZEN_ERROR_FILE_EXISTS = -EEXIST,
302 TIZEN_ERROR_CROSS_DEVICE_LINK = -EXDEV,
303 /**< Cross-device link */
304 TIZEN_ERROR_NOT_A_DIRECTORY = -ENOTDIR,
305 /**< Not a directory */
307 TIZEN_ERROR_IS_A_DIRECTORY = -EISDIR,
308 /**< Is a directory */
309 TIZEN_ERROR_INVALID_PARAMETER = -EINVAL,
310 /**< Invalid function parameter */
311 TIZEN_ERROR_FILE_TABLE_OVERFLOW = -ENFILE,
312 /**< File table overflow */
313 TIZEN_ERROR_TOO_MANY_OPEN_FILES = -EMFILE,
314 /**< Too many open files */
315 TIZEN_ERROR_TOO_NOT_A_TERMINAL = -ENOTTY,
316 /**< Not a terminal */
317 TIZEN_ERROR_TOO_TEXT_FILE_BUSY = -ETXTBSY,
318 /**< Not a terminal */
319 TIZEN_ERROR_FILE_TOO_LARGE = -EFBIG,
320 /**< File too large */
321 TIZEN_ERROR_FILE_NO_SPACE_ON_DEVICE = -ENOSPC,
322 /**< No space left on device */
323 TIZEN_ERROR_ILLEGAL_SEEK = -ESPIPE,
325 TIZEN_ERROR_READ_ONLY_FILESYSTEM = -EROFS,
326 /**< Read-only file system */
327 TIZEN_ERROR_NO_DATA = -ENODATA,
328 /**< No data available */
330 TIZEN_ERROR_TOO_MANY_LINKS = -EMLINK,
331 /**< Too many links */
332 TIZEN_ERROR_BROKEN_PIPE = -EPIPE,
334 TIZEN_ERROR_ARGUMENT_OUT_OF_DOMAIN = -EDOM,
335 /**< Math argument out of domain of func */
336 TIZEN_ERROR_RESULT_OUT_OF_RANGE = -ERANGE,
337 /**< Math result not representable */
338 TIZEN_ERROR_WOULD_CAUSE_DEADLOCK = -EDEADLK,
339 /**< Resource deadlock would occur */
340 TIZEN_ERROR_FILE_NAME_TOO_LONG = -ENAMETOOLONG,
341 /**< File name too long */
342 TIZEN_ERROR_FILE_NO_LOCKS_AVAILABLE = -ENOLCK,
343 /**< No record locks available */
344 TIZEN_ERROR_INVALID_OPERATION = -ENOSYS,
345 /**< Function not implemented */
346 TIZEN_ERROR_DIR_NOT_EMPTY = -ENOTEMPTY,
347 /**< Directory not empty */
348 TIZEN_ERROR_TOO_MANY_SYMBOLIC_LINKS = -ELOOP,
349 /**< Too many symbolic links encountered */
350 TIZEN_ERROR_WOULD_BLOCK = TIZEN_ERROR_TRY_AGAIN,
351 /**< Operation would block */
352 TIZEN_ERROR_CORRUPTED_SHARED_LIB = -ELIBBAD,
353 /**< Accessing a corrupted shared library */
354 TIZEN_ERROR_LIB_SECTION_CORRUPTED = -ELIBSCN,
355 /**< .lib section in a.out corrupted */
356 TIZEN_ERROR_LINK_TOO_MANY_SHARED_LIB = -ELIBMAX,
357 /**< Attempting to link in too many shared libraries */
358 TIZEN_ERROR_SHARED_LIB_EXEC = -ELIBEXEC,
359 /**< Cannot exec a shared library directly */
360 TIZEN_ERROR_ILLEGAL_BYTE_SEQ = -EILSEQ,
361 /**< Illegal byte sequence */
362 TIZEN_ERROR_SYSTEM_CALL_RESTART = -ERESTART,
363 /**< Interrupted system call should be restarted */
364 TIZEN_ERROR_STREAMS_PIPE = -ESTRPIPE,
365 /**< Streams pipe error */
366 TIZEN_ERROR_TOO_MANY_USERS = -EUSERS,
367 /**< Too many users */
368 TIZEN_ERROR_NON_SOCKET = -ENOTSOCK,
369 /**< Socket operation on non-socket */
370 TIZEN_ERROR_NO_DEST_ADDRESS = -EDESTADDRREQ,
371 /**< Destination address required */
372 TIZEN_ERROR_MSG_TOO_LONG = -EMSGSIZE,
373 /**< Message too long */
374 TIZEN_ERROR_PROTOCOL_WRONG_TYPE = -EPROTOTYPE,
375 /**< Protocol wrong type for socket */
376 TIZEN_ERROR_PROTOCOL_NOT_AVALIABLE = -ENOPROTOOPT,
377 /**< Protocol not available */
378 TIZEN_ERROR_PROTOCOL_NOT_SUPPORTED = -EPROTONOSUPPORT,
379 /**< Protocol not supported */
380 TIZEN_ERROR_SOCKET_TYPE_NOT_SUPPORTED = -ESOCKTNOSUPPORT,
381 /**< Socket type not supported */
382 TIZEN_ERROR_ENDPOINT_OPERATIN_NOT_SUPPORTED = -EOPNOTSUPP,
383 /**< Operation not supported on transport endpoint */
384 TIZEN_ERROR_PROTOCOL_FAMILY_NOT_SUPPORTED = -EPFNOSUPPORT,
385 /**< Protocol family not supported */
386 TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = -EAFNOSUPPORT,
387 /**< Address family not supported by protocol */
388 TIZEN_ERROR_ADDRES_IN_USE = -EADDRINUSE,
389 /**< Address already in use */
390 TIZEN_ERROR_CANNOT_ASSIGN_ADDRESS = -EADDRNOTAVAIL,
391 /**< Cannot assign requested address */
392 TIZEN_ERROR_NETWORK_DOWN = -ENETDOWN,
393 /**< Network is down */
394 TIZEN_ERROR_NETWORK_UNREACHABLE = -ENETUNREACH,
395 /**< Network is unreachable */
396 TIZEN_ERROR_NETWORK_RESET = -ENETRESET,
397 /**< Network dropped connection because of reset */
398 TIZEN_ERROR_CONNECTION_ABORTED = -ECONNABORTED,
399 /**< Software caused connection abort */
400 TIZEN_ERROR_CONNECTION_RESET_BY_PEER = -ECONNRESET,
401 /**< Connection reset by peer */
402 TIZEN_ERROR_BUFFER_SPACE = -ENOBUFS,
403 /**< No buffer space available */
404 TIZEN_ERROR_ENDPOINT_CONNECTED = -EISCONN,
405 /**< Transport endpoint is already connected */
406 TIZEN_ERROR_ENDPOINT_NOT_CONNECTED = -ENOTCONN,
407 /**< Transport endpoint is not connected */
408 TIZEN_ERROR_ENDPOINT_SHUTDOWN = -ESHUTDOWN,
409 /**< Cannot send after transport endpoint shutdown */
410 TIZEN_ERROR_TOO_MANY_REFERENCES = -ETOOMANYREFS,
411 /**< Too many references: cannot splice */
412 TIZEN_ERROR_CONNECTION_TIME_OUT = -ETIMEDOUT,
413 /**< Connection timed out */
414 TIZEN_ERROR_CONNECTION_REFUSED = -ECONNREFUSED,
415 /**< Connection refused */
416 TIZEN_ERROR_HOST_DOWN = -EHOSTDOWN,
418 TIZEN_ERROR_NO_ROUTE_TO_HOST = -EHOSTUNREACH,
419 /**< No route to host */
420 TIZEN_ERROR_ALREADY_IN_PROGRESS = -EALREADY,
421 /**< Operation already in progress */
422 TIZEN_ERROR_NOW_IN_PROGRESS = -EINPROGRESS,
423 /**< Operation now in progress */
424 TIZEN_ERROR_STALE_NFS_FILE_HANDLE = -ESTALE,
425 /**< Stale NFS file handle */
426 TIZEN_ERROR_STRUCTURE_UNCLEAN = -EUCLEAN,
427 /**< Structure needs cleaning */
428 TIZEN_ERROR_NOT_XENIX_NAMED_TYPE_FILE = -ENOTNAM,
429 /**< Not a XENIX named type file */
430 TIZEN_ERROR_NO_XENIX_SEMAPHORES_AVAILABLE = -ENAVAIL,
431 /**< No XENIX semaphores available */
432 TIZEN_ERROR_IS_NAMED_TYPE_FILE = -EISNAM,
433 /**< Is a named type file */
434 TIZEN_ERROR_REMOTE_IO = -EREMOTEIO,
435 /**< Remote I/O error */
436 TIZEN_ERROR_QUOTA_EXCEEDED = -EDQUOT,
437 /**< Quota exceeded */
438 TIZEN_ERROR_NO_MEDIUM = -ENOMEDIUM,
439 /**< No medium found */
440 TIZEN_ERROR_WRONG_MEDIUM_TYPE = -EMEDIUMTYPE,
441 /**< Wrong medium type */
442 TIZEN_ERROR_CANCELED = -ECANCELED,
443 /**< Operation Canceled */
444 TIZEN_ERROR_KEY_NOT_AVAILABLE = -ENOKEY,
445 /**< Required key not available */
446 TIZEN_ERROR_KEY_EXPIRED = -EKEYEXPIRED,
447 /**< Key has expired */
448 TIZEN_ERROR_KEY_REVOKED = -EKEYREVOKED,
449 /**< Key has been revoked */
450 TIZEN_ERROR_KEY_REJECTED = -EKEYREJECTED,
451 /**< Key was rejected by service */
453 TIZEN_ERROR_OWNER_DEAD = -EOWNERDEAD,
454 /**< Owner died (for robust mutexes) */
456 TIZEN_ERROR_UNKNOWN = TIZEN_ERROR_MIN_PLATFORM_ERROR,
457 /**< Unknown error */
459 /* This is a place to add new errors here.
460 * Do not assign integer values explicitly. Values are auto-assigned.
462 TIZEN_ERROR_TIMED_OUT,
464 TIZEN_ERROR_NOT_SUPPORTED,
465 /**< Not supported */
466 TIZEN_ERROR_USER_NOT_CONSENTED,
467 /**< Not Consented */
468 TIZEN_ERROR_END_OF_COLLECTION,
469 TIZEN_ERROR_NOT_SUPPORT_API = TIZEN_ERROR_NOT_SUPPORTED
470 /**< TIZEN_ERROR_NOT_SUPPORT_API is deprecated */
474 * @brief Gets the last error code in the thread.
475 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
477 * @details This function retrieves the last error code which is set by set_last_result()
479 * @return One of #tizen_error_e
481 * @see #tizen_error_e
482 * @see set_last_result()
484 int get_last_result(void);
487 * @brief Sets the last error code to be returned in the thread.
488 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
490 * @param[in] err The error code to be returned
492 * @see #tizen_error_e
493 * @see get_last_result()
495 void set_last_result(int err);
498 * @brief Gets the message for given the error code.
499 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
501 * @remark This function returns a static pointer; subsequent calls will overwrite it.
502 * @param[in] err The error value to be returned
503 * @return The error's message
505 * @see #tizen_error_e
510 * location_manager_h location_handle;
511 * int result = location_manager_create(LOCATION_METHOD_GPS, &location_handle);
513 * if (LOCATIONS_ERROR_NONE != result)
515 * errMsg = get_error_message(result);
516 * dlog_print(DLOG_INFO, "MyTag", "%s", errMsg);
522 char *get_error_message(int err);
530 #endif /**<__TIZEN_COMMON_ERROR_H__ */