1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Declaration of some common global functions. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <eikdef.h> |
|
21 #include <ApEngineConsts.h> |
|
22 #include <commdb.h> |
|
23 #include <ApUtils.h> |
|
24 #include <centralrepository.h> // link against centralrepository.lib |
|
25 |
|
26 #include "ApEngineCommons.h" |
|
27 #include "ApProtHandler.h" |
|
28 #include "ApEngineLogger.h" |
|
29 #include "ApEnginePrivateCRKeys.h" |
|
30 |
|
31 // CONSTANTS |
|
32 |
|
33 |
|
34 // LOCAL CONSTANTS AND MACROS |
|
35 _LIT(KFormatPostfix, "%S(%02d)"); |
|
36 _LIT(KFormatNoPostfix, "%S"); |
|
37 _LIT(KFormatLargePostfix, "%S(%d)"); |
|
38 |
|
39 void ApCommons::Panic( TApEnginePanicCodes aPanic ) |
|
40 { |
|
41 } |
|
42 |
|
43 |
|
44 // --------------------------------------------------------- |
|
45 // ApCommons::StartPushedTransactionL |
|
46 // --------------------------------------------------------- |
|
47 // |
|
48 TBool ApCommons::StartPushedTransactionLC( CCommsDatabase& aDb, TBool aRetry ) |
|
49 { |
|
50 return EFalse; |
|
51 } |
|
52 |
|
53 |
|
54 |
|
55 // --------------------------------------------------------- |
|
56 // ApCommons::RollbackTransactionOnLeave |
|
57 // --------------------------------------------------------- |
|
58 // |
|
59 void ApCommons::RollbackTransactionOnLeave( TAny* aDb ) |
|
60 { |
|
61 } |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 // --------------------------------------------------------- |
|
67 // ApCommons::DoMakeValidNameL |
|
68 // --------------------------------------------------------- |
|
69 // |
|
70 HBufC* ApCommons::DoMakeValidNameL |
|
71 ( |
|
72 CCommsDatabase& aDb, |
|
73 TBool& aChanged, |
|
74 HBufC* aName, |
|
75 TUint32 aUid, |
|
76 TBool aIsNew |
|
77 ) |
|
78 { |
|
79 return NULL; |
|
80 } |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 // --------------------------------------------------------- |
|
87 // ApCommons::EnsureMaxLengthLC |
|
88 // --------------------------------------------------------- |
|
89 // |
|
90 HBufC* ApCommons::EnsureMaxLengthLC( const TDesC* aName, TBool& aChanged ) |
|
91 { |
|
92 return NULL; |
|
93 } |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 /** |
|
99 * Given aName in the format <prefix> or <prefix><brace><integer><brace>, |
|
100 * return a pointer to the leading part. |
|
101 * That is, if there is trailing <space><integer>, |
|
102 * then that is excluded; if there is no trailing part, then the original |
|
103 * decriptor is returned. |
|
104 * Examples: |
|
105 * - "Foo" returns "Foo"; |
|
106 * - "Foo 12" returns "Foo 12"; |
|
107 * - "Foo(12)" returns "Foo"; |
|
108 * - "Foo 12 (34)" returns "Foo 12 "; |
|
109 * - "Foo bar" returns "Foo bar"; |
|
110 * - "Foo " returns "Foo ". |
|
111 */ |
|
112 TPtrC ApCommons::GetPrefix( const TDesC& aName ) |
|
113 { |
|
114 User::Leave( KErrNotSupported ); |
|
115 } |
|
116 |
|
117 |
|
118 /** |
|
119 * If aName is constructed from aPrefix with a postfix, get the numeric |
|
120 * value of the postfix, e.g: |
|
121 * - GetPostfix( "Foo (3)", "Foo" ) == 3 |
|
122 * - GetPostfix( "Foo 23 (45)", "Foo 23" ) == 45 |
|
123 * If aName is the same as aPrefix, return 0, e.g.: |
|
124 * - GetPostfix( "Foo", "Foo" ) == 0 |
|
125 * If aName is not constructed from aPrefix, return -1, e.g.: |
|
126 * - GetPostfix( "Foobar", "Foo" ) == -1 |
|
127 * - GetPostfix( "Fo 23 45", "Foo" ) == -1 |
|
128 */ |
|
129 TInt ApCommons::GetPostfix( const TDesC& aName, const TDesC& aPrefix ) |
|
130 { |
|
131 return 0; |
|
132 } |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 // --------------------------------------------------------- |
|
138 // ApCommons::ReadUintL |
|
139 // --------------------------------------------------------- |
|
140 // |
|
141 TInt ApCommons::ReadUintL |
|
142 ( |
|
143 CCommsDbTableView* atable, |
|
144 const TDesC& aColumn, |
|
145 TUint32& aValue |
|
146 ) |
|
147 { |
|
148 return KErrUnknown; |
|
149 } |
|
150 |
|
151 |
|
152 // --------------------------------------------------------- |
|
153 // ApCommons::ReadBoolL |
|
154 // --------------------------------------------------------- |
|
155 // |
|
156 TInt ApCommons::ReadBoolL |
|
157 ( |
|
158 CCommsDbTableView* atable, |
|
159 const TDesC& aColumn, |
|
160 TBool& aValue |
|
161 ) |
|
162 { |
|
163 return KErrUnknown; |
|
164 } |
|
165 |
|
166 |
|
167 |
|
168 // --------------------------------------------------------- |
|
169 // ApCommons::ReadLongTextLC |
|
170 // --------------------------------------------------------- |
|
171 // |
|
172 HBufC* ApCommons::ReadLongTextLC |
|
173 ( |
|
174 CCommsDbTableView* atable, |
|
175 const TDesC& aColumn, |
|
176 TInt& aErrCode |
|
177 ) |
|
178 { |
|
179 return NULL; |
|
180 } |
|
181 |
|
182 |
|
183 |
|
184 // --------------------------------------------------------- |
|
185 // ApCommons::ReadLongTextL |
|
186 // --------------------------------------------------------- |
|
187 // |
|
188 HBufC* ApCommons::ReadLongTextL( CCommsDbTableView* atable, |
|
189 const TDesC& aColumn ) |
|
190 { |
|
191 return NULL; |
|
192 } |
|
193 |
|
194 |
|
195 |
|
196 // --------------------------------------------------------- |
|
197 // ApCommons::EscapeTextLC |
|
198 // --------------------------------------------------------- |
|
199 // |
|
200 HBufC* ApCommons::EscapeTextLC( const TDesC& aLiteral ) |
|
201 { |
|
202 return NULL; |
|
203 } |
|
204 |
|
205 |
|
206 |
|
207 // --------------------------------------------------------- |
|
208 // ApCommons::ReadText16ValueL |
|
209 // --------------------------------------------------------- |
|
210 // |
|
211 HBufC16* ApCommons::ReadText16ValueLC( CCommsDbTableView* atable, |
|
212 const TDesC& aCol ) |
|
213 { |
|
214 return NULL; |
|
215 } |
|
216 |
|
217 |
|
218 // --------------------------------------------------------- |
|
219 // ApCommons::ReadText8ValueLC |
|
220 // --------------------------------------------------------- |
|
221 // |
|
222 HBufC8* ApCommons::ReadText8ValueLC( CCommsDbTableView* atable, |
|
223 const TDesC& aCol ) |
|
224 { |
|
225 return NULL; |
|
226 } |
|
227 |
|
228 |
|
229 // --------------------------------------------------------- |
|
230 // ApCommons::DoGetReadOnlyL |
|
231 // --------------------------------------------------------- |
|
232 // |
|
233 TBool ApCommons::DoGetReadOnlyL( CCommsDbTableView& aTable ) |
|
234 { |
|
235 return EFalse; |
|
236 } |
|
237 |
|
238 |
|
239 |
|
240 // --------------------------------------------------------- |
|
241 // ApCommons::CommitTransaction |
|
242 // --------------------------------------------------------- |
|
243 // |
|
244 TInt ApCommons::CommitTransaction( CCommsDatabase& aDb ) |
|
245 { |
|
246 return KErrNotSupported; |
|
247 } |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 //---------------------------------------------------------- |
|
253 // ApCommons::GetVariantL |
|
254 //---------------------------------------------------------- |
|
255 // |
|
256 TInt ApCommons::GetVariantL() |
|
257 { |
|
258 return 0; |
|
259 } |
|
260 |
|
261 |
|
262 |
|
263 // --------------------------------------------------------- |
|
264 // ApCommons::IsGivenSharedDataSupportL |
|
265 // --------------------------------------------------------- |
|
266 // |
|
267 TInt ApCommons::IsGivenSharedDataSupportL( const TUid aUid, |
|
268 const TUint32 aKey ) |
|
269 { |
|
270 return 0; |
|
271 } |
|
272 |
|
273 |
|
274 // End of File |
|