|
1 /* |
|
2 * Copyright (c) 2005-2007 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 * Dummy Server Mtm |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __UNIDUMMYSERVERMTM_H |
|
22 #define __UNIDUMMYSERVERMTM_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <mtsr.h> |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 // MACROS |
|
30 |
|
31 // DATA TYPES |
|
32 |
|
33 // FUNCTION PROTOTYPES |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Uni Dummy Server Mtm |
|
41 * This class exists only because of client server architecture. |
|
42 * The class is dummy class for purpose, it does not do anything. |
|
43 * All inherited functions are implemented as KErrNotSupported. |
|
44 */ |
|
45 class CUniDummyServerMtm : public CBaseServerMtm |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 // constructor is private! |
|
49 |
|
50 /** |
|
51 * Factory function. |
|
52 * The only function exported by this polymorphic interface dll.<br> |
|
53 * This function is called by message server when a client asks for |
|
54 * some service from this mtm type |
|
55 * @param aRegisteredMtmDll Reference to Mtm Dll registry class |
|
56 * @param aInitialEntry Service entry. Can be the first entry in |
|
57 * CMsvSelection array in the call from the client, or if |
|
58 * there is no service entry as the first item of the selection, |
|
59 * this will be the default service entry for this type of mtm. |
|
60 * If no default entry has been specified, and the first entry |
|
61 * in the selection is not a service entry, the creation of |
|
62 * server mtm will fail. |
|
63 * @return Pointer to CUniDummyServerMtm class. |
|
64 */ |
|
65 IMPORT_C static CUniDummyServerMtm* NewL( |
|
66 CRegisteredMtmDll& aRegisteredMtmDll, |
|
67 CMsvServerEntry* aInitialEntry ); |
|
68 |
|
69 /** |
|
70 * Destructor. |
|
71 */ |
|
72 ~CUniDummyServerMtm(); |
|
73 |
|
74 public: // Functions from base classes |
|
75 |
|
76 /** |
|
77 * From CBaseServerMtm |
|
78 * Not supported. |
|
79 * @leave KErrNotSupported |
|
80 */ |
|
81 void CopyToLocalL( |
|
82 const CMsvEntrySelection& aSelection, |
|
83 TMsvId aDestination, |
|
84 TRequestStatus& aStatus ); |
|
85 |
|
86 /** |
|
87 * From CBaseServerMtm |
|
88 * Not supported. |
|
89 * @leave KErrNotSupported |
|
90 */ |
|
91 void CopyFromLocalL( |
|
92 const CMsvEntrySelection& aSelection, |
|
93 TMsvId aDestination, |
|
94 TRequestStatus& aStatus ); |
|
95 |
|
96 /** |
|
97 * From CBaseServerMtm |
|
98 * Not supported. |
|
99 * @leave KErrNotSupported |
|
100 */ |
|
101 void CopyWithinServiceL( |
|
102 const CMsvEntrySelection& aSelection, |
|
103 TMsvId aDestination, |
|
104 TRequestStatus& aStatus ); |
|
105 |
|
106 /** |
|
107 * From CBaseServerMtm |
|
108 * Not supported. |
|
109 * @leave KErrNotSupported |
|
110 */ |
|
111 void MoveToLocalL( |
|
112 const CMsvEntrySelection& aSelection, |
|
113 TMsvId aDestination, |
|
114 TRequestStatus& aStatus ); |
|
115 |
|
116 /** |
|
117 * From CBaseServerMtm |
|
118 * Not supported. |
|
119 * @leave KErrNotSupported |
|
120 */ |
|
121 void MoveFromLocalL( |
|
122 const CMsvEntrySelection& aSelection, |
|
123 TMsvId aDestination, |
|
124 TRequestStatus& aStatus ); |
|
125 |
|
126 /** |
|
127 * From CBaseServerMtm |
|
128 * Not supported. |
|
129 * @leave KErrNotSupported |
|
130 */ |
|
131 void MoveWithinServiceL( |
|
132 const CMsvEntrySelection& aSelection, |
|
133 TMsvId aDestination, |
|
134 TRequestStatus& aStatus ); |
|
135 |
|
136 // Create, change, delete |
|
137 |
|
138 /** |
|
139 * From CBaseServerMtm |
|
140 * Not supported. |
|
141 * @leave KErrNotSupported |
|
142 */ |
|
143 void DeleteAllL( |
|
144 const CMsvEntrySelection& aSelection, |
|
145 TRequestStatus& aStatus ); |
|
146 |
|
147 /** |
|
148 * From CBaseServerMtm |
|
149 * Not supported. |
|
150 * @leave KErrNotSupported |
|
151 */ |
|
152 void CreateL( TMsvEntry aNewEntry, TRequestStatus& aStatus ); |
|
153 |
|
154 /** |
|
155 * From CBaseServerMtm |
|
156 * Not supported. |
|
157 * @leave KErrNotSupported |
|
158 */ |
|
159 void ChangeL( TMsvEntry aNewEntry, TRequestStatus& aStatus ); |
|
160 |
|
161 // command and progress |
|
162 |
|
163 /** |
|
164 * From CBaseServerMtm |
|
165 * Not supported. |
|
166 * @leave KErrNotSupported |
|
167 */ |
|
168 void StartCommandL( |
|
169 CMsvEntrySelection& aSelection, |
|
170 TInt aCommand, |
|
171 const TDesC8& aParameter, |
|
172 TRequestStatus& aStatus ); |
|
173 |
|
174 /** |
|
175 * From CBaseServerMtm |
|
176 * Not supported. |
|
177 * Returns EFalse |
|
178 */ |
|
179 TBool CommandExpected(); |
|
180 |
|
181 /** |
|
182 * From CBaseServerMtm |
|
183 * Not supported. |
|
184 * Returns KNullDesc |
|
185 */ |
|
186 const TDesC8& Progress(); |
|
187 |
|
188 |
|
189 protected: // Functions from base classes |
|
190 |
|
191 /** |
|
192 * From CActive: Cancel current operation. |
|
193 * The function is not supported. |
|
194 */ |
|
195 void DoCancel(); |
|
196 |
|
197 /** |
|
198 * From CBaseServerMtm: Do work. |
|
199 * The function is not supported. |
|
200 */ |
|
201 void DoRunL(); |
|
202 |
|
203 /** |
|
204 * From CBaseServerMtm: Complete current operation. |
|
205 * The function is not supported. |
|
206 * @param aError Error code to be returned as final status |
|
207 */ |
|
208 void DoComplete( TInt aError ); |
|
209 |
|
210 private: |
|
211 |
|
212 /** |
|
213 * By default Symbian OS constructor is private. |
|
214 */ |
|
215 CUniDummyServerMtm( |
|
216 CRegisteredMtmDll& aRegisteredMtmDll, |
|
217 CMsvServerEntry* aInitialEntry ); |
|
218 |
|
219 // By default, prohibit copy constructor |
|
220 CUniDummyServerMtm( const CUniDummyServerMtm& ); |
|
221 // Prohibit assigment operator |
|
222 CUniDummyServerMtm& operator= ( const CUniDummyServerMtm& ); |
|
223 |
|
224 private: // Data |
|
225 |
|
226 }; |
|
227 |
|
228 #endif // __UNIDUMMYSERVERMTM_H |
|
229 |
|
230 // End of File |