diff options
author | jk7744.park <jk7744.park@samsung.com> | 2015-02-01 13:29:42 +0900 |
---|---|---|
committer | jk7744.park <jk7744.park@samsung.com> | 2015-02-01 13:29:42 +0900 |
commit | 71070f8743b1c4ce00aa1afae0160043fc1124ea (patch) | |
tree | e7a64de90f9e7de2c80c2b8ea9013bf5547117e0 | |
parent | abaf397a44359f0d96ec03a1a98adc4f9efb9327 (diff) | |
download | common-tizen_2.3.tar.gz common-tizen_2.3.tar.bz2 common-tizen_2.3.zip |
tizen 2.3 releasetizen_2.3_releasesubmit/tizen_2.3/20150202.060755tizen_2.3
-rwxr-xr-x | CMakeLists.txt | 18 | ||||
-rw-r--r-- | capi-base-common.pc | 12 | ||||
-rwxr-xr-x | capi-base-common.pc.in | 15 | ||||
-rwxr-xr-x | doc/tizen_doc.h | 30 | ||||
-rwxr-xr-x | include/tizen_error.h | 239 | ||||
-rwxr-xr-x[-rw-r--r--] | packaging/capi-base-common.spec | 24 | ||||
-rwxr-xr-x | src/tizen_error.c | 466 |
7 files changed, 749 insertions, 55 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 360f921..fc11c5e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,16 +1,30 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT("capi-base-common") - +SET(fw_name "capi-base-common") SET(CMAKE_INSTALL_PREFIX "/usr") SET(PREFIX ${CMAKE_INSTALL_PREFIX}) -SET(VERSION 0.0.1) +SET(VERSION ${FULLVER}) +SET(PC_LDFLAGS -l${fw_name}) INSTALL(FILES include/tizen.h DESTINATION include) INSTALL(FILES include/tizen_error.h DESTINATION include) INSTALL(FILES include/tizen_type.h DESTINATION include) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/capi-base-common.pc DESTINATION lib/pkgconfig) +SET(INC_DIR include) +INCLUDE_DIRECTORIES(${INC_DIR}) + +SET(SOURCES + src/tizen_error.c +) + +ADD_LIBRARY(${fw_name} SHARED ${SOURCES}) + +SET_TARGET_PROPERTIES(${fw_name} PROPERTIES VERSION ${FULLVER}) +SET_TARGET_PROPERTIES(${fw_name} PROPERTIES SOVERSION 0) +INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR}) +CONFIGURE_FILE(${fw_name}.pc.in ${fw_name}.pc @ONLY) IF(UNIX) diff --git a/capi-base-common.pc b/capi-base-common.pc deleted file mode 100644 index c4d67b9..0000000 --- a/capi-base-common.pc +++ /dev/null @@ -1,12 +0,0 @@ - -# Package Information for pkg-config - -prefix=/usr -includedir=/usr/include - -Name: capi-base-common -Description: -Version: 0.0.1 -Requires: -Cflags: -I${includedir} - diff --git a/capi-base-common.pc.in b/capi-base-common.pc.in new file mode 100755 index 0000000..134c791 --- /dev/null +++ b/capi-base-common.pc.in @@ -0,0 +1,15 @@ + +# Package Information for pkg-config + +prefix=/usr +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: capi-base-common +Description: capi-base-common +Version: @VERSION@ +Libs: -L${libdir} @PC_LDFLAGS@ +Cflags: -I${includedir} + + diff --git a/doc/tizen_doc.h b/doc/tizen_doc.h new file mode 100755 index 0000000..5addc0a --- /dev/null +++ b/doc/tizen_doc.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + + +/** + * @defgroup CAPI_COMMON_ERROR Common Error + * @brief This file provides error codes that are common for the whole TIZEN API. + * @section CAPI_COMMON_ERROR_HEADER Required Header + * \#include <tizen.h> + * @ingroup CAPI_BASE_FRAMEWORK + * @section CAPI_COMMON_ERROR_OVERVIEW Overview + * This file declares common errors and provides following features for handling the error. + * - Getting/Setting the error value. + * - Retrieving the error messages with error value. + */ + diff --git a/include/tizen_error.h b/include/tizen_error.h index 779076b..0e2202a 100755 --- a/include/tizen_error.h +++ b/include/tizen_error.h @@ -20,12 +20,12 @@ #include <errno.h> +#ifdef __cplusplus +extern "C" { +#endif + /** - * @defgroup CAPI_COMMON_ERROR Common Error Code - * @brief This file provides error codes that are common for the whole TIZEN API. - * @section CAPI_COMMON_ERROR_HEADER Required Header - * \#include <tizen_error.h> - * @ingroup CAPI_BASE_FRAMEWORK + * @addtogroup CAPI_COMMON_ERROR * @{ */ @@ -34,54 +34,189 @@ #define TIZEN_ERROR_MAX_PLATFORM_ERROR 0 #define TIZEN_ERROR_MIN_PLATFORM_ERROR (-1073741824LL) /* = -2147483648 / 2 */ -/** Use this constant macro as the value of the first module specific error */ +/* Use this constant macro as the value of the first module specific error */ #define TIZEN_ERROR_MIN_MODULE_ERROR (-2147483648LL) -/** Module errors cannot be greater than the following constant */ +/* Module errors cannot be greater than the following constant */ #define TIZEN_ERROR_MAX_MODULE_ERROR (TIZEN_ERROR_MIN_PLATFORM_ERROR - 1) -/** Check if error or not */ +/* Check if error or not */ #define TIZEN_ERROR_IS_OK(x) (0 <= (x)) -/** Check if error or not */ +/* Check if error or not */ #define TIZEN_ERROR_IS_ERROR(x) (!TIZEN_ERROR_IS_OK(x)) -/** Check if slp error or not */ +/* Check if slp error or not */ #define TIZEN_ERROR_IS_PLATFORM_ERROR(x) (TIZEN_ERROR_MIN_PLATFORM_ERROR <= (x) && (x) < 0) -/** Application Error Class */ +/* Application Error Class */ #define TIZEN_ERROR_APPLICATION_CLASS -0x00000200 -/** Base Error Class */ +/* Base Error Class */ #define TIZEN_ERROR_BASE_CLASS -0x00000400 -/** Content Error Class */ +/* Content Error Class */ #define TIZEN_ERROR_CONTENT_CLASS -0x00000800 -/** Location Error Class */ +/* Location Error Class */ #define TIZEN_ERROR_LOCATION_CLASS -0x00001000 -/** Multimedia Error Class */ +/* Multimedia Error Class */ #define TIZEN_ERROR_MULTIMEDIA_CLASS -0x00002000 -/** Messaging Error Class */ +/* Messaging Error Class */ #define TIZEN_ERROR_MESSAGING_CLASS -0x00004000 -/** Network Error Class */ +/* Network Error Class */ #define TIZEN_ERROR_NETWORK_CLASS -0x00008000 -/** Social Error Class */ +/* Social Error Class */ #define TIZEN_ERROR_SOCIAL_CLASS -0x00010000 -/** System Error Class */ +/* System Error Class */ #define TIZEN_ERROR_SYSTEM_CLASS -0x00020000 -/** Telephony Error Class */ +/* Telephony Error Class */ #define TIZEN_ERROR_TELEPHONY_CLASS -0x00040000 -/** UI Error class */ +/* UI Error class */ #define TIZEN_ERROR_UI_CLASS -0x00080000 -/** UIX Error class */ +/* UIX Error class */ #define TIZEN_ERROR_UIX_CLASS -0x00100000 -/** AD Error class */ +/* AD Error class */ #define TIZEN_ERROR_AD_CLASS -0x00200000 -/** Web Error class */ +/* Web Error class */ #define TIZEN_ERROR_WEB_CLASS -0x00400000 -/** DRM Error class */ +/* DRM Error class */ #define TIZEN_ERROR_DRM_CLASS -0x00800000 -/** Account Error class */ +/* Account Error class */ #define TIZEN_ERROR_ACCOUNT_CLASS -0x01000000 +/* Tizen Account Error */ +#define TIZEN_ERROR_ACCOUNT -0x01000000 +/* Tizen Application Error */ +#define TIZEN_ERROR_APPLICATION -0x01100000 +/* Tizen Application Manager Error */ +#define TIZEN_ERROR_APPLICATION_MANAGER -0x01110000 +/* Tizen Badge Error */ +#define TIZEN_ERROR_BADGE -0x01120000 +/* Tizen Message Port Error */ +#define TIZEN_ERROR_MESSAGE_PORT -0x01130000 +/* Tizen Notification Error */ +#define TIZEN_ERROR_NOTIFICATION -0x01140000 +/* Tizen Package Manager Error */ +#define TIZEN_ERROR_PACKAGE_MANAGER -0x01150000 +/* Tizen Shortcut Error */ +#define TIZEN_ERROR_SHORTCUT -0x01160000 +/* Tizen UI Gadget Error */ +#define TIZEN_ERROR_UI_GADGET -0x01170000 +/* Tizen Bundle Error */ +#define TIZEN_ERROR_BUNDLE -0x01180000 +/* Tizen Data Control Error */ +#define TIZEN_ERROR_DATA_CONTROL -0x01190000 +/* Tizen Service Application Error */ +#define TIZEN_ERROR_SERVICE_APPLICATION -0x01200000 +/* Tizen Utility ICU Error */ +#define TIZEN_ERROR_UTILITY_ICU -0x01500000 +/* Tizen Mime Type Error */ +#define TIZEN_ERROR_MIME_TYPE -0x01600000 +/* Tizen Media Content Error */ +#define TIZEN_ERROR_MEDIA_CONTENT -0x01610000 +/* Tizen Email Service Error */ +#define TIZEN_ERROR_EMAIL_SERVICE -0x01700000 +/* Tizen Messaging Service Error */ +#define TIZEN_ERROR_MESSAGING_SERVICE -0x01710000 +/* Tizen Push Error */ +#define TIZEN_ERROR_PUSH -0x01720000 +/* Tizen Audio IO Error */ +#define TIZEN_ERROR_AUDIO_IO -0x01900000 +/* Tizen Camera Error */ +#define TIZEN_ERROR_CAMERA -0x01910000 +/* Tizen Image Util Error */ +#define TIZEN_ERROR_IMAGE_UTIL -0x01920000 +/* Tizen Metadata Extractor Error */ +#define TIZEN_ERROR_METADATA_EXTRACTOR -0x01930000 +/* Tizen Player Error */ +#define TIZEN_ERROR_PLAYER -0x01940000 +/* Tizen Recorder Error */ +#define TIZEN_ERROR_RECORDER -0x01950000 +/* Tizen Sound Manager Error */ +#define TIZEN_ERROR_SOUND_MANAGER -0x01960000 +/* Tizen Tone Player Error */ +#define TIZEN_ERROR_TONE_PLAYER -0x01970000 +/* Tizen Video Util Error */ +#define TIZEN_ERROR_VIDEO_UTIL -0x01980000 +/* Tizen Wav Player Error */ +#define TIZEN_ERROR_WAV_PLAYER -0x01990000 +/* Tizen Radio Error */ +#define TIZEN_ERROR_RADIO -0x019A0000 +/* Tizen MEDIA CODEC Error */ +#define TIZEN_ERROR_MEDIACODEC -0x019B0000 +/* Tizen Bluetooth Error */ +#define TIZEN_ERROR_BLUETOOTH -0x01C00000 +/* Tizen Connection Error */ +#define TIZEN_ERROR_CONNECTION -0x01C10000 +/* Tizen NFC Error */ +#define TIZEN_ERROR_NFC -0x01C20000 +/* Tizen Serial Error */ +#define TIZEN_ERROR_SERIAL -0x01C30000 +/* Tizen Tethering Error */ +#define TIZEN_ERROR_TETHERING -0x01C40000 +/* Tizen Wifi Error */ +#define TIZEN_ERROR_WIFI -0x01C50000 +/* Tizen Wifi Direct Error */ +#define TIZEN_ERROR_WIFI_DIRECT -0x01C60000 +/* Tizen Privacy Manager Error */ +#define TIZEN_ERROR_PRIVACY_MANAGER -0x01E00000 +/* Tizen Key Manager Error */ +#define TIZEN_ERROR_KEY_MANAGER -0x01E10000 +/* Tizen PRIVILEGE INFO Error */ +#define TIZEN_ERROR_PRIVILEGE_INFORMATION -0x01E20000 +/* Tizen Calendar Error */ +#define TIZEN_ERROR_CALENDAR -0x02000000 +/* Tizen Contacts Error */ +#define TIZEN_ERROR_CONTACTS -0x02010000 +/* Tizen Storage Error */ +#define TIZEN_ERROR_STORAGE -0x02200000 +/* Tizen Vconf Error */ +#define TIZEN_ERROR_VCONF -0x02210000 +/* Tizen Device Error */ +#define TIZEN_ERROR_DEVICE -0x02400000 +/* Tizen Dlog Error */ +#define TIZEN_ERROR_DLOG -0x02410000 +/* Tizen Media Key Error */ +#define TIZEN_ERROR_MEDIA_KEY -0x02420000 +/* Tizen Runetime Info Error */ +#define TIZEN_ERROR_RUNTIME_INFORMATION -0x02430000 +/* Tizen Sensor Error */ +#define TIZEN_ERROR_SENSOR -0x02440000 +/* Tizen System Info Error */ +#define TIZEN_ERROR_SYSTEM_INFORMATION -0x02450000 +/* Tizen System Setting Error */ +#define TIZEN_ERROR_SYSTEM_SETTING -0x02460000 +/* Tizen System Resource Error */ +#define TIZEN_ERROR_SYSTEM_RESOURCE -0x02470000 +/* Tizen Context Error */ +#define TIZEN_ERROR_CONTEXT -0x02480000 +/* Tizen Telephony Error */ +#define TIZEN_ERROR_TELEPHONY -0x02600000 +/* Tizen EFL Util Error */ +#define TIZEN_ERROR_EFL_UTIL -0x02800000 +/* Tizen UtilX Error */ +#define TIZEN_ERROR_UTILX -0x02810000 +/* Tizen Native Buffer Error */ +#define TIZEN_ERROR_NATIVE_BUFFER -0x02820000 +/* Tizen Buffer Manager Error */ +#define TIZEN_ERROR_TBM -0x02830000 +/* Tizen Download Error */ +#define TIZEN_ERROR_DOWNLOAD -0x02A00000 +/* Tizen WebView Error */ +#define TIZEN_ERROR_WEBVIEW -0x02A10000 +/* Tizen Location Manager */ +#define TIZEN_ERROR_LOCATION_MANAGER -0x02C00000 +/* Tizen STT Error */ +#define TIZEN_ERROR_STT -0x02F00000 +/* Tizen TTS Error */ +#define TIZEN_ERROR_TTS -0x02F10000 + + + + +/** + * @brief Enumeration for tizen errors. + * @since_tizen 2.3 + * +*/ typedef enum { TIZEN_ERROR_NONE = 0, /**< Successful */ @@ -181,20 +316,60 @@ typedef enum TIZEN_ERROR_OWNER_DEAD = -EOWNERDEAD, /**< Owner died (for robust mutexes) */ - /** Different errors (not an errno) */ - TIZEN_ERROR_UNKNOWN = TIZEN_ERROR_MIN_PLATFORM_ERROR, + TIZEN_ERROR_UNKNOWN = TIZEN_ERROR_MIN_PLATFORM_ERROR, /**< Unknown error */ /* This is a place to add new errors here. * Do not assign integer values explicitly. Values are auto-assigned. */ - TIZEN_ERROR_TIMED_OUT, - TIZEN_ERROR_NOT_SUPPORT_API, - TIZEN_ERROR_END_OF_COLLECTION, - + TIZEN_ERROR_TIMED_OUT, /**< Time out */ + TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */ + TIZEN_ERROR_USER_NOT_CONSENTED, /**< Not Consented */ + TIZEN_ERROR_END_OF_COLLECTION } tizen_error_e; + +/** + * @brief Gets the last error code in the thread. + * @since_tizen 2.3 + * + * @details This function retrieves the last error code which is set by set_last_result() + * + * @return One of #tizen_error_e + * + * @see #tizen_error_e + * @see set_last_result() +*/ +int get_last_result(void); + +/** + * @brief Sets the last error code to be returned in the thread. + * @since_tizen 2.3 + * + * @param[in] err The error code to be returned + * + * @see #tizen_error_e + * @see get_last_result() +*/ +void set_last_result(int err); + +/** + * @brief Gets the message for given the error code. + * @since_tizen 2.3 + * + * @remark This function returns a static pointer; subsequent calls will overwrite it. + * @param[in] err The error value to be returned + * @return The error's message + * + * @see #tizen_error_e + */ +char* get_error_message(int err); + /** * @} */ +#ifdef __cplusplus +} +#endif + #endif /**<__TIZEN_COMMON_ERROR_H__ */ diff --git a/packaging/capi-base-common.spec b/packaging/capi-base-common.spec index 77f74ba..b84f9aa 100644..100755 --- a/packaging/capi-base-common.spec +++ b/packaging/capi-base-common.spec @@ -1,43 +1,49 @@ -#sbs-git:slp/api/common capi-base-common 0.1.0 2d37db72791bf53066ac327782d3af9e737c4718 Name: capi-base-common Summary: Common header files of Tizen Native API -Version: 0.1.0 -Release: 8 +Version: 0.1.7 +Release: 1 Group: TO_BE/FILLED_IN License: TO BE FILLED IN Source0: %{name}-%{version}.tar.gz BuildRequires: cmake +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig %description -Common header files of Tizen Native API +Common header files of Tizen Core API %package devel -Summary: Common header files of Tizen Native API (Development) +Summary: Common header files of Tizen Core API (Development) Group: TO_BE/FILLED_IN Requires: %{name} = %{version}-%{release} %description devel -Common header files of Tizen Native API +Common header files of Tizen Core API %prep %setup -q - %build -cmake . -DCMAKE_INSTALL_PREFIX=/usr - +MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` +cmake . -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR:PATH=%{_libdir} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} make %{?jobs:-j%jobs} %install rm -rf %{buildroot} + %make_install mkdir -p %{buildroot}/usr/share/license cp LICENSE %{buildroot}/usr/share/license/%{name} +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig %files /usr/share/license/%{name} +%{_libdir}/libcapi-base-common.so* + %files devel /usr/include/*.h /usr/lib/pkgconfig/capi-base-common.pc diff --git a/src/tizen_error.c b/src/tizen_error.c new file mode 100755 index 0000000..062011b --- /dev/null +++ b/src/tizen_error.c @@ -0,0 +1,466 @@ +#include <stdlib.h> +#include <string.h> +#include "tizen.h" + +#define ERR_ENTRY(name, value, msg) {value, name, msg} + +typedef struct tizen_err_info +{ + int value; + const char *name; + const char *msg; +}err_info; + +static err_info err_list[] = +{ + ERR_ENTRY("TIZEN_ERROR_UNKNOWN",TIZEN_ERROR_UNKNOWN,"Unknown error"), + ERR_ENTRY("TIZEN_ERROR_TIMED_OUT",TIZEN_ERROR_TIMED_OUT,"Time out"), + ERR_ENTRY("TIZEN_ERROR_NOT_SUPPORTED",TIZEN_ERROR_NOT_SUPPORTED,"Not supported"), + ERR_ENTRY("TIZEN_ERROR_USER_NOT_CONSENTED",TIZEN_ERROR_USER_NOT_CONSENTED,"Not consented"), +#if defined (TIZEN_ERROR_ACCOUNT) + ERR_ENTRY("ACCOUNT_ERROR_DUPLICATED",TIZEN_ERROR_ACCOUNT | 0x01,"Same user name exists in your application"), + ERR_ENTRY("ACCOUNT_ERROR_RECORD_NOT_FOUND",TIZEN_ERROR_ACCOUNT | 0x03,"Related record does not exist"), + ERR_ENTRY("ACCOUNT_ERROR_DB_FAILED",TIZEN_ERROR_ACCOUNT | 0x04,"DB operation failed"), + ERR_ENTRY("ACCOUNT_ERROR_DB_NOT_OPENED",TIZEN_ERROR_ACCOUNT | 0x05,"DB is not connected"), + ERR_ENTRY("ACCOUNT_ERROR_QUERY_SYNTAX_ERROR",TIZEN_ERROR_ACCOUNT | 0x06,"DB query syntax error"), + ERR_ENTRY("ACCOUNT_ERROR_ITERATOR_END",TIZEN_ERROR_ACCOUNT | 0x07,"Iterator has reached the end"), + ERR_ENTRY("ACCOUNT_ERROR_NOTI_FAILED",TIZEN_ERROR_ACCOUNT | 0x08,"Notification failed"), + ERR_ENTRY("ACCOUNT_ERROR_XML_PARSE_FAILED",TIZEN_ERROR_ACCOUNT | 0x0a,"XML parse failed"), + ERR_ENTRY("ACCOUNT_ERROR_XML_FILE_NOT_FOUND",TIZEN_ERROR_ACCOUNT | 0x0b,"XML file does not exist "), + ERR_ENTRY("ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL",TIZEN_ERROR_ACCOUNT | 0x0c,"Subscription failed "), + ERR_ENTRY("ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER",TIZEN_ERROR_ACCOUNT | 0x0d,"Account provider is not registered"), + ERR_ENTRY("ACCOUNT_ERROR_NOT_ALLOW_MULTIPLE",TIZEN_ERROR_ACCOUNT | 0x0e,"Multiple accounts are not supported"), + ERR_ENTRY("ACCOUNT_ERROR_DATABASE_BUSY",TIZEN_ERROR_ACCOUNT | 0x10,"SQLite busy handler expired"), +#endif +#if defined (TIZEN_ERROR_APPLICATION) + ERR_ENTRY("APP_CONTROL_ERROR_LAUNCH_FAILED",TIZEN_ERROR_APPLICATION | 0x24,"Internal launch error"), + ERR_ENTRY("PREFERENCE_ERROR_NO_KEY",TIZEN_ERROR_APPLICATION | 0x30,"Required key not available"), + ERR_ENTRY("APP_ERROR_INVALID_CONTEXT",TIZEN_ERROR_APPLICATION | 0x01,"Invalid application context"), +#endif +#if defined (TIZEN_ERROR_APPLICATION_MANAGER) + ERR_ENTRY("APP_MANAGER_ERROR_NO_SUCH_APP",TIZEN_ERROR_APPLICATION_MANAGER | 0x01 ,"No such application"), + ERR_ENTRY("APP_MANAGER_ERROR_DB_FAILED",TIZEN_ERROR_APPLICATION_MANAGER | 0x03 ,"Database error"), + ERR_ENTRY("APP_MANAGER_ERROR_INVALID_PACKAGE",TIZEN_ERROR_APPLICATION_MANAGER | 0x04 ,"Invalid package name"), + ERR_ENTRY("APP_MANAGER_ERROR_APP_NO_RUNNING",TIZEN_ERROR_APPLICATION_MANAGER | 0x05 ,"App is not running"), + ERR_ENTRY("APP_MANAGER_ERROR_REQUEST_FAILED",TIZEN_ERROR_APPLICATION_MANAGER | 0x06 ,"Internal aul request error"), +#endif +#if defined (TIZEN_ERROR_BADGE) + ERR_ENTRY("BADGE_ERROR_FROM_DB",TIZEN_ERROR_BADGE | 0x01 ,"Error from DB"), + ERR_ENTRY("BADGE_ERROR_ALREADY_EXIST",TIZEN_ERROR_BADGE | 0x02 ,"Already exist"), + ERR_ENTRY("BADGE_ERROR_FROM_DBUS",TIZEN_ERROR_BADGE | 0x03 ,"Error from DBus"), + ERR_ENTRY("BADGE_ERROR_NOT_EXIST",TIZEN_ERROR_BADGE | 0x04 ,"Not exist"), + ERR_ENTRY("BADGE_ERROR_SERVICE_NOT_READY",TIZEN_ERROR_BADGE | 0x05 ,"Error service not ready"), +#endif +#if defined (TIZEN_ERROR_MESSAGE_PORT) + ERR_ENTRY("MESSAGE_PORT_ERROR_PORT_NOT_FOUND",TIZEN_ERROR_MESSAGE_PORT | 0x01 ,"The message port of the remote application is not found"), + ERR_ENTRY("MESSAGE_PORT_ERROR_CERTIFICATE_NOT_MATCH",TIZEN_ERROR_MESSAGE_PORT | 0x02 ,"The remote application is not signed with the same certificate"), + ERR_ENTRY("MESSAGE_PORT_ERROR_MAX_EXCEEDED",TIZEN_ERROR_MESSAGE_PORT | 0x03 ,"The size of the message has exceeded the maximum limit"), + ERR_ENTRY("MESSAGE_PORT_ERROR_RESOURCE_UNAVAILABLE",TIZEN_ERROR_MESSAGE_PORT | 0x04 ,"Resource is temporarily unavailable"), +#endif +#if defined (TIZEN_ERROR_NOTIFICATION) + ERR_ENTRY("NOTIFICATION_ERROR_FROM_DB",TIZEN_ERROR_NOTIFICATION | 0x01 ,"Error from DB"), + ERR_ENTRY("NOTIFICATION_ERROR_ALREADY_EXIST_ID",TIZEN_ERROR_NOTIFICATION | 0x02 ,"Already exist private ID"), + ERR_ENTRY("NOTIFICATION_ERROR_FROM_DBUS",TIZEN_ERROR_NOTIFICATION | 0x03 ,"Error from DBus"), + ERR_ENTRY("NOTIFICATION_ERROR_NOT_EXIST_ID",TIZEN_ERROR_NOTIFICATION | 0x04 ,"Not exist private ID "), + ERR_ENTRY("NOTIFICATION_ERROR_SERVICE_NOT_READY",TIZEN_ERROR_NOTIFICATION | 0x05 ,"No reponse from notification service"), +#endif + +#if defined (TIZEN_ERROR_PACKAGE_MANAGER) + ERR_ENTRY("PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE",TIZEN_ERROR_PACKAGE_MANAGER | 0x71 ,"No such package"), + ERR_ENTRY("PACKAGE_MANAGER_ERROR_SYSTEM_ERROR",TIZEN_ERROR_PACKAGE_MANAGER | 0x72 ,"Severe system error "), +#endif + +#if defined (TIZEN_ERROR_SHORTCUT) + ERR_ENTRY("SHORTCUT_ERROR_NO_SPACE", TIZEN_ERROR_SHORTCUT | 0x0001 ,"There is no space to add a new shortcut"), + ERR_ENTRY("SHORTCUT_ERROR_EXIST", TIZEN_ERROR_SHORTCUT | 0x0002,"Shortcut is already added"), + ERR_ENTRY("SHORTCUT_ERROR_FAULT", TIZEN_ERROR_SHORTCUT | 0x0004, "Failed to add a shortcut. Unrecoverable error"), + ERR_ENTRY("SHORTCUT_ERROR_COMM", TIZEN_ERROR_SHORTCUT | 0x0040 ,"Connection is not established. or there is a problem in the communication"), +#endif +#if defined (TIZEN_ERROR_UI_GADGET) +#endif +#if defined (TIZEN_ERROR_BUNDLE) + ERR_ENTRY("BUNDLE_ERROR_KEY_EXISTS", TIZEN_ERROR_BUNDLE | 0x01 ,"Key exists"), +#endif +#if defined (TIZEN_ERROR_DATA_CONTROL) + ERR_ENTRY("DATA_CONTROL_ERROR_MAX_EXCEEDED",TIZEN_ERROR_DATA_CONTROL | 0x01 ,"Too long argument"), +#endif +#if defined (TIZEN_ERROR_SERVICE_APPLICATION) +#endif +#if defined (TIZEN_ERROR_UTILITY_ICU) + ERR_ENTRY("I18N_ERROR_MISSING_RESOURCE", TIZEN_ERROR_UTILITY_ICU | 0x01 ,"The requested resource cannot be found"), + ERR_ENTRY("I18N_ERROR_INVALID_FORMAT", TIZEN_ERROR_UTILITY_ICU | 0x02 ,"Data format is not what is expected "), + ERR_ENTRY("I18N_ERROR_FILE_ACCESS", TIZEN_ERROR_UTILITY_ICU | 0x03 ,"The requested file cannot be found"), + ERR_ENTRY("I18N_ERROR_INTERNAL_PROGRAM", TIZEN_ERROR_UTILITY_ICU | 0x04 ,"Indicates a bug in the library code"), + ERR_ENTRY("I18N_ERROR_INDEX_OUTOFBOUNDS", TIZEN_ERROR_UTILITY_ICU | 0x05 ,"Trying to access the index that is out of bounds"), + ERR_ENTRY("I18N_ERROR_INVALID_CHAR_FOUND", TIZEN_ERROR_UTILITY_ICU | 0x6 ,"Character conversion: Unmappable input sequence. In other APIs: Invalid character"), + ERR_ENTRY("I18N_ERROR_BUFFER_OVERFLOW", TIZEN_ERROR_UTILITY_ICU | 0x07 ,"A result would not fit in the supplied buffer"), + ERR_ENTRY("I18N_ERROR_COLLATOR_VERSION_MISMATCH", TIZEN_ERROR_UTILITY_ICU | 0x08 ,"Collator version is not compatible with the base version"), + ERR_ENTRY("I18N_ERROR_USELESS_COLLATOR", TIZEN_ERROR_UTILITY_ICU | 0x09 ,"Collator is options only and no base is specified"), + ERR_ENTRY("I18N_ERROR_NO_WRITE_PERMISSION", TIZEN_ERROR_UTILITY_ICU | 0x0A ,"Attempt to modify read-only or constant data"), + ERR_ENTRY("I18N_ERROR_RESOURCE_TYPE_MISMATCH", TIZEN_ERROR_UTILITY_ICU | 0x0B ,"An operation is requested over a resource that does not support it"), + ERR_ENTRY("I18N_ERROR_TOO_MANY_ALIASES", TIZEN_ERROR_UTILITY_ICU | 0x0C ,"Too many aliases in the path to the requested resource"), +#endif +#if defined (TIZEN_ERROR_MIME_TYPE) +#endif +#if defined (TIZEN_ERROR_MEDIA_CONTENT) + ERR_ENTRY("MEDIA_CONTENT_ERROR_DB_FAILED", TIZEN_ERROR_MEDIA_CONTENT | 0x01 ,"DB operation failed "), + ERR_ENTRY("MEDIA_CONTENT_ERROR_DB_BUSY", TIZEN_ERROR_MEDIA_CONTENT | 0x02 ,"DB operation BUSY"), + ERR_ENTRY("MEDIA_CONTENT_ERROR_NETWORK", TIZEN_ERROR_MEDIA_CONTENT | 0x03 ,"Network Fail"), + ERR_ENTRY("MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT", TIZEN_ERROR_MEDIA_CONTENT | 0x04 ,"Unsupported content "), +#endif +#if defined (TIZEN_ERROR_EMAIL_SERVICE) + ERR_ENTRY("EMAILS_ERROR_SERVER_NOT_READY", TIZEN_ERROR_EMAIL_SERVICE | 0x200 ,"Server not ready"), + ERR_ENTRY("EMAILS_ERROR_COMMUNICATION_WITH_SERVER_FAILED", TIZEN_ERROR_EMAIL_SERVICE | 0x201 ,"Communication with server failed"), + ERR_ENTRY("EMAILS_ERROR_OPERATION_FAILED", TIZEN_ERROR_EMAIL_SERVICE | 0x202 ,"Operation failed"), + ERR_ENTRY("EMAILS_ERROR_ACCOUNT_NOT_FOUND", TIZEN_ERROR_EMAIL_SERVICE | 0x203 ,"Email account not found"), + ERR_ENTRY("EMAILS_ERROR_DB_FAILED", TIZEN_ERROR_EMAIL_SERVICE | 0x204 ,"Email database failed"), +#endif +#if defined (TIZEN_ERROR_MESSAGING_SERVICE) + ERR_ENTRY("MESSAGES_ERROR_SERVER_NOT_READY", TIZEN_ERROR_MESSAGING_SERVICE | 0x501 ,"Server is not read"), + ERR_ENTRY("MESSAGES_ERROR_COMMUNICATION_WITH_SERVER_FAILED", TIZEN_ERROR_MESSAGING_SERVICE | 0x502 ,"Communication with server failed"), + ERR_ENTRY("MESSAGES_ERROR_OUT_OF_RANGE", TIZEN_ERROR_MESSAGING_SERVICE | 0x503 ,"Index out of range"), + ERR_ENTRY("MESSAGES_ERROR_SENDING_FAILED", TIZEN_ERROR_MESSAGING_SERVICE | 0x504 ,"Sending a message failed"), + ERR_ENTRY("MESSAGES_ERROR_OPERATION_FAILED", TIZEN_ERROR_MESSAGING_SERVICE | 0x505 ,"Messaging operation failed"), + ERR_ENTRY("MESSAGES_ERROR_NO_SIM_CARD", TIZEN_ERROR_MESSAGING_SERVICE | 0x506 ,"No SIM Card"), + ERR_ENTRY("MESSAGES_ERROR_NO_DATA", TIZEN_ERROR_MESSAGING_SERVICE | 0x507 ,"No data available"), +#endif +#if defined (TIZEN_ERROR_PUSH) +#endif +#if defined (TIZEN_ERROR_AUDIO_IO) + ERR_ENTRY("AUDIO_IO_ERROR_DEVICE_NOT_OPENED", TIZEN_ERROR_AUDIO_IO | 0x01 ,"Device open error"), + ERR_ENTRY("AUDIO_IO_ERROR_DEVICE_NOT_CLOSED", TIZEN_ERROR_AUDIO_IO | 0x02 ,"Device close error"), + ERR_ENTRY("AUDIO_IO_ERROR_INVALID_BUFFER", TIZEN_ERROR_AUDIO_IO | 0x03 ,"Invalid buffer pointer"), + ERR_ENTRY("AUDIO_IO_ERROR_SOUND_POLICY", TIZEN_ERROR_AUDIO_IO | 0x04 ,"Sound policy error"), +#endif +#if defined (TIZEN_ERROR_CAMERA) + ERR_ENTRY("CAMERA_ERROR_INVALID_STATE", TIZEN_ERROR_CAMERA | 0x02 ,"Invalid state"), + ERR_ENTRY("CAMERA_ERROR_DEVICE", TIZEN_ERROR_CAMERA | 0x04 ,"Device error"), + ERR_ENTRY("CAMERA_ERROR_SOUND_POLICY", TIZEN_ERROR_CAMERA | 0x06 ,"Blocked by Audio Session Manager"), + ERR_ENTRY("CAMERA_ERROR_SECURITY_RESTRICTED", TIZEN_ERROR_CAMERA | 0x07 ,"Restricted by security system policy"), + ERR_ENTRY("CAMERA_ERROR_DEVICE_BUSY", TIZEN_ERROR_CAMERA | 0x08 ,"The device is using another application or working on some operation"), + ERR_ENTRY("CAMERA_ERROR_DEVICE_NOT_FOUND", TIZEN_ERROR_CAMERA | 0x09 ,"No camera device "), + ERR_ENTRY("CAMERA_ERROR_SOUND_POLICY_BY_CALL", TIZEN_ERROR_CAMERA | 0x0a ,"Blocked by Audio Session Manager - CALL"), + ERR_ENTRY("CAMERA_ERROR_SOUND_POLICY_BY_ALARM", TIZEN_ERROR_CAMERA | 0x0b ,"Blocked by Audio Session Manager - ALARM"), + ERR_ENTRY("CAMERA_ERROR_ESD", TIZEN_ERROR_CAMERA | 0x0c ,"ESD situation"), +#endif +#if defined (TIZEN_ERROR_IMAGE_UTIL) + ERR_ENTRY("IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT", TIZEN_ERROR_IMAGE_UTIL | 0x01 ,"Not supported format"), +#endif +#if defined (TIZEN_ERROR_METADATA_EXTRACTOR) + ERR_ENTRY("METADATA_EXTRACTOR_ERROR_OPERATION_FAILED", TIZEN_ERROR_METADATA_EXTRACTOR | 0x01 ,"Invalid internal operation"), +#endif +#if defined (TIZEN_ERROR_PLAYER) + ERR_ENTRY("PLAYER_ERROR_SEEK_FAILED", TIZEN_ERROR_PLAYER | 0x21 ,"Seek operation failure"), + ERR_ENTRY("PLAYER_ERROR_INVALID_STATE", TIZEN_ERROR_PLAYER | 0x22 ,"Invalid state"), + ERR_ENTRY("PLAYER_ERROR_NOT_SUPPORTED_FILE", TIZEN_ERROR_PLAYER | 0x23 ,"File format not supported"), + ERR_ENTRY("PLAYER_ERROR_INVALID_URI", TIZEN_ERROR_PLAYER | 0x24 ,"Invalid URI"), + ERR_ENTRY("PLAYER_ERROR_SOUND_POLICY", TIZEN_ERROR_PLAYER | 0x25 ,"Sound policy error "), + ERR_ENTRY("PLAYER_ERROR_CONNECTION_FAILED", TIZEN_ERROR_PLAYER | 0x26 ,"Streaming connection failed"), + ERR_ENTRY("PLAYER_ERROR_VIDEO_CAPTURE_FAILED", TIZEN_ERROR_PLAYER | 0x27 ,"Video capture failed"), + ERR_ENTRY("PLAYER_ERROR_DRM_EXPIRED", TIZEN_ERROR_PLAYER | 0x28 ,"Expired license"), + ERR_ENTRY("PLAYER_ERROR_DRM_NO_LICENSE", TIZEN_ERROR_PLAYER | 0x29 ,"No license "), + ERR_ENTRY("PLAYER_ERROR_DRM_FUTURE_USE", TIZEN_ERROR_PLAYER | 0x2a ,"License for future use"), + ERR_ENTRY("PLAYER_ERROR_DRM_NOT_PERMITTED", TIZEN_ERROR_PLAYER | 0x2b ,"Format not permitted"), + ERR_ENTRY("PLAYER_ERROR_RESOURCE_LIMIT", TIZEN_ERROR_PLAYER | 0x2c ,"Resource limit"), +#endif +#if defined (TIZEN_ERROR_RECORDER) + ERR_ENTRY("RECORDER_ERROR_INVALID_STATE", TIZEN_ERROR_RECORDER | 0x02 ,"Invalid state"), + ERR_ENTRY("RECORDER_ERROR_DEVICE", TIZEN_ERROR_RECORDER | 0x04 ,"Device error "), + ERR_ENTRY("RECORDER_ERROR_SOUND_POLICY", TIZEN_ERROR_RECORDER | 0x06 ,"Blocked by Audio Session Manager"), + ERR_ENTRY("RECORDER_ERROR_SECURITY_RESTRICTED", TIZEN_ERROR_RECORDER | 0x07 ,"Restricted by security system policy"), + ERR_ENTRY("RECORDER_ERROR_SOUND_POLICY_BY_CALL", TIZEN_ERROR_RECORDER | 0x08 ,"Blocked by Audio Session Manager - CALL"), + ERR_ENTRY("RECORDER_ERROR_SOUND_POLICY_BY_ALARM", TIZEN_ERROR_RECORDER | 0x09 ,"Blocked by Audio Session Manager - ALARM"), + ERR_ENTRY("RECORDER_ERROR_ESD", TIZEN_ERROR_RECORDER | 0x0a ,"ESD situation"), + ERR_ENTRY("RECORDER_ERROR_OUT_OF_STORAGE", TIZEN_ERROR_RECORDER | 0x0b ,"Out of storage"), +#endif +#if defined (TIZEN_ERROR_SOUND_MANAGER) + + ERR_ENTRY("SOUND_MANAGER_ERROR_INTERNAL", TIZEN_ERROR_SOUND_MANAGER | 0x01 ,"Internal error inside the sound system"), + ERR_ENTRY("SOUND_MANAGER_ERROR_POLICY", TIZEN_ERROR_SOUND_MANAGER | 0x02 ,"Noncompliance with the sound system policy"), + ERR_ENTRY("SOUND_MANAGER_ERROR_NO_PLAYING_SOUND", TIZEN_ERROR_SOUND_MANAGER | 0x03 ,"No playing sound"), +#endif +#if defined (TIZEN_ERROR_TONE_PLAYER) +#endif +#if defined (TIZEN_ERROR_VIDEO_UTIL) + ERR_ENTRY("VIDEO_UTIL_ERROR_NOT_SUPPORTED_FORMAT",TIZEN_ERROR_VIDEO_UTIL | 0x01 ,"Not supported format"), +#endif +#if defined (TIZEN_ERROR_WAV_PLAYER) + ERR_ENTRY("WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED", TIZEN_ERROR_WAV_PLAYER | 0x01 ,"Format not supported"), +#endif +#if defined (TIZEN_ERROR_RADIO) + ERR_ENTRY("RADIO_ERROR_INVALID_STATE", TIZEN_ERROR_RADIO | 0x01 ,"Invalid state"), + ERR_ENTRY("RADIO_ERROR_SOUND_POLICY", TIZEN_ERROR_RADIO | 0x02 ,"Sound policy error"), +#endif +#if defined (TIZEN_ERROR_MEDIACODEC) + ERR_ENTRY("MEDIACODEC_ERROR_INVALID_STATE", TIZEN_ERROR_MEDIACODEC | 0x01 ,"Invalid state"), + ERR_ENTRY("MEDIACODEC_ERROR_INVALID_INBUFFER", TIZEN_ERROR_MEDIACODEC | 0x02 ,"Invalid input buffer"), + ERR_ENTRY("MEDIACODEC_ERROR_INVALID_OUTBUFFER", TIZEN_ERROR_MEDIACODEC | 0x03 ,"Invalid state"), + ERR_ENTRY("MEDIACODEC_ERROR_INTERNAL", TIZEN_ERROR_MEDIACODEC | 0x04 ,"Invalid output buffer"), + ERR_ENTRY("MEDIACODEC_ERROR_NOT_INITIALIZED", TIZEN_ERROR_MEDIACODEC | 0x05 ,"Internal error"), + ERR_ENTRY("MEDIACODEC_ERROR_INVALID_STREAM", TIZEN_ERROR_MEDIACODEC | 0x06 ,"Not initialized mediacodec"), + ERR_ENTRY("MEDIACODEC_ERROR_CODEC_NOT_FOUND", TIZEN_ERROR_MEDIACODEC | 0x07 ,"Not supported format"), + ERR_ENTRY("MEDIACODEC_ERROR_DECODE", TIZEN_ERROR_MEDIACODEC | 0x08 ,"Error while decoding data"), + ERR_ENTRY("MEDIACODEC_ERROR_NO_FREE_SPACE", TIZEN_ERROR_MEDIACODEC | 0x09 ,"Out of storage"), + ERR_ENTRY("MEDIACODEC_ERROR_STREAM_NOT_FOUND", TIZEN_ERROR_MEDIACODEC | 0x0a ,"Cannot find stream"), + ERR_ENTRY("MEDIACODEC_ERROR_NOT_SUPPORTED_FORMAT", TIZEN_ERROR_MEDIACODEC | 0x0b ,"Not supported format "), + ERR_ENTRY("MEDIACODEC_ERROR_BUFFER_NOT_AVAILABLE", TIZEN_ERROR_MEDIACODEC | 0x0c ,"Not available buffer"), +#endif +#if defined (TIZEN_ERROR_BLUETOOTH) + ERR_ENTRY("BT_ERROR_NOT_ENABLED", TIZEN_ERROR_BLUETOOTH | 0x0102 ,"Local adapter not enabled"), + ERR_ENTRY("BT_ERROR_ALREADY_DONE", TIZEN_ERROR_BLUETOOTH | 0x0103 ,"Operation already done"), + ERR_ENTRY("BT_ERROR_OPERATION_FAILED", TIZEN_ERROR_BLUETOOTH | 0x0104 ,"Operation failed"), + ERR_ENTRY("BT_ERROR_NOT_IN_PROGRESS", TIZEN_ERROR_BLUETOOTH | 0x0105 ,"Operation not in progress"), + ERR_ENTRY("BT_ERROR_REMOTE_DEVICE_NOT_BONDED", TIZEN_ERROR_BLUETOOTH | 0x0106 ,"Remote device not bonde"), + ERR_ENTRY("BT_ERROR_AUTH_REJECTED", TIZEN_ERROR_BLUETOOTH | 0x0107 ,"Authentication rejected"), + ERR_ENTRY("BT_ERROR_AUTH_FAILED", TIZEN_ERROR_BLUETOOTH | 0x0108 ,"Authentication failed"), + ERR_ENTRY("BT_ERROR_REMOTE_DEVICE_NOT_FOUND", TIZEN_ERROR_BLUETOOTH | 0x0109 ,"Remote device not found "), + ERR_ENTRY("BT_ERROR_SERVICE_SEARCH_FAILED", TIZEN_ERROR_BLUETOOTH | 0x010A ,"Service search failed"), + ERR_ENTRY("BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED", TIZEN_ERROR_BLUETOOTH | 0x010B ,"Remote device is not connected"), + ERR_ENTRY("BT_ERROR_AGAIN", TIZEN_ERROR_BLUETOOTH | 0x010C ,"Resource temporarily unavailable "), + ERR_ENTRY("BT_ERROR_SERVICE_NOT_FOUND", TIZEN_ERROR_BLUETOOTH | 0x010D ,"Service not found"), +#endif +#if defined (TIZEN_ERROR_CONNECTION) + ERR_ENTRY("CONNECTION_ERROR_OPERATION_FAILED",TIZEN_ERROR_CONNECTION|0x0401 ,"Operation failed"), + ERR_ENTRY("CONNECTION_ERROR_ITERATOR_END",TIZEN_ERROR_CONNECTION|0x0402 ,"End of iteration"), + ERR_ENTRY("CONNECTION_ERROR_NO_CONNECTION",TIZEN_ERROR_CONNECTION|0x0403 ,"There is no connection"), + ERR_ENTRY("CONNECTION_ERROR_ALREADY_EXISTS",TIZEN_ERROR_CONNECTION|0x0404 ,"Already exists"), + ERR_ENTRY("CONNECTION_ERROR_OPERATION_ABORTED",TIZEN_ERROR_CONNECTION|0x0405 ,"Operation is aborted"), + ERR_ENTRY("CONNECTION_ERROR_DHCP_FAILED",TIZEN_ERROR_CONNECTION|0x0406, "DHCP failed"), + ERR_ENTRY("CONNECTION_ERROR_INVALID_KEY",TIZEN_ERROR_CONNECTION|0x0407,"Invalid key"), + ERR_ENTRY("CONNECTION_ERROR_NO_REPLY",TIZEN_ERROR_CONNECTION|0x0408,"No reply"), +#endif +#if defined (TIZEN_ERROR_NFC) + ERR_ENTRY("NFC_ERROR_OPERATION_FAILED",TIZEN_ERROR_NFC|0x01 ,"Operation failed"), + ERR_ENTRY("NFC_ERROR_INVALID_NDEF_MESSAGE",TIZEN_ERROR_NFC|0x02 ,"Invalid NDEF message"), + ERR_ENTRY("NFC_ERROR_INVALID_RECORD_TYPE",TIZEN_ERROR_NFC|0x03 ,"Invalid record type"), + ERR_ENTRY("NFC_ERROR_NO_DEVICE",TIZEN_ERROR_NFC|0x04 ,"No device"), + ERR_ENTRY("NFC_ERROR_NOT_ACTIVATED",TIZEN_ERROR_NFC|0x05 ,"NFC is not activated"), + ERR_ENTRY("NFC_ERROR_ALREADY_ACTIVATED",TIZEN_ERROR_NFC|0x06 ,"Already activated"), + ERR_ENTRY("NFC_ERROR_ALREADY_DEACTIVATED",TIZEN_ERROR_NFC|0x07 ,"Already deactivated"), + ERR_ENTRY("NFC_ERROR_READ_ONLY_NDEF",TIZEN_ERROR_NFC|0x08 ,"Read only tag"), + ERR_ENTRY("NFC_ERROR_NO_SPACE_ON_NDEF",TIZEN_ERROR_NFC|0x09 ,"No enough space on tag"), + ERR_ENTRY("NFC_ERROR_NO_NDEF_MESSAGE",TIZEN_ERROR_NFC|0x0a ,"No NDEF Message on Tag"), + ERR_ENTRY("NFC_ERROR_NOT_NDEF_FORMAT",TIZEN_ERROR_NFC|0x0b ,"Not NDEF format Tag "), + ERR_ENTRY("NFC_ERROR_SECURITY_RESTRICTED",TIZEN_ERROR_NFC|0x0c ,"Restricted by access control"), + ERR_ENTRY("NFC_ERROR_ILLEGAL_STATE",TIZEN_ERROR_NFC|0x0d ,"The state is wrong"), + ERR_ENTRY("NFC_ERROR_NOT_INITIALIZED",TIZEN_ERROR_NFC|0x0e ,"NFC is not initialized"), + ERR_ENTRY("NFC_ERROR_TAG_NOT_SUPPORTED",TIZEN_ERROR_NFC|0x0f ,"Tag is not supported"), +#endif +#if defined (TIZEN_ERROR_SERIAL) +#endif +#if defined (TIZEN_ERROR_TETHERING) + ERR_ENTRY("TETHERING_ERROR_NOT_ENABLED",TIZEN_ERROR_TETHERING | 0x0501 ,"Not enabled"), + ERR_ENTRY("TETHERING_ERROR_OPERATION_FAILED",TIZEN_ERROR_TETHERING | 0x0502 ,"Operation failed"), +#endif +#if defined (TIZEN_ERROR_WIFI) + ERR_ENTRY("WIFI_ERROR_OPERATION_FAILED",TIZEN_ERROR_WIFI | 0x0301 ,"Operation failed"), + ERR_ENTRY("WIFI_ERROR_NO_CONNECTION",TIZEN_ERROR_WIFI | 0x0302 ,"There is no connected AP"), + ERR_ENTRY("WIFI_ERROR_ALREADY_EXISTS",TIZEN_ERROR_WIFI | 0x0303 ,"Already exists"), + ERR_ENTRY("WIFI_ERROR_OPERATION_ABORTED",TIZEN_ERROR_WIFI | 0x0304 ,"Operation is aborted "), + ERR_ENTRY("WIFI_ERROR_DHCP_FAILED",TIZEN_ERROR_WIFI | 0x0306 ,"DHCP failed"), + ERR_ENTRY("WIFI_ERROR_INVALID_KEY",TIZEN_ERROR_WIFI | 0x0307 ,"Invalid key"), + ERR_ENTRY("WIFI_ERROR_NO_REPLY",TIZEN_ERROR_WIFI | 0x0308 ,"No reply"), + ERR_ENTRY("WIFI_ERROR_SECURITY_RESTRICTED",TIZEN_ERROR_WIFI | 0x0309 ,"Restricted by security system policy"), +#endif +#if defined (TIZEN_ERROR_WIFI_DIRECT) + ERR_ENTRY("WIFI_DIRECT_ERROR_NOT_INITIALIZED",TIZEN_ERROR_WIFI_DIRECT | 0x01 ,"Not initialized"), + ERR_ENTRY("WIFI_DIRECT_ERROR_COMMUNICATION_FAILED",TIZEN_ERROR_WIFI_DIRECT | 0x02 ,"I/O error"), + ERR_ENTRY("WIFI_DIRECT_ERROR_WIFI_USED",TIZEN_ERROR_WIFI_DIRECT | 0x03 ,"WiFi is being used"), + ERR_ENTRY("WIFI_DIRECT_ERROR_MOBILE_AP_USED",TIZEN_ERROR_WIFI_DIRECT | 0x04 ,"Operation failed"), + ERR_ENTRY("WIFI_DIRECT_ERROR_CONNECTION_FAILED",TIZEN_ERROR_WIFI_DIRECT | 0x05 ,"Mobile AP is being used"), + ERR_ENTRY("WIFI_DIRECT_ERROR_AUTH_FAILED",TIZEN_ERROR_WIFI_DIRECT | 0x06 ,"Authentication failed"), + ERR_ENTRY("WIFI_DIRECT_ERROR_OPERATION_FAILED",TIZEN_ERROR_WIFI_DIRECT | 0x07 ,"Operation failed"), + ERR_ENTRY("WIFI_DIRECT_ERROR_TOO_MANY_CLIENT",TIZEN_ERROR_WIFI_DIRECT | 0x08 ,"Many client"), + ERR_ENTRY("WIFI_DIRECT_ERROR_ALREADY_INITIALIZED",TIZEN_ERROR_WIFI_DIRECT | 0x09 ,"Already initialized client"), + ERR_ENTRY("WIFI_DIRECT_ERROR_CONNECTION_CANCELED",TIZEN_ERROR_WIFI_DIRECT | 0x10 ,"Connection canceled by local device"), +#endif +#if defined (TIZEN_ERROR_PRIVACY_MANAGER) +#endif +#if defined (TIZEN_ERROR_KEY_MANAGER) + ERR_ENTRY("CKMC_ERROR_SOCKET",TIZEN_ERROR_KEY_MANAGER | 0x01 ,"Socket error between client and Central Key Manager"), + ERR_ENTRY("CKMC_ERROR_BAD_REQUEST",TIZEN_ERROR_KEY_MANAGER | 0x02 ,"Invalid request from client "), + ERR_ENTRY("CKMC_ERROR_BAD_RESPONSE",TIZEN_ERROR_KEY_MANAGER | 0x03 ,"Invalid response from Central Key Manager"), + ERR_ENTRY("CKMC_ERROR_SEND_FAILED",TIZEN_ERROR_KEY_MANAGER | 0x04 ,"Transmitting request failed"), + ERR_ENTRY("CKMC_ERROR_RECV_FAILED",TIZEN_ERROR_KEY_MANAGER | 0x05 ,"Receiving response failed"), + ERR_ENTRY("CKMC_ERROR_AUTHENTICATION_FAILED",TIZEN_ERROR_KEY_MANAGER | 0x06 ,"Authentication between client and manager failed"), + ERR_ENTRY("CKMC_ERROR_BUFFER_TOO_SMALL",TIZEN_ERROR_KEY_MANAGER | 0x07 ,"The output buffer size which is passed as parameter is too small"), + ERR_ENTRY("CKMC_ERROR_SERVER_ERROR",TIZEN_ERROR_KEY_MANAGER | 0x08 ,"Central Key Manager has been failed for some reason"), + ERR_ENTRY("CKMC_ERROR_DB_LOCKED",TIZEN_ERROR_KEY_MANAGER | 0x09 ,"The database was not unlocked - user did not login"), + ERR_ENTRY("CKMC_ERROR_DB_ERROR",TIZEN_ERROR_KEY_MANAGER | 0x0A ,"An internal error inside the database"), + ERR_ENTRY("CKMC_ERROR_DB_ALIAS_EXISTS",TIZEN_ERROR_KEY_MANAGER | 0x0B ,"Provided alias already exists in the database"), + ERR_ENTRY("CKMC_ERROR_DB_ALIAS_UNKNOWN",TIZEN_ERROR_KEY_MANAGER | 0x0C ,"No data for given alias"), + ERR_ENTRY("CKMC_ERROR_VERIFICATION_FAILED",TIZEN_ERROR_KEY_MANAGER | 0x0D ,"CA certificate(s) were unknown and chain could not be created"), + ERR_ENTRY("CKMC_ERROR_INVALID_FORMAT",TIZEN_ERROR_KEY_MANAGER | 0x0E ,"A provided file doesn't exists or cannot be accessed in the file system"), + ERR_ENTRY("CKMC_ERROR_FILE_ACCESS_DENIED",TIZEN_ERROR_KEY_MANAGER | 0x0F ,"A provided file or binary has not a valid format"), + ERR_ENTRY("CKMC_ERROR_NOT_EXPORTABLE",TIZEN_ERROR_KEY_MANAGER | 0x10 ,"Key is not exportable. It could not be returned to client"), + ERR_ENTRY("CKMC_ERROR_UNKNOWN",TIZEN_ERROR_KEY_MANAGER | 0xFF ,"The error with unknown reason"), +#endif +#if defined (TIZEN_ERROR_PRIVILEGE_INFORMATION) +#endif +#if defined (TIZEN_ERROR_CALENDAR) + ERR_ENTRY("CALENDAR_ERROR_DB_FAILED",TIZEN_ERROR_CALENDAR | 0x02 ,"No access to the database"), + ERR_ENTRY("CALENDAR_ERROR_ITERATOR_END",TIZEN_ERROR_CALENDAR | 0x04 ,"Iterator is on the last position"), + ERR_ENTRY("CALENDAR_ERROR_DB_RECORD_NOT_FOUND",TIZEN_ERROR_CALENDAR | 0x05 ,"Database not found"), + ERR_ENTRY("CALENDAR_ERROR_IPC",TIZEN_ERROR_CALENDAR | 0xBF ,"Unknown IPC error"), + ERR_ENTRY("CALENDAR_ERROR_SYSTEM",TIZEN_ERROR_CALENDAR | 0xEF ,"Error from another modules"), +#endif +#if defined (TIZEN_ERROR_CONTACTS) + ERR_ENTRY("CONTACTS_ERROR_DB_LOCKED",TIZEN_ERROR_CONTACTS | 0x81 ,"Database table locked or file locked"), + ERR_ENTRY("CONTACTS_ERROR_DB",TIZEN_ERROR_CONTACTS | 0x9F ,"Unknown DB error"), + ERR_ENTRY("CONTACTS_ERROR_IPC_NOT_AVALIABLE",TIZEN_ERROR_CONTACTS | 0xB1 ,"IPC server is not available"), + ERR_ENTRY("CONTACTS_ERROR_IPC",TIZEN_ERROR_CONTACTS | 0xBF ,"Unknown IPC error"), + ERR_ENTRY("CONTACTS_ERROR_SYSTEM",TIZEN_ERROR_CONTACTS | 0xEF ,"Internal system module error"), + ERR_ENTRY("CONTACTS_ERROR_INTERNAL",TIZEN_ERROR_CONTACTS | 0xFF ,"Implementation Error, Temporary Use"), +#endif +#if defined (TIZEN_ERROR_STORAGE)//issue : TIZEN_ERROR_SYSTEM_CLASS + ERR_ENTRY("STORAGE_ERROR_OPERATION_FAILED",TIZEN_ERROR_STORAGE | 0x12 ,"Operation failed"), +#endif +#if defined (TIZEN_ERROR_VCONF) +#endif +#if defined (TIZEN_ERROR_DEVICE) + ERR_ENTRY("DEVICE_ERROR_NOT_INITIALIZED",TIZEN_ERROR_DEVICE | 0x13 ,"Not initialized"), +#endif +#if defined (TIZEN_ERROR_DLOG) +#endif +#if defined (TIZEN_ERROR_MEDIA_KEY) + ERR_ENTRY("MEDIA_KEY_ERROR_OPERATION_FAILED",TIZEN_ERROR_MEDIA_KEY | 0x01 ,"Reserve/Release failed"), +#endif +#if defined (TIZEN_ERROR_RUNTIME_INFORMATION) +#endif +#if defined (TIZEN_ERROR_SENSOR) + ERR_ENTRY("SENSOR_ERROR_NOT_NEED_CALIBRATION",TIZEN_ERROR_SENSOR | 0x03 ,"Sensor doesn't need calibration"), + ERR_ENTRY("SENSOR_ERROR_OPERATION_FAILED",TIZEN_ERROR_SENSOR | 0x06 ,"Operation failed"), +#endif +#if defined (TIZEN_ERROR_SYSTEM_INFORMATION) +#endif +#if defined (TIZEN_ERROR_SYSTEM_SETTING) + ERR_ENTRY("SYSTEM_SETTINGS_ERROR_LOCKSCREEN_APP_PASSWORD_MODE",TIZEN_ERROR_SYSTEM_SETTING | 0x01 ,"Current lock screen app set 'password' type"), +#endif +#if defined (TIZEN_ERROR_SYSTEM_RESOURCE) +#endif +#if defined (TIZEN_ERROR_CONTEXT) + ERR_ENTRY("ACTIVITY_ERROR_ALREADY_STARTED",TIZEN_ERROR_CONTEXT | 0x01 ,"Recognition is already started"), + ERR_ENTRY("ACTIVITY_ERROR_NOT_STARTED",TIZEN_ERROR_CONTEXT | 0x02 ,"Recognition is not started"), + ERR_ENTRY("ACTIVITY_ERROR_OPERATION_FAILED",TIZEN_ERROR_CONTEXT | 0x04 ,"Operation failed because of a system error"), +#endif +#if defined (TIZEN_ERROR_TELEPHONY) + ERR_ENTRY("TELEPHONY_ERROR_OPERATION_FAILED",TIZEN_ERROR_TELEPHONY | 0x0001 ,"Operation failed"), + ERR_ENTRY("TELEPHONY_ERROR_SIM_NOT_AVAILABLE",TIZEN_ERROR_TELEPHONY | 0x1001 ,"SIM is not available"), +#endif +#if defined (TIZEN_ERROR_EFL_UTIL) + ERR_ENTRY("EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE",TIZEN_ERROR_EFL_UTIL | 0x1001 ,"Window type not supported"), +#endif +#if defined (TIZEN_ERROR_UTILX) +#endif +#if defined (TIZEN_ERROR_NATIVE_BUFFER) +#endif +#if defined (TIZEN_ERROR_TBM) +#endif +#if defined (TIZEN_ERROR_DOWNLOAD) + ERR_ENTRY("DOWNLOAD_ERROR_INVALID_STATE",TIZEN_ERROR_DOWNLOAD | 0x21 ,"Invalid state"), + ERR_ENTRY("DOWNLOAD_ERROR_CONNECTION_FAILED",TIZEN_ERROR_DOWNLOAD | 0x22 ,"Connection failed"), + ERR_ENTRY("DOWNLOAD_ERROR_INVALID_URL",TIZEN_ERROR_DOWNLOAD | 0x24 ,"Invalid URL"), + ERR_ENTRY("DOWNLOAD_ERROR_INVALID_DESTINATION",TIZEN_ERROR_DOWNLOAD | 0x25 ,"Invalid destination"), + ERR_ENTRY("DOWNLOAD_ERROR_TOO_MANY_DOWNLOADS",TIZEN_ERROR_DOWNLOAD | 0x26 ,"Too many simultaneous downloads"), + ERR_ENTRY("DOWNLOAD_ERROR_QUEUE_FULL",TIZEN_ERROR_DOWNLOAD | 0x27 ,"Download server queue is full"), + ERR_ENTRY("DOWNLOAD_ERROR_ALREADY_COMPLETED",TIZEN_ERROR_DOWNLOAD | 0x28 ,"The download is already completed"), + ERR_ENTRY("DOWNLOAD_ERROR_FILE_ALREADY_EXISTS",TIZEN_ERROR_DOWNLOAD | 0x29 ,"Failed to rename the downloaded file"), + ERR_ENTRY("DOWNLOAD_ERROR_CANNOT_RESUME",TIZEN_ERROR_DOWNLOAD | 0x2a ,"Cannot resume"), + ERR_ENTRY("DOWNLOAD_ERROR_FIELD_NOT_FOUND",TIZEN_ERROR_DOWNLOAD | 0x2b ,"Specified field not found"), + ERR_ENTRY("DOWNLOAD_ERROR_TOO_MANY_REDIRECTS",TIZEN_ERROR_DOWNLOAD | 0x30 ,"Too many redirects from HTTP response header"), + ERR_ENTRY("DOWNLOAD_ERROR_UNHANDLED_HTTP_CODE",TIZEN_ERROR_DOWNLOAD | 0x31 ,"The download cannot handle the HTTP status value"), + ERR_ENTRY("DOWNLOAD_ERROR_REQUEST_TIMEOUT",TIZEN_ERROR_DOWNLOAD | 0x32 ,"No action after client creates a download ID"), + ERR_ENTRY("DOWNLOAD_ERROR_RESPONSE_TIMEOUT",TIZEN_ERROR_DOWNLOAD | 0x33 ,"No call to start API for some time although the download is created"), + ERR_ENTRY("DOWNLOAD_ERROR_SYSTEM_DOWN",TIZEN_ERROR_DOWNLOAD | 0x34 ,"No response from client after rebooting download daemon"), + ERR_ENTRY("DOWNLOAD_ERROR_ID_NOT_FOUND",TIZEN_ERROR_DOWNLOAD | 0x35 ,"Download ID does not exist in download service module"), + ERR_ENTRY("DOWNLOAD_ERROR_INVALID_NETWORK_TYPE",TIZEN_ERROR_DOWNLOAD | 0x36 ,"Network bonding is set but network type is not set as DOWNLOAD_NETWORK_ALL"), +#endif +#if defined (TIZEN_ERROR_WEBVIEW) +#endif +#if defined (TIZEN_ERROR_LOCATION_MANAGER) + ERR_ENTRY("LOCATIONS_ERROR_INCORRECT_METHOD",TIZEN_ERROR_LOCATION_MANAGER | 0x01 ,"Location manager contains incorrect method for a given call"), + ERR_ENTRY("LOCATIONS_ERROR_NETWORK_FAILED",TIZEN_ERROR_LOCATION_MANAGER | 0x02 ,"Network unavailable"), + ERR_ENTRY("LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE",TIZEN_ERROR_LOCATION_MANAGER | 0x03,"Location service is not available"), + ERR_ENTRY("LOCATIONS_ERROR_GPS_SETTING_OFF",TIZEN_ERROR_LOCATION_MANAGER | 0x04 ,"GPS/WPS setting is not enabled"), + ERR_ENTRY("LOCATIONS_ERROR_SECURITY_RESTRICTED",TIZEN_ERROR_LOCATION_MANAGER | 0x05 ,"Restricted by security system policy"), +#endif +#if defined (TIZEN_ERROR_STT) + ERR_ENTRY("STT_ERROR_INVALID_STATE",TIZEN_ERROR_STT | 0x01 ,"Invalid state"), + ERR_ENTRY("STT_ERROR_INVALID_LANGUAGE",TIZEN_ERROR_STT | 0x02 ,"Invalid language"), + ERR_ENTRY("STT_ERROR_ENGINE_NOT_FOUND",TIZEN_ERROR_STT | 0x03 ,"No available engine"), + ERR_ENTRY("STT_ERROR_OPERATION_FAILED",TIZEN_ERROR_STT | 0x04 ,"Operation failed"), + ERR_ENTRY("STT_ERROR_NOT_SUPPORTED_FEATURE",TIZEN_ERROR_STT | 0x05 ,"Not supported feature of current engine"), +#endif +#if defined (TIZEN_ERROR_TTS) + ERR_ENTRY("TTS_ERROR_INVALID_STATE",TIZEN_ERROR_TTS | 0x01 ,"Invalid state"), + ERR_ENTRY("TTS_ERROR_INVALID_VOICE",TIZEN_ERROR_TTS | 0x02 ,"Invalid voice"), + ERR_ENTRY("TTS_ERROR_ENGINE_NOT_FOUND",TIZEN_ERROR_TTS | 0x03 ,"No available engine"), + ERR_ENTRY("TTS_ERROR_OPERATION_FAILED",TIZEN_ERROR_TTS | 0x04 ,"Operation failed"), + ERR_ENTRY("TTS_ERROR_AUDIO_POLICY_BLOCKED",TIZEN_ERROR_TTS | 0x05 ,"Audio policy blocked"), +#endif + {0,NULL,NULL} +}; + +static __thread int tizen_last_error = TIZEN_ERROR_NONE; + +int get_last_result(void) +{ + return tizen_last_error; +} + +void set_last_result(int err) +{ + tizen_last_error = err; +} + +char* _get_error_message(int err_code) +{ + char* msg = NULL; + int i,arry_cnt; + arry_cnt = sizeof(err_list)/sizeof(err_info); + for(i = 0; i < arry_cnt ; i++) + { + if(err_code == err_list[i].value) + { + msg = err_list[i].msg; + break; + } + } + return msg; +} + + +char* get_error_message(int err_code) +{ + static __thread char msg[512]; + char *tmp = NULL; + memset(msg,0x00,sizeof(msg)); + + if( err_code >= TIZEN_ERROR_OWNER_DEAD && err_code < 0) + { + tmp = strerror(~err_code + 1); + if(tmp != NULL) + { + strncpy(msg,tmp,strlen(tmp)); + } + } + else if(err_code >= TIZEN_ERROR_MIN_PLATFORM_ERROR && err_code < TIZEN_ERROR_END_OF_COLLECTION) + { + tmp = _get_error_message(err_code); + if(tmp != NULL) + { + strncpy(msg,tmp,strlen(tmp)); + } + } + else if(err_code >= TIZEN_ERROR_TTS && err_code < -0x009F0000) + { + tmp = _get_error_message(err_code); + if(tmp != NULL) + { + strncpy(msg,tmp,strlen(tmp)); + } + } + else{;} + return msg; +} + |