New release 0.3.0; license change to MPLv2, for more changes see ChangeLog
[profile/ivi/persistence-client-library.git] / include / persistence_client_library_error_def.h
1 #ifndef PERSISTENCE_CLIENT_LIBRARY_ERROR_DEF_H
2 #define PERSISTENCE_CLIENT_LIBRARY_ERROR_DEF_H
3
4 /******************************************************************************
5  * Project         Persistency
6  * (c) copyright   2012
7  * Company         XS Embedded GmbH
8  *****************************************************************************/
9 /******************************************************************************
10  * This Source Code Form is subject to the terms of the
11  * Mozilla Public License, v. 2.0. If a  copy of the MPL was not distributed
12  * with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
13 ******************************************************************************/
14  /**
15  * @file           persistence_client_library_error_def.h
16  * @ingroup        Persistence client library
17  * @author         Ingo Huerner
18  * @brief          Error definition header
19  * @see
20  */
21
22 // common error, for this error errno will be set
23 #define EPERS_COMMON             (-1)
24 /// file system is locked
25 #define EPERS_LOCKFS             (-2)
26 /// filesystem is currently locked
27 #define EPERS_MAP_LOCKFS         ((void *) -2)
28 /// bad storage policy
29 #define EPERS_BADPOL             (-3)
30 /// open handle limit reached
31 #define EPERS_MAXHANDLE          (-4)
32 /// max buffer limit for persistence data
33 #define EPERS_BUFLIMIT           (-5)
34 /// persistence resource configuration table not found
35 #define EPERS_NOPRCTABLE         (-6)
36 /// key not found
37 #define EPERS_NOKEY              (-7)
38 /// no data for key
39 #define EPERS_NOKEYDATA          (-8)
40 /// write of data failed
41 #define EPERS_SETDTAFAILED       (-9)
42 /// failed to open file
43 #define EPERS_OPENFILE           (-10)
44 /// invalid buffer or key
45 #define EPERS_DESER_BUFORKEY     (-11)
46 /// can't allocat memory for deserialization of keyvalue
47 #define EPERS_DESER_ALLOCMEM     (-12)
48 /// no ploicy avaliable in data to serialize
49 #define EPERS_DESER_POLICY       (-13)
50 /// no store type avaliable in data to serialize
51 #define EPERS_DESER_STORE        (-14)
52 /// no permission avaliable in data to serialize
53 #define EPERS_DESER_PERM         (-15)
54 /// no max size avaliable in data to serialize
55 #define EPERS_DESER_MAXSIZE      (-16)
56 /// no responsibility avaliable in data to serialize
57 #define EPERS_DESER_RESP         (-17)
58 /// out of array bounds
59 #define EPERS_OUTOFBOUNDS        (-18)
60 /// failed to map config file
61 #define EPERS_CONFIGMAPFAILED    (-19)
62 /// config file if not available
63 #define EPERS_CONFIGNOTAVAILABLE (-20)
64 /// can't stat config file
65 #define EPERS_CONFIGNOSTAT       (-21)
66 /// plugin functin not found
67 #define EPERS_NOPLUGINFCNT       (-22)
68 /// dlopen error
69 #define EPERS_DLOPENERROR        (-23)
70 /// plugin function not loaded
71 #define EPERS_NOPLUGINFUNCT      (-24)
72 /// file remove error
73 #define EPERS_FILEREMOVE         (-25)
74 /// err code to signalize last entry in DB
75 #define EPERS_LAST_ENTRY_IN_DB   (-26)
76 /// internal database error
77 #define EPERS_DB_ERROR_INTERNAL  (-27)
78 /// db key size is to long
79 #define EPERS_DB_KEY_SIZE        (-28)
80 /// db value size is to long
81 #define EPERS_DB_VALUE_SIZE      (-29)
82
83
84 /**
85  * @brief Main dispatching loop
86  *
87  * @return 0
88  */
89 void* dbus_main_dispatching_loop(void* dataPtr);
90
91
92 #endif /* PERSISTENCE_CLIENT_LIBRARY_ERROR_DEF_H */