equal
deleted
inserted
replaced
14 * Description: Handles mount tasks* |
14 * Description: Handles mount tasks* |
15 */ |
15 */ |
16 |
16 |
17 #include <driveinfo.h> |
17 #include <driveinfo.h> |
18 |
18 |
|
19 #ifdef __WINSCW__ |
|
20 #include <pathinfo.h> |
|
21 #endif |
|
22 |
19 #include <placeholderdata.h> |
23 #include <placeholderdata.h> |
20 #include "mmcmounttaskao.h" |
24 #include "mmcmounttaskao.h" |
21 #include "mmcmonitorplugin.h" |
25 #include "mmcmonitorplugin.h" |
22 #include "harvesterlog.h" |
26 #include "harvesterlog.h" |
23 #include "mdsfileserverpluginclient.h" |
27 #include "mdsfileserverpluginclient.h" |
54 iCacheEvents = EFalse; |
58 iCacheEvents = EFalse; |
55 iHEM = CHarvesterEventManager::GetInstanceL(); |
59 iHEM = CHarvesterEventManager::GetInstanceL(); |
56 } |
60 } |
57 |
61 |
58 CMMCMountTaskAO::CMMCMountTaskAO() : |
62 CMMCMountTaskAO::CMMCMountTaskAO() : |
59 CActive( KHarvesterCustomImportantPriority ) |
63 CActive( KHarvesterPriorityMonitorPlugin ) |
60 { |
64 { |
61 WRITELOG( "CMMCMountTaskAO::CMMCMountTaskAO" ); |
65 WRITELOG( "CMMCMountTaskAO::CMMCMountTaskAO" ); |
62 } |
66 } |
63 |
67 |
64 CMMCMountTaskAO::~CMMCMountTaskAO() |
68 CMMCMountTaskAO::~CMMCMountTaskAO() |
180 SetNextRequest( ERequestFormat ); |
184 SetNextRequest( ERequestFormat ); |
181 } |
185 } |
182 } |
186 } |
183 else |
187 else |
184 { |
188 { |
|
189 SetPriority( KHarvesterCustomImportantPriority ); |
185 SetNextRequest( ERequestIdle ); |
190 SetNextRequest( ERequestIdle ); |
186 iMountDataQueue.Compress(); |
191 iMountDataQueue.Compress(); |
187 } |
192 } |
188 } |
193 } |
189 break; |
194 break; |
279 iMountDataQueue.Insert( iMountData, 0 ); |
284 iMountDataQueue.Insert( iMountData, 0 ); |
280 iMountData = NULL; |
285 iMountData = NULL; |
281 } |
286 } |
282 Deinitialize(); |
287 Deinitialize(); |
283 SetNextRequest( ERequestStartTask ); |
288 SetNextRequest( ERequestStartTask ); |
284 return; |
289 break; |
285 } |
290 } |
286 |
291 |
287 if ( iEntryArray.Count() > 0 ) |
292 if ( iEntryArray.Count() > 0 ) |
288 { |
293 { |
289 SetNextRequest( ERequestHandleFileEntry ); |
294 SetNextRequest( ERequestHandleFileEntry ); |
340 case ERequestCleanup: |
345 case ERequestCleanup: |
341 { |
346 { |
342 WRITELOG( "CMMCMountTaskAO::RunL - ERequestCleanup" ); |
347 WRITELOG( "CMMCMountTaskAO::RunL - ERequestCleanup" ); |
343 TBool present = (iMountData->iMountType == TMountData::EMount); |
348 TBool present = (iMountData->iMountType == TMountData::EMount); |
344 iMdeSession->SetMediaL( iMountData->iMediaID, iMountData->iDrivePath[0], present ); |
349 iMdeSession->SetMediaL( iMountData->iMediaID, iMountData->iDrivePath[0], present ); |
|
350 SetPriority( KHarvesterCustomImportantPriority ); |
345 Deinitialize(); |
351 Deinitialize(); |
346 SetNextRequest( ERequestStartTask ); |
352 SetNextRequest( ERequestStartTask ); |
347 } |
353 } |
348 break; |
354 break; |
349 |
355 |
520 KDriveAttExclude | KDriveAttRemote | KDriveAttRom ); |
526 KDriveAttExclude | KDriveAttRemote | KDriveAttRom ); |
521 if( err != KErrNone ) |
527 if( err != KErrNone ) |
522 { |
528 { |
523 return 0; |
529 return 0; |
524 } |
530 } |
|
531 |
|
532 #ifdef __WINSCW__ |
|
533 TFileName systemPath = PathInfo::GetPath( PathInfo::EPhoneMemoryRootPath ); |
|
534 TInt systemDriveNum( -1 ); |
|
535 iFs.CharToDrive( systemPath[0], systemDriveNum ); |
|
536 #endif |
525 |
537 |
526 TUint32 hdMediaId = 0; |
538 TUint32 hdMediaId = 0; |
527 TInt i( 0 ); |
539 TInt i( 0 ); |
528 |
540 |
529 for ( i = 0; i < driveList.Length(); i++ ) |
541 const TInt acount = driveList.Length(); |
530 { |
542 for ( i = 0; i < acount; i++ ) |
|
543 { |
|
544 #ifdef __WINSCW__ |
|
545 if ( i == systemDriveNum ) |
|
546 { |
|
547 continue; |
|
548 } |
|
549 #endif |
|
550 |
531 if ( driveList[i] > 0 ) |
551 if ( driveList[i] > 0 ) |
532 { |
552 { |
533 iFs.Drive( driveInfo, i ); |
553 iFs.Drive( driveInfo, i ); |
534 if ( driveInfo.iType == EMediaHardDisk ) |
554 if ( driveInfo.iType == EMediaHardDisk ) |
535 { |
555 { |