|
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: Header file for datastorewaiter helper class. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CNSMLDUMMYDATASTOREWAITER_H__ |
|
19 #define __CNSMLDUMMYDATASTOREWAITER_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 #include "nsmldummydatastore.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class MSmlSyncRelationship; |
|
27 |
|
28 // CLASS DEFINITION |
|
29 |
|
30 |
|
31 NONSHARABLE_CLASS( CNSmlDummyDataStoreWaiter ): |
|
32 public CActive |
|
33 { |
|
34 public: // Constructors and destructor |
|
35 static CNSmlDummyDataStoreWaiter* NewL( CNSmlDummyDataStore& aStore ); |
|
36 static CNSmlDummyDataStoreWaiter* NewLC( CNSmlDummyDataStore& aStore ); |
|
37 virtual ~CNSmlDummyDataStoreWaiter(); |
|
38 |
|
39 private: // Constructors |
|
40 CNSmlDummyDataStoreWaiter( CNSmlDummyDataStore& aStore ); |
|
41 void ConstructL(); |
|
42 |
|
43 private: // From CActive |
|
44 void DoCancel(); |
|
45 void RunL(); |
|
46 |
|
47 public: |
|
48 void OpenStoreL( MSmlSyncRelationship& aRelationship, |
|
49 const TDesC& aStoreName = KNSmlContactStoreNameForDefaultDB ); |
|
50 TInt DoCommitChangeInfoL( const MSmlDataItemUidSet& aItems ); |
|
51 TInt DoResetChangeInfoL(); |
|
52 TInt DoCommitChangeInfoL(); |
|
53 |
|
54 TInt DoCreateItemL( TSmlDbItemUid& aUid, TInt aSize, |
|
55 const TDesC8& aMimeType, const TDesC8& aMimeVer ); |
|
56 TInt DoCommitItemL(); |
|
57 |
|
58 TInt DoCommitBatchL( RArray<TInt>& aResultArray ); |
|
59 void DoCancelBatch(); |
|
60 |
|
61 TInt DoOpenItemL( TSmlDbItemUid aUid, TBool& aFieldChange, |
|
62 TInt& aSize, TSmlDbItemUid& aParent, TDes8& aMimeType, |
|
63 TDes8& aMimeVer ); |
|
64 TInt DoReplaceItemL( TSmlDbItemUid aUid, TInt aSize, |
|
65 TSmlDbItemUid aParent, TBool aFieldChange ); |
|
66 TInt DoDeleteItemL( TSmlDbItemUid aUid ); |
|
67 TInt DoDeleteAllItemsL(); |
|
68 |
|
69 private: // Data |
|
70 CActiveSchedulerWait* iWait; |
|
71 CNSmlDummyDataStore& iStore; |
|
72 TBool iOpen; |
|
73 }; |
|
74 |
|
75 #endif // __CNSMLDUMMYDATASTOREWAITER_H__ |
|
76 |
|
77 // End of file |