# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1271249658 -10800 # Node ID c54d95799c80f4046d8f1bac095757881fd2b508 # Parent c8156a91d13cdde74cf5dd95f0ce12248ea7b12b Revision: 201013 Kit: 201015 diff -r c8156a91d13c -r c54d95799c80 mpxmusicplayer/Conf/mpxmusicplayer.confml Binary file mpxmusicplayer/Conf/mpxmusicplayer.confml has changed diff -r c8156a91d13c -r c54d95799c80 mpxmusicplayer/Conf/mpxmusicplayer_101FFCDC.crml Binary file mpxmusicplayer/Conf/mpxmusicplayer_101FFCDC.crml has changed diff -r c8156a91d13c -r c54d95799c80 mpxmusicplayer/app/src/mpxappui.cpp --- a/mpxmusicplayer/app/src/mpxappui.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxmusicplayer/app/src/mpxappui.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -2549,6 +2549,7 @@ else if ( iSaveMode == EMPXAssignContact ) { TRAP_IGNORE( + MPXTlsHelper::SetFilePath( iSavePath->Des() ); iView->HandleCommandL( EMPXCmdAfterSaveUseAsCascade )); MPXTlsHelper::SetNeedSave( EFalse ); } diff -r c8156a91d13c -r c54d95799c80 mpxmusicplayer/cenrep/101ffcdc.txt Binary file mpxmusicplayer/cenrep/101ffcdc.txt has changed diff -r c8156a91d13c -r c54d95799c80 mpxmusicplayer/mediakeyhandler/src/mpxmediakeyhandlerimp.cpp --- a/mpxmusicplayer/mediakeyhandler/src/mpxmediakeyhandlerimp.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxmusicplayer/mediakeyhandler/src/mpxmediakeyhandlerimp.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -1087,7 +1087,8 @@ } case ERemConCoreApiBackward: { - if ( aButtonAct == ERemConCoreApiButtonClick ) + if ( ( aButtonAct == ERemConCoreApiButtonClick ) || + ( aButtonAct == ERemConCoreApiButtonRelease ) ) { FilterAndSendCommand( EPbCmdPrevious ); } @@ -1095,7 +1096,8 @@ } case ERemConCoreApiForward: { - if ( aButtonAct == ERemConCoreApiButtonClick ) + if ( ( aButtonAct == ERemConCoreApiButtonClick ) || + ( aButtonAct == ERemConCoreApiButtonRelease ) ) { FilterAndSendCommand( EPbCmdNext ); } diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/collectionplugins/inc/mpxdbmanager.h --- a/mpxplugins/serviceplugins/collectionplugins/inc/mpxdbmanager.h Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/collectionplugins/inc/mpxdbmanager.h Wed Apr 14 15:54:18 2010 +0300 @@ -340,21 +340,22 @@ * * @return ETrue if the dummy file is created successfully, EFalse otherwise */ - TBool BlockDiskSpace( TDriveUnit aDrive, TInt aOrigDbSize, TBool aIsMTPInUse = EFalse ); + TBool BlockDiskSpace( TInt aIndex, TBool aIsMTPInUse = EFalse ); /** * To copy db from regular drive to RAM * * @return ETrue if succeed - * @leave KErrDiskFull if there is any difficulty copying files + * + * No-operation if fails */ - TBool DoCopyDBToRamL( TDriveUnit aDrive, TBool aIsMTPInUse ); + TBool DoCopyDBToRam( TInt aIndex, TBool aIsMTPInUse ); /** * To copy db back regular drive from RAM * */ - void DoCopyDBFromRamL( TInt aIndex ); + void DoCopyDBFromRam( TInt aIndex ); /** * To replace dummy file with new content @@ -399,9 +400,7 @@ */ void RemoveDummyFile( TInt index ); - - -/** + /** * Check if disksapce is enough to operatte. If not, it leaves with KErrDiskFull * */ @@ -417,6 +416,12 @@ */ void DoCommitL(); + /** + * Create full path and filename on a specified drive unit. + * @param aDrive identifies the drive unit + */ + HBufC* CreateFullFilenameL(TDriveUnit aDrive); + protected: // Types typedef struct @@ -449,10 +454,9 @@ void CreateTablesL(RSqlDatabase& aDatabase, TBool aCorrupt); /** - * Opens a specified database. - * @param aDrive identifies the drive unit of the database to open + * Opens root database at C-drive. */ - void OpenDatabaseL(TDriveUnit aDrive); + void OpenRootDatabaseL(); /** * Creates a specified database. @@ -462,15 +466,27 @@ /** * Attached a specified database. - * @param aDrive identifies the drive unit of the database to attach + * @param aIndex Index to iDatabaseHandles */ - void AttachDatabaseL(TDriveUnit aDrive); + void AttachDatabaseL(TInt aIndex); /** * Detach a specified database. - * @param aDrive identifies the drive unit of the database to detach + * @param aIndex Index to iDatabaseHandles + */ + void DetachDatabaseL(TInt aIndex); + + /** + * Open database + * @param aIndex Index to iDatabaseHandles */ - void DetachDatabaseL(TDriveUnit aDrive); + void OpenDatabaseAtIndexL( TInt aIndex ); + + /** + * Close database + * @param aIndex Index to iDatabaseHandles + */ + void CloseDatabaseAtIndexL(TInt aIndex); /** * Create filename on a specified drive unit. diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/collectionplugins/mpxinmemoryplugin/src/mpxinmemoryplugin.cpp --- a/mpxplugins/serviceplugins/collectionplugins/mpxinmemoryplugin/src/mpxinmemoryplugin.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/collectionplugins/mpxinmemoryplugin/src/mpxinmemoryplugin.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -514,6 +514,7 @@ if( index != KErrNotFound ) { iEmbeddedContext.Remove( index ); + delete iTemporaryData[index]; iTemporaryData.Remove( index ); iEmbeddedContext.Compress(); iTemporaryData.Compress(); diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbcommon/src/mpxdbmanager.cpp --- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbcommon/src/mpxdbmanager.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbcommon/src/mpxdbmanager.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -191,13 +191,6 @@ CloseAllDatabases(); delete iDbFile; -#ifdef __RAMDISK_PERF_ENABLE - TInt count(iDatabaseHandles.Count()); - for (TInt i = 0; i < count; ++i) - { - RemoveDummyFile(i); - } -#endif //__RAMDISK_PERF_ENABLE iDatabaseHandles.Close(); } @@ -285,23 +278,25 @@ MPX_DEBUG1("CMPXDbManager::CopyDBsToRamL iUseRAMdb already ETrue"); continue; } - iDatabaseHandles[i].iUseRAMdb = ETrue; - TRAPD(err, ret = DoCopyDBToRamL( iDatabaseHandles[i].iDrive, aIsMTPInUse )) + CloseDatabaseAtIndexL( i ); // let leave: not much we can't do if we can't close the original DB + DoCopyDBToRam( i, aIsMTPInUse ); // copies if it can + TRAPD( err, OpenDatabaseAtIndexL( i ) ); if ( err != KErrNone ) { - MPX_DEBUG2("CMPXDbManager::CopyDBsToRamL error=%d", err); - // remove dymmy file + MPX_DEBUG2("CMPXDbManager::CopyDBsToRamL OpenDatabaseAtIndexL leave=%d", err); RemoveDummyFile(i); - // try to close database that is opened from RAM disk - TRAP_IGNORE(CloseDatabaseL( iDatabaseHandles[i].iDrive )); - iDatabaseHandles[i].iUseRAMdb = EFalse; - // reopen database from drive not from RAM - OpenDatabaseL( iDatabaseHandles[i].iDrive ); - continue; // continue to copy for next drive - } - if ( !ret ) - { - iDatabaseHandles[i].iUseRAMdb = EFalse; + if ( iDatabaseHandles[i].iUseRAMdb ) + { + // go back to disk DB + TRAP_IGNORE(CloseDatabaseAtIndexL( i )); + iDatabaseHandles[i].iUseRAMdb = EFalse; + OpenDatabaseAtIndexL( i ); + continue; + } + else + { + User::Leave( err ); + } } } @@ -320,73 +315,51 @@ // ---------------------------------------------------------------------------- -// CMPXDbManager::DoCopyDBsToRamL +// CMPXDbManager::DoCopyDBToRam // ---------------------------------------------------------------------------- // -TBool CMPXDbManager::DoCopyDBToRamL( TDriveUnit aDrive, TBool aIsMTPInUse ) +TBool CMPXDbManager::DoCopyDBToRam( TInt aIndex, TBool aIsMTPInUse ) { #ifdef __RAMDISK_PERF_ENABLE - MPX_DEBUG2("-->CMPXDbManager::DoCopyDBsToRamL drive=%d", (TInt)aDrive); - TFileName dst; - TFileName src; - dst.Append(iRAMFolder); - src.Append(aDrive.Name()); - src.Append(KDBFilePath); - TRAPD( err, BaflUtils::EnsurePathExistsL( iFs, dst )); - if ( err != KErrNone ) + MPX_DEBUG2("-->CMPXDbManager::DoCopyDBsToRam drive=%d", (TInt)iDatabaseHandles[aIndex].iDrive); + DatabaseHandle& database = iDatabaseHandles[aIndex]; + TInt err = KErrNone; + + delete database.iOrigFullFilePath; + database.iOrigFullFilePath = 0; + delete database.iTargetFullFilePath; + database.iTargetFullFilePath = 0; + TRAP (err, + database.iOrigFullFilePath = CreateFullFilenameL( database.iDrive ); + database.iUseRAMdb = ETrue; // must turn this on to create RAM filename + database.iTargetFullFilePath = CreateFullFilenameL( database.iDrive ); + BaflUtils::EnsurePathExistsL( iFs, *database.iTargetFullFilePath )); + database.iUseRAMdb = EFalse; + if (err != KErrNone) { + MPX_DEBUG1("CMPXDbManager::DoCopyDBsToRamL() CreateFilenameL or EnsurePathExistsL failed"); return EFalse; } - TFileName filename; - filename.Format(KSecurePath, User::Identity().iUid, iDbFile); //x:\private\10281e17\[sldfdsf]mpxv2_5.db - src.Append(filename); - MPX_DEBUG2("RAMDisk src path=%S", &src); - TEntry entry; - iFs.Entry( src, entry ); - if (!BlockDiskSpace( aDrive, entry.iSize, aIsMTPInUse ) ) + MPX_DEBUG2("RAMDisk src path=%S", database.iOrigFullFilePath); + MPX_DEBUG2("RAMDisk dst path=%S", database.iTargetFullFilePath); + + if (!BlockDiskSpace( aIndex, aIsMTPInUse ) ) { MPX_DEBUG1("CMPXDbManager::DoCopyDBsToRamL() BlockDiskSpace failed"); return EFalse; // continue for next drive } - TBuf<2> d; - d.Append(aDrive.Name()); - HBufC* temp = HBufC::NewLC(KMaxFileName); - temp->Des().Append(d.Left(1)); - temp->Des().Append(iDbFile->Des()); - filename.Format(KSecurePath, User::Identity().iUid, temp); - CleanupStack::PopAndDestroy(temp); - dst.Append(filename); - MPX_DEBUG2("RAMDisk dst path=%S", &dst); - TInt index( GetDatabaseIndex((TInt)aDrive) ); - delete iDatabaseHandles[index].iOrigFullFilePath; - iDatabaseHandles[index].iOrigFullFilePath = 0; - delete iDatabaseHandles[index].iTargetFullFilePath; - iDatabaseHandles[index].iTargetFullFilePath = 0; - - // Save these path so it is convenient to copy back - iDatabaseHandles[index].iOrigFullFilePath = HBufC::NewL(src.Length()); - iDatabaseHandles[index].iTargetFullFilePath = HBufC::NewL(dst.Length()); - - iDatabaseHandles[index].iOrigFullFilePath->Des().Append(src); - iDatabaseHandles[index].iTargetFullFilePath->Des().Append(dst); - TRAP(err, CloseDatabaseL(aDrive)); - if ( err != KErrNone ) + if ( BaflUtils::CopyFile(iFs, *database.iOrigFullFilePath, *database.iTargetFullFilePath ) != KErrNone ) { - MPX_DEBUG2("<--CMPXDbManager::DoCopyDBsToRamL error=%d", err); - TInt index(GetDatabaseIndex((TInt)aDrive)); - if ( index >= 0 ) - { - RemoveDummyFile( index ); - } + RemoveDummyFile( aIndex ); return EFalse; } - User::LeaveIfError( BaflUtils::CopyFile(iFs, src, dst )); - OpenDatabaseL((TInt)aDrive); - - MPX_DEBUG2("RAMDisk Database opened=%d", (TInt)aDrive); + MPX_DEBUG2("RAMDisk Database copied=%d", (TInt)database.iDrive); + database.iUseRAMdb = ETrue; // succeeded moving DB to RAM MPX_DEBUG1("<--CMPXDbManager::DoCopyDBsToRamL"); - return ETrue; + return ETrue; +#else + return EFalse; #endif //__RAMDISK_PERF_ENABLE } @@ -396,34 +369,52 @@ // EXPORT_C void CMPXDbManager::CopyDBsFromRamL() { + MPX_FUNC("CMPXDbManager::CopyDBsFromRamL"); #ifdef __RAMDISK_PERF_ENABLE - MPX_DEBUG1("-->CMPXDbManager::CopyDBsFromRamL"); if( iRAMDiskPerfEnabled ) { TInt transactionCount = iTransactionCount; if (iTransactionCount > 0) { iTransactionCount = 0; - DoCommitL(); + TRAP_IGNORE( DoCommitL() ); } TInt count(iDatabaseHandles.Count()); - for (TInt i = 0; i < count && iDatabaseHandles[i].iUseRAMdb; ++i) + TInt leaveError = KErrNone; + iRAMInUse = EFalse; + // Should not leave until all the databases have been copied from RAM drive. + for (TInt i = 0; i < count; ++i) { - TRAPD(err, DoCopyDBFromRamL(i)); - if ( err != KErrNone ) + if ( !iDatabaseHandles[i].iUseRAMdb ) { - MPX_DEBUG2("<--CMPXDbManager::CopyDBsFromRamL error=%d", err); - //anyting wrong, delete the temp file and open database from drive + continue; + } + TRAPD( error, CloseDatabaseAtIndexL( i ) ); + if ( error ) + { + // Can't close db on RAM drive, so cleanup. + MPX_DEBUG2("CMPXDbManager::CopyDBsFromRamL CloseDatabaseAtIndexL fail: error = %d", error); + // Delete database on RAM drive. + BaflUtils::DeleteFile(iFs, *iDatabaseHandles[i].iTargetFullFilePath); + // Delete dummy file RemoveDummyFile(i); - // delete Db on RAM - User::LeaveIfError( BaflUtils::DeleteFile(iFs, - *iDatabaseHandles[i].iTargetFullFilePath)); + } + else + { + DoCopyDBFromRam(i); } iDatabaseHandles[i].iUseRAMdb = EFalse; // open db from drive - OpenDatabaseL( iDatabaseHandles[i].iDrive ); + TRAP( error, OpenDatabaseAtIndexL( i ) ); + if ( error && !leaveError ) + { + leaveError = error; + } } + + // leave if error + User::LeaveIfError(leaveError); if (transactionCount > 0) { @@ -431,47 +422,52 @@ iTransactionCount = transactionCount; } } - iRAMInUse = EFalse; - - MPX_DEBUG1("<--CMPXDbManager::CopyDBsFromRamL"); #endif //__RAMDISK_PERF_ENABLE } // ---------------------------------------------------------------------------- -// CMPXDbManager::DoCopyDBsToRamL +// CMPXDbManager::DoCopyDBsToRam // ---------------------------------------------------------------------------- // -void CMPXDbManager::DoCopyDBFromRamL( TInt aIndex ) +void CMPXDbManager::DoCopyDBFromRam( TInt aIndex ) { #ifdef __RAMDISK_PERF_ENABLE - MPX_DEBUG1("-->CMPXDbManager::DoCopyDBsFromRamL"); - MPX_DEBUG2("-->CMPXDbManager::DoCopyDBsFromRamL Drive %d will be closed before copying db from RAM.", - iDatabaseHandles[aIndex].iDrive); - - CloseDatabaseL(iDatabaseHandles[aIndex].iDrive); - - // Delete existing DB on drive - User::LeaveIfError( BaflUtils::DeleteFile(iFs, - *iDatabaseHandles[aIndex].iOrigFullFilePath)); - MPX_DEBUG1("CMPXDbManager::DoCopyDBsFromRamL old DB on drive deleted"); - - // Rename dummy file to be orignal file name - User::LeaveIfError( BaflUtils::RenameFile(iFs, - iDatabaseHandles[aIndex].iDummyFilePath, - *iDatabaseHandles[aIndex].iOrigFullFilePath) ); - MPX_DEBUG1("CMPXDbManager::CopyDBsFromRamL RAMDisk renamed."); + MPX_DEBUG1("-->CMPXDbManager::DoCopyDBsFromRam"); + DatabaseHandle& database = iDatabaseHandles[aIndex]; //Copy Db from RAM to replace dummy file - ReplaceFileL( *iDatabaseHandles[aIndex].iTargetFullFilePath, *iDatabaseHandles[aIndex].iOrigFullFilePath); - - MPX_DEBUG1("CMPXDbManager::CopyDBsFromRamL RAMDisk copied back."); + TRAPD(error, ReplaceFileL( *database.iTargetFullFilePath, database.iDummyFilePath)); + MPX_DEBUG2("CMPXDbManager::CopyDBsFromRam RAMDisk copied over dummy, error=%d", error); + + // done with RAM DB (whether copying succeeded or not) so can delete it + // can ignore errors since we cannot do anything if this fails + BaflUtils::DeleteFile(iFs, *database.iTargetFullFilePath); + MPX_DEBUG1("CMPXDbManager::DoCopyDBsFromRam RAM DB deleted"); + + if ( error == KErrNone ) + { + // Delete old DB on drive + // Can ignore error: either original does not exist or something is wrong and can't help it + BaflUtils::DeleteFile(iFs, *database.iOrigFullFilePath); + MPX_DEBUG1("CMPXDbManager::DoCopyDBsFromRam old DB on drive deleted"); - // Delete existing DB on RAM - User::LeaveIfError( BaflUtils::DeleteFile(iFs, *iDatabaseHandles[aIndex].iTargetFullFilePath)); - MPX_DEBUG1("CMPXDbManager::DoCopyDBsFromRamL RAMDisk deleted"); + // Rename dummy file to be original file name + error = BaflUtils::RenameFile(iFs, database.iDummyFilePath, *database.iOrigFullFilePath); + MPX_DEBUG2("CMPXDbManager::CopyDBsFromRam dummy file renamed, error=%d", error); + if ( error ) + { + // Error renaming dummy file, delete dummy file. + RemoveDummyFile(aIndex); + } + } + else + { + RemoveDummyFile(aIndex); + MPX_DEBUG1("CMPXDbManager::DoCopyDBsFromRam dummy file deleted"); + } - MPX_DEBUG1("<--CMPXDbManager::DoCopyDBsFromRamL"); + MPX_DEBUG1("<--CMPXDbManager::DoCopyDBsFromRam"); #endif //__RAMDISK_PERF_ENABLE } @@ -482,7 +478,7 @@ // Leaves on error. // Implementation follows CFileMan::Copy except that // - we don't resize target file to zero -// - we can assume that files already exist +// - we can assume that source file already exists // - we don't copy file attributes & timestamp // ---------------------------------------------------------------------------- // @@ -494,7 +490,12 @@ CleanupClosePushL( srcFile ); RFile dstFile; - User::LeaveIfError( dstFile.Open(iFs, aDstName, EFileWrite|EFileWriteDirectIO|EFileShareExclusive) ); + TInt error = dstFile.Open(iFs, aDstName, EFileWrite|EFileWriteDirectIO|EFileShareExclusive); + if (error == KErrNotFound) + { + error = dstFile.Create(iFs, aDstName, EFileWrite|EFileWriteDirectIO|EFileShareExclusive); + } + User::LeaveIfError ( error ); CleanupClosePushL( dstFile ); // resize destination file @@ -549,11 +550,8 @@ if ( iDatabaseHandles[index].iDummyFilePath.Length() ) { - TInt err = BaflUtils::DeleteFile(iFs, iDatabaseHandles[index].iDummyFilePath); - if ( !err ) - { - iDatabaseHandles[index].iDummyFilePath.Zero(); - } + BaflUtils::DeleteFile(iFs, iDatabaseHandles[index].iDummyFilePath); + iDatabaseHandles[index].iDummyFilePath.Zero(); } MPX_DEBUG1("<--CMPXDbManager::RemoveDummyFile"); #endif //__RAMDISK_PERF_ENABLE @@ -650,7 +648,7 @@ TDriveUnit cdrive(KRootDrive()); CreateDatabaseL(cdrive); - OpenDatabaseL(cdrive); + OpenRootDatabaseL(); TInt count(aDrives.Count()); for (TInt i = 0; i < count; ++i) @@ -673,13 +671,14 @@ handle.iUseRAMdb = EFalse; #endif //__RAMDISK_PERF_ENABLE + TInt index = iDatabaseHandles.Count(); iDatabaseHandles.AppendL(handle); TVolumeInfo vol; if (iFs.Volume(vol, drive) == KErrNone) { CreateDatabaseL(drive); - AttachDatabaseL(drive); + AttachDatabaseL( index ); } } } @@ -713,16 +712,18 @@ if (iDatabaseHandles[i].iDrive == aDrive) { MPX_DEBUG2("CMPXDbManager::OpenDatabaseL found %d", aDrive); - if (!iDatabaseHandles[i].iOpen) + TInt transactionCount = iTransactionCount; + if (iTransactionCount > 0) { - MPX_DEBUG1("CMPXDbManager::OpenDatabaseL not open found"); - // make sure the database is created - CreateDatabaseL(drive); - - // attach - AttachDatabaseL(drive); + iTransactionCount = 0; + DoCommitL(); } - + OpenDatabaseAtIndexL( i ); + if (transactionCount > 0) + { + DoBeginL(); + iTransactionCount = transactionCount; + } found = ETrue; break; } @@ -738,6 +739,18 @@ // ResetPreparedQueries(); } + +void CMPXDbManager::OpenDatabaseAtIndexL( TInt aIndex ) + { + DatabaseHandle & database = iDatabaseHandles[aIndex]; + if (!database.iOpen) + { + MPX_DEBUG1("CMPXDbManager::OpenDatabaseAtIndexL not open"); + // make sure the database is created + CreateDatabaseL( TDriveUnit(database.iDrive) ); + AttachDatabaseL( aIndex ); + } + } // ---------------------------------------------------------------------------- // Closes a specified database. @@ -752,11 +765,7 @@ { User::Leave(KErrNotReady); } - - // Close all prepared statements if a db is closed - // - ResetPreparedQueries(); - + TDriveUnit drive(aDrive); TDriveUnit cdrive(KRootDrive()); TBool found(EFalse); @@ -768,11 +777,45 @@ { if (iDatabaseHandles[i].iDrive == aDrive) { - MPX_DEBUG2("CMPXDbManager::CloseDatabaseL found %d", aDrive); - if (iDatabaseHandles[i].iOpen) + TInt transactionCount = iTransactionCount; + if (iTransactionCount > 0) { - MPX_DEBUG1("CMPXDbManager::CloseDatabaseL found open"); - DetachDatabaseL(drive); + iTransactionCount = 0; + DoCommitL(); + } + +#ifdef __RAMDISK_PERF_ENABLE + if ( iRAMDiskPerfEnabled && iDatabaseHandles[i].iUseRAMdb ) + { + MPX_DEBUG2("CMPXDbManager::CloseDatabaseL found %d at RAM", aDrive); + TRAPD( err, CloseDatabaseAtIndexL( i ) ); + if ( err != KErrNone ) + { + // Can't close db on RAM drive, so cleanup. + MPX_DEBUG2("CMPXDbManager::CloseDatabaseL CloseDatabaseAtIndexL fail: error = %d", err); + // Delete dummy file + RemoveDummyFile(i); + iDatabaseHandles[i].iUseRAMdb = EFalse; + // Delete database on RAM drive. + User::LeaveIfError( BaflUtils::DeleteFile(iFs, *iDatabaseHandles[i].iTargetFullFilePath) ); + } + else + { + DoCopyDBFromRam(i); + } + iDatabaseHandles[i].iUseRAMdb = EFalse; + } + else +#endif + { + MPX_DEBUG2("CMPXDbManager::CloseDatabaseL found %d", aDrive); + CloseDatabaseAtIndexL( i ); + } + + if (transactionCount > 0) + { + DoBeginL(); + iTransactionCount = transactionCount; } found = ETrue; @@ -788,6 +831,19 @@ } +void CMPXDbManager::CloseDatabaseAtIndexL( TInt aIndex ) + { + // Close all prepared statements if a db is closed + // + ResetPreparedQueries(); + + if (iDatabaseHandles[aIndex].iOpen) + { + MPX_DEBUG1("CMPXDbManager::CloseDatabaseAtIndexL found open"); + DetachDatabaseL( aIndex ); + } +} + // ---------------------------------------------------------------------------- // Closes all databases. // ---------------------------------------------------------------------------- @@ -806,10 +862,13 @@ for (TInt i = 0; i < count; ++i) { delete iDatabaseHandles[i].iAliasname; + iDatabaseHandles[i].iAliasname = 0; #ifdef __RAMDISK_PERF_ENABLE + RemoveDummyFile(i); delete iDatabaseHandles[i].iOrigFullFilePath; + iDatabaseHandles[i].iOrigFullFilePath = 0; delete iDatabaseHandles[i].iTargetFullFilePath; - iDatabaseHandles[i].iDummyFilePath.Zero(); + iDatabaseHandles[i].iTargetFullFilePath = 0; #endif //__RAMDISK_PERF_ENABLE } @@ -829,8 +888,7 @@ if (!iInitialized) { - TDriveUnit cdrive(KRootDrive()); - OpenDatabaseL(cdrive); + OpenRootDatabaseL(); } TInt count(iDatabaseHandles.Count()); @@ -839,7 +897,7 @@ TVolumeInfo vol; if (iFs.Volume(vol, iDatabaseHandles[i].iDrive) == KErrNone) { - AttachDatabaseL(iDatabaseHandles[i].iDrive); + AttachDatabaseL( i ); } } iInitialized = ETrue; @@ -937,11 +995,11 @@ User::Leave(KErrNotReady); } - TBool found(EFalse); + TInt index = KErrNotFound; if (aDrive == EDriveC) { - found = ETrue; + index = iDatabaseHandles.Count(); } else { @@ -950,12 +1008,12 @@ { if ((iDatabaseHandles[i].iDrive == aDrive) && (iDatabaseHandles[i].iOpen)) { - found = ETrue; + index = i; break; } } } - if (found) + if ( index >= 0 ) { HBufC * filename = CreateFilenameL(aDrive); CleanupStack::PushL(filename); @@ -978,12 +1036,12 @@ } else { - DetachDatabaseL(drive_unit); + DetachDatabaseL( index ); RSqlDatabase::Delete(*filename); CreateDatabaseL(drive_unit); - AttachDatabaseL(drive_unit); + AttachDatabaseL( index ); } } @@ -1635,6 +1693,7 @@ // void CMPXDbManager::ResetPreparedQueries() { + MPX_FUNC("CMPXDbManager::ResetPreparedQueries"); iPreparedStatements.Reset(); TInt c( iStatements.Count() ); @@ -1673,17 +1732,16 @@ } // ---------------------------------------------------------------------------- -// Opens a specified database. +// Opens root database on C-drive // ---------------------------------------------------------------------------- // -void CMPXDbManager::OpenDatabaseL( - TDriveUnit aDrive) +void CMPXDbManager::OpenRootDatabaseL() { - MPX_FUNC("CMPXDbManager::OpenDatabaseL"); - - HBufC * filename = CreateFilenameL(aDrive); + MPX_FUNC("CMPXDbManager::OpenRootDatabaseL"); + TDriveUnit cdrive(KRootDrive()); + HBufC * filename = CreateFilenameL(cdrive); CleanupStack::PushL(filename); - User::LeaveIfError(iDatabase.Open(filename->Des())); + User::LeaveIfError(iDatabase.Open(*filename)); CleanupStack::PopAndDestroy(filename); } @@ -1744,67 +1802,50 @@ // Attaches a specified database. // ---------------------------------------------------------------------------- // -void CMPXDbManager::AttachDatabaseL( - TDriveUnit aDrive) +void CMPXDbManager::AttachDatabaseL( TInt aIndex ) { MPX_FUNC("CMPXDbManager::AttachDatabaseL"); - - TBool found(EFalse); - - TInt count(iDatabaseHandles.Count()); - for (TInt i = 0; i < count; ++i) + ASSERT( aIndex < iDatabaseHandles.Count() ); + DatabaseHandle & database = iDatabaseHandles[ aIndex ]; + if (!database.iOpen) { - if (iDatabaseHandles[i].iDrive == aDrive) - { - if (!iDatabaseHandles[i].iOpen) - { - HBufC* filename = CreateFilenameL(aDrive); - CleanupStack::PushL(filename); + HBufC* filename = CreateFilenameL( database.iDrive ); + CleanupStack::PushL(filename); #ifdef __RAMDISK_PERF_ENABLE - if( iDatabaseHandles[i].iUseRAMdb ) - { - delete iDatabaseHandles[i].iAliasname; - iDatabaseHandles[i].iAliasname = HBufC::NewL(KAliasName().Length()); - HBufC* temp = HBufC::NewLC(2); // form of DE, DF, DX,... - temp->Des().Append(iRAMDrive); // length == 2 - TDriveUnit pdrive(aDrive); - temp->Des().Append(pdrive.Name().Left(1)); //length == 2+ 1 - iDatabaseHandles[i].iAliasname->Des().Format(KRAMAliasName, temp); - MPX_DEBUG2("CMPXDbManager::AttachDatabaseL - RAM change aliasname of %S", iDatabaseHandles[i].iAliasname ); - CleanupStack::PopAndDestroy(temp); - } - else + if( database.iUseRAMdb ) + { + delete database.iAliasname; + database.iAliasname = HBufC::NewL(KAliasName().Length()); + HBufC* temp = HBufC::NewLC(2); // form of DE, DF, DX,... + temp->Des().Append(iRAMDrive); // length == 2 + TDriveUnit pdrive( database.iDrive ); + temp->Des().Append(pdrive.Name().Left(1)); //length == 2+ 1 + database.iAliasname->Des().Format(KRAMAliasName, temp); + MPX_DEBUG2("CMPXDbManager::AttachDatabaseL - RAM change aliasname of %S", database.iAliasname ); + CleanupStack::PopAndDestroy(temp); + } + else #endif //__RAMDISK_PERF_ENABLE - { - delete iDatabaseHandles[i].iAliasname; - TDriveUnit drive(aDrive); - const TDesC& driveName = drive.Name(); - iDatabaseHandles[i].iAliasname = HBufC::NewL(KAliasName().Length()); - iDatabaseHandles[i].iAliasname->Des().Format(KAliasName, &driveName); - MPX_DEBUG2("CMPXDbManager::AttachDatabaseL - normal change aliasname of %S", iDatabaseHandles[i].iAliasname); - } - - TInt err = iDatabase.Attach(filename->Des(), *(iDatabaseHandles[i].iAliasname)); - MPX_DEBUG2("CMPXDbManager::AttachDatabaseL - Attach Error =%d", err); - User::LeaveIfError(err); - iDatabaseHandles[i].iOpen = ETrue; + { + delete database.iAliasname; + TDriveUnit drive( database.iDrive ); + const TDesC& driveName = drive.Name(); + database.iAliasname = HBufC::NewL(KAliasName().Length()); + database.iAliasname->Des().Format(KAliasName, &driveName); + MPX_DEBUG2("CMPXDbManager::AttachDatabaseL - normal change aliasname of %S", database.iAliasname); + } - CleanupStack::PopAndDestroy(filename); - } - else - { - MPX_DEBUG1("CMPXDbManager::AttachDatabaseL - found already open"); - } - - found = ETrue; - break; - } + TInt err = iDatabase.Attach( *filename, *database.iAliasname ); + MPX_DEBUG2("CMPXDbManager::AttachDatabaseL - Attach Error =%d", err); + User::LeaveIfError(err); + database.iOpen = ETrue; + + CleanupStack::PopAndDestroy(filename); } - if (!found) + else { - MPX_DEBUG1("CMPXDbManager::AttachDatabaseL - not found"); - User::Leave(KErrNotFound); + MPX_DEBUG1("CMPXDbManager::AttachDatabaseL - found already open"); } } @@ -1812,48 +1853,22 @@ // Detaches a specified database. // ---------------------------------------------------------------------------- // -void CMPXDbManager::DetachDatabaseL( - TDriveUnit aDrive) +void CMPXDbManager::DetachDatabaseL( TInt aIndex ) { MPX_FUNC("CMPXDbManager::DetachDatabaseL"); - ASSERT(iInitialized); - TBool found(EFalse); - - TInt count(iDatabaseHandles.Count()); - for (TInt i = 0; i < count; ++i) + ASSERT( iInitialized && aIndex < iDatabaseHandles.Count() ); + DatabaseHandle & database = iDatabaseHandles[ aIndex ]; + if ( database.iOpen ) { - if (iDatabaseHandles[i].iDrive == aDrive) + MPX_DEBUG2("CMPXDbManager::DetachDatabaseL iAliasname=%S is open",database.iAliasname ); + TInt err = iDatabase.Detach(*(database.iAliasname)); + if ( err ) { -#ifdef __RAMDISK_PERF_ENABLE - if ( iDatabaseHandles[i].iOpen || iDatabaseHandles[i].iUseRAMdb ) -#else //__RAMDISK_PERF_ENABLE - if ( iDatabaseHandles[i].iOpen ) -#endif //__RAMDISK_PERF_ENABLE - - { - MPX_DEBUG1("CMPXDbManager::DetachDatabaseL found drive that is opening"); - TInt err = iDatabase.Detach(*(iDatabaseHandles[i].iAliasname)); - if ( err ) - { - MPX_DEBUG2("CMPXDbManager::DetachDatabaseL detach failed Error=%d", err); - } - else - { - MPX_DEBUG2("CMPXDbManager::DetachDatabaseL iAliasname=%S", iDatabaseHandles[i].iAliasname); - } - User::LeaveIfError(err); - iDatabaseHandles[i].iOpen = EFalse; - } - - found = ETrue; - break; + MPX_DEBUG2("CMPXDbManager::DetachDatabaseL detach failed Error=%d", err); } - } - if (!found) - { - MPX_DEBUG1("CMPXDbManager::DetachDatabaseL drive not found in iDatabaseHandlers"); - User::Leave(KErrNotFound); + User::LeaveIfError(err); + database.iOpen = EFalse; } } @@ -1881,12 +1896,11 @@ path.Append(_L(":")); TBuf<2> d; d.Append(aDrive.Name()); - HBufC* temp = HBufC::NewLC(KMaxFileName); - temp->Des().Append(d.Left(1)); // attach original drive name - temp->Des().Append(iDbFile->Des()); - filename->Des().Format(securefilePath, &path, User::Identity().iUid, temp); + TFileName temp; + temp.Append(d.Left(1)); // attach original drive name + temp.Append(iDbFile->Des()); + filename->Des().Format(securefilePath, &path, User::Identity().iUid, &temp); MPX_DEBUG3("CMPXDbManager::CreateFilenameL - path=%S filename=%S", &path, filename); - CleanupStack::PopAndDestroy(temp); } else #endif //__RAMDISK_PERF_ENABLE @@ -1894,7 +1908,6 @@ MPX_DEBUG1("CMPXDbManager::CreateFilenameL - use normal drive"); const TDesC& driveName = aDrive.Name(); filename->Des().Format(securefilePath, &driveName, User::Identity().iUid, iDbFile); - } MPX_DEBUG2("CMPXDbManager::CreateFilenameL filename = %S", filename); @@ -2052,7 +2065,7 @@ TDriveUnit drive(iDatabaseHandles[i].iDrive); CreateDatabaseL(drive); MPX_DEBUG1("RegenerateAllDatabasesL: Attaching new DB"); - AttachDatabaseL(drive); + AttachDatabaseL( i ); MPX_DEBUG1("RegenerateAllDatabasesL: DB regeneration complete"); CleanupStack::PopAndDestroy(filename); } @@ -2605,41 +2618,36 @@ // CMPXDbManager::BlockDiskSpaceL // --------------------------------------------------------------------------- // -TBool CMPXDbManager::BlockDiskSpace( TDriveUnit aDrive, TInt aOrigDbSize, TBool aIsMTPInUse ) +TBool CMPXDbManager::BlockDiskSpace( TInt aIndex, TBool aIsMTPInUse ) { #ifdef __RAMDISK_PERF_ENABLE - MPX_DEBUG2("-->CMPXDbManager::BlockDiskSpaceL %d", (TInt)aDrive ); - + MPX_DEBUG2("-->CMPXDbManager::BlockDiskSpaceL %d", aIndex ); + DatabaseHandle & database = iDatabaseHandles[aIndex]; // if current DB size can not fit in RAM, abort now TInt ramDrive; RFs::CharToDrive(iRAMDrive, ramDrive); TVolumeInfo vol; TInt err = iFs.Volume( vol, ramDrive ); - if ( vol.iFree <= aOrigDbSize + KMPMinimumRAMSizeToRun ) + TEntry origDb; + iFs.Entry( *database.iOrigFullFilePath, origDb ); + if ( vol.iFree <= origDb.iSize + KMPMinimumRAMSizeToRun ) { MPX_DEBUG1("-->CMPXDbManager::BlockDiskSpaceL Not enough even for copy original DB file, leave" ); return EFalse; } // ensure you have the disk volume and database - err = iFs.Volume( vol, (TInt)aDrive ); + err = iFs.Volume( vol, database.iDrive ); if (err != KErrNone) { - MPX_DEBUG2("CMPXDbManager::BlockDiskSpaceL Volume not available on drive %d", (TInt)aDrive); - return EFalse; - } - - TInt index( GetDatabaseIndex((TInt)aDrive) ); - if (index < 0) - { - MPX_DEBUG2("CMPXDbManager::BlockDiskSpaceL Database not available for drive %d", (TInt)aDrive); + MPX_DEBUG2("CMPXDbManager::BlockDiskSpaceL Volume not available on drive %d", database.iDrive); return EFalse; } // Check if the drive has enough space to block MPX_DEBUG2("CMPXDbManager::BlockDiskSpaceL Disk total free space in bytes =%Lu", vol.iFree); - TInt64 blockingSize( CalculateInitalDummyDBSize( vol, aOrigDbSize, aIsMTPInUse )); + TInt64 blockingSize( CalculateInitalDummyDBSize( vol, origDb.iSize, aIsMTPInUse )); MPX_DEBUG2("CMPXDbManager::BlockDiskSpaceL Disk blocking size =%Lu", blockingSize); if ( vol.iFree <= blockingSize + 1*KMPMegaByte ) { @@ -2648,15 +2656,15 @@ } // Create and resize the dummy file - TFileName dummyDbFileName; TChar ch; - RFs::DriveToChar((TInt)aDrive, ch ); - dummyDbFileName.Format( KDummyDbFile, (TUint)ch); + RFs::DriveToChar(database.iDrive, ch ); + database.iDummyFilePath.Format( KDummyDbFile, (TUint)ch); RFile dummyDb; - err = dummyDb.Replace( iFs, dummyDbFileName, EFileWrite ); + err = dummyDb.Replace( iFs, database.iDummyFilePath, EFileWrite ); if (err != KErrNone) { MPX_DEBUG2("CMPXDbManager::BlockDiskSpaceL Can't open dummy file %d", err); + database.iDummyFilePath.Zero(); return EFalse; } err = dummyDb.SetSize( blockingSize ); @@ -2664,13 +2672,12 @@ { MPX_DEBUG2("CMPXDbManager::BlockDiskSpaceL Can't resize dummy file %d", err); dummyDb.Close(); + RemoveDummyFile(aIndex); return EFalse; } dummyDb.Close(); MPX_DEBUG1("CMPXDbManager::BlockDiskSpaceL Ok to block"); - - iDatabaseHandles[index].iDummyFilePath.Copy(dummyDbFileName); MPX_DEBUG1("<--CMPXDbManager::BlockDiskSpace"); return ETrue; @@ -2887,7 +2894,7 @@ TInt count(iDatabaseHandles.Count()); for (TInt i = 0; i < count && iDatabaseHandles[i].iUseRAMdb ; ++i) { - CloseDatabaseL( iDatabaseHandles[i].iDrive ); + CloseDatabaseAtIndexL( i ); TInt err= BaflUtils::CopyFile(iFs, iDatabaseHandles[i].iTargetFullFilePath->Des(), @@ -2895,7 +2902,7 @@ MPX_DEBUG2("CMPXDbManager::BackupDBsL err = %d", err); - OpenDatabaseL( iDatabaseHandles[i].iDrive ); + OpenDatabaseAtIndexL( i ); } if (transactionCount > 0) @@ -3003,5 +3010,48 @@ MPX_DEBUG2("CMPXDbManager::GetTotalRamDatabasesSize - Return err = %d", err); return err; } + +// ---------------------------------------------------------------------------- +// Creates the absolute database filename on a specified drive. +// ---------------------------------------------------------------------------- +// +HBufC* CMPXDbManager::CreateFullFilenameL(TDriveUnit aDrive) + { + MPX_FUNC("CMPXDbManager::CreateFullFilenameL"); + + HBufC* filename = HBufC::NewL(KMaxFileName); + const TDesC& securefilePath = KSecureFilePath; + TDriveUnit cdrive(KRootDrive()); + +#ifdef __RAMDISK_PERF_ENABLE + TInt index(GetDatabaseIndex((TInt)aDrive)); + if ( index >=0 && iDatabaseHandles[index].iUseRAMdb && aDrive != cdrive ) + { + MPX_DEBUG1("CMPXDbManager::CreateFullFilenameL - use RAMDisk"); + TFileName path; + path.Append(iRAMDrive); + path.Append(_L(":")); + path.Append(KDBFilePath); + TBuf<2> d; + d.Append(aDrive.Name()); + TFileName temp; + temp.Append(d.Left(1)); // attach original drive name + temp.Append(iDbFile->Des()); + filename->Des().Format(securefilePath, &path, User::Identity().iUid, &temp); + MPX_DEBUG3("CMPXDbManager::CreateFullFilenameL - path=%S filename=%S", &path, filename); + } + else +#endif //__RAMDISK_PERF_ENABLE + { + MPX_DEBUG1("CMPXDbManager::CreateFullFilenameL - use normal drive"); + TFileName dbPath; + dbPath.Append(aDrive.Name()); + dbPath.Append(KDBFilePath); + filename->Des().Format(securefilePath, &dbPath, User::Identity().iUid, iDbFile); + } + MPX_DEBUG2("CMPXDbManager::CreateFullFilenameL filename = %S", filename); + return filename; + } + // End of File diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbabstractalbum.h --- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbabstractalbum.h Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbabstractalbum.h Wed Apr 14 15:54:18 2010 +0300 @@ -2,7 +2,7 @@ * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbhandler.h --- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbhandler.h Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbhandler.h Wed Apr 14 15:54:18 2010 +0300 @@ -737,16 +737,6 @@ */ void PreCloseCollectionL(); - /** - * Notifies the handler that the collection was closed. - */ - void CollectionClosed(); - - /** - * Notifies the handler that the collection was opened. - */ - void CollectionOpenedL(); - /** * Checks if the spefified drive is a remove drive */ @@ -1121,8 +1111,6 @@ RFs& iFs; CMPXResource& iResource; TBool iOutOfDisk; // Are we in out of disk mode? - TBool iSynchronizeBasicTable; // Basic music table was not updated during last refresh - TBool iCollectionOpen; // Databases opened TBool iRefresh; // Refresh operation currently performed TBool iMtpInUse; // Flag for MTP operation TInt iOpOnDbCount; // Count to provide a min op amount in one transaction diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbmusic.h --- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbmusic.h Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbmusic.h Wed Apr 14 15:54:18 2010 +0300 @@ -529,21 +529,6 @@ */ TUint32 CMPXDbMusic::ArtistForAlbumL(const TUint32 aId); - /** - * Signals the start of a refresh operation - */ - void RefreshStartL(); - - /** - * Signals the end of a refresh operation - */ - void RefreshEndL(); - - /* - * Refresh music basic table - */ - void RefreshBasicTableL(); - /* * Check the integrity of the music basic table */ @@ -811,7 +796,9 @@ // file extensions to check DRM type, owned CDesCArrayFlat* iExtensionsDrm; MMPXDbMusicObserver& iObserver; - TBool iRefresh; +#ifdef ABSTRACTAUDIOALBUM_INCLUDED + TBool iArtNeedUpdated; +#endif // ABSTRACTAUDIOALBUM_INCLUDED }; #endif // MPXDBMUSIC_H diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbabstractalbum.cpp --- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbabstractalbum.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbabstractalbum.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -2,7 +2,7 @@ * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* 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". * @@ -14,6 +14,7 @@ * Description: Responsible for interation with the category tables: * Artist, Album, Genre, Composer and AbstractAlbum * +* */ diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbalbum.cpp --- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbalbum.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbalbum.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -244,22 +244,24 @@ if ( artistId == aArtist ) { TUint32 newArtistId = ArtistForAlbumL(aId); - - _LIT( KFormatArtistId, "Artist=%d" ); - HBufC* setStr = HBufC::NewLC(KFormatArtistId().Length() + KMCIntegerLen); - setStr->Des().Format(KFormatArtistId, newArtistId); + if ( artistId != newArtistId ) + { + _LIT( KFormatArtistId, "Artist=%d" ); + HBufC* setStr = HBufC::NewLC(KFormatArtistId().Length() + KMCIntegerLen); + setStr->Des().Format(KFormatArtistId, newArtistId); - iDbManager.ExecuteQueryL(aDriveId, KQueryAlbumUpdate, setStr, aId); - CleanupStack::PopAndDestroy(setStr); - - if (aItemChangedMessages) - { - // add the item changed message - MPXDbCommonUtil::AddItemAlbumChangedMessageL(*aItemChangedMessages, aId, EMPXItemModified, - EMPXAlbum, KDBPluginUid, ETrue, 0 ); + iDbManager.ExecuteQueryL(aDriveId, KQueryAlbumUpdate, setStr, aId); + CleanupStack::PopAndDestroy(setStr); + + if (aItemChangedMessages) + { + // add the item changed message + MPXDbCommonUtil::AddItemAlbumChangedMessageL(*aItemChangedMessages, aId, EMPXItemModified, + EMPXAlbum, KDBPluginUid, ETrue, 0 ); + } } } - + // decrement the number of songs for the category query = PreProcessStringLC(KQueryCategoryDecrementSongCount); iDbManager.ExecuteQueryL(aDriveId, *query, aId); diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbhandler.cpp --- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbhandler.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbhandler.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -185,7 +185,6 @@ iDbAuxiliary = CMPXDbAuxiliary::NewL(*iDbManager); MPX_TRAPD(err, iDbManager->InitDatabasesL(iDbDrives)); - iCollectionOpen = ETrue; // If KErrCorrupt is returned, a database file was found to be corrupted // and was replaced with a new one. The db plugin can ignore this error and continue @@ -1487,14 +1486,6 @@ // This is needed for the case where we were OOD before, but user // has cleared some space but now try to refresh MPX_TRAPD(err, iDbManager->InitDatabasesL(iDbDrives)); - iCollectionOpen = ETrue; - // Update (synchronize) music basic table if it's not - // in sync with music table - if(iSynchronizeBasicTable) - { - iDbMusic->RefreshEndL(); - } - iSynchronizeBasicTable = ETrue; if(err == KErrDiskFull) { @@ -1512,9 +1503,8 @@ } #ifdef __RAMDISK_PERF_ENABLE - iDbManager->CopyDBsToRamL(); + iDbManager->CopyDBsToRamL(); #endif //__RAMDISK_PERF_ENABLE - iDbMusic->RefreshStartL(); BeginTransactionL(); iRefresh = ETrue; @@ -1537,14 +1527,6 @@ curTime.HomeTime(); SetLastRefreshedTimeL(curTime); } - iDbMusic->RefreshEndL(); - //Update of music basic table fails when the collection is not open - //Next time the collection is opened the music basic table must be updated - if (iCollectionOpen ) - { - iSynchronizeBasicTable = EFalse; - } - #ifdef __RAMDISK_PERF_ENABLE iDbManager->CopyDBsFromRamL(); #endif //__RAMDISK_PERF_ENABLE @@ -1775,35 +1757,6 @@ } // ---------------------------------------------------------------------------- -// Notifies the handler that the collection was closed. -// ---------------------------------------------------------------------------- -// -void CMPXDbHandler::CollectionClosed() - { - MPX_FUNC("CMPXDbHandler::CollectionClosed"); - - iCollectionOpen = EFalse; - } - -// ---------------------------------------------------------------------------- -//Notifies the handler that the collection was opened. -// ---------------------------------------------------------------------------- -// -void CMPXDbHandler::CollectionOpenedL() - { - MPX_FUNC("CMPXDbHandler::CollectionOpened"); - - iCollectionOpen = ETrue; - // Update (synchronize) music basic table if it's not - // in sync with music table - if(iSynchronizeBasicTable) - { - iDbMusic->RefreshEndL(); - iSynchronizeBasicTable = EFalse; - } - } - -// ---------------------------------------------------------------------------- // Add song to collection // ---------------------------------------------------------------------------- // diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbmusic.cpp --- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbmusic.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbmusic.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -110,6 +110,9 @@ MMPXDbMusicObserver& aObserver) : CMPXDbTable(aDbManager), iObserver(aObserver) +#ifdef ABSTRACTAUDIOALBUM_INCLUDED + ,iArtNeedUpdated(ETrue) +#endif { MPX_FUNC("CMPXDbMusic::CMPXDbMusic"); } @@ -253,20 +256,27 @@ visible = DoUpdateSongL(aSongId, aMedia, driveUnit, aItemChangedMessages, recordset); - // Update Album table - if (aMedia.IsSupported(KMPXMediaMusicAlbumArtFileName) || aMedia.IsSupported(KMPXMediaMusicArtist)) +#ifdef ABSTRACTAUDIOALBUM_INCLUDED + if(iArtNeedUpdated) { - TUint32 albumId = recordset.ColumnInt64(EMusicAlbum); - iObserver.UpdateCategoryItemL(EMPXAlbum, albumId, aMedia, driveUnit, aItemChangedMessages); - } +#endif // ABSTRACTAUDIOALBUM_INCLUDED + // Update Album table + if (aMedia.IsSupported(KMPXMediaMusicAlbumArtFileName) || aMedia.IsSupported(KMPXMediaMusicArtist)) + { + TUint32 albumId = recordset.ColumnInt64(EMusicAlbum); + iObserver.UpdateCategoryItemL(EMPXAlbum, albumId, aMedia, driveUnit, aItemChangedMessages); + } - // Update Artist table - if ( aMedia.IsSupported(KMPXMediaMusicAlbumArtFileName) ) - { - TUint32 artistId = recordset.ColumnInt64(EMusicArtist); - iObserver.UpdateCategoryItemL(EMPXArtist, artistId, aMedia, driveUnit, aItemChangedMessages); + // Update Artist table + if ( aMedia.IsSupported(KMPXMediaMusicAlbumArtFileName) ) + { + TUint32 artistId = recordset.ColumnInt64(EMusicArtist); + iObserver.UpdateCategoryItemL(EMPXArtist, artistId, aMedia, driveUnit, aItemChangedMessages); + } +#ifdef ABSTRACTAUDIOALBUM_INCLUDED } - + iArtNeedUpdated = ETrue; //reset flag +#endif // ABSTRACTAUDIOALBUM_INCLUDED CleanupStack::PopAndDestroy(&recordset); } @@ -1054,26 +1064,6 @@ } // ---------------------------------------------------------------------------- -// CMPXDbMusic::RefreshStartL -// ---------------------------------------------------------------------------- -// -void CMPXDbMusic::RefreshStartL() - { - iRefresh = ETrue; - MPX_FUNC("CMPXDbMusic::RefreshStartL"); - } - -// ---------------------------------------------------------------------------- -// CMPXDbMusic::RefreshEndL -// ---------------------------------------------------------------------------- -// -void CMPXDbMusic::RefreshEndL() - { - MPX_FUNC("CMPXDbMusic::RefreshEndL"); - iRefresh = EFalse; - } - -// ---------------------------------------------------------------------------- // CMPXDbMusic::SongExistsL // ---------------------------------------------------------------------------- // @@ -1876,6 +1866,12 @@ #ifdef ABSTRACTAUDIOALBUM_INCLUDED TParsePtrC parse(albumArtFilename); TPtrC ext(parse.Ext()); + //set flag to false, so .alb will not overwrite art field in album, artist table + // when song with embedded art + if ((ext.CompareF(KAbstractAlbumExt)== 0) && containEmbeddedArt) + { + iArtNeedUpdated = EFalse; + } if ( ((ext.CompareF(KAbstractAlbumExt)== 0) && !containEmbeddedArt) || (ext.CompareF(KAbstractAlbumExt)!= 0)) { diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbplugin.cpp --- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbplugin.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbplugin.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -338,9 +338,11 @@ break; } case EMcCmdClose: + // called before destructing this plug-in: no actions required + break; case EMcCloseCollection: { - MPX_DEBUG1("CMPXDbPlugin::CommandL - EMcCloseCollection"); + MPX_DEBUG2("CMPXDbPlugin::CommandL - EMcCloseCollection %d", aArg); // Close the specified database TRAP_IGNORE(iDbHandler->PreCloseCollectionL()); #ifdef RD_MULTIPLE_DRIVE @@ -362,12 +364,11 @@ } else { - iDbHandler->CloseDatabaseL(aArg); + TRAP_IGNORE( iDbHandler->CloseDatabaseL(aArg) ); //Closing can fail if physical media has been removed or forced disk dismount has occurred. } #else iDbHandler->CloseDatabaseL(aArg); #endif // RD_MULTIPLE_DRIVE - iDbHandler->CollectionClosed(); break; } case EMcReOpenCollection: @@ -397,7 +398,6 @@ #else iDbHandler->OpenDatabaseL(aArg); #endif // RD_MULTIPLE_DRIVE - TRAP_IGNORE(iDbHandler->CollectionOpenedL()); break; } case EMcRefreshStarted: @@ -788,7 +788,6 @@ CMPXMediaArray* array = CMPXMediaArray::NewL(); CleanupStack::PushL(array); - TInt count(0); TInt levels(aPath.Levels()); TBool isASong(EFalse); diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/src/mpxdbcategory.cpp --- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/src/mpxdbcategory.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/src/mpxdbcategory.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -588,13 +588,17 @@ iDbManager.ExecuteSelectQueryL(aDriveId, *query, aId)); CleanupClosePushL(recordset); - if (recordset.Next() != KSqlAtRow) + TInt err(KSqlAtEnd); + TInt ret(0) ; + while((err = recordset.Next()) == KSqlAtRow) + { + ret += recordset.ColumnInt(KMPXTableDefaultIndex); + } + if(err != KSqlAtEnd) { User::Leave(KErrNotFound); } - - TInt ret = recordset.ColumnInt(KMPXTableDefaultIndex); - + MPX_DEBUG2("CMPXDbCategory::GetEpisodeCountL Count %d" , ret); CleanupStack::PopAndDestroy(&recordset); CleanupStack::PopAndDestroy(query); diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/playbackplugins/audioeffects/src/mpxaudioeffectengine.cpp --- a/mpxplugins/serviceplugins/playbackplugins/audioeffects/src/mpxaudioeffectengine.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/playbackplugins/audioeffects/src/mpxaudioeffectengine.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -207,7 +207,7 @@ { if(!iStereoEffect) // If stereo widening is ON and not constructed { - TUint stereoLevel = 100; + TUint stereoLevel = 30; // cmdUtil ownership passed into new object MPX_TRAPD(error, iStereoEffect = CStereoWidening::NewL(*iMdaPlayer, @@ -220,7 +220,7 @@ } iStereoEffect->EnableL(); - TUint8 level = 100; + TUint8 level = 30; iStereoEffect->SetStereoWideningLevelL( level ); iStereoEffect->ApplyL(); } diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/screensaverplugins/mpxscreensaverplugin/inc/mpxscreensaverplugincontainer.h --- a/mpxplugins/serviceplugins/screensaverplugins/mpxscreensaverplugin/inc/mpxscreensaverplugincontainer.h Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/screensaverplugins/mpxscreensaverplugin/inc/mpxscreensaverplugincontainer.h Wed Apr 14 15:54:18 2010 +0300 @@ -89,6 +89,24 @@ * @since 3.0 */ void RefreshDisplayInfo(); + + /** + * With this method the plugin may request a one-shot timeout event + * (EScreensaverEventTimeout) after the specified amount of seconds + * has passed. + * If the plugin only wants to be displayed for a certain time, this + * can be used instead of defining a timer in the plugin. Note that the + * maximum time is about 35 minutes (TTimeIntervalMicroSeconds32). + * If the screensaver is stopped before the time has passed, the + * timer will be canceled and callback not issued. The timer is also + * cancelled after the timeout has occurred. New timeout requests also + * cancel any pending timeouts before issuing a new one. A time value + * of 0 just cancels a pending timeout. + * + * @param aSecs Desired time in seconds after which a timeout callback + * event should be issued. + */ + void RequestTimeout(TInt aSecs); private: diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/screensaverplugins/mpxscreensaverplugin/src/mpxscreensaverplugin.cpp --- a/mpxplugins/serviceplugins/screensaverplugins/mpxscreensaverplugin/src/mpxscreensaverplugin.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/screensaverplugins/mpxscreensaverplugin/src/mpxscreensaverplugin.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -268,6 +268,7 @@ { CreateContainerL(); } + iContainer->RequestTimeout( 0 ); MProfile* profile = iProfileEngine->ActiveProfileL(); if( profile ) { diff -r c8156a91d13c -r c54d95799c80 mpxplugins/serviceplugins/screensaverplugins/mpxscreensaverplugin/src/mpxscreensaverplugincontainer.cpp --- a/mpxplugins/serviceplugins/screensaverplugins/mpxscreensaverplugin/src/mpxscreensaverplugincontainer.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/serviceplugins/screensaverplugins/mpxscreensaverplugin/src/mpxscreensaverplugincontainer.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -293,6 +293,17 @@ } // --------------------------------------------------------------------------- +// With this method the plugin may request a one-shot timeout event +// (EScreensaverEventTimeout) after the specified amount of seconds +// has passed. +// --------------------------------------------------------------------------- +// + void CMPXScreenSaverPluginContainer::RequestTimeout(TInt aSecs) + { + iScreenSaverHost->RequestTimeout( aSecs ); + } + +// --------------------------------------------------------------------------- // Create icons. // --------------------------------------------------------------------------- // diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/inc/mpxaddtracksdialog.h --- a/mpxplugins/viewplugins/inc/mpxaddtracksdialog.h Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/inc/mpxaddtracksdialog.h Wed Apr 14 15:54:18 2010 +0300 @@ -28,8 +28,6 @@ // FORWARD DECLARATIONS class CEikTextListBox; -class CAknNavigationControlContainer; -class CAknNavigationDecorator; class CAknTitlePane; class CAknContextPane; class CEikImage; @@ -191,8 +189,9 @@ /** * Stop the Animation execution + * @param aHighlightCurrent EFalse if no highlight is required to the selected item, by default highlighted. */ - void StopAnimL(); + void StopAnimL( TBool aHighlightCurrent = ETrue ); /** * load resources. @@ -352,14 +351,10 @@ CMPXMediaArray* iCategoryArray; CMPXMediaArray* iAllSongsArray; - CAknNavigationControlContainer* iNaviPane; // Not owned - CAknNavigationDecorator* iOrigNaviPane; // Not owned CAknContextPane* iContextPane; // Not owned CAknTitlePane* iTitlePane; // Not owned CEikTextListBox* iListBox; // Not owned CAknListBoxFilterItems* iLbxFilterItems; // Not owned - CAknNavigationDecorator* iNaviLabelPane; // New navi label pane - CAknNavigationDecorator* iNaviDecorator; // Navi decorator CEikImage* iOrigIcon; // Original context icon CEikImage* iNewIcon; // New context icon diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/inc/mpxmetadataeditordialog.h --- a/mpxplugins/viewplugins/inc/mpxmetadataeditordialog.h Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/inc/mpxmetadataeditordialog.h Wed Apr 14 15:54:18 2010 +0300 @@ -27,7 +27,7 @@ #include #include #include - +#include // CONSTANTS const TInt KMPXMetadataTextFieldMaxLen = 255; @@ -43,6 +43,7 @@ class MMPXCollectionUiHelper; class CAknPopupField; class CIdle; +class MMPXPlaybackUtility; namespace DRM { class CDrmUiHandling; @@ -78,6 +79,7 @@ NONSHARABLE_CLASS( CMPXMetadataEditorDialog ) : public CAknForm, public MMPXCollectionObserver, public MMPXCollectionFindObserver, + public MMPXPlaybackCallback, public MMPXCHelperObserver { public: @@ -577,6 +579,45 @@ * but before it has been activated. */ void PostLayoutDynInitL(); + +private: // from base class MMPXPlaybackCallback + + /** + * From MMPXPlaybackCallback + * Handle playback property + * + * @param aProperty the property + * @param aValue the value of the property + * @param aError error code + */ + void HandlePropertyL( TMPXPlaybackProperty aProperty, TInt aValue, TInt aError ); + + /** + * From MMPXPlaybackCallback + * Method is called continously until aComplete=ETrue, signifying that + * it is done and there will be no more callbacks + * Only new items are passed each time + * + * @param aPlayer UID of the subplayer + * @param aSubPlayers a list of sub players + * @param aComplete ETrue no more sub players. EFalse more subplayer + * expected + * @param aError error code + */ + void HandleSubPlayerNamesL( + TUid aPlayer, + const MDesCArray* aSubPlayers, + TBool aComplete, + TInt aError ); + + /** + * From MMPXPlaybackCallback + * Handle media properties + * + * @param aMedia media + * @param aError error code + */ + void HandleMediaL( const CMPXMedia& aMedia, TInt aError ); private: enum TMPXMetadataEditorCurrentMediaLOp diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/addtracksdialog/src/mpxaddtracksdialog.cpp --- a/mpxplugins/viewplugins/views/addtracksdialog/src/mpxaddtracksdialog.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/addtracksdialog/src/mpxaddtracksdialog.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -22,8 +22,6 @@ #include #include #include -#include -#include #include #include #include @@ -36,7 +34,6 @@ #include #include #include -#include #include #include @@ -144,9 +141,7 @@ iMatchedSongArray.Reset(); iMatchedGroupArray.Reset(); - delete iNaviDecorator; delete iOrigTitle; - delete iNaviLabelPane; delete iListModel; delete iNoSongText; delete iNoMatchText; @@ -218,13 +213,6 @@ MPX_FUNC( "CMPXAddTracksDialog::BackupPreviousStatusPaneL" ); CEikStatusPane* sp = iAvkonAppUi->StatusPane(); - // Backup navi pane - iNaviPane = static_cast - ( sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ); - iOrigNaviPane = iNaviPane->Top(); - - iNaviPane->PushDefaultL(); - // Backup title pane iTitlePane = static_cast ( sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); @@ -255,17 +243,6 @@ iTitlePane->SetTextL( *iOrigTitle ); } - // Set original navi pane - iNaviPane->Pop( iNaviLabelPane ); - if ( iOrigNaviPane ) - { - iNaviPane->PushL( *iOrigNaviPane ); - } - else - { - iNaviPane->PushDefaultL(); - } - // Restore original context icon if ( iOrigIcon ) { @@ -1096,8 +1073,9 @@ // Stop animation. // ----------------------------------------------------------------------------- // -void CMPXAddTracksDialog::StopAnimL() +void CMPXAddTracksDialog::StopAnimL( TBool aHighlightCurrent ) { + MPX_FUNC( "CMPXAddTracksDialog::StopAnimL" ); if( ( iPeriodic->IsActive() || iAnimIconIndex == CMPXAddTracksLbxArray::EMPXATLbxIconSongAddedAnim4 ) ) @@ -1105,15 +1083,18 @@ iAnimIconIndex = 0; iPeriodic->Cancel(); iListModel->SetAnimationIconNum( iSelectIndex, 0 ); - TInt bottomIdx = iListBox->BottomItemIndex(); - TInt topIdx = iListBox->TopItemIndex(); - if ( topIdx <= iSelectIndex && iSelectIndex <= bottomIdx ) + + // highlights the item pointed by iSelectIndex. + // if Efalse, then iSelectIndex does not match to the tapped item but it is updated later when AddCurrentTractToPlaylistL is called. + if ( aHighlightCurrent ) { - HighlightListItem( iSelectIndex ); + TInt bottomIdx = iListBox->BottomItemIndex(); + TInt topIdx = iListBox->TopItemIndex(); + if ( topIdx <= iSelectIndex && iSelectIndex <= bottomIdx ) + { + HighlightListItem( iSelectIndex ); + } } - // restore origional navi pane text - iNaviPane->Pop( iNaviLabelPane ); - iNaviPane->PushDefaultL(); } } @@ -1367,11 +1348,7 @@ iCommonUiHelper->HandleErrorL( aError ); } } - else - { - // Song added text display in navi pane - iNaviPane->PushL( *iNaviDecorator ); - } + CMPXMedia* media = (CMPXMedia*) aArgument; delete media; MPX_DEBUG1("<--CMPXAddTracksDialog::HandleOperationCompleteL"); @@ -1437,12 +1414,6 @@ iLbxExtFeat->EnableSpeedScrollL( ETrue ); CEikStatusPane* statusPane = iAvkonAppUi->StatusPane(); - iNaviPane = static_cast - ( statusPane->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ); - // read the navigation pane text resource - HBufC* text = StringLoader::LoadLC( R_MPX_CUI_ADDSONGS_SONG_ADDED ); - iNaviDecorator = iNaviPane->CreateNavigationLabelL( *text ); - CleanupStack::PopAndDestroy( text ); // Animation icon timer iPeriodic = CPeriodic::NewL( CActive::EPriorityIdle ); @@ -1737,7 +1708,7 @@ TListBoxEvent aEventType) { MPX_FUNC( "CMPXAddTracksDialog::HandleListBoxEventL" ); - StopAnimL(); + StopAnimL( EFalse ); if ( aEventType == EEventEnterKeyPressed || aEventType == EEventItemDoubleClicked #ifdef SINGLE_CLICK_INCLUDED || aEventType == EEventItemSingleClicked @@ -1767,7 +1738,6 @@ } else { - iNaviPane->PushDefaultL(); UpdateSoftkeyL(); } } diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/collectionviewhg/data/mpxcollectionviewhg.rss --- a/mpxplugins/viewplugins/views/collectionviewhg/data/mpxcollectionviewhg.rss Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/collectionviewhg/data/mpxcollectionviewhg.rss Wed Apr 14 15:54:18 2010 +0300 @@ -204,6 +204,11 @@ command = EMPXCmdRefreshLibrary; txt = qtn_mus_options_update_collection1; }, + MENU_ITEM + { + command = EMPXCmdAbout; + txt = qtn_mus_options_about; + }, MENU_ITEM { command = EMPXCmdPlayItem; @@ -1543,6 +1548,100 @@ buf = qtn_vmp_unknown; } +// ----------------------------------------------------------------------------- +// r_qtn_mus_about_note +// About note heading +// ----------------------------------------------------------------------------- +// + RESOURCE TBUF r_qtn_mus_about_note + { + buf = qtn_mus_about_note; + } + + +// ----------------------------------------------------------------------------- +// r_qtn_mus_about_note +// About note version content +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_qtn_mus_about_version + { + buf = qtn_mus_about_version; + } + + +// ----------------------------------------------------------------------------- +// r_mpx_about_dialog +// About Dialog +// ----------------------------------------------------------------------------- +// +RESOURCE DIALOG r_mpx_about_dialog + { + flags=EEikDialogFlagNoDrag |EEikDialogFlagCbaButtons |EEikDialogFlagWait; + buttons = R_AVKON_SOFTKEYS_OK_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtPopupHeadingPane; + id = EAknMessageQueryHeaderId; + control = AVKON_HEADING + { + headinglayout = R_AVKON_LIST_HEADING_PANE_POPUPS; + }; + }, + DLG_LINE + { + type = EAknCtMessageQuery; + id = EAknMessageQueryContentId; + control = AVKON_MESSAGE_QUERY + { + }; + } + }; + } + +// --------------------------------------------------------------------------- +// r_qtn_nmp_note_educating_the_user +// Text displays for educating user to optimize there music experience +// --------------------------------------------------------------------------- +// +RESOURCE TBUF r_qtn_nmp_note_educating_the_user + { + buf = qtn_nmp_note_educating_the_user; + } + +// ----------------------------------------------------------------------------- +// r_mpx_cui_educating_the_user_query +// Educating User query message +// ----------------------------------------------------------------------------- +// +RESOURCE DIALOG r_mpx_cui_educating_the_user_query + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_YES_NO; + items= + { + DLG_LINE + { + type = EAknCtPopupHeadingPane; + id = EAknMessageQueryHeaderId; + control = AVKON_HEADING + { + headinglayout = 0; + }; + }, + DLG_LINE + { + type = EAknCtMessageQuery; + id = EAknMessageQueryContentId; + control = AVKON_MESSAGE_QUERY + { + }; + } + }; + } + // --------------------------------------------------------------------------- // r_mpx_collection_albumsongs_list_cba // --------------------------------------------------------------------------- @@ -1554,7 +1653,7 @@ CBA_BUTTON { id = EAknSoftkeyYes; - txt = "Play"; + txt = qtn_mus_sk1_play; }, CBA_BUTTON { @@ -1564,7 +1663,7 @@ CBA_BUTTON { id = EAknSoftkeyYes; - txt = ""; + txt = qtn_mus_sk1_play; } }; } @@ -1686,4 +1785,69 @@ { buf = qtn_vmp_no_songs; } + +// --------------------------------------------------------------------------- +// r_mpx_music_num_songs_duration +// Text shown if there is more than one song in the playlist. +// where %N is the number of songs within the playlist +// and %U is the duration time for the total playlist, +// in the format hh:mm is displayed. +// if the playlist is empty, the duration is displayed as dashes (-- : --) +// --------------------------------------------------------------------------- +// +RESOURCE TBUF r_mpx_music_num_songs_duration + { + buf = qtn_mus_music_num_songs_duration; + } + +// --------------------------------------------------------------------------- +// r_mpx_music_one_song_duration +// d:Text shown if there is only one song in the playlist +// d:%U is the duration time for the total playlist, +// d:in the format hh:mm is displayed. +// --------------------------------------------------------------------------- +// +RESOURCE TBUF r_mpx_music_one_song_duration + { + buf = qtn_mus_music_one_song_duration; + } + +// --------------------------------------------------------------------------- +// List box text to show the number of items in the collection +// For the case there're 0 or more than 1 song in the collection +// --------------------------------------------------------------------------- +// +RESOURCE TBUF r_mpx_music_num_songs + { + buf = qtn_mus_music_num_songs; + } + +// --------------------------------------------------------------------------- +// List box text to show the number of items in the collection +// For the case there's only 1 song in the collection +// --------------------------------------------------------------------------- +// +RESOURCE TBUF r_mpx_music_one_song + { + buf = qtn_mus_music_one_song; + } + +// --------------------------------------------------------------------------- +// Text shown when the genre name is not available +// --------------------------------------------------------------------------- +// +RESOURCE TBUF r_mpx_genre_unknown + { + buf = qtn_mus_genre_unknown; + } + +// --------------------------------------------------------------------------- +// Text shown when there is no content to display in genre view +// --------------------------------------------------------------------------- +// +RESOURCE TBUF r_mpx_vmp_no_genres + { + buf = qtn_vmp_no_genres; + } + // End of File diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/collectionviewhg/inc/mpxcollectionviewhg.hrh --- a/mpxplugins/viewplugins/views/collectionviewhg/inc/mpxcollectionviewhg.hrh Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/collectionviewhg/inc/mpxcollectionviewhg.hrh Wed Apr 14 15:54:18 2010 +0300 @@ -144,6 +144,13 @@ EMPXPlaylistDetailsCount }; +// Different state of educating User Popup +enum TMPXEducatingPopup + { + EMPXInitialEducatingPopup, // Initial state + EMPXShowEducatingPopup, // Show popup at manual refresh, if any new songs added + EMPXDonotShowEducatingPopup // User doesn't want to see popup + }; #endif // MPXCOLLECTIONVIEWHG_HRH // End of File diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/collectionviewhg/inc/mpxcollectionviewhgimp.h --- a/mpxplugins/viewplugins/views/collectionviewhg/inc/mpxcollectionviewhgimp.h Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/collectionviewhg/inc/mpxcollectionviewhgimp.h Wed Apr 14 15:54:18 2010 +0300 @@ -19,6 +19,11 @@ #ifndef C_CMPXCOLLECTIONVIEWHGIMP_H #define C_CMPXCOLLECTIONVIEWHGIMP_H +//Version Information +#define MUSIC_PLAYER_VERSION_MAJOR 16 //Road Runner Music Player +#define MUSIC_PLAYER_VERSION_MINOR 10 //year 2010 +#define MUSIC_PLAYER_VERSION_WEEK 11 //Week Number + // INCLUDES #include #include @@ -64,6 +69,7 @@ class MMPXPlayerManager; class MMPXViewUtility; class MProfileEngine; +class CRepository; // CLASS DECLARATION /** @@ -868,6 +874,18 @@ void OpenGenreL(); void OpenPodcastsL(); + /* + * Display information about MusicPlayer version. + */ + void DisplayAboutDlgL() const; + + /* + * Internal functions to show the Educating user URI. + */ + void EducatingUserDialog(); + TBool NeedToShowEducatingDialog(); + void LaunchEducatingURL(); + static TInt LinkCallback(TAny* aPtr); private: // Data @@ -981,6 +999,9 @@ TInt iOperatorMusicStoreType; TInt iMusicStoreWebPage; HBufC16* iOperatorMusicStoreURI; + HBufC16* iEducateUserURI; + TInt iEducatingPopupState ; + TBool iPopuponRefresh; // Wait note for delete CAknWaitDialog* iWaitDialog; @@ -991,6 +1012,7 @@ TBool iMarkedAll; TBool iFirstIncrementalBatch; CMPXMedia *iStoredAlbum; // owned + CRepository *iRepository; //owned TBool iDialogDismissed; HBufC* iTitleWait; // Owned diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/collectionviewhg/loc/mpxcollectionviewhg.loc --- a/mpxplugins/viewplugins/views/collectionviewhg/loc/mpxcollectionviewhg.loc Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/collectionviewhg/loc/mpxcollectionviewhg.loc Wed Apr 14 15:54:18 2010 +0300 @@ -574,8 +574,14 @@ // #define qtn_mus_mediawall_title_shuffle_all "Shuffle" +// d:Text for softkey option play. +// l:control_pane_t1/opt7 +// r:9.2 +// +#define qtn_mus_sk1_play "Play" + // d:Text shown if there is no content to display for Artists & Albums. -// l:main_pane_empty_t1 +// l:main_pane_empty_t1/opt2 // r:5.2 // #define qtn_vmp_no_albums "(no albums)" @@ -624,7 +630,7 @@ #define qtn_mus_songs_artist_unknown "Unknown" // d:Text shown when there is no content to display in tracks level view -// l:main_pane_empty_t1 +// l:main_pane_empty_t1/opt2 // r:5.2 // #define qtn_vmp_no_songs "(no songs)" @@ -694,4 +700,16 @@ // #define qtn_mus_genre_unknown "Unknown" +// d:Text for softkey option Shuffle +// l:control_pane_t1/opt7 +// r:5.2 +// +#define qtn_mus_softkey_shuffle "Shuffle" + +// d:Text shown when there is no content to display in genre view +// l:main_pane_empty_t1/opt2 +// r:5.2 +// +#define qtn_vmp_no_genres "(no genres)" + // End of File diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgcontainer.cpp --- a/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgcontainer.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgcontainer.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -290,7 +290,12 @@ TTypeUid::Ptr CMPXCollectionViewHgContainer::MopSupplyObject( TTypeUid aId ) { MPX_FUNC( "CMPXCollectionViewHgContainer::MopSupplyObject" ); - return MAknsControlContext::SupplyMopObject(aId, iBgContext ); + if( aId.iUid == MAknsControlContext::ETypeId && iBgContext ) + { + return MAknsControlContext::SupplyMopObject(aId, iBgContext ); + } + + return CCoeControl::MopSupplyObject(aId); } // --------------------------------------------------------------------------- @@ -742,29 +747,27 @@ } else if ( aType == KEikDynamicLayoutVariantSwitch ) { + iLayoutSwitch = ETrue; + if ( iCurrentViewType == EMPXViewMediawall ) { if ( iDialog ) { iDialog->CancelPopup(); } + // make cba visible so that visible screen area is calculated correctly in list view + if( iCbaHandler ) + iCbaHandler->ChangeCbaVisibility( ETrue ); } iSetEmptyTextNeeded = ETrue; - // Coe env is in middle if notifying observers (controls). - // Just to be safe, lets just create a small async callback and then - // call HandleLbxItemAdditionL - if( !iAsyncCallBack->IsActive() ) - { - iAsyncCallBack->CallBack(); - } - - iLayoutSwitch = ETrue; - TRect clientRect = ((CAknView*)iView)->ClientRect(); SetRect( clientRect ); iBgContext->SetRect(((CAknAppUi*)iCoeEnv->AppUi())->ApplicationRect()); + + // call HandleLbxItemAdditionL + HandleLbxItemAdditionL(); } ); if(iMediaWall) @@ -1081,9 +1084,7 @@ // David: This needs to be supported for Mediawall and Tbone if ( iListWidget && iCurrentViewType == EMPXViewList ) { - // aIndex is the song index, so need take "ShuffleAll" item - // into account - iListWidget->SetSelectedIndex( aIndex + iShuffleItem ); + iListWidget->SetSelectedIndex( aIndex ); } } @@ -1469,10 +1470,17 @@ TInt mediaIndex = MediaIndex(iListWidget->SelectedIndex()); mediaIndex = ( mediaIndex >= 0 && (mediaIndex < (mediaCount)) ) ? mediaIndex : (mediaCount - 1); + TInt prevItemCount = iListWidget->ItemCount(); + iListWidget->InitScreenL( clientRect ); iListWidget->Reset(); if ( aCount ) { + // enable scroll buffering now as it has not been enabled when empty list was constructed + if ( !prevItemCount ) + { + iListWidget->EnableScrollBufferL( *this, KMPXListBufferSize, KMPXListBufferSize/4 ); + } iListWidget->ResizeL( aCount ); ProvideDataWithoutThumbnailsL(aMediaArray); iListWidget->SetSelectedIndex( mediaIndex + iShuffleItem ); @@ -1489,10 +1497,16 @@ TInt mediaIndex = MediaIndex(iMediaWall->SelectedIndex()); // Correct the array index if it is out of range - // This case may happen when last album or album beside selected album is deleted - mediaIndex = ( mediaIndex >= 0 && ( mediaIndex < mediaCount ) ) ? mediaIndex : (mediaCount - 1); - - if( iSelectedAlbumIndex != mediaIndex ) + // This case may happen when last album or album beside selected album is deleted + // mediaIndex -1 is valid and it represents shuffle item + + if ( mediaIndex >= mediaCount || mediaIndex < -1) + { + mediaIndex = mediaCount - 1; // last item of the list + } + + //in case of shuffle item is seleted (mediaIndex -1), there is no need to save it. + if( (iSelectedAlbumIndex != mediaIndex) && ( mediaIndex != -1) ) { iSelectedAlbumIndex = mediaIndex; SaveSelectedAlbumItemL( iSelectedAlbumIndex ); @@ -1527,6 +1541,9 @@ if (!((CAknAppUi*)iCoeEnv->AppUi())->StatusPane()->IsVisible()) ((CAknAppUi*)iCoeEnv->AppUi())->StatusPane()->MakeVisible(ETrue); + if( iCbaHandler ) + iCbaHandler->UpdateCba(); + TRect clientRect = ((CAknView*)iView)->ClientRect(); iThumbnailManager->SetSizeL( EAudioListThumbnailSize ); iImageSize = CHgDoubleGraphicListFlat::PreferredImageSize(); @@ -1538,13 +1555,14 @@ aCount, NULL, NULL ); - iListWidget->SetMopParent(this); + iListWidget->SetMenuProviderL(this); iListWidget->SetSelectionObserver(*this); // TODO. check if this is correct for all lists iListWidget->ClearFlags( CHgScroller::EHgScrollerKeyMarkingDisabled ); iListWidget->SetFocus(ETrue); iListWidget->SetScrollBarTypeL( CHgScroller::EHgScrollerLetterStripLite ); iListWidget->DrawableWindow()->SetOrdinalPosition( -1 ); + iListWidget->DrawableWindow()->SetFaded(((CAknAppUi*)iCoeEnv->AppUi())->IsFaded(), RWindowTreeNode::EFadeIncludeChildren); ProvideDataWithoutThumbnailsL(aMediaArray); } else @@ -1563,12 +1581,16 @@ } // TODO. Define here in which views we need to have buffering enabled in the list - if( ( iContext == EContextGroupAlbum || - iContext == EContextGroupArtist || - iContext == EContextGroupSong || - iContext == EContextItemPlaylist ) && ( aCount > 0) ) + if( ( ( iContext == EContextGroupAlbum ) || + ( iContext == EContextGroupArtist ) || + ( iContext == EContextGroupSong ) || + ( iContext == EContextItemGenre ) || + ( iContext == EContextItemPlaylist ) ) && + // Check if the list is empty, Enable scroll buffer won't call requst if list is empty + ( iListWidget->ItemCount() != 0 ) ) { - iListWidget->EnableScrollBufferL(*this, KMPXListBufferSize, KMPXListBufferSize/4); + MPX_DEBUG1("CMPXCollectionViewHgContainer::PrepareListL - EnableScrollBufferL"); + iListWidget->EnableScrollBufferL( *this, KMPXListBufferSize, KMPXListBufferSize/4 ); } else { @@ -1634,7 +1656,7 @@ // Create the list to be used with Media wall view iMwListWidget = CHgSingleTextListWithIcon::NewL(mwListRect, 0, NULL, NULL); - iMwListWidget->SetMopParent(this); + iMwListWidget->SetMenuProviderL(this); iMwListWidget->ClearFlags( CHgScroller::EHgScrollerKeyMarkingDisabled ); iMwListWidget->SetScrollBarTypeL( CHgScroller::EHgScrollerScrollBar ); iMwListWidget->SetSelectionObserver(*this); @@ -1650,7 +1672,7 @@ if ( !iMwListWidget ) { iMwListWidget = CHgSingleTextListWithIcon::NewL(mwListRect, 0, NULL, NULL); - iMwListWidget->SetMopParent(this); + iMwListWidget->SetMenuProviderL(this); iMwListWidget->ClearFlags( CHgScroller::EHgScrollerKeyMarkingDisabled ); iMwListWidget->SetScrollBarTypeL( CHgScroller::EHgScrollerScrollBar ); iMwListWidget->SetSelectionObserver(*this); @@ -1702,6 +1724,8 @@ TRect appRect = ((CAknAppUi*)iCoeEnv->AppUi())->ApplicationRect(); ((CAknAppUi*)iCoeEnv->AppUi())->StatusPane()->MakeVisible(EFalse); iThumbnailManager->SetSizeL( EAudioFullScreenThumbnailSize ); + if( iCbaHandler ) + iCbaHandler->UpdateCba(); // get front rectange from layout TAknLayoutRect frontRect; frontRect.LayoutRect( appRect, AknLayoutScalable_Apps::cf0_flow_pane_g1(0) ); @@ -1731,12 +1755,26 @@ iMediaWall->SetMopParent(this); iMediaWall->SetSelectionObserver(*this); iMediaWall->SetObserver( this ); // softkey visibility event observer - iMediaWall->EnableScrollBufferL( + // Check if the list is empty, Enable scroll buffer won't call requst if list is empty + if( iMediaWall->ItemCount() != 0 ) + { + iMediaWall->EnableScrollBufferL( *this, KMPXListBufferSizeWithMediaWall, KMPXListBufferSizeWithMediaWall / 4); + } + else + { + EndFullScreenAnimation(); + iMediaWall->RefreshScreen( 0 ); + } // We want softkeys to be drawn on top of mediawall, thats we need to manipulate window pos iMediaWall->DrawableWindow()->SetOrdinalPosition( -1 ); + if(((CAknAppUi*)iCoeEnv->AppUi())->IsFaded()) + { + iMediaWall->DrawableWindow()->SetFaded(ETrue, RWindowTreeNode::EFadeIncludeChildren); + iMediaWall->SetFlags( CHgVgMediaWall::EHgVgMediaWallFaded ); + } ProvideDataWithoutThumbnailsMwL(aMediaArray); if( iAlbumIndex == KErrNotFound ) iMediaWall->SetSelectedIndex( iRestoredAlbumIndex + iShuffleItem ); @@ -1750,10 +1788,19 @@ iMediaWall->MakeVisible( ETrue ); iMediaWall->SetFocus( ETrue ); - iMediaWall->EnableScrollBufferL( + // Check if the list is empty, Enable scroll buffer won't call requst if list is empty + if( iMediaWall->ItemCount() != 0 ) + { + iMediaWall->EnableScrollBufferL( *this, KMPXListBufferSizeWithMediaWall, KMPXListBufferSizeWithMediaWall / 4); + } + else + { + EndFullScreenAnimation(); + iMediaWall->RefreshScreen( 0 ); + } if( iAlbumIndex == KErrNotFound ) iMediaWall->SetSelectedIndex( iRestoredAlbumIndex + iShuffleItem ); else @@ -3031,10 +3078,13 @@ } else { - HBufC* unknownText = - StringLoader::LoadLC( R_MPX_COLLECTION_UNKNOWN ); - aVisualItem->SetTitleL( *unknownText ); - CleanupStack::PopAndDestroy( unknownText ); + if ( iContext == EContextGroupGenre ) + { + HBufC* unknownText = + StringLoader::LoadLC( R_MPX_GENRE_UNKNOWN ); + aVisualItem->SetTitleL( *unknownText ); + CleanupStack::PopAndDestroy( unknownText ); + } } } } @@ -3076,67 +3126,27 @@ CMPXMedia* aMedia ) { MPX_FUNC( "CMPXCollectionViewHgContainer::SetDetailCountL" ); - if ( aMedia->IsSupported( KMPXMediaGeneralCount ) ) - { - TInt count( aMedia->ValueTObjectL( KMPXMediaGeneralCount ) ); - -#ifdef HG_MP_LOC_AVAILABLE - - if ( iContext == EContextGroupArtist ) - { - if ( count > 1 ) - { - HBufC* albumsTitle = StringLoader::LoadLC( R_MPX_COLLECTION_DETAILS_NUMBER_OF_SONGS, // mod by anjokela - count ); - TPtr ptr = albumsTitle->Des(); - AknTextUtils::LanguageSpecificNumberConversion( ptr ); - aVisualItem->SetTextL( ptr ); - CleanupStack::PopAndDestroy( albumsTitle ); - } - else - { - aVisualItem->SetTextL( *iSongTitle ); // mod by anjokela - } - } - else - { - if ( count > 1 ) - { - HBufC* songsTitle = StringLoader::LoadLC( R_MPX_COLLECTION_DETAILS_NUMBER_OF_SONGS, count ); - TPtr ptr = songsTitle->Des(); - AknTextUtils::LanguageSpecificNumberConversion( ptr ); - aVisualItem->SetTextL( ptr ); - CleanupStack::PopAndDestroy( songsTitle ); - } - else - { - aVisualItem->SetTextL( *iSongTitle ); - } - } -#else //HG_MP_LOC_AVAILABLE - - TBuf<10> temp; - temp.AppendNum( count ); - AknTextUtils::LanguageSpecificNumberConversion( temp ); - - TBuf detailText; - detailText.Append( temp ); - if ( iContext == EContextGroupPodcast ) - { - detailText.Append( (count > 1 ) ? KEpisodes() : KEpisode() ); - } - else if ( iContext == EContextGroupArtist ) - { - detailText.Append( (count > 1 ) ? KAlbums() : KAlbum() ); - } - else - { - detailText.Append( (count > 1 ) ? KSongs() : KSong() ); - } - aVisualItem->SetTextL( detailText ); -#endif //HG_MP_LOC_AVAILABLE - - } + if ( aMedia->IsSupported( KMPXMediaGeneralCount ) ) + { + TInt count( aMedia->ValueTObjectL( KMPXMediaGeneralCount ) ); + + if ( iContext == EContextGroupGenre ) + { + HBufC* numSongsText = NULL; + if ( count > 1 || count == 0 ) + { + numSongsText = StringLoader::LoadLC( R_MPX_MUSIC_NUM_SONGS, count ); + } + else + { + numSongsText = StringLoader::LoadLC( R_MPX_MUSIC_ONE_SONG ); + } + TPtr ptr = numSongsText->Des(); + AknTextUtils::LanguageSpecificNumberConversion( ptr ); + aVisualItem->SetTextL( ptr ); + CleanupStack::PopAndDestroy( numSongsText ); + } + } } // ----------------------------------------------------------------------------- @@ -3235,39 +3245,26 @@ if ( iContext == EContextGroupPlaylist && aMedia->IsSupported( KMPXMediaGeneralDuration ) && aMedia->IsSupported( KMPXMediaGeneralCount ) ) - { - // AK - Needs to be localized - TBuf detailText; - TInt count( aMedia->ValueTObjectL( KMPXMediaGeneralCount ) ); - TInt duration = aMedia->ValueTObjectL( KMPXMediaGeneralDuration ); - -#ifdef HG_MP_LOC_AVAILABLE + { + TBuf detailText; + TInt count( aMedia->ValueTObjectL( KMPXMediaGeneralCount ) ); + TInt duration = aMedia->ValueTObjectL( KMPXMediaGeneralDuration ); + + UpdateTimeIndicatorsL(detailText, duration); + HBufC* numSongsDurationText = NULL; if ( count > 1 || count == 0 ) { - HBufC* songsTitle = StringLoader::LoadLC( R_MPX_COLLECTION_DETAILS_NUMBER_OF_SONGS, count ); - detailText.Append(*songsTitle); - detailText.Append(KMPXDash); - UpdateTimeIndicatorsL(detailText, duration); - aVisualItem->SetTextL( detailText ); - CleanupStack::PopAndDestroy( songsTitle ); + numSongsDurationText = StringLoader::LoadLC( R_MPX_MUSIC_NUM_SONGS_DURATION, detailText, count ); } else { - detailText.Append(*iSongTitle); - detailText.Append(KMPXDash); - UpdateTimeIndicatorsL(detailText, duration); - aVisualItem->SetTextL( detailText ); - } -#else //HG_MP_LOC_AVAILABLE - TBuf<10> temp; - temp.AppendNum( count ); - AknTextUtils::LanguageSpecificNumberConversion( temp ); - detailText.Append( temp ); - detailText.Append( (count > 1 ) ? KSongsDash() : KSongDash() ); - UpdateTimeIndicatorsL(detailText, duration); - aVisualItem->SetTextL( detailText ); -#endif //HG_MP_LOC_AVAILABLE - } + numSongsDurationText = StringLoader::LoadLC( R_MPX_MUSIC_ONE_SONG_DURATION, detailText ); + } + TPtr ptr = numSongsDurationText->Des(); + AknTextUtils::LanguageSpecificNumberConversion( ptr ); + aVisualItem->SetTextL( ptr ); + CleanupStack::PopAndDestroy( numSongsDurationText ); + } else if ( iContext == EContextItemPodcast && aMedia->IsSupported( KMPXMediaGeneralDuration ) && aMedia->IsSupported( KMPXMediaGeneralSize ) ) @@ -3663,7 +3660,13 @@ MPX_FUNC( "CMPXCollectionViewHgContainer::SetCollectionContextL" ); const CMPXMedia& media = iListBoxArray->ContainerMedia(); - + + if ( NULL == &media ) + { + MPX_DEBUG1( "CMPXCollectionViewHgContainer::SetCollectionContextL NO media"); + User::Leave(KErrNotFound); + } + TMPXGeneralType containerType( EMPXNoType ); if ( media.IsSupported( KMPXMediaGeneralType ) ) { @@ -4478,7 +4481,7 @@ // Trap ExecuteLD to make sure iDialog always get reset. TRAP_IGNORE( play = iDialog->ExecuteLD() ); iDialog = NULL; - if( play ) + if( play && iMediaWall ) { iMediaWall->SetFlags( CHgVgMediaWall::EHgVgMediaWallDrawToWindowGC ); iMediaWall->DrawNow(); @@ -4488,7 +4491,7 @@ // Open the selected song of album UpdatePathAndOpenL(index); } - else + else if( !iLayoutSwitch && iMediaWall ) { // Close mediawall "flip animation" iMediaWall->StartOpeningAnimationL( EFalse ); @@ -4887,13 +4890,39 @@ void CMPXCollectionViewHgContainer::LoadAndSetEmptyTextL() { MPX_FUNC( "CMPXCollectionViewHgContainer::LoadAndSetEmptyTextL" ); - - if ( iContext == EContextGroupAlbum ) + MPX_DEBUG2( "CMPXCollectionViewHgContainer::LoadAndSetEmptyTextL - iContext %d", iContext ); + + TInt resId( 0 ); + + switch ( iContext ) { - HBufC* emptyText = StringLoader::LoadLC( R_MPX_VMP_NO_ALBUMS ); - SetLbxEmptyTextL( *emptyText ); - CleanupStack::PopAndDestroy( emptyText ); + case EContextGroupAlbum: + { + resId = R_MPX_VMP_NO_ALBUMS; + break; + } + case EContextGroupGenre: + case EContextItemGenre: + { + resId = R_MPX_VMP_NO_GENRES; + break; + } + case EContextItemSong: + case EContextGroupSong: + case EContextItemPlaylist: + { + resId = R_MPX_VMP_NO_SONGS; + break; + } + default: + { + MPX_DEBUG1( "CMPXCollectionViewHgContainer::LoadAndSetEmptyTextL - some empty text is missing" ); + return; + } } + HBufC* emptyText = StringLoader::LoadLC( resId ); + SetLbxEmptyTextL( *emptyText ); + CleanupStack::PopAndDestroy( emptyText ); } // --------------------------------------------------------------------------- diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgimp.cpp --- a/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgimp.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgimp.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -42,6 +42,9 @@ #ifdef RD_MULTIPLE_DRIVE #include #endif //RD_MULTIPLE_DRIVE +#include +#include +#include #include #include //Copy to remote feature @@ -150,7 +153,8 @@ const TUint32 KOperatorMusicStoreJavaName = 0x00000008; const TUint32 KOperatorMusicStoreWebPage = 0x00000009; const TUint32 KOperatorMusicStoreURI = 0x0000000A; - +const TUint32 KEducatingUserURI = 0x0000000D; +const TUint32 KEducatingPopupState = 0x0000000E; const TInt KJavaMusicShopType( 1 ); const TInt KUIDMaxLength = 8; @@ -308,6 +312,14 @@ { delete iOperatorMusicStoreURI; } + if ( iEducateUserURI ) + { + delete iEducateUserURI; + } + if (iRepository) + { + delete iRepository; + } if (iStoredAlbum) delete iStoredAlbum; } @@ -519,8 +531,15 @@ #endif //BACKSTEPPING_INCLUDED iIsAddingToPlaylist = EFalse; - - // Get music store information from cenrep + + //Get educating user URI and popup state from cenrep + iEducateUserURI = HBufC16::NewL( KMPXMaxHistoryLength ); + TPtr16 educatingURI = iEducateUserURI->Des(); + iRepository = CRepository::NewL( KCRUidMPXMPSettings ); + iRepository->Get( KEducatingUserURI, educatingURI ); + iRepository->Get( KEducatingPopupState, iEducatingPopupState); + + // Get music store information from cenrep // TBuf8< KUIDMaxLength > operatorMusicStoreUID; @@ -737,6 +756,9 @@ } iConfirmationDlg = NULL; CleanupStack::PopAndDestroy( waitNoteText ); + + // delete songs list to update T-bone view after deleting a song + album->Delete( KMPXMediaArrayContents ); } } CleanupStack::PopAndDestroy( path ); @@ -4042,6 +4064,21 @@ { iCollectionCacheReady = EFalse; } + if(type == EMcMsgRefreshEnd) + { + TInt songAdded = aMessage.ValueTObjectL(KMPXMessageGeneralData); + MPX_DEBUG2("EMcMsgRefreshEnd, songAdded = %d", songAdded); + if (iPopuponRefresh) + { + iPopuponRefresh =(songAdded > KErrNone)? ETrue:EFalse; + } + + if( NeedToShowEducatingDialog()) + { + EducatingUserDialog(); + iPopuponRefresh = EFalse; + } + } // USB flags // CEikMenuBar* menuBar( MenuBar() ); @@ -4428,13 +4465,7 @@ case EMPXGenre: { // genre view - resId = R_MPX_COLLECTION_GENRE_LBX_EMPTYTEXT; - break; - } - case EMPXComposer: - { - // composer view - resId = R_MPX_COLLECTION_COMPOSER_LBX_EMPTYTEXT; + resId = R_MPX_VMP_NO_GENRES; break; } case EMPXPlaylist: @@ -5693,6 +5724,11 @@ AppUi()->HandleCommandL( EMPXCmdSaveAndReopen ); break; } + case EMPXCmdAbout: + { + DisplayAboutDlgL(); + break; + } case EAknCmdExit: case EAknSoftkeyExit: { @@ -5865,6 +5901,7 @@ // StartWaitNoteL( EMPXRefreshingNote ); iPlaybackUtility->CommandL( EPbCmdStop ); + iPopuponRefresh = ETrue; break; } #endif @@ -6188,7 +6225,8 @@ aMenuPane->SetItemDimmed( EMPXCmdMusicLibraryDetails, ETrue); aMenuPane->SetItemDimmed( EMPXCmdGoToMusicShop, ETrue ); aMenuPane->SetItemDimmed( EMPXCmdGoToMultipleMusicShop, ETrue); - } + aMenuPane->SetItemDimmed( EMPXCmdAbout, ETrue); + } break; } case EMPXAlbum: @@ -6205,6 +6243,7 @@ aMenuPane->SetItemDimmed( EMPXCmdGoToGenre, ETrue ); aMenuPane->SetItemDimmed( EMPXCmdRefreshLibrary, ETrue ); aMenuPane->SetItemDimmed( EMPXCmdMusicLibraryDetails, ETrue); + aMenuPane->SetItemDimmed( EMPXCmdAbout, ETrue); } break; } @@ -6223,6 +6262,7 @@ aMenuPane->SetItemDimmed( EMPXCmdMusicLibraryDetails, ETrue); aMenuPane->SetItemDimmed( EMPXCmdGoToMusicShop, ETrue ); aMenuPane->SetItemDimmed( EMPXCmdGoToMultipleMusicShop, ETrue); + aMenuPane->SetItemDimmed( EMPXCmdAbout, ETrue); } break; @@ -6258,35 +6298,24 @@ { HandleInitMusicMenuPaneL(aMenuPane); aMenuPane->SetItemDimmed( EMPXCmdGoToNowPlaying, NowPlayingOptionVisibilityL() ); + aMenuPane->SetItemDimmed( EMPXCmdFind, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdUpnpPlayVia, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdUPnPAiwCmdCopyToExternalCriteria, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdCreatePlaylist, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue ); + if ( isListEmpty ) { - aMenuPane->SetItemDimmed( EMPXCmdFind, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdUpnpPlayVia, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdUPnPAiwCmdCopyToExternalCriteria, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdCreatePlaylist, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue ); aMenuPane->SetItemDimmed( EMPXCmdGoToMultipleMusicShop, ETrue); } else { - aMenuPane->SetItemDimmed( EMPXCmdFind, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdUpnpPlayVia, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdUPnPAiwCmdCopyToExternalCriteria, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdCreatePlaylist, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue ); - TBool landscapeOrientation = Layout_Meta_Data::IsLandscapeOrientation(); if ( !landscapeOrientation ) { @@ -6349,7 +6378,15 @@ aMenuPane->SetItemDimmed( EMPXCmdPlaylistDetails, ETrue ); if( !iContainer->IsTBoneView()&& (iContainer->CurrentLbxItemIndex() > KErrNotFound)) { - aMenuPane->SetItemDimmed( EMPXCmdFindInMusicShop, !iUsingNokiaService ); + CMPXCollectionViewListBoxArray* array = + static_cast( + iContainer->ListBoxArray() ); + const CMPXMedia& media = array->MediaL( iContainer->CurrentLbxItemIndex() ); + const TDesC& title( media.ValueText( KMPXMediaGeneralTitle ) ); + if( title.Length() > 0) + { + aMenuPane->SetItemDimmed( EMPXCmdFindInMusicShop, !iUsingNokiaService ); + } } break; } @@ -6617,35 +6654,24 @@ { HandleInitMusicMenuPaneL(aMenuPane); aMenuPane->SetItemDimmed( EMPXCmdGoToNowPlaying, NowPlayingOptionVisibilityL() ); + aMenuPane->SetItemDimmed( EMPXCmdFind, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdUpnpPlayVia, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdUPnPAiwCmdCopyToExternalCriteria, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdCreatePlaylist, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); + aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue ); + if ( isListEmpty ) { - aMenuPane->SetItemDimmed( EMPXCmdFind, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdUpnpPlayVia, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdUPnPAiwCmdCopyToExternalCriteria, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdCreatePlaylist, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue ); aMenuPane->SetItemDimmed( EMPXCmdGoToMultipleMusicShop, ETrue); } else { - aMenuPane->SetItemDimmed( EMPXCmdFind, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdUpnpPlayVia, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdUPnPAiwCmdCopyToExternalCriteria, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdCreatePlaylist, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); - aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue ); - TInt usbUnblockingStatus; RProperty::Get( KMPXViewPSUid, KMPXUSBUnblockingPSStatus, @@ -7409,11 +7435,17 @@ if ( iMusicStoreUID != 0) { - TApaTaskList tasList( iCoeEnv->WsSession() ); - TApaTask task = tasList.FindApp( TUid::Uid(iMusicStoreUID) ); + TApaTaskList taskList( iCoeEnv->WsSession() ); + TApaTask task = taskList.FindApp( TUid::Uid(iMusicStoreUID) ); if ( task.Exists() ) { + GfxTransEffect::BeginFullScreen( + AknTransEffect::EApplicationStart, + TRect(), + AknTransEffect::EParameterType, + AknTransEffect::GfxTransParam( TUid::Uid(iMusicStoreUID), + AknTransEffect::TParameter::EActivateExplicitContinue )); task.BringToForeground(); } else @@ -8020,11 +8052,17 @@ { MPX_FUNC( "CMPXCollectionViewHgImp::LaunchMusicShopL" ); - TApaTaskList tasList( iCoeEnv->WsSession() ); - TApaTask task = tasList.FindApp( TUid::Uid(iOperatorNativeMusicStoreUID) ); + TApaTaskList taskList( iCoeEnv->WsSession() ); + TApaTask task = taskList.FindApp( TUid::Uid(iOperatorNativeMusicStoreUID) ); if ( task.Exists() ) { + GfxTransEffect::BeginFullScreen( + AknTransEffect::EApplicationStart, + TRect(), + AknTransEffect::EParameterType, + AknTransEffect::GfxTransParam( TUid::Uid(iOperatorNativeMusicStoreUID), + AknTransEffect::TParameter::EActivateExplicitContinue )); task.BringToForeground(); } else @@ -8054,6 +8092,12 @@ if ( task.Exists() ) { + GfxTransEffect::BeginFullScreen( + AknTransEffect::EApplicationStart, + TRect(), + AknTransEffect::EParameterType, + AknTransEffect::GfxTransParam( id, + AknTransEffect::TParameter::EActivateExplicitContinue )); task.BringToForeground(); if ( iOperatorMusicStoreURI->Length() != NULL ) { @@ -8255,4 +8299,127 @@ return iStoredAlbum; } +// ----------------------------------------------------------------------------- +// CMPXCollectionViewHgImp::DisplayAboutDlgL() +// ----------------------------------------------------------------------------- +// +void CMPXCollectionViewHgImp::DisplayAboutDlgL() const + { + TBuf<32> version; + version.Format(_L("%d.%d.%d"), MUSIC_PLAYER_VERSION_MAJOR, MUSIC_PLAYER_VERSION_MINOR, MUSIC_PLAYER_VERSION_WEEK); + HBufC* aboutContent = StringLoader::LoadL(R_QTN_MUS_ABOUT_VERSION ,version); + HBufC* aboutTitle = StringLoader::LoadLC(R_QTN_MUS_ABOUT_NOTE); + CleanupStack::PushL(aboutContent ); + CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(*aboutContent ); + CleanupStack::PushL(dlg); + dlg->SetHeaderTextL(*aboutTitle ); + dlg->ExecuteLD(R_MPX_ABOUT_DIALOG); + CleanupStack::Pop(dlg); + CleanupStack::PopAndDestroy(2,aboutTitle ); + } + +// ----------------------------------------------------------------------------- +// CMPXCollectionViewHgImp::EducatingUserDialog +// Display Educating User Dialog +// ----------------------------------------------------------------------------- +// +void CMPXCollectionViewHgImp::EducatingUserDialog () + { + MPX_FUNC( "CMPXCollectionViewHgImp::EducatingUserDialog " ); + CAknMessageQueryDialog* query = new (ELeave) CAknMessageQueryDialog( + CAknMessageQueryDialog::ENoTone); + CleanupStack::PushL(query); + + HBufC* message= HBufC::NewLC(500); + + message->Des().Append(_L("")); + message->Des().Append(iEducateUserURI->Des()); + message->Des().Append(_L("")); + HBufC* promptTxt = StringLoader::LoadLC( + R_QTN_NMP_NOTE_EDUCATING_THE_USER,message->Des() ); + query->SetMessageTextL( promptTxt->Des()); + TCallBack cb( CMPXCollectionViewHgImp::LinkCallback, this ); + query->SetLink( cb ); + + CleanupStack::PopAndDestroy( promptTxt ); + CleanupStack::PopAndDestroy( message ); + CleanupStack::Pop( query ); + + if(query->ExecuteLD( R_MPX_CUI_EDUCATING_THE_USER_QUERY )) + { + iRepository->Set( KEducatingPopupState, EMPXShowEducatingPopup ); + iEducatingPopupState = EMPXShowEducatingPopup; + } + else + { + iRepository->Set( KEducatingPopupState, EMPXDonotShowEducatingPopup ); + iEducatingPopupState = EMPXDonotShowEducatingPopup; + } + } + +// ----------------------------------------------------------------------------- +// CMPXCollectionViewHgImp::LaunchEducatingURL +// Launch Educating URL +// ----------------------------------------------------------------------------- +// +void CMPXCollectionViewHgImp::LaunchEducatingURL() + { + MPX_FUNC( "CMPXCollectionViewHgImp::LaunchEducatingURL" ); + const TUid KOSSBrowserUidValue = {0x10008D39}; // 0x1020724D for S60 3rd Ed + TUid id(KOSSBrowserUidValue); + TApaTaskList taskList(CEikonEnv::Static()->WsSession()); + TApaTask task = taskList.FindApp(id); + + if ( task.Exists() ) + { + task.BringToForeground(); + if ( iEducateUserURI->Length() != NULL ) + { + TBuf8 tempUrl; + tempUrl.Copy(iEducateUserURI->Des()); + task.SendMessage(TUid::Uid(0), tempUrl); + } + } + else + { + RApaLsSession apaLsSession; + if ( KErrNone == apaLsSession.Connect() ) + { + CleanupClosePushL( apaLsSession ); + TThreadId threadId; + + apaLsSession.StartDocument(*iEducateUserURI, KOSSBrowserUidValue, threadId); + CleanupStack::PopAndDestroy(&apaLsSession); + } + } + } + +// ----------------------------------------------------------------------------- +// CMPXCollectionViewHgImp::LinkCallback +// Call back for Educating User URL +// ----------------------------------------------------------------------------- +// +TInt CMPXCollectionViewHgImp::LinkCallback(TAny* aPtr) + { + CMPXCollectionViewHgImp* ptr = static_cast( aPtr ); + TRAPD( err, ptr->LaunchEducatingURL() ); + MPX_DEBUG2( "CMPXCollectionViewHgImp::LinkCallback()-err:%d", err ); + return err; + } + +// ----------------------------------------------------------------------------- +// CMPXCollectionViewHgImp::NeedToShowEducatingDialog +// ----------------------------------------------------------------------------- +// +TBool CMPXCollectionViewHgImp::NeedToShowEducatingDialog() + { + if(iEducateUserURI && iCollectionReady && //If educating user URI is in cenrep and Collection is Ready + (iEducatingPopupState == EMPXInitialEducatingPopup || //If Music Player is launched first time after phone flash + (iEducatingPopupState == EMPXShowEducatingPopup && iPopuponRefresh))) //If user pressed yes on "Remind me later" and its manual refresh with some song added + { + return ETrue; + } + else + return EFalse; + } // End of File diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewimp.cpp --- a/mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewimp.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewimp.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -107,6 +107,8 @@ #include #include #include "mpxviewprivatepskeys.h" +#include +#include // CONSTANTS const TInt KMPXOneSecInMilliSecs( 1000 ); @@ -1859,6 +1861,12 @@ TApaTask task = tasList.FindApp( KFmTxAppUid ); if ( task.Exists() ) { + GfxTransEffect::BeginFullScreen( + AknTransEffect::EApplicationStart, + TRect(), + AknTransEffect::EParameterType, + AknTransEffect::GfxTransParam( KFmTxAppUid, + AknTransEffect::TParameter::EActivateExplicitContinue )); task.BringToForeground(); } else @@ -4061,26 +4069,19 @@ // EXPORT_C void CMPXCommonPlaybackViewImp::LaunchFileDetailsDialogL() { - MMPXSource* s = iPlaybackUtility->Source(); - TInt count (0); - TInt index (0); - if ( s ) + MPX_FUNC("CMPXCommonPlaybackViewImp::LaunchFileDetailsDialogL"); + + // Activate Metadata dialog via View Framework + CAknToolbar* toolbar = Toolbar(); + if ( toolbar ) { - CMPXCollectionPlaylist* playlist = s->PlaylistL(); - if ( playlist ) - { - count = playlist->Count(); - index = playlist->PathIndex( playlist->Index() ); - delete playlist; - playlist = NULL; - } + toolbar->SetToolbarVisibility(EFalse); } - HBufC* buf = HBufC::NewLC( 5 ); // magic number, array granularity - buf->Des().AppendNum( index); - - // Activate Metadata dialog via View Framework - iViewUtility->ActivateViewL( TUid::Uid(KMPXPluginTypeMetadataEditorUid), buf ); - CleanupStack::PopAndDestroy(buf); + iViewUtility->ActivateViewL( TUid::Uid(KMPXPluginTypeMetadataEditorUid) ); + if ( toolbar ) + { + toolbar->SetToolbarVisibility(ETrue); + } } // End of File diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/inc/mpxcommonplaybackview.hrh --- a/mpxplugins/viewplugins/views/inc/mpxcommonplaybackview.hrh Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/inc/mpxcommonplaybackview.hrh Wed Apr 14 15:54:18 2010 +0300 @@ -25,7 +25,7 @@ /** Command ID's. */ enum TMPXPlaybackViewCommandIds { - EMPXPbvCmdPlay = 0x1000, + EMPXPbvCmdPlay = 0x2500, EMPXPbvCmdPause, EMPXPbvCmdStop, EMPXPbvCmdPlayPause, diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/metadataeditordialog/group/mpxmetadataeditordialog.mmp --- a/mpxplugins/viewplugins/views/metadataeditordialog/group/mpxmetadataeditordialog.mmp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/metadataeditordialog/group/mpxmetadataeditordialog.mmp Wed Apr 14 15:54:18 2010 +0300 @@ -74,6 +74,7 @@ LIBRARY mpxcommonui.lib LIBRARY mpxcommon.lib LIBRARY centralrepository.lib +LIBRARY mpxplaybackutility.lib LIBRARY drmuihandling.lib diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/metadataeditordialog/src/mpxmetadataeditordialog.cpp --- a/mpxplugins/viewplugins/views/metadataeditordialog/src/mpxmetadataeditordialog.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/metadataeditordialog/src/mpxmetadataeditordialog.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -75,7 +75,7 @@ #include "mpxmetadataeditordialog.hlp.hrh" #include "mpxlog.h" #include - +#include // CONSTANTS const TInt KMPXFileDetailsMaxTitleLen = 32; @@ -489,7 +489,7 @@ iCollectionUtility = MMPXCollectionUtility::NewL( this, KMcModeDefault ); iCommonUiHelper = CMPXCommonUiHelper::NewL(); - + CAknForm::ConstructL( R_MPX_CUI_SONG_DETAILS_MENUBAR ); iCurrentLibrary = EMPXMetadataEditorDlgCollection; @@ -2455,10 +2455,11 @@ KMPXSongDetailsYearMin, KMPXSongDetailsYearMax ); // Get media property for the current song - CMPXCollectionPath* cpath = iCollectionUtility->Collection().PathL(); - CleanupStack::PushL( cpath ); - if ( iParam ) + + if ( iParam ) // Dialog launched from CollectionView { + CMPXCollectionPath* cpath = iCollectionUtility->Collection().PathL(); + CleanupStack::PushL( cpath ); TLex yearLex( iParam->Des() ); TInt lexToInt = NULL; if ( yearLex.Val( lexToInt ) == KErrNone ) @@ -2479,8 +2480,33 @@ iCollectionUtility->Collection().MediaL( *cpath, attrs.Array() ); CleanupStack::PopAndDestroy( &attrs ); } + CleanupStack::PopAndDestroy( cpath ); } - CleanupStack::PopAndDestroy( cpath ); + else // Dialog launched from NowPlayingView + { + // Get the playback utility instance from engine. + MMPXPlaybackUtility* playbackUtility = MMPXPlaybackUtility::UtilityL( KPbModeDefault ); + MMPXSource* s = playbackUtility->Source(); + if ( s ) + { + RArray attrs; + CleanupClosePushL(attrs); + attrs.Append( KMPXMediaGeneralAll ); + attrs.Append( KMPXMediaAudioAudioAll ); + attrs.Append( KMPXMediaMusicAll ); + attrs.Append( KMPXMediaDrmProtected ); + if ( iCurrentLibrary == EMPXMetadataEditorDlgPodcast ) + { + attrs.Append( + TMPXAttribute( KMPXMediaIdPodcast, EMPXMediaPodcastAll ) ); + } + iCurrentMediaLOp = EMPXMetadataEditorGetSongInfo; + s->MediaL(attrs.Array(), *this); + CleanupStack::PopAndDestroy( &attrs ); + } + playbackUtility->Close(); + } + // Podcasting is enabled if ( !iDisablePodcasting ) @@ -3147,4 +3173,47 @@ CleanupStack::PopAndDestroy( &drmFile ); CleanupStack::PopAndDestroy( &fs ); } + +// --------------------------------------------------------------------------- +// From MMPXPlaybackCallback +// Handle playback property. +// --------------------------------------------------------------------------- +// +void CMPXMetadataEditorDialog::HandlePropertyL( + TMPXPlaybackProperty aProperty, + TInt aValue, + TInt aError ) + { + MPX_FUNC( "CMPXMetadataEditorDialog::HandleSubPlayerNamesL" ); + } + +// --------------------------------------------------------------------------- +// From MMPXPlaybackCallback +// Method is called continously until aComplete=ETrue, signifying that +// it is done and there will be no more callbacks +// Only new items are passed each time +// --------------------------------------------------------------------------- +// +void CMPXMetadataEditorDialog::HandleSubPlayerNamesL( + TUid /* aPlayer */, + const MDesCArray* /* aSubPlayers */, + TBool /* aComplete */, + TInt /* aError */ ) + { + MPX_FUNC( "CMPXMetadataEditorDialog::HandleSubPlayerNamesL" ); + } + +// --------------------------------------------------------------------------- +// From MMPXPlaybackCallback +// Handle media properties. +// Notes: The client is responsible for delete the object of aMedia. +// --------------------------------------------------------------------------- +// +void CMPXMetadataEditorDialog::HandleMediaL( + const CMPXMedia& aMedia, + TInt aError ) + { + MPX_FUNC( "CMPXMetadataEditorDialog::HandleMediaL" ); + TRAP_IGNORE( DoHandleMediaL( aMedia, aError ) ); + } // End of File diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/podcastview/data/mpxpodcastcollectionview.rss --- a/mpxplugins/viewplugins/views/podcastview/data/mpxpodcastcollectionview.rss Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/podcastview/data/mpxpodcastcollectionview.rss Wed Apr 14 15:54:18 2010 +0300 @@ -887,14 +887,14 @@ //------------------------------------------------------------------------------ -// r_mpx_progress_note -// Generic Progress note. +// r_mpx_delete_wait_note +// Generic Wait note. //------------------------------------------------------------------------------ // -RESOURCE DIALOG r_mpx_progress_note +RESOURCE DIALOG r_mpx_delete_wait_note { - flags = EAknProgressNoteFlags; - buttons = R_AVKON_SOFTKEYS_CANCEL; + flags = EAknWaitNoteFlags; + buttons = R_AVKON_SOFTKEYS_EMPTY; items = { DLG_LINE @@ -903,7 +903,8 @@ id = 0x1000; control = AVKON_NOTE { - layout = EProgressLayout; + layout = EWaitLayout; + animation = R_QGN_GRAF_WAIT_BAR_ANIM; }; } }; diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/podcastview/inc/mpxpodcastcollectionviewimp.h --- a/mpxplugins/viewplugins/views/podcastview/inc/mpxpodcastcollectionviewimp.h Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/podcastview/inc/mpxpodcastcollectionviewimp.h Wed Apr 14 15:54:18 2010 +0300 @@ -24,7 +24,6 @@ // INCLUDES #include #include -#include // MProgressDialogCallback #include #include #include @@ -154,17 +153,16 @@ void UpdateOptionMenuL(); /** - * Start either the delete progress note + * Start either the delete wait note */ - void StartProgressNoteL(); + void StartDeleteWaitNoteL(); /** - * Updates the progress note text and progress bar + * Updates the delete wait note text * - * @param aProgress Indicates the portion of the process completed - * @param aProgressText Text to be displayed on the progress note + * @param aDeleteText Text to be displayed on the delete wait note */ - void UpdateProcessL(TInt aProgress,const TDesC& aProgressText); + void UpdateProcessL(const TDesC& aDeleteNoteText); /** * Updates the copy to remote menu attachment @@ -678,9 +676,8 @@ TBool iUpnpFrameworkSupport; TMPXItemId iSelectedItem; - // Progress note for delete - CAknProgressDialog* iProgressDialog; - CEikProgressInfo* iProgressInfo; + // Wait note for delete + CAknWaitDialog* iWaitDialog; #ifdef UPNP_INCLUDED CUpnpCopyCommand* iUpnpCopyCommand; #endif diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/podcastview/src/mpxpodcastcollectionviewimp.cpp --- a/mpxplugins/viewplugins/views/podcastview/src/mpxpodcastcollectionviewimp.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/podcastview/src/mpxpodcastcollectionviewimp.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -125,7 +125,6 @@ // MACROS _LIT(KMPXCollDetailsItemsFormat, "%S\t%S"); -const TInt KProgressBarMaxValue = 100; // Max Value for the Progress Info bar #ifdef __ENABLE_PODCAST_IN_MUSIC_MENU #define KMusicCollectionUid 0x101FFC3A #endif @@ -373,9 +372,9 @@ if (confirmationDlg->ExecuteLD(R_MPX_CUI_DELETE_CONFIRMATION_QUERY)) { HandleCommandL( EMPXCmdIgnoreExternalCommand ); - StartProgressNoteL(); + StartDeleteWaitNoteL(); TPtr buf = waitNoteText->Des(); - UpdateProcessL(0, buf); + UpdateProcessL(buf); iCollectionUiHelper->DeleteL(*path, this); iIsDeleting = ETrue; @@ -884,31 +883,28 @@ } // --------------------------------------------------------------------------- -// Start a Progress note +// Start a delete wait note // --------------------------------------------------------------------------- // -void CMPXPodcastCollectionViewImp::StartProgressNoteL() +void CMPXPodcastCollectionViewImp::StartDeleteWaitNoteL() { - iProgressDialog = new (ELeave) CAknProgressDialog( - (REINTERPRET_CAST(CEikDialog**, &iProgressDialog)), + iWaitDialog = new (ELeave) CAknWaitDialog( + (REINTERPRET_CAST(CEikDialog**, &iWaitDialog)), ETrue); - iProgressDialog->PrepareLC(R_MPX_PROGRESS_NOTE); - iProgressInfo = iProgressDialog->GetProgressInfoL(); - iProgressDialog->SetCallback(this); - iProgressDialog->RunLD(); - iProgressInfo->SetFinalValue(KProgressBarMaxValue); + iWaitDialog->PrepareLC(R_MPX_DELETE_WAIT_NOTE); + iWaitDialog->SetCallback(this); + iWaitDialog->RunLD(); } // --------------------------------------------------------------------------- -// Update the Progress note +// Update the delete wait note // --------------------------------------------------------------------------- // -void CMPXPodcastCollectionViewImp::UpdateProcessL(TInt aProgress,const TDesC& aProgressText) +void CMPXPodcastCollectionViewImp::UpdateProcessL(const TDesC& aDeleteNoteText) { - if(iProgressDialog) + if(iWaitDialog) { - iProgressDialog->SetTextL(aProgressText); - iProgressInfo->SetAndDraw(aProgress); + iWaitDialog->SetTextL(aDeleteNoteText); } } @@ -2411,9 +2407,9 @@ iCommonUiHelper->DismissWaitNoteL(); HandleCommandL( EMPXCmdHandleExternalCommand ); } - if (iProgressDialog) + if (iWaitDialog) { - iProgressDialog->ProcessFinishedL(); + iWaitDialog->ProcessFinishedL(); } if (iIsDeleting) { @@ -2801,9 +2797,9 @@ { // nothing else to delete iIsDeleting = EFalse; - if (iProgressDialog) + if (iWaitDialog) { - iProgressDialog->ProcessFinishedL(); + iWaitDialog->ProcessFinishedL(); } HandleCommandL( EMPXCmdHandleExternalCommand ); } @@ -2938,9 +2934,9 @@ if(aErr == KErrInUse) { iIsDeleting = EFalse; - if (iProgressDialog) + if (iWaitDialog) { - iProgressDialog->ProcessFinishedL(); + iWaitDialog->ProcessFinishedL(); } HandleCommandL( EMPXCmdHandleExternalCommand ); aErr = KErrNone; //handled here @@ -2966,9 +2962,9 @@ iIsDeleting = EFalse; if(!iIsWaitNoteCanceled) { - if (iProgressDialog) + if (iWaitDialog) { - iProgressDialog->ProcessFinishedL(); + iWaitDialog->ProcessFinishedL(); } HandleCommandL( EMPXCmdHandleExternalCommand ); iIsWaitNoteCanceled = EFalse; @@ -2984,28 +2980,6 @@ iCollectionUtility->Collection().OpenL(); break; } - case EDeleteStatusOp: - { - if ( aArgument ) - { - CMPXMedia* media = (CMPXMedia*)aArgument; - CleanupStack::PushL( media ); - if ( media->IsSupported( KMPXMediaGeneralCount ) ) - { - TInt deletePercent = media->ValueTObjectL( KMPXMediaGeneralCount ); - MPX_DEBUG2( "CMPXCollectionViewImp::HandleOperationCompleteL % Files Deleted: %d", deletePercent ); - // update WaitNote dialog. - HBufC* string = StringLoader::LoadLC(R_MPX_QTN_NMP_DEL_BATCH_SONGS_WAIT_NOTE, deletePercent); - TPtr buf = string->Des(); - - UpdateProcessL(deletePercent, buf); - CleanupStack::PopAndDestroy( string ); - } - CleanupStack::PopAndDestroy( media ); - aArgument = NULL; - } - break; - } case ERenameOp: // fall through case ESetOp: case EAddOp: diff -r c8156a91d13c -r c54d95799c80 mpxplugins/viewplugins/views/waitnotedialog/src/mpxscanningdialog.cpp --- a/mpxplugins/viewplugins/views/waitnotedialog/src/mpxscanningdialog.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/mpxplugins/viewplugins/views/waitnotedialog/src/mpxscanningdialog.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -347,19 +347,6 @@ switch ( iWaitNoteType ) { case EMPXScanningNote: - { - if ( iTotalNewTracks || ( iNumItemsAdded != iInitialCount ) ) - { - isCollectionDBChanged = ETrue; - iNumItemsAdded = songTotal ; - } - else - { - isCollectionDBChanged = EFalse; - } - break; - } - case EMPXOpeningNote: case EMPXRefreshingNote: case EMPXCorruptScanningNote: @@ -447,8 +434,8 @@ { iNumItemsAdded++; iTotalNewTracks++; - // Update wait note text if refreshing - if( iWaitNoteType == EMPXRefreshingNote && + // Update wait note text if refreshing or scaning + if( iWaitNoteType == EMPXRefreshingNote || iWaitNoteType == EMPXScanningNote || iWaitNoteType == EMPXCorruptScanningNote && iScanningError == KErrNone ) { HBufC* text = StringLoader::LoadLC( R_MPX_REFRESHING_DB_TXT, diff -r c8156a91d13c -r c54d95799c80 musichomescreen_multiview/musiccontentpublisher/src/musiccontentpublisher.cpp --- a/musichomescreen_multiview/musiccontentpublisher/src/musiccontentpublisher.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/musichomescreen_multiview/musiccontentpublisher/src/musiccontentpublisher.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -157,23 +157,24 @@ MPX_DEBUG1("CMusicContentPublisher::ConstructL subscribing to observer"); + // Observer must be registered before the publisher + // When publisher is registered, HS gets the notification and starts sending the events immediately. + // Late registration of observer causes missing events. + + // 1. Register the Observer + CLiwDefaultMap* filter = CLiwDefaultMap::NewLC(); + filter->InsertL( KPublisherId, TLiwVariant( KMWPublisher ) ); + filter->InsertL( KContentId, TLiwVariant( KAll) ); + filter->InsertL( KContentType, TLiwVariant( KAll ) ); + iHPObserver = CMCPHarvesterPublisherObserver::NewL(this); + iHPObserver->RegisterL(filter); + CleanupStack::PopAndDestroy(filter); + + // 2. Register the Publisher TUint id = RegisterPublisherL( KMWPublisher, KAll, KAll ); - - if( id != 0 ) - { - CLiwDefaultMap* filter = CLiwDefaultMap::NewLC(); - - filter->InsertL( KPublisherId, TLiwVariant( KMWPublisher ) ); - filter->InsertL( KContentId, TLiwVariant( KAll) ); - filter->InsertL( KContentType, TLiwVariant( KAll ) ); - - iHPObserver = CMCPHarvesterPublisherObserver::NewL(this); - iHPObserver->RegisterL(filter); - CleanupStack::PopAndDestroy(filter); - } MPX_DEBUG1("CMusicContentPublisher::ConstructL initializing content"); PublishDefaultL(); @@ -854,16 +855,7 @@ else if ( aTrigger == KMyResume && !iWidgetForeground) { iWidgetForeground = ETrue; - if ( !iInstanceId ) - { - // CPS framework does not always send 'active' message during boot - iInstanceId = aContentId.AllocL(); - DoPublishAllL(); - } - else - { - DoPublishModifiedL(); - } + DoPublishModifiedL(); } MPX_DEBUG1("<--CMusicContentPublisher::HandlePublisherNotificationL"); } diff -r c8156a91d13c -r c54d95799c80 musichomescreen_multiview/musicplayeractionhandlerplugin/group/musicplayeractionhandlerplugin.mmp --- a/musichomescreen_multiview/musicplayeractionhandlerplugin/group/musicplayeractionhandlerplugin.mmp Wed Mar 31 21:26:33 2010 +0300 +++ b/musichomescreen_multiview/musicplayeractionhandlerplugin/group/musicplayeractionhandlerplugin.mmp Wed Apr 14 15:54:18 2010 +0300 @@ -54,5 +54,6 @@ LIBRARY mpxcommonui.lib // Common UI helpers LIBRARY mpxcollectionhelper.lib // Collection helpers LIBRARY avkon.lib // CAknTaskList +LIBRARY gfxtrans.lib // GfxTransEffect // End of File diff -r c8156a91d13c -r c54d95799c80 musichomescreen_multiview/musicplayeractionhandlerplugin/inc/musicplayeractionhandler.h --- a/musichomescreen_multiview/musicplayeractionhandlerplugin/inc/musicplayeractionhandler.h Wed Mar 31 21:26:33 2010 +0300 +++ b/musichomescreen_multiview/musicplayeractionhandlerplugin/inc/musicplayeractionhandler.h Wed Apr 14 15:54:18 2010 +0300 @@ -132,6 +132,13 @@ * @param aCommand commandType. */ void SetPlaybackCommandL( TMPXPlaybackCommand aCommand ); + + /** + * Calls transition effect. + * To be called before bringing an already running application to foreground. + * @param aNext TUid of the application to transition to. + */ + void BeginFullScreenTransEffect( const TUid& aNext ); private: // data /** diff -r c8156a91d13c -r c54d95799c80 musichomescreen_multiview/musicplayeractionhandlerplugin/src/musicplayeractionhandler.cpp --- a/musichomescreen_multiview/musicplayeractionhandlerplugin/src/musicplayeractionhandler.cpp Wed Mar 31 21:26:33 2010 +0300 +++ b/musichomescreen_multiview/musicplayeractionhandlerplugin/src/musicplayeractionhandler.cpp Wed Apr 14 15:54:18 2010 +0300 @@ -26,6 +26,8 @@ #include // KAppUidMusicPlayerX #include // KMPXPluginTypePlaybackUid #include // CAknTaskList +#include +#include #include #include @@ -216,6 +218,7 @@ if ( task.Exists() ) { // task.SendMessage( KAppUidMusicPlayerX, buffer->Ptr( 0 )); + BeginFullScreenTransEffect( KAppUidMusicPlayerX ); wsSession.SendMessageToWindowGroup( task.WgId(), KAppUidMusicPlayerX, buffer->Ptr( 0 ) ); } @@ -276,6 +279,7 @@ if ( task.Exists() ) { // task.SendMessage( KAppUidMusicPlayerX, buffer->Ptr( 0 )); + BeginFullScreenTransEffect( KAppUidMusicPlayerX ); wsSession.SendMessageToWindowGroup( task.WgId(), KAppUidMusicPlayerX, buffer->Ptr( 0 ) ); } @@ -325,6 +329,7 @@ CleanupStack::PopAndDestroy( &writeStream ); if ( task.Exists() ) { + BeginFullScreenTransEffect( KAppUidMusicPlayerX ); wsSession.SendMessageToWindowGroup( task.WgId(), KAppUidMusicPlayerX, buffer->Ptr( 0 ) ); @@ -380,6 +385,7 @@ CleanupStack::PopAndDestroy( &writeStream ); if ( task.Exists() ) { + BeginFullScreenTransEffect( KAppUidMusicPlayerX ); wsSession.SendMessageToWindowGroup( task.WgId(), KAppUidMusicPlayerX, buffer->Ptr( 0 ) ); if (!aMinimized) @@ -545,5 +551,21 @@ CleanupStack::PopAndDestroy( cmd ); MPX_DEBUG1("<--CMusicPlayerActionHandler::SetPlaybackCommandL()"); } + +// --------------------------------------------------------------------------- +// Sets a transition effect, to be called before bringing an application to foreground +// --------------------------------------------------------------------------- +// +void CMusicPlayerActionHandler::BeginFullScreenTransEffect( const TUid& aNext ) + { + MPX_DEBUG1("-->CMusicPlayerActionHandler::BeginFullScreenTransEffect()"); + GfxTransEffect::BeginFullScreen( + AknTransEffect::EApplicationStart, + TRect(), + AknTransEffect::EParameterType, + AknTransEffect::GfxTransParam( aNext, + AknTransEffect::TParameter::EActivateExplicitContinue )); + MPX_DEBUG1("<--CMusicPlayerActionHandler::BeginFullScreenTransEffect()"); + } // End of File