|
1 /* |
|
2 * Copyright (c) 2002-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: Implementation of Rights Object Server side MTM |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #if !defined(__MSVENTRY_H__) |
|
22 #include <msventry.h> |
|
23 #endif |
|
24 |
|
25 #if !defined(__TXTRICH_H__) |
|
26 #include <txtrich.h> |
|
27 #endif |
|
28 |
|
29 #include "RoMtmSer.h" |
|
30 |
|
31 // EXTERNAL DATA STRUCTURES |
|
32 // EXTERNAL FUNCTION PROTOTYPES |
|
33 // CONSTANTS |
|
34 // MACROS |
|
35 // LOCAL CONSTANTS AND MACROS |
|
36 // MODULE DATA STRUCTURES |
|
37 // LOCAL FUNCTION PROTOTYPES |
|
38 // FORWARD DECLARATIONS |
|
39 |
|
40 |
|
41 // ============================= LOCAL FUNCTIONS =============================== |
|
42 // |
|
43 // --------------------------------------------------------- |
|
44 // E32Dll implements |
|
45 // function that is called when a dll is loaded. |
|
46 // This function must be present in all dlls. |
|
47 // Returns: error code: KErrNone |
|
48 // |
|
49 |
|
50 |
|
51 // ============================ MEMBER FUNCTIONS =============================== |
|
52 // ----------------------------------------------------------------------------- |
|
53 // CRightsObjectServerMtm::CRightsObjectServerMtm |
|
54 // C++ default constructor can NOT contain any code, that |
|
55 // might leave. |
|
56 // ----------------------------------------------------------------------------- |
|
57 // |
|
58 CRightsObjectServerMtm::CRightsObjectServerMtm( CRegisteredMtmDll& aRegisteredMtmDll , CMsvServerEntry* aInitialEntry ) |
|
59 : CBaseServerMtm( aRegisteredMtmDll , aInitialEntry ) |
|
60 { |
|
61 } |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CRightsObjectServerMtm::ConstructL |
|
65 // Symbian 2nd phase constructor can leave. |
|
66 // ----------------------------------------------------------------------------- |
|
67 // |
|
68 void CRightsObjectServerMtm::ConstructL() |
|
69 { |
|
70 CActiveScheduler::Add( this ); |
|
71 } |
|
72 |
|
73 // ----------------------------------------------------------------------------- |
|
74 // CRightsObjectServerMtm::NewL |
|
75 // Two-phased constructor. |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 EXPORT_C CRightsObjectServerMtm* CRightsObjectServerMtm::NewL( CRegisteredMtmDll& aRegisteredMtmDll , CMsvServerEntry* aInitialEntry ) |
|
79 // Exported factory function |
|
80 { |
|
81 CleanupStack::PushL( aInitialEntry ); |
|
82 CRightsObjectServerMtm* self=new ( ELeave ) CRightsObjectServerMtm( aRegisteredMtmDll , aInitialEntry ); |
|
83 CleanupStack::Pop(); |
|
84 CleanupStack::PushL( self ); |
|
85 self->ConstructL(); |
|
86 CleanupStack::Pop(self); |
|
87 return self; |
|
88 } |
|
89 |
|
90 // Destructor |
|
91 CRightsObjectServerMtm::~CRightsObjectServerMtm() |
|
92 { |
|
93 Cancel(); |
|
94 } |
|
95 |
|
96 // |
|
97 // Copy and move functions |
|
98 // |
|
99 |
|
100 // ----------------------------------------------------------------------------- |
|
101 // CRightsObjectServerMtm::CopyToLocalL |
|
102 // |
|
103 // Not supported |
|
104 // |
|
105 // ----------------------------------------------------------------------------- |
|
106 // |
|
107 void CRightsObjectServerMtm::CopyToLocalL( const CMsvEntrySelection& /*aSelection*/ , TMsvId /*aDestination*/ , |
|
108 TRequestStatus& /*aStatus*/ ) |
|
109 // Get remote entries (by copying) |
|
110 { |
|
111 User::Leave( KErrNotSupported ); |
|
112 } |
|
113 |
|
114 // ----------------------------------------------------------------------------- |
|
115 // CRightsObjectServerMtm::CopyFromLocalL |
|
116 // |
|
117 // Not supported |
|
118 // |
|
119 // ----------------------------------------------------------------------------- |
|
120 // |
|
121 void CRightsObjectServerMtm::CopyFromLocalL( const CMsvEntrySelection& /*aSelection*/ , TMsvId /*aDestination*/ , |
|
122 TRequestStatus& /*aStatus*/ ) |
|
123 // Transfer to remote (by copying) |
|
124 { |
|
125 User::Leave( KErrNotSupported ); |
|
126 } |
|
127 |
|
128 // ----------------------------------------------------------------------------- |
|
129 // CRightsObjectServerMtm::CopyWithinServiceL |
|
130 // |
|
131 // Not supported |
|
132 // |
|
133 // ----------------------------------------------------------------------------- |
|
134 // |
|
135 void CRightsObjectServerMtm::CopyWithinServiceL( const CMsvEntrySelection& /*aSelection*/ , TMsvId /*aDestination*/ , |
|
136 TRequestStatus& /*aStatus*/ ) |
|
137 // Copy entries within service |
|
138 { |
|
139 User::Leave( KErrNotSupported ); |
|
140 } |
|
141 |
|
142 // ----------------------------------------------------------------------------- |
|
143 // CRightsObjectServerMtm::MoveToLocalL |
|
144 // |
|
145 // Not supported |
|
146 // |
|
147 // ----------------------------------------------------------------------------- |
|
148 // |
|
149 void CRightsObjectServerMtm::MoveToLocalL( const CMsvEntrySelection& /*aSelection*/ , TMsvId /*aDestination*/ , |
|
150 TRequestStatus& /*aStatus*/ ) |
|
151 // Get remote entries (by moving) |
|
152 { |
|
153 User::Leave( KErrNotSupported ); |
|
154 } |
|
155 |
|
156 // ----------------------------------------------------------------------------- |
|
157 // CRightsObjectServerMtm::MoveFromLocalL |
|
158 // |
|
159 // Not supported |
|
160 // |
|
161 // ----------------------------------------------------------------------------- |
|
162 // |
|
163 void CRightsObjectServerMtm::MoveFromLocalL( const CMsvEntrySelection& /*aSelection*/ , TMsvId /*aDestination*/ , |
|
164 TRequestStatus& /*aStatus*/ ) |
|
165 // Transfer to remote (by moving) |
|
166 { |
|
167 User::Leave( KErrNotSupported ); |
|
168 } |
|
169 |
|
170 // ----------------------------------------------------------------------------- |
|
171 // CRightsObjectServerMtm::MoveWithinServiceL |
|
172 // |
|
173 // Not supported |
|
174 // |
|
175 // ----------------------------------------------------------------------------- |
|
176 // |
|
177 void CRightsObjectServerMtm::MoveWithinServiceL( const CMsvEntrySelection& /*aSelection*/ , TMsvId /*aDestination*/ , |
|
178 TRequestStatus& /*aStatus*/ ) |
|
179 // Move entries within service |
|
180 { |
|
181 User::Leave( KErrNotSupported ); |
|
182 } |
|
183 |
|
184 // |
|
185 // Create, change, delete functions |
|
186 // |
|
187 |
|
188 // ----------------------------------------------------------------------------- |
|
189 // CRightsObjectServerMtm::DeleteAllL |
|
190 // |
|
191 // Not supported |
|
192 // |
|
193 // ----------------------------------------------------------------------------- |
|
194 // |
|
195 void CRightsObjectServerMtm::DeleteAllL( const CMsvEntrySelection& /*aSelection*/ , TRequestStatus& /*aStatus*/ ) |
|
196 // Delete entries recursively |
|
197 { |
|
198 User::Leave( KErrNotSupported ); |
|
199 } |
|
200 |
|
201 // ----------------------------------------------------------------------------- |
|
202 // CRightsObjectServerMtm::CreateL |
|
203 // |
|
204 // Not supported |
|
205 // |
|
206 // ----------------------------------------------------------------------------- |
|
207 // |
|
208 void CRightsObjectServerMtm::CreateL(TMsvEntry /*aNewEntry*/, TRequestStatus& /*aStatus*/ ) |
|
209 // Remote creation (other than by copying) not supported |
|
210 // |
|
211 { |
|
212 User::Leave( KErrNotSupported ); |
|
213 } |
|
214 |
|
215 // ----------------------------------------------------------------------------- |
|
216 // CRightsObjectServerMtm::ChangeL |
|
217 // |
|
218 // Not supported |
|
219 // |
|
220 // ----------------------------------------------------------------------------- |
|
221 // |
|
222 void CRightsObjectServerMtm::ChangeL(TMsvEntry /*aNewEntry*/ , TRequestStatus& /*aStatus*/ ) |
|
223 // Change entry |
|
224 // |
|
225 // This function could change file names in the file system. It would then also have |
|
226 // to change the details field of all the children of a changed folder name. |
|
227 // Not supported for now. |
|
228 // |
|
229 { |
|
230 User::Leave( KErrNotSupported ); |
|
231 } |
|
232 |
|
233 |
|
234 |
|
235 // |
|
236 // Command and progress functions |
|
237 // |
|
238 |
|
239 // ----------------------------------------------------------------------------- |
|
240 // CRightsObjectServerMtm::StartCommandL |
|
241 // |
|
242 // Not supported |
|
243 // |
|
244 // ----------------------------------------------------------------------------- |
|
245 // |
|
246 void CRightsObjectServerMtm::StartCommandL( |
|
247 CMsvEntrySelection& /*aSelection*/ , |
|
248 TInt /*aCommand*/ , |
|
249 const TDesC8& /*aParameter*/, |
|
250 TRequestStatus& /*aStatus*/ |
|
251 ) |
|
252 // Run MTM-specific command on selection of entries |
|
253 // Only command supported is Refresh |
|
254 { |
|
255 User::Leave( KErrNotSupported ); |
|
256 } |
|
257 |
|
258 // ----------------------------------------------------------------------------- |
|
259 // CRightsObjectServerMtm::CommandExpected |
|
260 // |
|
261 // Not supported |
|
262 // |
|
263 // ----------------------------------------------------------------------------- |
|
264 // |
|
265 TBool CRightsObjectServerMtm::CommandExpected() |
|
266 // Prevent object deletion on command completion |
|
267 // Allow unloading |
|
268 { |
|
269 return ETrue; |
|
270 } |
|
271 |
|
272 // ----------------------------------------------------------------------------- |
|
273 // CRightsObjectServerMtm::Progress |
|
274 // |
|
275 // Not supported |
|
276 // |
|
277 // ----------------------------------------------------------------------------- |
|
278 // |
|
279 const TDesC8& CRightsObjectServerMtm::Progress() |
|
280 // Pass-back progress information |
|
281 { |
|
282 return KNullDesC8; |
|
283 } |
|
284 |
|
285 // |
|
286 // Active object completion functions |
|
287 // |
|
288 |
|
289 // ----------------------------------------------------------------------------- |
|
290 // CRightsObjectServerMtm::DoCancel |
|
291 // |
|
292 // Not supported |
|
293 // |
|
294 // ----------------------------------------------------------------------------- |
|
295 // |
|
296 void CRightsObjectServerMtm::DoCancel() |
|
297 // Cancel current operation |
|
298 { |
|
299 } |
|
300 |
|
301 // ----------------------------------------------------------------------------- |
|
302 // CRightsObjectServerMtm::DoComplete |
|
303 // |
|
304 // Not supported |
|
305 // |
|
306 // ----------------------------------------------------------------------------- |
|
307 // |
|
308 void CRightsObjectServerMtm::DoComplete(TInt /*aError*/ ) |
|
309 // Active object complete leave handler |
|
310 // |
|
311 // Never expect this to be called |
|
312 // as CRightsObjectServerMtm::DoRunL() does not leave |
|
313 { |
|
314 } |
|
315 |
|
316 // ----------------------------------------------------------------------------- |
|
317 // CRightsObjectServerMtm::DoRunL |
|
318 // |
|
319 // Not supported |
|
320 // |
|
321 // ----------------------------------------------------------------------------- |
|
322 // |
|
323 void CRightsObjectServerMtm::DoRunL() |
|
324 // Active object completion |
|
325 // |
|
326 // Run is used in this object to clean up after operations have finished. |
|
327 // |
|
328 { |
|
329 } |
|
330 |
|
331 |
|
332 |