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