|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // [INCLUDE FILES] - do not remove |
|
20 #include <e32svr.h> |
|
21 #include <f32file.h> |
|
22 #include <bautils.h> |
|
23 #include <StifParser.h> |
|
24 #include <StifTestEventInterface.h> |
|
25 #include <StifTestInterface.h> |
|
26 #include "MonitorPluginTest.h" |
|
27 |
|
28 #include "mdsutils.h" |
|
29 |
|
30 |
|
31 _LIT( KFile1Src, "C:\\Data\\Jpg.jpg" ); |
|
32 _LIT( KFile1Dst, "E:\\Images\\Jpg_copy.jpg" ); |
|
33 _LIT( KFile1Dst2, "C:\\Data\\Images\\Pictures\\Jpg_copy2.jpg" ); |
|
34 _LIT( KFile1Dst3, "C:\\Data\\Images\\Pictures\\Jpg_tmp.jpg" ); |
|
35 _LIT( KFile1Dst4, "T:\\Images\\Jpg_copy.jpg" ); |
|
36 |
|
37 _LIT( KFile2Src, "C:\\Data\\Animated.gif" ); |
|
38 _LIT( KFile2Dst, "E:\\Images\\Animated_copy.gif" ); |
|
39 _LIT( KFile2Dst2, "C:\\Data\\Images\\Pictures\\Animated_copy2.gif" ); |
|
40 _LIT( KFile2Dst3, "C:\\Data\\Images\\Pictures\\Animated_tmp.gif" ); |
|
41 _LIT( KFile2Dst4, "T:\\Images\\Animated_copy.gif" ); |
|
42 |
|
43 _LIT( KFile3Src, "C:\\Data\\H263.3gp" ); |
|
44 _LIT( KFile3Dst, "E:\\Videos\\H263_copy.3gp" ); |
|
45 _LIT( KFile3Dst2, "C:\\Data\\H263_copy2.3gp" ); |
|
46 _LIT( KFile3Dst3, "C:\\Data\\H263_tmp.3gp" ); |
|
47 _LIT( KFile3Dst4, "T:\\Videos\\H263_copy.3gp" ); |
|
48 |
|
49 // ============================ MEMBER FUNCTIONS =============================== |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // CMonitorPluginTest::Delete |
|
53 // Delete here all resources allocated and opened from test methods. |
|
54 // Called from destructor. |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 void CMonitorPluginTest::Delete() |
|
58 { |
|
59 |
|
60 } |
|
61 |
|
62 // ----------------------------------------------------------------------------- |
|
63 // CMonitorPluginTest::RunMethodL |
|
64 // Run specified method. Contains also table of test mothods and their names. |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 TInt CMonitorPluginTest::RunMethodL( |
|
68 CStifItemParser& aItem ) |
|
69 { |
|
70 TestModuleIf().SetBehavior( CTestModuleIf::ETestLeaksHandles ); |
|
71 |
|
72 static TStifFunctionInfo const KFunctions[] = |
|
73 { |
|
74 // Copy this line for every implemented function. |
|
75 // First string is the function name used in TestScripter script file. |
|
76 // Second is the actual implementation member function. |
|
77 |
|
78 ENTRY( "ActiveWait", CMonitorPluginTest::ActiveWait ), |
|
79 ENTRY( "BeginMonitorSession", CMonitorPluginTest::BeginMonitorSessionL ), |
|
80 ENTRY( "EndMonitorSession", CMonitorPluginTest::EndMonitorSession ), |
|
81 ENTRY( "LoadPlugins", CMonitorPluginTest::LoadPluginsL ), |
|
82 ENTRY( "StartMonitoring", CMonitorPluginTest::StartMonitoring ), |
|
83 ENTRY( "PauseMonitoring", CMonitorPluginTest::PauseMonitoring ), |
|
84 ENTRY( "ResumeMonitoring", CMonitorPluginTest::ResumeMonitoring ), |
|
85 ENTRY( "StopMonitoring", CMonitorPluginTest::StopMonitoring ), |
|
86 ENTRY( "CreateEvents", CMonitorPluginTest::CreateEventsL ), |
|
87 ENTRY( "CreateEventsDelete", CMonitorPluginTest::CreateEventsDeleteL ), |
|
88 |
|
89 }; |
|
90 |
|
91 const TInt count = sizeof( KFunctions ) / |
|
92 sizeof( TStifFunctionInfo ); |
|
93 |
|
94 return RunInternalL( KFunctions, count, aItem ); |
|
95 |
|
96 } |
|
97 |
|
98 // ----------------------------------------------------------------------------- |
|
99 // CMonitorPluginTest::MonitorEvent |
|
100 // ----------------------------------------------------------------------------- |
|
101 // |
|
102 void CMonitorPluginTest::MonitorEvent( CHarvesterData* aHarvesterData ) |
|
103 { |
|
104 _LIT( KMsg, "CallBck MonitorEvent"); |
|
105 iLog->Log( KMsg ); |
|
106 RDebug::Print( KMsg ); |
|
107 |
|
108 switch ( aHarvesterData->EventType() ) |
|
109 { |
|
110 case EHarvesterAdd: |
|
111 { |
|
112 _LIT( KAdded, "File added" ); |
|
113 iLog->Log( KAdded ); |
|
114 RDebug::Print( KAdded ); |
|
115 } |
|
116 break; |
|
117 |
|
118 case EHarvesterEdit: |
|
119 { |
|
120 _LIT( KEdited, "File edited" ); |
|
121 iLog->Log( KEdited ); |
|
122 RDebug::Print( KEdited ); |
|
123 } |
|
124 break; |
|
125 |
|
126 case EHarvesterDelete: |
|
127 { |
|
128 _LIT( KDeleted, "File deleted" ); |
|
129 iLog->Log( KDeleted ); |
|
130 RDebug::Print( KDeleted ); |
|
131 } |
|
132 break; |
|
133 |
|
134 case EHarvesterUnknown: |
|
135 { |
|
136 _LIT( KUnknown, "Unknown event" ); |
|
137 iLog->Log( KUnknown ); |
|
138 RDebug::Print( KUnknown ); |
|
139 } |
|
140 break; |
|
141 } |
|
142 |
|
143 // monitor event |
|
144 TEventIf event( TEventIf::ESetEvent, _L("Monitor") ); |
|
145 TestModuleIf().Event( event ); |
|
146 } |
|
147 |
|
148 // ----------------------------------------------------------------------------- |
|
149 // CMonitorPluginTest::MonitorEvent |
|
150 // ----------------------------------------------------------------------------- |
|
151 // |
|
152 void CMonitorPluginTest::MonitorEvent( RPointerArray<CHarvesterData>& aHDArray ) |
|
153 { |
|
154 _LIT( KMsg, "CallBck MonitorEvent"); |
|
155 iLog->Log( KMsg ); |
|
156 RDebug::Print( KMsg ); |
|
157 |
|
158 for( TInt i = 0; i < aHDArray.Count(); i++ ) |
|
159 { |
|
160 CHarvesterData* hd = aHDArray[i]; |
|
161 switch ( hd->EventType() ) |
|
162 { |
|
163 case EHarvesterAdd: |
|
164 { |
|
165 _LIT( KAdded, " Files added." ); |
|
166 iLog->Log( KAdded ); |
|
167 RDebug::Print( KAdded ); |
|
168 } |
|
169 break; |
|
170 |
|
171 case EHarvesterEdit: |
|
172 { |
|
173 _LIT( KEdited, " Files edited." ); |
|
174 iLog->Log( KEdited ); |
|
175 RDebug::Print( KEdited ); |
|
176 } |
|
177 break; |
|
178 |
|
179 case EHarvesterDelete: |
|
180 { |
|
181 _LIT( KDeleted, " Files deleted." ); |
|
182 iLog->Log( KDeleted ); |
|
183 RDebug::Print( KDeleted ); |
|
184 } |
|
185 break; |
|
186 |
|
187 case EHarvesterUnknown: |
|
188 { |
|
189 _LIT( KUnknown, "Unknown event." ); |
|
190 iLog->Log( KUnknown ); |
|
191 RDebug::Print( KUnknown ); |
|
192 } |
|
193 break; |
|
194 } |
|
195 } |
|
196 |
|
197 // monitor event |
|
198 TEventIf event( TEventIf::ESetEvent, _L("Monitor") ); |
|
199 TestModuleIf().Event( event ); |
|
200 } |
|
201 |
|
202 // ----------------------------------------------------------------------------- |
|
203 // CMonitorPluginTest::HandleSessionOpened |
|
204 // ----------------------------------------------------------------------------- |
|
205 // |
|
206 void CMonitorPluginTest::HandleSessionOpened( CMdESession& /*aClient*/, TInt aError ) |
|
207 { |
|
208 _LIT( KMsg, "CallBck HandleSessionOpened - Error code : %d" ); |
|
209 TBuf <100> msg; |
|
210 msg.Format(KMsg, aError); |
|
211 iLog->Log( msg ); |
|
212 RDebug::Print(msg); |
|
213 |
|
214 // session event |
|
215 TEventIf event( TEventIf::ESetEvent, _L("Session") ); |
|
216 TestModuleIf().Event( event ); |
|
217 } |
|
218 |
|
219 // ----------------------------------------------------------------------------- |
|
220 // CMonitorPluginTest::HandleSessionError |
|
221 // ----------------------------------------------------------------------------- |
|
222 // |
|
223 void CMonitorPluginTest::HandleSessionError( CMdESession& /*aClient*/, TInt aError ) |
|
224 { |
|
225 _LIT( KMsg, "CallBck HandleSessionError - Error code : %d" ); |
|
226 TBuf <100> msg; |
|
227 msg.Format(KMsg, aError); |
|
228 iLog->Log( msg ); |
|
229 RDebug::Print(msg); |
|
230 |
|
231 // session event |
|
232 TEventIf event( TEventIf::ESetEvent, _L("Session") ); |
|
233 TestModuleIf().Event( event ); |
|
234 } |
|
235 |
|
236 // ----------------------------------------------------------------------------- |
|
237 // CMonitorPluginTest::ActiveWait |
|
238 // ----------------------------------------------------------------------------- |
|
239 // |
|
240 TInt CMonitorPluginTest::ActiveWait( CStifItemParser& /* aItem */ ) |
|
241 { |
|
242 _LIT( KMsg1, "Enter ActiveWait" ); |
|
243 iLog->Log( KMsg1 ); |
|
244 RDebug::Print( KMsg1 ); |
|
245 |
|
246 // 2,5 seconds |
|
247 TTimeIntervalMicroSeconds32 timeout( 2500000 ); |
|
248 RTimer timer; |
|
249 TRequestStatus status; |
|
250 |
|
251 timer.CreateLocal(); |
|
252 timer.After(status,timeout); |
|
253 |
|
254 User::WaitForAnyRequest(); |
|
255 |
|
256 timer.Close(); |
|
257 |
|
258 _LIT( KMsg2, "Exit ActiveWait" ); |
|
259 iLog->Log( KMsg2 ); |
|
260 RDebug::Print( KMsg2 ); |
|
261 |
|
262 return KErrNone; |
|
263 } |
|
264 |
|
265 // ----------------------------------------------------------------------------- |
|
266 // CMonitorPluginTest::ActiveWait |
|
267 // ----------------------------------------------------------------------------- |
|
268 // |
|
269 void CMonitorPluginTest::ActiveWait2() |
|
270 { |
|
271 _LIT( KMsg1, "Enter ActiveWait2" ); |
|
272 iLog->Log( KMsg1 ); |
|
273 RDebug::Print( KMsg1 ); |
|
274 |
|
275 // 2,5 seconds |
|
276 TTimeIntervalMicroSeconds32 timeout( 2500000 ); |
|
277 RTimer timer; |
|
278 TRequestStatus status; |
|
279 |
|
280 timer.CreateLocal(); |
|
281 timer.After(status,timeout); |
|
282 |
|
283 User::WaitForRequest( status); |
|
284 |
|
285 timer.Close(); |
|
286 |
|
287 _LIT( KMsg2, "Exit ActiveWait2" ); |
|
288 iLog->Log( KMsg2 ); |
|
289 RDebug::Print( KMsg2 ); |
|
290 } |
|
291 |
|
292 // ----------------------------------------------------------------------------- |
|
293 // CMonitorPluginTest::BeginMonitorSessionL |
|
294 // ----------------------------------------------------------------------------- |
|
295 // |
|
296 TInt CMonitorPluginTest::BeginMonitorSessionL( CStifItemParser& /* aItem */ ) |
|
297 { |
|
298 iMdEClient = NULL; |
|
299 TRAPD( error, iMdEClient = CMdESession::NewL( *this ) ); |
|
300 |
|
301 _LIT( KMsg, "Exit BeginMonitorSession - Error code : %d" ); |
|
302 TBuf <100> msg; |
|
303 msg.Format( KMsg, error); |
|
304 iLog->Log( msg ); |
|
305 RDebug::Print( msg ); |
|
306 |
|
307 User::LeaveIfError( error ); |
|
308 |
|
309 return KErrNone; |
|
310 } |
|
311 |
|
312 // ----------------------------------------------------------------------------- |
|
313 // CMonitorPluginTest::EndMonitorSession |
|
314 // ----------------------------------------------------------------------------- |
|
315 // |
|
316 TInt CMonitorPluginTest::EndMonitorSession( CStifItemParser& /* aItem */ ) |
|
317 { |
|
318 _LIT( KMsg1, "Enter EndMonitorSession" ); |
|
319 iLog->Log( KMsg1 ); |
|
320 RDebug::Print( KMsg1 ); |
|
321 |
|
322 iPluginArray.ResetAndDestroy(); |
|
323 iPluginArray.Close(); |
|
324 |
|
325 if ( iMdEClient ) |
|
326 { |
|
327 delete iMdEClient; |
|
328 iMdEClient = NULL; |
|
329 } |
|
330 |
|
331 REComSession::FinalClose(); |
|
332 |
|
333 _LIT( KMsg2, "Exit EndMonitorSession" ); |
|
334 iLog->Log( KMsg2 ); |
|
335 RDebug::Print( KMsg2 ); |
|
336 |
|
337 return KErrNone; |
|
338 } |
|
339 |
|
340 // ----------------------------------------------------------------------------- |
|
341 // CMonitorPluginTest::LoadPluginsL |
|
342 // ----------------------------------------------------------------------------- |
|
343 // |
|
344 TInt CMonitorPluginTest::LoadPluginsL( CStifItemParser& /* aItem */ ) |
|
345 { |
|
346 _LIT( KMsg1, "Enter LoadPlugins" ); |
|
347 iLog->Log( KMsg1 ); |
|
348 RDebug::Print( KMsg1 ); |
|
349 |
|
350 RImplInfoPtrArray infoArray; |
|
351 |
|
352 TCleanupItem cleanupItem(MdsUtils::CleanupEComArray, &infoArray); |
|
353 CleanupStack::PushL(cleanupItem); |
|
354 |
|
355 CMonitorPlugin::ListImplementationsL(infoArray); |
|
356 TInt count( 0 ); |
|
357 count = infoArray.Count(); |
|
358 |
|
359 for (TInt i=0; i < count; i++) |
|
360 { |
|
361 TUid uid = infoArray[i]->ImplementationUid(); // Create the plug-ins |
|
362 iPluginArray.AppendL( CMonitorPlugin::NewL( uid ) ); // and add them to array |
|
363 } |
|
364 |
|
365 CleanupStack::PopAndDestroy(&infoArray); // infoArray, results in a call to CleanupEComArray |
|
366 |
|
367 if( iPluginArray.Count() == 0 ) |
|
368 { |
|
369 return KErrNotFound; |
|
370 } |
|
371 |
|
372 _LIT( KMsg2, "Exit LoadPlugins" ); |
|
373 iLog->Log( KMsg2 ); |
|
374 RDebug::Print( KMsg2 ); |
|
375 |
|
376 return KErrNone; |
|
377 } |
|
378 |
|
379 // ----------------------------------------------------------------------------- |
|
380 // CMonitorPluginTest::StartMonitoring |
|
381 // ----------------------------------------------------------------------------- |
|
382 // |
|
383 TInt CMonitorPluginTest::StartMonitoring( CStifItemParser& /* aItem */ ) |
|
384 { |
|
385 _LIT( KMsg1, "Enter StartMonitoring" ); |
|
386 iLog->Log( KMsg1 ); |
|
387 RDebug::Print( KMsg1 ); |
|
388 |
|
389 TInt count( iPluginArray.Count() ); |
|
390 |
|
391 for (TInt i=0; i < count; i++) |
|
392 { |
|
393 iPluginArray[i]->StartMonitoring( *this, iMdEClient, NULL, NULL ); |
|
394 } |
|
395 |
|
396 _LIT( KMsg2, "Exit StartMonitoring" ); |
|
397 iLog->Log( KMsg2 ); |
|
398 RDebug::Print( KMsg2 ); |
|
399 |
|
400 return KErrNone; |
|
401 } |
|
402 |
|
403 // ----------------------------------------------------------------------------- |
|
404 // CMonitorPluginTest::PauseMonitoring |
|
405 // ----------------------------------------------------------------------------- |
|
406 // |
|
407 TInt CMonitorPluginTest::PauseMonitoring( CStifItemParser& /* aItem */ ) |
|
408 { |
|
409 _LIT( KMsg1, "Enter PauseMonitoring" ); |
|
410 iLog->Log( KMsg1 ); |
|
411 RDebug::Print( KMsg1 ); |
|
412 |
|
413 TInt count( iPluginArray.Count() ); |
|
414 |
|
415 for (TInt i = 0; i < count; i++ ) |
|
416 { |
|
417 iPluginArray[i]->PauseMonitoring(); |
|
418 } |
|
419 |
|
420 _LIT( KMsg2, "Exit PauseMonitoring" ); |
|
421 iLog->Log( KMsg2 ); |
|
422 RDebug::Print( KMsg2 ); |
|
423 |
|
424 return KErrNone; |
|
425 } |
|
426 |
|
427 // ----------------------------------------------------------------------------- |
|
428 // CMonitorPluginTest::ResumeMonitoring |
|
429 // ----------------------------------------------------------------------------- |
|
430 // |
|
431 TInt CMonitorPluginTest::ResumeMonitoring( CStifItemParser& /* aItem */ ) |
|
432 { |
|
433 _LIT( KMsg1, "Enter ResumeMonitoring" ); |
|
434 iLog->Log( KMsg1 ); |
|
435 RDebug::Print( KMsg1 ); |
|
436 |
|
437 TInt count( iPluginArray.Count() ); |
|
438 |
|
439 for (TInt i=0; i < count; i++) |
|
440 { |
|
441 iPluginArray[i]->ResumeMonitoring( *this, iMdEClient, NULL, NULL ); |
|
442 } |
|
443 |
|
444 _LIT( KMsg2, "Exit ResumeMonitoring" ); |
|
445 iLog->Log( KMsg2 ); |
|
446 RDebug::Print( KMsg2 ); |
|
447 |
|
448 return KErrNone; |
|
449 } |
|
450 |
|
451 // ----------------------------------------------------------------------------- |
|
452 // CMonitorPluginTest::StopMonitoring |
|
453 // ----------------------------------------------------------------------------- |
|
454 // |
|
455 TInt CMonitorPluginTest::StopMonitoring( CStifItemParser& /* aItem */ ) |
|
456 { |
|
457 _LIT( KMsg1, "Enter StopMonitoring" ); |
|
458 iLog->Log( KMsg1 ); |
|
459 RDebug::Print( KMsg1 ); |
|
460 |
|
461 TInt count( iPluginArray.Count() ); |
|
462 |
|
463 for (TInt i=0; i < count; i++) |
|
464 { |
|
465 iPluginArray[i]->StopMonitoring(); |
|
466 } |
|
467 |
|
468 ActiveWait2(); |
|
469 |
|
470 _LIT( KMsg2, "Exit StopMonitoring" ); |
|
471 iLog->Log( KMsg2 ); |
|
472 RDebug::Print( KMsg2 ); |
|
473 |
|
474 return KErrNone; |
|
475 } |
|
476 |
|
477 // ----------------------------------------------------------------------------- |
|
478 // CMonitorPluginTest::CreateEvents |
|
479 // ----------------------------------------------------------------------------- |
|
480 // |
|
481 TInt CMonitorPluginTest::CreateEventsL( CStifItemParser& /* aItem */ ) |
|
482 { |
|
483 _LIT( KMsg1, "Enter CreateEvents" ); |
|
484 iLog->Log( KMsg1 ); |
|
485 RDebug::Print( KMsg1 ); |
|
486 |
|
487 RFs fs; |
|
488 User::LeaveIfError( fs.Connect() ); |
|
489 |
|
490 BaflUtils::CopyFile( fs, KFile1Src, KFile1Dst2 ); |
|
491 BaflUtils::CopyFile( fs, KFile2Src, KFile2Dst2 ); |
|
492 BaflUtils::CopyFile( fs, KFile3Src, KFile3Dst2 ); |
|
493 |
|
494 fs.Rename( KFile1Dst2, KFile1Dst3 ); |
|
495 fs.Rename( KFile2Dst2, KFile2Dst3 ); |
|
496 fs.Rename( KFile3Dst2, KFile3Dst3 ); |
|
497 |
|
498 fs.Replace( KFile1Dst3, KFile1Dst2 ); |
|
499 fs.Replace( KFile2Dst3, KFile2Dst2 ); |
|
500 fs.Replace( KFile3Dst3, KFile3Dst2 ); |
|
501 |
|
502 // MMC stuff |
|
503 if( fs.IsValidDrive( EDriveE ) ) |
|
504 { |
|
505 fs.RemountDrive( EDriveE, NULL ,80000000 ); |
|
506 |
|
507 iMdEClient->RemoveObjectL( KFile1Dst ); |
|
508 iMdEClient->RemoveObjectL( KFile2Dst ); |
|
509 iMdEClient->RemoveObjectL( KFile3Dst ); |
|
510 BaflUtils::DeleteFile( fs, KFile1Dst ); |
|
511 BaflUtils::DeleteFile( fs, KFile2Dst ); |
|
512 BaflUtils::DeleteFile( fs, KFile3Dst ); |
|
513 |
|
514 BaflUtils::CopyFile( fs, KFile1Src, KFile1Dst ); |
|
515 BaflUtils::CopyFile( fs, KFile2Src, KFile2Dst ); |
|
516 BaflUtils::CopyFile( fs, KFile3Src, KFile3Dst ); |
|
517 } |
|
518 |
|
519 if( fs.IsValidDrive( EDriveT ) ) |
|
520 { |
|
521 fs.RemountDrive( EDriveT, NULL ,80000000 ); |
|
522 |
|
523 iMdEClient->RemoveObjectL( KFile1Dst4 ); |
|
524 iMdEClient->RemoveObjectL( KFile2Dst4 ); |
|
525 iMdEClient->RemoveObjectL( KFile3Dst4 ); |
|
526 BaflUtils::DeleteFile( fs, KFile1Dst4 ); |
|
527 BaflUtils::DeleteFile( fs, KFile2Dst4 ); |
|
528 BaflUtils::DeleteFile( fs, KFile3Dst4 ); |
|
529 |
|
530 BaflUtils::CopyFile( fs, KFile1Src, KFile1Dst4 ); |
|
531 BaflUtils::CopyFile( fs, KFile2Src, KFile2Dst4 ); |
|
532 BaflUtils::CopyFile( fs, KFile3Src, KFile3Dst4 ); |
|
533 } |
|
534 |
|
535 fs.Close(); |
|
536 |
|
537 _LIT( KMsg2, "Exit CreateEvents" ); |
|
538 iLog->Log( KMsg2 ); |
|
539 RDebug::Print( KMsg2 ); |
|
540 |
|
541 return KErrNone; |
|
542 } |
|
543 |
|
544 // ----------------------------------------------------------------------------- |
|
545 // CMonitorPluginTest::CreateEventsDelete |
|
546 // ----------------------------------------------------------------------------- |
|
547 // |
|
548 TInt CMonitorPluginTest::CreateEventsDeleteL( CStifItemParser& /* aItem */ ) |
|
549 { |
|
550 _LIT( KMsg1, "Enter CreateEventsDelete" ); |
|
551 iLog->Log( KMsg1 ); |
|
552 RDebug::Print( KMsg1 ); |
|
553 |
|
554 RFs fs; |
|
555 User::LeaveIfError(fs.Connect()); |
|
556 |
|
557 iMdEClient->RemoveObjectL( KFile1Src ); |
|
558 iMdEClient->RemoveObjectL( KFile2Src ); |
|
559 iMdEClient->RemoveObjectL( KFile3Src ); |
|
560 iMdEClient->RemoveObjectL( KFile1Dst2 ); |
|
561 iMdEClient->RemoveObjectL( KFile2Dst2 ); |
|
562 iMdEClient->RemoveObjectL( KFile3Dst2 ); |
|
563 |
|
564 BaflUtils::DeleteFile( fs, KFile1Dst2 ); |
|
565 BaflUtils::DeleteFile( fs, KFile2Dst2 ); |
|
566 BaflUtils::DeleteFile( fs, KFile3Dst2 ); |
|
567 BaflUtils::DeleteFile( fs, KFile1Dst3 ); |
|
568 BaflUtils::DeleteFile( fs, KFile2Dst3 ); |
|
569 BaflUtils::DeleteFile( fs, KFile3Dst3 ); |
|
570 |
|
571 fs.Close(); |
|
572 |
|
573 _LIT( KMsg2, "Exit CreateEventsDelete" ); |
|
574 iLog->Log( KMsg2 ); |
|
575 RDebug::Print( KMsg2 ); |
|
576 |
|
577 return KErrNone; |
|
578 } |
|
579 |
|
580 // [End of File] - Do not remove |