|
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_NSMLAGENDA_ADAPTERHANDLERPLUGIN_H |
|
19 #define C_NSMLAGENDA_ADAPTERHANDLERPLUGIN_H |
|
20 |
|
21 // SYSTEM INCLUDES |
|
22 #include <e32base.h> |
|
23 #include <s32mem.h> |
|
24 #include <ecom.h> |
|
25 #include <SmlDataFormat.h> |
|
26 #include <nsmlchangefinder.h> |
|
27 #include <calcalendarinfo.h> |
|
28 #include <e32cmn.h> |
|
29 |
|
30 // Constants |
|
31 const TUid KAgendaAdapterHandlerInterfaceUid = { 0x20029F14 }; |
|
32 |
|
33 /** |
|
34 * Interface definition for ECoM plug-in adapters |
|
35 */ |
|
36 class CNSmlAgendaAdapterHandler: public CBase |
|
37 { |
|
38 public: |
|
39 /** |
|
40 * Ecom interface static factory method implementation. |
|
41 * @param aImpUid Ecom's implementation uid |
|
42 * @return A pointer to the created instance of CNSmlAgendaAdapterHandler |
|
43 */ |
|
44 static inline CNSmlAgendaAdapterHandler* NewL(TUid aImpUid); |
|
45 |
|
46 /** |
|
47 * Destructor |
|
48 */ |
|
49 virtual ~CNSmlAgendaAdapterHandler(); |
|
50 |
|
51 public: |
|
52 /** |
|
53 * Determines the Server supported folder properties |
|
54 * |
|
55 * @param aServerDataStoreFormat Class structure of server device information |
|
56 * |
|
57 */ |
|
58 virtual void CheckServerSupportForFolder( const CSmlDataStoreFormat& aServerDataStoreFormat ) = 0; |
|
59 |
|
60 /** |
|
61 * Retrieve the folder from the Organizer db |
|
62 * |
|
63 * @param aUid variable specifing which Folder to be fetched |
|
64 * @param aStream on return will have the Folder details |
|
65 * |
|
66 */ |
|
67 virtual void FetchFolderL( const TSmlDbItemUid aUid, RBufWriteStream& aStream ) = 0; |
|
68 |
|
69 /** |
|
70 * Determine the list of folders in the Organizer db owned by the calling application |
|
71 * |
|
72 * @param aFolderUidArray array on return will have UID's of owned folders |
|
73 * |
|
74 */ |
|
75 virtual void SynchronizableCalendarIdsL( CArrayFixFlat<TUint>* aFolderUidArray ) = 0; |
|
76 |
|
77 /** |
|
78 * Create a folder on to Organizer db |
|
79 * |
|
80 * @param aStream containing the folder details to be created with |
|
81 * @return TCalLocalUid of the newly created folder |
|
82 * |
|
83 */ |
|
84 virtual TCalLocalUid CreateFolderL( RBufReadStream& aStream ) = 0; |
|
85 |
|
86 /** |
|
87 * Replace the existing folder with updated info |
|
88 * |
|
89 * @param aUid determines folder to act upon |
|
90 * @param aStream containing the folder information to be updated |
|
91 * @param aSyncStatus updated folders current syncstatus |
|
92 * |
|
93 */ |
|
94 virtual void ReplaceFolderL( const TCalLocalUid& aUid, RBufReadStream& aStream, TBool& aSyncStatus ) = 0; |
|
95 |
|
96 /** |
|
97 * Retrieves the foldername |
|
98 * |
|
99 * @param aUid of the folder whose name to be determined |
|
100 * @return HBufC* name of the folder |
|
101 * |
|
102 */ |
|
103 virtual HBufC* FolderNameL( TSmlDbItemUid aUid ) = 0; |
|
104 |
|
105 /** |
|
106 * Retrieve the calendar sync capability supported by the device |
|
107 * |
|
108 * @param aStringPool |
|
109 * @return CSmlDataStoreFormat* Class structure of supported capabilities |
|
110 * |
|
111 */ |
|
112 virtual CSmlDataStoreFormat* StoreFormatL( RStringPool& aStringPool ) = 0; |
|
113 |
|
114 /** |
|
115 * Create a snap shot item |
|
116 * |
|
117 * @param aUid of folder whose snapshot to be created |
|
118 * @retrun TNSmlSnapshotItem class |
|
119 * |
|
120 */ |
|
121 virtual TNSmlSnapshotItem CreateFolderSnapShotItemL( const TCalLocalUid& aUid ) = 0; |
|
122 |
|
123 /** |
|
124 * Determine the folder owner |
|
125 * |
|
126 * @return TInt uid of the owner application |
|
127 * |
|
128 */ |
|
129 virtual TInt DeviceSyncOwner() = 0; |
|
130 |
|
131 /** |
|
132 * Determines the sync status of the folder |
|
133 * |
|
134 * @param aUid determine the folder whose sync status to be retrieved |
|
135 * @return TBool sync status |
|
136 * |
|
137 */ |
|
138 virtual TBool FolderSyncStatusL( TSmlDbItemUid aUid ) = 0; |
|
139 |
|
140 /** |
|
141 * Determines the sync status of the folder |
|
142 * |
|
143 * @param aFolderName determine the folder whose sync status to be retrieved |
|
144 * @return TBool sync status |
|
145 * |
|
146 */ |
|
147 virtual TBool FolderSyncStatusL( HBufC* aFolderName ) = 0; |
|
148 |
|
149 public: |
|
150 /** |
|
151 * Variable to hold the Plugin's Opaque Data |
|
152 */ |
|
153 HBufC8* iOpaqueData; |
|
154 |
|
155 private: |
|
156 /** |
|
157 * Used internally to create ECOM implementation |
|
158 */ |
|
159 TUid iDtor_ID_Key; |
|
160 |
|
161 }; |
|
162 |
|
163 #include "nsmlagendaadapterhandler.inl" |
|
164 |
|
165 #endif // C_NSMLAGENDA_ADAPTERHANDLERPLUGIN_H |
|
166 |
|
167 // End of File |
|
168 |