|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 * @file CommsDatInternalDefs.h |
|
18 * |
|
19 * Definitions for internal use within CommsDat component |
|
20 * |
|
21 * @internalTechnology |
|
22 * @released |
|
23 * |
|
24 */ |
|
25 |
|
26 #if (! defined COMMSDATINTERNALDEFS_H) |
|
27 #define COMMSDATINTERNALDEFS_H |
|
28 |
|
29 |
|
30 #include <e32base.h> |
|
31 #include <e32std.h> |
|
32 |
|
33 |
|
34 // From netmeta, iterator used internally |
|
35 #include <comms-infras/metaiterator.h> |
|
36 |
|
37 // Storage server |
|
38 #include <centralrepository.h> |
|
39 |
|
40 // CommsDat interface headers |
|
41 #include "CommsDat.h" |
|
42 #include "MetaDatabase.h" |
|
43 |
|
44 // Internal headers |
|
45 #include "Commsdat_Log.h" |
|
46 #include "MetaDatabaseSessionImpl.h" |
|
47 #include "CommsDatUtilImpl.h" |
|
48 #include "CommsDatNotifier.h" |
|
49 #include "CommsDatMapper.h" |
|
50 #include "MetaDatabaseVisitor.h" |
|
51 |
|
52 namespace CommsDatInternal |
|
53 /* |
|
54 Contains definitions in use within the CommsDat component |
|
55 |
|
56 @internalTechnology |
|
57 */ |
|
58 { |
|
59 |
|
60 |
|
61 // Repository for comms data |
|
62 const TUid KCDCommsRepositoryId = { 0xCCCCCC00 }; |
|
63 |
|
64 // Repository for user defined data |
|
65 const TUid KCDAppsRepositoryId = { 0xAAAAAA00 }; |
|
66 |
|
67 |
|
68 /* |
|
69 Empty Mask for use with CentralRepository calls |
|
70 Central Repository will match the id as written. |
|
71 |
|
72 @internalComponent |
|
73 */ |
|
74 #define KCDCenRepNoMask 0xffffffff |
|
75 |
|
76 |
|
77 /* |
|
78 Flag to indicate a field is not null |
|
79 Not for use in database. Just with fields |
|
80 Same value as KCDUtilityFlag as these should not clash |
|
81 @internalComponent |
|
82 */ |
|
83 #define KCDNotNullFlag 0x80000000 |
|
84 |
|
85 /* |
|
86 Flag to indicate utility data |
|
87 Same value as KCDIsNullFlag deliberately |
|
88 @internalComponent |
|
89 */ |
|
90 #define KCDUtilityFlag 0x80000000 |
|
91 |
|
92 |
|
93 /* |
|
94 Flag to indicate flag used to define if RecordId or Tag is used for |
|
95 Link Record data loading |
|
96 @internalComponent |
|
97 */ |
|
98 #define KLinkableTag KCDUtilityFlag |
|
99 /* |
|
100 Location of home-made write-lock semaphore in db |
|
101 |
|
102 @internalComponent |
|
103 */ |
|
104 #define KCDWriteLock 0x00000000 |
|
105 |
|
106 /* |
|
107 @internalComponent |
|
108 */ |
|
109 #define KCDGlobalSettingsRecordId 0x00000100 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 NONSHARABLE_CLASS(TCDNotifiableEvent) |
|
115 { |
|
116 public: |
|
117 |
|
118 enum TEvent |
|
119 /* |
|
120 These events designed to match RDBNotifier events in dbms |
|
121 */ |
|
122 { |
|
123 /** The database has been closed. */ |
|
124 EClose, |
|
125 /** All read locks have been removed. */ |
|
126 EUnlock, |
|
127 /** A transaction has been committed. */ |
|
128 ECommit, |
|
129 /** A transaction has been rolled back */ |
|
130 ERollback, |
|
131 /** The database has been recovered */ |
|
132 ERecover |
|
133 }; |
|
134 }; |
|
135 |
|
136 /* |
|
137 */ |
|
138 //const TUid KUidCommDbNotificationEvent = {0x10008FFF}; |
|
139 /** A record in the `DEFAULT_GPRS` table has been modified or deleted. */ |
|
140 |
|
141 |
|
142 } //end namespace CommsDatInternal |
|
143 |
|
144 |
|
145 |
|
146 namespace CommsDat |
|
147 { |
|
148 |
|
149 // Maximum size of the MMetaDBVisitor based object in terms of sizeof(TAny*). |
|
150 // KMMetaTypeMaxSize * sizeof(TAny*) is the size of the memory reserved |
|
151 // on the stack for the in-place instantiation of every MMetaDBVisitor class |
|
152 const TInt KMMetaDBVisitorMaxSize = 10; |
|
153 |
|
154 const TInt KCommsDatSvrRealMaxFieldLength=50; |
|
155 |
|
156 |
|
157 // For Pub/sub notifications |
|
158 const TUint KSlashChar='\\'; |
|
159 const TUid KCommsDbPolicyUid = {0x10004e1d}; |
|
160 |
|
161 |
|
162 const TCapability KCommsDatNotificationSetCapability = ECapabilityWriteDeviceData; |
|
163 |
|
164 } // end namespace CommsDat |
|
165 |
|
166 |
|
167 #endif // COMMSDATINTERNALDEFS_H |
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 |
|
175 |
|
176 |
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 |
|
183 |
|
184 |