888c1c9be87ecc266fd4a0d3f8c938620d101d8e
[platform/core/pim/contacts-service.git] / include / contacts_errors.h
1 /*
2  * Contacts Service
3  *
4  * Copyright (c) 2010 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #ifndef __TIZEN_SOCIAL_CONTACTS_ERROR_H__
21 #define __TIZEN_SOCIAL_CONTACTS_ERROR_H__
22
23 #include <tizen.h>
24
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29
30 /**
31  * @file contacts_errors.h
32  */
33
34 /**
35  * @addtogroup CAPI_SOCIAL_CONTACTS_SVC_COMMON_MODULE
36  * @{
37  */
38
39 /**
40  * @brief Enumeration for contacts errors.
41  *
42  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
43  *
44  */
45 typedef enum
46 {
47     /* GENERAL */
48     CONTACTS_ERROR_NONE                 = TIZEN_ERROR_NONE,                      /**< Successful */
49     CONTACTS_ERROR_OUT_OF_MEMORY        = TIZEN_ERROR_OUT_OF_MEMORY,             /**< Out of memory */
50     CONTACTS_ERROR_INVALID_PARAMETER    = TIZEN_ERROR_INVALID_PARAMETER,         /**< Invalid parameter */
51     CONTACTS_ERROR_FILE_NO_SPACE        = TIZEN_ERROR_FILE_NO_SPACE_ON_DEVICE,   /**< FS Full */
52     CONTACTS_ERROR_PERMISSION_DENIED    = TIZEN_ERROR_PERMISSION_DENIED,         /**< Permission denied */
53     CONTACTS_ERROR_NOT_SUPPORTED        = TIZEN_ERROR_NOT_SUPPORTED,             /**< Not supported */
54
55     /* LOGIC & DATA */
56     CONTACTS_ERROR_NO_DATA                    = TIZEN_ERROR_NO_DATA,                   /**< Requested data does not exist */
57
58     /* DB */
59     CONTACTS_ERROR_DB_LOCKED            = TIZEN_ERROR_CONTACTS | 0x81,           /**< Database table locked or file locked */
60     CONTACTS_ERROR_DB                   = TIZEN_ERROR_CONTACTS | 0x9F,           /**< Unknown DB error */
61
62     /* IPC */
63     CONTACTS_ERROR_IPC_NOT_AVALIABLE    = TIZEN_ERROR_CONTACTS | 0xB1,           /**< IPC server is not available */
64     CONTACTS_ERROR_IPC                  = TIZEN_ERROR_CONTACTS | 0xBF,           /**< Unknown IPC error */
65
66     /* ENVIRONMENT & OTHER MODULE */
67     // Socket, inotify, vconf, icu, tapi, security/smack, account and so on
68     CONTACTS_ERROR_SYSTEM               = TIZEN_ERROR_CONTACTS | 0xEF,           /**< Internal system module error */
69
70     /* UNHANDLED EXCEPTION */
71     CONTACTS_ERROR_INTERNAL                             = TIZEN_ERROR_CONTACTS | 0xFF,            /**< Implementation Error, Temporary Use */
72 } contacts_error_e;
73
74 /**
75  * @}
76  */
77
78 #ifdef __cplusplus
79 }
80 #endif
81
82 #endif /*  __TIZEN_SOCIAL_CONTACTS_ERROR_H__ */
83