76 #include "glxiadupdate.h" |
76 #include "glxiadupdate.h" |
77 |
77 |
78 //constants |
78 //constants |
79 const TInt KGlxGridThumbnailPages = 9 ; // 4 page Down + 4 page Up + 1 Visible page = 9 page |
79 const TInt KGlxGridThumbnailPages = 9 ; // 4 page Down + 4 page Up + 1 Visible page = 9 page |
80 const TInt KGlxFullThumbnailCount = 11 ; // 5 Thumnail Front + 5 Thumbnail Rear + 1 Visible = 11 page |
80 const TInt KGlxFullThumbnailCount = 11 ; // 5 Thumnail Front + 5 Thumbnail Rear + 1 Visible = 11 page |
|
81 #ifdef __MARM |
81 const TInt KGlxMaxMegaPixelsSupportedByCamera = 5242880 ; // 5 MB |
82 const TInt KGlxMaxMegaPixelsSupportedByCamera = 5242880 ; // 5 MB |
|
83 #else |
|
84 const TInt KGlxMaxMegaPixelsSupportedByCamera = 2097152 ; // 2 MB |
|
85 #endif |
82 const TInt KGlxMaxMemoryToDecodeCapturedPicture = 2 * KGlxMaxMegaPixelsSupportedByCamera ; |
86 const TInt KGlxMaxMemoryToDecodeCapturedPicture = 2 * KGlxMaxMegaPixelsSupportedByCamera ; |
83 const TInt KGlxMemoryForOOMFwk = 1048576 ; // 1 MB |
87 const TInt KGlxMemoryForOOMFwk = 1048576 ; // 1 MB |
84 const TInt KGlxThumbNailRepresentation = 2; // Thumbnail Representation; Could be 3 also |
88 const TInt KGlxThumbNailRepresentation = 2; // Thumbnail Representation; Could be 3 also |
85 |
89 |
86 _LIT8( KPhotosSuiteNavigation, "SuiteNavigation" ); |
90 _LIT8( KPhotosSuiteNavigation, "SuiteNavigation" ); |
88 _LIT8( KPhotosMonths, "Months" ); |
92 _LIT8( KPhotosMonths, "Months" ); |
89 _LIT8( KPhotosTags, "Tags" ); |
93 _LIT8( KPhotosTags, "Tags" ); |
90 _LIT8( KPhotosAlbums, "Albums" ); |
94 _LIT8( KPhotosAlbums, "Albums" ); |
91 _LIT8( KPhotosAllValue,"Allcs"); |
95 _LIT8( KPhotosAllValue,"Allcs"); |
92 |
96 |
|
97 _LIT8( KPhotoSuiteActivationMessage, "mm://root/photossuite?exit=hide" ); |
93 _LIT8( KPhotosSuiteExitMessage, "mm://photossuite?action=exit" ); |
98 _LIT8( KPhotosSuiteExitMessage, "mm://photossuite?action=exit" ); |
94 |
99 |
95 // Matrix uid, needed for activating the suite view. |
100 // Matrix uid, needed for activating the suite view. |
96 const TInt KMatrixUid = 0x101F4CD2; |
101 const TInt KMatrixUid = 0x101F4CD2; |
97 const TInt KCapturedAlbumId = 2 ; |
102 const TInt KCapturedAlbumId = 2 ; |
274 TRACER("TBool CGlxAppUi::ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName, const TDesC8& aTail)"); |
280 TRACER("TBool CGlxAppUi::ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName, const TDesC8& aTail)"); |
275 |
281 |
276 TRAPD(err, HandleActivationMessageL(aCommand, aDocumentName, aTail)); |
282 TRAPD(err, HandleActivationMessageL(aCommand, aDocumentName, aTail)); |
277 if ( KErrNone != err ) |
283 if ( KErrNone != err ) |
278 { |
284 { |
279 // Open collection for main view |
285 // Open photos suite view |
280 iStartupViewUid = TUid::Null(); |
286 LaunchMmViewL( KPhotoSuiteActivationMessage ); |
281 // Open navigational state at root level |
287 Exit(); |
282 CMPXCollectionPath* newState = CMPXCollectionPath::NewL(); |
288 } |
283 CleanupStack::PushL( newState ); |
289 |
284 iNavigationalState->NavigateToL( *newState ); |
290 if(0 == aTail.CompareC(KNullDesC8)) |
285 CleanupStack::PopAndDestroy( newState ); |
291 { |
286 } |
292 return ETrue; |
287 |
293 } |
288 return (EApaCommandOpen == aCommand) && (0 != aDocumentName.Size()); |
294 else |
|
295 { |
|
296 //other case |
|
297 return EFalse; |
|
298 } |
|
299 |
289 } |
300 } |
290 |
301 |
291 // --------------------------------------------------------------------------- |
302 // --------------------------------------------------------------------------- |
292 // Handle navigational state change |
303 // Handle navigational state change |
293 // --------------------------------------------------------------------------- |
304 // --------------------------------------------------------------------------- |
462 // |
473 // |
463 void CGlxAppUi::HandleActivationMessageL(const TApaCommand& aCommand, |
474 void CGlxAppUi::HandleActivationMessageL(const TApaCommand& aCommand, |
464 const TFileName& aDocumentName, const TDesC8& aData) |
475 const TFileName& aDocumentName, const TDesC8& aData) |
465 { |
476 { |
466 TRACER("void CGlxAppUi::HandleActivationMessageL(const TApaCommand& aCommand, const TFileName& aDocumentName, const TDesC8& aData)"); |
477 TRACER("void CGlxAppUi::HandleActivationMessageL(const TApaCommand& aCommand, const TFileName& aDocumentName, const TDesC8& aData)"); |
|
478 GLX_LOG_INFO1("Glx-HandleActivationMessageL() aCommand=%d", aCommand); |
|
479 GLX_LOG_INFO1("Glx-HandleActivationMessageL() aDocumentName length=%d", |
|
480 aDocumentName.Length()); |
467 |
481 |
468 delete iActivationParam; |
482 delete iActivationParam; |
469 iActivationParam = NULL; |
483 iActivationParam = NULL; |
470 |
484 |
471 //Check for the IADUpdate |
485 if (aDocumentName.Length() > 0 && 0 == aData.CompareC(KNullDesC8) ) |
472 //TBD: Need to check the location this has to be called. |
486 { |
473 //This might not be proper place. |
487 GLX_LOG_INFO("CGlxAppUi::HandleActivationMessageL() Image Viewer!"); |
474 DoCheckForIADUpdatesL(); |
|
475 |
|
476 if ( aDocumentName.Length() > 0 && EApaCommandOpen == aCommand ) |
|
477 { |
|
478 CMPXCollectionPath* path = CMPXCollectionPath::NewL(); |
488 CMPXCollectionPath* path = CMPXCollectionPath::NewL(); |
479 CleanupStack::PushL(path); |
489 CleanupStack::PushL(path); |
480 iNavigationalState->SetBackExitStatus( EFalse ); |
490 iNavigationalState->SetBackExitStatus( EFalse ); |
481 path->AppendL( KGlxCollectionPluginImageViewerImplementationUid ); |
491 path->AppendL( KGlxCollectionPluginImageViewerImplementationUid ); |
482 iNavigationalState->NavigateToL( *path ); |
492 iNavigationalState->NavigateToL( *path ); |
483 CleanupStack::PopAndDestroy( path ); |
493 CleanupStack::PopAndDestroy( path ); |
484 } |
494 } |
485 else |
495 else |
486 { |
496 { |
|
497 GLX_LOG_INFO("CGlxAppUi::HandleActivationMessageL(aData)"); |
487 HandleActivationMessageL( aData ); |
498 HandleActivationMessageL( aData ); |
488 } |
499 } |
489 |
500 |
490 // Introduced to fix bug EMJN-78GH6N. Rowland Cook 10/12/2007 |
501 // Introduced to fix bug EMJN-78GH6N. Rowland Cook 10/12/2007 |
491 if (0 != iEikonEnv->RootWin().OrdinalPosition()) |
502 if (0 != iEikonEnv->RootWin().OrdinalPosition()) |
772 cacheManager->StopRAMReleaseL(); |
783 cacheManager->StopRAMReleaseL(); |
773 cacheManager->Close(); |
784 cacheManager->Close(); |
774 } |
785 } |
775 |
786 |
776 // --------------------------------------------------------------------------- |
787 // --------------------------------------------------------------------------- |
777 // CCGlxNsAppUi::DoCheckForIADUpdatesL() |
788 // CGlxAppUi::DoCheckForIADUpdatesL() |
778 // Check for updates via IAD |
789 // Check for updates via IAD |
779 // --------------------------------------------------------------------------- |
790 // --------------------------------------------------------------------------- |
780 // |
791 // |
781 void CGlxAppUi::DoCheckForIADUpdatesL() |
792 void CGlxAppUi::DoCheckForIADUpdatesL() |
782 { |
793 { |
783 TRACER("CGlxNsAppUi::CheckForUpdatesL()"); |
794 TRACER("CGlxAppUi::DoCheckForIADUpdatesL()"); |
784 |
795 |
785 if ( !iIadUpdate ) |
796 if ( !iIadUpdate ) |
786 { |
797 { |
787 iIadUpdate = CGlxIadUpdate::NewL(); |
798 iIadUpdate = CGlxIadUpdate::NewL(); |
788 } |
799 } |