--- a/layers.sysdef.xml Tue Feb 02 00:27:58 2010 +0200
+++ b/layers.sysdef.xml Fri Mar 19 09:38:24 2010 +0200
@@ -1,14 +1,15 @@
<?xml version="1.0"?>
-<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [
+<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_5_1.dtd" [
<!ENTITY layer_real_source_path "sf/mw/mmappfw" >
]>
-<SystemDefinition name="avdomain" schema="1.4.0">
+<SystemDefinition name="avdomain" schema="1.5.1">
<systemModel>
<!-- Common file for prebuild layers-->
<layer name="mw_layer">
<module name="mmappfw">
<unit unitID="mmappfw" mrp="" bldFile="&layer_real_source_path;/group" name="mmappfw" />
+ <unit unitID="mpxviewframeworkqt" name="mpxviewframeworkqt" bldFile="&layer_real_source_path;/mpx/mpxviewframeworkqt" proFile="mpxviewframeworkqt.pro" qmakeArgs="-r -config rom" mrp=""/>
</module>
</layer>
@@ -27,6 +28,7 @@
<layer name="mw_mmappfw_layer">
<module name="mmappfw_group">
<unit unitID="mmappfw_group" mrp="" bldFile="&layer_real_source_path;/group" name="mmappfw_group" />
+ <unit unitID="mpxviewframeworkqt_group" name="mpxviewframeworkqt_group" bldFile="&layer_real_source_path;/mpx/mpxviewframeworkqt" proFile="mpxviewframeworkqt.pro" qmakeArgs="-r -config rom" mrp=""/>
</module>
</layer>
--- a/mmappcomponents/asxparser/group/asxparser.mmp Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/asxparser/group/asxparser.mmp Fri Mar 19 09:38:24 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 9.1.2 %
+// Version : %version: 9.1.3 %
#include <platform_paths.hrh>
@@ -42,7 +42,6 @@
LIBRARY xmlenginedom.lib
LIBRARY xmlparser.lib
LIBRARY xmldom.lib
-LIBRARY flogger.lib
LIBRARY charconv.lib
NOSTRICTDEF
--- a/mmappcomponents/asxparser/inc/AsxParser_debug.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/asxparser/inc/AsxParser_debug.h Fri Mar 19 09:38:24 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -15,8 +15,7 @@
*
*/
-// Version : %version: 4.1.1 %
-
+// Version : %version: 4.1.2 %
#ifndef __MP_DEBUG_H__
@@ -24,40 +23,20 @@
#include <e32svr.h>
#include <e32def.h>
-#include <flogger.h>
-
-//
-// Forward declaration
-//
-class AsxParserDebug;
-
-// #ifdef __MARM__
-// #define _ASX_PARSER_FILE_LOGGING_
-// #endif
-
-#ifdef _ASX_PARSER_FILE_LOGGING_
- #define ASX_DEBUG AsxParserDebug::FileLog
-#else
- #ifdef _DEBUG
- #define ASX_DEBUG RDebug::Print
- #else
- #define ASX_DEBUG AsxParserDebug::NullLog
- #endif
-#endif
class AsxParserDebug
{
public:
- inline static void NullLog(TRefByValue<const TDesC16> /*aFmt*/,...)
+ inline static void NullLog( TRefByValue<const TDesC16> /*aFmt*/, ... )
{
- }
-
- inline static void FileLog(TRefByValue<const TDesC16> aFmt,...)
- {
- VA_LIST list;
- VA_START(list,aFmt);
- RFileLogger::WriteFormat(_L("AsxParser"), _L("ap.log"),EFileLoggingModeAppend,aFmt,list);
}
};
+#ifdef _DEBUG
+ #define ASX_DEBUG RDebug::Print
+#else
+ #define ASX_DEBUG AsxParserDebug::NullLog
+#endif
+
+
#endif // __MP_DEBUG_H__
--- a/mmappcomponents/asxparser/src/asxparser.cpp Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/asxparser/src/asxparser.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: e003sa33#10.1.6 %
+// Version : %version: 10.1.5 %
@@ -299,8 +299,7 @@
CleanupStack::PopAndDestroy(); //attributeList
}
- TBool urlIsSet = EFalse;
- while( !urlIsSet && nodelist2.HasNext() )
+ while( nodelist2.HasNext() )
{
element = nodelist2.Next();
@@ -327,8 +326,6 @@
TPtrC8 attrData = attr.Value();
asxItem->url = attrData.AllocL();
iAsxArray.Append(asxItem);
- urlIsSet = ETrue;
- break;
}
}
--- a/mmappcomponents/asxparser/test/AsxFiles/multiURL.asx Tue Feb 02 00:27:58 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-<ASX version = "3.0">
- <ABSTRACT>Unknown Abstract Info</ABSTRACT>
- <TITLE>Unknown Title</TITLE>
- <AUTHOR>Unknown Author</AUTHOR>
- <COPYRIGHT>2008 by Nokia</COPYRIGHT>
- <MOREINFO HREF = "rtsp://195.134.224.240:554/t3.3gp" />
- <ENTRY>
- <TITLE>Link 1</TITLE>
- <COPYRIGHT>2008 Nokia</COPYRIGHT>
- <MOREINFO HREF = "http://www.microsoft.com/windows/windowsmedia"></MOREINFO>
- <REF HREF = "http://10.48.2.56:443/WMTest/256k_WMV9_QCIF_WMA9_30fps.wmv" />
- </ENTRY>
- <ENTRY>
- <TITLE>Link 2</TITLE>
- <COPYRIGHT>2008 Nokia</COPYRIGHT>
- <MOREINFO HREF = "http://www.microsoft.com/windows/windowsmedia"></MOREINFO>
- <REF HREF = "http://10.48.2.56:443/WMTest/KennyRogers-LoveLiftedMe.wma" />
- </ENTRY>
- <ENTRY>
- <TITLE>Link 3</TITLE>
- <COPYRIGHT>2008 Nokia</COPYRIGHT>
- <MOREINFO HREF = "http://www.microsoft.com/windows/windowsmedia"></MOREINFO>
- <REF HREF = "http://10.48.2.56:443/WMTest/Kill_Kevin_01_US_s.wmv" />
- </ENTRY>
-</ASX>
--- a/mmappcomponents/asxparser/test/test.cpp Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/asxparser/test/test.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -12,12 +12,10 @@
* Contributors:
*
* Description: Simple v2/v3 ASX-fileparser
- *
+*
*/
-// Version : %version: e003sa33#6 %
-
-
+// Version : %version: 7 %
#include <e32base.h>
#include <e32cons.h>
@@ -25,7 +23,6 @@
#include <e32svr.h>
#include <e32def.h>
-#include <flogger.h>
#include <utf.h>
--- a/mmappcomponents/asxparser/test/test.mmp Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/asxparser/test/test.mmp Fri Mar 19 09:38:24 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -15,8 +15,7 @@
*
*/
-// Version : %version: 9 %
-
+// Version : %version: 10 %
#include <platform_paths.hrh>
@@ -41,5 +40,4 @@
LIBRARY bafl.lib
LIBRARY efsrv.lib
-LIBRARY flogger.lib
LIBRARY charconv.lib
--- a/mmappcomponents/audiofetcher/src/audiofetcherdialog.cpp Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/audiofetcher/src/audiofetcherdialog.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -286,6 +286,7 @@
iListBox->View()->SetListEmptyTextL( *iEmptyListText );
iStatusPaneHandler->SetTitleL( iTitle );
+ iStatusPaneHandler->SetNaviPaneTitleL( KNullDesC );
CEikButtonGroupContainer& dialogCba = ButtonGroupContainer();
dialogCba.MakeCommandVisible(EAknSoftkeySelect, EFalse);
@@ -875,6 +876,7 @@
AknLayoutUtils::EMainPane, mainPaneRect );
SetRect( mainPaneRect );
TRAP_IGNORE( iStatusPaneHandler->SetTitleL( iTitle ) );
+ TRAP_IGNORE( iStatusPaneHandler->SetNaviPaneTitleL( KNullDesC ) );
DrawDeferred();
}
--- a/mmappcomponents/collectionhelper/inc/mpxcollectionuihelperimp.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/collectionhelper/inc/mpxcollectionuihelperimp.h Fri Mar 19 09:38:24 2010 +0200
@@ -848,7 +848,6 @@
TInt iEmbeddedPluginInfo;
TBool iInitialized; // collection db merging
TBool iIncAdding; // Incremental adding guard
- TInt iRefCount;
};
#endif // CMPX_COLLECTION_UI_HELPER_H
--- a/mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -82,8 +82,6 @@
iChunkNumber = 0;
iChunkSize = 0;
iArrayIndex = 0;
- iRefCount = 1;
-
}
@@ -105,34 +103,10 @@
//
CMPXCollectionUiHelperImp* CMPXCollectionUiHelperImp::NewLC(const TUid& aModeId)
{
-
- CMPXCollectionUiHelperImp* self(NULL);
-
- if ( aModeId == KMcModeDefault )
- {
- self = reinterpret_cast<CMPXCollectionUiHelperImp*>(Dll::Tls());
- if ( !self )
- {
- self = new( ELeave ) CMPXCollectionUiHelperImp();
- CleanupStack::PushL( self );
- self->ConstructL(aModeId);
- Dll::SetTls( self );
- }
- else
- {
- self->iRefCount++;
- CleanupStack::PushL( self );
- }
-
- return self;
- }
- else
- {
- self = new( ELeave ) CMPXCollectionUiHelperImp();
- CleanupStack::PushL( self );
- self->ConstructL(aModeId);
- return self;
- }
+ CMPXCollectionUiHelperImp* self = new( ELeave ) CMPXCollectionUiHelperImp();
+ CleanupStack::PushL( self );
+ self->ConstructL(aModeId);
+ return self;
}
// ---------------------------------------------------------------------------
@@ -1042,21 +1016,7 @@
//
void CMPXCollectionUiHelperImp::Close()
{
-
- ASSERT( iRefCount > 0 );
- if ( --iRefCount == 0 )
- {
- // last client released
- CMPXCollectionUiHelperImp* s = reinterpret_cast<CMPXCollectionUiHelperImp*>( Dll::Tls() );
- if ( s )
- {
- if ( s == this )
- {
- delete this;
- Dll::SetTls( NULL );
- }
- }
- }
+ delete this;
}
// ---------------------------------------------------------------------------
--- a/mmappcomponents/mediaplayersettingsengine/group/MPSettEng.mmp Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/mediaplayersettingsengine/group/MPSettEng.mmp Fri Mar 19 09:38:24 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -15,15 +15,15 @@
*
*/
-// Version : %version: 4.1.2 %
-
+// Version : %version: 4.1.3 %
#include <platform_paths.hrh>
+
TARGET mpsettengine.dll
TARGETTYPE dll
UID 0x1000006C 0x101F853D
-VENDORID VID_DEFAULT
+VENDORID VID_DEFAULT
SOURCEPATH ../src
SOURCE MPSettingsModel.cpp
@@ -34,16 +34,15 @@
LIBRARY euser.lib
LIBRARY ecom.lib
-LIBRARY flogger.lib
#if defined(ARMCC)
-deffile ../eabi/
+deffile ../eabi/
#elif defined(WINSCW)
-deffile ../bwinscw/
+deffile ../bwinscw/
#elif defined(WINS)
-deffile ../bwins/
+deffile ../bwins/
#else
-deffile ../bmarm/
+deffile ../bmarm/
#endif
//end of file
Binary file mmappcomponents/mmmtpdataprovider/install/rom/mmmtpdpstub.pkg has changed
Binary file mmappcomponents/mmmtpdataprovider/install/rom/mmmtpdpupdate.pkg has changed
Binary file mmappcomponents/mmmtpdataprovider/install/rom/mmmtpdpupdatedebug.pkg has changed
--- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatavideoaccess.cpp Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatavideoaccess.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -1,19 +1,19 @@
/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: Meta data Video access
- *
- */
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Meta data Video access
+*
+*/
#include <ContentListingFactory.h>
#include <MCLFContentListingEngine.h>
@@ -62,24 +62,23 @@
CMmMtpDpMetadataVideoAccess* CMmMtpDpMetadataVideoAccess::NewL( RFs& aRfs )
{
- CMmMtpDpMetadataVideoAccess* me = new( ELeave ) CMmMtpDpMetadataVideoAccess( aRfs );
- CleanupStack::PushL( me );
+ CMmMtpDpMetadataVideoAccess* me = new(ELeave) CMmMtpDpMetadataVideoAccess( aRfs );
+ CleanupStack::PushL(me);
me->ConstructL();
- CleanupStack::Pop( me );
+ CleanupStack::Pop(me);
return me;
}
-CMmMtpDpMetadataVideoAccess::CMmMtpDpMetadataVideoAccess( RFs& aRfs ) :
- iRfs( aRfs ),
- iDbState( ENoRecord ),
- iDbOpened( EFalse )
+CMmMtpDpMetadataVideoAccess::CMmMtpDpMetadataVideoAccess( RFs& aRfs ) : iRfs(aRfs),
+ iDbState(ENoRecord),
+ iDbOpened(EFalse)
{
- // Do nothing
+
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::ConstructL
+// CMmMtpDpMetadataMpxAccess::ConstructL
// Second-phase
// ---------------------------------------------------------------------------
//
@@ -89,7 +88,8 @@
User::LeaveIfError( iDbsSession.Connect() );
- TInt err = DriveInfo::GetDefaultDrive( DriveInfo::EDefaultPhoneMemory, iStoreNum );
+ TInt err = DriveInfo::GetDefaultDrive( DriveInfo::EDefaultPhoneMemory,
+ iStoreNum );
err = OpenDatabase();
@@ -100,7 +100,7 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::OpenDatabase
+// CMmMtpDpMetadataMpxAccess::OpenDatabase
// Open data base
// ---------------------------------------------------------------------------
//
@@ -168,7 +168,7 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::OpenDatabaseL
+// CMmMtpDpMetadataMpxAccess::OpenDatabaseL
// Open data base
// ---------------------------------------------------------------------------
//
@@ -181,7 +181,7 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::~CMmMtpDpMetadataVideoAccess
+// CMmMtpDpMetadataMpxAccess::~CMmMtpDpMetadataVideoAccess
// Destructor
// ---------------------------------------------------------------------------
//
@@ -196,7 +196,7 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::CreateDatabaseTablesL
+// CMmMtpDpMetadataMpxAccess::CreateDatabaseTablesL
// Case where a new memory card is used and the player has not been opened
// ---------------------------------------------------------------------------
//
@@ -341,7 +341,7 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::CleanupDbIfNecessaryL
+// CMmMtpDpMetadataMpxAccess::CleanupDbIfNecessaryL
// Cleanup Database
// ---------------------------------------------------------------------------
//
@@ -369,7 +369,7 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::IdentifyDeletedFilesL
+// CMmMtpDpMetadataMpxAccess::IdentifyDeletedFilesL
// Identify deleted files
// ---------------------------------------------------------------------------
//
@@ -380,7 +380,7 @@
ExecuteQueryL( KAllColumns, KMtpVideoTable, KMtpVideoLocation, KNullDesC, ETrue );
PRINT1( _L( "MM MTP <> CleanupDbIfNecessaryL Database total count = %d" ), iRecordSet.CountL() );
- for ( iRecordSet.FirstL(); iRecordSet.AtRow(); iRecordSet.NextL() )
+ for ( iRecordSet.FirstL(); iRecordSet.AtRow(); iRecordSet.NextL( ))
{
HBufC* data = ReadLongTextL( KMtpVideoLocation );
CleanupStack::PushL( data );
@@ -407,7 +407,7 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::ReadLongTextL
+// CMmMtpDpMetadataMpxAccess::ReadLongTextL
// Read from Data base
// ---------------------------------------------------------------------------
//
@@ -443,12 +443,11 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::WriteLongTextL
+// CMmMtpDpMetadataMpxAccess::WriteLongTextL
// Utility to write to the database
// ---------------------------------------------------------------------------
//
-void CMmMtpDpMetadataVideoAccess::WriteLongTextL( const TDesC& aColumn,
- const TDesC& aValue )
+void CMmMtpDpMetadataVideoAccess::WriteLongTextL( const TDesC& aColumn, const TDesC& aValue )
{
PRINT2( _L( "MM MTP <> WriteLongTextL Metadata value for %S is \"%S\"" ), &aColumn, &aValue );
TDbColNo num = iColSet->ColNo( aColumn );
@@ -460,16 +459,13 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::ExecuteQueryL
+// CMmMtpDpMetadataMpxAccess::ExecuteQueryL
// Executes a query on the database and sets the cursor at the start of the recordset
// ---------------------------------------------------------------------------
//
-void CMmMtpDpMetadataVideoAccess::ExecuteQueryL( const TDesC& aSelectThese,
- const TDesC& aFromTable,
- const TDesC& aColumnToMatch,
- const TDesC& aMatchCriteria,
- const TBool aIfNot,
- const TBool aNeedQuotes )
+void CMmMtpDpMetadataVideoAccess::ExecuteQueryL( const TDesC& aSelectThese, const TDesC& aFromTable,
+ const TDesC& aColumnToMatch, const TDesC& aMatchCriteria,
+ const TBool aIfNot, const TBool aNeedQuotes )
{
PRINT( _L( "MM MTP => CMmMtpDpMetadataVideoAccess::ExecuteQueryL" ) );
@@ -535,17 +531,17 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::OpenSessionL
+// CMmMtpDpMetadataMpxAccess::OpenSessionL
// Called when the MTP session is initialised
// ---------------------------------------------------------------------------
//
void CMmMtpDpMetadataVideoAccess::OpenSessionL()
{
- // Do nothing
+
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::CloseSessionL
+// CMmMtpDpMetadataMpxAccess::CloseSessionL
// Called when the MTP session is closed
// ---------------------------------------------------------------------------
//
@@ -566,7 +562,7 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::AddVideoL
+// CMmMtpDpMetadataMpxAccess::AddVideoL
// Adds video info to the database
// ---------------------------------------------------------------------------
//
@@ -597,8 +593,7 @@
iRecordSet.SetColL( num, aFullFileName );
num = iColSet->ColNo( KMtpVideoName );
- TParsePtrC parser( aFullFileName );
- iRecordSet.SetColL( num, parser.Name() ); // Default name is the filename.
+ iRecordSet.SetColL( num, aFullFileName ); // Default name is the filename.
num = iColSet->ColNo( KMtpVideoArtist );
iRecordSet.SetColL( num, KNullDesC );
@@ -627,8 +622,8 @@
num = iColSet->ColNo( KMtpVideoHeight );
iRecordSet.SetColL( num, 0 );
- num = iColSet->ColNo( KMtpVideoDuration );
- iRecordSet.SetColL( num, 0 );
+ num = iColSet->ColNo(KMtpVideoDuration);
+ iRecordSet.SetColL(num, 0);
num = iColSet->ColNo( KMtpVideoSampleRate );
iRecordSet.SetColL( num, 0 );
@@ -648,8 +643,8 @@
num = iColSet->ColNo( KMtpVideoVideoBitrate );
iRecordSet.SetColL( num, 0 );
- num = iColSet->ColNo( KMtpVideoFramesPer1000Sec );
- iRecordSet.SetColL( num, 0 );
+ num = iColSet->ColNo(KMtpVideoFramesPer1000Sec);
+ iRecordSet.SetColL(num, 0);
num = iColSet->ColNo( KMtpVideoKeyFrameDistance );
iRecordSet.SetColL( num, 0 );
@@ -699,13 +694,13 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::GetObjectMetadataValueL
+// CMmMtpDpMetadataMpxAccess::GetObjectMetadataValueL
// Gets a piece of metadata from the collection
// ---------------------------------------------------------------------------
//
void CMmMtpDpMetadataVideoAccess::GetObjectMetadataValueL( const TUint16 aPropCode,
- MMTPType& aNewData,
- const CMTPObjectMetaData& aObjectMetaData )
+ MMTPType& aNewData,
+ const CMTPObjectMetaData& aObjectMetaData )
{
PRINT1( _L( "MM MTP => CMmMtpDpMetadataVideoAccess::GetObjectMetadataValue aPropCode = 0x%x" ), aPropCode );
@@ -723,7 +718,7 @@
TUint32 uInt32 = 0;
TUint16 uInt16 = 0;
- switch ( aPropCode )
+ switch (aPropCode)
{
case EMTPObjectPropCodeName:
{
@@ -788,13 +783,10 @@
PRINT( _L( "MM MTP <> EMTPObjectPropCodeDescription-MD" ) );
data = ReadLongTextL( KMtpVideoComment );
- TInt len = data->Length();
- PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::GetObjectMetadataValue len = %d" ),len );
- if ( len != 0 )
- {
- for ( TInt i = 0; i < len; i++ )
- ( ( CMTPTypeArray& ) aNewData ).AppendUintL( ( *data )[i] );
- }
+ if ( data->Length() != 0 )
+ ( ( CMTPTypeString& ) aNewData ).SetL( *data ) ;
+ else
+ ( ( TMTPTypeUint32 & ) aNewData ).Set( 0 ); // return zero if description is empty
delete data;
data = NULL;
@@ -871,13 +863,13 @@
num = iColSet->ColNo( KMtpVideoNumberOfChannels );
uInt16 = iRecordSet.ColUint16( num );
if ( EMTPTypeUINT16 == aNewData.Type() )
- {
- ( ( TMTPTypeUint16 & ) aNewData ).Set( uInt16 );
- }
- else
- {
- User::Leave( KErrArgument );
- }
+ {
+ ( ( TMTPTypeUint16 & ) aNewData ).Set( uInt16 );
+ }
+ else
+ {
+ User::Leave( KErrArgument );
+ }
}
break;
@@ -983,13 +975,13 @@
num = iColSet->ColNo( KMtpVideoScanType );
uInt16 = iRecordSet.ColUint16( num );
if ( EMTPTypeUINT16 == aNewData.Type() )
- {
- ( ( TMTPTypeUint16 & ) aNewData ).Set( uInt16 );
- }
- else
- {
- User::Leave( KErrArgument );
- }
+ {
+ ( ( TMTPTypeUint16 & ) aNewData ).Set( uInt16 );
+ }
+ else
+ {
+ User::Leave( KErrArgument );
+ }
}
break;
@@ -1029,13 +1021,13 @@
num = iColSet->ColNo( KMtpVideoDRM );
uInt16 = iRecordSet.ColUint16( num );
if ( EMTPTypeUINT16 == aNewData.Type() )
- {
- ( ( TMTPTypeUint16 & ) aNewData ).Set( uInt16 );
- }
- else
- {
- User::Leave( KErrArgument );
- }
+ {
+ ( ( TMTPTypeUint16 & ) aNewData ).Set( uInt16 );
+ }
+ else
+ {
+ User::Leave( KErrArgument );
+ }
}
break;
@@ -1047,7 +1039,7 @@
}
// Pack the info to aNewData
- if ( data )
+ if (data)
{
#ifdef _DEBUG
if ( data->Length() > KMtpMaxStringDescLength ) // Have to concatenate for MTP
@@ -1072,7 +1064,7 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::SetObjectMetadataValueL
+// CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL
// Sets a piece of metadata in the collection
// ---------------------------------------------------------------------------
//
@@ -1104,7 +1096,7 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::SetMetadataL
+// CMmMtpDpMetadataMpxAccess::SetMetadataL
// Set meta data.
// ---------------------------------------------------------------------------
//
@@ -1131,7 +1123,7 @@
case EMTPObjectPropCodeEncodingProfile:
case EMTPObjectPropCodeParentalRating:
{
- if ( EMTPTypeString != aNewData.Type() )
+ if( EMTPTypeString != aNewData.Type())
{
User::Leave( KErrArgument );
}
@@ -1145,12 +1137,12 @@
{
PRINT( _L( "MM MTP <> EMTPObjectPropCodeDescription-MD" ) );
#ifdef __MUSIC_ID_SUPPORT
- // WriteMusicIdsL(*longString);
+ //WriteMusicIdsL(*longString);
#else
desData = CMTPTypeArray::NewLC( EMTPTypeAUINT16 ); // + desData
MMTPType::CopyL( aNewData, *desData );
TUint length = desData->NumElements();
- PRINT1( _L( "MM MTP <> CMmMtpDpMetadataVideoAccess::SetMetadataL length = %d" ), length );
+ PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL length = %d" ), length );
if ( length != 0 )
{
TBuf<KMtpMaxDescriptionLength> text;
@@ -1159,7 +1151,7 @@
{
text.Append( desData->ElementUint( i ) );
}
- PRINT1( _L( "MM MTP <> CMmMtpDpMetadataVideoAccess::SetMetadataL text = %S" ),
+ PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL text = %S" ),
&text );
WriteLongTextL( KMtpVideoComment, text );
}
@@ -1218,12 +1210,11 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::RenameRecordL
+// CMmMtpDpMetadataMpxAccess::RenameRecordL
// Renames the file part of a record in the collection database.
// ---------------------------------------------------------------------------
//
-void CMmMtpDpMetadataVideoAccess::RenameRecordL( const TDesC& aOldFileName,
- const TDesC& aNewFileName )
+void CMmMtpDpMetadataVideoAccess::RenameRecordL(const TDesC& aOldFileName, const TDesC& aNewFileName)
{
PRINT( _L( "MM MTP => CMmMtpDpMetadataVideoAccess::RenameRecordL()" ) );
@@ -1239,7 +1230,7 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::DeleteRecordL
+// CMmMtpDpMetadataMpxAccess::DeleteRecordL
// Deletes metadata information associated with the object
// ---------------------------------------------------------------------------
//
@@ -1276,7 +1267,7 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::DeleteAllRecordsL
+// CMmMtpDpMetadataMpxAccess::DeleteAllRecordsL
// Empties the database - used by the FormatStore command
// ---------------------------------------------------------------------------
//
@@ -1285,7 +1276,7 @@
PRINT( _L( "MM MTP => CMmMtpDpMetadataVideoAccess::DeleteAllRecordsL()" ) );
//open database if not opened
- if ( !IsDatabaseOpened() )
+ if (!IsDatabaseOpened())
OpenDatabaseL();
SetRecordL( KNullDesC, ENoRecord ); // Commit any other changes to the DB
@@ -1307,19 +1298,18 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::SetRecordL
+// CMmMtpDpMetadataMpxAccess::SetRecordL
// Set Record
// ---------------------------------------------------------------------------
//
-void CMmMtpDpMetadataVideoAccess::SetRecordL( const TDesC& aFullFileName,
- TMtpDbState aState )
+void CMmMtpDpMetadataVideoAccess::SetRecordL( const TDesC& aFullFileName, TMtpDbState aState )
{
PRINT( _L( "MM MTP => CMmMtpDpMetadataVideoAccess::SetRecordL()" ) );
if ( ( aState == iDbState )
- && ( 0 == aFullFileName.Compare( iCurrentFileName ) ) ) // Already have it
+ && ( 0 == aFullFileName.Compare( iCurrentFileName ) ) ) // Already have it
{
- if ( iDbState == ERecordRead )
+ if (iDbState == ERecordRead)
iRecordSet.GetL();
PRINT1( _L( "MM MTP <> Cached recordset, filename is '%S'" ), &iCurrentFileName );
@@ -1342,20 +1332,20 @@
PRINT( _L( "MM MTP <> SetRecordL ERecordWrite" ) );
TRAPD( err, iRecordSet.PutL() );
- if ( KErrNone != err )
+ if (KErrNone != err)
{
iRecordSet.Cancel();
User::Leave( err );
}
- //lint -fallthrough
+ //lint -fallthrough
case ENoRecord: // intentionally fallthrough
// We need to just close the open record
PRINT( _L( "MM MTP <> SetRecordL ENoRecord" ) );
- //lint -fallthrough
+ //lint -fallthrough
case ERecordRead: // intentionally fallthrough
// We need to open a row for reading
PRINT( _L( "MM MTP <> SetRecordL ERecordRead" ) );
- //lint -fallthrough
+ //lint -fallthrough
default: // intentionally fallthrough
PRINT( _L( "MM MTP <> SetRecordL Closing recordset" ) );
delete iColSet;
@@ -1365,7 +1355,7 @@
break;
}
- if ( aState == ENoRecord ) // We are closing the session if this is the case
+ if ( aState == ENoRecord ) // We are closing the session if this is the case
{
PRINT( _L( "MM MTP <> SetRecordL Record closed, no request to open" ) );
return;
@@ -1375,6 +1365,7 @@
TUint16 format = MmMtpDpUtility::FormatFromFilename( iCurrentFileName );
PRINT1( _L( "MM MTP <> SetRecordL format = 0x%x" ), format );
+
if ( MmMtpDpUtility::HasMetadata( format ) )
{
// Get the record
@@ -1418,7 +1409,7 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::SetImageObjPropL
+// CMmMtpDpMetadataMpxAccess::SetImageObjPropL
// set image specific properties specific to videos
// ---------------------------------------------------------------------------
//
@@ -1439,24 +1430,24 @@
TRAP( err, iRecordSet.SetColL( num, aWidth ) );
if ( err != KErrNone )
- {
- SetRecordL( aFullFileName, EFailedWrite );
- User::Leave( err );
- }
+ {
+ SetRecordL( aFullFileName, EFailedWrite );
+ User::Leave( err );
+ }
num = iColSet->ColNo( KMtpVideoHeight );
TRAP( err, iRecordSet.SetColL( num, aHeight ) );
if ( err != KErrNone )
- {
- SetRecordL( aFullFileName, EFailedWrite );
- User::Leave( err );
- }
+ {
+ SetRecordL( aFullFileName, EFailedWrite );
+ User::Leave( err );
+ }
PRINT( _L( "MM MTP <= CMmMtpDpMetadataVideoAccess::SetImageObjPropL()" ) );
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataVideoAccess::GetImageObjPropL
+// CMmMtpDpMetadataMpxAccess::GetImageObjPropL
// Get image specific properties specific to videos
// ---------------------------------------------------------------------------
//
@@ -1485,35 +1476,35 @@
const TDesC& CMmMtpDpMetadataVideoAccess::ColumnNameFromPropCodeL( const TUint16 aPropCode )
{
const TColumnNameTable KColumnTable[] =
- {
- { EMTPObjectPropCodeName, KMtpVideoName },
- { EMTPObjectPropCodeArtist, KMtpVideoArtist },
- { EMTPObjectPropCodeTrack, KMtpVideoTrack },
- { EMTPObjectPropCodeGenre, KMtpVideoGenre },
- { EMTPObjectPropCodeAlbumName, KMtpVideoAlbumName },
- { EMTPObjectPropCodeComposer, KMtpVideoComposer },
- { EMTPObjectPropCodeOriginalReleaseDate, KMtpVideoOrigReleaseDate },
- { EMTPObjectPropCodeDescription, KMtpVideoComment },
- { EMTPObjectPropCodeWidth, KMtpVideoWidth },
- { EMTPObjectPropCodeHeight, KMtpVideoHeight },
- { EMTPObjectPropCodeDuration, KMtpVideoDuration },
- { EMTPObjectPropCodeSampleRate, KMtpVideoSampleRate },
- { EMTPObjectPropCodeNumberOfChannels, KMtpVideoNumberOfChannels },
- { EMTPObjectPropCodeAudioBitRate, KMtpVideoAudioBitrate },
- { EMTPObjectPropCodeVideoFourCCCodec, KMtpVideoVideoCodec },
- { EMTPObjectPropCodeVideoBitRate, KMtpVideoVideoBitrate },
- { EMTPObjectPropCodeFramesPerThousandSeconds,KMtpVideoFramesPer1000Sec },
- { EMTPObjectPropCodeKeyFrameDistance, KMtpVideoKeyFrameDistance },
- { EMTPObjectPropCodeScanType, KMtpVideoScanType },
- { EMTPObjectPropCodeEncodingProfile, KMtpVideoEncodingProfile },
- { EMTPObjectPropCodeParentalRating, KMtpVideoParentalRating },
- { EMTPObjectPropCodeUseCount, KMtpVideoUseCount },
- { EMTPObjectPropCodeAudioWAVECodec, KMtpVideoAudioCodec },
- { EMTPObjectPropCodeDRMStatus, KMtpVideoDRM },
- };
+ {
+ { EMTPObjectPropCodeName, KMtpVideoName },
+ { EMTPObjectPropCodeArtist, KMtpVideoArtist },
+ { EMTPObjectPropCodeTrack, KMtpVideoTrack },
+ { EMTPObjectPropCodeGenre, KMtpVideoGenre },
+ { EMTPObjectPropCodeAlbumName, KMtpVideoAlbumName },
+ { EMTPObjectPropCodeComposer, KMtpVideoComposer },
+ { EMTPObjectPropCodeOriginalReleaseDate, KMtpVideoOrigReleaseDate },
+ { EMTPObjectPropCodeDescription, KMtpVideoComment },
+ { EMTPObjectPropCodeWidth, KMtpVideoWidth },
+ { EMTPObjectPropCodeHeight, KMtpVideoHeight },
+ { EMTPObjectPropCodeDuration, KMtpVideoDuration },
+ { EMTPObjectPropCodeSampleRate, KMtpVideoSampleRate },
+ { EMTPObjectPropCodeNumberOfChannels, KMtpVideoNumberOfChannels },
+ { EMTPObjectPropCodeAudioBitRate, KMtpVideoAudioBitrate },
+ { EMTPObjectPropCodeVideoFourCCCodec, KMtpVideoVideoCodec },
+ { EMTPObjectPropCodeVideoBitRate, KMtpVideoVideoBitrate },
+ { EMTPObjectPropCodeFramesPerThousandSeconds,KMtpVideoFramesPer1000Sec },
+ { EMTPObjectPropCodeKeyFrameDistance, KMtpVideoKeyFrameDistance },
+ { EMTPObjectPropCodeScanType, KMtpVideoScanType },
+ { EMTPObjectPropCodeEncodingProfile, KMtpVideoEncodingProfile },
+ { EMTPObjectPropCodeParentalRating, KMtpVideoParentalRating },
+ { EMTPObjectPropCodeUseCount, KMtpVideoUseCount },
+ { EMTPObjectPropCodeAudioWAVECodec, KMtpVideoAudioCodec },
+ { EMTPObjectPropCodeDRMStatus, KMtpVideoDRM },
+ };
TInt i = 0;
- TInt count = sizeof( KColumnTable ) / sizeof( KColumnTable[0] );
+ TInt count = sizeof ( KColumnTable ) / sizeof ( KColumnTable[0] );
while ( ( KColumnTable[i].iPropCode != aPropCode ) && ( i < count ) )
{
i++;
@@ -1522,7 +1513,7 @@
if ( i == count )
{
// Not supported by MPX, shouldn't call this function
- PRINT( _L( "MM MTP <> CMmMtpDpMetadataVideoAccess::ColumnNameFromPropCodeL NOT SUPPORTED ATTRIBUTE" ) );
+ PRINT( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::MpxAttribFromPropL NOT SUPPORTED ATTRIBUTE" ) );
User::Leave( KErrNotSupported );
}
return KColumnTable[i].iDbColumnName;
@@ -1530,7 +1521,7 @@
void CMmMtpDpMetadataVideoAccess::SetStorageRootL( const TDesC& aStorageRoot )
{
- PRINT1( _L( "MM MTP => CMmMtpDpMetadataVideoAccess::SetStorageRoot aStoreRoot = %S" ), &aStorageRoot );
+ PRINT1( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetStorageRoot aStoreRoot = %S" ), &aStorageRoot );
// get the drive number
TParse pathParser;
@@ -1538,7 +1529,7 @@
TChar driveChar( pathParser.Drive()[0] );
User::LeaveIfError( RFs::CharToDrive( driveChar, iStoreNum ) );
- PRINT1( _L( "MM MTP <= CMmMtpDpMetadataVideoAccess::SetStorageRoot drive number = %d" ), iStoreNum );
+ PRINT1( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::SetStorageRoot drive number = %d" ), iStoreNum );
}
void CMmMtpDpMetadataVideoAccess::CleanupDatabaseL()
--- a/mmappcomponents/playbackhelper/group/playbackhelper.mmp Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/playbackhelper/group/playbackhelper.mmp Fri Mar 19 09:38:24 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -15,9 +15,7 @@
*
*/
-// Version : %version: 5 %
-
-
+// Version : %version: 6 %
#include <data_caging_paths.hrh>
@@ -47,16 +45,15 @@
LIBRARY apmime.lib
LIBRARY charconv.lib
LIBRARY mmfcontrollerframework.lib
-LIBRARY flogger.lib
-LIBRARY mmfdevsound.lib
+LIBRARY mmfdevsound.lib
#ifdef __WINDOWS_MEDIA
LIBRARY asxparser.lib
#endif
#if defined(ARMCC)
-deffile ../eabi/
+deffile ../eabi/
#elif defined(WINSCW)
-deffile ../bwinscw/
+deffile ../bwinscw/
#endif
--- a/mmappcomponents/playbackhelper/inc/playbackhelper_log.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/playbackhelper/inc/playbackhelper_log.h Fri Mar 19 09:38:24 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -15,9 +15,7 @@
*
*/
-// Version : %version: 4 %
-
-
+// Version : %version: 5 %
#ifndef PLAYBACKHELPER_LOG_H
@@ -26,21 +24,6 @@
// INCLUDES
#include <e32svr.h>
#include <e32def.h>
-#include <flogger.h>
-
-
-
-// #define _PLAYBACKHELPER_FILE_LOGGING_
-
-#ifdef _DEBUG
- #define PLAYBACKHELPER_DEBUG RDebug::Print
-#else
- #ifdef _PLAYBACKHELPER_FILE_LOGGING_
- #define PLAYBACKHELPER_DEBUG PlaybackHelperDebug::FileLog
- #else
- #define PLAYBACKHELPER_DEBUG RDebug::Print
- #endif
-#endif
class PlaybackHelperDebug
@@ -49,18 +32,15 @@
inline static void NullLog( TRefByValue<const TDesC16> /*aFmt*/, ... )
{
}
+};
- inline static void FileLog( TRefByValue<const TDesC16> aFmt, ... )
- {
- VA_LIST list;
- VA_START(list,aFmt);
- RFileLogger::WriteFormat( _L("PlaybackHelper"),
- _L("playbackhelper.log"),
- EFileLoggingModeAppend,
- aFmt,
- list );
- }
-};
+
+#ifdef _DEBUG
+ #define PLAYBACKHELPER_DEBUG RDebug::Print
+#else
+ #define PLAYBACKHELPER_DEBUG PlaybackHelperDebug::NullLog
+#endif
+
#endif // PLAYBACKHELPER_LOG_H
--- a/mmappcomponents/videoplaylistutility/group/videoplaylistutility.mmp Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/videoplaylistutility/group/videoplaylistutility.mmp Fri Mar 19 09:38:24 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -15,9 +15,7 @@
*
*/
-// Version : %version: 3 %
-
-
+// Version : %version: 4 %
#include <data_caging_paths.hrh>
@@ -43,8 +41,7 @@
LIBRARY sysutil.lib
LIBRARY apmime.lib
LIBRARY charconv.lib
-LIBRARY flogger.lib
-LIBRARY playbackhelper.lib
+LIBRARY playbackhelper.lib
LIBRARY mpxcommon.lib
LIBRARY estor.lib
--- a/mmappcomponents/videoplaylistutility/inc/videoplaylistutility_log.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/videoplaylistutility/inc/videoplaylistutility_log.h Fri Mar 19 09:38:24 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -15,130 +15,106 @@
*
*/
-// Version : %version: 2 %
-
-
+// Version : %version: 3 %
#ifndef VIDEOPLAYLISTUTILITY_LOG_H
#define VIDEOPLAYLISTUTILITY_LOG_H
+
// INCLUDES
#include <e32std.h>
#include <e32svr.h>
#include <e32des16.h>
#include <e32property.h>
-#include <flogger.h>
#include <e32def.h>
-
-// #define _VPU_FILE_LOGGING_
-
+//
+// MACROS
+//
#ifdef _DEBUG
- #define VPU_DEBUG RDebug::Print
+ #define VIDEOPLAYLISTUTILITY_DEBUG TVideoPlaylistUtilityLog::VideoPlaylistUtilityLog
+ #define VIDEOPLAYLISTUTILITY_ENTER_EXIT TEnterExitLog _s
#else
- #ifdef _VPU_FILE_LOGGING_
- #define VPU_DEBUG VideoPlaylistUtilityDebug::FileLog
- #else
- #define VPU_DEBUG RDebug::Print
- #endif
-#endif
+ #define VIDEOPLAYLISTUTILITY_DEBUG TVideoPlaylistUtilityLog::NullLog
+ #define VIDEOPLAYLISTUTILITY_ENTER_EXIT TVideoPlaylistUtilityLog::NullLog
+#endif
-class VideoPlaylistUtilityDebug
+class TVideoPlaylistUtilityLog : public TDes16Overflow
{
public:
+
inline static void NullLog( TRefByValue<const TDesC16> /*aFmt*/, ... )
{
}
- inline static void FileLog( TRefByValue<const TDesC16> aFmt, ... )
- {
- VA_LIST list;
- VA_START(list,aFmt);
- RFileLogger::WriteFormat( _L("VideoPlaylistUtility"),
- _L("videoplaylistutility.log"),
- EFileLoggingModeAppend,
- aFmt,
- list );
- }
-};
-
-
-
-// MACROS
-#define VIDEOPLAYLISTUTILITY_DEBUG TVideoPlaylistUtilityLog::VideoPlaylistUtilityLog
-#define VIDEOPLAYLISTUTILITY_ENTER_EXIT TEnterExitLog _s
-
-class TVideoPlaylistUtilityLog : public TDes16Overflow
-{
- public:
-
inline static void VideoPlaylistUtilityLog( TRefByValue<const TDesC16> aFmt, ... )
{
TBuf< 512 > buffer;
-
+
VA_LIST list;
VA_START( list, aFmt );
buffer.AppendFormatList( aFmt, list );
VA_END(list);
-
- VPU_DEBUG(_L("#VideoPlaylistUtility# %S"), &buffer );
+
+ RDebug::Print(_L("#VideoPlaylistUtility# %S"), &buffer );
}
};
class TEnterExitLog : public TDes16Overflow
{
public:
-
+
void Overflow(TDes16& /*aDes*/)
{
- VPU_DEBUG(_L("%S Logging Overflow"), &iFunctionName);
+ RDebug::Print(_L("%S Logging Overflow"), &iFunctionName);
}
TEnterExitLog( TRefByValue<const TDesC> aFunctionName,
TRefByValue<const TDesC> aFmt, ... )
{
iFunctionName = HBufC::New( TDesC(aFunctionName).Length() );
-
+
if ( iFunctionName )
{
iFunctionName->Des().Copy(aFunctionName);
}
-
+
TBuf< 512 > buffer;
-
+
VA_LIST list;
VA_START( list, aFmt );
buffer.AppendFormatList( aFmt, list, this );
VA_END(list);
-
- VPU_DEBUG(_L("#VideoPlaylistUtility# --> %S %S"), iFunctionName, &buffer );
+
+ RDebug::Print(_L("#VideoPlaylistUtility# --> %S %S"), iFunctionName, &buffer );
}
-
+
TEnterExitLog( TRefByValue<const TDesC> aFunctionName )
{
iFunctionName = HBufC::New( TDesC(aFunctionName).Length() );
-
+
if ( iFunctionName )
{
iFunctionName->Des().Copy(aFunctionName);
}
-
- VPU_DEBUG(_L("#VideoPlaylistUtility# --> %S"), iFunctionName );
+
+ RDebug::Print(_L("#VideoPlaylistUtility# --> %S"), iFunctionName );
}
-
+
~TEnterExitLog()
{
- VPU_DEBUG(_L("#VideoPlaylistUtility# <-- %S"), iFunctionName );
+ RDebug::Print(_L("#VideoPlaylistUtility# <-- %S"), iFunctionName );
delete iFunctionName;
}
-
+
private:
HBufC* iFunctionName;
};
+
_LIT(_KVPUErrorInfo, "#VideoPlaylistUtility# Error : error %d file %s line %d");
#define VIDEOPLAYLISTUTILITY_S(a) _S(a)
--- a/mmappfw_plat/group/bld.inf Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappfw_plat/group/bld.inf Fri Mar 19 09:38:24 2010 +0200
@@ -13,7 +13,7 @@
*
* Description: Includes all the Domain API specific bld.inf files, which
* export files.
-* Version : %version: 1.1.4.1.3.3.4 %
+* Version : %version: da1ido#1.1.4.1.3.3.5 %
*
*/
@@ -27,6 +27,7 @@
#include "../harvester_server_api/group/bld.inf"
#include "../harvester_utility_api/group/bld.inf"
#include "../playlist_engine_api/group/bld.inf"
+#include "../mtp_keys_api/group/bld.inf"
#include "../mpx_collection_common_definition_api/group/bld.inf"
#include "../mpx_collection_utility_api/group/bld.inf"
#include "../mpx_common_api/group/bld.inf"
--- a/mmappfw_plat/harvester_collection_mediator_api/tsrc/HarvesterCollectionMediatorTest/group/HarvesterCollectionMediatorTest.mmp Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappfw_plat/harvester_collection_mediator_api/tsrc/HarvesterCollectionMediatorTest/group/HarvesterCollectionMediatorTest.mmp Fri Mar 19 09:38:24 2010 +0200
@@ -49,7 +49,7 @@
LIBRARY euser.lib
LIBRARY bafl.lib estor.lib ecom.lib stiftestinterface.lib
LIBRARY stiftestengine.lib
-LIBRARY mpxcollectionmediator.lib mpxcollectionutility.lib mpxcollectionview.lib mpxcollectionengine.lib mpxcollectionhelper.lib mpxcommon.lib
+LIBRARY mpxcollectionmediator.lib mpxcollectionutility.lib mpxcollectionengine.lib mpxcollectionhelper.lib mpxcommon.lib
LANG SC
--- a/mmappfw_plat/mpx_base_view_plugins_api/group/bld.inf Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappfw_plat/mpx_base_view_plugins_api/group/bld.inf Fri Mar 19 09:38:24 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -27,5 +27,8 @@
../inc/mpxakndialogplugin.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxakndialogplugin.h)
../inc/mpxaknviewplugin.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxaknviewplugin.h)
../inc/mpxviewplugin.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxviewplugin.h)
-../inc/mpxviewplugin.hrh MW_LAYER_PLATFORM_EXPORT_PATH(mpxviewplugin.hrh)
+../inc/mpxviewplugin.hrh MW_LAYER_PLATFORM_EXPORT_PATH(mpxviewplugin.hrh)
+// new for 10.1 QT
+../inc/mpxviewpluginqt.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxviewpluginqt.h)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mpx_base_view_plugins_api/inc/mpxviewpluginqt.h Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,135 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef MPXVIEWPLUGIN_H
+#define MPXVIEWPLUGIN_H
+
+#ifdef BUILD_VIEWFRAMEWORK
+#define VFDLL_EXPORT Q_DECL_EXPORT
+#else
+#define VFDLL_EXPORT Q_DECL_IMPORT
+#endif
+
+#include <QObject>
+
+class QGraphicsWidget;
+class MpxViewPlugin;
+
+class VFDLL_EXPORT MpxPluginViewInterface {
+
+ public:
+ virtual MpxViewPlugin *viewPlugin() = 0;
+
+ };
+
+Q_DECLARE_INTERFACE(MpxPluginViewInterface , "org.nokia.mmdt.MpxViewPlugin/1.0" );
+
+class VFDLL_EXPORT MpxViewPlugin : public QObject, public MpxPluginViewInterface {
+
+ Q_OBJECT
+ Q_INTERFACES(MpxPluginViewInterface)
+
+ public:
+
+ /* COMMENT:
+ * following two methods are kind of second-phase create & destroy. Rationale for this step is that
+ * we need some way to promote lazy resources allocation (on application demand) and early resource
+ * deallocation (again, on application direct command).
+ */
+
+ /**
+ * createView is the second operation (after plugin construction which is done somewhere
+ * in the plugin framework) executed in the application layer to make a fully operational
+ * View Plugin descendant.
+ * I should allocate all of those resources that are required by plugin, but which are
+ * too expensive to allocate in constructor (eg. in case of plugin prefetching).
+ */
+ virtual void createView() = 0;
+
+ /**
+ * destroyView is an operation that should be executed just before plugin deletion.
+ * Implementation should destroy all of resources allocated during createView execution.
+ * It's reason d'etre is based on a fact, that application doesn't controll when exactly
+ * plugin will be deleted, so destructor execution could be postponed still holding resources.
+ */
+ virtual void destroyView() = 0;
+
+ /* COMMENT:
+ * view activation and deactivation are reversible operations
+ * that allows us to give up resources that we could temporary deallocate when that
+ * specific view plugin goes into background.
+ */
+
+ /**
+ * Called to notice view activation.
+ */
+ virtual void activateView() = 0;
+
+ /**
+ * Called to notice view deactivation.
+ */
+ virtual void deactivateView() = 0;
+
+ /**
+ * gives actual view component, ready to put somewhere into the app layout.
+ * However, beware that calling to activate/deactivate in the meantime
+ * can invalidate that pointer.
+ *
+ * NOTE: Returned type is choosen to be as generic as possible,
+ * so please ensure that it fulfills all your needs (it was HbView* before)
+ */
+ virtual QGraphicsWidget* getView() = 0;
+
+ public slots:
+
+ /**
+ * Signalled by application when orientation has changed.
+ */
+ virtual void orientationChange(Qt::Orientation orientation) = 0;
+
+ /**
+ * Implementation should take care either to implement
+ * go-back operation internally or to emit proper
+ * command signal to delegate that responsibility to
+ * framework (eg. to switch to previous view).
+ */
+ virtual void back() = 0;
+
+ signals:
+
+ /**
+ * Command is the only way to notify from plugin to application
+ * about action needed to be executed.
+ *
+ * @param aCommand enumeration of command type.
+ * Currently supported are: ViewBack, CloseApp, GoToNowPlaying, GoToCollectionView.
+ * NOTE: It should be specified how to determine between broadly supported operations
+ * (back, close etc.) and application/plugin specific (go to collection, go to now playing etc.)
+ *
+ * There is also one major issue here, that there is no guaranted order of command delivery,
+ * so there is second option to use common observer pattern. Should be discussed.
+ */
+ void command(int aCommand);
+
+ public:
+
+ virtual MpxViewPlugin *viewPlugin() { return this; }
+
+};
+
+#endif /*MPXVIEWPLUGIN_H_*/
+
--- a/mmappfw_plat/mpx_common_api/inc/mpxclientlist.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappfw_plat/mpx_common_api/inc/mpxclientlist.h Fri Mar 19 09:38:24 2010 +0200
@@ -258,6 +258,26 @@
*/
inline void SendMsgL(TInt aIndex, const TMPXMessage& aMsg);
+
+ /**
+ * Sets the primary client
+ *
+ * @since S60 9.2
+ * @return system error
+ */
+ IMPORT_C TInt SetPrimaryClient(CMPXMessageQueue& aMsgQueue);
+
+
+
+ /**
+ * Send a sync message to the primary client
+ *
+ * @since S60 9.2
+ * @return system error
+ */
+ IMPORT_C TInt SendSyncMsg(const CMPXMessage* aMsg);
+
+
private:
/**
* Encapsulates a client: all the information associated with a client of
@@ -433,6 +453,7 @@
RPointerArray<CClientId> iClients;
RArray<TProcessId> iClientProcesses;
MMPXClientlistObserver* iObserver;
+ CMPXMessageQueue* iPrimaryClient;
};
#include "mpxclientlist.inl"
--- a/mmappfw_plat/mpx_common_api/inc/mpxmessagequeue.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappfw_plat/mpx_common_api/inc/mpxmessagequeue.h Fri Mar 19 09:38:24 2010 +0200
@@ -73,6 +73,14 @@
*/
IMPORT_C void Reset();
+ /**
+ * Adds a message into the top of the queue and sends the message if slot is available.
+ *
+ * @since S60 9.2
+ * @param aMessage message object, ownership not transferred.
+ * @return system error
+ */
+ IMPORT_C TInt AddFirst(const CMPXMessage* aMessage, TInt aError);
private:
/**
* C++ constructor.
--- a/mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackcommanddefs.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackcommanddefs.h Fri Mar 19 09:38:24 2010 +0200
@@ -99,6 +99,7 @@
EPbCmdDisableEffect,
EPbCmdSetVolume, // 25 Set volume to the value specified by aData
EPbCmdSetAutoResume, // 26 Set autoresume value (true/false)
+ EPbCmdSyncMsgComplete, //27 Synchronous message is complete
EPbCmdEnd // Mark for the end of command
};
--- a/mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackframeworkdefs.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackframeworkdefs.h Fri Mar 19 09:38:24 2010 +0200
@@ -164,8 +164,7 @@
EPbAccessoryLoopset = 0x00000020,
EPbAccessoryMusicStand = 0x00000040,
EPbAccessoryTVOut = 0x00000080,
- EPbAccessoryHeadphones = 0x00000100,
- EPbAccessoryHDMI = 0x00000200
+ EPbAccessoryHeadphones = 0x00000100
};
#else
/**
@@ -247,6 +246,7 @@
EPbsInitFromFile64, // 42
EPbsInitStreamingFromFile64, // 43
EPbsGetFile64, // 44
+ EPbsSetPrimaryClient, //45 set primary client
EPbsServerOpEnd // End of operation
};
--- a/mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackpluginobserver.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackpluginobserver.h Fri Mar 19 09:38:24 2010 +0200
@@ -110,6 +110,18 @@
*/
virtual void HandlePlaybackMessage(CMPXMessage* /*aMsg*/,
TInt /*aErr*/) {}
+
+
+ /**
+ * Handle message from plug-in.
+ *
+ * @since S60 9.2
+ * @param aMsg message from the plug-in
+ * @return system error
+ */
+ virtual TInt HandlePlaybackSyncMessage (const CMPXMessage& /*aMsg*/) {return KErrNotSupported;}
+
+
};
#endif // MMPXMPLAYBACKPLUGINOBSERVER_H
--- a/mmappfw_plat/mpx_playback_utility_api/inc/mpxplaybackutility.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappfw_plat/mpx_playback_utility_api/inc/mpxplaybackutility.h Fri Mar 19 09:38:24 2010 +0200
@@ -413,6 +413,16 @@
*/
virtual void InitStreaming64L(RFile64& /*aShareableFile*/, const TInt /*aAccessPoint*/) {};
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+
+ /**
+ * Sets the primary client
+ *
+ * @since S60 9.2
+ * @return system error
+ */
+ virtual TInt SetPrimaryClientL() {return KErrNotSupported; };
+
+
};
/**
--- a/mmappfw_plat/mpx_view_utility_api/group/bld.inf Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappfw_plat/mpx_view_utility_api/group/bld.inf Fri Mar 19 09:38:24 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -26,4 +26,7 @@
../inc/mpxviewactivationobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxviewactivationobserver.h)
../inc/mpxviewpluginmanager.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxviewpluginmanager.h)
../inc/mpxviewutility.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxviewutility.h)
-../inc/mpxviewutilitycommanddef.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxviewutilitycommanddef.h)
+../inc/mpxviewutilitycommanddef.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxviewutilitycommanddef.h)
+
+// new for 10.1 QT
+../inc/mpxviewframeworkqt.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxviewframeworkqt.h)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mpx_view_utility_api/inc/mpxviewframeworkqt.h Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef MPXVIEWFRAMEWORK_H
+#define MPXVIEWFRAMEWORK_H
+
+#include <QObject>
+#include <QList>
+#include <qglobal.h>
+#include <hbmainwindow.h>
+
+class MpxViewPlugin;
+class HbView;
+
+#ifdef BUILD_VIEWFRAMEWORK
+#define VFDLL_EXPORT Q_DECL_EXPORT
+#else
+#define VFDLL_EXPORT Q_DECL_IMPORT
+#endif
+
+class VFDLL_EXPORT MpxViewFramework : public HbMainWindow
+ {
+ Q_OBJECT
+
+public:
+ MpxViewFramework(QWidget *parent = 0, Hb::WindowFlags windowFlags = Hb::WindowFlagNone);
+
+ virtual ~MpxViewFramework();
+
+ virtual MpxViewPlugin *resolvePlugin(const QList<int>& requestedPlugins);
+
+private:
+
+ Q_DISABLE_COPY(MpxViewFramework)
+
+ };
+
+#endif //VIEWFRAMEWORK_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mtp_keys_api/group/bld.inf Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: File that exports the files belonging to
+: MTP Keys API
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../inc/MtpPrivatePSKeys.h MW_LAYER_PLATFORM_EXPORT_PATH(MtpPrivatePSKeys.h)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mtp_keys_api/inc/MtpPrivatePSKeys.h Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Header Information for MTP Private Publish & Subsribe Keys
+*
+*/
+
+
+#ifndef MTPPRIVATEPSKEYS_H
+#define MTPPRIVATEPSKEYS_H
+
+// Security Code UI Originator API
+const TUid KMtpPSUid = {0x101FFC51}; // Mtp Key UID
+const TInt KMtpPSStatus = 1; // Mtp UID
+
+enum TMtpPSStatus
+ {
+ EMtpPSStatusUninitialized = 0,
+ EMtpPSStatusActive,
+ EMtpPSStatusReadyToSync
+ };
+
+#endif // MTPPRIVATEPSKEYS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mtp_keys_api/mtp_keys_api.metaxml Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,17 @@
+<?xml version="1.0" ?>
+<api id="eba779447f4b459225cbd374f504d422" dataversion="2.0">
+ <name>MTP Keys API</name>
+ <description>This API defines the Central Repository and Publish & Subscribe keys defined by MTP.</description>
+ <type>c++</type>
+ <collection>mtp</collection>
+ <libs>
+ </libs>
+ <release category="platform"/>
+ <attributes>
+ <!-- This indicates wether the api provedes separate html documentation -->
+ <!-- or is the additional documentation generated from headers. -->
+ <!-- If you are unsuere then the value is "no" -->
+ <htmldocprovided>no</htmldocprovided>
+ <adaptation>no</adaptation>
+ </attributes>
+</api>
--- a/mmappfw_plat/videoplaylist_utility_api/tsrc/videoplaylistutilitytest/group/videoplaylistutilitytest.mmp Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappfw_plat/videoplaylist_utility_api/tsrc/videoplaylistutilitytest/group/videoplaylistutilitytest.mmp Fri Mar 19 09:38:24 2010 +0200
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 2 %
+// Version : %version: 3 %
#include <platform_paths.hrh>
@@ -49,7 +49,6 @@
LIBRARY libglib.lib
LIBRARY libpthread.lib
LIBRARY efsrv.lib
-LIBRARY flogger.lib
LIBRARY ServiceHandler.lib
LIBRARY ecom.lib
LIBRARY estor.lib
--- a/mpx/collectionframework/collectionengine/inc/mpxcollectionengine.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mpx/collectionframework/collectionengine/inc/mpxcollectionengine.h Fri Mar 19 09:38:24 2010 +0200
@@ -391,8 +391,6 @@
* If not KNullUid, indicates the plugin that is currently being upgraded.
*/
TUid iUpdatedPluginUid;
-
- CMPXMedia* iMediaForHeapKeepAlive; // own
};
#include "mpxcollectionengine.inl"
--- a/mpx/collectionframework/collectionengine/src/mpxcollectionengine.cpp Tue Feb 02 00:27:58 2010 +0200
+++ b/mpx/collectionframework/collectionengine/src/mpxcollectionengine.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -102,7 +102,6 @@
//
void CMPXCollectionEngine::ConstructL()
{
- iMediaForHeapKeepAlive = CMPXMedia::NewL(); // To avoid continuous heap
iPluginHandler=CMPXCollectionPluginHandler::NewL(*this, *this);
iCache = CMPXCollectionCache::NewL(KMPXMaxCacheSizeRatio);
}
@@ -113,7 +112,6 @@
//
EXPORT_C CMPXCollectionEngine::~CMPXCollectionEngine()
{
- delete iMediaForHeapKeepAlive;
iCleanupStack.Close();
iContexts.ResetAndDestroy();
--- a/mpx/commonframework/common/bwinscw/mpxcommonU.DEF Tue Feb 02 00:27:58 2010 +0200
+++ b/mpx/commonframework/common/bwinscw/mpxcommonU.DEF Fri Mar 19 09:38:24 2010 +0200
@@ -284,4 +284,7 @@
?AddClientL@CMPXClientList@@QAEXVTThreadId@@HPAVCMPXMessageQueue@@H@Z @ 283 NONAME ; void CMPXClientList::AddClientL(class TThreadId, int, class CMPXMessageQueue *, int)
?ClientCategory@CMPXClientList@@QBEHH@Z @ 284 NONAME ; int CMPXClientList::ClientCategory(int) const
?SelectPlugin64L@CMPXPluginHandlerBase@@UAEXABVRFile64@@@Z @ 285 NONAME ; void CMPXPluginHandlerBase::SelectPlugin64L(class RFile64 const &)
+ ?SendSyncMsg@CMPXClientList@@QAEHPBVCMPXMedia@@@Z @ 286 NONAME ; int CMPXClientList::SendSyncMsg(class CMPXMedia const *)
+ ?AddFirst@CMPXMessageQueue@@QAEHPBVCMPXMedia@@H@Z @ 287 NONAME ; int CMPXMessageQueue::AddFirst(class CMPXMedia const *, int)
+ ?SetPrimaryClient@CMPXClientList@@QAEHAAVCMPXMessageQueue@@@Z @ 288 NONAME ; int CMPXClientList::SetPrimaryClient(class CMPXMessageQueue &)
--- a/mpx/commonframework/common/eabi/mpxcommonU.DEF Tue Feb 02 00:27:58 2010 +0200
+++ b/mpx/commonframework/common/eabi/mpxcommonU.DEF Fri Mar 19 09:38:24 2010 +0200
@@ -361,4 +361,7 @@
_ZN14CMPXClientList10AddClientLE9TThreadIdiP16CMPXMessageQueuei @ 360 NONAME
_ZNK14CMPXClientList14ClientCategoryEi @ 361 NONAME
_ZN21CMPXPluginHandlerBase15SelectPlugin64LERK7RFile64 @ 362 NONAME
+ _ZN14CMPXClientList11SendSyncMsgEPK9CMPXMedia @ 363 NONAME
+ _ZN14CMPXClientList16SetPrimaryClientER16CMPXMessageQueue @ 364 NONAME
+ _ZN16CMPXMessageQueue8AddFirstEPK9CMPXMediai @ 365 NONAME
--- a/mpx/commonframework/common/src/mpxclientlist.cpp Tue Feb 02 00:27:58 2010 +0200
+++ b/mpx/commonframework/common/src/mpxclientlist.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -46,7 +46,8 @@
//
CMPXClientList::CMPXClientList(MMPXClientlistObserver* aObserver)
: iIdentity(CMPXClientList::ClientsMatch),
- iObserver(aObserver)
+ iObserver(aObserver),
+ iPrimaryClient(NULL)
{}
// ----------------------------------------------------------------------------
@@ -155,7 +156,15 @@
CClientId* id( iClients[aIndex] );
iClients.Remove(aIndex);
- CClientId removeId( id->iPid );
+ //set primary client to NULL if primary client is removed
+ if (iPrimaryClient != NULL)
+ {
+ if (aIndex == Find(*iPrimaryClient))
+ {
+ iPrimaryClient = NULL;
+ }
+ }
+ CClientId removeId( id->iPid );
if ( iClients.Find( &removeId, iIdentity ) == KErrNotFound )
//
// There's no other client from the same process, so
@@ -601,4 +610,46 @@
iSubscriptions.ResetAndDestroy();
}
+// -----------------------------------------------------------------------------
+// CMPClientList::SetPrimaryClient
+// Set the primary client
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMPXClientList::SetPrimaryClient(CMPXMessageQueue& aMsgQueue)
+ {
+ MPX_FUNC("CMPXClientList::SetPrimaryClient");
+ TInt index = Find(aMsgQueue);
+ MPX_DEBUG2("CMPXClientList::SetPrimaryClient, index = %d", index);
+ if (index >= 0)
+ {
+ iPrimaryClient = &aMsgQueue;
+ return KErrNone;
+ }
+ return index;
+ }
+// -----------------------------------------------------------------------------
+// CMPClientList::SendSyncMsg
+// Send a sync message to the primary client
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMPXClientList::SendSyncMsg(const CMPXMessage* aMsg)
+ {
+ MPX_FUNC("CMPXClientList::SendSyncMsg");
+ TInt err = KErrNone;
+ if (iPrimaryClient == NULL)
+ {
+ return KErrNotFound;
+ }
+ TInt index = Find(*iPrimaryClient);
+ MPX_DEBUG2("CMPXClientList::SendSyncMsg, index = %d", index);
+ if (index >= 0)
+ {
+ err = iClients[index]->iMsgQueue->AddFirst(aMsg, KErrNone);
+ }
+ else
+ {
+ err = KErrNotFound;
+ }
+ return err;
+ }
// End of File
--- a/mpx/commonframework/common/src/mpxmessagequeue.cpp Tue Feb 02 00:27:58 2010 +0200
+++ b/mpx/commonframework/common/src/mpxmessagequeue.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -302,4 +302,36 @@
this, data, err, ret);
}
+// ----------------------------------------------------------------------------
+// Adds a message into the top of the queue and sends the message if slot is available
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMPXMessageQueue::AddFirst(const CMPXMessage* aMessage, TInt aError)
+ {
+ // aMessage should not be NULL and aError is KErrNone
+ MPX_ASSERT(aMessage || aError);
+ MPX_FUNC_EX("CMPXMessageQueue::AddFirst()");
+ CMPXMessageItem* item(NULL);
+ TRAPD(err, item = CMPXMessageItem::NewL(aMessage, aError));
+ if (KErrNone==err)
+ {
+ iMsgs.AddFirst(*item);
+#ifdef _DEBUG
+ MPX_DEBUG3("CMPXMessageQueue::AddFirst 0x%08x, items %d", this, ++iCount);
+#endif
+ }//else failed to create message item.
+ else
+ {
+ MPX_DEBUG2("CMPXMessageQueue::AddFirst Failed to create message item %d", err);
+ }
+ if (KErrNone!=err && KErrNone==iFailure)
+ { // Set the failure code
+ iFailure = err;
+ }
+ if (!iMsgRequest.IsNull())
+ { // outstanding request
+ Send();
+ } // else client has not finished current message yet
+ return err;
+ }
// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/bwins/mpxviewframeworkqt.def Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,30 @@
+EXPORTS
+ ?trUtf8@MpxViewPlugin@@SA?AVQString@@PBD0@Z @ 1 NONAME ; class QString MpxViewPlugin::trUtf8(char const *, char const *)
+ ?tr@MpxViewFramework@@SA?AVQString@@PBD0H@Z @ 2 NONAME ; class QString MpxViewFramework::tr(char const *, char const *, int)
+ ??0MpxViewFramework@@QAE@PAVQWidget@@V?$QFlags@W4WindowFlag@Hb@@@@@Z @ 3 NONAME ; MpxViewFramework::MpxViewFramework(class QWidget *, class QFlags<enum Hb::WindowFlag>)
+ ??1MpxViewPluginResolver@@UAE@XZ @ 4 NONAME ; MpxViewPluginResolver::~MpxViewPluginResolver(void)
+ ?tr@MpxViewPlugin@@SA?AVQString@@PBD0H@Z @ 5 NONAME ; class QString MpxViewPlugin::tr(char const *, char const *, int)
+ ??0MpxViewPluginResolver@@QAE@ABV?$QList@H@@@Z @ 6 NONAME ; MpxViewPluginResolver::MpxViewPluginResolver(class QList<int> const &)
+ ?tr@MpxViewFramework@@SA?AVQString@@PBD0@Z @ 7 NONAME ; class QString MpxViewFramework::tr(char const *, char const *)
+ ?qt_metacast@MpxViewFramework@@UAEPAXPBD@Z @ 8 NONAME ; void * MpxViewFramework::qt_metacast(char const *)
+ ?trUtf8@MpxViewFramework@@SA?AVQString@@PBD0H@Z @ 9 NONAME ; class QString MpxViewFramework::trUtf8(char const *, char const *, int)
+ ?getStaticMetaObject@MpxViewFramework@@SAABUQMetaObject@@XZ @ 10 NONAME ; struct QMetaObject const & MpxViewFramework::getStaticMetaObject(void)
+ ?staticMetaObject@MpxViewFramework@@2UQMetaObject@@B @ 11 NONAME ; struct QMetaObject const MpxViewFramework::staticMetaObject
+ ?qt_metacall@MpxViewFramework@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 12 NONAME ; int MpxViewFramework::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?trUtf8@MpxViewFramework@@SA?AVQString@@PBD0@Z @ 13 NONAME ; class QString MpxViewFramework::trUtf8(char const *, char const *)
+ ?staticMetaObject@MpxViewPlugin@@2UQMetaObject@@B @ 14 NONAME ; struct QMetaObject const MpxViewPlugin::staticMetaObject
+ ?metaObject@MpxViewPlugin@@UBEPBUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const * MpxViewPlugin::metaObject(void) const
+ ?metaObject@MpxViewFramework@@UBEPBUQMetaObject@@XZ @ 16 NONAME ; struct QMetaObject const * MpxViewFramework::metaObject(void) const
+ ?resolvePlugin@MpxViewPluginResolver@@QAEPAVMpxViewPlugin@@XZ @ 17 NONAME ; class MpxViewPlugin * MpxViewPluginResolver::resolvePlugin(void)
+ ?tr@MpxViewPlugin@@SA?AVQString@@PBD0@Z @ 18 NONAME ; class QString MpxViewPlugin::tr(char const *, char const *)
+ ?getStaticMetaObject@MpxViewPlugin@@SAABUQMetaObject@@XZ @ 19 NONAME ; struct QMetaObject const & MpxViewPlugin::getStaticMetaObject(void)
+ ??1MpxViewFramework@@UAE@XZ @ 20 NONAME ; MpxViewFramework::~MpxViewFramework(void)
+ ??_EMpxViewFramework@@UAE@I@Z @ 21 NONAME ; MpxViewFramework::~MpxViewFramework(unsigned int)
+ ?resolvePlugin@MpxViewFramework@@UAEPAVMpxViewPlugin@@ABV?$QList@H@@@Z @ 22 NONAME ; class MpxViewPlugin * MpxViewFramework::resolvePlugin(class QList<int> const &)
+ ?qt_metacast@MpxViewPlugin@@UAEPAXPBD@Z @ 23 NONAME ; void * MpxViewPlugin::qt_metacast(char const *)
+ ?viewPlugin@MpxViewPlugin@@UAEPAV1@XZ @ 24 NONAME ; class MpxViewPlugin * MpxViewPlugin::viewPlugin(void)
+ ??_EMpxViewPluginResolver@@UAE@I@Z @ 25 NONAME ; MpxViewPluginResolver::~MpxViewPluginResolver(unsigned int)
+ ?qt_metacall@MpxViewPlugin@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 26 NONAME ; int MpxViewPlugin::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?command@MpxViewPlugin@@IAEXH@Z @ 27 NONAME ; void MpxViewPlugin::command(int)
+ ?trUtf8@MpxViewPlugin@@SA?AVQString@@PBD0H@Z @ 28 NONAME ; class QString MpxViewPlugin::trUtf8(char const *, char const *, int)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/eabi/mpxviewframeworkqt.def Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,34 @@
+EXPORTS
+ _ZN13MpxViewPlugin11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
+ _ZN13MpxViewPlugin11qt_metacastEPKc @ 2 NONAME
+ _ZN13MpxViewPlugin16staticMetaObjectE @ 3 NONAME DATA 16
+ _ZN13MpxViewPlugin19getStaticMetaObjectEv @ 4 NONAME
+ _ZN13MpxViewPlugin7commandEi @ 5 NONAME
+ _ZN16MpxViewFramework11qt_metacallEN11QMetaObject4CallEiPPv @ 6 NONAME
+ _ZN16MpxViewFramework11qt_metacastEPKc @ 7 NONAME
+ _ZN16MpxViewFramework13resolvePluginERK5QListIiE @ 8 NONAME
+ _ZN16MpxViewFramework16staticMetaObjectE @ 9 NONAME DATA 16
+ _ZN16MpxViewFramework19getStaticMetaObjectEv @ 10 NONAME
+ _ZN16MpxViewFrameworkC1EP7QWidget6QFlagsIN2Hb10WindowFlagEE @ 11 NONAME
+ _ZN16MpxViewFrameworkC2EP7QWidget6QFlagsIN2Hb10WindowFlagEE @ 12 NONAME
+ _ZN16MpxViewFrameworkD0Ev @ 13 NONAME
+ _ZN16MpxViewFrameworkD1Ev @ 14 NONAME
+ _ZN16MpxViewFrameworkD2Ev @ 15 NONAME
+ _ZN21MpxViewPluginResolver13resolvePluginEv @ 16 NONAME
+ _ZN21MpxViewPluginResolverC1ERK5QListIiE @ 17 NONAME
+ _ZN21MpxViewPluginResolverC2ERK5QListIiE @ 18 NONAME
+ _ZN21MpxViewPluginResolverD0Ev @ 19 NONAME
+ _ZN21MpxViewPluginResolverD1Ev @ 20 NONAME
+ _ZN21MpxViewPluginResolverD2Ev @ 21 NONAME
+ _ZNK13MpxViewPlugin10metaObjectEv @ 22 NONAME
+ _ZNK16MpxViewFramework10metaObjectEv @ 23 NONAME
+ _ZTI13MpxViewPlugin @ 24 NONAME
+ _ZTI16MpxViewFramework @ 25 NONAME
+ _ZTI21MpxViewPluginResolver @ 26 NONAME
+ _ZTI22MpxPluginViewInterface @ 27 NONAME
+ _ZTV13MpxViewPlugin @ 28 NONAME
+ _ZTV16MpxViewFramework @ 29 NONAME
+ _ZTV21MpxViewPluginResolver @ 30 NONAME
+ _ZThn8_N16MpxViewFrameworkD0Ev @ 31 NONAME
+ _ZThn8_N16MpxViewFrameworkD1Ev @ 32 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/inc/mpxplugindata.h Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef MPXPLUGINDATA_H
+#define MPXPLUGINDATA_H
+
+// INCLUDES
+#include <QList>
+// CLASS DECLARATION
+
+/**
+ * QMpxPluginData
+ *
+ */
+class MpxPluginData
+ {
+public:
+ enum TMPXViewPluginPriorities{
+ EMPXViewPluginPriorityLowest = -20000,
+ EMPXViewPluginPriorityLow = -10000,
+ EMPXViewPluginPriorityNormal = 0,
+ EMPXViewPluginPriorityHigh = 10000,
+ EMPXViewPluginPriorityHighest = 20000
+ };
+
+ /**
+ * Constructor
+ */
+ MpxPluginData( );
+
+ /**
+ * Destructor.
+ */
+ ~MpxPluginData();
+
+ /**
+ * Plugin id geter
+ * @return plugin id
+ */
+ int id() const;
+
+ /**
+ * Plugin interface id geter
+ * @return interface id implemented by plugin
+ */
+ int type() const;
+
+ /**
+ * Plugin priority geter
+ * @return priority of plugin
+ */
+ TMPXViewPluginPriorities priority() const;
+
+ /**
+ * Plugin supported functionality geter
+ * @return list of functionality delivered by plugin
+ */
+ const QList< int >& supportedId() const;
+
+ /**
+ * Plugin id seter
+ * @param value - new value of plugin id
+ */
+ void setId( int value );
+
+ /**
+ * Plugin interface id seter
+ * @param value - new value of plugin interface id
+ */
+ void setType( int value );
+
+ /**
+ * Plugin priority seter
+ * @param value - new plugin priority
+ */
+ void setPriority( TMPXViewPluginPriorities value );
+
+ /**
+ * Plugin supporterd functionality seter
+ * @param value - new functionality supported by plugin
+ */
+ void addSupportedId( int value );
+
+private:
+ int pluginId;
+ int pluginType;
+ TMPXViewPluginPriorities pluginPriority;
+ QList< int > pluginSupportedId;
+ };
+
+#endif // MPXPLUGINDATA_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/inc/mpxplugindataparser.h Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef QMPXPLUDINDATAPARSER_H
+#define QMPXPLUDINDATAPARSER_H
+
+class MpxPluginData;
+class QString;
+class QStringRef;
+
+/**
+ * QMpxPluginDataParser
+ *
+ */
+class MpxPluginDataParser
+ {
+public:
+
+ /**
+ * Constructor
+ */
+ MpxPluginDataParser();
+
+ /**
+ * Destructor.
+ */
+ ~MpxPluginDataParser();
+
+ const MpxPluginData* data() const;
+
+ MpxPluginData* takeData();
+
+ void parse( const QString& aData );
+private:
+ bool findNextNode( const QString& aSrc, int& aOffset, QStringRef& aTagName, QStringRef& aTagContent ) const;
+ bool parseInt( int& aDst, const QString& aSrc ) const ;
+ void parseSupportedId( const QString& aValue );
+private:
+ MpxPluginData* dataPtr;
+ };
+
+#endif // QMPXPLUDINDATAPARSER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/inc/mpxviewpluginresolver.h Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+// This file defines the API for MpxViewPluginResolver.dll
+
+#ifndef __MPXVIEWPLUGINRESOLVER_H__
+#define __MPXVIEWPLUGINRESOLVER_H__
+
+#include <QList>
+
+#include <mpxviewpluginqt.h>
+
+#ifdef BUILD_VIEWFRAMEWORK
+#define VFDLL_EXPORT Q_DECL_EXPORT
+#else
+#define VFDLL_EXPORT Q_DECL_IMPORT
+#endif
+
+class MpxViewPluginResolverPrivate;
+
+class VFDLL_EXPORT MpxViewPluginResolver
+ {
+public:
+ // new functions
+ MpxViewPluginResolver( const QList<int>& );
+ virtual ~MpxViewPluginResolver();
+ MpxViewPlugin* resolvePlugin();
+private:
+ MpxViewPluginResolverPrivate* impl;
+ };
+
+#endif // __MPXVIEWPLUGINRESOLVER_H__
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/inc/mpxviewpluginresolver_p.h Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+// This file defines the API for MpxViewPluginResolver.dll
+
+#ifndef __MPXVIEWPLUGINRESOLVERPRIVATE_H__
+#define __MPXVIEWPLUGINRESOLVERPRIVATE_H__
+
+#include <QList>
+#include <xqpluginloader.h>
+#include <xqplugininfo.h>
+
+class MpxViewPlugin;
+class MpxPluginViewInterface;
+
+class MpxViewPluginResolverPrivate
+{
+public:
+ // new functions
+ MpxViewPluginResolverPrivate( const QList<int>& );
+ ~MpxViewPluginResolverPrivate();
+ MpxViewPlugin* resolvePlugin();
+private:
+ MpxPluginViewInterface* resolveAndLoadPlugins( const QList< XQPluginInfo >& impls );
+private:
+ const QList<int> requestedPlugins;
+};
+#endif // __MPXVIEWPLUGINRESOLVERPRIVATE_H__
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/mpxviewframeworkqt.pro Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,79 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#
+
+TEMPLATE = lib
+
+TARGET = mpxviewframeworkqt
+CONFIG += qt hb
+
+TARGET.UID3 = 0x2002B33F
+
+# QT -= gui
+
+DEPENDPATH += inc \
+ include \
+ src
+
+INCLUDEPATH += . \
+ ./inc \
+ ./include \
+ ../viewframework/include \
+ /epoc32/include/mw/hb/hbcore \
+ /epoc32/include/mw/hb/hbinput \
+ /epoc32/include/mw/hb/hbwidgets \
+ /epoc32/include/mw/hb/hbfeedback \
+ /epoc32/include/mw/hb/tools
+
+LIBS+= -lhbcore -lhbwidgets -lxqplugins
+
+DEFINES += BUILD_VIEWFRAMEWORK
+
+
+HEADERS += inc/mpxplugindata.h \
+ inc/mpxplugindataparser.h \
+ inc/mpxviewpluginresolver_p.h \
+ inc/mpxviewpluginresolver.h \
+ ../../mmappfw_plat/mpx_view_utility_api/inc/mpxviewframeworkqt.h \
+ ../../mmappfw_plat/mpx_base_view_plugins_api/inc/mpxviewpluginqt.h
+
+SOURCES += \
+ src/mpxplugindata.cpp \
+ src/mpxplugindataparser.cpp \
+ src/mpxviewpluginresolver.cpp \
+ src/mpxviewpluginresolver_p.cpp \
+ src/mpxviewframework.cpp
+
+symbian {
+
+TARGET.CAPABILITY = All -TCB
+TARGET.EPOCALLOWDATA = 1
+MMP_RULES += EPOCALLOWDLLDATA
+
+include(rom/rom.pri)
+
+myDefInclude = "NOSTRICTDEF" \
+"$${LITERAL_HASH}if defined(WINS)"\
+"DEFFILE bwins/mpxviewframeworkqt.def "\
+"$${LITERAL_HASH}else "\
+"DEFFILE eabi/mpxviewframeworkqt.def "\
+"$${LITERAL_HASH}endif"
+
+MMP_RULES += myDefInclude
+
+
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/rom/mpxviewframeworkqt.iby Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef MPXVIEWFRAMEWORKQT_IBY
+#define MPXVIEWFRAMEWORKQT_IBY
+
+#include <bldvariant.hrh>
+#include <data_caging_paths_for_iby.hrh>
+
+file=ABI_DIR\BUILD_DIR\mpxviewframeworkqt.dll SHARED_LIB_DIR\mpxviewframeworkqt.dll
+
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/rom/rom.pri Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,21 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+symbian {
+MP_IBY_DIR = $$section(PWD,":",1)
+
+BLD_INF_RULES.prj_exports += "$$MP_IBY_DIR/mpxviewframeworkqt.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mpxviewframeworkqt.iby)"
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/src/mpxplugindata.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "mpxplugindata.h"
+
+// -----------------------------------------------------------------------------
+// MpxPluginData
+// -----------------------------------------------------------------------------
+//
+MpxPluginData::MpxPluginData()
+:
+pluginId( 0 ),
+pluginType( 0 ),
+pluginPriority( EMPXViewPluginPriorityLowest ),
+pluginSupportedId()
+{
+ // No implementation required
+}
+
+// -----------------------------------------------------------------------------
+// ~MpxPluginData
+// -----------------------------------------------------------------------------
+//
+MpxPluginData::~MpxPluginData()
+{
+ pluginSupportedId.clear();
+}
+
+// -----------------------------------------------------------------------------
+// id
+// -----------------------------------------------------------------------------
+//
+int MpxPluginData::id()const
+{
+ return pluginId;
+}
+
+// -----------------------------------------------------------------------------
+// type
+// -----------------------------------------------------------------------------
+//
+int MpxPluginData::type()const
+{
+ return pluginType;
+}
+
+// -----------------------------------------------------------------------------
+// priority
+// -----------------------------------------------------------------------------
+//
+MpxPluginData::TMPXViewPluginPriorities MpxPluginData::priority() const
+{
+ return pluginPriority;
+}
+
+// -----------------------------------------------------------------------------
+// supportedId
+// -----------------------------------------------------------------------------
+//
+const QList<int>& MpxPluginData::supportedId() const
+{
+ return pluginSupportedId;
+}
+
+// -----------------------------------------------------------------------------
+// setId
+// -----------------------------------------------------------------------------
+//
+void MpxPluginData::setId( int value )
+{
+ pluginId = value;
+}
+
+// -----------------------------------------------------------------------------
+// setId
+// -----------------------------------------------------------------------------
+//
+void MpxPluginData::setType( int value )
+{
+ pluginType = value;
+}
+
+// -----------------------------------------------------------------------------
+// setType
+// -----------------------------------------------------------------------------
+//
+void MpxPluginData::setPriority( TMPXViewPluginPriorities value )
+{
+ pluginPriority = value;
+}
+
+// -----------------------------------------------------------------------------
+// addSupportedId
+// -----------------------------------------------------------------------------
+//
+void MpxPluginData::addSupportedId( int value )
+{
+ pluginSupportedId.append( value );
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/src/mpxplugindataparser.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,214 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "mpxplugindataparser.h"
+#include "mpxplugindata.h"
+#include <QString>
+
+
+
+const int gParserHexBase( 16 );
+const int gParserDecBase( 10 );
+
+static MpxPluginData::TMPXViewPluginPriorities parsePriority( const QStringRef& src );
+
+
+// ----------------------------------------------------------------------------
+// MpxPluginDataParser()
+// ----------------------------------------------------------------------------
+//
+MpxPluginDataParser::MpxPluginDataParser()
+:
+dataPtr( NULL )
+{
+ // No implementation required
+}
+
+// ----------------------------------------------------------------------------
+// ~MpxPluginDataParser()
+// ----------------------------------------------------------------------------
+//
+MpxPluginDataParser::~MpxPluginDataParser()
+{
+ if( NULL != dataPtr ){
+ delete dataPtr;
+ }
+}
+
+// ----------------------------------------------------------------------------
+// data()
+// ----------------------------------------------------------------------------
+//
+const MpxPluginData* MpxPluginDataParser::data() const
+{
+ return dataPtr;
+}
+
+// ----------------------------------------------------------------------------
+// takeData()
+// ----------------------------------------------------------------------------
+//
+MpxPluginData* MpxPluginDataParser::takeData()
+{
+ MpxPluginData* retVal( dataPtr );
+ if( NULL != dataPtr ){
+ dataPtr = NULL;
+ }
+ return retVal;
+}
+
+// ----------------------------------------------------------------------------
+// parse( const QString& data )
+// ----------------------------------------------------------------------------
+//
+void MpxPluginDataParser::parse( const QString& data )
+{
+ const QString PluginIdTag( "p" );
+ const QString PluginTypeTag( "t" );
+ const QString PluginPriorityTag( "i" );
+ const QString PluginSupportedTag( "f" );
+
+ QStringRef tagName,
+ tagContent;
+ int parserOffset( 0 );
+ if( NULL != dataPtr ){
+ delete dataPtr;
+ dataPtr = NULL;
+ }
+ int integerNodeRepresentation( 0 );
+ while( findNextNode( data, parserOffset, tagName, tagContent ) ){
+
+ if( NULL == dataPtr ){
+ dataPtr = new MpxPluginData();
+ }
+ if( PluginIdTag == tagName ){
+ if( parseInt( integerNodeRepresentation, tagContent.toString() ) )
+ dataPtr->setId( integerNodeRepresentation );
+ }else if( PluginTypeTag == tagName ){
+ if( parseInt( integerNodeRepresentation, tagContent.toString() ) ) {
+ dataPtr->setType( integerNodeRepresentation );
+ }
+ }else if( PluginPriorityTag == tagName ){
+ dataPtr->setPriority( parsePriority( tagContent ) );
+ }else if( PluginSupportedTag == tagName ){
+ parseSupportedId( tagContent.toString() );
+ }
+ }
+}
+
+// ----------------------------------------------------------------------------
+// findNextNode( const QString& src, int& offset, QStringRef& tagName, QStringRef& tagContent )
+// ----------------------------------------------------------------------------
+//
+bool MpxPluginDataParser::findNextNode( const QString& src, int& offset, QStringRef& tagName, QStringRef& tagContent ) const
+{
+ const QChar endOfTag( '>' );
+ const QString beginOfStopTag( "</" );
+
+
+ int nodeBeginOffset = src.indexOf( endOfTag, offset, Qt::CaseSensitive );
+ if( nodeBeginOffset <= offset ){
+ //next "start tag" wasn't found. skip parsing
+ return false;
+ }
+ ++nodeBeginOffset;
+ int nodeEndOffset = src.indexOf( endOfTag, nodeBeginOffset, Qt::CaseSensitive );
+ if( nodeEndOffset <= nodeBeginOffset ){
+ //next "stop tag" wasn't found. skip parsing
+ return false;
+ }
+ int nodeStopBegin = src.indexOf( beginOfStopTag, nodeBeginOffset, Qt::CaseSensitive );
+ offset = nodeEndOffset + 1;
+ if( nodeStopBegin <= nodeBeginOffset ){
+ //error invalid document format
+ return false;
+ }
+ const int nameBegin( nodeStopBegin + beginOfStopTag.length() );
+ tagName = src.midRef( nameBegin, nodeEndOffset - nameBegin );
+ tagContent = src.midRef( nodeBeginOffset, nodeStopBegin - nodeBeginOffset );
+ return true;
+}
+
+// ----------------------------------------------------------------------------
+// parseInt( int& aDst, const QString& src ) const
+// ----------------------------------------------------------------------------
+//
+bool MpxPluginDataParser::parseInt( int& aDst, const QString& src ) const
+{
+ const int parserBasesByPriority[] = { gParserHexBase, gParserDecBase },
+ parserSupportedBases( 2 );
+ bool retVal( false );
+ for( int iter( 0 ); !retVal && iter < parserSupportedBases; ++iter ){
+ aDst = src.toInt( &retVal, parserBasesByPriority[ iter ] );
+ }
+ return retVal;
+}
+
+// ----------------------------------------------------------------------------
+// parseSupportedId( const QString& value )
+// ----------------------------------------------------------------------------
+//
+void MpxPluginDataParser::parseSupportedId( const QString& value )
+{
+ if( NULL == dataPtr ) {
+ return;
+ }
+ int from( 0 ), to( 0 ), tagValue;
+ const QChar coma( ',' );
+ do{
+ if( from >= value.length() ){
+ break;
+ }
+ to = value.indexOf( coma, from );
+ if( to < from ){
+ to = value.length();
+ }
+ if( parseInt( tagValue, value.mid( from, to - from ) ) ){
+ dataPtr->addSupportedId( tagValue );
+ }
+ from = ( to + 1 );
+ }while( true );
+}
+
+// ----------------------------------------------------------------------------
+// parseSupportedId( const QString& value )
+// ----------------------------------------------------------------------------
+//
+MpxPluginData::TMPXViewPluginPriorities parsePriority( const QStringRef& src )
+{
+
+ const QString MPXViewPluginPriorityLowestTag( "EMPXViewPluginPriorityLowest" );
+ const QString MPXViewPluginPriorityLowTag( "EMPXViewPluginPriorityLow" );
+ const QString MPXViewPluginPriorityNormalTag( "EMPXViewPluginPriorityNormal" );
+ const QString MPXViewPluginPriorityHighTag( "EMPXViewPluginPriorityHigh" );
+ const QString MPXViewPluginPriorityHighestTag( "EMPXViewPluginPriorityHighest" );
+
+ MpxPluginData::TMPXViewPluginPriorities
+ retVal( MpxPluginData::EMPXViewPluginPriorityLowest );
+ if( MPXViewPluginPriorityLowTag == src ){
+ retVal = MpxPluginData::EMPXViewPluginPriorityLow;
+ }else if( MPXViewPluginPriorityNormalTag == src ){
+ retVal = MpxPluginData::EMPXViewPluginPriorityNormal;
+ }else if( MPXViewPluginPriorityHighTag == src ){
+ retVal = MpxPluginData::EMPXViewPluginPriorityHigh;
+ }else if( MPXViewPluginPriorityHighestTag == src ){
+ retVal = MpxPluginData::EMPXViewPluginPriorityHighest;
+ }
+ return retVal;
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/src/mpxviewframework.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <hbmainwindow.h>
+#include <hbview.h>
+
+#include <mpxviewframeworkqt.h>
+#include <mpxviewpluginresolver.h>
+#include <mpxviewpluginqt.h>
+
+MpxViewFramework::MpxViewFramework(QWidget *parent, Hb::WindowFlags windowFlags)
+:
+HbMainWindow(parent, windowFlags)
+{
+}
+
+MpxViewFramework::~MpxViewFramework()
+{
+}
+
+MpxViewPlugin *MpxViewFramework::resolvePlugin(const QList<int>& requestedPlugins)
+{
+ MpxViewPlugin *viewPlugin = 0;
+ MpxViewPluginResolver *viewResolver = new MpxViewPluginResolver(requestedPlugins);
+ if (viewResolver!=0) {
+ viewPlugin = viewResolver->resolvePlugin();
+ delete viewResolver;
+ }
+ return viewPlugin;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/src/mpxviewpluginresolver.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "mpxviewpluginresolver.h" // MpxViewPluginResolver
+#include "mpxviewpluginresolver_p.h" // MpxViewPluginResolverPrivate
+
+// -----------------------------------------------------------------------------
+// MpxViewPluginResolver()
+// -----------------------------------------------------------------------------
+//
+MpxViewPluginResolver::MpxViewPluginResolver( const QList<int>& requestedPlugins )
+:
+impl ( new MpxViewPluginResolverPrivate( requestedPlugins ) )
+{}
+
+// -----------------------------------------------------------------------------
+// ~MpxViewPluginResolver()
+// -----------------------------------------------------------------------------
+//
+MpxViewPluginResolver::~MpxViewPluginResolver()
+{
+ if( impl ) {
+ delete impl;
+ }
+}
+// -----------------------------------------------------------------------------
+// resolvePlugin()
+// -----------------------------------------------------------------------------
+//
+MpxViewPlugin* MpxViewPluginResolver::resolvePlugin()
+{
+ return impl ? impl->resolvePlugin() : 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/src/mpxviewpluginresolver_p.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,188 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "mpxviewpluginresolver_p.h" // MpxViewPluginResolverPrivate
+#include "mpxplugindata.h"
+#include "mpxplugindataparser.h"
+
+#include <mpxviewpluginqt.h>
+#include <QHash>
+
+const char gRequestedPluginInterfaceName [] = "org.nokia.mmdt.MpxViewPlugin/1.0";
+
+const int gNoneScore( 0 );
+const int gSupportedScore( 5 );
+const int gImplementationScore( 100 );
+const int gTypeScore( 1 );
+
+// ----------------------------------------------------------------------------
+// score
+// ----------------------------------------------------------------------------
+//
+static int score( int , const MpxPluginData& );
+
+// -----------------------------------------------------------------------------
+//MpxViewPluginResolverPrivate
+// -----------------------------------------------------------------------------
+//
+MpxViewPluginResolverPrivate::MpxViewPluginResolverPrivate(
+ const QList<int>& request )
+:
+requestedPlugins( request )
+{
+ //No implementation needed
+}
+
+// -----------------------------------------------------------------------------
+// ~MpxViewPluginResolverPrivate
+// -----------------------------------------------------------------------------
+//
+MpxViewPluginResolverPrivate::~MpxViewPluginResolverPrivate()
+{
+ //No implementation needed
+}
+
+// -----------------------------------------------------------------------------
+// resolvePlugin()
+// -----------------------------------------------------------------------------
+//
+MpxViewPlugin* MpxViewPluginResolverPrivate::resolvePlugin()
+{
+ MpxPluginViewInterface* retVal = 0;
+ if( 0 < requestedPlugins.count() ){
+ XQPluginLoader loader;
+ QList< XQPluginInfo > impls;
+ if (loader.listImplementations(gRequestedPluginInterfaceName, impls)) {
+ retVal = resolveAndLoadPlugins( impls );
+ }
+ }
+ return (retVal!=0) ? retVal->viewPlugin() : 0;
+}
+
+// ----------------------------------------------------------------------------
+// resolveAndLoadPlugins( const QList< XQPluginInfo >& impls );
+// ----------------------------------------------------------------------------
+//
+MpxPluginViewInterface* MpxViewPluginResolverPrivate::resolveAndLoadPlugins(
+ const QList< XQPluginInfo >& impls )
+{
+ MpxPluginViewInterface* retVal = 0;
+
+ //parse plugin info data
+ QHash<const XQPluginInfo*, MpxPluginData* > parsedInfo;
+ QList< XQPluginInfo >::const_iterator iter( impls.begin() );
+ MpxPluginDataParser parser;
+ for( ; iter != impls.end(); ++iter ){
+ if( 0 < ( *iter ).opaqueData().length() ){
+ parser.parse( ( *iter ).opaqueData() );
+ if( parser.data() ){
+ parsedInfo.insert( &( *iter ), parser.takeData() );
+ }
+ }
+ }
+
+ //look for optimal plugin
+ QList<int> uids( requestedPlugins );
+ QList<int>::iterator currentUidIter,
+ optimalUidIter;
+ QHash<const XQPluginInfo*, MpxPluginData* >::iterator
+ currentInfoIter,
+ optimalInfoIter;
+ int currentPluginScore( 0 ),
+ optimalPluginScore( 0 );
+
+ do{
+ //initialize iterators with invalid objects
+ optimalInfoIter = parsedInfo.end();
+
+ for( currentUidIter = uids.begin();
+ uids.end() != currentUidIter;
+ ++currentUidIter )
+ {
+ for( currentInfoIter = parsedInfo.begin();
+ parsedInfo.end() != currentInfoIter;
+ ++currentInfoIter )
+ {
+ currentPluginScore = score( (*currentUidIter ),
+ (*(*currentInfoIter) ) );
+ if( gNoneScore < currentPluginScore ){
+ if( parsedInfo.end() == optimalInfoIter ){
+ //first plugin with no zero score. set as optimal
+ optimalPluginScore = currentPluginScore;
+ optimalInfoIter = currentInfoIter;
+ optimalUidIter = currentUidIter;
+ }
+ if( optimalPluginScore < currentPluginScore ||
+ ( ( currentPluginScore == optimalPluginScore ) &&
+ ( ( *currentInfoIter )->priority() > ( *optimalInfoIter )->priority() ) ) )
+ {
+ //current plugin fits better then "optimal" one
+ optimalPluginScore = currentPluginScore;
+ optimalInfoIter = currentInfoIter;
+ optimalUidIter = currentUidIter;
+ }
+ }
+ }
+ }
+ if( parsedInfo.end() == optimalInfoIter ){
+ //plugin was not found
+ break;
+ }
+ XQPluginLoader loader( optimalInfoIter.key()->uid() );
+ if( loader.load() ) {
+ retVal = qobject_cast<MpxPluginViewInterface*>(loader.instance());
+ }
+ //remove already loaded plugin description
+ delete ( *optimalInfoIter );
+ parsedInfo.erase( optimalInfoIter );
+ uids.erase( optimalUidIter );
+
+ }while( NULL == retVal );
+ uids.clear();
+
+ //clear parsed data structures
+ for( currentInfoIter = parsedInfo.begin();
+ parsedInfo.end() != currentInfoIter;
+ currentInfoIter = parsedInfo.erase( currentInfoIter ) ){
+ delete ( *currentInfoIter );
+ }
+ return retVal;
+}
+// ----------------------------------------------------------------------------
+// score
+// ----------------------------------------------------------------------------
+//
+int score( int uid, const MpxPluginData& pluginData )
+{
+ int retVal( gNoneScore );
+ QList< int >::const_iterator iter( pluginData.supportedId().begin() );
+ for( ; iter != pluginData.supportedId().end(); ++iter ){
+ if( ( *iter ) == uid ){
+ retVal += gSupportedScore;
+ }
+ }
+ if( pluginData.id() == uid ){
+ retVal += gImplementationScore;
+ }
+ if( pluginData.type() == uid ){
+ retVal += gTypeScore;
+ }
+
+ qDebug(QString("Score 0x%1: %2").arg(uid, 0, 16).arg(retVal).toLatin1().data());
+
+ return retVal;
+}
--- a/mpx/playbackframework/playbackengine/inc/mpxplaybackengine.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mpx/playbackframework/playbackengine/inc/mpxplaybackengine.h Fri Mar 19 09:38:24 2010 +0200
@@ -924,6 +924,34 @@
*/
void Init64L(RFile64* aFile, TInt aAccessPoint=0);
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+ /**
+ * Callback for sync message timer
+ *
+ * @since 9.2
+ * @param this
+ * @return systme error
+ */
+ static TInt SyncMsgTimerCallback(TAny* aPtr);
+ /**
+ * Cancel the sync message timer
+ *
+ * @since 9.2
+ */
+ void CancelSyncMsgTimer();
+ /**
+ * Stop the wait loop
+ *
+ * @since 9.2
+ */
+ void StopWaitLoop();
+ /**
+ * Handle a synchronous message
+ *
+ * @since 9.2
+ * @param aMsg, message
+ * @return system error
+ */
+ TInt HandlePlaybackSyncMessage (const CMPXMessage& aMsg);
private:
friend class TCallbackReflector;
@@ -992,6 +1020,8 @@
TBool iInitVolume; // Initialize volume on first creation
// the index which be firstly saved when request media
TInt iFirstRequestMediaIndex;
+ CPeriodic* iSyncMsgTimer; //timer for sync message
+ CActiveSchedulerWait* iSyncMsgWait; // wait loop use to sync message
#if defined(__HIGH_RESOLUTION_VOLUME)
// flag to indicate whether the volume setting has been rounded up last
// used to adjust volume up button setting
--- a/mpx/playbackframework/playbackengine/src/mpxaccessoryobserver.cpp Tue Feb 02 00:27:58 2010 +0200
+++ b/mpx/playbackframework/playbackengine/src/mpxaccessoryobserver.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -211,9 +211,6 @@
case EAccModeHeadphones:
mode = EPbAccessoryHeadphones;
break;
- case EAccModeHDMI:
- mode = EPbAccessoryHDMI;
- break;
default:
break;
}
--- a/mpx/playbackframework/playbackengine/src/mpxplaybackengine.cpp Tue Feb 02 00:27:58 2010 +0200
+++ b/mpx/playbackframework/playbackengine/src/mpxplaybackengine.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -47,6 +47,7 @@
const TInt KMPXSmallVolumeIncrement = 5;
const TInt KMPXLargeVolumeIncrement = 10;
const TInt KPercentMultiplier = 100;
+const TInt KMPXSyncMsgTimer = 3000000; // 3 seconds
_LIT(KWmaExtension, ".wma");
_LIT(KRaExtension, ".ra");
@@ -186,6 +187,8 @@
iVolRoundedUp = EFalse;
#endif
iPluginHandler->Plugin()->PropertyL( EPbPropertyVolume );
+ iSyncMsgTimer = CPeriodic::NewL( CActive::EPriorityIdle );
+ iSyncMsgWait = new (ELeave) CActiveSchedulerWait;
}
// ----------------------------------------------------------------------------
@@ -232,6 +235,12 @@
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
iFile64.Close();
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+ delete iSyncMsgTimer;
+ if (iSyncMsgWait && iSyncMsgWait->IsStarted() )
+ {
+ iSyncMsgWait->AsyncStop();
+ }
+ delete iSyncMsgWait;
}
// ----------------------------------------------------------------------------
@@ -2175,6 +2184,11 @@
iAutoResumeHandler->SetAutoResume( aData );
break;
}
+ case EPbCmdSyncMsgComplete:
+ {
+ StopWaitLoop();
+ break;
+ }
default:
ASSERT(0);
}
@@ -3859,4 +3873,71 @@
}
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+// ----------------------------------------------------------------------------
+// Cancel timer.
+// ----------------------------------------------------------------------------
+void CMPXPlaybackEngine::CancelSyncMsgTimer()
+ {
+ MPX_FUNC("CMPXPlaybackEngine::CancelSyncMsgTimer()");
+ // Cancel timer.
+ if ( iSyncMsgTimer && iSyncMsgTimer->IsActive() )
+ {
+ MPX_DEBUG1("CMPXPlaybackEngine::CancelSyncMsgTimer(): Timer active, cancelling");
+ iSyncMsgTimer->Cancel();
+ }
+ }
+// ----------------------------------------------------------------------------
+// Callback for timer.
+// ----------------------------------------------------------------------------
+TInt CMPXPlaybackEngine::SyncMsgTimerCallback(TAny* aPtr)
+ {
+ MPX_FUNC("CMPXPlaybackEngine::SyncMsgTimerCallback()");
+ CMPXPlaybackEngine* ptr =
+ static_cast<CMPXPlaybackEngine*>(aPtr);
+ ptr->StopWaitLoop();
+ return KErrNone;
+ }
+// ----------------------------------------------------------------------------
+// Handle a synchronous message
+// ----------------------------------------------------------------------------
+//
+TInt CMPXPlaybackEngine::HandlePlaybackSyncMessage (const CMPXMessage& aMsg)
+ {
+ MPX_FUNC("CMPXPlaybackEngine::HandlePlaybackSyncMessage()");
+ TInt err = iClientList->SendSyncMsg(&aMsg);
+ if (err != KErrNone)
+ {
+ return err;
+ }
+ // Cancel timer.
+ CancelSyncMsgTimer();
+ // Start timer in case there is no callback from primary client.
+ iSyncMsgTimer->Start(
+ KMPXSyncMsgTimer,
+ KMPXSyncMsgTimer,
+ TCallBack(SyncMsgTimerCallback, this ));
+
+ // Start wait loop until we get a callback from primary client
+ if ( !iSyncMsgWait->IsStarted() )
+ {
+ iSyncMsgWait->Start();
+ }
+ return KErrNone;
+ }
+// ----------------------------------------------------------------------------
+// Stop the wait loop.
+// ----------------------------------------------------------------------------
+void CMPXPlaybackEngine::StopWaitLoop()
+ {
+ MPX_FUNC("CMPXPlaybackEngine::StopWaitLoop()");
+ // Cancel timer
+ CancelSyncMsgTimer();
+
+ // Stop wait loop to unblock.
+ if ( iSyncMsgWait->IsStarted() )
+ {
+ MPX_DEBUG1("CMPXPlaybackEngine::StopWaitLoop(): Stopping the wait loop.");
+ iSyncMsgWait->AsyncStop();
+ }
+ }
// End of file
--- a/mpx/playbackframework/playbackserver/src/mpxplaybackserversession.cpp Tue Feb 02 00:27:58 2010 +0200
+++ b/mpx/playbackframework/playbackserver/src/mpxplaybackserversession.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -515,6 +515,11 @@
break;
}
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+ case EPbsSetPrimaryClient:
+ {
+ aMsgHandleResult = iPlayer->ClientList()->SetPrimaryClient(*iMessageQueue);
+ break;
+ }
default:
{
PanicClient(aMessage,KErrNotSupported);
--- a/mpx/playbackframework/playbackutility/inc/mpxplaybackutilityimpl.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mpx/playbackframework/playbackutility/inc/mpxplaybackutilityimpl.h Fri Mar 19 09:38:24 2010 +0200
@@ -583,6 +583,13 @@
virtual void InitStreaming64L(RFile64& aShareableFile, const TInt aAccessPoint);
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+ /**
+ * Sets the primary client
+ *
+ * @since S60 9.2
+ * @return system error
+ */
+ TInt SetPrimaryClientL();
private:
--- a/mpx/playbackframework/playbackutility/src/mpxplaybackutilityimpl.cpp Tue Feb 02 00:27:58 2010 +0200
+++ b/mpx/playbackframework/playbackutility/src/mpxplaybackutilityimpl.cpp Fri Mar 19 09:38:24 2010 +0200
@@ -367,11 +367,8 @@
EPbCmdPlayPause == cmdType ||
EPbCmdStop == cmdType)
{
- if( !aCmd.IsSupported( KMPXCommandPlaybackGeneralClientPid ) )
- {
- aCmd.SetTObjectValueL<TProcessId> (
- KMPXCommandPlaybackGeneralClientPid, RProcess().Id()); // current process id
- }
+ aCmd.SetTObjectValueL<TProcessId>(KMPXCommandPlaybackGeneralClientPid,
+ RProcess().Id()); // current process id
}
}
@@ -1337,4 +1334,13 @@
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+// ----------------------------------------------------------------------------
+// Set primary client
+// ----------------------------------------------------------------------------
+//
+TInt CMPXPlaybackUtility::SetPrimaryClientL()
+ {
+ MPX_FUNC("CMPXPlaybackUtility::SetPrimaryClientL");
+ return iPbs.SendReceiveL(EPbsSetPrimaryClient);
+ }
// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysdef_1_5_1.dtd Fri Mar 19 09:38:24 2010 +0200
@@ -0,0 +1,88 @@
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+ name CDATA #REQUIRED
+ schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+ name CDATA #REQUIRED
+ levels CDATA #IMPLIED
+ span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset name CDATA #REQUIRED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+ name CDATA #REQUIRED
+ level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+ unitID ID #REQUIRED
+ name CDATA #REQUIRED
+ mrp CDATA #REQUIRED
+ filter CDATA #IMPLIED
+ bldFile CDATA #REQUIRED
+ priority CDATA #IMPLIED
+ contract CDATA #IMPLIED
+ proFile CDATA #IMPLIED
+ qmakeArgs CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+ name CDATA #REQUIRED
+ mrp CDATA #REQUIRED
+ filter CDATA #IMPLIED
+ contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+ name CDATA #REQUIRED
+ version CDATA #REQUIRED
+ late (Y|N) #IMPLIED
+ filter CDATA #IMPLIED
+ contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+ name ID #REQUIRED
+ description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+ name ID #REQUIRED
+ description CDATA #REQUIRED
+ target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+ name ID #REQUIRED
+ abldTarget CDATA #REQUIRED
+ description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+ name ID #REQUIRED
+ abldOption CDATA #REQUIRED
+ description CDATA #REQUIRED
+ enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+ name ID #REQUIRED
+ description CDATA #REQUIRED
+ filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+ command CDATA #REQUIRED
+ targetList IDREFS #IMPLIED
+ unitParallel (Y | N | y | n) #REQUIRED
+ targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+ name CDATA #REQUIRED
+ cwd CDATA #REQUIRED
+ command CDATA #REQUIRED>