equal
deleted
inserted
replaced
20 #include "obexutilsuilayer.h" |
20 #include "obexutilsuilayer.h" |
21 #include "obexutilslaunchwaiter.h" |
21 #include "obexutilslaunchwaiter.h" |
22 #include "obexutilsdebug.h" |
22 #include "obexutilsdebug.h" |
23 |
23 |
24 #include <SecondaryDisplay/obexutilssecondarydisplayapi.h> |
24 #include <SecondaryDisplay/obexutilssecondarydisplayapi.h> |
25 #include <obexutils.rsg> |
25 #include <Obexutils.rsg> |
26 #include <aknnotewrappers.h> |
26 #include <aknnotewrappers.h> |
27 #include <AknGlobalConfirmationQuery.h> |
27 #include <AknGlobalConfirmationQuery.h> |
28 #include <eikon.rsg> |
28 #include <eikon.rsg> |
29 #include <avkon.rsg> |
29 #include <avkon.rsg> |
30 #ifdef NO101APPDEPFIXES |
30 #ifdef NO101APPDEPFIXES |
51 // Launching file manager related header files |
51 // Launching file manager related header files |
52 #include <AiwServiceHandler.h> // The AIW service handler |
52 #include <AiwServiceHandler.h> // The AIW service handler |
53 #include <apgcli.h> |
53 #include <apgcli.h> |
54 #include <apacmdln.h> |
54 #include <apacmdln.h> |
55 #include <AknLaunchAppService.h> // Used to launch file manager in embedded mode. |
55 #include <AknLaunchAppService.h> // Used to launch file manager in embedded mode. |
56 |
56 #include <e32property.h> //for checking backup status |
57 |
57 |
|
58 //Constants |
|
59 const TInt KFileManagerUID3 = 0x101F84EB; /// File Manager application UID3 |
58 const TInt KUiNumberOfZoomStates = 2; // second for the mask |
60 const TInt KUiNumberOfZoomStates = 2; // second for the mask |
59 const TInt KSortNumMax = 2; |
61 const TInt KSortNumMax = 2; |
60 |
|
61 |
62 |
62 // ============================ MEMBER FUNCTIONS =============================== |
63 // ============================ MEMBER FUNCTIONS =============================== |
63 |
64 |
64 |
65 |
65 // ----------------------------------------------------------------------------- |
66 // ----------------------------------------------------------------------------- |
107 |
108 |
108 CAiwGenericParamList* inParams = CAiwGenericParamList::NewLC(); |
109 CAiwGenericParamList* inParams = CAiwGenericParamList::NewLC(); |
109 inParams->AppendL(TAiwGenericParam( EGenericParamDir, TAiwVariant( aPath ) ) ); |
110 inParams->AppendL(TAiwGenericParam( EGenericParamDir, TAiwVariant( aPath ) ) ); |
110 inParams->AppendL(TAiwGenericParam( EGenericParamDir, TAiwVariant( aSortMethod ) ) ); |
111 inParams->AppendL(TAiwGenericParam( EGenericParamDir, TAiwVariant( aSortMethod ) ) ); |
111 |
112 |
112 CAknLaunchAppService* launchService = CAknLaunchAppService::NewL(TUid::Uid( 0x101F84EB ), // Use File Manager app UID directly |
113 CAknLaunchAppService* launchService = CAknLaunchAppService::NewL(TUid::Uid( KFileManagerUID3 ), // Use File Manager app UID directly |
113 NULL, |
114 NULL, |
114 inParams ); |
115 inParams ); |
115 CleanupStack::PopAndDestroy( inParams ); |
116 CleanupStack::PopAndDestroy( inParams ); |
116 FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchFileManager() Embedded mode completed ")); |
117 FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchFileManager() Embedded mode completed ")); |
117 } |
118 } |
120 FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchFileManager() ")); |
121 FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchFileManager() ")); |
121 TApaAppInfo appInfo; |
122 TApaAppInfo appInfo; |
122 RApaLsSession apaLsSession; |
123 RApaLsSession apaLsSession; |
123 User::LeaveIfError( apaLsSession.Connect() ); |
124 User::LeaveIfError( apaLsSession.Connect() ); |
124 CleanupClosePushL( apaLsSession ); |
125 CleanupClosePushL( apaLsSession ); |
125 User::LeaveIfError( apaLsSession.GetAppInfo( appInfo, TUid::Uid( 0x101F84EB ) ) ); // Use File Manager app UID directly |
126 User::LeaveIfError( apaLsSession.GetAppInfo( appInfo, TUid::Uid( KFileManagerUID3 ) ) ); // Use File Manager app UID directly |
126 CApaCommandLine* apaCmdLine = CApaCommandLine::NewLC(); |
127 CApaCommandLine* apaCmdLine = CApaCommandLine::NewLC(); |
127 apaCmdLine->SetExecutableNameL( appInfo.iFullName ); |
128 apaCmdLine->SetExecutableNameL( appInfo.iFullName ); |
128 apaCmdLine->SetCommandL( EApaCommandOpen ); |
129 apaCmdLine->SetCommandL( EApaCommandOpen ); |
129 apaCmdLine->SetDocumentNameL( aPath ); |
130 apaCmdLine->SetDocumentNameL( aPath ); |
130 TBuf8<KSortNumMax> sortMode; |
131 TBuf8<KSortNumMax> sortMode; |
521 aIconArrays); |
522 aIconArrays); |
522 } |
523 } |
523 } |
524 } |
524 |
525 |
525 // ----------------------------------------------------------------------------- |
526 // ----------------------------------------------------------------------------- |
|
527 // TObexUtilsUiLayer::IsBackupRunning |
|
528 // ----------------------------------------------------------------------------- |
|
529 // |
|
530 EXPORT_C TBool TObexUtilsUiLayer::IsBackupRunning() |
|
531 { |
|
532 const TUint32 KFileManagerBkupStatus = 0x00000001; |
|
533 |
|
534 TInt status = EFileManagerBkupStatusUnset; |
|
535 TBool retValue = EFalse; |
|
536 TInt err = RProperty::Get( TUid::Uid(KFileManagerUID3), KFileManagerBkupStatus, |
|
537 status ); |
|
538 if ( err == KErrNone ) |
|
539 { |
|
540 if ( status == EFileManagerBkupStatusBackup || |
|
541 status == EFileManagerBkupStatusRestore ) |
|
542 { |
|
543 TSecureId fileManagerSecureId( KFileManagerUID3 ); |
|
544 //only returning ETrue if backup process is still active |
|
545 retValue = ProcessExists( fileManagerSecureId ); |
|
546 } |
|
547 } |
|
548 |
|
549 return retValue; |
|
550 } |
|
551 |
|
552 // ----------------------------------------------------------------------------- |
526 // TObexUtilsUiLayer::PrepareDialogExecuteL |
553 // TObexUtilsUiLayer::PrepareDialogExecuteL |
527 // ----------------------------------------------------------------------------- |
554 // ----------------------------------------------------------------------------- |
528 // |
555 // |
529 void TObexUtilsUiLayer::PrepareDialogExecuteL( const TInt& aResourceID, CEikDialog* aDialog ) |
556 void TObexUtilsUiLayer::PrepareDialogExecuteL( const TInt& aResourceID, CEikDialog* aDialog ) |
530 { |
557 { |
550 } |
577 } |
551 FeatureManager::UnInitializeLib(); |
578 FeatureManager::UnInitializeLib(); |
552 return coverDisplay; |
579 return coverDisplay; |
553 } |
580 } |
554 |
581 |
|
582 // ----------------------------------------------------------------------------- |
|
583 // TObexUtilsUiLayer::ProcessExists |
|
584 // ----------------------------------------------------------------------------- |
|
585 // |
|
586 TBool TObexUtilsUiLayer::ProcessExists( const TSecureId& aSecureId ) |
|
587 { |
|
588 _LIT( KFindPattern, "*" ); |
|
589 TFindProcess finder(KFindPattern); |
|
590 TFullName processName; |
|
591 while( finder.Next( processName ) == KErrNone ) |
|
592 { |
|
593 RProcess process; |
|
594 if ( process.Open( processName ) == KErrNone ) |
|
595 { |
|
596 TSecureId processId( process.SecureId() ); |
|
597 process.Close(); |
|
598 if( processId == aSecureId ) |
|
599 { |
|
600 return ETrue; |
|
601 } |
|
602 } |
|
603 } |
|
604 return EFalse; |
|
605 } |
555 // End of File |
606 // End of File |