|
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: CSconAsyncHandler header |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SCONASYNCHANDLER_H_ |
|
20 #define SCONASYNCHANDLER_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <f32file.h> |
|
24 |
|
25 #include <syncml/SmlDataSyncDefs.h> |
|
26 #include <stringpool.h> |
|
27 |
|
28 #include "cscontimeout.h" |
|
29 |
|
30 class CSmlDataStore; |
|
31 class CSconSyncRelationship; |
|
32 class CSmlDataProvider; |
|
33 class CNSmlDataItemUidSet; |
|
34 class CSmlDataStoreFormat; |
|
35 |
|
36 NONSHARABLE_CLASS ( CSconAsyncHandler ): public CActive, MTimeOutObserver |
|
37 { |
|
38 public: |
|
39 static CSconAsyncHandler* NewL(); |
|
40 ~CSconAsyncHandler(); |
|
41 void HandleServiceL( const RMessage2& aMessage ); |
|
42 |
|
43 private: // From CActive |
|
44 void RunL(); |
|
45 TInt RunError(TInt aError); |
|
46 void DoCancel(); |
|
47 |
|
48 private: // From MTimeOutObserver |
|
49 void TimeOut(); |
|
50 |
|
51 private: |
|
52 |
|
53 CSconAsyncHandler(); |
|
54 void ConstructL(); |
|
55 |
|
56 void HandleChunkMessage(); |
|
57 void ListAllImplementationsL(); |
|
58 void OpenStoreL(); |
|
59 |
|
60 void OpenItemL(); |
|
61 void OpenItemCompletedL( TInt aError ); |
|
62 |
|
63 void CreateItemL(); |
|
64 void CreateItemCompletedL( TInt aError ); |
|
65 void ReplaceItemL(); |
|
66 void ReplaceItemCompletedL( TInt aError ); |
|
67 void MoveItemL(); |
|
68 void DeleteItemL(); |
|
69 void SoftDeleteItemL(); |
|
70 void DeleteAllItemsL(); |
|
71 void ReadParentL(); |
|
72 void ReadParentCompletedL( TInt aError ); |
|
73 |
|
74 void HasHistoryL(); |
|
75 void AddedItemsL(); |
|
76 void DeletedItemsL(); |
|
77 void SoftDeletedItemsL(); |
|
78 void ModifiedItemsL(); |
|
79 void MovedItemsL(); |
|
80 //void ListChangesL(); |
|
81 void ResetChangeInfoL(); |
|
82 void CommitChangeInfoL(); |
|
83 void CloseStore(); |
|
84 |
|
85 void SetSyncTimeStampL(); |
|
86 void GetSyncTimeStampL(); |
|
87 |
|
88 void ExportStoreFormatL(); |
|
89 void SetRemoteStoreFormatL(); |
|
90 |
|
91 void LeaveIfNoInstanceL(); |
|
92 |
|
93 void DoCloseStore(); |
|
94 |
|
95 void CleanOldStoresL(); |
|
96 void CompleteRequest( TInt aError ); |
|
97 private: |
|
98 RChunk iChunk; |
|
99 |
|
100 RStringPool iStringPool; |
|
101 CSmlDataStoreFormat* iStoreFormat; |
|
102 CSmlDataProvider* iDataProvider; |
|
103 CSmlDataStore* iDataStore; |
|
104 CSconSyncRelationship* iContext; |
|
105 RFs iFs; |
|
106 RMessage2 iMessage; |
|
107 |
|
108 // for committing changes |
|
109 CNSmlDataItemUidSet* iItems; |
|
110 |
|
111 // for opening item |
|
112 TBool iFieldChange; |
|
113 TInt iSize; |
|
114 TInt iParent; |
|
115 TBuf8<64> iMimeType; |
|
116 TBuf8<64> iMimeVer; |
|
117 |
|
118 // for creating item |
|
119 TSmlDbItemUid iNewItem; |
|
120 HBufC8* iWriteData; |
|
121 TBool iCommitInProgress; |
|
122 |
|
123 CCSconTimeOut* iTimeOut; |
|
124 TBool iForceCancel; |
|
125 }; |
|
126 |
|
127 #endif /*SCONASYNCHANDLER_H_*/ |