--- a/photosgallery/imgvwr/group/glxivwr.mmp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/imgvwr/group/glxivwr.mmp Thu Jul 15 18:39:01 2010 +0300
@@ -22,9 +22,7 @@
#include <platform_paths.hrh>
#include "../../inc/glxcapabilities.hrh"
-#include "../../../photos_plat/gallery_utilities_api/inc/glxgallery.hrh"
#include "../../group/glxbuildcommon.mmh"
-#include "../../inc/glxalfhelper.mmh"
TARGET glxivwr.exe
TARGETTYPE exe
@@ -34,8 +32,8 @@
SOURCEPATH ../src
SOURCE glxivwrapplication.cpp
-SOURCE glxivwrappui.cpp
-SOURCE glxivwrdocument.cpp
+SOURCE glxivwrappui.cpp
+SOURCE glxivwrdocument.cpp
SOURCEPATH ../group
@@ -46,19 +44,15 @@
END // RESOURCE
USERINCLUDE ../inc
-USERINCLUDE ../../viewframework/medialists/inc
+USERINCLUDE ../../viewframework/medialists/inc
APP_LAYER_SYSTEMINCLUDE
// System includes from the source tree
SYSTEMINCLUDE ../../inc
-SYSTEMINCLUDE ../../common/inc
SYSTEMINCLUDE ../../commonui/inc
SYSTEMINCLUDE ../../viewframework/inc
SYSTEMINCLUDE ../../viewframework/uiutilities/inc
-SYSTEMINCLUDE ../../viewframework/plugins/gridviewplugin/inc
-SYSTEMINCLUDE ../../viewframework/plugins/fullscreenviewplugin/inc
-SYSTEMINCLUDE ../../viewframework/commandhandlers/inc
SYSTEMINCLUDE ../../controllers/imageviewer/inc
LIBRARY apparc.lib
@@ -67,26 +61,19 @@
LIBRARY eikcoctl.lib
LIBRARY eikcore.lib
LIBRARY ws32.lib
-LIBRARY estor.lib
LIBRARY euser.lib
-LIBRARY mpxcollectionutility.lib
LIBRARY mpxcommon.lib
LIBRARY mpxviewutility.lib
LIBRARY glxuiutilities.lib
LIBRARY glxcommonui.lib // for NGlxZoomStatePublisher::PublishStateL
-LIBRARY alfclient.lib // for CAlfEnv
-LIBRARY glxmedialists.lib // to get the cache manager handle
-LIBRARY apgrfx.lib
+LIBRARY glxmedialists.lib // to get the cache manager handle
+LIBRARY apgrfx.lib
LIBRARY glximageviewermanager.lib
-LIBRARY glxcommon.lib
LIBRARY efsrv.lib // for RFile
+LIBRARY oommonitor.lib
+LIBRARY hal.lib // HAL, HALData
EPOCHEAPSIZE 0x1000 0xC00000 //HEAP SIZE SET TO DEFAULT MIN OF 4KB AND MAX OF 12 MB
-START WINS
-END
-
-START MARM
-END
START RESOURCE glxivwr_loc.rss
HEADER
@@ -100,9 +87,3 @@
TARGETPATH /private/10003a3f/import/apps
LANGUAGE_IDS
END // RESOURCE
-
-
-LIBRARY oommonitor.lib
-LIBRARY aknnotify.lib
-LIBRARY hal.lib // HAL, HALData
-LIBRARY commonengine.lib // for StringLoader
--- a/photosgallery/imgvwr/inc/glxivwrappui.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/imgvwr/inc/glxivwrappui.h Thu Jul 15 18:39:01 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
- * Description: AppUi class
+ * Description: Image Viewer AppUi class
*
*/
@@ -22,16 +22,13 @@
#define C_GLXIVIEWERAPPUI_H
#include <aknViewAppUi.h>
-#include <mpxcollectionobserver.h>
#include <mglxnavigationalstateobserver.h>
#include <mpxcollectionpath.h>
-#include "glxiadupdate.h"
+#include <mglxcache.h>
class MMPXViewUtility;
-class MMPXCollectionUtility;
class CGlxUiUtility;
class CGlxNavigationalState;
-class CAknGlobalNote;
/**
* CGlxIVwrAppUi
@@ -39,14 +36,20 @@
* @lib ViewerApplication
*/
-class CGlxIVwrAppUi : public CAknViewAppUi, public MGlxNavigationalStateObserver
+class CGlxIVwrAppUi : public CAknViewAppUi,
+ public MGlxNavigationalStateObserver
{
public:
CGlxIVwrAppUi();
void ConstructL();
~CGlxIVwrAppUi();
+ /**
+ * Open the viewer on receving OpenFileL() callback in CViewerDocument
+ */
+ void HandleOpenFileL();
-public: // from CAknAppUi
+public:
+ // from CAknAppUi
/**
* From CAknAppUi
* Handle user menu selections
@@ -56,23 +59,18 @@
// From MGlxNavigationalStateObserver
void HandleNavigationalStateChangedL();
+
//OOM Method
- void HandleApplicationSpecificEventL(TInt aEventType, const TWsEvent& aWsEvent);
+ void HandleApplicationSpecificEventL(TInt aEventType,
+ const TWsEvent& aWsEvent);
- /**
- * Open the viewer on receving OpenFileL() callback in CViewerDocument
- */
- void HandleOpenFileL();
-
-private: // From CEikAppUi
+protected:
+ // From CEikAppUi
+ void OpenFileL(const TDesC& aFileName);
TBool ProcessCommandParametersL(TApaCommand aCommand,
TFileName& aDocumentName, const TDesC8& aTail);
-private: // From CCoeAppUi
-
- void HandleForegroundEventL( TBool aForeground );
-
private:
enum TEntryType
{
@@ -84,27 +82,29 @@
* (using Get in the name since the function does not return anything)
* @param aIns list that will be populated with scoring ids
*/
- void GetViewScoringIdsL( RArray<TUid>& aIds ) const;
+ void GetViewScoringIdsL(RArray<TUid>& aIds) const;
/**
* Get view scoring id for collection plugin
* @param naviState Path to represent navigational state
* @return scoding id
*/
- TUid GetViewScoringIdForCollectionPlugin( const CMPXCollectionPath& aNaviState ) const;
+ TUid GetViewScoringIdForCollectionPlugin(
+ const CMPXCollectionPath& aNaviState) const;
/**
* Get view scoring id for depth in ui hierarchy
* @param naviState Path to represent navigational state
* @return scoding id
*/
- TUid ViewScoringIdForNaviStateDepth( const CMPXCollectionPath& aNaviState ) const;
+ TUid ViewScoringIdForNaviStateDepth(
+ const CMPXCollectionPath& aNaviState) const;
/**
* Requesting OOM to Free Some Memory, so that photos image viewer can start
* @return Error if Memory Cannot be freed else Error None
*/
- TInt OOMRequestFreeMemoryL( TInt aBytesRequested) ;
+ TInt OOMRequestFreeMemoryL(TInt aBytesRequested);
/**
* Finds Current Memory Availability And Decides to Send a Request for freeing the memory
@@ -112,14 +112,14 @@
* @return Error Code from OOM
*/
TInt ReserveMemoryL(TInt aCriticalMemoryRequired);
-
+
/**
* Finds Current Minimum Required memory to start photos image viewer
* @param Type of application invokation
* @return Required Critical Memory
*/
TInt RamRequiredInBytesL(TEntryType aType);
-
+
/**
* Reserve critical memory qequired to start photos image viewer
* @param Type of application invokation
@@ -127,20 +127,21 @@
void ReserveMemoryL(TEntryType aType);
/**
- * close photos app.
+ * Close Image Viewer App.
*/
void CloseImgVwr();
private:
+ /// MPX View Utility
MMPXViewUtility* iViewUtility;
- /// Singleton that stores gallery's navigational state
+ /// Image Viewer's Navigational State
CGlxNavigationalState* iNavigationalState;
- /** Optional view plugin UID to activate when the collection is opened */
+ /// Optional view plugin UID to activate when the collection is opened
TUid iStartupViewUid;
- ///Ui utility
+ /// Ui Utility
CGlxUiUtility* iUiUtility;
};
--- a/photosgallery/imgvwr/src/glxivwrapplication.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/imgvwr/src/glxivwrapplication.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -19,14 +19,12 @@
#include "glxivwrapplication.h"
+#include "glxivwrdocument.h"
-#include <glxgallery.hrh>
-#include <glxlog.h>
#include <glxtracer.h>
-#include "glxivwrdocument.h"
-
-// UID for the application, this should correspond to the uid defined in the mmp file
+// UID for the application,
+// this should correspond to the uid defined in the mmp file
static const TUid KUidGlxIvwrApp = {0x200104E7};
// -----------------------------------------------------------------------------
@@ -36,7 +34,6 @@
CApaDocument* CGlxIVwrApplication::CreateDocumentL()
{
TRACER("CApaIVwrDocument* CGlxApplication::CreateDocumentL()");
- GLX_LOG_INFO("CGlxApplication::CreateDocumentL");
// Create a Viewer document, and return a pointer to it
CApaDocument* document = CGlxIVwrDocument::NewL(*this);
return document;
@@ -47,10 +44,10 @@
// -----------------------------------------------------------------------------
//
TUid CGlxIVwrApplication::AppDllUid() const
-{
-// Return the UID for the Viewer application
-return KUidGlxIvwrApp;
-}
+ {
+ // Return the UID for the Viewer application
+ return KUidGlxIvwrApp;
+ }
#include <eikstart.h>
--- a/photosgallery/imgvwr/src/glxivwrappui.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/imgvwr/src/glxivwrappui.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
- * Description: AppUi class
+ * Description: Image Viewer AppUi class
*
*/
@@ -19,42 +19,26 @@
#include "glxivwrappui.h"
+#include "glxivwrdocument.h"
-#include <avkon.hrh>
-#include <StringLoader.h>
-#include <aknnotewrappers.h>
-#include <AknUtils.h>
+#include <apgcli.h>
+#include <hal.h>
+#include <oommonitorsession.h>
#include <mpxviewutility.h>
-#include <mpxcollectionutility.h>
-#include <mpxcollectionmessage.h>
-#include <mpxmessagegeneraldefs.h>
#include <mpxcollectionpath.h>
-#include <alf/alfenv.h>
-#include <akntoolbar.h>
-#include <glxgallery.hrh>
-
+#include <glxmedialist.h>
#include <glxcollectionpluginimageviewer.hrh>
-#include <glxfiltergeneraldefs.h>
-#include <glxpanic.h>
-#include <glxuistd.h>
#include <glxviewpluginuids.hrh>
-#include <glxlog.h>
#include <glxuiutility.h>
-#include <glxsettingsmodel.h>
-#include <glxcommandhandlers.hrh>
#include <glxzoomstatepublisher.h>
#include <glxnavigationalstate.h>
#include <glxnavigationalstatedefs.h>
-#include <glxfullscreenviewplugin.hrh>
+#include <glxtracer.h>
+#include <glxlog.h>
#include <glxivwr.rsg>
-#include <AknGlobalNote.h>
-#include <hal.h>
-#include <hal_data.h>
-#include <oommonitorsession.h>
-#include <glxtracer.h>
-#include <glxuistd.h>
-#include <apgcli.h>
+
+
//constants
const TInt KGlxFullThumbnailCount = 1 ; // 1 visible thumnail
@@ -67,6 +51,10 @@
const TInt KGlxMemoryForOOMFwk = 1048576 ; // 1 MB
const TInt KGlxThumbNailRepresentation = 4; // Thumbnail Representation; Could be 3 also
+// UID for the application,
+// this should correspond to the uid defined in the mmp file
+static const TUid KUidGlxIvwrApp = {0x200104E7};
+
// -----------------------------------------------------------------------------
// Constructor
// -----------------------------------------------------------------------------
@@ -85,11 +73,10 @@
// Enable Avkon skins.
BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
+
// Create navigational state
iNavigationalState = CGlxNavigationalState::InstanceL();
-
iNavigationalState->AddObserverL( *this );
-
iNavigationalState->SetBackExitStatus(EFalse);
// Get an instance of view utility
@@ -98,7 +85,9 @@
iUiUtility = CGlxUiUtility::UtilityL();
// Always start in default orientation
iUiUtility->SetAppOrientationL(EGlxOrientationDefault);
+
ReserveMemoryL(EEntryTypeStartUp);
+
// publish zoom context, no zoom keys for now
NGlxZoomStatePublisher::PublishStateL( EFalse );
}
@@ -134,8 +123,8 @@
void CGlxIVwrAppUi::HandleCommandL(TInt aCommand)
{
TRACER("void CGlxIVwrAppUi::HandleCommandL(TInt aCommand)");
- GLX_LOG_INFO1("PHOTOS LOGS: void CGlxIVwrAppUi::HandleCommandL(TInt aCommand = %d)",aCommand );
- switch(aCommand)
+ GLX_LOG_INFO1("void CGlxIVwrAppUi::HandleCommandL(aCommand=%d)", aCommand );
+ switch (aCommand)
{
case EEikCmdExit:
{
@@ -151,7 +140,9 @@
break;
case EAknSoftkeyBack:
+ {
iNavigationalState->ActivatePreviousViewL();
+ }
break;
default:
@@ -166,7 +157,7 @@
TBool CGlxIVwrAppUi::ProcessCommandParametersL(TApaCommand /*aCommand*/,
TFileName& /*aDocumentName*/, const TDesC8& /*aTail*/)
{
- TRACER("TBool CGlxIVwrAppUi::ProcessCommandParametersL(TApaCommand /*aCommand*/,TFileName& /*aDocumentName*/, const TDesC8& aTail)");
+ TRACER("TBool CGlxIVwrAppUi::ProcessCommandParametersL()");
// Bring the application to foreground, if not already
if (0 != iEikonEnv->RootWin().OrdinalPosition())
@@ -189,46 +180,47 @@
CMPXCollectionPath* naviState = iNavigationalState->StateLC();
// Case: Open photos in grid, go to filemanager via menu and open any image
- if (naviState->Id() != TMPXItemId(KGlxCollectionPluginImageViewerImplementationUid))
+ if (naviState->Id() != TMPXItemId(
+ KGlxCollectionPluginImageViewerImplementationUid))
{
/*
* This thread chk is added for EDDG-7UUC53. In this scenario we get EPathChanged from MPX.
* That initiates a viewnavigational change from CGlxNavigationalStateImp HandleCollectionMessageL()
* In these types of scenarios we don't want a view switch. So ignoring the event.
*/
- TApaTaskList taskList( iCoeEnv->WsSession() );
- TApaTask task = taskList.FindApp( TUid::Uid( KGlxGalleryApplicationUid ) );
+ TApaTaskList taskList(iCoeEnv->WsSession());
+ TApaTask task = taskList.FindApp(KUidGlxIvwrApp);
TApaTask taskForeGround = taskList.FindByPos(0); // get fopreground app
- if ( task.Exists() && task.ThreadId() != taskForeGround.ThreadId() )
+ if (task.Exists() && task.ThreadId() != taskForeGround.ThreadId())
{
GLX_LOG_INFO("CGlxIVwrAppUi ::HandleNavigationalStateChanged: Return ");
return;
}
}
- CleanupStack::PopAndDestroy( naviState );
+ CleanupStack::PopAndDestroy(naviState);
- if ( TUid::Null() != iStartupViewUid )
+ if (TUid::Null() != iStartupViewUid)
{
- GLX_LOG_INFO("CGlxAppUi::HandleNavigationalStateChanged: Activating startup view");
+ GLX_LOG_INFO("CGlxIVwrAppUi::HandleNavigationalStateChanged:Activating startup view");
// Activate startup view
- iViewUtility->ActivateViewL( iStartupViewUid, NULL );
+ iViewUtility->ActivateViewL(iStartupViewUid, NULL);
iStartupViewUid = TUid::Null();
}
else
{
- GLX_LOG_INFO("CGlxAppUi::HandleNavigationalStateChanged: Activating view");
+ GLX_LOG_INFO("CGlxIVwrAppUi::HandleNavigationalStateChanged:Activating view");
// get ids for scoring a view
- RArray< TUid > scoringIds;
- CleanupClosePushL( scoringIds );
- GetViewScoringIdsL( scoringIds );
+ RArray<TUid> scoringIds;
+ CleanupClosePushL(scoringIds);
+ GetViewScoringIdsL(scoringIds);
- GLX_LOG_INFO1( "CGlxIVwrAppUi::HandleNavigationalStateChanged: Uid count %d", scoringIds.Count());
+ GLX_LOG_INFO1("CGlxIVwrAppUi::HandleNavigationalStateChanged:Uid count %d", scoringIds.Count());
// let view utility to select the best view based on scoring ids
- iViewUtility->ActivateViewL( scoringIds, NULL );
+ iViewUtility->ActivateViewL(scoringIds, NULL);
- CleanupStack::PopAndDestroy( &scoringIds );
+ CleanupStack::PopAndDestroy(&scoringIds);
}
}
@@ -237,119 +229,106 @@
// ---------------------------------------------------------------------------
//
void CGlxIVwrAppUi::GetViewScoringIdsL( RArray<TUid>& aIds ) const
-{
-TRACER("void CGlxIVwrAppUi::GetViewScoringIdsL( RArray<TUid>& aIds ) const");
+ {
+ TRACER("void CGlxIVwrAppUi::GetViewScoringIdsL()");
CleanupClosePushL(aIds);
-aIds.Reset(); // For maintenance safety
+ aIds.Reset(); // For maintenance safety
-// get current navigational state
-CMPXCollectionPath* naviState = iNavigationalState->StateLC();
+ // get current navigational state
+ CMPXCollectionPath* naviState = iNavigationalState->StateLC();
-// no if check in needed here ,it makes the aapui aware of the list view depth
-// to be removed.added by gopa
-if ( naviState->Levels() >= 1)
- {
+ // no if check in needed here ,it makes the aapui aware of the list view depth
+ // to be removed.added by gopa
+ if (naviState->Levels() >= 1)
+ {
if (iNavigationalState->ViewingMode()
== NGlxNavigationalState::EBrowse)
- {
- // For image viewer collection, goto view mode
+ {
+ // For image viewer collection, goto view mode
if (naviState->Id() == TMPXItemId(
KGlxCollectionPluginImageViewerImplementationUid))
- {
- aIds.AppendL( TUid::Uid( KGlxViewingModeView ) );
+ {
+ aIds.AppendL(TUid::Uid(KGlxViewingModeView));
+ }
+ else
+ {
+ aIds.AppendL(TUid::Uid(KGlxViewingModeBrowse));
+ }
}
else
{
- aIds.AppendL( TUid::Uid( KGlxViewingModeBrowse ) );
+ aIds.AppendL(TUid::Uid(KGlxViewingModeView));
}
- }
- else
+ }
+
+ if (TUid::Null() != GetViewScoringIdForCollectionPlugin(*naviState))
{
- aIds.AppendL( TUid::Uid( KGlxViewingModeView ) );
- }
- }
+ // add scoring id for collection plugin
+ aIds.AppendL(GetViewScoringIdForCollectionPlugin(*naviState));
+ }
-if( TUid::Null() != GetViewScoringIdForCollectionPlugin( *naviState ) )
- {
- // add scoring id for collection plugin
- aIds.AppendL( GetViewScoringIdForCollectionPlugin( *naviState ) );
+ if (TUid::Null() != ViewScoringIdForNaviStateDepth(*naviState))
+ {
+ // add scoring id for depth in the ui hierarchy
+ aIds.AppendL(ViewScoringIdForNaviStateDepth(*naviState));
+ }
+
+ CleanupStack::PopAndDestroy(naviState);
+ CleanupStack::Pop(&aIds);
}
-if( TUid::Null() != ViewScoringIdForNaviStateDepth( *naviState ) )
- {
- // add scoring id for depth in the ui hierarchy
- aIds.AppendL( ViewScoringIdForNaviStateDepth( *naviState ) );
- }
-
-CleanupStack::PopAndDestroy( naviState );
- CleanupStack::Pop(&aIds);
-}
-// ---------------------------------------------------------------------------
-// Handles the foreground events
-// ---------------------------------------------------------------------------
-//
-void CGlxIVwrAppUi::HandleForegroundEventL( TBool aForeground )
- {
- TRACER("void CGlxIVwrAppUi::HandleForegroundEventL( TBool aForeground )");
-
- // first let base class handle it so that we dont break anything
- CAknViewAppUi::HandleForegroundEventL( aForeground );
-
- }
// ---------------------------------------------------------------------------
// Return scoring id for collection plugin
// ---------------------------------------------------------------------------
//
-TUid CGlxIVwrAppUi::GetViewScoringIdForCollectionPlugin( const CMPXCollectionPath& aNaviState ) const
-{
-TRACER("TUid CGlxIVwrAppUi::GetViewScoringIdForCollectionPluginL( const CMPXCollectionPath& aNaviState ) const");
+TUid CGlxIVwrAppUi::GetViewScoringIdForCollectionPlugin(
+ const CMPXCollectionPath& aNaviState) const
+ {
+ TRACER("TUid CGlxIVwrAppUi::GetViewScoringIdForCollectionPluginL()");
-GLX_LOG_INFO1( "CGlxIVwrAppUi::GetViewScoringIdForCollectionPluginL: Depth %d", aNaviState.Levels() );
-// score view based on collection plugin if not on root level
-if ( aNaviState.Levels() )
- {
- return TUid::Uid( aNaviState.Id( 0 ) );
+ GLX_LOG_INFO1( "CGlxIVwrAppUi::GetViewScoringIdForCollectionPluginL:Depth %d", aNaviState.Levels() );
+ // score view based on collection plugin if not on root level
+ if (aNaviState.Levels())
+ {
+ return TUid::Uid(aNaviState.Id(0));
+ }
+ // return null as id to be ignored in scoring
+ return TUid::Null();
}
-// return null as id to be ignored in scoring
-return TUid::Null();
-}
// ---------------------------------------------------------------------------
// Return scoring id for depth
// ---------------------------------------------------------------------------
//
-TUid CGlxIVwrAppUi::ViewScoringIdForNaviStateDepth( const CMPXCollectionPath& aNaviState ) const
-{
-TRACER("TUid CGlxIVwrAppUi::ViewScoringIdForNaviStateDepthL( const CMPXCollectionPath& aNaviState ) const");
-GLX_LOG_INFO1( "CGlxIVwrAppUi::ViewScoringIdForNaviStateDepthL: Level %d", aNaviState.Levels() );
-
-switch ( aNaviState.Levels() )
+TUid CGlxIVwrAppUi::ViewScoringIdForNaviStateDepth(
+ const CMPXCollectionPath& aNaviState) const
{
- case 0:
+ TRACER("TUid CGlxIVwrAppUi::ViewScoringIdForNaviStateDepthL()");
+ GLX_LOG_INFO1( "CGlxIVwrAppUi::ViewScoringIdForNaviStateDepthL: Level %d",aNaviState.Levels() );
- GLX_LOG_INFO1( "CGlxIVwrAppUi::ViewScoringIdForNaviStateDepthL: \
- Depth case 0 %x", TUid::Uid( KGlxDepthOne ) );
- return TUid::Uid( KGlxDepthOne );
+ switch (aNaviState.Levels())
+ {
+ case 0:
- case 1:
+ GLX_LOG_INFO1( "CGlxIVwrAppUi::ViewScoringIdForNaviStateDepthL:Depth case 0 %x", TUid::Uid( KGlxDepthOne ) );
+ return TUid::Uid(KGlxDepthOne);
+
+ case 1:
- GLX_LOG_INFO1( "CGlxIVwrAppUi::ViewScoringIdForNaviStateDepthL: \
- Depth case 1 %x", TUid::Uid( KGlxDepthTwo ) );
- return TUid::Uid( KGlxDepthTwo );
+ GLX_LOG_INFO1( "CGlxIVwrAppUi::ViewScoringIdForNaviStateDepthL:Depth case 1 %x", TUid::Uid( KGlxDepthTwo ) );
+ return TUid::Uid(KGlxDepthTwo);
-
- case 2:
+ case 2:
- GLX_LOG_INFO1( "CGlxIVwrAppUi::GetViewScoringIdForUiHieararchyDepthL: \
- Depth case 2 %x", TUid::Uid( KGlxDepthThree ) );
- return TUid::Uid( KGlxDepthThree );
+ GLX_LOG_INFO1( "CGlxIVwrAppUi::GetViewScoringIdForUiHieararchyDepthL:Depth case 2 %x", TUid::Uid( KGlxDepthThree ) );
+ return TUid::Uid(KGlxDepthThree);
- default:
- GLX_LOG_WARNING( "CGlxIVwrAppUi::GetViewScoringIdsL: Navigational state deeper than supported" );
- // return null as an id to be ignored in scoring
- return TUid::Null();
+ default:
+ GLX_LOG_WARNING( "CGlxIVwrAppUi::GetViewScoringIdsL:Navigational state deeper than supported" );
+ // return null as an id to be ignored in scoring
+ return TUid::Null();
+ }
}
-}
// ---------------------------------------------------------------------------
// HandleOpenFileL
@@ -369,11 +348,10 @@
// OOMRequestFreeMemoryL
// ---------------------------------------------------------------------------
//
-TInt CGlxIVwrAppUi::OOMRequestFreeMemoryL( TInt aBytesRequested)
+TInt CGlxIVwrAppUi::OOMRequestFreeMemoryL(TInt aBytesRequested)
{
- TRACER("TInt CGlxIVwrAppUi::OOMRequestFreeMemoryL( TInt aBytesRequested)");
- GLX_LOG_INFO1("CGlxIVwrAppUi::OOMRequestFreeMemoryL() aBytesRequested=%d",
- aBytesRequested);
+ TRACER("TInt CGlxIVwrAppUi::OOMRequestFreeMemoryL(TInt aBytesRequested)");
+ GLX_LOG_INFO1("CGlxIVwrAppUi::OOMRequestFreeMemoryL() aBytesRequested=%d",aBytesRequested);
ROomMonitorSession oomMonitor;
User::LeaveIfError( oomMonitor.Connect() );
@@ -402,8 +380,7 @@
TInt memoryLeft = 0;
TInt error = KErrNone ;
HAL::Get( HALData::EMemoryRAMFree, memoryLeft );
- GLX_LOG_INFO2("CGlxIVwrAppUi::ReserveMemoryL() - aCriticalMemoryRequired=%d, memoryLeft=%d",
- aCriticalMemoryRequired, memoryLeft);
+ GLX_LOG_INFO2("CGlxIVwrAppUi::ReserveMemoryL() - aCriticalMemoryRequired=%d, memoryLeft=%d", aCriticalMemoryRequired, memoryLeft);
if ( aCriticalMemoryRequired > memoryLeft )
{
// Request for critical memory required
@@ -428,17 +405,16 @@
// For Framework to work and to do the on-the-fly decoding
// for the just captured picture = KGlxMemoryForOOMFwk + KGlxMaxMemoryToDecodeCapturedPicture
// For FullScreen to Work Number of Thumbnail(s) * Width * Height * Representation
- criticalRamMemory = KGlxMemoryForOOMFwk + KGlxMaxMemoryToDecodeCapturedPicture +
- (KGlxFullThumbnailCount *
- displaySize.iWidth * displaySize.iHeight *
- KGlxThumbNailRepresentation );
-
- GLX_LOG_INFO1("CGlxIVwrAppUi::RamRequiredInBytesL(EEntryTypeStartUp): criticalRamMemory=%d",
- criticalRamMemory);
+ criticalRamMemory = KGlxMemoryForOOMFwk
+ + KGlxMaxMemoryToDecodeCapturedPicture
+ + (KGlxFullThumbnailCount * displaySize.iWidth
+ * displaySize.iHeight * KGlxThumbNailRepresentation);
+
+ GLX_LOG_INFO1("CGlxIVwrAppUi::RamRequiredInBytesL(EEntryTypeStartUp):criticalRamMemory=%d", criticalRamMemory);
}
else
{
- GLX_LOG_INFO("CGlxIVwrAppUi::RamRequiredInBytesL(): Photos Already Running");
+ GLX_LOG_INFO("CGlxIVwrAppUi::RamRequiredInBytesL():Viewer Already Running");
}
return criticalRamMemory;
@@ -457,7 +433,7 @@
if (KErrNoMemory == error)
{
- GLX_LOG_INFO("CGlxIVwrAppUi::ReserveMemoryL(): LEAVE with KErrNoMemory ");
+ GLX_LOG_INFO("CGlxIVwrAppUi::ReserveMemoryL():LEAVE with KErrNoMemory");
User::Leave(KErrNoMemory);
}
}
@@ -467,8 +443,8 @@
//
// ---------------------------------------------------------------------------
//
-
-void CGlxIVwrAppUi::HandleApplicationSpecificEventL(TInt aEventType, const TWsEvent& aWsEvent)
+void CGlxIVwrAppUi::HandleApplicationSpecificEventL(TInt aEventType,
+ const TWsEvent& aWsEvent)
{
TRACER("CGlxIVwrAppUi::HandleApplicationSpecificEventL");
CAknViewAppUi::HandleApplicationSpecificEventL(aEventType,aWsEvent);
@@ -484,8 +460,46 @@
//
void CGlxIVwrAppUi::CloseImgVwr()
{
- TRACER("CGlxNsAppUi::CloseImgVwr()");
+ TRACER("CGlxIVwrAppUi::CloseImgVwr()");
iUiUtility->SetViewNavigationDirection(EGlxNavigationBackwards);
iUiUtility->SetExitingState(ETrue);
}
+// ----------------------------------------------------------------------------
+// CGlxIVwrAppUi::OpenFileL
+// This is called by framework when application is already open in background
+// and user open other file in eg. File Browse.
+// New file to been shown is passed via aFileName.
+// ----------------------------------------------------------------------------
+//
+void CGlxIVwrAppUi::OpenFileL(const TDesC& aFileName)
+ {
+ TRACER("CGlxIVwrAppUi::OpenFileL()");
+ GLX_LOG_URI("CGlxIVwrAppUi::OpenFileL(%S)", &aFileName);
+
+ // File changed. Open new file with documents OpenFileL method.
+ Document()->OpenFileL(EFalse, aFileName, iEikonEnv->FsSession());
+
+ GLX_DEBUG1("CGlxIVwrAppUi::OpenFileL() *** File Changed *** ");
+ MGlxCache* cacheManager = MGlxCache::InstanceL();
+ CleanupClosePushL(*cacheManager);
+
+ CMPXCollectionPath* path = CMPXCollectionPath::NewL();
+ CleanupStack::PushL(path);
+ path->AppendL(KGlxCollectionPluginImageViewerImplementationUid);
+
+ MGlxMediaList* mediaList = MGlxMediaList::InstanceL(*path);
+ CleanupClosePushL(*mediaList);
+
+ if (mediaList->Count() > 0)
+ {
+ GLX_DEBUG1("CGlxIVwrAppUi::OpenFileL() - Cleanup & Refresh Media!");
+ cacheManager->ForceCleanupMedia(mediaList->IdSpaceId(0),
+ mediaList->Item(0).Id());
+ cacheManager->RefreshL();
+ }
+
+ CleanupStack::PopAndDestroy(mediaList);
+ CleanupStack::PopAndDestroy(path);
+ CleanupStack::PopAndDestroy(cacheManager);
+ }
--- a/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmpxcommandcommandhandler.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmpxcommandcommandhandler.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -88,18 +88,33 @@
// deriving class consumes command by default
TBool consume = ETrue;
TInt selectionCount = aList.SelectionCount();
- const TGlxMedia& focusedMedia = aList.Item(aList.FocusIndex());
+
+ // Do not consume If no item is selected and
+ // "focused" item index is invalid
+ TInt focusIndex = aList.FocusIndex();
+ if ((selectionCount == 0) && (KErrNotFound == focusIndex || focusIndex
+ > aList.Count()))
+ {
+ return EFalse;
+ }
+
+ const TGlxMedia& focusedMedia = aList.Item(focusIndex);
// show confirmation note
consume = ConfirmationNoteL(aCommandId, aList);
// Check if the selected / focused file(s)s have been deleted from
// another application while the confirmation note is displayed
- if (((selectionCount > 0) && (aList.SelectionCount() == 0))
- || ((selectionCount == 0) && aList.Count() && (focusedMedia.Id()
- != aList.Item(aList.FocusIndex()).Id())))
+ // 1. If list is empty or previously Items were selected & are removed in current list
+ if (aList.Count() == 0 || ((selectionCount > 0) && (aList.SelectionCount() == 0)))
{
- // All the selected / focused item(s) have been deleted,
- // do not allow the command to execute.
+ consume = EFalse;
+ }
+ // 2.If previously no Item selected then check if current focus index is valid
+ // and previous & current focused item are same.
+ else if ((selectionCount == 0) && ((KErrNotFound != aList.FocusIndex()
+ && aList.FocusIndex() < aList.Count()) && (focusedMedia.Id()
+ != aList.Item(aList.FocusIndex()).Id())))
+ {
consume = EFalse;
}
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -47,6 +47,7 @@
#include <glxresourceutilities.h> // for CGlxResourceUtilities
#include <glxicons.mbg>
#include <glximageviewermanager.h> // for CGlxImageViewerManager
+#include <glxgeneraluiutilities.h>
// LOCAL FUNCTIONS AND CONSTANTS
namespace
@@ -351,9 +352,15 @@
iUiUtility->SetAppOrientationL( EGlxOrientationDefault );
}
// Trap the send call to ensure the orientation is reverted
- TRAP_IGNORE( iSendUi->ShowQueryAndSendL( msgData, Capabilities(),
- filterOutPlugins, KNullUid, ETrue, *title ) );
-
+ TRAPD(error, iSendUi->ShowQueryAndSendL( msgData, Capabilities(),
+ filterOutPlugins, KNullUid, ETrue, *title ));
+ if (error == KErrNoMemory || error == KErrNotSupported || error
+ == KErrInUse || error == KErrDiskFull || error == KErrTimedOut
+ || error == KErrPermissionDenied)
+ {
+ GlxGeneralUiUtilities::ShowErrorNoteL(error);
+ GLX_LOG_INFO1("error sending the image %d",error);
+ }
CleanupStack::PopAndDestroy(filterOutPlugins);
CleanupStack::PopAndDestroy(title);
CleanupStack::PopAndDestroy(msgData);
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxmediaselectionpopup.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxmediaselectionpopup.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -264,6 +264,19 @@
break;
}
+ case EEventEnterKeyPressed:
+ {
+ //Check for MultipleSelection is Disbaled
+ if (!(mediaListAdaptor->MultiSelectionEnabled()))
+ {
+ //Set if its a static item
+ const TGlxMedia& item = mediaListAdaptor->MediaList()->Item(
+ currItemIndx);
+ mediaListAdaptor->SetStaticItemSelected(item.IsStatic());
+ }
+ CAknPopupList::HandleListBoxEventL( aListBox, aEventType);
+ break;
+ }
default:
{
CAknPopupList::HandleListBoxEventL( aListBox, aEventType);
--- a/photosgallery/viewframework/dataprovider/bwins/glxdataprovideru.def Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/bwins/glxdataprovideru.def Thu Jul 15 18:39:01 2010 +0300
@@ -37,4 +37,5 @@
?AddThumbnailBindingL@TGlxMulBindingSetFactory@@IBEXABW4TVisualAttribute@mulvisualitem@Alf@@ABVTSize@@@Z @ 36 NONAME ; void TGlxMulBindingSetFactory::AddThumbnailBindingL(enum Alf::mulvisualitem::TVisualAttribute const &, class TSize const &) const
?NewL@CGlxMulDriveIconProvider@@SAPAV1@XZ @ 37 NONAME ; class CGlxMulDriveIconProvider * CGlxMulDriveIconProvider::NewL(void)
?NewL@CGlxDetailsMulModelProvider@@SAPAV1@AAVCAlfEnv@@AAVIMulWidget@Alf@@AAVMGlxMediaList@@W4TLogicalTemplate@mulwidget@4@H@Z @ 38 NONAME ; class CGlxDetailsMulModelProvider * CGlxDetailsMulModelProvider::NewL(class CAlfEnv &, class Alf::IMulWidget &, class MGlxMediaList &, enum Alf::mulwidget::TLogicalTemplate, int)
+ ?AnimateDRMGifItem@CGlxMediaListMulModelProvider@@QAEXH@Z @ 39 NONAME ; void CGlxMediaListMulModelProvider::AnimateDRMGifItem(int)
--- a/photosgallery/viewframework/dataprovider/eabi/glxdataprovideru.def Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/eabi/glxdataprovideru.def Thu Jul 15 18:39:01 2010 +0300
@@ -30,18 +30,23 @@
_ZN27CGlxMulLocationIconProvider4NewLEv @ 29 NONAME
_ZN27CGlxUsageRightsBoundCommand4NewLEv @ 30 NONAME
_ZN29CGlxMediaListMulModelProvider11UpdateItemsEii @ 31 NONAME
- _ZN29CGlxMediaListMulModelProvider4NewLER7CAlfEnvRN3Alf10IMulWidgetER13MGlxMediaListRK24TGlxMulBindingSetFactoryNS2_9mulwidget16TLogicalTemplateEi @ 32 NONAME
- _ZNK24TGlxMulBindingSetFactory15AddIconBindingLERKN3Alf13mulvisualitem16TVisualAttributeEPK19CGlxMulIconProviderRK5TSize @ 33 NONAME
- _ZNK24TGlxMulBindingSetFactory17AddStringBindingLERKN3Alf13mulvisualitem16TVisualAttributeEi @ 34 NONAME
- _ZNK24TGlxMulBindingSetFactory18AddCommandBindingLEP16MGlxBoundCommand @ 35 NONAME
- _ZNK24TGlxMulBindingSetFactory19AddTemplateBindingLEN3Alf9mulwidget16TLogicalTemplateES2_ @ 36 NONAME
- _ZNK24TGlxMulBindingSetFactory20AddThumbnailBindingLERKN3Alf13mulvisualitem16TVisualAttributeERK5TSize @ 37 NONAME
- _ZNK24TGlxMulBindingSetFactory23AddMpxAttributeBindingLERKN3Alf13mulvisualitem16TVisualAttributeERK13TMPXAttributei @ 38 NONAME
- _ZNK24TGlxMulBindingSetFactory24AddContainerListBindingLERKN3Alf13mulvisualitem16TVisualAttributeERK18CMPXCollectionPath @ 39 NONAME
- _ZNK24TGlxMulBindingSetFactory27AddPreviewThumbnailBindingLEv @ 40 NONAME
- _ZNK24TGlxMulBindingSetFactory30AddFullScreenThumbnailBindingLERKN3Alf13mulvisualitem16TVisualAttributeE @ 41 NONAME
- _ZTI24TGlxMulBindingSetFactory @ 42 NONAME
- _ZTI25CGlxAttributeRequirements @ 43 NONAME
- _ZTV24TGlxMulBindingSetFactory @ 44 NONAME
- _ZTV25CGlxAttributeRequirements @ 45 NONAME
+ _ZN29CGlxMediaListMulModelProvider17AnimateDRMGifItemEi @ 32 NONAME
+ _ZN29CGlxMediaListMulModelProvider4NewLER7CAlfEnvRN3Alf10IMulWidgetER13MGlxMediaListRK24TGlxMulBindingSetFactoryNS2_9mulwidget16TLogicalTemplateEi @ 33 NONAME
+ _ZNK24TGlxMulBindingSetFactory15AddIconBindingLERKN3Alf13mulvisualitem16TVisualAttributeEPK19CGlxMulIconProviderRK5TSize @ 34 NONAME
+ _ZNK24TGlxMulBindingSetFactory17AddStringBindingLERKN3Alf13mulvisualitem16TVisualAttributeEi @ 35 NONAME
+ _ZNK24TGlxMulBindingSetFactory18AddCommandBindingLEP16MGlxBoundCommand @ 36 NONAME
+ _ZNK24TGlxMulBindingSetFactory19AddTemplateBindingLEN3Alf9mulwidget16TLogicalTemplateES2_ @ 37 NONAME
+ _ZNK24TGlxMulBindingSetFactory20AddThumbnailBindingLERKN3Alf13mulvisualitem16TVisualAttributeERK5TSize @ 38 NONAME
+ _ZNK24TGlxMulBindingSetFactory23AddMpxAttributeBindingLERKN3Alf13mulvisualitem16TVisualAttributeERK13TMPXAttributei @ 39 NONAME
+ _ZNK24TGlxMulBindingSetFactory24AddContainerListBindingLERKN3Alf13mulvisualitem16TVisualAttributeERK18CMPXCollectionPath @ 40 NONAME
+ _ZNK24TGlxMulBindingSetFactory27AddPreviewThumbnailBindingLEv @ 41 NONAME
+ _ZNK24TGlxMulBindingSetFactory30AddFullScreenThumbnailBindingLERKN3Alf13mulvisualitem16TVisualAttributeE @ 42 NONAME
+ _ZTI19CGlxDRMgifDecoderAO @ 43 NONAME
+ _ZTI24CGlxDrmGifTextureCreator @ 44 NONAME
+ _ZTI24TGlxMulBindingSetFactory @ 45 NONAME
+ _ZTI25CGlxAttributeRequirements @ 46 NONAME
+ _ZTV19CGlxDRMgifDecoderAO @ 47 NONAME
+ _ZTV24CGlxDrmGifTextureCreator @ 48 NONAME
+ _ZTV24TGlxMulBindingSetFactory @ 49 NONAME
+ _ZTV25CGlxAttributeRequirements @ 50 NONAME
--- a/photosgallery/viewframework/dataprovider/group/dataprovider.mmp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/group/dataprovider.mmp Thu Jul 15 18:39:01 2010 +0300
@@ -43,21 +43,22 @@
SOURCE glxmulbindingsetfactory.cpp
SOURCE glxmulmodelproviderbase.cpp
SOURCE glxthumbnailvarianttype.cpp
-SOURCE glxmuliconprovider.cpp
+SOURCE glxmuliconprovider.cpp
SOURCE glxdetailsboundcommand.cpp
SOURCE glxcommandbindingutility.cpp
-SOURCE glxattributerequirement.cpp
-SOURCE glxpreviewthumbnailbinding.cpp
-SOURCE glxcontainerlistbinding.cpp
-
+SOURCE glxattributerequirement.cpp
+SOURCE glxpreviewthumbnailbinding.cpp
+SOURCE glxcontainerlistbinding.cpp
+SOURCE glxdrmgiftexturecreator.cpp
+SOURCE glxdrmgifactivedecoder.cpp
USERINCLUDE ../inc
-SYSTEMINCLUDE ../../uiutilities/inc
-SYSTEMINCLUDE ../../inc
-SYSTEMINCLUDE ../../texturemanager/inc
-SYSTEMINCLUDE ../../drmutility/inc
+SYSTEMINCLUDE ../../uiutilities/inc
+SYSTEMINCLUDE ../../inc
+SYSTEMINCLUDE ../../texturemanager/inc
+SYSTEMINCLUDE ../../drmutility/inc
SYSTEMINCLUDE ../../../inc
-SYSTEMINCLUDE ../../medialists/inc
+SYSTEMINCLUDE ../../medialists/inc
SYSTEMINCLUDE ../../../commonui/inc
SYSTEMINCLUDE ../../../common/inc
SYSTEMINCLUDE ../../commandhandlers/commoncommandhandlers/inc
@@ -85,15 +86,18 @@
LIBRARY platformenv.lib
LIBRARY glxtexturemanager.lib // CGlxTextureManager
LIBRARY glxuiutilities.lib // CGlxUiUtility::TextureManager
-LIBRARY libstdcpp.lib
-LIBRARY glxlogging.lib
-LIBRARY glxdrmutility.lib //for Drm Utility
-LIBRARY glxcommoncommandhandlers.lib
+LIBRARY libstdcpp.lib
+LIBRARY glxlogging.lib
+LIBRARY glxdrmutility.lib //for Drm Utility
+LIBRARY glxcommoncommandhandlers.lib
LIBRARY glxcommonui.lib //For CGlxCommandHandlerAddToContainer
-LIBRARY glxcommon.lib
-LIBRARY flogger.lib
-LIBRARY exiflib.lib //For CExifModify
-LIBRARY avkon.lib eikcore.lib // For AknUtils.h
+LIBRARY glxcommon.lib
+LIBRARY flogger.lib
+LIBRARY exiflib.lib //For CExifModify
+LIBRARY avkon.lib //For AknUtils.h
+LIBRARY eikcore.lib
LIBRARY glximageviewermanager.lib
+LIBRARY imageconversion.lib // ICL
+LIBRARY fbscli.lib
// End of File
\ No newline at end of file
--- a/photosgallery/viewframework/dataprovider/inc/glxbinding.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/inc/glxbinding.h Thu Jul 15 18:39:01 2010 +0300
@@ -68,10 +68,11 @@
* @param aItem Visual item to be populated
* @param aMedia Media item
* @param aIsFocused the item is focused or not
+ * @param aTextureId textureid
*/
/// T for "throws" (instead of L for "leaves")
virtual void PopulateT( Alf::MulVisualItem& aItem, const TGlxMedia& aMedia,
- TBool aIsFocused ) const = 0;
+ TBool aIsFocused, TInt aTextureId = KErrNotFound ) const = 0;
/**
* HasRelevantAttributes Checks whether the attribute is relevent to the context
@@ -160,7 +161,7 @@
// From CGlxBinding
void PopulateT( Alf::MulVisualItem& aItem, const TGlxMedia& aMedia,
- TBool aIsFocused ) const;
+ TBool aIsFocused,TInt aTextureId = KErrNotFound ) const;
/**
* @todo
@@ -279,7 +280,7 @@
private:
/// From CGlxBinding
void PopulateT( Alf::MulVisualItem& aItem, const TGlxMedia& aMedia,
- TBool aIsFocused ) const;
+ TBool aIsFocused,TInt aTextureId = KErrNotFound ) const;
private:
/// Holds MPX data
@@ -327,7 +328,7 @@
CGlxMpxAttributeBinding( const TMPXAttribute& aAttribute, TInt aFormatStringId );
// From CGlxBinding
void PopulateT( Alf::MulVisualItem& aItem, const TGlxMedia& aMedia,
- TBool aIsFocused ) const;
+ TBool aIsFocused, TInt aTextureId = KErrNotFound ) const;
/**
* HasRelevantAttributes
@@ -388,7 +389,7 @@
private: // From CGlxBinding
void PopulateT( Alf::MulVisualItem& aItem, const TGlxMedia& aMedia,
- TBool aIsFocused ) const;
+ TBool aIsFocused, TInt aTextureId = KErrNotFound ) const;
/**
* HasRelevantAttributes
@@ -435,7 +436,7 @@
private: // From CGlxBinding
void PopulateT( Alf::MulVisualItem& aItem, const TGlxMedia& aMedia,
- TBool aIsFocused ) const;
+ TBool aIsFocused, TInt aTextureId = KErrNotFound ) const;
/**
* HasRelevantAttributes
@@ -481,7 +482,7 @@
private: // From CGlxBinding
void PopulateT( Alf::MulVisualItem& aItem, const TGlxMedia& aMedia,
- TBool aIsFocused ) const;
+ TBool aIsFocused, TInt aTextureId = KErrNotFound ) const;
private:
const CGlxMulIconProvider* iIconProvider;
@@ -521,7 +522,7 @@
private:
// From CGlxBinding
void PopulateT( Alf::MulVisualItem& aItem, const TGlxMedia& aMedia,
- TBool aIsFocused ) const;
+ TBool aIsFocused,TInt textureId = KErrNotFound ) const;
private:
MGlxBoundCommand* iCommand;
--- a/photosgallery/viewframework/dataprovider/inc/glxbindingset.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/inc/glxbindingset.h Thu Jul 15 18:39:01 2010 +0300
@@ -61,7 +61,7 @@
// From CGlxBinding
void PopulateT( Alf::MulVisualItem& aItem, const TGlxMedia& aMedia,
- TBool aIsFocused ) const;
+ TBool aIsFocused, TInt aTextureId = KErrNotFound ) const;
TBool HasRelevantAttributes( const RArray< TMPXAttribute >& aAttributes ) const;
TResponse HandleFocusChanged( TBool aIsGained );
--- a/photosgallery/viewframework/dataprovider/inc/glxcontainerlistbinding.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/inc/glxcontainerlistbinding.h Thu Jul 15 18:39:01 2010 +0300
@@ -91,7 +91,7 @@
// From CGlxBinding
void PopulateT( Alf::MulVisualItem& aItem, const TGlxMedia& aMedia,
- TBool aIsFocused ) const;
+ TBool aIsFocused, TInt aTextureId = KErrNotFound) const;
/**
* Create media list
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/photosgallery/viewframework/dataprovider/inc/glxdrmgifactivedecoder.h Thu Jul 15 18:39:01 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Gif Decoder Active Object
+*
+*/
+
+
+#ifndef GLXDRMGIFACTIVEDECODER_H_
+#define GLXDRMGIFACTIVEDECODER_H_
+
+// INCLUDES
+#include <imageconversion.h>
+#include "glxdrmgiftexturecreator.h"
+
+// CLASS DECLARATION
+class CImageDecoder;
+
+class CGlxDRMgifDecoderAO : public CActive
+ {
+public:
+ /*
+ * NewL()
+ * @Param1 CGlxDrmGifTextureCreator
+ */
+ static CGlxDRMgifDecoderAO* NewL(CGlxDrmGifTextureCreator* aDrmGifTextureCreator);
+
+ /*
+ * Destructor
+ */
+ ~CGlxDRMgifDecoderAO();
+
+ /*
+ * ConvertImageL()
+ * This calls the asyncronous service request to ICL convert
+ * @param1 - Destination Bitmap
+ * @param2 - Destination Bitmap Mask
+ * @param3 - Frame number to be decoded
+ * @param4 - Image decoder
+ */
+ void ConvertImageL(CFbsBitmap* aBitmap, CFbsBitmap* aBitmapMask, TInt aFrameNum,
+ CImageDecoder* aDecoder);
+protected:
+ // from CActive
+ void RunL();
+ void DoCancel();
+private:
+ /*
+ * Constructor
+ */
+ CGlxDRMgifDecoderAO(CGlxDrmGifTextureCreator* aDrmGifTextureCreator);
+
+private:
+ CGlxDrmGifTextureCreator* iDrmGifTextureCreator; // not owned
+ CImageDecoder* iDecoder; // not owned
+ };
+
+#endif /* GLXDRMGIFACTIVEDECODER_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/photosgallery/viewframework/dataprovider/inc/glxdrmgiftexturecreator.h Thu Jul 15 18:39:01 2010 +0300
@@ -0,0 +1,149 @@
+/* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Gif Texture creator implementation
+*
+*/
+
+#ifndef GLXDRMGIFTEXTURECREATOR_H_
+#define GLXDRMGIFTEXTURECREATOR_H_
+
+#include <w32std.h>
+#include <fbs.h>
+#include <icl\imagedata.h>
+
+class CGlxDRMgifDecoderAO;
+class CImageDecoder;
+class CGlxUiUtility;
+class CGlxBinding;
+class TGlxMedia; // Reference to a media item in the item pool
+class CAlfEnv;
+
+namespace Alf
+ {
+ class IMulModel; // An interface for the data model
+ class IMulWidget; // An interface for all Multimedia widgets
+ class MulVisualItem; // Client need to use this class to add data in data model
+ }
+
+const TInt KGlxMaxFrameCount = 25;
+
+class CGlxDrmGifTextureCreator: public CBase
+ {
+public:
+ /*
+ *
+ */
+ static CGlxDrmGifTextureCreator* NewL(const CGlxBinding& aBinding,
+ const TGlxMedia& aMedia, TInt aItemIndex, Alf::IMulModel* aModel);
+
+ /*
+ * destructor
+ */
+ ~CGlxDrmGifTextureCreator();
+public:
+ /*
+ * This is to cancel the active object from decoding
+ */
+ void HandleRunL(TRequestStatus& aStatus);
+
+ /*
+ * This updates the new image.
+ */
+ void UpdateNewImageL(const TGlxMedia& aMedia, TInt aItemIndex);
+
+ /*
+ * Enable/Disable the animation
+ */
+ void AnimateDRMGifItem(TBool aAnimate);
+
+private:
+ /*
+ * Ctor
+ */
+ CGlxDrmGifTextureCreator(const CGlxBinding& aBinding,
+ const TGlxMedia& aMedia, TInt aItemIndex, Alf::IMulModel* aModel);
+
+ /*
+ * ConstructL()
+ */
+ void ConstructL();
+
+ /*
+ * Call a refresh on the screen
+ */
+ void RefreshL();
+
+ /*
+ * Release contents
+ */
+ void ReleaseContent();
+
+ /*
+ * Create bitmap
+ */
+ void CreateBitmapAndStartDecodingL();
+
+ /*
+ * Create an image decoder with given file
+ * @param - Image file
+ */
+ void CreateImageDecoderL(const TDesC& aImageFile);
+
+ static TInt TimerCallbackL(TAny* aThis);
+
+ /*
+ * ProcessTimerEventL
+ */
+ void ProcessTimerEventL();
+
+ /*
+ * ProcessImageL
+ */
+ void ProcessImageL();
+
+ TSize ReCalculateSizeL(TSize& aTargetBitmapSize);
+
+ void SetTexture(TInt aTextureId=KErrNotFound);
+
+private:
+
+ TSize iOrigImageDimensions;
+ TInt iFrameCount;
+
+ CFbsBitmap* iDecodedBitmap[KGlxMaxFrameCount]; //Decoded bitmap of the focussed image
+ CFbsBitmap* iDecodedMask[KGlxMaxFrameCount];
+
+ //ICL
+ CGlxDRMgifDecoderAO* iGlxDecoderAO; // Internal Image decoder AO
+ CImageDecoder* iImageDecoder; // Image Decoder
+ TInt iAnimCount; // animation count
+ RFs iFsSession; // RFs
+
+ CPeriodic* iTimer;
+ CPeriodic* iAnimationTimer;
+ TBool iBitmapReady;
+#ifdef _DEBUG
+ TTime iStartTime;
+ TTime iStopTime;
+#endif
+
+ const CGlxBinding* iBinding;
+ const TGlxMedia* iMedia;
+ Alf::IMulModel* iModel;
+ TInt iItemIndex;
+ CGlxUiUtility* iUiUtility ;
+ TBool iAnimateFlag;
+ TBool iTransparencyPossible;
+ TFrameInfo iFrameInfo;
+ };
+#endif /* GLXDRMGIFTEXTURECREATOR_H_ */
--- a/photosgallery/viewframework/dataprovider/inc/glxmedialistmulmodelprovider.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/inc/glxmedialistmulmodelprovider.h Thu Jul 15 18:39:01 2010 +0300
@@ -66,6 +66,12 @@
*/
IMPORT_C void UpdateItems( TInt aIndex, TInt aCount );
+ /**
+ * Enable/disable animation
+ * @param aAnimate - ETrue to enable the animation; EFalse Otherwise.
+ */
+ IMPORT_C void AnimateDRMGifItem( TBool aAnimate );
+
private:
CGlxMediaListMulModelProvider();
--- a/photosgallery/viewframework/dataprovider/inc/glxmedialistmulmodelproviderimpl.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/inc/glxmedialistmulmodelproviderimpl.h Thu Jul 15 18:39:01 2010 +0300
@@ -77,6 +77,12 @@
* @param aCount Number of items to be updated.
*/
void UpdateItems( TInt aIndex, TInt aCount );
+
+ /**
+ * Enable/disable animation
+ * @param aAnimate - ETrue to enable the animation; EFalse Otherwise.
+ */
+ void AnimateDRMGifItem( TBool aAnimate );
private:
/**
--- a/photosgallery/viewframework/dataprovider/inc/glxmulmodelproviderbase.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/inc/glxmulmodelproviderbase.h Thu Jul 15 18:39:01 2010 +0300
@@ -35,6 +35,7 @@
class MGlxBoundCommand; // Handles user commands
class TGlxMedia; // Reference to a media item in the item pool
class CGlxNavigationalState; // Class that stores the navigational state of the application
+class CGlxDrmGifTextureCreator;
namespace Alf
{
@@ -117,6 +118,12 @@
*/
virtual void HandleOrientationChanged();
+ /**
+ * Enable/disable animation
+ * @param aAnimate enable/disable animation
+ */
+ void AnimateDRMGifItem( TBool aAnimate );
+
private:
/**
@@ -195,6 +202,7 @@
// Create navigational state
CGlxNavigationalState* iNavigationalState;
+ CGlxDrmGifTextureCreator* iDrmGifTextureCreator;
};
#endif // _GLXMULMODELPROVIDERBASE_H_
--- a/photosgallery/viewframework/dataprovider/inc/glxmulthumbnailvarianttype.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/inc/glxmulthumbnailvarianttype.h Thu Jul 15 18:39:01 2010 +0300
@@ -41,18 +41,18 @@
public:
static GlxThumbnailVariantType* NewL( const TGlxMedia& aMedia, const TSize& aSize,
- TBool aIsFocused = EFalse );
+ TBool aIsFocused = EFalse, TInt aTextureId = KErrNotFound );
static GlxThumbnailVariantType* NewLC( const TGlxMedia& aMedia, const TSize& aSize,
- TBool aIsFocused = EFalse );
+ TBool aIsFocused = EFalse, TInt aTextureId = KErrNotFound);
void ConstructL( const TGlxMedia& aMedia, const TSize& aSize, TBool
- aIsFocused = EFalse );
+ aIsFocused = EFalse, TInt aTextureId = KErrNotFound);
/** constructor
* Create via new (EMM) ... */
GlxThumbnailVariantType( const TGlxMedia& aMedia, const TSize& aSize,
- TBool aIsFocused = EFalse );
+ TBool aIsFocused = EFalse, TInt aTextureId = KErrNotFound);
/** destructor */
~GlxThumbnailVariantType();
--- a/photosgallery/viewframework/dataprovider/inc/glxpreviewthumbnailbinding.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/inc/glxpreviewthumbnailbinding.h Thu Jul 15 18:39:01 2010 +0300
@@ -83,7 +83,7 @@
public:
//From CGlxBinding
void PopulateT( Alf::MulVisualItem& aItem, const TGlxMedia& aMedia,
- TBool aIsFocused ) const;
+ TBool aIsFocused, TInt aTextureId = KErrNotFound) const;
CGlxBinding::TResponse HandleFocusChanged( TBool aIsGained );
void HandleItemChangedL(const CMPXCollectionPath& aPath );
--- a/photosgallery/viewframework/dataprovider/src/glxbinding.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxbinding.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -163,7 +163,7 @@
// ----------------------------------------------------------------------------
//
void CGlxTemplateBinding::PopulateT( Alf::MulVisualItem& aItem,
- const TGlxMedia& /*aMedia*/, TBool aIsFocused ) const
+ const TGlxMedia& /*aMedia*/, TBool aIsFocused, TInt /*aTextureId*/ ) const
{
TRACER("CGlxTemplateBinding::PopulateT");
// need to get the MUL field for the editable template from Akash
@@ -334,7 +334,7 @@
// ----------------------------------------------------------------------------
//
void CGlxStringBinding::PopulateT( MulVisualItem& aItem, const TGlxMedia& /*aMedia*/,
- TBool /*aIsFocused*/ ) const
+ TBool /*aIsFocused*/, TInt /*aTextureId*/ ) const
{
TRACER("CGlxStringBinding::PopulateT");
aItem.SetAttribute( MulTag(), *iStringBuffer );
@@ -399,7 +399,7 @@
// ----------------------------------------------------------------------------
//
void CGlxMpxAttributeBinding::PopulateT( MulVisualItem& aItem/**/, const
- TGlxMedia& aMedia, TBool /*aIsFocused*/ ) const
+ TGlxMedia& aMedia, TBool /*aIsFocused*/, TInt /*aTextureId*/ ) const
{
TRACER("CGlxMpxAttributeBinding::PopulateT");
//T is used for throws as per C++ standard.Hence used instead of "L"
@@ -510,7 +510,7 @@
// ----------------------------------------------------------------------------
//
void CGlxThumbnailBinding::PopulateT( MulVisualItem& aItem, const TGlxMedia&
- aMedia, TBool aIsFocused ) const
+ aMedia, TBool aIsFocused, TInt aTextureId ) const
{
TRACER("CGlxThumbnailBinding::PopulateT");
//T is used for throws as per C++ standard.Hence used instead of "L"
@@ -518,7 +518,7 @@
SetAttributeT( aItem, MulTag(),
std::auto_ptr< GlxThumbnailVariantType >(
GlxThumbnailVariantType::NewL( aMedia, iThumbnailSize,
- aIsFocused ) ) );
+ aIsFocused, aTextureId ) ) );
//@todo
}
@@ -635,7 +635,7 @@
// ----------------------------------------------------------------------------
//
void CGlxFullScreenThumbnailBinding::PopulateT( MulVisualItem& aItem, const TGlxMedia&
- aMedia, TBool aIsFocused ) const
+ aMedia, TBool aIsFocused, TInt aTextureId ) const
{
TRACER("CGlxFullScreenThumbnailBinding::PopulateT");
//T is used for throws as per C++ standard.Hence used instead of "L"
@@ -643,7 +643,7 @@
SetAttributeT( aItem, MulTag(),
std::auto_ptr< GlxThumbnailVariantType >(
GlxThumbnailVariantType::NewL( aMedia, iFullScreenThumbnailSize,
- aIsFocused ) ) );
+ aIsFocused, aTextureId ) ) );
}
@@ -770,7 +770,7 @@
// ----------------------------------------------------------------------------
//
void CGlxIconBinding::PopulateT( MulVisualItem& aItem,
- const TGlxMedia& aMedia, TBool /*aIsFocused*/ ) const
+ const TGlxMedia& aMedia, TBool /*aIsFocused*/, TInt /*aTextureId*/ ) const
{
TRACER("CGlxIconBinding::PopulateT");
@@ -841,7 +841,7 @@
// ----------------------------------------------------------------------------
//
void CGlxCommandBinding::PopulateT( Alf::MulVisualItem& aItem, const TGlxMedia& /*aMedia*/,
- TBool /*aIsFocused*/ ) const
+ TBool /*aIsFocused*/, TInt /*aTextureId*/ ) const
{
TRACER("CGlxCommandBinding::PopulateT");
GlxCommandBindingUtility::SetT( aItem, *iCommand );
--- a/photosgallery/viewframework/dataprovider/src/glxbindingset.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxbindingset.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -69,13 +69,13 @@
// ----------------------------------------------------------------------------
//
void CGlxBindingSet::PopulateT( Alf::MulVisualItem& aItem,
- const TGlxMedia& aMedia, TBool aIsFocused ) const
+ const TGlxMedia& aMedia, TBool aIsFocused, TInt aTextureId) const
{
TRACER("CGlxBindingSet::PopulateT");
const TInt count = iBindings.Count();
for ( TInt i = 0; i < count; i++ )
{
- iBindings[i]->PopulateT( aItem, aMedia, aIsFocused );
+ iBindings[i]->PopulateT( aItem, aMedia, aIsFocused, aTextureId );
}
}
--- a/photosgallery/viewframework/dataprovider/src/glxcontainerlistbinding.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxcontainerlistbinding.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -87,7 +87,7 @@
// ---------------------------------------------------------------------------
//
void CGlxContainerListBinding::PopulateT( Alf::MulVisualItem& aItem,
- const TGlxMedia& aMedia, TBool /*aIsFocused*/ ) const
+ const TGlxMedia& aMedia, TBool /*aIsFocused*/, TInt /*aTextureId*/ ) const
{
const TInt KCommaLength = 2;
_LIT(KComma,",");
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/photosgallery/viewframework/dataprovider/src/glxdrmgifactivedecoder.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Gif Decoder Active Object
+ *
+ */
+
+#include <glxtracer.h>
+#include <glxlog.h>
+#include "glxdrmgifactivedecoder.h"
+
+// -----------------------------------------------------------------------------
+// NewL
+// -----------------------------------------------------------------------------
+CGlxDRMgifDecoderAO* CGlxDRMgifDecoderAO::NewL(
+ CGlxDrmGifTextureCreator* aDrmGifTextureCreator)
+ {
+ TRACER("CGlxDRMgifDecoderAO::NewL()");
+ CGlxDRMgifDecoderAO* self = new (ELeave) CGlxDRMgifDecoderAO(
+ aDrmGifTextureCreator);
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CGlxDRMgifDecoderAO()
+// -----------------------------------------------------------------------------
+CGlxDRMgifDecoderAO::CGlxDRMgifDecoderAO(
+ CGlxDrmGifTextureCreator* aDrmGifTextureCreator) :
+ CActive(CActive::EPriorityStandard), iDrmGifTextureCreator(
+ aDrmGifTextureCreator)
+ {
+ TRACER("CGlxDRMgifDecoderAO::CGlxDRMgifDecoderAO()");
+ CActiveScheduler::Add(this);
+ }
+
+// -----------------------------------------------------------------------------
+// ~CGlxDRMgifDecoderAO
+// Cancel the outstanding request
+// -----------------------------------------------------------------------------
+CGlxDRMgifDecoderAO::~CGlxDRMgifDecoderAO()
+ {
+ TRACER("CGlxDRMgifDecoderAO::~CGlxDRMgifDecoderAO()");
+ Cancel();
+ }
+
+// -----------------------------------------------------------------------------
+// RunL
+// Calls iDrmGifTextureCreator->HandleRunL() which is expected to handle the call
+// -----------------------------------------------------------------------------
+void CGlxDRMgifDecoderAO::RunL()
+ {
+ TRACER("CGlxDRMgifDecoderAO::RunL()");
+ if (iStatus == KErrUnderflow)
+ {
+ GLX_LOG_INFO("CGlxDRMgifDecoderAO::RunL() - call ContinueConvert");
+ iDecoder->ContinueConvert(&iStatus);
+ }
+ else
+ {
+ GLX_LOG_INFO("CGlxDRMgifDecoderAO::RunL() - call HandleRunL");
+ iDrmGifTextureCreator->HandleRunL(iStatus);
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// DoCancel
+// -----------------------------------------------------------------------------
+void CGlxDRMgifDecoderAO::DoCancel()
+ {
+ TRACER("CGlxDRMgifDecoderAO::DoCancel()");
+ iDecoder->Cancel();
+ }
+
+// -----------------------------------------------------------------------------
+// ConvertImageL
+// -----------------------------------------------------------------------------
+void CGlxDRMgifDecoderAO::ConvertImageL(CFbsBitmap* aBitmap,
+ CFbsBitmap* aBitmapMask, TInt aFrameNum, CImageDecoder* aDecoder)
+ {
+ TRACER("CGlxDRMgifDecoderAO::ConvertImageL()");
+ iDecoder = aDecoder;
+ GLX_LOG_INFO1("CGlxDRMgifDecoderAO::ConvertImageL() aFrameNum=%d", aFrameNum);
+ if (aBitmapMask)
+ {
+ iDecoder->Convert(&iStatus, *aBitmap, *aBitmapMask, aFrameNum);
+ }
+ else
+ {
+ iDecoder->Convert(&iStatus, *aBitmap, aFrameNum);
+ }
+ SetActive();
+ }
+//end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/photosgallery/viewframework/dataprovider/src/glxdrmgiftexturecreator.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -0,0 +1,445 @@
+/*
+ * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Gif Texture creator implementation
+ *
+ */
+
+#include <e32math.h>
+#include <imageconversion.h>
+#include <glxtracer.h>
+#include <glxlog.h>
+#include <alf/ialfwidgeteventhandler.h> // The interface for event handlers used by widget controls
+#include <mul/imulmodel.h> // An interface for the data model
+#include <alf/alfutil.h> // AlfUtil
+#include <glxmedia.h>
+
+#include "glxtexturemanager.h"
+#include "glxbinding.h"
+#include "glxuiutility.h"
+#include "glxdrmgiftexturecreator.h"
+#include "glxdrmgifactivedecoder.h"
+
+const TInt KTimerInterval = 200000;
+
+// -----------------------------------------------------------------------------
+// NewLC
+// -----------------------------------------------------------------------------
+CGlxDrmGifTextureCreator* CGlxDrmGifTextureCreator::NewL(
+ const CGlxBinding& aBinding, const TGlxMedia& aMedia,
+ TInt aItemIndex, Alf::IMulModel* aModel)
+ {
+ TRACER("CGlxDrmGifTextureCreator* CGlxDrmGifTextureCreator::NewL()");
+ CGlxDrmGifTextureCreator* self = new (ELeave) CGlxDrmGifTextureCreator(
+ aBinding, aMedia, aItemIndex, aModel);
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// destructor
+// -----------------------------------------------------------------------------
+CGlxDrmGifTextureCreator::~CGlxDrmGifTextureCreator()
+ {
+ TRACER("CGlxDrmGifTextureCreator::~CGlxDrmGifTextureCreator()");
+ ReleaseContent();
+
+ // Delete the animation timer
+ if (iAnimationTimer)
+ {
+ iAnimationTimer->Cancel();
+ delete iAnimationTimer;
+ }
+
+ iUiUtility->Close();
+
+ delete iGlxDecoderAO;
+
+ iFsSession.Close();
+ }
+
+// -----------------------------------------------------------------------------
+// ReleaseContent
+// -----------------------------------------------------------------------------
+void CGlxDrmGifTextureCreator::ReleaseContent()
+ {
+ TRACER("void CGlxDrmGifTextureCreator::ReleaseContent()");
+ if (iGlxDecoderAO)
+ {
+ iGlxDecoderAO->Cancel();
+ }
+
+ for (TInt i = 0; i < iFrameCount; i++)
+ {
+ GLX_LOG_INFO1("CGlxDrmGifTextureCreator::ReleaseContent(). Releasing AnimBitmaps %d", i);
+ delete (iDecodedBitmap[i]);
+ iDecodedBitmap[i] = NULL;
+ delete (iDecodedMask[i]);
+ iDecodedMask[i] = NULL;
+ }
+
+ if (iUiUtility && iMedia)
+ {
+ iUiUtility->GlxTextureManager().RemoveTexture(iMedia->Id());
+ }
+
+ if (iImageDecoder)
+ {
+ delete iImageDecoder;
+ iImageDecoder = NULL;
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// Constructor
+// -----------------------------------------------------------------------------
+CGlxDrmGifTextureCreator::CGlxDrmGifTextureCreator(
+ const CGlxBinding& aBinding, const TGlxMedia& aMedia,
+ TInt aItemIndex, Alf::IMulModel* aModel) :
+ iBinding(&aBinding), iMedia(&aMedia), iModel(aModel), iItemIndex(
+ aItemIndex)
+ {
+ TRACER("CGlxDrmGifTextureCreator::CGlxDrmGifTextureCreator()");
+ // Implement nothing here
+ }
+
+// -----------------------------------------------------------------------------
+// ConstructL
+// -----------------------------------------------------------------------------
+void CGlxDrmGifTextureCreator::ConstructL()
+ {
+ TRACER("CGlxDrmGifTextureCreator::ConstructL()");
+ iUiUtility = CGlxUiUtility::UtilityL();
+ User::LeaveIfError(iFsSession.Connect());
+ iBitmapReady = EFalse;
+ iAnimCount = 0;
+ iAnimateFlag = EFalse;
+
+ //Set the initial texture, it could be default or the FS texture
+ SetTexture();
+ // Create the active object
+ iGlxDecoderAO = CGlxDRMgifDecoderAO::NewL(this);
+#ifdef _DEBUG
+ iStartTime.HomeTime();
+#endif
+ CreateImageDecoderL(iMedia->Uri());
+ CreateBitmapAndStartDecodingL();
+ }
+
+// -----------------------------------------------------------------------------
+// UpdateNewImageL
+// -----------------------------------------------------------------------------
+void CGlxDrmGifTextureCreator::UpdateNewImageL(const TGlxMedia& aMedia,
+ TInt aItemIndex)
+ {
+ TRACER("CGlxDrmGifTextureCreator::UpdateNewImageL()");
+ GLX_LOG_INFO1("CGlxDrmGifTextureCreator::UpdateNewImageL() aItemIndex=%d", aItemIndex);
+ if(aItemIndex == iItemIndex)
+ {
+ return;
+ }
+ iTransparencyPossible = EFalse;
+ iItemIndex = aItemIndex;
+ iMedia = &aMedia;
+ // First release the contents before proceeding further
+ ReleaseContent();
+
+ iBitmapReady = EFalse;
+ iAnimCount = 0;
+ iAnimateFlag = EFalse;
+ //Set the initial texture, it could be default or the FS texture
+ SetTexture();
+#ifdef _DEBUG
+ iStartTime.HomeTime();
+#endif
+ CreateImageDecoderL(iMedia->Uri());
+ CreateBitmapAndStartDecodingL();
+ }
+
+// -----------------------------------------------------------------------------
+// AnimateDRMGifItem
+// -----------------------------------------------------------------------------
+void CGlxDrmGifTextureCreator::AnimateDRMGifItem(TBool aAnimate)
+ {
+ TRACER("CGlxDrmGifTextureCreator::AnimateDRMGifItem()");
+ if (!iAnimationTimer)
+ {
+ return;
+ }
+
+ if (aAnimate && iBitmapReady)
+ {
+ if (!iAnimationTimer->IsActive())
+ {
+ GLX_LOG_INFO1("CGlxDrmGifTextureCreator::AnimateDRMGifItem() - Gif iAnimCount =%d", iAnimCount);
+ GLX_LOG_INFO1("=>CGlxDrmGifTextureCreator::AnimateDRMGifItem() - Gif Frame Interval <%d> us",
+ (TInt)iFrameInfo.iDelay.Int64());
+ TInt interval =((TInt)iFrameInfo.iDelay.Int64())?((TInt)iFrameInfo.iDelay.Int64())
+ :KTimerInterval;
+ iAnimationTimer->Start(interval, interval, TCallBack(TimerCallbackL, this));
+ }
+ iAnimateFlag = ETrue;
+ }
+ else
+ {
+ if (iAnimationTimer->IsActive())
+ {
+ iAnimationTimer->Cancel();
+ iAnimateFlag = EFalse;
+ }
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// RefreshL
+// -----------------------------------------------------------------------------
+void CGlxDrmGifTextureCreator::RefreshL()
+ {
+ TRACER("CGlxDrmGifTextureCreator::RefreshL()");
+ GLX_LOG_INFO1("CGlxDrmGifTextureCreator::RefreshL() iAnimCount = %d",iAnimCount);
+ TInt textureId = KErrNotFound;
+ if (iTransparencyPossible)
+ {
+ textureId
+ = (iUiUtility->GlxTextureManager().CreateDRMAnimatedGifTextureL(
+ *iMedia, iMedia->IdSpaceId(), iAnimCount,
+ iDecodedBitmap[iAnimCount], iDecodedMask[iAnimCount])).Id();
+ }
+ else
+ {
+ textureId
+ = (iUiUtility->GlxTextureManager().CreateDRMAnimatedGifTextureL(
+ *iMedia, iMedia->IdSpaceId(), iAnimCount,
+ iDecodedBitmap[iAnimCount], NULL)).Id();
+ }
+
+ SetTexture(textureId);
+ iAnimCount++;
+ // Advance animation if the animation count is becoming maximum,
+ // then set it to zero, such that it can animate again frm begining
+ if (iAnimCount >= iFrameCount)
+ {
+ GLX_LOG_INFO("CGlxDrmGifTextureCreator::RefreshL() Reset iAnimCount");
+ iAnimCount = 0;
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CreateBitmapAndStartDecodingL
+// -----------------------------------------------------------------------------
+void CGlxDrmGifTextureCreator::CreateBitmapAndStartDecodingL()
+ {
+ TRACER("CGlxDrmGifTextureCreator::CreateBitmapAndStartDecodingL()");
+ TSize scrnSize = AlfUtil::ScreenSize();
+ TSize targetBitmapSize;
+
+ GLX_LOG_INFO2("CGlxDrmGifTextureCreator::CreateBitmapAndDecodingL() - bitmapsize=%d, %d",
+ iOrigImageDimensions.iWidth,iOrigImageDimensions.iHeight);
+ TReal32 scaleFactor = 0.0f;
+ if (scrnSize.iWidth * iOrigImageDimensions.iHeight > scrnSize.iHeight
+ * iOrigImageDimensions.iWidth)
+ {
+ scaleFactor = (TReal32) scrnSize.iHeight
+ / (TReal32) iOrigImageDimensions.iHeight;
+ }
+ else
+ {
+ scaleFactor = (TReal32) scrnSize.iWidth
+ / (TReal32) iOrigImageDimensions.iWidth;
+ }
+ GLX_LOG_INFO1("CGlxDrmGifTextureCreator::CreateBitmapAndDecodingL() - scaleFactor=%f",scaleFactor);
+ targetBitmapSize.iHeight = iOrigImageDimensions.iHeight * scaleFactor;
+ targetBitmapSize.iWidth = iOrigImageDimensions.iWidth * scaleFactor;
+ GLX_LOG_INFO2("CGlxDrmGifTextureCreator::CreateBitmapAndDecodingL() - targetBitmapSize=%d, %d",
+ targetBitmapSize.iWidth,targetBitmapSize.iHeight);
+ GLX_LOG_INFO1("CGlxDrmGifTextureCreator::CreateBitmapAndDecodingL() iAnimCount =%d", iAnimCount);
+
+ //create the bitmap for the required size
+ iDecodedBitmap[iAnimCount] = new (ELeave) CFbsBitmap();
+ iDecodedBitmap[iAnimCount]->Create(ReCalculateSizeL(targetBitmapSize),
+ iFrameInfo.iFrameDisplayMode);
+ User::LeaveIfNull(iDecodedBitmap[iAnimCount]);
+
+ if (iFrameInfo.iFlags & TFrameInfo::ETransparencyPossible)
+ {
+ iDecodedMask[iAnimCount] = new (ELeave) CFbsBitmap();
+ iDecodedMask[iAnimCount]->Create(ReCalculateSizeL(
+ targetBitmapSize), iFrameInfo.iFlags
+ & TFrameInfo::EAlphaChannel ? EGray256 : EGray2);
+ User::LeaveIfNull(iDecodedMask[iAnimCount]);
+
+ // decoding the image
+ iGlxDecoderAO->ConvertImageL(iDecodedBitmap[iAnimCount],
+ iDecodedMask[iAnimCount], iAnimCount, iImageDecoder);
+ iTransparencyPossible = ETrue;
+ }
+ else
+ {
+ // decoding the image
+ iGlxDecoderAO->ConvertImageL(iDecodedBitmap[iAnimCount], NULL,
+ iAnimCount, iImageDecoder);
+ }
+ iAnimCount++;
+ }
+
+// -----------------------------------------------------------------------------
+// HandleRunL
+// -----------------------------------------------------------------------------
+void CGlxDrmGifTextureCreator::HandleRunL(TRequestStatus& aStatus)
+ {
+ TRACER("CGlxDrmGifTextureCreator::HandleRunL()");
+ GLX_LOG_INFO2("CGlxDrmGifTextureCreator::HandleRunL() - gif image frame=%d/%d",
+ iAnimCount,iFrameCount);
+
+ if (iAnimCount < iFrameCount )
+ {
+ if (!iGlxDecoderAO->IsActive())
+ {
+ CreateBitmapAndStartDecodingL();
+ }
+ }
+ else
+ {
+#ifdef _DEBUG
+ iStopTime.HomeTime();
+ GLX_LOG_INFO1("CGlxDrmGifTextureCreator::HandleRunL() ConvertImageL took"
+ " <%d> us", (TInt)iStopTime.MicroSecondsFrom(iStartTime).Int64());
+#endif
+ TInt err = aStatus.Int();
+ GLX_LOG_INFO1("CGlxDrmGifTextureCreator::HandleRunL : err=%d", err);
+
+ if (err == KErrNone)
+ {
+ iBitmapReady = ETrue;
+ iAnimateFlag = ETrue;
+ iAnimCount = 0;
+ ProcessImageL();
+ }
+
+ //release imagedecoder after the conversion is over
+ if (iImageDecoder)
+ {
+ delete iImageDecoder;
+ iImageDecoder = NULL;
+ }
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// ProcessImageL
+// -----------------------------------------------------------------------------
+void CGlxDrmGifTextureCreator::ProcessImageL()
+ {
+ TRACER("CGlxDrmGifTextureCreator::ProcessImageL()");
+ RefreshL();
+
+ GLX_LOG_INFO1("CGlxDrmGifTextureCreator::ProcessImageL() iAnimCount =%d", iAnimCount);
+ GLX_LOG_INFO1("=>CGlxDrmGifTextureCreator::ProcessImageL() - Gif Frame Interval <%d> us",
+ (TInt)iFrameInfo.iDelay.Int64());
+ iAnimationTimer->Cancel();
+ if (iAnimateFlag)
+ {
+ // Next frame
+ TInt interval =((TInt)iFrameInfo.iDelay.Int64())?((TInt)iFrameInfo.iDelay.Int64())
+ :KTimerInterval;
+ iAnimationTimer->Start(interval,interval, TCallBack(TimerCallbackL, this));
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CreateImageDecoderL
+// -----------------------------------------------------------------------------
+void CGlxDrmGifTextureCreator::CreateImageDecoderL(const TDesC& aImageFile)
+ {
+ TRACER("CGlxDrmGifTextureCreator::CreateImageDecoderL()");
+ GLX_LOG_URI("CGlxDrmGifTextureCreator::CreateImageDecoderL(%S)", &aImageFile);
+
+ CImageDecoder::TOptions options =
+ (CImageDecoder::TOptions) (CImageDecoder::EOptionNoDither
+ | CImageDecoder::EOptionAlwaysThread);
+ // Create a decoder for the image in the named file
+ TRAPD(error,iImageDecoder = CImageDecoder::FileNewL(iFsSession,
+ aImageFile, options, KNullUid));
+ if (error != KErrNone)
+ {
+ User::Leave(error);
+ }
+ iFrameInfo = iImageDecoder->FrameInfo();
+ iOrigImageDimensions = iImageDecoder->FrameInfo().iOverallSizeInPixels;
+ GLX_LOG_INFO1("=>CGlxDrmGifTextureCreator::CreateImageDecoderL() - Gif Frame Interval <%d> us",
+ (TInt)iFrameInfo.iDelay.Int64());
+ iFrameCount = iImageDecoder->FrameCount();
+
+ // We are creating array of KGlxMaxFrameCount frames
+ // So re-setting the array-count with the no.
+ // It will animate till that no. of frames.
+ if (iFrameCount > KGlxMaxFrameCount)
+ {
+ iFrameCount = KGlxMaxFrameCount;
+ }
+ //dont create the timer if it is a singleframe.no need to animate
+ if (iFrameCount > 1)
+ {
+ iAnimationTimer = CPeriodic::NewL(CActive::EPriorityLow);
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// TimerCallbackL
+// -----------------------------------------------------------------------------
+TInt CGlxDrmGifTextureCreator::TimerCallbackL(TAny* aThis)
+ {
+ TRACER("CGlxDrmGifTextureCreator::TimerCallbackL()");
+ static_cast<CGlxDrmGifTextureCreator*> (aThis)->ProcessTimerEventL();
+ return KErrNone;
+ }
+
+// -----------------------------------------------------------------------------
+// ProcessTimerEventL
+// -----------------------------------------------------------------------------
+void CGlxDrmGifTextureCreator::ProcessTimerEventL()
+ {
+ TRACER("CGlxDrmGifTextureCreator::ProcessTimerEventL()");
+ ProcessImageL();
+ }
+
+// -----------------------------------------------------------------------------
+// ReCalculateSize
+// -----------------------------------------------------------------------------
+TSize CGlxDrmGifTextureCreator::ReCalculateSizeL(TSize& aTargetBitmapSize)
+ {
+ TRACER("CGlxDrmGifTextureCreator::ReCalculateSizeL()");
+ // calculate the reduction factor on what size we need
+ TInt reductionFactor = iImageDecoder->ReductionFactor(iOrigImageDimensions,
+ aTargetBitmapSize);
+ // get the reduced size onto destination size
+ TSize destSize;
+ User::LeaveIfError(iImageDecoder->ReducedSize(iOrigImageDimensions,
+ reductionFactor, destSize));
+ GLX_LOG_INFO2("CGlxDrmGifTextureCreator::ReCalculateSizeL() destSize=%d, %d",
+ destSize.iWidth,destSize.iHeight);
+ return destSize;
+ }
+
+// -----------------------------------------------------------------------------
+// SetTexture
+// -----------------------------------------------------------------------------
+void CGlxDrmGifTextureCreator::SetTexture(TInt aTextureId)
+ {
+ TRACER("CGlxDrmGifTextureCreator::SetTexture()");
+ auto_ptr<MulVisualItem> item(new (EMM) MulVisualItem());
+ iBinding->PopulateT(*item, *iMedia, ETrue, aTextureId);
+ iModel->SetData(iItemIndex, item);
+ }
--- a/photosgallery/viewframework/dataprovider/src/glxmedialistmulmodelprovider.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxmedialistmulmodelprovider.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -82,3 +82,14 @@
TRACER("CGlxMediaListMulModelProvider::UpdateItems");
iImpl->UpdateItems(aIndex, aCount);
}
+
+// ----------------------------------------------------------------------------
+// AnimateDRMGifItem
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void CGlxMediaListMulModelProvider::AnimateDRMGifItem( TBool aAnimate )
+ {
+ TRACER("CGlxMediaListMulModelProvider::AnimateDRMGifItem");
+ iImpl->AnimateDRMGifItem(aAnimate);
+ }
+//End of file
--- a/photosgallery/viewframework/dataprovider/src/glxmedialistmulmodelproviderimpl.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxmedialistmulmodelproviderimpl.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -336,3 +336,12 @@
TRACER("CGlxMediaListMulModelProviderImpl::UpdateItems");
CGlxMulModelProviderBase::UpdateItems(aIndex, aCount);
}
+
+// ----------------------------------------------------------------------------
+// AnimateDRMGifItem
+// ----------------------------------------------------------------------------
+//
+void CGlxMediaListMulModelProviderImpl::AnimateDRMGifItem( TBool aAnimate )
+ {
+ CGlxMulModelProviderBase::AnimateDRMGifItem(aAnimate);
+ }
--- a/photosgallery/viewframework/dataprovider/src/glxmulmodelproviderbase.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxmulmodelproviderbase.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -43,6 +43,7 @@
#include <glxicons.mbg>
#include <glxuistd.h>
#include <mul/imulcoverflowwidget.h> // An interface for Multimedia coverflow Widget
+#include "glxdrmgiftexturecreator.h"
using namespace Alf;
@@ -91,6 +92,11 @@
CGlxMulModelProviderBase::~CGlxMulModelProviderBase()
{
TRACER("CGlxMulModelProviderBase::~CGlxMulModelProviderBase");
+ if(iDrmGifTextureCreator)
+ {
+ delete iDrmGifTextureCreator;
+ iDrmGifTextureCreator = NULL;
+ }
// remove event handler
iWidget.RemoveEventHandler( *this );
if ( iNavigationalState )
@@ -293,8 +299,51 @@
const TGlxMedia& aMedia, TInt aAtIndex )
{
TRACER("CGlxMulModelProviderBase::SetDataT");
- iModel->SetData( aAtIndex, CreateItemT( aBinding, aMedia,
- IsFocused( aAtIndex ) ) );
+
+ if(IsFocused(aAtIndex))
+ {
+ TBool drm = EFalse;
+ TGlxMediaGeneralRightsValidity isValid = EGlxDrmRightsValidityUnknown;
+ if (aMedia.GetDrmProtected(drm))
+ {
+ GLX_DEBUG1("CGlxMulModelProviderBase::SetDataT GetDrmValidity");
+ aMedia.GetDrmValidity(isValid);
+ }
+ TInt frameCount;
+ aMedia.GetFrameCount(frameCount);
+
+ //Create the DRM gif texture intance only if the DRM gif image is
+ //valid and focused
+ if (frameCount > 1 && drm && isValid == EGlxDrmRightsValid)
+ {
+ if (!iDrmGifTextureCreator)
+ {
+ iDrmGifTextureCreator = CGlxDrmGifTextureCreator::NewL(
+ aBinding, aMedia, aAtIndex, iModel);
+ }
+ else
+ {
+ iDrmGifTextureCreator->UpdateNewImageL(aMedia, aAtIndex);
+ }
+ }
+ else
+ {
+ //if the focus is changed then delete the DRMGifTextureCreator
+ //instance if any
+ if (iDrmGifTextureCreator)
+ {
+ delete iDrmGifTextureCreator;
+ iDrmGifTextureCreator = NULL;
+ }
+ iModel->SetData(aAtIndex, CreateItemT(aBinding, aMedia,
+ IsFocused(aAtIndex)));
+ }
+ }
+ else
+ {
+ iModel->SetData( aAtIndex, CreateItemT( aBinding, aMedia,
+ IsFocused( aAtIndex ) ) );
+ }
}
// ----------------------------------------------------------------------------
@@ -559,4 +608,16 @@
iWidget.AddEventHandler( *this );
}
+//-----------------------------------------------------------------------------
+// AnimateDRMGifItem
+//-----------------------------------------------------------------------------
+//
+void CGlxMulModelProviderBase::AnimateDRMGifItem( TBool aAnimate )
+ {
+ TRACER("CGlxMulModelProviderBase::AnimateDRMGifItem");
+ if(iDrmGifTextureCreator)
+ {
+ iDrmGifTextureCreator->AnimateDRMGifItem(aAnimate);
+ }
+ }
//EOF
--- a/photosgallery/viewframework/dataprovider/src/glxpreviewthumbnailbinding.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxpreviewthumbnailbinding.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -139,7 +139,7 @@
// ----------------------------------------------------------------------------
//
void CGlxPreviewThumbnailBinding::PopulateT(Alf::MulVisualItem& aItem, const TGlxMedia& aMedia,
- TBool aIsFocused )const
+ TBool aIsFocused, TInt /*aTextureId*/ )const
{
TRACER("CGlxPreviewThumbnailBinding::PopulateT");
//T is used for throws as per C++ standard.Hence used instead of "L"
--- a/photosgallery/viewframework/dataprovider/src/glxthumbnailvarianttype.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxthumbnailvarianttype.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -41,11 +41,11 @@
// ----------------------------------------------------------------------------
//
GlxThumbnailVariantType* GlxThumbnailVariantType::NewL( const TGlxMedia& aMedia, const TSize& aSize,
- TBool aIsFocused )
+ TBool aIsFocused, TInt aTextureId )
{
TRACER("GlxThumbnailVariantType::NewL");
GlxThumbnailVariantType* self = GlxThumbnailVariantType::NewLC( aMedia,
- aSize, aIsFocused );
+ aSize, aIsFocused, aTextureId );
CleanupStack::Pop( self );
return self;
}
@@ -55,14 +55,14 @@
// ----------------------------------------------------------------------------
//
GlxThumbnailVariantType* GlxThumbnailVariantType::NewLC( const TGlxMedia& aMedia, const TSize& aSize,
- TBool aIsFocused )
+ TBool aIsFocused, TInt aTextureId )
{
TRACER("GlxThumbnailVariantType::NewLC");
GlxThumbnailVariantType* self = new ( EMM ) GlxThumbnailVariantType(
- aMedia, aSize, aIsFocused );
+ aMedia, aSize, aIsFocused, aTextureId );
CleanupStack::PushL( self );
- self->ConstructL( aMedia, aSize, aIsFocused );
+ self->ConstructL( aMedia, aSize, aIsFocused, aTextureId );
return self;
}
@@ -71,7 +71,7 @@
// ----------------------------------------------------------------------------
//
GlxThumbnailVariantType::GlxThumbnailVariantType( const TGlxMedia& /*aMedia*/,
- const TSize& /*aSize*/, TBool /*aIsFocused*/ )
+ const TSize& /*aSize*/, TBool /*aIsFocused*/, TInt /*aTextureId*/ )
{
}
@@ -81,11 +81,18 @@
// ----------------------------------------------------------------------------
//
void GlxThumbnailVariantType::ConstructL( const TGlxMedia& aMedia, const TSize& aSize,
- TBool aIsFocused )
+ TBool aIsFocused, TInt aTextureId )
{
TRACER("GlxThumbnailVariantType::ConstructL");
- GLX_DEBUG2("GlxThumbnailVariantType::ConstructL Media Id=%d", aMedia.Id().Value());
+ GLX_DEBUG2("GlxThumbnailVariantType::ConstructL Media Id=%d", aMedia.Id().Value());
+
+ if(aTextureId != KErrNotFound)
+ {
+ mTextureId = aTextureId;
+ return;
+ }
+
iUiUtility = CGlxUiUtility::UtilityL();
TBool drm = EFalse;
--- a/photosgallery/viewframework/drmutility/src/glxdrmutility.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/drmutility/src/glxdrmutility.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -1,27 +1,21 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: DRM utility implementation
-*
-*/
+ * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: DRM utility implementation
+ *
+ */
-
-
-/**
- * @internal reviewed 03/07/2007 by Rowland Cook
- */
-
// INCLUDES
#include "glxdrmutility.h"
@@ -36,6 +30,7 @@
#include <caf/data.h>
#include <caf/manager.h>
#include "glxtracer.h"
+#include "glxlog.h"
const TInt KGlxDRMThumbnailHeight = 120;
const TInt KGlxDRMThumbnailWidth = 90;
@@ -50,12 +45,12 @@
*/
struct CGlxDrmTls
{
- CGlxDrmTls(CGlxDRMUtility* aUtility)
+ CGlxDrmTls(CGlxDRMUtility* aUtility)
{
iDrmUtility = aUtility;
iRefCount = 0;
}
-
+
CGlxDRMUtility* iDrmUtility;
TInt iRefCount;
};
@@ -66,38 +61,38 @@
EXPORT_C CGlxDRMUtility* CGlxDRMUtility::InstanceL()
{
TRACER("CGlxDRMUtility::InstanceL()");
- CGlxDrmTls* tls = reinterpret_cast<CGlxDrmTls*>(Dll::Tls());
-
- if ( !tls )
+ CGlxDrmTls* tls = reinterpret_cast<CGlxDrmTls*> (Dll::Tls());
+
+ if (!tls)
{
- CGlxDRMUtility* drmutil = new(ELeave)CGlxDRMUtility();
+ CGlxDRMUtility* drmutil = new (ELeave) CGlxDRMUtility();
CleanupStack::PushL(drmutil);
drmutil->ConstructL();
-
+
tls = new (ELeave) CGlxDrmTls(drmutil);
-
+
CleanupStack::Pop(drmutil);
-
- Dll::SetTls( reinterpret_cast<TAny*>(tls));
+
+ Dll::SetTls(reinterpret_cast<TAny*> (tls));
}
-
+
tls->iRefCount++;
-
+
return tls->iDrmUtility;
}
-
+
//============================================================================
// Close
//============================================================================
EXPORT_C void CGlxDRMUtility::Close()
{
TRACER("CGlxDRMUtility::Close()");
- CGlxDrmTls* tls = reinterpret_cast<CGlxDrmTls*>(Dll::Tls());
-
- if ( tls )
+ CGlxDrmTls* tls = reinterpret_cast<CGlxDrmTls*> (Dll::Tls());
+
+ if (tls)
{
tls->iRefCount--;
-
+
// Delete the tls pointer and list manager instance if this was the
// last reference
if (tls->iRefCount == 0)
@@ -119,37 +114,45 @@
delete iDrmHelper;
delete iLastConsumedItemUri;
}
-
+
//============================================================================
// ItemRightsValidityCheckL
// for checking DRM rights validity for item.
// is called before right is consumed and for all items (focused or unfocused).
//============================================================================
-EXPORT_C TBool CGlxDRMUtility::ItemRightsValidityCheckL( const TDesC& aUri,
- TBool aCheckViewRights )
+EXPORT_C TBool CGlxDRMUtility::ItemRightsValidityCheckL(const TDesC& aUri,
+ TBool aCheckViewRights)
{
- TRACER("CGlxDRMUtility::ItemRightsValidityCheckL()");
+ TRACER("CGlxDRMUtility::ItemRightsValidityCheckL(URI)");
+#ifdef _DEBUG
+ TTime startTime;
+ startTime.HomeTime();
+#endif
// When checking current rights for a URI
-
//Allow to Open if rights for a URI was just consumed (i.e. same as stored URI)
- if ( iLastConsumedItemUri->Length() > 0 )
- {
- if ( aUri.CompareF( *iLastConsumedItemUri ) == 0 )
- {
- return ETrue;
- }
- }
+ if (iLastConsumedItemUri->Length() > 0)
+ {
+ if (aUri.CompareF(*iLastConsumedItemUri) == 0)
+ {
+ return ETrue;
+ }
+ }
- //Else for uri of non-focused uri, just check validity rights
+ //Else for uri of non-focused uri, just check validity rights
TBool rightsValid = EFalse;
- TVirtualPathPtr path( aUri, KDefaultContentObject() );
+ TVirtualPathPtr path(aUri, KDefaultContentObject());
- ContentAccess::TAttribute attr =
+ ContentAccess::TAttribute attr =
aCheckViewRights ? ContentAccess::ECanView : ContentAccess::ECanPlay;
// rightsValid is not updated if an error occurs
- iCManager->GetAttribute( attr, rightsValid, path );
-
+ iCManager->GetAttribute(attr, rightsValid, path);
+#ifdef _DEBUG
+ TTime stopTime;
+ stopTime.HomeTime();
+ GLX_DEBUG2("CGlxDRMUtility::ItemRightsValidityCheckL(URI) took <%d> us",
+ (TInt) stopTime.MicroSecondsFrom(startTime).Int64());
+#endif
return rightsValid;
}
@@ -158,15 +161,28 @@
// for checking DRM rights validity for item.
// is called before right is consumed and for all items (focused or unfocused).
//============================================================================
-EXPORT_C TBool CGlxDRMUtility::ItemRightsValidityCheckL( RFile& aFileHandle,
- TBool aCheckViewRights )
+EXPORT_C TBool CGlxDRMUtility::ItemRightsValidityCheckL(RFile& aFileHandle,
+ TBool aCheckViewRights)
{
- TRACER("CGlxDRMUtility::ItemRightsValidityCheckL()");
+ TRACER("CGlxDRMUtility::ItemRightsValidityCheckL(RFile)");
+#ifdef _DEBUG
+ TTime startTime;
+ startTime.HomeTime();
+#endif
TBool rightsValid = EFalse;
+ ContentAccess::TAttribute attrib =
+ aCheckViewRights ? ContentAccess::ECanView : ContentAccess::ECanPlay;
- ContentAccess::CContent* content = ContentAccess::CContent::NewLC( aFileHandle );
- TInt err( content->GetAttribute( ContentAccess::ECanView, rightsValid ) );
- CleanupStack::PopAndDestroy( content );
+ ContentAccess::CContent* content = ContentAccess::CContent::NewLC(
+ aFileHandle);
+ TInt err(content->GetAttribute(attrib, rightsValid));
+ CleanupStack::PopAndDestroy(content);
+#ifdef _DEBUG
+ TTime stopTime;
+ stopTime.HomeTime();
+ GLX_DEBUG2("CGlxDRMUtility::ItemRightsValidityCheckL(RFile) took <%d> us",
+ (TInt) stopTime.MicroSecondsFrom(startTime).Int64());
+#endif
return rightsValid;
}
@@ -174,15 +190,15 @@
// DisplayItemRightsCheckL
// is called after right is consumed and for only focused/displayed item.
//============================================================================
-EXPORT_C TBool CGlxDRMUtility::DisplayItemRightsCheckL( const TDesC& aUri,
- TBool aCheckViewRights )
+EXPORT_C TBool CGlxDRMUtility::DisplayItemRightsCheckL(const TDesC& aUri,
+ TBool aCheckViewRights)
{
- TRACER("CGlxDRMUtility::DisplayItemRightsCheckL()");
+ TRACER("CGlxDRMUtility::DisplayItemRightsCheckL(URI)");
// Allow to display if rights for a URI was just consumed (i.e. same as stored URI)
- if ( iLastConsumedItemUri->Length() > 0 )
+ if (iLastConsumedItemUri->Length() > 0)
{
- if ( aUri.CompareF( *iLastConsumedItemUri ) == 0 )
+ if (aUri.CompareF(*iLastConsumedItemUri) == 0)
{
return ETrue;
}
@@ -192,33 +208,33 @@
ClearLastConsumedItemUriL();
// Otherwise, check current rights for the URI of newly focused item
- return ItemRightsValidityCheckL( aUri, aCheckViewRights );
+ return ItemRightsValidityCheckL(aUri, aCheckViewRights);
}
//============================================================================
// DisplayItemRightsCheckL
// is called after right is consumed and for only focused/displayed item.
//============================================================================
-EXPORT_C TBool CGlxDRMUtility::DisplayItemRightsCheckL( RFile& aFileHandle,
- TBool aCheckViewRights )
+EXPORT_C TBool CGlxDRMUtility::DisplayItemRightsCheckL(RFile& aFileHandle,
+ TBool aCheckViewRights)
{
- TRACER("CGlxDRMUtility::DisplayItemRightsCheckL()");
+ TRACER("CGlxDRMUtility::DisplayItemRightsCheckL(RFile)");
// Otherwise, check current rights for the URI of newly focused item
- return ItemRightsValidityCheckL( aFileHandle, aCheckViewRights );
+ return ItemRightsValidityCheckL(aFileHandle, aCheckViewRights);
}
-
//============================================================================
// ConsumeRightsL
//============================================================================
EXPORT_C TBool CGlxDRMUtility::ConsumeRightsL(const TDesC& aUri)
{
- TRACER("CGlxDRMUtility::ConsumeRightsL()");
- TVirtualPathPtr path( aUri, KDefaultContentObject() );
+ TRACER("CGlxDRMUtility::ConsumeRightsL(URI)");
+ TVirtualPathPtr path(aUri, KDefaultContentObject());
// Create a CData object to read the content
// Tell the agent we are planning to display the content
- CData* data = CData::NewLC(path, ContentAccess::EView, EContentShareReadOnly);
+ CData* data = CData::NewLC(path, ContentAccess::EView,
+ EContentShareReadOnly);
//When consuming rights for a URI, clear stored URI
ClearLastConsumedItemUriL();
@@ -226,12 +242,12 @@
// Execute the intent, tell the agent that we plan to display the content
// It is at this point that any stateful rights will be decremented
TInt err = data->ExecuteIntent(ContentAccess::EView);
- if ( err == KErrNone )
+ if (err == KErrNone)
{
//Update stored URI
- iLastConsumedItemUri = iLastConsumedItemUri->ReAllocL( aUri.Length() );
+ iLastConsumedItemUri = iLastConsumedItemUri->ReAllocL(aUri.Length());
TPtr newPtr = iLastConsumedItemUri->Des();
- newPtr.Copy( aUri );
+ newPtr.Copy(aUri);
}
CleanupStack::PopAndDestroy(data);
@@ -239,16 +255,15 @@
return (err == KErrNone);
}
-
//============================================================================
// ConsumeRightsL
//============================================================================
EXPORT_C TBool CGlxDRMUtility::ConsumeRightsL(RFile& aFileHandle)
{
- TRACER("CGlxDRMUtility::ConsumeRightsL(RFile& aFileHandle)");
- CData* data = CData::NewLC( aFileHandle, KDefaultContentObject(), EPeek );
+ TRACER("CGlxDRMUtility::ConsumeRightsL(RFile)");
+ CData* data = CData::NewLC(aFileHandle, KDefaultContentObject(), EPeek);
TInt err = data->ExecuteIntent(ContentAccess::EView);
- CleanupStack::PopAndDestroy( data );
+ CleanupStack::PopAndDestroy(data);
return (err == KErrNone);
}
@@ -256,12 +271,13 @@
//Clears Last Consumed Uri
//============================================================================
EXPORT_C void CGlxDRMUtility::ClearLastConsumedItemUriL()
- {
- //clears the stored uri
- TPtr ptr = iLastConsumedItemUri->Des();
- ptr.Zero();
- iLastConsumedItemUri = iLastConsumedItemUri->ReAllocL( 0 );
- }
+ {
+ TRACER("CGlxDRMUtility::ClearLastConsumedItemUriL()");
+ //clears the stored uri
+ TPtr ptr = iLastConsumedItemUri->Des();
+ ptr.Zero();
+ iLastConsumedItemUri = iLastConsumedItemUri->ReAllocL(0);
+ }
//============================================================================
// Test whether a media item is OMA DRM 2.0 protected and has an associated
@@ -273,11 +289,12 @@
TBool canShowInfoOnline = EFalse;
HBufC8* urlBuf = NULL;
- canShowInfoOnline = iDrmHelper->HasInfoUrlL( const_cast<TDesC&>(aUri) , urlBuf);
+ canShowInfoOnline = iDrmHelper->HasInfoUrlL(const_cast<TDesC&> (aUri),
+ urlBuf);
// discard buf we don't need it
delete urlBuf;
-
+
return canShowInfoOnline;
}
@@ -287,27 +304,29 @@
EXPORT_C void CGlxDRMUtility::ShowInfoOnlineL(const TDesC& aUri)
{
TRACER("CGlxDRMUtility::ShowInfoOnlineL()");
- iDrmHelper->OpenInfoUrlL( const_cast<TDesC&>(aUri) );
+ iDrmHelper->OpenInfoUrlL(const_cast<TDesC&> (aUri));
}
//============================================================================
// Test whether a media item can be set as automated content.
//============================================================================
-EXPORT_C TBool CGlxDRMUtility::CanSetAsAutomatedL(const TDesC& aUri,
- TGlxDrmAutomatedType aType)
+EXPORT_C TBool CGlxDRMUtility::CanSetAsAutomatedL(const TDesC& aUri,
+ TGlxDrmAutomatedType aType)
{
TRACER("CGlxDRMUtility::CanSetAsAutomatedL()");
TBool canSetAutomated = EFalse;
- switch(aType)
- {
- case EGlxDrmAutomatedTypeWallpaper:
+ switch (aType)
{
- User::LeaveIfError(iDrmHelper->SetAutomatedType(CDRMHelper::EAutomatedTypeWallpaper));
- User::LeaveIfError(iDrmHelper->CanSetAutomated(aUri, canSetAutomated));
- break;
- }
- default:
- break;
+ case EGlxDrmAutomatedTypeWallpaper:
+ {
+ User::LeaveIfError(iDrmHelper->SetAutomatedType(
+ CDRMHelper::EAutomatedTypeWallpaper));
+ User::LeaveIfError(iDrmHelper->CanSetAutomated(aUri,
+ canSetAutomated));
+ break;
+ }
+ default:
+ break;
};
return canSetAutomated;
}
@@ -315,44 +334,45 @@
//============================================================================
// SetAsAutomatedL
//============================================================================
-EXPORT_C void CGlxDRMUtility::SetAsAutomatedL(const TDesC& aUri,
- TGlxDrmAutomatedType aType)
+EXPORT_C void CGlxDRMUtility::SetAsAutomatedL(const TDesC& aUri,
+ TGlxDrmAutomatedType aType)
{
TRACER("CGlxDRMUtility::SetAsAutomatedL()");
- switch(aType)
+ switch (aType)
{
- case EGlxDrmAutomatedTypeWallpaper:
- {
- TInt error = iDrmHelper->SetAutomatedType(CDRMHelper::EAutomatedTypeWallpaper);
- if(KErrNone==error)
+ case EGlxDrmAutomatedTypeWallpaper:
{
- error= iDrmHelper->SetAutomatedPassive(aUri);
- if(KErrNone!=error)
+ TInt error = iDrmHelper->SetAutomatedType(
+ CDRMHelper::EAutomatedTypeWallpaper);
+ if (KErrNone == error)
{
- iDrmHelper->HandleErrorL(error, aUri);
+ error = iDrmHelper->SetAutomatedPassive(aUri);
+ if (KErrNone != error)
+ {
+ iDrmHelper->HandleErrorL(error, aUri);
+ }
}
+
+ break;
}
-
- break;
- }
- default:
- break;
+ default:
+ break;
};
}
//============================================================================
// ShowDRMDetailsPane
//============================================================================
-EXPORT_C void CGlxDRMUtility::ShowDRMDetailsPaneL( const TDesC& aUri )
+EXPORT_C void CGlxDRMUtility::ShowDRMDetailsPaneL(const TDesC& aUri)
{
- TRACER("CGlxDRMUtility::ShowDRMDetailsPaneL()");
+ TRACER("CGlxDRMUtility::ShowDRMDetailsPaneL(URI)");
TRAPD( err, iDrmHelper->LaunchDetailsViewEmbeddedL( aUri ) );
// if no rights ask user to re-activate
- if( err == KErrCANoRights )
+ if (err == KErrCANoRights)
{
HBufC* buf = aUri.AllocLC();
- iDrmHelper->ActivateContentL( *buf );
- CleanupStack::PopAndDestroy( buf );
+ iDrmHelper->ActivateContentL(*buf);
+ CleanupStack::PopAndDestroy(buf);
}
}
@@ -362,14 +382,13 @@
//============================================================================
EXPORT_C void CGlxDRMUtility::ShowDRMDetailsPaneL(RFile& aFileHandle)
{
- TRACER("CGlxDRMUtility::ShowDRMDetailsPaneL()");
+ TRACER("CGlxDRMUtility::ShowDRMDetailsPaneL(RFile)");
TRAPD( err, iDrmHelper->LaunchDetailsViewEmbeddedL( aFileHandle ) );
// if no rights ask user to re-activate
- if( err == KErrCANoRights )
+ if (err == KErrCANoRights)
{
//need to check if we need to handle.
}
-
}
//============================================================================
@@ -379,30 +398,31 @@
{
TRACER("CGlxDRMUtility::IsForwardLockedL()");
TBool forwardLocked = EFalse;
- TVirtualPathPtr path( aUri, KDefaultContentObject() );
+ TVirtualPathPtr path(aUri, KDefaultContentObject());
// forwardLocked is not updated if an error occurs
- iCManager->GetAttribute( ContentAccess::EIsForwardable, forwardLocked, path );
+ iCManager->GetAttribute(ContentAccess::EIsForwardable, forwardLocked,
+ path);
return forwardLocked;
}
-
-//============================================================================
-// ShowRightsInfoL
-//============================================================================
-EXPORT_C void CGlxDRMUtility::ShowRightsInfoL(const TDesC& aUri)
- {
- TRACER("CGlxDRMUtility::ShowRightsInfoL()");
- iDrmHelper->CheckRightsAmountL( aUri );
- }
//============================================================================
// ShowRightsInfoL
//============================================================================
-EXPORT_C void CGlxDRMUtility::ShowRightsInfoL(RFile& aFileHandle)
+EXPORT_C void CGlxDRMUtility::ShowRightsInfoL(const TDesC& aUri)
{
- TRACER("CGlxDRMUtility::ShowRightsInfoL(aFileHandle)");
- iDrmHelper->CheckRightsAmountL( aFileHandle );
+ TRACER("CGlxDRMUtility::ShowRightsInfoL(URI)");
+ iDrmHelper->CheckRightsAmountL(aUri);
+ }
+
+//============================================================================
+// ShowRightsInfoL
+//============================================================================
+EXPORT_C void CGlxDRMUtility::ShowRightsInfoL(RFile& aFileHandle)
+ {
+ TRACER("CGlxDRMUtility::ShowRightsInfoL(RFile)");
+ iDrmHelper->CheckRightsAmountL(aFileHandle);
}
//============================================================================
@@ -412,17 +432,17 @@
{
TRACER("CGlxDRMUtility::DRMThumbnailSize()");
TSize thumbnailSize(KGlxDRMThumbnailWidth, KGlxDRMThumbnailHeight);
-
- if((aSize.iWidth*aSize.iHeight)/4 <
- KGlxDRMThumbnailWidth * KGlxDRMThumbnailHeight)
+
+ if ((aSize.iWidth * aSize.iHeight) / 4 < KGlxDRMThumbnailWidth
+ * KGlxDRMThumbnailHeight)
{
- thumbnailSize.iWidth = aSize.iWidth/2;
- thumbnailSize.iHeight = aSize.iHeight/2;
+ thumbnailSize.iWidth = aSize.iWidth / 2;
+ thumbnailSize.iHeight = aSize.iHeight / 2;
}
-
+
return thumbnailSize;
}
-
+
/**
* C++ default constructor.
*/
@@ -442,5 +462,4 @@
iLastConsumedItemUri = HBufC::NewL(0);
}
-
// End of File
--- a/photosgallery/viewframework/medialists/inc/glxmedialist.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/medialists/inc/glxmedialist.h Thu Jul 15 18:39:01 2010 +0300
@@ -402,11 +402,6 @@
* Handles the tasks after open completes
*/
void HandleOpenL();
-
- /*
- * Reopens Medialist after callback timeout.
- */
- static TInt TimeOut(TAny* aSelf);
private:
/**
@@ -517,10 +512,6 @@
/// VisibleWindow Index
TInt iVisibleWindowIndex;
-
- /// Periodic Timer
- CPeriodic* iBatchOperationMonitorTimer;
-
};
#endif // C_GLXMEDIALIST_H
--- a/photosgallery/viewframework/medialists/src/glxcachemanager.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/medialists/src/glxcachemanager.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -222,61 +222,63 @@
void CGlxCacheManager::HandleGarbageCollectionL(TBool aStart)
{
TRACER("CGlxCacheManager::HandleGarbageCollection");
+ GLX_DEBUG2("CGlxCacheManager::HandleGarbageCollectionL() aStart=%d", aStart);
TInt freeMemory = 0;
-
- HAL::Get( HALData::EMemoryRAMFree, freeMemory );
-
- if(aStart)
- {
- if(freeMemory < KGlxLowerMemoryLimitForCleanUp)
- {
- // 2 page - 30 Items for Flush
- TInt count = 2;
- if(freeMemory < (KGlxLowerMemoryLimitForCleanUp/2))
- {
- // If Memory is below this limit it's ok i can wait for 60 items to clean-up
- count = KGlxNoOfPagesToFlushInCriticalLowMemory;
- }
- // Cancel Clean-up before Flush Page; Clean-up will be starting just after Flush page
- iGarbageCollector->CancelCleanup();
- iGarbageCollector->FlushPagesL(count);
- iGarbageCollector->CleanupL();
- iCleanUpOnGoing = ETrue; // Clean up is Started now i can call CancelClean-up to Stop Clean Up
- }
- else if((freeMemory < KGlxUpperMemoryLimitForCleanUp) && !iCleanUpOnGoing)
- {
- iGarbageCollector->CleanupL();
- iCleanUpOnGoing = ETrue; // Clean up is Started now i can call CancelClean-up to Stop Clean Up
- }
- // This is Added to Keep Assure Clean-up is not going to Disturb normal Flow if there is Enough Memory
- // We Remove this Code After Evaluation of Use of this Code
- else if(iCleanUpOnGoing)
- {
- iGarbageCollector->CancelCleanup();
- iCleanUpOnGoing = EFalse;
- }
-
- }
- else if(freeMemory < KGlxLowerMemoryLimitForCleanUp)
- {
- // 2 page - 30 Items for Flush
- TInt count = 2;
- if(freeMemory < (KGlxLowerMemoryLimitForCleanUp/2))
- {
- // If Memory is below this limit it's ok i can wait for 60 items to clean-up
- count = KGlxNoOfPagesToFlushInCriticalLowMemory;
- }
- // Cancel Clean-up before Flush Page; Clean-up will be starting just after Flush page
- iGarbageCollector->CancelCleanup();
- iGarbageCollector->FlushPagesL(count);
- iGarbageCollector->CleanupL();
- iCleanUpOnGoing = ETrue; // Clean up is Started now i can call CancelClean-up to Stop Clean Up
+ HAL::Get(HALData::EMemoryRAMFree, freeMemory);
+ GLX_DEBUG2("CGlxCacheManager::HandleGarbageCollectionL() freeMemory=%d", freeMemory);
+
+ if (aStart)
+ {
+ if (freeMemory < KGlxLowerMemoryLimitForCleanUp)
+ {
+ // 2 page - 30 Items for Flush
+ TInt count = 2;
+ if (freeMemory < (KGlxLowerMemoryLimitForCleanUp / 2))
+ {
+ // If Memory is below this limit it's ok i can wait for 60 items to clean-up
+ count = KGlxNoOfPagesToFlushInCriticalLowMemory;
+ }
+ // Cancel Clean-up before Flush Page; Clean-up will be starting just after Flush page
+ iGarbageCollector->CancelCleanup();
+ iGarbageCollector->FlushPagesL(count);
+ iGarbageCollector->CleanupL();
+ iCleanUpOnGoing = ETrue; // Clean up is Started now i can call CancelClean-up to Stop Clean Up
+ }
+ else if ((freeMemory < KGlxUpperMemoryLimitForCleanUp)
+ && !iCleanUpOnGoing)
+ {
+ iGarbageCollector->CleanupL();
+ iCleanUpOnGoing = ETrue; // Clean up is Started now i can call CancelClean-up to Stop Clean Up
+ }
+ // This is Added to Keep Assure Clean-up is not going to Disturb normal Flow if there is Enough Memory
+ // We Remove this Code After Evaluation of Use of this Code
+ else if (iCleanUpOnGoing)
+ {
+ iGarbageCollector->CancelCleanup();
+ iCleanUpOnGoing = EFalse;
+ }
+ }
+ else if (freeMemory < KGlxLowerMemoryLimitForCleanUp)
+ {
+ // 2 page - 30 Items for Flush
+ TInt count = 2;
+ if (freeMemory < (KGlxLowerMemoryLimitForCleanUp / 2))
+ {
+ // If Memory is below this limit it's ok i can wait for 60 items to clean-up
+ count = KGlxNoOfPagesToFlushInCriticalLowMemory;
+ }
+ // Cancel Clean-up before Flush Page; Clean-up will be starting just after Flush page
+ iGarbageCollector->CancelCleanup();
+ iGarbageCollector->FlushPagesL(count);
+ iGarbageCollector->CleanupL();
+ iCleanUpOnGoing = ETrue; // Clean up is Started now i can call CancelClean-up to Stop Clean Up
}
else if(iCleanUpOnGoing)
{
iGarbageCollector->CancelCleanup();
iCleanUpOnGoing = EFalse;
}
+ GLX_DEBUG2("CGlxCacheManager::HandleGarbageCollectionL() iCleanUpOnGoing=%d", iCleanUpOnGoing);
}
// -----------------------------------------------------------------------------
@@ -314,7 +316,9 @@
// HandleCollectionMediaL
// -----------------------------------------------------------------------------
//
-void CGlxCacheManager::HandleCollectionMediaL(const TGlxIdSpaceId& aIdSpaceId, const CMPXMedia& aMedia, TInt aError, TBool aRequestNextAttr)
+void CGlxCacheManager::HandleCollectionMediaL(
+ const TGlxIdSpaceId& aIdSpaceId, const CMPXMedia& aMedia,
+ TInt aError, TBool aRequestNextAttr)
{
TRACER("CGlxCacheManager::HandleCollectionMediaL");
@@ -1041,11 +1045,18 @@
CleanupStack::PopAndDestroy(path);
iRequestOwner = list;
- }
-
- CleanupStack::PopAndDestroy(attrSpecs);
- }
-
+ }
+
+ CleanupStack::PopAndDestroy(attrSpecs);
+ }
+
+ if (iRequestedItemIds.Count())
+ {
+ GLX_DEBUG1("CGlxCacheManager::MaintainCacheL() - Cleanup needed here!");
+ // Clean-up is needed here; Considering Current Memory Condition
+ HandleGarbageCollectionL(ETrue);
+ }
+
if ( !iRequestOwner )
{
if ( iTempError )
@@ -1357,23 +1368,25 @@
iCaches[index]->ReserveUsersL( aCount );
}
}
+
//OOM
// -----------------------------------------------------------------------------
// Start cache cleanup on Low memory event from OOM
// -----------------------------------------------------------------------------
//
void CGlxCacheManager::ReleaseRAML(TBool aFlushOnRequest)
-{
+ {
TRACER("CGlxCacheManager::ReleaseRAM");
- if(aFlushOnRequest)
+ if (aFlushOnRequest)
{
- HandleGarbageCollectionL(aFlushOnRequest);
+ HandleGarbageCollectionL(aFlushOnRequest);
}
- else
- {
- iGarbageCollector->CleanupL();
- }
-}
+ else
+ {
+ iGarbageCollector->CleanupL();
+ }
+ }
+
// -----------------------------------------------------------------------------
// Force a cleanup on particular media id : remove all attributes
// -----------------------------------------------------------------------------
--- a/photosgallery/viewframework/medialists/src/glxmedialist.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/medialists/src/glxmedialist.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -49,10 +49,6 @@
* Maximum items count for minimum wait interval.
*/
const TInt KMaxItemsCount = 500;
-/**
- * Time between Callbacks to determine a batch delete operation.
- */
-const TInt KCallbackInterval = 200000;
namespace NGlxMediaList
{
@@ -1109,20 +1105,8 @@
// Drop through to perform sync, in case the order has changed
}
+ case EMPXItemInserted:
case EMPXItemDeleted:
- {
- GLX_LOG_INFO("CGlxMediaList::HandleCollectionMessageL() EMPXItemDeleted");
- if(iBatchOperationMonitorTimer && !iCommandPending)
- {
- if(iBatchOperationMonitorTimer->IsActive())
- {
- iBatchOperationMonitorTimer->Cancel();
- }
- iBatchOperationMonitorTimer->Start(KCallbackInterval,KCallbackInterval,TCallBack( TimeOut,this ));
- }
- break;
- }
- case EMPXItemInserted:
default:
// Items have changed, determine whether to sync now
// or resync later if a sync is already pending after opening
@@ -1298,15 +1282,7 @@
{
iManager->HandleListDeleted( this );
iManager->Close();
- }
- if(iBatchOperationMonitorTimer)
- {
- if(iBatchOperationMonitorTimer->IsActive())
- {
- iBatchOperationMonitorTimer->Cancel();
- }
- delete iBatchOperationMonitorTimer;
- }
+ }
}
// -----------------------------------------------------------------------------
@@ -1324,7 +1300,6 @@
iCountAttributes.AppendL(KGlxMediaCollectionPluginSpecificSubTitle);
iCountAttributes.AppendL(KGlxMediaGeneralSlideshowableContent);
iCountAttributes.AppendL(KMPXMediaGeneralCount);
- iBatchOperationMonitorTimer = CPeriodic::NewL( CActive::EPriorityStandard );
}
// -----------------------------------------------------------------------------
@@ -1915,35 +1890,3 @@
// Place a new request for the item in focus, to fetch the media attributes
iManager->CancelPreviousRequest();
}
-
-// ---------------------------------------------------------------------------
-// TimeOut
-// ---------------------------------------------------------------------------
-//
-TInt CGlxMediaList::TimeOut(TAny* aSelf)
- {
- TRACER("CGlxMediaList::TimeOut");
- if(aSelf)
- {
- CGlxMediaList* self = static_cast <CGlxMediaList*> (aSelf);
- if (self)
- {
- self->iBatchOperationMonitorTimer->Cancel();
- // Items have changed, determine whether to sync now
- // or resync later if a sync is already pending after opening
- if (self->iSyncStatus == KNonePending)
- {
- self->ReOpenL(); // force re-opens
- self->iSyncStatus = KSyncPending;
- }
- else
- {
- self->iSyncStatus = KResyncPending;
- }
- }
- }
- return KErrNone;
- }
-
-
-// END OF FILE
--- a/photosgallery/viewframework/texturemanager/bwins/glxtexturemanageru.def Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/texturemanager/bwins/glxtexturemanageru.def Thu Jul 15 18:39:01 2010 +0300
@@ -6,15 +6,16 @@
?CreateIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@HAAVTDesC16@@VTSize@@@Z @ 5 NONAME ; class CAlfTexture & CGlxTextureManager::CreateIconTextureL(int, class TDesC16 &, class TSize)
?CreateZoomedTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTGlxMedia@@ABVTMPXAttribute@@V?$TGlxId@VTGlxIdSpaceIdBase@@@@PAVMGlxTextureObserver@@@Z @ 6 NONAME ; class CAlfTexture & CGlxTextureManager::CreateZoomedTextureL(class TGlxMedia const &, class TMPXAttribute const &, class TGlxId<class TGlxIdSpaceIdBase>, class MGlxTextureObserver *)
?RemoveTexture@CGlxTextureManager@@QAEXABVCAlfTexture@@@Z @ 7 NONAME ; void CGlxTextureManager::RemoveTexture(class CAlfTexture const &)
- ?RemoveZoomList@CGlxTextureManager@@QAEXXZ @ 8 NONAME ; void CGlxTextureManager::RemoveZoomList(void)
- ?AnimateMediaItem@CGlxTextureManager@@QAEXABVTGlxMediaId@@H@Z @ 9 NONAME ; void CGlxTextureManager::AnimateMediaItem(class TGlxMediaId const &, int)
- ?CreateThumbnailTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTGlxMedia@@ABV?$TGlxId@VTGlxIdSpaceIdBase@@@@ABVTSize@@PAVMGlxTextureObserver@@H@Z @ 10 NONAME ; class CAlfTexture & CGlxTextureManager::CreateThumbnailTextureL(class TGlxMedia const &, class TGlxId<class TGlxIdSpaceIdBase> const &, class TSize const &, class MGlxTextureObserver *, int)
- ?CreateNewTextureForMediaL@CGlxTextureManager@@QAEAAVCAlfTexture@@VTSize@@ABVTGlxMedia@@ABV?$TGlxId@VTGlxIdSpaceIdBase@@@@PAVMGlxTextureObserver@@@Z @ 11 NONAME ; class CAlfTexture & CGlxTextureManager::CreateNewTextureForMediaL(class TSize, class TGlxMedia const &, class TGlxId<class TGlxIdSpaceIdBase> const &, class MGlxTextureObserver *)
- ?CreateColorAvkonIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTAknsItemID@@HVTRgb@@0HVTSize@@@Z @ 12 NONAME ; class CAlfTexture & CGlxTextureManager::CreateColorAvkonIconTextureL(class TAknsItemID const &, int, class TRgb, class TAknsItemID const &, int, class TSize)
- ?CreateAvkonIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTAknsItemID@@HVTSize@@@Z @ 13 NONAME ; class CAlfTexture & CGlxTextureManager::CreateAvkonIconTextureL(class TAknsItemID const &, int, class TSize)
- ?NewL@CGlxTextureManager@@SAPAV1@AAVCAlfTextureManager@@@Z @ 14 NONAME ; class CGlxTextureManager * CGlxTextureManager::NewL(class CAlfTextureManager &)
- ?RemoveTexture@CGlxTextureManager@@QAEXABVTGlxMediaId@@H@Z @ 15 NONAME ; void CGlxTextureManager::RemoveTexture(class TGlxMediaId const &, int)
- ?TextureNeedsUpdating@CGlxTextureManager@@QAEHVTGlxMedia@@V?$TGlxId@VTGlxIdSpaceIdBase@@@@ABVTSize@@@Z @ 16 NONAME ; int CGlxTextureManager::TextureNeedsUpdating(class TGlxMedia, class TGlxId<class TGlxIdSpaceIdBase>, class TSize const &)
- ?CreateColorIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@HAAVTDesC16@@VTRgb@@ABVTAknsItemID@@HVTSize@@@Z @ 17 NONAME ; class CAlfTexture & CGlxTextureManager::CreateColorIconTextureL(int, class TDesC16 &, class TRgb, class TAknsItemID const &, int, class TSize)
- ?CreateAvkonIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTAknsItemID@@VTSize@@@Z @ 18 NONAME ; class CAlfTexture & CGlxTextureManager::CreateAvkonIconTextureL(class TAknsItemID const &, class TSize)
+ ?CreateDRMAnimatedGifTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTGlxMedia@@V?$TGlxId@VTGlxIdSpaceIdBase@@@@HPAVCFbsBitmap@@2@Z @ 8 NONAME ; class CAlfTexture & CGlxTextureManager::CreateDRMAnimatedGifTextureL(class TGlxMedia const &, class TGlxId<class TGlxIdSpaceIdBase>, int, class CFbsBitmap *, class CFbsBitmap *)
+ ?RemoveZoomList@CGlxTextureManager@@QAEXXZ @ 9 NONAME ; void CGlxTextureManager::RemoveZoomList(void)
+ ?AnimateMediaItem@CGlxTextureManager@@QAEXABVTGlxMediaId@@H@Z @ 10 NONAME ; void CGlxTextureManager::AnimateMediaItem(class TGlxMediaId const &, int)
+ ?CreateThumbnailTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTGlxMedia@@ABV?$TGlxId@VTGlxIdSpaceIdBase@@@@ABVTSize@@PAVMGlxTextureObserver@@H@Z @ 11 NONAME ; class CAlfTexture & CGlxTextureManager::CreateThumbnailTextureL(class TGlxMedia const &, class TGlxId<class TGlxIdSpaceIdBase> const &, class TSize const &, class MGlxTextureObserver *, int)
+ ?CreateNewTextureForMediaL@CGlxTextureManager@@QAEAAVCAlfTexture@@VTSize@@ABVTGlxMedia@@ABV?$TGlxId@VTGlxIdSpaceIdBase@@@@PAVMGlxTextureObserver@@@Z @ 12 NONAME ; class CAlfTexture & CGlxTextureManager::CreateNewTextureForMediaL(class TSize, class TGlxMedia const &, class TGlxId<class TGlxIdSpaceIdBase> const &, class MGlxTextureObserver *)
+ ?CreateColorAvkonIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTAknsItemID@@HVTRgb@@0HVTSize@@@Z @ 13 NONAME ; class CAlfTexture & CGlxTextureManager::CreateColorAvkonIconTextureL(class TAknsItemID const &, int, class TRgb, class TAknsItemID const &, int, class TSize)
+ ?CreateAvkonIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTAknsItemID@@HVTSize@@@Z @ 14 NONAME ; class CAlfTexture & CGlxTextureManager::CreateAvkonIconTextureL(class TAknsItemID const &, int, class TSize)
+ ?NewL@CGlxTextureManager@@SAPAV1@AAVCAlfTextureManager@@@Z @ 15 NONAME ; class CGlxTextureManager * CGlxTextureManager::NewL(class CAlfTextureManager &)
+ ?RemoveTexture@CGlxTextureManager@@QAEXABVTGlxMediaId@@H@Z @ 16 NONAME ; void CGlxTextureManager::RemoveTexture(class TGlxMediaId const &, int)
+ ?TextureNeedsUpdating@CGlxTextureManager@@QAEHVTGlxMedia@@V?$TGlxId@VTGlxIdSpaceIdBase@@@@ABVTSize@@@Z @ 17 NONAME ; int CGlxTextureManager::TextureNeedsUpdating(class TGlxMedia, class TGlxId<class TGlxIdSpaceIdBase>, class TSize const &)
+ ?CreateColorIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@HAAVTDesC16@@VTRgb@@ABVTAknsItemID@@HVTSize@@@Z @ 18 NONAME ; class CAlfTexture & CGlxTextureManager::CreateColorIconTextureL(int, class TDesC16 &, class TRgb, class TAknsItemID const &, int, class TSize)
+ ?CreateAvkonIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTAknsItemID@@VTSize@@@Z @ 19 NONAME ; class CAlfTexture & CGlxTextureManager::CreateAvkonIconTextureL(class TAknsItemID const &, class TSize)
--- a/photosgallery/viewframework/texturemanager/eabi/glxtexturemanageru.def Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/texturemanager/eabi/glxtexturemanageru.def Thu Jul 15 18:39:01 2010 +0300
@@ -16,9 +16,10 @@
_ZN18CGlxTextureManager25CreateAnimatedGifTextureLERK7TDesC16RK5TSizeRK9TGlxMedia6TGlxIdI17TGlxIdSpaceIdBaseE @ 15 NONAME
_ZN18CGlxTextureManager25CreateNewTextureForMediaLE5TSizeRK9TGlxMediaRK6TGlxIdI17TGlxIdSpaceIdBaseEP19MGlxTextureObserver @ 16 NONAME
_ZN18CGlxTextureManager28CreateColorAvkonIconTextureLERK11TAknsItemIDi4TRgbS2_i5TSize @ 17 NONAME
- _ZN18CGlxTextureManager4NewLER18CAlfTextureManager @ 18 NONAME
- _ZTI22CGlxTextureManagerImpl @ 19 NONAME
- _ZTI24CGlxBitmapDecoderWrapper @ 20 NONAME
- _ZTV22CGlxTextureManagerImpl @ 21 NONAME
- _ZTV24CGlxBitmapDecoderWrapper @ 22 NONAME
+ _ZN18CGlxTextureManager28CreateDRMAnimatedGifTextureLERK9TGlxMedia6TGlxIdI17TGlxIdSpaceIdBaseEiP10CFbsBitmapS7_ @ 18 NONAME
+ _ZN18CGlxTextureManager4NewLER18CAlfTextureManager @ 19 NONAME
+ _ZTI22CGlxTextureManagerImpl @ 20 NONAME
+ _ZTI24CGlxBitmapDecoderWrapper @ 21 NONAME
+ _ZTV22CGlxTextureManagerImpl @ 22 NONAME
+ _ZTV24CGlxBitmapDecoderWrapper @ 23 NONAME
--- a/photosgallery/viewframework/texturemanager/inc/glxtexturemanager.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/texturemanager/inc/glxtexturemanager.h Thu Jul 15 18:39:01 2010 +0300
@@ -245,6 +245,17 @@
* @param aState Animation state [ETrue to Start, EFalse to Stop]
*/
IMPORT_C void AnimateMediaItem(const TGlxMediaId& aMediaId, TBool aState);
+
+ /**
+ * Creates textures for the given GIF media
+ * @param aMedia The media item
+ * @param aIdSpaceId The Id of the Id space in which the media Id is defined
+ * @param aFrameNumber frame number of gif media
+ * @param aBitmap Bitmap for the particular frame
+ * @return Created texture: ownership transfered
+ */
+ IMPORT_C CAlfTexture& CreateDRMAnimatedGifTextureL(const TGlxMedia& aMedia,
+ TGlxIdSpaceId aIdSpaceId, TInt aFrameNumber, CFbsBitmap* aBitmap, CFbsBitmap* aBitmapMask);
public: // from MGlxSkinChangeObserver
--- a/photosgallery/viewframework/texturemanager/inc/glxtexturemanagerimpl.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/texturemanager/inc/glxtexturemanagerimpl.h Thu Jul 15 18:39:01 2010 +0300
@@ -50,6 +50,9 @@
class CGlxBitmapDecoderWrapper;
class MGlxBitmapDecoderObserver;
class CGlxThumbnailAttribute;
+
+const TInt KGlxMaxFrameCount = 25;
+
/**
* CGlxTextureManagerImpl
*
@@ -160,7 +163,17 @@
*/
CAlfTexture& CreateAnimatedGifTextureL(const TDesC& aFilename, const TSize& aSize,
const TGlxMedia& aMedia, TGlxIdSpaceId aIdSpaceId);
-
+
+ /**
+ * Creates textures for the given GIF media
+ * @param aMedia The media item
+ * @param aIdSpaceId The Id of the Id space in which the media Id is defined
+ * @param aFrameNumber frame number of gif media
+ * @param aBitmap Bitmap for the particular frame
+ * @return Created texture: ownership transfered
+ */
+ CAlfTexture& CreateDRMAnimatedGifTextureL(const TGlxMedia& aMedia,
+ TGlxIdSpaceId aIdSpaceId, TInt aFrameNumber, CFbsBitmap* aBitmap, CFbsBitmap* aBitmapMask);
/**
* Removes the texture if it was created by CreateThumbnailTextureL or
* CreateZoomedTextureL
@@ -332,6 +345,44 @@
return *aMediaId == aThumbData.iMediaId;
}
};
+
+ /**
+ * TGlxDRMGifThumbnailIcon
+ * Values associated with a DRM Gif thumbnail.
+ */
+ class TGlxDRMGifThumbnailIcon
+ {
+ public:
+ TInt iTextureId[KGlxMaxFrameCount];
+ CAlfTexture* iTexture[KGlxMaxFrameCount];
+ TMPXAttribute iAttribId;
+ TSize iRequiredSize;
+ TGlxMediaId iMediaId;
+ TGlxIdSpaceId iIdSpaceId;
+ MGlxTextureObserver* iObserver;
+ CFbsBitmap* iBitmap[KGlxMaxFrameCount];
+ CFbsBitmap* iBitmapMask[KGlxMaxFrameCount];
+ TTime iImageDate;
+ /**
+ * Helper function to be able to find texture from array
+ */
+ static TBool MatchTexture(const CAlfTexture* aTexture,
+ const TGlxDRMGifThumbnailIcon& aThumbData)
+ {
+ // return true if the address of the texture match
+ return aTexture == aThumbData.iTexture[0];
+ }
+
+ /**
+ * Helper function to be able to find mediaid from array
+ */
+ static TBool MatchMediaId(const TGlxMediaId* aMediaId,
+ const TGlxDRMGifThumbnailIcon& aThumbData)
+ {
+ // return true if the Media Id match
+ return *aMediaId == aThumbData.iMediaId;
+ }
+ };
/**
* Requests the best match texture. If it already exists this method does nothing.
* However if it doed not exist it will create it and replace the old texture
@@ -407,9 +458,19 @@
* or KErrNotFound
* @return ETrue if Thumbnail is available, EFalse if it needs to be created
*/
- TBool CGlxTextureManagerImpl::GetAnimatedGifThumbnailIndex( TSize aSize,
+ TBool GetAnimatedGifThumbnailIndex( TSize aSize,
const TGlxMedia& aMedia, const TGlxIdSpaceId& aIdSpaceId,
TInt& aThumbnailIndex);
+ /**
+ * GetDRMAnimatedGifThumbnailIndex
+ * @param aMedia The TGlxMedia item.
+ * @param aIdSpaceId The Id of the Id space in which the media Id is defined
+ * @param aThumbnailIndex on return will contain the Index of the thumbnail in the iAnimatedTnmList
+ * or KErrNotFound
+ * @return ETrue if Thumbnail is available, EFalse if it needs to be created
+ */
+ TBool GetDRMAnimatedGifThumbnailIndex(const TGlxMedia& aMedia, const TGlxIdSpaceId& aIdSpaceId,
+ TInt& aThumbnailIndex);
private:
// Alf Texture manager (not owned)
CAlfTextureManager& iAlfTextureManager;
@@ -428,6 +489,9 @@
// List containing data for textures generated from Animated thumbnail.
RArray<TGlxThumbnailIcon> iAnimatedTnmList;
+
+ // List containing data for textures generated from DRM Gif Animated thumbnail.
+ RArray<TGlxDRMGifThumbnailIcon> iDRMGifAnimatedTnmList;
// List of .mif filenames of files containing icons.
CDesCArrayFlat* iMifFilenames;
--- a/photosgallery/viewframework/texturemanager/src/glxtexturemanager.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/texturemanager/src/glxtexturemanager.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -329,4 +329,16 @@
TRACER("CGlxTextureManager::AnimateMediaItem");
iImpl->AnimateMediaItem(aMediaId, aState);
}
+
+// -----------------------------------------------------------------------------
+// CreateDRMAnimatedGifTextureL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CAlfTexture& CGlxTextureManager::CreateDRMAnimatedGifTextureL(const TGlxMedia& aMedia,
+ TGlxIdSpaceId aIdSpaceId, TInt aFrameNumber, CFbsBitmap* aBitmap, CFbsBitmap* aBitmapMask)
+ {
+ TRACER("CGlxTextureManager::CreateDRMAnimatedGifTextureL");
+ return iImpl->CreateDRMAnimatedGifTextureL( aMedia,
+ aIdSpaceId, aFrameNumber, aBitmap, aBitmapMask);
+ }
--- a/photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -83,6 +83,19 @@
iThumbnailList.Close();
iAnimatedTnmList.Close();
+
+ // delete DRM GIF textures
+ count = iDRMGifAnimatedTnmList.Count();
+ GLX_LOG_INFO1("CGlxTextureManagerImpl iDRMGifAnimatedTnmList.Count=%d",count);
+ for(TInt i = count - 1; i >= 0; i--)
+ {
+ GLX_LOG_INFO1("CGlxTextureManagerImpl DRM Gif Texture deleted i=%d",i);
+ for(TInt texCnt = KGlxMaxFrameCount - 1; texCnt >= 0; texCnt--)
+ {
+ delete iDRMGifAnimatedTnmList[i].iTexture[texCnt];
+ }
+ }
+ iDRMGifAnimatedTnmList.Close();
// delete zoom textures
count = iZoomedList.Count();
@@ -563,6 +576,23 @@
iAlfTextureManager.UnloadTexture(aTexture );
}
}
+
+ i = iDRMGifAnimatedTnmList.Count();
+
+ while(i > 0)
+ {
+ --i;
+ if (iDRMGifAnimatedTnmList[i].iMediaId == aMediaId)
+ {
+ GLX_LOG_INFO("RemoveTexture 2 iDRMGifAnimatedTnmList MediaId found");
+ for(TInt textureCnt=0;textureCnt<KGlxMaxFrameCount;textureCnt++)
+ {
+ TInt textureId = iDRMGifAnimatedTnmList[i].iTextureId[textureCnt];
+ iAlfTextureManager.UnloadTexture(textureId);
+ }
+ iDRMGifAnimatedTnmList.Remove(i);
+ }
+ }
}
// -----------------------------------------------------------------------------
@@ -615,6 +645,19 @@
iAlfTextureManager.UnloadTexture(textureID);
iAnimatedTnmList[i].iTexture = NULL;
}
+
+ i = iDRMGifAnimatedTnmList.Count();
+ while(i > 0)
+ {
+ --i;
+ GLX_LOG_INFO("RemoveTexture 2 iDRMGifAnimatedTnmList MediaId found");
+ for (TInt textureCnt = 0; textureCnt < KGlxMaxFrameCount; textureCnt++)
+ {
+ TInt aTexture = iDRMGifAnimatedTnmList[i].iTextureId[textureCnt];
+ iAlfTextureManager.UnloadTexture(aTexture);
+ iDRMGifAnimatedTnmList[i].iTexture[textureCnt] = NULL;
+ }
+ }
}
// -----------------------------------------------------------------------------
@@ -946,6 +989,29 @@
return;
}
}
+
+ // add loop to search the iDRMGifAnimatedTnmList for the aTextureId
+ i = iDRMGifAnimatedTnmList.Count();
+ while (i > 0)
+ {
+ --i;
+ for(TInt textureCnt=0;textureCnt<KGlxMaxFrameCount;textureCnt++)
+ {
+ if (iDRMGifAnimatedTnmList[i].iBitmap[textureCnt] &&
+ (iDRMGifAnimatedTnmList[i].iTextureId[textureCnt] == aTextureId))
+ {
+ // We have found the texture, create a duplicate as alf destroys
+ // the bitmap once the texture's been created.
+ aBitmap = CreateDuplicateBitmapL(*iDRMGifAnimatedTnmList[i].iBitmap[textureCnt]);
+ if(iDRMGifAnimatedTnmList[i].iBitmapMask[textureCnt])
+ {
+ aMaskBitmap = CreateDuplicateBitmapL(*iDRMGifAnimatedTnmList[i].iBitmapMask[textureCnt]);
+ }
+ return;
+ }
+ }
+ }
+
// find in iIconList
i = iIconList.Count();
TBool found = EFalse;
@@ -1366,3 +1432,92 @@
}
}
+// -----------------------------------------------------------------------------
+// CreateDRMAnimatedGifTextureL
+// -----------------------------------------------------------------------------
+//
+CAlfTexture& CGlxTextureManagerImpl::CreateDRMAnimatedGifTextureL(const TGlxMedia& aMedia,
+ TGlxIdSpaceId aIdSpaceId,TInt aFrameNumber, CFbsBitmap* aBitmap, CFbsBitmap* aBitmapMask)
+ {
+ TRACER("CGlxTextureManagerImpl::CreateDRMAnimatedGifTextureL");
+ TInt thumbnailIndex = KErrNotFound;
+
+ // If the current thumbnail matches what is required then return the current texture otherwise
+ // create a new one.
+ if (!GetDRMAnimatedGifThumbnailIndex( aMedia, aIdSpaceId,thumbnailIndex))
+ {
+ GLX_LOG_INFO("CreateDRMAnimatedGifTextureL Texture already present");
+ // only texture is missing.
+ if ((NULL == iDRMGifAnimatedTnmList[thumbnailIndex].iTexture[aFrameNumber]))
+ {
+ if(NULL == iDRMGifAnimatedTnmList[thumbnailIndex].iBitmap[aFrameNumber])
+ {
+ iDRMGifAnimatedTnmList[thumbnailIndex].iTextureId[aFrameNumber] = NextTextureId();
+ iDRMGifAnimatedTnmList[thumbnailIndex].iBitmap[aFrameNumber] = aBitmap;
+ iDRMGifAnimatedTnmList[thumbnailIndex].iBitmapMask[aFrameNumber] = aBitmapMask;
+ }
+ CAlfTexture* newTexture = &iAlfTextureManager.CreateTextureL(
+ iDRMGifAnimatedTnmList[thumbnailIndex].iTextureId[aFrameNumber],
+ this,
+ EAlfTextureFlagDefault);
+ iDRMGifAnimatedTnmList[thumbnailIndex].iTexture[aFrameNumber] = newTexture;
+ }
+ return *iDRMGifAnimatedTnmList[thumbnailIndex].iTexture[aFrameNumber];
+ }
+
+ TGlxDRMGifThumbnailIcon thumbData;
+ thumbData.iTextureId[aFrameNumber] = NextTextureId();
+ thumbData.iMediaId = aMedia.Id();
+ thumbData.iIdSpaceId = aIdSpaceId;
+ for(TInt i=0;i<KGlxMaxFrameCount;i++)
+ {
+ thumbData.iTexture[i] = NULL;
+ thumbData.iBitmap[i] = NULL;
+ thumbData.iBitmapMask[i] = NULL;
+ }
+ thumbData.iBitmap[aFrameNumber] = aBitmap;
+ thumbData.iBitmapMask[aFrameNumber] = aBitmapMask;
+
+ iDRMGifAnimatedTnmList.ReserveL( iDRMGifAnimatedTnmList.Count() + 1 );
+
+ iDRMGifAnimatedTnmList.AppendL(thumbData);
+
+ CAlfTexture* newTexture = &iAlfTextureManager.CreateTextureL(
+ thumbData.iTextureId[aFrameNumber],
+ this,
+ EAlfTextureFlagDefault);
+
+ TInt index = iDRMGifAnimatedTnmList.Count()-1;
+ iDRMGifAnimatedTnmList[index].iTexture[aFrameNumber] = newTexture;
+
+ return *newTexture;
+ }
+
+
+// -----------------------------------------------------------------------------
+// GetAnimatedGifThumbnailIndex
+// -----------------------------------------------------------------------------
+//
+TBool CGlxTextureManagerImpl::GetDRMAnimatedGifThumbnailIndex(const TGlxMedia& aMedia, const TGlxIdSpaceId& aIdSpaceId,
+ TInt& aThumbnailIndex)
+ {
+ TRACER("CGlxTextureManagerImpl::GetDRMAnimatedGifThumbnailIndex");
+ aThumbnailIndex = KErrNotFound;
+
+ TInt i = iDRMGifAnimatedTnmList.Count();
+
+ while (i > 0 && aThumbnailIndex == KErrNotFound)
+ {
+ --i;
+ if ((iDRMGifAnimatedTnmList[i].iMediaId == aMedia.Id())
+ && (iDRMGifAnimatedTnmList[i].iIdSpaceId == aIdSpaceId))
+ {
+ aThumbnailIndex = i;
+ GLX_LOG_INFO( "GetDRMAnimatedGifThumbnailIndex textureid present" );
+ // We have found that the best match already exists
+ // No need to do anything
+ return EFalse;
+ }
+ }
+ return ETrue;
+ }
--- a/photosgallery/viewframework/uiutilities/bwins/glxuiutilitiesu.def Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/bwins/glxuiutilitiesu.def Thu Jul 15 18:39:01 2010 +0300
@@ -29,45 +29,47 @@
?Display@CGlxUiUtility@@QBEPAVCAlfDisplay@@XZ @ 28 NONAME ; class CAlfDisplay * CGlxUiUtility::Display(void) const
?NewL@CGlxProgressIndicator@@SAPAV1@AAVMDialogDismisedObserver@@@Z @ 29 NONAME ; class CGlxProgressIndicator * CGlxProgressIndicator::NewL(class MDialogDismisedObserver &)
?SetViewNavigationDirection@CGlxUiUtility@@QAEXW4TGlxNavigationDirection@@@Z @ 30 NONAME ; void CGlxUiUtility::SetViewNavigationDirection(enum TGlxNavigationDirection)
- ?ConfirmQueryL@GlxGeneralUiUtilities@@SAHHABVTDesC16@@@Z @ 31 NONAME ; int GlxGeneralUiUtilities::ConfirmQueryL(int, class TDesC16 const &)
- ?SetFocusL@CGlxScreenFurniture@@QAEXH@Z @ 32 NONAME ; void CGlxScreenFurniture::SetFocusL(int)
- ?GetGridIconSize@CGlxUiUtility@@QAE?AVTSize@@XZ @ 33 NONAME ; class TSize CGlxUiUtility::GetGridIconSize(void)
- ?VisibleItemsInPageGranularityL@CGlxUiUtility@@QAEHXZ @ 34 NONAME ; int CGlxUiUtility::VisibleItemsInPageGranularityL(void)
- ?GlxTextureManager@CGlxUiUtility@@QAEAAVCGlxTextureManager@@XZ @ 35 NONAME ; class CGlxTextureManager & CGlxUiUtility::GlxTextureManager(void)
- ?RegisterActiveMediaList@CGlxActiveMediaListRegistry@@QAEXPAVMGlxMediaList@@@Z @ 36 NONAME ; void CGlxActiveMediaListRegistry::RegisterActiveMediaList(class MGlxMediaList *)
- ?ShowErrorNoteL@GlxGeneralUiUtilities@@SAXH@Z @ 37 NONAME ; void GlxGeneralUiUtilities::ShowErrorNoteL(int)
- ?AppOrientation@CGlxUiUtility@@QBE?AW4TGlxOrientation@@XZ @ 38 NONAME ; enum TGlxOrientation CGlxUiUtility::AppOrientation(void) const
- ?FormatString@GlxGeneralUiUtilities@@SAXAAVTDes16@@ABVTDesC16@@HHH@Z @ 39 NONAME ; void GlxGeneralUiUtilities::FormatString(class TDes16 &, class TDesC16 const &, int, int, int)
- ?DismissProgressDialog@CGlxProgressIndicator@@QAEXXZ @ 40 NONAME ; void CGlxProgressIndicator::DismissProgressDialog(void)
- ?NewLC@CGlxScreenFurniture@@SAPAV1@AAVCGlxUiUtility@@@Z @ 41 NONAME ; class CGlxScreenFurniture * CGlxScreenFurniture::NewLC(class CGlxUiUtility &)
- ?LayoutIsMirrored@GlxGeneralUiUtilities@@SAHXZ @ 42 NONAME ; int GlxGeneralUiUtilities::LayoutIsMirrored(void)
- ?HandleTvStatusChangedL@CGlxUiUtility@@UAEXW4TTvChangeType@@@Z @ 43 NONAME ; void CGlxUiUtility::HandleTvStatusChangedL(enum TTvChangeType)
- ?Close@CGlxUiUtility@@QAEXXZ @ 44 NONAME ; void CGlxUiUtility::Close(void)
- ?ModifySoftkeyIdL@CGlxScreenFurniture@@QAEXW4TCommandPosition@CEikButtonGroupContainer@@HHABVTDesC16@@@Z @ 45 NONAME ; void CGlxScreenFurniture::ModifySoftkeyIdL(enum CEikButtonGroupContainer::TCommandPosition, int, int, class TDesC16 const &)
- ?CreateViewAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@W4TGlxViewswitchAnimation@@W4TGlxNavigationDirection@@AAV?$RPointerArray@VCAlfControlGroup@@@@@Z @ 46 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateViewAnimationL(enum TGlxViewswitchAnimation, enum TGlxNavigationDirection, class RPointerArray<class CAlfControlGroup> &)
- ?ControlTNDaemon@CGlxProgressIndicator@@QAEXH@Z @ 47 NONAME ; void CGlxProgressIndicator::ControlTNDaemon(int)
- ?GetItemsLeftCount@CGlxUiUtility@@QAEHXZ @ 48 NONAME ; int CGlxUiUtility::GetItemsLeftCount(void)
- ?ShowProgressbarL@CGlxProgressIndicator@@QAEXXZ @ 49 NONAME ; void CGlxProgressIndicator::ShowProgressbarL(void)
- ?DisplaySize@CGlxUiUtility@@QBE?AVTSize@@XZ @ 50 NONAME ; class TSize CGlxUiUtility::DisplaySize(void) const
- ?SetActiveView@CGlxScreenFurniture@@QAEXH@Z @ 51 NONAME ; void CGlxScreenFurniture::SetActiveView(int)
- ?ShowErrorNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 52 NONAME ; void GlxGeneralUiUtilities::ShowErrorNoteL(class TDesC16 const &, int)
- ?GetGridToolBar@CGlxUiUtility@@QAEPAVCAknToolbar@@XZ @ 53 NONAME ; class CAknToolbar * CGlxUiUtility::GetGridToolBar(void)
- ?SetLeftSoftKeyL@CGlxTextEntryPopup@@QAEXH@Z @ 54 NONAME ; void CGlxTextEntryPopup::SetLeftSoftKeyL(int)
- ?DestroyScreenClearer@CGlxUiUtility@@QAEXXZ @ 55 NONAME ; void CGlxUiUtility::DestroyScreenClearer(void)
- ?SetToolbarItemVisibility@CGlxScreenFurniture@@QAEXHH@Z @ 56 NONAME ; void CGlxScreenFurniture::SetToolbarItemVisibility(int, int)
- ?Env@CGlxUiUtility@@QAEPAVCAlfEnv@@XZ @ 57 NONAME ; class CAlfEnv * CGlxUiUtility::Env(void)
- ?RetrieveL@GlxAttributeRetriever@@SAHABVMGlxFetchContext@@AAVMGlxMediaList@@H@Z @ 58 NONAME ; int GlxAttributeRetriever::RetrieveL(class MGlxFetchContext const &, class MGlxMediaList &, int)
- ?TextStyleIdL@CGlxUiUtility@@QAEHHH@Z @ 59 NONAME ; int CGlxUiUtility::TextStyleIdL(int, int)
- ?InstanceL@CGlxActiveMediaListRegistry@@SAPAV1@PAVMGlxActiveMediaListChangeObserver@@@Z @ 60 NONAME ; class CGlxActiveMediaListRegistry * CGlxActiveMediaListRegistry::InstanceL(class MGlxActiveMediaListChangeObserver *)
- ?CreateImageLoadingAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@AAVCAlfVisual@@AAVCAlfTexture@@@Z @ 61 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateImageLoadingAnimationL(class CAlfVisual &, class CAlfTexture &)
- ?DeregisterActiveMediaList@CGlxActiveMediaListRegistry@@QAEXPAVMGlxMediaList@@@Z @ 62 NONAME ; void CGlxActiveMediaListRegistry::DeregisterActiveMediaList(class MGlxMediaList *)
- ?SetAppOrientationL@CGlxUiUtility@@QAEXW4TGlxOrientation@@@Z @ 63 NONAME ; void CGlxUiUtility::SetAppOrientationL(enum TGlxOrientation)
- ?ConfirmQueryL@GlxGeneralUiUtilities@@SAHABVTDesC16@@@Z @ 64 NONAME ; int GlxGeneralUiUtilities::ConfirmQueryL(class TDesC16 const &)
- ?NewL@CGlxTextEntryPopup@@SAPAV1@ABVTDesC16@@AAVTDes16@@@Z @ 65 NONAME ; class CGlxTextEntryPopup * CGlxTextEntryPopup::NewL(class TDesC16 const &, class TDes16 &)
- ?CreateViewAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@W4TGlxViewswitchAnimation@@W4TGlxNavigationDirection@@PAVCAlfControlGroup@@@Z @ 66 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateViewAnimationL(enum TGlxViewswitchAnimation, enum TGlxNavigationDirection, class CAlfControlGroup *)
- ?ShowConfirmationNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 67 NONAME ; void GlxGeneralUiUtilities::ShowConfirmationNoteL(class TDesC16 const &, int)
- ?ScreenFurniture@CGlxUiUtility@@QAEPAVCGlxScreenFurniture@@XZ @ 68 NONAME ; class CGlxScreenFurniture * CGlxUiUtility::ScreenFurniture(void)
- ?InstanceL@MGlxActiveMediaListResolver@@SAPAV1@PAVMGlxActiveMediaListChangeObserver@@@Z @ 69 NONAME ; class MGlxActiveMediaListResolver * MGlxActiveMediaListResolver::InstanceL(class MGlxActiveMediaListChangeObserver *)
- ?NewL@CGlxRelaseGPUMemory@@SAPAV1@AAVMGoomNotifierObserver@@@Z @ 70 NONAME ; class CGlxRelaseGPUMemory * CGlxRelaseGPUMemory::NewL(class MGoomNotifierObserver &)
- ?RequestMemory@CGlxRelaseGPUMemory@@QAEXXZ @ 71 NONAME ; void CGlxRelaseGPUMemory::RequestMemory(void)
+ ?SetTNMDaemonPSKeyvalue@CGlxUiUtility@@QAEHXZ @ 31 NONAME ; int CGlxUiUtility::SetTNMDaemonPSKeyvalue(void)
+ ?ConfirmQueryL@GlxGeneralUiUtilities@@SAHHABVTDesC16@@@Z @ 32 NONAME ; int GlxGeneralUiUtilities::ConfirmQueryL(int, class TDesC16 const &)
+ ?SetFocusL@CGlxScreenFurniture@@QAEXH@Z @ 33 NONAME ; void CGlxScreenFurniture::SetFocusL(int)
+ ?GetGridIconSize@CGlxUiUtility@@QAE?AVTSize@@XZ @ 34 NONAME ; class TSize CGlxUiUtility::GetGridIconSize(void)
+ ?VisibleItemsInPageGranularityL@CGlxUiUtility@@QAEHXZ @ 35 NONAME ; int CGlxUiUtility::VisibleItemsInPageGranularityL(void)
+ ?GetKeyguardStatus@CGlxUiUtility@@QAEHXZ @ 36 NONAME ; int CGlxUiUtility::GetKeyguardStatus(void)
+ ?GlxTextureManager@CGlxUiUtility@@QAEAAVCGlxTextureManager@@XZ @ 37 NONAME ; class CGlxTextureManager & CGlxUiUtility::GlxTextureManager(void)
+ ?RegisterActiveMediaList@CGlxActiveMediaListRegistry@@QAEXPAVMGlxMediaList@@@Z @ 38 NONAME ; void CGlxActiveMediaListRegistry::RegisterActiveMediaList(class MGlxMediaList *)
+ ?ShowErrorNoteL@GlxGeneralUiUtilities@@SAXH@Z @ 39 NONAME ; void GlxGeneralUiUtilities::ShowErrorNoteL(int)
+ ?AppOrientation@CGlxUiUtility@@QBE?AW4TGlxOrientation@@XZ @ 40 NONAME ; enum TGlxOrientation CGlxUiUtility::AppOrientation(void) const
+ ?FormatString@GlxGeneralUiUtilities@@SAXAAVTDes16@@ABVTDesC16@@HHH@Z @ 41 NONAME ; void GlxGeneralUiUtilities::FormatString(class TDes16 &, class TDesC16 const &, int, int, int)
+ ?DismissProgressDialog@CGlxProgressIndicator@@QAEXXZ @ 42 NONAME ; void CGlxProgressIndicator::DismissProgressDialog(void)
+ ?NewLC@CGlxScreenFurniture@@SAPAV1@AAVCGlxUiUtility@@@Z @ 43 NONAME ; class CGlxScreenFurniture * CGlxScreenFurniture::NewLC(class CGlxUiUtility &)
+ ?LayoutIsMirrored@GlxGeneralUiUtilities@@SAHXZ @ 44 NONAME ; int GlxGeneralUiUtilities::LayoutIsMirrored(void)
+ ?HandleTvStatusChangedL@CGlxUiUtility@@UAEXW4TTvChangeType@@@Z @ 45 NONAME ; void CGlxUiUtility::HandleTvStatusChangedL(enum TTvChangeType)
+ ?Close@CGlxUiUtility@@QAEXXZ @ 46 NONAME ; void CGlxUiUtility::Close(void)
+ ?ModifySoftkeyIdL@CGlxScreenFurniture@@QAEXW4TCommandPosition@CEikButtonGroupContainer@@HHABVTDesC16@@@Z @ 47 NONAME ; void CGlxScreenFurniture::ModifySoftkeyIdL(enum CEikButtonGroupContainer::TCommandPosition, int, int, class TDesC16 const &)
+ ?CreateViewAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@W4TGlxViewswitchAnimation@@W4TGlxNavigationDirection@@AAV?$RPointerArray@VCAlfControlGroup@@@@@Z @ 48 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateViewAnimationL(enum TGlxViewswitchAnimation, enum TGlxNavigationDirection, class RPointerArray<class CAlfControlGroup> &)
+ ?ControlTNDaemon@CGlxProgressIndicator@@QAEXH@Z @ 49 NONAME ; void CGlxProgressIndicator::ControlTNDaemon(int)
+ ?GetItemsLeftCount@CGlxUiUtility@@QAEHXZ @ 50 NONAME ; int CGlxUiUtility::GetItemsLeftCount(void)
+ ?ShowProgressbarL@CGlxProgressIndicator@@QAEXXZ @ 51 NONAME ; void CGlxProgressIndicator::ShowProgressbarL(void)
+ ?DisplaySize@CGlxUiUtility@@QBE?AVTSize@@XZ @ 52 NONAME ; class TSize CGlxUiUtility::DisplaySize(void) const
+ ?SetActiveView@CGlxScreenFurniture@@QAEXH@Z @ 53 NONAME ; void CGlxScreenFurniture::SetActiveView(int)
+ ?ShowErrorNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 54 NONAME ; void GlxGeneralUiUtilities::ShowErrorNoteL(class TDesC16 const &, int)
+ ?GetGridToolBar@CGlxUiUtility@@QAEPAVCAknToolbar@@XZ @ 55 NONAME ; class CAknToolbar * CGlxUiUtility::GetGridToolBar(void)
+ ?NewL@CGlxRelaseGPUMemory@@SAPAV1@AAVMGoomNotifierObserver@@@Z @ 56 NONAME ; class CGlxRelaseGPUMemory * CGlxRelaseGPUMemory::NewL(class MGoomNotifierObserver &)
+ ?SetLeftSoftKeyL@CGlxTextEntryPopup@@QAEXH@Z @ 57 NONAME ; void CGlxTextEntryPopup::SetLeftSoftKeyL(int)
+ ?DestroyScreenClearer@CGlxUiUtility@@QAEXXZ @ 58 NONAME ; void CGlxUiUtility::DestroyScreenClearer(void)
+ ?SetToolbarItemVisibility@CGlxScreenFurniture@@QAEXHH@Z @ 59 NONAME ; void CGlxScreenFurniture::SetToolbarItemVisibility(int, int)
+ ?Env@CGlxUiUtility@@QAEPAVCAlfEnv@@XZ @ 60 NONAME ; class CAlfEnv * CGlxUiUtility::Env(void)
+ ?RetrieveL@GlxAttributeRetriever@@SAHABVMGlxFetchContext@@AAVMGlxMediaList@@H@Z @ 61 NONAME ; int GlxAttributeRetriever::RetrieveL(class MGlxFetchContext const &, class MGlxMediaList &, int)
+ ?TextStyleIdL@CGlxUiUtility@@QAEHHH@Z @ 62 NONAME ; int CGlxUiUtility::TextStyleIdL(int, int)
+ ?InstanceL@CGlxActiveMediaListRegistry@@SAPAV1@PAVMGlxActiveMediaListChangeObserver@@@Z @ 63 NONAME ; class CGlxActiveMediaListRegistry * CGlxActiveMediaListRegistry::InstanceL(class MGlxActiveMediaListChangeObserver *)
+ ?CreateImageLoadingAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@AAVCAlfVisual@@AAVCAlfTexture@@@Z @ 64 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateImageLoadingAnimationL(class CAlfVisual &, class CAlfTexture &)
+ ?DeregisterActiveMediaList@CGlxActiveMediaListRegistry@@QAEXPAVMGlxMediaList@@@Z @ 65 NONAME ; void CGlxActiveMediaListRegistry::DeregisterActiveMediaList(class MGlxMediaList *)
+ ?SetAppOrientationL@CGlxUiUtility@@QAEXW4TGlxOrientation@@@Z @ 66 NONAME ; void CGlxUiUtility::SetAppOrientationL(enum TGlxOrientation)
+ ?ConfirmQueryL@GlxGeneralUiUtilities@@SAHABVTDesC16@@@Z @ 67 NONAME ; int GlxGeneralUiUtilities::ConfirmQueryL(class TDesC16 const &)
+ ?RequestMemory@CGlxRelaseGPUMemory@@QAEXXZ @ 68 NONAME ; void CGlxRelaseGPUMemory::RequestMemory(void)
+ ?NewL@CGlxTextEntryPopup@@SAPAV1@ABVTDesC16@@AAVTDes16@@@Z @ 69 NONAME ; class CGlxTextEntryPopup * CGlxTextEntryPopup::NewL(class TDesC16 const &, class TDes16 &)
+ ?CreateViewAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@W4TGlxViewswitchAnimation@@W4TGlxNavigationDirection@@PAVCAlfControlGroup@@@Z @ 70 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateViewAnimationL(enum TGlxViewswitchAnimation, enum TGlxNavigationDirection, class CAlfControlGroup *)
+ ?ShowConfirmationNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 71 NONAME ; void GlxGeneralUiUtilities::ShowConfirmationNoteL(class TDesC16 const &, int)
+ ?ScreenFurniture@CGlxUiUtility@@QAEPAVCGlxScreenFurniture@@XZ @ 72 NONAME ; class CGlxScreenFurniture * CGlxUiUtility::ScreenFurniture(void)
+ ?InstanceL@MGlxActiveMediaListResolver@@SAPAV1@PAVMGlxActiveMediaListChangeObserver@@@Z @ 73 NONAME ; class MGlxActiveMediaListResolver * MGlxActiveMediaListResolver::InstanceL(class MGlxActiveMediaListChangeObserver *)
--- a/photosgallery/viewframework/uiutilities/eabi/glxuiutilitiesu.def Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/eabi/glxuiutilitiesu.def Thu Jul 15 18:39:01 2010 +0300
@@ -12,85 +12,87 @@
_ZN13CGlxUiUtility15SetExitingStateEi @ 11 NONAME
_ZN13CGlxUiUtility15ShowAlfDisplayLEv @ 12 NONAME
_ZN13CGlxUiUtility17GetItemsLeftCountEv @ 13 NONAME
- _ZN13CGlxUiUtility17GlxTextureManagerEv @ 14 NONAME
- _ZN13CGlxUiUtility18SetAppOrientationLE15TGlxOrientation @ 15 NONAME
- _ZN13CGlxUiUtility19GetRotatedImageSizeEv @ 16 NONAME
- _ZN13CGlxUiUtility19SetRotatedImageSizeE5TSize @ 17 NONAME
- _ZN13CGlxUiUtility20DestroyScreenClearerEv @ 18 NONAME
- _ZN13CGlxUiUtility21DisplayScreenClearerLEv @ 19 NONAME
- _ZN13CGlxUiUtility22AddSkinChangeObserverLER22MGlxSkinChangeObserver @ 20 NONAME
- _ZN13CGlxUiUtility22HandleTvStatusChangedLE13TTvChangeType @ 21 NONAME
- _ZN13CGlxUiUtility23ViewNavigationDirectionEv @ 22 NONAME
- _ZN13CGlxUiUtility24RemoveSkinChangeObserverER22MGlxSkinChangeObserver @ 23 NONAME
- _ZN13CGlxUiUtility26SetViewNavigationDirectionE23TGlxNavigationDirection @ 24 NONAME
- _ZN13CGlxUiUtility30VisibleItemsInPageGranularityLEv @ 25 NONAME
- _ZN13CGlxUiUtility3EnvEv @ 26 NONAME
- _ZN13CGlxUiUtility5CloseEv @ 27 NONAME
- _ZN13CGlxUiUtility8UtilityLEv @ 28 NONAME
- _ZN14GlxSetAppState8AppStateEv @ 29 NONAME
- _ZN14GlxSetAppState8SetStateE12TGlxAppState @ 30 NONAME
- _ZN15CGlxMMCNotifier4NewLER24MStorageNotifierObserver @ 31 NONAME
- _ZN18CGlxTextEntryPopup15SetLeftSoftKeyLEi @ 32 NONAME
- _ZN18CGlxTextEntryPopup4NewLERK7TDesC16R6TDes16 @ 33 NONAME
- _ZN18CGlxTextEntryPopup9ExecuteLDEv @ 34 NONAME
- _ZN19CGlxRelaseGPUMemory13RequestMemoryEv @ 35 NONAME
- _ZN19CGlxRelaseGPUMemory4NewLER21MGoomNotifierObserver @ 36 NONAME
- _ZN19CGlxScreenFurniture11SetTooltipLEiN10CAknButton16TTooltipPositionERK7TDesC16 @ 37 NONAME
- _ZN19CGlxScreenFurniture13SetActiveViewEi @ 38 NONAME
- _ZN19CGlxScreenFurniture15ViewDeactivatedEi @ 39 NONAME
- _ZN19CGlxScreenFurniture16ModifySoftkeyIdLEN24CEikButtonGroupContainer16TCommandPositionEiiRK7TDesC16 @ 40 NONAME
- _ZN19CGlxScreenFurniture18SetToolbarPositionEv @ 41 NONAME
- _ZN19CGlxScreenFurniture20SetToolbarItemDimmedEii @ 42 NONAME
- _ZN19CGlxScreenFurniture20SetToolbarVisibilityEi @ 43 NONAME
- _ZN19CGlxScreenFurniture24SetToolbarItemVisibilityEii @ 44 NONAME
- _ZN19CGlxScreenFurniture4NewLER13CGlxUiUtility @ 45 NONAME
- _ZN19CGlxScreenFurniture5NewLCER13CGlxUiUtility @ 46 NONAME
- _ZN19CGlxScreenFurniture9SetFocusLEi @ 47 NONAME
- _ZN19GlxAnimationFactory20CreateViewAnimationLE23TGlxViewswitchAnimation23TGlxNavigationDirectionP16CAlfControlGroup @ 48 NONAME
- _ZN19GlxAnimationFactory20CreateViewAnimationLE23TGlxViewswitchAnimation23TGlxNavigationDirectionR13RPointerArrayI16CAlfControlGroupE @ 49 NONAME
- _ZN19GlxAnimationFactory28CreateImageLoadingAnimationLER10CAlfVisualR11CAlfTexture @ 50 NONAME
- _ZN21CGlxProgressIndicator15ControlTNDaemonEi @ 51 NONAME
- _ZN21CGlxProgressIndicator16ShowProgressbarLEv @ 52 NONAME
- _ZN21CGlxProgressIndicator21DismissProgressDialogEv @ 53 NONAME
- _ZN21CGlxProgressIndicator4NewLER23MDialogDismisedObserver @ 54 NONAME
- _ZN21GlxAttributeRetriever9RetrieveLERK16MGlxFetchContextR13MGlxMediaListi @ 55 NONAME
- _ZN21GlxGeneralUiUtilities11IsLandscapeEv @ 56 NONAME
- _ZN21GlxGeneralUiUtilities12FormatStringER6TDes16RK7TDesC16iii @ 57 NONAME
- _ZN21GlxGeneralUiUtilities13ConfirmQueryLERK7TDesC16 @ 58 NONAME
- _ZN21GlxGeneralUiUtilities13ConfirmQueryLEiRK7TDesC16 @ 59 NONAME
- _ZN21GlxGeneralUiUtilities13ShowInfoNoteLERK7TDesC16i @ 60 NONAME
- _ZN21GlxGeneralUiUtilities14ShowErrorNoteLERK7TDesC16i @ 61 NONAME
- _ZN21GlxGeneralUiUtilities14ShowErrorNoteLEi @ 62 NONAME
- _ZN21GlxGeneralUiUtilities16LayoutIsMirroredEv @ 63 NONAME
- _ZN21GlxGeneralUiUtilities21ShowConfirmationNoteLERK7TDesC16i @ 64 NONAME
- _ZN27CGlxActiveMediaListRegistry23RegisterActiveMediaListEP13MGlxMediaList @ 65 NONAME
- _ZN27CGlxActiveMediaListRegistry25DeregisterActiveMediaListEP13MGlxMediaList @ 66 NONAME
- _ZN27CGlxActiveMediaListRegistry9InstanceLEP33MGlxActiveMediaListChangeObserver @ 67 NONAME
- _ZN27MGlxActiveMediaListResolver9InstanceLEP33MGlxActiveMediaListChangeObserver @ 68 NONAME
- _ZNK13CGlxUiUtility11DisplaySizeEv @ 69 NONAME
- _ZNK13CGlxUiUtility14AppOrientationEv @ 70 NONAME
- _ZNK13CGlxUiUtility7DisplayEv @ 71 NONAME
- _ZTI13CGlxUiUtility @ 72 NONAME
- _ZTI15CGlxMMCNotifier @ 73 NONAME
- _ZTI17CGlxAnimationView @ 74 NONAME
- _ZTI18CGlxAnimationTimed @ 75 NONAME
- _ZTI18CGlxTextEntryPopup @ 76 NONAME
- _ZTI19CGlxRelaseGPUMemory @ 77 NONAME
- _ZTI21CGlxProgressIndicator @ 78 NONAME
- _ZTI21CGlxSkinChangeMonitor @ 79 NONAME
- _ZTI25CGlxAnimationImageLoading @ 80 NONAME
- _ZTI32CGlxWaitDialogAttributeRetriever @ 81 NONAME
- _ZTI33CGlxSynchronousAttributeRetriever @ 82 NONAME
- _ZTV13CGlxUiUtility @ 83 NONAME
- _ZTV15CGlxMMCNotifier @ 84 NONAME
- _ZTV17CGlxAnimationView @ 85 NONAME
- _ZTV18CGlxAnimationTimed @ 86 NONAME
- _ZTV18CGlxTextEntryPopup @ 87 NONAME
- _ZTV19CGlxRelaseGPUMemory @ 88 NONAME
- _ZTV21CGlxProgressIndicator @ 89 NONAME
- _ZTV21CGlxSkinChangeMonitor @ 90 NONAME
- _ZTV25CGlxAnimationImageLoading @ 91 NONAME
- _ZTV32CGlxWaitDialogAttributeRetriever @ 92 NONAME
- _ZTV33CGlxSynchronousAttributeRetriever @ 93 NONAME
- _ZThn4_N13CGlxUiUtility22HandleTvStatusChangedLE13TTvChangeType @ 94 NONAME
+ _ZN13CGlxUiUtility17GetKeyguardStatusEv @ 14 NONAME
+ _ZN13CGlxUiUtility17GlxTextureManagerEv @ 15 NONAME
+ _ZN13CGlxUiUtility18SetAppOrientationLE15TGlxOrientation @ 16 NONAME
+ _ZN13CGlxUiUtility19GetRotatedImageSizeEv @ 17 NONAME
+ _ZN13CGlxUiUtility19SetRotatedImageSizeE5TSize @ 18 NONAME
+ _ZN13CGlxUiUtility20DestroyScreenClearerEv @ 19 NONAME
+ _ZN13CGlxUiUtility21DisplayScreenClearerLEv @ 20 NONAME
+ _ZN13CGlxUiUtility22AddSkinChangeObserverLER22MGlxSkinChangeObserver @ 21 NONAME
+ _ZN13CGlxUiUtility22HandleTvStatusChangedLE13TTvChangeType @ 22 NONAME
+ _ZN13CGlxUiUtility22SetTNMDaemonPSKeyvalueEv @ 23 NONAME
+ _ZN13CGlxUiUtility23ViewNavigationDirectionEv @ 24 NONAME
+ _ZN13CGlxUiUtility24RemoveSkinChangeObserverER22MGlxSkinChangeObserver @ 25 NONAME
+ _ZN13CGlxUiUtility26SetViewNavigationDirectionE23TGlxNavigationDirection @ 26 NONAME
+ _ZN13CGlxUiUtility30VisibleItemsInPageGranularityLEv @ 27 NONAME
+ _ZN13CGlxUiUtility3EnvEv @ 28 NONAME
+ _ZN13CGlxUiUtility5CloseEv @ 29 NONAME
+ _ZN13CGlxUiUtility8UtilityLEv @ 30 NONAME
+ _ZN14GlxSetAppState8AppStateEv @ 31 NONAME
+ _ZN14GlxSetAppState8SetStateE12TGlxAppState @ 32 NONAME
+ _ZN15CGlxMMCNotifier4NewLER24MStorageNotifierObserver @ 33 NONAME
+ _ZN18CGlxTextEntryPopup15SetLeftSoftKeyLEi @ 34 NONAME
+ _ZN18CGlxTextEntryPopup4NewLERK7TDesC16R6TDes16 @ 35 NONAME
+ _ZN18CGlxTextEntryPopup9ExecuteLDEv @ 36 NONAME
+ _ZN19CGlxRelaseGPUMemory13RequestMemoryEv @ 37 NONAME
+ _ZN19CGlxRelaseGPUMemory4NewLER21MGoomNotifierObserver @ 38 NONAME
+ _ZN19CGlxScreenFurniture11SetTooltipLEiN10CAknButton16TTooltipPositionERK7TDesC16 @ 39 NONAME
+ _ZN19CGlxScreenFurniture13SetActiveViewEi @ 40 NONAME
+ _ZN19CGlxScreenFurniture15ViewDeactivatedEi @ 41 NONAME
+ _ZN19CGlxScreenFurniture16ModifySoftkeyIdLEN24CEikButtonGroupContainer16TCommandPositionEiiRK7TDesC16 @ 42 NONAME
+ _ZN19CGlxScreenFurniture18SetToolbarPositionEv @ 43 NONAME
+ _ZN19CGlxScreenFurniture20SetToolbarItemDimmedEii @ 44 NONAME
+ _ZN19CGlxScreenFurniture20SetToolbarVisibilityEi @ 45 NONAME
+ _ZN19CGlxScreenFurniture24SetToolbarItemVisibilityEii @ 46 NONAME
+ _ZN19CGlxScreenFurniture4NewLER13CGlxUiUtility @ 47 NONAME
+ _ZN19CGlxScreenFurniture5NewLCER13CGlxUiUtility @ 48 NONAME
+ _ZN19CGlxScreenFurniture9SetFocusLEi @ 49 NONAME
+ _ZN19GlxAnimationFactory20CreateViewAnimationLE23TGlxViewswitchAnimation23TGlxNavigationDirectionP16CAlfControlGroup @ 50 NONAME
+ _ZN19GlxAnimationFactory20CreateViewAnimationLE23TGlxViewswitchAnimation23TGlxNavigationDirectionR13RPointerArrayI16CAlfControlGroupE @ 51 NONAME
+ _ZN19GlxAnimationFactory28CreateImageLoadingAnimationLER10CAlfVisualR11CAlfTexture @ 52 NONAME
+ _ZN21CGlxProgressIndicator15ControlTNDaemonEi @ 53 NONAME
+ _ZN21CGlxProgressIndicator16ShowProgressbarLEv @ 54 NONAME
+ _ZN21CGlxProgressIndicator21DismissProgressDialogEv @ 55 NONAME
+ _ZN21CGlxProgressIndicator4NewLER23MDialogDismisedObserver @ 56 NONAME
+ _ZN21GlxAttributeRetriever9RetrieveLERK16MGlxFetchContextR13MGlxMediaListi @ 57 NONAME
+ _ZN21GlxGeneralUiUtilities11IsLandscapeEv @ 58 NONAME
+ _ZN21GlxGeneralUiUtilities12FormatStringER6TDes16RK7TDesC16iii @ 59 NONAME
+ _ZN21GlxGeneralUiUtilities13ConfirmQueryLERK7TDesC16 @ 60 NONAME
+ _ZN21GlxGeneralUiUtilities13ConfirmQueryLEiRK7TDesC16 @ 61 NONAME
+ _ZN21GlxGeneralUiUtilities13ShowInfoNoteLERK7TDesC16i @ 62 NONAME
+ _ZN21GlxGeneralUiUtilities14ShowErrorNoteLERK7TDesC16i @ 63 NONAME
+ _ZN21GlxGeneralUiUtilities14ShowErrorNoteLEi @ 64 NONAME
+ _ZN21GlxGeneralUiUtilities16LayoutIsMirroredEv @ 65 NONAME
+ _ZN21GlxGeneralUiUtilities21ShowConfirmationNoteLERK7TDesC16i @ 66 NONAME
+ _ZN27CGlxActiveMediaListRegistry23RegisterActiveMediaListEP13MGlxMediaList @ 67 NONAME
+ _ZN27CGlxActiveMediaListRegistry25DeregisterActiveMediaListEP13MGlxMediaList @ 68 NONAME
+ _ZN27CGlxActiveMediaListRegistry9InstanceLEP33MGlxActiveMediaListChangeObserver @ 69 NONAME
+ _ZN27MGlxActiveMediaListResolver9InstanceLEP33MGlxActiveMediaListChangeObserver @ 70 NONAME
+ _ZNK13CGlxUiUtility11DisplaySizeEv @ 71 NONAME
+ _ZNK13CGlxUiUtility14AppOrientationEv @ 72 NONAME
+ _ZNK13CGlxUiUtility7DisplayEv @ 73 NONAME
+ _ZTI13CGlxUiUtility @ 74 NONAME
+ _ZTI15CGlxMMCNotifier @ 75 NONAME
+ _ZTI17CGlxAnimationView @ 76 NONAME
+ _ZTI18CGlxAnimationTimed @ 77 NONAME
+ _ZTI18CGlxTextEntryPopup @ 78 NONAME
+ _ZTI19CGlxRelaseGPUMemory @ 79 NONAME
+ _ZTI21CGlxProgressIndicator @ 80 NONAME
+ _ZTI21CGlxSkinChangeMonitor @ 81 NONAME
+ _ZTI25CGlxAnimationImageLoading @ 82 NONAME
+ _ZTI32CGlxWaitDialogAttributeRetriever @ 83 NONAME
+ _ZTI33CGlxSynchronousAttributeRetriever @ 84 NONAME
+ _ZTV13CGlxUiUtility @ 85 NONAME
+ _ZTV15CGlxMMCNotifier @ 86 NONAME
+ _ZTV17CGlxAnimationView @ 87 NONAME
+ _ZTV18CGlxAnimationTimed @ 88 NONAME
+ _ZTV18CGlxTextEntryPopup @ 89 NONAME
+ _ZTV19CGlxRelaseGPUMemory @ 90 NONAME
+ _ZTV21CGlxProgressIndicator @ 91 NONAME
+ _ZTV21CGlxSkinChangeMonitor @ 92 NONAME
+ _ZTV25CGlxAnimationImageLoading @ 93 NONAME
+ _ZTV32CGlxWaitDialogAttributeRetriever @ 94 NONAME
+ _ZTV33CGlxSynchronousAttributeRetriever @ 95 NONAME
+ _ZThn4_N13CGlxUiUtility22HandleTvStatusChangedLE13TTvChangeType @ 96 NONAME
--- a/photosgallery/viewframework/uiutilities/inc/glxuiutility.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/inc/glxuiutility.h Thu Jul 15 18:39:01 2010 +0300
@@ -244,7 +244,20 @@
* Destroy Blank screen
*/
IMPORT_C void CGlxUiUtility::DestroyScreenClearer();
-
+
+ /**
+ * SetTNMDaemonPSKeyvalue
+ * @return Error code(TInt)
+ */
+ IMPORT_C TInt SetTNMDaemonPSKeyvalue();
+
+ /**
+ * Get Keyguard on/off PSKeyvalue
+ * @return 0 keyguard off
+ * 1 keyguard on
+ */
+ IMPORT_C TInt GetKeyguardStatus();
+
public: // from class MGlxTvObserver
/**
--- a/photosgallery/viewframework/uiutilities/src/glxprogressindicator.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/src/glxprogressindicator.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -128,10 +128,13 @@
{
TRACER("CGlxProgressIndicator::DisplayProgressBarL");
TInt itemsLeft = iUiUtility->GetItemsLeftCount();
- GLX_LOG_INFO1("itemsLeft in DisplayProgressBarL = %d",iFinalCount);
+ GLX_LOG_INFO2("DisplayProgressBarL itemsLeft (%d),iFinalCount (%d) ",
+ itemsLeft,iFinalCount);
UpdateProgressBar();
- if (!itemsLeft)
+ if (!itemsLeft && (itemsLeft != KErrNotReady))
{
+ // stop TNM daemon once all the imgs are processed.
+ iUiUtility->StopTNMDaemon();
if (iProgressbarTicker->IsActive())
{
iProgressbarTicker->Cancel();
@@ -147,6 +150,9 @@
void CGlxProgressIndicator::StartProgressNoteL(TInt aFinalValue, TBool aShow)
{
TRACER("CGlxProgressIndicator::StartProgressNoteL()");
+ //for MMC insert case need to know the count.so start Daemon.
+ iUiUtility->StartTNMDaemon();
+
TInt itemsLeft = iUiUtility->GetItemsLeftCount();
if (aShow)
{
@@ -229,14 +235,18 @@
TInt itemsLeft = iUiUtility->GetItemsLeftCount();
- if (iFinalCount < itemsLeft)
+ if ((iFinalCount < itemsLeft) && (itemsLeft != KErrNotReady))
{
iProgressInfo->SetFinalValue(itemsLeft);
iFinalCount = itemsLeft;
}
+ GLX_LOG_INFO1("CalculateDisplayBarIncrement = %d ",
+ (iFinalCount - itemsLeft));
+ // If TNM is still in harvesting mode, return 0.
+ // When the actual count is coming return the difference to update the info-bar
GLX_LOG_INFO1("CalculateDisplayBarIncrement = %d ",(iFinalCount - itemsLeft));
- return (iFinalCount - itemsLeft);
+ return ((itemsLeft == KErrNotReady) ? 0 :(iFinalCount - itemsLeft));
}
// -----------------------------------------------------------------------------
@@ -247,7 +257,7 @@
{
TRACER("CGlxProgressIndicator::ShowProgressbarL");
TInt itemsLeft = iUiUtility->GetItemsLeftCount();
- GLX_DEBUG3("ShowProgressbarL itemsLeft(%d), iFinalCount(%d)", itemsLeft,
+ GLX_DEBUG3("ShowProgressbarL itemsLeft(%d), iFinalCount(%d)", itemsLeft,
iFinalCount);
if (iFinalCount < itemsLeft)
@@ -257,7 +267,8 @@
*/
iFinalCount = itemsLeft;
}
- if (iFinalCount)
+
+ if ((itemsLeft == KErrNotReady) || iFinalCount)
{
StartProgressNoteL(iFinalCount, ETrue);
if (!iProgressbarTicker)
@@ -285,8 +296,8 @@
EXPORT_C void CGlxProgressIndicator::DismissProgressDialog()
{
TRACER("CGlxProgressIndicator::DismissProgressDialog");
-
- if(iProgressDialog)
+
+ if (iProgressDialog)
{
TRAP_IGNORE(iProgressDialog->ProcessFinishedL());
}
--- a/photosgallery/viewframework/uiutilities/src/glxuiutility.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/src/glxuiutility.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -42,7 +42,7 @@
#include <eikenv.h>
#include <eikappui.h>
#include <aknclearer.h>
-
+#include <avkondomainpskeys.h> // Keyguard Status
// Internal incudes
#include <glxresolutionmanager.h> // for CGlxResolutionManager
#include <glxsingletonstore.h>
@@ -827,7 +827,8 @@
{
TRACER("CGlxUiUtility::GetItemsLeftCount");
TInt itemsLeftCount = 0;
- TInt err = RProperty::Get(KTAGDPSNotification, KItemsleft, itemsLeftCount);
+ TInt err =
+ RProperty::Get(KTAGDPSNotification, KItemsleft, itemsLeftCount);
GLX_LOG_INFO1("GetItemsLeftCount: GetItemsLeftCount %d", itemsLeftCount);
// In case of error, enter in the next view. Don't block photos permanently.
@@ -841,7 +842,8 @@
// This case is added as per UI-Improvements.
// Use case: Take a pic. open photos from Menu (not "Goto photos")
// Progress bar SHOULD NOT be displayed.
- if (itemsLeftCount <= KIgnoreItemsLeftCount)
+ if ((itemsLeftCount != KErrNotReady) && (itemsLeftCount
+ <= KIgnoreItemsLeftCount))
{
GLX_LOG_INFO("GetItemsLeftCount( < KIgnoreItemsLeftCount )");
itemsLeftCount = 0;
@@ -877,4 +879,35 @@
iClearer = NULL;
}
}
+
+// -----------------------------------------------------------------------------
+// SetTNMDaemonPSKeyvalue
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CGlxUiUtility::SetTNMDaemonPSKeyvalue()
+ {
+ TRACER("CGlxUiUtility::SetTNMDaemonPSKeyvalue");
+ TInt ret = RProperty::Define(KTAGDPSNotification, KItemsleft,
+ RProperty::EInt);
+ GLX_LOG_INFO1("CGlxUiUtility::SetTNMDaemon()RProperty::Define %d", ret);
+ if (ret == KErrNone)
+ {
+ ret = RProperty::Set(KTAGDPSNotification, KItemsleft, KErrNotReady);
+ GLX_LOG_INFO1("CGlxUiUtility::SetTNMDaemon() RProperty::Set %d", ret);
+ }
+ return ret;
+ }
+
+// -----------------------------------------------------------------------------
+// GetKeyguardStatus
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CGlxUiUtility::GetKeyguardStatus()
+ {
+ TRACER("CGlxUiUtility::GetKeyguardStatus");
+ TInt keyguardStatus = KErrNone;
+ RProperty::Get(KPSUidAvkonDomain, KAknKeyguardStatus, keyguardStatus);
+ GLX_LOG_INFO1("CGlxUiUtility::GetKeyguardStatus() keyguardStatus=%d", keyguardStatus);
+ return keyguardStatus;
+ }
// End of file
--- a/photosgallery/viewframework/views/cloudview/src/glxcloudviewcontrol.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/views/cloudview/src/glxcloudviewcontrol.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -69,7 +69,7 @@
const TReal KBoundaryMargin = 0.1; //10% = 10/100 = 0.1
const TInt KFastCloudMovement = 100; //Transition time to move cloud view
const TInt KSlowCloudMovement = 1000; //Transition time to move cloud view
-const TInt KLongPressTimer = 1500000; //1.5 seconds
+const TInt KLongPressTimer = 700000;//700 ms to synchonize with gridview context menu timings
// ---------------------------------------------------------------------------
// Two-phased constructor.
--- a/photosgallery/viewframework/views/cloudview/src/glxtagscontextmenucontrol.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/views/cloudview/src/glxtagscontextmenucontrol.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -77,6 +77,8 @@
const TInt KWidthPadding = 30;
//Padding value for Minimum spacing for line separators
const TInt KLinePadding = 5;
+//Padding value for right margin
+const TInt KRightMargin = 10;
//Context menu separator line thickness value
const TReal KSeparatorLineThickness = 0.2;
//For Tagging the visuals
@@ -272,11 +274,12 @@
}
TInt upperYPos = aPoint.iY - KMinimalGap;
- TInt XPos = aPoint.iX + KWidthPadding;
+ TInt XPos = aPoint.iX;
//Preferred is to display in upper area
TInt upperDisplayableHeight = upperYPos - iViewableRect.iTl.iY;
- TInt rightDisplayableWidth = iViewableRect.iBr.iX - XPos ;
+ TInt rightDisplayableWidth = iViewableRect.iBr.iX - (XPos + KRightMargin
+ + KWidthPadding);
//always draw above
if(rightDisplayableWidth < iMaxTextWidth)
--- a/photosgallery/viewframework/views/fullscreenview/inc/glxfullscreenviewimp.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/views/fullscreenview/inc/glxfullscreenviewimp.h Thu Jul 15 18:39:01 2010 +0300
@@ -238,7 +238,7 @@
* Calls GetInitialZoomLevel() to get the Zoom Level and Sets the Value to the
* Slider Level
*/
- void SetSliderLevel();
+ void SetSliderToMin();
/*
* Creates and Initializes the slider model/widget
--- a/photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -86,6 +86,7 @@
const TInt KGlxMinSmallImageZoomLevel =100;
const TInt KGlxNeutralPinchPosition =100;
const TInt KGlxSliderTickValue =5;
+const TInt KGlxRealTruncationPadding =0.5;
/**
* Start Delay for the periodic timer, in microseconds
@@ -517,7 +518,7 @@
if(CheckIfSliderToBeShownL())
{
//To set the Slider values.
- SetSliderLevel();
+ SetSliderToMin();
//show the slider
iSliderWidget->ShowWidget(ETrue);
}
@@ -753,6 +754,11 @@
iHdmiController->ActivateZoom(autoZoomOut);
}
+
+ GLX_LOG_INFO1("ActivateZoomControlL: Slider MaxRange = %d ", iSliderModel->MaxRange() );
+ GLX_LOG_INFO1("ActivateZoomControlL: Slider MinRange = %d ", iSliderModel->MinRange() );
+ GLX_LOG_INFO1("ActivateZoomControlL: Slider PrimaryValue= %d", iSliderModel->PrimaryValue() );
+
if (aStartMode == EZoomStartSlider)
{
iZoomControl->ActivateL(iSliderModel->PrimaryValue(),aStartMode, focus,
@@ -822,6 +828,8 @@
item.Id(), ETrue);
}
}
+
+ SetSliderToMin();
//check if the slider is already visible in zoom view.
//if yes then do not disable the slider.
TBool sliderInvisible = ETrue;
@@ -867,7 +875,6 @@
TRAP_IGNORE( cba->SetCommandSetL( R_GLX_FULLSCREEN_EMPTYSOFTKEYS ) );
cba->DrawNow();
}
-
}
else
{
@@ -1134,7 +1141,7 @@
TRect imageRect(TPoint(tlX, tlY), TSize((size.iWidth*zoomLevel)/100, (size.iHeight*zoomLevel)/100));
if (imageRect.Contains(doubleTapPoint))
{
- SetSliderLevel();
+ SetSliderToMin();
TRAP_IGNORE( ActivateZoomControlL(EZoomStartDoubleTap, &doubleTapPoint) );
}
return EEventConsumed;
@@ -1209,7 +1216,7 @@
// Handle only a pinch out. not a pinch in.
if (KGlxNeutralPinchPosition < aEvent.CustomEventData())
{
- SetSliderLevel();
+ SetSliderToMin();
TRAP_IGNORE( ActivateZoomControlL(EZoomStartPinch));
}
return EEventConsumed; // will be consumed even if we are pinching IN (trying to zoom OUT).
@@ -1255,7 +1262,6 @@
break;
}
case EGlxCmdFullScreenBack:
- SetSliderLevel();
DeactivateZoomControlL();
//Show the screen furniture when we press back from zoom
ShowUiL(ETrue);
@@ -1289,7 +1295,6 @@
{
if (aCommandId == KGlxZoomOutCommand)
{
- SetSliderLevel();
DeactivateZoomControlL();
}
else if(aCommandId == KGlxZoomOrientationChange)
@@ -1347,14 +1352,22 @@
TReal32 imageHeightRatio = ((TReal32)rect.Height()/ size.iHeight )*100.0F;
initialZoomLevel = Min(imageWidthRatio,imageHeightRatio);
}
- return initialZoomLevel;
+
+ // A correction of 0.5 (KGlxRealTruncationPadding) is added to the resultant value.
+ // This ensures that all return values greater than X.5 (e.g lets say 12.8) is pegged to X+1(13)
+ // instead of X(12) while calculating.
+ // Changing the calculations to real might have been a better idea,
+ // but that involves many changes in many places and was therefore avoided,
+ // maybe a good idea to take up in PS2.
+ GLX_LOG_INFO1("CGlxFullScreenViewImp::GetInitialZoomLevel() = %d ", KGlxRealTruncationPadding + initialZoomLevel);
+ return KGlxRealTruncationPadding + initialZoomLevel ;
}
//----------------------------------------------------------------------------------
// SetSliderLevel() Set the Initial Zoom Level for the Image
//----------------------------------------------------------------------------------
//
-void CGlxFullScreenViewImp::SetSliderLevel()
+void CGlxFullScreenViewImp::SetSliderToMin()
{
TRACER("CGlxFullScreenViewImp::SetSliderLevel");
@@ -1494,20 +1507,23 @@
//check if any Error message is to be displayed
TMPXGeneralCategory cat = media.Category();
TBool checkViewRights = ETrue;
-
- if(iImgViewerMode && iImageViewerInstance->IsPrivate())
+ if (media.IsDrmProtected())
{
- checkViewRights = iDrmUtility->ItemRightsValidityCheckL(
- iImageViewerInstance->ImageFileHandle(),
- (media.Category() == EMPXImage));
+ GLX_LOG_INFO("CGlxFullScreenViewImp::ShowDrmExpiryNoteL()"
+ "- ItemRightsValidityCheckL()");
+ if (iImgViewerMode && iImageViewerInstance->IsPrivate())
+ {
+ checkViewRights = iDrmUtility->ItemRightsValidityCheckL(
+ iImageViewerInstance->ImageFileHandle(),
+ (media.Category() == EMPXImage));
+ }
+ else
+ {
+ //Since it is always for the focused item - use DisplayItemRightsCheckL instead of ItemRightsValidityCheckL
+ checkViewRights = iDrmUtility->ItemRightsValidityCheckL(
+ media.Uri(), (media.Category() == EMPXImage));
+ }
}
- else
- {
- //Since it is always for the focused item - use DisplayItemRightsCheckL instead of ItemRightsValidityCheckL
- checkViewRights = iDrmUtility->ItemRightsValidityCheckL(
- media.Uri(), (media.Category() == EMPXImage));
- }
-
if (checkViewRights && tnError != KErrNone)
{
if (iPeriodic->IsActive())
@@ -1692,41 +1708,46 @@
// ---------------------------------------------------------------------------
//
-// Set the image to external display - HDMI
+// Set the focused item to external display - HDMI
// ---------------------------------------------------------------------------
//
void CGlxFullScreenViewImp::SetItemToHDMIL()
{
- TRACER("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi");
+ TRACER("CGlxFullScreenViewImp::SetItemToHDMIL()");
TInt focusIndex = iMediaList->FocusIndex();
-
+
// If we dont know what item we are focussing on
- // or if out medialist is empty
- // or if HDMI is not connected
+ // or if our medialist is empty
// or if there is no HDMI Controller at all
- // then dont SetImageToHDMI :)
- if( ( KErrNotFound == focusIndex)
- || (0 == iMediaList->Count())
- || (NULL == iHdmiController))
+ // then dont SetItemToHDMI :)
+ if ((KErrNotFound == focusIndex) || (0 == iMediaList->Count()) || (NULL
+ == iHdmiController))
{
- GLX_LOG_INFO("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi- Cant Set Image To HDMI");
+ GLX_LOG_INFO("CGlxFullScreenViewImp::SetItemToHDMIL - Cant Set Image To HDMI");
return;
}
TGlxMedia item = iMediaList->Item(focusIndex);
TInt error = GlxErrorManager::HasAttributeErrorL(item.Properties(),
- KGlxMediaIdThumbnail);
- GLX_LOG_INFO1("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - error=%d", error);
+ KGlxMediaIdThumbnail);
+ GLX_LOG_INFO1("CGlxFullScreenViewImp::SetItemToHDMIL - error=%d", error);
+
+ TBool canView = ETrue;
+ if (item.IsDrmProtected())
+ {
+ canView = iDrmUtility->ItemRightsValidityCheckL(item.Uri(),
+ (item.Category() == EMPXImage));
+ }
+ GLX_LOG_INFO1("CGlxFullScreenViewImp::SetItemToHDMIL - canView=%d", canView);
+
// Item will be supported by HDMI ONLY if
// it is not a video
- // and it has valid DRM Viewing rights
+ // and it is DRM protected and has valid DRM Viewing rights
// and it has no attribute error
- if ( (item.Category() != EMPXVideo)
- && iDrmUtility->ItemRightsValidityCheckL(item.Uri(), ETrue)
- && (error == KErrNone) )
+ if ((item.Category() != EMPXVideo) && canView && (error == KErrNone))
{
- GLX_LOG_INFO("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - Fetch FS thumbnail");
+ GLX_LOG_INFO("CGlxFullScreenViewImp::SetItemToHDMIL - Fetch FS thumbnail");
TMPXAttribute fsTnAttrib = TMPXAttribute(KGlxMediaIdThumbnail,
GlxFullThumbnailAttributeId(ETrue, iScrnSize.iWidth,
iScrnSize.iHeight));
@@ -1734,19 +1755,19 @@
fsTnAttrib);
if (fsValue)
{
- GLX_LOG_INFO("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - Setting FS Bitmap");
+ GLX_LOG_INFO("CGlxFullScreenViewImp::SetItemToHDMIL - Setting FS Bitmap");
CFbsBitmap* fsBitmap = new (ELeave) CFbsBitmap;
CleanupStack::PushL(fsBitmap);
fsBitmap->Duplicate( fsValue->iBitmap->Handle());
- GLX_LOG_INFO2("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - FS Bitmap Size width=%d, height=%d",
+ GLX_LOG_INFO2("CGlxFullScreenViewImp::SetItemToHDMIL - FS Bitmap Size width=%d, height=%d",
fsBitmap->SizeInPixels().iWidth, fsBitmap->SizeInPixels().iHeight);
iHdmiController->SetImageL(item.Uri(), KNullDesC, fsBitmap);
CleanupStack::PopAndDestroy(fsBitmap);
}
else
{
- GLX_LOG_INFO("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - Fetch Grid thumbnail");
+ GLX_LOG_INFO("CGlxFullScreenViewImp::SetItemToHDMIL - Fetch Grid thumbnail");
TMPXAttribute gridTnAttrib = TMPXAttribute(KGlxMediaIdThumbnail,
GlxFullThumbnailAttributeId(ETrue, iGridIconSize.iWidth,
iGridIconSize.iHeight));
@@ -1755,19 +1776,19 @@
if (gridvalue)
{
- GLX_LOG_INFO("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - Setting Grid Bitmap");
+ GLX_LOG_INFO("CGlxFullScreenViewImp::SetItemToHDMIL - Setting Grid Bitmap");
CFbsBitmap* gridBitmap = new (ELeave) CFbsBitmap;
CleanupStack::PushL(gridBitmap);
gridBitmap->Duplicate( gridvalue->iBitmap->Handle());
- GLX_LOG_INFO2("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - gridBitmap Size width=%d, height=%d",
+ GLX_LOG_INFO2("CGlxFullScreenViewImp::SetItemToHDMIL - gridBitmap Size width=%d, height=%d",
gridBitmap->SizeInPixels().iWidth, gridBitmap->SizeInPixels().iHeight);
iHdmiController->SetImageL(item.Uri(), KNullDesC, gridBitmap);
CleanupStack::PopAndDestroy(gridBitmap);
}
else
{
- GLX_LOG_INFO("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - Setting Default Bitmap");
+ GLX_LOG_INFO("CGlxFullScreenViewImp::SetItemToHDMIL - Setting Default Bitmap");
TFileName resFile(KDC_APP_BITMAP_DIR);
resFile.Append(KGlxIconsFilename);
CFbsBitmap* defaultBitmap = AknIconUtils::CreateIconL(resFile,
@@ -1777,7 +1798,7 @@
// always need to setsize on the raw bitmap for it to be visible
AknIconUtils::SetSize(defaultBitmap, TSize(iHdmiWidth,iHdmiHeight),EAspectRatioPreserved);
- GLX_LOG_INFO2("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - Default Size width=%d, height=%d",
+ GLX_LOG_INFO2("CGlxFullScreenViewImp::SetItemToHDMIL - Default Size width=%d, height=%d",
defaultBitmap->SizeInPixels().iWidth, defaultBitmap->SizeInPixels().iHeight);
iHdmiController->SetImageL(item.Uri(), KNullDesC, defaultBitmap);
CleanupStack::PopAndDestroy(defaultBitmap);
@@ -1786,7 +1807,7 @@
}
else
{
- GLX_LOG_INFO("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - Unsupported Item");
+ GLX_LOG_INFO("CGlxFullScreenViewImp::SetItemToHDMIL - Unsupported Item");
//Set the external display to cloning mode if
//the current item is something we dont support
//(e.g. video, corrupted item, item with invalid DRM)
@@ -1817,7 +1838,6 @@
{
if (iZoomControl && iZoomControl->Activated())
{
- SetSliderLevel();
DeactivateZoomControlL();
}
ProcessCommandL( EAknSoftkeyClose);
@@ -1836,7 +1856,6 @@
{
if(iZoomControl && iZoomControl->Activated())
{
- SetSliderLevel();
DeactivateZoomControlL();
}
ProcessCommandL(EAknSoftkeyExit);
@@ -1906,10 +1925,13 @@
void CGlxFullScreenViewImp::HandleTvStatusChangedL( TTvChangeType aChangeType )
{
TRACER("CGlxFullScreenViewImp::HandleTvStatusChangedL()");
- // Hide UI furnitures when HDMI cable is connected/Disconnected
- // irrespective of UI state on/off.
+ GLX_LOG_INFO1("CGlxFullScreenViewImp::HandleTvStatusChangedL(%d)",
+ aChangeType);
+
if (aChangeType == ETvConnectionChanged)
{
+ // Hide UI furnitures when HDMI cable is connected/Disconnected
+ // irrespective of UI state on/off.
HideUi(ETrue);
}
}
@@ -1923,7 +1945,8 @@
TInt index = iMediaList->FocusIndex();
const TGlxMedia& item = iMediaList->Item(index);
- TInt error = GlxErrorManager::HasAttributeErrorL(item.Properties(), KGlxMediaIdThumbnail);
+ TInt error = GlxErrorManager::HasAttributeErrorL(item.Properties(),
+ KGlxMediaIdThumbnail);
TBool isDrmRightsValid = ETrue;
if(item.IsDrmProtected())
@@ -1943,8 +1966,7 @@
}
// Display slider only for non corrupted images and items with valid DRM license
- if (iHdmiController
- && iHdmiController->IsHDMIConnected())
+ if (iHdmiController && iHdmiController->IsHDMIConnected())
{
//hide slider if UI is needed to be on and HDMI is Connected
return EFalse;
--- a/photosgallery/viewframework/views/gridview/src/glxgridviewimp.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/views/gridview/src/glxgridviewimp.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -329,13 +329,17 @@
//
void CGlxGridViewImp::HandleLatchToolbar()
{
- TRACER("CGlxGridViewImp::HandleLatchToolbarL()");
- CAknButton* markButton = static_cast<CAknButton*>
- (iToolbar->ControlOrNull( EGlxCmdStartMultipleMarking ));
+ TRACER("CGlxGridViewImp::HandleLatchToolbarL()");
+ CAknButton* markButton =
+ static_cast<CAknButton*> (iToolbar->ControlOrNull(
+ EGlxCmdStartMultipleMarking));
- if(markButton)
- {
- markButton->SetCurrentState( KGlxToolbarButtonUnLatched, ETrue );
- }
- }
+ if (markButton && !markButton->IsDimmed())
+ {
+ GLX_DEBUG1("CGlxGridViewImp::HandleLatchToolbar() - UnLatch");
+ markButton->SetCurrentState(KGlxToolbarButtonUnLatched, ETrue);
+ // Force to update the frame IDs
+ markButton->SetDimmed(EFalse);
+ }
+ }
// End of File
--- a/photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -569,16 +569,18 @@
{
TRACER("CGlxListViewImp::HandleOpenL");
- GLX_LOG_INFO1("CGlxListViewImp RProperty::Get leftVariable %d",(iUiUtility->GetItemsLeftCount()));
+ GLX_LOG_INFO1("CGlxListViewImp RProperty::Get leftVariable %d",
+ (iUiUtility->GetItemsLeftCount()));
- if (iUiUtility->GetItemsLeftCount())
+ if ((iUiUtility->GetItemsLeftCount() == KErrNotReady)
+ || (iUiUtility->GetItemsLeftCount()))
{
- if(!iProgressIndicator)
+ if (!iProgressIndicator)
{
iProgressIndicator = CGlxProgressIndicator::NewL(*this);
}
iProgressIndicator->ShowProgressbarL();
- if(iSchedulerWait)
+ if (iSchedulerWait)
{
delete iSchedulerWait;
iSchedulerWait = NULL;
@@ -1118,7 +1120,10 @@
{
TRACER("CGlxListViewImp::HandleMMCInsertionL()");
iMMCState = ETrue;
- NavigateToMainListL();
+ // Set PS key value to KErrNotRready as TNM takes some
+ // time to write the value.Will be overwritten by TNM later.
+ iUiUtility->SetTNMDaemonPSKeyvalue();
+ NavigateToMainListL();
}
// ---------------------------------------------------------------------------
@@ -1141,16 +1146,22 @@
void CGlxListViewImp::HandleForegroundEventL(TBool aForeground)
{
TRACER("CGlxListViewImp::HandleForegroundEventL()");
+ GLX_DEBUG2("CGlxListViewImp::HandleForegroundEventL(%d)", aForeground);
CAknView::HandleForegroundEventL(aForeground);
- if(iMMCState)
+ if (iMMCState)
{
iMMCState = EFalse;
NavigateToMainListL();
}
- if (iProgressIndicator)
+ TInt leftCount = iUiUtility->GetItemsLeftCount();
+ if (iProgressIndicator && (leftCount == KErrNotReady || leftCount))
{
- iProgressIndicator->ControlTNDaemon(aForeground);
+ if (!iUiUtility->GetKeyguardStatus())
+ {
+ iProgressIndicator->ControlTNDaemon(aForeground);
+ }
+
if (aForeground)
{
iProgressIndicator->ShowProgressbarL();
--- a/photosgallery/viewframework/views/viewbase/src/glxtoolbarcontroller.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/views/viewbase/src/glxtoolbarcontroller.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -183,11 +183,18 @@
MGlxMediaList* aList)
{
TRACER("CGlxToolbarController::HandleItemSelectedL");
-
+ GLX_DEBUG2("CGlxToolbarController::HandleItemSelectedL()"
+ " aList->SelectionCount()=%d", aList->SelectionCount());
+
// If atleast 1 item is marked, or if Mark All is called, then Latch the mark button.
- if((aList->SelectionCount() == 1 ) || (aList->SelectionCount() == aList->Count()))
+ if ((aList->SelectionCount() == 1) || (aList->SelectionCount()
+ == aList->Count()))
{
- EnableLatch( EGlxCmdStartMultipleMarking, ETrue );
+ EnableLatch(EGlxCmdStartMultipleMarking, ETrue);
+ }
+ else if (aList->SelectionCount() == 0)
+ {
+ EnableLatch(EGlxCmdStartMultipleMarking, EFalse);
}
}
@@ -335,19 +342,17 @@
//
void CGlxToolbarController::EnableLatch( TInt aCommandId, TInt aLatched )
{
- CAknButton* toolbarButton = static_cast<CAknButton*>
- (iToolbar->ControlOrNull( aCommandId ));
+ TRACER("CGlxToolbarController::EnableLatch()");
+ GLX_DEBUG2("CGlxToolbarController::EnableLatch() aLatched=%d", aLatched);
- if( toolbarButton )
+ CAknButton* toolbarButton =
+ static_cast<CAknButton*> (iToolbar->ControlOrNull(aCommandId));
+
+ if (toolbarButton && !toolbarButton->IsDimmed())
{
- if (aLatched)
- {
- toolbarButton->SetCurrentState(ETrue, ETrue);
- }
- else
- {
- toolbarButton->SetCurrentState(EFalse, ETrue);
- }
+ toolbarButton->SetCurrentState(aLatched, ETrue);
+ // Force to update the frame IDs
+ toolbarButton->SetDimmed(EFalse);
}
}
--- a/photosgallery/viewframework/views/zoomview/inc/glxzoomcontrol.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/views/zoomview/inc/glxzoomcontrol.h Thu Jul 15 18:39:01 2010 +0300
@@ -232,7 +232,7 @@
TBool HandlePointerEventsL(const TAlfEvent &aEvent);
- TInt GetInitialZoomLevel(TSize& aSize );
+ TReal32 GetInitialZoomLevel(TSize& aSize );
/*
* Does the zoom out on pinch released event
--- a/photosgallery/viewframework/views/zoomview/inc/glxzoomeventhandler.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/views/zoomview/inc/glxzoomeventhandler.h Thu Jul 15 18:39:01 2010 +0300
@@ -72,12 +72,11 @@
/*
* ActivateZoom from the Zoom control
*/
- void ActivateZoom(TInt initialZoomRatio,
+ void ActivateZoom( TInt aInitialZoomRatio,
TSize imageSize,
TZoomStartMode aStartMode,
- TInt aMinSliderRange,
- TInt aMaxSliderRange,
- TSize& aOriginalDimensions,
+ TInt aMinZoomRatio,
+ TInt aMaxZoomRatio,
TPoint* aZoomFocus);
/*
@@ -271,13 +270,12 @@
TPoint iStartDisplayPoint; // The variable holds the starting pointer posistion to determine the Drag Distance
TTime iDoubleTap; // This Variable is used to determine the double tap,by using the difference of the time
// between subsequent single Tap.
- TInt iInitialZoomRatio;
TInt iZoomRatio;
TRect iDoubleTapRect; // This varaible holds the rect for the Double Tap
TBool iDragOngoing; // Is a drag event ongoing
TBool iZoomActivated; // To Denote if zoom is activated
TUiState iZoomUiState; // To Denote if the Ui is On in zoom
- TInt iPrevPinchFactor; // To avoid the bouce while pinch gesture end
+ TInt iPrevPinchPercentage; // To avoid the bouce while pinch gesture end
TPoint iPreviousPointerPosition;
TPoint iPreviousDragStartPosition;
--- a/photosgallery/viewframework/views/zoomview/inc/glxzoommathsengine.h Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/views/zoomview/inc/glxzoommathsengine.h Thu Jul 15 18:39:01 2010 +0300
@@ -72,8 +72,8 @@
void Initialize(TPoint& aCenter,
TSize& aScreenSize,
TSize& aImageSize,
- TSize& aOriginalZoomedDimensions,
- TUint8 aInitialZoomRatio);
+ TUint8 aInitialZoomRatio,
+ TUint8 aMinZoomRatio);
/**
* UpdatePanFactor [Useful only in Key-based Panning]
--- a/photosgallery/viewframework/views/zoomview/src/glxzoomcontrol.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/views/zoomview/src/glxzoomcontrol.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -61,7 +61,6 @@
const TInt KHDMIZoomDelay = 250000;
//Zoom level for the animation , assuming the innitial level is 1.
const TReal KGlxZoomLevel = 1.5;
-const TInt KGlxMinSmallImageZoomLevel =100;
const TInt KGlxDecodingThreshold = 3000000; // pixels
@@ -332,9 +331,11 @@
// Now since our maximum size possible is 3 MP. all our zoom percentages will be relative to it.
// So our initial zoom ratio will be different and cnsequently our minimum slider value too will change.
- // Maximum is an
- TInt initialZoomRatio = GetInitialZoomLevel(maxVirtualImageSize);
- iZoomSliderModel->SetMinRange(initialZoomRatio);
+
+
+ GLX_LOG_INFO1("ActivateZoomControlL: Slider MaxRange = %d ", iZoomSliderModel->MaxRange() );
+ GLX_LOG_INFO1("ActivateZoomControlL: Slider MinRange = %d ", iZoomSliderModel->MinRange() );
+ GLX_LOG_INFO1("ActivateZoomControlL: Slider PrimaryValue= %d", iZoomSliderModel->PrimaryValue() );
iEventHandler->SetZoomActivated(ETrue);
if (aStartMode == EZoomStartSlider)
@@ -344,17 +345,15 @@
aStartMode,
iZoomSliderModel->MinRange(),
iZoomSliderModel->MaxRange(),
- maxVirtualImageSize,
aZoomFocus);
}
else
{
- iEventHandler->ActivateZoom(initialZoomRatio,
+ iEventHandler->ActivateZoom(aInitialZoomRatio,
maxVirtualImageSize,
aStartMode,
iZoomSliderModel->MinRange(),
iZoomSliderModel->MaxRange(),
- maxVirtualImageSize,
aZoomFocus);
}
TRAP_IGNORE(iImageTexture =
@@ -794,6 +793,9 @@
{
iZoomSliderModel->SetPrimaryValue(aPrimarySliderRatio);
}
+
+ GLX_LOG_INFO1(" CGlxZoomControl::UpdateViewPort aPrimarySliderRatio = [%d]", aPrimarySliderRatio);
+
}
// -----------------------------------------------------------------------------
@@ -915,33 +917,6 @@
}
// -----------------------------------------------------------------------------
-// GetInitialZoomLevel
-// -----------------------------------------------------------------------------
-//
-TInt CGlxZoomControl::GetInitialZoomLevel(TSize& aSize )
- {
- TRACER("CGlxZoomControl::InitialZoomLevel");
-
- TRect rect = AlfUtil::ScreenSize();
- TUint8 initialZoomLevel;
-
- if( rect.Width()>= aSize.iWidth && rect.Height() >= aSize.iHeight)
- {
- //if Both the Width and Height are lesser than the screen size,the initial Zoom Level will be 100
- initialZoomLevel = KGlxMinSmallImageZoomLevel;
- }
- else
- {
- //Calculate (Display Area Width) /Image Width * 100
- //Calculate (Display Area Height) /Image Height * 100
- //Choose the Minimum Of the above.
- TReal32 imageWidthRatio = ((TReal32) rect.Width()/ aSize.iWidth )*100.0F;
- TReal32 imageHeightRatio = ((TReal32)rect.Height()/ aSize.iHeight )*100.0F;
- initialZoomLevel = Min(imageWidthRatio,imageHeightRatio);
- }
- return initialZoomLevel;
- }
-// -----------------------------------------------------------------------------
// HandleTvStatusChangedL
// -----------------------------------------------------------------------------
void CGlxZoomControl::HandleTvStatusChangedL( TTvChangeType aChangeType )
--- a/photosgallery/viewframework/views/zoomview/src/glxzoomeventhandler.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/views/zoomview/src/glxzoomeventhandler.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -81,7 +81,7 @@
//
CGlxZoomPanEventHandler::CGlxZoomPanEventHandler(
MGlxZoomEventHandlers& aZoomEventHandler) :
- iZoomEventHandler(aZoomEventHandler), iPrevPinchFactor(
+ iZoomEventHandler(aZoomEventHandler), iPrevPinchPercentage(
KGlxNeutralZoomFactor)
{
TRACER("CGlxZoomPanEventHandler::CGlxZoomPanEventHandler()");
@@ -236,8 +236,8 @@
// The boundary conditions.
if (((targetZoomLevel >= iTargetAnimatedZoomRatio)
&& (EAnimationModeZoomIn == iAnimatedZoomMode))
- || ((targetZoomLevel <= iMinZoomRatio) && (EAnimationModeZoomOut
- == iAnimatedZoomMode)))
+ || ((targetZoomLevel <= iMinZoomRatio)
+ && (EAnimationModeZoomOut == iAnimatedZoomMode)))
{
iIsZoomingInAnimatedState = EFalse;
CancelAnimationTimer();
@@ -630,8 +630,10 @@
if ( (EGestureSwipeLeft == iPreviousGestureCode)
||(EGestureSwipeRight == iPreviousGestureCode)
||(EGestureSwipeUp == iPreviousGestureCode)
- ||(EGestureSwipeDown == iPreviousGestureCode))
+ ||(EGestureSwipeDown == iPreviousGestureCode)
+ )
{
+ GLX_LOG_INFO1("CGlxZoomPanEventHandler::HandleGestureReleased: Previous Gesture Code [%d]" , iPreviousGestureCode);
SetupAnimatedPan();
}
}
@@ -712,20 +714,23 @@
}
TPoint pinchFocus = aEvent.PinchCentrePoint();
- // Wrong convention in variable nomenclature but better than
- // ratioInPercentOfChangeInPinchDistance which is incidentally correct
- TInt pinchPercentage = aEvent.PinchPercent();
+ // Wrong convention in variable nomenclature but better than
+ // ratioInPercentOfChangeInPinchDistance which is incidentally correct
+ TInt pinchPercentage = aEvent.PinchPercent();
+ GLX_LOG_INFO1("CGlxZoomPanEventHandler::HandlePinchEventL: Percentage [%d]" , pinchPercentage);
+ GLX_LOG_INFO2("CGlxZoomPanEventHandler::HandlePinchEventL: Pinch Focus [%d, %d]" , pinchFocus.iX, pinchFocus.iY);
- if (( iPrevPinchFactor >= KGlxNeutralZoomFactor ) &&
+ if (( iPrevPinchPercentage >= KGlxNeutralZoomFactor ) &&
( pinchPercentage < KGlxNeutralZoomFactor ))
{
- iPrevPinchFactor = pinchPercentage ;
+ iPrevPinchPercentage = pinchPercentage ;
+ GLX_LOG_INFO1("CGlxZoomPanEventHandler::HandlePinchEventL: Pinch Ignored. Previous pinch factor = %d", iPrevPinchPercentage );
//This will result in we ignoring this event
- pinchPercentage = KGlxNeutralZoomFactor;
+ pinchPercentage = KGlxNeutralZoomFactor;
}
else
- {
- iPrevPinchFactor = pinchPercentage ;
+ {
+ iPrevPinchPercentage = pinchPercentage ;
}
// pinchPercentage == 100 => No change in finger distance => No Zoom.
@@ -738,7 +743,6 @@
}
HideScreenFurniture();
- GLX_LOG_INFO1("CGlxZoomPanEventHandler::HandlePinchEventL: Percentage [%d]" , pinchPercentage);
}
// -----------------------------------------------------------------------------
@@ -919,12 +923,11 @@
// ActivateZoom
// -----------------------------------------------------------------------------
//
-void CGlxZoomPanEventHandler::ActivateZoom(TInt aInitialZoomRatio,
+void CGlxZoomPanEventHandler::ActivateZoom( TInt aInitialZoomRatio,
TSize aImageSize,
TZoomStartMode aStartMode,
- TInt aMinSliderRange,
- TInt aMaxSliderRange,
- TSize& aOriginalDimensions,
+ TInt aMinZoomRatio,
+ TInt aMaxZoomRatio,
TPoint* aZoomFocus)
{
TRACER("CGlxZoomPanEventHandler::ActivateZoom");
@@ -940,16 +943,15 @@
);
// Minimum and Maximum Zoom Ratio
- iMinZoomRatio = iZoomRatio = aMinSliderRange;
- iMaxZoomRatio = aMaxSliderRange ;
+ iZoomRatio = aInitialZoomRatio;
+ iMinZoomRatio = aMinZoomRatio ;
+ iMaxZoomRatio = aMaxZoomRatio ;
- iInitialZoomRatio = aInitialZoomRatio;
-
iMathsEngine.Initialize(center,
screenSize,
imageSize,
- aOriginalDimensions,
- iZoomRatio
+ iZoomRatio,
+ aMinZoomRatio
);
//initially show the slider,so set the state to slider visible
@@ -984,7 +986,7 @@
break;
case EZoomStartPinch:
{
- iZoomRatio = iMathsEngine.Zoom(EZoomIn, aMinSliderRange,
+ iZoomRatio = iMathsEngine.Zoom(EZoomIn, aMinZoomRatio,
viewPortTopLeft, viewPortDimension);
iZoomEventHandler.HandleViewPortParametersChanged(viewPortTopLeft , 0,
@@ -1046,8 +1048,12 @@
{
GLX_LOG_INFO("CGlxZoomPanEventHandler::HandleEvent:ETypePrimaryValueChange");
+ GLX_LOG_INFO1("CGlxZoomPanEventHandler::HandleEvent:ETypePrimaryValueChange, iMinZoomRatio = [%d]", iMinZoomRatio);
+ GLX_LOG_INFO1("CGlxZoomPanEventHandler::HandleEvent:ETypePrimaryValueChange, iMaxZoomRatio = [%d]", iMaxZoomRatio);
+
MulSliderPos* dataPtr = (MulSliderPos*)(aEvent.CustomEventData());
TInt currentSliderValue = dataPtr->mCurrentValue;
+ GLX_LOG_INFO1("CGlxZoomPanEventHandler::HandleEvent:ETypePrimaryValueChange, currentSliderValue = [%d]", currentSliderValue );
// Is current value within acceptable range?
// If yes, then zoom in or zoom out as needed.
@@ -1131,7 +1137,7 @@
{
TRACER("CGlxZoomPanEventHandler::ZoomToMinimumL( )");
- Zoom(iInitialZoomRatio, 0, EZoomOut);
+ Zoom(iMinZoomRatio, 0, EZoomOut);
CallZoomOutL();
}
@@ -1159,6 +1165,7 @@
if( atZoomThreshold )
{
+ GLX_LOG_INFO("CGlxZoomPanEventHandler::Zoom Threshold Reached");
CancelZoomPanTimer();
if (iZoomRatio <= iMinZoomRatio)
{
--- a/photosgallery/viewframework/views/zoomview/src/glxzoommathsengine.cpp Mon Jun 21 15:40:32 2010 +0300
+++ b/photosgallery/viewframework/views/zoomview/src/glxzoommathsengine.cpp Thu Jul 15 18:39:01 2010 +0300
@@ -25,8 +25,6 @@
#include <glxtracer.h> // For Tracer
#include <glxlog.h> // For Log
-#define BORDER_HEIGHT (iBorderWidth.iHeight*(100-((newZoomRatio-iMinZoomRatio)*100/(iMaxZoomRatio-iMinZoomRatio))))/100
-#define BORDER_WIDTH (iBorderWidth.iWidth*(100-((newZoomRatio-iMinZoomRatio)*100/(iMaxZoomRatio-iMinZoomRatio))))/100
// LOCAL CONSTANTS AND MACROS
const TInt KGlxLargeImageMaximumZoomRatio = 100 ;
const TInt KGlxSmallImageMaximumZoomRatio = 150 ;
@@ -37,8 +35,8 @@
const TInt KGlxMaxPanUpdateMultiple = 6 ;
const TInt KGlxOrigin = 0 ;
-const TInt KGlxMinRelativeZoomPercent = 70 ;
-const TInt KGlxMaxRelativeZoomPercent = 130 ;
+const TInt KGlxMinRelativeZoomPercent = 85 ;
+const TInt KGlxMaxRelativeZoomPercent = 115 ;
const TInt KGlxZoomPanInc = 10 ; // Min number of pixels panned in one keypress. This value is incremented exponentially by multiples of iPanFactor
@@ -47,8 +45,8 @@
void TGlxZoomAndPanMathsEngine::Initialize(TPoint& aCenter,
TSize& aScreenSize,
TSize& aImageSize,
- TSize& /*aOriginalZoomedDimensions*/,
- TUint8 aInitialZoomRatio)
+ TUint8 aInitialZoomRatio,
+ TUint8 aMinZoomRatio)
{
TRACER("void TGlxZoomAndPanMathsEngine::Initialize()");
@@ -59,10 +57,12 @@
// [TODO] Is there a way to make this constant.
iActualImageSize = aImageSize;
- iMinZoomRatio = aInitialZoomRatio;
- iZoomRatio = aInitialZoomRatio;
- iMaxZoomRatio = ((aInitialZoomRatio == KGlxLargeImageMaximumZoomRatio) ?
+ iMinZoomRatio = aMinZoomRatio;
+ iZoomRatio = aInitialZoomRatio;
+ iMaxZoomRatio = ((aInitialZoomRatio >= KGlxLargeImageMaximumZoomRatio) ?
KGlxSmallImageMaximumZoomRatio:KGlxLargeImageMaximumZoomRatio);
+ GLX_LOG_INFO1("TGlxZoomAndPanMathsEngine::Initialize: Minimum ZoomRatio = [%d] ", iMinZoomRatio );
+ GLX_LOG_INFO1("TGlxZoomAndPanMathsEngine::Initialize: Maximum ZoomRatio = [%d] ", iMaxZoomRatio );
iPanFactor = KGlxMinPanFactor;
@@ -75,6 +75,8 @@
iBorderWidth.iWidth = (iScreenSize.iWidth - iImageVirtualSize.iWidth )/2 ;
iBorderWidth.iHeight = (iScreenSize.iHeight - iImageVirtualSize.iHeight)/2 ;
+ GLX_LOG_INFO2("TGlxZoomAndPanMathsEngine::Initialize: Center at Initialization = [%f,%f] ", iCenter.iX, iCenter.iY );
+
}
TInt TGlxZoomAndPanMathsEngine::NewCenterCoordinate(TInt aCenter,
@@ -124,7 +126,7 @@
TRACER("TGlxZoomAndPanMathsEngine::Pan");
GLX_LOG_INFO2("Pan: Center before PAN= [%d,%d] ", iCenter.iX, iCenter.iY );
- GLX_LOG_INFO2("Pan: Pan Offset = [%d,%d] ", TInt(aOffset.iX), TInt(aOffset.iY));
+ GLX_LOG_INFO2("Pan: Pan Offset = [%d,%d] ", aOffset.iX, aOffset.iY);
TPoint panOffset = aOffset;
TUint16 halfScreenWidth = iScreenSize.iWidth>>1;
@@ -252,7 +254,7 @@
//HEIGHT Calculation
// TODO: Hive center corrections into an different function.
// If the image might have become smaller than the screen DUE to or AFTER the above calculations
- if((imageDimension.iHeight < iScreenSize.iHeight - BORDER_HEIGHT))
+ if((imageDimension.iHeight < iScreenSize.iHeight ))
{
iCenter.iY=(imageDimension.iHeight/2);
}