Added pclLifecycleSet function
[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 /** \ingroup GEN_PERS */
22 /** \defgroup PERS_GEN_ERROR Client Library: Generic errors
23  *  \{
24  */
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 /// common error, for this error errno will be set
31 #define EPERS_COMMON             (-1)
32 /// file system is locked
33 #define EPERS_LOCKFS             (-2)
34 /// filesystem is currently locked
35 #define EPERS_MAP_LOCKFS         ((void *) -2)
36 /// bad storage policy
37 #define EPERS_BADPOL             (-3)
38 /// open handle limit reached
39 #define EPERS_MAXHANDLE          (-4)
40 /// max buffer limit for persistence data
41 #define EPERS_BUFLIMIT           (-5)
42 /// persistence resource configuration table not found
43 #define EPERS_NOPRCTABLE         (-6)
44 /// key not found
45 #define EPERS_NOKEY              (-7)
46 /// no data for key
47 #define EPERS_NOKEYDATA          (-8)
48 /// write of data failed
49 #define EPERS_SETDTAFAILED       (-9)
50 /// failed to open file
51 #define EPERS_OPENFILE           (-10)
52 /// invalid buffer or key
53 #define EPERS_DESER_BUFORKEY     (-11)
54 /// can't allocate memory for deserialization of key/value
55 #define EPERS_DESER_ALLOCMEM     (-12)
56 /// no ploicy available in data to serialize
57 #define EPERS_DESER_POLICY       (-13)
58 /// no store type available in data to serialize
59 #define EPERS_DESER_STORE        (-14)
60 /// no permission available in data to serialize
61 #define EPERS_DESER_PERM         (-15)
62 /// no max size available in data to serialize
63 #define EPERS_DESER_MAXSIZE      (-16)
64 /// no responsibility available in data to serialize
65 #define EPERS_DESER_RESP         (-17)
66 /// out of array bounds
67 #define EPERS_OUTOFBOUNDS        (-18)
68 /// failed to map config file
69 #define EPERS_CONFIGMAPFAILED    (-19)
70 /// config file if not available
71 #define EPERS_CONFIGNOTAVAILABLE (-20)
72 /// can't stat config file
73 #define EPERS_CONFIGNOSTAT       (-21)
74 /// plugin function not found
75 #define EPERS_NOPLUGINFCNT       (-22)
76 /// dlopen error
77 #define EPERS_DLOPENERROR        (-23)
78 /// plugin function not loaded
79 #define EPERS_NOPLUGINFUNCT      (-24)
80 /// file remove error
81 #define EPERS_FILEREMOVE         (-25)
82 /// err code to signalizes last entry in DB
83 #define EPERS_LAST_ENTRY_IN_DB   (-26)
84 /// internal database error
85 #define EPERS_DB_ERROR_INTERNAL  (-27)
86 /// db key size is to long
87 #define EPERS_DB_KEY_SIZE        (-28)
88 /// db value size is to long
89 #define EPERS_DB_VALUE_SIZE      (-29)
90 /// resource is not a key
91 #define EPERS_RES_NO_KEY         (-30)
92 /// change notification signal could ne be sent
93 #define EPERS_NOTIFY_SIG         (-31)
94 /// client library has not been initialized
95 #define EPERS_NOT_INITIALIZED   (-32)
96 /// max buffer size
97 #define EPERS_MAX_BUFF_SIZE      (-33)
98 /// failed to setup dbus mainloop
99 #define EPERS_DBUS_MAINLOOP     (-34)
100 /// failed register lifecycle dbus
101 #define EPERS_REGISTER_LIFECYCLE (-35)
102 /// failed register admin service dbus
103 #define EPERS_REGISTER_ADMIN     (-36)
104 /// registration on this key is not allowed
105 #define EPERS_NOTIFY_NOT_ALLOWED (-37)
106 /// the requested resource is not a file
107 #define EPERS_RESOURCE_NO_FILE   (-38)
108 /// write to requested resource failed, read only resource
109 #define EPERS_RESOURCE_READ_ONLY (-39)
110 /// max numbers of cancel shutdown exceeded
111 #define EPERS_SHTDWN_MAX_CANCEL  (-40)
112 /// not permitted to use this function
113 #define EPERS_SHTDWN_NO_PERMIT  (-42)
114
115 #ifdef __cplusplus
116 }
117 #endif
118 /** \} */ /* End of PERS_GEN_ERROR */
119 #endif /* PERSISTENCE_CLIENT_LIBRARY_ERROR_DEF_H */