1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 #include <smcmockclassincludes.h> |
|
18 #include <centralrepository.h> |
|
19 |
|
20 // ============================ MEMBER FUNCTIONS =============================== |
|
21 |
|
22 // ----------------------------------------------------------------------------- |
|
23 // CRepository::NewL |
|
24 // ----------------------------------------------------------------------------- |
|
25 // |
|
26 CRepository * CRepository::NewL( |
|
27 TUid aRepositoryUid ) |
|
28 { |
|
29 SMC_MOCK_NEWL1( CRepository *, TUid, aRepositoryUid ) |
|
30 |
|
31 CRepository* self = new( ELeave ) CRepository; |
|
32 CleanupStack::PushL( self ); |
|
33 //self->ConstructL() |
|
34 CleanupStack::Pop( self ); |
|
35 return self; |
|
36 } |
|
37 |
|
38 |
|
39 // ----------------------------------------------------------------------------- |
|
40 // CRepository::NewLC |
|
41 // ----------------------------------------------------------------------------- |
|
42 // |
|
43 CRepository * CRepository::NewLC( |
|
44 TUid aRepositoryUid ) |
|
45 { |
|
46 SMC_MOCK_NEWLC1( CRepository *, TUid, aRepositoryUid ) |
|
47 |
|
48 CRepository* self = new( ELeave ) CRepository; |
|
49 CleanupStack::PushL( self ); |
|
50 //self->ConstructL() |
|
51 return self; |
|
52 } |
|
53 |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // CRepository::~CRepository |
|
57 // ----------------------------------------------------------------------------- |
|
58 // |
|
59 CRepository::~CRepository( ) |
|
60 { |
|
61 |
|
62 } |
|
63 |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // CRepository::Create |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 TInt CRepository::Create( |
|
70 TUint32 aKey, |
|
71 TInt aValue ) |
|
72 { |
|
73 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
74 TInt, aValue ) |
|
75 } |
|
76 |
|
77 |
|
78 // ----------------------------------------------------------------------------- |
|
79 // CRepository::Create |
|
80 // ----------------------------------------------------------------------------- |
|
81 // |
|
82 TInt CRepository::Create( |
|
83 TUint32 aKey, |
|
84 const TReal & aValue ) |
|
85 { |
|
86 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
87 const TReal &, aValue ) |
|
88 } |
|
89 |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CRepository::Create |
|
93 // ----------------------------------------------------------------------------- |
|
94 // |
|
95 TInt CRepository::Create( |
|
96 TUint32 aKey, |
|
97 const TDesC8 & aValue ) |
|
98 { |
|
99 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
100 const TDesC8 &, aValue ) |
|
101 } |
|
102 |
|
103 |
|
104 // ----------------------------------------------------------------------------- |
|
105 // CRepository::Create |
|
106 // ----------------------------------------------------------------------------- |
|
107 // |
|
108 TInt CRepository::Create( |
|
109 TUint32 aKey, |
|
110 const TDesC16 & aValue ) |
|
111 { |
|
112 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
113 const TDesC16 &, aValue ) |
|
114 } |
|
115 |
|
116 |
|
117 // ----------------------------------------------------------------------------- |
|
118 // CRepository::Delete |
|
119 // ----------------------------------------------------------------------------- |
|
120 // |
|
121 TInt CRepository::Delete( |
|
122 TUint32 aKey ) |
|
123 { |
|
124 SMC_MOCK_METHOD1( TInt, TUint32, aKey ) |
|
125 } |
|
126 |
|
127 |
|
128 // ----------------------------------------------------------------------------- |
|
129 // CRepository::Delete |
|
130 // ----------------------------------------------------------------------------- |
|
131 // |
|
132 TInt CRepository::Delete( |
|
133 TUint32 aPartialKey, |
|
134 TUint32 aMask, |
|
135 TUint32 & aErrorKey ) |
|
136 { |
|
137 SMC_MOCK_METHOD3( TInt, TUint32, aPartialKey, |
|
138 TUint32, aMask, |
|
139 TUint32 &, aErrorKey ) |
|
140 } |
|
141 |
|
142 |
|
143 // ----------------------------------------------------------------------------- |
|
144 // CRepository::Get |
|
145 // ----------------------------------------------------------------------------- |
|
146 // |
|
147 TInt CRepository::Get( |
|
148 TUint32 aKey, |
|
149 TInt & aValue ) |
|
150 { |
|
151 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
152 TInt &, aValue ) |
|
153 } |
|
154 |
|
155 |
|
156 // ----------------------------------------------------------------------------- |
|
157 // CRepository::Set |
|
158 // ----------------------------------------------------------------------------- |
|
159 // |
|
160 TInt CRepository::Set( |
|
161 TUint32 aKey, |
|
162 TInt aValue ) |
|
163 { |
|
164 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
165 TInt, aValue ) |
|
166 } |
|
167 |
|
168 |
|
169 // ----------------------------------------------------------------------------- |
|
170 // CRepository::Get |
|
171 // ----------------------------------------------------------------------------- |
|
172 // |
|
173 TInt CRepository::Get( |
|
174 TUint32 aKey, |
|
175 TReal & aValue ) |
|
176 { |
|
177 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
178 TReal &, aValue ) |
|
179 } |
|
180 |
|
181 |
|
182 // ----------------------------------------------------------------------------- |
|
183 // CRepository::Set |
|
184 // ----------------------------------------------------------------------------- |
|
185 // |
|
186 TInt CRepository::Set( |
|
187 TUint32 aKey, |
|
188 const TReal & aValue ) |
|
189 { |
|
190 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
191 const TReal &, aValue ) |
|
192 } |
|
193 |
|
194 |
|
195 // ----------------------------------------------------------------------------- |
|
196 // CRepository::Get |
|
197 // ----------------------------------------------------------------------------- |
|
198 // |
|
199 TInt CRepository::Get( |
|
200 TUint32 aKey, |
|
201 TDes8 & aValue ) |
|
202 { |
|
203 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
204 TDes8 &, aValue ) |
|
205 } |
|
206 |
|
207 |
|
208 // ----------------------------------------------------------------------------- |
|
209 // CRepository::Get |
|
210 // ----------------------------------------------------------------------------- |
|
211 // |
|
212 TInt CRepository::Get( |
|
213 TUint32 aId, |
|
214 TDes8 & aValue, |
|
215 TInt & aActualLength ) |
|
216 { |
|
217 SMC_MOCK_METHOD3( TInt, TUint32, aId, |
|
218 TDes8 &, aValue, |
|
219 TInt &, aActualLength ) |
|
220 } |
|
221 |
|
222 |
|
223 // ----------------------------------------------------------------------------- |
|
224 // CRepository::Set |
|
225 // ----------------------------------------------------------------------------- |
|
226 // |
|
227 TInt CRepository::Set( |
|
228 TUint32 aKey, |
|
229 const TDesC8 & aValue ) |
|
230 { |
|
231 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
232 const TDesC8 &, aValue ) |
|
233 } |
|
234 |
|
235 |
|
236 // ----------------------------------------------------------------------------- |
|
237 // CRepository::Get |
|
238 // ----------------------------------------------------------------------------- |
|
239 // |
|
240 TInt CRepository::Get( |
|
241 TUint32 aKey, |
|
242 TDes16 & aValue ) |
|
243 { |
|
244 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
245 TDes16 &, aValue ) |
|
246 } |
|
247 |
|
248 |
|
249 // ----------------------------------------------------------------------------- |
|
250 // CRepository::Get |
|
251 // ----------------------------------------------------------------------------- |
|
252 // |
|
253 TInt CRepository::Get( |
|
254 TUint32 aId, |
|
255 TDes16 & aValue, |
|
256 TInt & aActualLength ) |
|
257 { |
|
258 SMC_MOCK_METHOD3( TInt, TUint32, aId, |
|
259 TDes16 &, aValue, |
|
260 TInt &, aActualLength ) |
|
261 } |
|
262 |
|
263 |
|
264 // ----------------------------------------------------------------------------- |
|
265 // CRepository::Set |
|
266 // ----------------------------------------------------------------------------- |
|
267 // |
|
268 TInt CRepository::Set( |
|
269 TUint32 aKey, |
|
270 const TDesC16 & aValue ) |
|
271 { |
|
272 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
273 const TDesC16 &, aValue ) |
|
274 } |
|
275 |
|
276 |
|
277 // ----------------------------------------------------------------------------- |
|
278 // CRepository::GetMeta |
|
279 // ----------------------------------------------------------------------------- |
|
280 // |
|
281 TInt CRepository::GetMeta( |
|
282 TUint32 aKey, |
|
283 TUint32 & aMeta ) |
|
284 { |
|
285 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
286 TUint32 &, aMeta ) |
|
287 } |
|
288 |
|
289 |
|
290 // ----------------------------------------------------------------------------- |
|
291 // CRepository::Move |
|
292 // ----------------------------------------------------------------------------- |
|
293 // |
|
294 TInt CRepository::Move( |
|
295 TUint32 aSourcePartialKey, |
|
296 TUint32 aTargetPartialKey, |
|
297 TUint32 aMask, |
|
298 TUint32 & aErrorKey ) |
|
299 { |
|
300 SMC_MOCK_METHOD4( TInt, TUint32, aSourcePartialKey, |
|
301 TUint32, aTargetPartialKey, |
|
302 TUint32, aMask, |
|
303 TUint32 &, aErrorKey ) |
|
304 } |
|
305 |
|
306 |
|
307 // ----------------------------------------------------------------------------- |
|
308 // CRepository::FindL |
|
309 // ----------------------------------------------------------------------------- |
|
310 // |
|
311 TInt CRepository::FindL( |
|
312 TUint32 aPartialKey, |
|
313 TUint32 aMask, |
|
314 RArray<TUint32> & aFoundKeys ) |
|
315 { |
|
316 SMC_MOCK_METHOD3( TInt, TUint32, aPartialKey, |
|
317 TUint32, aMask, |
|
318 RArray<TUint32> &, aFoundKeys ) |
|
319 } |
|
320 |
|
321 |
|
322 // ----------------------------------------------------------------------------- |
|
323 // CRepository::FindEqL |
|
324 // ----------------------------------------------------------------------------- |
|
325 // |
|
326 TInt CRepository::FindEqL( |
|
327 TUint32 aPartialKey, |
|
328 TUint32 aMask, |
|
329 TInt aValue, |
|
330 RArray<TUint32> & aFoundKeys ) |
|
331 { |
|
332 SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, |
|
333 TUint32, aMask, |
|
334 TInt, aValue, |
|
335 RArray<TUint32> &, aFoundKeys ) |
|
336 } |
|
337 |
|
338 |
|
339 // ----------------------------------------------------------------------------- |
|
340 // CRepository::FindEqL |
|
341 // ----------------------------------------------------------------------------- |
|
342 // |
|
343 TInt CRepository::FindEqL( |
|
344 TUint32 aPartialKey, |
|
345 TUint32 aMask, |
|
346 const TReal & aValue, |
|
347 RArray<TUint32> & aFoundKeys ) |
|
348 { |
|
349 SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, |
|
350 TUint32, aMask, |
|
351 const TReal &, aValue, |
|
352 RArray<TUint32> &, aFoundKeys ) |
|
353 } |
|
354 |
|
355 |
|
356 // ----------------------------------------------------------------------------- |
|
357 // CRepository::FindEqL |
|
358 // ----------------------------------------------------------------------------- |
|
359 // |
|
360 TInt CRepository::FindEqL( |
|
361 TUint32 aPartialKey, |
|
362 TUint32 aMask, |
|
363 const TDesC8 & aValue, |
|
364 RArray<TUint32> & aFoundKeys ) |
|
365 { |
|
366 SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, |
|
367 TUint32, aMask, |
|
368 const TDesC8 &, aValue, |
|
369 RArray<TUint32> &, aFoundKeys ) |
|
370 } |
|
371 |
|
372 |
|
373 // ----------------------------------------------------------------------------- |
|
374 // CRepository::FindEqL |
|
375 // ----------------------------------------------------------------------------- |
|
376 // |
|
377 TInt CRepository::FindEqL( |
|
378 TUint32 aPartialKey, |
|
379 TUint32 aMask, |
|
380 const TDesC16 & aValue, |
|
381 RArray<TUint32> & aFoundKeys ) |
|
382 { |
|
383 SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, |
|
384 TUint32, aMask, |
|
385 const TDesC16 &, aValue, |
|
386 RArray<TUint32> &, aFoundKeys ) |
|
387 } |
|
388 |
|
389 |
|
390 // ----------------------------------------------------------------------------- |
|
391 // CRepository::FindNeqL |
|
392 // ----------------------------------------------------------------------------- |
|
393 // |
|
394 TInt CRepository::FindNeqL( |
|
395 TUint32 aPartialKey, |
|
396 TUint32 aMask, |
|
397 TInt aValue, |
|
398 RArray<TUint32> & aFoundKeys ) |
|
399 { |
|
400 SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, |
|
401 TUint32, aMask, |
|
402 TInt, aValue, |
|
403 RArray<TUint32> &, aFoundKeys ) |
|
404 } |
|
405 |
|
406 |
|
407 // ----------------------------------------------------------------------------- |
|
408 // CRepository::FindNeqL |
|
409 // ----------------------------------------------------------------------------- |
|
410 // |
|
411 TInt CRepository::FindNeqL( |
|
412 TUint32 aPartialKey, |
|
413 TUint32 aMask, |
|
414 const TReal & aValue, |
|
415 RArray<TUint32> & aFoundKeys ) |
|
416 { |
|
417 SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, |
|
418 TUint32, aMask, |
|
419 const TReal &, aValue, |
|
420 RArray<TUint32> &, aFoundKeys ) |
|
421 } |
|
422 |
|
423 |
|
424 // ----------------------------------------------------------------------------- |
|
425 // CRepository::FindNeqL |
|
426 // ----------------------------------------------------------------------------- |
|
427 // |
|
428 TInt CRepository::FindNeqL( |
|
429 TUint32 aPartialKey, |
|
430 TUint32 aMask, |
|
431 const TDesC8 & aValue, |
|
432 RArray<TUint32> & aFoundKeys ) |
|
433 { |
|
434 SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, |
|
435 TUint32, aMask, |
|
436 const TDesC8 &, aValue, |
|
437 RArray<TUint32> &, aFoundKeys ) |
|
438 } |
|
439 |
|
440 |
|
441 // ----------------------------------------------------------------------------- |
|
442 // CRepository::FindNeqL |
|
443 // ----------------------------------------------------------------------------- |
|
444 // |
|
445 TInt CRepository::FindNeqL( |
|
446 TUint32 aPartialKey, |
|
447 TUint32 aMask, |
|
448 const TDesC16 & aValue, |
|
449 RArray<TUint32> & aFoundKeys ) |
|
450 { |
|
451 SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, |
|
452 TUint32, aMask, |
|
453 const TDesC16 &, aValue, |
|
454 RArray<TUint32> &, aFoundKeys ) |
|
455 } |
|
456 |
|
457 |
|
458 // ----------------------------------------------------------------------------- |
|
459 // CRepository::NotifyRequest |
|
460 // ----------------------------------------------------------------------------- |
|
461 // |
|
462 TInt CRepository::NotifyRequest( |
|
463 TUint32 aKey, |
|
464 TRequestStatus & aStatus ) |
|
465 { |
|
466 SMC_MOCK_METHOD2( TInt, TUint32, aKey, |
|
467 TRequestStatus &, aStatus ) |
|
468 } |
|
469 |
|
470 |
|
471 // ----------------------------------------------------------------------------- |
|
472 // CRepository::NotifyRequest |
|
473 // ----------------------------------------------------------------------------- |
|
474 // |
|
475 TInt CRepository::NotifyRequest( |
|
476 TUint32 aPartialKey, |
|
477 TUint32 aMask, |
|
478 TRequestStatus & aStatus ) |
|
479 { |
|
480 SMC_MOCK_METHOD3( TInt, TUint32, aPartialKey, |
|
481 TUint32, aMask, |
|
482 TRequestStatus &, aStatus ) |
|
483 } |
|
484 |
|
485 |
|
486 // ----------------------------------------------------------------------------- |
|
487 // CRepository::NotifyCancel |
|
488 // ----------------------------------------------------------------------------- |
|
489 // |
|
490 TInt CRepository::NotifyCancel( |
|
491 TUint32 aKey ) |
|
492 { |
|
493 SMC_MOCK_METHOD1( TInt, TUint32, aKey ) |
|
494 } |
|
495 |
|
496 |
|
497 // ----------------------------------------------------------------------------- |
|
498 // CRepository::NotifyCancel |
|
499 // ----------------------------------------------------------------------------- |
|
500 // |
|
501 TInt CRepository::NotifyCancel( |
|
502 TUint32 aPartialKey, |
|
503 TUint32 aMask ) |
|
504 { |
|
505 SMC_MOCK_METHOD2( TInt, TUint32, aPartialKey, |
|
506 TUint32, aMask ) |
|
507 } |
|
508 |
|
509 |
|
510 // ----------------------------------------------------------------------------- |
|
511 // CRepository::NotifyCancelAll |
|
512 // ----------------------------------------------------------------------------- |
|
513 // |
|
514 TInt CRepository::NotifyCancelAll( ) |
|
515 { |
|
516 SMC_MOCK_METHOD0( TInt ) |
|
517 } |
|
518 |
|
519 |
|
520 // ----------------------------------------------------------------------------- |
|
521 // CRepository::Reset |
|
522 // ----------------------------------------------------------------------------- |
|
523 // |
|
524 TInt CRepository::Reset( ) |
|
525 { |
|
526 SMC_MOCK_METHOD0( TInt ) |
|
527 } |
|
528 |
|
529 |
|
530 // ----------------------------------------------------------------------------- |
|
531 // CRepository::Reset |
|
532 // ----------------------------------------------------------------------------- |
|
533 // |
|
534 TInt CRepository::Reset( |
|
535 TUint32 aKey ) |
|
536 { |
|
537 SMC_MOCK_METHOD1( TInt, TUint32, aKey ) |
|
538 } |
|
539 |
|
540 |
|
541 // ----------------------------------------------------------------------------- |
|
542 // CRepository::StartTransaction |
|
543 // ----------------------------------------------------------------------------- |
|
544 // |
|
545 TInt CRepository::StartTransaction( |
|
546 TTransactionMode aMode ) |
|
547 { |
|
548 SMC_MOCK_METHOD1( TInt, TTransactionMode, aMode ) |
|
549 } |
|
550 |
|
551 |
|
552 // ----------------------------------------------------------------------------- |
|
553 // CRepository::StartTransaction |
|
554 // ----------------------------------------------------------------------------- |
|
555 // |
|
556 void CRepository::StartTransaction( |
|
557 TTransactionMode aMode, |
|
558 TRequestStatus & aStatus ) |
|
559 { |
|
560 SMC_MOCK_METHOD2( void, TTransactionMode, aMode, |
|
561 TRequestStatus &, aStatus ) |
|
562 } |
|
563 |
|
564 |
|
565 // ----------------------------------------------------------------------------- |
|
566 // CRepository::CommitTransaction |
|
567 // ----------------------------------------------------------------------------- |
|
568 // |
|
569 TInt CRepository::CommitTransaction( |
|
570 TUint32 & aKeyInfo ) |
|
571 { |
|
572 SMC_MOCK_METHOD1( TInt, TUint32 &, aKeyInfo ) |
|
573 } |
|
574 |
|
575 |
|
576 // ----------------------------------------------------------------------------- |
|
577 // CRepository::CommitTransaction |
|
578 // ----------------------------------------------------------------------------- |
|
579 // |
|
580 void CRepository::CommitTransaction( |
|
581 TDes8 & aKeyInfo, |
|
582 TRequestStatus & aStatus ) |
|
583 { |
|
584 SMC_MOCK_METHOD2( void, TDes8 &, aKeyInfo, |
|
585 TRequestStatus &, aStatus ) |
|
586 } |
|
587 |
|
588 |
|
589 // ----------------------------------------------------------------------------- |
|
590 // CRepository::CancelTransaction |
|
591 // ----------------------------------------------------------------------------- |
|
592 // |
|
593 void CRepository::CancelTransaction( ) |
|
594 { |
|
595 SMC_MOCK_METHOD0( void ) |
|
596 } |
|
597 |
|
598 |
|
599 // ----------------------------------------------------------------------------- |
|
600 // CRepository::CleanupCancelTransactionPushL |
|
601 // ----------------------------------------------------------------------------- |
|
602 // |
|
603 void CRepository::CleanupCancelTransactionPushL( ) |
|
604 { |
|
605 SMC_MOCK_METHOD0( void ) |
|
606 } |
|
607 |
|
608 |
|
609 // ----------------------------------------------------------------------------- |
|
610 // CRepository::FailTransaction |
|
611 // ----------------------------------------------------------------------------- |
|
612 // |
|
613 void CRepository::FailTransaction( ) |
|
614 { |
|
615 SMC_MOCK_METHOD0( void ) |
|
616 } |
|
617 |
|
618 |
|
619 // ----------------------------------------------------------------------------- |
|
620 // CRepository::CleanupFailTransactionPushL |
|
621 // ----------------------------------------------------------------------------- |
|
622 // |
|
623 void CRepository::CleanupFailTransactionPushL( ) |
|
624 { |
|
625 SMC_MOCK_METHOD0( void ) |
|
626 } |
|
627 |
|
628 |
|