|
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: DS Dummy dataprovider |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CNSMLDUMMYDATAPROVIDER_H |
|
19 #define CNSMLDUMMYDATAPROVIDER_H |
|
20 |
|
21 // EXTERNAL INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 |
|
25 // INTERNAL INCLUDES |
|
26 #include "nsmlcontactsdataprovider.h" |
|
27 |
|
28 // CONSTANTS |
|
29 const TUint KNSmlDummyAdapterImplUid = 0x2002DC7E; |
|
30 |
|
31 |
|
32 |
|
33 // CLASS DEFINITION |
|
34 /** |
|
35 * Dataprovider class for Dummy adapters |
|
36 * @lib nsmldummydataprovider.lib |
|
37 * @since 5.0 |
|
38 */ |
|
39 class CNSmlDummyDataProvider : public CNSmlContactsDataProvider |
|
40 { |
|
41 |
|
42 private: // Friend class definitions |
|
43 friend class CNSmlDummyDataProvider_Test; |
|
44 |
|
45 public: // Constructors and destructor |
|
46 static CNSmlDummyDataProvider* NewL(); |
|
47 static CNSmlDummyDataProvider* NewLC(); |
|
48 ~CNSmlDummyDataProvider(); |
|
49 |
|
50 protected: // Constructors |
|
51 CNSmlDummyDataProvider(); |
|
52 void ConstructL(); |
|
53 |
|
54 protected: // CSmlDataProvider |
|
55 /** |
|
56 * Not supported currently. |
|
57 * When framework event occurs this method is called with type of |
|
58 * the event TsmlFrameworkEvent and additional parameters aParam1 |
|
59 * and aParam2. |
|
60 */ |
|
61 void DoOnFrameworkEvent( TSmlFrameworkEvent aFrameworkEvent, |
|
62 TInt aParam1, TInt aParam2 ); |
|
63 |
|
64 /** |
|
65 * Returns True if operation of id aOpId is supported otherwise |
|
66 * returns False. Supported operations are KUidSmlSupportBatch |
|
67 * and KUidSmlSupportMultipleStores |
|
68 */ |
|
69 TBool DoSupportsOperation( TUid aOpId ) const; |
|
70 |
|
71 /** |
|
72 * Reads CDP's DataStoreFormat from resources. |
|
73 */ |
|
74 const CSmlDataStoreFormat& DoStoreFormatL(); |
|
75 |
|
76 /** |
|
77 * Reads all Contact database names from client. |
|
78 * This calls CNSmlContactsDataStore method DoListStoresLC(). |
|
79 */ |
|
80 CDesCArray* DoListStoresLC(); |
|
81 |
|
82 /** |
|
83 * Reads default database name from client. This calls |
|
84 * CNSmlContactsDataStore method DoGetDefaultFileNameL(). |
|
85 */ |
|
86 const TDesC& DoDefaultStoreL(); |
|
87 |
|
88 /** |
|
89 * Creates new CSmlDataStore datastore instance |
|
90 */ |
|
91 CSmlDataStore* DoNewStoreInstanceLC(); |
|
92 |
|
93 /** |
|
94 * Not supported on CDP. |
|
95 * (Returns the set of filters that can be used to send to the |
|
96 * SyncML server.) |
|
97 */ |
|
98 const RPointerArray< CSyncMLFilter >& DoSupportedServerFiltersL(); |
|
99 |
|
100 /** |
|
101 * Not supported on CDP. |
|
102 * (The set of filters that can be used to send to the SyncML |
|
103 * server filtered with the set of keywords supported by the server.) |
|
104 * |
|
105 */ |
|
106 void DoCheckSupportedServerFiltersL( |
|
107 const CSmlDataStoreFormat& aServerDataStoreFormat, |
|
108 RPointerArray< CSyncMLFilter >& aFilters, |
|
109 TSyncMLFilterChangeInfo& aChangeInfo ); |
|
110 |
|
111 /** |
|
112 * Not supported on CDP. |
|
113 */ |
|
114 void DoCheckServerFiltersL( RPointerArray< CSyncMLFilter >& aFilters, |
|
115 TSyncMLFilterChangeInfo& aChangeInfo ); |
|
116 |
|
117 /** |
|
118 * Not supported on CDP |
|
119 * (Generates a record filter query to be sent to the SyncML server |
|
120 * for the provided filters.) |
|
121 */ |
|
122 HBufC* DoGenerateRecordFilterQueryLC( |
|
123 const RPointerArray< CSyncMLFilter >& aFilters, |
|
124 TSyncMLFilterMatchType aMatch, TDes& aFilterMimeType, |
|
125 TSyncMLFilterType& aFilterType, TDesC& aStoreName ); |
|
126 |
|
127 /** |
|
128 * Not supported on CDP |
|
129 * (Generates a field filter query to be sent to the SyncML server |
|
130 * for the provided filters.) |
|
131 */ |
|
132 void DoGenerateFieldFilterQueryL( |
|
133 const RPointerArray< CSyncMLFilter >& aFilters, |
|
134 TDes& aFilterMimeType, |
|
135 RPointerArray< CSmlDataProperty >& aProperties, TDesC& aStoreName ); |
|
136 |
|
137 const TDesC& GetStoreFormatResourceFileL() const; |
|
138 CNSmlContactsDataStore* CreateDataStoreLC() const; |
|
139 |
|
140 }; |
|
141 |
|
142 |
|
143 #endif // CNSMLDUMMYDATAPROVIDER_H |
|
144 |
|
145 // End of file |