1 #ifndef PERSISTENCE_CLIENT_LIBRARY_DATA_ORGANIZATION_H
2 #define PERSISTENCE_CLIENT_LIBRARY_DATA_ORGANIZATION_H
4 /******************************************************************************
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 ******************************************************************************/
15 * @file persistence_client_library_data_organization.h
16 * @ingroup Persistence client library
17 * @author Ingo Huerner
18 * @brief Header of the persistence client library data organization.
27 #define PERSIST_CLIENT_LIBRARY_DATA_ORGANIZATION_INTERFACE_VERSION (0x01040000U)
29 #include "../include/persistence_client_library_error_def.h"
30 #include "../include/persistence_client_library_key.h"
33 #include <dlt/dlt_common.h>
39 /// constant definitions
40 enum _PersistenceConstantDef
42 ResIsNoFile = 0, /// flag to identify that resource a not file
43 ResIsFile = 1, /// flag to identify that resource a file
44 AccessNoLock = 1, /// flag to indicate that access is not locked
46 PCLnotInitialized = 0, ///
47 PCLinitialized = 1, ///
52 NsmShutdownNormal = 1, /// lifecycle shutdown normal
53 NsmErrorStatus_OK = 1,
54 NsmErrorStatus_Fail = -1,
56 ChecksumBufSize = 64, /// max checksum size
58 DbusSubMatchSize = 12, /// max character sub match size
59 DbusMatchRuleSize = 300, /// max character size of the dbus match rule size
61 PrctKeySize = 64, /// persistence resource config table max key size
62 PrctValueSize = 256, /// persistence resource config table max value size
63 PrctDbTableSize = 1024, /// number of persistence resource config tables to store
65 RDRWBufferSize = 1024, /// write buffer size
67 DbKeySize = 64, /// database max key size
68 DbValueSize = 16384, /// database max value size
69 DbTableSize = 1024, /// database table size
71 PasMsg_Block = 0x0001, /// persistence administration service block access
72 PasMsg_Unblock = 0x0002, /// persistence administration service unblock access
73 PasMsg_WriteBack = 0x0010, /// persistence administration service write_back
75 PasErrorStatus_RespPend = 0x0001, /// persistence administration service msg return status
76 PasErrorStatus_OK = 0x0002, /// persistence administration service msg return status
77 PasErrorStatus_FAIL = 0x8000, /// persistence administration service msg return status
79 CustLibMaxLen = 128, /// max length of the custom library name and path
80 DbKeyMaxLen = 128, /// max database key length
81 DbResIDMaxLen = 128, /// max database key length
82 DbPathMaxLen = 128, /// max database path length
83 MaxAppNameLen = 128, /// max application name
84 MaxPersHandle = 256, /// max number of parallel open persistence handles
86 MaxConfKeyLengthResp = 32, /// length of the config key responsible name
87 MaxConfKeyLengthCusName = 32, /// length of the config key custom name
88 MaxRctLengthCustom_ID = 64, /// length of the customer ID
90 defaultMaxKeyValDataSize = 16384 /// default limit the key-value data size to 16kB
95 /// resource configuration table name
96 extern const char* gResTableCfg;
98 /// shared cached default database
99 extern const char* gSharedCachedDefault;
100 /// shared cached database
101 extern const char* gSharedCached;
102 /// shared write through default database
103 extern const char* gSharedWtDefault;
104 /// shared write through database
105 extern const char* gSharedWt;
107 /// local cached default database
108 extern const char* gLocalCachedDefault;
109 /// local cached default database
110 extern const char* gLocalCached;
111 /// local write through default database
112 extern const char* gLocalWtDefault;
113 /// local write through default database
114 extern const char* gLocalWt;
117 /// directory structure node name defintion
118 extern const char* gNode;
119 /// directory structure user name defintion
120 extern const char* gUser;
121 /// directory structure seat name defintion
122 extern const char* gSeat;
125 /// path prefix for local cached database: /Data/mnt_c/<appId>/<database_name>
126 extern const char* gLocalCachePath;
127 /// path prefix for local write through database /Data/mnt_wt/<appId>/<database_name>
128 extern const char* gLocalWtPath;
129 /// path prefix for shared cached database: /Data/mnt_c/Shared/Group/<group_no>/<database_name>
130 extern const char* gSharedCachePath;
131 /// path prefix for shared write through database: /Data/mnt_wt/Shared/Group/<group_no>/<database_name>
132 extern const char* gSharedWtPath;
133 /// path prefix for shared public cached database: /Data/mnt_c/Shared/Public//<database_name>
134 extern const char* gSharedPublicCachePath;
135 /// path prefix for shared public write through database: /Data/mnt_wt/Shared/Public/<database_name>
136 extern const char* gSharedPublicWtPath;
138 /// path prefix for local cached files: /Data/mnt_c/<appId>/<user>/>userno>/<seat>/>seatno>/<resource>
139 extern const char* gLocalCacheFilePath;
142 extern char gAppId[MaxAppNameLen];
144 /// max key value data size
145 extern int gMaxKeyValDataSize;
148 extern DltContext gDLTContext;
150 /// flag to indicate if client library has been initialized
151 extern unsigned int gPclInitialized;
155 * @brief definition of change callback function
157 * @param pclNotification_s callback notification structure
159 extern int(* gChangeNotifyCallback)(pclNotification_s * notifyStruct);
166 #endif /* PERSISTENCY_CLIENT_LIBRARY_DATA_ORGANIZATION_H */