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 |
|
18 #ifndef C_NSML_DEFAULTAGENDAHANDLER_PLUGIN_H |
|
19 #define C_NSML_DEFAULTAGENDAHANDLER_PLUGIN_H |
|
20 |
|
21 #include <s32mem.h> |
|
22 #include <e32def.h> |
|
23 #include <nsmlagendaadapterhandler.h> |
|
24 #include <data_caging_path_literals.hrh> |
|
25 |
|
26 // CONSTANTS |
|
27 _LIT( KNSmlDefaultAgendaHandlerRsc_1_2,"z:NSMLDEFAULTAGENDAHANDLER_1_2.RSC" ); |
|
28 const TUid KCRUidNSmlDSApp = { 0x101F9A1D }; |
|
29 const TInt KArrayGranularity = 30; |
|
30 |
|
31 _LIT8( KNSmlDataObjectCREATED, "CREATED" ); |
|
32 _LIT8( KNSmlDataObjectNAME, "NAME" ); |
|
33 _LIT8( KNSmlDataObjectMODIFIED, "MODIFIED" ); |
|
34 |
|
35 struct TNSmlServerSupportsForFolder |
|
36 { |
|
37 TBool iSSName; |
|
38 TBool iSSCreated; |
|
39 TBool iSSModified; |
|
40 }; |
|
41 |
|
42 // FORWARD DECLARATIONS |
|
43 class CNSmlDefaultAgendaHandlerUtil; |
|
44 class CCalSession; |
|
45 |
|
46 /** |
|
47 * This class represents the Adapter Object plugin |
|
48 * It is used by ECoM client to initialize calendar notifier |
|
49 * |
|
50 * @lib nsmloviagendaadapter.lib |
|
51 */ |
|
52 class CNSmlDefaultAgendaHandlerPlugin: public CNSmlAgendaAdapterHandler |
|
53 { |
|
54 public: |
|
55 /** |
|
56 * Two phase construction |
|
57 */ |
|
58 IMPORT_C static CNSmlDefaultAgendaHandlerPlugin* NewL(); |
|
59 |
|
60 /** |
|
61 * Destructor |
|
62 */ |
|
63 ~CNSmlDefaultAgendaHandlerPlugin(); |
|
64 |
|
65 private: |
|
66 /** |
|
67 * C++ constructor - not exported; |
|
68 * implicitly called from NewLC() |
|
69 */ |
|
70 CNSmlDefaultAgendaHandlerPlugin::CNSmlDefaultAgendaHandlerPlugin(); |
|
71 |
|
72 void ConstructL(); |
|
73 |
|
74 /** |
|
75 * Inherited from CAgendaAdapterHandler |
|
76 * |
|
77 * @param |
|
78 */ |
|
79 void CheckServerSupportForFolder( const CSmlDataStoreFormat& aServerDataStoreFormat ); |
|
80 |
|
81 void FetchFolderL( const TSmlDbItemUid aUid, RBufWriteStream& aStream ); |
|
82 |
|
83 void SynchronizableCalendarIdsL( CArrayFixFlat<TUint>* aFolderUidArray ); |
|
84 |
|
85 TCalLocalUid CreateFolderL( RBufReadStream& aStream ); |
|
86 |
|
87 void ReplaceFolderL( const TCalLocalUid& aUid, RBufReadStream& aStream, TBool& aSyncStatus ); |
|
88 |
|
89 HBufC* FolderNameL( TSmlDbItemUid aUid ); |
|
90 |
|
91 CSmlDataStoreFormat* StoreFormatL( RStringPool& aStringPool ); |
|
92 |
|
93 TInt DeviceSyncOwner(); |
|
94 |
|
95 TBool FolderSyncStatusL( TSmlDbItemUid aUid ); |
|
96 |
|
97 TBool FolderSyncStatusL( HBufC* aFolderName ); |
|
98 |
|
99 TNSmlSnapshotItem CreateFolderSnapShotItemL( const TCalLocalUid& aUid ); |
|
100 |
|
101 public: |
|
102 |
|
103 void SynchronizableCalEntryIdsL( CCalSession* aCalSession, TCalLocalUid aUId, RArray<TCalLocalUid>& aUidArray ); |
|
104 |
|
105 |
|
106 CNSmlDefaultAgendaHandlerUtil* CalendarInfoL( TSmlDbItemUid aUid ); |
|
107 |
|
108 CNSmlDefaultAgendaHandlerUtil* ParseFolderDataL( RBufReadStream& aStream ); |
|
109 |
|
110 public: |
|
111 |
|
112 private: |
|
113 |
|
114 TNSmlServerSupportsForFolder iServerSupportsForFolder; |
|
115 |
|
116 }; |
|
117 |
|
118 # endif // C_NSML_DEFAULTAGENDAHANDLER_PLUGIN_H |
|