Tizen 2.0 Release
[framework/system/sync-agent.git] / include / data-adapter / error.h
1 /*
2  * sync-agent
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 #ifndef DATA_ADAPTER_ERROR_H_
19 #define DATA_ADAPTER_ERROR_H_
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif                          /* __cplusplus */
24
25 /**
26  * @file                error.h
27  * @brief       Definition of framework error codes for Data Adapter
28  */
29
30 /** @addtogroup data_adapter
31  *      @{
32  */
33
34 /**
35  * @brief       Enumerations of error codes for Data Adapter
36  */
37         typedef enum data_adapter_return {
38                 SYNC_AGENT_DA_SUCCESS = 1,                                                                      /**< successful */
39                 SYNC_AGENT_DA_ERRORS = -800,                                                            /**< fail */
40                 SYNC_AGENT_DA_NOT_FOUND_PLUG_IN = -801,                 /**< not found data connector or converter plugIn */
41                 SYNC_AGENT_DA_ERR_OPEN_FAILED = -802,                                   /**< database open fail */
42                 SYNC_AGENT_DA_ERR_CLOSE_FAILED = -803,                                  /**< database close fail */
43                 SYNC_AGENT_DA_ERR_TRANSACTION_FAILED = -804,                    /**< transaction fail */
44                 SYNC_AGENT_DA_ERR_CREATE_TABLE_FAILED = -805,                   /**< create table fail */
45                 SYNC_AGENT_DA_ERR_DROP_TABLE_FAILED = -806,                     /**< drop table fail */
46                 SYNC_AGENT_DA_ERR_QUERY_FAILED = -807,                                  /**< process query fail */
47                 SYNC_AGENT_DA_ERR_NOT_OPENED = -808,                                    /**< database not opened so fail */
48                 SYNC_AGENT_DA_ERR_ACCOUNT_FULL = -809,                          /**< exist full account */
49                 SYNC_AGENT_DA_ERR_DELETE_LAST_ACCOUNT = -810,           /**<  */
50                 SYNC_AGENT_DA_ERR_PRIMARY_KEY_NOT_UNIQUE = -811,        /**< already exist primary key */
51                 SYNC_AGENT_DA_ERR_DB_HANDLER_MGR = -812,                                /**< database connection fail - get or create */
52                 SYNC_AGENT_DA_ERR_ALREADY_EXIST = -813,                                 /**<  item already exist */
53                 SYNC_AGENT_DA_ERR_INVALID_CONTENT = -814,                       /**<  invalid content */
54                 SYNC_AGENT_DA_ERR_MEMORY_FULL = -815,                           /**< memory full */
55                 SYNC_AGENT_DA_ERR_SUB_DATA_EXIST = -816,                                /**< item not empty */
56                 SYNC_AGENT_DA_ERR_LOCKED = -817,                                                                /**< database lock */
57                 SYNC_AGENT_DA_ERR_MORE_DATA = -818,                                     /**< query result has more data, used when iterating */
58                 SYNC_AGENT_DA_ERR_NO_DATA = -819,                                                       /**< query result not found */
59                 SYNC_AGENT_DA_ERR_NOT_SUPPORTED = -820,                         /**< operation not supported */
60                 SYNC_AGENT_DA_ERR_NOT_EXECUTE = -821,                                   /**< operation not executed */
61                 SYNC_AGENT_DA_ERR_ITEM_READ_ONLY = -822,                                        /**< requested item is read only*/
62                 SYNC_AGENT_DA_ERR_INVALID_PARAMETER = -823,             /**< invalid parameter*/
63                 SYNC_AGENT_DA_ERR_SERVICE_DB = -824,                    /**< service database error*/
64                 SYNC_AGENT_DA_ERR_SERVICE_IPC = -825,                   /**< service ipc error*/
65         } sync_agent_da_return_e;
66
67 /**
68  *      @}
69  */
70
71 #ifdef __cplusplus
72 }
73 #endif                          /* __cplusplus */
74 #endif                          /* DATA_ADAPTER_ERROR_H_ */