Merge fix for bug 1961.
--- a/inc/mmappfwbldvariant.hrh Fri Feb 19 16:32:39 2010 +0000
+++ b/inc/mmappfwbldvariant.hrh Wed Jun 23 17:51:16 2010 +0100
@@ -20,7 +20,7 @@
#ifndef MMAPPFWBLDVARIANT_HRH
#define MMAPPFWBLDVARIANT_HRH
-#define IAD_INCLUDE_BACKSTEPPING
+#undef IAD_INCLUDE_BACKSTEPPING
#define IAD_INCLUDE_AUDIOFETCHER
#endif // MMAPPFWBLDVARIANT_HRH
--- a/layers.sysdef.xml Fri Feb 19 16:32:39 2010 +0000
+++ b/layers.sysdef.xml Wed Jun 23 17:51:16 2010 +0100
@@ -1,14 +1,16 @@
<?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=""/>
+ <unit unitID="qtms" name="qtms" bldFile="&layer_real_source_path;/qtms" proFile="qtmsapi.pro" qmakeArgs="-r -config rom" mrp=""/>
</module>
</layer>
@@ -27,6 +29,8 @@
<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=""/>
+ <unit unitID="qtms_group" name="qtms_group" bldFile="&layer_real_source_path;/qtms" proFile="qtmsapi.pro" qmakeArgs="-r -config rom" mrp=""/>
</module>
</layer>
--- a/mmappcomponents/asxparser/group/asxparser.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/asxparser/group/asxparser.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 9.1.2 %
+// Version : %version: 9.1.5 %
#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 Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/asxparser/inc/AsxParser_debug.h Wed Jun 23 17:51:16 2010 +0100
@@ -15,8 +15,7 @@
*
*/
-// Version : %version: 4.1.1 %
-
+// Version : %version: 4.1.4 %
#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 Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/asxparser/src/asxparser.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: e003sa33#10.1.6 %
+// Version : %version: 10.1.5.1.2 %
--- a/mmappcomponents/asxparser/test/test.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/asxparser/test/test.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -12,12 +12,10 @@
* Contributors:
*
* Description: Simple v2/v3 ASX-fileparser
- *
+*
*/
-// Version : %version: e003sa33#6 %
-
-
+// Version : %version: 9 %
#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 Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/asxparser/test/test.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 9 %
+// Version : %version: 12 %
@@ -41,5 +41,4 @@
LIBRARY bafl.lib
LIBRARY efsrv.lib
-LIBRARY flogger.lib
LIBRARY charconv.lib
--- a/mmappcomponents/audiofetcher/inc/audiofetcherdialog.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/audiofetcher/inc/audiofetcherdialog.h Wed Jun 23 17:51:16 2010 +0100
@@ -133,6 +133,13 @@
CGulIcon* IconL(TAknsItemID aId, const TDesC& aFileName,
TInt aFileIndex, TInt aFileMaskIndex);
+ CGulIcon* ColorIconL( const TAknsItemID& aId,
+ const TDesC& aFileName,
+ TInt aFilexIndex,
+ TInt aFileMaskIndex,
+ const TAknsItemID& aColorId,
+ TInt aColorIndex );
+
void UpdateListBoxL();
/**
--- a/mmappcomponents/audiofetcher/src/audiofetcherdialog.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/audiofetcher/src/audiofetcherdialog.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -196,7 +196,7 @@
case EAknSoftkeySelect :
{
TInt index = CurrentItemListIndex();
- TBuf<128> fileName;
+ TFileName fileName;
iFileHandler->GetAttribute( index, CAudioFetcherFileHandler::EAttrFullName, fileName, 0 );
iSelectedFiles.AppendL( fileName );
@@ -388,14 +388,18 @@
EMbmAudiofetcherQgn_prop_sml_sync_off_mask ) );
// memory card icon
- icons->AppendL( IconL( KAknsIIDQgnIndiMmcAdd, iIconFileName,
+ icons->AppendL( ColorIconL( KAknsIIDQgnIndiMmcAdd, iIconFileName,
EMbmAudiofetcherQgn_indi_mmc_add,
- EMbmAudiofetcherQgn_indi_mmc_add_mask ) );
+ EMbmAudiofetcherQgn_indi_mmc_add_mask,
+ KAknsIIDQsnIconColors,
+ EAknsCIQsnIconColorsCG26 ) );
// mass storage icon
- icons->AppendL( IconL( KAknsIIDQgnPropLinkEmbdSmall, iIconFileName,
+ icons->AppendL( ColorIconL( KAknsIIDQgnPropLinkEmbdSmall, iIconFileName,
EMbmAudiofetcherQgn_indi_fmgr_ms_add,
- EMbmAudiofetcherQgn_indi_fmgr_ms_add_mask ) );
+ EMbmAudiofetcherQgn_indi_fmgr_ms_add_mask,
+ KAknsIIDQsnIconColors,
+ EAknsCIQsnIconColorsCG26 ) );
// empty icon
icons->AppendL( IconL( KAknsIIDQgnPropEmpty, KAvkonBitmapFile,
@@ -455,6 +459,45 @@
return icon;
}
+// -----------------------------------------------------------------------------
+// CMediaFileDialog::ColorIconL
+//
+// -----------------------------------------------------------------------------
+//
+CGulIcon* CAudioFetcherDialog::ColorIconL( const TAknsItemID& aId,
+ const TDesC& aFileName,
+ TInt aFilexIndex,
+ TInt aFileMaskIndex,
+ const TAknsItemID& aColorId,
+ TInt aColorIndex )
+ {
+ WLOG("CAudioFetcherDialog::ColorIconL");
+
+ CFbsBitmap* bitmap( NULL );
+ CFbsBitmap* mask( NULL );
+
+ if ( aColorId == KAknsIIDNone )
+ {
+ // do not use theme color, use the default color from the file
+ AknsUtils::CreateIconLC( AknsUtils::SkinInstance(), aId,
+ bitmap, mask, aFileName, aFilexIndex, aFileMaskIndex );
+ }
+ else
+ {
+ // use theme color
+ AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(), aId, aColorId, aColorIndex,
+ bitmap, mask, aFileName, aFilexIndex, aFileMaskIndex, KRgbBlack );
+ }
+
+ CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
+ icon->SetBitmapsOwnedExternally( EFalse );
+
+ // icon now owns the bitmaps, no need to keep on cleanup stack.
+ CleanupStack::Pop( 2 ); // mask, bitmap
+
+ return icon;
+ }
+
// -----------------------------------------------------------------------------
// CMediaFileDialog::UpdateListBoxL
@@ -468,13 +511,7 @@
{
return;
}
-
- TInt resultCount = iFileHandler->ResultCount();
-
- if(resultCount > 0){
- CEikButtonGroupContainer& dialogCba = ButtonGroupContainer();
- dialogCba.MakeCommandVisible(EAknSoftkeySelect, ETrue);
- }
+
iListBox->HandleItemAdditionL();
iListBox->SetCurrentItemIndex( 0 );
DrawNow();
@@ -563,7 +600,7 @@
switch ( aEventType )
{
- case EEventItemDoubleClicked: // fallthrough
+ case EEventItemSingleClicked: // fallthrough
case EEventEnterKeyPressed:
{
TBool closeDialog = HandleListSelectionL();
@@ -891,7 +928,7 @@
TBool closeDialog = EFalse;
TInt index = CurrentItemListIndex();
- TBuf<128> fileName;
+ TFileName fileName;
iFileHandler->GetAttribute( index, CAudioFetcherFileHandler::EAttrFullName, fileName, 0 );
iSelectedFiles.AppendL( fileName );
--- a/mmappcomponents/collectionhelper/group/mpxcollectionhelper.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/collectionhelper/group/mpxcollectionhelper.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -29,6 +29,8 @@
MACRO RD_MPX_TNM_INTEGRATION
#define RD_MPX_TNM_INTEGRATION
+MACRO ABSTRACTAUDIOALBUM_INCLUDED
+#define ABSTRACTAUDIOALBUM_INCLUDED
//MACRO RD_MPX_COLLECTION_CACHE
SOURCEPATH ../src
SOURCE mpxcollectionhelperfactory.cpp
--- a/mmappcomponents/collectionhelper/inc/mpxcollectionuihelperimp.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/collectionhelper/inc/mpxcollectionuihelperimp.h Wed Jun 23 17:51:16 2010 +0100
@@ -649,6 +649,16 @@
void HandleOpenL(const CMPXCollectionPlaylist& aPlaylist,TInt aError);
/**
+ * From MMPXCollectionObserver
+ * Handles completion of a asynchronous command.
+ *
+ * @param aCommandResult result of the command, NULL if error
+ * @param aError error code
+ */
+ virtual void HandleCommandComplete(CMPXCommand* aCommandResult,
+ TInt aError);
+
+ /**
* From MMPXMoveItemObserver
* @param aErr, error for the operation
*/
--- a/mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: Extended collection helper with an internal caching array
-* Version : %version: da1mmcf#27.1.12 %
+* Version : %version: da1mmcf#27.1.12.3.2 %
*
*/
@@ -30,6 +30,10 @@
#include <mpxcollectioncommanddefs.h>
#include <mpxmediamtpdefs.h>
+#include <e32property.h> // for RProperty
+#include <UsbWatcherInternalPSKeys.h>
+#include <usbpersonalityids.h>
+
#include <mpxcollectionutility.h>
#include <mpxharvesterutility.h>
@@ -153,13 +157,38 @@
MPX_FUNC("CMPXCollectionCachedHelper::::AddL");
// Commit when we have cached more than a set amount
//
- if( iCache->Count() >= KCacheCount)
+
+ TInt cacheCount = KCacheCount;
+ TInt usbStatus;
+ RProperty::Get( KPSUidUsbWatcher, KUsbWatcherSelectedPersonality, usbStatus );
+
+ // if MTP is not connected via USB, disable caching mechanism and flush immediately
+ // in case UI is not blocked and need to reflect the change in real time
+ // this logic is hardly invoked during MTP, because ::FindAllL (which flush) is always called before AddL
+ if ((usbStatus != KUsbPersonalityIdMTP) && (usbStatus != KUsbPersonalityIdPCSuiteMTP))
+ cacheCount = 1;
+
+ if( iCache->Count() >= cacheCount)
+ Commit();
+
+ #ifdef ABSTRACTAUDIOALBUM_INCLUDED
+ TBool extract = ETrue;
+ if( aMedia->IsSupported( KMPXMediaMTPSampleDataFlag ) )
{
- Commit();
+
+ extract = aMedia->ValueTObjectL<TBool>( KMPXMediaMTPSampleDataFlag );
+ MPX_DEBUG2("CMPXCollectionCachedHelper::AddL KMPXMediaMTPSampleDataFlag is set. extract=%d", extract );
}
+ if( extract )
+ {
+ // Extract album art from the file
+ iMetadataExtractor->ExtractAlbumArtL( aMedia );
+ }
+#else
// Extract album art from the file
iMetadataExtractor->ExtractAlbumArtL( aMedia );
+#endif
CMPXMedia* copy = CMPXMedia::NewL( *aMedia );
CleanupStack::PushL( copy );
@@ -332,7 +361,20 @@
void CMPXCollectionCachedHelper::SetL( CMPXMedia*& aMedia )
{
MPX_DEBUG1("CMPXCollectionCachedHelper::::SetL <--");
-
+
+#ifdef ABSTRACTAUDIOALBUM_INCLUDED
+ if( aMedia->IsSupported( KMPXMediaMTPSampleDataFlag ) )
+ {
+ TBool flag = aMedia->ValueTObjectL<TBool>( KMPXMediaMTPSampleDataFlag );
+ MPX_DEBUG2("CMPXCollectionCachedHelper::SetL KMPXMediaMTPSampleDataFlag is set. flag=%d", flag );
+ if( flag )
+ {
+ iMetadataExtractor->ExtractAlbumArtL( aMedia );
+ }
+ return;
+ }
+#endif
+
const TDesC& newUri = aMedia->ValueText( KMPXMediaGeneralUri );
TInt count( iCache->Count() );
@@ -718,8 +760,20 @@
#else //RD_MPX_COLLECTION_CACHE
MPX_DEBUG1("CMPXCollectionCachedHelper::GetL <--");
+
+ TInt usbStatus;
+ RProperty::Get( KPSUidUsbWatcher, KUsbWatcherSelectedPersonality, usbStatus );
+
+ // if MTP is not connected via USB, flush immediately
+ // in case UI is not blocked and need to reflect the change in real time
+ if ((usbStatus != KUsbPersonalityIdMTP) && (usbStatus != KUsbPersonalityIdPCSuiteMTP))
+ Commit();
+#ifdef ABSTRACTAUDIOALBUM_INCLUDED
+ if (aItemCat != EMPXSong && aItemCat != EMPXPlaylist && aItemCat != EMPXAbstractAlbum)
+#else
if (aItemCat != EMPXSong && aItemCat != EMPXPlaylist)
+#endif
{
User::Leave(KErrArgument);
}
@@ -751,11 +805,20 @@
EMPXMediaGeneralTitle | EMPXMediaGeneralDate |
EMPXMediaGeneralDuration | EMPXMediaGeneralComment |
EMPXMediaGeneralUri ));
+#ifdef ABSTRACTAUDIOALBUM_INCLUDED
attributes.AppendL(
TMPXAttribute(KMPXMediaIdMusic,
EMPXMediaMusicArtist | EMPXMediaMusicAlbum |
EMPXMediaMusicAlbumTrack | EMPXMediaMusicComposer |
- EMPXMediaMusicYear | EMPXMediaMusicGenre));
+ EMPXMediaMusicYear | EMPXMediaMusicGenre |
+ EMPXMediaMusicAlbumArtist));
+#else
+ attributes.AppendL(
+ TMPXAttribute(KMPXMediaIdMusic,
+ EMPXMediaMusicArtist | EMPXMediaMusicAlbum |
+ EMPXMediaMusicAlbumTrack | EMPXMediaMusicComposer |
+ EMPXMediaMusicYear | EMPXMediaMusicGenre));
+#endif
attributes.AppendL(KMPXMediaAudioAudioAll);
attributes.AppendL(KMPXMediaMTPAll);
@@ -997,6 +1060,14 @@
aSrc.ValueTObjectL<TInt>( KMPXMediaMusicRating )
);
}
+#ifdef ABSTRACTAUDIOALBUM_INCLUDED
+ if( atts&EMPXMediaMusicAlbumArtist ) // Text
+ {
+ aDestination.SetTextValueL( KMPXMediaMusicAlbumArtist,
+ aSrc.ValueText(KMPXMediaMusicAlbumArtist )
+ );
+ }
+#endif
MPX_DEBUG1("CMPXCollectionCachedHelper::DoAppendMusicL -->");
}
--- a/mmappcomponents/collectionhelper/src/mpxcollectionhelperimp.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/collectionhelper/src/mpxcollectionhelperimp.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -168,8 +168,14 @@
// generic way of resolving collections aside from using file extension
// or UID.
//
+#ifdef ABSTRACTAUDIOALBUM_INCLUDED
+ if ( aMedia->ValueTObjectL<TMPXGeneralType>(KMPXMediaGeneralType) == EMPXItem &&
+ (aMedia->ValueTObjectL<TMPXGeneralCategory>(KMPXMediaGeneralCategory) == EMPXPlaylist ||
+ aMedia->ValueTObjectL<TMPXGeneralCategory>(KMPXMediaGeneralCategory) == EMPXAbstractAlbum))
+#else
if ( aMedia->ValueTObjectL<TMPXGeneralType>(KMPXMediaGeneralType) == EMPXItem &&
aMedia->ValueTObjectL<TMPXGeneralCategory>(KMPXMediaGeneralCategory) == EMPXPlaylist )
+#endif
{
aMedia->SetTObjectValueL<TUid>( KMPXMediaGeneralCollectionId,
iMusicCollectionId );
@@ -348,9 +354,13 @@
//
TMPXGeneralCategory category =
aMedia->ValueTObjectL<TMPXGeneralCategory>(KMPXMediaGeneralCategory);
-
+#ifdef ABSTRACTAUDIOALBUM_INCLUDED
+ if ((aMedia->ValueTObjectL<TMPXGeneralType>(KMPXMediaGeneralType) != EMPXItem) ||
+ (category != EMPXSong && category != EMPXPlaylist && category != EMPXAbstractAlbum))
+#else
if ((aMedia->ValueTObjectL<TMPXGeneralType>(KMPXMediaGeneralType) != EMPXItem) ||
(category != EMPXSong && category != EMPXPlaylist))
+#endif
{
User::Leave( KErrArgument );
}
@@ -397,7 +407,7 @@
MPX_FUNC("CMPXCollectionHelperImp::RenameL");
MPX_DEBUG3("aOldUri = %S, aNewUri = %S", &aOldUri, &aNewUri);
- if (aItemCat != EMPXSong && aItemCat != EMPXPlaylist)
+ if (aItemCat != EMPXSong && aItemCat != EMPXPlaylist && aItemCat != EMPXAbstractAlbum)
{
User::Leave(KErrArgument);
}
@@ -466,8 +476,11 @@
{
MPX_FUNC("CMPXCollectionHelperImp::GetL");
MPX_DEBUG2("aFile %S", &aFile);
-
+#ifdef ABSTRACTAUDIOALBUM_INCLUDED
+ if (aItemCat != EMPXSong && aItemCat != EMPXPlaylist && aItemCat != EMPXAbstractAlbum)
+#else
if (aItemCat != EMPXSong && aItemCat != EMPXPlaylist)
+#endif
{
User::Leave(KErrArgument);
}
--- a/mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -38,6 +38,7 @@
#include <mpxcollectioncommanddefs.h>
#include <UsbWatcherInternalPSKeys.h>
#include <usbpersonalityids.h>
+#include <mtpprivatepskeys.h>
#include "mpxcollectionuihelperobserver.h"
#include "mpxcollectionuihelperimp.h"
@@ -1027,6 +1028,12 @@
// currently only used by incremental add
iTaskQueue->CancelRequests();
+ if( iTask == ETaskIncAddMedia || iTask == ETaskIncAppendMedia )
+ {
+ // complete task from scheduler
+ iTaskQueue->CompleteTask();
+ }
+
// clean up iInputMedia
if( iInputMedia )
{
@@ -1253,6 +1260,62 @@
ASSERT(0);
}
+// ---------------------------------------------------------------------------
+// From MMPXCollectionObserver
+// ---------------------------------------------------------------------------
+//
+void CMPXCollectionUiHelperImp::HandleCommandComplete(CMPXCommand* aCommandResult, TInt aError)
+ {
+ MPX_DEBUG3("CMPXCollectionUiHelperImp::HandleCommandComplete iTask=%d, aError=%d",
+ iTask, aError);
+
+ if( iTask == ETaskIncAddMedia && iInputMedia )
+ {
+ if ( iChunkNumber == 0 )
+ {
+ // save playlistId in input media & use it for subsequent appending operations
+ if( aCommandResult )
+ {
+ TMPXItemId playlistId =
+ aCommandResult->ValueTObjectL<TMPXItemId>(KMPXCommandColAddRtnId);
+
+ iInputMedia->SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, playlistId);
+ }
+
+ iChunkNumber++; // move on to next chunk
+
+ CompleteTask(iTask, aError);
+ }
+ else if ( iChunkNumber == iTotalChunkNumber-1 ) // last chunk
+ {
+ CompleteTask(ETaskIncFinish, aError); // finish inc task
+ }
+ else // intermedia chunks
+ {
+ iChunkNumber++; // move on to next chunk
+
+ CompleteTask(iTask, aError);
+ }
+ }
+ else if( iTask == ETaskIncAppendMedia && iInputMedia )
+ {
+ // last chunk
+ // for the case that there is only one chunk (first & last chunk at the same
+ // time), Inc Add is not used
+ if( iChunkNumber == iTotalChunkNumber-1 )
+ {
+ // update input media as well
+ FillInPlaylistDetailsL(*iInputMedia);
+ CompleteTask(ETaskIncFinish, aError);
+ }
+ else // intermediate chunks, including first chunk
+ {
+ iChunkNumber++;
+ CompleteTask(iTask, aError);
+ }
+ }
+ }
+
// ----------------------------------------------------------------------------
// Handles completion of moving an object, just a proxy
// ----------------------------------------------------------------------------
@@ -1337,11 +1400,16 @@
{
TInt usbStatus;
RProperty::Get(KPSUidUsbWatcher, KUsbWatcherSelectedPersonality, usbStatus);
-
- if ((usbStatus == KUsbPersonalityIdMTP) || (usbStatus == KUsbPersonalityIdPCSuiteMTP)
- || (usbStatus == KUsbPersonalityIdMS) )
+
+ TInt mtpStatus = EMtpPSStatusUninitialized;
+ RProperty::Get( KMtpPSUid, KMtpPSStatus, mtpStatus);
+
+ MPX_DEBUG2("CMPXCollectionViewHgImp::ConstructL, mtpstatus = %d", mtpStatus);
+
+ if ( (mtpStatus != EMtpPSStatusUninitialized)
+ || (usbStatus == KUsbPersonalityIdMS) )
{
- MPX_DEBUG1("USB is active, Leave with KErrLocked");
+ MPX_DEBUG1("MTP/USB is active, Leave with KErrLocked");
// need to call back even if it leaves here
iHelperObserver = (MMPXCHelperObserver*)aCallback;
CompleteTask( aTask, KErrLocked );
@@ -1681,7 +1749,8 @@
void CMPXCollectionUiHelperImp::DoIncAddMediaL()
{
/***** include only aSize/iChunkSize number of songs *****/
-
+ MPX_DEBUG5("CMPXCollectionUiHelperImp::DoIncAddMediaL (%d, %d, %d, %d)",
+ iChunkNumber, iChunkSize, iTotalChunkNumber, iRemainder);
// copy media
CMPXMedia* media = CMPXMedia::CopyL(*iInputMedia);
CleanupStack::PushL(media);
@@ -1739,15 +1808,7 @@
CleanupStack::PopAndDestroy(playlistExtension);
- iMediator->AddItemL( media ); // this creates the new playlist
-
- // save playlistId in input media & use it for subsequent appending operations
- TMPXItemId playlistId = media->ValueTObjectL<TMPXItemId>(KMPXMediaGeneralId);
- iInputMedia->SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, playlistId);
-
- iChunkNumber++; // move on to next chunk
-
- CompleteTask(iTask, KErrNone);
+ iMediator->AddItemAsyncL( media ); // this creates the new playlist
}
else if ( iChunkNumber == iTotalChunkNumber-1 ) // last chunk
{
@@ -1759,9 +1820,7 @@
TMPXItemId playlistId = iInputMedia->ValueTObjectL<TMPXItemId>(KMPXMediaGeneralId);
media->SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, playlistId);
- iMediator->AddItemL( media );
-
- CompleteTask(ETaskIncFinish, KErrNone); // finish inc task
+ iMediator->AddItemAsyncL( media );
}
else // intermedia chunks
{
@@ -1773,11 +1832,7 @@
TMPXItemId playlistId = iInputMedia->ValueTObjectL<TMPXItemId>(KMPXMediaGeneralId);
media->SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, playlistId);
- iMediator->AddItemL( media );
-
- iChunkNumber++; // move on to next chunk
-
- CompleteTask(iTask, KErrNone);
+ iMediator->AddItemAsyncL( media );
}
CleanupStack::PopAndDestroy(cArray);
@@ -1830,23 +1885,8 @@
// update media then append to playlist
FillInPlaylistDetailsL(*media);
- iMediator->AddItemL( media );
+ iMediator->AddItemAsyncL( media );
- // last chunk
- // for the case that there is only one chunk (first & last chunk at the same
- // time), Inc Add is not used
- if( iChunkNumber == iTotalChunkNumber-1 )
- {
- // update input media as well
- FillInPlaylistDetailsL(*iInputMedia);
- CompleteTask(ETaskIncFinish, KErrNone);
- }
- else // intermediate chunks, including first chunk
- {
- iChunkNumber++;
- CompleteTask(iTask, KErrNone);
- }
-
CleanupStack::PopAndDestroy(cArray);
CleanupStack::PopAndDestroy(media);
}
--- a/mmappcomponents/collectionhelper/src/mpxdeletehelper.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/collectionhelper/src/mpxdeletehelper.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -43,8 +43,7 @@
#include <thumbnailmanager.h>
#endif //RD_MPX_TNM_INTEGRATION
// cenrep key need to be checked whether USB cable is connected in MTP/Combined Mode
-#include <UsbWatcherInternalPSKeys.h>
-#include <usbpersonalityids.h>
+#include <mtpprivatepskeys.h>
#include <mpxcollectionuihelper.h>
#include "mpxcollectionuihelperobserver.h"
#include "mpxcollectionhelpercommon.h"
@@ -310,32 +309,16 @@
{
MPX_DEBUG3("CMPXDeleteHelper::RunL. [iMoreToDo %d] [iStatus %d]", iMoreToDo, iStatus.Int());
- // cenrep key need to be checked whether USB cable is connected in MTP/Combined Mode
- TUsbDeviceState deviceState = EUsbDeviceStateConfigured;
- if ( !iUsbManConnected )
- {
- ConnectUsbMan();
- }
-
- if ( iUsbManConnected )
+ TInt mtpStatus = EMtpPSStatusUninitialized;
+ RProperty::Get( KMtpPSUid, KMtpPSStatus, mtpStatus);
+
+ MPX_DEBUG2("CMPXCollectionViewHgImp::ConstructL, mtpstatus = %d", mtpStatus);
+
+ if (mtpStatus != EMtpPSStatusUninitialized)
{
- if ( iUsbMan.GetDeviceState( deviceState ) != KErrNone )
- {
- deviceState = EUsbDeviceStateConfigured;
- }
- }
-
- if ( deviceState == EUsbDeviceStateAddress ||
- deviceState == EUsbDeviceStateConfigured )
- {
- TInt usbStatus;
- RProperty::Get(KPSUidUsbWatcher, KUsbWatcherSelectedPersonality, usbStatus);
- if ((usbStatus == KUsbPersonalityIdMTP) || (usbStatus == KUsbPersonalityIdPCSuiteMTP))
- {
- MPX_DEBUG1("USB is active, Stop Delete");
- CompleteDelete( KErrLocked );
- return;
- }
+ MPX_DEBUG1("MTP is active, Stop Delete");
+ CompleteDelete( KErrLocked );
+ return;
}
if (iMoreToDo && iStatus.Int() == KErrNone)
--- a/mmappcomponents/harvester/collectionmediator/bwinscw/mpxcollectionmediatorU.DEF Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/collectionmediator/bwinscw/mpxcollectionmediatorU.DEF Wed Jun 23 17:51:16 2010 +0100
@@ -15,4 +15,5 @@
?SetItemL@CMPXCollectionMediator@@QAEXAAPAVCMPXMedia@@@Z @ 14 NONAME ; void CMPXCollectionMediator::SetItemL(class CMPXMedia * &)
?SetItemL@CMPXCollectionMediator@@QAEXAAV?$TArray@PAVCMPXMedia@@@@AAVCMPXCollectionPath@@AAV?$RArray@H@@@Z @ 15 NONAME ; void CMPXCollectionMediator::SetItemL(class TArray<class CMPXMedia *> &, class CMPXCollectionPath &, class RArray<int> &)
?SetItemL@CMPXCollectionMediator@@QAEXAAVCMPXMediaArray@@@Z @ 16 NONAME ; void CMPXCollectionMediator::SetItemL(class CMPXMediaArray &)
+ ?AddItemAsyncL@CMPXCollectionMediator@@QAEXAAPAVCMPXMedia@@@Z @ 17 NONAME ; void CMPXCollectionMediator::AddItemAsyncL(class CMPXMedia * &)
--- a/mmappcomponents/harvester/collectionmediator/eabi/mpxcollectionmediatorU.DEF Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/collectionmediator/eabi/mpxcollectionmediatorU.DEF Wed Jun 23 17:51:16 2010 +0100
@@ -19,4 +19,5 @@
_ZTI22CMPXCollectionMediator @ 18 NONAME ; #<TI>#
_ZTV18CMPXMoveItemHelper @ 19 NONAME ; #<VT>#
_ZTV22CMPXCollectionMediator @ 20 NONAME ; #<VT>#
+ _ZN22CMPXCollectionMediator13AddItemAsyncLERP9CMPXMedia @ 21 NONAME
--- a/mmappcomponents/harvester/collectionmediator/src/mpxcollectionmediator.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/collectionmediator/src/mpxcollectionmediator.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -226,6 +226,42 @@
}
// ---------------------------------------------------------------------------
+// CMPXCollectionMediator::AddItemAsyncL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CMPXCollectionMediator::AddItemAsyncL( CMPXMedia*& aMedia )
+ {
+ ASSERT( iColUtil );
+
+ // If this is a podcast, change the collection id
+ if( IsPodcastL( *aMedia ) )
+ {
+ UpdatePathToPodcastL( *aMedia );
+ }
+
+ // Add it to the collection
+ CMPXCommand* cmd = CMPXMedia::NewL();
+ CleanupStack::PushL( cmd );
+
+ cmd->SetTObjectValueL(KMPXCommandGeneralId, KMPXCommandIdCollectionAdd );
+ cmd->SetCObjectValueL(KMPXCommandColAddMedia, aMedia); // copied
+
+ if (aMedia->IsSupported(KMPXMediaGeneralCollectionId))
+ {
+ TUid collectionId = aMedia->ValueTObjectL<TUid>(KMPXMediaGeneralCollectionId);
+ cmd->SetTObjectValueL(KMPXCommandGeneralCollectionId, collectionId.iUid);
+ }
+ else
+ {
+ User::Leave( KErrArgument );
+ }
+
+ iColUtil->CommandL(*cmd);
+
+ CleanupStack::PopAndDestroy(cmd);
+ }
+
+// ---------------------------------------------------------------------------
// CMPXCollectionMediator::AddItemL()
// ---------------------------------------------------------------------------
//
--- a/mmappcomponents/harvester/filehandler/group/mpxfilehandler.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/filehandler/group/mpxfilehandler.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -28,6 +28,11 @@
CAPABILITY CAP_GENERAL_DLL
VENDORID VID_DEFAULT
+MACRO __RAMDISK_PERF_ENABLE
+#define __RAMDISK_PERF_ENABLE
+
+MACRO ABSTRACTAUDIOALBUM_INCLUDED
+#define ABSTRACTAUDIOALBUM_INCLUDED
SOURCEPATH ../src
SOURCE mpxharvesterfilehandler.cpp
SOURCE mpxharvesterfilehandlerimp.cpp
@@ -64,9 +69,7 @@
LIBRARY mpxmetadataextractor.lib
LIBRARY caf.lib
LIBRARY DrmServerInterfaces.lib
-#ifdef RD_MULTIPLE_DRIVE
LIBRARY PlatformEnv.lib
-#endif //RD_MULTIPLE_DRIVE
#if defined(ARMCC)
deffile ../eabi/
--- a/mmappcomponents/harvester/filehandler/inc/mpxdbcommon.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/filehandler/inc/mpxdbcommon.h Wed Jun 23 17:51:16 2010 +0100
@@ -23,7 +23,11 @@
// Harvester db increment 9 v1
// Please update the increment number for each increment
// Please update the version number for each schema change
+#ifdef ABSTRACTAUDIOALBUM_INCLUDED
+_LIT( KHarvesterDBName, "harvesterdbv9_6.dat" );
+#else
_LIT( KHarvesterDBName, "harvesterdbv9_5.dat" );
+#endif
_LIT( KHarvesterDBPattern, "harvesterdbv*.dat" );
const TInt KDbMaxTableCreationSQLLength = 1024;
--- a/mmappcomponents/harvester/filehandler/inc/mpxharvesterdb.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/filehandler/inc/mpxharvesterdb.h Wed Jun 23 17:51:16 2010 +0100
@@ -25,6 +25,17 @@
// FORWARD DECLARATIONS
class CMPXHarvesterDatabaseTable;
+// ENUMS
+#ifdef __RAMDISK_PERF_ENABLE
+// enum for database state
+enum TDbState
+ {
+ EDbClose,
+ EDbOpen,
+ EDbInTransaction
+ };
+#endif // __RAMDISK_PERF_ENABLE
+
/**
* Database class for the Harvester Component
*
@@ -51,6 +62,8 @@
/**
* Open the database
+ * @return State of the opened database: KErrNone or KErrCorrupt
+ * Leaves if cannot open the database
*/
TInt OpenL();
@@ -141,6 +154,27 @@
*/
void Rollback();
+#ifdef __RAMDISK_PERF_ENABLE
+ /**
+ * Set RAM drive info
+ */
+ void SetRamDriveInfo(TDriveNumber aDrive, TBool aUseRamDrive);
+
+ /**
+ * Get UseRamDrive
+ */
+ TBool IsUseRamDrive();
+
+ /**
+ * Get the state of the database.
+ */
+ TDbState GetDbState();
+
+ /**
+ * Set the state of the database.
+ */
+ void SetDbStateL( TDbState aState );
+#endif // __RAMDISK_PERF_ENABLE
private: // private functions
@@ -151,7 +185,8 @@
/**
* Opens a database
- * @return error for the operation
+ * @return State of the opened database: KErrNone or KErrCorrupt
+ * Leaves if cannot open the database
*/
TInt OpenDBL();
@@ -163,6 +198,12 @@
void FindAndReplaceSingleQuote(const TDesC& aSrc,
TDes& aTrg);
+ /**
+ * Generate the database name.
+ * @return the database file name.
+ */
+ TFileName GenerateDbName();
+
private:
/**
@@ -182,6 +223,10 @@
CFileStore* iStore;
RDbStoreDatabase* iDatabase; // Local single client db
TBool iDBOpen; // Is the db open and ready
+#ifdef __RAMDISK_PERF_ENABLE
+ TDriveNumber iRamDrive;
+ TBool iUseRamDrive;
+#endif // __RAMDISK_PERF_ENABLE
};
#endif // CMPXHARVESTERDB_H
--- a/mmappcomponents/harvester/filehandler/inc/mpxharvesterdbmanager.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/filehandler/inc/mpxharvesterdbmanager.h Wed Jun 23 17:51:16 2010 +0100
@@ -54,8 +54,7 @@
TInt OpenAllDatabasesL();
/**
- * Reopen a particular database
- * (For MMC events)
+ * Open a particular database
* @param TDriveNumber aDrive
*/
void OpenDatabaseL( TDriveNumber aDrive );
@@ -63,26 +62,38 @@
/**
* Close all databases
*/
- void CloseAllDatabase();
+ void CloseAllDatabases();
+
+ /**
+ * Close all databases on mass storage drives
+ */
+ void CloseMassStorageDatabases();
/**
* Close a particular DB
- * (For MMC events)
* @param TDriveNumber the Drive
*/
void CloseDatabase( TDriveNumber aDrive );
+
/**
* Get a particular database
* @param TDriveNumber the Drive
*/
CMPXHarvesterDB& GetDatabaseL( TDriveNumber aDrive );
-
+
+ /**
+ * Abruptly close a particular DB without trying to access it
+ * To be used when drive is no more accessible
+ * @param TDriveNumber the Drive
+ */
+ void DropDatabase( TDriveNumber aDrive );
+
/**
- * Remove a particular database from the array
- * @param TDriveNumber the Drive
+ * Return whether database is open on the specified drive
*/
- void RemoveDatabaseL( TDriveNumber aDrive );
+ TBool DatabaseIsOpen( TDriveNumber aDrive );
+
/**
* Return the number of databases
@@ -122,7 +133,124 @@
* Checks if the spefified drive is a remove drive
*/
TBool IsRemoteDrive(TDriveNumber aDrive);
-
+
+#ifdef __RAMDISK_PERF_ENABLE
+ /**
+ * Copy all databases from RAM disk back to normal drive, E, F,...
+ *
+ * @return none
+ * Leaves if DB is not usable after the operation
+ */
+ void CopyDBsFromRamL();
+
+ /**
+ * Copy all databases to RAM disk from normal drive, E, F,...
+ *
+ * @return none
+ * Leaves if DB is not usable after the operation
+ */
+ void CopyDBsToRamL(TBool aMtpMode = EFalse);
+
+ /**
+ * Update all databases from RAM drive
+ */
+ //void UpdateDBsFromRamL( TInt aCount );
+
+ /**
+ * If Ram disk is low, copy dbs from ram.
+ */
+ void EnsureRamSpaceL();
+#endif //__RAMDISK_PERF_ENABLE
+
+private: // new functions
+
+ /**
+ * Find database index in the internal table
+ * Return KErrNotFound if not found
+ */
+ TInt FindDatabaseIndex ( TDriveNumber aDrive );
+
+ /**
+ * Return whether drive exists and is local
+ */
+ TBool IsLocalDrive( TDriveNumber aDrive );
+
+
+#ifdef __RAMDISK_PERF_ENABLE
+ /**
+ * Find available RAMDISK
+ */
+ TInt GetRAMDiskPath();
+
+ /**
+ * Check if disk is available to copy.
+ *
+ * @return ETrue if there is enough space, EFalse otherwise
+ */
+ TBool IsRamDiskSpaceAvailable();
+
+ /**
+ * Copy database to ram drive
+ */
+ void DoCopyDBToRamL(TDriveUnit aDriveUnit);
+
+ /**
+ * Copy database from RAM disk
+ */
+ TInt DoCopyDBFromRam(TDriveUnit aDriveUnit);
+
+ /**
+ * To block a disk space so that it can gurantee for a write back from RAM disk
+ *
+ * @return KErrNone if the dummy file is created successfully
+ */
+ TInt BlockDiskSpaceL( TDriveUnit aDrive, TInt aOrigDbSize );
+
+ /**
+ * To calculate necessary file size of the dummy file
+ *
+ * @return TInt64 estimated file size
+ */
+ TInt64 CalculateInitalDummyDBSizeL( TVolumeInfo aVol, TInt aOrigDbSize );
+
+ /**
+ * Remove dummy file
+ *
+ * @param aDrive Drive
+ */
+ void RemoveDummyFile( TDriveNumber aDrive );
+
+ /**
+ * Update the database from ram drive.
+ */
+ //void DoUpdateDBFromRamL( TDriveUnit aDriveUnit );
+
+ /**
+ * Generate the harvester db path and name.
+ */
+ TFileName GenerateHarvesterDbName( TDriveUnit aDriveUnit, TBool aForRamDrive = EFalse );
+
+ /**
+ * Generate the dummy db path and name.
+ */
+ TFileName GenerateDummyDbName( TDriveUnit aDriveUnit );
+
+ /**
+ * Check if Ram disk is low.
+ */
+ TBool IsRamDiskLow();
+
+ /**
+ * Sum up the total size in bytes of the databases.
+ *
+ * @param aSize - On return, the total size of the databases.
+ * @param aRamDrive - if True, will sum up dbs on Ram Drive, if False, will sum up dbs on other drives.
+ * @return TInt System error.
+ */
+ TInt GetTotalDatabasesSize(TInt& aSize, TBool aRamDrive);
+
+#endif // __RAMDISK_PERF_ENABLE
+
private:
/**
@@ -140,6 +268,17 @@
RPointerArray<CMPXHarvesterDB> iDatabases;
RFs& iFs; // Not Owned
+
+#ifdef __RAMDISK_PERF_ENABLE
+ // Defined for RAM disk performance
+ TBool iRAMDiskPerfEnabled; // flag to indicate RAM disk feature is enabled from cenrep.
+ TUint64 iMaximumAllowedRAMDiskSpaceToCopy; // max size in megabytes allowed for RAM copying.
+ TFileName iRAMFolder;
+ TDriveNumber iRAMDrive;
+ //TInt iUpdateCount;
+ TBool iMtpMode;
+ //TInt iMtpAddCount;
+#endif //__RAMDISK_PERF_ENABLE
};
--- a/mmappcomponents/harvester/filehandler/inc/mpxharvesterfilehandlerimp.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/filehandler/inc/mpxharvesterfilehandlerimp.h Wed Jun 23 17:51:16 2010 +0100
@@ -274,6 +274,13 @@
* for a list of folders to automatically scan
*/
void ParseAutoScanL();
+
+ /**
+ * Refreshes scan drives so that non-existing
+ * drives are not scanned.
+ * Used add back drives that were take out because of dismount
+ */
+ void RefreshScanDrivesL();
/***
* Resets the current scan directory and frees memory
@@ -350,13 +357,6 @@
*/
RPointerArray<CMPXHarvesterDbItem>* GetDrmFilesL();
- /**
- * Verifies if aDrive is ready.
- * @param aDrive, certain drive name, such as EDRIVEE
- * @return TBool ETrue if aDrive is ready,otherwise EFalse
- */
- TBool IsDriveReady( TDriveNumber aDrive );
-
public:
/**
@@ -392,13 +392,12 @@
RPointerArray<CMPXFolderMonitor> iFolderMonitors; // Multiple drives
RPointerArray<CMPXCollectionType> iSupportedTypes;
CDesCArray* iContainerTypes;
+ RArray<TPath> iConfiguredDrivesToScan;
RArray<TPath> iDrivesToScan;
RArray<TPath> iFilteredDrivesToScan;
RArray<TPath> iPathsToBlock;
TBool iOutOfDisk;
-#ifdef RD_MULTIPLE_DRIVE
- TInt iRemovedDrive;
-#endif // RD_MULTIPLE_DRIVE
+ TBool iFilteredOutOfDisk;
// Metadata related
CMPXMetadataScanner* iMetadataScanner;
@@ -432,6 +431,7 @@
TUid iPodcastCollectionId;
TBool iDisablePodcasting;
+ TInt iCurUSBEvent;
// DRM
CDRMNotifier* iDrmNotifier;
--- a/mmappcomponents/harvester/filehandler/inc/mpxmetadatascanner.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/filehandler/inc/mpxmetadatascanner.h Wed Jun 23 17:51:16 2010 +0100
@@ -20,6 +20,7 @@
#define CMPXMETADATASCANNER_H
#include <e32base.h>
+#include <mpxmetadataextractorobserver.h>
class CMPXMedia;
class CMPXMediaArray;
@@ -33,7 +34,8 @@
ENewFiles = 0,
EModFiles = 1,
EMaxFile = 2
- };
+ };
+
/**
* CMPXMetadataScanner
*
@@ -42,7 +44,8 @@
* @lib mpxfilehandler.lib
* @since S60 3.0
*/
-NONSHARABLE_CLASS( CMPXMetadataScanner ): public CActive
+NONSHARABLE_CLASS( CMPXMetadataScanner ): public CActive,
+ public MMPXMetadataExtractorObserver
{
public:
@@ -128,15 +131,43 @@
* From CActive
*/
void RunL();
+
+ /**
+ * From MMPXMetadataExtractorObserver
+ */
+ void HandleCreateMediaComplete( CMPXMedia* aMedia, TInt aError );
private: // New Functions
/**
* Extract metadata from a few files
- * @return ETrue if there are no more files to extract
- * EFalse otherwise
*/
- TBool DoExtractL();
+ void DoExtractL();
+
+ /**
+ * Get source array
+ */
+ RPointerArray<HBufC>* GetSource();
+
+ /**
+ * Is metadata scanner done
+ */
+ TBool IsDone();
+
+ /**
+ * Run again
+ */
+ void RunAgain();
+
+ /**
+ * Add metadata to collection
+ */
+ void AddToCollectionL();
+
+ /**
+ * Complete metadata scanner
+ */
+ void MetadataScannerComplete( TInt aError );
private:
@@ -160,8 +191,7 @@
RPointerArray<HBufC> iNewFiles;
RPointerArray<HBufC> iModifiedFiles;
- CMPXMediaArray* iNewFileProps;
- CMPXMediaArray* iModifiedFileProps;
+ CMPXMediaArray* iTargetProps;
TBool iExtracting; // Are we extracting
TInt iExtractType; // What are we extracting
@@ -170,7 +200,7 @@
CMPXMetadataExtractor* iExtractor; // Metadata Utilities wrapper
MMPXMetadataScanObserver& iObserver;
- MMPXFileScanStateObserver& iStateObserver;
+ MMPXFileScanStateObserver& iStateObserver;
};
#endif // CMPXMETADATASCANNER_H
--- a/mmappcomponents/harvester/filehandler/src/mpxdiskspacewatcher.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/filehandler/src/mpxdiskspacewatcher.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -147,8 +147,12 @@
void CMPXDiskSpaceWatcher::RunL()
{
// Callback to observer about which drive is low on disk space
- //
- iObs.HandleLowDiskEvent( iDriveToMonitor );
+ //Check whether the current disk is low on disk space in Mass Storage mode.
+ //
+ if (IsLowOnDisk())
+ {
+ iObs.HandleLowDiskEvent( iDriveToMonitor );
+ }
}
// END OF FILE
--- a/mmappcomponents/harvester/filehandler/src/mpxfoldermonitor.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/filehandler/src/mpxfoldermonitor.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -17,22 +17,15 @@
#include <e32base.h>
-#ifdef RD_MULTIPLE_DRIVE
#include <pathinfo.h>
#include <driveinfo.h>
-#endif //RD_MULTIPLE_DRIVE
#include <mpxlog.h>
#include "mpxfoldermonitor.h"
#include "mpxfileadditionobserver.h"
#include "mpxfoldermonitorobserver.h"
// CONSTANTS
-#ifdef RD_MULTIPLE_DRIVE
_LIT( KMPXMusicPath, "\\Music\\");
-#else
-_LIT( KMPXMusicPath, "\\Music\\");
-_LIT( KMPXDataPath, "\\Data\\");
-#endif //RD_MULTIPLE_DRIVE
// ---------------------------------------------------------------------------
@@ -94,7 +87,6 @@
delete iFolderName;
iFolderName = NULL;
-#ifdef RD_MULTIPLE_DRIVE
switch( aDrive )
{
case EDriveC:
@@ -128,53 +120,13 @@
User::LeaveIfError(
iFs.DriveToChar( aDrive, driveChar ) );
MPX_DEBUG2("CMPXFolderMonitor::Start: Drive %c: not supported!",
- driveChar );
+ (TUint)driveChar );
User::Leave( KErrNotSupported );
}
break;
}
}
MPX_DEBUG2("CMPXFolderMonitor::Start: Use %S path", iFolderName);
-#else
- switch( aDrive )
- {
- case EDriveC:
- {
- TDriveName driveName = TDriveUnit( aDrive ).Name();
- TInt length = KMPXDataPath().Length() + driveName.Length();
-
- iFolderName = HBufC::NewL(length);
-
- TPtr folderPtr( iFolderName->Des() );
- folderPtr.Append( driveName );
- folderPtr.Append( KMPXDataPath );
-
- break;
- }
- case EDriveE:
- // deliberate fall through, same actions for E & F drive
-
- case EDriveF:
- {
-
- TDriveName driveName = TDriveUnit( aDrive ).Name();
- TInt length = KMPXMusicPath().Length() + driveName.Length();
-
- iFolderName = HBufC::NewL(length);
-
- TPtr folderPtr( iFolderName->Des() );
- folderPtr.Append( driveName );
- folderPtr.Append( KMPXMusicPath );
-
- break;
- }
-
- default:
- {
- User::Leave( KErrNotSupported );
- }
- }
-#endif // RD_MULTIPLE_DRIVE
// Start listening
//
--- a/mmappcomponents/harvester/filehandler/src/mpxfolderscanner.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/filehandler/src/mpxfolderscanner.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -244,9 +244,9 @@
TInt err(KErrNone);
do
{
- MPX_DEBUG1("CMPXFolderScanner::SetupNextDriveToScanL iDirScan->NexL()");
+ MPX_DEBUG1("CMPXFolderScanner::SetupNextDriveToScanL iDirScan->NextL()");
TRAP(err, iDirScan->NextL(iDir));
- MPX_DEBUG1("CMPXFolderScanner::SetupNextDriveToScanL path blocked?");
+ MPX_DEBUG2("CMPXFolderScanner::SetupNextDriveToScanL path %S", &iDirScan->FullPath());
blocked = iObserver.IsPathBlockedL( iDirScan->FullPath() );
MPX_DEBUG2("CMPXFolderScanner::SetupNextDriveToScanL path blocked %i", blocked);
if( blocked )
--- a/mmappcomponents/harvester/filehandler/src/mpxharvesterdb.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/filehandler/src/mpxharvesterdb.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -31,8 +31,12 @@
// ---------------------------------------------------------------------------
//
CMPXHarvesterDB::CMPXHarvesterDB( TDriveNumber aDrive, RFs& aFs ) :
- iDrive( aDrive),
- iFs( aFs )
+ iDrive( aDrive),
+ iFs( aFs )
+#ifdef __RAMDISK_PERF_ENABLE
+ ,iRamDrive(aDrive),
+ iUseRamDrive(EFalse)
+#endif // __RAMDISK_PERF_ENABLE
{
}
@@ -75,27 +79,21 @@
//
TInt CMPXHarvesterDB::OpenL()
{
- MPX_DEBUG1("CMPXHarvesterDB::OpenL <---");
+ MPX_DEBUG1("-->CMPXHarvesterDB::OpenL");
// There is no need to re-open if it was already open
if( iDBOpen )
{
+ MPX_DEBUG1("<--CMPXHarvesterDB::OpenL rtn=0 (already open)");
return KErrNone;
}
TInt rtn( KErrNone );
- TDriveUnit drive( iDrive );
- TFileName fileName;
- fileName.Append( drive.Name() );
- fileName.Append( KHarvesterDBPath );
-
- // Make sure Path exists
- if (!BaflUtils::PathExists(iFs, fileName))
- {
- iFs.MkDirAll(fileName);
- }
-
- fileName.Append( KHarvesterDBName );
+ TFileName fileName = GenerateDbName();
+ TParsePtr fileParser( fileName );
+ TFileName filePath = fileParser.DriveAndPath();
+ // Make sure Path exists; allow to leave if can't create the path
+ BaflUtils::EnsurePathExistsL(iFs, filePath);
// Try to open the stream
TRAPD( err,
@@ -107,20 +105,9 @@
if( err )
{
MPX_DEBUG2("CMPXHarvesterDB::OpenL -- New database %i", err);
-
- TRAPD( openErr,
- iStore = CPermanentFileStore::ReplaceL(iFs, fileName ,EFileRead|EFileWrite);
- iStore->SetTypeL(iStore->Layout());
- CreateDBL();
- iDBOpen = ETrue;
- );
-
- if( KErrNone != openErr )
- {
- iDBOpen = EFalse;
- User::Leave( openErr );
- }
-
+ iStore = CPermanentFileStore::ReplaceL(iFs, fileName ,EFileRead|EFileWrite);
+ iStore->SetTypeL(iStore->Layout());
+ CreateDBL();
// If the open stream error was not found, that is fine
// because it is a new db, other errors means the stream
// is corrupted
@@ -131,9 +118,8 @@
{
MPX_DEBUG1("CMPXHarvesterDB::OpenL -- Opening database" );
rtn = OpenDBL();
- iDBOpen = ETrue;
}
-
+ iDBOpen = ETrue;
// Check volume Id
//
@@ -146,6 +132,7 @@
if( idErr != KErrNone )
{
// Delete the database because this is not readable
+ MPX_DEBUG2("CMPXHarvesterDB::OpenL -- Deleting unreadable DB %i", idErr);
Close();
User::LeaveIfError(DeleteDatabase());
rtn = KErrCorrupt;
@@ -159,8 +146,8 @@
User::LeaveIfError(DeleteDatabase());
rtn = OpenL();
}
-
- MPX_DEBUG1("CMPXHarvesterDB::OpenL --->");
+
+ MPX_DEBUG2("<--CMPXHarvesterDB::OpenL rtn=%d", rtn);
return rtn;
}
@@ -196,15 +183,26 @@
MPX_DEBUG1("CMPXHarvesterDB::CreateDBL <---");
// remove old databases before creating/replacing new database
-
- TFileName dbFileName;
- TDriveUnit drive( iDrive );
- dbFileName.Append( drive.Name() );
- dbFileName.Append( KHarvesterDBPath );
- dbFileName.Append( KHarvesterDBPattern );
+ TFileName fileName = GenerateDbName();
+ TParsePtr fileParser( fileName );
+ TFileName filePath = fileParser.DriveAndPath();
+#ifdef __RAMDISK_PERF_ENABLE
+ if ( iUseRamDrive )
+ {
+ TDriveUnit drive( iDrive );
+ filePath.Append(drive.Name()[0]);
+ filePath.Append(KHarvesterDBPattern);
+ }
+ else
+ {
+#endif // __RAMDISK_PERF_ENABLE
+ filePath.Append( KHarvesterDBPattern );
+#ifdef __RAMDISK_PERF_ENABLE
+ }
+#endif // __RAMDISK_PERF_ENABLE
CFileMan* fileManager = CFileMan::NewL(iFs);
- TInt ret = fileManager->Delete(dbFileName);
+ TInt ret = fileManager->Delete(filePath);
delete fileManager;
fileManager = NULL;
@@ -299,6 +297,7 @@
TRAPD(err, iDatabase->OpenL( iStore, iStore->Root() ) );
if( err != KErrNone )
{
+ MPX_DEBUG2("CMPXHarvesterDB::OpenDBL RDbStoreDatabase::OpenL error %d", err);
delete iDatabase;
iDatabase = NULL;
CreateDBL();
@@ -474,12 +473,7 @@
//
TInt CMPXHarvesterDB::DeleteDatabase()
{
- TDriveUnit drive( iDrive );
- TFileName fileName;
- fileName.Append( drive.Name() );
- fileName.Append( KHarvesterDBPath );
- fileName.Append( KHarvesterDBName );
-
+ TFileName fileName = GenerateDbName();
return iFs.Delete( fileName );
}
@@ -607,4 +601,127 @@
iDatabase->Rollback();
}
+#ifdef __RAMDISK_PERF_ENABLE
+// ---------------------------------------------------------------------------
+// Set RAM drive info
+// ---------------------------------------------------------------------------
+//
+void CMPXHarvesterDB::SetRamDriveInfo(TDriveNumber aDrive, TBool aUseRamDrive)
+ {
+ MPX_FUNC("CMPXHarvesterDB::SetRamDriveInfo");
+ iRamDrive = aDrive;
+ iUseRamDrive = aUseRamDrive;
+ }
+
+// ---------------------------------------------------------------------------
+// Get UseRamDrive
+// ---------------------------------------------------------------------------
+//
+TBool CMPXHarvesterDB::IsUseRamDrive()
+ {
+ MPX_FUNC("CMPXHarvesterDB::IsUseRamDrive");
+ return iUseRamDrive;
+ }
+
+// ---------------------------------------------------------------------------
+// Get the state of the database.
+// ---------------------------------------------------------------------------
+//
+TDbState CMPXHarvesterDB::GetDbState()
+ {
+ MPX_FUNC("CMPXHarvesterDB::GetDbState");
+ TDbState state = EDbClose;
+ if ( InTransaction() )
+ {
+ state = EDbInTransaction;
+ }
+ else if ( iDBOpen )
+ {
+ state = EDbOpen;
+ }
+
+ MPX_DEBUG2("CMPXHarvesterDB::GetDbState state = %d", state );
+ return state;
+ }
+
+// ---------------------------------------------------------------------------
+// Set the state of the database.
+// ---------------------------------------------------------------------------
+//
+void CMPXHarvesterDB::SetDbStateL( TDbState aState )
+ {
+ MPX_FUNC("CMPXHarvesterDB::SetDbState");
+ MPX_DEBUG2("CMPXHarvesterDB::SetDbState state = %d", aState );
+
+ switch( aState )
+ {
+ case EDbClose:
+ {
+ if ( InTransaction() )
+ {
+ CommitL();
+ }
+ Close();
+ break;
+ }
+ case EDbOpen:
+ {
+ if ( InTransaction() )
+ {
+ CommitL();
+ }
+ OpenL();
+ break;
+ }
+ case EDbInTransaction:
+ {
+ if ( !InTransaction() )
+ {
+ OpenL();
+ BeginL();
+ }
+ break;
+ }
+ default:
+ {
+ // should never get here
+ User::Leave(KErrNotSupported);
+ }
+ }
+ }
+
+#endif // __RAMDISK_PERF_ENABLE
+
+// ---------------------------------------------------------------------------
+// Generate the database name
+// ---------------------------------------------------------------------------
+//
+TFileName CMPXHarvesterDB::GenerateDbName()
+ {
+ MPX_FUNC("CMPXHarvesterDB::GenerateDbName");
+ TFileName fileName;
+#ifdef __RAMDISK_PERF_ENABLE
+ if ( iUseRamDrive )
+ {
+ TDriveUnit ramDrive( iRamDrive );
+ fileName.Append( ramDrive.Name() );
+ fileName.Append( KHarvesterDBPath );
+ TDriveUnit drive( iDrive );
+ fileName.Append(drive.Name()[0]);
+ fileName.Append(KHarvesterDBName);
+ }
+ else
+ {
+#endif // __RAMDISK_PERF_ENABLE
+ TDriveUnit drive( iDrive );
+ fileName.Append( drive.Name() );
+ fileName.Append( KHarvesterDBPath );
+ fileName.Append( KHarvesterDBName );
+#ifdef __RAMDISK_PERF_ENABLE
+ }
+#endif // __RAMDISK_PERF_ENABLE
+ MPX_DEBUG2("CMPXHarvesterDB::GenerateDbName file name = %S", &fileName );
+ return fileName;
+ }
+
// End of file
--- a/mmappcomponents/harvester/filehandler/src/mpxharvesterdbmanager.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/filehandler/src/mpxharvesterdbmanager.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -17,21 +17,45 @@
#include <e32base.h>
-#ifdef RD_MULTIPLE_DRIVE
#include <pathinfo.h>
#include <driveinfo.h>
-#endif //RD_MULTIPLE_DRIVE
+
+#ifdef __RAMDISK_PERF_ENABLE
+#include <centralrepository.h>
+#include <bautils.h>
+#include <mpxharvestercrkeys.h>
+#include "mpxdbcommon.h"
+#endif //__RAMDISK_PERF_ENABLE
+
#include <mpxlog.h>
#include "mpxharvesterdbmanager.h"
#include "mpxharvesterdb.h"
#include "mpxharvesterdbtable.h"
+// CONSTANTS
+#ifdef __RAMDISK_PERF_ENABLE
+_LIT( KHarvesterDummyDBName, "harvesterDummy.dat" );
+const TInt64 KMPMegaByte = 1048576;
+const TInt64 KMPEstimatedSongInBytes = KMPMegaByte * 2;
+const TInt KMPEstimatedSizePerDBEntry = KMaxFileName; // worst scenario, can be lower if needed
+//const TInt KUpdateDBCount = 200;
+const TInt KMPMinimumRAMSizeToRun = 6 * KMPMegaByte;
+#endif //__RAMDISK_PERF_ENABLE
+
+
// ---------------------------------------------------------------------------
// C++ Constructor
// ---------------------------------------------------------------------------
//
-CMPXHarvesterDatabaseManager::CMPXHarvesterDatabaseManager( RFs& aFs )
- : iFs( aFs )
+CMPXHarvesterDatabaseManager::CMPXHarvesterDatabaseManager( RFs& aFs ):
+ iFs( aFs )
+#ifdef __RAMDISK_PERF_ENABLE
+ ,iRAMDiskPerfEnabled(EFalse),
+ iMaximumAllowedRAMDiskSpaceToCopy(0),
+ //iUpdateCount(0),
+ iMtpMode(EFalse)
+ //iMtpAddCount(0)
+#endif //__RAMDISK_PERF_ENABLE
{
}
@@ -43,7 +67,38 @@
//
void CMPXHarvesterDatabaseManager::ConstructL()
{
+ MPX_FUNC("CMPXHarvesterDatabaseManager::ConstructL");
User::LeaveIfError( iDBSession.Connect() );
+
+#ifdef __RAMDISK_PERF_ENABLE
+ TInt temp;
+ CRepository* repository = CRepository::NewLC( KCRUIDMpxHarvesterFeatures );
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::ConstructL got repository");
+ User::LeaveIfError( repository->Get( KMpxHarvesterEnableRamDisk, temp ));
+ iRAMDiskPerfEnabled = temp;
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::ConstructL KMpxHarvesterEnableRamDisk %d", iRAMDiskPerfEnabled);
+
+ User::LeaveIfError( repository->Get( KMpxHarvesterMaxAllowedRamDiskSpace, temp) );
+ iMaximumAllowedRAMDiskSpaceToCopy = temp * KMPMegaByte;
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::ConstructL KMpxHarvesterMaxAllowedRamDiskSpace %Lu", iMaximumAllowedRAMDiskSpaceToCopy);
+ CleanupStack::PopAndDestroy(repository);
+
+ if ( iRAMDiskPerfEnabled )
+ {
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::ConstructL RAMDisk performance is enabled.");
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::ConstructL RAMDisk iMaximumAllowedRAMDiskSpaceToCopy=%Lu", iMaximumAllowedRAMDiskSpaceToCopy);
+ if ( GetRAMDiskPath() != KErrNone )
+ {
+ // Error finding ram drive, disable ram disk
+ iRAMDiskPerfEnabled = EFalse;
+ }
+ }
+ else
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::ConstructL RAMDisk performance is NOT enabled iRAMDiskPerfEnabled=%d", iRAMDiskPerfEnabled);
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::ConstructL RAMDisk iMaximumAllowedRAMDiskSpaceToCopy=%Lu", iMaximumAllowedRAMDiskSpaceToCopy);
+ }
+#endif //__RAMDISK_PERF_ENABLE
}
@@ -68,6 +123,13 @@
//
CMPXHarvesterDatabaseManager::~CMPXHarvesterDatabaseManager()
{
+#ifdef __RAMDISK_PERF_ENABLE
+ TInt count(iDatabases.Count());
+ for (TInt i = 0; i < count; ++i)
+ {
+ RemoveDummyFile(iDatabases[i]->GetDbDrive());
+ }
+#endif // __RAMDISK_PERF_ENABLE
iDatabases.ResetAndDestroy();
iDatabases.Close();
iDBSession.Close();
@@ -85,25 +147,20 @@
// Open drives we are interested in.
//
-#ifdef RD_MULTIPLE_DRIVE
TDriveList driveList;
TInt driveCount(0);
User::LeaveIfError( DriveInfo::GetUserVisibleDrives(
iFs, driveList, driveCount ) );
- TInt check(KErrNone);
for( TInt driveNum = EDriveA; driveNum <= EDriveZ; driveNum++ )
{
- if (driveList[driveNum] && !IsRemoteDrive(static_cast<TDriveNumber>(driveNum)))
+ if (driveList[driveNum] && IsLocalDrive(static_cast<TDriveNumber>(driveNum)))
{
- TFileName drivePath;
- User::LeaveIfError(
- PathInfo::GetRootPath( drivePath, driveNum ) );
- MPX_DEBUG2("CMPXHarvesterDatabaseManager::OpenAllDatabasesL: opening database in %S drive",
- &drivePath);
- TRAP( check, GetDatabaseL(static_cast<TDriveNumber>(driveNum)) );
- if( check == KErrNotFound )
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::OpenAllDatabasesL: opening database in drive %d", driveNum);
+ TInt index = FindDatabaseIndex ( (TDriveNumber) driveNum );
+ if ( index == KErrNotFound )
{
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::OpenAllDatabasesL: re-creating database");
CMPXHarvesterDB* dB = CMPXHarvesterDB::NewL(
static_cast<TDriveNumber>(driveNum), iFs );
CleanupStack::PushL( dB );
@@ -115,64 +172,23 @@
}
else
{
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::OpenAllDatabasesL: opening failed, error=%d, removing database", openError);
CleanupStack::PopAndDestroy( dB );
}
}
- else if( check == KErrNone )
+ else
{
- TRAPD(openError, GetDatabaseL(static_cast<TDriveNumber>(driveNum)).OpenL() );
+ CMPXHarvesterDB* dB = iDatabases[index];
+ TRAPD(openError, rtn |= dB->OpenL() ); //lint !e665
if(openError != KErrNone)
{
- TRAP_IGNORE( RemoveDatabaseL(static_cast<TDriveNumber>(driveNum)));
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::OpenAllDatabasesL: opening failed, error=%d, removing database", openError);
+ iDatabases.Remove ( index );
+ delete dB;
}
}
}
}
-#else
- TInt check(KErrNone);
- TRAP( check, GetDatabaseL(EDriveC) );
- if( check == KErrNotFound )
- {
- CMPXHarvesterDB* dB = CMPXHarvesterDB::NewL( EDriveC, iFs );
- CleanupStack::PushL( dB );
- iDatabases.AppendL( dB );
- CleanupStack::Pop( dB );
- TRAP_IGNORE( rtn = dB->OpenL() ); //lint !e665
- }
- else if( check == KErrNone )
- {
- TRAPD(openError, GetDatabaseL(EDriveC).OpenL() );
- if(openError != KErrNone)
- {
- TRAP_IGNORE( RemoveDatabaseL(EDriveC));
- }
- }
- TRAP( check, GetDatabaseL(EDriveE) ); //lint !e961
- if( check == KErrNotFound )
- {
- CMPXHarvesterDB* dB = CMPXHarvesterDB::NewL( EDriveE, iFs );
- CleanupStack::PushL( dB );
- TRAPD(openError, rtn |= dB->OpenL() ); //lint !e665
- if(openError == KErrNone)
- {
- iDatabases.AppendL( dB );
- CleanupStack::Pop( dB );
- }
- else
- {
- CleanupStack::PopAndDestroy( dB );
- }
- }
- else if( check == KErrNone )
- {
- TRAPD(openError,GetDatabaseL(EDriveE).OpenL() );
- if(openError != KErrNone)
- {
- TRAP_IGNORE( RemoveDatabaseL(EDriveE));
- }
- }
-#endif // RD_MULTIPLE_DRIVE
-
MPX_DEBUG1("CMPXHarvesterDatabaseManager::OpenAllDatabasesL --->"); //lint !e961
return rtn;
}
@@ -183,57 +199,173 @@
//
void CMPXHarvesterDatabaseManager::OpenDatabaseL( TDriveNumber aDrive )
{
- MPX_DEBUG1("CMPXHarvesterDatabaseManager::OpenDatabaseL <---");
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::OpenDatabaseL %d <---", aDrive);
- // Re-open a specific database
- //
- if (!IsRemoteDrive(aDrive))
+ if ( ! IsLocalDrive( aDrive ) )
+ {
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::OpenDatabaseL drive not available -->");
+ return;
+ }
+
+ CMPXHarvesterDB * db = NULL;
+ TInt index = FindDatabaseIndex ( aDrive );
+ if ( index == KErrNotFound )
{
- TInt count( iDatabases.Count() );
- for( TInt i=0; i<count; ++i )
+ index = iDatabases.Count();
+ db = CMPXHarvesterDB::NewL( aDrive, iFs );
+ CleanupStack::PushL( db );
+ iDatabases.AppendL( db );
+ CleanupStack::Pop( db );
+ }
+ else
{
- CMPXHarvesterDB* db = (CMPXHarvesterDB*) iDatabases[i];
- if( db->GetDbDrive() == aDrive )
- {
- db->OpenL();
- break;
- }
+ db = iDatabases[index];
}
+
+ // TRAPD(openError, rtn |= dB->OpenL() ); //lint !e665
+ TRAPD( openError, db->OpenL() );
+ if( openError != KErrNone )
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::OpenAllDatabasesL: opening failed, error=%d", openError);
+ iDatabases.Remove(index);
+ delete db;
}
MPX_DEBUG1("CMPXHarvesterDatabaseManager::OpenDatabaseL --->");
}
// ---------------------------------------------------------------------------
-// CMPXHarvesterDatabaseManager::CloseAllDatabase
+// CMPXHarvesterDatabaseManager::CloseAllDatabases
// ---------------------------------------------------------------------------
//
-void CMPXHarvesterDatabaseManager::CloseAllDatabase()
+void CMPXHarvesterDatabaseManager::CloseAllDatabases()
{
// Close all databases for shutdown
iDatabases.ResetAndDestroy();
}
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::CloseMassStorageDatabases
+// ---------------------------------------------------------------------------
+//
+void CMPXHarvesterDatabaseManager::CloseMassStorageDatabases()
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::CloseMassStorageDatabases");
+ for (TInt i = 0; i < iDatabases.Count();)
+ {
+ CMPXHarvesterDB * db =iDatabases [i];
+ TDriveNumber drive = db->GetDbDrive();
+ if ( drive != EDriveC )
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CloseMassStorageDatabases closing DB on drive %d", drive);
+ db->Close();
+#ifdef __RAMDISK_PERF_ENABLE
+ if( iRAMDiskPerfEnabled && db->IsUseRamDrive() )
+ {
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::CloseDatabase DB is on RAM");
+ db->SetRamDriveInfo( iRAMDrive, EFalse );
+ TInt err = DoCopyDBFromRam (drive);
+ if ( err )
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CloseDatabase DB copy error=%d", err);
+ RemoveDummyFile( drive );
+ }
+ }
+#endif
+ delete db;
+ iDatabases.Remove(i);
+ }
+ else
+ {
+ ++i;
+ }
+ }
+ }
+
// ---------------------------------------------------------------------------
// CMPXHarvesterDatabaseManager::CloseDatabase
// ---------------------------------------------------------------------------
//
void CMPXHarvesterDatabaseManager::CloseDatabase( TDriveNumber aDrive )
{
- if (!IsRemoteDrive(aDrive))
+ MPX_DEBUG2("-->CMPXHarvesterDatabaseManager::CloseDatabase drive %d", aDrive );
+ TInt index = FindDatabaseIndex( aDrive );
+ if ( index != KErrNotFound )
{
- MPX_DEBUG2("CMPXHarvesterDatabaseManager::CloseDatabase drive %d <---", aDrive );
- TInt count = iDatabases.Count();
- for ( TInt i=0; i<count; ++i)
+ CMPXHarvesterDB * db =iDatabases[index];
+ db->Close();
+#ifdef __RAMDISK_PERF_ENABLE
+ if( iRAMDiskPerfEnabled && db->IsUseRamDrive() )
{
- CMPXHarvesterDB* db = (CMPXHarvesterDB*) iDatabases[i];
- if ( db->GetDbDrive() == aDrive)
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::CloseDatabase DB is on RAM");
+ db->SetRamDriveInfo( iRAMDrive, EFalse );
+ TInt err = DoCopyDBFromRam(aDrive);
+ if ( err )
{
- db->Close();
- break;
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CloseDatabase DB copy error=%d", err);
+ RemoveDummyFile( aDrive );
}
}
+#endif
+ delete db;
+ iDatabases.Remove(index);
}
- MPX_DEBUG1("CMPXHarvesterDatabaseManager::CloseDatabase --->");
+ MPX_DEBUG1("<--CMPXHarvesterDatabaseManager::CloseDatabase");
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::DropDatabase
+// ---------------------------------------------------------------------------
+//
+void CMPXHarvesterDatabaseManager::DropDatabase( TDriveNumber aDrive )
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::DropDatabase drive %d <---", aDrive );
+ TInt index = FindDatabaseIndex( aDrive );
+ if ( index != KErrNotFound )
+ {
+ CMPXHarvesterDB * db =iDatabases[index];
+#ifdef __RAMDISK_PERF_ENABLE
+ if( iRAMDiskPerfEnabled && db->IsUseRamDrive() )
+ {
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::DropDatabase DB is on RAM");
+ db->Close();
+ // delete db on ram drive.
+ TFileName src = GenerateHarvesterDbName( TDriveUnit(aDrive), ETrue );
+ BaflUtils::DeleteFile(iFs, src);
+ }
+#endif
+ delete db;
+ iDatabases.Remove(index);
+ }
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::DropDatabase --->");
+ }
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::FindDatabaseIndex
+// ---------------------------------------------------------------------------
+//
+TInt CMPXHarvesterDatabaseManager::FindDatabaseIndex ( TDriveNumber aDrive )
+ {
+ TInt count = iDatabases.Count();
+ for( TInt i=0; i<count; ++i )
+ {
+ CMPXHarvesterDB* db = (CMPXHarvesterDB*) iDatabases[i];
+ if( db->GetDbDrive() == aDrive )
+ {
+ MPX_DEBUG3("CMPXHarvesterDatabaseManager::FindDatabaseIndex drive=%d returns index %d ", aDrive, i);
+ return i;
+ }
+ }
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::FindDatabaseIndex drive=%d returns KErrNotFound", aDrive);
+ return KErrNotFound;
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::DataaseIsOpen
+// ---------------------------------------------------------------------------
+//
+TBool CMPXHarvesterDatabaseManager::DatabaseIsOpen( TDriveNumber aDrive )
+ {
+ return FindDatabaseIndex( aDrive ) != KErrNotFound;
}
// ---------------------------------------------------------------------------
@@ -242,54 +374,9 @@
//
CMPXHarvesterDB& CMPXHarvesterDatabaseManager::GetDatabaseL( TDriveNumber aDrive )
{
- CMPXHarvesterDB* db( NULL );
-
- // Find the database
- TInt count = iDatabases.Count();
- for( TInt i=0; i<count; ++i )
- {
- CMPXHarvesterDB* tmp = (CMPXHarvesterDB*) iDatabases[i];
- if( tmp->GetDbDrive() == aDrive )
- {
- db = tmp;
- break;
- }
- }
-
- // Not found, so we leave
- if( db == NULL )
- {
- User::Leave( KErrNotFound );
- }
- return *db;
- }
-
-// ---------------------------------------------------------------------------
-// CMPXHarvesterDatabaseManager::RemoveDatabase
-// ---------------------------------------------------------------------------
-//
-void CMPXHarvesterDatabaseManager::RemoveDatabaseL( TDriveNumber aDrive )
- {
-
- TBool bFound(EFalse);
- // Find the database
- TInt count = iDatabases.Count();
- for(TInt index=0; index<count; ++index )
- {
- if((iDatabases[index]!=NULL) && ( iDatabases[index]->GetDbDrive() == aDrive ))
- {
- bFound = ETrue;
- delete iDatabases[index];
- iDatabases.Remove(index);
- break;
- }
- }
-
- // Not found, so we leave
- if( !bFound )
- {
- User::Leave( KErrNotFound );
- }
+ TInt index = FindDatabaseIndex( aDrive );
+ User::LeaveIfError (index); // Not found, so we leave
+ return *iDatabases[index];
}
// ---------------------------------------------------------------------------
@@ -321,18 +408,27 @@
void CMPXHarvesterDatabaseManager::RecreateDatabases()
{
MPX_DEBUG1("CMPXHarvesterDatabaseManager::RecreateDatabases <--");
- TInt count( iDatabases.Count() );
- for( TInt i=0; i<count; ++i )
+ for( TInt i=0; i < iDatabases.Count(); )
{
// Close db, delete and recreate
//
MPX_DEBUG2("RecreateDatabasesL() -- %i", i);
- CMPXHarvesterDB* cur = (CMPXHarvesterDB*)iDatabases[i];
+ CMPXHarvesterDB* cur = iDatabases[i];
cur->Close();
cur->DeleteDatabase();
// trap leave just in case 1 db had err
//
- TRAP_IGNORE( cur->OpenL() );
+ TRAPD( openError, cur->OpenL() );
+ if( openError != KErrNone )
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::RecreateDatabases: opening failed, error=%d", openError);
+ iDatabases.Remove(i);
+ delete cur;
+ }
+ else
+ {
+ ++i;
+ }
}
}
@@ -353,6 +449,18 @@
}
// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::IsLocalDrive
+// ---------------------------------------------------------------------------
+//
+TBool CMPXHarvesterDatabaseManager::IsLocalDrive( TDriveNumber aDrive )
+ {
+ TDriveInfo driveInfo;
+ return (iFs.Drive ( driveInfo, aDrive) == KErrNone )
+ && driveInfo.iType != EMediaNotPresent
+ && ! (driveInfo.iDriveAtt & KDriveAttRemote);
+ }
+
+// ---------------------------------------------------------------------------
// CMPXHarvesterDatabaseManager::BeginL
// ---------------------------------------------------------------------------
//
@@ -415,5 +523,636 @@
MPX_DEBUG1("CMPXHarvesterDatabaseManager::Rollback -->");
}
+#ifdef __RAMDISK_PERF_ENABLE
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::CopyDBsToRamL
+// ---------------------------------------------------------------------------
+//
+void CMPXHarvesterDatabaseManager::CopyDBsToRamL( TBool aMtpMode )
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::CopyDBsToRamL");
+ iMtpMode = aMtpMode;
+ //iMtpAddCount = 0;
+ //iUpdateCount = 0;
+
+ if( iRAMDiskPerfEnabled )
+ {
+ // Check for low ram disk space.
+ if ( !IsRamDiskSpaceAvailable() || IsRamDiskLow() )
+ {
+ return;
+ }
+
+ // Check if we are over the allowed ram space.
+ TInt dbSize=0;
+ TInt err = GetTotalDatabasesSize(dbSize, EFalse);
+ if ( err || (dbSize > iMaximumAllowedRAMDiskSpaceToCopy) )
+ {
+ MPX_DEBUG2("CMPXDbManager::CopyDBsToRamL Over the allowed Ram disk limit %Lu", iMaximumAllowedRAMDiskSpaceToCopy );
+ return;
+ }
+
+ TInt count(iDatabases.Count());
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CopyDBsToRamL() iDatabaseHandles.Count()=%d", count);
+ for (TInt i = 0; i < count; ++i)
+ {
+ TDriveUnit drive( iDatabases[i]->GetDbDrive() );
+ // Don't copy db on C drive.
+ if ( (TInt)drive == EDriveC )
+ {
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::CopyDBsToRamL() Drive C: skipped.");
+ continue;
+ }
+
+ // Check if database is in RAM drive.
+ if ( iDatabases[i]->IsUseRamDrive())
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CopyDBsToRamL Drive %d is already in Ram Drive.", (TInt)drive);
+ continue;
+ }
+
+ // Get the db state in order to restore it later.
+ TDbState dbState = iDatabases[i]->GetDbState();
+ iDatabases[i]->SetDbStateL( EDbClose );
+ TRAPD(err, DoCopyDBToRamL( drive ));
+ if ( err != KErrNone )
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CopyDBsToRamL error=%d", err);
+ // delete dummy file
+ RemoveDummyFile( (TDriveNumber)(TInt)drive );
+
+ // delete db in ram drive
+ TFileName ramDb = GenerateHarvesterDbName( drive, ETrue );
+ TInt delErr = BaflUtils::DeleteFile(iFs, ramDb);
+ MPX_DEBUG3("CMPXHarvesterDatabaseManager::CopyDBsToRamL db on ram drive deleted file=%S, err=%d", &ramDb, delErr);
+
+ iDatabases[i]->SetRamDriveInfo( iRAMDrive, EFalse);
+ }
+ // Restore the db state.
+ iDatabases[i]->SetDbStateL( dbState );
+ }
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::DoCopyDBToRamL
+// ---------------------------------------------------------------------------
+//
+void CMPXHarvesterDatabaseManager::DoCopyDBToRamL(TDriveUnit aDriveUnit)
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::DoCopyDBToRamL");
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::DoCopyDBToRamL Database from drive %d", (TInt)aDriveUnit );
+ TFileName dst;
+ TFileName src;
+ dst.Zero();
+ dst.Append(iRAMFolder);
+ BaflUtils::EnsurePathExistsL( iFs, dst );
+ src = GenerateHarvesterDbName( aDriveUnit );
+ MPX_DEBUG2("RAMDisk src path=%S", &src);
+ dst = GenerateHarvesterDbName( aDriveUnit, ETrue );
+ MPX_DEBUG2("RAMDisk dst path=%S", &dst);
+ TEntry entry;
+ iFs.Entry( src, entry );
+ User::LeaveIfError( BlockDiskSpaceL( aDriveUnit, entry.iSize ));
+ User::LeaveIfError( BaflUtils::CopyFile(iFs, src, dst ) );
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::DoCopyDBToRamL Copy to Ram Drive Successful.");
+ GetDatabaseL( (TDriveNumber) (TInt)aDriveUnit ).SetRamDriveInfo(iRAMDrive, ETrue);
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::CopyDBsFromRamL
+// ---------------------------------------------------------------------------
+//
+void CMPXHarvesterDatabaseManager::CopyDBsFromRamL()
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::CopyDBsFromRamL");
+ // Stop monitoring ram drive for low disk space.
+ iMtpMode = EFalse;
+ //iMtpAddCount = 0;
+ //iUpdateCount = 0;
+
+ if( iRAMDiskPerfEnabled )
+ {
+ // Should not leave until all the databases have been copied from RAM drive.
+ TInt leaveError = KErrNone;
+ TInt count(iDatabases.Count());
+ for (TInt i = 0; i < count; ++i)
+ {
+ TInt err = KErrNone;
+ TDriveUnit drive( iDatabases[i]->GetDbDrive() );
+ // Check if database is in RAM drive.
+ if ( !iDatabases[i]->IsUseRamDrive())
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CopyDBsFromRamL Drive %d is NOT in Ram Drive.", (TInt)drive);
+ continue;
+ }
+
+ // Set the UseRamDrive bool to False.
+ iDatabases[i]->SetRamDriveInfo( iRAMDrive, EFalse );
+ // Get the db state in order to restore it later.
+ TDbState dbState = iDatabases[i]->GetDbState();
+ TRAP( err, iDatabases[i]->SetDbStateL(EDbClose) );
+ if ( err == KErrNone )
+ {
+ err = DoCopyDBFromRam(drive);
+ }
+ else
+ {
+ // Error closing db on RAM drive, try to delete it.
+ TFileName ramDB;
+ ramDB = GenerateHarvesterDbName( drive, ETrue );
+ BaflUtils::DeleteFile(iFs, ramDB);
+ }
+
+ if ( err )
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CopyDBsFromRamL copy error=%d", err);
+ //anyting wrong, delete the temp file.
+ RemoveDummyFile( (TDriveNumber)(TInt)drive );
+ }
+
+ // Restore the db state.
+ TRAPD( error, iDatabases[i]->SetDbStateL( dbState ) );
+ if ( error && !leaveError )
+ {
+ leaveError = error;
+ }
+ }
+ User::LeaveIfError( leaveError );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::DoCopyDBFromRam
+// ---------------------------------------------------------------------------
+//
+TInt CMPXHarvesterDatabaseManager::DoCopyDBFromRam(TDriveUnit aDriveUnit)
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::DoCopyDBFromRam");
+ TFileName dst;
+ TFileName src;
+ TInt err = KErrNone;
+
+ dst = GenerateHarvesterDbName( aDriveUnit );
+ src = GenerateHarvesterDbName( aDriveUnit, ETrue );
+ MPX_DEBUG3("CMPXHarvesterDatabaseManager::DoCopyDBFromRam from %S to %S", &src, &dst );
+
+ TFileName dummyDbFileName = GenerateDummyDbName( aDriveUnit );
+
+ //Copy Db from RAM to replace dummy file
+ err = BaflUtils::CopyFile(iFs, src, dummyDbFileName);
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::DoCopyDBFromRam database copied from ram drive err=%d.", err);
+
+ // delete db on ram drive.
+ TInt delErr = BaflUtils::DeleteFile(iFs, src);
+ MPX_DEBUG3("CMPXHarvesterDatabaseManager::DoCopyDBFromRam db on ram drive deleted file=%S, err=%d", &src, delErr);
+
+ // Make sure we del db from ram drive before returning.
+ if (err != KErrNone)
+ {
+ return err;
+ }
+
+ err = iFs.Replace(dummyDbFileName, dst);
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::DoCopyDBFromRam dummy file replaced, err=%d.", err);
+ return err;
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::GetRAMDiskPath
+// ---------------------------------------------------------------------------
+//
+TInt CMPXHarvesterDatabaseManager::GetRAMDiskPath()
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::GetRAMDiskPath");
+ TDriveList driveList;
+ TBool ramDriveFound = EFalse;
+ iRAMFolder.Zero();
+
+ TInt error = iFs.DriveList( driveList );
+ if ( error == KErrNone )
+ {
+ for ( TInt i = 0; i < driveList.Length(); i++ )
+ {
+ if ( driveList[i] != 0 )
+ {
+ TDriveInfo info;
+ TInt err = iFs.Drive( info, i );
+ if ( !err && info.iType == EMediaRam )
+ {
+ TDriveUnit driveUnit( i );
+ iRAMDrive = (TDriveNumber)i;
+ iRAMFolder.Append(driveUnit.Name());
+ iRAMFolder.Append(KHarvesterDBPath);
+ ramDriveFound = ETrue;
+ MPX_DEBUG2("RAMDisk path=%S", &iRAMFolder);
+ break;
+ }
+ }
+ }
+
+ // Check if ram drive is found.
+ if ( !ramDriveFound )
+ {
+ error = KErrNotFound;
+ }
+ }
+ MPX_DEBUG2("CMPXDbManager::GetRAMDiskPath Get DriveList error=%d", error);
+ return error;
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::IsRamDiskSpaceAvailable
+// ---------------------------------------------------------------------------
+//
+TBool CMPXHarvesterDatabaseManager::IsRamDiskSpaceAvailable()
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::IsRamDiskSpaceAvailable");
+ TVolumeInfo vol;
+ TInt err = iFs.Volume( vol, iRAMDrive );
+ if ( err != KErrNone )
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::IsRamDiskSpaceAvailable Disk Not available to use. Error = %d", err);
+ return EFalse;
+ }
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::IsRamDiskSpaceAvailable Free in bytes =%Lu", vol.iFree);
+ if ( vol.iFree > KMPMinimumRAMSizeToRun )
+ {
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::IsRamDiskSpaceAvailable Ok to copy");
+ return ETrue;
+ }
+
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::IsRamDiskSpaceAvailable NOT Ok to copy");
+ return EFalse;
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::BlockDiskSpaceL
+// ---------------------------------------------------------------------------
+//
+TInt CMPXHarvesterDatabaseManager::BlockDiskSpaceL( TDriveUnit aDrive, TInt aOrigDbSize )
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::BlockDiskSpaceL");
+
+ // if current DB size can not fit in RAM, abort now
+ TVolumeInfo vol;
+ TInt err = KErrNone;
+ err = iFs.Volume( vol, iRAMDrive );
+ if ( err )
+ {
+ return err;
+ }
+
+ if ( vol.iFree < aOrigDbSize + KMPMinimumRAMSizeToRun )
+ {
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::BlockDiskSpaceL Not enough space on ram drive." );
+ return KErrDiskFull;
+ }
+
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::BlockDiskSpaceL %d", (TInt)aDrive );
+ err = iFs.Volume( vol, (TInt)aDrive );
+ if ( err )
+ {
+ return err;
+ }
+
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::BlockDiskSpaceL Disk total free space in bytes =%Lu", vol.iFree);
+ TInt64 blockingSize( CalculateInitalDummyDBSizeL( vol, aOrigDbSize ));
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::BlockDiskSpaceL Disk blocking size =%Lu", blockingSize);
+ // Pad blockingSize by 1Mb so we don't use all the free disk space.
+ if ( vol.iFree > (blockingSize + 1*KMPMegaByte) )
+ {
+ TFileName dummyDbFileName = GenerateDummyDbName( aDrive );
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::BlockDiskSpaceL Dummy db file name=%S", &dummyDbFileName);
+
+ RFile dummyDb;
+ err = dummyDb.Replace( iFs, dummyDbFileName, EFileWrite );
+ if (err != KErrNone)
+ {
+ MPX_DEBUG2("CMPXDbManager::BlockDiskSpaceL Can't open dummy file %d", err);
+ return err;
+ }
+
+ err = dummyDb.SetSize( blockingSize );
+ // Close the dummy RFile
+ dummyDb.Close();
+ if ( err )
+ {
+ MPX_DEBUG2("CMPXDbManager::BlockDiskSpaceL Can't resize dummy file %d", err);
+ return err;
+ }
+ }
+ else
+ {
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::BlockDiskSpaceL - Not enough disk space for dummy file.");
+ err = KErrDiskFull;
+ }
+ return err;
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::CalculateInitalDummyDBSizeL
+// ---------------------------------------------------------------------------
+//
+TInt64 CMPXHarvesterDatabaseManager::CalculateInitalDummyDBSizeL( TVolumeInfo aVol, TInt aOrigDbSize )
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::CalculateInitalDummyDBSizeL");
+ TInt64 size;
+
+ if ( iMtpMode )
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CalculateInitalDummyDBSize aVol.iFree=%Lu", aVol.iFree );
+ TInt64 totalNumOfSongsCanFit = aVol.iFree / KMPEstimatedSongInBytes;
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CalculateInitalDummyDBSize (MTP) totalNumOfSongsCanFit=%Lu", totalNumOfSongsCanFit );
+ TInt64 estimatedSize = totalNumOfSongsCanFit * (TInt64) KMPEstimatedSizePerDBEntry + aOrigDbSize;
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CalculateInitalDummyDBSize (MTP) estimated DB size from calculation=%Lu", estimatedSize );
+ if ( estimatedSize > iMaximumAllowedRAMDiskSpaceToCopy )
+ {
+ size = iMaximumAllowedRAMDiskSpaceToCopy;
+ }
+ else
+ {
+ size = estimatedSize;
+ }
+ }
+ else
+ {
+ TInt64 totalNumOfSongsCanFit = aVol.iSize / KMPEstimatedSongInBytes;
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CalculateInitalDummyDBSize totalNumOfSongsCanFit=%Lu", totalNumOfSongsCanFit );
+ TInt64 estimatedSize = totalNumOfSongsCanFit * (TInt64) KMPEstimatedSizePerDBEntry + aOrigDbSize;
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CalculateInitalDummyDBSize estimated DB size from calculation=%Lu", estimatedSize );
+ if ( estimatedSize > iMaximumAllowedRAMDiskSpaceToCopy )
+ {
+ size = iMaximumAllowedRAMDiskSpaceToCopy;
+ }
+ else
+ {
+ size = estimatedSize;
+ }
+ }
+
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::CalculateInitalDummyDBSize Dummy DB size=%Lu", size );
+ return size;
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::RemoveDummyFile
+// ---------------------------------------------------------------------------
+//
+void CMPXHarvesterDatabaseManager::RemoveDummyFile( TDriveNumber aDrive )
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::RemoveDummyFile");
+
+ TFileName file = GenerateDummyDbName(TDriveUnit(aDrive));
+
+ if ( (file.Length() > 0) &&
+ (BaflUtils::FileExists(iFs, file)) )
+ {
+ BaflUtils::DeleteFile(iFs, file);
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::UpdateDBsFromRamL
+// ---------------------------------------------------------------------------
+//
+/*void CMPXHarvesterDatabaseManager::UpdateDBsFromRamL( TInt aCount )
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::UpdateDBsFromRamL");
+ TBool updateDb = EFalse;
+
+ // In MTP mode, aCount is invalid, songs are added one at a time.
+ if ( iMtpMode )
+ {
+ iMtpAddCount++;
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::UpdateDBsFromRamL iMtpAddCount=%d", iMtpAddCount);
+ if ( (iMtpAddCount - iUpdateCount) > KUpdateDBCount )
+ {
+ updateDb = ETrue;
+ iUpdateCount = iMtpAddCount;
+ }
+ }
+ else
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::UpdateDBsFromRamL aCount=%d", aCount);
+ if ( (aCount - iUpdateCount) > KUpdateDBCount )
+ {
+ updateDb = ETrue;
+ iUpdateCount = aCount;
+ }
+ }
+
+ if ( updateDb )
+ {
+ CommitL();
+ TInt count(iDatabases.Count());
+ for (TInt i = 0; i < count; ++i)
+ {
+ TDriveUnit drive( iDatabases[i]->GetDbDrive() );
+ // Check if database is not in RAM drive.
+ if ( !iDatabases[i]->IsUseRamDrive() )
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::UpdateDBsFromRamL Drive %d is not in Ram Drive.", (TInt)drive);
+ continue;
+ }
+
+ iDatabases[i]->Close();
+ // update the database from ram drive.
+ TRAP_IGNORE( DoUpdateDBFromRamL( drive ) );
+ //
+ iDatabases[i]->OpenL();
+ }
+ BeginL();
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::DoUpdateDBFromRamL
+// ---------------------------------------------------------------------------
+//
+void CMPXHarvesterDatabaseManager::DoUpdateDBFromRamL(TDriveUnit aDriveUnit)
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::DoUpdateDBFromRamL");
+
+ TFileName dst;
+ TFileName src;
+
+ dst = GenerateHarvesterDbName( aDriveUnit );
+ src = GenerateHarvesterDbName( aDriveUnit, ETrue );
+ MPX_DEBUG3("CMPXHarvesterDatabaseManager::DoUpdateDBFromRamL from %S to %S", &src, &dst );
+
+ //Copy Db from RAM to real db file
+ TInt err = BaflUtils::CopyFile(iFs, src, dst);
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::DoUpdateDBFromRamL database copied from ram drive err=%d.", err);
+ }*/
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::GenerateHarvesterDbName
+// ---------------------------------------------------------------------------
+//
+TFileName CMPXHarvesterDatabaseManager::GenerateHarvesterDbName( TDriveUnit aDriveUnit, TBool aForRamDrive )
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::GenerateHarvesterDbName");
+ TFileName name;
+ name.Zero();
+
+ if ( aForRamDrive )
+ {
+ name.Append(iRAMFolder);
+ name.Append(aDriveUnit.Name()[0]);
+ name.Append(KHarvesterDBName);
+ }
+ else
+ {
+ name.Append(aDriveUnit.Name());
+ name.Append(KHarvesterDBPath);
+ name.Append(KHarvesterDBName);
+ }
+
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::GenerateHarvesterDbName name = %S", &name );
+ return name;
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::GenerateDummyDbName
+// ---------------------------------------------------------------------------
+//
+TFileName CMPXHarvesterDatabaseManager::GenerateDummyDbName( TDriveUnit aDriveUnit )
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::GenerateDummyDbName");
+ TFileName name;
+ name.Zero();
+ name.Append(aDriveUnit.Name());
+ name.Append(KHarvesterDBPath);
+ name.Append(KHarvesterDummyDBName);
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::GenerateDummyDbName name = %S", &name );
+ return name;
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::EnsureRamSpaceL
+// ---------------------------------------------------------------------------
+//
+void CMPXHarvesterDatabaseManager::EnsureRamSpaceL()
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::EnsureRamSpaceL()");
+
+ // Ram disk disabled, no need to continue.
+ if( !iRAMDiskPerfEnabled )
+ {
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::EnsureRamSpaceL RAM Disk Disabled.");
+ return;
+ }
+
+ // Check if any DBs are in RAM drive.
+ TInt count(iDatabases.Count());
+ TBool ramDriveInUse = EFalse;
+ for (TInt i = 0; i < count; ++i)
+ {
+ // Check if database is in RAM drive.
+ if ( iDatabases[i]->IsUseRamDrive() )
+ {
+ ramDriveInUse = ETrue;
+ break;
+ }
+ }
+
+ // DBs not in ram drive, no need to continue.
+ if ( !ramDriveInUse )
+ {
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::EnsureRamSpaceL No DBs in RAM drive.");
+ return;
+ }
+
+ // Check if low on Ram disk.
+ if ( IsRamDiskLow() )
+ {
+ // RAM not enough, copy back to normal drive and continue to harvest.
+ MPX_DEBUG1("CMPXHarvesterDatabaseManager::EnsureRamSpaceL RAM diskspace is full, copy dbs back.");
+ CopyDBsFromRamL();
+ }
+ else
+ {
+ TInt size=0;
+ TInt err = GetTotalDatabasesSize(size, ETrue);
+ if ( err || (size > iMaximumAllowedRAMDiskSpaceToCopy) )
+ {
+ // Databases using too much RAM space, copy back to normal drive and continue to harvest.
+ if ( err )
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::EnsureRamSpaceL Get DBs Size Err = %d, copy dbs back.", err);
+ }
+ else
+ {
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::EnsureRamSpaceL DBs using too much RAM space size = %d, copy dbs back.", size);
+ }
+ CopyDBsFromRamL();
+ }
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::IsRamDiskLow
+// ---------------------------------------------------------------------------
+//
+TBool CMPXHarvesterDatabaseManager::IsRamDiskLow()
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::IsRamDiskLow()");
+ TBool low = EFalse;
+ TVolumeInfo vol;
+ TInt errRAM = iFs.Volume( vol, iRAMDrive );
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::IsRamDiskLow Get vol err: %d", errRAM);
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::IsRamDiskLow Free RAM Disk Space: %Lu", vol.iFree);
+ if ( errRAM == KErrNone && vol.iFree < KMPMinimumRAMSizeToRun )
+ {
+ low = ETrue;
+ }
+ return low;
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXHarvesterDatabaseManager::GetTotalDatabasesSize
+// ---------------------------------------------------------------------------
+//
+TInt CMPXHarvesterDatabaseManager::GetTotalDatabasesSize(TInt& aSize, TBool aRamDrive)
+ {
+ MPX_FUNC("CMPXHarvesterDatabaseManager::GetTotalDatabasesSize");
+ TInt err = KErrNone;
+ TInt size=0;
+ TInt count(iDatabases.Count());
+ for ( TInt i = 0; i < count ; ++i )
+ {
+ TDriveUnit drive( iDatabases[i]->GetDbDrive() );
+ // Ignore C drive
+ if ( (TInt)drive == EDriveC )
+ {
+ continue;
+ }
+ // Generate database name.
+ TFileName dbFilename = GenerateHarvesterDbName(drive, aRamDrive);
+ MPX_DEBUG2("CMPXHarvesterDatabaseManager::GetTotalDatabasesSize - Database name = %S", &dbFilename);
+ TEntry entry;
+ err = iFs.Entry( dbFilename, entry );
+ if (err == KErrNotFound || err == KErrNotReady)
+ {
+ MPX_DEBUG3("CMPXHarvesterDatabaseManager::GetTotalDatabasesSize - Ignored %S, err = %d", &dbFilename, err);
+ err = KErrNone;
+ continue;
+ }
+ if ( err != KErrNone )
+ {
+ break;
+ }
+ MPX_DEBUG3("CMPXHarvesterDatabaseManager::GetTotalDatabasesSize - Size of Db %S = %d", &dbFilename, entry.iSize);
+ // sum up size
+ size += entry.iSize;
+ }
+ aSize = size;
+ MPX_DEBUG3("CMPXHarvesterDatabaseManager::GetTotalDatabasesSize - Total Size of Dbs = %d, err = %d", size, err);
+ return err;
+ }
+
+#endif // __RAMDISK_PERF_ENABLE
+
// END OF FILE
--- a/mmappcomponents/harvester/filehandler/src/mpxharvesterfilehandlerimp.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/filehandler/src/mpxharvesterfilehandlerimp.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: Handles all file related activities
-* Version : %version: da1mmcf#72.1.14.2.4.1.4.1.2 % << Don't touch! Updated by Synergy at check-out.
+* Version : %version: da1mmcf#72.1.14.2.4.1.4.1.2.5.3 % << Don't touch! Updated by Synergy at check-out.
*
*/
@@ -20,10 +20,8 @@
#include <e32base.h>
#include <f32file.h>
#include <centralrepository.h>
-#ifdef RD_MULTIPLE_DRIVE
#include <pathinfo.h>
#include <driveinfo.h>
-#endif //RD_MULTIPLE_DRIVE
#include <mpxlog.h>
#include <mpxharvestercommon.h>
@@ -48,8 +46,7 @@
#include <caf/caferr.h>
#include <caf/content.h>
#include <caf/data.h>
-#include <UsbWatcherInternalPSKeys.h>
-#include <usbpersonalityids.h>
+#include <mtpprivatepskeys.h>
#include "mpxharvesterfilehandlerimp.h"
#include "mpxfolderscanner.h"
@@ -124,7 +121,6 @@
// List of watchers for different drives
//
-#ifdef RD_MULTIPLE_DRIVE
TDriveList driveList;
TInt driveCount(0);
User::LeaveIfError( DriveInfo::GetUserVisibleDrives(
@@ -141,17 +137,6 @@
CleanupStack::Pop( dw );
}
}
-#else
- CMPXDiskSpaceWatcher* dw_e = CMPXDiskSpaceWatcher::NewL( iFs, EDriveE, *this );
- CleanupStack::PushL( dw_e );
- iDiskMonitors.AppendL( dw_e );
- CleanupStack::Pop( dw_e );
- CMPXDiskSpaceWatcher* dw_c = CMPXDiskSpaceWatcher::NewL( iFs, EDriveC, *this );
- CleanupStack::PushL( dw_c );
- iDiskMonitors.AppendL( dw_c );
- CleanupStack::Pop( dw_c );
-#endif // RD_MULTIPLE_DRIVE
-
TInt openerr = iDBManager->OpenAllDatabasesL();
@@ -187,6 +172,7 @@
// Get the scan drives from cenrep.
//
ParseScanPathL();
+ RefreshScanDrivesL();
// Get the list of container types
iContainerTypes = new(ELeave) CDesCArrayFlat(2); // granularity
@@ -214,16 +200,10 @@
iDbSynchronizer = CMPXDbSynchronizer::NewL(*this,*iDBManager,iMusicCollectionId,
iPodcastCollectionId,iFs, iDisablePodcasting);
-#ifdef RD_MULTIPLE_DRIVE
- // Use default MMC drive as the Removable drive
- User::LeaveIfError( DriveInfo::GetDefaultDrive(
- DriveInfo::EDefaultRemovableMassStorage,
- iRemovedDrive ) );
-#endif
-
// Create DRM Notifier and register for AddRemove event
iDrmNotifier = CDRMNotifier::NewL();
iDrmNotifier->RegisterEventObserverL( *this, KEventAddRemove );
+ iCurUSBEvent = KErrNotFound;
}
// ---------------------------------------------------------------------------
@@ -269,11 +249,9 @@
}
delete iContainerTypes;
- iFilteredDrivesToScan.Reset();
iFilteredDrivesToScan.Close();
- iDrivesToScan.Reset();
iDrivesToScan.Close();
- iPathsToBlock.Reset();
+ iConfiguredDrivesToScan.Close();
iPathsToBlock.Close();
// Cleans up the scanning tables and arrays
@@ -320,14 +298,16 @@
}
iCollectionUtil = MMPXCollectionUtility::NewL( NULL, KMusicPlayerUid );
- // cenrep key need to be checked whether USB cable is connected in MTP/Combined Mode
+ // cenrep key need to be checked whether MTP is connected
// to prevent refresh
- TInt usbStatus;
- RProperty::Get(KPSUidUsbWatcher, KUsbWatcherSelectedPersonality, usbStatus);
-
- if ((usbStatus == KUsbPersonalityIdMTP) || (usbStatus == KUsbPersonalityIdPCSuiteMTP))
+ TInt mtpStatus = EMtpPSStatusUninitialized;
+ RProperty::Get( KMtpPSUid, KMtpPSStatus, mtpStatus);
+
+ MPX_DEBUG2("CMPXCollectionViewHgImp::ConstructL, mtpstatus = %d", mtpStatus);
+
+ if (mtpStatus != EMtpPSStatusUninitialized)
{
- MPX_DEBUG1("USB is active, Leave with KErrLocked");
+ MPX_DEBUG1("MTP is active, Leave with KErrLocked");
// need to call back even if it leaves here
iCollectionUtil->Collection().NotifyL( EMcMsgRefreshEnd, KErrLocked );
//User::Leave(KErrLocked);
@@ -336,14 +316,12 @@
iCollectionUtil->Collection().NotifyL( EMcMsgRefreshStart, KErrNone );
- // Reopen databases
- iDBManager->OpenAllDatabasesL();
-
// Begin transaction on databases
iDBManager->BeginL();
//Remove out of disk space drives from scanned drives list
iFilteredDrivesToScan.Reset();
+ iFilteredOutOfDisk = EFalse;
CopyArrayL(iDrivesToScan.Array(),iFilteredDrivesToScan);
iOutOfDisk = EFalse;
@@ -370,6 +348,7 @@
if (currentDriveNumber == driveNumber)
{
iFilteredDrivesToScan.Remove(index);
+ iFilteredOutOfDisk = ETrue;
count--;
}
else
@@ -377,7 +356,7 @@
index++;
}
}
- TRAP_IGNORE(iDBManager->RemoveDatabaseL(static_cast<TDriveNumber>(currentDriveNumber)));
+ iDBManager->CloseDatabase(static_cast<TDriveNumber>(currentDriveNumber));
}
}
@@ -428,7 +407,7 @@
void CMPXHarvesterFileHandlerImp::HandleSystemEventL( TSystemEvent aEvent,
TInt aData )
{
- MPX_DEBUG2("CMPXHarvesterFileHandlerImp::HandleSystemEventL %i", aEvent);
+ MPX_DEBUG3("CMPXHarvesterFileHandlerImp::HandleSystemEventL %i, drive %d", aEvent, aData);
// How to handle each event
//
// 1: Format and eject, we stop scanning and close only the mmc db
@@ -437,8 +416,8 @@
// 4: USB end we re-open all db and scan for new files
// 5: MTP start we stop monitoring for new files (no dismount)
// 6: MTP end we re-open all db, files added already, restart monitor
+ // 7: Disk dismount: stop scanning, close the dismounting DB
//
-#ifdef RD_MULTIPLE_DRIVE
// Get all visible drives
TDriveList driveList;
TInt driveCount(0);
@@ -465,129 +444,115 @@
User::LeaveIfError(
iFs.DriveToChar( driveNum, driveChar ) );
MPX_DEBUG5 ("CMPXHarvesterFileHandlerImp::HandleSystemEventL - drive %c: is %S, %S and %S",
- driveChar,
+ (TUint)driveChar,
(driveStatus&DriveInfo::EDrivePresent)?&drivePresent:&driveNotPresent,
(driveStatus&DriveInfo::EDriveInUse)?&driveInUse:&driveAvailable,
(driveStatus&DriveInfo::EDriveFormatted)?&driveFormatted:&driveNotFormatted);
}
}
-#endif //RD_MULTIPLE_DRIVE
+
switch( aEvent )
{
case EFormatStartEvent:
{
- MPX_DEBUG1("Disk Format start event");
+ MPX_DEBUG2("Disk Format start event, drive %d", aData);
+ iIdle->Cancel();
CancelScan();
iDBManager->CloseDatabase( (TDriveNumber) aData );
+ RefreshScanDrivesL();
break;
}
case EDiskRemovedEvent:
{
- MPX_DEBUG1("Disk Removed event");
+ MPX_DEBUG2("Disk Removed event, drive %d", aData);
iIdle->Cancel();
CancelScan();
-#ifdef RD_MULTIPLE_DRIVE
- for( TInt driveNum = EDriveA; driveNum <= EDriveZ; driveNum++ )
- {
- if (driveList[driveNum] && (!iDBManager->IsRemoteDrive(static_cast<TDriveNumber>(driveNum))))
- {
- TUint driveStatus(0);
- User::LeaveIfError( DriveInfo::GetDriveStatus(
- iFs, driveNum, driveStatus ) );
- if (!(driveStatus & DriveInfo::EDrivePresent ))
- {
- // Close database for non-present drive
- iDBManager->CloseDatabase( (TDriveNumber) driveNum );
- // Save the drive
- iRemovedDrive = driveNum;
- break;
- }
- }
- }
-#else
- iDBManager->CloseDatabase( (TDriveNumber) aData );
-#endif // RD_MULTIPLE_DRIVE
+ iDBManager->DropDatabase ( TDriveNumber( aData ) );
+ RefreshScanDrivesL();
break;
}
case EFormatEndEvent:
{
- MPX_DEBUG1("Disk Format end event");
+ MPX_DEBUG2("Disk Format end event, drive %d", aData);
CancelScan();
iDBManager->OpenDatabaseL( (TDriveNumber) aData );
+ RefreshScanDrivesL();
break;
}
case EDiskInsertedEvent:
{
- MPX_DEBUG1("Disk Insert event");
+ MPX_DEBUG2("Disk Insert event %d", aData);
CancelScan();
-#ifdef RD_MULTIPLE_DRIVE
- iDBManager->OpenDatabaseL( (TDriveNumber) iRemovedDrive );
-#else
iDBManager->OpenDatabaseL( (TDriveNumber) aData );
-#endif // RD_MULTIPLE_DRIVE
+ RefreshScanDrivesL();
break;
}
case EUSBMassStorageStartEvent:
{
- iIdle->Cancel();
- CancelScan();
-#ifdef RD_MULTIPLE_DRIVE
- // Close all databases other than the phone memory database
- for( TInt driveNum = EDriveA; driveNum <= EDriveZ; driveNum++ )
+ if (iCurUSBEvent == EUSBMassStorageStartEvent)
{
- if (driveList[driveNum] && (!iDBManager->IsRemoteDrive(static_cast<TDriveNumber>(driveNum))))
- {
- if ( driveNum != EDriveC )
- {
- iDBManager->CloseDatabase( (TDriveNumber) driveNum );
- }
- }
- }
-#else
- iDBManager->CloseDatabase( (TDriveNumber) aData );
-#endif // RD_MULTIPLE_DRIVE
+ break;
+ }
+ iIdle->Cancel();
+ iDBManager->CloseMassStorageDatabases();
+ RefreshScanDrivesL();
+ CancelScan();
+ iCurUSBEvent = EUSBMassStorageStartEvent;
break;
}
case EUSBMassStorageEndEvent:
{
-#ifdef RD_MULTIPLE_DRIVE
- // Open all databases other than the phone memory
- for( TInt driveNum = EDriveA; driveNum <= EDriveZ; driveNum++ )
- {
- if (driveList[driveNum] && (!iDBManager->IsRemoteDrive(static_cast<TDriveNumber>(driveNum))))
- {
- if ( driveNum != EDriveC )
- {
- iDBManager->OpenDatabaseL( (TDriveNumber) driveNum );
- }
- }
- }
-#else
- iDBManager->OpenDatabaseL( (TDriveNumber) aData );
-#endif // RD_MULTIPLE_DRIVE
+ iDBManager->OpenAllDatabasesL();
+ RefreshScanDrivesL();
+ iCurUSBEvent = EUSBMassStorageEndEvent;
break;
}
- case EUSBMTPNotActiveEvent: // deliberate fall through
+ case EUSBMTPNotActiveEvent:
{
+ if (iCurUSBEvent == EUSBMTPNotActiveEvent)
+ {
+ break;
+ }
if ( iRefreshing )
{
// Notify clients that refresh is cancelled.
iCollectionUtil->Collection().NotifyL( EMcMsgRefreshEnd, KErrLocked );
}
+ CancelScan();
+ iCurUSBEvent = EUSBMTPNotActiveEvent;
+ break;
}
case EUSBMTPStartEvent:
{
CancelScan();
- // nothing to do, db is needed for MTP
+ iCurUSBEvent = EUSBMTPStartEvent;
+#ifdef __RAMDISK_PERF_ENABLE
+ iDBManager->CopyDBsToRamL(ETrue);
+#endif //__RAMDISK_PERF_ENABLE
break;
}
case EUSBMTPEndEvent:
{
- // nothing to do, db is updated by MTP
+ iCurUSBEvent = EUSBMTPEndEvent;
+#ifdef __RAMDISK_PERF_ENABLE
+ // copy dbs from ram drive
+ iDBManager->CopyDBsFromRamL();
+#endif //__RAMDISK_PERF_ENABLE
break;
}
- case EPowerKeyEjectEvent:
+ case EDiskDismountEvent:
{
+ MPX_DEBUG2("Disk dismount notification, drive %d", aData);
+ iIdle->Cancel();
+ if ( aData < 0 )
+ {
+ iDBManager->CloseMassStorageDatabases();
+ }
+ else
+ {
+ iDBManager->CloseDatabase( (TDriveNumber) aData );
+ }
+ RefreshScanDrivesL();
CancelScan();
break;
}
@@ -705,6 +670,10 @@
}
}
// Add to database
+#ifdef __RAMDISK_PERF_ENABLE
+ // EnsureRamSpaceL will copy dbs from ram if ram space is low or dbs exceeded max space.
+ iDBManager->EnsureRamSpaceL();
+#endif // __RAMDISK_PERF_ENABLE
CMPXHarvesterDB& db = iDBManager->GetDatabaseL( ::ExtractDrive( path ) );
CMPXHarvesterDatabaseTable* table = db.OpenFileL( path );
CleanupStack::PushL( table );
@@ -721,6 +690,10 @@
// Return the collection that it should belong to.
r = col.iUid;
+#ifdef __RAMDISK_PERF_ENABLE
+ // This feature will be turned on in the second phase.
+ //TRAP_IGNORE( iDBManager->UpdateDBsFromRamL(0) );
+#endif // __RAMDISK_PERF_ENABLE
}
else
{
@@ -742,6 +715,10 @@
TInt r(0);
// Open the db
+#ifdef __RAMDISK_PERF_ENABLE
+ // EnsureRamSpaceL will copy dbs from ram if ram space is low or dbs exceeded max space.
+ iDBManager->EnsureRamSpaceL();
+#endif // __RAMDISK_PERF_ENABLE
CMPXHarvesterDB& db = iDBManager->GetDatabaseL( ::ExtractDrive(aPath) );
MPX_PERF_START( MPX_PERF_HARV_DB_DELETE_SUB1 );
CMPXHarvesterDatabaseTable* table = db.OpenFileL( aPath );
@@ -869,9 +846,10 @@
//
void CMPXHarvesterFileHandlerImp::RecreateDatabases()
{
- MPX_DEBUG1("CMPXHarvesterFileHandlerImp::RecreateDatabasesL <--");
+ MPX_DEBUG1("CMPXHarvesterFileHandlerImp::RecreateDatabases <--");
iDBManager->RecreateDatabases();
- MPX_DEBUG1("CMPXHarvesterFileHandlerImp::RecreateDatabasesL -->");
+ TRAP_IGNORE(RefreshScanDrivesL());
+ MPX_DEBUG1("CMPXHarvesterFileHandlerImp::RecreateDatabases -->");
}
// ---------------------------------------------------------------------------
@@ -1024,6 +1002,11 @@
}
case ECleanupBrokenLink:
{
+#ifdef __RAMDISK_PERF_ENABLE
+ // copy dbs to ram drive
+ iDBManager->CopyDBsToRamL();
+#endif //__RAMDISK_PERF_ENABLE
+
MPX_DEBUG1("Start Metadata Scan");
iMetadataScanner->Start();
break;
@@ -1193,18 +1176,24 @@
//
void CMPXHarvesterFileHandlerImp::HandleDirectoryChangedL( const TDesC& aPath )
{
+ MPX_DEBUG2("--->CMPXHarvesterFileHandlerImp::HandleDirectoryChangedL path=%S", &aPath);
// Delay the scanning for a few seconds so the files are finished
// copying. If already active, means we just append onto the list
- //
- iAutoScanPaths.AppendL( aPath );
- if( !iIdle->IsActive() )
+ // But don't scan if there is no DB == drive does not exist any more
+ TParsePtrC parse( aPath );
+ TDriveUnit drive ( parse.Drive() );
+ if ( iDBManager->DatabaseIsOpen ((TDriveNumber) (TInt) drive) )
{
- TCallBack cb( Callback, this );
- iIdle->Start( TTimeIntervalMicroSeconds32( KAutoScanDelay ),
- TTimeIntervalMicroSeconds32( KAutoScanAfter ),
- cb );
+ MPX_DEBUG1("CMPXHarvesterFileHandlerImp::HandleDirectoryChangedL adding in iAutoScanPaths");
+ iAutoScanPaths.AppendL( aPath );
+ if( !iIdle->IsActive() )
+ {
+ TCallBack cb( Callback, this );
+ iIdle->Start( TTimeIntervalMicroSeconds32( KAutoScanDelay ),
+ TTimeIntervalMicroSeconds32( KAutoScanAfter ),
+ cb );
+ }
}
-
}
// ---------------------------------------------------------------------------
@@ -1214,6 +1203,7 @@
void CMPXHarvesterFileHandlerImp::HandleOpenDriveL( TDriveNumber aDrive,
const TDesC& aFolder )
{
+ MPX_DEBUG3("--->CMPXHarvesterFileHandlerImp::HandleOpenDriveL drive=%d, folder=%S", aDrive, &aFolder);
#ifdef __PRINTDB__
if( iCurTable )
iCurTable->PrintItemsInTableL();
@@ -1224,13 +1214,11 @@
// Delete previous table and open the next one
Reset();
- MPX_TRAPD( err, iCurDB = &iDBManager->GetDatabaseL( aDrive ) );
- if ( err != KErrNone )
- {
- iDBManager->OpenAllDatabasesL();
- iCurDB = &iDBManager->GetDatabaseL( aDrive );
- }
-
+#ifdef __RAMDISK_PERF_ENABLE
+ // EnsureRamSpaceL will copy dbs from ram if ram space is low or dbs exceeded max space.
+ iDBManager->EnsureRamSpaceL();
+#endif // __RAMDISK_PERF_ENABLE
+ iCurDB = &iDBManager->GetDatabaseL( aDrive );
if( iDrivesToScan.Find( aFolder ) != KErrNotFound )
{
iCurTable = iCurDB->OpenAllFilesTableL();
@@ -1240,6 +1228,7 @@
iCurTable = iCurDB->OpenDirectoryL( aFolder );
}
iCurList = iCurTable->CreateTableRepresentationL();
+ MPX_DEBUG1("<--CMPXHarvesterFileHandlerImp::HandleOpenDriveL");
}
// ---------------------------------------------------------------------------
@@ -1374,6 +1363,10 @@
iAddedCount++;
}
+#ifdef __RAMDISK_PERF_ENABLE
+ // This feature will be turned on in the second phase.
+ //TRAP_IGNORE( iDBManager->UpdateDBsFromRamL(iAddedCount) );
+#endif // __RAMDISK_PERF_ENABLE
}
else if ( addErr == KErrDiskFull )
{
@@ -1556,6 +1549,10 @@
User::Leave( KErrDiskFull );
}
}
+#ifdef __RAMDISK_PERF_ENABLE
+ // This feature will be turned on in the second phase.
+ //TRAP_IGNORE( iDBManager->UpdateDBsFromRamL(iAddedCount) );
+#endif // __RAMDISK_PERF_ENABLE
MPX_DEBUG1("CMPXHarvesterFileHandlerImp::AddPlaylistToCollectionL --->");
}
@@ -1756,7 +1753,7 @@
MPX_DEBUG2("ParseScanPathL scanPaths: %S", &scanPath);
MPX_DEBUG2("ParseScanPathL blockPaths: %S", &blockPath);
- ::ExtractTokensL( scanPath, iDrivesToScan );
+ ::ExtractTokensL( scanPath, iConfiguredDrivesToScan );
::ExtractTokensL( blockPath, iPathsToBlock );
}
@@ -1824,6 +1821,25 @@
}
// ---------------------------------------------------------------------------
+// Refreshes scan drives
+// ---------------------------------------------------------------------------
+//
+void CMPXHarvesterFileHandlerImp::RefreshScanDrivesL()
+ {
+ iDrivesToScan.Reset();
+ for (TInt i = 0; i < iConfiguredDrivesToScan.Count(); ++i)
+ {
+ const TDesC& path = iConfiguredDrivesToScan[i];
+ TParsePtrC parse(path);
+ TDriveUnit drive(parse.Drive());
+ if ( iDBManager->DatabaseIsOpen( (TDriveNumber)(TInt) drive) )
+ {
+ iDrivesToScan.AppendL(path);
+ }
+ }
+ }
+
+// ---------------------------------------------------------------------------
// Resets the scanning table and array
// ---------------------------------------------------------------------------
//
@@ -1922,6 +1938,10 @@
{
Reset();
TDriveNumber num = ::ExtractDrive( aPath );
+#ifdef __RAMDISK_PERF_ENABLE
+ // EnsureRamSpaceL will copy dbs from ram if ram space is low or dbs exceeded max space.
+ iDBManager->EnsureRamSpaceL();
+#endif // __RAMDISK_PERF_ENABLE
iCurDB = &iDBManager->GetDatabaseL( num );
iCurTable = iCurDB->OpenFileL( aPath );
}
@@ -1936,10 +1956,7 @@
// If no error or cancel, return the final number of items added
MPX_DEBUG2("Scan error %i", aErr );
- // Reopen databases (in case we removed them for out of disk drives before scan)
- iDBManager->OpenAllDatabasesL();
-
- if( aErr == KErrNone )
+ if( aErr == KErrNone || aErr == KErrCancel )
{
// Commit the changes on databases in transaction
iDBManager->CommitL();
@@ -1950,12 +1967,32 @@
iDBManager->Rollback();
}
+#ifdef __RAMDISK_PERF_ENABLE
+ // copy dbs from ram drive
+ iDBManager->CopyDBsFromRamL();
+#endif //__RAMDISK_PERF_ENABLE
+
+ // Reopen databases (in case we removed them for out of disk drives before scan)
+ for (TInt i = 0, j = 0; i < iDrivesToScan.Count(); ++i)
+ {
+ if ( j < iFilteredDrivesToScan.Count() && ! iDrivesToScan[i].Compare( iFilteredDrivesToScan[j] ) )
+ {
+ ++j;
+ }
+ else
+ {
+ TParsePtrC fileNameParser ( iDrivesToScan[i] );
+ TDriveUnit drive ( fileNameParser.Drive() );
+ TRAP_IGNORE( iDBManager->OpenDatabaseL( TDriveNumber ( (TInt) drive ) ) );
+ }
+ }
+
if( aErr == KErrNone || aErr == KErrCancel )
{
aErr = iAddedCount;
}
- if (iFilteredDrivesToScan.Count() != iDrivesToScan.Count())
+ if ( iFilteredOutOfDisk )
{
aErr = KErrDiskFull;
}
@@ -2107,7 +2144,24 @@
iRefreshCount++;
CancelScan();
Reset();
- iFolderScanner->ScanL( iAutoScanPaths );
+ // ensure you don't try to scan paths that are on closed drives
+ for (TInt i = 0; i < iAutoScanPaths.Count(); )
+ {
+ TParsePtr parse(iAutoScanPaths[i]);
+ TDriveUnit drive(parse.Drive());
+ if ( iDBManager->DatabaseIsOpen( (TDriveNumber) (TInt) drive ) )
+ {
+ ++i;
+ }
+ else
+ {
+ iAutoScanPaths.Remove(i);
+ }
+ }
+ if ( iAutoScanPaths.Count() )
+ {
+ iFolderScanner->ScanL( iAutoScanPaths );
+ }
// Cleanup
iAutoScanPaths.Reset();
@@ -2229,7 +2283,6 @@
CleanupStack::PushL( drmFileList );
-#ifdef RD_MULTIPLE_DRIVE
TDriveList driveList;
TInt driveCount(0);
@@ -2260,81 +2313,9 @@
}
}
}
-#else
- //ensure drive E is ready
- //otherwise GetDataBaseL will leave if MMC is removed
- if ( IsDriveReady( EDriveE ) )
- {
- // Get DRM files from database in E drive
- db = &iDBManager->GetDatabaseL( EDriveE );
- table = db->OpenDrmFileL();
- CleanupStack::PushL( table );
- tempList = table->CreateTableRepresentationL();
- CleanupStack::PushL( tempList );
- // copy content to drm file list
- for ( TInt i=0; i<tempList->Count(); i++ )
- {
- drmFileList->AppendL( (*tempList)[i] );
- }
- // reset
- tempList->Reset();
- CleanupStack::PopAndDestroy( tempList );
- CleanupStack::PopAndDestroy( table );
- }
-
- // Get DRM files from database in C drive
- db = &iDBManager->GetDatabaseL( EDriveC );
- table = db->OpenDrmFileL();
- CleanupStack::PushL( table );
- tempList = table->CreateTableRepresentationL();
- CleanupStack::PushL( tempList );
- // copy content to iCurList
- for ( TInt i=0; i<tempList->Count(); i++ )
- {
- drmFileList->AppendL( (*tempList)[i] );
- }
- tempList->Reset();
- CleanupStack::PopAndDestroy( tempList );
- CleanupStack::PopAndDestroy( table );
-#endif
CleanupStack::Pop( drmFileList );
MPX_DEBUG1("CMPXHarvesterFileHandlerImp::GetDrmFiles --->");
return drmFileList;
}
-// ---------------------------------------------------------------------------
-// Verifies if aDrive is ready.
-// ---------------------------------------------------------------------------
-//
-TBool CMPXHarvesterFileHandlerImp::IsDriveReady( TDriveNumber aDrive )
- {
- MPX_DEBUG1("CMPXHarvesterFileHandlerImp::IsDriveReady <---");
-
- TDriveInfo driveInfo;
- TInt error = iFs.Drive( driveInfo, aDrive );
- TBool ready = ETrue;
- if ( error != KErrNone )
- {
- ready = EFalse;
- }
- else if ( driveInfo.iDriveAtt == static_cast<TUint>( KDriveAbsent ) )
- {
- //aDrive is absent
- ready = EFalse;
- }
- else
- {
- TVolumeInfo volumeInfo;
- TInt errCode = iFs.Volume( volumeInfo, aDrive );
- if( errCode != KErrNone )
- {
- //aDrive is ready for use
- ready = EFalse;
- }
- }
-
- MPX_DEBUG1("CMPXHarvesterFileHandlerImp::IsDriveReady --->");
- return ready;
- }
-
// END OF FILE
--- a/mmappcomponents/harvester/filehandler/src/mpxmetadatascanner.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/filehandler/src/mpxmetadatascanner.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: Active object to extract metadata
-* Version : %version: da1mmcf#16.2.3.1.5 %
+* Version : %version: da1mmcf#16.2.3.1.5.2.1 %
*
*/
@@ -44,8 +44,9 @@
CMPXMetadataScanner::CMPXMetadataScanner( MMPXMetadataScanObserver& aObs,
MMPXFileScanStateObserver& aStateObs )
: CActive( EPriorityNull ),
+ iExtractType( EMaxFile ),
iObserver( aObs ),
- iStateObserver( aStateObs )
+ iStateObserver( aStateObs )
{
CActiveScheduler::Add( this );
}
@@ -60,8 +61,7 @@
RPointerArray<CMPXCollectionType>& aTypesAry )
{
iExtractor = CMPXMetadataExtractor::NewL( aFs, aAppArc, aTypesAry );
- iNewFileProps = CMPXMediaArray::NewL();
- iModifiedFileProps = CMPXMediaArray::NewL();
+ iTargetProps = CMPXMediaArray::NewL();
}
@@ -114,8 +114,7 @@
iNewFiles.Close();
iModifiedFiles.Close();
- delete iNewFileProps;
- delete iModifiedFileProps;
+ delete iTargetProps;
delete iExtractor;
}
@@ -128,14 +127,7 @@
{
iNewFiles.ResetAndDestroy();
iModifiedFiles.ResetAndDestroy();
- if(iNewFileProps)
- {
- iNewFileProps->Reset();
- }
- if(iModifiedFileProps)
- {
- iModifiedFileProps->Reset();
- }
+ iTargetProps->Reset();
}
// ---------------------------------------------------------------------------
@@ -144,20 +136,20 @@
//
void CMPXMetadataScanner::Start()
{
- MPX_DEBUG1("MPXMetadataScanner::StartL <---");
+ MPX_FUNC("MPXMetadataScanner::StartL()");
if( !IsActive() )
{
// Setup
iAryPos = 0;
iExtractType = ENewFiles;
iExtracting = ETrue;
-
+ iTargetProps->Reset();
+
// Set Active
iStatus = KRequestPending;
SetActive();
TRequestStatus* status = &iStatus;
User::RequestComplete( status, KErrNone );
- MPX_DEBUG1("MPXMetadataScanner::StartL --->");
}
}
// ---------------------------------------------------------------------------
@@ -166,9 +158,8 @@
//
void CMPXMetadataScanner::Stop()
{
- MPX_DEBUG1("MPXMetadataScanner::Stop <---");
+ MPX_FUNC("MPXMetadataScanner::Stop()");
DoCancel();
- MPX_DEBUG1("MPXMetadataScanner::Stop --->");
}
// ---------------------------------------------------------------------------
@@ -177,6 +168,7 @@
//
void CMPXMetadataScanner::AddNewFileToScanL( const TDesC& aFile )
{
+ MPX_FUNC("MPXMetadataScanner::AddNewFileToScanL()");
HBufC* file = aFile.AllocLC();
iNewFiles.AppendL( file );
CleanupStack::Pop( file );
@@ -188,6 +180,7 @@
//
void CMPXMetadataScanner::AddModifiedFileToScanL( const TDesC& aFile )
{
+ MPX_FUNC("MPXMetadataScanner::AddModifiedFileToScanL()");
HBufC* file = aFile.AllocLC();
iModifiedFiles.AppendL( file );
CleanupStack::Pop( file );
@@ -199,6 +192,7 @@
//
CMPXMedia* CMPXMetadataScanner::ExtractFileL( const TDesC& aFile )
{
+ MPX_FUNC("MPXMetadataScanner::ExtractFileL()");
CMPXMedia* media;
iExtractor->CreateMediaL( aFile, media );
return media;
@@ -210,10 +204,12 @@
//
void CMPXMetadataScanner::DoCancel()
{
+ MPX_FUNC("MPXMetadataScanner::DoCancel()");
if( iExtracting )
{
- // Callback to observer
+ iExtractor->CancelRequest();
Reset();
+ // Callback to observer
TRAP_IGNORE( iStateObserver.HandleScanStateCompleteL( MMPXFileScanStateObserver::EScanMetadata,
KErrCancel ) );
iExtracting = EFalse;
@@ -226,29 +222,13 @@
//
void CMPXMetadataScanner::RunL()
{
+ MPX_FUNC("CMPXMetadataScanner::RunL()");
if ( iExtracting )
{
- TBool done(EFalse);
- TRAPD( err, done = DoExtractL() );
- if ( !iExtracting )
- {
- // If DoCancel() was called during DoExtractL(), do nothing.
- MPX_DEBUG1("CMPXMetadataScanner::RunL - Cancel during RunL");
- }
- else if( KErrNone != err || done )
+ TRAPD( err, DoExtractL() );
+ if ( err )
{
- // Callback to observer
- TRAP_IGNORE( iStateObserver.HandleScanStateCompleteL( MMPXFileScanStateObserver::EScanMetadata,
- err ) );
- iExtracting = EFalse;
- }
- else
- {
- MPX_DEBUG1("CMPXMetadataScanner::RunL -- Run again");
- iStatus = KRequestPending;
- SetActive();
- TRequestStatus* status = &iStatus;
- User::RequestComplete( status, KErrNone );
+ MetadataScannerComplete( err );
}
}
}
@@ -257,98 +237,185 @@
// Extract metadata
// ---------------------------------------------------------------------------
//
-TBool CMPXMetadataScanner::DoExtractL()
+void CMPXMetadataScanner::DoExtractL()
+ {
+ MPX_FUNC("CMPXMetadataScanner::DoExtractL()");
+
+ RPointerArray<HBufC>* source = GetSource();
+ if ( source->Count() )
+ {
+ // Call asynchronous CreateMedia to get metadata.
+ iExtractor->CreateMediaAsyncL( *(*source)[iAryPos], this );
+ }
+ else
+ {
+ // Source array is empty, go to next array.
+ MPX_DEBUG2("CMPXMetadataScanner::DoExtractL Source array is empty ExtractType = %d.", iExtractType);
+ iAryPos = 0;
+ iExtractType++;
+ RunAgain();
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Callback for CreateMediaAsyncL
+// ---------------------------------------------------------------------------
+//
+void CMPXMetadataScanner::HandleCreateMediaComplete( CMPXMedia* aMedia, TInt aError )
{
- MPX_DEBUG1("CMPXMetadataScanner::DoExtractL <---");
- TBool done(EFalse);
+ MPX_FUNC("CMPXMetadataScanner::HandleCreateMediaComplete()");
+ MPX_DEBUG2("CMPXMetadataScanner::HandleCreateMediaComplete error = %d", aError);
+ TInt err = KErrNone;
+
+ // Scanning cancelled
+ if ( !iExtracting )
+ {
+ delete aMedia;
+ return;
+ }
+
+ // Add media to target array.
+ if ( ( aError == KErrNone ) &&
+ ( aMedia != NULL ) )
+ {
+ TRAP( err, iTargetProps->AppendL( aMedia ) );
+ if ( err )
+ {
+ delete aMedia;
+ }
+ }
+
+ iAryPos++;
+ if( iAryPos >= GetSource()->Count() )
+ {
+ // Finished with this array, go to the next array.
+ iAryPos = 0;
+ TRAP( err, AddToCollectionL() );
+ if ( err )
+ {
+ MetadataScannerComplete( err );
+ }
+ iExtractType++;
+ }
+ else
+ {
+ // Batch update collection DBs.
+ if ( iTargetProps->Count() >= KLoopCount )
+ {
+ TRAP( err, AddToCollectionL() );
+ if ( err )
+ {
+ MetadataScannerComplete( err );
+ }
+ }
+ }
+
+ RunAgain();
+ }
+
+// ---------------------------------------------------------------------------
+// Get source array
+// ---------------------------------------------------------------------------
+//
+RPointerArray<HBufC>* CMPXMetadataScanner::GetSource()
+ {
+ MPX_FUNC("CMPXMetadataScanner::GetSource()");
TExtractType curType = (TExtractType) iExtractType;
-
- // Pointer re-direction to generalize extraction
- RPointerArray<HBufC>* source;
- CMPXMediaArray* mptarget;
+
if( curType == ENewFiles )
{
- source = &iNewFiles;
- mptarget = iNewFileProps;
+ return &iNewFiles;
}
else if( curType == EModFiles )
{
- source = &iModifiedFiles;
- mptarget = iModifiedFileProps;
+ return &iModifiedFiles;
}
- else // All done!
- {
- return ETrue;
- }
-
- // Process at most KLoopCount number of files
- //
- mptarget->Reset();
- if( source->Count() != 0 )
+ else
+ return NULL;
+ }
+
+// ---------------------------------------------------------------------------
+// Is metadata scanner done
+// ---------------------------------------------------------------------------
+//
+TBool CMPXMetadataScanner::IsDone()
+ {
+ MPX_FUNC("CMPXMetadataScanner::IsDone()");
+ TExtractType curType = (TExtractType) iExtractType;
+
+ TBool done = EFalse;
+ if ( curType >= EMaxFile )
{
- for( TInt i=0; i<KLoopCount; ++i )
- {
- CMPXMedia* media(NULL);
-
- // TRAP to keep scanning if 1 file fails
- TRAPD( err, iExtractor->CreateMediaL( *(*source)[iAryPos], media ) );
- if ( !iExtracting )
- {
- // In case DoCancel() was called while processing iExtractor->CreateMediaL
- MPX_DEBUG1("CMPXMetadataScanner::DoExtractL - Cancel during CreateMediaL");
- delete media;
- return ETrue;
- }
-
- if( err == KErrNone )
- {
- CleanupStack::PushL( media );
- mptarget->AppendL( media );
- CleanupStack::Pop( media );
- }
-
- iAryPos++;
- if( iAryPos == source->Count() )
- {
- iAryPos = 0;
- iExtractType++;
- break;
- }
- }
+ done = ETrue;
+ }
+ return done;
+ }
+
+// ---------------------------------------------------------------------------
+// Run Active Object again
+// ---------------------------------------------------------------------------
+//
+void CMPXMetadataScanner::RunAgain()
+ {
+ MPX_FUNC("CMPXMetadataScanner::RunAgain()");
+ if ( IsDone() )
+ {
+ MetadataScannerComplete( KErrNone );
}
- else // No item in the array
+ else
{
- iAryPos = 0;
- iExtractType++;
+ MPX_DEBUG1("CMPXMetadataScanner::RunAgain -- Run again");
+ iStatus = KRequestPending;
+ SetActive();
+ TRequestStatus* status = &iStatus;
+ User::RequestComplete( status, KErrNone );
}
+ }
+
+// ---------------------------------------------------------------------------
+// Add metadata to collection
+// ---------------------------------------------------------------------------
+//
+void CMPXMetadataScanner::AddToCollectionL()
+ {
+ MPX_FUNC("CMPXMetadataScanner::AddToCollectionL()");
+ TExtractType curType = (TExtractType) iExtractType;
- // After extraction, get observer to add files to the collection
- //
switch( curType )
{
case ENewFiles:
{
- if( iNewFileProps->Count() )
+ if( iTargetProps->Count() )
{
- iObserver.AddFilesToCollectionL( *iNewFileProps );
+ iObserver.AddFilesToCollectionL( *iTargetProps );
}
break;
}
case EModFiles:
{
- if( iModifiedFileProps->Count() )
+ if( iTargetProps->Count() )
{
- iObserver.UpdatesFilesInCollectionL( *iModifiedFileProps );
+ iObserver.UpdatesFilesInCollectionL( *iTargetProps );
}
break;
}
- case EMaxFile: // All done.
- done = ETrue;
- break;
default:
ASSERT(0);
}
-
- MPX_DEBUG1("CMPXMetadataScanner::DoExtractL --->");
- return done;
+ iTargetProps->Reset();
}
+
+// ---------------------------------------------------------------------------
+// Complete metadata scanner
+// ---------------------------------------------------------------------------
+//
+void CMPXMetadataScanner::MetadataScannerComplete( TInt aError )
+ {
+ MPX_FUNC("CMPXMetadataScanner::MetadataScannerCompleteL()");
+ MPX_DEBUG2("CMPXMetadataScanner::MetadataScannerCompleteL error = %d", aError);
+
+ // Callback to observer
+ TRAP_IGNORE( iStateObserver.HandleScanStateCompleteL( MMPXFileScanStateObserver::EScanMetadata, aError ) );
+ iExtracting = EFalse;
+ Reset();
+ }
--- a/mmappcomponents/harvester/metadataextractor/bwinscw/mpxmetadataextractorU.DEF Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/metadataextractor/bwinscw/mpxmetadataextractorU.DEF Wed Jun 23 17:51:16 2010 +0100
@@ -2,4 +2,6 @@
?CreateMediaL@CMPXMetadataExtractor@@QAEXABVTDesC16@@AAPAVCMPXMedia@@H@Z @ 1 NONAME ; void CMPXMetadataExtractor::CreateMediaL(class TDesC16 const &, class CMPXMedia * &, int)
?NewL@CMPXMetadataExtractor@@SAPAV1@AAVRFs@@AAVRApaLsSession@@AAV?$RPointerArray@VCMPXCollectionType@@@@@Z @ 2 NONAME ; class CMPXMetadataExtractor * CMPXMetadataExtractor::NewL(class RFs &, class RApaLsSession &, class RPointerArray<class CMPXCollectionType> &)
?ExtractAlbumArtL@CMPXMetadataExtractor@@QAEHPAVCMPXMedia@@@Z @ 3 NONAME ; int CMPXMetadataExtractor::ExtractAlbumArtL(class CMPXMedia *)
+ ?CancelRequest@CMPXMetadataExtractor@@QAEXXZ @ 4 NONAME ; void CMPXMetadataExtractor::CancelRequest(void)
+ ?CreateMediaAsyncL@CMPXMetadataExtractor@@QAEXABVTDesC16@@PAVMMPXMetadataExtractorObserver@@H@Z @ 5 NONAME ; void CMPXMetadataExtractor::CreateMediaAsyncL(class TDesC16 const &, class MMPXMetadataExtractorObserver *, int)
--- a/mmappcomponents/harvester/metadataextractor/eabi/mpxmetadataextractorU.DEF Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/metadataextractor/eabi/mpxmetadataextractorU.DEF Wed Jun 23 17:51:16 2010 +0100
@@ -6,4 +6,6 @@
_ZTV19CMPXFileInfoUtility @ 5 NONAME ; #<VT>#
_ZTV21CMPXMetadataExtractor @ 6 NONAME ; #<VT>#
_ZN21CMPXMetadataExtractor16ExtractAlbumArtLEP9CMPXMedia @ 7 NONAME
+ _ZN21CMPXMetadataExtractor13CancelRequestEv @ 8 NONAME
+ _ZN21CMPXMetadataExtractor17CreateMediaAsyncLERK7TDesC16P29MMPXMetadataExtractorObserveri @ 9 NONAME
--- a/mmappcomponents/harvester/metadataextractor/group/mpxmetadataextractor.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/metadataextractor/group/mpxmetadataextractor.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -30,6 +30,8 @@
MACRO RD_MPX_TNM_INTEGRATION
#define RD_MPX_TNM_INTEGRATION
+MACRO ABSTRACTAUDIOALBUM_INCLUDED
+#define ABSTRACTAUDIOALBUM_INCLUDED
SOURCEPATH ../src
SOURCE mpxmetadataextractor.cpp
SOURCE mpxfileinfoutility.cpp
--- a/mmappcomponents/harvester/metadataextractor/src/mpxfileinfoutility.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/metadataextractor/src/mpxfileinfoutility.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: This class is responsible for reading file info
-* Version : %version: da1mmcf#5.1.3.1.6 % << Don't touch! Updated by Synergy at check-out.
+* Version : %version: da1mmcf#5.1.3.1.6.2.1 % << Don't touch! Updated by Synergy at check-out.
*
* Copyright © 2005 Nokia. All rights reserved.
*/
@@ -65,6 +65,8 @@
// Destructor
CMPXFileInfoUtility::~CMPXFileInfoUtility()
{
+ MPX_DEBUG1("CMPXFileInfoUtility::~CMPXFileInfoUtility()<---");
+
iAudioControllers.ResetAndDestroy();
//Reset();
// Close all MMF controllers in the cache
@@ -88,6 +90,9 @@
}
REComSession::FinalClose();
+
+ MPX_DEBUG1("CMPXFileInfoUtility::~CMPXFileInfoUtility()--->");
+
}
// ----------------------------------------------------------------------------
@@ -106,7 +111,7 @@
void CMPXFileInfoUtility::OpenFileL(RFile& aFile,
const TDesC& aMimeType /*= KNullDesC*/)
{
- MPX_DEBUG1("CMPXFileInfoUtility::OpenFileL()");
+ MPX_DEBUG1("CMPXFileInfoUtility::OpenFileL()<---");
Reset();
HBufC* fileNameBuf = HBufC::NewLC(KMaxFileName);
@@ -125,10 +130,8 @@
TBool enableUI = EFalse;
//Code taken from TMMFileHandleSource
-
-
- //{//build custom mmf message packet
- //based on CMMFileSourceSink::DoCreateFileHandleSourceConfigDataL()
+ //build custom mmf message packet
+ //based on CMMFileSourceSink::DoCreateFileHandleSourceConfigDataL()
CBufFlat* buf = CBufFlat::NewL(KMCExpandSize);
CleanupStack::PushL(buf);
RBufWriteStream stream;
@@ -152,22 +155,21 @@
stream.CommitL();
CleanupStack::PopAndDestroy(&stream);
- //iSourceSinkData = buf->Ptr(0).AllocL();
- //CleanupStack::PopAndDestroy(buf);
- //}
-
- // User::LeaveIfError(iController->Reset());
+ // Add new data source
+ MPX_DEBUG1("CMPXFileInfoUtility::OpenFileL()- AddDataSource()");
-
- // Add new data source
User::LeaveIfError(iController->AddDataSource(KUidMmfFileSource,
buf->Ptr(0),
dataSource));
+ MPX_DEBUG1("CMPXFileInfoUtility::OpenFileL()- AddDataSink()");
User::LeaveIfError(iController->AddDataSink(KUidMmfAudioOutput,
KNullDesC8));
CleanupStack::PopAndDestroy(buf);
+
+ MPX_DEBUG1("CMPXFileInfoUtility::OpenFileL()--->");
+
}
// ----------------------------------------------------------------------------
@@ -176,21 +178,25 @@
//
void CMPXFileInfoUtility::Reset()
{
- // Reset the controller
+ MPX_DEBUG1("CMPXFileInfoUtility::Reset()<---");
+
if(iController)
{
- if(iCurrentControllerUid == 0x101FAFB1 || iCurrentControllerUid == 0x10283351
- || iCurrentControllerUid == 0x10207B65 )
+ // This is just for RA, WMA does not use controller
+ if( iCurrentControllerUid == 0x10207B65 ) // Helix Controller UID
{
+ MPX_DEBUG1("CMPXFileInfoUtility::Reset(), Close Controller - only for RA ");
iController->Close();
delete iController;
iController = NULL;
}
else
{
- iController->Reset();
+ MPX_DEBUG1("CMPXFileInfoUtility::Reset(), Reset Controller ");
+ iController->Reset();
}
- }
+ }
+ MPX_DEBUG1("CMPXFileInfoUtility::Reset()--->");
}
@@ -200,13 +206,15 @@
//
TTimeIntervalMicroSeconds CMPXFileInfoUtility::Duration()
{
- MPX_DEBUG1("CMPXFileInfoUtility::Duration()");
+ MPX_DEBUG1("CMPXFileInfoUtility::Duration()<---");
TTimeIntervalMicroSeconds duration;
TInt err = iController->GetDuration(duration);
if(err != KErrNone)
{
duration = TInt64(0);
}
+ MPX_DEBUG2("CMPXFileInfoUtility::Duration(), duration = %ld --->", duration );
+
return duration;
}
@@ -216,11 +224,16 @@
//
TUint CMPXFileInfoUtility::BitRate()
{
+ MPX_DEBUG1("CMPXFileInfoUtility::BitRate()<---");
+
RMMFAudioControllerCustomCommands customCommands(*iController);
TUint bitRate(0);
//Ignore return value, bitRate remain 0 if error
customCommands.GetSourceBitRate(bitRate);
+
+ MPX_DEBUG2("CMPXFileInfoUtility::BitRate(), bit rate = %d --->", bitRate);
+
return bitRate;
}
@@ -230,11 +243,16 @@
//
TUint CMPXFileInfoUtility::SampleRate()
{
+ MPX_DEBUG1("CMPXFileInfoUtility::SampleRate()<---");
+
RMMFAudioControllerCustomCommands customCommands(*iController);
TUint sampleRate(0) ;
//Ignore return value, sampleRate remain 0 if error
customCommands.GetSourceSampleRate(sampleRate);
+
+ MPX_DEBUG2("CMPXFileInfoUtility::SampleRate(), sample rate = %d --->", sampleRate);
+
return sampleRate;
}
@@ -245,7 +263,8 @@
const TDesC& aMimeType,
TUid& aUid)
{
- MPX_DEBUG1("CMPXFileInfoUtility::FindControllerL()");
+ MPX_DEBUG1("CMPXFileInfoUtility::FindControllerL()<---");
+
TBool found(EFalse);
TInt i(0);
TInt j(0);
@@ -292,6 +311,9 @@
}
}
}
+
+ MPX_DEBUG1("CMPXFileInfoUtility::FindControllerL()--->");
+
}
// ----------------------------------------------------------------------------
@@ -302,11 +324,10 @@
// ----------------------------------------------------------------------------
void CMPXFileInfoUtility::OpenControllerL(const TUid& aUid)
{
- MPX_DEBUG1("CMPXFileInfoUtility::OpenControllerL()");
-
- // 3gp and helix (wma) do not allow controller caching
- if(aUid.iUid == 0x101FAFB1 || aUid.iUid == 0x10283351
- || aUid.iUid == 0x10207B65 )
+ MPX_DEBUG1("CMPXFileInfoUtility::OpenControllerL()<---");
+
+ // RA does not allow controller caching
+ if( aUid.iUid == 0x10207B65 ) // RA Controller Uid
{
iCurrentControllerUid = aUid.iUid;
TMMFPrioritySettings prioritySettings;
@@ -319,9 +340,11 @@
User::LeaveIfError(iController->Open(aUid, prioritySettings));
iCurrentControllerUid = aUid.iUid;
+ MPX_DEBUG1("CMPXFileInfoUtility::OpenControllerL(), RA Controller open --->");
+
return;
}
-
+
// check if we already have controller open for this UID in the cache
RMMFController* controller = const_cast<RMMFController*>(iMMFControllers.Find(aUid.iUid));
@@ -335,10 +358,11 @@
TUint32* key = new (ELeave) TUint32(aUid.iUid);
CleanupStack::PushL(key);
- // Now instantiate the first controller in the array
- TMMFPrioritySettings prioritySettings;
- prioritySettings.iPriority = EMdaPriorityNormal;
- prioritySettings.iPref = EMdaPriorityPreferenceTimeAndQuality;
+
+ // Now instantiate the first controller in the array
+ TMMFPrioritySettings prioritySettings;
+ prioritySettings.iPriority = EMdaPriorityNormal;
+ prioritySettings.iPref = EMdaPriorityPreferenceTimeAndQuality;
// Try to open controller
User::LeaveIfError(controller->Open(aUid,
@@ -353,7 +377,9 @@
iController = controller;
iCurrentControllerUid = aUid.iUid;
-
+
+ MPX_DEBUG1("CMPXFileInfoUtility::OpenControllerL()--->");
+
}
// -----------------------------------------------------------------------------
@@ -362,6 +388,8 @@
//
void CMPXFileInfoUtility::CreateAudioFormatsArrayL()
{
+ MPX_DEBUG1("CMPXFileInfoUtility::CreateAudioFormatsArrayL()<---");
+
CMMFControllerPluginSelectionParameters* cSelect =
CMMFControllerPluginSelectionParameters::NewLC();
CMMFFormatSelectionParameters* fSelect =
@@ -381,6 +409,9 @@
cSelect->ListImplementationsL(iAudioControllers);
// Clean up
CleanupStack::PopAndDestroy(3); //fSelect, cSelect, mediaIds
+
+ MPX_DEBUG1("CMPXFileInfoUtility::CreateAudioFormatsArrayL()--->");
+
}
// End of File
--- a/mmappcomponents/harvester/metadataextractor/src/mpxmetadataextractor.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/metadataextractor/src/mpxmetadataextractor.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -12,11 +12,10 @@
* Contributors:
*
* Description: Extracts metadata from a file
-* Version : %version: da1mmcf#38.1.4.2.6.1.5 % << Don't touch! Updated by Synergy at check-out.
+* Version : %version: da1mmcf#38.1.4.2.6.1.5.3.3 % << Don't touch! Updated by Synergy at check-out.
*
*/
-
#include <e32base.h>
#include <badesca.h>
#include <apgcli.h>
@@ -42,15 +41,23 @@
#include <mpxmediaaudiodefs.h>
#include <mpxmediadrmdefs.h>
#include <mpxmediamtpdefs.h>
+#include <mpxmetadataextractorobserver.h>
#include "mpxmetadataextractor.h"
#include "mpxfileinfoutility.h"
+
+_LIT( KWmaMimeType, "audio/x-ms-wma" );
+_LIT( KWmaCafMimeType, "x-caf-audio/x-ms-wma" );
+
#ifdef RD_MPX_TNM_INTEGRATION
_LIT( KImageFileType, "image/jpeg" );
const TInt KMPXTimeoutTimer = 3000000; // 3 seconds
-const TInt KMPXMaxThumbnailRequest = 5;
+const TInt KMPXMaxThumbnailRequest = 2;
#endif //RD_MPX_TNM_INTEGRATION
+#ifdef ABSTRACTAUDIOALBUM_INCLUDED
+_LIT( KNonEmbeddedArtExt, ".alb" );
+#endif
//Helper functions
static void FindAndReplaceForbiddenChars(TDes& aString, TInt aLen)
{
@@ -76,8 +83,11 @@
: iFs( aFs ),
iAppArc( aAppArc ),
iSupportedTypes( aTypes ),
- iOutstandingThumbnailRequest(0),
- iTNMBlockCount(0)
+ iCancelled( EFalse ),
+ iObs( NULL ),
+ iMedia( NULL ),
+ iMetadataOnly( EFalse ),
+ iFileOpenError( KErrNone )
{
}
@@ -92,6 +102,7 @@
iMetadataUtility = CMetaDataUtility::NewL();
iDrmMediaUtility = CMPXDrmMediaUtility::NewL();
iFileInfoUtil = CMPXFileInfoUtility::NewL();
+ iTaskTimer = CPeriodic::NewL( CActive::EPriorityIdle );
#ifdef RD_MPX_TNM_INTEGRATION
// Create Thumbnail Manager instance. This object is the observer.
@@ -101,6 +112,8 @@
// create wait loop
iTNSyncWait = new (ELeave) CActiveSchedulerWait;
iTimer = CPeriodic::NewL( CActive::EPriorityIdle );
+ iArrayTNRequestId.Reset();
+ iArrayTasks.Reset();
#endif //RD_MPX_TNM_INTEGRATION
}
@@ -132,6 +145,12 @@
delete iMetadataUtility;
delete iFileInfoUtil;
delete iDrmMediaUtility;
+ delete iTaskTimer;
+ iFile.Close();
+ if ( iMedia != NULL )
+ {
+ delete iMedia;
+ }
#ifdef RD_MPX_TNM_INTEGRATION
delete iTNManager;
if (iTNSyncWait && iTNSyncWait->IsStarted() )
@@ -140,149 +159,65 @@
}
delete iTNSyncWait;
delete iTimer;
+ iArrayTNRequestId.Close();
+ iArrayTasks.Close();
#endif //RD_MPX_TNM_INTEGRATION
-
- MPX_DEBUG2("CMPXMetadataExtractor: TNM Block Count: %d ", iTNMBlockCount );
}
// ---------------------------------------------------------------------------
-// Constructs a media properties object
+// Constructs a media properties object : synchronous function
// ---------------------------------------------------------------------------
//
EXPORT_C void CMPXMetadataExtractor::CreateMediaL( const TDesC& aFile,
CMPXMedia*& aNewProperty,
TBool aMetadataOnly )
{
- // make a copy of aFile
- HBufC* fileName = HBufC::NewL(KMaxFileName);
- CleanupStack::PushL( fileName );
- fileName->Des().Append( aFile );
- MPX_DEBUG2("CMPXMetadataExtractor::CreateMediaL %S <---", fileName );
-
- RArray<TInt> contentIDs;
- contentIDs.AppendL( KMPXMediaIdGeneral );
- contentIDs.AppendL( KMPXMediaIdAudio );
- contentIDs.AppendL( KMPXMediaIdMusic );
- contentIDs.AppendL( KMPXMediaIdDrm );
- contentIDs.AppendL( KMPXMediaIdMTP );
- aNewProperty = NULL;
- CMPXMedia* media = CMPXMedia::NewL( contentIDs.Array() );
- CleanupStack::PushL( media );
- contentIDs.Close();
-
- // CMPXMedia default types
-
- media->SetTObjectValueL<TMPXGeneralType>( KMPXMediaGeneralType,
- EMPXItem );
- media->SetTObjectValueL<TMPXGeneralCategory>( KMPXMediaGeneralCategory,
- EMPXSong );
-
- TParsePtrC parse( *fileName );
-
- // Title, default is file name
- media->SetTextValueL( KMPXMediaGeneralTitle,
- parse.Name() );
-
- // Default album track
- media->SetTextValueL( KMPXMediaMusicAlbumTrack,
- KNullDesC );
-
- // Set the Mime Type and collection UID
- //
- if( !aMetadataOnly )
+ MPX_FUNC("CMPXMetadataExtractor::CreateMediaL()");
+ // check if we are still processing a request.
+ if ( iArrayTasks.Count() )
{
- TInt index(KErrNotFound);
- TInt count( iSupportedTypes.Count() );
- for (TInt i=0; i <count; ++i)
- {
- TInt index2(KErrNotFound);
- const CDesCArray& exts = iSupportedTypes[i]->Extensions();
- const TDesC& ext = parse.Ext();
- if (!exts.FindIsq(ext, index2))
- { // found
- index = i;
- break;
- }
- }
- if( KErrNotFound != index )
- {
- MPX_DEBUG1("CMPXMetadataExtractor::CreateMediaPropertiesL apparc <---" );
- TInt mimeIndex = SupportedContainerTypeL( *fileName, index );
- User::LeaveIfError( mimeIndex );
- MPX_DEBUG1("CMPXMetadataExtractor::CreateMediaPropertiesL apparc --->" );
+ MPX_DEBUG1("CMPXMetadataExtractor::CreateMediaL Request ongoing. Abort!" );
+ User::Leave( KErrAbort );
+ }
- media->SetTextValueL( KMPXMediaGeneralMimeType,
- iSupportedTypes[index]->Mimetypes()[mimeIndex] );
-
- media->SetTObjectValueL( KMPXMediaGeneralCollectionId,
- iSupportedTypes[index]->Uid() );
- }
- else
- {
- User::Leave(KErrNotSupported);
- }
- }
- else // other case use apparc to fetch and set mimetype
- {
- TDataType dataType;
- TUid dummyUid(KNullUid);
- iAppArc.AppForDocument(*fileName, dummyUid, dataType);
- media->SetTextValueL( KMPXMediaGeneralMimeType,dataType.Des() );
- }
-
- // Use file handle here
- //
- RFile file;
- TInt err = file.Open( iFs, *fileName, EFileRead | EFileShareReadersOrWriters );
- CleanupClosePushL(file);
+ iCancelled = EFalse;
+ iFileOpenError = KErrNone;
+ iObs = NULL;
+ aNewProperty = NULL;
+ iFileName = aFile;
+ iMetadataOnly = aMetadataOnly;
- // Metadata related
- //
- if( err == KErrNone )
+ // populate the task array
+ AddTasksL();
+
+ // execute all tasks in the array
+ while ( iArrayTasks.Count() )
{
- const TDesC& mimeType = media->ValueText( KMPXMediaGeneralMimeType );
- HBufC8* mimeType8 = HBufC8::NewLC( mimeType.Length() );
- mimeType8->Des().Append( mimeType );
- TRAPD( metadataerror, iMetadataUtility->OpenFileL( file, *mimeType8 ) );
- CleanupStack::PopAndDestroy( mimeType8 );
-
- // No problem
- if( KErrNone == metadataerror )
+ // execute task at index 0
+ MPX_TRAPD( error, ExecuteTaskL() );
+ if ( error || iCancelled )
{
- // Add TRAPD to capture exception KErrNoMemory.
- //If album art size is too large, trap this exception and SetDefaultL.
- //Fix EYLU-7ESE5L
- TRAPD( err, SetMediaPropertiesL( *media, *fileName ) );
- if ( KErrNoMemory == err )
+ // cleanup
+ if ( iMedia != NULL )
{
- SetDefaultL( *media );
+ delete iMedia;
+ iMedia = NULL;
}
- }
- else // Error, Set defaults
- {
- SetDefaultL( *media );
+ iArrayTasks.Reset();
+ if ( error )
+ {
+ CleanUp();
+ User::LeaveIfError( error );
+ }
+ break;
}
-
- // Reset the utility
- iMetadataUtility->ResetL();
- }
- else // Error, Set defaults
- {
- SetDefaultL( *media );
+
+ iArrayTasks.Remove( 0 );
}
- // Common properties that we can extract
- //
- SetExtMediaPropertiesL( *media, *fileName, aMetadataOnly, file, err );
- CleanupStack::PopAndDestroy(&file);
-
- // Set the pointers now that the object is ready
- //
- CleanupStack::Pop( media );
- aNewProperty = media;
-
- CleanupStack::PopAndDestroy( fileName );
- MPX_DEBUG1("CMPXMetadataExtractor::CreateMediaPropertiesL --->");
+ aNewProperty = iMedia;
+ iMedia = NULL; // ownership transferred.
+ CleanUp();
}
// ---------------------------------------------------------------------------
@@ -291,6 +226,7 @@
//
void CMPXMetadataExtractor::SetDefaultL( CMPXMedia& aMediaProp )
{
+ MPX_FUNC("CMPXMetadataExtractor::SetDefaultL()");
// Comment
aMediaProp.SetTextValueL( KMPXMediaGeneralComment,
KNullDesC );
@@ -324,27 +260,48 @@
// Sets media object attributes from metadata utilities
// ---------------------------------------------------------------------------
//
-void CMPXMetadataExtractor::SetMediaPropertiesL( CMPXMedia& aMedia,
- const TDesC& aFile )
+void CMPXMetadataExtractor::SetMediaPropertiesL()
{
- MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL <---" );
+ MPX_FUNC("CMPXMetadataExtractor::SetMediaPropertiesL()");
- const CMetaDataFieldContainer& metaCont =
- iMetadataUtility->MetaDataFieldsL();
+ const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType );
+ HBufC8* mimeType8 = HBufC8::NewLC( mimeType.Length() );
+ mimeType8->Des().Append( mimeType );
+
+ // Continue to extract metadata even if fail.
+ MPX_TRAPD( metadataerror, iMetadataUtility->OpenFileL( iFile, *mimeType8 ) );
+ CleanupStack::PopAndDestroy( mimeType8 );
+
+ // Get MetadataUtility Container
+ const CMetaDataFieldContainer& metaCont = iMetadataUtility->MetaDataFieldsL();
+
+ // Get DRM data
+ // Need the protected flag from metadataUtility Container
+ MPX_TRAPD( drmerror, SetDrmMediaPropertiesL( metaCont ) );
+ MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, result=%d getting drm data",
+ drmerror );
+
+ // Get metadata fields
TInt count( metaCont.Count() );
for( TInt i=0; i<count; ++i )
{
TMetaDataFieldId fieldType;
HBufC* value = NULL;
- TRAPD( err, value = metaCont.At( i, fieldType ).AllocL() );
- CleanupStack::PushL(value);
- if ( KErrNone != err )
- {
- CleanupStack::PopAndDestroy(value);
- continue;
- }
-
+ metaCont.FieldIdAt( i, fieldType ); // get the field type
+
+ // get the value, except for album art
+ if ( fieldType != EMetaDataJpeg )
+ {
+ MPX_TRAPD( err, value = metaCont.At( i, fieldType ).AllocL() );
+ if ( KErrNone != err )
+ {
+ MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL - error = %i", err);
+ continue;
+ }
+ CleanupStack::PushL( value );
+ }
+
switch( fieldType )
{
case EMetaDataSongTitle:
@@ -355,7 +312,7 @@
if (vallen>0)
{
FindAndReplaceForbiddenChars(valptr, vallen);
- aMedia.SetTextValueL(KMPXMediaGeneralTitle, *value);
+ iMedia->SetTextValueL(KMPXMediaGeneralTitle, *value);
}
break;
}
@@ -367,7 +324,7 @@
if (vallen>0)
{
FindAndReplaceForbiddenChars(valptr, vallen);
- aMedia.SetTextValueL(KMPXMediaMusicArtist, *value);
+ iMedia->SetTextValueL(KMPXMediaMusicArtist, *value);
}
break;
}
@@ -379,7 +336,7 @@
if (vallen>0)
{
FindAndReplaceForbiddenChars(valptr, vallen);
- aMedia.SetTextValueL(KMPXMediaMusicAlbum, *value );
+ iMedia->SetTextValueL(KMPXMediaMusicAlbum, *value );
}
break;
}
@@ -394,19 +351,19 @@
TDateTime dt;
dt.SetYear( year );
TTime time( dt );
- aMedia.SetTObjectValueL<TInt64>( KMPXMediaMusicYear,
+ iMedia->SetTObjectValueL<TInt64>( KMPXMediaMusicYear,
time.Int64() );
break;
}
case EMetaDataComment:
{
- aMedia.SetTextValueL( KMPXMediaGeneralComment,
+ iMedia->SetTextValueL( KMPXMediaGeneralComment,
*value );
break;
}
case EMetaDataAlbumTrack:
{
- aMedia.SetTextValueL( KMPXMediaMusicAlbumTrack,
+ iMedia->SetTextValueL( KMPXMediaMusicAlbumTrack,
*value );
break;
}
@@ -418,7 +375,7 @@
if (vallen>0)
{
FindAndReplaceForbiddenChars(valptr, vallen);
- aMedia.SetTextValueL(KMPXMediaMusicGenre, *value);
+ iMedia->SetTextValueL(KMPXMediaMusicGenre, *value);
}
break;
}
@@ -430,43 +387,55 @@
if (vallen>0)
{
FindAndReplaceForbiddenChars(valptr, vallen);
- aMedia.SetTextValueL(KMPXMediaMusicComposer, *value);
+ iMedia->SetTextValueL(KMPXMediaMusicComposer, *value);
}
break;
}
case EMetaDataUrl:
case EMetaDataUserUrl: // fall through
{
- aMedia.SetTextValueL( KMPXMediaMusicURL,
+ iMedia->SetTextValueL( KMPXMediaMusicURL,
*value );
break;
}
case EMetaDataJpeg:
{
-#ifdef RD_MPX_TNM_INTEGRATION
- MPX_PERF_START(CMPXMetadataExtractor_SetMediaPropertiesL_JPEG_TNM);
- HBufC8* value8 = MPXUser::Alloc8L(metaCont.At( i, fieldType ));
- CleanupStack::PushL( value8 );
- AddMediaAlbumArtL( aMedia, aFile, *value8 );
- CleanupStack::Pop(value8);
- MPX_PERF_END(CMPXMetadataExtractor_SetMediaPropertiesL_JPEG_TNM);
-#else //RD_MPX_TNM_INTEGRATION
- aMedia.SetTextValueL( KMPXMediaMusicAlbumArtFileName,
- aFile );
-#endif //RD_MPX_TNM_INTEGRATION
+ // Album art handled in AddMediaAlbumArtL()
break;
}
case EMetaDataCopyright:
{
- aMedia.SetTextValueL( KMPXMediaGeneralCopyright,
+ iMedia->SetTextValueL( KMPXMediaGeneralCopyright,
*value );
break;
}
+ case EMetaDataDuration:
+ {
+ const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType );
+ MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, mimeType = %S", &mimeType);
+
+ // Verify if WMA, get the duration
+ if( mimeType.Compare(KWmaMimeType) == 0 || mimeType.Compare(KWmaCafMimeType) == 0 )
+ {
+ MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL- WMA");
+
+ // Perform the duration conversion
+ TLex lexer( *value );
+ TInt32 duration ( 0 );
+ lexer.Val( duration ); // [second]
+ duration *= 1000; // [msec]
+
+ iMedia->SetTObjectValueL<TInt32>( KMPXMediaGeneralDuration,
+ duration );
+
+ MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- duration = %i", duration);
+ }
+ break;
+ }
case EMetaDataOriginalArtist: // fall through
case EMetaDataVendor: // fall through
case EMetaDataRating: // fall through
case EMetaDataUniqueFileIdentifier: // fall through
- case EMetaDataDuration: // fall through
case EMetaDataDate: // fall through
{
// not used
@@ -478,130 +447,66 @@
break;
}
}
- CleanupStack::PopAndDestroy(value);
+ if (fieldType != EMetaDataJpeg)
+ {
+ CleanupStack::PopAndDestroy( value );
+ }
}
-
- MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL --->" );
}
// ---------------------------------------------------------------------------
// Sets extra media properties not returned by metadata utilities
// ---------------------------------------------------------------------------
//
-void CMPXMetadataExtractor::SetExtMediaPropertiesL( CMPXMedia& aProp,
- const TDesC& aFile,
- TBool aMetadataOnly,
- RFile& aFileHandle,
- TInt aFileErr )
+void CMPXMetadataExtractor::SetExtMediaPropertiesL()
{
- MPX_DEBUG1("CMPXMetadataExtractor::SetExtMediaPropertiesL <---");
-
- // DB Flags to set
- //
- TUint dbFlags(KMPXMediaGeneralFlagsSetOrUnsetBit);
-
- // File Path
- //
- TParsePtrC parse( aFile );
- aProp.SetTextValueL( KMPXMediaGeneralUri,
- aFile );
- aProp.SetTextValueL( KMPXMediaGeneralDrive,
- parse.Drive() );
-
- // DRM Rights
- //
- CMPXMedia* drm = NULL;
- TRAPD( drmError, iDrmMediaUtility->InitL( aFile );
- drm = CMPXMedia::NewL( *iDrmMediaUtility->GetMediaL( KMPXMediaDrmProtected.iAttributeId |
- KMPXMediaDrmRightsStatus.iAttributeId ) );
- );
+ MPX_FUNC("CMPXMetadataExtractor::SetExtMediaPropertiesL()");
- TBool prot(EFalse);
- if( drm )
- {
- CleanupStack::PushL( drm );
- MPX_DEBUG1("CMPXMetadataExtractor::SetExtMediaPropertiesL -- is a drm file");
- if( drm->IsSupported( KMPXMediaDrmProtected ) )
- {
- prot = drm->ValueTObjectL<TBool>( KMPXMediaDrmProtected );
- MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL protected %i", prot);
- }
-
- TMPXMediaDrmRightsStatus status(EMPXDrmRightsFull);
- if( drm->IsSupported( KMPXMediaDrmRightsStatus ) )
- {
- status = drm->ValueTObjectL<TMPXMediaDrmRightsStatus>(KMPXMediaDrmRightsStatus);
- aProp.SetTObjectValueL<TInt>(KMPXMediaDrmRightsStatus, status );
- MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL -- status %i", status);
- }
-
- // Set DB flags
- dbFlags |= KMPXMediaGeneralFlagsIsDrmProtected;
- if( status != EMPXDrmRightsFull && status != EMPXDrmRightsRestricted && status != EMPXDrmRightsPreview )
- {
- dbFlags |= KMPXMediaGeneralFlagsIsDrmLicenceInvalid;
- }
- CleanupStack::PopAndDestroy( drm );
- }
-
- // Trapped PV DRM error. If -46, we know the file has no rights
//
- if( drmError == KErrPermissionDenied )
- {
- dbFlags |= KMPXMediaGeneralFlagsIsDrmLicenceInvalid;
- }
- else
- {
- User::LeaveIfError( drmError );
- }
-
- aProp.SetTObjectValueL<TBool>( KMPXMediaDrmProtected, prot );
- aProp.SetTObjectValueL<TUint16>( KMPXMediaMTPDrmStatus, (TUint16)prot );
-
- iDrmMediaUtility->Close();
-
- // File Size
+ // File Size --- The following needs MMF support
//
TInt size( 0 );
- if( aFileErr == KErrNone )
+ if( iFileOpenError == KErrNone )
{
- aFileHandle.Size( size );
- aProp.SetTObjectValueL<TInt>( KMPXMediaGeneralSize,
- size );
-
- // Duration, bitrate, samplerate, etc
- //
- if( !aMetadataOnly )
+ const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType );
+ MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL, mimeType = %S", &mimeType);
+ iFile.Size( size );
+ iMedia->SetTObjectValueL<TInt>( KMPXMediaGeneralSize, size );
+
+ // Verify if WMA, skip getting info from MMF
+ if( mimeType.Compare(KWmaMimeType) == 0 || mimeType.Compare(KWmaCafMimeType) == 0 )
+ {
+ // No need to get MMF support
+ MPX_DEBUG1("CMPXMetadataExtractor::SetExtMediaPropertiesL, skip MMF ");
+ }
+ else
{
- TRAPD(err2, iFileInfoUtil->OpenFileL(
- aFileHandle,
- aProp.ValueText(KMPXMediaGeneralMimeType)));
- MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL, file info util error %i", err2);
- if( KErrNone == err2 )
- {
- aProp.SetTObjectValueL<TUint>( KMPXMediaAudioBitrate,
- iFileInfoUtil->BitRate() );
- aProp.SetTObjectValueL<TUint>( KMPXMediaAudioSamplerate,
- iFileInfoUtil->SampleRate() );
- TInt64 duration = (TInt64) iFileInfoUtil->Duration().Int64() / 1000; // ms
- aProp.SetTObjectValueL<TInt32>( KMPXMediaGeneralDuration,
- duration );
- MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL -- duration %i", duration);
+ MPX_DEBUG1("CMPXMetadataExtractor::SetExtMediaPropertiesL, get MMF controller");
+ // Duration, bitrate, samplerate, etc
+ //
+ if( !iMetadataOnly )
+ {
+ MPX_TRAPD(err2, iFileInfoUtil->OpenFileL(
+ iFile,
+ iMedia->ValueText(KMPXMediaGeneralMimeType)));
+ MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL, file info util error %i", err2);
+ if( KErrNone == err2 )
+ {
+ iMedia->SetTObjectValueL<TUint>( KMPXMediaAudioBitrate,
+ iFileInfoUtil->BitRate() );
+ iMedia->SetTObjectValueL<TUint>( KMPXMediaAudioSamplerate,
+ iFileInfoUtil->SampleRate() );
+ TInt64 duration = (TInt64) iFileInfoUtil->Duration().Int64() / 1000; // ms
+ iMedia->SetTObjectValueL<TInt32>( KMPXMediaGeneralDuration,
+ duration );
+
+ MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL -- duration %i", duration);
+ }
+
+ iFileInfoUtil->Reset();
}
}
}
- else if( aFileErr == KErrNotFound || aFileErr == KErrPathNotFound )
- {
- dbFlags |= KMPXMediaGeneralFlagsIsInvalid;
- }
- // Finally set the db flag
- //
- aProp.SetTObjectValueL( KMPXMediaGeneralFlags,
- dbFlags );
-
- iFileInfoUtil->Reset();
-
- MPX_DEBUG1("CMPXMetadataExtractor::SetExtMediaPropertiesL --->");
}
// ---------------------------------------------------------------------------
@@ -611,6 +516,7 @@
TInt CMPXMetadataExtractor::SupportedContainerTypeL( const TDesC& aFile,
TInt aIndex )
{
+ MPX_FUNC("CMPXMetadataExtractor::SupportedContainerTypeL()");
TInt index(KErrNotFound);
TDataType dataType;
@@ -644,11 +550,20 @@
// Callback but not used here
// ---------------------------------------------------------------------------
void CMPXMetadataExtractor::ThumbnailReady( TInt /*aError*/,
- MThumbnailData& /*aThumbnail*/, TThumbnailRequestId /*aId*/ )
+ MThumbnailData& /*aThumbnail*/, TThumbnailRequestId aId )
{
MPX_FUNC("CMPXMetadataExtractor::ThumbnailReady()");
- iOutstandingThumbnailRequest--;
- if ( iOutstandingThumbnailRequest <= KMPXMaxThumbnailRequest )
+
+ // Remove thumbnail id from array.
+ TInt index = iArrayTNRequestId.Find( aId );
+ if ( index >= 0 )
+ {
+ iArrayTNRequestId.Remove( index );
+ }
+ MPX_DEBUG2("CMPXMetadataExtractor::ThumbnailReady(): Outstanding Thumbnail Request = %d",
+ iArrayTNRequestId.Count());
+
+ if ( iArrayTNRequestId.Count() < KMPXMaxThumbnailRequest )
{
StopWaitLoop();
}
@@ -707,7 +622,8 @@
EXPORT_C TInt CMPXMetadataExtractor::ExtractAlbumArtL( CMPXMedia* aMedia )
{
MPX_FUNC("CMPXMetadataExtractor::ExtractAlbumArtL()");
- TInt err = KErrNone;
+ TInt err = KErrNone;
+ iCancelled = EFalse;
if ( !aMedia->IsSupported(KMPXMediaGeneralUri) )
{
@@ -717,7 +633,46 @@
// Get full file name.
const TDesC& path = aMedia->ValueText(KMPXMediaGeneralUri);
MPX_DEBUG2("CMPXMetadataExtractor::ExtractAlbumArtL Filename:%S ", &path );
-
+#ifdef ABSTRACTAUDIOALBUM_INCLUDED
+ TParsePtrC parse( path );
+ TPtrC ext( parse.Ext() );
+ if (ext.CompareF(KNonEmbeddedArtExt)== 0)
+ {
+#ifdef RD_MPX_TNM_INTEGRATION
+
+ //check if can send TN request, If thumbnail creation is ongoing, wait til it is done
+ CheckBeforeSendRequest();
+
+ CThumbnailObjectSource* source( NULL );
+ if (aMedia->IsSupported(KMPXMediaMTPSampleData))
+ {
+ TBuf<20> mimeType(KImageFileType);
+ TInt sampleData = aMedia->ValueTObjectL<TInt>(KMPXMediaMTPSampleData);
+ HBufC8* value8 = ((HBufC8*)sampleData)->Des().AllocLC(); // make a local copy of sampleData
+ source = CThumbnailObjectSource::NewLC(
+ value8, mimeType, path ); // give up ownership of value8
+
+ MPX_DEBUG1("CMPXMetadataExtractor::ExtractAlbumArtL source created from buffer");
+ TThumbnailRequestId tnId = iTNManager->CreateThumbnails( *source );
+ iArrayTNRequestId.Append( tnId );
+ CleanupStack::PopAndDestroy( source );
+ CleanupStack::Pop( value8 );
+ }
+ else
+ {
+ source = CThumbnailObjectSource::NewLC(
+ path, KImageFileType );
+
+ MPX_DEBUG1("CMPXMetadataExtractor::ExtractAlbumArtL source created from path");
+ TThumbnailRequestId tnId = iTNManager->CreateThumbnails( *source );
+ iArrayTNRequestId.Append( tnId );
+ CleanupStack::PopAndDestroy( source );
+ }
+#endif // RD_MPX_TNM_INTEGRATION
+ }
+ else
+ {
+#endif // ABSTRACTAUDIOALBUM_INCLUDED
// create wanted fields array
RArray<TMetaDataFieldId> wantedFields;
CleanupClosePushL( wantedFields );
@@ -730,56 +685,27 @@
MPX_DEBUG2("CMPXMetadataExtractor::ExtractAlbumArtL MimeType:%S ", &mimeType );
HBufC8* mimeType8 = HBufC8::NewLC( mimeType.Length() );
mimeType8->Des().Append( mimeType );
- TRAP( err, iMetadataUtility->OpenFileL( path, wantedFields, *mimeType8 ) );
+ MPX_TRAP( err, iMetadataUtility->OpenFileL( path, wantedFields, *mimeType8 ) );
CleanupStack::PopAndDestroy( mimeType8 );
}
else
{
- TRAP( err, iMetadataUtility->OpenFileL( path, wantedFields ) );
+ MPX_TRAP( err, iMetadataUtility->OpenFileL( path, wantedFields ) );
}
CleanupStack::PopAndDestroy( &wantedFields );
if ( !err )
{
- TRAP( err, GetMediaAlbumArtL( *aMedia, path ));
+ //check if can send TN request, If thumbnail creation is ongoing, wait til it is done
+ CheckBeforeSendRequest();
+ MPX_TRAP( err, AddMediaAlbumArtL( *aMedia, path ));
}
// Reset the utility
iMetadataUtility->ResetL();
-
- return err;
- }
-
-// ----------------------------------------------------------------------------
-// Set album art.
-// ----------------------------------------------------------------------------
-TInt CMPXMetadataExtractor::GetMediaAlbumArtL( CMPXMedia& aMedia,
- const TDesC& aFile )
- {
- MPX_FUNC("CMPXMetadataExtractor::GetMediaAlbumArtL()");
- TInt err = KErrNone;
- // get metadata container.
- const CMetaDataFieldContainer& metaCont = iMetadataUtility->MetaDataFieldsL();
-
- TPtrC data = metaCont.Field( EMetaDataJpeg );
-
- if ( data.Length() )
- {
- MPX_DEBUG1("CMPXMetadataExtractor::GetMediaAlbumArtL(): Album art exist.");
-#ifdef RD_MPX_TNM_INTEGRATION
- HBufC8* value8 = MPXUser::Alloc8L( data );
- CleanupStack::PushL( value8 );
- AddMediaAlbumArtL( aMedia, aFile, *value8 );
- CleanupStack::Pop(value8);
-#else // RD_MPX_TNM_INTEGRATION
- aMedia.SetTextValueL( KMPXMediaMusicAlbumArtFileName, aFile );
-#endif // RD_MPX_TNM_INTEGRATION
- }
- else
- {
- err = KErrNotFound;
- }
-
+#ifdef ABSTRACTAUDIOALBUM_INCLUDED
+ }
+#endif // ABSTRACTAUDIOALBUM_INCLUDED
return err;
}
@@ -787,42 +713,467 @@
// Add album art to media object.
// ----------------------------------------------------------------------------
void CMPXMetadataExtractor::AddMediaAlbumArtL( CMPXMedia& aMedia,
- const TDesC& aFile,
- TDesC8& aValue )
+ const TDesC& aFile )
{
MPX_FUNC("CMPXMetadataExtractor::AddMediaAlbumArtL()");
+
+ // get metadata container.
+ const CMetaDataFieldContainer& metaCont = iMetadataUtility->MetaDataFieldsL();
+ TPtrC8 data8 = metaCont.Field8( EMetaDataJpeg );
+
+ if ( data8.Length() )
+ {
+ MPX_DEBUG1("CMPXMetadataExtractor::GetMediaAlbumArtL(): Album art exist.");
#ifdef RD_MPX_TNM_INTEGRATION
+ HBufC8* value8 = NULL;
+ MPX_TRAPD( err, value8 = data8.AllocL() );
+ if ( KErrNone != err )
+ {
+ MPX_DEBUG2("CMPXMetadataExtractor::GetMediaAlbumArtL - error jpeg = %i", err);
+ return;
+ }
+ CleanupStack::PushL( value8 );
- // If thumbnail creation is ongoing, wait til it is done
- if ( iOutstandingThumbnailRequest > KMPXMaxThumbnailRequest )
+ TBuf<256> mimeType;
+ mimeType.Copy( KImageFileType );
+ CThumbnailObjectSource* source = CThumbnailObjectSource::NewL(
+ value8, mimeType, aFile );
+ TThumbnailRequestId tnId = iTNManager->CreateThumbnails( *source );
+ iArrayTNRequestId.Append( tnId ); // add thumbnail id to array
+ CleanupStack::Pop( value8 );
+ aMedia.SetTextValueL( KMPXMediaMusicOriginalAlbumArtFileName, aFile );
+#endif // RD_MPX_TNM_INTEGRATION
+ aMedia.SetTextValueL( KMPXMediaMusicAlbumArtFileName, aFile );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// Check if can send request to TNM or not.
+// ----------------------------------------------------------------------------
+void CMPXMetadataExtractor::CheckBeforeSendRequest()
+ {
+ MPX_FUNC("CMPXMetadataExtractor::CheckBeforeSendRequest()");
+#ifdef RD_MPX_TNM_INTEGRATION
+ MPX_DEBUG2("CMPXMetadataExtractor::CheckBeforeSendRequest(): Outstanding Thumbnail Request = %d",
+ iArrayTNRequestId.Count());
+ // If thumbnail creation is ongoing, wait til it is done
+ if ( iArrayTNRequestId.Count() >= KMPXMaxThumbnailRequest )
{
- MPX_DEBUG1("CMPXMetadataExtractor::AddMediaAlbumArtL(): Thumbnail creation ongoing!");
- iTNMBlockCount++;
+ MPX_DEBUG1("CMPXMetadataExtractor::CheckBeforeSendRequest(): Thumbnail creation ongoing!");
// Cancel timer.
CancelTimeoutTimer();
- // Start timer in case there is no callback from ThumbNail Manager.
+ // Start timer in case there is no callback from ThumbNail Manager.
iTimer->Start(
KMPXTimeoutTimer,
KMPXTimeoutTimer,
TCallBack(TimeoutTimerCallback, this ));
-
+
// Start wait loop until we get a callback from ThumbNail Manager.
if ( !iTNSyncWait->IsStarted() )
{
iTNSyncWait->Start();
}
}
+#endif // RD_MPX_TNM_INTEGRATION
+ }
+
+// ----------------------------------------------------------------------------
+// Cancel request. This will empty the task array and stop the wait loop. This
+// will cause the CreateMediaL() to finish more quickly.
+// ----------------------------------------------------------------------------
+EXPORT_C void CMPXMetadataExtractor::CancelRequest()
+ {
+ MPX_FUNC("CMPXMetadataExtractor::CancelRequest()");
+ iCancelled = ETrue;
+ // Cancel all tasks
+ iArrayTasks.Reset();
+ // Cancel all thumbnail request
+ CancelAllThumbnailRequests();
+ StopWaitLoop();
+ }
+
+// ----------------------------------------------------------------------------
+// Cancel all outstanding thumbnail requests.
+// ----------------------------------------------------------------------------
+void CMPXMetadataExtractor::CancelAllThumbnailRequests()
+ {
+ MPX_FUNC("CMPXMetadataExtractor::CancelAllThumbnailRequests()");
+#ifdef RD_MPX_TNM_INTEGRATION
+ // TODO: remove comments when TNM make CancelRequest asynchronous.
+ /*TInt count = iArrayTNRequestId.Count();
+ for ( TInt i=0; i<count; i++ )
+ {
+ iTNManager->CancelRequest( iArrayTNRequestId[i] );
+ }
+ */
+ iArrayTNRequestId.Reset();
+#endif // RD_MPX_TNM_INTEGRATION
+ }
+
+// ----------------------------------------------------------------------------
+// Create media and set default data and mimetype.
+// ----------------------------------------------------------------------------
+void CMPXMetadataExtractor::DoCreateMediaL()
+ {
+ MPX_FUNC("CMPXMetadataExtractor::DoCreateMediaL()");
+ MPX_ASSERT( iMedia == NULL );
+ RArray<TInt> contentIDs;
+ CleanupClosePushL( contentIDs );
+ contentIDs.AppendL( KMPXMediaIdGeneral );
+ contentIDs.AppendL( KMPXMediaIdAudio );
+ contentIDs.AppendL( KMPXMediaIdMusic );
+ contentIDs.AppendL( KMPXMediaIdDrm );
+ contentIDs.AppendL( KMPXMediaIdMTP );
+ iMedia = CMPXMedia::NewL( contentIDs.Array() );
+ CleanupStack::PopAndDestroy( &contentIDs );
+
+ // CMPXMedia default types
+ iMedia->SetTObjectValueL<TMPXGeneralType>( KMPXMediaGeneralType,
+ EMPXItem );
+ iMedia->SetTObjectValueL<TMPXGeneralCategory>( KMPXMediaGeneralCategory,
+ EMPXSong );
+
+ TParsePtrC parse( iFileName );
+ // Title, default is file name
+ iMedia->SetTextValueL( KMPXMediaGeneralTitle,
+ parse.Name() );
+ // Default album track
+ iMedia->SetTextValueL( KMPXMediaMusicAlbumTrack,
+ KNullDesC );
+
+ // Set the Mime Type and collection UID
+ //
+ if( !iMetadataOnly )
+ {
+ TInt index(KErrNotFound);
+ TInt count( iSupportedTypes.Count() );
+ for (TInt i=0; i <count; ++i)
+ {
+ TInt index2(KErrNotFound);
+ const CDesCArray& exts = iSupportedTypes[i]->Extensions();
+ const TDesC& ext = parse.Ext();
+ if (!exts.FindIsq(ext, index2))
+ { // found
+ index = i;
+ break;
+ }
+ }
+ if( KErrNotFound != index )
+ {
+ MPX_DEBUG1("CMPXMetadataExtractor::DoCreateMediaL apparc <---" );
+ TInt mimeIndex = SupportedContainerTypeL( iFileName, index );
+ User::LeaveIfError( mimeIndex );
+ MPX_DEBUG1("CMPXMetadataExtractor::DoCreateMediaL apparc --->" );
+
+ iMedia->SetTextValueL( KMPXMediaGeneralMimeType,
+ iSupportedTypes[index]->Mimetypes()[mimeIndex] );
+
+ iMedia->SetTObjectValueL( KMPXMediaGeneralCollectionId,
+ iSupportedTypes[index]->Uid() );
+ }
+ else
+ {
+ User::Leave(KErrNotSupported);
+ }
+ }
+ else // other case use apparc to fetch and set mimetype
+ {
+ TDataType dataType;
+ TUid dummyUid(KNullUid);
+ iAppArc.AppForDocument(iFileName, dummyUid, dataType);
+ iMedia->SetTextValueL( KMPXMediaGeneralMimeType,dataType.Des() );
+ }
+
+ // Initially set default tags.
+ SetDefaultL( *iMedia );
+ }
+
+// ----------------------------------------------------------------------------
+// Execute task at index 0.
+// ----------------------------------------------------------------------------
+void CMPXMetadataExtractor::ExecuteTaskL()
+ {
+ MPX_FUNC("CMPXMetadataExtractor::ExecuteTasksL()");
+
+ if ( iArrayTasks.Count() )
+ {
+ switch ( iArrayTasks[0] )
+ {
+ case ETaskCreateMedia:
+ DoCreateMediaL();
+ break;
+ case ETaskAddMetadata:
+ SetMediaPropertiesL();
+ break;
+ case ETaskAddExtMetadata:
+ SetExtMediaPropertiesL();
+ break;
+ case ETaskAddAlbumArt:
+ AddMediaAlbumArtL( *iMedia, iFileName );
+ break;
+ case ETaskCheckBeforeSend:
+ CheckBeforeSendRequest();
+ break;
+ default:
+ MPX_ASSERT(0); // Should never get here
+ }
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Constructs a media properties object : asynchronous funcion
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CMPXMetadataExtractor::CreateMediaAsyncL( const TDesC& aFile,
+ MMPXMetadataExtractorObserver* aObs,
+ TBool aMetadataOnly )
+ {
+ MPX_FUNC("CMPXMetadataExtractor::CreateMediaAsyncL()");
+ // check if we are still processing a request.
+ if ( iArrayTasks.Count() )
+ {
+ MPX_DEBUG1("CMPXMetadataExtractor::CreateMediaAsyncL Request ongoing. Abort!" );
+ User::Leave( KErrAbort );
+ }
- aMedia.SetTextValueL( KMPXMediaMusicAlbumArtFileName, aFile );
+ iCancelled = EFalse;
+ iFileOpenError = KErrNone;
+ iFileName = aFile;
+ iObs = aObs;
+ iMetadataOnly = aMetadataOnly;
+
+ // populate the task array
+ AddTasksL();
+
+ // Start task timer to execute task
+ if ( iArrayTasks.Count() )
+ {
+ if ( iTaskTimer->IsActive() )
+ {
+ iTaskTimer->Cancel();
+ }
+ iTaskTimer->Start( 0, 0, TCallBack(TaskTimerCallback, this ));
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Opens the file
+// ---------------------------------------------------------------------------
+//
+TInt CMPXMetadataExtractor::OpenFile()
+ {
+ MPX_FUNC("CMPXMetadataExtractor::OpenFile()");
- TBuf<256> mimeType;
- mimeType.Copy( KImageFileType );
- CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC(
- &aValue, mimeType, aFile );
- iTNManager->CreateThumbnails( *source );
- CleanupStack::PopAndDestroy( source );
- aMedia.SetTextValueL( KMPXMediaMusicOriginalAlbumArtFileName, aFile );
- iOutstandingThumbnailRequest++;
+ // Open the file
+ iFile.Close();
+ TInt error = iFile.Open( iFs, iFileName, EFileRead | EFileShareReadersOrWriters );
+ MPX_DEBUG2("CMPXMetadataExtractor::OpenFile open error = %d", error );
+ return error;
+ }
+
+// ---------------------------------------------------------------------------
+// Populat task array
+// ---------------------------------------------------------------------------
+//
+void CMPXMetadataExtractor::AddTasksL()
+ {
+ MPX_FUNC("CMPXMetadataExtractor::AddTasks()");
+ iFileOpenError = OpenFile();
+
+ // Do not change the order of the task below.
+ iArrayTasks.Reset();
+ if ( iFileOpenError == KErrNone )
+ {
+ // to avoid resources contention (i.e. accessing sql, file system, etc)
+ // Ordering the tasks - so no multiple tasks run at the same time
+ // put the longest running task at the last (i.e. thumbnailing)
+ iArrayTasks.AppendL(ETaskCreateMedia);
+ iArrayTasks.AppendL(ETaskAddExtMetadata); // Get the MMF first
+ iArrayTasks.AppendL(ETaskAddMetadata); // Get metadata & maybe drm data
+ iArrayTasks.AppendL(ETaskCheckBeforeSend);
+ iArrayTasks.AppendL(ETaskAddAlbumArt); // Get album art / thumbnail last
+ }
+ else
+ {
+ iArrayTasks.AppendL(ETaskCreateMedia);
+ iArrayTasks.AppendL(ETaskAddExtMetadata);
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// Callback for timer.
+// ----------------------------------------------------------------------------
+TInt CMPXMetadataExtractor::TaskTimerCallback(TAny* aPtr)
+ {
+ MPX_FUNC("CMPXMetadataExtractor::TaskTimerCallback()");
+
+ CMPXMetadataExtractor* ptr =
+ static_cast<CMPXMetadataExtractor*>(aPtr);
+
+ ptr->HandleTaskTimerExpired();
+ return KErrNone;
+ }
+
+// ----------------------------------------------------------------------------
+// Handle task timer expired
+// ----------------------------------------------------------------------------
+void CMPXMetadataExtractor::HandleTaskTimerExpired()
+ {
+ MPX_FUNC("CMPXMetadataExtractor::HandleTaskTimerExpired()");
+
+ if ( iTaskTimer && iTaskTimer->IsActive() )
+ {
+ iTaskTimer->Cancel();
+ }
+ // execute task at index 0
+ MPX_TRAPD( error, ExecuteTaskL() );
+ if ( error || iCancelled )
+ {
+ // cleanup
+ if ( iMedia != NULL )
+ {
+ delete iMedia;
+ iMedia = NULL;
+ }
+ iArrayTasks.Reset();
+ }
+
+ // Remove task at index 0.
+ if ( iArrayTasks.Count() )
+ {
+ iArrayTasks.Remove( 0 );
+ }
-#endif // RD_MPX_TNM_INTEGRATION
+ // check if we have any more task to run
+ if ( iArrayTasks.Count() )
+ {
+ // start task timer
+ iTaskTimer->Start( 0, 0, TCallBack(TaskTimerCallback, this ));
+ }
+ else
+ {
+ // done
+ if ( iObs && !iCancelled )
+ {
+ iObs->HandleCreateMediaComplete( iMedia, error );
+ iMedia = NULL; // ownership transferred.
+ }
+
+ CleanUp();
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// Callback for timer.
+// ----------------------------------------------------------------------------
+void CMPXMetadataExtractor::CleanUp()
+ {
+ MPX_FUNC("CMPXMetadataExtractor::CleanUp()");
+ // Reset the utility
+ TRAP_IGNORE( iMetadataUtility->ResetL() );
+ iFile.Close();
}
+
+
+// ---------------------------------------------------------------------------
+// Sets DRRM media properties not returned by metadata utilities
+// ---------------------------------------------------------------------------
+//
+void CMPXMetadataExtractor::SetDrmMediaPropertiesL(const CMetaDataFieldContainer& aMetaCont)
+ {
+ MPX_FUNC("CMPXMetadataExtractor::SetDrmMediaPropertiesL()");
+
+ TBool prot(EFalse);
+ // DB Flags to set
+ TUint dbFlags(KMPXMediaGeneralFlagsSetOrUnsetBit);
+ // Validate the objects to be used
+ MPX_ASSERT(iMedia);
+ MPX_ASSERT(iDrmMediaUtility);
+
+ // File Path
+ TParsePtrC parse( iFileName );
+ iMedia->SetTextValueL( KMPXMediaGeneralUri, iFileName );
+ iMedia->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() );
+ MPX_DEBUG2("CMPXMetadataExtractor::SetDrmMediaPropertiesL - Filename=%S", &iFileName);
+
+ // get the protected flag from MetadataUtility Container
+ TPtrC ptr = aMetaCont.Field( EMetaDataProtected );
+ MPX_DEBUG2("CMPXMetadataExtractor::SetDrmMediaPropertiesL -- status=%S", &ptr);
+ _LIT( KNonProtected, "0" );
+ if ( ptr.Compare( KNonProtected ) == 0 )
+ {
+ // this is non-protected file
+ // prot = EFalse
+ MPX_DEBUG1("CMPXMetadataExtractor::SetDrmMediaPropertiesL - non protected");
+ iMedia->SetTObjectValueL<TBool>( KMPXMediaDrmProtected, prot );
+ iMedia->SetTObjectValueL<TUint16>( KMPXMediaMTPDrmStatus, (TUint16)prot );
+ }
+ else
+ { // DRM file
+
+ // DRM Rights
+ //
+ CMPXMedia* drm = NULL;
+ MPX_TRAPD( drmError, iDrmMediaUtility->InitL( iFileName );
+ drm = CMPXMedia::NewL( *iDrmMediaUtility->GetMediaL( KMPXMediaDrmProtected.iAttributeId |
+ KMPXMediaDrmRightsStatus.iAttributeId ) );
+ );
+
+ TBool prot(EFalse);
+ if( drm )
+ {
+ CleanupStack::PushL( drm );
+ MPX_DEBUG1("CMPXMetadataExtractor::SetDrmMediaPropertiesL -- is a drm file");
+ if( drm->IsSupported( KMPXMediaDrmProtected ) )
+ {
+ prot = drm->ValueTObjectL<TBool>( KMPXMediaDrmProtected );
+ MPX_DEBUG2("CMPXMetadataExtractor::SetDrmMediaPropertiesL protected %i", prot);
+ }
+
+ TMPXMediaDrmRightsStatus status(EMPXDrmRightsFull);
+ if( drm->IsSupported( KMPXMediaDrmRightsStatus ) )
+ {
+ status = drm->ValueTObjectL<TMPXMediaDrmRightsStatus>(KMPXMediaDrmRightsStatus);
+ iMedia->SetTObjectValueL<TInt>(KMPXMediaDrmRightsStatus, status );
+ MPX_DEBUG2("CMPXMetadataExtractor::SetDrmMediaPropertiesL -- status %i", status);
+ }
+
+ // Set DB flags
+ dbFlags |= KMPXMediaGeneralFlagsIsDrmProtected;
+ if( status != EMPXDrmRightsFull && status != EMPXDrmRightsRestricted && status != EMPXDrmRightsPreview )
+ {
+ dbFlags |= KMPXMediaGeneralFlagsIsDrmLicenceInvalid;
+ }
+ CleanupStack::PopAndDestroy( drm );
+ }
+
+ // Trapped PV DRM error. If -46, we know the file has no rights
+ //
+ if( drmError == KErrPermissionDenied )
+ {
+ dbFlags |= KMPXMediaGeneralFlagsIsDrmLicenceInvalid;
+ }
+ else
+ {
+ User::LeaveIfError( drmError );
+ }
+
+ iMedia->SetTObjectValueL<TBool>( KMPXMediaDrmProtected, prot );
+ iMedia->SetTObjectValueL<TUint16>( KMPXMediaMTPDrmStatus, (TUint16)prot );
+
+ iDrmMediaUtility->Close();
+
+ } // DRM file
+
+
+ // verify the file open status
+ if( iFileOpenError == KErrNotFound || iFileOpenError == KErrPathNotFound )
+ {
+ dbFlags |= KMPXMediaGeneralFlagsIsInvalid;
+ }
+
+ // Finally set the db flag
+ //
+ iMedia->SetTObjectValueL( KMPXMediaGeneralFlags, dbFlags );
+
+ }
--- a/mmappcomponents/harvester/server/group/mpxharvester.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/server/group/mpxharvester.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -23,8 +23,12 @@
TARGET mpxharvesterserver.exe
TARGETTYPE exe
UID 0 0x101FFCA9
+#ifdef WINSCW
EPOCHEAPSIZE 0x1000 0x500000
-EPOCSTACKSIZE 0X5000
+#else
+EPOCHEAPSIZE 0x1000 0x800000
+#endif
+EPOCSTACKSIZE 0x5000
CAPABILITY CAP_SERVER DRM AllFiles
VENDORID VID_DEFAULT
@@ -39,8 +43,7 @@
// System events
SOURCE mpxfsformatmonitor.cpp
SOURCE mpxmediaremovalmonitor.cpp
-SOURCE mpxusbeventhandler.cpp
-SOURCE mpxmmcejectmonitor.cpp
+SOURCE mpxconnectioneventhandler.cpp
USERINCLUDE ../inc
USERINCLUDE ../../inc
@@ -57,6 +60,5 @@
LIBRARY mpxplaylistengine.lib
LIBRARY mpxplaybackutility.lib
LIBRARY usbman.lib
-#ifdef RD_MULTIPLE_DRIVE
LIBRARY PlatformEnv.lib
-#endif //RD_MULTIPLE_DRIVE
+LIBRARY disknotifyhandler.lib
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/harvester/server/inc/mpxconnectioneventhandler.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,133 @@
+/*
+* 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: Monitors USB events
+*
+*/
+
+
+#ifndef CMPXCONNECTIONEVENTHANDLER_H
+#define CMPXCONNECTIONEVENTHANDLER_H
+
+#include <usbman.h>
+#include <mpxpskeyobserver.h>
+#include "mpxsystemeventobserver.h"
+
+class CMPXPSKeyWatcher;
+
+/**
+ * USB Monitoring class
+ *
+ * @lib mpxharvesterserver.exe
+ * @since S60 3.0
+ */
+NONSHARABLE_CLASS( CMPXConnectionEventHandler ) : public CActive,
+ public MMPXPSKeyObserver
+ {
+public:
+
+ /**
+ * Two-phase constructor
+ * @param aObserver observer to the event handler
+ */
+ static CMPXConnectionEventHandler* NewL( MMPXSystemEventObserver& aObserver );
+
+ /**
+ * Two-phase constructor
+ * @param aObserver observer to the event handler
+ */
+ static CMPXConnectionEventHandler* NewLC( MMPXSystemEventObserver& aObserver );
+
+ /**
+ * Virtual destructor
+ */
+ virtual ~CMPXConnectionEventHandler();
+
+public:
+
+ /**
+ * Polls for the current monitor status
+ * If an event is happening, it will callback the observer of the event
+ */
+ void PollStatus();
+
+protected: // From Base Class
+
+ /**
+ * From CActive
+ */
+ void RunL();
+ void DoCancel();
+
+ /**
+ * From MMPXPSKeyObserver
+ */
+ void HandlePSEvent( TUid aUid, TInt aKey );
+
+private: // New Methods
+
+ /**
+ * Handle the PS Key event
+ * @param aUid UID of the key
+ * @param aKey ID of the key
+ */
+ void DoHandlePSEventL( TUid aUid, TInt aKey );
+
+ void DoMSStartEventL();
+ void DoMTPStartEventL();
+ void DoMTPNotActiveEventL();
+
+ /**
+ * Connect to usbman.
+ * If error, default iDeviceState to EUsbDeviceStateConfigured so this would not
+ * block usb event mode change.
+ */
+ void ConnectUsbMan();
+
+private:
+
+ /**
+ * C++ constructor
+ */
+ CMPXConnectionEventHandler( MMPXSystemEventObserver& aObserver );
+
+ /*
+ * Second phased constructor
+ */
+ void ConstructL();
+
+private: // data
+
+ enum TMPXConnectionState
+ {
+ EMPXConnectionNone,
+ EMPXConnectionMassStorage,
+ EMPXConnectionMTPIdle,
+ EMPXConnectionMTPActive
+ };
+
+ CMPXPSKeyWatcher* iUSBKeyWatcher; // PS key watcher for USB PS key
+ CMPXPSKeyWatcher* iMTPKeyWatcher; // PS key watcher for MTP PS key
+
+ /*
+ * Observer interface to callback to an observer
+ */
+ MMPXSystemEventObserver& iObserver;
+ TInt iState;
+
+ RUsb iUsbMan;
+ TUsbDeviceState iDeviceState;
+ TBool iUsbManConnected;
+ };
+
+#endif // CMPXCONNECTIONEVENTHANDLER_H
--- a/mmappcomponents/harvester/server/inc/mpxharvesterengine.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/server/inc/mpxharvesterengine.h Wed Jun 23 17:51:16 2010 +0100
@@ -31,8 +31,7 @@
class CMPXHarvesterFileHandler;
class CMPXFsFormatMonitor;
class CMPXMediaRemovalMonitor;
-class CMPXUsbEventHandler;
-class CMPXMMCEjectMonitor;
+class CMPXConnectionEventHandler;
class CMPXMedia;
class CMPXActiveTaskQueue;
class CMPXPlaylistEngine;
@@ -305,8 +304,7 @@
// Move to RPointerArrays of monitors in the future
CMPXFsFormatMonitor* iFormatMonitor;
CMPXMediaRemovalMonitor* iMediaRemovalMonitor;
- CMPXUsbEventHandler* iUSBMonitor;
- CMPXMMCEjectMonitor* iMMCMonitor;
+ CMPXConnectionEventHandler* iConnectionMonitor;
// Internal task queue for async operations
CMPXActiveTaskQueue* iTaskQueue;
--- a/mmappcomponents/harvester/server/inc/mpxmediaremovalmonitor.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/server/inc/mpxmediaremovalmonitor.h Wed Jun 23 17:51:16 2010 +0100
@@ -20,21 +20,35 @@
#define CMPXMEDIAREMOVALMONITOR_H
#include <e32base.h>
+#include <disknotifyhandler.h>
#include "mpxsystemeventobserver.h"
/**
* Class to monitors for File System dismount events
+ *
+ * The monitor emits events to MMPXSystemEventObserver
+ *
+ * EDiskDismountEvent whenever a drive is about to be dismounted (see RFs::NotifyDismount).
+ * EDiskRemovedEvent whenever a specified drive has been dismounted or removed
+ * EDiskInsertedEvent whenever a specified drive has been inserted
+ *
+ * The observer is expected to prepare the drive for dismounting during the EDiskDismountEvent.
+ *
+ * Dismount monitoring is automatically subscribed for all non-remote drives.
+ * Inserted/Removed monitor is subscribed only for the drive given in the constructor.
+ *
* @lib Harvester
* @since S60 3.0
*/
-class CMPXMediaRemovalMonitor : public CActive
+class CMPXMediaRemovalMonitor : public CBase,
+ public MDiskNotifyHandlerCallback
{
public:
/**
* Two-phase constructor
- * @param aDrive drive to monitor
+ * @param aDrive drive to monitor for insertions and removals
* @param aFs file server session
* @param aObserver observer to the event
*/
@@ -55,24 +69,24 @@
* Virtual destructor
*/
virtual ~CMPXMediaRemovalMonitor();
-
-protected: // From base class
- /*
- * From CActive
+ /**
+ * Check the status of the monitored disks
+ *
+ * This check should be done whenever there is a risk that we got
+ * a NotifyDismount even though the drives actually weren't dismounted.
+ *
*/
- void RunL();
-
- /*
- * From CActive
- */
- void DoCancel();
+ void CheckDriveStatus();
+
+protected: // From Base Class
/**
- * From CActive
+ * From MDiskNotifyHandlerCallback
*/
- TInt RunError(TInt aError);
-
+ void HandleNotifyDismount( TInt aError, const TDismountEvent& aEvent );
+ void HandleNotifyDisk( TInt aError, const TDiskEvent& aEvent );
+
private:
/**
@@ -89,6 +103,7 @@
private: // data
+ CDiskNotifyHandler* iDiskNotifyHandler; // Disk notification handler
TInt iDrive; // Drive that is being monitored
RFs& iFs; // File Session, not owned
TBool iDiskRemoved; // Is the disk inserted
--- a/mmappcomponents/harvester/server/inc/mpxmmcejectmonitor.h Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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: MMC Eject monitor
-*
-*/
-
-
-#ifndef C_MPXMMCEJECTMONITOR_H
-#define C_MPXMMCEJECTMONITOR_H
-
-#include <mpxpskeyobserver.h>
-#include "mpxsystemeventobserver.h"
-
-// FORWARD DECLARATIONS
-class CMPXPSKeyWatcher;
-
-/**
- * Monitors a SysAp cenrep key for the "eject" mmc menu option
- *
- * @lib mpxharvester.exe
- * @since S60 3.1
- */
-NONSHARABLE_CLASS( CMPXMMCEjectMonitor ) : public CBase,
- public MMPXPSKeyObserver
- {
-
-public:
-
- /**
- * Two-phased constructor
- */
- static CMPXMMCEjectMonitor* NewL( MMPXSystemEventObserver& aObserver );
-
- /**
- * Destructor
- */
- virtual ~CMPXMMCEjectMonitor();
-
-protected: // From Base Class
-
- /**
- * From MMPXPSKeyObserver
- */
- void HandlePSEvent( TUid aUid, TInt aKey );
-
-private:
-
- /**
- * 2nd phase constructor
- */
- void ConstructL();
-
- /**
- * Private Constructor
- */
- CMPXMMCEjectMonitor( MMPXSystemEventObserver& aObserver );
-
-private: // data
-
- CMPXPSKeyWatcher* iPSKeyWatcher; // PS key watcher for USB PS key
-
- /*
- * Observer interface to callback to an observer
- */
- MMPXSystemEventObserver& iObserver; // Not owned
- };
-
-#endif // C_MPXMMCEJECTMONITOR_H
--- a/mmappcomponents/harvester/server/inc/mpxusbeventhandler.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/server/inc/mpxusbeventhandler.h Wed Jun 23 17:51:16 2010 +0100
@@ -113,7 +113,6 @@
*/
MMPXSystemEventObserver& iObserver;
TInt iState;
- TBool iMTPActive;
RUsb iUsbMan;
TUsbDeviceState iDeviceState;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/harvester/server/src/mpxconnectioneventhandler.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,305 @@
+/*
+* 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: Monitors for USB events
+*
+*/
+
+
+#include <e32base.h>
+#include <f32file.h>
+#include <e32property.h>
+#ifdef RD_MULTIPLE_DRIVE
+#include <driveinfo.h>
+#endif //RD_MULTIPLE_DRIVE
+#include <mpxpskeywatcher.h>
+#include <coreapplicationuisdomainpskeys.h>
+#include <UsbWatcherInternalPSKeys.h>
+#include <usbpersonalityids.h>
+#include <mtpprivatepskeys.h>
+#include <mpxlog.h>
+#include "mpxconnectioneventhandler.h"
+
+// CONSTANTS
+const TUint KUsbAllStates = 0xFFFFFFFF;
+
+// ---------------------------------------------------------------------------
+// Default Constructor
+// ---------------------------------------------------------------------------
+//
+CMPXConnectionEventHandler::CMPXConnectionEventHandler( MMPXSystemEventObserver& aObserver ) :
+ CActive( EPriorityStandard ),
+ iObserver( aObserver ),
+ iState ( EMPXConnectionNone ),
+ iUsbManConnected( EFalse )
+
+
+ {
+ CActiveScheduler::Add( this );
+ }
+
+
+// ---------------------------------------------------------------------------
+// 2nd Phase Constructor
+// ---------------------------------------------------------------------------
+//
+void CMPXConnectionEventHandler::ConstructL()
+ {
+ MPX_DEBUG1(_L("CMPXConnectionEventHandler::ConstructL <---"));
+ iUSBKeyWatcher = CMPXPSKeyWatcher::NewL( KPSUidUsbWatcher,
+ KUsbWatcherSelectedPersonality,
+ this );
+
+ //for checking MTP status key whether a client has started
+ iMTPKeyWatcher = CMPXPSKeyWatcher::NewL( KMtpPSUid,
+ KMtpPSStatus,
+ this );
+
+ // Connect to usbman
+ ConnectUsbMan();
+ MPX_DEBUG1(_L("CMPXConnectionEventHandler::ConstructL --->"));
+ }
+
+
+// ---------------------------------------------------------------------------
+// Two Phased Constructor
+// ---------------------------------------------------------------------------
+//
+CMPXConnectionEventHandler* CMPXConnectionEventHandler::NewL
+ ( MMPXSystemEventObserver& aObserver )
+ {
+ CMPXConnectionEventHandler* self = CMPXConnectionEventHandler::NewLC( aObserver );
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+
+// ---------------------------------------------------------------------------
+// Two Phased Constructor
+// ---------------------------------------------------------------------------
+//
+CMPXConnectionEventHandler* CMPXConnectionEventHandler::NewLC
+ ( MMPXSystemEventObserver& aObserver )
+
+ {
+ CMPXConnectionEventHandler* self = new( ELeave ) CMPXConnectionEventHandler( aObserver);
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ return self;
+ }
+
+
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CMPXConnectionEventHandler::~CMPXConnectionEventHandler()
+ {
+ Cancel();
+ if ( iUsbManConnected )
+ {
+ iUsbMan.Close();
+ }
+ delete iUSBKeyWatcher;
+ delete iMTPKeyWatcher;
+ }
+
+// ---------------------------------------------------------------------------
+// Poll for any ongoing USB / MTP event
+// ---------------------------------------------------------------------------
+//
+void CMPXConnectionEventHandler::PollStatus()
+ {
+ // only call back on connection state != EMPXConnectionNone
+ if (iState == EMPXConnectionMassStorage)
+ {
+ TRAP_IGNORE( DoMSStartEventL() );
+ }
+ else if (iState == EMPXConnectionMTPActive)
+ {
+ TRAP_IGNORE( DoMTPStartEventL() );
+ }
+ else if (iState == EMPXConnectionMTPIdle)
+ {
+ TRAP_IGNORE( DoMTPNotActiveEventL() );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Handle the PS key event
+// ---------------------------------------------------------------------------
+//
+void CMPXConnectionEventHandler::HandlePSEvent( TUid aUid, TInt aKey )
+ {
+ TRAP_IGNORE( DoHandlePSEventL(aUid,aKey) );
+ }
+
+// ---------------------------------------------------------------------------
+// Handle the PS key event
+// ---------------------------------------------------------------------------
+//
+void CMPXConnectionEventHandler::DoHandlePSEventL( TUid /*aUid*/, TInt /*aKey*/ )
+ {
+ MPX_FUNC("CMPXConnectionEventHandler::DoHandlePSEvent()");
+ if ( !iUsbManConnected )
+ {
+ ConnectUsbMan();
+ }
+
+ // Handle the Key event
+ TInt usbStatus;
+ iUSBKeyWatcher->GetValue( usbStatus );
+
+ TInt mtpStatus;
+ iMTPKeyWatcher->GetValue(mtpStatus);
+
+ MPX_DEBUG3("CMPXConnectionEventHandler::DoHandlePSEventL, usbStatus = %d, mtpStatus = %d", usbStatus, mtpStatus);
+ MPX_DEBUG2("CMPXConnectionEventHandler::DoHandlePSEventL, iState = %d", iState);
+ MPX_DEBUG4("CMPXConnectionEventHandler::DoHandlePSEventL, iDeviceState = %d, EUsbDeviceStateAddress(%d), EUsbDeviceStateConfigured(%d)", iDeviceState, EUsbDeviceStateAddress, EUsbDeviceStateConfigured);
+
+ // events from lower level is not causing multiple callback on the same type
+ // usb is really only connected if went through Address or Configured state
+ if( (usbStatus == KUsbPersonalityIdMS) && (iDeviceState == EUsbDeviceStateAddress || iDeviceState == EUsbDeviceStateConfigured))
+ {
+ if ((iState == EMPXConnectionMTPIdle) || (iState == EMPXConnectionMTPActive))
+ {
+ MPX_DEBUG1("CMPXConnectionEventHandler::DoHandlePSEvent - MTP End");
+ iObserver.HandleSystemEventL( EUSBMTPEndEvent, -1 );
+ iState = EMPXConnectionNone;
+ }
+
+ if (iState != EMPXConnectionMassStorage)
+ {
+ DoMSStartEventL();
+ }
+ }
+ else if (iState == EMPXConnectionMassStorage)
+ {
+ if (usbStatus != KUsbPersonalityIdMS)
+ {
+ MPX_DEBUG1("CMPXConnectionEventHandler::DoHandlePSEvent - USB MassStorage End");
+ iObserver.HandleSystemEventL( EUSBMassStorageEndEvent, -1 );
+ iState = EMPXConnectionNone;
+ }
+ }
+
+ // after MassStorage End, it is possible that MTP is still connected
+ if (iState != EMPXConnectionMassStorage)
+ {
+ if ((mtpStatus == EMtpPSStatusUninitialized) && (iState != EMPXConnectionNone))
+ {
+ MPX_DEBUG1("CMPXConnectionEventHandler::DoHandlePSEvent - MTP End");
+ iObserver.HandleSystemEventL( EUSBMTPEndEvent, -1 );
+ iState = EMPXConnectionNone;
+ }
+ else if ((mtpStatus == EMtpPSStatusActive) && (iState != EMPXConnectionMTPActive)
+ && ((usbStatus == KUsbPersonalityIdMTP) || (usbStatus == KUsbPersonalityIdPCSuiteMTP))) // only trigger MusicPlayer fully block and RAM Drive if USB MTP/PCSuiteMTP is connected
+ {
+ DoMTPStartEventL();
+ }
+ else if ((mtpStatus == EMtpPSStatusReadyToSync) && (iState != EMPXConnectionMTPIdle) && (iState != EMPXConnectionMTPActive))
+ {
+ DoMTPNotActiveEventL();
+ }
+ }
+ }
+
+void CMPXConnectionEventHandler::DoMSStartEventL()
+ {
+ MPX_DEBUG1("CMPXConnectionEventHandler::DoMSStartEventL - USB MassStorage Start");
+ iObserver.HandleSystemEventL( EUSBMassStorageStartEvent, -1 );
+ iState = EMPXConnectionMassStorage;
+ }
+
+void CMPXConnectionEventHandler::DoMTPStartEventL()
+ {
+ MPX_DEBUG1("CMPXConnectionEventHandler::DoMTPStartEventL - MTP Start");
+ iObserver.HandleSystemEventL( EUSBMTPStartEvent, -1 );
+ iState = EMPXConnectionMTPActive;
+ }
+
+void CMPXConnectionEventHandler::DoMTPNotActiveEventL()
+ {
+ MPX_DEBUG1("CMPXConnectionEventHandler::DoMTPNotActiveEventL - MTP Not Active");
+ iObserver.HandleSystemEventL( EUSBMTPNotActiveEvent, -1 );
+ iState = EMPXConnectionMTPIdle;
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXConnectionEventHandler::RunL
+// ---------------------------------------------------------------------------
+//
+void CMPXConnectionEventHandler::RunL()
+ {
+ MPX_FUNC("CMPXConnectionEventHandler::RunL()");
+ TInt status( iStatus.Int() );
+
+ MPX_DEBUG2("CMPXConnectionEventHandler::RunL status=%d", status );
+ if ( status != KErrCancel && status != KErrServerTerminated )
+ {
+ iUsbMan.DeviceStateNotification( KUsbAllStates, iDeviceState, iStatus );
+ SetActive();
+ }
+
+ if ( status == KErrNone )
+ {
+ MPX_DEBUG2("CMPXConnectionEventHandler::RunL - DeviceState = %d", iDeviceState);
+ HandlePSEvent( TUid::Uid(0), 0 );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXConnectionEventHandler::DoCancel
+// ---------------------------------------------------------------------------
+//
+void CMPXConnectionEventHandler::DoCancel()
+ {
+ MPX_FUNC("CMPXConnectionEventHandler::DoCancel()");
+ if ( iUsbManConnected )
+ {
+ iUsbMan.DeviceStateNotificationCancel();
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CMPXConnectionEventHandler::ConnectUsbMan
+// If error, default iDeviceState to EUsbDeviceStateConfigured so this would not
+// block usb event mode change.
+// ---------------------------------------------------------------------------
+void CMPXConnectionEventHandler::ConnectUsbMan()
+ {
+ MPX_FUNC("CMPXConnectionEventHandler::ConnectUsbMan()");
+ if ( iUsbMan.Connect() == KErrNone )
+ {
+ iUsbManConnected = ETrue;
+ // get device state
+ TInt err = iUsbMan.GetDeviceState( iDeviceState );
+ if ( err )
+ {
+ iDeviceState = EUsbDeviceStateUndefined;
+ }
+
+ // start active object
+ if ( !IsActive() )
+ {
+ iUsbMan.DeviceStateNotification( KUsbAllStates, iDeviceState, iStatus );
+ SetActive();
+ }
+ }
+ else
+ {
+ iDeviceState = EUsbDeviceStateConfigured;
+ }
+ }
+// END OF FILE
+
--- a/mmappcomponents/harvester/server/src/mpxfsformatmonitor.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/server/src/mpxfsformatmonitor.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -18,17 +18,11 @@
#include <e32base.h>
#include <f32file.h>
-#ifdef RD_MULTIPLE_DRIVE
#include <driveinfo.h>
-#endif //RD_MULTIPLE_DRIVE
#include <mpxlog.h>
#include "mpxfsformatmonitor.h"
-#ifdef RD_MULTIPLE_DRIVE
- static const TInt KDriveCount = 2;
-#else
- static const TInt KDriveCount = 1;
-#endif
+static const TInt KDriveCount = 2;
// ======== MEMBER FUNCTIONS ========
@@ -142,6 +136,12 @@
}
else // TOperationType::EEnd or TOperationType::EAbort
{
+ //Ignore if formatting is ongoing
+ TBool formatting = iBackupSession->IsBackupOperationRunning();
+ if ( formatting )
+ {
+ return;
+ }
for(TInt i=0; i<KDriveCount; ++i)
{
iObserver.HandleSystemEventL(EFormatEndEvent, iBackupDrives[i]);
--- a/mmappcomponents/harvester/server/src/mpxharvesterengine.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/server/src/mpxharvesterengine.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -17,9 +17,7 @@
#include <e32std.h>
-#ifdef RD_MULTIPLE_DRIVE
#include <driveinfo.h>
-#endif //RD_MULTIPLE_DRIVE
#include <mpxlog.h>
#include <mpxmedia.h>
#include <mpxcollectionutility.h>
@@ -37,8 +35,7 @@
#include "mpxharvesterengine.h"
#include "mpxfsformatmonitor.h"
#include "mpxmediaremovalmonitor.h"
-#include "mpxusbeventhandler.h"
-#include "mpxmmcejectmonitor.h"
+#include "mpxconnectioneventhandler.h"
#include "mpxharvesterfilehandler.h"
#include "mpxharvesterengineobserver.h"
#include "mpxhvsmsg.h"
@@ -63,8 +60,7 @@
delete iFormatMonitor;
delete iMediaRemovalMonitor;
- delete iUSBMonitor;
- delete iMMCMonitor;
+ delete iConnectionMonitor;
delete iFileHandler;
iFsSession.Close();
@@ -99,19 +95,15 @@
// MMC Removal monitor for Removable Drive
TInt removableDrive( EDriveE );
-#ifdef RD_MULTIPLE_DRIVE
User::LeaveIfError( DriveInfo::GetDefaultDrive(
DriveInfo::EDefaultRemovableMassStorage,
removableDrive ) );
-#endif // RD_MULTIPLE_DRIVE
iMediaRemovalMonitor = CMPXMediaRemovalMonitor::NewL(
removableDrive, iFsSession, *this );
- // USB Event monitor
- iUSBMonitor = CMPXUsbEventHandler::NewL( *this );
+ // Connection Event monitor
+ iConnectionMonitor = CMPXConnectionEventHandler::NewL( *this );
- // MMC Event handling
- iMMCMonitor = CMPXMMCEjectMonitor::NewL( *this );
// File handler to handle file related events
iFileHandler = CMPXHarvesterFileHandler::NewL( iFsSession );
@@ -434,7 +426,7 @@
// wont be able to open the db anyways.
//
iFormatMonitor->PollStatus();
- iUSBMonitor->PollStatus();
+ iConnectionMonitor->PollStatus();
}
// ---------------------------------------------------------------------------
@@ -445,6 +437,26 @@
TInt aData )
{
MPX_DEBUG2("CMPXHarvesterEngine::HandleSystemEventL %i <---", aEvent);
+
+ if( !iTempCollectionUtil )
+ {
+ iTempCollectionUtil = MMPXCollectionUtility::NewL( NULL, KMcModeDefault );
+ }
+
+ // Must close collections ASAP in case drives may dismount soon
+ TRAP_IGNORE(
+ if (aEvent == EUSBMassStorageStartEvent)
+ {
+ DoStopPlaybackL();
+ iTempCollectionUtil->Collection().CommandL ( EMcCloseCollection, -1 );
+ iFileHandler->HandleSystemEventL ( EDiskDismountEvent, -1 );
+ }
+ else if ( aEvent == EDiskDismountEvent )
+ {
+ DoStopPlaybackL();
+ iTempCollectionUtil->Collection().CommandL ( EMcCloseCollection, aData );
+ }
+ );
// The engine is a delegator, it sends the events to
// different classes to do the actual work
@@ -455,14 +467,17 @@
TBool notify(ETrue);
switch( aEvent )
{
- case EPowerKeyEjectEvent:
+ case EDiskDismountEvent:
{
notify=EFalse;
- TRAP_IGNORE( DoStopPlaybackL() );
break;
}
+ case EUSBMassStorageStartEvent:
+ {
+ iDiskOpActive = ETrue;
+ }
+ break;
case EFormatStartEvent:
- case EUSBMassStorageStartEvent: // deliberate fall through
case EUSBMTPStartEvent: // deliberate fall through
case EDiskInsertedEvent: // deliberate fall through
case EDiskRemovedEvent: // deliberate fall through
@@ -470,11 +485,6 @@
iDiskOpActive = ETrue;
TRAP_IGNORE( DoStopPlaybackL() );
}
- default: //lint !e616 !e825
- if( !iTempCollectionUtil )
- {
- iTempCollectionUtil = MMPXCollectionUtility::NewL( NULL, KMcModeDefault );
- }
break;
}
@@ -514,6 +524,15 @@
iTempCollectionUtil = NULL;
}
}
+
+ if ( aEvent == EUSBMassStorageEndEvent )
+ {
+ // In some cases visit to USB Mass Storage mode can be so brief
+ // that drives are actually not dismounted at all even though we
+ // get a NotifyDismount event. In such cases we need to re-issue
+ // the NotifyDismount requests.
+ iMediaRemovalMonitor->CheckDriveStatus();
+ }
}
// ---------------------------------------------------------------------------
--- a/mmappcomponents/harvester/server/src/mpxharvesterserver.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/server/src/mpxharvesterserver.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -71,9 +71,9 @@
CMPXHarvesterServer* server = CMPXHarvesterServer::NewL();
CleanupStack::PushL(server);
RProcess::Rendezvous(KErrNone);
- CActiveScheduler::Start();
+ CActiveScheduler::Start();
+ CleanupStack::PopAndDestroy(server);
CActiveScheduler::Install(NULL);
- CleanupStack::PopAndDestroy(server);
CleanupStack::PopAndDestroy(scheduler);
}
@@ -119,7 +119,7 @@
{
iEngine = CMPXHarvesterEngine::NewL();
StartL(KMPXHarvesterServerName);
- RProcess().SetPriority(::EPriorityLow);
+ RProcess().SetPriority(::EPriorityBackground);
}
// ----------------------------------------------------------------------------
--- a/mmappcomponents/harvester/server/src/mpxmediaremovalmonitor.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/server/src/mpxmediaremovalmonitor.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -18,6 +18,7 @@
#include <e32base.h>
#include <f32file.h>
+#include <driveinfo.h>
#include <mpxlog.h>
#include "mpxmediaremovalmonitor.h"
@@ -27,14 +28,12 @@
//
CMPXMediaRemovalMonitor::CMPXMediaRemovalMonitor
( TInt aDrive, RFs& aFs, MMPXSystemEventObserver& aObserver )
- : CActive(EPriorityHigh),
- iDrive( aDrive ),
+ : iDrive( aDrive ),
iFs( aFs ),
iDiskRemoved( EFalse ),
iObserver( aObserver )
{
- CActiveScheduler::Add(this);
}
@@ -44,19 +43,11 @@
//
void CMPXMediaRemovalMonitor::ConstructL()
{
- MPX_DEBUG1(_L("CMPXMediaRemovalMonitor::ConstructL <---"));
+ MPX_FUNC("CMPXMediaRemovalMonitor::ConstructL");
+ iDiskNotifyHandler = CDiskNotifyHandler::NewL(*this, iFs);
+ CheckDriveStatus();
- // Initial state
- TDriveInfo drive;
- User::LeaveIfError(iFs.Drive(drive, TInt(iDrive)));
- iDiskRemoved = (drive.iType == EMediaNotPresent);
-
- // Start listening
- TNotifyType notType(ENotifyDisk);
- iFs.NotifyChange( notType, iStatus );
- SetActive();
-
- MPX_DEBUG1(_L("CMPXMediaRemovalMonitor::ConstructL --->"));
+ iDiskNotifyHandler->NotifyDisk();
}
@@ -99,74 +90,95 @@
//
CMPXMediaRemovalMonitor::~CMPXMediaRemovalMonitor()
{
- Cancel();
+ delete iDiskNotifyHandler;
+ }
+
+void CMPXMediaRemovalMonitor::CheckDriveStatus()
+ {
+ TDriveList driveList;
+ TInt driveCount(0);
+ TInt error = DriveInfo::GetUserVisibleDrives( iFs, driveList, driveCount );
+ if ( error != KErrNone )
+ {
+ MPX_DEBUG2("CMPXMediaRemovalMonitor::CheckDriveStatus GetUserVisibleDrives failed, error %d", error);
+ return;
+ }
+ for( TInt driveNum = EDriveA; driveNum < EDriveZ; driveNum++ )
+ {
+ if ( driveNum != EDriveC && driveList[driveNum] )
+ {
+ TDriveInfo driveInfo;
+ if (iFs.Drive(driveInfo, driveNum) == KErrNone)
+ {
+ if ( (driveInfo.iType != EMediaNotPresent) && ! (driveInfo.iDriveAtt & KDriveAttRemote) )
+ {
+ TInt error = iDiskNotifyHandler->NotifyDismount( driveNum );
+ MPX_DEBUG3("CMPXMediaRemovalMonitor::CheckDriveStatus monitoring drive %d for dismounts, error %d", driveNum, error);
+ }
+ }
+ if ( driveNum == iDrive )
+ {
+ iDiskRemoved = driveInfo.iType == EMediaNotPresent;
+ }
+ }
+ }
}
-
// ---------------------------------------------------------------------------
-// Service the request
+// Callback when disk state has changed
// ---------------------------------------------------------------------------
//
-void CMPXMediaRemovalMonitor::RunL()
+void CMPXMediaRemovalMonitor::HandleNotifyDisk( TInt aError, const TDiskEvent& aEvent )
{
- MPX_DEBUG1(_L("CMPXMediaRemovalMonitor::RunL <---"));
-
- // Re-subscribe to event.
- TNotifyType notType(ENotifyDisk);
- iFs.NotifyChange( notType, iStatus );
- SetActive();
-
- // Check state
- TDriveInfo drive;
- User::LeaveIfError(iFs.Drive(drive, TInt(iDrive)));
-
- // Notify Observer
- switch(drive.iType)
- {
- case EMediaNotPresent:
- {
- if (!iDiskRemoved)
+ MPX_DEBUG4("-->CMPXMediaRemovalMonitor::HandleNotifyDisk aError=%d event=%d drive=%d", aError, aEvent.iType, aEvent.iDrive);
+ if ( aError == KErrNone )
+ {
+ if ( aEvent.iType == EDiskRemoved
+ || aEvent.iType == EDiskStatusChanged && aEvent.iInfo.iType == EMediaNotPresent )
+ {
+ if ( aEvent.iDrive == iDrive && !iDiskRemoved )
{
iObserver.HandleSystemEventL( EDiskRemovedEvent, iDrive );
+ iDiskRemoved = ETrue;
}
- iDiskRemoved = ETrue;
- break;
- }
- default:
- {
- if ( iDiskRemoved &&
- ( drive.iMediaAtt & ( KMediaAttLockable|KMediaAttLocked|KMediaAttHasPassword ) ) !=
- ( KMediaAttLockable|KMediaAttLocked|KMediaAttHasPassword ) )
+
+ }
+ else if ( ( aEvent.iType == EDiskAdded || aEvent.iType == EDiskStatusChanged )
+ && aEvent.iInfo.iType != EMediaNotPresent )
+ {
+ if ( aEvent.iDrive == iDrive
+ && iDiskRemoved
+ && ( aEvent.iInfo.iMediaAtt & ( KMediaAttLockable|KMediaAttLocked|KMediaAttHasPassword ) )
+ != ( KMediaAttLockable|KMediaAttLocked|KMediaAttHasPassword ) )
{
iObserver.HandleSystemEventL( EDiskInsertedEvent, iDrive );
iDiskRemoved = EFalse;
}
- break;
- }
+
+ if ( !( aEvent.iInfo.iDriveAtt & KDriveAttRemote ) )
+ {
+ TInt error = iDiskNotifyHandler->NotifyDismount( aEvent.iDrive );
+ MPX_DEBUG3("CMPXMediaRemovalMonitor::HandleNotifyDisk monitoring drive %d for dismounts, error %d", aEvent.iDrive, error);
+ }
+ }
}
-
+
+ MPX_DEBUG1("<--CMPXMediaRemovalMonitor::HandleNotifyDisk");
+ }
- MPX_DEBUG1(_L("CMPXMediaRemovalMonitor::RunL --->"));
- }
// ---------------------------------------------------------------------------
-// Cancel NotifyChange request from file system
+// Callback when disk is about to be dismounted
// ---------------------------------------------------------------------------
//
-void CMPXMediaRemovalMonitor::DoCancel()
+void CMPXMediaRemovalMonitor::HandleNotifyDismount( TInt aError, const TDismountEvent& aEvent )
{
- iFs.NotifyChangeCancel();
+ MPX_DEBUG3("-->CMPXMediaRemovalMonitor::HandleNotifyDismount aError=%d drive=%d", aError, aEvent.iDrive);
+ if (aError == KErrNone)
+ {
+ TRAP_IGNORE( iObserver.HandleSystemEventL( EDiskDismountEvent, aEvent.iDrive ) );
+ TInt error = iDiskNotifyHandler->AllowDismount( aEvent.iDrive );
+ MPX_DEBUG3("CMPXMediaRemovalMonitor::HandleNotifyDismount allowed dismount of drive %d, error %d", aEvent.iDrive, error);
+ }
+ MPX_DEBUG1("<--CMPXMediaRemovalMonitor::HandleNotifyDismount");
}
-
-// ----------------------------------------------------------------------------
-// Handles a leave occurring in the request completion event handler RunL()
-// Don't care if client has a User::Leave() in RunL(), keep monitoring for events
-// ----------------------------------------------------------------------------
-//
-TInt CMPXMediaRemovalMonitor::RunError(TInt aError)
- {
- MPX_DEBUG2("CMPXMediaRemovalMonitor::RunError(%d)", aError );
- (void) aError; // avoid compile warning in urel
-
- return KErrNone;
- }
--- a/mmappcomponents/harvester/server/src/mpxmmcejectmonitor.cpp Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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: Monitor for PS Key changes from SysAp ( ME specific )
-*
-*/
-
-
-#include <e32base.h>
-#include <e32property.h>
-#include <mpxpskeywatcher.h>
-#include <mpxlog.h>
-#include "mpxmmcejectmonitor.h"
-
-// CONSTANTS
-const TUid KMmcEjectAppUid = { 0x101FFAFC };
-const TUint KKeyMmcEjectOperation = 10;
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CMPXMMCEjectMonitor::CMPXMMCEjectMonitor( MMPXSystemEventObserver& aObserver ) :
- iObserver( aObserver )
- {
-
- }
-
-
-// ---------------------------------------------------------------------------
-// 2nd phased Constructor
-// ---------------------------------------------------------------------------
-//
-void CMPXMMCEjectMonitor::ConstructL()
- {
- MPX_DEBUG1(_L("CMPXMMCEjectMonitor::ConstructL <---"));
-
- iPSKeyWatcher = CMPXPSKeyWatcher::NewL( KMmcEjectAppUid,
- KKeyMmcEjectOperation,
- this );
- MPX_DEBUG1(_L("CMPXMMCEjectMonitor::ConstructL --->"));
- }
-
-
-// ---------------------------------------------------------------------------
-// Two-Phase Constructor
-// ---------------------------------------------------------------------------
-//
-CMPXMMCEjectMonitor* CMPXMMCEjectMonitor::NewL( MMPXSystemEventObserver& aObserver )
- {
- CMPXMMCEjectMonitor* self = new( ELeave ) CMPXMMCEjectMonitor( aObserver );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CMPXMMCEjectMonitor::~CMPXMMCEjectMonitor()
- {
- delete iPSKeyWatcher;
- }
-
-// ---------------------------------------------------------------------------
-// Callback when a cenrep key is modified
-// ---------------------------------------------------------------------------
-//
-void CMPXMMCEjectMonitor::HandlePSEvent( TUid /*aUid*/, TInt /*aKey*/ )
- {
- MPX_DEBUG1(_L("CMPXMMCEjectMonitor::HandlePSEvent <---"));
- TInt value;
- iPSKeyWatcher->GetValue( value );
-
- // MMC About to be ejected from power key menu
- //
- if( value == 1 )
- {
- TRAP_IGNORE( iObserver.HandleSystemEventL( EPowerKeyEjectEvent, 0 ) );
- }
- MPX_DEBUG1(_L("CMPXMMCEjectMonitor::HandlePSEvent --->"));
- }
-
-// END OF FILE
--- a/mmappcomponents/harvester/server/src/mpxusbeventhandler.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/harvester/server/src/mpxusbeventhandler.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -19,14 +19,12 @@
#include <e32base.h>
#include <f32file.h>
#include <e32property.h>
-#ifdef RD_MULTIPLE_DRIVE
#include <driveinfo.h>
-#endif //RD_MULTIPLE_DRIVE
#include <mpxpskeywatcher.h>
#include <coreapplicationuisdomainpskeys.h>
#include <UsbWatcherInternalPSKeys.h>
#include <usbpersonalityids.h>
-#include <MtpPrivatePSKeys.h>
+#include <mtpprivatepskeys.h>
#include <mpxlog.h>
#include "mpxusbeventhandler.h"
@@ -41,7 +39,6 @@
CActive( EPriorityStandard ),
iWasMtp ( EFalse ),
iObserver( aObserver ),
- iMTPActive ( EFalse ),
iUsbManConnected( EFalse )
{
CActiveScheduler::Add( this );
@@ -152,11 +149,9 @@
// Use the default MMC drive
TInt removableDrive( EDriveE );
-#ifdef RD_MULTIPLE_DRIVE
User::LeaveIfError( DriveInfo::GetDefaultDrive(
DriveInfo::EDefaultRemovableMassStorage,
removableDrive ) );
-#endif // RD_MULTIPLE_DRIVE
// Handle the Key event
TInt value;
@@ -175,12 +170,9 @@
{
MPX_DEBUG1("CMPXUsbEventHandler::DoHandlePSEvent - MTP End");
iObserver.HandleSystemEventL( EUSBMTPEndEvent, removableDrive );
- iMTPActive = EFalse;
}
MPX_DEBUG1("CMPXUsbEventHandler::DoHandlePSEvent - USB Start");
-#ifdef RD_MULTIPLE_DRIVE
removableDrive = -1;
-#endif // RD_MULTIPLE_DRIVE
// Notify the state change (may happen more than once)
iObserver.HandleSystemEventL( EUSBMassStorageStartEvent, removableDrive );
@@ -199,20 +191,15 @@
if (value == EMtpPSStatusActive)
{
- if( !iMTPActive )
- {
- MPX_DEBUG1("CMPXUsbEventHandler::DoHandlePSEvent - MTP Start");
- iObserver.HandleSystemEventL( EUSBMTPStartEvent, removableDrive );
- iState = KUsbPersonalityIdMTP;
- iMTPActive = ETrue;
- }
+ MPX_DEBUG1("CMPXUsbEventHandler::DoHandlePSEvent - MTP Start");
+ iObserver.HandleSystemEventL( EUSBMTPStartEvent, removableDrive );
+ iState = KUsbPersonalityIdMTP;
}
else if( value != EMtpPSStatusReadyToSync )
{
MPX_DEBUG1("CMPXUsbEventHandler::DoHandlePSEvent - MTP Not Active");
iObserver.HandleSystemEventL( EUSBMTPNotActiveEvent, removableDrive );
iState = KUsbPersonalityIdMTP;
- iMTPActive = EFalse;
}
}
// Make sure MTP and MS flags are OFF
@@ -231,7 +218,6 @@
{
MPX_DEBUG1("CMPXUsbEventHandler::DoHandlePSEvent - MTP End");
iObserver.HandleSystemEventL( EUSBMTPEndEvent, removableDrive );
- iMTPActive = EFalse;
}
iState = KUsbWatcherSelectedPersonalityNone;
}
--- a/mmappcomponents/mediaplayersettingsengine/group/MPSettEng.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mediaplayersettingsengine/group/MPSettEng.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -15,15 +15,15 @@
*
*/
-// Version : %version: 4.1.2 %
-
+// Version : %version: 4.1.6 %
#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
--- a/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpaccesssingleton.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpaccesssingleton.h Wed Jun 23 17:51:16 2010 +0100
@@ -19,11 +19,6 @@
#ifndef CMMMTPDPACCESSSINGLETON_H
#define CMMMTPDPACCESSSINGLETON_H
-/**
-* Implements the MM MTP Data Priovider access singletons reference manager.
-*/
-
-class RFs;
class CMmMtpDpMetadataAccessWrapper;
class MMTPDataProviderFramework;
@@ -36,8 +31,7 @@
* @param aRFs RFs reference
* @param aFramework framework reference
*/
- IMPORT_C static void CreateL( RFs& aRfs,
- MMTPDataProviderFramework& aFramework );
+ IMPORT_C static void CreateL( MMTPDataProviderFramework& aFramework );
/**
* release singleton instance
@@ -59,6 +53,18 @@
*/
IMPORT_C static void CloseSessionL();
+ /**
+ * Issue ActiveToIdle Status Change (ActiveObject)
+ * this function is to be called after an MTP operation is finish to change status from Active to Idle
+ * observer of the status might not get the notification if idle->active->idle happens in one synchronous operation
+ */
+ IMPORT_C static void ActiveToIdleStatusChange();
+
+ /**
+ * Cancel Outstanding ActiveToIdle Status Change
+ */
+ IMPORT_C static void CancelActiveToIdleStatusChange();
+
private:
/*
* get singleton instance, for internal use
@@ -68,21 +74,32 @@
/*
* 2-phase construction
*/
- static CMmMtpDpAccessSingleton* NewL( RFs& aRfs,
- MMTPDataProviderFramework& aFramework );
+ static CMmMtpDpAccessSingleton* NewL( MMTPDataProviderFramework& aFramework );
/*
* 2-phase construction
*/
- void ConstructL( RFs& aRfs,
- MMTPDataProviderFramework& aFramework );
+ void ConstructL( MMTPDataProviderFramework& aFramework );
/*
* destruction
*/
~CMmMtpDpAccessSingleton();
+ /**
+ * get DelayStatusChanger instance, internal use only
+ */
+ static CIdle* DelayStatusChanger();
+
+ /**
+ * Perform actural ActiveToIdle Status Change after active object callback
+ */
+ static TInt DoActiveToIdleStatusChange(TAny* Any);
+
private:
CMmMtpDpMetadataAccessWrapper* iWrapper;
+
+ CIdle* iDelayStatusChanger;
+
};
#endif // CMMMTPDPACCESSSINGLETON_H
--- a/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadataaccesswrapper.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadataaccesswrapper.h Wed Jun 23 17:51:16 2010 +0100
@@ -19,10 +19,8 @@
#ifndef CMMMTPDPMETADATAACCESSWRAPPER_H
#define CMMMTPDPMETADATAACCESSWRAPPER_H
-#include <mtp/cmtpobjectmetadata.h>
-#include <mtp/mtpprotocolconstants.h>
#include <mpxmediageneraldefs.h>
-#include <mtp/mmtpdataproviderframework.h>
+#include <badesca.h>
// forward declacration
class CMmMtpDpMetadataMpxAccess;
@@ -30,16 +28,15 @@
class RFs;
class MMTPType;
-class CMTPTypeObjectPropList;
class CMPXMediaArray;
class CMPXMedia;
class MMTPDataProviderFramework;
+class CMTPObjectMetaData;
class CMmMtpDpMetadataAccessWrapper : public CBase
{
public:
- static CMmMtpDpMetadataAccessWrapper* NewL( RFs& aRfs,
- MMTPDataProviderFramework& aFramework );
+ static CMmMtpDpMetadataAccessWrapper* NewL( MMTPDataProviderFramework& aFramework );
/**
* Destructor
@@ -48,42 +45,37 @@
public:
/**
- * Get all playlists from MPX database in the assigned store
- * @param aStoreRoot, specify in which drive playlists are stored
- * @param aPlaylists, return result array
+ * Get all abstract medias from MPX database in the assigned store
+ * @param aStoreRoot, specify in which drive abstract medias are stored
+ * @param aAbstractMedias, return result array
+ * @param aCategory, indicate the category of abstract medias
*/
- IMPORT_C void GetAllPlaylistL( const TDesC& aStoreRoot,
- CMPXMediaArray** aPlaylists );
+ IMPORT_C void GetAllAbstractMediaL( const TDesC& aStoreRoot,
+ CDesCArray& aAbstractMedias,
+ TMPXGeneralCategory aCategory );
/**
- * Get all references of specified playlist
- * @param aPlaylist, specify of which reference should be get
+ * Get all references of specified abstract medias
+ * @param aAbstractMedia, specify of which reference should be get
* @param aReferences, return result array which stored handles of all references
*/
- IMPORT_C void GetAllReferenceL( CMPXMedia* aPlaylist,
+ IMPORT_C void GetAllReferenceL( const CMTPObjectMetaData& aRefOwner,
CDesCArray& aReferences );
/**
- * Get an playlist name from CMPXMedia object
- * @param aPlaylist, specify the source
- * @param aPlaylistName, return result
- */
- IMPORT_C void GetPlaylistNameL( CMPXMedia* aPlaylist, TDes& aPlaylistName );
-
- /**
- * Add object (music, video and playlist) info to DB
+ * Add object (music, video, playlist and abstract album) info to DB
* @param aFullFileName, full file name of file
* @return void
*/
- void AddObjectL( const TDesC& aFullFileName, TBool aIsVideo = EFalse );
+ IMPORT_C void AddObjectL( const CMTPObjectMetaData& aObject );
/**
- * Set playlist to DB
- * @param aPlaylistFileName, full file name of playlist file
+ * Set abstract media to DB
+ * @param aObject,
* @param aRefFileArray, a array to store the full file name of media files
* @return void
*/
- IMPORT_C void SetPlaylistL( const TDesC& aPlaylistFileName,
+ IMPORT_C void SetReferenceL( const CMTPObjectMetaData& aObject,
CDesCArray& aRefFileArray );
/**
@@ -114,18 +106,17 @@
/**
* Renames the file part of a record in the collection database
- * @param aFile, old full file name of Media file
+ * @param aOldObject, object need to be renamed
* @param aNewFileName, new file name need update
* @return void
*/
- IMPORT_C void RenameObjectL( const TDesC& aOldFileName, const TDesC& aNewFileName );
+ IMPORT_C void RenameObjectL( const CMTPObjectMetaData& aOldObject, const TDesC& aNewFileName );
/**
* Deletes metadata information associated with the object
- * @param aFullFileName, full file name of Media file
- * @param aFormatCode, format code
+ * @param aObject, the object need to be deleted
*/
- void DeleteObjectL( const TDesC& aFullFileName, const TUint aFormatCode );
+ IMPORT_C void DeleteObjectL( const CMTPObjectMetaData& aObject );
/**
* Set current drive info
@@ -139,9 +130,9 @@
* @param aWidth, the width of an object in pixels to set
* @parem aHeight, the height of an object in pixels to set
*/
- void SetImageObjPropL( const TDesC& aFullFileName,
- const TUint32 aWidth,
- const TUint32 aHeight );
+ void SetImageObjPropL( const CMTPObjectMetaData& aObject,
+ const TUint32 aWidth,
+ const TUint32 aHeight );
/*
* get image specific properties specific to videos
@@ -149,10 +140,10 @@
* @param aWidth, the width of an object in pixels to get
* @parem aHeight, the height of an object in pixels to get
*/
- void GetImageObjPropL( const TDesC& aFullFileName,
- TUint32& aWidth,
- TUint32& aHeight );
-
+ void GetImageObjPropL( const CMTPObjectMetaData& aObject,
+ TUint32& aWidth,
+ TUint32& aHeight );
+
/**
* Get Modified object from DB
* @param aStorageRoot, the root path of storage
@@ -160,16 +151,17 @@
* @param aRefFileArray, a array to store the full file name of media files
* @return void
*/
- IMPORT_C void GetModifiedContentL( const TDesC& aStorageRoot,
+ IMPORT_C void GetModifiedContentL( const TDesC& aStorageRoot,
TInt& arrayCount,
CDesCArray& aRefFileArray );
-
+
/**
* Updated Music DB
+ * @param aStorageRoot, the root path of storage
* @return void
*/
- IMPORT_C void UpdateMusicCollectionL();
-
+ IMPORT_C void UpdateMusicCollectionL( const TDesC& aStorageRoot );
+
/*
* Called when the MTP session is initialised
*/
@@ -179,59 +171,61 @@
* clean up db resource especially for video dp
*/
void CloseSessionL();
-
+
/**
* Cleanup database
*/
IMPORT_C void CleanupDatabaseL();
-
+
/**
* if the playlsit exist in the MPX DB
* @param aSuid, the suid of playlsit
*/
TBool IsExistL( const TDesC& aSuid );
-
+
// related to dummy files
/**
* Add one dummy file to dummy files array
*/
IMPORT_C void AddDummyFileL( const TDesC& aDummyFileName );
-
+
/**
* Delete one dummy file from dummy files array
- */
+ */
IMPORT_C void DeleteDummyFile( const TDesC& aDummyFileName );
-
+
/**
* Create a Dummy File from the virtual playlist URI
* @param aPlaylistName, specify the filename of the dummy file
*/
IMPORT_C void CreateDummyFile( const TDesC& aPlaylistName );
-
+
+ TMPXGeneralCategory Category( const CMTPObjectMetaData& aObject );
+
private:
- CMmMtpDpMetadataAccessWrapper( RFs& aRfs, MMTPDataProviderFramework& aFramework );
+ CMmMtpDpMetadataAccessWrapper( MMTPDataProviderFramework& aFramework );
void ConstructL();
- TMPXGeneralCategory Category( const TUint aFormatCode );
-
+ TMPXGeneralCategory ContainerCategoryL( const TDesC& aFullFileName );
+
/**
* Remove all dummy file of which format is "pla", and leave the "m3u"
*/
void RemoveDummyFiles();
private:
- // Data
- RFs& iRfs;
CMmMtpDpMetadataMpxAccess* iMmMtpDpMetadataMpxAccess;
CMmMtpDpMetadataVideoAccess* iMmMtpDpMetadataVideoAccess;
- TBool iOpenSession;
-
- MMTPDataProviderFramework& iFramework;
-
- CDesCArray* iPlaylistArray;
-
+
+ MMTPDataProviderFramework& iFramework;
+ RFs& iFs; // should not remove this member data!!!
+
+ TInt iOpenCount; // introduce to fix CollectionHelper Flush problem
+
+ CDesCArray* iAbstractMediaArray;
+
};
#endif // CMMMTPDPMETADATAACCESSWRAPPER_H
--- a/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadatampxaccess.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadatampxaccess.h Wed Jun 23 17:51:16 2010 +0100
@@ -1,20 +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 Mpx 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 Mpx access
+ *
+ */
#ifndef CMMMTPDPMETADATAMPXACCESS_H
#define CMMMTPDPMETADATAMPXACCESS_H
@@ -23,16 +22,6 @@
#include "cmmmtpdpperflog.h"
-// keep here to avoid warning on urel
-_LIT( KMpxCollectionNewL, "MpxCollectionNewL" );
-_LIT( KMpxCollectionAddL, "MpxCollectionAddL" );
-_LIT( KMpxCollectionGetL, "MpxCollectionGetL" );
-_LIT( KMpxCollectionSetL, "MpxCollectionSetL" );
-_LIT( KMpxCollectionGetPlaylist, "MpxCollectionGetPlaylist" );
-_LIT( KMpxCollectionGetReference, "MpxCollectionGetReference" );
-_LIT( KMpxCollectionFindAllLValidate, "MpxCollectionValidate" );
-_LIT( KMpxCollectionFindAllLBeforeAdd, "KMpxCollectionFindAllLBeforeAdd" );
-
// forward declacration
class CMPXMedia;
class CMTPObjectMetaData;
@@ -50,170 +39,175 @@
} TMetadataTable;
/**
-* Controls access to the music MPX store database. Allows access to the
-* information about any of the music stored in any of the MPX db's on any
-* of the drives. Also supports deletions and insertions into the db.
-*/
+ * Controls access to the music MPX store database. Allows access to the
+ * information about any of the music stored in any of the MPX db's on any
+ * of the drives. Also supports deletions and insertions into the db.
+ */
class CMmMtpDpMetadataMpxAccess : public CBase
{
public:
- static CMmMtpDpMetadataMpxAccess* NewL( RFs& aRfs, MMTPDataProviderFramework& aFramework );
+ static CMmMtpDpMetadataMpxAccess* NewL( RFs& aRfs );
/**
- * Destructor
- */
+ * Destructor
+ */
~CMmMtpDpMetadataMpxAccess();
public:
/**
- * Get all playlists from MPX database in the assigned store
- * @param aStoreRoot, specify in which drive playlists are stored
- * @param aPlaylists, return result array
- */
- void GetAllPlaylistL( const TDesC& aStoreRoot, CMPXMediaArray** aPlaylists );
+ * OpenSession, introduce to fix CollectionHelper Flush problem
+ */
+ void OpenSession();
+
+ /**
+ * CloseSession, introduce to fix CollectionHelper Flush problem
+ */
+ void CloseSession();
/**
- * Get all references of specified playlist
- * @param aPlaylist, specify of which reference should be get
- * @param aReferences, return result array which stored handles of all references
- */
- void GetAllReferenceL( CMPXMedia* aPlaylist, CDesCArray& aReferences );
+ * Get all abstract medias from MPX database in the assigned store
+ * @param aStoreRoot, specify in which drive abstract medias are stored
+ * @param aAbstractMedias, return result array
+ * @param aCategory, indicate the category of abstract medias
+ */
+ void GetAllAbstractMediaL( const TDesC& aStoreRoot,
+ CDesCArray& aAbstractMedias,
+ TMPXGeneralCategory aCategory );
/**
- * Get an playlist name from CMPXMedia object
- * @param aPlaylist, specify the source
- * @param aPlaylistName, return result
- */
- void GetPlaylistNameL( CMPXMedia* aPlaylist, TDes& aPlaylistName );
+ * Get all references of specified abstract media
+ * @param aAbstractMedia, specify of which reference should be get
+ * @param aReferences, return result array which stored handles of all references
+ */
+ void GetAllReferenceL( const TDesC& aRefOwnerSuid,
+ TMPXGeneralCategory aCategory,
+ CDesCArray& aReferences );
/**
- * Adds Songs info to Mpx DB
- * @param aFullFileName, full file name of Media file
- */
+ * Adds Songs info to Mpx DB
+ * @param aFullFileName, full file name of Media file
+ */
void AddSongL( const TDesC& aFullFileName );
/**
- * Adds Playlist to Mpx DB
- * @param aFullFileName, full file name of Playlist file
- */
- void AddPlaylistL( const TDesC& aFullFileName );
-
- /**
- * Set playlist to DB
- * @param aPlaylistFileName, full file name of playlist file
- * @param aRefFileArray, a array to store the full file name of media files
- */
- void SetPlaylistL( const TDesC& aPlaylistFileName,
- CDesCArray& aRefFileArray );
-
- void GetObjectMetadataValueL( const TUint16 aPropCode,
- MMTPType& aNewData,
- const CMTPObjectMetaData& aObjectMetaData );
+ * Adds abstract media to Mpx DB
+ * @param aFullFileName, full file name of abstract media file
+ * @param aCategory, indicate the category of abstract media
+ */
+ void AddAbstractMediaL( const TDesC& aFullFileName,
+ TMPXGeneralCategory aCategory );
/**
- * Set object property and updated object in DB according property code,
- * only for update, not for creation
- * @param aPropCode, property code of aObjectMetaData
- * @param aNewData, object property value which will be set into
- * aObjectMetaData
- * @param aObjectMetaData, owner of the property which should be
- * updated into database
- */
- void SetObjectMetadataValueL( const TUint16 aPropCode,
- const MMTPType& aNewData,
- const CMTPObjectMetaData& aObjectMetaData );
+ * Set abstract media to DB
+ * @param aRefOwnerName, full file name of abstract media file
+ * @param aRefFileArray, a array to store the full file name of media files
+ * @param aCategory, indicate the category of abstract media
+ */
+ void SetReferenceL( const TDesC& aRefOwnerName,
+ CDesCArray& aRefFileArray,
+ TMPXGeneralCategory aCategory );
+
+ void GetObjectMetadataValueL( const TUint16 aPropCode,
+ MMTPType& aNewData,
+ const TDesC& aFullFileName,
+ TMPXGeneralCategory aCategory );
/**
- * Set object property and updated object in DB according property code,
- * only for update, not for creation
- * @param aPropCode, property code of aObjectMetaData
- * @param aNewData, object property value which will be set into
- * aObjectMetaData
- * @param aSuid, full file name of object of which properties need to set
- */
+ * Set object property and updated object in DB according property code,
+ * only for update, not for creation
+ * @param aPropCode, property code of aObjectMetaData
+ * @param aNewData, object property value which will be set into
+ * aObjectMetaData
+ * @param aObjectMetaData, owner of the property which should be
+ * updated into database
+ */
void SetObjectMetadataValueL( const TUint16 aPropCode,
- const MMTPType& aNewData,
- const TDesC& aSuid );
+ const MMTPType& aNewData,
+ const TDesC& aFullFileName,
+ TMPXGeneralCategory aCategory );
- CMPXMedia* FindWMPMediaLC( TMPXAttributeData aWMPMediaID, TBool aFlag );
+ CMPXMedia* FindWMPMediaLC( TMPXAttributeData aWMPMediaID,
+ TBool aFlag );
/**
- * Update the Sync flag for those not synchronized, Update the Modified
- * flag for those have been modified, and delete the stale records for
- * files that have been deleted.
- */
+ * Update the Sync flag for those not synchronized, Update the Modified
+ * flag for those have been modified, and delete the stale records for
+ * files that have been deleted.
+ */
void UpdateMusicCollectionL();
/**
- * Remove the file from MPX DB
- * @param aFullFileName, the file to remove
- * @param aCategory, the category of the file
- */
- void DeleteObjectL( const TDesC& aFullFileName, TMPXGeneralCategory aCategory );
+ * Remove the file from MPX DB
+ * @param aFullFileName, the file to remove
+ * @param aCategory, the category of the file
+ */
+ void DeleteObjectL( const TDesC& aFullFileName,
+ TMPXGeneralCategory aCategory );
/**
- * Rename the filename onto MPX DB
- * @param aOldFileName, the old file to rename
- * @param aNewFileName, the new file name
- * @param aFormatCode, the format of object
- */
- void RenameObjectL( const TDesC& aOldFileName, const TDesC& aNewFileName,
- TUint aFormatCode );
+ * Rename the filename onto MPX DB
+ * @param aOldFileName, the old file to rename
+ * @param aNewFileName, the new file name
+ * @param aCategory, the category of object
+ */
+ void RenameObjectL( const TDesC& aOldFileName,
+ const TDesC& aNewFileName,
+ TMPXGeneralCategory aCategory );
/**
- * Set current drive info
- * @param aStorageRoot, current drive info
- */
+ * Set current drive info
+ * @param aStorageRoot, current drive info
+ */
void SetStorageRootL( const TDesC& aStorageRoot );
/**
- * Get modified content
- * @param arrayCount, count of modified content
- * @param aModifiedcontent, modified files name list
- */
- void GetModifiedContentL( TInt& arrayCount, CDesCArray& aModifiedcontent );
-
+ * Get modified content
+ * @param arrayCount, count of modified content
+ * @param aModifiedcontent, modified files name list
+ */
+ void GetModifiedContentL( TInt& arrayCount,
+ CDesCArray& aModifiedcontent );
+
/**
- * if the playlsit exist in the MPX DB
- * @param aSuid, the suid of playlsit
- */
+ * if the playlsit exist in the MPX DB
+ * @param aSuid, the suid of playlsit
+ */
TBool IsExistL( const TDesC& aSuid );
private:
- CMmMtpDpMetadataMpxAccess( RFs& aFs, MMTPDataProviderFramework& aFramework );
+ CMmMtpDpMetadataMpxAccess( RFs& aFs );
void ConstructL();
void SetDefaultL( CMPXMedia& aMediaProp );
/**
- * Set property value into MPX object according to property code,
- * only used by member functions of this class.
- * @param aPropCode, specify property code of aMediaProp
- * @param aNewData, object property value which will be set into
- * aObjectMetaData
- * @param aObjectMetaData, owner of the property which should be
- * inserted or updated into database
- */
+ * Set property value into MPX object according to property code,
+ * only used by member functions of this class.
+ * @param aPropCode, specify property code of aMediaProp
+ * @param aNewData, object property value which will be set into
+ * aObjectMetaData
+ * @param aObjectMetaData, owner of the property which should be
+ * inserted or updated into database
+ */
void SetMetadataValueL( const TUint16 aPropCode,
- const MMTPType& aNewData,
- CMPXMedia& aMediaProp );
+ const MMTPType& aNewData,
+ CMPXMedia& aMediaProp );
- TMPXAttributeData MpxAttribFromPropL( const CMPXMedia& aMedia,
- const TUint16 aPropCode );
+ TMPXAttributeData MpxAttribFromPropL( const TUint16 aPropCode );
MMPXCollectionHelper* CollectionHelperL();
private:
- // File server to allow file access
RFs& iRfs;
TBuf<KStorageRootMaxLength> iStoreRoot;
MMPXCollectionHelper* iCollectionHelper;
-
- MMTPDataProviderFramework& iFramework;
+ HBufC8* iSampleData;
+
+ TBool iHasCleanUp;
#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
CMmMtpDpPerfLog* iPerfLog;
--- a/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.h Wed Jun 23 17:51:16 2010 +0100
@@ -38,47 +38,46 @@
class TMmMtpDpOverflowHandler : public TDesOverflow
{
- public:
-
- inline void SetOwner( CMmMtpDpPerfLog* aOwner );
- inline void Overflow( TDes& aDes );
-
- private:
-
- CMmMtpDpPerfLog* iOwner;
+public:
+ inline void SetOwner( CMmMtpDpPerfLog* aOwner );
+ inline void Overflow( TDes& aDes );
+
+private:
+ CMmMtpDpPerfLog* iOwner;
+
};
class CMmMtpDpPerfLog : public CBase
{
- public:
-
- inline static CMmMtpDpPerfLog* NewL( const TDesC& aTitle );
- inline ~CMmMtpDpPerfLog();
-
- inline void Write( const TDesC& aText);
- inline void WriteFormat( TRefByValue<const TDesC> aFmt, ... );
+public:
+
+ inline static CMmMtpDpPerfLog* NewL( const TDesC& aTitle );
+ inline ~CMmMtpDpPerfLog();
+
+ inline void Write( const TDesC& aText );
+ inline void WriteFormat( TRefByValue<const TDesC> aFmt, ... );
+
+ inline void Start( const TDesC& aDescription );
+ inline void Stop( const TDesC& aDescription );
+
+private:
- inline void Start( const TDesC& aDescription );
- inline void Stop( const TDesC& aDescription );
-
- private:
-
- inline CMmMtpDpPerfLog();
- inline void ConstructL( const TDesC& aTitle );
+ inline CMmMtpDpPerfLog();
+ inline void ConstructL( const TDesC& aTitle );
+
+private:
+
+ TMmMtpDpOverflowHandler iOverflowHandler;
- private:
-
- TMmMtpDpOverflowHandler iOverflowHandler;
+ HBufC16* iTitle;
+ CDesC16ArrayFlat iDescription;
+ CArrayFixFlat<TUint32> iStartTick;
+ CArrayFixFlat<TUint64> iTotalTime;
+ CArrayFixFlat<TUint32> iTotalUsage;
- HBufC16* iTitle;
- CDesC16ArrayFlat iDescription;
- CArrayFixFlat<TUint32> iStartTick;
- CArrayFixFlat<TUint64> iTotalTime;
- CArrayFixFlat<TUint32> iTotalUsage;
-
- TInt iNTickPeriod;
- TInt iLastIndex;
-
+ TInt iNTickPeriod;
+ TInt iLastIndex;
+
};
#include "cmmmtpdpperflog.inl"
--- a/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.inl Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.inl Wed Jun 23 17:51:16 2010 +0100
@@ -71,10 +71,13 @@
VA_LIST list;
VA_START( list, aFmt );
- TBuf<KMtpLogBufferSize> buf;
-
- buf.AppendFormatList( aFmt, list, &iOverflowHandler );
- Write( buf );
+ HBufC* buf = HBufC::New( KMtpLogBufferSize );
+ if ( buf != NULL )
+ {
+ buf->Des().AppendFormatList( aFmt, list, &iOverflowHandler );
+ Write( *buf );
+ delete buf;
+ }
}
void CMmMtpDpPerfLog::Start( const TDesC& aDescription )
@@ -187,9 +190,11 @@
if (totalTimeValue <= 0xFFFFFFFF)
{
+ //Define the ptr on stack to avoid compiling warnning for wiscw udeb
+ TPtrC ptr( iDescription[index] );
WriteFormat( _L( "<PERFLOG>%S-%S, usage = %u, last time = %u.%S ms, total time = %u.%S ms, average time = %u.%S ms</PERFLOG>" ),
iTitle,
- &iDescription[index],
+ &ptr,
iTotalUsage[index],
lastTimeValue,
&lastTimeDecimal,
@@ -200,9 +205,11 @@
}
else
{
+ //Define the ptr on stack to avoid compiling warnning for wiscw udeb
+ TPtrC ptr( iDescription[index] );
WriteFormat( _L( "<PERFLOG>%S-%S, usage = %u, last time = %u.%S ms, total time = %u%u.%S ms, average time = %u.%S ms</PERFLOG>" ),
iTitle,
- &iDescription[index],
+ &ptr,
iTotalUsage[index],
lastTimeValue,
&lastTimeDecimal,
--- a/mmappcomponents/mmmtpdataprovider/inc/mmmtpdp_variant.hrh Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/inc/mmmtpdp_variant.hrh Wed Jun 23 17:51:16 2010 +0100
@@ -25,4 +25,10 @@
// flag to enable replace the exist object
#undef MMMTPDP_REPLACE_EXIST_FILE
+// flag to enable support for non embedded album art, should be ON by default
+#define MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT
+
+// flag to enable reset of MTP PS Status flag at CloseSession
+#define MMMTPDP_RESET_STATUS_CLOSESESSION
+
#endif // MMMTPDP_VARIANT_HRH
--- a/mmappcomponents/mmmtpdataprovider/inc/mmmtpdpconfig.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/inc/mmmtpdpconfig.h Wed Jun 23 17:51:16 2010 +0100
@@ -20,23 +20,27 @@
#define MMMTPDPCONFIG_H
class CMmMtpDpMetadataAccessWrapper;
+class CPropertySettingUtility;
+class CDescriptionUtility;
class MMmMtpDpConfig
{
public:
/**
* Get supported format from special data provider
- * @param aArray The array which is used to store supported format
+ * @return The array which is used to store supported format
*/
virtual const RArray<TUint>* GetSupportedFormat() const = 0;
/**
- *
+ * Get the arry of property code which is inline with the format code
+ * @return The array of what specified format supported
*/
virtual const RArray<TUint>* GetSupportedPropertiesL( TUint32 aFormatCode ) const = 0;
/**
- *
+ * Get the array of property code what dp supported all
+ * @return The array of what dp supported
*/
virtual const RArray<TUint>* GetAllSupportedProperties() const = 0;
@@ -46,10 +50,22 @@
*/
virtual TUint32 GetDefaultStorageIdL() const = 0;
- /*
- *
+ /**
+ * Get db handler wrapper
+ * @return wrapper references
*/
virtual CMmMtpDpMetadataAccessWrapper& GetWrapperL() = 0;
+
+ /**
+ * Get the utility to setting properties
+ */
+ virtual CPropertySettingUtility* PropSettingUtility() = 0;
+
+ /**
+ * Get the utiltiy to setting descriptions
+ */
+ virtual CDescriptionUtility* DescriptionUtility() = 0;
+
};
#endif // MMMTPDPCONFIG_H
--- a/mmappcomponents/mmmtpdataprovider/inc/mmmtpdpfiledefs.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/inc/mmmtpdpfiledefs.h Wed Jun 23 17:51:16 2010 +0100
@@ -29,6 +29,7 @@
//--------------------------------------------------------------------------------------------
_LIT( KTxtExtension3GP, ".3gp" );
+_LIT( KTxtExtension3G2, ".3g2" );
_LIT( KTxtExtensionAAC, ".aac" );
_LIT( KTxtExtensionASF, ".asf" );
_LIT( KTxtExtensionM4A, ".m4a" );
@@ -41,31 +42,34 @@
_LIT( KTxtExtensionO4V, ".o4v" );
_LIT( KTxtExtensionODF, ".odf" );
+_LIT( KTxtExtensionALB, ".alb" );
_LIT( KTxtExtensionM3U, ".m3u" );
_LIT( KTxtExtensionPLA, ".pla" );
_LIT( KTxtExtensionVIR, ".vir" ); // virtual playlist from MPX
-_LIT(KFormatExtensionMP3, "0x3009:mp3");
-_LIT(KFormatExtensionWMA, "0xb901:wma");
-_LIT(KFormatExtensionMP4, "0xb982:mp4");
-_LIT(KFormatExtension3GP, "0xb984:3gp");
-_LIT(KFormatExtensionAAC, "0xb903:aac");
-_LIT(KFormatExtensionWAV, "0x3008:wav");
-_LIT(KFormatExtensionWMV, "0xb981:wmv");
-_LIT(KFormatExtensionASF, "0x300c:asf");
+_LIT(KFormatExtensionMP3, "0x3009:mp3::3");
+_LIT(KFormatExtensionWMA, "0xb901:wma::3");
+_LIT(KFormatExtensionMP4, "0xb982:mp4::3");
+_LIT(KFormatExtension3GP, "0xb984:3gp::3");
+_LIT(KFormatExtension3G2, "0xb984:3g2::3");
+_LIT(KFormatExtensionAAC, "0xb903:aac::3");
+_LIT(KFormatExtensionWAV, "0x3008:wav::3");
+_LIT(KFormatExtensionWMV, "0xb981:wmv::3");
+_LIT(KFormatExtensionASF, "0x300c:asf::3");
//ODF container
-_LIT(KFormatExtensionODFAudio3GPP, "0xB984:ODF:audio/3gpp");
-_LIT(KFormatExtensionODFAudioMP4, "0xB982:ODF:audio/mp4");
-_LIT(KFormatExtensionODFVideo3GPP, "0xB984:ODF:video/3gpp");
-_LIT(KFormatExtensionODFVideoMP4, "0xB982:ODF:video/mp4");
+_LIT(KFormatExtensionODFAudio3GPP, "0xB984:ODF:audio/3gpp:3");
+_LIT(KFormatExtensionODFVideo3GPP, "0xB984:ODF:video/3gpp:3");
-_LIT(KFormatExtensionM4A, "0xB982:m4a");
-_LIT(KFormatExtensionO4A, "0xB984:o4a");
-_LIT(KFormatExtensionO4V, "0xB984:o4v");
+_LIT(KFormatExtensionM4A, "0xB982:m4a::3");
+_LIT(KFormatExtensionO4A, "0xB984:o4a::3");
+_LIT(KFormatExtensionO4V, "0xB984:o4v::3");
+
+//Abstract Album
+_LIT(KFormatExtensionALB, "0xBA03:alb::3");
//Playlists
-_LIT(KFormatExtensionM3U, "0xba11:m3u");
+_LIT(KFormatExtensionM3U, "0xba11:m3u::3");
_LIT(KFormatExtensionPLA, "0xBA05:pla");
_LIT(KFormatExtensionVIR, "0xBA05:vir"); //abstract audio & video playlist 0xBA05
//--------------------------------------------------------------------------------------------
@@ -93,7 +97,8 @@
{
EMTPSubFormatCodeUnknown,
EMTPSubFormatCodeAudio,
- EMTPSubFormatCodeVideo
+ EMTPSubFormatCodeVideo,
+ EMTPSubFormatCodeUndefined
};
#endif // MMMTPDPFILEDEFS_H
--- a/mmappcomponents/mmmtpdataprovider/inc/mmmtpdputility.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/inc/mmmtpdputility.h Wed Jun 23 17:51:16 2010 +0100
@@ -20,12 +20,12 @@
#define MMMTPDPUTILITY_H
#include <mtp/mtpprotocolconstants.h>
+#include <mtpprivatepskeys.h>
#include "mmmtpdpfiledefs.h"
// forward declacration
-class CMTPObjectMetaData;
-class MMTPDataProviderFramework;
+class RFs;
class MmMtpDpUtility
{
@@ -45,20 +45,11 @@
static TBool HasMetadata( TUint16 aObjFormatCode );
/**
- * Utility function to decide if the file is video.
- * @param aFullFileName, the full file name
- * @return TBool for decide if the file is video
+ * Utility function to decide if there is any reference
+ * @param aObjFormatCode, object format code
+ * @return TBool for decide if there are some references
*/
- IMPORT_C static TBool IsVideoL( const TDesC& aFullFileName );
-
- /**
- * Utility function to decide if the file is video.
- * For internal use, this is fast version by querying framework DB
- * @param aFullFileName, the full file name
- * @param aFramework, the mtp framework instance pointer, default is null
- * @return TBool for decide if the file is video
- */
- static TBool IsVideoL( const TDesC& aFullFileName, const MMTPDataProviderFramework& aFramework );
+ static TBool HasReference( TUint16 aObjFormatCode );
/**
* Check the filename length to see if it exceeds Symbian 256 limit.
@@ -83,7 +74,7 @@
* @param aFullFileName, fine name
* @return TTime for specified file
*/
- static TTime GetObjectDateModifiedL( RFs& aFs, const TDesC& aFullFileName );
+ static void GetObjectDateModifiedL( RFs& aFs, const TDesC& aFullFileName, TDes& aDateModified );
/**
* Check if file is read-only, if file doesn't exist, leave
@@ -145,7 +136,7 @@
* @param aSubFormatCode, output the sub format code
* @return if success, return KErrNone, otherwise, error code
*/
- static TInt SubFormatCodeFromMime( const TDesC8& aMimeType, TMmMtpSubFormatCode& aSubFormatCode );
+ static TMmMtpSubFormatCode SubFormatCodeFromMime( const TDesC8& aMimeType );
/**
* Get DRM status
@@ -153,6 +144,34 @@
* @return return DRM status code
*/
IMPORT_C static TInt GetDrmStatus( const TDesC& aFullFileName );
+
+ /**
+ * Set MTP PS Status
+ * @param aStatus, next TMtpPSStatus
+ *
+ * newly implemented function to as enabler
+ * to provide more state transition on application (MusicPlayer/MPX) during MTP by fully utilize the 3 PSStatus:
+ *
+ * EMtpPSStatusActive, == MTP operation related Media Files is performaning
+ * EMtpPSStatusUninitialized == MTP not in use
+ * EMtpPSStatusReadyToSync == MTP is connected, but no active operation related to Media Files
+ *
+ * this CAN enable 2 new behaviors:
+ * 1. MTP status monitor is extracted out from USB Event Observer in harvester
+ * Harvester and Music player should be fully blocked if PS Status is EMtpPSStatusActive
+ * Music Player would prevent refresh/delete/add on UI level if PS Status is EMtpPSStatusReadyToSync
+ * 2. collectioncachedhelper to observed this status.
+ * when the ps status changed from EMtpPSStatusActive to EMtpPSStatusReadyToSync, it starts timer.
+ * and when it is reached, it flush all cache.
+ * the timer is canceled when ps status is back to active.
+ */
+ IMPORT_C static void SetPSStatus( TMtpPSStatus aStatus );
+
+ /**
+ * Set MTP PS Status (actually)
+ * @param aStatus, next TMtpPSStatus
+ */
+ static void DoSetPSStatus( TMtpPSStatus aStatus );
};
--- a/mmappcomponents/mmmtpdataprovider/inc/mmmtpvideodbdefs.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/inc/mmmtpvideodbdefs.h Wed Jun 23 17:51:16 2010 +0100
@@ -53,13 +53,12 @@
_LIT( KMtpVideoEncodingProfile, "EncodingProfile" );
_LIT( KMtpVideoParentalRating, "ParentalRating" );
-_LIT( KMtpVideoUseCount , "UseCount" );
_LIT( KMtpVideoDRM, "DRM" );
_LIT( KMtpVideoDeleted, "Deleted" );
// field type
-_LIT( KMtpVideoLocationType, " CHAR (255) NOT NULL" );
+_LIT( KMtpVideoLocationType, " LONG VARCHAR NOT NULL" );
_LIT( KMtpVideoNameType, " LONG VARCHAR" );
_LIT( KMtpVideoArtistType, " LONG VARCHAR" );
_LIT( KMtpVideoTrackType, " UNSIGNED SMALLINT" );
@@ -86,7 +85,6 @@
_LIT( KMtpVideoEncodingProfileType, " LONG VARCHAR" );
_LIT( KMtpVideoParentalRatingType, " LONG VARCHAR" );
-_LIT( KMtpVideoUseCountType, " UNSIGNED INTEGER" );
_LIT( KMtpVideoDRMType, " UNSIGNED SMALLINT" );
_LIT( KMtpVideoDeletedType, " BIT" );
--- a/mmappcomponents/mmmtpdataprovider/inc/tobjectdescription.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/inc/tobjectdescription.h Wed Jun 23 17:51:16 2010 +0100
@@ -23,6 +23,11 @@
// vendor extended property code
const TUint16 EMTPExtObjectPropCodeOmaDrmStatus = 0xDB01;
+const TUint32 KMTPMaxDescriptionLen = 0x00000100; // 256
+const TInt KMtpMaxStringLength = 255;
+const TInt KMtpMaxDateTimeStringLength = 15;
+_LIT( KMtpDateTimeFormat, "%F%Y%M%DT%H%T%S" );
+
struct TObjectDescription
{
@@ -32,7 +37,8 @@
enum TGroupCodeType
{
- EGroupCodeGeneral = 0x00000001,
+ EGroupCodeGeneral = 0x00000001,
+ EGroupCodeSample = 0x00000100,
EGroupCodeMediaDB = 0x00FF0000,
EGroupCodeNotDefined = 0xFFFFFFFF // TODO: need to reconsider
};
@@ -40,59 +46,70 @@
static const TGroupCodeType KSupportedGroupCode[] =
{
EGroupCodeGeneral,
+ EGroupCodeSample,
EGroupCodeMediaDB
};
static const TObjectDescription KPropGroupMapTable[] =
{
- // First group, mandatory for all
- { EMTPObjectPropCodeStorageID, EGroupCodeGeneral },
- { EMTPObjectPropCodeObjectFormat, EGroupCodeGeneral },
+ // The first group, mandatory for all
+ { EMTPObjectPropCodeStorageID, EGroupCodeGeneral },
+ { EMTPObjectPropCodeObjectFormat, EGroupCodeGeneral },
{ EMTPObjectPropCodeProtectionStatus, EGroupCodeGeneral },
- { EMTPObjectPropCodeObjectSize, EGroupCodeGeneral },
- { EMTPObjectPropCodeObjectFileName, EGroupCodeGeneral },
- { EMTPObjectPropCodeParentObject, EGroupCodeGeneral },
+ { EMTPObjectPropCodeObjectSize, EGroupCodeGeneral },
+ { EMTPObjectPropCodeObjectFileName, EGroupCodeGeneral },
+ { EMTPObjectPropCodeParentObject, EGroupCodeGeneral },
{ EMTPObjectPropCodePersistentUniqueObjectIdentifier,
- EGroupCodeGeneral },
- { EMTPObjectPropCodeNonConsumable, EGroupCodeGeneral },
+ EGroupCodeGeneral },
+ { EMTPObjectPropCodeNonConsumable, EGroupCodeGeneral },
- // First group, addtional for all
- { EMTPObjectPropCodeDateCreated, EGroupCodeGeneral },
- { EMTPObjectPropCodeDateModified, EGroupCodeGeneral },
+ // The first group, addtional for all
+ { EMTPObjectPropCodeName, EGroupCodeGeneral }, // only for winlogo
+ { EMTPObjectPropCodeDateCreated, EGroupCodeGeneral },
+ { EMTPObjectPropCodeDateModified, EGroupCodeGeneral },
- // Second group, additional for all
- { EMTPObjectPropCodeName, EGroupCodeMediaDB },
- { EMTPObjectPropCodeDateAdded, EGroupCodeMediaDB },
+ // The first group, mandatory for video
+ { EMTPObjectPropCodeWidth, EGroupCodeGeneral }, // only for winlogo
+ { EMTPObjectPropCodeHeight, EGroupCodeGeneral }, // only for winlogo
- // Second group, mandatory for audio
- { EMTPObjectPropCodeArtist, EGroupCodeMediaDB },
- { EMTPObjectPropCodeTrack, EGroupCodeMediaDB },
- { EMTPObjectPropCodeGenre, EGroupCodeMediaDB },
- { EMTPObjectPropCodeAlbumName, EGroupCodeMediaDB },
- { EMTPObjectPropCodeSampleRate, EGroupCodeMediaDB },
+ // The second group, for non-embedded album art
+ { EMTPObjectPropCodeRepresentativeSampleFormat, EGroupCodeGeneral }, // changed for winlogo
+ { EMTPObjectPropCodeRepresentativeSampleSize, EGroupCodeGeneral }, // changed for winlogo
+ { EMTPObjectPropCodeRepresentativeSampleHeight, EGroupCodeGeneral }, // changed for winlogo
+ { EMTPObjectPropCodeRepresentativeSampleWidth, EGroupCodeGeneral }, // changed for winlogo
+ { EMTPObjectPropCodeRepresentativeSampleData, EGroupCodeGeneral }, // changed for winlogo
+
+ // The third group, additional for all
+ { EMTPObjectPropCodeDateAdded, EGroupCodeMediaDB },
+
+ // The third group, mandatory for audio
+ { EMTPObjectPropCodeArtist, EGroupCodeMediaDB },
+ { EMTPObjectPropCodeTrack, EGroupCodeMediaDB },
+ { EMTPObjectPropCodeGenre, EGroupCodeMediaDB },
+ { EMTPObjectPropCodeAlbumName, EGroupCodeMediaDB },
+ { EMTPObjectPropCodeSampleRate, EGroupCodeMediaDB },
{ EMTPObjectPropCodeNumberOfChannels, EGroupCodeMediaDB },
- { EMTPObjectPropCodeAudioWAVECodec, EGroupCodeMediaDB },
- { EMTPObjectPropCodeAudioBitRate, EGroupCodeMediaDB },
- { EMTPObjectPropCodeDuration, EGroupCodeMediaDB },
+ { EMTPObjectPropCodeAudioWAVECodec, EGroupCodeMediaDB },
+ { EMTPObjectPropCodeAudioBitRate, EGroupCodeMediaDB },
+ { EMTPObjectPropCodeDuration, EGroupCodeMediaDB },
{ EMTPObjectPropCodeOriginalReleaseDate, EGroupCodeMediaDB },
- { EMTPObjectPropCodeDescription, EGroupCodeMediaDB },
- { EMTPObjectPropCodeComposer, EGroupCodeMediaDB },
+ { EMTPObjectPropCodeDescription, EGroupCodeMediaDB },
+ { EMTPObjectPropCodeComposer, EGroupCodeMediaDB },
+ { EMTPObjectPropCodeAlbumArtist, EGroupCodeMediaDB },
- // Second group, mandatory for video
- { EMTPObjectPropCodeWidth, EGroupCodeMediaDB },
- { EMTPObjectPropCodeHeight, EGroupCodeMediaDB },
- { EMTPObjectPropCodeUseCount, EGroupCodeMediaDB },
- { EMTPObjectPropCodeScanType, EGroupCodeMediaDB },
+ // The third group, mandatory for video
+ { EMTPObjectPropCodeScanType, EGroupCodeMediaDB },
{ EMTPObjectPropCodeVideoFourCCCodec, EGroupCodeMediaDB },
- { EMTPObjectPropCodeVideoBitRate, EGroupCodeMediaDB },
+ { EMTPObjectPropCodeVideoBitRate, EGroupCodeMediaDB },
{ EMTPObjectPropCodeFramesPerThousandSeconds, EGroupCodeMediaDB },
{ EMTPObjectPropCodeKeyFrameDistance, EGroupCodeMediaDB },
- { EMTPObjectPropCodeEncodingProfile, EGroupCodeMediaDB },
+ { EMTPObjectPropCodeEncodingProfile, EGroupCodeMediaDB },
- // Second group, additional for video
- { EMTPObjectPropCodeParentalRating, EGroupCodeMediaDB },
- { EMTPObjectPropCodeDRMStatus, EGroupCodeMediaDB },
- { EMTPExtObjectPropCodeOmaDrmStatus, EGroupCodeMediaDB }
+ // The third group, additional for video
+ { EMTPObjectPropCodeParentalRating, EGroupCodeMediaDB },
+ { EMTPObjectPropCodeDRMStatus, EGroupCodeMediaDB },
+ { EMTPExtObjectPropCodeOmaDrmStatus, EGroupCodeMediaDB }
};
#endif // TOBJECTDESCRIPTION_H
+
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/mmmtpdpplugins/abstractmediamtpdataprovider/data/abstractmediamtpdataprovider_config.rss Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/data/abstractmediamtpdataprovider_config.rss Wed Jun 23 17:51:16 2010 +0100
@@ -11,13 +11,12 @@
*
* Contributors:
*
-* Description: DP configuration information for abstract media dp on armv5 platform
+* Description: DP configuration information for abstract media dp
*
*/
#include <mtp/mtpdataproviderconfig.rh>
-#include "abstractmediamtpdataprovider_config.rh"
RESOURCE MTP_DATA_PROVIDER dpConfig
{
@@ -27,14 +26,6 @@
supported_modes = KMTPModeMTP;
server_name = "";
server_image_name = "";
- opaque_resource = "folderConfig";
+ opaque_resource = 0;
enumeration_phase = 12;
}
-
-RESOURCE ABSTRACTMEDIAMTPDATAPROVIDER_CONFIG folderConfig
- {
- abstractmedia_drive = 4;
- }
-
-
-
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/group/abstractmediamtpdataprovider.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/group/abstractmediamtpdataprovider.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -40,19 +40,15 @@
SOURCE abstractmediamtpdataprovidercontrollerimp.cpp
SOURCE abstractmediamtpdataproviderprocessor.cpp
SOURCE cabstractmediamtpdataproviderenumerator.cpp
-SOURCE cabstractmediamtpdataprovidergetobjectpropdesc.cpp
-SOURCE cabstractmediamtpdataprovidergetinterdependentpropdesc.cpp
SOURCE cabstractmediamtpdataprovidergetobjectpropvalue.cpp
SOURCE cabstractmediamtpdataprovidergetobjectproplist.cpp
SOURCE cabstractmediamtpdataprovidersetobjectpropvalue.cpp
-SOURCE cabstractmediamtpdataprovidersetobjectproplist.cpp
-SOURCE cabstractmediamtpdataprovidersetobjectreferences.cpp
SOURCE cabstractmediamtpdataproviderabstractmediapreference.cpp
SOURCE cabstractmediamtpdataprovidercopyobject.cpp
SOURCE cabstractmediamtpdataprovidermoveobject.cpp
SOURCE cabstractmediamtpdataproviderrenameobject.cpp
-SOURCE cabstractmediamtpdataprovidersendobject.cpp
-SOURCE cabstractmediamtpdataprovidergetformatcapabilities.cpp
+SOURCE cabstractmediamtpdataproviderpropertysettingutility.cpp
+SOURCE cabstractmediamtpdataproviderdescriptionutility.cpp
SOURCEPATH ../data
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/abstractmediamtpdataprovider_config.rh Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* 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: Resource headers for project abstractmediadp
-*
-*/
-
-
-#ifndef ABSTRACTMEDIAMTPDATAPROVIDER_RH
-#define ABSTRACTMEDIAMTPDATAPROVIDER_RH
-
-// --------------------------------------------------------------------
-// Defines the resource type for abstractmedia dp specific configuration data
-// --------------------------------------------------------------------
-//
-STRUCT ABSTRACTMEDIAMTPDATAPROVIDER_CONFIG
- {
- LONG abstractmedia_drive; // Symbian drive number @see TDrive
- LTEXT abstractmedia_folder_root;
- LTEXT folder_exclusion_list[]; // What to exclude
- }
-
-#endif // ABSTRACTMEDIAMTPDATAPROVIDER_RH
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/abstractmediamtpdataproviderconst.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/abstractmediamtpdataproviderconst.h Wed Jun 23 17:51:16 2010 +0100
@@ -11,15 +11,42 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
-
#ifndef ABSTRACTMEDIAMTPDATAPROVIDERCONST_H
#define ABSTRACTMEDIAMTPDATAPROVIDERCONST_H
#include <mtp/mtpprotocolconstants.h>
+#include "mmmtpdp_variant.hrh"
+
+enum TMmMtpSampleSizeRange
+ {
+ EMTPMinSampleSize = 0x00000001, // 1 bytes
+ EMTPMaxSampleSize = 0x00010000, // 64 kb
+ EMTPStepSampleSize = 0x00000001 // 1 byte
+ };
+
+enum TMmMtpSampleHeightRange
+ {
+ EMTPSampleMinHeight = 0x00000001, // 1 pixel
+ EMTPSampleMaxHeight = 0x00000168, // 360 pixel
+ EMTPSampleStepHeight = 0x00000001 // 1 pixel
+ };
+
+enum TMmMtpSampleWidthRange
+ {
+ EMTPSampleMinWidth = 0x00000001, // 1 pixel
+ EMTPSampleMaxWidth = 0x00000168, // 360 pixel
+ EMTPSampleStepWidth = 0x00000001 // 1 pixel
+ };
+
+// Supported sample format
+static const TUint16 TMmMtpSupportedSampleFormat[] =
+ {
+ EMTPFormatCodeEXIFJPEG
+ };
const TUint16 EMTPExtOpCodeAbstractMediaPreference = 0x9203;
@@ -28,6 +55,9 @@
*/
static const TUint16 KAbstractMediaMtpDataProviderSupportedFormats[] =
{
+#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT
+ EMTPFormatCodeAbstractAudioAlbum,
+#endif
EMTPFormatCodeM3UPlaylist,
EMTPFormatCodeAbstractAudioVideoPlaylist
};
@@ -55,39 +85,25 @@
EMTPOpCodeGetObjectPropList,
EMTPOpCodeSetObjectPropList,
EMTPOpCodeGetInterdependentPropDesc,
-
+
EMTPExtOpCodeAbstractMediaPreference, // 0x9203
-
+
EMTPOpCodeCopyObject,
EMTPOpCodeMoveObject,
-
- EMTPOpCodeSendObjectPropList,
+
+ EMTPOpCodeSendObjectPropList,
EMTPOpCodeGetFormatCapabilities
};
-#if 0
-/**
-* define all the object properties that are supported by the abstract media data provider
-*/
-static const TUint16 KAbstractMediaMtpDataProviderSupportedProperties[] =
+// Mandatory properties for ALB
+static const TUint16 KMmMtpDpSupportedPropMandatoryALB[] =
{
- // Mandatory for all objects
- EMTPObjectPropCodeStorageID,
- EMTPObjectPropCodeObjectFormat,
- EMTPObjectPropCodeProtectionStatus,
- EMTPObjectPropCodeObjectSize,
- EMTPObjectPropCodeObjectFileName,
- EMTPObjectPropCodeParentObject,
- EMTPObjectPropCodePersistentUniqueObjectIdentifier,
- EMTPObjectPropCodeName,
- EMTPObjectPropCodeNonConsumable,
-
- // additional for all
- EMTPObjectPropCodeDateAdded,
- EMTPObjectPropCodeDateCreated,
- EMTPObjectPropCodeDateModified,
+ EMTPObjectPropCodeRepresentativeSampleFormat,
+ EMTPObjectPropCodeRepresentativeSampleSize,
+ EMTPObjectPropCodeRepresentativeSampleHeight,
+ EMTPObjectPropCodeRepresentativeSampleWidth,
+ EMTPObjectPropCodeRepresentativeSampleData,
+ EMTPObjectPropCodeAlbumArtist
};
-#endif
-
#endif // ABSTRACTMEDIAMTPDATAPROVIDERCONST_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/abstractmediamtpdataproviderprocessor.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/abstractmediamtpdataproviderprocessor.h Wed Jun 23 17:51:16 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
@@ -22,7 +22,6 @@
// class forward
class MMTPConnection;
class TMTPTypeRequest;
-class MMTPDataProviderFramework;
class MMmRequestProcessor;
class MMmMtpDpConfig;
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovider.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovider.h Wed Jun 23 17:51:16 2010 +0100
@@ -24,7 +24,7 @@
#include "abstractmediamtpdataproviderprocessor.h"
#include "mmmtpenumerationcallback.h"
#include "mmmtpdpconfig.h"
-
+#include "mmmtpdp_variant.hrh"
// Forward declaration
class MMmRequestProcessor;
@@ -66,10 +66,21 @@
TUint32 GetDefaultStorageIdL() const;
/**
- * @return the reference of CMmMtpDpMetadataAccessWrapper to enumerator
+ * Get db handler wrapper
+ * @return wrapper references
*/
CMmMtpDpMetadataAccessWrapper& GetWrapperL();
+ /**
+ * @return The utility to setting properties
+ */
+ CPropertySettingUtility* PropSettingUtility();
+
+ /**
+ * @return The utiltiy to setting descriptions
+ */
+ CDescriptionUtility* DescriptionUtility();
+
protected:
// from CMTPDataProviderPlugin
void Cancel();
@@ -97,7 +108,7 @@
/**
* Notify the data provider that the session has been closed
- * @param aConnection The connection of the sesssion
+ * @param aSession The connection of the sesssion
*/
void SessionClosedL( const TMTPNotificationParamsSessionChange& aSession );
@@ -168,6 +179,8 @@
void GetSupportedPropertiesL();
+ void GetAllSupportedPropL();
+
private:
// data
RPointerArray<MMmRequestProcessor> iActiveProcessors;
@@ -175,13 +188,21 @@
RArray<TUint32> iPendingEnumerations;
TInt iActiveProcessor;
+ TBool iActiveProcessorRemoved;
CAbstractMediaMtpDataProviderRenameObject *iRenameObject;
TBool iIsSessionOpen;
RArray<TUint> iSupportedFormat;
- RArray<TUint> iSupportedProperties;
+#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT
+ RArray<TUint> iSupportedPropAbstractAlbum;
+#endif
+ RArray<TUint> iSupportedPropPlaylist;
+ RArray<TUint> iSupportedPropAll;
+
+ CPropertySettingUtility* iPropSettingUtility;
+ CDescriptionUtility* iDescriptionUtility;
};
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataproviderabstractmediapreference.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataproviderabstractmediapreference.h Wed Jun 23 17:51:16 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovidercopyobject.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovidercopyobject.h Wed Jun 23 17:51:16 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
@@ -65,10 +65,6 @@
TUint32 aHandle,
const CMTPObjectMetaData& aObject );
- TMTPResponseCode ServiceSetSpecificObjectPropertyL( TUint16 aPropCode,
- const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement );
-
};
#endif // CABSTRACTMEDIAMTPDATAPROVIDERCOPYOBJECT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataproviderdescriptionutility.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,87 @@
+/*
+* 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: Abstract media dp specific property description construction utility.
+* Used by all request processors which related to property description
+*
+*/
+
+#ifndef CABSTRACTMEDIAMTPDATAPROVIDERDESCRIPTIONUTILITY_H
+#define CABSTRACTMEDIAMTPDATAPROVIDERDESCRIPTIONUTILITY_H
+
+#include "cdescriptionutility.h"
+
+class CMTPTypeInterdependentPropDesc;
+class CMTPTypeObjectPropDesc;
+
+class CAbstractMediaMtpDataProviderDescriptionUtility : public CDescriptionUtility
+ {
+public:
+ static CAbstractMediaMtpDataProviderDescriptionUtility* NewL();
+
+ ~CAbstractMediaMtpDataProviderDescriptionUtility();
+
+private:
+ CAbstractMediaMtpDataProviderDescriptionUtility();
+
+public:
+ /**
+ * Construct media dp specific interdependent property description.
+ * according to assigned format code.
+ * @param aFormatCode
+ * @return Interdependent property description dataset.
+ */
+ CMTPTypeInterdependentPropDesc* NewInterdepentPropDescL( MMmMtpDpConfig& aDpConfig, TUint aFormatCode );
+
+ /**
+ * Construct media dp specific property description
+ * according to assigned format code and property code.
+ * @param aFormatCode
+ * @param aPropCode
+ * @return Property description dataset.
+ */
+ CMTPTypeObjectPropDesc* NewSpecificPropDescL( TUint aFormatCode, TUint16 aPropCode );
+
+private:
+ /**
+ * Construct property description of SampleFormat.
+ * @return Property description dataset of sample format.
+ */
+ CMTPTypeObjectPropDesc* NewRepresentativeSampleFormatL();
+
+ /**
+ * Construct property description of SampleSize.
+ * @return Property description dataset of sample size.
+ */
+ CMTPTypeObjectPropDesc* NewRepresentativeSampleSizeL();
+
+ /**
+ * Construct property description of SampleHeight.
+ * @return Property description dataset of sample height.
+ */
+ CMTPTypeObjectPropDesc* NewRepresentativeSampleHeightL();
+
+ /**
+ * Construct property description of SampleWidth.
+ * @return Property description dataset of sample width.
+ */
+ CMTPTypeObjectPropDesc* NewRepresentativeSampleWidthL();
+
+ /**
+ * Construct property description of SampleData.
+ * @return Property description dataset of sample data.
+ */
+ CMTPTypeObjectPropDesc* NewRepresentativeSampleDataL();
+ };
+
+#endif // CABSTRACTMEDIAMTPDATAPROVIDERDESCRIPTIONUTILITY_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataproviderenumerator.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataproviderenumerator.h Wed Jun 23 17:51:16 2010 +0100
@@ -20,26 +20,14 @@
#define CABSTRACTMEDIAMTPDATAPROVIDERENUMERATOR_H
#include <e32base.h>
-#include <d32dbms.h>
#include "mmmtpenumerationcallback.h"
#include "cmmmtpdpperflog.h"
-// keep here to avoid warning on urel
-_LIT( KMpxGetAllPlaylist, "MpxGetAllPlaylist" );
-_LIT( KMpxGetPlaylistName, "MpxGetPlaylistName" );
-_LIT( KMpxQueryPlaylistReference, "MpxQueryPlaylistReference" );
-_LIT( KObjectManagerObjectUid, "ObjectManagerObjectUid" );
-_LIT( KObjectManagerInsert, "ObjectManagerInsert" );
-_LIT( KObjectManagerHandle, "ObjectManagerHandle" );
-_LIT( KReferenceManagerSetReference, "ReferenceManagerSetReference" );
-
// Forward declarations
class MMTPDataProviderFramework;
class MMTPObjectMgr;
class CAbstractMediaMtpDataProvider;
-class CMTPObjectMetaData;
-class CMmMtpDpMetadataAccessWrapper;
class CMPXMediaArray;
/**
@@ -83,6 +71,15 @@
TInt RunError( TInt aError );
private:
+
+ enum TEnumState
+ {
+ EEnumNone,
+ EEnumPlaylist,
+ EEnumAbstractAlbum,
+ EEnumCount
+ };
+
/**
* Standard C++ Constructor
* @param aFramework Reference to MMTPDataProviderFramework
@@ -99,11 +96,7 @@
void SignalCompleteL( MMTPEnumerationCallback& aCallback,
TInt aError = KErrNone );
- void ScanStorageL( TUint32 aStorageId );
-
- /**
- * Scan next storage
- */
+ void InitStorageL( );
void ScanNextL();
/**
@@ -111,13 +104,12 @@
* @param aPath current scanned file path
*/
void AddEntryL( const TDesC& aSuid );
-
+
/**
- * Add references of specified abstract media into reference db
- * @param aAbstractMediaName, specify the abstract media of which references should be added into db
- * @param aReferences, suid array which stored references
+ * reset Object's format sub code in object manager
*/
- void AddReferencesL( const TDesC& aAbstractMediaName, CDesCArray& aReferences );
+ void ResetObjectFormatSubCodeL( TUint32 aStorageId );
+
private:
// Owned
@@ -133,17 +125,16 @@
/** Provides Callback mechanism for completion of enumeration*/
CAbstractMediaMtpDataProvider& iDataProvider;
- TParse iPath;
- TEntryArray iEntries;
- TInt iFirstUnprocessed;
RArray<TUint> iStorages;
TUint32 iStorageId;
- TUint32 iParentHandle;
- CMPXMediaArray* iAbstractMedias;
+ CDesCArray* iAbstractMedias;
TInt iCount;
TInt iCurrentIndex;
-
+ TInt iEnumState;
+
+ TInt iResetCount;
+
#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
CMmMtpDpPerfLog* iPerfLog;
#endif
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovidergetformatcapabilities.h Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* 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 CABSTRACTMEDIAMTPDATAPROVIDERGETFORMATCAPABILITIES_H
-#define CABSTRACTMEDIAMTPDATAPROVIDERGETFORMATCAPABILITIES_H
-
-#include "cgetformatcapabilities.h"
-
-// forward declaration
-class MMmMtpDpConfig;
-class CMTPTypeObjectPropDesc;
-class CMTPTypeInterdependentPropDesc;
-class CMTPTypeObjectPropDesc;
-class CMTPTypeString;
-class CGetFormatCapabilities;
-
-/**
-* Defines abstract media data provider GetFormatCapabilities
-*/
-class CAbstractMediaMtpDataProviderGetFormatCapabilities : public CGetFormatCapabilities
- {
-public:
-
- /**
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- * @return A pointer to the created request processor object
- */
- static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
-/* *
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- * @return A pointer to the created request processor object
-
- static MMmRequestProcessor* NewLC( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );*/
-
- /**
- * Destructor
- */
- ~CAbstractMediaMtpDataProviderGetFormatCapabilities();
-
-protected:
- // from CGetFormatCapabilities, override from baseclass
-
- /**
- * Service specific object property
- * @param aPropCode, The prop code
- * @return MTPType object propdesc
- */
- CMTPTypeObjectPropDesc* ServiceSpecificPropertyDescL( TUint16 aPropCode );
-
- /**
- * Service interdepent propdesc
- * @param aFormatCode, The format code
- * @return MTPTypeInterdependentPropDesc
- */
- void ServiceInterdepentPropDescL();
-
-private:
-
- /**
- * Standard C++ Constructor
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- */
- CAbstractMediaMtpDataProviderGetFormatCapabilities( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * two-phase construction
- */
- void ConstructL();
- };
-
-#endif // CAbstractMediaMTPDATAPROVIDERGETFORMATCAPABILITIES_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovidergetinterdependentpropdesc.h Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* 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 CABSTRACTMEDIAMTPDATAPROVIDERGETINTERDEPENTENTPROPDESC_H
-#define CABSTRACTMEDIAMTPDATAPROVIDERGETINTERDEPENTENTPROPDESC_H
-
-#include "crequestprocessor.h"
-
-class CMTPTypeInterdependentPropDesc;
-class MMmMtpDpConfig;
-
-/**
-* Defines abstract media data provider GetInterdependentPropDesc request processor
-*/
-class CAbstractMediaMtpDataProviderGetInterdependentPropDesc: public CRequestProcessor
- {
-public:
- /**
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- * @return A pointer to the created request processor object
- */
- static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * Destructor
- */
- ~CAbstractMediaMtpDataProviderGetInterdependentPropDesc();
-
-private:
- /**
- * Standard C++ Constructor
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- */
- CAbstractMediaMtpDataProviderGetInterdependentPropDesc( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection );
-
- /**
- * two-phase construction
- */
- void ConstructL();
-
-protected:
- // from CRequestProcessor
- TMTPResponseCode CheckRequestL();
-
- void ServiceL();
-
-private:
- void ServiceAudioWaveCodecL();
-
- void ServiceAudioBitrateL();
-
- void SetFormForResponseL( TUint16 aPropertyCode, const MMTPType& aForm );
-
-private:
- /** Dataset to store the prop descriptions*/
- CMTPTypeInterdependentPropDesc* iDataset;
-
- TUint32 iFormatCode;
-
- };
-
-#endif // CABSTRACTMEDIAMTPDATAPROVIDERGETINTERDEPENTENTPROPDESC_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovidergetobjectpropdesc.h Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* 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 CABSTRACTMEDIAMTPDATAPROVIDERGETOBJECTPROPDESC_H
-#define CABSTRACTMEDIAMTPDATAPROVIDERGETOBJECTPROPDESC_H
-
-#include "cgetobjectpropdesc.h"
-
-/**
-* Defines abstract media data provider GetObjectPropDesc request processor
-*/
-class CAbstractMediaMtpDataProviderGetObjectPropDesc: public CGetObjectPropDesc
- {
-public:
-
- /**
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- * @return A pointer to the created request processor object
- */
- static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * Destructor
- */
- ~CAbstractMediaMtpDataProviderGetObjectPropDesc();
-
-private:
- /**
- * Standard C++ Constructor
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- */
- CAbstractMediaMtpDataProviderGetObjectPropDesc( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * second-phase construction
- */
- void ConstructL();
-
-protected:
- // from CGetObjectPropDesc
- void ServiceSpecificObjectPropertyL( TUint16 aPropCode );
-
- };
-
-#endif // CABSTRACTMEDIAMTPDATAPROVIDERGETOBJECTPROPDESC_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovidermoveobject.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovidermoveobject.h Wed Jun 23 17:51:16 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
@@ -67,10 +67,6 @@
TUint32 aHandle,
const CMTPObjectMetaData& aObject );
- TMTPResponseCode ServiceSetSpecificObjectPropertyL( TUint16 aPropCode,
- const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement );
-
};
#endif // CABSTRACTMEDIAMTPDATAPROVIDERMOVEOBJECT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataproviderpropertysettingutility.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,60 @@
+/*
+ * 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 CABSTRACTMEDIAMTPDATAPROVIDERPROPERTYSETTINGUTILITY_H
+#define CABSTRACTMEDIAMTPDATAPROVIDERPROPERTYSETTINGUTILITY_H
+
+#include "cpropertysettingutility.h"
+
+/**
+* Defines media data provider SetObjectPropsList request processor
+*/
+class CAbstractMediaMtpDataProviderPropertySettingUtility: public CPropertySettingUtility
+ {
+public:
+ /**
+ * @param aFramework, The data provider framework
+ * @param aConnection, The connection from which the request comes
+ * @param aWrapper Medadata access
+ * @return A pointer to the created request processor object
+ */
+ static CAbstractMediaMtpDataProviderPropertySettingUtility* NewL();
+
+ /**
+ * Destructor
+ */
+ ~CAbstractMediaMtpDataProviderPropertySettingUtility();
+
+private:
+ /**
+ * Standard C++ Constructor
+ * @param aFramework, The data provider framework
+ * @param aConnection, The connection from which the request comes
+ * @param aWrapper Medadata access
+ */
+ CAbstractMediaMtpDataProviderPropertySettingUtility();
+
+protected:
+ TMTPResponseCode SetSpecificObjectPropertyL( MMmMtpDpConfig& aDpConfig,
+ TUint16 aPropCode,
+ const CMTPObjectMetaData& aObject,
+ const CMTPTypeObjectPropListElement& aElement );
+
+ };
+
+#endif // CABSTRACTMEDIAMTPDATAPROVIDERPROPERTYSETTINGUTILITY_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovidersendobject.h Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* 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 CABSTRACTMEDIAMTPDATAPROVIDERSENDOBJECT_H_
-#define CABSTRACTMEDIAMTPDATAPROVIDERSENDOBJECT_H_
-
-#include "csendobject.h"
-
-/**
-* Defines media data provider SetObjectPropsList request processor
-*/
-class CAbstractMediaMtpDataProviderSendObject: public CSendObject
- {
-public:
- /**
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- * @return A pointer to the created request processor object
- */
- static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * Destructor
- */
- ~CAbstractMediaMtpDataProviderSendObject();
-
-private:
- /**
- * Standard C++ Constructor
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- */
- CAbstractMediaMtpDataProviderSendObject( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * 2nd Phase Constructor
- */
- void ConstructL();
-
-protected:
- // from CSendObjectInfo
- TMTPResponseCode SetSpecificObjectPropertyL( TUint16 aPropCode,
- const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement );
-
- TMTPResponseCode CheckSepecificPropType( TUint16 aPropCode, TUint16 aDataType );
-
- TInt HandleSpecificWrapperError(TInt aError,
- const CMTPObjectMetaData& aObject);
-
- };
-
-#endif /*CABSTRACTMEDIAMTPDATAPROVIDERSENDOBJECT_H_*/
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovidersetobjectproplist.h Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* 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 CABSTRACTMEDIAMTPDATAPROVIDERSETOBJECTPROPLIST_H
-#define CABSTRACTMEDIAMTPDATAPROVIDERSETOBJECTPROPLIST_H
-
-#include "csetobjectproplist.h"
-
-class MMmMtpDpConfig;
-
-/**
-* Defines abstract media data provider SetObjectPropList request processor
-*/
-class CAbstractMediaMtpDataProviderSetObjectPropList : public CSetObjectPropList
- {
-public:
- /**
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- * @return A pointer to the created request processor object
- */
- static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * Destructor
- */
- ~CAbstractMediaMtpDataProviderSetObjectPropList();
-
-private:
- /**
- * Standard C++ Constructor
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- */
- CAbstractMediaMtpDataProviderSetObjectPropList( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * 2nd Phase Constructor
- */
- void ConstructL();
-
-protected:
- // from CSetObjectPropList
- TMTPResponseCode ServiceSpecificObjectPropertyL( TUint16 aPropCode,
- const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement );
-
- TInt HandleSpecificWrapperError( TInt aError,
- const CMTPObjectMetaData& aObject);
-
- };
-
-#endif // CABSTRACTMEDIAMTPDATAPROVIDERSETOBJECTPROPLIST_H
-
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/inc/cabstractmediamtpdataprovidersetobjectreferences.h Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* 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: Set object references operation.
-*
-*/
-
-
-#ifndef CABSTRACTMEDIAMTPDATAPROVIDERSETOBJECTREFERENCES_H
-#define CABSTRACTMEDIAMTPDATAPROVIDERSETOBJECTREFERENCES_H
-
-#include "csetobjectreferences.h"
-
-/**
-* Defines abstract media data provider SetObjectReferences request processor
-*/
-class CAbstractMediaMtpDataProviderSetObjectReferences : public CSetObjectReferences
- {
-public:
- /**
- * Two-phase construction method
- * @param aFramework The data provider framework
- * @param aConnection The connection from which the request comes
- * @param aWrapper medadata access interface
- * @return a pointer to the created request processor object
- */
- static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * Destructor
- */
- ~CAbstractMediaMtpDataProviderSetObjectReferences();
-
-private:
- /**
- * Standard c++ constructor
- * @param aFramework The data provider framework
- * @param aConnection The connection from which the request comes
- * @param aWrapper medadata access interface
- */
- CAbstractMediaMtpDataProviderSetObjectReferences( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * two-phase construction
- */
- void ConstructL();
-
-protected:
- // from CSetObjectPropValue
- /**
- * set references to DB
- * @param aWrapper medadata access interface
- * @param aObjectFormat the format of the file
- * @param aSrcFileName file name, from
- * @param aRefFileArray the array of file names, to
- */
- void DoSetObjectReferencesL( CMmMtpDpMetadataAccessWrapper& aWrapper,
- TUint16 aObjectFormat,
- const TDesC& aSrcFileName,
- CDesCArray& aRefFileArray );
-
- };
-
-#endif // CABSTRACTMEDIAMTPDATAPROVIDERSETOBJECTREFERENCES_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/abstractmediamtpdataprovidercontrollerimp.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/abstractmediamtpdataprovidercontrollerimp.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -26,15 +26,14 @@
//
static const TImplementationProxy ImplementationTable[] =
{
- {{0x10207C53}, (TProxyNewLPtr) ( CAbstractMediaMtpDataProvider::NewL )}
+ { { 0x10207C53 }, ( TProxyNewLPtr ) ( CAbstractMediaMtpDataProvider::NewL ) }
};
// -----------------------------------------------------------------------------
// ECOM entry point
// -----------------------------------------------------------------------------
//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
- TInt& aTableCount )
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
{
aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy );
return ImplementationTable;
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/abstractmediamtpdataproviderprocessor.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/abstractmediamtpdataproviderprocessor.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -28,49 +28,48 @@
#include "abstractmediamtpdataproviderconst.h"
#include "cgetobjectpropssupported.h"
-#include "cabstractmediamtpdataprovidergetobjectpropdesc.h"
-#include "cabstractmediamtpdataprovidergetinterdependentpropdesc.h"
+#include "cgetobjectpropdesc.h"
+#include "cgetinterdependentpropdesc.h"
#include "cgetobject.h"
#include "cgetobjectinfo.h"
-#include "cabstractmediamtpdataprovidersendobject.h"
+#include "csendobject.h"
#include "cabstractmediamtpdataprovidergetobjectpropvalue.h"
#include "cabstractmediamtpdataprovidergetobjectproplist.h"
#include "cabstractmediamtpdataprovidersetobjectpropvalue.h"
-#include "cabstractmediamtpdataprovidersetobjectproplist.h"
+#include "csetobjectproplist.h"
#include "cgetobjectreferences.h"
-#include "cabstractmediamtpdataprovidersetobjectreferences.h"
+#include "csetobjectreferences.h"
#include "cdeleteobject.h"
#include "cabstractmediamtpdataprovidercopyobject.h"
#include "cabstractmediamtpdataprovidermoveobject.h"
#include "cgetpartialobject.h"
#include "cabstractmediamtpdataproviderabstractmediapreference.h"
-#include "cabstractmediamtpdataprovidergetformatcapabilities.h"
+#include "cgetformatcapabilities.h"
/** A mapping table from the operation code to the request processor factory method */
const TAbstractMediaMtpDataProviderRequestProcessorEntry KAbstractMediaMtpDataProviderRequestProcessorTable[] =
{
- {EMTPOpCodeGetObjectPropsSupported, CGetObjectPropsSupported::NewL}, //Get Supported Props
- {EMTPOpCodeGetObjectPropDesc, CAbstractMediaMtpDataProviderGetObjectPropDesc::NewL}, //Get Props Description
- {EMTPOpCodeGetInterdependentPropDesc, CAbstractMediaMtpDataProviderGetInterdependentPropDesc::NewL},
- {EMTPOpCodeGetObjectInfo, CGetObjectInfo::NewL}, //GetObjectInfo
- {EMTPOpCodeGetObject, CGetObject::NewL}, //GetObject
- {EMTPOpCodeGetObjectPropValue, CAbstractMediaMtpDataProviderGetObjectPropValue::NewL},
- {EMTPOpCodeGetObjectPropList, CAbstractMediaMtpDataProviderGetObjectPropList::NewL}, //GetObjectPropList
- {EMTPOpCodeSendObjectInfo, CAbstractMediaMtpDataProviderSendObject::NewL}, //SendObjectInfo (routed to SendObject)
- {EMTPOpCodeSendObject, CAbstractMediaMtpDataProviderSendObject::NewL}, //SendObject
- {EMTPOpCodeSendObjectPropList, CAbstractMediaMtpDataProviderSendObject::NewL}, // SendobjectPropList (routed to SendObject)
- {EMTPOpCodeSetObjectPropValue, CAbstractMediaMtpDataProviderSetObjectPropValue::NewL},
- {EMTPOpCodeSetObjectPropList, CAbstractMediaMtpDataProviderSetObjectPropList::NewL}, //SetObjectPropList
- {EMTPOpCodeGetObjectReferences, CGetObjectReferences::NewL}, //Get Object References
- {EMTPOpCodeSetObjectReferences, CAbstractMediaMtpDataProviderSetObjectReferences::NewL}, //Set Object References
- {EMTPOpCodeDeleteObject, CDeleteObject::NewL}, //DeleteObject
- {EMTPOpCodeCopyObject, CAbstractMediaMtpDataProviderCopyObject::NewL}, // Copy Object
- {EMTPOpCodeMoveObject, CAbstractMediaMtpDataProviderMoveObject::NewL}, // Move Object
- {EMTPOpCodeGetPartialObject, CGetPartialObject::NewL}, //GetPartialObject
- {EMTPExtOpCodeAbstractMediaPreference, CAbstractMediaMtpDataProviderAbstractMediaPreference::NewL}, // WMPReportSyncOnlyAbstractMedias
- {EMTPOpCodeGetFormatCapabilities, CAbstractMediaMtpDataProviderGetFormatCapabilities::NewL} // GetFormatCapabilities
-
+ { EMTPOpCodeGetObjectPropsSupported, CGetObjectPropsSupported::NewL }, //Get Supported Props
+ { EMTPOpCodeGetObjectPropDesc, CGetObjectPropDesc::NewL }, //Get Props Description
+ { EMTPOpCodeGetInterdependentPropDesc, CGetInterdependentPropDesc::NewL },
+ { EMTPOpCodeGetObjectInfo, CGetObjectInfo::NewL }, //GetObjectInfo
+ { EMTPOpCodeGetObject, CGetObject::NewL }, //GetObject
+ { EMTPOpCodeGetObjectPropValue, CAbstractMediaMtpDataProviderGetObjectPropValue::NewL },
+ { EMTPOpCodeGetObjectPropList, CAbstractMediaMtpDataProviderGetObjectPropList::NewL }, //GetObjectPropList
+ { EMTPOpCodeSendObjectInfo, CSendObject::NewL }, //SendObjectInfo (routed to SendObject)
+ { EMTPOpCodeSendObject, CSendObject::NewL }, //SendObject
+ { EMTPOpCodeSendObjectPropList, CSendObject::NewL }, // SendobjectPropList (routed to SendObject)
+ { EMTPOpCodeSetObjectPropValue, CAbstractMediaMtpDataProviderSetObjectPropValue::NewL },
+ { EMTPOpCodeSetObjectPropList, CSetObjectPropList::NewL }, //SetObjectPropList
+ { EMTPOpCodeGetObjectReferences, CGetObjectReferences::NewL }, //Get Object References
+ { EMTPOpCodeSetObjectReferences, CSetObjectReferences::NewL }, //Set Object References
+ { EMTPOpCodeDeleteObject, CDeleteObject::NewL }, //DeleteObject
+ { EMTPOpCodeCopyObject, CAbstractMediaMtpDataProviderCopyObject::NewL }, // Copy Object
+ { EMTPOpCodeMoveObject, CAbstractMediaMtpDataProviderMoveObject::NewL }, // Move Object
+ { EMTPOpCodeGetPartialObject, CGetPartialObject::NewL }, //GetPartialObject
+ { EMTPExtOpCodeAbstractMediaPreference, CAbstractMediaMtpDataProviderAbstractMediaPreference::NewL }, // WMPReportSyncOnlyAbstractMedias
+ { EMTPOpCodeGetFormatCapabilities, CGetFormatCapabilities::NewL } // GetFormatCapabilities
};
// -----------------------------------------------------------------------------
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovider.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovider.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -38,6 +38,8 @@
#include "cabstractmediamtpdataproviderrenameobject.h"
#include "mmmtpdpdefs.h"
#include "mmmtpdpfiledefs.h"
+#include "cabstractmediamtpdataproviderpropertysettingutility.h"
+#include "cabstractmediamtpdataproviderdescriptionutility.h"
// Class constants.
// Defines the number of MTP Active Processors allowed
@@ -74,8 +76,13 @@
iActiveProcessor( -1 ),
iRenameObject( NULL ),
iSupportedFormat( KAbstractMediaMtpDpArrayGranularity ),
- iSupportedProperties( KAbstractMediaMtpDpArrayGranularity )
+#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT
+ iSupportedPropAbstractAlbum( KAbstractMediaMtpDpArrayGranularity ),
+#endif
+ iSupportedPropPlaylist( KAbstractMediaMtpDpArrayGranularity ),
+ iSupportedPropAll( KAbstractMediaMtpDpArrayGranularity )
{
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -87,6 +94,9 @@
{
PRINT( _L( "MM MTP => CAbstractMediaMtpDataProvider::~CAbstractMediaMtpDataProvider" ) );
+ delete iPropSettingUtility;
+ delete iDescriptionUtility;
+
iPendingEnumerations.Close();
TInt count = iActiveProcessors.Count();
for ( TInt i = 0; i < count; i++ )
@@ -102,9 +112,13 @@
delete iRenameObject;
iSupportedFormat.Close();
- iSupportedProperties.Close();
+#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT
+ iSupportedPropAbstractAlbum.Close();
+#endif
+ iSupportedPropPlaylist.Close();
+ iSupportedPropAll.Close();
- PRINT( _L( "MM MTP => CAbstractMediaMtpDataProvider::~CAbstractMediaMtpDataProvider" ) );
+ PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProvider::~CAbstractMediaMtpDataProvider" ) );
}
void CAbstractMediaMtpDataProvider::Cancel()
@@ -123,10 +137,14 @@
iAbstractMediaEnumerator = CAbstractMediaMtpDataProviderEnumerator::NewL( Framework(), *this );
- CMmMtpDpAccessSingleton::CreateL( Framework().Fs(), Framework() );
+ CMmMtpDpAccessSingleton::CreateL( Framework() );
GetSupportedFormatL();
GetSupportedPropertiesL();
+ GetAllSupportedPropL();
+
+ iPropSettingUtility = CAbstractMediaMtpDataProviderPropertySettingUtility::NewL();
+ iDescriptionUtility = CAbstractMediaMtpDataProviderDescriptionUtility::NewL();
PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProvider::ConstructL" ) );
}
@@ -158,13 +176,11 @@
{
case EMTPSessionClosed:
PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProvider::ProcessNotificationL EMTPSessionClosed event recvd" ) );
-
SessionClosedL( *reinterpret_cast<const TMTPNotificationParamsSessionChange*> ( aParams ) );
break;
case EMTPSessionOpened:
PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProvider::ProcessNotificationL EMTPSessionOpened event recvd" ) );
-
SessionOpenedL( *reinterpret_cast<const TMTPNotificationParamsSessionChange*> ( aParams ) );
break;
@@ -201,18 +217,18 @@
MMmRequestProcessor* processor = iActiveProcessors[index];
iActiveProcessor = index;
- // iActiveProcessorRemoved = EFalse;
+ iActiveProcessorRemoved = EFalse;
TBool result = processor->HandleRequestL( aRequest, aPhase );
- if( !iIsSessionOpen )
+ if ( !iIsSessionOpen )
{
processor->Release();
}
// iActiveProcessorRemoved will be set to ETrue in the above function
- // HandleRequestL(),such as SessionClose()
- // else if ( iActiveProcessorRemoved )
- // {
- // processor->Release(); // destroy the processor
- // }
+ // HandleRequestL(), such as SessionClose()
+ else if ( iActiveProcessorRemoved )
+ {
+ processor->Release(); // destroy the processor
+ }
else if ( result ) // destroy the processor
{
processor->Release();
@@ -231,26 +247,25 @@
iIsSessionOpen = EFalse;
TInt count = iActiveProcessors.Count();
PRINT1( _L( "MM MTP => CAbstractMediaMtpDataProvider::SessionClosedL, total processor count = %d" ), count );
- for( TInt i = 0; i < count; i++ )
+ while ( count-- )
{
- MMmRequestProcessor* processor = iActiveProcessors[i];
+ MMmRequestProcessor* processor = iActiveProcessors[count];
- // replaced for the Request() is invalid sometimes
- // TUint32 sessionId( processor->Request().Uint32( TMTPTypeRequest::ERequestSessionID ) );
TUint32 sessionId = processor->SessionId();
if ( ( sessionId == aSession.iMTPId )
- && ( processor->Connection().ConnectionId()
- == aSession.iConnection.ConnectionId() ) )
+ && ( processor->Connection().ConnectionId()
+ == aSession.iConnection.ConnectionId() ) )
{
processor->UsbDisconnect(); // Rollback
- iActiveProcessors.Remove( i );
- // if ( i == iActiveProcessor )
- // {
- // iActiveProcessorRemoved = ETrue;
- // }
- // else
+ iActiveProcessors.Remove( count );
+ if ( count == iActiveProcessor )
+ {
+ iActiveProcessorRemoved = ETrue;
+ iActiveProcessor = -1; // update iActiveProcessor
+ }
+ else
{
processor->Release();
}
@@ -354,11 +369,11 @@
case EObjectProperties:
{
- TInt count = iSupportedProperties.Count();
+ TInt count = iSupportedPropAll.Count();
for ( TInt i = 0; i < count; i++ )
{
- aArray.Append( iSupportedProperties[i] );
+ aArray.Append( iSupportedPropAll[i] );
}
PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProvider::Supported properties count = %d" ), aArray.Count() );
}
@@ -386,7 +401,9 @@
{
if( aCategory == EFormatExtensionSets )
{
- //EMTPFormatCodeM3U,
+#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT
+ aStrings.AppendL(KFormatExtensionALB);
+#endif
aStrings.AppendL(KFormatExtensionM3U);
aStrings.AppendL(KFormatExtensionPLA);
aStrings.AppendL(KFormatExtensionVIR);
@@ -472,7 +489,7 @@
// -----------------------------------------------------------------------------
// CAbstractMediaMtpDataProvider::GetWrapper
-// return the reference of CMmMtpDpMetadataAccessWrapper to enumerator
+// return wrapper references
// -----------------------------------------------------------------------------
//
CMmMtpDpMetadataAccessWrapper& CAbstractMediaMtpDataProvider::GetWrapperL()
@@ -480,6 +497,26 @@
return CMmMtpDpAccessSingleton::GetAccessWrapperL();
}
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProvider::PropSettingUtility
+// return The utility to setting properties
+// -----------------------------------------------------------------------------
+//
+CPropertySettingUtility* CAbstractMediaMtpDataProvider::PropSettingUtility()
+ {
+ return iPropSettingUtility;
+ }
+
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProvider::DescriptionUtility
+// return The utiltiy to setting descriptions
+// -----------------------------------------------------------------------------
+//
+CDescriptionUtility* CAbstractMediaMtpDataProvider::DescriptionUtility()
+ {
+ return iDescriptionUtility;
+ }
+
// ---------------------------------------------------------------------------
// CAbstractMediaMtpDataProvider::GetSupportedFormat
//
@@ -503,7 +540,22 @@
const RArray<TUint>* CAbstractMediaMtpDataProvider::GetSupportedPropertiesL( TUint32 aFormatCode ) const
{
- return &iSupportedProperties;
+ if ( ( aFormatCode == EMTPFormatCodeM3UPlaylist ) || ( aFormatCode == EMTPFormatCodeAbstractAudioVideoPlaylist ) )
+ {
+ return &iSupportedPropPlaylist;
+ }
+#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT
+ else if ( aFormatCode == EMTPFormatCodeAbstractAudioAlbum )
+ {
+ return &iSupportedPropAbstractAlbum;
+ }
+#endif
+ else
+ {
+ User::Leave( KErrNotSupported );
+ }
+ // should never run to this line, just for avoiding warning.
+ return NULL;
}
// ---------------------------------------------------------------------------
@@ -513,20 +565,37 @@
//
void CAbstractMediaMtpDataProvider::GetSupportedPropertiesL()
{
- iSupportedProperties.Reset();
+#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT
+ iSupportedPropAbstractAlbum.Reset();
+#endif
+ iSupportedPropPlaylist.Reset();
TInt count = 0, i = 0;
count = sizeof( KMmMtpDpSupportedPropMandatoryAll ) / sizeof( TUint16 );
for ( i = 0; i < count; i++ )
{
- InsertL( iSupportedProperties, KMmMtpDpSupportedPropMandatoryAll[i] );
+#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT
+ InsertL( iSupportedPropAbstractAlbum, KMmMtpDpSupportedPropMandatoryAll[i] );
+#endif
+ InsertL( iSupportedPropPlaylist, KMmMtpDpSupportedPropMandatoryAll[i] );
}
count = sizeof( KMmMtpDpSupportedPropAdditionalAll ) / sizeof( TUint16 );
for ( i = 0; i < count; i++ )
{
- InsertL( iSupportedProperties, KMmMtpDpSupportedPropAdditionalAll[i] );
+#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT
+ InsertL( iSupportedPropAbstractAlbum, KMmMtpDpSupportedPropAdditionalAll[i] );
+#endif
+ InsertL( iSupportedPropPlaylist, KMmMtpDpSupportedPropAdditionalAll[i] );
}
+
+#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT
+ count = sizeof( KMmMtpDpSupportedPropMandatoryALB ) / sizeof( TUint16 );
+ for ( i = 0; i < count; i++ )
+ {
+ InsertL( iSupportedPropAbstractAlbum, KMmMtpDpSupportedPropMandatoryALB[i] );
+ }
+#endif
}
// ---------------------------------------------------------------------------
@@ -536,7 +605,31 @@
//
const RArray<TUint>* CAbstractMediaMtpDataProvider::GetAllSupportedProperties() const
{
- return &iSupportedProperties;
+ return &iSupportedPropAll;
+ }
+
+void CAbstractMediaMtpDataProvider::GetAllSupportedPropL()
+ {
+ iSupportedPropAll.Reset();
+
+ TInt count = 0, i = 0;
+ count = sizeof( KMmMtpDpSupportedPropMandatoryAll ) / sizeof( TUint16 );
+ for ( i = 0; i < count; i++ )
+ {
+ InsertL( iSupportedPropAll, KMmMtpDpSupportedPropMandatoryAll[i] );
+ }
+
+ count = sizeof( KMmMtpDpSupportedPropAdditionalAll ) / sizeof( TUint16 );
+ for ( i = 0; i < count; i++ )
+ {
+ InsertL( iSupportedPropAll, KMmMtpDpSupportedPropAdditionalAll[i] );
+ }
+
+ count = sizeof( KMmMtpDpSupportedPropMandatoryALB ) / sizeof( TUint16 );
+ for ( i = 0; i < count; i++ )
+ {
+ InsertL( iSupportedPropAll, KMmMtpDpSupportedPropMandatoryALB[i] );
+ }
}
// ---------------------------------------------------------------------------
@@ -552,10 +645,19 @@
TDriveInfo driveInfo;
User::LeaveIfError( Framework().Fs().Drive( driveInfo, driveNum ) );
+ PRINT3( _L( "driveInfo.iType = 0x%x, driveInfo.iDriveAtt = 0x%x, driveInfo.iMediaAtt = 0x%x" ),
+ driveInfo.iType,
+ driveInfo.iDriveAtt,
+ driveInfo.iMediaAtt );
if( driveInfo.iType == EMediaNotPresent || driveInfo.iType == EMediaUnknown )
{
- err = DriveInfo::GetDefaultDrive( DriveInfo::EDefaultPhoneMemory, driveNum );
- PRINT( _L( "MM MTP <> Memory card doesn't exist, set PhoneMemory to default" ) );
+ err = DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRemovableMassStorage, driveNum );
+ User::LeaveIfError( Framework().Fs().Drive( driveInfo, driveNum ) );
+ if( driveInfo.iType == EMediaNotPresent || driveInfo.iType == EMediaUnknown )
+ {
+ err = DriveInfo::GetDefaultDrive( DriveInfo::EDefaultPhoneMemory, driveNum );
+ PRINT( _L( "MM MTP <> Memory card doesn't exist, set PhoneMemory to default" ) );
+ }
}
return Framework().StorageMgr().FrameworkStorageId( TDriveNumber( driveNum ) );
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderabstractmediapreference.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderabstractmediapreference.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -71,7 +71,7 @@
//
CAbstractMediaMtpDataProviderAbstractMediaPreference::~CAbstractMediaMtpDataProviderAbstractMediaPreference()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -81,7 +81,7 @@
//
void CAbstractMediaMtpDataProviderAbstractMediaPreference::ConstructL()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -94,3 +94,6 @@
TUint32 referenceType = EMTPAbstractMediaRefOrdinary;
SendResponseL( EMTPRespCodeOK, 1, &referenceType );
}
+
+// end of file
+
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidercopyobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidercopyobject.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -60,7 +60,7 @@
//
CAbstractMediaMtpDataProviderCopyObject::~CAbstractMediaMtpDataProviderCopyObject()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -73,7 +73,7 @@
MMmMtpDpConfig& aDpConfig ) :
CCopyObject( aFramework, aConnection, aDpConfig )
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -86,21 +86,8 @@
const CMTPObjectMetaData& /*aObject*/ )
{
PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderCopyObject::ServiceGetSpecificObjectPropertyL" ) );
- // do nothing
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderCopyObject::ServiceSetSpecificObjectPropertyL
-// do nothing here
-// -----------------------------------------------------------------------------
-//
-TMTPResponseCode CAbstractMediaMtpDataProviderCopyObject::ServiceSetSpecificObjectPropertyL( TUint16 /*aPropCode*/,
- const CMTPObjectMetaData& /*aObject*/,
- const CMTPTypeObjectPropListElement& /*aElement*/)
- {
- PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderCopyObject::ServiceSetSpecificObjectPropertyL" ) );
-
- return EMTPRespCodeOK;
+ // Do nothing now.
+ // May need add implementation here for further extension.
}
// end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderdescriptionutility.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,224 @@
+/*
+* 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: Media dp specific property description construction utility.
+* Used by all request processors which related to property description
+*
+*/
+
+#include <mtp/mtpprotocolconstants.h>
+#include <mtp/cmtptypeobjectpropdesc.h>
+#include <mtp/cmtptypestring.h>
+
+#include "cabstractmediamtpdataproviderdescriptionutility.h"
+#include "abstractmediamtpdataproviderconst.h"
+#include "mmmtpdpconfig.h"
+#include "mmmtpdplogger.h"
+
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProviderDescriptionUtility::NewL
+//
+// -----------------------------------------------------------------------------
+//
+CAbstractMediaMtpDataProviderDescriptionUtility* CAbstractMediaMtpDataProviderDescriptionUtility::NewL()
+ {
+ CAbstractMediaMtpDataProviderDescriptionUtility* self =
+ new( ELeave ) CAbstractMediaMtpDataProviderDescriptionUtility();
+
+ return self;
+ }
+
+CAbstractMediaMtpDataProviderDescriptionUtility::CAbstractMediaMtpDataProviderDescriptionUtility()
+ {
+ // Do nothing
+ }
+
+CAbstractMediaMtpDataProviderDescriptionUtility::~CAbstractMediaMtpDataProviderDescriptionUtility()
+ {
+ // Do nothing
+ }
+
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProviderDescriptionUtility::NewInterdepentPropDescL
+// Construct media dp specific interdependent property description.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeInterdependentPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewInterdepentPropDescL( MMmMtpDpConfig& /*aDpConfig*/,
+ TUint /*aFormatCode*/ )
+ {
+ PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderDescriptionUtility::NewInterdepentPropDescL" ) );
+
+ CMTPTypeInterdependentPropDesc* interdependentPropDesc = CMTPTypeInterdependentPropDesc::NewL();
+
+ PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderDescriptionUtility::NewInterdepentPropDescL" ) );
+ return interdependentPropDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProviderDescriptionUtility::NewSpecificPropDescL
+// Construct media dp specific property description.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewSpecificPropDescL( TUint aFormatCode,
+ TUint16 aPropCode )
+ {
+ CMTPTypeObjectPropDesc* propertyDesc = NULL;
+ if( aFormatCode == EMTPFormatCodeAbstractAudioAlbum )
+ {
+ switch ( aPropCode )
+ {
+ case EMTPObjectPropCodeRepresentativeSampleFormat:
+ propertyDesc = NewRepresentativeSampleFormatL();
+ break;
+
+ case EMTPObjectPropCodeRepresentativeSampleSize:
+ propertyDesc = NewRepresentativeSampleSizeL();
+ break;
+
+ case EMTPObjectPropCodeRepresentativeSampleHeight:
+ propertyDesc = NewRepresentativeSampleHeightL();
+ break;
+
+ case EMTPObjectPropCodeRepresentativeSampleWidth:
+ propertyDesc = NewRepresentativeSampleWidthL();
+ break;
+
+ case EMTPObjectPropCodeRepresentativeSampleData:
+ propertyDesc = NewRepresentativeSampleDataL();
+ break;
+ default:
+ // do nothing
+ break;
+ }
+ }
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleFormatL
+//
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleFormatL()
+ {
+ CMTPTypeObjectPropDescEnumerationForm* form =
+ CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT16 );
+ CleanupStack::PushL( form ); // + form
+
+ TInt numValues = sizeof ( TMmMtpSupportedSampleFormat ) / sizeof ( TMmMtpSupportedSampleFormat[0] );
+ for ( TInt i = 0; i < numValues; i++ )
+ {
+ TMTPTypeUint16 data( TMmMtpSupportedSampleFormat[i] );
+ form->AppendSupportedValueL( data );
+ }
+
+ CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
+ propertyInfo.iDataType = EMTPTypeUINT16;
+ propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::EEnumerationForm;
+ propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadOnly;
+ CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeRepresentativeSampleFormat,
+ propertyInfo,
+ form );
+ CleanupStack::PopAndDestroy( form ); // - form
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleSizeL
+//
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleSizeL()
+ {
+ CMTPTypeObjectPropDescRangeForm* form =
+ CMTPTypeObjectPropDescRangeForm::NewLC( EMTPTypeUINT32 ); // + form
+
+ // Set expected values
+ form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMinimumValue, EMTPMinSampleSize );
+ form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMaximumValue, EMTPMaxSampleSize );
+ form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EStepSize, EMTPStepSampleSize );
+
+ CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
+ propertyInfo.iDataType = EMTPTypeUINT32;
+ propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::ERangeForm;
+ propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadOnly;
+ CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeRepresentativeSampleSize,
+ propertyInfo,
+ form );
+ CleanupStack::PopAndDestroy( form ); // - form
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleHeightL
+//
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleHeightL()
+ {
+ CMTPTypeObjectPropDescRangeForm* form =
+ CMTPTypeObjectPropDescRangeForm::NewLC( EMTPTypeUINT32 ); // + form
+
+ // Set expected values
+ form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMinimumValue, EMTPSampleMinHeight );
+ form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMaximumValue, EMTPSampleMaxHeight );
+ form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EStepSize, EMTPSampleStepHeight );
+
+ CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
+ propertyInfo.iDataType = EMTPTypeUINT32;
+ propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::ERangeForm;
+ propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadOnly;
+ CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeRepresentativeSampleHeight,
+ propertyInfo,
+ form );
+ CleanupStack::PopAndDestroy( form ); // - form
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleWidthL
+//
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleWidthL()
+ {
+ CMTPTypeObjectPropDescRangeForm* form =
+ CMTPTypeObjectPropDescRangeForm::NewLC( EMTPTypeUINT32 ); // + form
+
+ // Set expected values
+ form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMinimumValue, EMTPSampleMinWidth );
+ form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMaximumValue, EMTPSampleMaxWidth );
+ form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EStepSize, EMTPSampleStepWidth );
+
+ CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
+ propertyInfo.iDataType = EMTPTypeUINT32;
+ propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::ERangeForm;
+ propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadOnly;
+ CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeRepresentativeSampleWidth,
+ propertyInfo,
+ form );
+ CleanupStack::PopAndDestroy( form ); // - form
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleDataL
+//
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderDescriptionUtility::NewRepresentativeSampleDataL()
+ {
+ return CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeRepresentativeSampleData );
+ }
+
+// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderenumerator.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderenumerator.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -22,23 +22,29 @@
#include <mtp/mmtpobjectmgr.h>
#include <mtp/mmtpstoragemgr.h>
#include <mtp/mmtpreferencemgr.h>
+#include <mtp/tmtptypeuint32.h>
#include <mpxmediaarray.h>
#include <mpxmedia.h>
-#include "abstractmediamtpdataproviderconst.h"
#include "cabstractmediamtpdataproviderenumerator.h"
#include "cabstractmediamtpdataprovider.h"
#include "mmmtpdplogger.h"
#include "mmmtpdputility.h"
#include "cmmmtpdpmetadataaccesswrapper.h"
-#include "cmmmtpdpmetadatampxaccess.h"
-/** Number of objects to insert into the object manager in one go*/
const TInt KMTPDriveGranularity = 5;
+const TInt KAbstractMediaDpArrayGranularity = 2;
_LIT( KPlaylistFilePath, "Playlists\\" );
+#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
+_LIT( KMpxGetAllAbstractMedia, "MpxGetAllAbstractMedia" );
+_LIT( KObjectManagerObjectUid, "ObjectManagerObjectUid" );
+_LIT( KObjectManagerInsert, "ObjectManagerInsert" );
+_LIT( KResetObjectFormatSubCode, "ResetObjectFormatSubCode" );
+#endif
+
// -----------------------------------------------------------------------------
// CAbstractMediaMtpDataProviderEnumerator::NewL
// Two phase constructor
@@ -69,10 +75,12 @@
iObjectMgr( aFramework.ObjectMgr() ),
iDataProviderId( aFramework.DataProviderId() ),
iDataProvider( aDataProvider ),
- iStorages( 2 ),
+ iStorages( KAbstractMediaDpArrayGranularity ),
iAbstractMedias( NULL ),
iCount( 0 ),
- iCurrentIndex( 0 )
+ iCurrentIndex( 0 ),
+ iEnumState ( EEnumNone ),
+ iResetCount( 0 )
{
PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::CAbstractMediaMtpDataProviderEnumerator, iDataProviderId = %d" ), iDataProviderId );
}
@@ -105,6 +113,7 @@
delete iAbstractMedias;
iAbstractMedias = NULL;
+
#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
delete iPerfLog;
#endif // _DEBUG
@@ -139,9 +148,9 @@
}
CleanupStack::PopAndDestroy( &storages ); // - storages
}
- else if ( aStorageId != KMTPNotSpecified32 )
+ else if ( aStorageId != KMTPNotSpecified32
+ && storageMgr.ValidStorageId( aStorageId ) )
{
- __ASSERT_DEBUG( storageMgr.ValidStorageId( aStorageId ), User::Invariant() );
const CMTPStorageMetaData& storage(
storageMgr.StorageL( aStorageId ) );
if ( storage.Uint( CMTPStorageMetaData::EStorageSystemType ) ==
@@ -170,76 +179,117 @@
// keep in mind for notification when enumeration complete
iStorageId = aStorageId;
-
- if ( iStorages.Count() > 0 )
- {
- ScanStorageL( iStorages[0] );
- }
- else
- {
- iStorages.Reset();
- SignalCompleteL( iDataProvider );
- }
+ iEnumState = EEnumNone;
+ ScanNextL();
PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderEnumerator::StartL" ) );
}
// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderEnumerator::ScanStorageL
-// Find out all AbstractMedia file according to storage id
+// CAbstractMediaMtpDataProviderEnumerator::InitStorageL
+// Initialize iAbstractMedia, iCount and iCurrentIndex according to iStorages and iEnumState
// -----------------------------------------------------------------------------
//
-void CAbstractMediaMtpDataProviderEnumerator::ScanStorageL( TUint32 aStorageId )
+void CAbstractMediaMtpDataProviderEnumerator::InitStorageL()
{
- PRINT1( _L( "MM MTP => CAbstractMediaMtpDataProviderEnumerator::ScanStorageL aStorageId = 0x%x" ), aStorageId );
+ __ASSERT_DEBUG(iStorages.Count() > 0 && iEnumState < EEnumCount, User::Invariant() );
+ PRINT2( _L( "MM MTP => CAbstractMediaMtpDataProviderEnumerator::InitStorageL storageId = 0x%x, state=%d" ), iStorages[0], iEnumState );
const CMTPStorageMetaData& storage(
- iFramework.StorageMgr().StorageL( aStorageId ) );
+ iFramework.StorageMgr().StorageL( iStorages[0] ) );
__ASSERT_DEBUG( ( storage.Uint( CMTPStorageMetaData::EStorageSystemType ) ==
CMTPStorageMetaData::ESystemTypeDefaultFileSystem ), User::Invariant() );
- TFileName root( storage.DesC( CMTPStorageMetaData::EStorageSuid ) );
- PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::ScanStorageL StorageSuid = %S" ), &root );
+ TPtrC root( storage.DesC( CMTPStorageMetaData::EStorageSuid ) );
+ PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::InitStorageL StorageSuid = %S" ), &root );
- // created by windows media player, or else return responsecode is Access denied
- // Create abstract media directory if it does not exist
- HBufC* tempBuf = HBufC::NewLC( KMaxFileName ); // + tempBuf
- TPtr folder = tempBuf->Des();
- folder.Zero();
- folder.Append( root );
- folder.Append( KPlaylistFilePath );
- TBool ret = BaflUtils::FileExists( iFramework.Fs(), folder );
- PRINT2( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::ScanStorageL ret = %d, folder = %S" ), ret, &folder );
- if( !ret )
+ if ( iEnumState == EEnumPlaylist )
{
- TInt err = iFramework.Fs().MkDirAll( folder );
- PRINT2( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::ScanStorageL Creating folder (%S) returned error %d" ), tempBuf, err );
+ // created by windows media player, or else return responsecode is Access denied
+ // Create playlist directory if it does not exist
+ // NOTE: Only playlist need to create directory here, for the dummy files
+ HBufC* tempBuf = HBufC::NewLC( KMaxFileName ); // + tempBuf
+ TPtr folder = tempBuf->Des();
+ folder.Zero();
+ folder.Append( root );
+ folder.Append( KPlaylistFilePath );
+ TBool ret = BaflUtils::FileExists( iFramework.Fs(), folder );
+ PRINT2( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::InitStorageL ret = %d, folder = %S" ), ret, &folder );
+ if( !ret )
+ {
+ TInt err = iFramework.Fs().MkDirAll( folder );
+ PRINT2( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::InitStorageL Creating folder (%S) returned error %d" ), tempBuf, err );
- // add this new folder to framework metadata DB
- CMTPObjectMetaData* object = CMTPObjectMetaData::NewLC( 0, // Dev Dp hard code
- EMTPFormatCodeAssociation,
- aStorageId,
- folder ); // + object
- object->SetUint( CMTPObjectMetaData::EParentHandle, KMTPHandleNoParent );
- object->SetUint( CMTPObjectMetaData::EFormatSubCode, EMTPAssociationTypeGenericFolder );
- PERFLOGSTART( KObjectManagerInsert );
- iObjectMgr.InsertObjectL( *object );
- PERFLOGSTOP( KObjectManagerInsert );
- CleanupStack::PopAndDestroy( object ); // - object
+ // add this new folder to framework metadata DB
+ CMTPObjectMetaData* object = CMTPObjectMetaData::NewLC( 0, // Dev Dp hard code
+ EMTPFormatCodeAssociation,
+ iStorages[0],
+ folder ); // + object
+ object->SetUint( CMTPObjectMetaData::EParentHandle, KMTPHandleNoParent );
+ object->SetUint( CMTPObjectMetaData::EFormatSubCode, EMTPAssociationTypeGenericFolder );
+ PERFLOGSTART( KObjectManagerInsert );
+ iObjectMgr.InsertObjectL( *object );
+ PERFLOGSTOP( KObjectManagerInsert );
+ CleanupStack::PopAndDestroy( object ); // - object
+ }
+ CleanupStack::PopAndDestroy( tempBuf ); // - tempBuf
}
- CleanupStack::PopAndDestroy( tempBuf ); // - tempBuf
// find all abstract medias stored in MPX
delete iAbstractMedias;
iAbstractMedias = NULL;
- PERFLOGSTART( KMpxGetAllPlaylist );
- TRAPD( err, iDataProvider.GetWrapperL().GetAllPlaylistL( root, &iAbstractMedias ) );
- PERFLOGSTOP( KMpxGetAllPlaylist );
+ iAbstractMedias = new( ELeave ) CDesCArrayFlat( KMTPDriveGranularity );
+ TMPXGeneralCategory category = ( iEnumState == EEnumPlaylist ) ? EMPXPlaylist : EMPXAbstractAlbum;
+ PERFLOGSTART( KMpxGetAllAbstractMedia );
+ TRAPD( err, iDataProvider.GetWrapperL().GetAllAbstractMediaL( root, *iAbstractMedias, category ) );
+ PERFLOGSTOP( KMpxGetAllAbstractMedia );
if ( iAbstractMedias != NULL && err == KErrNone )
{
iCount = iAbstractMedias->Count();
- iCurrentIndex = 0;
+ }
+ else
+ {
+ iCount = 0;
+ }
+ iCurrentIndex = 0;
+
+ PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderEnumerator::InitStorageL" ) );
+ }
+
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProviderEnumerator::ScanNextL
+// Proceed to next abstract media item
+// -----------------------------------------------------------------------------
+//
+void CAbstractMediaMtpDataProviderEnumerator::ScanNextL()
+ {
+ PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderEnumerator::ScanNextL" ) );
+
+ if ( iCurrentIndex >= iCount )
+ {
+ iEnumState++;
+ }
+
+ if ( iEnumState >= EEnumCount )
+ {
+ iEnumState = EEnumPlaylist;
+ iResetCount = 0;
+
+ PERFLOGSTART( KResetObjectFormatSubCode );
+ ResetObjectFormatSubCodeL( iStorages[0] );
+ PERFLOGSTOP( KResetObjectFormatSubCode );
+
+ PRINT2( _L( "MM MTP <> ResetObjectFormatSubCodeL, storage = 0x%x, iResetCount = %d" ), iStorages[0], iResetCount );
+ iStorages.Remove( 0 );
+ }
+
+ if ( iStorages.Count() > 0 )
+ {
+ if( iCurrentIndex >= iCount )
+ {
+ InitStorageL();
+ }
TRequestStatus* status = &iStatus;
User::RequestComplete( status, iStatus.Int() );
@@ -247,46 +297,15 @@
}
else
{
- iCount = 0;
- iCurrentIndex = 0;
- ScanNextL();
- }
-
- PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderEnumerator::ScanStorageL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderEnumerator::ScanNextStorageL
-//
-// -----------------------------------------------------------------------------
-//
-void CAbstractMediaMtpDataProviderEnumerator::ScanNextL()
- {
- PRINT1( _L( "MM MTP = > CAbstractMediaMtpDataProviderEnumerator::ScanNextStorageL iStorages.Count = %d" ), iStorages.Count() );
- if ( iCurrentIndex < iCount )
- {
- TRequestStatus* status = &iStatus;
- User::RequestComplete( status, iStatus.Int() );
- SetActive();
-
- PRINT2( _L( "MM MTP <> Current storage is still being scanned, current index = %d, total AbstractMedia count = %d" ),
- iCurrentIndex,
- iCount );
- }
- // If there are one or more unscanned storages left
- // (the currently scanned one is still on the list)
- else if ( iStorages.Count() > 1 )
- {
- iStorages.Remove( 0 );
- ScanStorageL( iStorages[0] );
- }
- else
- {
// We are done
- PRINT( _L( "MM MTP <> Objects enumeration completed 2" ) );
+ PRINT( _L( "MM MTP <> Objects enumeration completed" ) );
+ delete iAbstractMedias;
+ iAbstractMedias = NULL;
iStorages.Reset();
SignalCompleteL( iDataProvider );
}
+
+ PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderEnumerator::ScanNextL" ) );
}
// -----------------------------------------------------------------------------
@@ -296,30 +315,35 @@
//
void CAbstractMediaMtpDataProviderEnumerator::RunL()
{
- TBuf<KMaxFileName> playlist;
+ PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderEnumerator::RunL" ) );
+ if ( iCurrentIndex < iCount )
+ {
+ PRINT2( _L( "MM MTP <> Current storage is still being scanned, current index = %d, total AbstractMedia count = %d" ),
+ iCurrentIndex,
+ iCount );
- // insert all playlists into handle db of framework
- CMPXMedia* media = ( *iAbstractMedias )[iCurrentIndex];
- PERFLOGSTART( KMpxGetPlaylistName );
- iDataProvider.GetWrapperL().GetPlaylistNameL( media, playlist );
- PERFLOGSTOP( KMpxGetPlaylistName );
- AddEntryL( playlist );
+ // Insert all abstract medias into handle db of framework
+ iCurrentIndex++; // Increase the index first in case of leave
+ TPtrC entrySuid( ( *iAbstractMedias )[iCurrentIndex-1] );
- // find all reference of each playlist and create dummy files for each playlist
- CDesCArray* references = new ( ELeave ) CDesCArrayFlat( KMTPDriveGranularity );
- CleanupStack::PushL( references ); // + references
+ if ( iEnumState == EEnumAbstractAlbum )
+ {
+ // The abstract album may be removed, check it first
+ TBool ret = BaflUtils::FileExists( iFramework.Fs(), entrySuid );
+ PRINT2( _L( "MM MTP <> BaflUtils::FileExists( RFs,%S ) ret = %d" ), &entrySuid, ret );
+ }
+ else // EEnumPlaylist
+ {
+ // Add an object to the object store for DB based playlist
+ AddEntryL( entrySuid );
+ }
- PERFLOGSTART( KMpxQueryPlaylistReference );
- iDataProvider.GetWrapperL().GetAllReferenceL( media, *references );
- PERFLOGSTOP( KMpxQueryPlaylistReference );
-
- // insert references into reference db
- AddReferencesL( playlist, *references );
-
- CleanupStack::PopAndDestroy( references ); // - references
- iCurrentIndex++;
+ // Getting all reference during internal enumeration takes too long, query later on demand
+ }
ScanNextL();
+
+ PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderEnumerator::RunL" ) );
}
// -----------------------------------------------------------------------------
@@ -332,6 +356,7 @@
if ( aError != KErrNone )
PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::RunError with error %d" ), aError );
+ TRAP_IGNORE( SignalCompleteL( iDataProvider ) );
return KErrNone;
}
@@ -343,7 +368,7 @@
//
void CAbstractMediaMtpDataProviderEnumerator::DoCancel()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -378,64 +403,89 @@
PERFLOGSTART( KObjectManagerObjectUid );
TUint32 parentHandle = iFramework.ObjectMgr().HandleL( parser.DriveAndPath() );
PERFLOGSTOP( KObjectManagerObjectUid );
- object->SetUint( CMTPObjectMetaData::EParentHandle, parentHandle );
+
+ // MTP FW returns KMTPHandleNone for parentHandle in two situations:
+ // 1. The path doesn't exist
+ // 2. The object is under root directory
+ if ( parentHandle == KMTPHandleNone )
+ {
+ if ( BaflUtils::PathExists( iFramework.Fs(), parser.DriveAndPath() ) )
+ {
+ parentHandle = KMTPHandleNoParent;
+ }
+ else
+ {
+ iDataProvider.GetWrapperL().DeleteObjectL( *object );
+ }
+ }
- PERFLOGSTART(KObjectManagerInsert);
- iObjectMgr.InsertObjectL( *object );
- PERFLOGSTOP(KObjectManagerInsert);
+ if ( parentHandle != KMTPHandleNone )
+ {
+ // Handle .m3u playlist like abstract playlist in two situations:
+ // 1. The .m3u file is not on the file system.
+ // 2. The .m3u file is hidden and 0 size
+ TBool add = ETrue;
+ if ( format == EMTPFormatCodeM3UPlaylist )
+ {
+ TEntry entry;
+ TInt err = iFramework.Fs().Entry( aSuid, entry );
+ add = ( err != KErrNone) || ( entry.iSize == 0 && entry.IsHidden() );
+ }
+
+ if ( add )
+ {
+ object->SetUint( CMTPObjectMetaData::EParentHandle, parentHandle );
+
+ PERFLOGSTART( KObjectManagerInsert );
+ iObjectMgr.InsertObjectL( *object );
+ PERFLOGSTOP( KObjectManagerInsert );
+
+ //Create the dummy file on file system
+ iDataProvider.GetWrapperL().CreateDummyFile( aSuid );
+ // remember the abstract media file for clean up
+ iDataProvider.GetWrapperL().AddDummyFileL( aSuid );
+ }
+ }
CleanupStack::PopAndDestroy( object );// - object
- iDataProvider.GetWrapperL().CreateDummyFile( aSuid );
-
- // remember the abstract media file for clean up
- iDataProvider.GetWrapperL().AddDummyFileL( aSuid );
-
PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderEnumerator::AddEntryL" ) );
}
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderEnumerator::AddReferencesL
-// Add references into reference db according to abstract media name
-// -----------------------------------------------------------------------------
-//
-void CAbstractMediaMtpDataProviderEnumerator::AddReferencesL( const TDesC& aAbstractMediaName,
- CDesCArray& aReferences )
+void CAbstractMediaMtpDataProviderEnumerator::ResetObjectFormatSubCodeL( TUint32 aStorageId )
{
- TInt count = aReferences.Count();
- PRINT2( _L("MM MTP => CAbstractMediaMtpDataProviderEnumerator::AddReferencesL AbstractMedia name = %S, ref count = %d"), &aAbstractMediaName, count );
-
- // check if references are valid
- CMTPObjectMetaData* object = CMTPObjectMetaData::NewLC(); // + object
- MMTPObjectMgr& objectMgr = iFramework.ObjectMgr();
+ PRINT1( _L( "MM MTP => CAbstractMediaMtpDataProviderEnumerator::ResetObjectFormatSubCodeL, StorageId = 0x%x" ),
+ aStorageId );
+ RMTPObjectMgrQueryContext context;
+ RArray<TUint> handles;
+ CleanupClosePushL( context ); // + context
+ CleanupClosePushL( handles ); // + handles
+
+ // search all handles in desired storage with desired DP id
+ TMTPObjectMgrQueryParams params( aStorageId, KMTPFormatsAll, KMTPHandleNone, iFramework.DataProviderId() );
- TInt removeCount = 0;
- for ( TInt i = 0; i < count; i++ )
+ do
{
- TInt index = i - removeCount;
- PRINT2( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::AddReferencesL ref[%d]'s name = %S" ), index, &( aReferences[index] ) );
- PERFLOGSTART( KObjectManagerHandle );
- TUint32 handle = iFramework.ObjectMgr().HandleL( aReferences[index] );
- PERFLOGSTOP( KObjectManagerHandle );
- if ( handle == KMTPHandleNone ) // object doesn't exist
+ iObjectMgr.GetObjectHandlesL( params, context, handles );
+
+ for ( TInt i = 0; i < handles.Count(); i++ )
{
- TPtrC temp( aReferences[index] );
- PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::AddReferencesL, [%S] doesn't existed in handle db, remove this from reference array" ), &temp );
-
- // if handle is invalid, remove from reference array
- aReferences.Delete( index, 1 );
- removeCount++;
+ CMTPObjectMetaData* objectInfo = CMTPObjectMetaData::NewLC(); // + objectInfo
+
+ iResetCount++;
+ iObjectMgr.ObjectL( handles[i], *objectInfo );
+ // EMTPSubFormatCodeUnknown means references of the object haven't been insert into reference db of fw.
+ objectInfo->SetUint( CMTPObjectMetaData::EFormatSubCode, EMTPSubFormatCodeUnknown );
+ iObjectMgr.ModifyObjectL( *objectInfo );
+ CleanupStack::PopAndDestroy( objectInfo ); // - objectInfo
}
}
- CleanupStack::PopAndDestroy( object ); // - object
+ while ( !context.QueryComplete() );
- // add all references into references db
- MMTPReferenceMgr& referenceMgr = iFramework.ReferenceMgr();
- PERFLOGSTART( KReferenceManagerSetReference );
- referenceMgr.SetReferencesL( aAbstractMediaName, aReferences );
- PERFLOGSTOP( KReferenceManagerSetReference );
+ CleanupStack::PopAndDestroy( &handles ); // - handles
+ CleanupStack::PopAndDestroy( &context ); // - context
- PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderEnumerator::AddReferencesL" ) );
+ PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderEnumerator::ResetObjectFormatSubCodeL" ) );
}
//end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidergetformatcapabilities.cpp Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* 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 <mtp/cmtptypeinterdependentpropdesc.h>
-
-#include "cabstractmediamtpdataprovidergetformatcapabilities.h"
-
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetFormatCapabilities::NewL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-
-MMmRequestProcessor* CAbstractMediaMtpDataProviderGetFormatCapabilities::NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig )
- {
- CAbstractMediaMtpDataProviderGetFormatCapabilities* self =
- new ( ELeave ) CAbstractMediaMtpDataProviderGetFormatCapabilities( aFramework,
- aConnection,
- aDpConfig );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetFormatCapabilities::ConstructL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-void CAbstractMediaMtpDataProviderGetFormatCapabilities::ConstructL()
- {
- CGetFormatCapabilities::ConstructL();
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetFormatCapabilities::~CAbstractMediaMtpDataProviderGetFormatCapabilities()
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CAbstractMediaMtpDataProviderGetFormatCapabilities::~CAbstractMediaMtpDataProviderGetFormatCapabilities()
- {
-
- }
-
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetFormatCapabilities::CAbstractMediaMtpDataProviderGetFormatCapabilities
-// Standard c++ constructor
-// -----------------------------------------------------------------------------
-//
-CAbstractMediaMtpDataProviderGetFormatCapabilities::CAbstractMediaMtpDataProviderGetFormatCapabilities( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig ) :
- CGetFormatCapabilities( aFramework, aConnection, aDpConfig )
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetFormatCapabilities::ServiceInterdepentPropDesc
-//
-// -----------------------------------------------------------------------------
-//
-void CAbstractMediaMtpDataProviderGetFormatCapabilities::ServiceInterdepentPropDescL()
- {
- iInterdependentPropDesc = CMTPTypeInterdependentPropDesc::NewL();
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetFormatCapabilities::ServiceSpecificObjectPropertyL
-// Service specific object property
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CAbstractMediaMtpDataProviderGetFormatCapabilities::ServiceSpecificPropertyDescL( TUint16 aPropCode )
- {
- return NULL;
- }
-
-
-// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidergetinterdependentpropdesc.cpp Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-/*
-* 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: Implement the operation: GetInterdenpendentPropDesc
-*
-*/
-
-
-#include <mtp/tmtptyperequest.h>
-#include <mtp/mtpdatatypeconstants.h>
-#include <mtp/mmtpdataproviderframework.h>
-#include <mtp/mmtpobjectmgr.h>
-#include <mtp/cmtpobjectmetadata.h>
-#include <mtp/cmtptypestring.h>
-#include <mtp/cmtptypeobjectpropdesc.h>
-#include <mtp/cmtptypeinterdependentpropdesc.h>
-
-#include "cabstractmediamtpdataprovidergetinterdependentpropdesc.h"
-#include "cmmmtpdpmetadataaccesswrapper.h"
-#include "tmmmtpdppanic.h"
-#include "abstractmediamtpdataproviderconst.h"
-#include "mmmtpdplogger.h"
-#include "mmmtpdpconfig.h"
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetInterdependentPropDesc::NewL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-MMmRequestProcessor* CAbstractMediaMtpDataProviderGetInterdependentPropDesc::NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& /*aDpConfig*/ )
- {
- CAbstractMediaMtpDataProviderGetInterdependentPropDesc* self =
- new ( ELeave ) CAbstractMediaMtpDataProviderGetInterdependentPropDesc( aFramework,
- aConnection );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetInterdependentPropDesc::ConstructL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-void CAbstractMediaMtpDataProviderGetInterdependentPropDesc::ConstructL()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetInterdependentPropDesc::~CAbstractMediaMtpDataProviderGetInterdependentPropDesc
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CAbstractMediaMtpDataProviderGetInterdependentPropDesc::~CAbstractMediaMtpDataProviderGetInterdependentPropDesc()
- {
- delete iDataset;
- }
-
-// -----------------------------------------------------------------------------
-// CMTPGetInterdependentPropDesc::CMTPGetInterdependentPropDesc
-// Standard c++ constructor
-// -----------------------------------------------------------------------------
-//
-CAbstractMediaMtpDataProviderGetInterdependentPropDesc::CAbstractMediaMtpDataProviderGetInterdependentPropDesc( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection ) :
- CRequestProcessor( aFramework, aConnection, 0, NULL )
- {
- PRINT( _L( "Operation: GetInterdependentPropDesc(0x9807)" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetInterdependentPropDesc::CheckRequestL
-// Verify the reqeust and returns it
-// -----------------------------------------------------------------------------
-//
-TMTPResponseCode CAbstractMediaMtpDataProviderGetInterdependentPropDesc::CheckRequestL()
- {
- TMTPResponseCode responseCode = CRequestProcessor::CheckRequestL();
- iFormatCode = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
-
- if ( EMTPRespCodeOK == responseCode )
- {
- TInt count = sizeof( KAbstractMediaMtpDataProviderSupportedFormats ) / sizeof( TUint16 );
-
- responseCode = EMTPRespCodeInvalidObjectFormatCode;
-
- for ( TInt i = 0; i < count; i++ )
- {
- if ( iFormatCode == KAbstractMediaMtpDataProviderSupportedFormats[i] )
- {
- responseCode = EMTPRespCodeOK;
- break;
- }
- }
- }
-
- return responseCode;
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetInterdependentPropDesc::ServiceL
-// service a request at request phase
-// -----------------------------------------------------------------------------
-//
-void CAbstractMediaMtpDataProviderGetInterdependentPropDesc::ServiceL()
- {
- PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderGetInterdependentPropDesc::ServiceL" ) );
-
- // Clear the data set.
- delete iDataset;
- iDataset = NULL;
- iDataset = CMTPTypeInterdependentPropDesc::NewL();
-
- PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderGetInterdependentPropDesc::ServiceL don't have interdependent properties!" ) );
-
- // Send the dataset.
- SendDataL( *iDataset );
- PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderGetInterdependentPropDesc::ServiceL" ) );
- }
-
-// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidergetobjectpropdesc.cpp Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* 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: Implement the operation: GetObjectPropDesc
-*
-*/
-
-#include <mtp/cmtptypeobjectpropdesc.h>
-#include <mtp/mtpprotocolconstants.h>
-
-#include "cabstractmediamtpdataprovidergetobjectpropdesc.h"
-#include "mmmtpdplogger.h"
-#include "abstractmediamtpdataproviderconst.h"
-#include "mmmtpdpdefs.h"
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetObjectPropDesc::NewL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-MMmRequestProcessor* CAbstractMediaMtpDataProviderGetObjectPropDesc::NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig )
- {
- CAbstractMediaMtpDataProviderGetObjectPropDesc* self =
- new ( ELeave ) CAbstractMediaMtpDataProviderGetObjectPropDesc( aFramework,
- aConnection,
- aDpConfig );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetObjectPropDesc::ConstructL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-void CAbstractMediaMtpDataProviderGetObjectPropDesc::ConstructL()
- {
- CGetObjectPropDesc::ConstructL();
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetObjectPropDesc::~CAbstractMediaMtpDataProviderGetObjectPropDesc
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CAbstractMediaMtpDataProviderGetObjectPropDesc::~CAbstractMediaMtpDataProviderGetObjectPropDesc()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetObjectPropDesc::CAbstractMediaMtpDataProviderGetObjectPropDesc
-// Standard c++ constructor
-// -----------------------------------------------------------------------------
-//
-CAbstractMediaMtpDataProviderGetObjectPropDesc::CAbstractMediaMtpDataProviderGetObjectPropDesc( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig ) :
- CGetObjectPropDesc( aFramework, aConnection, aDpConfig )
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderGetObjectPropDesc::ServiceSpecificObjectPropertyL
-//
-// -----------------------------------------------------------------------------
-//
-void CAbstractMediaMtpDataProviderGetObjectPropDesc::ServiceSpecificObjectPropertyL( TUint16 /*aPropCode*/ )
- {
- PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderGetObjectPropDesc::ServiceSpecificObjectPropertyL leave with not supportd" ) );
- User::Leave( KErrNotSupported );
- }
-
-// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidergetobjectproplist.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidergetobjectproplist.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,6 +16,10 @@
*/
+#include <mtp/cmtptypeobjectproplist.h>
+#include <mtp/cmtptypearray.h>
+#include <f32file.h>
+
#include "cabstractmediamtpdataprovidergetobjectproplist.h"
#include "abstractmediamtpdataproviderconst.h"
#include "mmmtpdplogger.h"
@@ -50,7 +54,7 @@
//
CAbstractMediaMtpDataProviderGetObjectPropList::~CAbstractMediaMtpDataProviderGetObjectPropList()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -61,9 +65,9 @@
CAbstractMediaMtpDataProviderGetObjectPropList::CAbstractMediaMtpDataProviderGetObjectPropList( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig ) :
- CGetObjectPropList( aFramework, aConnection, aDpConfig )
+ CGetObjectPropList( aFramework, aConnection, aDpConfig )
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -81,11 +85,70 @@
// do nothing here, just leave, as this should never be invoked or invalid propcode
// -----------------------------------------------------------------------------
//
-TInt CAbstractMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL( TUint16 /*aPropCode*/,
- TUint32 /*aHandle*/ )
+TInt CAbstractMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL( TUint16 aPropCode,
+ TUint32 aHandle )
{
- PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL, leave with KErrNotSupported" ) );
- return KErrNotSupported;
+ PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL" ) );
+ TInt err = KErrNone;
+ switch ( aPropCode )
+ {
+ case EMTPObjectPropCodeRepresentativeSampleFormat:
+ {
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EValue, 0 );
+ }
+ break;
+ case EMTPObjectPropCodeRepresentativeSampleSize:
+ case EMTPObjectPropCodeRepresentativeSampleHeight:
+ case EMTPObjectPropCodeRepresentativeSampleWidth:
+ {
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, 0 );
+ }
+ break;
+ case EMTPObjectPropCodeRepresentativeSampleData:
+ {
+ const TDesC& suid( iObject->DesC( CMTPObjectMetaData::ESuid ) );
+ CMTPTypeArray* desData = CMTPTypeArray::NewLC( EMTPTypeAUINT8 ); // + desData
+
+ RFile sampleFile;
+ TInt err = sampleFile.Open( iFramework.Fs(), suid, EFileShareReadersOnly );
+ PRINT2( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData open filename=%S, err=%d" ), &suid, err );
+
+ CleanupClosePushL( sampleFile ); // + sampleFile
+ TInt size = 0;
+ if( err == KErrNone )
+ {
+ err = sampleFile.Size( size );
+ }
+ PRINT2( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData sampleFile.Size size=%d, err=%d" ), size, err );
+ if( err == KErrNone && size > 0 )
+ {
+ HBufC8* sampleData = HBufC8::NewLC( size * sizeof( TUint8 ) ); // + sampleData
+ TPtr8 samplePtr = sampleData->Des();
+ err = sampleFile.Read( samplePtr );
+ PRINT1( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData sampleFile.Read err=%d" ), err );
+ PRINT1( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData samplePtr.Size=%d" ), samplePtr.Size() );
+ if( err == KErrNone )
+ {
+ desData->SetByDesL( samplePtr );
+ }
+ CleanupStack::PopAndDestroy( sampleData ); // - sampleData
+ }
+ iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
+ iPropertyElement->SetArrayL( CMTPTypeObjectPropListElement::EValue, *desData );
+
+ CleanupStack::PopAndDestroy( &sampleFile ); // - sampleFile
+ CleanupStack::PopAndDestroy( desData ); // - desData
+ }
+ break;
+
+ default:
+ err = KErrNotSupported;
+ }
+
+ PRINT1( _L( "MM MTP <= CAbstractMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL, err = %d" ), err );
+ return err;
}
// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidergetobjectpropvalue.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidergetobjectpropvalue.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,6 +16,9 @@
*/
+#include <mtp/cmtptypearray.h>
+#include <f32file.h>
+
#include "cabstractmediamtpdataprovidergetobjectpropvalue.h"
#include "abstractmediamtpdataproviderconst.h"
#include "mmmtpdplogger.h"
@@ -49,7 +52,7 @@
//
void CAbstractMediaMtpDataProviderGetObjectPropValue::ConstructL()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -59,7 +62,7 @@
//
CAbstractMediaMtpDataProviderGetObjectPropValue::~CAbstractMediaMtpDataProviderGetObjectPropValue()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -72,7 +75,7 @@
MMmMtpDpConfig& aDpConfig ) :
CGetObjectPropValue( aFramework, aConnection, aDpConfig )
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -81,10 +84,64 @@
// invoked or invalid propcode
// -----------------------------------------------------------------------------
//
-void CAbstractMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL( TUint16 /*aPropCode*/ )
+void CAbstractMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL( TUint16 aPropCode )
{
- PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL, leave with KErrNotSupported"));
- User::Leave( KErrNotSupported );
+ PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL" ) );
+ switch ( aPropCode )
+ {
+ case EMTPObjectPropCodeRepresentativeSampleFormat:
+ {
+ iMTPTypeUint16.Set( 0 );
+ SendDataL( iMTPTypeUint16 );
+ }
+ break;
+
+ case EMTPObjectPropCodeRepresentativeSampleSize: // fall through
+ case EMTPObjectPropCodeRepresentativeSampleHeight: // fall through
+ case EMTPObjectPropCodeRepresentativeSampleWidth:
+ {
+ iMTPTypeUint32.Set( 0 );
+ SendDataL( iMTPTypeUint32 );
+ }
+ break;
+
+ case EMTPObjectPropCodeRepresentativeSampleData:
+ {
+ if ( iMTPTypeArray != NULL )
+ {
+ delete iMTPTypeArray;
+ iMTPTypeArray = NULL;
+ }
+ iMTPTypeArray = CMTPTypeArray::NewL( EMTPTypeAUINT8 );
+
+ const TDesC& suid = iObjectInfo->DesC( CMTPObjectMetaData::ESuid );
+ PRINT1( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData file suid=%S" ), &suid );
+ RFile sampleFile;
+ User::LeaveIfError( sampleFile.Open( iFramework.Fs(), suid, EFileShareReadersOnly ) );
+ CleanupClosePushL( sampleFile ); // + sampleFile
+
+ TInt size = 0;
+ User::LeaveIfError( sampleFile.Size( size ) );
+ PRINT1( _L( "MM MTP <> EMTPObjectPropCodeRepresentativeSampleData sampleFile.Size() size=%d" ), size );
+
+ if( size > 0 )
+ {
+ HBufC8* sampleData = HBufC8::NewLC( size * sizeof(TUint8) ); // + sampleData
+ TPtr8 samplePtr = sampleData->Des();
+ User::LeaveIfError( sampleFile.Read( samplePtr ) );
+ iMTPTypeArray->SetByDesL( samplePtr );
+ CleanupStack::PopAndDestroy( sampleData ); // - sampleData
+ }
+ CleanupStack::PopAndDestroy( &sampleFile ); // - sampleFile
+
+ SendDataL( *iMTPTypeArray );
+ }
+ break;
+
+ default:
+ PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL, leave with KErrNotSupported"));
+ User::Leave( KErrNotSupported );
+ }
}
// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidermoveobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidermoveobject.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -61,7 +61,7 @@
//
CAbstractMediaMtpDataProviderMoveObject::~CAbstractMediaMtpDataProviderMoveObject()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -74,7 +74,7 @@
MMmMtpDpConfig& aDpConfig ) :
CMoveObject( aFramework, aConnection, aDpConfig )
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -87,21 +87,10 @@
const CMTPObjectMetaData& /*aObject*/ )
{
PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderMoveObject::ServiceGetSpecificObjectPropertyL" ) );
- // do nothing
- }
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderMoveObject::ServiceSetSpecificObjectPropertyL
-// do nothing here
-// -----------------------------------------------------------------------------
-//
-TMTPResponseCode CAbstractMediaMtpDataProviderMoveObject::ServiceSetSpecificObjectPropertyL( TUint16 /*aPropCode*/,
- const CMTPObjectMetaData& /*aObject*/,
- const CMTPTypeObjectPropListElement& /*aElement*/ )
- {
- PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderMoveObject::ServiceSetSpecificObjectPropertyL" ) );
+ // Do nothing now.
+ // May need add implementation here for further extension.
- return EMTPRespCodeOK;
}
// end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderpropertysettingutility.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,95 @@
+/*
+ * 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 <mtp/cmtptypeobjectproplist.h>
+#include <mtp/mtpprotocolconstants.h>
+#include <mtp/mtpdatatypeconstants.h>
+#include <mtp/cmtptypearray.h>
+
+#include "cabstractmediamtpdataproviderpropertysettingutility.h"
+#include "mmmtpdplogger.h"
+
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProviderPropertySettingUtility::NewL
+// Two-phase construction method
+// -----------------------------------------------------------------------------
+//
+CAbstractMediaMtpDataProviderPropertySettingUtility* CAbstractMediaMtpDataProviderPropertySettingUtility::NewL()
+ {
+ CAbstractMediaMtpDataProviderPropertySettingUtility* self =
+ new ( ELeave ) CAbstractMediaMtpDataProviderPropertySettingUtility();
+
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProviderPropertySettingUtility::~CAbstractMediaMtpDataProviderPropertySettingUtility
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CAbstractMediaMtpDataProviderPropertySettingUtility::~CAbstractMediaMtpDataProviderPropertySettingUtility()
+ {
+ // Do nothing
+ }
+
+// -----------------------------------------------------------------------------
+// CAbstractMediaMtpDataProviderPropertySettingUtility::CAbstractMediaMtpDataProviderPropertySettingUtility
+// Standard C++ Constructor
+// -----------------------------------------------------------------------------
+//
+CAbstractMediaMtpDataProviderPropertySettingUtility::CAbstractMediaMtpDataProviderPropertySettingUtility()
+ {
+ // Do nothing
+ }
+
+TMTPResponseCode CAbstractMediaMtpDataProviderPropertySettingUtility::SetSpecificObjectPropertyL( MMmMtpDpConfig& aDpConfig,
+ TUint16 aPropCode,
+ const CMTPObjectMetaData& aObject,
+ const CMTPTypeObjectPropListElement& aElement )
+ {
+ PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderPropertySettingUtility::SetSpecificObjectPropertyL" ) );
+
+ TMTPResponseCode responseCode = EMTPRespCodeOK;
+
+ switch ( aPropCode )
+ {
+ case EMTPObjectPropCodeRepresentativeSampleData:
+ {
+ CMTPTypeArray* desData = CMTPTypeArray::NewLC( EMTPTypeAUINT8 );
+ desData->SetByDesL( aElement.ArrayL( CMTPTypeObjectPropListElement::EValue ) );
+ responseCode = SetMetaDataToWrapper( aDpConfig, aPropCode, *desData, aObject );
+ CleanupStack::PopAndDestroy( desData );
+ }
+ break;
+
+ case EMTPObjectPropCodeRepresentativeSampleFormat:
+ case EMTPObjectPropCodeRepresentativeSampleSize:
+ case EMTPObjectPropCodeRepresentativeSampleHeight:
+ case EMTPObjectPropCodeRepresentativeSampleWidth:
+ // no place to store, do nothing. reserve here for future usage
+ break;
+
+ default:
+ // Should not happen, property code should have been checked before set to store.
+ User::Leave( KErrNotSupported );
+ }
+
+ PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderPropertySettingUtility::SetSpecificObjectPropertyL" ) );
+ return responseCode;
+ }
+
+// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderrenameobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataproviderrenameobject.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -17,10 +17,9 @@
#include <badesca.h>
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/mmtpobjectmgr.h>
+#include <mtp/tmtptypeuint32.h>
#include <mtp/cmtpobjectmetadata.h>
-#include <mtp/tmtptypeuint32.h>
#include "cabstractmediamtpdataproviderrenameobject.h"
#include "mmmtpdplogger.h"
@@ -53,9 +52,9 @@
//
CAbstractMediaMtpDataProviderRenameObject::CAbstractMediaMtpDataProviderRenameObject( MMTPDataProviderFramework& aFramework,
CMmMtpDpMetadataAccessWrapper& aWrapper ) :
- CRenameObject( aFramework, aWrapper )
+ CRenameObject( aFramework, aWrapper )
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -65,7 +64,7 @@
//
CAbstractMediaMtpDataProviderRenameObject::~CAbstractMediaMtpDataProviderRenameObject()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -90,14 +89,12 @@
iWrapper.AddDummyFileL( iFileName );
// Do not update MPX db to keep the same behavior in mass storage and device file manager.
}
- else
- {
- TRAPD( err, iWrapper.RenameObjectL( iOldFileName, iFileName ) );
+
+ TRAPD( err, iWrapper.RenameObjectL( *iObjectInfo, iFileName ) );
- // should not fail for 1 file, keep it going, as folder already renamed
- if ( err != KErrNone )
- PRINT1( _L( "MM MTP <> CRenameObject::PerformAdditionalActionL err = %d" ), err );
- }
+ // should not fail for 1 file, keep it going, as folder already renamed
+ if ( err != KErrNone )
+ PRINT1( _L( "MM MTP <> CRenameObject::PerformAdditionalActionL err = %d" ), err );
// the reference DB use PUID
// so we needn't to update the reference DB
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidersendobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* 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: Implement the operation: SendObjectInfo/SendObjectPropList/SendObject
-*
-*/
-
-
-#include <mtp/mmtpdataproviderframework.h>
-#include <mtp/cmtptypeobjectproplist.h>
-
-#include "cabstractmediamtpdataprovidersendobject.h"
-#include "abstractmediamtpdataproviderconst.h"
-#include "mmmtpdplogger.h"
-#include "mmmtpdpconfig.h"
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSendObject::NewL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-MMmRequestProcessor* CAbstractMediaMtpDataProviderSendObject::NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig )
- {
- CAbstractMediaMtpDataProviderSendObject* self =
- new (ELeave) CAbstractMediaMtpDataProviderSendObject( aFramework,
- aConnection,
- aDpConfig );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSendObject::~CAbstractMediaMtpDataProviderSendObject
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CAbstractMediaMtpDataProviderSendObject::~CAbstractMediaMtpDataProviderSendObject()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSendObject::CAbstractMediaMtpDataProviderSendObject
-// Standard C++ Constructor
-// -----------------------------------------------------------------------------
-//
-CAbstractMediaMtpDataProviderSendObject::CAbstractMediaMtpDataProviderSendObject( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig ) :
- CSendObject( aFramework, aConnection, aDpConfig )
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSendObject::ConstructL
-// 2nd Phase Constructor
-// -----------------------------------------------------------------------------
-//
-void CAbstractMediaMtpDataProviderSendObject::ConstructL()
- {
- CSendObject::ConstructL();
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSendObject::ServiceSpecificObjectPropertyL
-// no need to do anything here, just leave, as this should never be invoked or
-// invalid propcode
-// -----------------------------------------------------------------------------
-//
-TMTPResponseCode CAbstractMediaMtpDataProviderSendObject::SetSpecificObjectPropertyL( TUint16 /*aPropCode*/,
- const CMTPObjectMetaData& /*aObject*/,
- const CMTPTypeObjectPropListElement& /*aElement*/ )
- {
- PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderSendObject::ServiceSpecificObjectPropertyL, leave with KErrNotSupported" ) );
- User::Leave( KErrNotSupported );
-
- return EMTPRespCodeOK;
- }
-
-TMTPResponseCode CAbstractMediaMtpDataProviderSendObject::CheckSepecificPropType( TUint16 aPropCode, TUint16 aDataType )
- {
- PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderSendObject::ServiceSpecificCheckDataTypeL, leave with KErrNotSupported" ) );
- // TODO: User::Leave( KErrNotSupported );
- return EMTPRespCodeOK;
- }
-
-TInt CAbstractMediaMtpDataProviderSendObject::HandleSpecificWrapperError( TInt aError,
- const CMTPObjectMetaData& /*aObject*/ )
- {
- // do nothing, simply return the error
- return aError;
- }
-
-// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidersetobjectproplist.cpp Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* 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: Implement the operation: getobjectproplist
-*
-*/
-
-
-#include <mtp/mmtpdataproviderframework.h>
-#include <mtp/cmtptypeobjectproplist.h>
-
-#include "cabstractmediamtpdataprovidersetobjectproplist.h"
-#include "abstractmediamtpdataproviderconst.h"
-#include "mmmtpdplogger.h"
-#include "mmmtpdpconfig.h"
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSetObjectPropList::NewL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-MMmRequestProcessor* CAbstractMediaMtpDataProviderSetObjectPropList::NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig )
- {
- CAbstractMediaMtpDataProviderSetObjectPropList* self =
- new (ELeave) CAbstractMediaMtpDataProviderSetObjectPropList( aFramework,
- aConnection,
- aDpConfig );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSetObjectPropList::~CAbstractMediaMtpDataProviderSetObjectPropList
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CAbstractMediaMtpDataProviderSetObjectPropList::~CAbstractMediaMtpDataProviderSetObjectPropList()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSetObjectPropList::CAbstractMediaMtpDataProviderSetObjectPropList
-// Standard C++ Constructor
-// -----------------------------------------------------------------------------
-//
-CAbstractMediaMtpDataProviderSetObjectPropList::CAbstractMediaMtpDataProviderSetObjectPropList( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig ) :
- CSetObjectPropList( aFramework, aConnection, aDpConfig )
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSetObjectPropList::ConstructL
-// 2nd Phase Constructor
-// -----------------------------------------------------------------------------
-//
-void CAbstractMediaMtpDataProviderSetObjectPropList::ConstructL()
- {
- CSetObjectPropList::ConstructL();
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSetObjectPropList::ServiceSpecificObjectPropertyL
-// no need to do anything here, just leave, as this should never be invoked or
-// invalid propcode
-// -----------------------------------------------------------------------------
-//
-TMTPResponseCode CAbstractMediaMtpDataProviderSetObjectPropList::ServiceSpecificObjectPropertyL( TUint16 /*aPropCode*/,
- const CMTPObjectMetaData& /*aObject*/,
- const CMTPTypeObjectPropListElement& /*aElement*/ )
- {
- PRINT( _L( "MM MTP <> CAbstractMediaMtpDataProviderSetObjectPropList::ServiceSpecificObjectPropertyL, leave with KErrNotSupported" ) );
- User::Leave( KErrNotSupported );
-
- return EMTPRespCodeOK;
- }
-
-TInt CAbstractMediaMtpDataProviderSetObjectPropList::HandleSpecificWrapperError( TInt aError,
- const CMTPObjectMetaData& /*aObject*/ )
- {
- // do nothing, simply return the error
- return aError;
- }
-
-// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidersetobjectpropvalue.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidersetobjectpropvalue.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,6 +16,8 @@
*/
+#include <mtp/cmtptypearray.h>
+
#include "cabstractmediamtpdataprovidersetobjectpropvalue.h"
#include "abstractmediamtpdataproviderconst.h"
#include "mmmtpdplogger.h"
@@ -49,7 +51,7 @@
//
void CAbstractMediaMtpDataProviderSetObjectPropValue::ConstructL()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -60,9 +62,9 @@
CAbstractMediaMtpDataProviderSetObjectPropValue::CAbstractMediaMtpDataProviderSetObjectPropValue( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig ) :
- CSetObjectPropValue( aFramework, aConnection, aDpConfig )
+ CSetObjectPropValue( aFramework, aConnection, aDpConfig )
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -72,7 +74,7 @@
//
CAbstractMediaMtpDataProviderSetObjectPropValue::~CAbstractMediaMtpDataProviderSetObjectPropValue()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -81,9 +83,22 @@
// invalid propcode
// -----------------------------------------------------------------------------
//
-TBool CAbstractMediaMtpDataProviderSetObjectPropValue::IsSpecificPropCodeReadOnly( TUint16 /*aPropCode*/ ) const
+TBool CAbstractMediaMtpDataProviderSetObjectPropValue::IsSpecificPropCodeReadOnly( TUint16 aPropCode ) const
{
- return EFalse;
+ TBool ret = EFalse;
+ switch ( aPropCode )
+ {
+ case EMTPObjectPropCodeRepresentativeSampleFormat:
+ case EMTPObjectPropCodeRepresentativeSampleSize:
+ case EMTPObjectPropCodeRepresentativeSampleHeight:
+ case EMTPObjectPropCodeRepresentativeSampleWidth:
+ ret = ETrue;
+ break;
+ default:
+ ret = EFalse;
+ break;
+ }
+ return ret;
}
// -----------------------------------------------------------------------------
@@ -92,10 +107,24 @@
// invalid propcode
// -----------------------------------------------------------------------------
//
-void CAbstractMediaMtpDataProviderSetObjectPropValue::ReceiveDataSpecificObjectPropertyL( TUint16 /*aPropCode*/ )
+void CAbstractMediaMtpDataProviderSetObjectPropValue::ReceiveDataSpecificObjectPropertyL( TUint16 aPropCode )
{
- PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderSetObjectPropValue::ReceiveDataSpecificObjectPropertyL leave with KErrNotSupported" ) );
- User::Leave( KErrNotSupported );
+ PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderSetObjectPropValue::ReceiveDataSpecificObjectPropertyL" ) );
+ if ( aPropCode == EMTPObjectPropCodeRepresentativeSampleData )
+ {
+ delete iMTPTypeArray;
+ iMTPTypeArray = NULL;
+
+ iMTPTypeArray = CMTPTypeArray::NewL( EMTPTypeAUINT8 );
+ ReceiveDataL( *iMTPTypeArray );
+ }
+ else
+ {
+ PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderSetObjectPropValue::ReceiveDataSpecificObjectPropertyL leave with KErrNotSupported" ) );
+ // Do nothing now.
+ // May need add implementation here for further extension.
+ User::Leave( KErrNotSupported );
+ }
}
// -----------------------------------------------------------------------------
@@ -104,12 +133,26 @@
// invalid propcode
// -----------------------------------------------------------------------------
//
-TMTPResponseCode CAbstractMediaMtpDataProviderSetObjectPropValue::ServiceSpecificObjectPropertyL( TUint16 /*aPropCode*/ )
+TMTPResponseCode CAbstractMediaMtpDataProviderSetObjectPropValue::ServiceSpecificObjectPropertyL( TUint16 aPropCode )
{
- PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderSetObjectPropValue::ServiceSpecificObjectPropertyL leave with KErrNotSupported" ) );
- User::Leave( KErrNotSupported );
+ PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderSetObjectPropValue::ServiceSpecificObjectPropertyL" ) );
+ TMTPResponseCode responseCode = EMTPRespCodeOK;
- return EMTPRespCodeOK;
+ if ( aPropCode == EMTPObjectPropCodeRepresentativeSampleData )
+ {
+ responseCode = ServiceMetaDataToWrapperL( aPropCode,
+ *iMTPTypeArray,
+ *iObjectInfo );
+ }
+ else
+ {
+ PRINT( _L( "MM MTP => CAbstractMediaMtpDataProviderSetObjectPropValue::ServiceSpecificObjectPropertyL leave with KErrNotSupported" ) );
+ // Do nothing now.
+ // May need add implementation here for further extension.
+ User::Leave( KErrNotSupported );
+ }
+ PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProviderSetObjectPropValue::ServiceSpecificObjectPropertyL" ) );
+ return responseCode;
}
// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/abstractmediamtpdataprovider/src/cabstractmediamtpdataprovidersetobjectreferences.cpp Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
-* 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: Implement the operation: SetObjectReferences
-*
-*/
-
-
-#include "cabstractmediamtpdataprovidersetobjectreferences.h"
-#include "abstractmediamtpdataproviderconst.h"
-#include "cmmmtpdpmetadataaccesswrapper.h"
-#include "mmmtpdplogger.h"
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSetObjectReferences::NewL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-MMmRequestProcessor* CAbstractMediaMtpDataProviderSetObjectReferences::NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig )
- {
- CAbstractMediaMtpDataProviderSetObjectReferences* self =
- new ( ELeave ) CAbstractMediaMtpDataProviderSetObjectReferences( aFramework,
- aConnection,
- aDpConfig );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSetObjectReferences::ConstructL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-void CAbstractMediaMtpDataProviderSetObjectReferences::ConstructL()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSetObjectReferences::~CAbstractMediaMtpDataProviderSetObjectReferences
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CAbstractMediaMtpDataProviderSetObjectReferences::~CAbstractMediaMtpDataProviderSetObjectReferences()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSetObjectReferences::CAbstractMediaMtpDataProviderSetObjectReferences
-// Standard c++ constructor
-// -----------------------------------------------------------------------------
-//
-CAbstractMediaMtpDataProviderSetObjectReferences::CAbstractMediaMtpDataProviderSetObjectReferences( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig ) :
- CSetObjectReferences( aFramework, aConnection, aDpConfig )
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CAbstractMediaMtpDataProviderSetObjectReferences::DoSetObjectReferencesL
-// set references to DB
-// -----------------------------------------------------------------------------
-//
-void CAbstractMediaMtpDataProviderSetObjectReferences::DoSetObjectReferencesL( CMmMtpDpMetadataAccessWrapper& aWrapper,
- TUint16 aObjectFormat,
- const TDesC& aSrcFileName,
- CDesCArray& aRefFileArray )
- {
- TInt count = sizeof( KAbstractMediaMtpDataProviderSupportedFormats ) / sizeof (TUint16);
- TBool supported = EFalse;
-
- for( TInt i = 0; i < count; i++ )
- {
- if( KAbstractMediaMtpDataProviderSupportedFormats[i] == aObjectFormat )
- {
- supported = ETrue;
- break;
- }
- }
-
- if ( supported )
- {
- aWrapper.SetPlaylistL( aSrcFileName, aRefFileArray );
- }
- }
-
-// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/data/mediamtpdataprovider_config.rss Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/data/mediamtpdataprovider_config.rss Wed Jun 23 17:51:16 2010 +0100
@@ -17,24 +17,15 @@
#include <mtp/mtpdataproviderconfig.rh>
-#include "mediamtpdataprovider_config.rh"
RESOURCE MTP_DATA_PROVIDER dpConfig
{
type = KMTPDataProviderTypeECOM;
major_version = 1;
object_enumeration_persistent = 0;
- supported_modes = KMTPModeMTP;
+ supported_modes = KMTPModeMTP;
server_name = "";
server_image_name = "";
- opaque_resource = "folderConfig";
+ opaque_resource = 0;
enumeration_phase = 11;
}
-
-RESOURCE MEDIAMTPDATAPROVIDE_CONFIG folderConfig
- {
- media_drive = 4; // 2 change to SD card
- }
-
-
-
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/group/mediamtpdataprovider.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/group/mediamtpdataprovider.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -40,16 +40,15 @@
SOURCE mediamtpdataprovidercontrollerimp.cpp
SOURCE mediamtpdataproviderprocessor.cpp
SOURCE cmediamtpdataproviderenumerator.cpp
-SOURCE cmediamtpdataprovidergetobjectpropdesc.cpp
-SOURCE cmediamtpdataprovidergetinterdependentpropdesc.cpp
SOURCE cmediamtpdataprovidergetobjectpropvalue.cpp
SOURCE cmediamtpdataprovidergetobjectproplist.cpp
SOURCE cmediamtpdataprovidersetobjectpropvalue.cpp
-SOURCE cmediamtpdataprovidersetobjectproplist.cpp
+
SOURCE cmediamtpdataprovidercopyobject.cpp
SOURCE cmediamtpdataprovidermoveobject.cpp
-SOURCE cmediamtpdataprovidersendobject.cpp
-SOURCE cmediamtpdataprovidergetformatcapabilities.cpp
+SOURCE cmediamtpdataproviderpropertysettingutility.cpp
+SOURCE cmediamtpdataproviderdescriptionutility.cpp
+
SOURCEPATH ../data
START RESOURCE mediamtpdataprovider.rss
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovider.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovider.h Wed Jun 23 17:51:16 2010 +0100
@@ -69,6 +69,16 @@
*/
CMmMtpDpMetadataAccessWrapper& GetWrapperL();
+ /**
+ * @return The utility to setting properties
+ */
+ CPropertySettingUtility* PropSettingUtility();
+
+ /**
+ * @return The utiltiy to setting descriptions
+ */
+ CDescriptionUtility* DescriptionUtility();
+
protected:
// from CMTPDataProviderPlugin
void Cancel();
@@ -103,6 +113,12 @@
*/
void RenameObjectL( const TMTPNotificationParamsHandle& aObject );
+ /**
+ * Notify the data provider that the object has been added
+ * @param aObjectHandle the added object handle
+ */
+ void ObjectAddedL( TUint32 aObjectHandle );
+
void StartObjectEnumerationL( TUint32 aStorageId );
void StartStorageEnumerationL();
@@ -168,6 +184,7 @@
RArray<TUint32> iPendingEnumerations;
TInt iActiveProcessor;
+ TBool iActiveProcessorRemoved;
TBool iIsSessionOpen;
CRenameObject *iRenameObject;
@@ -178,7 +195,8 @@
RArray<TUint> iSupportedPropVideo;
RArray<TUint> iSupportedPropAll;
- TUint32 iDefaultStorageId;
+ CPropertySettingUtility* iPropSettingUtility;
+ CDescriptionUtility* iDescriptionUtility;
};
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovidercopyobject.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovidercopyobject.h Wed Jun 23 17:51:16 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
@@ -65,10 +65,6 @@
TUint32 aHandle,
const CMTPObjectMetaData& aObject );
- TMTPResponseCode ServiceSetSpecificObjectPropertyL( TUint16 aPropCode,
- const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement );
-
};
#endif // CMEDIAMTPDATAPROVIDERCOPYOBJECT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataproviderdescriptionutility.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,133 @@
+/*
+* 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: Media dp specific property description construction utility.
+* Used by all request processors which related to property description
+*
+*/
+
+#ifndef CMEDIAMTPDATAPROVIDERDESCRIPTIONUTILITY_H
+#define CMEDIAMTPDATAPROVIDERDESCRIPTIONUTILITY_H
+
+#include "cdescriptionutility.h"
+
+class CMTPTypeInterdependentPropDesc;
+class CMTPTypeObjectPropDesc;
+
+class CMediaMtpDataProviderDescriptionUtility : public CDescriptionUtility
+ {
+public:
+ static CMediaMtpDataProviderDescriptionUtility* NewL();
+
+private:
+ CMediaMtpDataProviderDescriptionUtility();
+
+public:
+ /**
+ * Construct media dp specific interdependent property description.
+ * according to assigned format code.
+ * @param aFormatCode
+ * @return Interdependent property description dataset.
+ */
+ CMTPTypeInterdependentPropDesc* NewInterdepentPropDescL( MMmMtpDpConfig& aDpConfig, TUint aFormatCode );
+
+ /**
+ * Construct media dp specific property description
+ * according to assigned format code and property code.
+ * @param aFormatCode
+ * @param aPropCode
+ * @return Property description dataset.
+ */
+ CMTPTypeObjectPropDesc* NewSpecificPropDescL( TUint aFormatCode, TUint16 aPropCode );
+
+private:
+
+ /**
+ * Append WM Audio specific to interdpendent property description.
+ * @return None
+ */
+ void AppendWMAudioInterdepentPropDescL(CMTPTypeInterdependentPropDesc* aInterdependentPropDesc);
+
+ /**
+ * Construct audio wave codec property description.
+ * @param aFormatCode
+ * @return Property description dataset of audio wave codec.
+ */
+ CMTPTypeObjectPropDesc* NewAudioWaveCodecPropDescL( TUint aFormatCode );
+
+ /**
+ * Construct audio bitrate property description.
+ * @param aFormatCode, The format code
+ * @return Property description dataset of audio bitrate.
+ */
+ CMTPTypeObjectPropDesc* NewAudioBitratePropDescL( TUint aFormatCode );
+
+ /**
+ * Construct property description of video fourCC codec.
+ * @param aFormatCode, The format code
+ * @return Property description dataset of video fourCC codec.
+ */
+ CMTPTypeObjectPropDesc* NewVideoFourCCCodecPropDescL( TUint aFormatCode );
+
+ /**
+ * Construct property description of VideoBitrate.
+ * @param aFormatCode, The format code
+ * @return Property description dataset of video bitrate.
+ */
+ CMTPTypeObjectPropDesc* NewVideoBitratePropDescL( TUint aFormatCode );
+
+ /**
+ * Construct property description of number of channels.
+ * @return Property description dataset of number of channels.
+ */
+ CMTPTypeObjectPropDesc* NewNumberOfChannelsPropDescL();
+
+ /**
+ * Construct property description of code sample rate.
+ * @return Property description dataset of sample rate.
+ */
+ CMTPTypeObjectPropDesc* NewCodeSampleRatePropDescL();
+
+ /**
+ * Construct property description of description.
+ * @return Property description dataset of description.
+ */
+ CMTPTypeObjectPropDesc* NewDescriptionPropDescL();
+
+ /**
+ * Construct property description of scan type description.
+ * @return Property description dataset of scan type description.
+ */
+ CMTPTypeObjectPropDesc* NewScanTypeDescriptionPropDescL();
+
+ /**
+ * Construct property description of encoding profile description.
+ * @return Property description dataset of encoding profile description.
+ */
+ CMTPTypeObjectPropDesc* NewEncodingProfileDescriptionPropDescL();
+
+ /**
+ * Construct property description of DRM status.
+ * @return Property description dataset of drm status.
+ */
+ CMTPTypeObjectPropDesc* NewDRMStatusPropDescL();
+
+ /**
+ * Construct property description of OMADRM status.
+ * @return Property description dataset of oma drm status.
+ */
+ CMTPTypeObjectPropDesc* NewOMADRMStatusPropDescL();
+
+ };
+
+#endif // CMEDIAMTPDATAPROVIDERDESCRIPTIONUTILITY_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataproviderenumerator.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataproviderenumerator.h Wed Jun 23 17:51:16 2010 +0100
@@ -20,21 +20,11 @@
#define CMEDIAMTPDATAPROVIDERENUMERATOR_H
#include <e32base.h>
-#include <d32dbms.h>
-
#include "mmmtpenumerationcallback.h"
#include "cmmmtpdpperflog.h"
-// keep here to avoid warning on urel
-_LIT( KDirectoryScan, "DirectoryScan" );
-_LIT( KFormatFilter, "FormatFilter" );
-_LIT( KObjectManagerObjectUid, "ObjectManagerObjectUid" );
-_LIT( KObjectManagerInsert, "ObjectManagerInsert" );
-
// Forward declarations
class MMTPDataProviderFramework;
-class MMTPObjectMgr;
-class CMTPObjectMetaData;
class CMediaMtpDataProvider;
/**
@@ -63,7 +53,7 @@
* @param aStorageId storage to be enumerated
*/
void StartL( TUint32 aStorageId );
-
+
// introduce to cleanup db at close session
void SessionClosedL();
@@ -74,6 +64,9 @@
*/
void DoCancel();
+ /**
+ * Update the mpx db flag for round trip
+ */
void RunL();
/**
@@ -98,85 +91,6 @@
void SignalCompleteL( MMTPEnumerationCallback& aCallback,
TInt aError = KErrNone );
- void ScanStorageL( TUint32 aStorageId );
-
- /**
- * Scan next storage
- */
- void ScanNextStorageL();
-
- /**
- * Scans directory at aPath recursing into subdirectories on a depth
- * first basis.
- *
- * Directory entries are kept in iDirStack - which is a LIFO stack.
- * The current path, needed since TEntries don't keep track of it,
- * is kept in iPath.
- *
- * The algorithm works as follows:
- *
- * 1. Read directory entries.
- * 2. ProcessEntriesL is called if no error occurs and >= 1 entries are
- * read.
- * 3. ProcessEntriesL adds entries to database, if entry is directory
- * add to iDirStack.
- * 4. When all entries are processed pop entry off the dirstack,
- * if entry is empty TEntry remove one directory from iPath.
- * 5. Append entry name onto iPath - to update path with new depth
- * (parent/subdir).
- * 6. Push an empty TEntry onto iDirStack - this tells us we have
- * recursed one, think of it as pushing the '\' separator onto
- * iDirStack.
- * 7. Repeat 1-7 until iDirStack is empty.
- */
- void ScanDirL();
-
- /**
- * Recurse into the next directory on the stack
- * and scan it for entries.
- */
- void ScanNextDirL();
-
- /**
- * Scan next sub dir
- */
- void ScanNextSubdirL();
-
- /**
- * Iterates iEntries adding entries as needed to object manager and
- * iDirStack.
- */
- void ProcessEntriesL();
-
- /**
- * Add a file entry to the object store
- * @param aFullFileName current scanned file path
- */
- void AddEntryL( const TDesC& aFullFileName );
-
- /**
- * Returns a TMTPFormatCode for the requested object
- */
- TMTPFormatCode GetObjectFormatCode( const TDesC& aFullFileName );
-
- /**
- * @param aFullFileName the object file name
- * @return the file if needed to be enumeratored?
- */
- TBool IsFileAccepted( const TDesC& aFullFileName );
-
- /**
- * start count system tick
- */
- void StartEnumerationCount();
-
- /**
- * check if the system tick more than predefined value
- * @retuan if more than the predefined value, return true
- * else return false
- */
- TBool IsOverThreshold();
-
/**
* Get modified content and report to Symbian MTP Framework
*/
@@ -187,28 +101,10 @@
/** MMTPDataProviderFramework used to access MTP components*/
MMTPDataProviderFramework& iFramework;
- /** MTP Object Manager */
- MMTPObjectMgr& iObjectMgr;
-
- /** MTP Data Provider ID */
- TUint iDataProviderId;
-
CMediaMtpDataProvider& iDataProvider;
- TParse iPath;
- RDir iDir;
- TEntryArray iEntries;
- TInt iFirstUnprocessed;
- RPointerArray<TEntry> iDirStack;
RArray<TUint> iStorages;
TUint32 iStorageId;
- TUint32 iParentHandle;
- TMTPFormatCode iFormatCode;
- TBool iScanningDir;
- // record the system tick
- TUint iTickCountBegin;
- TInt iTickPeriod;
-
#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
CMmMtpDpPerfLog* iPerfLog;
#endif
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovidergetformatcapabilities.h Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-/*
-* 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 CMEDIAMTPDATAPROVIDERGETFORMATCAPABILITIES_H
-#define CMEDIAMTPDATAPROVIDERGETFORMATCAPABILITIES_H
-
-#include "cgetformatcapabilities.h"
-
-class CMTPTypeObjectPropDesc;
-/**
-* Defines media data provider GetFormatCapabilities
-*/
-class CMediaMtpDataProviderGetFormatCapabilities : public CGetFormatCapabilities
- {
-public:
-
- /**
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- * @return A pointer to the created request processor object
- */
- static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * Destructor
- */
- ~CMediaMtpDataProviderGetFormatCapabilities();
-
-protected:
- // from CGetFormatCapabilities, override from baseclass
- /**
- * Service interdepent propdesc
- */
- void ServiceInterdepentPropDescL();
-
- /**
- * Service specific object property
- * @param aPropCode, The prop code
- * @return MTPType object propdesc
- */
- CMTPTypeObjectPropDesc* ServiceSpecificPropertyDescL( TUint16 aPropCode );
-
-private:
- /**
- * Standard C++ Constructor
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- */
- CMediaMtpDataProviderGetFormatCapabilities( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * two-phase construction
- */
- void ConstructL();
-
- //functions used by ServiceInterdepentPropDesc
- /**
- * Service AudioWaveCodec
- * @param aFormatCode, The format code
- * @return MTPTypeInterdependentProperties
- */
- CMTPTypeObjectPropDesc* ServiceAudioWaveCodecL();
-
- /**
- * Service AudioBitrate
- * @param aFormatCode, The format code
- * @return MTPTypeInterdependentProperties
- */
- CMTPTypeObjectPropDesc* ServiceAudioBitrateL();
-
- /**
- * Service videoFourCCCodec
- * @param aFormatCode, The format code
- * @return MTPTypeInterdependentProperties
- */
- CMTPTypeObjectPropDesc* ServiceVideoFourCCCodecL();
-
- /**
- * Service VideoBitrate
- * @param aFormatCode, The format code
- * @return MTPTypeInterdependentProperties
- */
- CMTPTypeObjectPropDesc* ServiceVideoBitrateL();
-
- /**
- * Service RangeForm Description
- * @param aMinValue The minimal value
- * @param aMaxValue The maximal value
- * @param aStepValue The step value
- * @return MTPTypeObjectPropDescRangeForm
- */
- CMTPTypeObjectPropDesc* ServiceRangeFormDescriptionL( TUint16 aPropCode,
- TUint32 aMinValue,
- TUint32 aMaxValue,
- TUint32 aStepValue,
- TBool aIsReadOnly = EFalse );
-
- //functions used by ServiceSpecificObjectPropertyL
- /**
- * Service number of channels
- * @return MTPTypeObjectPropDesc
- */
- CMTPTypeObjectPropDesc* ServiceNumberOfChannelsL();
-
- /**
- * Service code sample rate
- * @return MTPTypeObjectPropDesc
- */
- CMTPTypeObjectPropDesc* ServiceCodeSampleRateL();
-
- /**
- * Service description
- * @return MTPTypeObjectPropDesc
- */
- CMTPTypeObjectPropDesc* ServiceDescriptionL();
-
- /**
- * Service scan type description
- * @return MTPTypeObjectPropDesc
- */
- CMTPTypeObjectPropDesc* ServiceScanTypeDescriptionL();
-
- /**
- * Service encoding profile description
- * @return MTPTypeObjectPropDesc
- */
- CMTPTypeObjectPropDesc* ServiceEncodingProfileDescriptionL();
-
- /**
- * Service DRM status
- * @return MTPTypeObjectPropDesc
- */
- CMTPTypeObjectPropDesc* ServiceDRMStatusL();
-
- /**
- * Service OMADRM status
- * @return MTPTypeObjectPropDesc
- */
- CMTPTypeObjectPropDesc* ServiceOMADRMStatusL();
-
-
- };
-
-#endif // CMEDIAMTPDATAPROVIDERGETFORMATCAPABILITIES_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovidergetinterdependentpropdesc.h Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* 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 CMEDIAMTPDATAPROVIDERGETINTERDEPENTENTPROPDESC_H
-#define CMEDIAMTPDATAPROVIDERGETINTERDEPENTENTPROPDESC_H
-
-#include <mtp/cmtptypeobjectpropdesc.h>
-#include "crequestprocessor.h"
-
-class CMTPTypeInterdependentPropDesc;
-class CMTPTypeInterdependentProperties;
-class MMmMtpDpConfig;
-
-/**
-* Defines media data provider GetInterDependentPropDesc request processor
-*/
-class CMediaMtpDataProviderGetInterDependentPropDesc: public CRequestProcessor
- {
-public:
- /**
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- * @return A pointer to the created request processor object
- */
- static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * Destructor
- */
- ~CMediaMtpDataProviderGetInterDependentPropDesc();
-
-private:
- /**
- * Standard C++ Constructor
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- */
- CMediaMtpDataProviderGetInterDependentPropDesc( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection );
-
-protected:
- // from CRequestProcessor
- TMTPResponseCode CheckRequestL();
- void ServiceL();
-
-private:
- /**
- * two-phase construction
- */
- void ConstructL();
-
- void ServiceAudioWaveCodecL();
- void ServiceAudioBitrateL();
-
- void ServiceVideoFourCCCodecL();
- void ServiceVideoBitrateL();
-
- void ServiceRangeFormDescriptionL( TUint16 aPropCode,
- TUint32 aMinValue,
- TUint32 aMaxValue,
- TUint32 aStepValue,
- TBool aIsReadOnly = EFalse);
-
- void SetFormForResponseL( TUint16 aPropertyCode,
- CMTPTypeObjectPropDesc::TPropertyInfo& aPropInfo,
- const MMTPType* aForm );
-
-private:
- /** Dataset to store the prop descriptions*/
- CMTPTypeInterdependentPropDesc* iDataset;
-
- /**support configuration correctly*/
- CMTPTypeInterdependentProperties* iProperties;
-
- TUint32 iFormatCode;
-
- };
-
-#endif // CMEDIAMTPDATAPROVIDERGETINTERDEPENTENTPROPDESC_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovidergetobjectpropdesc.h Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* 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 CMEDIAMTPDATAPROVIDERGETOBJECTPROPDESC_H
-#define CMEDIAMTPDATAPROVIDERGETOBJECTPROPDESC_H
-
-#include "cgetobjectpropdesc.h"
-
-/**
-* Defines media data provider GetObjectPropDesc request processor
-*/
-class CMediaMtpDataProviderGetObjectPropDesc: public CGetObjectPropDesc
- {
-public:
-
- /**
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- * @return A pointer to the created request processor object
- */
- static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * Destructor
- */
- ~CMediaMtpDataProviderGetObjectPropDesc();
-
-protected:
- // from CGetObjectPropDesc, override from baseclass
- void ServiceSpecificObjectPropertyL( TUint16 aPropCode );
-
-private:
-
- /**
- * Standard C++ Constructor
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- */
- CMediaMtpDataProviderGetObjectPropDesc( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
- /**
- * two-phase construction
- */
- void ConstructL();
-
- void ServiceNumberOfChannelsL();
- void ServiceCodeSampleRateL();
- void ServiceCodeWaveCodecL();
- void ServiceCodeAudioBitrateL();
- void ServiceDurationL();
- void ServiceDescriptionL();
- void ServiceScanTypeDescriptionL();
- void ServiceVideoFourCCCodecL();
- void ServiceVideoBitrateL();
- void ServiceEncodingProfileDescriptionL();
- void ServiceDRMStatusL();
- void ServiceOMADRMStatusL();
-
- void ServiceRangeFormDescriptionL( TUint16 aPropCode,
- TUint32 aMinValue,
- TUint32 aMaxValue,
- TUint32 aStepValue,
- TBool aIsReadOnly = EFalse );
-
- };
-
-#endif // CMEDIAMTPDATAPROVIDERGETOBJECTPROPDESC_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovidermoveobject.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovidermoveobject.h Wed Jun 23 17:51:16 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
@@ -62,15 +62,10 @@
void ConstructL();
protected:
-
void ServiceGetSpecificObjectPropertyL( TUint16 aPropCode,
TUint32 aHandle,
const CMTPObjectMetaData& aObject );
- TMTPResponseCode ServiceSetSpecificObjectPropertyL( TUint16 aPropCode,
- const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement );
-
};
#endif // CMEDIAMTPDATAPROVIDERMOVEOBJECT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataproviderpropertysettingutility.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,60 @@
+/*
+ * 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 CMEDIAMTPDATAPROVIDERPROPERTYSETTINGUTILITY_H
+#define CMEDIAMTPDATAPROVIDERPROPERTYSETTINGUTILITY_H
+
+#include "cpropertysettingutility.h"
+
+/**
+* Defines media data provider SetObjectPropsList request processor
+*/
+class CMediaMtpDataProviderPropertySettingUtility: public CPropertySettingUtility
+ {
+public:
+ /**
+ * @param aFramework, The data provider framework
+ * @param aConnection, The connection from which the request comes
+ * @param aWrapper Medadata access
+ * @return A pointer to the created request processor object
+ */
+ static CMediaMtpDataProviderPropertySettingUtility* NewL();
+
+ /**
+ * Destructor
+ */
+ ~CMediaMtpDataProviderPropertySettingUtility();
+
+private:
+ /**
+ * Standard C++ Constructor
+ * @param aFramework, The data provider framework
+ * @param aConnection, The connection from which the request comes
+ * @param aWrapper Medadata access
+ */
+ CMediaMtpDataProviderPropertySettingUtility();
+
+protected:
+ TMTPResponseCode SetSpecificObjectPropertyL( MMmMtpDpConfig& aDpConfig,
+ TUint16 aPropCode,
+ const CMTPObjectMetaData& aObject,
+ const CMTPTypeObjectPropListElement& aElement );
+
+ };
+
+#endif // CMEDIAMTPDATAPROVIDERPROPERTYSETTINGUTILITY_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovidersendobject.h Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* 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 CMEDIAMTPDATAPROVIDERSENDOBJECT_H_
-#define CMEDIAMTPDATAPROVIDERSENDOBJECT_H_
-
-#include "csendobject.h"
-
-/**
-* Defines media data provider SetObjectPropsList request processor
-*/
-class CMediaMtpDataProviderSendObject: public CSendObject
- {
-public:
- /**
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- * @return A pointer to the created request processor object
- */
- static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * Destructor
- */
- ~CMediaMtpDataProviderSendObject();
-
-private:
- /**
- * Standard C++ Constructor
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- */
- CMediaMtpDataProviderSendObject( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * 2nd Phase Constructor
- */
- void ConstructL();
-
-protected:
- // from CSendObject
- TMTPResponseCode SetSpecificObjectPropertyL( TUint16 aPropCode,
- const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement );
-
- TMTPResponseCode CheckSepecificPropType( TUint16 aPropCode, TUint16 aDataType );
-
- TInt HandleSpecificWrapperError(TInt aError,
- const CMTPObjectMetaData& aObject);
-
- };
-
-
-#endif /*CMEDIAMTPDATAPROVIDERSENDOBJECT_H_*/
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/cmediamtpdataprovidersetobjectproplist.h Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
-* 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 CMEDIAMTPDATAPROVIDERSETOBJECTPROPLIST_H
-#define CMEDIAMTPDATAPROVIDERSETOBJECTPROPLIST_H
-
-#include"csetobjectproplist.h"
-
-/**
-* Defines media data provider SetObjectPropsList request processor
-*/
-class CMediaMtpDataProviderSetObjectPropList: public CSetObjectPropList
- {
-public:
- /**
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- * @return A pointer to the created request processor object
- */
- static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * Destructor
- */
- ~CMediaMtpDataProviderSetObjectPropList();
-
-private:
- /**
- * Standard C++ Constructor
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper Medadata access
- */
- CMediaMtpDataProviderSetObjectPropList( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
-
- /**
- * 2nd Phase Constructor
- */
- void ConstructL();
-
-protected:
- // from CSetObjectPropList
- TMTPResponseCode ServiceSpecificObjectPropertyL( TUint16 aPropCode,
- const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement );
-
- TInt HandleSpecificWrapperError( TInt aError,
- const CMTPObjectMetaData& aObject);
-
- };
-
-#endif // CMEDIAMTPDATAPROVIDERGETOBJECTPROPLIST_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataprovider_config.rh Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* 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: Resource headers for project media mtp data provider
-*
-*/
-
-
-#ifndef MEDIAMTPDATAPROVIDER_RH
-#define MEDIAMTPDATAPROVIDER_RH
-
-// --------------------------------------------------------------------
-// Defines the resource type for media mtp data provider specific configuration data
-// --------------------------------------------------------------------
-//
-STRUCT MEDIAMTPDATAPROVIDE_CONFIG
- {
- LONG media_drive; // Symbian drive number @see TDrive
- LTEXT media_folder_root;
- LTEXT folder_exclusion_list[]; // What to exclude
- }
-
-#endif // MEDIAMTPDATAPROVIDER_RH
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataproviderconst.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataproviderconst.h Wed Jun 23 17:51:16 2010 +0100
@@ -25,8 +25,6 @@
_LIT( KMTPTxtColon, ":" );
-/** Granularity of the drive list*/
-const TInt KMtpMaxStringLength = 255;
enum TMmMtpNumberOfChannels
{
@@ -48,10 +46,11 @@
// WAVECodec value
enum TMmMtpWAVECodecValue
{
- EMTPAudioWAVECodecMP3 = 0x00000055,
- EMTPAudioWAVECodecWMA = 0x00000161,
- EMTPAudioWAVECodecAAC = 0x0000A106,
- EMTPAudioWAVECodecPCM = 0x00000001
+ EMTPAudioWAVECodecMP3 = 0x00000055,
+ EMTPAudioWAVECodecWMA = 0x00000161,
+ EMTPAudioWAVECodecWMAPro = 0x00000162,
+ EMTPAudioWAVECodecAAC = 0x0000A106,
+ EMTPAudioWAVECodecPCM = 0x00000001
};
// Bitrate value scope
@@ -60,7 +59,9 @@
EMTPMP3MinBitrate = 0x00001F40, //8 kbps
EMTPMP3MaxBitrate = 0x0004E200, //320 kbps
EMTPWMAMinBitrate = 0x00001388, //5 kbps
- EMTPWMAMaxBitrate = 0x0004E200, //320 kbps
+ EMTPWMAMaxBitrate = 0x0005DC00, //384 kbps
+ EMTPWMAProMinBitrate = 0x00001388, //5 kbps
+ EMTPWMAProMaxBitrate = 0x000BB800, //768 kbps
EMTPAACMinBitrate = 0x00001F40, //8 kbps
EMTPAACMaxBitrate = 0x0004E200, //320 kbps
EMTPPCMMinBitrate = 0x00003E80, //16 kbps
@@ -80,21 +81,21 @@
enum TMmMtpWidthRange
{
EMTPMinWidth = 0x000000b0, // 176 pixels
- EMTPMaxWidth = 0x00000140, // 320 pixels
+ EMTPMaxWidth = 0x00000500, // 1280 pixels, standard for 720p content
EMTPStepWidth = 0x00000001,
};
enum TMmMtpHeightRange
{
EMTPMinHeight = 0x00000090, // 144 pixels
- EMTPMaxHeight = 0x000000F0, // 240 pixels
+ EMTPMaxHeight = 0x000002D0, // 720 pixels, standard for 720p content
EMTPStepHeight = 0x00000001,
};
enum TMmMtpVideoBitRateRange
{
EMTPWMVMinBitrate = 0x00000000,
- EMTPWMVMaxBitrate = 0x0005dc00, // 384 kbps
+ EMTPWMVMaxBitrate = 0x01312D00, // 20 Mbps, recommanded by Helix team
EMTPVideoBitrateStep = 0x00000001
};
@@ -113,7 +114,7 @@
enum TMmMtpFramesPerThousandSecondsRange
{
EMTPMinFramesPerThousandSeconds = 0x00000000,
- EMTPMaxFramesPerThousandSeconds = 0x00003a98, // 15000 frame per ms
+ EMTPMaxFramesPerThousandSeconds = 0x00007530, // 30000 frame per thousand seconds (30 frame/s), standard for progressive content
EMTPStepFramesPerThousandSeconds = 0x00000001
};
@@ -181,6 +182,8 @@
EMTPOpCodeSetObjectPropList,
EMTPOpCodeGetInterdependentPropDesc,
EMTPOpCodeSendObjectPropList,
+
+ // window 7 extension
EMTPOpCodeGetFormatCapabilities
};
@@ -195,6 +198,7 @@
EMTPObjectPropCodeNumberOfChannels,
EMTPObjectPropCodeAudioWAVECodec,
EMTPObjectPropCodeAudioBitRate,
+ EMTPObjectPropCodeAlbumArtist
};
// Additional for audio formats
@@ -215,7 +219,6 @@
EMTPObjectPropCodeHeight,
EMTPObjectPropCodeDuration,
EMTPObjectPropCodeGenre,
- EMTPObjectPropCodeUseCount,
EMTPObjectPropCodeSampleRate,
EMTPObjectPropCodeNumberOfChannels,
EMTPObjectPropCodeScanType,
@@ -236,5 +239,4 @@
EMTPExtObjectPropCodeOmaDrmStatus,
};
-
#endif // MEDIAMTPDATAPROVIDERCONST_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataproviderprocessor.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/inc/mediamtpdataproviderprocessor.h Wed Jun 23 17:51:16 2010 +0100
@@ -19,16 +19,14 @@
#ifndef MEDIAMTPDATAPROVIDERPROCESSOR_H
#define MEDIAMTPDATAPROVIDERPROCESSOR_H
-#include "crequestprocessor.h"
-
// class forward
class MMTPConnection;
class TMTPTypeRequest;
class CMTPDataProviderPlugin;
-class MMTPDataProviderFramework;
class MMTPRequestProcessor;
class CMediaMtpDataProvider;
class MMmMtpDpConfig;
+class MMmRequestProcessor;
typedef MMmRequestProcessor* ( *TMediaMtpDataProviderRequestProcessorCreateFunc )(
MMTPDataProviderFramework& aFramework,
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovider.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovider.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -15,7 +15,6 @@
*
*/
-
#include <mtp/mmtpconnection.h>
#include <mtp/mmtpdataproviderframework.h>
#include <mtp/mmtpstoragemgr.h>
@@ -26,6 +25,7 @@
#include <driveinfo.h>
#include "cmediamtpdataprovider.h"
+#include "crequestprocessor.h"
#include "mediamtpdataproviderconst.h"
#include "cmediamtpdataproviderenumerator.h"
#include "mmmtpdplogger.h"
@@ -36,6 +36,8 @@
#include "crenameobject.h"
#include "mmmtpdpdefs.h"
#include "mmmtpdpfiledefs.h"
+#include "cmediamtpdataproviderpropertysettingutility.h"
+#include "cmediamtpdataproviderdescriptionutility.h"
// Class constants.
// Defines the number of MTP Active Processors allowed
@@ -77,6 +79,7 @@
iSupportedPropVideo( KMediaMtpDpArrayGranularity ),
iSupportedPropAll( KMediaMtpDpArrayGranularity )
{
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -90,6 +93,8 @@
CMmMtpDpAccessSingleton::Release();
delete iMediaEnumerator;
+ delete iPropSettingUtility;
+ delete iDescriptionUtility;
iPendingEnumerations.Close();
TInt count = iActiveProcessors.Count();
@@ -126,12 +131,15 @@
iMediaEnumerator = CMediaMtpDataProviderEnumerator::NewL( Framework(), *this );
- CMmMtpDpAccessSingleton::CreateL( Framework().Fs(), Framework() );
+ CMmMtpDpAccessSingleton::CreateL( Framework() );
GetSupportedFormatL();
GetSupportedPropL();
GetAllSupportedPropL();
+ iPropSettingUtility = CMediaMtpDataProviderPropertySettingUtility::NewL();
+ iDescriptionUtility = CMediaMtpDataProviderDescriptionUtility::NewL();
+
PRINT( _L( "MM MTP <= CMediaMtpDataProvider::ConstructL" ) );
}
@@ -162,20 +170,20 @@
{
case EMTPSessionClosed:
PRINT( _L( "MM MTP <> CMediaMtpDataProvider::ProcessNotificationL EMTPSessionClosed event recvd" ) );
-
SessionClosedL( *reinterpret_cast<const TMTPNotificationParamsSessionChange*> ( aParams ) );
break;
case EMTPSessionOpened:
PRINT( _L( "MM MTP <> CMediaMtpDataProvider::ProcessNotificationL EMTPSessionOpened event recvd" ) );
-
SessionOpenedL( *reinterpret_cast<const TMTPNotificationParamsSessionChange*> ( aParams ) );
break;
case EMTPStorageAdded:
+ PRINT( _L( "MM MTP <> CMediaMtpDataProvider::ProcessNotificationL EMTPStorageAdded event recvd" ) );
break;
case EMTPStorageRemoved:
+ PRINT( _L( "MM MTP <> CMediaMtpDataProvider::ProcessNotificationL EMTPStorageRemoved event recvd" ) );
break;
case EMTPRenameObject:
@@ -183,6 +191,11 @@
RenameObjectL( *reinterpret_cast<const TMTPNotificationParamsHandle*> ( aParams ) );
break;
+ case EMTPObjectAdded:
+ PRINT( _L( "MM MTP <> CMediaMtpDataProvider::ProcessNotificationL EMTPObjectAdded event recvd" ) );
+ ObjectAddedL(*reinterpret_cast<const TUint32*>(aParams));
+ break;
+
default:
PRINT( _L( "MM MTP <> CMediaMtpDataProvider::ProcessNotificationL default" ) );
// Ignore all other notifications.
@@ -205,14 +218,19 @@
MMmRequestProcessor* processor = iActiveProcessors[index];
iActiveProcessor = index;
- // iActiveProcessorRemoved = EFalse;
+ iActiveProcessorRemoved = EFalse;
TBool result = processor->HandleRequestL( aRequest, aPhase );
- if( !iIsSessionOpen )
+ if ( !iIsSessionOpen )
{
processor->Release();
}
-
+ // iActiveProcessorRemoved will be set to ETrue in the above function
+ // HandleRequestL(),such as SessionClose()
+ else if ( iActiveProcessorRemoved )
+ {
+ processor->Release(); // destroy the processor
+ }
else if ( result ) // destroy the processor
{
processor->Release();
@@ -231,9 +249,9 @@
iIsSessionOpen = EFalse;
TInt count = iActiveProcessors.Count();
PRINT1( _L( "MM MTP => CMediaMtpDataProvider::SessionClosedL, total processor count = %d" ), count );
- for( TInt i = 0; i < count; i++ )
+ while ( count-- )
{
- MMmRequestProcessor* processor = iActiveProcessors[i];
+ MMmRequestProcessor* processor = iActiveProcessors[count];
// replaced for the Request() is invalid sometimes
// TUint32 sessionId( processor->Request().Uint32( TMTPTypeRequest::ERequestSessionID ) );
@@ -245,13 +263,23 @@
{
processor->UsbDisconnect(); // Rollback
- iActiveProcessors.Remove( i );
- processor->Release();
+ iActiveProcessors.Remove( count );
+ if ( count == iActiveProcessor )
+ {
+ iActiveProcessorRemoved = ETrue;
+ iActiveProcessor = -1; // update iActiveProcessor
+ }
+ else
+ {
+ processor->Release();
+ }
}
}
// introduce to cleanup DBs at each close session
iMediaEnumerator->SessionClosedL();
+ CMmMtpDpAccessSingleton::CloseSessionL();
+
PRINT( _L( "MM MTP <= CMediaMtpDataProvider::SessionClosedL" ) );
}
@@ -286,6 +314,27 @@
}
// -----------------------------------------------------------------------------
+// CMediaMtpDataProvider::ObjectAddedL
+// Process the added object
+// -----------------------------------------------------------------------------
+//
+void CMediaMtpDataProvider::ObjectAddedL( TUint32 aObjectHandle )
+ {
+ PRINT1( _L( "MM MTP => CMediaMtpDataProvider::ObjectAddedL aHandle=0x%x" ), aObjectHandle );
+
+ CMTPObjectMetaData* object(CMTPObjectMetaData::NewLC());
+ Framework().ObjectMgr().ObjectL( aObjectHandle, *object );
+
+ //Since the object's processor is not route to media dp, its format code should be reset
+ TUint formatCode = MmMtpDpUtility::FormatFromFilename( object->DesC( CMTPObjectMetaData::ESuid ) );
+ object->SetUint( CMTPObjectMetaData::EFormatCode, formatCode );
+ GetWrapperL().AddObjectL( *object );
+ PRINT2( _L( "MM MTP => CMediaMtpDataProvider::ObjectAddedL formatCode=0x%x Suid=%S" ), formatCode, &(object->DesC( CMTPObjectMetaData::ESuid ) ) );
+ CleanupStack::PopAndDestroy( object );
+ PRINT( _L( "MM MTP <= CMediaMtpDataProvider::ObjectAddedL" ) );
+ }
+
+// -----------------------------------------------------------------------------
// CMediaMtpDataProvider::StartObjectEnumerationL
// Start object enumeration
// -----------------------------------------------------------------------------
@@ -400,6 +449,7 @@
//EMTPFormatCode3GPContainer,
aStrings.AppendL(KFormatExtension3GP);
+ aStrings.AppendL(KFormatExtension3G2);
//EMTPFormatCodeAAC,
aStrings.AppendL(KFormatExtensionAAC);
@@ -415,9 +465,7 @@
#endif
//ODF container
aStrings.AppendL(KFormatExtensionODFAudio3GPP);
- aStrings.AppendL(KFormatExtensionODFAudioMP4);
aStrings.AppendL(KFormatExtensionODFVideo3GPP);
- aStrings.AppendL(KFormatExtensionODFVideoMP4);
aStrings.AppendL(KFormatExtensionO4A);
aStrings.AppendL(KFormatExtensionO4V);
@@ -500,7 +548,7 @@
// -----------------------------------------------------------------------------
// CMediaMtpDataProvider::GetWrapper
-// return the reference of CMmMtpDpMetadataAccessWrapper to enumerator
+// return wrapper references
// -----------------------------------------------------------------------------
//
CMmMtpDpMetadataAccessWrapper& CMediaMtpDataProvider::GetWrapperL()
@@ -508,6 +556,26 @@
return CMmMtpDpAccessSingleton::GetAccessWrapperL();
}
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProvider::PropSettingUtility
+// return The utility to setting properties
+// -----------------------------------------------------------------------------
+//
+CPropertySettingUtility* CMediaMtpDataProvider::PropSettingUtility()
+ {
+ return iPropSettingUtility;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProvider::DescriptionUtility
+// return The utiltiy to setting descriptions
+// -----------------------------------------------------------------------------
+//
+CDescriptionUtility* CMediaMtpDataProvider::DescriptionUtility()
+ {
+ return iDescriptionUtility;
+ }
+
// ---------------------------------------------------------------------------
// CMediaMtpDataProvider::GetSupportedFormat
//
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidercopyobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidercopyobject.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,7 +16,6 @@
*/
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/cmtptypeobjectproplist.h>
#include <mtp/cmtptypestring.h>
#include <mtp/cmtptypearray.h>
@@ -65,7 +64,7 @@
//
CMediaMtpDataProviderCopyObject::~CMediaMtpDataProviderCopyObject()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -78,7 +77,7 @@
MMmMtpDpConfig& aDpConfig ) :
CCopyObject( aFramework, aConnection, aDpConfig )
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -124,10 +123,6 @@
{
iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars());
-
-// iPropertyElement = CMTPTypeObjectPropListElement::NewL( aHandle,
-// aPropCode,
-// *textData );
}
CleanupStack::PopAndDestroy( textData ); // - textData
@@ -148,10 +143,6 @@
{
iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
iPropertyElement->SetArrayL( CMTPTypeObjectPropListElement::EValue, *desData);
-
-// iPropertyElement = CMTPTypeObjectPropListElement::NewL( aHandle,
-// aPropCode,
-// *desData );
}
CleanupStack::PopAndDestroy( desData ); // - desData
@@ -173,19 +164,13 @@
{
iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EValue, uint16.Value());
-
-// iPropertyElement = CMTPTypeObjectPropListElement::NewL( aHandle,
-// aPropCode,
-// uint16 );
}
-
}
break;
case EMTPObjectPropCodeWidth:
case EMTPObjectPropCodeHeight:
case EMTPObjectPropCodeDuration:
- case EMTPObjectPropCodeUseCount:
case EMTPObjectPropCodeSampleRate:
case EMTPObjectPropCodeAudioWAVECodec:
case EMTPObjectPropCodeAudioBitRate:
@@ -204,9 +189,6 @@
{
iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, uint32.Value());
-// iPropertyElement = CMTPTypeObjectPropListElement::NewL( aHandle,
-// aPropCode,
-// uint32 );
}
}
break;
@@ -220,14 +202,9 @@
if ( drmStatus == EMTPDrmStatusProtected )
result.Set( 1 );
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EDatatype, EMTPTypeUINT8);
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EDatatype, EMTPTypeUINT8 );
iPropertyElement->SetUint8L( CMTPTypeObjectPropListElement::EValue, result.Value());
-
-// iPropertyElement = CMTPTypeObjectPropListElement::NewL( aHandle,
-// aPropCode,
-// EMTPTypeUINT8,
-// result );
}
break;
@@ -239,12 +216,9 @@
}
// centralize logic to handle error, doing so, that's on need to trap the
- // leave for KErrNotSupported in base class like previous version.
- if ( ( err == KErrNotFound )
- || ( ( err == KErrNotSupported )
- && ( ( aObject.Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeASF )
- || ( aObject.Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeMP4Container )
- || ( aObject.Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCode3GPContainer ) ) ) )
+ // Ignore all errors came from mpx db.
+ // It's enough that only file copied successfully no matter metadata got whatever failure.
+ if ( err != KErrNone )
{
iPropertyElement = NULL;
}
@@ -255,121 +229,4 @@
PRINT( _L( "MM MTP <= CMediaMtpDataProviderCopyObject::ServiceSpecificObjectPropertyL" ) );
}
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderCopyObject::ServiceSetSpecificObjectPropertyL
-//
-// -----------------------------------------------------------------------------
-//
-TMTPResponseCode CMediaMtpDataProviderCopyObject::ServiceSetSpecificObjectPropertyL( TUint16 aPropCode, const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement )
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderCopyObject::ServiceSetSpecificObjectPropertyL" ) );
- TMTPResponseCode responseCode( EMTPRespCodeOK );
-
- switch ( aPropCode )
- {
- case EMTPObjectPropCodeArtist:
- case EMTPObjectPropCodeGenre:
- case EMTPObjectPropCodeComposer:
- case EMTPObjectPropCodeOriginalReleaseDate:
- case EMTPObjectPropCodeAlbumName:
- case EMTPObjectPropCodeParentalRating:
- case EMTPObjectPropCodeEncodingProfile:
- {
- CMTPTypeString* stringData =
- CMTPTypeString::NewLC( aElement.StringL( CMTPTypeObjectPropListElement::EValue ) );// + stringData
-
- responseCode = ServiceMetaDataToWrapper( aPropCode,
- *stringData,
- aObject );
-
- CleanupStack::PopAndDestroy( stringData ); // - stringData
- }
- break;
-
- case EMTPObjectPropCodeVideoBitRate:
- {
- responseCode = EMTPRespCodeAccessDenied;
- }
- break;
-
- case EMTPObjectPropCodeDescription:
- {
- CMTPTypeArray* desData = CMTPTypeArray::NewLC( EMTPTypeAUINT16 ); // + desData
-// aElement.GetL( CMTPTypeObjectPropListElement::EValue, *desData );
- desData->SetByDesL(aElement.ArrayL(CMTPTypeObjectPropListElement::EValue));
- //desData(aElement.ArrayL(CMTPTypeObjectPropListElement::EValue));
-
- responseCode = ServiceMetaDataToWrapper( aPropCode,
- *desData,
- aObject );
- CleanupStack::PopAndDestroy( desData ); // - desData
- }
- break;
-
- case EMTPObjectPropCodeWidth:
- case EMTPObjectPropCodeHeight:
- case EMTPObjectPropCodeDuration:
- case EMTPObjectPropCodeUseCount:
- case EMTPObjectPropCodeSampleRate:
- case EMTPObjectPropCodeAudioWAVECodec:
- case EMTPObjectPropCodeAudioBitRate:
- case EMTPObjectPropCodeVideoFourCCCodec:
- case EMTPObjectPropCodeFramesPerThousandSeconds:
- case EMTPObjectPropCodeKeyFrameDistance:
- {
- TMTPTypeUint32 uint32( aElement.Uint32L( CMTPTypeObjectPropListElement::EValue ) );
- responseCode = ServiceMetaDataToWrapper( aPropCode,
- uint32,
- aObject );
- }
- break;
-
- case EMTPObjectPropCodeTrack:
- case EMTPObjectPropCodeNumberOfChannels:
- case EMTPObjectPropCodeScanType:
- case EMTPObjectPropCodeDRMStatus:
- {
- TMTPTypeUint16 uint16( aElement.Uint16L( CMTPTypeObjectPropListElement::EValue ));
- responseCode = ServiceMetaDataToWrapper( aPropCode,
- uint16,
- aObject );
- }
- break;
-
- case EMTPExtObjectPropCodeOmaDrmStatus:
- {
- TInt drmStatus = MmMtpDpUtility::GetDrmStatus( aObject.DesC( CMTPObjectMetaData::ESuid ) );
-
- if (drmStatus == EMTPDrmStatusUnknown)
- {
- responseCode = EMTPRespCodeAccessDenied;
- }
- else
- {
- TMTPTypeUint8 newValue( aElement.Uint8L( CMTPTypeObjectPropListElement::EValue ) );
-
- // there's no DB field to remember the value, so return an error
- // if there's a mismatch to CAF protection status
- if ( ( ( drmStatus == EMTPDrmStatusProtected) && ( newValue.Value() == 0 ) ) ||
- ( ( drmStatus == EMTPDrmStatusNotProtected ) && ( newValue.Value() == 1 ) ) )
- {
- responseCode = EMTPRespCodeAccessDenied;
- }
- }
- }
- break;
-
- default:
- {
- User::Leave( KErrNotSupported );
- }
- break;
- }
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderCopyObject::ServiceSetSpecificObjectPropertyL" ) );
-
- return responseCode;
- }
-
// end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderdescriptionutility.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,738 @@
+/*
+* 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: Media dp specific property description construction utility.
+* Used by all request processors which related to property description
+*
+*/
+
+#include <mtp/cmtptypeobjectpropdesc.h>
+#include <mtp/cmtptypestring.h>
+
+#include "cmediamtpdataproviderdescriptionutility.h"
+#include "mediamtpdataproviderconst.h"
+#include "tobjectdescription.h"
+#include "mmmtpdpconfig.h"
+#include "mmmtpdplogger.h"
+
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewL
+//
+// -----------------------------------------------------------------------------
+//
+CMediaMtpDataProviderDescriptionUtility* CMediaMtpDataProviderDescriptionUtility::NewL()
+ {
+ CMediaMtpDataProviderDescriptionUtility* self =
+ new( ELeave ) CMediaMtpDataProviderDescriptionUtility();
+
+ return self;
+ }
+
+CMediaMtpDataProviderDescriptionUtility::CMediaMtpDataProviderDescriptionUtility()
+ {
+ // Do nothing
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewInterdepentPropDescL
+// Construct media dp specific interdependent property description.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeInterdependentPropDesc* CMediaMtpDataProviderDescriptionUtility::NewInterdepentPropDescL( MMmMtpDpConfig& aDpConfig, TUint aFormatCode )
+ {
+ PRINT( _L( "MM MTP => CMediaMtpDataProviderDescriptionUtility::NewInterdepentPropDescL" ) );
+
+ TBool audioWaveCodecSupported = EFalse;
+ TBool audioBitRateSupported = EFalse;
+ TBool videoFourCcCodecSupported = EFalse;
+ TBool videoBitRateSupported = EFalse;
+
+ const RArray<TUint>* properties = aDpConfig.GetSupportedPropertiesL( aFormatCode );
+
+ TInt count = properties->Count();
+ for ( TInt i = 0; i < count; i++ )
+ {
+ switch ( ( *properties )[i] )
+ {
+ case EMTPObjectPropCodeAudioWAVECodec:
+ audioWaveCodecSupported = ETrue;
+ break;
+ case EMTPObjectPropCodeAudioBitRate:
+ audioBitRateSupported = ETrue;
+ break;
+ case EMTPObjectPropCodeVideoFourCCCodec:
+ videoFourCcCodecSupported = ETrue;
+ break;
+ case EMTPObjectPropCodeVideoBitRate:
+ videoBitRateSupported = ETrue;
+ break;
+ default:
+ // do nothing
+ break;
+ }
+ }
+
+ CMTPTypeInterdependentPropDesc* interdependentPropDesc = CMTPTypeInterdependentPropDesc::NewL();
+ CleanupStack::PushL( interdependentPropDesc ); // + interdependentPropDesc
+
+ if ( audioWaveCodecSupported && audioBitRateSupported )
+ {
+ if ( ( aFormatCode == EMTPFormatCodeWMA )
+ || ( aFormatCode == EMTPFormatCodeWMV )
+ || ( aFormatCode == EMTPFormatCodeASF ) )
+ {
+ AppendWMAudioInterdepentPropDescL( interdependentPropDesc );
+ }
+ else
+ {
+ CMTPTypeInterdependentProperties* properties = CMTPTypeInterdependentProperties::NewL();
+ CleanupStack::PushL( properties );
+
+ CMTPTypeObjectPropDesc* propertyDesc1 = NewAudioWaveCodecPropDescL( aFormatCode );
+ CleanupStack::PushL( propertyDesc1 ); // + propertyDesc1
+ properties->AppendL( propertyDesc1 );
+ CleanupStack::Pop( propertyDesc1 ); // - propertyDesc1
+
+ CMTPTypeObjectPropDesc* propertyDesc2 = NewAudioBitratePropDescL( aFormatCode );
+ CleanupStack::PushL( propertyDesc2 ); // + propertyDesc2
+ properties->AppendL( propertyDesc2 );
+ CleanupStack::Pop( propertyDesc2 ); // - propertyDesc2
+
+ interdependentPropDesc->AppendL( properties );
+ CleanupStack::Pop( properties );
+ }
+ }
+
+ if ( videoFourCcCodecSupported && videoBitRateSupported )
+ {
+ CMTPTypeInterdependentProperties* properties = CMTPTypeInterdependentProperties::NewL();
+ CleanupStack::PushL( properties ); // + properties
+
+ CMTPTypeObjectPropDesc* propertyDesc1 = NewVideoFourCCCodecPropDescL( aFormatCode );
+ CleanupStack::PushL( propertyDesc1 ); // + propertyDesc1
+ properties->AppendL( propertyDesc1 );
+ CleanupStack::Pop( propertyDesc1 ); // - propertyDesc1
+
+ CMTPTypeObjectPropDesc* propertyDesc2 = NewVideoBitratePropDescL( aFormatCode );
+ CleanupStack::PushL( propertyDesc2 ); // + propertyDesc2
+ properties->AppendL( propertyDesc2 );
+ CleanupStack::Pop( propertyDesc2 ); // - propertyDesc2
+
+ interdependentPropDesc->AppendL( properties );
+ CleanupStack::Pop( properties ); // - properties
+ }
+
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::NewInterdepentPropDescL" ) );
+ CleanupStack::Pop( interdependentPropDesc ); // - interdependentPropDesc
+ return interdependentPropDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewWMAudioInterdepentPropDescL
+// Append WM Audio specific to interdpendent property description.
+// -----------------------------------------------------------------------------
+//
+void CMediaMtpDataProviderDescriptionUtility::AppendWMAudioInterdepentPropDescL(CMTPTypeInterdependentPropDesc* aInterdependentPropDesc)
+ {
+ PRINT( _L( "MM MTP => CMediaMtpDataProviderDescriptionUtility::AppendWMAudioInterdepentPropDescL" ) );
+
+ CMTPTypeInterdependentProperties* properties1 = CMTPTypeInterdependentProperties::NewL();
+ CleanupStack::PushL( properties1 ); // + properties1
+
+ CMTPTypeObjectPropDescEnumerationForm* form = CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT32 );
+ CleanupStack::PushL( form ); // + form
+ form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecWMA ) );
+
+ CMTPTypeObjectPropDesc* propertyDesc1 = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeAudioWAVECodec, *form );
+
+ CleanupStack::PopAndDestroy( form ); // - form
+ CleanupStack::PushL( propertyDesc1 ); // + propertyDesc1
+ properties1->AppendL( propertyDesc1 );
+ CleanupStack::Pop( propertyDesc1 ); // - propertyDesc1
+
+ CMTPTypeObjectPropDesc* propertyDesc2 = NewRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
+ EMTPWMAMinBitrate,
+ EMTPWMAMaxBitrate,
+ EMTPAudioBitrateStep );
+
+ CleanupStack::PushL( propertyDesc2 ); // + propertyDesc2
+ properties1->AppendL( propertyDesc2 );
+ CleanupStack::Pop( propertyDesc2 ); // - propertyDesc2
+
+ aInterdependentPropDesc->AppendL( properties1 );
+ CleanupStack::Pop( properties1 ); // - properties1
+
+ CMTPTypeInterdependentProperties* properties2 = CMTPTypeInterdependentProperties::NewL();
+ CleanupStack::PushL( properties2 ); // + properties2
+
+ form = CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT32 );
+ CleanupStack::PushL( form ); // + form
+ form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecWMAPro ) );
+
+ CMTPTypeObjectPropDesc* propertyDesc3 = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeAudioWAVECodec, *form );
+
+ CleanupStack::PopAndDestroy( form ); // - form
+ CleanupStack::PushL( propertyDesc3 ); // + propertyDesc3
+ properties2->AppendL( propertyDesc3 );
+ CleanupStack::Pop( propertyDesc3 ); // - propertyDesc3
+
+ CMTPTypeObjectPropDesc* propertyDesc4 = NewRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
+ EMTPWMAProMinBitrate,
+ EMTPWMAProMaxBitrate,
+ EMTPAudioBitrateStep );
+
+ CleanupStack::PushL( propertyDesc4 ); // + propertyDesc4
+ properties2->AppendL( propertyDesc4 );
+ CleanupStack::Pop( propertyDesc4 ); // - propertyDesc4
+
+ aInterdependentPropDesc->AppendL( properties2 );
+ CleanupStack::Pop( properties2 ); // - properties2
+
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::AppendWMAudioInterdepentPropDescL" ) );
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewSpecificPropDescL
+// Construct media dp specific property description.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CMediaMtpDataProviderDescriptionUtility::NewSpecificPropDescL( TUint aFormatCode, TUint16 aPropCode )
+ {
+ CMTPTypeObjectPropDesc* propertyDesc = NULL;
+
+ switch ( aPropCode )
+ {
+ // format specific
+ case EMTPObjectPropCodeArtist: // Artist
+ case EMTPObjectPropCodeTrack: // Track
+ case EMTPObjectPropCodeGenre: // Genre
+ case EMTPObjectPropCodeAlbumName: // Album Name
+ case EMTPObjectPropCodeAlbumArtist: // Album Artist
+ case EMTPObjectPropCodeOriginalReleaseDate: // Original Release Date
+ case EMTPObjectPropCodeComposer: // Composer
+ case EMTPObjectPropCodeParentalRating:
+ propertyDesc = CMTPTypeObjectPropDesc::NewL( aPropCode );
+ break;
+
+ // Number of Channels (m)
+ case EMTPObjectPropCodeNumberOfChannels:
+ propertyDesc = NewNumberOfChannelsPropDescL();
+ break;
+
+ // Sample Rate (HAS MINIMUM AND MAX VALUE)
+ case EMTPObjectPropCodeSampleRate:
+ propertyDesc = NewCodeSampleRatePropDescL();
+ break;
+
+ // Audio Wave Codec (MAY REQUIRED LIMITED NUMBER TO BE PRODUCED)
+ case EMTPObjectPropCodeAudioWAVECodec:
+ propertyDesc = NewAudioWaveCodecPropDescL( aFormatCode );
+ break;
+
+ // Audio Bit Rate (MAY REQUIRED LIMITED NUMBER TO BE PRODUCED)
+ case EMTPObjectPropCodeAudioBitRate:
+ propertyDesc = NewAudioBitratePropDescL( aFormatCode );
+ break;
+
+ // Duration
+ case EMTPObjectPropCodeDuration:
+ propertyDesc = NewRangeFormDescriptionL( aPropCode,
+ EMTPMinDuration,
+ EMTPMaxDuration,
+ EMTPDurationStep );
+ break;
+
+ // Description
+ case EMTPObjectPropCodeDescription:
+ propertyDesc = NewDescriptionPropDescL();
+ break;
+
+ case EMTPObjectPropCodeWidth:
+ propertyDesc = NewRangeFormDescriptionL( aPropCode,
+ EMTPMinWidth,
+ EMTPMaxWidth,
+ EMTPStepWidth );
+ break;
+
+ case EMTPObjectPropCodeHeight:
+ propertyDesc = NewRangeFormDescriptionL( aPropCode,
+ EMTPMinHeight,
+ EMTPMaxHeight,
+ EMTPStepHeight );
+ break;
+
+ case EMTPObjectPropCodeScanType:
+ propertyDesc = NewScanTypeDescriptionPropDescL();
+ break;
+
+ case EMTPObjectPropCodeVideoFourCCCodec:
+ propertyDesc = NewVideoFourCCCodecPropDescL( aFormatCode );
+ break;
+
+ case EMTPObjectPropCodeVideoBitRate:
+ propertyDesc = NewVideoBitratePropDescL( aFormatCode );
+ break;
+
+ case EMTPObjectPropCodeFramesPerThousandSeconds:
+ propertyDesc = NewRangeFormDescriptionL( aPropCode,
+ EMTPMinFramesPerThousandSeconds,
+ EMTPMaxFramesPerThousandSeconds,
+ EMTPStepFramesPerThousandSeconds );
+ break;
+
+ case EMTPObjectPropCodeKeyFrameDistance:
+ propertyDesc = NewRangeFormDescriptionL( aPropCode,
+ EMTPMinKeyFrameDistance,
+ EMTPMaxKeyFrameDistance,
+ EMTPStepKeyFrameDistance );
+ break;
+
+ case EMTPObjectPropCodeEncodingProfile:
+ propertyDesc = NewEncodingProfileDescriptionPropDescL();
+ break;
+
+ case EMTPObjectPropCodeDRMStatus:
+ propertyDesc = NewDRMStatusPropDescL();
+ break;
+
+ case EMTPExtObjectPropCodeOmaDrmStatus:
+ propertyDesc = NewOMADRMStatusPropDescL();
+ break;
+
+ default:
+ // do nothing
+ break;
+ }
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewAudioWaveCodecPropDescL
+// Construct audio wave codec property description.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CMediaMtpDataProviderDescriptionUtility::NewAudioWaveCodecPropDescL( TUint aFormatCode )
+ {
+ CMTPTypeObjectPropDescEnumerationForm* form =
+ CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT32 ); // + form
+
+ switch( aFormatCode )
+ {
+ case EMTPFormatCodeWMA:
+ case EMTPFormatCodeWMV:
+ case EMTPFormatCodeASF:
+ form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecWMA ) );
+ form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecWMAPro ) );
+ break;
+
+ case EMTPFormatCodeMP3:
+ form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecMP3 ) );
+ break;
+
+ case EMTPFormatCodeMP4Container:
+ case EMTPFormatCode3GPContainer:
+ case EMTPFormatCodeAAC:
+ form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecAAC ) );
+ break;
+
+ case EMTPFormatCodeWAV:
+ form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecPCM ) );
+ break;
+
+ default:
+ User::Leave( KErrNotSupported );
+ break;
+ }
+
+ CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeAudioWAVECodec, *form );
+
+ CleanupStack::PopAndDestroy( form ); // - form
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::NewAudioWaveCodecPropDescL" ) );
+
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewAudioBitratePropDescL
+// Construct audio bitrate property description.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CMediaMtpDataProviderDescriptionUtility::NewAudioBitratePropDescL( TUint aFormatCode )
+ {
+ PRINT1( _L( "MM MTP => CMediaMtpDataProviderDescriptionUtility::NewAudioBitratePropDescL, iFormatCode = 0x%x" ), aFormatCode );
+ CMTPTypeObjectPropDesc* propertyDesc = NULL;
+ switch( aFormatCode )
+ {
+ case EMTPFormatCodeWMA:
+ case EMTPFormatCodeWMV:
+ case EMTPFormatCodeASF:
+ propertyDesc = NewRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
+ EMTPWMAMinBitrate,
+ EMTPWMAProMaxBitrate,
+ EMTPAudioBitrateStep );
+ break;
+
+ case EMTPFormatCodeMP3:
+ propertyDesc = NewRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
+ EMTPMP3MinBitrate,
+ EMTPMP3MaxBitrate,
+ EMTPAudioBitrateStep );
+ break;
+
+ case EMTPFormatCodeAAC:
+ propertyDesc = NewRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
+ EMTPAACMinBitrate,
+ EMTPAACMaxBitrate,
+ EMTPAudioBitrateStep );
+ break;
+
+ case EMTPFormatCodeWAV:
+ propertyDesc = NewRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
+ EMTPPCMMinBitrate,
+ EMTPPCMMaxBitrate,
+ EMTPAudioBitrateStep );
+ break;
+
+ case EMTPFormatCodeMP4Container:
+ case EMTPFormatCode3GPContainer:
+ propertyDesc = NewRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
+ EMTPAACPlusMinBitrate,
+ EMTPAACPlusMaxBitrate,
+ EMTPAudioBitrateStep );
+ break;
+
+ default:
+ // do nothing
+ break;
+ }
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::NewAudioBitratePropDescL" ) );
+
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewVideoFourCCCodecPropDescL
+// Construct property description of video fourCC codec.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CMediaMtpDataProviderDescriptionUtility::NewVideoFourCCCodecPropDescL( TUint aFormatCode )
+ {
+ PRINT( _L( "MM MTP => CMediaMtpDataProviderDescriptionUtility::NewVideoFourCCCodecPropDescL" ) );
+
+ CMTPTypeObjectPropDesc* propertyDesc = NULL;
+
+ if ( ( EMTPFormatCodeWMV == aFormatCode )
+ || ( EMTPFormatCodeASF == aFormatCode ) )
+ {
+ CMTPTypeObjectPropDescEnumerationForm* expectedForm =
+ CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT32 ); // + expectedForm
+
+ TUint32 values[] =
+ {
+ EMTPVideoFourCCCodecWMV3
+ };
+
+ TInt numValues = sizeof( values ) / sizeof( values[0] );
+ for ( TInt i = 0; i < numValues; i++ )
+ {
+ TMTPTypeUint32 data( values[i] );
+ expectedForm->AppendSupportedValueL( data );
+ }
+
+ propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeVideoFourCCCodec,
+ *expectedForm );
+
+ CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
+ }
+
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::NewVideoFourCCCodecPropDescL" ) );
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewVideoBitratePropDescL
+// Construct property description of VideoBitrate.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CMediaMtpDataProviderDescriptionUtility::NewVideoBitratePropDescL( TUint aFormatCode )
+ {
+ PRINT( _L( "MM MTP => CMediaMtpDataProviderDescriptionUtility::NewVideoBitratePropDescL" ) );
+
+ CMTPTypeObjectPropDesc* propertyDesc = NULL;
+
+ if ( ( EMTPFormatCodeWMV == aFormatCode )
+ || ( EMTPFormatCodeASF == aFormatCode ) )
+ {
+ propertyDesc = NewRangeFormDescriptionL( EMTPObjectPropCodeVideoBitRate,
+ EMTPWMVMinBitrate,
+ EMTPWMVMaxBitrate,
+ EMTPVideoBitrateStep,
+ ETrue );
+ }
+
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::NewVideoBitratePropDescL" ) );
+
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewNumberOfChannelsPropDescL()
+// Construct property description of number of channels.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CMediaMtpDataProviderDescriptionUtility::NewNumberOfChannelsPropDescL()
+ {
+ PRINT( _L( "MM MTP => CMediaMtpDataProviderDescriptionUtility::NewNumberOfChannelsPropDescL" ) );
+
+ CMTPTypeObjectPropDescEnumerationForm* expectedForm =
+ CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT16 ); // + expectedForm
+
+ TUint16 values[] =
+ {
+ EMTPChannelMono,
+ EMTPChannelStereo
+ };
+
+ TInt numValues = sizeof( values ) / sizeof( values[0] );
+ for ( TInt i = 0; i < numValues; i++ )
+ {
+ TMTPTypeUint16 data( values[i] );
+ expectedForm->AppendSupportedValueL( data );
+ }
+
+ CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeNumberOfChannels,
+ *expectedForm );
+
+ CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
+
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::NewNumberOfChannelsPropDescL" ) );
+
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewCodeSampleRatePropDescL
+// Construct property description of code sample rate.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CMediaMtpDataProviderDescriptionUtility::NewCodeSampleRatePropDescL()
+ {
+ PRINT( _L( "MM MTP => CMediaMtpDataProviderDescriptionUtility::NewCodeSampleRatePropDescL" ) );
+
+ CMTPTypeObjectPropDescEnumerationForm* expectedForm =
+ CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT32 ); // + expectedForm
+
+ TUint32 values[] =
+ {
+ EMTPSampleRate8K,
+ EMTPSampleRate16K,
+ EMTPSampleRate22_05K,
+ EMTPSampleRate24K,
+ EMTPSampleRate32K,
+ EMTPSampleRate44_1K,
+ EMTPSampleRate48K
+ };
+
+ TInt numValues = sizeof( values ) / sizeof( values[0] );
+ for ( TInt i = 0; i < numValues; i++ )
+ {
+ TMTPTypeUint32 data( values[i] );
+ expectedForm->AppendSupportedValueL( data );
+ }
+
+ CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeSampleRate,
+ CMTPTypeObjectPropDesc::EEnumerationForm,
+ expectedForm );
+
+ CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
+
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::NewCodeSampleRatePropDescL" ) );
+
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewDescriptionPropDescL()
+// Construct property description of description.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CMediaMtpDataProviderDescriptionUtility::NewDescriptionPropDescL()
+ {
+ PRINT( _L( "MM MTP => CMediaMtpDataProviderDescriptionUtility::NewDescriptionPropDescL" ) );
+
+ TMTPTypeUint32 uint32Data( KMTPMaxDescriptionLen );
+ CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeDescription,
+ CMTPTypeObjectPropDesc::ELongStringForm,
+ &uint32Data );
+
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::NewDescriptionPropDescL" ) );
+
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewScanTypeDescriptionPropDescL
+// Construct property description of scan type description.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CMediaMtpDataProviderDescriptionUtility::NewScanTypeDescriptionPropDescL()
+ {
+ PRINT( _L( "MM MTP => CMediaMtpDataProviderDescriptionUtility::NewScanTypeDescriptionPropDescL" ) );
+
+ CMTPTypeObjectPropDescEnumerationForm* expectedForm =
+ CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT16 ); // + expectedForm
+
+ TUint16 values[] =
+ {
+ EMTPScanTypeProgressive
+ };
+
+ TInt numValues = sizeof( values ) / sizeof( values[0] );
+ for ( TInt i = 0; i < numValues; i++ )
+ {
+ TMTPTypeUint16 data( values[i] );
+ expectedForm->AppendSupportedValueL( data );
+ }
+
+ CMTPTypeObjectPropDesc* propertyDesc = NULL;
+ propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeScanType,
+ *expectedForm );
+
+ CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
+
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::NewScanTypeDescriptionPropDescL" ) );
+
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewEncodingProfileDescriptionPropDescL
+// Construct property description of encoding profile description.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CMediaMtpDataProviderDescriptionUtility::NewEncodingProfileDescriptionPropDescL()
+ {
+ PRINT( _L( "MM MTP => CMediaMtpDataProviderDescriptionUtility::NewEncodingProfileDescriptionPropDescL" ) );
+
+ CMTPTypeObjectPropDescEnumerationForm* expectedForm =
+ CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeString ); // + expectedForm
+
+ CMTPTypeString* string = CMTPTypeString::NewLC( _L( "SP@LL" ) ); // + string
+ expectedForm->AppendSupportedValueL( *string );
+ string->SetL( _L("SP@ML"));
+ expectedForm->AppendSupportedValueL( *string );
+ string->SetL( _L("MP@LL"));
+ expectedForm->AppendSupportedValueL( *string );
+
+ // newly added to support 720p content as suggested by Helix team
+ string->SetL( _L("MP@ML"));
+ expectedForm->AppendSupportedValueL( *string );
+ string->SetL( _L("MP@HL"));
+ expectedForm->AppendSupportedValueL( *string );
+
+ CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
+ propertyInfo.iDataType = EMTPTypeString;
+ propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::EEnumerationForm;
+ propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadWrite;
+
+ CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeEncodingProfile,
+ propertyInfo,
+ expectedForm );
+
+ CleanupStack::PopAndDestroy( string ); // - string
+ CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
+
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::NewEncodingProfileDescriptionPropDescL" ) );
+
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewDRMStatusPropDescL
+// Construct property description of DRM status.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CMediaMtpDataProviderDescriptionUtility::NewDRMStatusPropDescL()
+ {
+ PRINT( _L( "MM MTP => CMediaMtpDataProviderDescriptionUtility::NewDRMStatusPropDescL" ) );
+
+ CMTPTypeObjectPropDescEnumerationForm* expectedForm =
+ CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT16 ); // + expectedForm
+
+ TUint16 values[] =
+ {
+ EMTPDrmNoProtection,
+ EMTPDrmProtection,
+ EMTPDrmReserveForMTP,
+ EMTPDrmVenderExtension
+ };
+
+ TInt numValues = sizeof( values ) / sizeof( values[0] );
+ for ( TInt i = 0; i < numValues; i++ )
+ {
+ TMTPTypeUint16 data( values[i] );
+ expectedForm->AppendSupportedValueL( data );
+ }
+
+ CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeDRMStatus,
+ *expectedForm );
+
+ CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
+
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::NewDRMStatusPropDescL" ) );
+
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderDescriptionUtility::NewOMADRMStatusPropDescL
+// Construct property description of OMADRM status.
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CMediaMtpDataProviderDescriptionUtility::NewOMADRMStatusPropDescL()
+ {
+ PRINT( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::NewOMADRMStatusPropDescL" ) );
+
+ CMTPTypeObjectPropDescEnumerationForm* expectedForm =
+ CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT8 ); // + expectedForm
+
+ TUint8 values[] =
+ {
+ EMTPOMADrmNoProtection,
+ EMTPOMADrmProtection,
+ };
+
+ TInt numValues = sizeof( values ) / sizeof( values[0] );
+ for ( TInt i = 0; i < numValues; i++ )
+ {
+ TMTPTypeUint8 data( values[i] );
+ expectedForm->AppendSupportedValueL( data );
+ }
+
+ CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
+ propertyInfo.iDataType = EMTPTypeUINT8;
+ propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::EEnumerationForm;
+
+ CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPExtObjectPropCodeOmaDrmStatus,
+ propertyInfo,
+ expectedForm );
+
+ CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
+
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::NewOMADRMStatusPropDescL" ) );
+
+ return propertyDesc;
+ }
+
+// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderenumerator.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderenumerator.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -20,19 +20,12 @@
#include <mtp/mmtpobjectmgr.h>
#include <mtp/mmtpstoragemgr.h>
#include <mtp/cmtpobjectmetadata.h>
-#include <hal.h>
-#include "mediamtpdataproviderconst.h"
#include "cmediamtpdataproviderenumerator.h"
#include "cmediamtpdataprovider.h"
#include "mmmtpdplogger.h"
-#include "mmmtpdputility.h"
-#include "cmmmtpdpaccesssingleton.h"
#include "cmmmtpdpmetadataaccesswrapper.h"
-// Unit: microsecond
-const TInt KThresholdOfEnumerationLoopDuration = 1000 * 1000; // microsecond
-
const TInt KMTPDriveGranularity = 5;
const TInt KMediaDpArrayGranularity = 2;
@@ -65,14 +58,10 @@
CMediaMtpDataProvider& aDataProvider ) :
CActive( EPriorityLow ), // EPriorityStandard ? sure?
iFramework( aFramework ),
- iObjectMgr( aFramework.ObjectMgr() ),
- iDataProviderId( aFramework.DataProviderId() ),
iDataProvider( aDataProvider ),
- iDirStack( KMediaDpArrayGranularity ),
- iStorages( KMediaDpArrayGranularity ),
- iScanningDir( EFalse )
+ iStorages( KMediaDpArrayGranularity )
{
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderEnumerator::CMediaMtpDataProviderEnumerator, iDataProviderId = %d" ), iDataProviderId );
+ PRINT1( _L( "MM MTP <> CMediaMtpDataProviderEnumerator::CMediaMtpDataProviderEnumerator, DataProviderId = %d" ), iFramework.DataProviderId() );
}
// -----------------------------------------------------------------------------
@@ -84,8 +73,6 @@
{
PRINT( _L( "MM MTP => CMediaMtpDataProviderEnumerator::~CMediaMtpDataProviderEnumerator" ) );
Cancel();
- iDir.Close();
- iDirStack.Close();
iStorages.Close();
#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
@@ -121,10 +108,9 @@
}
CleanupStack::PopAndDestroy( &storages ); // - storages
}
- else if ( aStorageId != KMTPNotSpecified32 )
+ else if ( aStorageId != KMTPNotSpecified32
+ && storageMgr.ValidStorageId( aStorageId ) )
{
- __ASSERT_DEBUG( storageMgr.ValidStorageId( aStorageId ), User::Invariant() );
-
const CMTPStorageMetaData& storage( storageMgr.StorageL( aStorageId ) );
if ( storage.Uint( CMTPStorageMetaData::EStorageSystemType )
@@ -149,15 +135,9 @@
}
iStorageId = aStorageId;
-
- if ( iStorages.Count() > 0 )
- {
- ScanStorageL( iStorages[0] );
- }
- else
- {
- SignalCompleteL( iDataProvider );
- }
+ TRequestStatus* status = &iStatus;
+ User::RequestComplete( status, iStatus.Int() );
+ SetActive();
PRINT( _L( "MM MTP <= CMediaMtpDataProviderEnumerator::StartL" ) );
}
@@ -169,240 +149,38 @@
//
void CMediaMtpDataProviderEnumerator::DoCancel()
{
- iDir.Close();
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderEnumerator::ScanStorageL
-//
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderEnumerator::ScanStorageL( TUint32 aStorageId )
- {
- const CMTPStorageMetaData& storage( iFramework.StorageMgr().StorageL( aStorageId ) );
-
- __ASSERT_DEBUG( ( storage.Uint( CMTPStorageMetaData::EStorageSystemType ) == CMTPStorageMetaData::ESystemTypeDefaultFileSystem ),
- User::Invariant() );
-
- TFileName root( storage.DesC( CMTPStorageMetaData::EStorageSuid ) );
- PRINT2( _L("MM MTP <> CMediaMtpDataProviderEnumerator::ScanStorageL aStorageId = 0x%x, StorageSuid = %S"), aStorageId, &root );
-
- iParentHandle = KMTPHandleNone;
- iPath.Set( root, NULL, NULL);
- iDir.Close();
- User::LeaveIfError( iDir.Open( iFramework.Fs(),
- iPath.DriveAndPath(),
- KEntryAttNormal | KEntryAttDir ) );
- ScanDirL();
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderEnumerator::ScanNextStorageL
-//
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderEnumerator::ScanNextStorageL()
- {
- // If there are one or more unscanned storages left
- // (the currently scanned one is still on the list)
- if ( iStorages.Count() > 1 )
- {
- // Round trip suppport
- const CMTPStorageMetaData& storage( iFramework.StorageMgr().StorageL( iStorages[0] ) );
- TFileName root( storage.DesC( CMTPStorageMetaData::EStorageSuid ) );
- GetModifiedContentL( root );
- iDataProvider.GetWrapperL().UpdateMusicCollectionL();
-
- iStorages.Remove( 0 );
- ScanStorageL( iStorages[0] );
- }
- else
- {
-
- // Round trip suppport
- const CMTPStorageMetaData& storage( iFramework.StorageMgr().StorageL( iStorages[0] ) );
- TFileName root( storage.DesC( CMTPStorageMetaData::EStorageSuid ) );
- GetModifiedContentL( root );
-
- // We are done
- iStorages.Reset();
-
- SignalCompleteL( iDataProvider );
- }
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderEnumerator::ScanDirL
-//
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderEnumerator::ScanDirL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderEnumerator::ScanDirL" ) );
-
- StartEnumerationCount();
-
- iFirstUnprocessed = 0;
-
- iScanningDir = ETrue;
- PERFLOGSTART( KDirectoryScan );
- iDir.Read( iEntries, iStatus );
- SetActive();
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderEnumerator::ScanDirL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderEnumerator::ScanNextDirL
-// Recurse into the next directory on the stack
-// and scan it for entries.
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderEnumerator::ScanNextDirL()
- {
- TInt count = iDirStack.Count();
-
- if ( count == 0 )
- {
- // No more directories on the stack, try the next storage
- ScanNextStorageL();
- }
- else
- {
- TEntry* entry = iDirStack[count - 1];
- if ( entry != NULL )
- {
-
- // Empty TEntry, no more subdirectories in
- // the current path
- if ( entry->iName == KNullDesC )
- {
- // Remove current dir from path
- iPath.PopDir();
- iDirStack.Remove( count - 1 );
- delete entry;
- entry = NULL;
- iDir.Close();
-
- // Scan the next directory of the parent
- ScanNextDirL();
- }
- // Going into a subdirectory of current
- else
- {
- // Add directory to path
- iPath.AddDir( entry->iName );
- // Remove directory so we don't think it's a subdirectory
- iDirStack.Remove( count - 1 );
- delete entry;
- entry = NULL;
- ScanNextSubdirL();
- }
- }
- }
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderEnumerator::ScanNextSubdirL
-// Scan next sub dir
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderEnumerator::ScanNextSubdirL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderEnumerator::ScanNextSubdirL" ) );
-
- // A empty (non-constructed) TEntry is our marker telling us to pop a directory
- // from iPath when we see this
- TEntry* entry = new TEntry( TEntry() );
-
- User::LeaveIfNull( entry );
-
- iDirStack.AppendL( entry );
-
- // Leave with KErrNotFound if we don't find the object handle since it shouldn't be on the
- // dirstack if the entry wasn't added
- TPtrC suid = iPath.DriveAndPath().Left( iPath.DriveAndPath().Length() );
- // Update the current parenthandle with object of the directory
- PERFLOGSTART( KObjectManagerObjectUid );
- iParentHandle = iFramework.ObjectMgr().HandleL( suid );
- PERFLOGSTOP( KObjectManagerObjectUid );
- PRINT1( _L( "MM MTP <> iParentHandle = 0x%Lx" ), iParentHandle );
-
- // Kick-off a scan of the next directory
- iDir.Close();
-
- TInt err = iDir.Open( iFramework.Fs(),
- iPath.DriveAndPath(),
- KEntryAttNormal | KEntryAttDir );
-
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderEnumerator::ScanNextSubdirL, RDir::Open err = %d" ), err );
-
- if ( err == KErrNone )
- ScanDirL();
- else
- {
- iEntries = TEntryArray();
-
- TRequestStatus* status = &iStatus;
- User::RequestComplete( status, iStatus.Int() );
- SetActive();
- }
-
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderEnumerator::ScanNextSubdirL" ) );
}
// -----------------------------------------------------------------------------
// CMediaMtpDataProviderEnumerator::RunL
-//
+// Update the mpx db flag for round trip
// -----------------------------------------------------------------------------
//
void CMediaMtpDataProviderEnumerator::RunL()
{
- if ( iScanningDir )
- {
- PERFLOGSTOP( KDirectoryScan );
- }
+ PRINT1( _L( "MM MTP => CMediaMtpDataProviderEnumerator::RunL iStorages.Count() = %d" ), iStorages.Count() );
- iScanningDir = EFalse;
- if ( iEntries.Count() == 0 )
+ if ( iStorages.Count() > 0 )
{
- // No entries to process, scan next dir or storage
- ScanNextDirL();
- }
- else if ( iFirstUnprocessed < iEntries.Count() )
- {
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderEnumerator::RunL iFirstUnprocessed = %d" ), iFirstUnprocessed);
- TRAPD( err, ProcessEntriesL(););
+ const CMTPStorageMetaData& storage( iFramework.StorageMgr().StorageL( iStorages[0] ) );
+ TPtrC root( storage.DesC( CMTPStorageMetaData::EStorageSuid ) );
+ GetModifiedContentL( root );
+ TRAPD( err, iDataProvider.GetWrapperL().UpdateMusicCollectionL( root ) );
if ( err != KErrNone )
{
- iFirstUnprocessed++;
+ PRINT1( _L("MM MTP <> CMediaMtpDataProviderEnumerator::RunL, UpdateMusicCollectionL err =%d "), err );
}
-
- // Complete ourselves with current TRequestStatus
- // since we need to run again to either scan a new dir or drive
- // or process more entries
+ iStorages.Remove( 0 );
TRequestStatus* status = &iStatus;
User::RequestComplete( status, iStatus.Int() );
SetActive();
}
else
{
- switch ( iStatus.Int() )
- {
- case KErrNone:
- // There are still entries left to be read
- ScanDirL();
- break;
-
- case KErrEof:
- // There are no more entries
- default:
- // Error, ignore and continue with next dir
- ScanNextDirL();
- break;
- }
+ iStorages.Reset();
+ SignalCompleteL( iDataProvider );
}
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderEnumerator::RunL" ) );
}
// -----------------------------------------------------------------------------
@@ -412,7 +190,8 @@
//
TInt CMediaMtpDataProviderEnumerator::RunError( TInt aError )
{
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderEnumerator::RunError with error %d" ), aError );
+ if ( aError != KErrNone )
+ PRINT1( _L( "MM MTP <> CMediaMtpDataProviderEnumerator::RunError with error %d" ), aError );
TRAP_IGNORE( SignalCompleteL( iDataProvider ) );
@@ -428,13 +207,6 @@
{
CActiveScheduler::Add( this );
- TTimeIntervalMicroSeconds32 tickPeriod = 0;
- TInt err = UserHal::TickPeriod(tickPeriod);
-
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderEnumerator::ConstructL, UserHal::TickPeriod err = %d" ), err);
- User::LeaveIfError( err );
- iTickPeriod = tickPeriod.Int();
-
#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
iPerfLog = CMmMtpDpPerfLog::NewL( _L( "MediaMtpDataProviderEnumerator" ) );
#endif
@@ -453,154 +225,6 @@
}
// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderEnumerator::ProcessEntriesL
-// Iterates iEntries adding entries as needed to object manager and iDirStack.
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderEnumerator::ProcessEntriesL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderEnumerator::ProcessEntriesL" ) );
-
- TBuf<KMaxFileName> path = iPath.DriveAndPath();
-
- while ( !IsOverThreshold() && iFirstUnprocessed < iEntries.Count() )
- {
- const TEntry& entry = iEntries[iFirstUnprocessed];
- path.Append( entry.iName );
- PRINT1( _L( "MM MTP <> path = %S" ), &path );
-
- TInt len = entry.iName.Length();
-
- if ( entry.IsDir() )
- {
- path.Append( '\\' );
- ++len;
-
- // we don't need to process folder, just remember
- // the folder
- TEntry* dirEntry = new TEntry( entry );
- User::LeaveIfNull( dirEntry );
- iDirStack.AppendL( dirEntry );
- }
- else if ( IsFileAccepted( path ) )
- {
- AddEntryL( path );
- }
-
- // Remove filename part
- path.SetLength( path.Length() - len );
-
- iFirstUnprocessed++;
- }
-
- StartEnumerationCount();
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderEnumerator::ProcessEntriesL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderEnumerator::AddEntryL
-// Add a file entry to the object store
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderEnumerator::AddEntryL( const TDesC& aFullFileName )
- {
- PRINT1( _L( "MM MTP => CMediaDataProviderEnumerator::AddEntryL aFullFileName = %S" ), &aFullFileName );
-
- CMTPObjectMetaData* object( CMTPObjectMetaData::NewLC( iDataProviderId,
- iFormatCode,
- iStorages[0],
- aFullFileName ) ); // + object
-
- object->SetUint( CMTPObjectMetaData::EParentHandle, iParentHandle );
-
- if ( ( iFormatCode == EMTPFormatCodeMP4Container )
- || ( iFormatCode == EMTPFormatCode3GPContainer )
- || ( iFormatCode == EMTPFormatCodeASF ) )
- {
- TMmMtpSubFormatCode subFormatCode;
-
- // Note: Delay the file parsing until external enumeration phase to avoid time-out
- subFormatCode = EMTPSubFormatCodeUnknown;
-
- object->SetUint( CMTPObjectMetaData::EFormatSubCode, (TUint)subFormatCode );
- }
-
- PERFLOGSTART( KObjectManagerInsert );
- iObjectMgr.InsertObjectL( *object );
- PERFLOGSTOP( KObjectManagerInsert );
-
- CleanupStack::PopAndDestroy( object ); // - object
-
- PRINT1( _L( "MM MTP <= CMediaMtpDataProviderEnumerator::AddEntryL, entry inserted, iFormatCode = 0x%x" ), iFormatCode);
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderEnumerator::GetObjectFormatCode
-// Returns a TMTPFormatCode for the requested object
-// -----------------------------------------------------------------------------
-//
-TMTPFormatCode CMediaMtpDataProviderEnumerator::GetObjectFormatCode( const TDesC& aFullFileName )
- {
- PRINT1( _L("MM MTP <> CMediaMtpDataProviderEnumerator::GetObjectFormatCodeL aFullFileName = %S"), &aFullFileName );
- TMTPFormatCode formatCode = MmMtpDpUtility::FormatFromFilename( aFullFileName );
- return formatCode;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderEnumerator::IsFileAccepted
-// Is the file format is supported by this Dp
-// -----------------------------------------------------------------------------
-//
-TBool CMediaMtpDataProviderEnumerator::IsFileAccepted( const TDesC& aFullFileName )
- {
- PERFLOGSTART(KFormatFilter);
- iFormatCode = GetObjectFormatCode( aFullFileName );
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderEnumerator::IsFileAcceptedL formatCode = 0x%x" ), iFormatCode );
- TBool accepted = EFalse;
- TInt count = sizeof( KMediaMtpDataProviderSupportedFormats ) / sizeof( TUint16 );
- for ( TInt i = 0; i < count; i++ )
- {
- if ( iFormatCode == KMediaMtpDataProviderSupportedFormats[i] )
- {
- accepted = ETrue;
- break;
- }
- }
-
- PERFLOGSTOP(KFormatFilter);
- return accepted;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaDpMtpEnumerator::StartEnumerationCount
-// start record system tick
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderEnumerator::StartEnumerationCount()
- {
- iTickCountBegin = User::TickCount();
- }
-
-// -----------------------------------------------------------------------------
-// CMediaDpMtpEnumerator::IsOverThreshold
-// Is system tick more than the predefined value?
-// -----------------------------------------------------------------------------
-//
-TBool CMediaMtpDataProviderEnumerator::IsOverThreshold()
- {
- TUint tcNow = User::TickCount();
-
- if ( ( tcNow - iTickCountBegin ) * iTickPeriod >= KThresholdOfEnumerationLoopDuration )
- {
- return ETrue;
- }
- else
- {
- return EFalse;
- }
- }
-
-// -----------------------------------------------------------------------------
// CMediaDpMtpEnumerator::GetModifiedContentL()
// Get Modified Content and report to Framework
// -----------------------------------------------------------------------------
@@ -612,14 +236,15 @@
CDesCArray* modifiedContents = new ( ELeave ) CDesCArrayFlat( KMTPDriveGranularity );
CleanupStack::PushL( modifiedContents ); // + modifiedContents
- iDataProvider.GetWrapperL().GetModifiedContentL( aStorageRoot, arrayCount, *modifiedContents );
+ TRAPD( err, iDataProvider.GetWrapperL().GetModifiedContentL( aStorageRoot, arrayCount, *modifiedContents ) );
+ if ( err != KErrNone )
+ PRINT1( _L("MM MTP <> GetModifiedContentL err =%d "), err );
if ( arrayCount > 0 )
{
CMTPObjectMetaData* object = CMTPObjectMetaData::NewLC(); // + object
for ( TInt i = 0; i < arrayCount; i++ )
{
-
if ( iFramework.ObjectMgr().ObjectL( ( *modifiedContents )[i], *object ) )
{
object->SetUint( CMTPObjectMetaData::EObjectMetaDataUpdate , 1 );
@@ -642,7 +267,6 @@
//
void CMediaMtpDataProviderEnumerator::SessionClosedL()
{
- iDataProvider.GetWrapperL().UpdateMusicCollectionL();
iDataProvider.GetWrapperL().CleanupDatabaseL();
}
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetformatcapabilities.cpp Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,795 +0,0 @@
-/*
-* 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 <mtp/cmtptypeobjectpropdesc.h>
-#include <mtp/mtpprotocolconstants.h>
-#include <mtp/cmtptypestring.h>
-
-#include "cmediamtpdataprovidergetobjectpropdesc.h"
-#include "mediamtpdataproviderconst.h"
-#include "cmediamtpdataprovidergetformatcapabilities.h"
-#include "mmmtpdplogger.h"
-
-const TUint32 KMTPDescriptionLen = 0x00000200;
-
-// forward declaration
-class MMmMtpDpConfig;
-class CMTPTypeObjectPropDesc;
-class CMTPTypeInterdependentPropDesc;
-class CMTPTypeObjectPropDesc;
-class CMTPTypeString;
-class CGetFormatCapabilities;
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::NewL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-MMmRequestProcessor* CMediaMtpDataProviderGetFormatCapabilities::NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig )
- {
- CMediaMtpDataProviderGetFormatCapabilities* self =
- new ( ELeave ) CMediaMtpDataProviderGetFormatCapabilities( aFramework,
- aConnection,
- aDpConfig );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::ConstructL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetFormatCapabilities::ConstructL()
- {
- CGetFormatCapabilities::ConstructL();
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::~CMediaMtpDataProviderGetFormatCapabilities()
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CMediaMtpDataProviderGetFormatCapabilities::~CMediaMtpDataProviderGetFormatCapabilities()
- {
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::CMediaMtpDataProviderGetFormatCapabilities
-// Standard c++ constructor
-// -----------------------------------------------------------------------------
-//
-CMediaMtpDataProviderGetFormatCapabilities::CMediaMtpDataProviderGetFormatCapabilities( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig ) :
- CGetFormatCapabilities( aFramework, aConnection, aDpConfig )
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::ServiceInterdepentPropDescL
-//
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetFormatCapabilities::ServiceInterdepentPropDescL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceInterdepentPropDescL" ) );
-
- iInterdependentPropDesc = CMTPTypeInterdependentPropDesc::NewL();
-
- TBool audioWaveCodecSupported = EFalse;
- TBool audioBitRateSupported = EFalse;
- TBool videoFourCcCodecSupported = EFalse;
- TBool videoBitRateSupported = EFalse;
-
- switch ( iFormatCode )
- {
- case EMTPFormatCodeWMA:
- case EMTPFormatCodeMP3:
- case EMTPFormatCodeAAC:
- case EMTPFormatCodeWAV:
- {
- TInt count = sizeof( KMmMtpDpSupportedPropMandatoryAudio ) / sizeof( TUint16 );
-
- for ( TInt i = 0; i < count; i++ )
- {
- switch ( KMmMtpDpSupportedPropMandatoryAudio[i] )
- {
- case EMTPObjectPropCodeAudioWAVECodec:
- audioWaveCodecSupported = ETrue;
- break;
- case EMTPObjectPropCodeAudioBitRate:
- audioBitRateSupported = ETrue;
- break;
- default:
- // do nothing
- break;
- }
- }
- }
- break;
-
- case EMTPFormatCodeMP4Container:
- {
- TInt count = sizeof( KMmMtpDpSupportedPropMandatoryAudio ) / sizeof( TUint16 );
-
- for ( TInt i = 0; i < count; i++ )
- {
- switch ( KMmMtpDpSupportedPropMandatoryAudio[i] )
- {
- case EMTPObjectPropCodeAudioWAVECodec:
- audioWaveCodecSupported = ETrue;
- break;
- case EMTPObjectPropCodeAudioBitRate:
- audioBitRateSupported = ETrue;
- break;
- default:
- // do nothing
- break;
- }
- }
- }
- break;
-
- case EMTPFormatCode3GPContainer:
- {
- TInt count = sizeof( KMmMtpDpSupportedPropMandatoryAudio ) / sizeof( TUint16 );
-
- for ( TInt i = 0; i < count; i++ )
- {
- switch ( KMmMtpDpSupportedPropMandatoryAudio[i] )
- {
- case EMTPObjectPropCodeAudioWAVECodec:
- audioWaveCodecSupported = ETrue;
- break;
- case EMTPObjectPropCodeAudioBitRate:
- audioBitRateSupported = ETrue;
- break;
- default:
- // do nothing
- break;
- }
- }
- }
- break;
-
- case EMTPFormatCodeWMV:
- case EMTPFormatCodeASF:
- {
- TInt count = sizeof( KMmMtpDpSupportedPropMandatoryWMV ) / sizeof( TUint16 );
-
- for ( TInt i = 0; i < count; i++ )
- {
- switch ( KMmMtpDpSupportedPropMandatoryWMV[i] )
- {
- case EMTPObjectPropCodeAudioWAVECodec:
- audioWaveCodecSupported = ETrue;
- break;
- case EMTPObjectPropCodeAudioBitRate:
- audioBitRateSupported = ETrue;
- break;
- case EMTPObjectPropCodeVideoFourCCCodec:
- videoFourCcCodecSupported = ETrue;
- break;
- case EMTPObjectPropCodeVideoBitRate:
- videoBitRateSupported = ETrue;
- break;
- default:
- // do nothing
- break;
- }
- }
- }
- break;
-
- default:
- {
- User::Leave( KErrNotSupported );
- }
- break;
- }
-
-
- if ( audioWaveCodecSupported && audioBitRateSupported )
- {
- CMTPTypeInterdependentProperties* properties = CMTPTypeInterdependentProperties::NewL();
- if ( videoFourCcCodecSupported && videoBitRateSupported )
- {
- // TODO: need to confirm
- properties->AppendL( ServiceVideoFourCCCodecL() );
- properties->AppendL( ServiceVideoBitrateL() );
- iInterdependentPropDesc->AppendL( properties );
- }
- properties = CMTPTypeInterdependentProperties::NewL();
- properties->AppendL( ServiceAudioWaveCodecL() );
- properties->AppendL( ServiceAudioBitrateL() );
- iInterdependentPropDesc->AppendL( properties );
- }
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceInterdepentPropDescL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::ServiceAudioWaveCodecL
-//
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CMediaMtpDataProviderGetFormatCapabilities::ServiceAudioWaveCodecL()
- {
- PRINT1( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceAudioWaveCodecL, iFormatCode = 0x%X" ), iFormatCode );
- CMTPTypeObjectPropDescEnumerationForm* form =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT32 ); // + form
-
- switch( iFormatCode )
- {
- case EMTPFormatCodeWMA:
- case EMTPFormatCodeWMV:
- case EMTPFormatCodeASF:
- form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecWMA ) );
- break;
-
- case EMTPFormatCodeMP3:
- form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecMP3 ) );
- break;
-
- case EMTPFormatCodeMP4Container:
- case EMTPFormatCode3GPContainer:
- case EMTPFormatCodeAAC:
- form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecAAC ) );
- break;
-
- case EMTPFormatCodeWAV:
- form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecPCM ) );
- break;
-
- default:
- User::Leave( KErrNotSupported );
- break;
- }
-
- CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewLC( EMTPObjectPropCodeAudioWAVECodec, *form ); // + propertyDesc
-
- // Set group code
- propertyDesc->SetUint32L( CMTPTypeObjectPropDesc::EGroupCode,
- EGroupCodeMediaDB );
- CleanupStack::Pop( propertyDesc ); // - propertyDesc
- CleanupStack::PopAndDestroy( form ); // - form
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceAudioWaveCodecL" ) );
-
- return propertyDesc;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::ServiceAudioBitrateL
-//
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CMediaMtpDataProviderGetFormatCapabilities::ServiceAudioBitrateL()
- {
- PRINT1( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceAudioBitrateL, iFormatCode = 0x%X" ), iFormatCode );
- CMTPTypeObjectPropDesc* propertyDesc = NULL;
- switch( iFormatCode )
- {
- case EMTPFormatCodeWMA:
- case EMTPFormatCodeWMV:
- case EMTPFormatCodeASF:
- propertyDesc = ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPWMAMinBitrate,
- EMTPWMAMaxBitrate,
- EMTPAudioBitrateStep );
- break;
-
- case EMTPFormatCodeMP3:
- propertyDesc = ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPMP3MinBitrate,
- EMTPMP3MaxBitrate,
- EMTPAudioBitrateStep );
- break;
-
- case EMTPFormatCodeAAC:
- propertyDesc = ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPAACMinBitrate,
- EMTPAACMaxBitrate,
- EMTPAudioBitrateStep );
- break;
-
- case EMTPFormatCodeWAV:
- propertyDesc = ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPPCMMinBitrate,
- EMTPPCMMaxBitrate,
- EMTPAudioBitrateStep );
- break;
-
- case EMTPFormatCodeMP4Container:
- case EMTPFormatCode3GPContainer:
- propertyDesc = ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPAACPlusMinBitrate,
- EMTPAACPlusMaxBitrate,
- EMTPAudioBitrateStep );
- break;
-
- default:
- User::Leave( KErrNotSupported );
- break;
- }
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceAudioBitrateL" ) );
-
- return propertyDesc;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::ServiceVideoFourCCCodecL
-// Create Description and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CMediaMtpDataProviderGetFormatCapabilities::ServiceVideoFourCCCodecL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceVideoFourCCCodecL" ) );
- CMTPTypeObjectPropDesc* propertyDesc = NULL;
- if ( ( EMTPFormatCodeWMV == iFormatCode )
- || ( EMTPFormatCodeASF == iFormatCode ) )
- {
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT32 ); // + expectedForm
-
- TUint32 values[] =
- {
- EMTPVideoFourCCCodecWMV3
- };
-
- TInt numValues = sizeof( values ) / sizeof( values[0] );
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint32 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
- propertyDesc = CMTPTypeObjectPropDesc::NewLC( EMTPObjectPropCodeVideoFourCCCodec,
- *expectedForm ); // + propertyDesc
- // Set group code
- propertyDesc->SetUint32L( CMTPTypeObjectPropDesc::EGroupCode,
- EGroupCodeMediaDB );
- CleanupStack::Pop( propertyDesc ); // - propertyDesc
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
- }
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceVideoFourCCCodecL" ) );
- return propertyDesc;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::ServiceVideoBitrateL
-// Create Description and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CMediaMtpDataProviderGetFormatCapabilities::ServiceVideoBitrateL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceVideoBitrateL" ) );
- CMTPTypeObjectPropDesc* propertyDesc = NULL;
- if ( ( EMTPFormatCodeWMV == iFormatCode )
- || ( EMTPFormatCodeASF == iFormatCode ) )
- {
- propertyDesc = ServiceRangeFormDescriptionL( EMTPObjectPropCodeVideoBitRate,
- EMTPWMVMinBitrate,
- EMTPWMVMaxBitrate,
- EMTPVideoBitrateStep,
- ETrue );
- }
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceVideoBitrateL" ) );
- return propertyDesc;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::ServiceRangeFormDescriptionL
-//
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CMediaMtpDataProviderGetFormatCapabilities::ServiceRangeFormDescriptionL( TUint16 aPropertyCode,
- TUint32 aMinValue,
- TUint32 aMaxValue,
- TUint32 aStepValue,
- TBool aIsReadOnly )
- {
- PRINT1( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceRangeFormDescriptionL, aPropertyCode = 0x%X" ),
- aPropertyCode );
- CMTPTypeObjectPropDescRangeForm* form =
- CMTPTypeObjectPropDescRangeForm::NewLC( EMTPTypeUINT32 ); // + form
-
- // Set expected values
- form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMinimumValue, aMinValue );
- form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMaximumValue, aMaxValue );
- form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EStepSize, aStepValue );
-
- CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
- propertyInfo.iDataType = EMTPTypeUINT32;
- propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::ERangeForm;
- propertyInfo.iGetSet = !aIsReadOnly;
-
- CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewLC( aPropertyCode,
- propertyInfo,
- form ); // + propertyDesc
- // Set group code
- propertyDesc->SetUint32L( CMTPTypeObjectPropDesc::EGroupCode, EGroupCodeMediaDB );
-
- CleanupStack::Pop( propertyDesc ); // - propertyDesc
- CleanupStack::PopAndDestroy( form ); // - form
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceRangeFormDescriptionL" ) );
-
- return propertyDesc;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::ServiceSpecificpropertyDescL
-//
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CMediaMtpDataProviderGetFormatCapabilities::ServiceSpecificPropertyDescL( TUint16 aPropertyCode )
- {
- PRINT1( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceSpecificPropertyDescL, aPropertyCode = 0x%X" ), aPropertyCode );
- // Property object to return with the desc value
- CMTPTypeObjectPropDesc* propertyDesc = NULL;
-
- switch ( aPropertyCode )
- {
- // format specific
- case EMTPObjectPropCodeArtist: // Artist
- case EMTPObjectPropCodeTrack: // Track
- case EMTPObjectPropCodeGenre: // Genre
- case EMTPObjectPropCodeUseCount: // Use Count
- case EMTPObjectPropCodeAlbumName: // Album Name
- case EMTPObjectPropCodeAlbumArtist: // Album Artist
- case EMTPObjectPropCodeOriginalReleaseDate: // Original Release Date
- case EMTPObjectPropCodeComposer: // Composer
- case EMTPObjectPropCodeParentalRating:
- propertyDesc = CMTPTypeObjectPropDesc::NewL( aPropertyCode );
- break;
-
- // Number of Channels (m)
- case EMTPObjectPropCodeNumberOfChannels:
- propertyDesc = ServiceNumberOfChannelsL();
- break;
-
- // Sample Rate (HAS MINIMUM AND MAX VALUE)
- case EMTPObjectPropCodeSampleRate:
- propertyDesc = ServiceCodeSampleRateL();
- break;
-
- // Audio Wave Codec (MAY REQUIRED LIMITED NUMBER TO BE PRODUCED)
- case EMTPObjectPropCodeAudioWAVECodec:
- propertyDesc = ServiceAudioWaveCodecL();
- break;
-
- // Audio Bit Rate (MAY REQUIRED LIMITED NUMBER TO BE PRODUCED)
- case EMTPObjectPropCodeAudioBitRate:
- propertyDesc = ServiceAudioBitrateL();
- break;
-
- // Duration
- case EMTPObjectPropCodeDuration:
- propertyDesc = ServiceRangeFormDescriptionL( aPropertyCode,
- EMTPMinDuration,
- EMTPMaxDuration,
- EMTPDurationStep );
- break;
-
- // Description
- case EMTPObjectPropCodeDescription:
- propertyDesc = ServiceDescriptionL();
- break;
-
- case EMTPObjectPropCodeWidth:
- propertyDesc = ServiceRangeFormDescriptionL( aPropertyCode,
- EMTPMinWidth,
- EMTPMaxWidth,
- EMTPStepWidth );
- break;
-
- case EMTPObjectPropCodeHeight:
- propertyDesc = ServiceRangeFormDescriptionL( aPropertyCode,
- EMTPMinHeight,
- EMTPMaxHeight,
- EMTPStepHeight );
- break;
-
- case EMTPObjectPropCodeScanType:
- propertyDesc = ServiceScanTypeDescriptionL();
- break;
-
- case EMTPObjectPropCodeVideoFourCCCodec:
- propertyDesc = ServiceVideoFourCCCodecL();
- break;
-
- case EMTPObjectPropCodeVideoBitRate:
- propertyDesc = ServiceRangeFormDescriptionL( aPropertyCode,
- EMTPWMVMinBitrate,
- EMTPWMVMaxBitrate,
- EMTPVideoBitrateStep,
- ETrue );
- break;
-
- case EMTPObjectPropCodeFramesPerThousandSeconds:
- propertyDesc = ServiceRangeFormDescriptionL( aPropertyCode,
- EMTPMinFramesPerThousandSeconds,
- EMTPMaxFramesPerThousandSeconds,
- EMTPStepFramesPerThousandSeconds );
- break;
-
- case EMTPObjectPropCodeKeyFrameDistance:
- propertyDesc = ServiceRangeFormDescriptionL( aPropertyCode,
- EMTPMinKeyFrameDistance,
- EMTPMaxKeyFrameDistance,
- EMTPStepKeyFrameDistance );
- break;
-
- case EMTPObjectPropCodeEncodingProfile:
- propertyDesc = ServiceEncodingProfileDescriptionL();
- break;
-
- case EMTPObjectPropCodeDRMStatus:
- propertyDesc = ServiceDRMStatusL();
- break;
-
- case EMTPExtObjectPropCodeOmaDrmStatus:
- propertyDesc = ServiceOMADRMStatusL();
- break;
-
- default:
- User::Leave( KErrNotSupported );
- break;
- }
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceSpecificPropertyDescL" ) );
- return propertyDesc;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::ServiceNumberOfChannelsL()
-// Create list of possible Channel numbers and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CMediaMtpDataProviderGetFormatCapabilities::ServiceNumberOfChannelsL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceNumberOfChannelsL" ) );
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT16 ); // + expectedForm
-
- TUint16 values[] =
- {
- EMTPChannelMono,
- EMTPChannelStereo
- };
-
- TInt numValues = sizeof( values ) / sizeof( values[0] );
-
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint16 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeNumberOfChannels,
- *expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceNumberOfChannelsL" ) );
-
- return propertyDesc;
- }
-
-// -----------------------------------------------------------------------------
-//CMediaMtpDataProviderGetFormatCapabilities::ServiceCodeSampleRateL
-// Create list of possible Sample rate list and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CMediaMtpDataProviderGetFormatCapabilities::ServiceCodeSampleRateL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceCodeSampleRateL" ) );
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT32 ); // + expectedForm
-
- TUint32 values[] =
- {
- EMTPSampleRate8K,
- EMTPSampleRate16K,
- EMTPSampleRate22_05K,
- EMTPSampleRate24K,
- EMTPSampleRate32K,
- EMTPSampleRate44_1K,
- EMTPSampleRate48K
- };
-
- TInt numValues = sizeof( values ) / sizeof( values[0] );
-
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint32 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeSampleRate,
- CMTPTypeObjectPropDesc::EEnumerationForm,
- expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceCodeSampleRateL" ) );
-
- return propertyDesc;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::ServiceDescriptionL()
-// Create Description and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CMediaMtpDataProviderGetFormatCapabilities::ServiceDescriptionL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceDescriptionL" ) );
-
- TMTPTypeUint32 uint32Data( KMTPDescriptionLen );
- CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeDescription,
- CMTPTypeObjectPropDesc::ELongStringForm,
- &uint32Data );
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceDescriptionL" ) );
-
- return propertyDesc;
- }
-
-// -----------------------------------------------------------------------------
-//CMediaMtpDataProviderGetFormatCapabilities::ServiceScanTypeDescriptionL
-// Create Description and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CMediaMtpDataProviderGetFormatCapabilities::ServiceScanTypeDescriptionL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceScanTypeDescriptionL" ) );
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT16 ); // + expectedForm
-
- TUint16 values[] =
- {
- EMTPScanTypeProgressive
- };
-
- TInt numValues = sizeof( values ) / sizeof( values[0] );
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint16 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- CMTPTypeObjectPropDesc* propertyDesc = NULL;
- propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeScanType,
- *expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceScanTypeDescriptionL" ) );
-
- return propertyDesc;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::ServiceEncodingProfileDescriptionL
-// Create Description and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CMediaMtpDataProviderGetFormatCapabilities::ServiceEncodingProfileDescriptionL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceEncodingProfileDescriptionL" ) );
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeString ); // + expectedForm
-
- CMTPTypeString* string = CMTPTypeString::NewLC( _L( "SP@LL" ) ); // + string
- expectedForm->AppendSupportedValueL( *string );
- string->SetL( _L("SP@ML"));
- expectedForm->AppendSupportedValueL( *string );
- string->SetL( _L("MP@LL"));
- expectedForm->AppendSupportedValueL( *string );
-
- CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
- propertyInfo.iDataType = EMTPTypeString;
- propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::EEnumerationForm;
- propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadWrite;
-
- CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeEncodingProfile,
- propertyInfo,
- expectedForm );
-
- CleanupStack::PopAndDestroy( string ); // - string
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceEncodingProfileDescriptionL" ) );
-
- return propertyDesc;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::ServiceDRMStatusL
-// Create Description and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CMediaMtpDataProviderGetFormatCapabilities::ServiceDRMStatusL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceDRMStatusL" ) );
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT16 ); // + expectedForm
-
- TUint16 values[] =
- {
- EMTPDrmNoProtection,
- EMTPDrmProtection,
- EMTPDrmReserveForMTP,
- EMTPDrmVenderExtension
- };
-
- TInt numValues = sizeof( values ) / sizeof( values[0] );
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint16 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeDRMStatus,
- *expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceDRMStatusL" ) );
-
- return propertyDesc;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetFormatCapabilities::ServiceOMADRMStatusL
-// Create Description and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CMediaMtpDataProviderGetFormatCapabilities::ServiceOMADRMStatusL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetFormatCapabilities::ServiceOMADRMStatusL" ) );
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT8 ); // + expectedForm
-
- TUint8 values[] =
- {
- EMTPOMADrmNoProtection,
- EMTPOMADrmProtection,
- };
-
- TInt numValues = sizeof( values ) / sizeof( values[0] );
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint8 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
- propertyInfo.iDataType = EMTPTypeUINT8;
- propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::EEnumerationForm;
-
- CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPExtObjectPropCodeOmaDrmStatus,
- propertyInfo,
- expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetFormatCapabilities::ServiceOMADRMStatusL" ) );
-
- return propertyDesc;
- }
-
-// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetinterdependentpropdesc.cpp Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,461 +0,0 @@
-/*
-* 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: Implement the operation: GetInterdenpendentPropDesc
-*
-*/
-
-
-#include "cmediamtpdataprovidergetinterdependentpropdesc.h"
-#include "mediamtpdataproviderconst.h"
-#include "mmmtpdplogger.h"
-#include "tobjectdescription.h"
-#include "mmmtpdpdefs.h"
-#include "mmmtpdpconfig.h"
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetInterDependentPropDesc::NewL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-MMmRequestProcessor* CMediaMtpDataProviderGetInterDependentPropDesc::NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig )
- {
- CMediaMtpDataProviderGetInterDependentPropDesc* self =
- new ( ELeave ) CMediaMtpDataProviderGetInterDependentPropDesc( aFramework,
- aConnection );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaDpMtpGetInterDependentPropDesc::ConstructL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetInterDependentPropDesc::ConstructL()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetInterDependentPropDesc::~CMediaMtpDataProviderGetInterDependentPropDesc
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CMediaMtpDataProviderGetInterDependentPropDesc::~CMediaMtpDataProviderGetInterDependentPropDesc()
- {
- delete iDataset;
- delete iProperties;
- }
-
-// -----------------------------------------------------------------------------
-// CMTPGetInterDependentPropDesc::CMTPGetInterDependentPropDesc
-// Standard c++ constructor
-// -----------------------------------------------------------------------------
-//
-CMediaMtpDataProviderGetInterDependentPropDesc::CMediaMtpDataProviderGetInterDependentPropDesc( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection ) :
- CRequestProcessor( aFramework, aConnection, 0, NULL )
- {
- PRINT( _L( "Operation: GetInterdependentPropDesc(0x9807)" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetInterDependentPropDesc::CheckRequestL
-// Verify the reqeust and returns it
-// -----------------------------------------------------------------------------
-//
-TMTPResponseCode CMediaMtpDataProviderGetInterDependentPropDesc::CheckRequestL()
- {
- TMTPResponseCode responseCode = CRequestProcessor::CheckRequestL();
- iFormatCode = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
-
- if ( EMTPRespCodeOK == responseCode )
- {
- TInt count = sizeof( KMediaMtpDataProviderSupportedFormats ) / sizeof( TUint16 );
-
- responseCode = EMTPRespCodeInvalidObjectFormatCode;
-
- for ( TInt i = 0; i < count; i++ )
- {
- if ( iFormatCode == KMediaMtpDataProviderSupportedFormats[i] )
- {
- responseCode = EMTPRespCodeOK;
- break;
- }
- }
- }
-
- return responseCode;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetInterDependentPropDesc::ServiceL
-// service a request at request phase
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetInterDependentPropDesc::ServiceL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetInterDependentPropDesc::ServiceL" ) );
-
- // Clear the data set.
- delete iDataset;
- iDataset = NULL;
- iDataset = CMTPTypeInterdependentPropDesc::NewL();
-
- TBool audioWaveCodecSupported = EFalse;
- TBool audioBitRateSupported = EFalse;
- TBool videoFourCcCodecSupported = EFalse;
- TBool videoBitRateSupported = EFalse;
-
- switch ( iFormatCode )
- {
- case EMTPFormatCodeWMA:
- case EMTPFormatCodeMP3:
- case EMTPFormatCodeAAC:
- case EMTPFormatCodeWAV:
- {
- TInt count = sizeof( KMmMtpDpSupportedPropMandatoryAudio ) / sizeof( TUint16 );
-
- for ( TInt i = 0; i < count; i++ )
- {
- switch ( KMmMtpDpSupportedPropMandatoryAudio[i] )
- {
- case EMTPObjectPropCodeAudioWAVECodec:
- audioWaveCodecSupported = ETrue;
- break;
- case EMTPObjectPropCodeAudioBitRate:
- audioBitRateSupported = ETrue;
- break;
- default:
- PRINT( _L( "MM MTP <> CMediaMtpDataProviderGetInterDependentPropDesc::ServiceL default" ) );
- // do nothing
- break;
- }
- }
- }
- break;
-
- case EMTPFormatCodeMP4Container:
- {
- TInt count = sizeof( KMmMtpDpSupportedPropMandatoryAudio ) / sizeof( TUint16 );
-
- for ( TInt i = 0; i < count; i++ )
- {
- switch ( KMmMtpDpSupportedPropMandatoryAudio[i] )
- {
- case EMTPObjectPropCodeAudioWAVECodec:
- audioWaveCodecSupported = ETrue;
- break;
- case EMTPObjectPropCodeAudioBitRate:
- audioBitRateSupported = ETrue;
- break;
- default:
- // do nothing
- break;
- }
- }
- }
- break;
-
- case EMTPFormatCode3GPContainer:
- {
- TInt count = sizeof( KMmMtpDpSupportedPropMandatoryAudio ) / sizeof( TUint16 );
-
- for ( TInt i = 0; i < count; i++ )
- {
- switch ( KMmMtpDpSupportedPropMandatoryAudio[i] )
- {
- case EMTPObjectPropCodeAudioWAVECodec:
- audioWaveCodecSupported = ETrue;
- break;
- case EMTPObjectPropCodeAudioBitRate:
- audioBitRateSupported = ETrue;
- break;
- default:
- // do nothing
- break;
- }
- }
- }
- break;
-
- case EMTPFormatCodeWMV:
- case EMTPFormatCodeASF:
- {
- TInt count = sizeof( KMmMtpDpSupportedPropMandatoryWMV ) / sizeof( TUint16 );
-
- for ( TInt i = 0; i < count; i++ )
- {
- switch (KMmMtpDpSupportedPropMandatoryWMV[i] )
- {
- case EMTPObjectPropCodeAudioWAVECodec:
- audioWaveCodecSupported = ETrue;
- break;
- case EMTPObjectPropCodeAudioBitRate:
- audioBitRateSupported = ETrue;
- break;
- case EMTPObjectPropCodeVideoFourCCCodec:
- videoFourCcCodecSupported = ETrue;
- break;
- case EMTPObjectPropCodeVideoBitRate:
- videoBitRateSupported = ETrue;
- break;
- default:
- // do nothing
- break;
- }
- }
- }
- break;
-
- default:
- {
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetInterDependentPropDesc::ServiceL leave because of invalid formatcode = 0x%x" ), iFormatCode );
- User::Leave( KErrNotSupported );
- }
- break;
- }
-
- if ( audioWaveCodecSupported && audioBitRateSupported )
- {
- if ( videoFourCcCodecSupported && videoBitRateSupported )
- {
- iProperties = CMTPTypeInterdependentProperties::NewL();
- ServiceVideoFourCCCodecL();
- ServiceVideoBitrateL();
- iDataset->AppendL( iProperties );
-// CleanupStack::Pop();
- iProperties = NULL;
- }
-
- iProperties = CMTPTypeInterdependentProperties::NewL();
- ServiceAudioWaveCodecL();
- ServiceAudioBitrateL();
- iDataset->AppendL( iProperties );
-// CleanupStack::Pop();
- iProperties = NULL;
- }
-
- // Send the dataset.
- SendDataL( *iDataset );
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetInterDependentPropDesc::ServiceL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetInterDependentPropDesc::ServiceAudioWaveCodecL
-//
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetInterDependentPropDesc::ServiceAudioWaveCodecL()
- {
- CMTPTypeObjectPropDescEnumerationForm* form =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT32 );
-
- switch( iFormatCode )
- {
- case EMTPFormatCodeWMA:
- case EMTPFormatCodeWMV:
- case EMTPFormatCodeASF:
- form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecWMA ) );
- break;
-
- case EMTPFormatCodeMP3:
- form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecMP3 ) );
- break;
-
- case EMTPFormatCodeMP4Container:
- case EMTPFormatCode3GPContainer:
- case EMTPFormatCodeAAC:
- form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecAAC ) );
- break;
-
- case EMTPFormatCodeWAV:
- form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecPCM ) );
- break;
-
- default:
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetInterDependentPropDesc::ServiceAudioWaveCodecL leave because of invalid formatcode = 0x%x" ), iFormatCode );
- User::Leave( KErrNotSupported );
- break;
- }
-
- CMTPTypeObjectPropDesc::TPropertyInfo propInfo;
- propInfo.iDataType = EMTPTypeUINT32;
- propInfo.iFormFlag = CMTPTypeObjectPropDesc::EEnumerationForm;
- propInfo.iGetSet = CMTPTypeObjectPropDesc::EReadWrite;
- SetFormForResponseL( EMTPObjectPropCodeAudioWAVECodec, propInfo, form );
- CleanupStack::PopAndDestroy( form );
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetInterDependentPropDesc::ServiceAudioBitrateL
-//
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetInterDependentPropDesc::ServiceAudioBitrateL()
- {
- switch( iFormatCode )
- {
- case EMTPFormatCodeWMA:
- case EMTPFormatCodeWMV:
- case EMTPFormatCodeASF:
- ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPWMAMinBitrate,
- EMTPWMAMaxBitrate,
- EMTPAudioBitrateStep );
- break;
-
- case EMTPFormatCodeMP3:
- ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPMP3MinBitrate,
- EMTPMP3MaxBitrate,
- EMTPAudioBitrateStep );
- break;
-
- case EMTPFormatCodeAAC:
- ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPAACMinBitrate,
- EMTPAACMaxBitrate,
- EMTPAudioBitrateStep );
- break;
-
- case EMTPFormatCodeWAV:
- ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPPCMMinBitrate,
- EMTPPCMMaxBitrate,
- EMTPAudioBitrateStep );
- break;
-
- case EMTPFormatCodeMP4Container:
- case EMTPFormatCode3GPContainer:
- ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPAACPlusMinBitrate,
- EMTPAACPlusMaxBitrate,
- EMTPAudioBitrateStep );
- break;
-
- default:
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetInterDependentPropDesc::ServiceAudioBitrateL leave because of invalid formatcode = 0x%x" ), iFormatCode );
- User::Leave( KErrNotSupported );
- break;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetInterDependentPropDesc::ServiceVideoFourCCCodecL
-// Create Description and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetInterDependentPropDesc::ServiceVideoFourCCCodecL()
- {
- switch( iFormatCode )
- {
- case EMTPFormatCodeWMV:
- case EMTPFormatCodeASF:
- {
- CMTPTypeObjectPropDescEnumerationForm* form =
- CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT32 );
- CleanupStack::PushL( form ); // + form
-
- TUint32 values[] =
- {
- EMTPVideoFourCCCodecWMV3
- };
-
- TInt numValues = sizeof ( values ) / sizeof ( values[0] ) ;
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint32 data( values[i] );
- form->AppendSupportedValueL( data );
- }
- // TODO:
- CMTPTypeObjectPropDesc::TPropertyInfo propInfo;
- propInfo.iDataType = EMTPTypeUINT32;
- propInfo.iFormFlag = CMTPTypeObjectPropDesc::EEnumerationForm;
- propInfo.iGetSet = CMTPTypeObjectPropDesc::EReadWrite;
- SetFormForResponseL( EMTPObjectPropCodeVideoFourCCCodec, propInfo, form );
- CleanupStack::PopAndDestroy( form ); // - form
- }
- break;
-
- default:
- {
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetInterDependentPropDesc::ServiceVideoFourCCCodecL leave because of invalid formatcode = 0x%x" ), iFormatCode );
- User::Leave( KErrNotSupported );
- }
- break;
- }
- }
-
-void CMediaMtpDataProviderGetInterDependentPropDesc::ServiceVideoBitrateL()
- {
- switch( iFormatCode )
- {
- case EMTPFormatCodeWMV:
- case EMTPFormatCodeASF:
- ServiceRangeFormDescriptionL( EMTPObjectPropCodeVideoBitRate,
- EMTPWMVMinBitrate,
- EMTPWMVMaxBitrate,
- EMTPVideoBitrateStep,
- ETrue );
- break;
-
- default:
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetInterDependentPropDesc::ServiceVideoBitrateL leave because of invalid formatcode = 0x%x" ), iFormatCode );
- User::Leave( KErrNotSupported );
- break;
- }
- }
-
-void CMediaMtpDataProviderGetInterDependentPropDesc::ServiceRangeFormDescriptionL( TUint16 aPropCode,
- TUint32 aMinValue,
- TUint32 aMaxValue,
- TUint32 aStepValue,
- TBool aIsReadOnly )
- {
- CMTPTypeObjectPropDescRangeForm* form =
- CMTPTypeObjectPropDescRangeForm::NewLC( EMTPTypeUINT32 ); // + form
-
- // Set expected values
- form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMinimumValue, aMinValue );
- form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMaximumValue, aMaxValue );
- form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EStepSize, aStepValue );
-
- CMTPTypeObjectPropDesc::TPropertyInfo propInfo;
- propInfo.iDataType = EMTPTypeUINT32;
- propInfo.iFormFlag = CMTPTypeObjectPropDesc::ERangeForm;
- propInfo.iGetSet = !aIsReadOnly;
- SetFormForResponseL( aPropCode, propInfo, form );
- CleanupStack::PopAndDestroy( form ); // - form
- }
-
-void CMediaMtpDataProviderGetInterDependentPropDesc::SetFormForResponseL( TUint16 aPropertyCode,
- CMTPTypeObjectPropDesc::TPropertyInfo& aPropInfo,
- const MMTPType* aForm )
- {
- CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewLC( aPropertyCode,
- aPropInfo,
- aForm );
- // Set group code
- propertyDesc->SetUint32L( CMTPTypeObjectPropDesc::EGroupCode, EGroupCodeMediaDB );
-
- iProperties->AppendL( propertyDesc );
- CleanupStack::Pop( propertyDesc );
- }
-
-// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectpropdesc.cpp Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,716 +0,0 @@
-/*
-* 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: Implement the operation: GetObjectPropDesc
-*
-*/
-
-#include <mtp/cmtptypeobjectpropdesc.h>
-#include <mtp/mtpprotocolconstants.h>
-#include <mtp/cmtptypestring.h>
-
-#include "cmediamtpdataprovidergetobjectpropdesc.h"
-#include "mediamtpdataproviderconst.h"
-#include "mmmtpdplogger.h"
-#include "mmmtpdpdefs.h"
-
-const TUint32 KMTPDescriptionLen = 0x00000200;
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetObjectPropDesc::NewL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-MMmRequestProcessor* CMediaMtpDataProviderGetObjectPropDesc::NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig )
- {
- CMediaMtpDataProviderGetObjectPropDesc* self =
- new ( ELeave ) CMediaMtpDataProviderGetObjectPropDesc( aFramework,
- aConnection,
- aDpConfig );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetObjectPropDesc::ConstructL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetObjectPropDesc::ConstructL()
- {
- CGetObjectPropDesc::ConstructL();
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetObjectPropDesc::~CMediaMtpDataProviderGetObjectPropDesc
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CMediaMtpDataProviderGetObjectPropDesc::~CMediaMtpDataProviderGetObjectPropDesc()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetObjectPropDesc::CMediaMtpDataProviderGetObjectPropDesc
-// Standard c++ constructor
-// -----------------------------------------------------------------------------
-//
-CMediaMtpDataProviderGetObjectPropDesc::CMediaMtpDataProviderGetObjectPropDesc( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig ) :
- CGetObjectPropDesc( aFramework, aConnection, aDpConfig )
- {
-
- }
-
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceSpecificObjectPropertyL(TUint16 aPropCode)
- {
- switch (aPropCode)
- {
- // format specific
- case EMTPObjectPropCodeArtist: // Artist
- case EMTPObjectPropCodeTrack: // Track
- case EMTPObjectPropCodeGenre: // Genre
- case EMTPObjectPropCodeUseCount: // Use Count
- case EMTPObjectPropCodeAlbumName: // Album Name
- case EMTPObjectPropCodeAlbumArtist: // Album Artist
- case EMTPObjectPropCodeOriginalReleaseDate: // Original Release Date
- case EMTPObjectPropCodeComposer: // Composer
- case EMTPObjectPropCodeParentalRating:
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( aPropCode );
- break;
-
- // Number of Channels (m)
- case EMTPObjectPropCodeNumberOfChannels:
- ServiceNumberOfChannelsL();
- break;
-
- // Sample Rate (HAS MINIMUM AND MAX VALUE)
- case EMTPObjectPropCodeSampleRate:
- ServiceCodeSampleRateL();
- break;
-
- // Audio Wave Codec (MAY REQUIRED LIMITED NUMBER TO BE PRODUCED)
- case EMTPObjectPropCodeAudioWAVECodec:
- ServiceCodeWaveCodecL();
- break;
-
- // Audio Bit Rate (MAY REQUIRED LIMITED NUMBER TO BE PRODUCED)
- case EMTPObjectPropCodeAudioBitRate:
- ServiceCodeAudioBitrateL();
- break;
-
- // Duration
- case EMTPObjectPropCodeDuration:
- ServiceDurationL();
- break;
-
- // Description
- case EMTPObjectPropCodeDescription:
- ServiceDescriptionL();
- break;
-
- case EMTPObjectPropCodeWidth:
- ServiceRangeFormDescriptionL( aPropCode,
- EMTPMinWidth,
- EMTPMaxWidth,
- EMTPStepWidth );
- break;
-
- case EMTPObjectPropCodeHeight:
- ServiceRangeFormDescriptionL( aPropCode,
- EMTPMinHeight,
- EMTPMaxHeight,
- EMTPStepHeight );
- break;
-
- case EMTPObjectPropCodeScanType:
- ServiceScanTypeDescriptionL();
- break;
-
- case EMTPObjectPropCodeVideoFourCCCodec:
- ServiceVideoFourCCCodecL();
- break;
-
- case EMTPObjectPropCodeVideoBitRate:
- ServiceRangeFormDescriptionL( aPropCode,
- EMTPWMVMinBitrate,
- EMTPWMVMaxBitrate,
- EMTPVideoBitrateStep,
- ETrue );
- break;
-
- case EMTPObjectPropCodeFramesPerThousandSeconds:
- ServiceRangeFormDescriptionL( aPropCode,
- EMTPMinFramesPerThousandSeconds,
- EMTPMaxFramesPerThousandSeconds,
- EMTPStepFramesPerThousandSeconds );
- break;
-
- case EMTPObjectPropCodeKeyFrameDistance:
- ServiceRangeFormDescriptionL( aPropCode,
- EMTPMinKeyFrameDistance,
- EMTPMaxKeyFrameDistance,
- EMTPStepKeyFrameDistance );
- break;
-
- case EMTPObjectPropCodeEncodingProfile:
- ServiceEncodingProfileDescriptionL();
- break;
-
- case EMTPObjectPropCodeDRMStatus:
- ServiceDRMStatusL();
- break;
-
- case EMTPExtObjectPropCodeOmaDrmStatus:
- ServiceOMADRMStatusL();
- break;
-
- default:
- User::Leave( KErrNotSupported );
- break;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetObjectPropDesc::ServiceDescriptionL()
-// Create Description and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceDescriptionL()
- {
- TMTPTypeUint32 uint32Data( KMTPDescriptionLen );
-
- // Althrough iObjectProperty is released in ServiceL(),
- // release it here maybe a more safer way
- if ( iObjectProperty != NULL )
- {
- delete iObjectProperty;
- iObjectProperty = NULL;
- }
-
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeDescription,
- CMTPTypeObjectPropDesc::ELongStringForm,
- &uint32Data );
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetObjectPropDesc::ServiceNumberOfChannelsL
-// Create list of possible Channel numbers and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceNumberOfChannelsL()
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeSampleRateL" ) );
-
- CMTPTypeObjectPropDescEnumerationForm* expectedForm = CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT16 );
- CleanupStack::PushL( expectedForm ); // + expectedForm
-
- TUint16 values[] =
- {
- EMTPChannelMono,
- EMTPChannelStereo
- };
-
- TInt numValues = sizeof ( values ) / sizeof ( values[0] ) ;
-
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint16 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- // Althrough iObjectProperty is released in ServiceL(),
- // release it here maybe a more safer way :)
- if ( iObjectProperty != NULL )
- {
- delete iObjectProperty;
- iObjectProperty = NULL;
- }
-
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeNumberOfChannels, *expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeSampleRateL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeSampleRateL
-// Create list of possible Sample rate list and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeSampleRateL()
- {
- // if some format does not support the sample rate,
- // here still need an instance of CMTPTypeObjectPropDesc.
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeSampleRateL" ) );
-
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT32 ); // + expectedForm
-
- TUint32 values[] =
- {
- EMTPSampleRate8K ,
- EMTPSampleRate16K,
- EMTPSampleRate22_05K,
- EMTPSampleRate24K,
- EMTPSampleRate32K,
- EMTPSampleRate44_1K,
- EMTPSampleRate48K
- };
-
- TInt numValues = sizeof( values ) / sizeof( values[0] ) ;
-
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint32 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- // Althrough iObjectProperty is released in ServiceL(),
- // release it here maybe a more safer way :)
- if ( iObjectProperty != NULL )
- {
- delete iObjectProperty;
- iObjectProperty = NULL;
- }
-
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeSampleRate, CMTPTypeObjectPropDesc::EEnumerationForm, expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeSampleRateL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetObjectPropDesc::ServiceWaveCodecL
-// Create list of possible bitrate types and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeWaveCodecL()
- {
- PRINT1( _L( "MM MTP => CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeWaveCodecL, format = 0x%x" ), iFormatCode );
-
- CMTPTypeObjectPropDescEnumerationForm* form =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT32 ); // + form
-
- switch (iFormatCode)
- {
- case EMTPFormatCodeWMA:
- case EMTPFormatCodeWMV:
- case EMTPFormatCodeASF:
- {
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeWaveCodecL format = 0x%x" ), iFormatCode );
- TMTPTypeUint32 data( EMTPAudioWAVECodecWMA );
- form->AppendSupportedValueL( data );
- }
- break;
-
- case EMTPFormatCodeMP3:
- {
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeWaveCodecL format = 0x%x" ), iFormatCode );
- TMTPTypeUint32 data( EMTPAudioWAVECodecMP3 );
- form->AppendSupportedValueL( data );
- }
- break;
-
- case EMTPFormatCodeMP4Container:
- case EMTPFormatCode3GPContainer:
- case EMTPFormatCodeAAC:
- {
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeWaveCodecL format = 0x%x" ), iFormatCode );
- TMTPTypeUint32 data( EMTPAudioWAVECodecAAC );
- form->AppendSupportedValueL( data );
- }
- break;
-
- case EMTPFormatCodeWAV:
- {
- PRINT1( _L("MM MTP <> CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeWaveCodecL format = 0x%x"), iFormatCode );
- TMTPTypeUint32 data( EMTPAudioWAVECodecPCM );
- form->AppendSupportedValueL( data );
- }
- break;
-
- default:
- {
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeWaveCodecL leave because of invalid formatcode = 0x%x" ), iFormatCode );
- User::Leave(KErrNotSupported);
- }
- break;
- }
-
- // Althrough iObjectProperty is released in ServiceL(),
- // release it here maybe a more safer way :)
- if ( iObjectProperty != NULL )
- {
- delete iObjectProperty;
- iObjectProperty = NULL;
- }
-
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeAudioWAVECodec, *form );
- CleanupStack::PopAndDestroy( form ); // - form
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeWaveCodecL" ) );
- }
-
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeAudioBitrateL()
- {
- PRINT1( _L("MM MTP => CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeAudioBitrate, format = 0x%x"), iFormatCode );
-
- switch (iFormatCode)
- {
- case EMTPFormatCodeWMA:
- case EMTPFormatCodeWMV:
- case EMTPFormatCodeASF:
- {
- ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPWMAMinBitrate,
- EMTPWMAMaxBitrate,
- EMTPAudioBitrateStep );
- }
- break;
-
- case EMTPFormatCodeMP3:
- {
- ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPMP3MinBitrate,
- EMTPMP3MaxBitrate,
- EMTPAudioBitrateStep );
- }
- break;
-
- case EMTPFormatCodeAAC:
- {
- ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPAACMinBitrate,
- EMTPAACMaxBitrate,
- EMTPAudioBitrateStep );
- }
- break;
-
- case EMTPFormatCodeWAV:
- {
- ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPPCMMinBitrate,
- EMTPPCMMaxBitrate,
- EMTPAudioBitrateStep );
- }
- break;
-
- case EMTPFormatCodeMP4Container:
- case EMTPFormatCode3GPContainer:
- {
- ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPAACPlusMinBitrate,
- EMTPAACPlusMaxBitrate,
- EMTPAudioBitrateStep );
- }
- break;
-
- default:
- {
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeAudioBitRateL leave because of invalid formatcode = 0x%x" ), iFormatCode );
- User::Leave( KErrNotSupported );
- }
- }
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetObjectPropDesc::ServiceCodeAudioBitRateL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CGetObjectPropDesc::ServiceDurationL()
-// Create list of Duration types and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceDurationL()
- {
-
- PRINT( _L( "MM MTP => CMediaMtpDataProviderGetObjectPropDesc::ServiceDurationL" ) );
-
- CMTPTypeObjectPropDescRangeForm* form = CMTPTypeObjectPropDescRangeForm::NewLC( EMTPTypeUINT32 ); // + form
-
- // Set expected values
- form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMinimumValue, EMTPMinDuration );
- form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMaximumValue, EMTPMaxDuration );
- form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EStepSize, EMTPDurationStep );
-
- // Althrough iObjectProperty is released in ServiceL(),
- // release it here maybe a more safer way
- if ( iObjectProperty != NULL )
- {
- delete iObjectProperty;
- iObjectProperty = NULL;
- }
-
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeDuration, *form );
- CleanupStack::PopAndDestroy( form ); // - form
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderGetObjectPropDesc::ServiceDurationL" ) );
- }
-
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceScanTypeDescriptionL()
- {
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT16 );
- CleanupStack::PushL( expectedForm ); // + expectedForm
-
- TUint16 values[] =
- {
- EMTPScanTypeProgressive
- };
-
- TInt numValues = sizeof ( values ) / sizeof ( values[0] ) ;
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint16 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- // Althrough iObjectProperty is released in ServiceL(),
- // release it here maybe a more safer way :)
- if ( iObjectProperty != NULL )
- {
- delete iObjectProperty;
- iObjectProperty = NULL;
- }
-
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeScanType, *expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
- }
-
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceVideoFourCCCodecL()
- {
- switch( iFormatCode )
- {
- case EMTPFormatCodeWMV:
- case EMTPFormatCodeASF:
- {
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT32 );
- CleanupStack::PushL( expectedForm ); // + expectedForm
-
- TUint32 values[] =
- {
- EMTPVideoFourCCCodecWMV3
- };
-
- TInt numValues = sizeof ( values ) / sizeof ( values[0] ) ;
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint32 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- // comment out asf fourcc for mp2a and mp4a, not sure if this is needed
- /*if ( iFormatCode == EMTPFormatCodeASF )
- {
- TUint32 additionalValues[] =
- {
- EMTPVideoFourCCCodecMP2A,
- EMTPVideoFourCCCodecMP4A
- };
-
- for ( TInt j = 0; i < sizeof(additionalValues) / sizeof(additionalValues[0]) )
- {
- TMTPTypeUint32 data( additionalValues[i] );
- expectedForm->AppendSupportedValueL( data );
- }
- }*/
-
- // Althrough iObjectProperty is released in ServiceL(),
- // release it here maybe a more safer way :)
- if ( iObjectProperty != NULL )
- {
- delete iObjectProperty;
- iObjectProperty = NULL;
- }
-
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeVideoFourCCCodec, *expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
- }
- break;
-
- default:
- {
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropDesc::ServiceVideoFourCCCodecL leave because of invalid formatcode = 0x%x" ), iFormatCode );
- User::Leave( KErrNotSupported );
- }
- break;
- }
- }
-
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceVideoBitrateL()
- {
- switch( iFormatCode )
- {
- case EMTPFormatCodeWMV:
- case EMTPFormatCodeASF:
- {
- ServiceRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate,
- EMTPWMVMinBitrate,
- EMTPWMVMaxBitrate,
- EMTPVideoBitrateStep,
- ETrue );
- }
- break;
-
- default:
- {
- PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropDesc::ServiceVideoBitrateL leave because of invalid formatcode = 0x%x" ), iFormatCode );
- User::Leave( KErrNotSupported );
- }
- break;
- }
- }
-
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceEncodingProfileDescriptionL()
- {
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeString ); // + expectedForm
-
- CMTPTypeString* string = CMTPTypeString::NewLC( _L( "SP@LL" ) );
- expectedForm->AppendSupportedValueL( *string );
- string->SetL(_L("SP@ML"));
- expectedForm->AppendSupportedValueL( *string );
- string->SetL(_L("MP@LL"));
- expectedForm->AppendSupportedValueL( *string );
-
- CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
- propertyInfo.iDataType = EMTPTypeString;
- propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::EEnumerationForm;
- propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadWrite;
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeEncodingProfile,
- propertyInfo,
- expectedForm );
-
- CleanupStack::PopAndDestroy( string );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
- }
-
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceRangeFormDescriptionL( TUint16 aPropCode,
- TUint32 aMinValue,
- TUint32 aMaxValue,
- TUint32 aStepValue,
- TBool aIsReadOnly )
- {
- CMTPTypeObjectPropDescRangeForm* form =
- CMTPTypeObjectPropDescRangeForm::NewLC( EMTPTypeUINT32 ); // + form
-
- // Set expected values
- form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMinimumValue, aMinValue );
- form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMaximumValue, aMaxValue );
- form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EStepSize, aStepValue );
-
- // Althrough iObjectProperty is released in ServiceL(),
- // release it here maybe a more safer way
- if ( iObjectProperty != NULL )
- {
- delete iObjectProperty;
- iObjectProperty = NULL;
- }
-
- CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
- propertyInfo.iDataType = EMTPTypeUINT32;
- propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::ERangeForm;
- propertyInfo.iGetSet = !aIsReadOnly;
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( aPropCode, propertyInfo, form );
-
- CleanupStack::PopAndDestroy( form ); // - form
- }
-
-// -----------------------------------------------------------------------------
-// CGetObjectPropDesc::ServiceDRMStatusL
-// Create list of possible DRM status and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceDRMStatusL()
- {
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT16 );
- CleanupStack::PushL( expectedForm ); // + expectedForm
-
- TUint16 values[] =
- {
- EMTPDrmNoProtection,
- EMTPDrmProtection,
- EMTPDrmReserveForMTP,
- EMTPDrmVenderExtension
- };
-
- TInt numValues = sizeof ( values ) / sizeof ( values[0] ) ;
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint16 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- // Althrough iObjectProperty is released in ServiceL(),
- // release it here maybe a more safer way :)
- if ( iObjectProperty != NULL )
- {
- delete iObjectProperty;
- iObjectProperty = NULL;
- }
-
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeDRMStatus, *expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderGetObjectPropDesc::ServiceOMADRMStatusL
-// Create list of possible OMA DRM status and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderGetObjectPropDesc::ServiceOMADRMStatusL()
- {
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT8 );
- CleanupStack::PushL( expectedForm ); // + expectedForm
-
- TUint8 values[] =
- {
- EMTPOMADrmNoProtection,
- EMTPOMADrmProtection,
- };
-
- TInt numValues = sizeof ( values ) / sizeof ( values[0] ) ;
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint8 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- // Althrough iObjectProperty is released in ServiceL(),
- // release it here maybe a more safer way :)
- if ( iObjectProperty != NULL )
- {
- delete iObjectProperty;
- iObjectProperty = NULL;
- }
-
- CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
- propertyInfo.iDataType = EMTPTypeUINT8;
- propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::EEnumerationForm;
-
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( EMTPExtObjectPropCodeOmaDrmStatus,
- propertyInfo,
- expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
- }
-
-// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectproplist.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectproplist.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,7 +16,6 @@
*/
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/cmtptypeobjectproplist.h>
#include <mtp/cmtptypestring.h>
#include <mtp/cmtptypearray.h>
@@ -54,7 +53,7 @@
//
CMediaMtpDataProviderGetObjectPropList::~CMediaMtpDataProviderGetObjectPropList()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -63,10 +62,11 @@
// -----------------------------------------------------------------------------
//
CMediaMtpDataProviderGetObjectPropList::CMediaMtpDataProviderGetObjectPropList( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig ) :
- CGetObjectPropList( aFramework, aConnection, aDpConfig )
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig ) :
+ CGetObjectPropList( aFramework, aConnection, aDpConfig )
{
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -96,7 +96,6 @@
switch ( aPropCode )
{
- //case EMTPObjectPropCodeName:
case EMTPObjectPropCodeArtist:
case EMTPObjectPropCodeGenre:
case EMTPObjectPropCodeComposer:
@@ -113,11 +112,8 @@
PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL err = %d" ), err );
- if ( err == KErrNone )
- {
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars());
- }
+ iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
+ iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars());
CleanupStack::PopAndDestroy( textData ); // - textData
}
@@ -133,12 +129,9 @@
PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL err = %d" ), err );
- if ( err == KErrNone )
- {
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetArrayL( CMTPTypeObjectPropListElement::EValue, *desData);
- }
-
+ iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
+ iPropertyElement->SetArrayL( CMTPTypeObjectPropListElement::EValue, *desData);
+
CleanupStack::PopAndDestroy( desData ); // - desData
}
break;
@@ -154,18 +147,14 @@
*iObject ) );
PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL err = %d" ), err );
- if ( err == KErrNone )
- {
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EValue, uint16.Value());
- }
+ iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
+ iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EValue, uint16.Value());
}
break;
case EMTPObjectPropCodeWidth:
case EMTPObjectPropCodeHeight:
case EMTPObjectPropCodeDuration:
- case EMTPObjectPropCodeUseCount:
case EMTPObjectPropCodeSampleRate:
case EMTPObjectPropCodeAudioWAVECodec:
case EMTPObjectPropCodeAudioBitRate:
@@ -180,11 +169,8 @@
*iObject ) );
PRINT1( _L( "MM MTP <> CMediaMtpDataProviderGetObjectPropList::ServiceSpecificObjectPropertyL err = %d" ), err );
- if ( err == KErrNone )
- {
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, uint32.Value());
- }
+ iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
+ iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, uint32.Value());
}
break;
@@ -192,10 +178,10 @@
{
TInt drmStatus = MmMtpDpUtility::GetDrmStatus( iObject->DesC( CMTPObjectMetaData::ESuid ) );
TMTPTypeUint8 result;
- result.Set( 0 );
+ result.Set( EMTPDrmStatusNotProtected );
if ( drmStatus == EMTPDrmStatusProtected )
- result.Set( 1 );
+ result.Set( EMTPDrmStatusProtected );
iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EDatatype, EMTPTypeUINT8);
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectpropvalue.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidergetobjectpropvalue.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,7 +16,6 @@
*/
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/cmtptypestring.h>
#include <mtp/cmtptypearray.h>
@@ -54,7 +53,7 @@
//
void CMediaMtpDataProviderGetObjectPropValue::ConstructL()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -64,7 +63,7 @@
//
CMediaMtpDataProviderGetObjectPropValue::~CMediaMtpDataProviderGetObjectPropValue()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -77,10 +76,10 @@
MMmMtpDpConfig& aDpConfig ) :
CGetObjectPropValue( aFramework, aConnection, aDpConfig )
{
-
+ // Do nothing
}
-void CMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL(TUint16 aPropCode)
+void CMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL( TUint16 aPropCode )
{
PRINT( _L( "MM MTP => CMediaMtpDataProviderGetObjectPropValue::ServiceSpecificObjectPropertyL" ) );
switch ( aPropCode )
@@ -120,7 +119,6 @@
case EMTPObjectPropCodeWidth: // 0xDC87
case EMTPObjectPropCodeHeight: // 0xDC88
case EMTPObjectPropCodeDuration: // 0xDC89
- case EMTPObjectPropCodeUseCount: // 0xDC91
case EMTPObjectPropCodeSampleRate: // 0xDE93
case EMTPObjectPropCodeAudioWAVECodec: // 0xDE99
case EMTPObjectPropCodeAudioBitRate: // 0xDE9A
@@ -151,7 +149,7 @@
TInt drmStatus = MmMtpDpUtility::GetDrmStatus( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
iMTPTypeUint8.Set( 0 );
- if (drmStatus == EMTPDrmStatusProtected)
+ if ( drmStatus == EMTPDrmStatusProtected )
iMTPTypeUint8.Set( 1 );
SendDataL( iMTPTypeUint8 );
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidermoveobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidermoveobject.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -1,22 +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: Implement the operation: Copy Object
-*
-*/
+ * 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: Implement the operation: Move Object
+ *
+ */
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/cmtptypeobjectproplist.h>
#include <mtp/cmtptypestring.h>
#include <mtp/cmtptypearray.h>
@@ -65,7 +64,7 @@
//
CMediaMtpDataProviderMoveObject::~CMediaMtpDataProviderMoveObject()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -78,7 +77,7 @@
MMmMtpDpConfig& aDpConfig ) :
CMoveObject( aFramework, aConnection, aDpConfig )
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -90,7 +89,8 @@
TUint32 aHandle,
const CMTPObjectMetaData& aObject )
{
- PRINT1( _L( "MM MTP => CMediaMtpDataProviderMoveObject::ServiceSpecificObjectPropertyL aPropCode(0x%x)" ), aPropCode );
+ PRINT1( _L( "MM MTP => CMediaMtpDataProviderMoveObject::ServiceSpecificObjectPropertyL aPropCode(0x%x)" ),
+ aPropCode );
CMTPTypeString* textData = NULL;
CMTPTypeArray* desData = NULL;
@@ -112,7 +112,7 @@
case EMTPObjectPropCodeParentalRating:
case EMTPObjectPropCodeEncodingProfile:
{
- textData = CMTPTypeString::NewLC(); // + textData
+ textData = CMTPTypeString::NewLC(); // + textData
TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( aPropCode,
*textData,
@@ -122,29 +122,21 @@
if ( err == KErrNone )
{
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars());
-
-// iPropertyElement = CMTPTypeObjectPropListElement::NewL( aHandle,
-// aPropCode,
-// *textData );
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars() );
}
- else if ( err == KErrNotFound )
- {
+ else
+ {
iPropertyElement = NULL;
- }
- else
- {
- User::Leave( err );
- }
+ }
- CleanupStack::PopAndDestroy( textData ); // - textData
+ CleanupStack::PopAndDestroy( textData ); // - textData
}
break;
case EMTPObjectPropCodeDescription:
{
- desData = CMTPTypeArray::NewLC( EMTPTypeAUINT16 ); // + desData
+ desData = CMTPTypeArray::NewLC( EMTPTypeAUINT16 ); // + desData
TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( aPropCode,
*desData,
@@ -154,24 +146,15 @@
if ( err == KErrNone )
{
-
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetArrayL( CMTPTypeObjectPropListElement::EValue, *desData);
-
-// iPropertyElement = CMTPTypeObjectPropListElement::NewL( aHandle,
-// aPropCode,
-// *desData );
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetArrayL( CMTPTypeObjectPropListElement::EValue, *desData );
}
- else if ( err == KErrNotFound )
+ else
{
iPropertyElement = NULL;
}
- else
- {
- User::Leave( err );
- }
- CleanupStack::PopAndDestroy( desData ); // - desData
+ CleanupStack::PopAndDestroy( desData ); // - desData
}
break;
@@ -188,21 +171,12 @@
if ( err == KErrNone )
{
-
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EValue, uint16.Value());
-
-// iPropertyElement = CMTPTypeObjectPropListElement::NewL( aHandle,
-// aPropCode,
-// uint16 );
- }
- else if ( err == KErrNotFound )
- {
- iPropertyElement = NULL;
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EValue, uint16.Value() );
}
else
{
- User::Leave( err );
+ iPropertyElement = NULL;
}
}
break;
@@ -210,7 +184,6 @@
case EMTPObjectPropCodeWidth:
case EMTPObjectPropCodeHeight:
case EMTPObjectPropCodeDuration:
- case EMTPObjectPropCodeUseCount:
case EMTPObjectPropCodeSampleRate:
case EMTPObjectPropCodeAudioWAVECodec:
case EMTPObjectPropCodeAudioBitRate:
@@ -227,20 +200,12 @@
if ( err == KErrNone )
{
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, uint32.Value());
-
-// iPropertyElement = CMTPTypeObjectPropListElement::NewL( aHandle,
-// aPropCode,
-// uint32 );
- }
- else if ( err == KErrNotFound )
- {
- iPropertyElement = NULL;
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, uint32.Value() );
}
else
{
- User::Leave( err );
+ iPropertyElement = NULL;
}
}
break;
@@ -254,129 +219,9 @@
if ( drmStatus == EMTPDrmStatusProtected )
result.Set( 1 );
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EDatatype, EMTPTypeUINT8);
- iPropertyElement->SetUint8L( CMTPTypeObjectPropListElement::EValue, result.Value());
-
-// iPropertyElement = CMTPTypeObjectPropListElement::NewL( aHandle,
-// aPropCode,
-// EMTPTypeUINT8,
-// result );
- }
- break;
-
- default:
- {
- User::Leave( KErrNotSupported );
- }
- break;
- }
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderMoveObject::ServiceSpecificObjectPropertyL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderMoveObject::ServiceSetSpecificObjectPropertyL
-//
-// -----------------------------------------------------------------------------
-//
-TMTPResponseCode CMediaMtpDataProviderMoveObject::ServiceSetSpecificObjectPropertyL( TUint16 aPropCode, const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement )
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderMoveObject::ServiceSetSpecificObjectPropertyL" ) );
- TMTPResponseCode responseCode( EMTPRespCodeOK );
-
- switch ( aPropCode )
- {
- case EMTPObjectPropCodeArtist:
- case EMTPObjectPropCodeGenre:
- case EMTPObjectPropCodeComposer:
- case EMTPObjectPropCodeOriginalReleaseDate:
- case EMTPObjectPropCodeAlbumName:
- case EMTPObjectPropCodeParentalRating:
- case EMTPObjectPropCodeEncodingProfile:
- {
- CMTPTypeString* stringData =
- CMTPTypeString::NewLC( aElement.StringL( CMTPTypeObjectPropListElement::EValue ) );// + stringData
-
- responseCode = ServiceMetaDataToWrapper( aPropCode,
- *stringData,
- aObject );
-
- CleanupStack::PopAndDestroy( stringData );// - stringData
- }
- break;
-
- case EMTPObjectPropCodeVideoBitRate:
- {
- responseCode = EMTPRespCodeAccessDenied;
- }
- break;
-
- case EMTPObjectPropCodeDescription:
- {
- CMTPTypeArray* desData = CMTPTypeArray::NewLC( EMTPTypeAUINT16 ); // + desData
-// aElement.GetL( CMTPTypeObjectPropListElement::EValue, *desData );
-
- desData->SetByDesL(aElement.ArrayL(CMTPTypeObjectPropListElement::EValue ));
- responseCode = ServiceMetaDataToWrapper( aPropCode,
- *desData,
- aObject );
- CleanupStack::PopAndDestroy( desData ); // - desData
- }
- break;
-
- case EMTPObjectPropCodeWidth:
- case EMTPObjectPropCodeHeight:
- case EMTPObjectPropCodeDuration:
- case EMTPObjectPropCodeUseCount:
- case EMTPObjectPropCodeSampleRate:
- case EMTPObjectPropCodeAudioWAVECodec:
- case EMTPObjectPropCodeAudioBitRate:
- case EMTPObjectPropCodeVideoFourCCCodec:
- case EMTPObjectPropCodeFramesPerThousandSeconds:
- case EMTPObjectPropCodeKeyFrameDistance:
- {
- TMTPTypeUint32 uint32( aElement.Uint32L( CMTPTypeObjectPropListElement::EValue ) );
- responseCode = ServiceMetaDataToWrapper( aPropCode,
- uint32,
- aObject );
- }
- break;
-
- case EMTPObjectPropCodeTrack:
- case EMTPObjectPropCodeNumberOfChannels:
- case EMTPObjectPropCodeScanType:
- case EMTPObjectPropCodeDRMStatus:
- {
- TMTPTypeUint16 uint16( aElement.Uint16L( CMTPTypeObjectPropListElement::EValue ));
- responseCode = ServiceMetaDataToWrapper( aPropCode,
- uint16,
- aObject );
- }
- break;
-
- case EMTPExtObjectPropCodeOmaDrmStatus:
- {
- TInt drmStatus = MmMtpDpUtility::GetDrmStatus( aObject.DesC(
- CMTPObjectMetaData::ESuid ) );
-
- if ( drmStatus == EMTPDrmStatusUnknown )
- {
- responseCode = EMTPRespCodeAccessDenied;
- }
- else
- {
- TMTPTypeUint8 newValue( aElement.Uint8L( CMTPTypeObjectPropListElement::EValue ) );
-
- // there's no DB field to remember the value, so return an error
- // if there's a mismatch to CAF protection status
- if ( ( ( drmStatus == EMTPDrmStatusProtected ) && ( newValue.Value() == 0 ) )
- || ( ( drmStatus == EMTPDrmStatusNotProtected ) && ( newValue.Value() == 1 ) ) )
- {
- responseCode = EMTPRespCodeAccessDenied;
- }
- }
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EDatatype, EMTPTypeUINT8 );
+ iPropertyElement->SetUint8L( CMTPTypeObjectPropListElement::EValue, result.Value() );
}
break;
@@ -387,9 +232,7 @@
break;
}
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderMoveObject::ServiceSetSpecificObjectPropertyL" ) );
-
- return responseCode;
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderMoveObject::ServiceSpecificObjectPropertyL" ) );
}
// end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataproviderpropertysettingutility.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -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 <mtp/cmtptypeobjectproplist.h>
+#include <mtp/cmtptypestring.h>
+#include <mtp/cmtptypearray.h>
+#include <mtp/tmtptypeuint8.h>
+#include <mtp/tmtptypeuint16.h>
+#include <mtp/tmtptypeuint32.h>
+#include <mtp/mtpdatatypeconstants.h>
+#include <mtp/cmtpobjectmetadata.h>
+
+#include "tobjectdescription.h"
+#include "cmmmtpdpmetadataaccesswrapper.h"
+#include "mmmtpdpconfig.h"
+#include "mmmtpdputility.h"
+
+#include "cmediamtpdataproviderpropertysettingutility.h"
+#include "mmmtpdplogger.h"
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderPropertySettingUtility::NewL
+// Two-phase construction method
+// -----------------------------------------------------------------------------
+//
+CMediaMtpDataProviderPropertySettingUtility* CMediaMtpDataProviderPropertySettingUtility::NewL()
+ {
+ CMediaMtpDataProviderPropertySettingUtility* self =
+ new ( ELeave ) CMediaMtpDataProviderPropertySettingUtility();
+
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderPropertySettingUtility::~CMediaMtpDataProviderPropertySettingUtility
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CMediaMtpDataProviderPropertySettingUtility::~CMediaMtpDataProviderPropertySettingUtility()
+ {
+ // Do nothing
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaMtpDataProviderSetObjectPropList::CMediaMtpDataProviderSetObjectPropList
+// Standard C++ Constructor
+// -----------------------------------------------------------------------------
+//
+CMediaMtpDataProviderPropertySettingUtility::CMediaMtpDataProviderPropertySettingUtility()
+ {
+ // Do nothing
+ }
+
+TMTPResponseCode CMediaMtpDataProviderPropertySettingUtility::SetSpecificObjectPropertyL( MMmMtpDpConfig& aDpConfig,
+ TUint16 aPropCode,
+ const CMTPObjectMetaData& aObject,
+ const CMTPTypeObjectPropListElement& aElement )
+ {
+ PRINT( _L( "MM MTP => CMediaMtpDataProviderPropertySettingUtility::SetSpecificObjectPropertyL" ) );
+ TMTPResponseCode responseCode( EMTPRespCodeOK );
+
+ switch ( aPropCode )
+ {
+ case EMTPObjectPropCodeArtist:
+ case EMTPObjectPropCodeGenre:
+ case EMTPObjectPropCodeComposer:
+ case EMTPObjectPropCodeOriginalReleaseDate:
+ case EMTPObjectPropCodeAlbumName:
+ case EMTPObjectPropCodeParentalRating:
+ case EMTPObjectPropCodeEncodingProfile:
+ {
+ CMTPTypeString* stringData =
+ CMTPTypeString::NewLC( aElement.StringL( CMTPTypeObjectPropListElement::EValue ) );// + stringData
+
+ responseCode = SetMetaDataToWrapper( aDpConfig,
+ aPropCode,
+ *stringData,
+ aObject );
+
+ CleanupStack::PopAndDestroy( stringData );// - stringData
+ }
+ break;
+
+ case EMTPObjectPropCodeVideoBitRate:
+ /*
+ spec:
+ * Object properties that are get-only (0x00 GET)
+ * should accept values during object creation by
+ * way of the SendObjectPropList command.
+ */
+ break;
+
+ case EMTPObjectPropCodeDescription:
+ {
+ CMTPTypeArray* desData = CMTPTypeArray::NewLC( EMTPTypeAUINT16 ); // + desData
+ desData->SetByDesL( aElement.ArrayL( CMTPTypeObjectPropListElement::EValue ) );
+ responseCode = SetMetaDataToWrapper( aDpConfig,
+ aPropCode,
+ *desData,
+ aObject );
+ CleanupStack::PopAndDestroy( desData ); // - desData
+ }
+ break;
+
+ case EMTPObjectPropCodeWidth:
+ case EMTPObjectPropCodeHeight:
+ case EMTPObjectPropCodeDuration:
+ case EMTPObjectPropCodeSampleRate:
+ case EMTPObjectPropCodeAudioWAVECodec:
+ case EMTPObjectPropCodeAudioBitRate:
+ case EMTPObjectPropCodeVideoFourCCCodec:
+ case EMTPObjectPropCodeFramesPerThousandSeconds:
+ case EMTPObjectPropCodeKeyFrameDistance:
+ {
+ TMTPTypeUint32 uint32( aElement.Uint32L( CMTPTypeObjectPropListElement::EValue ) );
+ responseCode = SetMetaDataToWrapper( aDpConfig,
+ aPropCode,
+ uint32,
+ aObject );
+ }
+ break;
+
+ case EMTPObjectPropCodeTrack:
+ case EMTPObjectPropCodeNumberOfChannels:
+ case EMTPObjectPropCodeScanType:
+ case EMTPObjectPropCodeDRMStatus:
+ {
+ TMTPTypeUint16 uint16( aElement.Uint16L( CMTPTypeObjectPropListElement::EValue ) );
+ responseCode = SetMetaDataToWrapper( aDpConfig,
+ aPropCode,
+ uint16,
+ aObject );
+ }
+ break;
+
+ case EMTPExtObjectPropCodeOmaDrmStatus:
+ {
+ TInt drmStatus = MmMtpDpUtility::GetDrmStatus( aObject.DesC( CMTPObjectMetaData::ESuid ) );
+
+ if ( drmStatus == EMTPDrmStatusUnknown )
+ {
+ responseCode = EMTPRespCodeAccessDenied;
+ }
+ else
+ {
+ TMTPTypeUint8 newValue( aElement.Uint8L( CMTPTypeObjectPropListElement::EValue ) );
+
+ // there's no DB field to remember the value, so return an error
+ // if there's a mismatch to CAF protection status
+ if ( ( ( drmStatus == EMTPDrmStatusProtected )
+ && ( newValue.Value() == 0 ) )
+ || ( ( drmStatus == EMTPDrmStatusNotProtected )
+ && ( newValue.Value() == 1 ) ) )
+ {
+ responseCode = EMTPRespCodeAccessDenied;
+ }
+ }
+ }
+ break;
+
+ default:
+ {
+ // Should not happen, property code should have been checked before set to store.
+ User::Leave( KErrNotSupported );
+ }
+ break;
+ }
+
+ PRINT( _L( "MM MTP <= CMediaMtpDataProviderPropertySettingUtility::ServiceSpecificObjectPropertyL" ) );
+
+ return responseCode;
+ }
+
+// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidersendobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,289 +0,0 @@
-/*
- * 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: Implement the operation: SendObjectInfo/SendObjectPropList/SendObject
- *
- */
-
-#include <mtp/mmtpdataproviderframework.h>
-#include <mtp/cmtptypeobjectproplist.h>
-#include <mtp/cmtptypestring.h>
-#include <mtp/cmtptypearray.h>
-
-#include "cmediamtpdataprovidersendobject.h"
-#include "mediamtpdataproviderconst.h"
-#include "mmmtpdplogger.h"
-#include "cmmmtpdpmetadataaccesswrapper.h"
-#include "mmmtpdputility.h"
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderSendObject::NewL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-MMmRequestProcessor* CMediaMtpDataProviderSendObject::NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig)
- {
- CMediaMtpDataProviderSendObject* self = new ( ELeave ) CMediaMtpDataProviderSendObject( aFramework, aConnection, aDpConfig );
-
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop(self);
-
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderSendObject::~CMediaMtpDataProviderSendObject
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CMediaMtpDataProviderSendObject::~CMediaMtpDataProviderSendObject()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderSendObject::CMediaMtpDataProviderSendObject
-// Standard C++ Constructor
-// -----------------------------------------------------------------------------
-//
-CMediaMtpDataProviderSendObject::CMediaMtpDataProviderSendObject(
- MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig) :
- CSendObject(aFramework, aConnection, aDpConfig)
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderSendObject::ConstructL
-// 2nd Phase Constructor
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderSendObject::ConstructL()
- {
- CSendObject::ConstructL();
- }
-
-TMTPResponseCode CMediaMtpDataProviderSendObject::CheckSepecificPropType( TUint16 aPropCode, TUint16 aDataType )
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderSendObject::CheckSepecificPropType" ) );
- TMTPResponseCode responseCode( EMTPRespCodeOK );
-
- switch ( aPropCode )
- {
- case EMTPObjectPropCodeArtist: // 0xDC46
- case EMTPObjectPropCodeGenre: // 0xDC8C
- case EMTPObjectPropCodeParentalRating: // 0xDC94
- case EMTPObjectPropCodeComposer: // 0xDC96
- case EMTPObjectPropCodeOriginalReleaseDate: // 0xDC99
- case EMTPObjectPropCodeAlbumName: // 0xDC9A
- case EMTPObjectPropCodeEncodingProfile: // 0xDEA1
- if ( aDataType != EMTPTypeString)
- {
- responseCode = EMTPRespCodeInvalidObjectPropFormat;
- }
- break;
-
- case EMTPObjectPropCodeDescription:
- if ( aDataType != EMTPTypeAUINT16)
- {
- responseCode = EMTPRespCodeInvalidObjectPropFormat;
- }
- break;
-
- case EMTPObjectPropCodeTrack: // 0xDC8B
- case EMTPObjectPropCodeDRMStatus: // 0xDC9D
- case EMTPObjectPropCodeNumberOfChannels: // 0xDE94
- case EMTPObjectPropCodeScanType: // 0xDE97
- if ( aDataType != EMTPTypeUINT16)
- {
- responseCode = EMTPRespCodeInvalidObjectPropFormat;
- }
- break;
-
- //Get Data for Int32 objects
- case EMTPObjectPropCodeWidth: // 0xDC87
- case EMTPObjectPropCodeHeight: // 0xDC88
- case EMTPObjectPropCodeDuration: // 0xDC89
- case EMTPObjectPropCodeUseCount: // 0xDC91
- case EMTPObjectPropCodeSampleRate: // 0xDE93
- case EMTPObjectPropCodeAudioWAVECodec: // 0xDE99
- case EMTPObjectPropCodeAudioBitRate: // 0xDE9A
- case EMTPObjectPropCodeVideoFourCCCodec: // 0xDE9B
- case EMTPObjectPropCodeFramesPerThousandSeconds: // 0xDE9D
- case EMTPObjectPropCodeKeyFrameDistance: // 0xDE9E
- if ( aDataType != EMTPTypeUINT32)
- {
- responseCode = EMTPRespCodeInvalidObjectPropFormat;
- }
- break;
-
- case EMTPExtObjectPropCodeOmaDrmStatus:
- if ( aDataType != EMTPTypeUINT8)
- {
- responseCode = EMTPRespCodeInvalidObjectPropFormat;
- }
- break;
-
- default:
- // It's not possible to run here.
- responseCode = EMTPRespCodeInvalidObjectPropCode;
- break;
-
- }
- PRINT1( _L( "MM MTP <= CMediaMtpDataProviderSendObject::CheckSepecificPropType, responseCode = 0x%X" ), responseCode );
- return responseCode;
- }
-
-TMTPResponseCode CMediaMtpDataProviderSendObject::SetSpecificObjectPropertyL( TUint16 aPropCode,
- const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement )
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderSendObject::SetSpecificObjectPropertyL" ) );
- TMTPResponseCode responseCode(EMTPRespCodeOK);
-
- switch ( aPropCode )
- {
- case EMTPObjectPropCodeArtist:
- case EMTPObjectPropCodeGenre:
- case EMTPObjectPropCodeComposer:
- case EMTPObjectPropCodeOriginalReleaseDate:
- case EMTPObjectPropCodeAlbumName:
- case EMTPObjectPropCodeParentalRating:
- case EMTPObjectPropCodeEncodingProfile:
- {
- CMTPTypeString* stringData =
- CMTPTypeString::NewLC( aElement.StringL( CMTPTypeObjectPropListElement::EValue ) );// + stringData
-
- responseCode = SetMetaDataToWrapperL( aPropCode,
- *stringData,
- aObject );
-
- CleanupStack::PopAndDestroy( stringData );// - stringData
- }
- break;
-
- case EMTPObjectPropCodeVideoBitRate:
- // TODO: Does anything need to be done?
- /* spec:
- * Object properties that are get-only (0x00 GET)
- * should accept values during object creation by
- * way of the SendObjectPropList command.
- */
- break;
-
- case EMTPObjectPropCodeDescription:
- {
- CMTPTypeArray* desData = CMTPTypeArray::NewLC( EMTPTypeAUINT16 ); // + desData
- // aElement.GetL( CMTPTypeObjectPropListElement::EValue, *desData );
- desData->SetByDesL( aElement.ArrayL( CMTPTypeObjectPropListElement::EValue ) );
- responseCode = SetMetaDataToWrapperL( aPropCode,
- *desData,
- aObject );
- CleanupStack::PopAndDestroy( desData ); // - desData
- }
- break;
-
- case EMTPObjectPropCodeWidth:
- case EMTPObjectPropCodeHeight:
- case EMTPObjectPropCodeDuration:
- case EMTPObjectPropCodeUseCount:
- case EMTPObjectPropCodeSampleRate:
- case EMTPObjectPropCodeAudioWAVECodec:
- case EMTPObjectPropCodeAudioBitRate:
- case EMTPObjectPropCodeVideoFourCCCodec:
- case EMTPObjectPropCodeFramesPerThousandSeconds:
- case EMTPObjectPropCodeKeyFrameDistance:
- {
- TMTPTypeUint32 uint32( aElement.Uint32L( CMTPTypeObjectPropListElement::EValue ) );
- responseCode = SetMetaDataToWrapperL( aPropCode,
- uint32,
- aObject );
- }
- break;
-
- case EMTPObjectPropCodeTrack:
- case EMTPObjectPropCodeNumberOfChannels:
- case EMTPObjectPropCodeScanType:
- case EMTPObjectPropCodeDRMStatus:
- {
- TMTPTypeUint16 uint16( aElement.Uint16L( CMTPTypeObjectPropListElement::EValue ) );
- responseCode = SetMetaDataToWrapperL( aPropCode,
- uint16,
- aObject );
- }
- break;
-
- case EMTPExtObjectPropCodeOmaDrmStatus:
- {
- TInt drmStatus = MmMtpDpUtility::GetDrmStatus( aObject.DesC( CMTPObjectMetaData::ESuid ) );
-
- if ( drmStatus == EMTPDrmStatusUnknown )
- {
- responseCode = EMTPRespCodeAccessDenied;
- }
- else
- {
- TMTPTypeUint8 newValue( aElement.Uint8L( CMTPTypeObjectPropListElement::EValue ) );
-
- // there's no DB field to remember the value, so return an error
- // if there's a mismatch to CAF protection status
- if ( ( ( drmStatus == EMTPDrmStatusProtected )
- && ( newValue.Value() == 0 ) )
- || ( ( drmStatus == EMTPDrmStatusNotProtected )
- && ( newValue.Value() == 1 ) ) )
- {
- responseCode = EMTPRespCodeAccessDenied;
- }
- }
- }
- break;
-
- default:
- {
- PRINT( _L( "MM MTP <> Default CASE leaving CMedia...tInfo::SetSpecificObjectPropertyL" ) );
- User::Leave( KErrNotSupported );
- }
- break;
- }
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderSendObject::ServiceSpecificObjectPropertyL" ) );
-
- return responseCode;
- }
-
-// TODO: Is it necessary?
-TInt CMediaMtpDataProviderSendObject::HandleSpecificWrapperError( TInt aError,
- const CMTPObjectMetaData& aObject )
- {
- PRINT( _L( "MM MTP <> CMediaMtpDataProviderSendObject::HandleSpecificWrapperError" ) );
- TInt err = aError;
-
- if ( ( err == KErrNotSupported )
- && ( ( aObject.Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeASF )
- || ( aObject.Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeMP4Container )
- || ( aObject.Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCode3GPContainer ) ) )
- {
- // do nothing, handle gracefully
- // should only happens for container case where metadata field does not match in different DB
- err = KErrNone;
- PRINT( _L( "MM MTP <> CMediaMtpDataProviderSendObject::HandleSpecificWrapperError, gracefully dealt with error" ) );
- }
-
- return err;
- }
-
-// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidersetobjectproplist.cpp Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,211 +0,0 @@
-/*
-* 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: Implement the operation: getobjectproplist
-*
-*/
-
-
-#include <mtp/mmtpdataproviderframework.h>
-#include <mtp/cmtptypeobjectproplist.h>
-#include <mtp/cmtptypestring.h>
-#include <mtp/cmtptypearray.h>
-
-#include "cmediamtpdataprovidersetobjectproplist.h"
-#include "mediamtpdataproviderconst.h"
-#include "mmmtpdplogger.h"
-#include "cmmmtpdpmetadataaccesswrapper.h"
-#include "mmmtpdputility.h"
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderSetObjectPropList::NewL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-MMmRequestProcessor* CMediaMtpDataProviderSetObjectPropList::NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig )
- {
- CMediaMtpDataProviderSetObjectPropList* self =
- new ( ELeave ) CMediaMtpDataProviderSetObjectPropList( aFramework, aConnection, aDpConfig );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderSetObjectPropList::~CMediaMtpDataProviderSetObjectPropList
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CMediaMtpDataProviderSetObjectPropList::~CMediaMtpDataProviderSetObjectPropList()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderSetObjectPropList::CMediaMtpDataProviderSetObjectPropList
-// Standard C++ Constructor
-// -----------------------------------------------------------------------------
-//
-CMediaMtpDataProviderSetObjectPropList::CMediaMtpDataProviderSetObjectPropList( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig ) :
- CSetObjectPropList( aFramework, aConnection, aDpConfig )
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CMediaMtpDataProviderSetObjectPropList::ConstructL
-// 2nd Phase Constructor
-// -----------------------------------------------------------------------------
-//
-void CMediaMtpDataProviderSetObjectPropList::ConstructL()
- {
- CSetObjectPropList::ConstructL();
- }
-
-TMTPResponseCode CMediaMtpDataProviderSetObjectPropList::ServiceSpecificObjectPropertyL( TUint16 aPropCode, const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement )
- {
- PRINT( _L( "MM MTP => CMediaMtpDataProviderSetObjectPropList::ServiceSpecificObjectPropertyL" ) );
- TMTPResponseCode responseCode( EMTPRespCodeOK );
-
- switch ( aPropCode )
- {
- case EMTPObjectPropCodeArtist:
- case EMTPObjectPropCodeGenre:
- case EMTPObjectPropCodeComposer:
- case EMTPObjectPropCodeOriginalReleaseDate:
- case EMTPObjectPropCodeAlbumName:
- case EMTPObjectPropCodeParentalRating:
- case EMTPObjectPropCodeEncodingProfile:
- {
- CMTPTypeString* stringData =
- CMTPTypeString::NewLC( aElement.StringL( CMTPTypeObjectPropListElement::EValue ) );// + stringData
-
- responseCode = ServiceMetaDataToWrapperL( aPropCode,
- *stringData,
- aObject );
-
- CleanupStack::PopAndDestroy( stringData );// - stringData
- }
- break;
-
- case EMTPObjectPropCodeVideoBitRate:
- {
- responseCode = EMTPRespCodeAccessDenied;
- }
- break;
-
- case EMTPObjectPropCodeDescription:
- {
- CMTPTypeArray* desData = CMTPTypeArray::NewLC( EMTPTypeAUINT16 ); // + desData
-// aElement.GetL( CMTPTypeObjectPropListElement::EValue, *desData );
- desData->SetByDesL(aElement.ArrayL(CMTPTypeObjectPropListElement::EValue ));
- responseCode = ServiceMetaDataToWrapperL( aPropCode,
- *desData,
- aObject );
- CleanupStack::PopAndDestroy( desData ); // - desData
- }
- break;
-
- case EMTPObjectPropCodeWidth:
- case EMTPObjectPropCodeHeight:
- case EMTPObjectPropCodeDuration:
- case EMTPObjectPropCodeUseCount:
- case EMTPObjectPropCodeSampleRate:
- case EMTPObjectPropCodeAudioWAVECodec:
- case EMTPObjectPropCodeAudioBitRate:
- case EMTPObjectPropCodeVideoFourCCCodec:
- case EMTPObjectPropCodeFramesPerThousandSeconds:
- case EMTPObjectPropCodeKeyFrameDistance:
- {
- TMTPTypeUint32 uint32( aElement.Uint32L( CMTPTypeObjectPropListElement::EValue ) );
- responseCode = ServiceMetaDataToWrapperL( aPropCode,
- uint32,
- aObject );
- }
- break;
-
- case EMTPObjectPropCodeTrack:
- case EMTPObjectPropCodeNumberOfChannels:
- case EMTPObjectPropCodeScanType:
- case EMTPObjectPropCodeDRMStatus:
- {
- TMTPTypeUint16 uint16( aElement.Uint16L( CMTPTypeObjectPropListElement::EValue ));
- responseCode = ServiceMetaDataToWrapperL( aPropCode,
- uint16,
- aObject );
- }
- break;
-
- case EMTPExtObjectPropCodeOmaDrmStatus:
- {
- TInt drmStatus = MmMtpDpUtility::GetDrmStatus( aObject.DesC( CMTPObjectMetaData::ESuid ) );
-
- if (drmStatus == EMTPDrmStatusUnknown)
- {
- responseCode = EMTPRespCodeAccessDenied;
- }
- else
- {
- TMTPTypeUint8 newValue( aElement.Uint8L( CMTPTypeObjectPropListElement::EValue ) );
-
- // there's no DB field to remember the value, so return an error
- // if there's a mismatch to CAF protection status
- if ( ( ( drmStatus == EMTPDrmStatusProtected) && ( newValue.Value() == 0 ) ) ||
- ( ( drmStatus == EMTPDrmStatusNotProtected ) && ( newValue.Value() == 1 ) ) )
- {
- responseCode = EMTPRespCodeAccessDenied;
- }
- }
- }
- break;
-
- default:
- {
- User::Leave( KErrNotSupported );
- }
- break;
- }
-
- PRINT( _L( "MM MTP <= CMediaMtpDataProviderSetObjectPropList::ServiceSpecificObjectPropertyL" ) );
-
- return responseCode;
- }
-
-TInt CMediaMtpDataProviderSetObjectPropList::HandleSpecificWrapperError( TInt aError,
- const CMTPObjectMetaData& aObject)
- {
- TInt err = aError;
-
- if ( ( err == KErrNotSupported )
- && ( ( aObject.Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeASF )
- || ( aObject.Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeMP4Container )
- || ( aObject.Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCode3GPContainer ) ) )
- {
- // do nothing, handle gracefully
- // should only happens for container case where metadata field does not match in different DB
- err = KErrNone;
- PRINT( _L( "MM MTP <> CMediaMtpDataProviderSetObjectPropList::HandleSpecificWrapperError, gracefully dealt with error" ) );
- }
-
- return err;
- }
-
-// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidersetobjectpropvalue.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/cmediamtpdataprovidersetobjectpropvalue.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,7 +16,6 @@
*/
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/cmtptypestring.h>
#include <mtp/cmtptypearray.h>
#include <mtp/mmtpobjectmgr.h>
@@ -54,7 +53,7 @@
//
void CMediaMtpDataProviderSetObjectPropValue::ConstructL()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -65,9 +64,9 @@
CMediaMtpDataProviderSetObjectPropValue::CMediaMtpDataProviderSetObjectPropValue( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig ) :
- CSetObjectPropValue( aFramework, aConnection, aDpConfig )
+ CSetObjectPropValue( aFramework, aConnection, aDpConfig )
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -77,7 +76,7 @@
//
CMediaMtpDataProviderSetObjectPropValue::~CMediaMtpDataProviderSetObjectPropValue()
{
-
+ // Do nothing
}
TBool CMediaMtpDataProviderSetObjectPropValue::IsSpecificPropCodeReadOnly( TUint16 aPropCode ) const
@@ -132,7 +131,6 @@
case EMTPObjectPropCodeWidth: // 0xDC87
case EMTPObjectPropCodeHeight: // 0xDC88
case EMTPObjectPropCodeDuration: // 0xDC89
- case EMTPObjectPropCodeUseCount: // 0xDC91
case EMTPObjectPropCodeSampleRate: // 0xDE93
case EMTPObjectPropCodeAudioWAVECodec: // 0xDE99
case EMTPObjectPropCodeAudioBitRate: // 0xDE9A
@@ -185,7 +183,6 @@
case EMTPObjectPropCodeWidth: //0xDC87
case EMTPObjectPropCodeHeight: //0xDC88
case EMTPObjectPropCodeDuration: //0xDC89
- case EMTPObjectPropCodeUseCount: //0xDC91
case EMTPObjectPropCodeSampleRate: //0xDE93
case EMTPObjectPropCodeAudioWAVECodec: //0xDE99
case EMTPObjectPropCodeAudioBitRate: //0xDE9A
@@ -221,12 +218,10 @@
}
else
{
- TMTPTypeUint8 newValue( iMTPTypeUint8 );
-
// there's no DB field to remember the value, so return an error
// if there's a mismatch to CAF protection status
- if ( ( ( drmStatus == EMTPDrmStatusProtected) && ( newValue.Value() == 0 ) ) ||
- ( ( drmStatus == EMTPDrmStatusNotProtected ) && ( newValue.Value() == 1 ) ) )
+ if ( ( ( drmStatus == EMTPDrmStatusProtected) && ( iMTPTypeUint8.Value() == 0 ) ) ||
+ ( ( drmStatus == EMTPDrmStatusNotProtected ) && ( iMTPTypeUint8.Value() == 1 ) ) )
{
responseCode = EMTPRespCodeAccessDenied;
}
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/mediamtpdataprovidercontrollerimp.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/mediamtpdataprovidercontrollerimp.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -26,7 +26,7 @@
//
static const TImplementationProxy ImplementationTable[] =
{
- {{0x10207C4B}, (TProxyNewLPtr) ( CMediaMtpDataProvider::NewL )}
+ { { 0x10207C4B }, ( TProxyNewLPtr ) ( CMediaMtpDataProvider::NewL ) }
};
// -----------------------------------------------------------------------------
@@ -36,7 +36,7 @@
EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
TInt& aTableCount )
{
- aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+ aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy );
return ImplementationTable;
}
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/mediamtpdataproviderprocessor.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdpplugins/mediamtpdataprovider/src/mediamtpdataproviderprocessor.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -18,54 +18,51 @@
#include <mtp/tmtptyperequest.h>
-//Include the standard request processor headers
#include "crequestunknown.h"
-
#include "mediamtpdataproviderprocessor.h"
+#include "mmmtpdplogger.h"
//Include the required header for carrying out the specified request
-#include "mmmtpdplogger.h"
-
#include "cgetobjectpropssupported.h"
-#include "cmediamtpdataprovidergetobjectpropdesc.h"
-#include "cmediamtpdataprovidergetinterdependentpropdesc.h"
+#include "cgetobjectpropdesc.h"
+#include "cgetinterdependentpropdesc.h"
#include "cgetobject.h"
#include "cgetobjectinfo.h"
#include "cmediamtpdataprovidergetobjectpropvalue.h"
#include "cmediamtpdataprovidergetobjectproplist.h"
-#include "cmediamtpdataprovidersendobject.h"
+#include "csendobject.h"
#include "cmediamtpdataprovidersetobjectpropvalue.h"
-#include "cmediamtpdataprovidersetobjectproplist.h"
+#include "csetobjectproplist.h"
#include "cgetobjectreferences.h"
#include "csetobjectreferences.h"
#include "cdeleteobject.h"
#include "cmediamtpdataprovidercopyobject.h"
#include "cmediamtpdataprovidermoveobject.h"
#include "cgetpartialobject.h"
-#include "cmediamtpdataprovidergetformatcapabilities.h"
+#include "cgetformatcapabilities.h"
/** A mapping table from the operation code to the request processor factory method */
const TMediaMtpDataProviderRequestProcessorEntry KKMediaMtpDataProviderRequestProcessorTable[] =
{
- {EMTPOpCodeGetObjectPropsSupported, CGetObjectPropsSupported::NewL}, //Get Supported Props
- {EMTPOpCodeGetObjectPropDesc, CMediaMtpDataProviderGetObjectPropDesc::NewL}, //Get Props Description
- {EMTPOpCodeGetInterdependentPropDesc, CMediaMtpDataProviderGetInterDependentPropDesc::NewL},//Get Interdependent PropDesc
- {EMTPOpCodeGetObjectInfo, CGetObjectInfo::NewL}, //GetObjectInfo
- {EMTPOpCodeGetObject, CGetObject::NewL}, //GetObject
- {EMTPOpCodeGetObjectPropValue, CMediaMtpDataProviderGetObjectPropValue::NewL}, //Get Props Value
- {EMTPOpCodeGetObjectPropList, CMediaMtpDataProviderGetObjectPropList::NewL}, //GetObjectPropList
- {EMTPOpCodeSendObjectInfo, CMediaMtpDataProviderSendObject::NewL}, //SendObjectInfo (routed to SendObject)
- {EMTPOpCodeSendObject, CMediaMtpDataProviderSendObject::NewL}, //SendObject
- {EMTPOpCodeSendObjectPropList, CMediaMtpDataProviderSendObject::NewL}, // SendobjectPropList (routed to SendObject)
- {EMTPOpCodeSetObjectPropValue, CMediaMtpDataProviderSetObjectPropValue::NewL}, //Set Props Value
- {EMTPOpCodeSetObjectPropList, CMediaMtpDataProviderSetObjectPropList::NewL}, //SetObjectPropList
- {EMTPOpCodeDeleteObject, CDeleteObject::NewL}, //DeleteObject
- {EMTPOpCodeCopyObject, CMediaMtpDataProviderCopyObject::NewL}, // Copy Object
- {EMTPOpCodeMoveObject, CMediaMtpDataProviderMoveObject::NewL}, // Move Object
- {EMTPOpCodeGetPartialObject, CGetPartialObject::NewL}, // GetPartialObject
- {EMTPOpCodeSetObjectReferences, CSetObjectReferences::NewL}, //Set Object References
- {EMTPOpCodeGetObjectReferences, CGetObjectReferences::NewL}, //Get Object References
- {EMTPOpCodeGetFormatCapabilities, CMediaMtpDataProviderGetFormatCapabilities::NewL} // GetFormatCapabilities
+ { EMTPOpCodeGetObjectPropsSupported, CGetObjectPropsSupported::NewL }, //Get Supported Props
+ { EMTPOpCodeGetObjectPropDesc, CGetObjectPropDesc::NewL }, //Get Props Description
+ { EMTPOpCodeGetInterdependentPropDesc, CGetInterdependentPropDesc::NewL },//Get Interdependent PropDesc
+ { EMTPOpCodeGetObjectInfo, CGetObjectInfo::NewL }, //GetObjectInfo
+ { EMTPOpCodeGetObject, CGetObject::NewL }, //GetObject
+ { EMTPOpCodeGetObjectPropValue, CMediaMtpDataProviderGetObjectPropValue::NewL }, //Get Props Value
+ { EMTPOpCodeGetObjectPropList, CMediaMtpDataProviderGetObjectPropList::NewL }, //GetObjectPropList
+ { EMTPOpCodeSendObjectInfo, CSendObject::NewL }, //SendObjectInfo (routed to SendObject)
+ { EMTPOpCodeSendObject, CSendObject::NewL }, //SendObject
+ { EMTPOpCodeSendObjectPropList, CSendObject::NewL }, // SendobjectPropList (routed to SendObject)
+ { EMTPOpCodeSetObjectPropValue, CMediaMtpDataProviderSetObjectPropValue::NewL }, //Set Props Value
+ { EMTPOpCodeSetObjectPropList, CSetObjectPropList::NewL }, //SetObjectPropList
+ { EMTPOpCodeDeleteObject, CDeleteObject::NewL }, //DeleteObject
+ { EMTPOpCodeCopyObject, CMediaMtpDataProviderCopyObject::NewL }, // Copy Object
+ { EMTPOpCodeMoveObject, CMediaMtpDataProviderMoveObject::NewL }, // Move Object
+ { EMTPOpCodeGetPartialObject, CGetPartialObject::NewL }, // GetPartialObject
+ { EMTPOpCodeSetObjectReferences, CSetObjectReferences::NewL }, //Set Object References
+ { EMTPOpCodeGetObjectReferences, CGetObjectReferences::NewL }, //Get Object References
+ { EMTPOpCodeGetFormatCapabilities, CGetFormatCapabilities::NewL } // GetFormatCapabilities
};
// -----------------------------------------------------------------------------
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/bwins/mmmtpdprequestprocessoru.def Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/bwins/mmmtpdprequestprocessoru.def Wed Jun 23 17:51:16 2010 +0100
@@ -3,152 +3,148 @@
?DoHandleResponsePhaseL@CSetObjectPropValue@@MAEHXZ @ 2 NONAME ; int CSetObjectPropValue::DoHandleResponsePhaseL(void)
?NewL@CDeleteObject@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 3 NONAME ; class MMmRequestProcessor * CDeleteObject::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
?StartL@CRenameObject@@QAEXKABVTDesC16@@@Z @ 4 NONAME ; void CRenameObject::StartL(unsigned long, class TDesC16 const &)
- ?ConstructL@CGetObjectPropDesc@@IAEXXZ @ 5 NONAME ; void CGetObjectPropDesc::ConstructL(void)
- ??1CRequestUnknown@@UAE@XZ @ 6 NONAME ; CRequestUnknown::~CRequestUnknown(void)
- ?Release@CRequestProcessor@@MAEXXZ @ 7 NONAME ; void CRequestProcessor::Release(void)
- ?HandleRequestL@CRequestProcessor@@MAEHABVTMTPTypeRequest@@W4TMTPTransactionPhase@@@Z @ 8 NONAME ; int CRequestProcessor::HandleRequestL(class TMTPTypeRequest const &, enum TMTPTransactionPhase)
- ?OpenSessionL@CMmMtpDpAccessSingleton@@SAXXZ @ 9 NONAME ; void CMmMtpDpAccessSingleton::OpenSessionL(void)
- ?ServiceL@CGetPartialObject@@MAEXXZ @ 10 NONAME ; void CGetPartialObject::ServiceL(void)
- ??0CGetObjectInfo@@AAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 11 NONAME ; CGetObjectInfo::CGetObjectInfo(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ?DoHandleResponsePhaseL@CRequestProcessor@@MAEHXZ @ 12 NONAME ; int CRequestProcessor::DoHandleResponsePhaseL(void)
- ?RunError@CCopyObject@@MAEHH@Z @ 13 NONAME ; int CCopyObject::RunError(int)
- ??0CGetObjectPropValue@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 14 NONAME ; CGetObjectPropValue::CGetObjectPropValue(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ?ServiceMetaDataToWrapper@CCopyObject@@IAE?AW4TMTPResponseCode@@GAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 15 NONAME ; enum TMTPResponseCode CCopyObject::ServiceMetaDataToWrapper(unsigned short, class MMTPType &, class CMTPObjectMetaData const &)
- ?RunL@CRequestProcessor@@MAEXXZ @ 16 NONAME ; void CRequestProcessor::RunL(void)
- ?ServiceL@CDeleteObject@@MAEXXZ @ 17 NONAME ; void CDeleteObject::ServiceL(void)
- ?DoCancel@CSetObjectPropList@@MAEXXZ @ 18 NONAME ; void CSetObjectPropList::DoCancel(void)
- ?CleanupDatabaseL@CMmMtpDpMetadataAccessWrapper@@QAEXXZ @ 19 NONAME ; void CMmMtpDpMetadataAccessWrapper::CleanupDatabaseL(void)
- ?ServiceL@CGetObjectPropsSupported@@MAEXXZ @ 20 NONAME ; void CGetObjectPropsSupported::ServiceL(void)
- ?NewL@CSetObjectReferences@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 21 NONAME ; class MMmRequestProcessor * CSetObjectReferences::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ?ServiceMetaDataToWrapperL@CSetObjectPropList@@IAE?AW4TMTPResponseCode@@GAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 22 NONAME ; enum TMTPResponseCode CSetObjectPropList::ServiceMetaDataToWrapperL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &)
- ??0CGetObjectPropDesc@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 23 NONAME ; CGetObjectPropDesc::CGetObjectPropDesc(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ?Release@CMmMtpDpAccessSingleton@@SAXXZ @ 24 NONAME ; void CMmMtpDpAccessSingleton::Release(void)
- ?UsbDisconnect@CSendObject@@MAEXXZ @ 25 NONAME ; void CSendObject::UsbDisconnect(void)
- ?DoSetObjectReferencesL@CSetObjectReferences@@MAEXAAVCMmMtpDpMetadataAccessWrapper@@GABVTDesC16@@AAVCDesC16Array@@@Z @ 26 NONAME ; void CSetObjectReferences::DoSetObjectReferencesL(class CMmMtpDpMetadataAccessWrapper &, unsigned short, class TDesC16 const &, class CDesC16Array &)
- ?ServiceL@CGetFormatCapabilities@@MAEXXZ @ 27 NONAME ; void CGetFormatCapabilities::ServiceL(void)
- ?GetAllReferenceL@CMmMtpDpMetadataAccessWrapper@@QAEXPAVCMPXMedia@@AAVCDesC16Array@@@Z @ 28 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetAllReferenceL(class CMPXMedia *, class CDesC16Array &)
- ??1CSetObjectPropList@@UAE@XZ @ 29 NONAME ; CSetObjectPropList::~CSetObjectPropList(void)
- ?ServiceL@CSetObjectPropList@@MAEXXZ @ 30 NONAME ; void CSetObjectPropList::ServiceL(void)
- ??0CMoveObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 31 NONAME ; CMoveObject::CMoveObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ??0CRequestUnknown@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@@Z @ 32 NONAME ; CRequestUnknown::CRequestUnknown(class MMTPDataProviderFramework &, class MMTPConnection &)
- ?ConstructL@CGetObjectPropList@@IAEXXZ @ 33 NONAME ; void CGetObjectPropList::ConstructL(void)
- ??1CSendObject@@UAE@XZ @ 34 NONAME ; CSendObject::~CSendObject(void)
- ?ServiceMetaDataFromWrapperL@CGetObjectPropValue@@IAEXGAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 35 NONAME ; void CGetObjectPropValue::ServiceMetaDataFromWrapperL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &)
- ?NewL@CGetObject@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 36 NONAME ; class MMmRequestProcessor * CGetObject::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ??1CGetObjectPropValue@@UAE@XZ @ 37 NONAME ; CGetObjectPropValue::~CGetObjectPropValue(void)
- ??1CGetFormatCapabilities@@UAE@XZ @ 38 NONAME ; CGetFormatCapabilities::~CGetFormatCapabilities(void)
- ?SetMetaDataToWrapperL@CSendObject@@IAE?AW4TMTPResponseCode@@GAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 39 NONAME ; enum TMTPResponseCode CSendObject::SetMetaDataToWrapperL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &)
- ?ServiceL@CSetObjectReferences@@EAEXXZ @ 40 NONAME ; void CSetObjectReferences::ServiceL(void)
- ?DoHandleDataIToRPhaseL@CRequestProcessor@@MAEHXZ @ 41 NONAME ; int CRequestProcessor::DoHandleDataIToRPhaseL(void)
- ??0CGetObjectPropList@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 42 NONAME ; CGetObjectPropList::CGetObjectPropList(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ?ConstructL@CCopyObject@@IAEXXZ @ 43 NONAME ; void CCopyObject::ConstructL(void)
- ?ServiceL@CGetObjectPropValue@@MAEXXZ @ 44 NONAME ; void CGetObjectPropValue::ServiceL(void)
- ??1CRenameObject@@UAE@XZ @ 45 NONAME ; CRenameObject::~CRenameObject(void)
- ?Match@CRequestProcessor@@MBEHABVTMTPTypeEvent@@AAVMMTPConnection@@@Z @ 46 NONAME ; int CRequestProcessor::Match(class TMTPTypeEvent const &, class MMTPConnection &) const
- ?DoHandleCompletingPhaseL@CSendObject@@MAEHXZ @ 47 NONAME ; int CSendObject::DoHandleCompletingPhaseL(void)
- ?GetDrmStatus@MmMtpDpUtility@@SAHABVTDesC16@@@Z @ 48 NONAME ; int MmMtpDpUtility::GetDrmStatus(class TDesC16 const &)
- ?RunL@CRenameObject@@MAEXXZ @ 49 NONAME ; void CRenameObject::RunL(void)
- ??0CSendObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 50 NONAME ; CSendObject::CSendObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ??0CSetObjectReferences@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 51 NONAME ; CSetObjectReferences::CSetObjectReferences(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ??0CRequestProcessor@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@HPBUTMTPRequestElementInfo@@@Z @ 52 NONAME ; CRequestProcessor::CRequestProcessor(class MMTPDataProviderFramework &, class MMTPConnection &, int, struct TMTPRequestElementInfo const *)
- ?ServiceL@CSendObject@@MAEXXZ @ 53 NONAME ; void CSendObject::ServiceL(void)
- ?Request@CRequestProcessor@@MBEABVTMTPTypeRequest@@XZ @ 54 NONAME ; class TMTPTypeRequest const & CRequestProcessor::Request(void) const
- ?CreateL@CMmMtpDpAccessSingleton@@SAXAAVRFs@@AAVMMTPDataProviderFramework@@@Z @ 55 NONAME ; void CMmMtpDpAccessSingleton::CreateL(class RFs &, class MMTPDataProviderFramework &)
- ?ServiceMetaDataToWrapper@CMoveObject@@IAE?AW4TMTPResponseCode@@GAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 56 NONAME ; enum TMTPResponseCode CMoveObject::ServiceMetaDataToWrapper(unsigned short, class MMTPType &, class CMTPObjectMetaData const &)
- ?CheckRequestL@CGetPartialObject@@MAE?AW4TMTPResponseCode@@XZ @ 57 NONAME ; enum TMTPResponseCode CGetPartialObject::CheckRequestL(void)
- ?DoCancel@CRequestProcessor@@MAEXXZ @ 58 NONAME ; void CRequestProcessor::DoCancel(void)
- ?ConstructL@CSetObjectPropList@@IAEXXZ @ 59 NONAME ; void CSetObjectPropList::ConstructL(void)
- ?NewL@CRequestUnknown@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@@Z @ 60 NONAME ; class MMmRequestProcessor * CRequestUnknown::NewL(class MMTPDataProviderFramework &, class MMTPConnection &)
- ?ConstructL@CGetObjectInfo@@AAEXXZ @ 61 NONAME ; void CGetObjectInfo::ConstructL(void)
- ?UsbDisconnect@CRequestProcessor@@MAEXXZ @ 62 NONAME ; void CRequestProcessor::UsbDisconnect(void)
- ?UpdateMusicCollectionL@CMmMtpDpMetadataAccessWrapper@@QAEXXZ @ 63 NONAME ; void CMmMtpDpMetadataAccessWrapper::UpdateMusicCollectionL(void)
- ??1CMoveObject@@UAE@XZ @ 64 NONAME ; CMoveObject::~CMoveObject(void)
- ?CheckRequestL@CSendObject@@MAE?AW4TMTPResponseCode@@XZ @ 65 NONAME ; enum TMTPResponseCode CSendObject::CheckRequestL(void)
- ??1CRequestProcessor@@MAE@XZ @ 66 NONAME ; CRequestProcessor::~CRequestProcessor(void)
- ?DoCancel@CDeleteObject@@MAEXXZ @ 67 NONAME ; void CDeleteObject::DoCancel(void)
- ?RunL@CMoveObject@@MAEXXZ @ 68 NONAME ; void CMoveObject::RunL(void)
- ??1CGetObject@@UAE@XZ @ 69 NONAME ; CGetObject::~CGetObject(void)
- ?DoHandleResponsePhaseL@CSetObjectReferences@@EAEHXZ @ 70 NONAME ; int CSetObjectReferences::DoHandleResponsePhaseL(void)
- ?GetPlaylistNameL@CMmMtpDpMetadataAccessWrapper@@QAEXPAVCMPXMedia@@AAVTDes16@@@Z @ 71 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetPlaylistNameL(class CMPXMedia *, class TDes16 &)
- ?GetAccessWrapperL@CMmMtpDpAccessSingleton@@SAAAVCMmMtpDpMetadataAccessWrapper@@XZ @ 72 NONAME ; class CMmMtpDpMetadataAccessWrapper & CMmMtpDpAccessSingleton::GetAccessWrapperL(void)
- ??1CGetObjectPropsSupported@@UAE@XZ @ 73 NONAME ; CGetObjectPropsSupported::~CGetObjectPropsSupported(void)
- ?CheckRequestL@CGetObjectPropList@@MAE?AW4TMTPResponseCode@@XZ @ 74 NONAME ; enum TMTPResponseCode CGetObjectPropList::CheckRequestL(void)
- ?HasDataphase@CRequestProcessor@@MBEHXZ @ 75 NONAME ; int CRequestProcessor::HasDataphase(void) const
- ?NewL@CGetObjectPropsSupported@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 76 NONAME ; class MMmRequestProcessor * CGetObjectPropsSupported::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ?Connection@CRequestProcessor@@MBEAAVMMTPConnection@@XZ @ 77 NONAME ; class MMTPConnection & CRequestProcessor::Connection(void) const
- ??1CGetPartialObject@@UAE@XZ @ 78 NONAME ; CGetPartialObject::~CGetPartialObject(void)
- ?NewL@CGetObjectInfo@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 79 NONAME ; class MMmRequestProcessor * CGetObjectInfo::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ?RunError@CSetObjectPropList@@MAEHH@Z @ 80 NONAME ; int CSetObjectPropList::RunError(int)
- ?Match@CRequestUnknown@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 81 NONAME ; int CRequestUnknown::Match(class TMTPTypeRequest const &, class MMTPConnection &) const
- ?ServiceL@CMoveObject@@MAEXXZ @ 82 NONAME ; void CMoveObject::ServiceL(void)
- ?CreateDummyFile@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 83 NONAME ; void CMmMtpDpMetadataAccessWrapper::CreateDummyFile(class TDesC16 const &)
- ?CheckRequestL@CGetObjectPropDesc@@MAE?AW4TMTPResponseCode@@XZ @ 84 NONAME ; enum TMTPResponseCode CGetObjectPropDesc::CheckRequestL(void)
- ?DoHandleRToIPhaseL@CRequestProcessor@@MAEHXZ @ 85 NONAME ; int CRequestProcessor::DoHandleRToIPhaseL(void)
- ?ServiceMetaDataToWrapperL@CSetObjectPropValue@@IAE?AW4TMTPResponseCode@@GAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 86 NONAME ; enum TMTPResponseCode CSetObjectPropValue::ServiceMetaDataToWrapperL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &)
- ?FormatFromFilename@MmMtpDpUtility@@SA?AW4TMTPFormatCode@@ABVTDesC16@@@Z @ 87 NONAME ; enum TMTPFormatCode MmMtpDpUtility::FormatFromFilename(class TDesC16 const &)
- ?CheckRequestL@CSetObjectPropValue@@MAE?AW4TMTPResponseCode@@XZ @ 88 NONAME ; enum TMTPResponseCode CSetObjectPropValue::CheckRequestL(void)
- ?Match@CRequestProcessor@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 89 NONAME ; int CRequestProcessor::Match(class TMTPTypeRequest const &, class MMTPConnection &) const
- ??0CCopyObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 90 NONAME ; CCopyObject::CCopyObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ?CheckRequestL@CRequestProcessor@@MAE?AW4TMTPResponseCode@@XZ @ 91 NONAME ; enum TMTPResponseCode CRequestProcessor::CheckRequestL(void)
- ?SendResponseL@CRequestProcessor@@IAEXW4TMTPResponseCode@@HPAK@Z @ 92 NONAME ; void CRequestProcessor::SendResponseL(enum TMTPResponseCode, int, unsigned long *)
- ??0CGetPartialObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@@Z @ 93 NONAME ; CGetPartialObject::CGetPartialObject(class MMTPDataProviderFramework &, class MMTPConnection &)
- ?DoHandleCompletingPhaseL@CRequestProcessor@@MAEHXZ @ 94 NONAME ; int CRequestProcessor::DoHandleCompletingPhaseL(void)
- ??0CSetObjectPropList@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 95 NONAME ; CSetObjectPropList::CSetObjectPropList(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ?DeleteDummyFile@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 96 NONAME ; void CMmMtpDpMetadataAccessWrapper::DeleteDummyFile(class TDesC16 const &)
- ?IsVideoL@MmMtpDpUtility@@SAHABVTDesC16@@@Z @ 97 NONAME ; int MmMtpDpUtility::IsVideoL(class TDesC16 const &)
- ??1CGetObjectInfo@@UAE@XZ @ 98 NONAME ; CGetObjectInfo::~CGetObjectInfo(void)
- ?ServiceL@CRequestUnknown@@MAEXXZ @ 99 NONAME ; void CRequestUnknown::ServiceL(void)
- ?HasDataphase@CSetObjectPropList@@MBEHXZ @ 100 NONAME ; int CSetObjectPropList::HasDataphase(void) const
- ?NewL@CGetObjectReferences@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 101 NONAME ; class MMmRequestProcessor * CGetObjectReferences::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ?ConstructL@CGetFormatCapabilities@@IAEXXZ @ 102 NONAME ; void CGetFormatCapabilities::ConstructL(void)
- ?DoCancel@CRenameObject@@MAEXXZ @ 103 NONAME ; void CRenameObject::DoCancel(void)
- ??0CGetFormatCapabilities@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 104 NONAME ; CGetFormatCapabilities::CGetFormatCapabilities(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ??1CSetObjectReferences@@UAE@XZ @ 105 NONAME ; CSetObjectReferences::~CSetObjectReferences(void)
- ?Match@CSendObject@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 106 NONAME ; int CSendObject::Match(class TMTPTypeRequest const &, class MMTPConnection &) const
- ??1CCopyObject@@UAE@XZ @ 107 NONAME ; CCopyObject::~CCopyObject(void)
- ?RunError@CMoveObject@@MAEHH@Z @ 108 NONAME ; int CMoveObject::RunError(int)
- ?ConstructL@CSendObject@@IAEXXZ @ 109 NONAME ; void CSendObject::ConstructL(void)
- ?GetModifiedContentL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@AAHAAVCDesC16Array@@@Z @ 110 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetModifiedContentL(class TDesC16 const &, int &, class CDesC16Array &)
- ?RunL@CGetObjectPropList@@MAEXXZ @ 111 NONAME ; void CGetObjectPropList::RunL(void)
- ?RunL@CCopyObject@@MAEXXZ @ 112 NONAME ; void CCopyObject::RunL(void)
- ?RunError@CRequestProcessor@@MAEHH@Z @ 113 NONAME ; int CRequestProcessor::RunError(int)
- ?SessionId@CRequestProcessor@@MAEKXZ @ 114 NONAME ; unsigned long CRequestProcessor::SessionId(void)
- ?SetPlaylistL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@AAVCDesC16Array@@@Z @ 115 NONAME ; void CMmMtpDpMetadataAccessWrapper::SetPlaylistL(class TDesC16 const &, class CDesC16Array &)
- ?HandleEventL@CRequestProcessor@@MAEXABVTMTPTypeEvent@@@Z @ 116 NONAME ; void CRequestProcessor::HandleEventL(class TMTPTypeEvent const &)
- ?NewL@CGetPartialObject@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 117 NONAME ; class MMmRequestProcessor * CGetPartialObject::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ?HasDataphase@CSetObjectReferences@@EBEHXZ @ 118 NONAME ; int CSetObjectReferences::HasDataphase(void) const
- ?RenameObjectL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@0@Z @ 119 NONAME ; void CMmMtpDpMetadataAccessWrapper::RenameObjectL(class TDesC16 const &, class TDesC16 const &)
- ?RunError@CGetObjectPropList@@MAEHH@Z @ 120 NONAME ; int CGetObjectPropList::RunError(int)
- ?DoHandleResponsePhaseL@CSetObjectPropList@@MAEHXZ @ 121 NONAME ; int CSetObjectPropList::DoHandleResponsePhaseL(void)
- ??0CDeleteObject@@AAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 122 NONAME ; CDeleteObject::CDeleteObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ?GetAllPlaylistL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@PAPAVCMPXMediaArray@@@Z @ 123 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetAllPlaylistL(class TDesC16 const &, class CMPXMediaArray * *)
- ?NewL@CRenameObject@@SAPAV1@AAVMMTPDataProviderFramework@@AAVCMmMtpDpMetadataAccessWrapper@@@Z @ 124 NONAME ; class CRenameObject * CRenameObject::NewL(class MMTPDataProviderFramework &, class CMmMtpDpMetadataAccessWrapper &)
- ?GetObjectMetadataValueL@CMmMtpDpMetadataAccessWrapper@@QAEXGAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 125 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetObjectMetadataValueL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &)
- ?AddDummyFileL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 126 NONAME ; void CMmMtpDpMetadataAccessWrapper::AddDummyFileL(class TDesC16 const &)
- ??1CGetObjectPropDesc@@UAE@XZ @ 127 NONAME ; CGetObjectPropDesc::~CGetObjectPropDesc(void)
- ?ServiceL@CGetObjectPropDesc@@MAEXXZ @ 128 NONAME ; void CGetObjectPropDesc::ServiceL(void)
- ?HasDataphase@CSetObjectPropValue@@MBEHXZ @ 129 NONAME ; int CSetObjectPropValue::HasDataphase(void) const
- ?ServiceL@CCopyObject@@MAEXXZ @ 130 NONAME ; void CCopyObject::ServiceL(void)
- ?CheckRequestL@CGetObjectPropValue@@MAE?AW4TMTPResponseCode@@XZ @ 131 NONAME ; enum TMTPResponseCode CGetObjectPropValue::CheckRequestL(void)
- ?CloseSessionL@CMmMtpDpAccessSingleton@@SAXXZ @ 132 NONAME ; void CMmMtpDpAccessSingleton::CloseSessionL(void)
- ?ReceiveDataL@CRequestProcessor@@IAEXAAVMMTPType@@@Z @ 133 NONAME ; void CRequestProcessor::ReceiveDataL(class MMTPType &)
- ?ConstructL@CMoveObject@@IAEXXZ @ 134 NONAME ; void CMoveObject::ConstructL(void)
- ?RunL@CSetObjectPropList@@MAEXXZ @ 135 NONAME ; void CSetObjectPropList::RunL(void)
- ??1CGetObjectReferences@@UAE@XZ @ 136 NONAME ; CGetObjectReferences::~CGetObjectReferences(void)
- ?HasDataphase@CSendObject@@MBEHXZ @ 137 NONAME ; int CSendObject::HasDataphase(void) const
- ??1CSetObjectPropValue@@UAE@XZ @ 138 NONAME ; CSetObjectPropValue::~CSetObjectPropValue(void)
- ?ConstructL@CRenameObject@@IAEXXZ @ 139 NONAME ; void CRenameObject::ConstructL(void)
- ?DoHandleResponsePhaseL@CSendObject@@MAEHXZ @ 140 NONAME ; int CSendObject::DoHandleResponsePhaseL(void)
- ?SendDataL@CRequestProcessor@@IAEXABVMMTPType@@@Z @ 141 NONAME ; void CRequestProcessor::SendDataL(class MMTPType const &)
- ?DoCancel@CGetObjectPropList@@MAEXXZ @ 142 NONAME ; void CGetObjectPropList::DoCancel(void)
- ?DoHandleRequestPhaseL@CRequestProcessor@@MAEHXZ @ 143 NONAME ; int CRequestProcessor::DoHandleRequestPhaseL(void)
- ?ServiceL@CSetObjectPropValue@@MAEXXZ @ 144 NONAME ; void CSetObjectPropValue::ServiceL(void)
- ?RunError@CRenameObject@@MAEHH@Z @ 145 NONAME ; int CRenameObject::RunError(int)
- ??1CDeleteObject@@UAE@XZ @ 146 NONAME ; CDeleteObject::~CDeleteObject(void)
- ?DoHandleResponsePhaseL@CGetPartialObject@@MAEHXZ @ 147 NONAME ; int CGetPartialObject::DoHandleResponsePhaseL(void)
- ?CheckRequestL@CGetFormatCapabilities@@MAE?AW4TMTPResponseCode@@XZ @ 148 NONAME ; enum TMTPResponseCode CGetFormatCapabilities::CheckRequestL(void)
- ??0CSetObjectPropValue@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 149 NONAME ; CSetObjectPropValue::CSetObjectPropValue(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
- ??1CGetObjectPropList@@UAE@XZ @ 150 NONAME ; CGetObjectPropList::~CGetObjectPropList(void)
- ?ServiceL@CGetObjectPropList@@MAEXXZ @ 151 NONAME ; void CGetObjectPropList::ServiceL(void)
- ??0CRenameObject@@IAE@AAVMMTPDataProviderFramework@@AAVCMmMtpDpMetadataAccessWrapper@@@Z @ 152 NONAME ; CRenameObject::CRenameObject(class MMTPDataProviderFramework &, class CMmMtpDpMetadataAccessWrapper &)
+ ??1CRequestUnknown@@UAE@XZ @ 5 NONAME ; CRequestUnknown::~CRequestUnknown(void)
+ ?DeleteObjectL@CMmMtpDpMetadataAccessWrapper@@QAEXABVCMTPObjectMetaData@@@Z @ 6 NONAME ; void CMmMtpDpMetadataAccessWrapper::DeleteObjectL(class CMTPObjectMetaData const &)
+ ?UpdateMusicCollectionL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 7 NONAME ; void CMmMtpDpMetadataAccessWrapper::UpdateMusicCollectionL(class TDesC16 const &)
+ ?Release@CRequestProcessor@@MAEXXZ @ 8 NONAME ; void CRequestProcessor::Release(void)
+ ?HandleRequestL@CRequestProcessor@@MAEHABVTMTPTypeRequest@@W4TMTPTransactionPhase@@@Z @ 9 NONAME ; int CRequestProcessor::HandleRequestL(class TMTPTypeRequest const &, enum TMTPTransactionPhase)
+ ??1CGetInterdependentPropDesc@@UAE@XZ @ 10 NONAME ; CGetInterdependentPropDesc::~CGetInterdependentPropDesc(void)
+ ?OpenSessionL@CMmMtpDpAccessSingleton@@SAXXZ @ 11 NONAME ; void CMmMtpDpAccessSingleton::OpenSessionL(void)
+ ?ServiceL@CGetPartialObject@@MAEXXZ @ 12 NONAME ; void CGetPartialObject::ServiceL(void)
+ ?DoHandleResponsePhaseL@CRequestProcessor@@MAEHXZ @ 13 NONAME ; int CRequestProcessor::DoHandleResponsePhaseL(void)
+ ?NewL@CGetObjectPropDesc@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 14 NONAME ; class MMmRequestProcessor * CGetObjectPropDesc::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ??0CGetObjectPropValue@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 15 NONAME ; CGetObjectPropValue::CGetObjectPropValue(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ?CheckRequestL@CSetObjectPropList@@MAE?AW4TMTPResponseCode@@XZ @ 16 NONAME ; enum TMTPResponseCode CSetObjectPropList::CheckRequestL(void)
+ ?RunL@CRequestProcessor@@MAEXXZ @ 17 NONAME ; void CRequestProcessor::RunL(void)
+ ?ServiceL@CDeleteObject@@MAEXXZ @ 18 NONAME ; void CDeleteObject::ServiceL(void)
+ ?DoCancel@CSetObjectPropList@@MAEXXZ @ 19 NONAME ; void CSetObjectPropList::DoCancel(void)
+ ?CleanupDatabaseL@CMmMtpDpMetadataAccessWrapper@@QAEXXZ @ 20 NONAME ; void CMmMtpDpMetadataAccessWrapper::CleanupDatabaseL(void)
+ ?ServiceL@CGetObjectPropsSupported@@MAEXXZ @ 21 NONAME ; void CGetObjectPropsSupported::ServiceL(void)
+ ?NewL@CSetObjectReferences@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 22 NONAME ; class MMmRequestProcessor * CSetObjectReferences::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ?Release@CMmMtpDpAccessSingleton@@SAXXZ @ 23 NONAME ; void CMmMtpDpAccessSingleton::Release(void)
+ ?UsbDisconnect@CSendObject@@MAEXXZ @ 24 NONAME ; void CSendObject::UsbDisconnect(void)
+ ?ServiceL@CGetFormatCapabilities@@MAEXXZ @ 25 NONAME ; void CGetFormatCapabilities::ServiceL(void)
+ ??1CSetObjectPropList@@UAE@XZ @ 26 NONAME ; CSetObjectPropList::~CSetObjectPropList(void)
+ ?ServiceL@CSetObjectPropList@@MAEXXZ @ 27 NONAME ; void CSetObjectPropList::ServiceL(void)
+ ??0CMoveObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 28 NONAME ; CMoveObject::CMoveObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ?ConstructL@CGetObjectPropList@@IAEXXZ @ 29 NONAME ; void CGetObjectPropList::ConstructL(void)
+ ??1CSendObject@@UAE@XZ @ 30 NONAME ; CSendObject::~CSendObject(void)
+ ?ServiceMetaDataFromWrapperL@CGetObjectPropValue@@IAEXGAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 31 NONAME ; void CGetObjectPropValue::ServiceMetaDataFromWrapperL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &)
+ ?NewL@CGetObject@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 32 NONAME ; class MMmRequestProcessor * CGetObject::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ??1CGetObjectPropValue@@UAE@XZ @ 33 NONAME ; CGetObjectPropValue::~CGetObjectPropValue(void)
+ ?ActiveToIdleStatusChange@CMmMtpDpAccessSingleton@@SAXXZ @ 34 NONAME ; void CMmMtpDpAccessSingleton::ActiveToIdleStatusChange(void)
+ ?CreateL@CMmMtpDpAccessSingleton@@SAXAAVMMTPDataProviderFramework@@@Z @ 35 NONAME ; void CMmMtpDpAccessSingleton::CreateL(class MMTPDataProviderFramework &)
+ ??1CGetFormatCapabilities@@UAE@XZ @ 36 NONAME ; CGetFormatCapabilities::~CGetFormatCapabilities(void)
+ ?ServiceL@CSetObjectReferences@@EAEXXZ @ 37 NONAME ; void CSetObjectReferences::ServiceL(void)
+ ?DoHandleDataIToRPhaseL@CRequestProcessor@@MAEHXZ @ 38 NONAME ; int CRequestProcessor::DoHandleDataIToRPhaseL(void)
+ ??0CGetObjectPropList@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 39 NONAME ; CGetObjectPropList::CGetObjectPropList(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ?ConstructL@CCopyObject@@IAEXXZ @ 40 NONAME ; void CCopyObject::ConstructL(void)
+ ?SetMetaDataToWrapper@CPropertySettingUtility@@QAE?AW4TMTPResponseCode@@AAVMMmMtpDpConfig@@GAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 41 NONAME ; enum TMTPResponseCode CPropertySettingUtility::SetMetaDataToWrapper(class MMmMtpDpConfig &, unsigned short, class MMTPType &, class CMTPObjectMetaData const &)
+ ?ServiceL@CGetObjectPropValue@@MAEXXZ @ 42 NONAME ; void CGetObjectPropValue::ServiceL(void)
+ ??1CRenameObject@@UAE@XZ @ 43 NONAME ; CRenameObject::~CRenameObject(void)
+ ?Match@CRequestProcessor@@MBEHABVTMTPTypeEvent@@AAVMMTPConnection@@@Z @ 44 NONAME ; int CRequestProcessor::Match(class TMTPTypeEvent const &, class MMTPConnection &) const
+ ?DoHandleCompletingPhaseL@CSendObject@@MAEHXZ @ 45 NONAME ; int CSendObject::DoHandleCompletingPhaseL(void)
+ ?GetDrmStatus@MmMtpDpUtility@@SAHABVTDesC16@@@Z @ 46 NONAME ; int MmMtpDpUtility::GetDrmStatus(class TDesC16 const &)
+ ?RunL@CRenameObject@@MAEXXZ @ 47 NONAME ; void CRenameObject::RunL(void)
+ ?SetPSStatus@MmMtpDpUtility@@SAXW4TMtpPSStatus@@@Z @ 48 NONAME ; void MmMtpDpUtility::SetPSStatus(enum TMtpPSStatus)
+ ??0CRequestProcessor@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@HPBUTMTPRequestElementInfo@@@Z @ 49 NONAME ; CRequestProcessor::CRequestProcessor(class MMTPDataProviderFramework &, class MMTPConnection &, int, struct TMTPRequestElementInfo const *)
+ ?ServiceL@CSendObject@@MAEXXZ @ 50 NONAME ; void CSendObject::ServiceL(void)
+ ?Request@CRequestProcessor@@MBEABVTMTPTypeRequest@@XZ @ 51 NONAME ; class TMTPTypeRequest const & CRequestProcessor::Request(void) const
+ ?CheckRequestL@CGetPartialObject@@MAE?AW4TMTPResponseCode@@XZ @ 52 NONAME ; enum TMTPResponseCode CGetPartialObject::CheckRequestL(void)
+ ?DoCancel@CRequestProcessor@@MAEXXZ @ 53 NONAME ; void CRequestProcessor::DoCancel(void)
+ ?NewL@CRequestUnknown@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@@Z @ 54 NONAME ; class MMmRequestProcessor * CRequestUnknown::NewL(class MMTPDataProviderFramework &, class MMTPConnection &)
+ ?ConstructL@CGetObjectInfo@@AAEXXZ @ 55 NONAME ; void CGetObjectInfo::ConstructL(void)
+ ?UsbDisconnect@CRequestProcessor@@MAEXXZ @ 56 NONAME ; void CRequestProcessor::UsbDisconnect(void)
+ ??1CMoveObject@@UAE@XZ @ 57 NONAME ; CMoveObject::~CMoveObject(void)
+ ?CheckRequestL@CSendObject@@MAE?AW4TMTPResponseCode@@XZ @ 58 NONAME ; enum TMTPResponseCode CSendObject::CheckRequestL(void)
+ ??1CRequestProcessor@@MAE@XZ @ 59 NONAME ; CRequestProcessor::~CRequestProcessor(void)
+ ?DoCancel@CDeleteObject@@MAEXXZ @ 60 NONAME ; void CDeleteObject::DoCancel(void)
+ ??1CGetObject@@UAE@XZ @ 61 NONAME ; CGetObject::~CGetObject(void)
+ ?NewL@CGetInterdependentPropDesc@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 62 NONAME ; class MMmRequestProcessor * CGetInterdependentPropDesc::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ?AddObjectL@CMmMtpDpMetadataAccessWrapper@@QAEXABVCMTPObjectMetaData@@@Z @ 63 NONAME ; void CMmMtpDpMetadataAccessWrapper::AddObjectL(class CMTPObjectMetaData const &)
+ ?DoHandleResponsePhaseL@CSetObjectReferences@@EAEHXZ @ 64 NONAME ; int CSetObjectReferences::DoHandleResponsePhaseL(void)
+ ?GetAccessWrapperL@CMmMtpDpAccessSingleton@@SAAAVCMmMtpDpMetadataAccessWrapper@@XZ @ 65 NONAME ; class CMmMtpDpMetadataAccessWrapper & CMmMtpDpAccessSingleton::GetAccessWrapperL(void)
+ ??1CGetObjectPropsSupported@@UAE@XZ @ 66 NONAME ; CGetObjectPropsSupported::~CGetObjectPropsSupported(void)
+ ?CheckRequestL@CGetObjectPropList@@MAE?AW4TMTPResponseCode@@XZ @ 67 NONAME ; enum TMTPResponseCode CGetObjectPropList::CheckRequestL(void)
+ ?HasDataphase@CRequestProcessor@@MBEHXZ @ 68 NONAME ; int CRequestProcessor::HasDataphase(void) const
+ ?NewL@CGetObjectPropsSupported@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 69 NONAME ; class MMmRequestProcessor * CGetObjectPropsSupported::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ?Connection@CRequestProcessor@@MBEAAVMMTPConnection@@XZ @ 70 NONAME ; class MMTPConnection & CRequestProcessor::Connection(void) const
+ ??1CPropertySettingUtility@@UAE@XZ @ 71 NONAME ; CPropertySettingUtility::~CPropertySettingUtility(void)
+ ??1CGetPartialObject@@UAE@XZ @ 72 NONAME ; CGetPartialObject::~CGetPartialObject(void)
+ ?NewL@CGetObjectInfo@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 73 NONAME ; class MMmRequestProcessor * CGetObjectInfo::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ?RunError@CSetObjectPropList@@MAEHH@Z @ 74 NONAME ; int CSetObjectPropList::RunError(int)
+ ?CheckRequestL@CGetInterdependentPropDesc@@MAE?AW4TMTPResponseCode@@XZ @ 75 NONAME ; enum TMTPResponseCode CGetInterdependentPropDesc::CheckRequestL(void)
+ ?Match@CRequestUnknown@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 76 NONAME ; int CRequestUnknown::Match(class TMTPTypeRequest const &, class MMTPConnection &) const
+ ?ServiceL@CMoveObject@@MAEXXZ @ 77 NONAME ; void CMoveObject::ServiceL(void)
+ ?CreateDummyFile@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 78 NONAME ; void CMmMtpDpMetadataAccessWrapper::CreateDummyFile(class TDesC16 const &)
+ ?CheckRequestL@CGetObjectPropDesc@@MAE?AW4TMTPResponseCode@@XZ @ 79 NONAME ; enum TMTPResponseCode CGetObjectPropDesc::CheckRequestL(void)
+ ?DoHandleRToIPhaseL@CRequestProcessor@@MAEHXZ @ 80 NONAME ; int CRequestProcessor::DoHandleRToIPhaseL(void)
+ ?ServiceMetaDataToWrapperL@CSetObjectPropValue@@IAE?AW4TMTPResponseCode@@GAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 81 NONAME ; enum TMTPResponseCode CSetObjectPropValue::ServiceMetaDataToWrapperL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &)
+ ?FormatFromFilename@MmMtpDpUtility@@SA?AW4TMTPFormatCode@@ABVTDesC16@@@Z @ 82 NONAME ; enum TMTPFormatCode MmMtpDpUtility::FormatFromFilename(class TDesC16 const &)
+ ?GetAllReferenceL@CMmMtpDpMetadataAccessWrapper@@QAEXABVCMTPObjectMetaData@@AAVCDesC16Array@@@Z @ 83 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetAllReferenceL(class CMTPObjectMetaData const &, class CDesC16Array &)
+ ?CheckRequestL@CSetObjectPropValue@@MAE?AW4TMTPResponseCode@@XZ @ 84 NONAME ; enum TMTPResponseCode CSetObjectPropValue::CheckRequestL(void)
+ ??0CPropertySettingUtility@@IAE@XZ @ 85 NONAME ; CPropertySettingUtility::CPropertySettingUtility(void)
+ ?Match@CRequestProcessor@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 86 NONAME ; int CRequestProcessor::Match(class TMTPTypeRequest const &, class MMTPConnection &) const
+ ??0CCopyObject@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 87 NONAME ; CCopyObject::CCopyObject(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ?CheckRequestL@CRequestProcessor@@MAE?AW4TMTPResponseCode@@XZ @ 88 NONAME ; enum TMTPResponseCode CRequestProcessor::CheckRequestL(void)
+ ?SendResponseL@CRequestProcessor@@IAEXW4TMTPResponseCode@@HPAK@Z @ 89 NONAME ; void CRequestProcessor::SendResponseL(enum TMTPResponseCode, int, unsigned long *)
+ ?CancelActiveToIdleStatusChange@CMmMtpDpAccessSingleton@@SAXXZ @ 90 NONAME ; void CMmMtpDpAccessSingleton::CancelActiveToIdleStatusChange(void)
+ ?DoHandleCompletingPhaseL@CRequestProcessor@@MAEHXZ @ 91 NONAME ; int CRequestProcessor::DoHandleCompletingPhaseL(void)
+ ?DeleteDummyFile@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 92 NONAME ; void CMmMtpDpMetadataAccessWrapper::DeleteDummyFile(class TDesC16 const &)
+ ??1CGetObjectInfo@@UAE@XZ @ 93 NONAME ; CGetObjectInfo::~CGetObjectInfo(void)
+ ?ServiceL@CRequestUnknown@@MAEXXZ @ 94 NONAME ; void CRequestUnknown::ServiceL(void)
+ ?HasDataphase@CSetObjectPropList@@MBEHXZ @ 95 NONAME ; int CSetObjectPropList::HasDataphase(void) const
+ ?NewL@CGetObjectReferences@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 96 NONAME ; class MMmRequestProcessor * CGetObjectReferences::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ?DoCancel@CRenameObject@@MAEXXZ @ 97 NONAME ; void CRenameObject::DoCancel(void)
+ ??1CSetObjectReferences@@UAE@XZ @ 98 NONAME ; CSetObjectReferences::~CSetObjectReferences(void)
+ ?Match@CSendObject@@MBEHABVTMTPTypeRequest@@AAVMMTPConnection@@@Z @ 99 NONAME ; int CSendObject::Match(class TMTPTypeRequest const &, class MMTPConnection &) const
+ ?NewL@CSetObjectPropList@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 100 NONAME ; class MMmRequestProcessor * CSetObjectPropList::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ??1CCopyObject@@UAE@XZ @ 101 NONAME ; CCopyObject::~CCopyObject(void)
+ ?GetModifiedContentL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@AAHAAVCDesC16Array@@@Z @ 102 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetModifiedContentL(class TDesC16 const &, int &, class CDesC16Array &)
+ ?RunL@CGetObjectPropList@@MAEXXZ @ 103 NONAME ; void CGetObjectPropList::RunL(void)
+ ?NewRangeFormDescriptionL@CDescriptionUtility@@QAEPAVCMTPTypeObjectPropDesc@@GKKKH@Z @ 104 NONAME ; class CMTPTypeObjectPropDesc * CDescriptionUtility::NewRangeFormDescriptionL(unsigned short, unsigned long, unsigned long, unsigned long, int)
+ ?RunError@CRequestProcessor@@MAEHH@Z @ 105 NONAME ; int CRequestProcessor::RunError(int)
+ ?SessionId@CRequestProcessor@@MAEKXZ @ 106 NONAME ; unsigned long CRequestProcessor::SessionId(void)
+ ??0CDescriptionUtility@@IAE@XZ @ 107 NONAME ; CDescriptionUtility::CDescriptionUtility(void)
+ ?HandleEventL@CRequestProcessor@@MAEXABVTMTPTypeEvent@@@Z @ 108 NONAME ; void CRequestProcessor::HandleEventL(class TMTPTypeEvent const &)
+ ?NewL@CGetPartialObject@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 109 NONAME ; class MMmRequestProcessor * CGetPartialObject::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ?HasDataphase@CSetObjectReferences@@EBEHXZ @ 110 NONAME ; int CSetObjectReferences::HasDataphase(void) const
+ ?RunError@CGetObjectPropList@@MAEHH@Z @ 111 NONAME ; int CGetObjectPropList::RunError(int)
+ ?DoHandleResponsePhaseL@CSetObjectPropList@@MAEHXZ @ 112 NONAME ; int CSetObjectPropList::DoHandleResponsePhaseL(void)
+ ?NewL@CRenameObject@@SAPAV1@AAVMMTPDataProviderFramework@@AAVCMmMtpDpMetadataAccessWrapper@@@Z @ 113 NONAME ; class CRenameObject * CRenameObject::NewL(class MMTPDataProviderFramework &, class CMmMtpDpMetadataAccessWrapper &)
+ ?RenameObjectL@CMmMtpDpMetadataAccessWrapper@@QAEXABVCMTPObjectMetaData@@ABVTDesC16@@@Z @ 114 NONAME ; void CMmMtpDpMetadataAccessWrapper::RenameObjectL(class CMTPObjectMetaData const &, class TDesC16 const &)
+ ?GetObjectMetadataValueL@CMmMtpDpMetadataAccessWrapper@@QAEXGAAVMMTPType@@ABVCMTPObjectMetaData@@@Z @ 115 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetObjectMetadataValueL(unsigned short, class MMTPType &, class CMTPObjectMetaData const &)
+ ?GetAllAbstractMediaL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@AAVCDesC16Array@@W4TMPXGeneralCategory@@@Z @ 116 NONAME ; void CMmMtpDpMetadataAccessWrapper::GetAllAbstractMediaL(class TDesC16 const &, class CDesC16Array &, enum TMPXGeneralCategory)
+ ?AddDummyFileL@CMmMtpDpMetadataAccessWrapper@@QAEXABVTDesC16@@@Z @ 117 NONAME ; void CMmMtpDpMetadataAccessWrapper::AddDummyFileL(class TDesC16 const &)
+ ??1CGetObjectPropDesc@@UAE@XZ @ 118 NONAME ; CGetObjectPropDesc::~CGetObjectPropDesc(void)
+ ?ServiceL@CGetObjectPropDesc@@MAEXXZ @ 119 NONAME ; void CGetObjectPropDesc::ServiceL(void)
+ ?HasDataphase@CSetObjectPropValue@@MBEHXZ @ 120 NONAME ; int CSetObjectPropValue::HasDataphase(void) const
+ ?ServiceL@CCopyObject@@MAEXXZ @ 121 NONAME ; void CCopyObject::ServiceL(void)
+ ?CheckRequestL@CGetObjectPropValue@@MAE?AW4TMTPResponseCode@@XZ @ 122 NONAME ; enum TMTPResponseCode CGetObjectPropValue::CheckRequestL(void)
+ ?CloseSessionL@CMmMtpDpAccessSingleton@@SAXXZ @ 123 NONAME ; void CMmMtpDpAccessSingleton::CloseSessionL(void)
+ ?NewL@CGetFormatCapabilities@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 124 NONAME ; class MMmRequestProcessor * CGetFormatCapabilities::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ?ReceiveDataL@CRequestProcessor@@IAEXAAVMMTPType@@@Z @ 125 NONAME ; void CRequestProcessor::ReceiveDataL(class MMTPType &)
+ ??1CDescriptionUtility@@UAE@XZ @ 126 NONAME ; CDescriptionUtility::~CDescriptionUtility(void)
+ ?ConstructL@CMoveObject@@IAEXXZ @ 127 NONAME ; void CMoveObject::ConstructL(void)
+ ?NewL@CSendObject@@SAPAVMMmRequestProcessor@@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 128 NONAME ; class MMmRequestProcessor * CSendObject::NewL(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ?RunL@CSetObjectPropList@@MAEXXZ @ 129 NONAME ; void CSetObjectPropList::RunL(void)
+ ??1CGetObjectReferences@@UAE@XZ @ 130 NONAME ; CGetObjectReferences::~CGetObjectReferences(void)
+ ?HasDataphase@CSendObject@@MBEHXZ @ 131 NONAME ; int CSendObject::HasDataphase(void) const
+ ??1CSetObjectPropValue@@UAE@XZ @ 132 NONAME ; CSetObjectPropValue::~CSetObjectPropValue(void)
+ ?ConstructL@CRenameObject@@IAEXXZ @ 133 NONAME ; void CRenameObject::ConstructL(void)
+ ?DoHandleResponsePhaseL@CSendObject@@MAEHXZ @ 134 NONAME ; int CSendObject::DoHandleResponsePhaseL(void)
+ ?SendDataL@CRequestProcessor@@IAEXABVMMTPType@@@Z @ 135 NONAME ; void CRequestProcessor::SendDataL(class MMTPType const &)
+ ?SetReferenceL@CMmMtpDpMetadataAccessWrapper@@QAEXABVCMTPObjectMetaData@@AAVCDesC16Array@@@Z @ 136 NONAME ; void CMmMtpDpMetadataAccessWrapper::SetReferenceL(class CMTPObjectMetaData const &, class CDesC16Array &)
+ ?DoCancel@CGetObjectPropList@@MAEXXZ @ 137 NONAME ; void CGetObjectPropList::DoCancel(void)
+ ?ServiceL@CGetInterdependentPropDesc@@MAEXXZ @ 138 NONAME ; void CGetInterdependentPropDesc::ServiceL(void)
+ ?DoHandleRequestPhaseL@CRequestProcessor@@MAEHXZ @ 139 NONAME ; int CRequestProcessor::DoHandleRequestPhaseL(void)
+ ?ServiceL@CSetObjectPropValue@@MAEXXZ @ 140 NONAME ; void CSetObjectPropValue::ServiceL(void)
+ ?RunError@CRenameObject@@MAEHH@Z @ 141 NONAME ; int CRenameObject::RunError(int)
+ ??1CDeleteObject@@UAE@XZ @ 142 NONAME ; CDeleteObject::~CDeleteObject(void)
+ ?DoHandleResponsePhaseL@CGetPartialObject@@MAEHXZ @ 143 NONAME ; int CGetPartialObject::DoHandleResponsePhaseL(void)
+ ??0CSetObjectPropValue@@IAE@AAVMMTPDataProviderFramework@@AAVMMTPConnection@@AAVMMmMtpDpConfig@@@Z @ 144 NONAME ; CSetObjectPropValue::CSetObjectPropValue(class MMTPDataProviderFramework &, class MMTPConnection &, class MMmMtpDpConfig &)
+ ??1CGetObjectPropList@@UAE@XZ @ 145 NONAME ; CGetObjectPropList::~CGetObjectPropList(void)
+ ?CheckRequestL@CGetFormatCapabilities@@MAE?AW4TMTPResponseCode@@XZ @ 146 NONAME ; enum TMTPResponseCode CGetFormatCapabilities::CheckRequestL(void)
+ ??0CRenameObject@@IAE@AAVMMTPDataProviderFramework@@AAVCMmMtpDpMetadataAccessWrapper@@@Z @ 147 NONAME ; CRenameObject::CRenameObject(class MMTPDataProviderFramework &, class CMmMtpDpMetadataAccessWrapper &)
+ ?ServiceL@CGetObjectPropList@@MAEXXZ @ 148 NONAME ; void CGetObjectPropList::ServiceL(void)
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/eabi/mmmtpdprequestprocessoru.def Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/eabi/mmmtpdprequestprocessoru.def Wed Jun 23 17:51:16 2010 +0100
@@ -4,255 +4,262 @@
_ZN10CGetObjectD1Ev @ 3 NONAME
_ZN10CGetObjectD2Ev @ 4 NONAME
_ZN11CCopyObject10ConstructLEv @ 5 NONAME
- _ZN11CCopyObject24ServiceMetaDataToWrapperEtR8MMTPTypeRK18CMTPObjectMetaData @ 6 NONAME
- _ZN11CCopyObject4RunLEv @ 7 NONAME
- _ZN11CCopyObject8RunErrorEi @ 8 NONAME
- _ZN11CCopyObject8ServiceLEv @ 9 NONAME
- _ZN11CCopyObjectC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 10 NONAME
- _ZN11CCopyObjectD0Ev @ 11 NONAME
- _ZN11CCopyObjectD1Ev @ 12 NONAME
- _ZN11CCopyObjectD2Ev @ 13 NONAME
- _ZN11CMoveObject10ConstructLEv @ 14 NONAME
- _ZN11CMoveObject24ServiceMetaDataToWrapperEtR8MMTPTypeRK18CMTPObjectMetaData @ 15 NONAME
- _ZN11CMoveObject4RunLEv @ 16 NONAME
- _ZN11CMoveObject8RunErrorEi @ 17 NONAME
- _ZN11CMoveObject8ServiceLEv @ 18 NONAME
- _ZN11CMoveObjectC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 19 NONAME
- _ZN11CMoveObjectD0Ev @ 20 NONAME
- _ZN11CMoveObjectD1Ev @ 21 NONAME
- _ZN11CMoveObjectD2Ev @ 22 NONAME
- _ZN11CSendObject10ConstructLEv @ 23 NONAME
- _ZN11CSendObject13CheckRequestLEv @ 24 NONAME
- _ZN11CSendObject13UsbDisconnectEv @ 25 NONAME
- _ZN11CSendObject21SetMetaDataToWrapperLEtR8MMTPTypeRK18CMTPObjectMetaData @ 26 NONAME
- _ZN11CSendObject22DoHandleResponsePhaseLEv @ 27 NONAME
- _ZN11CSendObject24DoHandleCompletingPhaseLEv @ 28 NONAME
- _ZN11CSendObject8ServiceLEv @ 29 NONAME
- _ZN11CSendObjectC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 30 NONAME
- _ZN11CSendObjectD0Ev @ 31 NONAME
- _ZN11CSendObjectD1Ev @ 32 NONAME
- _ZN11CSendObjectD2Ev @ 33 NONAME
- _ZN13CDeleteObject4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 34 NONAME
- _ZN13CDeleteObject4RunLEv @ 35 NONAME
- _ZN13CDeleteObject8DoCancelEv @ 36 NONAME
- _ZN13CDeleteObject8ServiceLEv @ 37 NONAME
- _ZN13CDeleteObjectD0Ev @ 38 NONAME
- _ZN13CDeleteObjectD1Ev @ 39 NONAME
- _ZN13CDeleteObjectD2Ev @ 40 NONAME
- _ZN13CRenameObject10ConstructLEv @ 41 NONAME
- _ZN13CRenameObject4NewLER25MMTPDataProviderFrameworkR29CMmMtpDpMetadataAccessWrapper @ 42 NONAME
- _ZN13CRenameObject4RunLEv @ 43 NONAME
- _ZN13CRenameObject6StartLEmRK7TDesC16 @ 44 NONAME
- _ZN13CRenameObject8DoCancelEv @ 45 NONAME
- _ZN13CRenameObject8RunErrorEi @ 46 NONAME
- _ZN13CRenameObjectC1ER25MMTPDataProviderFrameworkR29CMmMtpDpMetadataAccessWrapper @ 47 NONAME
- _ZN13CRenameObjectC2ER25MMTPDataProviderFrameworkR29CMmMtpDpMetadataAccessWrapper @ 48 NONAME
- _ZN13CRenameObjectD0Ev @ 49 NONAME
- _ZN13CRenameObjectD1Ev @ 50 NONAME
- _ZN13CRenameObjectD2Ev @ 51 NONAME
- _ZN14CGetObjectInfo10ConstructLEv @ 52 NONAME
- _ZN14CGetObjectInfo4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 53 NONAME
- _ZN14CGetObjectInfoD0Ev @ 54 NONAME
- _ZN14CGetObjectInfoD1Ev @ 55 NONAME
- _ZN14CGetObjectInfoD2Ev @ 56 NONAME
- _ZN14MmMtpDpUtility12GetDrmStatusERK7TDesC16 @ 57 NONAME
- _ZN14MmMtpDpUtility18FormatFromFilenameERK7TDesC16 @ 58 NONAME
- _ZN14MmMtpDpUtility8IsVideoLERK7TDesC16 @ 59 NONAME
- _ZN15CRequestUnknown4NewLER25MMTPDataProviderFrameworkR14MMTPConnection @ 60 NONAME
- _ZN15CRequestUnknown8ServiceLEv @ 61 NONAME
- _ZN15CRequestUnknownC1ER25MMTPDataProviderFrameworkR14MMTPConnection @ 62 NONAME
- _ZN15CRequestUnknownC2ER25MMTPDataProviderFrameworkR14MMTPConnection @ 63 NONAME
- _ZN15CRequestUnknownD0Ev @ 64 NONAME
- _ZN15CRequestUnknownD1Ev @ 65 NONAME
- _ZN15CRequestUnknownD2Ev @ 66 NONAME
- _ZN17CGetPartialObject13CheckRequestLEv @ 67 NONAME
- _ZN17CGetPartialObject22DoHandleResponsePhaseLEv @ 68 NONAME
- _ZN17CGetPartialObject4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 69 NONAME
- _ZN17CGetPartialObject8ServiceLEv @ 70 NONAME
- _ZN17CGetPartialObjectC1ER25MMTPDataProviderFrameworkR14MMTPConnection @ 71 NONAME
- _ZN17CGetPartialObjectC2ER25MMTPDataProviderFrameworkR14MMTPConnection @ 72 NONAME
- _ZN17CGetPartialObjectD0Ev @ 73 NONAME
- _ZN17CGetPartialObjectD1Ev @ 74 NONAME
- _ZN17CGetPartialObjectD2Ev @ 75 NONAME
- _ZN17CRequestProcessor12HandleEventLERK13TMTPTypeEvent @ 76 NONAME
- _ZN17CRequestProcessor12ReceiveDataLER8MMTPType @ 77 NONAME
- _ZN17CRequestProcessor13CheckRequestLEv @ 78 NONAME
- _ZN17CRequestProcessor13SendResponseLE16TMTPResponseCodeiPm @ 79 NONAME
- _ZN17CRequestProcessor13UsbDisconnectEv @ 80 NONAME
- _ZN17CRequestProcessor14HandleRequestLERK15TMTPTypeRequest20TMTPTransactionPhase @ 81 NONAME
- _ZN17CRequestProcessor18DoHandleRToIPhaseLEv @ 82 NONAME
- _ZN17CRequestProcessor21DoHandleRequestPhaseLEv @ 83 NONAME
- _ZN17CRequestProcessor22DoHandleDataIToRPhaseLEv @ 84 NONAME
- _ZN17CRequestProcessor22DoHandleResponsePhaseLEv @ 85 NONAME
- _ZN17CRequestProcessor24DoHandleCompletingPhaseLEv @ 86 NONAME
- _ZN17CRequestProcessor4RunLEv @ 87 NONAME
- _ZN17CRequestProcessor7ReleaseEv @ 88 NONAME
- _ZN17CRequestProcessor8DoCancelEv @ 89 NONAME
- _ZN17CRequestProcessor8RunErrorEi @ 90 NONAME
- _ZN17CRequestProcessor9SendDataLERK8MMTPType @ 91 NONAME
- _ZN17CRequestProcessor9SessionIdEv @ 92 NONAME
- _ZN17CRequestProcessorC2ER25MMTPDataProviderFrameworkR14MMTPConnectioniPK22TMTPRequestElementInfo @ 93 NONAME
- _ZN17CRequestProcessorD0Ev @ 94 NONAME
- _ZN17CRequestProcessorD1Ev @ 95 NONAME
- _ZN17CRequestProcessorD2Ev @ 96 NONAME
- _ZN18CGetObjectPropDesc10ConstructLEv @ 97 NONAME
- _ZN18CGetObjectPropDesc13CheckRequestLEv @ 98 NONAME
- _ZN18CGetObjectPropDesc8ServiceLEv @ 99 NONAME
- _ZN18CGetObjectPropDescC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 100 NONAME
- _ZN18CGetObjectPropDescD0Ev @ 101 NONAME
- _ZN18CGetObjectPropDescD1Ev @ 102 NONAME
- _ZN18CGetObjectPropDescD2Ev @ 103 NONAME
- _ZN18CGetObjectPropList10ConstructLEv @ 104 NONAME
- _ZN18CGetObjectPropList13CheckRequestLEv @ 105 NONAME
- _ZN18CGetObjectPropList4RunLEv @ 106 NONAME
- _ZN18CGetObjectPropList8DoCancelEv @ 107 NONAME
- _ZN18CGetObjectPropList8RunErrorEi @ 108 NONAME
- _ZN18CGetObjectPropList8ServiceLEv @ 109 NONAME
- _ZN18CGetObjectPropListC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 110 NONAME
- _ZN18CGetObjectPropListD0Ev @ 111 NONAME
- _ZN18CGetObjectPropListD1Ev @ 112 NONAME
- _ZN18CGetObjectPropListD2Ev @ 113 NONAME
- _ZN18CSetObjectPropList10ConstructLEv @ 114 NONAME
- _ZN18CSetObjectPropList22DoHandleResponsePhaseLEv @ 115 NONAME
- _ZN18CSetObjectPropList25ServiceMetaDataToWrapperLEtR8MMTPTypeRK18CMTPObjectMetaData @ 116 NONAME
- _ZN18CSetObjectPropList4RunLEv @ 117 NONAME
- _ZN18CSetObjectPropList8DoCancelEv @ 118 NONAME
- _ZN18CSetObjectPropList8RunErrorEi @ 119 NONAME
- _ZN18CSetObjectPropList8ServiceLEv @ 120 NONAME
- _ZN18CSetObjectPropListC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 121 NONAME
- _ZN18CSetObjectPropListD0Ev @ 122 NONAME
- _ZN18CSetObjectPropListD1Ev @ 123 NONAME
- _ZN18CSetObjectPropListD2Ev @ 124 NONAME
- _ZN19CGetObjectPropValue13CheckRequestLEv @ 125 NONAME
- _ZN19CGetObjectPropValue27ServiceMetaDataFromWrapperLEtR8MMTPTypeRK18CMTPObjectMetaData @ 126 NONAME
- _ZN19CGetObjectPropValue8ServiceLEv @ 127 NONAME
- _ZN19CGetObjectPropValueC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 128 NONAME
- _ZN19CGetObjectPropValueD0Ev @ 129 NONAME
- _ZN19CGetObjectPropValueD1Ev @ 130 NONAME
- _ZN19CGetObjectPropValueD2Ev @ 131 NONAME
- _ZN19CSetObjectPropValue13CheckRequestLEv @ 132 NONAME
- _ZN19CSetObjectPropValue22DoHandleResponsePhaseLEv @ 133 NONAME
- _ZN19CSetObjectPropValue25ServiceMetaDataToWrapperLEtR8MMTPTypeRK18CMTPObjectMetaData @ 134 NONAME
- _ZN19CSetObjectPropValue8ServiceLEv @ 135 NONAME
- _ZN19CSetObjectPropValueC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 136 NONAME
- _ZN19CSetObjectPropValueD0Ev @ 137 NONAME
- _ZN19CSetObjectPropValueD1Ev @ 138 NONAME
- _ZN19CSetObjectPropValueD2Ev @ 139 NONAME
- _ZN20CGetObjectReferences4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 140 NONAME
- _ZN20CGetObjectReferencesD0Ev @ 141 NONAME
- _ZN20CGetObjectReferencesD1Ev @ 142 NONAME
- _ZN20CGetObjectReferencesD2Ev @ 143 NONAME
- _ZN20CSetObjectReferences22DoHandleResponsePhaseLEv @ 144 NONAME
- _ZN20CSetObjectReferences22DoSetObjectReferencesLER29CMmMtpDpMetadataAccessWrappertRK7TDesC16R12CDesC16Array @ 145 NONAME
- _ZN20CSetObjectReferences4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 146 NONAME
- _ZN20CSetObjectReferences8ServiceLEv @ 147 NONAME
- _ZN20CSetObjectReferencesC1ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 148 NONAME
- _ZN20CSetObjectReferencesC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 149 NONAME
- _ZN20CSetObjectReferencesD0Ev @ 150 NONAME
- _ZN20CSetObjectReferencesD1Ev @ 151 NONAME
- _ZN20CSetObjectReferencesD2Ev @ 152 NONAME
- _ZN22CGetFormatCapabilities10ConstructLEv @ 153 NONAME
- _ZN22CGetFormatCapabilities13CheckRequestLEv @ 154 NONAME
- _ZN22CGetFormatCapabilities8ServiceLEv @ 155 NONAME
- _ZN22CGetFormatCapabilitiesC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 156 NONAME
- _ZN22CGetFormatCapabilitiesD0Ev @ 157 NONAME
- _ZN22CGetFormatCapabilitiesD1Ev @ 158 NONAME
- _ZN22CGetFormatCapabilitiesD2Ev @ 159 NONAME
- _ZN23CMmMtpDpAccessSingleton12OpenSessionLEv @ 160 NONAME
- _ZN23CMmMtpDpAccessSingleton13CloseSessionLEv @ 161 NONAME
- _ZN23CMmMtpDpAccessSingleton17GetAccessWrapperLEv @ 162 NONAME
- _ZN23CMmMtpDpAccessSingleton7CreateLER3RFsR25MMTPDataProviderFramework @ 163 NONAME
- _ZN23CMmMtpDpAccessSingleton7ReleaseEv @ 164 NONAME
- _ZN24CGetObjectPropsSupported4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 165 NONAME
- _ZN24CGetObjectPropsSupported8ServiceLEv @ 166 NONAME
- _ZN24CGetObjectPropsSupportedD0Ev @ 167 NONAME
- _ZN24CGetObjectPropsSupportedD1Ev @ 168 NONAME
- _ZN24CGetObjectPropsSupportedD2Ev @ 169 NONAME
- _ZN29CMmMtpDpMetadataAccessWrapper12SetPlaylistLERK7TDesC16R12CDesC16Array @ 170 NONAME
+ _ZN11CCopyObject8ServiceLEv @ 6 NONAME
+ _ZN11CCopyObjectC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 7 NONAME
+ _ZN11CCopyObjectD0Ev @ 8 NONAME
+ _ZN11CCopyObjectD1Ev @ 9 NONAME
+ _ZN11CCopyObjectD2Ev @ 10 NONAME
+ _ZN11CMoveObject10ConstructLEv @ 11 NONAME
+ _ZN11CMoveObject8ServiceLEv @ 12 NONAME
+ _ZN11CMoveObjectC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 13 NONAME
+ _ZN11CMoveObjectD0Ev @ 14 NONAME
+ _ZN11CMoveObjectD1Ev @ 15 NONAME
+ _ZN11CMoveObjectD2Ev @ 16 NONAME
+ _ZN11CSendObject13CheckRequestLEv @ 17 NONAME
+ _ZN11CSendObject13UsbDisconnectEv @ 18 NONAME
+ _ZN11CSendObject22DoHandleResponsePhaseLEv @ 19 NONAME
+ _ZN11CSendObject24DoHandleCompletingPhaseLEv @ 20 NONAME
+ _ZN11CSendObject4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 21 NONAME
+ _ZN11CSendObject8ServiceLEv @ 22 NONAME
+ _ZN11CSendObjectD0Ev @ 23 NONAME
+ _ZN11CSendObjectD1Ev @ 24 NONAME
+ _ZN11CSendObjectD2Ev @ 25 NONAME
+ _ZN13CDeleteObject4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 26 NONAME
+ _ZN13CDeleteObject4RunLEv @ 27 NONAME
+ _ZN13CDeleteObject8DoCancelEv @ 28 NONAME
+ _ZN13CDeleteObject8ServiceLEv @ 29 NONAME
+ _ZN13CDeleteObjectD0Ev @ 30 NONAME
+ _ZN13CDeleteObjectD1Ev @ 31 NONAME
+ _ZN13CDeleteObjectD2Ev @ 32 NONAME
+ _ZN13CRenameObject10ConstructLEv @ 33 NONAME
+ _ZN13CRenameObject4NewLER25MMTPDataProviderFrameworkR29CMmMtpDpMetadataAccessWrapper @ 34 NONAME
+ _ZN13CRenameObject4RunLEv @ 35 NONAME
+ _ZN13CRenameObject6StartLEmRK7TDesC16 @ 36 NONAME
+ _ZN13CRenameObject8DoCancelEv @ 37 NONAME
+ _ZN13CRenameObject8RunErrorEi @ 38 NONAME
+ _ZN13CRenameObjectC1ER25MMTPDataProviderFrameworkR29CMmMtpDpMetadataAccessWrapper @ 39 NONAME
+ _ZN13CRenameObjectC2ER25MMTPDataProviderFrameworkR29CMmMtpDpMetadataAccessWrapper @ 40 NONAME
+ _ZN13CRenameObjectD0Ev @ 41 NONAME
+ _ZN13CRenameObjectD1Ev @ 42 NONAME
+ _ZN13CRenameObjectD2Ev @ 43 NONAME
+ _ZN14CGetObjectInfo10ConstructLEv @ 44 NONAME
+ _ZN14CGetObjectInfo4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 45 NONAME
+ _ZN14CGetObjectInfoD0Ev @ 46 NONAME
+ _ZN14CGetObjectInfoD1Ev @ 47 NONAME
+ _ZN14CGetObjectInfoD2Ev @ 48 NONAME
+ _ZN14MmMtpDpUtility11SetPSStatusE12TMtpPSStatus @ 49 NONAME
+ _ZN14MmMtpDpUtility12GetDrmStatusERK7TDesC16 @ 50 NONAME
+ _ZN14MmMtpDpUtility18FormatFromFilenameERK7TDesC16 @ 51 NONAME
+ _ZN15CRequestUnknown4NewLER25MMTPDataProviderFrameworkR14MMTPConnection @ 52 NONAME
+ _ZN15CRequestUnknown8ServiceLEv @ 53 NONAME
+ _ZN15CRequestUnknownD0Ev @ 54 NONAME
+ _ZN15CRequestUnknownD1Ev @ 55 NONAME
+ _ZN15CRequestUnknownD2Ev @ 56 NONAME
+ _ZN17CGetPartialObject13CheckRequestLEv @ 57 NONAME
+ _ZN17CGetPartialObject22DoHandleResponsePhaseLEv @ 58 NONAME
+ _ZN17CGetPartialObject4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 59 NONAME
+ _ZN17CGetPartialObject8ServiceLEv @ 60 NONAME
+ _ZN17CGetPartialObjectD0Ev @ 61 NONAME
+ _ZN17CGetPartialObjectD1Ev @ 62 NONAME
+ _ZN17CGetPartialObjectD2Ev @ 63 NONAME
+ _ZN17CRequestProcessor12HandleEventLERK13TMTPTypeEvent @ 64 NONAME
+ _ZN17CRequestProcessor12ReceiveDataLER8MMTPType @ 65 NONAME
+ _ZN17CRequestProcessor13CheckRequestLEv @ 66 NONAME
+ _ZN17CRequestProcessor13SendResponseLE16TMTPResponseCodeiPm @ 67 NONAME
+ _ZN17CRequestProcessor13UsbDisconnectEv @ 68 NONAME
+ _ZN17CRequestProcessor14HandleRequestLERK15TMTPTypeRequest20TMTPTransactionPhase @ 69 NONAME
+ _ZN17CRequestProcessor18DoHandleRToIPhaseLEv @ 70 NONAME
+ _ZN17CRequestProcessor21DoHandleRequestPhaseLEv @ 71 NONAME
+ _ZN17CRequestProcessor22DoHandleDataIToRPhaseLEv @ 72 NONAME
+ _ZN17CRequestProcessor22DoHandleResponsePhaseLEv @ 73 NONAME
+ _ZN17CRequestProcessor24DoHandleCompletingPhaseLEv @ 74 NONAME
+ _ZN17CRequestProcessor4RunLEv @ 75 NONAME
+ _ZN17CRequestProcessor7ReleaseEv @ 76 NONAME
+ _ZN17CRequestProcessor8DoCancelEv @ 77 NONAME
+ _ZN17CRequestProcessor8RunErrorEi @ 78 NONAME
+ _ZN17CRequestProcessor9SendDataLERK8MMTPType @ 79 NONAME
+ _ZN17CRequestProcessor9SessionIdEv @ 80 NONAME
+ _ZN17CRequestProcessorC2ER25MMTPDataProviderFrameworkR14MMTPConnectioniPK22TMTPRequestElementInfo @ 81 NONAME
+ _ZN17CRequestProcessorD0Ev @ 82 NONAME
+ _ZN17CRequestProcessorD1Ev @ 83 NONAME
+ _ZN17CRequestProcessorD2Ev @ 84 NONAME
+ _ZN18CGetObjectPropDesc13CheckRequestLEv @ 85 NONAME
+ _ZN18CGetObjectPropDesc4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 86 NONAME
+ _ZN18CGetObjectPropDesc8ServiceLEv @ 87 NONAME
+ _ZN18CGetObjectPropDescD0Ev @ 88 NONAME
+ _ZN18CGetObjectPropDescD1Ev @ 89 NONAME
+ _ZN18CGetObjectPropDescD2Ev @ 90 NONAME
+ _ZN18CGetObjectPropList10ConstructLEv @ 91 NONAME
+ _ZN18CGetObjectPropList13CheckRequestLEv @ 92 NONAME
+ _ZN18CGetObjectPropList4RunLEv @ 93 NONAME
+ _ZN18CGetObjectPropList8DoCancelEv @ 94 NONAME
+ _ZN18CGetObjectPropList8RunErrorEi @ 95 NONAME
+ _ZN18CGetObjectPropList8ServiceLEv @ 96 NONAME
+ _ZN18CGetObjectPropListC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 97 NONAME
+ _ZN18CGetObjectPropListD0Ev @ 98 NONAME
+ _ZN18CGetObjectPropListD1Ev @ 99 NONAME
+ _ZN18CGetObjectPropListD2Ev @ 100 NONAME
+ _ZN18CSetObjectPropList13CheckRequestLEv @ 101 NONAME
+ _ZN18CSetObjectPropList22DoHandleResponsePhaseLEv @ 102 NONAME
+ _ZN18CSetObjectPropList4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 103 NONAME
+ _ZN18CSetObjectPropList4RunLEv @ 104 NONAME
+ _ZN18CSetObjectPropList8DoCancelEv @ 105 NONAME
+ _ZN18CSetObjectPropList8RunErrorEi @ 106 NONAME
+ _ZN18CSetObjectPropList8ServiceLEv @ 107 NONAME
+ _ZN18CSetObjectPropListD0Ev @ 108 NONAME
+ _ZN18CSetObjectPropListD1Ev @ 109 NONAME
+ _ZN18CSetObjectPropListD2Ev @ 110 NONAME
+ _ZN19CDescriptionUtility24NewRangeFormDescriptionLEtmmmi @ 111 NONAME
+ _ZN19CDescriptionUtilityC2Ev @ 112 NONAME
+ _ZN19CDescriptionUtilityD0Ev @ 113 NONAME
+ _ZN19CDescriptionUtilityD1Ev @ 114 NONAME
+ _ZN19CDescriptionUtilityD2Ev @ 115 NONAME
+ _ZN19CGetObjectPropValue13CheckRequestLEv @ 116 NONAME
+ _ZN19CGetObjectPropValue27ServiceMetaDataFromWrapperLEtR8MMTPTypeRK18CMTPObjectMetaData @ 117 NONAME
+ _ZN19CGetObjectPropValue8ServiceLEv @ 118 NONAME
+ _ZN19CGetObjectPropValueC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 119 NONAME
+ _ZN19CGetObjectPropValueD0Ev @ 120 NONAME
+ _ZN19CGetObjectPropValueD1Ev @ 121 NONAME
+ _ZN19CGetObjectPropValueD2Ev @ 122 NONAME
+ _ZN19CSetObjectPropValue13CheckRequestLEv @ 123 NONAME
+ _ZN19CSetObjectPropValue22DoHandleResponsePhaseLEv @ 124 NONAME
+ _ZN19CSetObjectPropValue25ServiceMetaDataToWrapperLEtR8MMTPTypeRK18CMTPObjectMetaData @ 125 NONAME
+ _ZN19CSetObjectPropValue8ServiceLEv @ 126 NONAME
+ _ZN19CSetObjectPropValueC2ER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 127 NONAME
+ _ZN19CSetObjectPropValueD0Ev @ 128 NONAME
+ _ZN19CSetObjectPropValueD1Ev @ 129 NONAME
+ _ZN19CSetObjectPropValueD2Ev @ 130 NONAME
+ _ZN20CGetObjectReferences4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 131 NONAME
+ _ZN20CGetObjectReferencesD0Ev @ 132 NONAME
+ _ZN20CGetObjectReferencesD1Ev @ 133 NONAME
+ _ZN20CGetObjectReferencesD2Ev @ 134 NONAME
+ _ZN20CSetObjectReferences22DoHandleResponsePhaseLEv @ 135 NONAME
+ _ZN20CSetObjectReferences4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 136 NONAME
+ _ZN20CSetObjectReferences8ServiceLEv @ 137 NONAME
+ _ZN20CSetObjectReferencesD0Ev @ 138 NONAME
+ _ZN20CSetObjectReferencesD1Ev @ 139 NONAME
+ _ZN20CSetObjectReferencesD2Ev @ 140 NONAME
+ _ZN22CGetFormatCapabilities13CheckRequestLEv @ 141 NONAME
+ _ZN22CGetFormatCapabilities4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 142 NONAME
+ _ZN22CGetFormatCapabilities8ServiceLEv @ 143 NONAME
+ _ZN22CGetFormatCapabilitiesD0Ev @ 144 NONAME
+ _ZN22CGetFormatCapabilitiesD1Ev @ 145 NONAME
+ _ZN22CGetFormatCapabilitiesD2Ev @ 146 NONAME
+ _ZN23CMmMtpDpAccessSingleton12OpenSessionLEv @ 147 NONAME
+ _ZN23CMmMtpDpAccessSingleton13CloseSessionLEv @ 148 NONAME
+ _ZN23CMmMtpDpAccessSingleton17GetAccessWrapperLEv @ 149 NONAME
+ _ZN23CMmMtpDpAccessSingleton24ActiveToIdleStatusChangeEv @ 150 NONAME
+ _ZN23CMmMtpDpAccessSingleton30CancelActiveToIdleStatusChangeEv @ 151 NONAME
+ _ZN23CMmMtpDpAccessSingleton7CreateLER25MMTPDataProviderFramework @ 152 NONAME
+ _ZN23CMmMtpDpAccessSingleton7ReleaseEv @ 153 NONAME
+ _ZN23CPropertySettingUtility20SetMetaDataToWrapperER14MMmMtpDpConfigtR8MMTPTypeRK18CMTPObjectMetaData @ 154 NONAME
+ _ZN23CPropertySettingUtilityC2Ev @ 155 NONAME
+ _ZN23CPropertySettingUtilityD0Ev @ 156 NONAME
+ _ZN23CPropertySettingUtilityD1Ev @ 157 NONAME
+ _ZN23CPropertySettingUtilityD2Ev @ 158 NONAME
+ _ZN24CGetObjectPropsSupported4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 159 NONAME
+ _ZN24CGetObjectPropsSupported8ServiceLEv @ 160 NONAME
+ _ZN24CGetObjectPropsSupportedD0Ev @ 161 NONAME
+ _ZN24CGetObjectPropsSupportedD1Ev @ 162 NONAME
+ _ZN24CGetObjectPropsSupportedD2Ev @ 163 NONAME
+ _ZN26CGetInterdependentPropDesc13CheckRequestLEv @ 164 NONAME
+ _ZN26CGetInterdependentPropDesc4NewLER25MMTPDataProviderFrameworkR14MMTPConnectionR14MMmMtpDpConfig @ 165 NONAME
+ _ZN26CGetInterdependentPropDesc8ServiceLEv @ 166 NONAME
+ _ZN26CGetInterdependentPropDescD0Ev @ 167 NONAME
+ _ZN26CGetInterdependentPropDescD1Ev @ 168 NONAME
+ _ZN26CGetInterdependentPropDescD2Ev @ 169 NONAME
+ _ZN29CMmMtpDpMetadataAccessWrapper10AddObjectLERK18CMTPObjectMetaData @ 170 NONAME
_ZN29CMmMtpDpMetadataAccessWrapper13AddDummyFileLERK7TDesC16 @ 171 NONAME
- _ZN29CMmMtpDpMetadataAccessWrapper13RenameObjectLERK7TDesC16S2_ @ 172 NONAME
- _ZN29CMmMtpDpMetadataAccessWrapper15CreateDummyFileERK7TDesC16 @ 173 NONAME
- _ZN29CMmMtpDpMetadataAccessWrapper15DeleteDummyFileERK7TDesC16 @ 174 NONAME
- _ZN29CMmMtpDpMetadataAccessWrapper15GetAllPlaylistLERK7TDesC16PP14CMPXMediaArray @ 175 NONAME
- _ZN29CMmMtpDpMetadataAccessWrapper16CleanupDatabaseLEv @ 176 NONAME
- _ZN29CMmMtpDpMetadataAccessWrapper16GetAllReferenceLEP9CMPXMediaR12CDesC16Array @ 177 NONAME
- _ZN29CMmMtpDpMetadataAccessWrapper16GetPlaylistNameLEP9CMPXMediaR6TDes16 @ 178 NONAME
+ _ZN29CMmMtpDpMetadataAccessWrapper13DeleteObjectLERK18CMTPObjectMetaData @ 172 NONAME
+ _ZN29CMmMtpDpMetadataAccessWrapper13RenameObjectLERK18CMTPObjectMetaDataRK7TDesC16 @ 173 NONAME
+ _ZN29CMmMtpDpMetadataAccessWrapper13SetReferenceLERK18CMTPObjectMetaDataR12CDesC16Array @ 174 NONAME
+ _ZN29CMmMtpDpMetadataAccessWrapper15CreateDummyFileERK7TDesC16 @ 175 NONAME
+ _ZN29CMmMtpDpMetadataAccessWrapper15DeleteDummyFileERK7TDesC16 @ 176 NONAME
+ _ZN29CMmMtpDpMetadataAccessWrapper16CleanupDatabaseLEv @ 177 NONAME
+ _ZN29CMmMtpDpMetadataAccessWrapper16GetAllReferenceLERK18CMTPObjectMetaDataR12CDesC16Array @ 178 NONAME
_ZN29CMmMtpDpMetadataAccessWrapper19GetModifiedContentLERK7TDesC16RiR12CDesC16Array @ 179 NONAME
- _ZN29CMmMtpDpMetadataAccessWrapper22UpdateMusicCollectionLEv @ 180 NONAME
- _ZN29CMmMtpDpMetadataAccessWrapper23GetObjectMetadataValueLEtR8MMTPTypeRK18CMTPObjectMetaData @ 181 NONAME
- _ZNK11CSendObject12HasDataphaseEv @ 182 NONAME
- _ZNK11CSendObject5MatchERK15TMTPTypeRequestR14MMTPConnection @ 183 NONAME
- _ZNK15CRequestUnknown5MatchERK15TMTPTypeRequestR14MMTPConnection @ 184 NONAME
- _ZNK17CRequestProcessor10ConnectionEv @ 185 NONAME
- _ZNK17CRequestProcessor12HasDataphaseEv @ 186 NONAME
- _ZNK17CRequestProcessor5MatchERK13TMTPTypeEventR14MMTPConnection @ 187 NONAME
- _ZNK17CRequestProcessor5MatchERK15TMTPTypeRequestR14MMTPConnection @ 188 NONAME
- _ZNK17CRequestProcessor7RequestEv @ 189 NONAME
- _ZNK18CSetObjectPropList12HasDataphaseEv @ 190 NONAME
- _ZNK19CSetObjectPropValue12HasDataphaseEv @ 191 NONAME
- _ZNK20CSetObjectReferences12HasDataphaseEv @ 192 NONAME
- _ZTI10CGetObject @ 193 NONAME
- _ZTI11CCopyObject @ 194 NONAME
- _ZTI11CMoveObject @ 195 NONAME
- _ZTI11CSendObject @ 196 NONAME
- _ZTI13CDeleteObject @ 197 NONAME
- _ZTI13CRenameObject @ 198 NONAME
- _ZTI14CGetObjectInfo @ 199 NONAME
- _ZTI15CRequestChecker @ 200 NONAME
- _ZTI15CRequestUnknown @ 201 NONAME
- _ZTI15TMTPTypeFlatBuf @ 202 NONAME
- _ZTI17CGetPartialObject @ 203 NONAME
- _ZTI17CRequestProcessor @ 204 NONAME
- _ZTI18CGetObjectPropDesc @ 205 NONAME
- _ZTI18CGetObjectPropList @ 206 NONAME
- _ZTI18CHXMetaDataUtility @ 207 NONAME
- _ZTI18CSetObjectPropList @ 208 NONAME
- _ZTI19CGetObjectPropValue @ 209 NONAME
- _ZTI19CSetObjectPropValue @ 210 NONAME
- _ZTI20CGetObjectReferences @ 211 NONAME
- _ZTI20CSetObjectReferences @ 212 NONAME
- _ZTI22CGetFormatCapabilities @ 213 NONAME
- _ZTI23CMmMtpDpAccessSingleton @ 214 NONAME
- _ZTI24CGetObjectPropsSupported @ 215 NONAME
- _ZTI25CMmMtpDpMetadataMpxAccess @ 216 NONAME
- _ZTI27CMmMtpDpMetadataVideoAccess @ 217 NONAME
- _ZTI29CMmMtpDpMetadataAccessWrapper @ 218 NONAME
- _ZTV10CGetObject @ 219 NONAME
- _ZTV11CCopyObject @ 220 NONAME
- _ZTV11CMoveObject @ 221 NONAME
- _ZTV11CSendObject @ 222 NONAME
- _ZTV13CDeleteObject @ 223 NONAME
- _ZTV13CRenameObject @ 224 NONAME
- _ZTV14CGetObjectInfo @ 225 NONAME
- _ZTV15CRequestChecker @ 226 NONAME
- _ZTV15CRequestUnknown @ 227 NONAME
- _ZTV15TMTPTypeFlatBuf @ 228 NONAME
- _ZTV17CGetPartialObject @ 229 NONAME
- _ZTV17CRequestProcessor @ 230 NONAME
- _ZTV18CGetObjectPropDesc @ 231 NONAME
- _ZTV18CGetObjectPropList @ 232 NONAME
- _ZTV18CHXMetaDataUtility @ 233 NONAME
- _ZTV18CSetObjectPropList @ 234 NONAME
- _ZTV19CGetObjectPropValue @ 235 NONAME
- _ZTV19CSetObjectPropValue @ 236 NONAME
- _ZTV20CGetObjectReferences @ 237 NONAME
- _ZTV20CSetObjectReferences @ 238 NONAME
- _ZTV22CGetFormatCapabilities @ 239 NONAME
- _ZTV23CMmMtpDpAccessSingleton @ 240 NONAME
- _ZTV24CGetObjectPropsSupported @ 241 NONAME
- _ZTV25CMmMtpDpMetadataMpxAccess @ 242 NONAME
- _ZTV27CMmMtpDpMetadataVideoAccess @ 243 NONAME
- _ZTV29CMmMtpDpMetadataAccessWrapper @ 244 NONAME
- _ZThn28_N11CSendObject13UsbDisconnectEv @ 245 NONAME
- _ZThn28_N17CRequestProcessor12HandleEventLERK13TMTPTypeEvent @ 246 NONAME
- _ZThn28_N17CRequestProcessor13UsbDisconnectEv @ 247 NONAME
- _ZThn28_N17CRequestProcessor14HandleRequestLERK15TMTPTypeRequest20TMTPTransactionPhase @ 248 NONAME
- _ZThn28_N17CRequestProcessor7ReleaseEv @ 249 NONAME
- _ZThn28_N17CRequestProcessor9SessionIdEv @ 250 NONAME
- _ZThn28_NK11CSendObject5MatchERK15TMTPTypeRequestR14MMTPConnection @ 251 NONAME
- _ZThn28_NK15CRequestUnknown5MatchERK15TMTPTypeRequestR14MMTPConnection @ 252 NONAME
- _ZThn28_NK17CRequestProcessor10ConnectionEv @ 253 NONAME
- _ZThn28_NK17CRequestProcessor5MatchERK13TMTPTypeEventR14MMTPConnection @ 254 NONAME
- _ZThn28_NK17CRequestProcessor5MatchERK15TMTPTypeRequestR14MMTPConnection @ 255 NONAME
- _ZThn28_NK17CRequestProcessor7RequestEv @ 256 NONAME
+ _ZN29CMmMtpDpMetadataAccessWrapper20GetAllAbstractMediaLERK7TDesC16R12CDesC16Array19TMPXGeneralCategory @ 180 NONAME
+ _ZN29CMmMtpDpMetadataAccessWrapper22UpdateMusicCollectionLERK7TDesC16 @ 181 NONAME
+ _ZN29CMmMtpDpMetadataAccessWrapper23GetObjectMetadataValueLEtR8MMTPTypeRK18CMTPObjectMetaData @ 182 NONAME
+ _ZNK11CSendObject12HasDataphaseEv @ 183 NONAME
+ _ZNK11CSendObject5MatchERK15TMTPTypeRequestR14MMTPConnection @ 184 NONAME
+ _ZNK15CRequestUnknown5MatchERK15TMTPTypeRequestR14MMTPConnection @ 185 NONAME
+ _ZNK17CRequestProcessor10ConnectionEv @ 186 NONAME
+ _ZNK17CRequestProcessor12HasDataphaseEv @ 187 NONAME
+ _ZNK17CRequestProcessor5MatchERK13TMTPTypeEventR14MMTPConnection @ 188 NONAME
+ _ZNK17CRequestProcessor5MatchERK15TMTPTypeRequestR14MMTPConnection @ 189 NONAME
+ _ZNK17CRequestProcessor7RequestEv @ 190 NONAME
+ _ZNK18CSetObjectPropList12HasDataphaseEv @ 191 NONAME
+ _ZNK19CSetObjectPropValue12HasDataphaseEv @ 192 NONAME
+ _ZNK20CSetObjectReferences12HasDataphaseEv @ 193 NONAME
+ _ZTI10CGetObject @ 194 NONAME
+ _ZTI11CCopyObject @ 195 NONAME
+ _ZTI11CMoveObject @ 196 NONAME
+ _ZTI11CSendObject @ 197 NONAME
+ _ZTI13CDeleteObject @ 198 NONAME
+ _ZTI13CRenameObject @ 199 NONAME
+ _ZTI14CGetObjectInfo @ 200 NONAME
+ _ZTI15CRequestChecker @ 201 NONAME
+ _ZTI15CRequestUnknown @ 202 NONAME
+ _ZTI15TMTPTypeFlatBuf @ 203 NONAME
+ _ZTI17CGetPartialObject @ 204 NONAME
+ _ZTI17CRequestProcessor @ 205 NONAME
+ _ZTI18CGetObjectPropDesc @ 206 NONAME
+ _ZTI18CGetObjectPropList @ 207 NONAME
+ _ZTI18CHXMetaDataUtility @ 208 NONAME
+ _ZTI18CSetObjectPropList @ 209 NONAME
+ _ZTI19CDescriptionUtility @ 210 NONAME
+ _ZTI19CGetObjectPropValue @ 211 NONAME
+ _ZTI19CSetObjectPropValue @ 212 NONAME
+ _ZTI20CGetObjectReferences @ 213 NONAME
+ _ZTI20CSetObjectReferences @ 214 NONAME
+ _ZTI22CGetFormatCapabilities @ 215 NONAME
+ _ZTI23CMmMtpDpAccessSingleton @ 216 NONAME
+ _ZTI23CPropertySettingUtility @ 217 NONAME
+ _ZTI24CGetObjectPropsSupported @ 218 NONAME
+ _ZTI25CMmMtpDpMetadataMpxAccess @ 219 NONAME
+ _ZTI26CGetInterdependentPropDesc @ 220 NONAME
+ _ZTI27CMmMtpDpMetadataVideoAccess @ 221 NONAME
+ _ZTI29CMmMtpDpMetadataAccessWrapper @ 222 NONAME
+ _ZTV10CGetObject @ 223 NONAME
+ _ZTV11CCopyObject @ 224 NONAME
+ _ZTV11CMoveObject @ 225 NONAME
+ _ZTV11CSendObject @ 226 NONAME
+ _ZTV13CDeleteObject @ 227 NONAME
+ _ZTV13CRenameObject @ 228 NONAME
+ _ZTV14CGetObjectInfo @ 229 NONAME
+ _ZTV15CRequestChecker @ 230 NONAME
+ _ZTV15CRequestUnknown @ 231 NONAME
+ _ZTV15TMTPTypeFlatBuf @ 232 NONAME
+ _ZTV17CGetPartialObject @ 233 NONAME
+ _ZTV17CRequestProcessor @ 234 NONAME
+ _ZTV18CGetObjectPropDesc @ 235 NONAME
+ _ZTV18CGetObjectPropList @ 236 NONAME
+ _ZTV18CHXMetaDataUtility @ 237 NONAME
+ _ZTV18CSetObjectPropList @ 238 NONAME
+ _ZTV19CDescriptionUtility @ 239 NONAME
+ _ZTV19CGetObjectPropValue @ 240 NONAME
+ _ZTV19CSetObjectPropValue @ 241 NONAME
+ _ZTV20CGetObjectReferences @ 242 NONAME
+ _ZTV20CSetObjectReferences @ 243 NONAME
+ _ZTV22CGetFormatCapabilities @ 244 NONAME
+ _ZTV23CMmMtpDpAccessSingleton @ 245 NONAME
+ _ZTV23CPropertySettingUtility @ 246 NONAME
+ _ZTV24CGetObjectPropsSupported @ 247 NONAME
+ _ZTV25CMmMtpDpMetadataMpxAccess @ 248 NONAME
+ _ZTV26CGetInterdependentPropDesc @ 249 NONAME
+ _ZTV27CMmMtpDpMetadataVideoAccess @ 250 NONAME
+ _ZTV29CMmMtpDpMetadataAccessWrapper @ 251 NONAME
+ _ZThn28_N11CSendObject13UsbDisconnectEv @ 252 NONAME
+ _ZThn28_N17CRequestProcessor12HandleEventLERK13TMTPTypeEvent @ 253 NONAME
+ _ZThn28_N17CRequestProcessor13UsbDisconnectEv @ 254 NONAME
+ _ZThn28_N17CRequestProcessor14HandleRequestLERK15TMTPTypeRequest20TMTPTransactionPhase @ 255 NONAME
+ _ZThn28_N17CRequestProcessor7ReleaseEv @ 256 NONAME
+ _ZThn28_N17CRequestProcessor9SessionIdEv @ 257 NONAME
+ _ZThn28_NK11CSendObject5MatchERK15TMTPTypeRequestR14MMTPConnection @ 258 NONAME
+ _ZThn28_NK15CRequestUnknown5MatchERK15TMTPTypeRequestR14MMTPConnection @ 259 NONAME
+ _ZThn28_NK17CRequestProcessor10ConnectionEv @ 260 NONAME
+ _ZThn28_NK17CRequestProcessor5MatchERK13TMTPTypeEventR14MMTPConnection @ 261 NONAME
+ _ZThn28_NK17CRequestProcessor5MatchERK15TMTPTypeRequestR14MMTPConnection @ 262 NONAME
+ _ZThn28_NK17CRequestProcessor7RequestEv @ 263 NONAME
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/group/mmmtpdprequestprocessor.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/group/mmmtpdprequestprocessor.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -54,6 +54,9 @@
SOURCE cmoveobject.cpp
SOURCE crenameobject.cpp
SOURCE cgetformatcapabilities.cpp
+SOURCE cgetinterdependentpropdesc.cpp
+SOURCE cdescriptionutility.cpp
+SOURCE cpropertysettingutility.cpp
SOURCEPATH ../../src
SOURCE cmmmtpdpmetadatampxaccess.cpp
@@ -79,7 +82,6 @@
LIBRARY contentlistingframework.lib
LIBRARY caf.lib
-
#if defined(__WINDOWS_MEDIA)
STATICLIBRARY hxmetadatautil.lib
#endif
@@ -90,4 +92,3 @@
#else
DEBUGLIBRARY hal.lib
#endif
-
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/ccopyobject.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/ccopyobject.h Wed Jun 23 17:51:16 2010 +0100
@@ -21,8 +21,6 @@
#include "crequestprocessor.h"
-class RFs;
-class CFileMan;
class CMTPObjectMetaData;
class CMTPTypeObjectPropList;
class CMTPTypeObjectPropListElement;
@@ -35,17 +33,6 @@
{
public:
/**
- * Two-phase construction method
- * @param aFramework The data provider framework
- * @param aConnection The connection from which the request comes
- * @param aWrapper medadata access interface
- * @return a pointer to the created request processor object
- */
- //IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
- // MMTPConnection& aConnection,
- // CMmMtpDpMetadataAccessWrapper& aWrapper );
-
- /**
* Destructor
*/
IMPORT_C virtual ~CCopyObject();
@@ -55,8 +42,8 @@
* Standard c++ constructor
*/
IMPORT_C CCopyObject( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig );
/**
* Second phase constructor
@@ -70,115 +57,74 @@
*/
IMPORT_C void ServiceL();
- /**
- * Set MetaData to CMetadataAccessWrapper, for internal use
- * @param aPropCode, specify property code of aMediaProp
- * @param aNewData, object property value which will be get from
- * aObjectMetaData
- * @param aObjectMetaData, owner of the property which should be
- * inserted or updated into database
- * @return response code
- */
- IMPORT_C TMTPResponseCode ServiceMetaDataToWrapper( const TUint16 aPropCode,
- MMTPType& aNewData,
- const CMTPObjectMetaData& aObject );
-
virtual void ServiceGetSpecificObjectPropertyL( TUint16 aPropCode,
TUint32 aHandle,
const CMTPObjectMetaData& aObjectMetaData ) = 0;
- virtual TMTPResponseCode ServiceSetSpecificObjectPropertyL( TUint16 aPropCode,
- const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement ) = 0;
-
- // from CActive
- IMPORT_C void RunL();
-
- IMPORT_C TInt RunError( TInt aError );
-
private:
/**
* Retrieve the parameters of the request
*/
void GetParametersL();
+ /**
+ * Set a default destination if it is not specified
+ */
void SetDefaultParentObjectL();
/**
- * Copy object operation
+ * Copy file and metadata and send response to pc
+ * If everything was right, the handle of newly created file
+ * should be sent back
*/
- void CopyObjectL( TUint32& aNewHandle );
+ void CopyObjectL();
/**
- * Check if we can copy the file to the new location
+ * Check if the file can be copied
+ * @param aOldName used to get file size
+ * @param aNewName the full path name of newly copied file
*/
TMTPResponseCode CanCopyObjectL( const TDesC& aOldName,
- const TDesC& aNewName ) const;
+ const TDesC& aNewName ) const;
/**
* Save the object properties before doing the copy
*/
- void GetPreviousPropertiesL( const CMTPObjectMetaData& aObject );
+ void GetPreviousPropertiesL();
/**
* Set the object properties after doing the copy
*/
- void SetPreviousPropertiesL( const CMTPObjectMetaData& aObject );
+ void SetPreviousPropertiesL();
/**
* A helper function of CopyObjectL.
* @param aNewFileName the new full filename after copy.
- * @return objectHandle of new copy of object.
+ * @return handle of the newly copied object.
*/
TUint32 CopyFileL( const TDesC& aNewFileName );
- /*
- * Generate the list of handles that need to be copied to the new location.
- */
- void GenerateObjectHandleListL( TUint32 aParentHandle );
-
/**
- * A helper function of CopyObjectL.
- * @param aNewFolderName the new full file folder name after copy.
- * @return objecthandle of new copy of the folder.
- */
- TUint32 CopyFolderL( const TDesC& aNewFolderName );
-
- /**
- * Set the object properties in the object property store.
+ * Add metadata of the newly created file into database and
+ * update related references
+ * @param aOldObjectName old reference owner
+ * @param aNewObjectName new reference owner
+ * @return handle of the newly copied object
*/
- void SetPropertiesL( const TDesC& aOldFileName,
- const TDesC& aNewFileName,
- const CMTPObjectMetaData& aObject );
-
- /**
- * Update object info in the database.
- */
- TUint32 UpdateObjectInfoL( const TDesC& aOldObjectName,
- const TDesC& aNewObjectName);
-
- /*
- * A helper function of CopyObjectL
- * Copy a single object and update the database
- */
- void CopyAndUpdateL( TUint32 objectHandle );
+ TUint32 AddObjectToStoreL( const TDesC& aOldObjectName,
+ const TDesC& aNewObjectName );
protected:
CMTPTypeObjectPropListElement* iPropertyElement;
MMmMtpDpConfig& iDpConfig;
CMTPTypeObjectPropList* iPropertyList;
+
private:
- CMTPObjectMetaData* iObjectInfo; // Not owned
- RArray<TUint> iObjectHandles;
- CFileMan* iFileMan;
+ TUint32 iStorageId;
+ CMTPObjectMetaData* iSourceObject;
+ CMTPObjectMetaData* iTargetObject;
HBufC* iDest;
TUint32 iNewParentHandle;
- TUint32 iHandle;
- TUint32 iStorageId;
- TInt iCopyObjectIndex;
- TInt iNumberOfObjects;
- HBufC* iPathToCopy;
- HBufC* iNewRootFolder;
TTime iPreviousModifiedTime;
};
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cdeleteobject.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cdeleteobject.h Wed Jun 23 17:51:16 2010 +0100
@@ -19,16 +19,11 @@
#ifndef CDELETEOBJECT_H
#define CDELETEOBJECT_H
-#include <f32file.h>
#include <d32dbms.h>
-#include <badesca.h>
#include "crequestprocessor.h"
//forward declaration
-class RFs;
-class CMTPTypeArray;
-class MMTPObjectMgr;
class MMmMtpDpConfig;
/**
@@ -60,7 +55,7 @@
* @param aConnection The connection from which the request comes
* @param aWrapper medadata access interface
*/
- IMPORT_C CDeleteObject( MMTPDataProviderFramework& aFramework,
+ CDeleteObject( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig );
@@ -110,12 +105,6 @@
void DeleteObjectL( const CMTPObjectMetaData& aObjectInfo );
private:
- // MTP Object Manager
- MMTPObjectMgr& iObjectMgr;
-
- // File server used to open the database
- RFs& iFs;
-
// Array of all the objects to delete
RArray<TUint> iObjectsToDelete;
@@ -127,6 +116,7 @@
// Accessor of DB
MMmMtpDpConfig& iDpConfig;
+
};
#endif // CDELETEOBJECT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cdescriptionutility.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,97 @@
+/*
+* 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 CDESCRIPTIONUTILITY_H
+#define CDESCRIPTIONUTILITY_H
+
+class CMTPTypeObjectPropDesc;
+class CMTPTypeInterdependentPropDesc;
+class MMmMtpDpConfig;
+
+class CDescriptionUtility : public CBase
+ {
+protected:
+ /**
+ *
+ */
+ IMPORT_C CDescriptionUtility();
+
+public:
+ /**
+ *
+ */
+ IMPORT_C virtual ~CDescriptionUtility();
+
+public:
+ /**
+ *
+ */
+ CMTPTypeObjectPropDesc* NewCommonObjectPropertyL( TUint16 aPropCode );
+
+ /**
+ * New RangeForm Description
+ * @param aMinValue The minimal value
+ * @param aMaxValue The maximal value
+ * @param aStepValue The step value
+ * @return CMTPTypeObjectPropDesc
+ */
+ IMPORT_C CMTPTypeObjectPropDesc* NewRangeFormDescriptionL( TUint16 aPropCode,
+ TUint32 aMinValue,
+ TUint32 aMaxValue,
+ TUint32 aStepValue,
+ TBool aIsReadOnly = EFalse );
+
+ /**
+ * Get group code
+ * @param aPropCode Specify the property code of which the group code needed
+ * @return Group code of specified property
+ */
+ TUint32 GetGroupCode( TUint32 aPropCode );
+
+ /**
+ *
+ */
+ virtual CMTPTypeInterdependentPropDesc* NewInterdepentPropDescL( MMmMtpDpConfig& aDpConfig, TUint aFormatCode ) = 0;
+
+ /**
+ *
+ */
+ virtual CMTPTypeObjectPropDesc* NewSpecificPropDescL( TUint aFormatCode, TUint16 aPropCode ) = 0;
+
+private:
+ /**
+ * New a property description of protection status
+ * @return CMTPTypeObjectPropDesc
+ */
+ CMTPTypeObjectPropDesc* NewProtectionStatusPropDescL();
+
+ /**
+ * Get property description of file name
+ * @return CMTPTypeObjectPropDesc
+ */
+ CMTPTypeObjectPropDesc* NewFileNamePropDescL();
+
+ /**
+ * New a property description of nonconsumable
+ * @return CMTPTypeObjectPropDesc
+ */
+ CMTPTypeObjectPropDesc* NewNonConsumablePropDescL();
+
+ };
+
+#endif // CDESCRIPTIONUTILITY_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetformatcapabilities.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetformatcapabilities.h Wed Jun 23 17:51:16 2010 +0100
@@ -20,16 +20,10 @@
#include <mtp/cmtptypeformatcapabilitylist.h>
#include "crequestprocessor.h"
-#include "mmmtpdplogger.h"
-#include "mmmtpdpconfig.h"
// forward declaration
-class MMTPRequestProcessor;
class MMmMtpDpConfig;
class CMTPTypeObjectPropDesc;
-class CMTPTypeInterdependentPropDesc;
-class CMTPTypeObjectPropDesc;
-class CMTPTypeString;
/**
Implements the file data provider CMTPGetFormatCapabilities request processor.
@@ -39,18 +33,29 @@
{
public:
/**
+ * Two-phase construction method
+ * @param aFramework The data provider framework
+ * @param aConnection The connection from which the request comes
+ * @param aDpConfig Configuration of data provider
+ * @return The pointer to the created request processor object
+ */
+ IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig );
+
+ /**
* Destructor
*/
IMPORT_C virtual ~CGetFormatCapabilities();
-protected:
+private:
/**
* Standard c++ constructor
* @param aFramework The data provider framework
* @param aConnection The connection from which the request comes
* @param aDpConfig, The interface of dataprovider configuration
*/
- IMPORT_C CGetFormatCapabilities( MMTPDataProviderFramework& aFramework,
+ CGetFormatCapabilities( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig );
@@ -58,7 +63,7 @@
* Constructor
* Second phase constructor
*/
- IMPORT_C void ConstructL();
+ void ConstructL();
protected:
// from CMTPRequestProcessor
@@ -74,73 +79,35 @@
*/
IMPORT_C TMTPResponseCode CheckRequestL();
-protected:
- // new virtuals
+private:
/**
- * Service specific object property
- * @param aPropCode, The prop code
- * @return MTPType object propdesc
- */
- virtual CMTPTypeObjectPropDesc* ServiceSpecificPropertyDescL( TUint16 aPropCode ) = 0;
+ * Handle one format's capabilities
+ */
+ void ServiceOneFormatCapabilitiesL( TUint aFormatCode );
/**
- * Service interdepent propdesc
- * @param aFormatCode, The format code
- * @return MTPTypeInterdependentPropDesc
- */
- virtual void ServiceInterdepentPropDescL() = 0;
-
-private:
- /**
- * Get PropDesc via PropCode
+ * Handle one property description of one format
* @param aPropCode The Property Code
* @return The MTPTypeObject PropDesc
*/
- CMTPTypeObjectPropDesc* ServicePropDescL( TUint16 aPropCode );
-
- /**
- * Get PropDesc with Protection status
- * @return The MTPTypeObject PropDesc
- */
- CMTPTypeObjectPropDesc* ServiceProtectionStatusL();
-
- /**
- * Get PropDesc with file name
- * @return The MTPTypeObject PropDesc
- */
- CMTPTypeObjectPropDesc* ServiceFileNameL();
+ CMTPTypeObjectPropDesc* ServiceOnePropDescL( TUint16 aPropCode );
- /**
- * Get PropDesc with nonconsumable
- * @return The MTPTypeObject PropDesc
- */
- CMTPTypeObjectPropDesc* ServiceNonConsumableL();
-
- /**
- * Get group code
- * @param aPropCode Specify the property code of which the group code needed
- * @return Group code of specified property
- */
- TUint32 GetGroupCode( TUint32 aPropCode );
-
-protected:
+private:
/*
* Format code.
*/
TUint iFormatCode;
- CMTPTypeInterdependentPropDesc* iInterdependentPropDesc;
+ /*
+ * MMmMtpDpConfig.
+ */
+ MMmMtpDpConfig& iDpConfig;
-private: // Owned
/*
* CMTPTypeCapabilityList dataset.
*/
CMTPTypeFormatCapabilityList* iCapabilityList;
- /*
- * MMmMtpDpConfig.
- */
- MMmMtpDpConfig& iDpConfig;
};
#endif // CMTPGETFORMATCAPABILITLIST_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetinterdependentpropdesc.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,72 @@
+/*
+* 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: GetInterdependentPropDesc operation
+*
+*/
+
+#ifndef CGETINTERDEPENDENTPROPDESC_H
+#define CGETINTERDEPENDENTPROPDESC_H
+
+#include "crequestprocessor.h"
+
+class MMmMtpDpConfig;
+class CMTPTypeInterdependentPropDesc;
+
+class CGetInterdependentPropDesc : public CRequestProcessor
+ {
+public:
+ /**
+ *
+ */
+ IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig );
+
+ /**
+ * Destructor
+ */
+ IMPORT_C virtual ~CGetInterdependentPropDesc();
+
+protected:
+ /**
+ * Standard C++ Constructor
+ * @param aFramework The data provider framework
+ * @param aConnection The connection from which the request comes
+ * @param aWrapper Medadata access interface
+ */
+ CGetInterdependentPropDesc( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig );
+
+ /**
+ * 2nd Phase Constructor
+ */
+ void ConstructL();
+
+protected:
+ // from CRequestProcessor
+ IMPORT_C TMTPResponseCode CheckRequestL();
+
+ IMPORT_C void ServiceL();
+
+protected:
+ MMmMtpDpConfig& iDpConfig;
+
+ CMTPTypeInterdependentPropDesc* iDataset;
+
+ TUint32 iFormatCode;
+
+ };
+
+#endif // CGETINTERDEPENDENTPROPDESC_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobject.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobject.h Wed Jun 23 17:51:16 2010 +0100
@@ -22,7 +22,6 @@
#include "crequestprocessor.h"
// forward declaration
-class RFs;
class CMTPTypeFile;
class MMmMtpDpConfig;
@@ -78,17 +77,14 @@
void GetObjectL( const TDesC& aFileName );
private:
- // File server used to open the database
- RFs& iFs;
-
// File Object to encapsulate the object to send back
CMTPTypeFile* iFileObject;
// Object Info
CMTPObjectMetaData* iObjectInfo;
- //
TMTPResponseCode iError;
+
};
#endif // CGETOBJECT_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectinfo.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectinfo.h Wed Jun 23 17:51:16 2010 +0100
@@ -22,7 +22,6 @@
#include "crequestprocessor.h"
// forward declacration
-class CMmMtpDpMetadataAccessWrapper;
class CMTPTypeObjectInfo;
class MMmMtpDpConfig;
@@ -62,7 +61,7 @@
* @param aConnection The connection from which the request comes
* @param aWrapper medadata access interface
*/
- IMPORT_C CGetObjectInfo( MMTPDataProviderFramework& aFramework,
+ CGetObjectInfo( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig );
@@ -78,10 +77,10 @@
void BuildObjectInfoL();
private:
-
CMTPTypeObjectInfo* iObjectInfo;
MMmMtpDpConfig& iDpConfig;
+
};
#endif // CGETOBJECTINFO_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectpropdesc.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectpropdesc.h Wed Jun 23 17:51:16 2010 +0100
@@ -11,11 +11,10 @@
*
* Contributors:
*
-* Description: Get object properties descript operation
+* Description: Request processor which handle common property description
*
*/
-
#ifndef CGETOBJECTPROPDESC_H
#define CGETOBJECTPROPDESC_H
@@ -32,33 +31,39 @@
{
public:
/**
+ * Two-phase construction method
+ * @param aFramework The data provider framework
+ * @param aConnection The connection from which the request comes
+ * @param aDpConfig Configuration of data provider
+ * @return The pointer to the created request processor object
+ */
+ IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig );
+
+ /**
* Destructor
*/
IMPORT_C virtual ~CGetObjectPropDesc();
-protected:
+private:
/**
* Standard c++ constructor
* @param aFramework The data provider framework
* @param aConnection The connection from which the request comes
* @param aWrapper Medadata access interface
*/
- IMPORT_C CGetObjectPropDesc( MMTPDataProviderFramework& aFramework,
+ CGetObjectPropDesc( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig );
-
+
/**
* Second phase constructor
*/
- IMPORT_C void ConstructL();
+ void ConstructL();
protected:
- //from CRequestProcessor
- /**
- * GetObjectPropDesc request handler
- */
- IMPORT_C void ServiceL();
-
+ // from CRequestProcessor
/**
* Check the current request
* @return EMTPRespCodeOK if the reqeust is good, otherwise,
@@ -66,9 +71,10 @@
*/
IMPORT_C TMTPResponseCode CheckRequestL();
-protected:
- // new virtuals
- virtual void ServiceSpecificObjectPropertyL( TUint16 aPropCode ) = 0;
+ /**
+ * GetObjectPropDesc request handler
+ */
+ IMPORT_C void ServiceL();
private:
/**
@@ -85,37 +91,16 @@
*/
TMTPResponseCode CheckPropCodeL() const;
- /**
- * Create list of possible protection status and create new ObjectPropDesc
- */
- void ServiceProtectionStatusL();
-
- /**
- * Create Regular expression for a file name and create new ObjectPropDesc
- */
- void ServiceFileNameL();
-
- /**
- * Create list of possible nonConsumable values and create new ObjectPropDesc
- */
- void ServiceNonConsumableL();
-
- /*
- * Get group code according to property code
- * @param aPropCode Specify the property code of which the group code needed
- * @return Group code of specified property
- */
- TUint32 GetGroupCode( TUint16 aPropCode );
-
-
-protected:
- // Property object to return with the desc value
- CMTPTypeObjectPropDesc* iObjectProperty;
-
- //Format code
- TUint32 iFormatCode;
+private:
+ TUint iFormatCode;
MMmMtpDpConfig& iDpConfig;
+
+ TUint iPropCode;
+
+ // property description
+ CMTPTypeObjectPropDesc* iPropertyDesc;
+
};
#endif // CGETOBJECTPROPDESC_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectproplist.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectproplist.h Wed Jun 23 17:51:16 2010 +0100
@@ -161,8 +161,6 @@
void GetPropertiesL( RArray<TUint>& aPropArray, TUint32 aGroupCode, TUint16 aFormatCode ) const;
- void SetSubFormatCodeL();
-
protected:
CMTPTypeObjectPropListElement* iPropertyElement; // used by media DP directly
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectpropssupported.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectpropssupported.h Wed Jun 23 17:51:16 2010 +0100
@@ -70,6 +70,7 @@
private:
CMTPTypeArray* iObjectPropsSupported;
MMmMtpDpConfig& iDpConfig;
+
};
#endif // CGETOBJECTPROPSSUPPORTED_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectpropvalue.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectpropvalue.h Wed Jun 23 17:51:16 2010 +0100
@@ -29,7 +29,6 @@
class TMTPTypeUint128;
class CMTPTypeString;
class CMTPTypeArray;
-class TMTPObjectInfo;
class MMmMtpDpConfig;
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectreferences.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectreferences.h Wed Jun 23 17:51:16 2010 +0100
@@ -20,6 +20,7 @@
#define CGETOBJECTREFERENCES_H
#include "crequestprocessor.h"
+#include "cmmmtpdpperflog.h"
// forward declaration
class CMTPTypeArray;
@@ -62,16 +63,31 @@
* @param aWrapper Medadata access interface
*/
CGetObjectReferences( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection );
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig );
/**
* Two-phase construction
*/
void ConstructL();
+ /**
+ * Add references of specified object into reference db,
+ * for the insertion delayed until the first time it was queried by pc
+ * @param aRefOwnerSuid, specify the reference owner of which references should be added into db
+ * @param aReferences, suid array which stored references
+ */
+ void AddReferencesL( const TDesC& aRefOwnerSuid,
+ CDesCArray& aReferences );
+
private:
// Array object to store object references
CMTPTypeArray* iReferences;
+ MMmMtpDpConfig& iDpConfig;
+
+#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
+ CMmMtpDpPerfLog* iPerfLog;
+#endif
};
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetpartialobject.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetpartialobject.h Wed Jun 23 17:51:16 2010 +0100
@@ -21,9 +21,6 @@
#include "crequestprocessor.h"
-class MMTPDataProviderFramework;
-class RFs;
-class TMTPTypeFlatBase;
class CMTPTypeFile;
class CMmMtpDpMetadataAccessWrapper;
class MMmMtpDpConfig;
@@ -56,7 +53,7 @@
* @param aFramework The data provider framework
* @param aConnection The connection from which the request comes
*/
- IMPORT_C CGetPartialObject( MMTPDataProviderFramework& aFramework,
+ CGetPartialObject( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection );
protected:
@@ -100,16 +97,11 @@
private:
MMTPDataProviderFramework& iFramework;
- RFs& iFs;
- TMTPTypeFlatBase* iPartialData;
- HBufC8* iBuffer;
- TPtr8 iBufferPtr8;
- TInt iOffset;
- TInt iPartialDataLength;
- TBool iCompleteFile;
- CMTPTypeFile* iFileObject;
- TBuf<KMaxFileName> iFileSuid;
- TUint32 iObjectHandle;
+ TUint iOffset;
+ TUint iPartialDataLength;
+
+ CMTPTypeFile* iFileObject;
+ TUint32 iObjectHandle;
};
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cmoveobject.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cmoveobject.h Wed Jun 23 17:51:16 2010 +0100
@@ -21,9 +21,7 @@
#include "crequestprocessor.h"
-class CFileMan;
class CMTPObjectMetaData;
-class CMmMtpDpMetadataAccessWrapper;
class CMTPTypeObjectPropList;
class CMTPTypeObjectPropListElement;
class MMmMtpDpConfig;
@@ -35,18 +33,6 @@
{
public:
/**
- * Two-phase construction method
- * @param aFramework The data provider framework
- * @param aConnection The connection from which the request comes
- * @param aWrapper medadata access interface
- * @return a pointer to the created request processor object
- */
- //IMPORT_C static MMmRequestProcessor* NewL(
- // MMTPDataProviderFramework& aFramework,
- // MMTPConnection& aConnection,
- // CMmMtpDpMetadataAccessWrapper& aWrapper );
-
- /**
* Destructor
*/
IMPORT_C virtual ~CMoveObject();
@@ -56,8 +42,8 @@
* Standard c++ constructor
*/
IMPORT_C CMoveObject( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig );
/**
* Second phase constructor
@@ -71,34 +57,18 @@
*/
IMPORT_C void ServiceL();
- // from CActive
- IMPORT_C void RunL();
-
- IMPORT_C TInt RunError( TInt aError );
-
-
protected:
// new virtuals
/**
* Set MetaData to CMetadataAccessWrapper, for internal use
- * @param aPropCode, specify property code of aMediaProp
- * @param aNewData, object property value which will be get from
- * aObjectMetaData
- * @param aObjectMetaData, owner of the property which should be
+ * @param aPropCode, specify property code of an object
+ * @param aHandle, object handles of which the properties are needed
+ * @param aObject, owner of the properties which should be
* inserted or updated into database
- * @return response code
*/
- IMPORT_C TMTPResponseCode ServiceMetaDataToWrapper( const TUint16 aPropCode,
- MMTPType& aNewData,
- const CMTPObjectMetaData& aObject );
-
virtual void ServiceGetSpecificObjectPropertyL( TUint16 aPropCode,
- TUint32 aHandle,
- const CMTPObjectMetaData& aObject ) = 0;
-
- virtual TMTPResponseCode ServiceSetSpecificObjectPropertyL( TUint16 aPropCode,
- const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement ) = 0;
+ TUint32 aHandle,
+ const CMTPObjectMetaData& aObject ) = 0;
private:
/**
@@ -115,13 +85,13 @@
* move object operations
* @return A valid MTP response code.
*/
- TMTPResponseCode MoveObjectL();
+ void MoveObjectL();
/**
* Check if we can move the file to the new location
*/
TMTPResponseCode CanMoveObjectL( const TDesC& aOldName,
- const TDesC& aNewName ) const;
+ const TDesC& aNewName ) const;
/**
* Save the object properties before moving
@@ -131,8 +101,7 @@
/**
* Set the object properties after moving
*/
-
- void SetPreviousPropertiesL( const CMTPObjectMetaData& aObject );
+ void SetPreviousPropertiesL();
/**
* A helper function of MoveObjectL.
* @param aNewFileName the new file name after the object is moved.
@@ -140,32 +109,9 @@
void MoveFileL( const TDesC& aNewFileName );
/**
- * A helper function of MoveObjectL
- */
- void MoveFolderL();
-
- /* Move the objects through iterations of RunL. It currently move 20 objects
- * at a time and the number can be adjusted by changing
- * "KMoveObjectGranularity"
- */
- TBool MoveOwnedObjectsL();
-
- /**
* Set the object properties in the object property store.
*/
- void SetPropertiesL( const TDesC& aOldFileName,
- const TDesC& aNewFileName,
- const CMTPObjectMetaData& aNewObject );
-
- /*
- * This function will actually delete the orginal folders from the file system.
- */
- TMTPResponseCode FinalPhaseMove();
-
- /*
- * Generate the list of handles that need to be moved to the new location.
- */
- void GenerateObjectHandleListL( TUint32 aParentHandle );
+ void SetPropertiesL( const TDesC& aNewFileName );
/*
* Move a single object and update the database
@@ -179,17 +125,12 @@
CMTPTypeObjectPropList* iPropertyList;
private:
TBool iSameStorage;
- CFileMan* iFileMan;
- CMTPObjectMetaData* iObjectInfo; //Not owned.
+ CMTPObjectMetaData* iObjectInfo; // Not owned
HBufC* iDest;
- HBufC* iNewRootFolder;
TUint32 iNewParentHandle;
TUint32 iStorageId;
TTime iPreviousModifiedTime;
- HBufC* iPathToMove;
- RArray<TUint> iObjectHandles;
- TInt iMoveObjectIndex;
- TInt iNumberOfObjects;
+
};
#endif // CMOVEOBJCT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cpropertysettingutility.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,67 @@
+/*
+* 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 CPROPERTYSETTINGUTILITY_H
+#define CPROPERTYSETTINGUTILITY_H
+
+#include <mtp/mtpprotocolconstants.h> // TMTPResponseCode
+
+class MMmMtpDpConfig;
+class MMTPType;
+class CMTPObjectMetaData;
+class CMTPTypeObjectPropListElement;
+
+class CPropertySettingUtility : public CBase
+ {
+protected:
+ IMPORT_C CPropertySettingUtility();
+
+public:
+ IMPORT_C virtual ~CPropertySettingUtility();
+
+public:
+ /**
+ * Set metadata to database for processors which need set common property list
+ * @param aDpConfig, handler to get db access wrapper
+ * @param aPropCode, specify property code of aMediaProp
+ * @param aNewData, object property value which will be get from
+ * aObjectMetaData
+ * @param aObjectMetaData, owner of the property which should be
+ * inserted or updated into database
+ * @return response code
+ */
+ IMPORT_C TMTPResponseCode SetMetaDataToWrapper( MMmMtpDpConfig& aDpConfig,
+ const TUint16 aPropCode,
+ MMTPType& aNewData,
+ const CMTPObjectMetaData& aObjectMetaData );
+
+ /**
+ * Interface to set metadata to database for dp specific objectproplist
+ * @param aDpConfig, handler to get db access wrapper
+ * @param aPropCode, specify property code of aMediaProp
+ * @param aObjectMetaData, owner of the property which should be
+ * inserted or updated into database
+ * @param aElement, property list element
+ */
+ virtual TMTPResponseCode SetSpecificObjectPropertyL( MMmMtpDpConfig& aDpConfig,
+ TUint16 aPropCode,
+ const CMTPObjectMetaData& aObject,
+ const CMTPTypeObjectPropListElement& aElement ) = 0;
+
+ };
+
+#endif // CPROPERTYSETTINGUTILITY_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crenameobject.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crenameobject.h Wed Jun 23 17:51:16 2010 +0100
@@ -22,7 +22,6 @@
// Forward declarations
class MMTPDataProviderFramework;
class CMmMtpDpMetadataAccessWrapper;
-class MMTPObjectMgr;
class CMTPObjectMetaData;
class CRenameObject: public CActive
@@ -92,6 +91,7 @@
private:
CActiveSchedulerWait* iRenameWaiter;
TUint32 iParentHandle;
+
};
#endif // CRENAMEOBJECT_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crequestchecker.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crequestchecker.h Wed Jun 23 17:51:16 2010 +0100
@@ -19,11 +19,9 @@
#ifndef CREQUESTCHECKER_H
#define CREQUESTCHECKER_H
-#include <e32base.h>
-#include <mtp/mtpprotocolconstants.h>
#include <mtp/tmtptyperequest.h>
+#include <mtp/cmtpobjectmetadata.h>
-class CMTPObjectMetaData;
class MMTPDataProviderFramework;
class MMTPConnection;
@@ -121,7 +119,7 @@
* @return a pointer to the created request checker object
*/
static CRequestChecker* NewL( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection );
+ MMTPConnection& aConnection );
/**
* Destructor
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crequestprocessor.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crequestprocessor.h Wed Jun 23 17:51:16 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
@@ -19,22 +19,24 @@
#ifndef CREQUESTPROCESSOR_H
#define CREQUESTPROCESSOR_H
-#include <e32base.h>
+
+#include <mtp/tmtptypenull.h>
#include <mtp/mtpdataproviderapitypes.h>
#include <mtp/mtpprotocolconstants.h>
#include <mtp/tmtptyperesponse.h>
-#include <mtp/tmtptypenull.h>
+
+// for derived processors
+#include <mtp/mmtpdataproviderframework.h>
#include "crequestchecker.h"
class MMTPConnection;
class TMTPTypeRequest;
-class CMTPDataProviderPlugin;
class MMTPDataProviderFramework;
class TMTPTypeEvent;
class CMTPObjectInfo;
-static const TInt KMmMtpRArrayGranularity = 2;
+const TInt KMmMtpRArrayGranularity = 2;
/**
* Defines a request processor interface
@@ -100,8 +102,8 @@
/*
* Get the session id associated with current request object
- * This interface was added to avoid the case that the data member iRequest
- * was sometimes invalid in session close phase, and getting session id from
+ * This interface was added to avoid the case that the data member iRequest
+ * was sometimes invalid in session close phase, and getting session id from
* request would cause panic
* @return session id
*/
@@ -111,9 +113,8 @@
/**
* Defines a processor factory function pointer
*/
-typedef MMmRequestProcessor
- * (*TMTPRequestProcessorCreateFunc)( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection );
+typedef MMmRequestProcessor* (*TMTPRequestProcessorCreateFunc)( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection );
/**
* Defines an entry which maps from operation code to the request processor
@@ -237,12 +238,13 @@
/*
* Get the session id associated with current request object
- * This interface was added to avoid the case that the data member iRequest
- * was sometimes invalid in session close phase, and getting session id from
+ * This interface was added to avoid the case that the data member iRequest
+ * was sometimes invalid in session close phase, and getting session id from
* request would cause panic
* @return session id
*/
IMPORT_C TUint32 SessionId();
+
protected:
// from CActive
/**
@@ -261,7 +263,7 @@
IMPORT_C TInt RunError( TInt aError );
protected:
- //new virtuals
+ // new virtuals
/**
* Handle the request phase of the current request
* @return EFalse
@@ -309,7 +311,6 @@
/**
* Set P&S Status to avoid MPX access conflict
*/
- void SetPSStatus();
private:
/**
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crequestunknown.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crequestunknown.h Wed Jun 23 17:51:16 2010 +0100
@@ -45,7 +45,7 @@
/**
* Standard c++ constructor
*/
- IMPORT_C CRequestUnknown( MMTPDataProviderFramework& aFramework,
+ CRequestUnknown( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection );
protected:
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csendobject.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csendobject.h Wed Jun 23 17:51:16 2010 +0100
@@ -40,25 +40,37 @@
{
public:
/**
+ * Two-phase construction method
+ * @param aFramework The data provider framework
+ * @param aConnection The connection from which the request comes
+ * @param aDpConfig Configuration of data provider
+ * @return The pointer to the created request processor object
+ */
+ IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig );
+
+ /**
* Destructor
*/
IMPORT_C virtual ~CSendObject();
protected:
/**
- * Standard C++ Constructor
- * @param aFramework The data provider framework
- * @param aConnection The connection from which the request comes
- * @param aWrapper Medadata access interface
+ * Standard C++ construction method
+ * @param aFramework The data provider framework
+ * @param aConnection The connection from which the request comes
+ * @param aDpConfig Configuration of data provider
+ * @return The pointer to the created request processor object
*/
- IMPORT_C CSendObject( MMTPDataProviderFramework& aFramework,
+ CSendObject( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig );
/**
* 2nd Phase Constructor
*/
- IMPORT_C void ConstructL();
+ void ConstructL();
protected:
// from CRequestProcessor
@@ -104,31 +116,6 @@
*/
IMPORT_C void UsbDisconnect();
- // new protected function
- /**
- * Called by dp derived processor
- */
- IMPORT_C TMTPResponseCode SetMetaDataToWrapperL( const TUint16 aPropCode,
- MMTPType& aNewData,
- const CMTPObjectMetaData& aObjectMetaData );
-
-protected:
- // new virtual functions
- /**
- *
- */
- virtual TMTPResponseCode SetSpecificObjectPropertyL( TUint16 aPropCode,
- const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement ) = 0;
-
- /**
- * Check datatypes for DP specific PropCodes
- */
- virtual TMTPResponseCode CheckSepecificPropType( TUint16 aPropCode, TUint16 aDataType ) = 0;
-
- virtual TInt HandleSpecificWrapperError(TInt aError,
- const CMTPObjectMetaData& aObject) = 0;
-
private:
/**
* Verify if the SendObject request comes after SendObjectInfo request
@@ -186,7 +173,7 @@
/*
* Handle response phase of SetObjectPropListL operation
*/
- TMTPResponseCode SetObjectPropListL( const CMTPTypeObjectPropList& aPropList );
+ TMTPResponseCode SetObjectPropListL();
/**
*
@@ -197,13 +184,7 @@
* Check if the object is too large
* @return ETrue if yes, otherwise EFalse
*/
- TBool IsTooLarge( TUint32 aObjectSize ) const;
-
- /**
- * Check if we can store the file on the storage
- * @return ETrue if yes, otherwise EFalse
- */
- TBool CanStoreFileL( TUint32 aStorageId, TInt64 aObjectSize ) const;
+ TBool IsTooLarge( TUint64 aObjectSize ) const;
/**
* Get the full path name of the object to be saved
@@ -221,12 +202,12 @@
/**
* Reserve object information before SendObject
*/
- void ReserveObjectL();
+ TInt ReserveObjectL();
/**
* Set protection status of object which could be read/write-only
*/
- void SetProtectionStatusL();
+ void SetProtectionStatus();
/**
* Save object information of object whose size is zero
@@ -240,10 +221,13 @@
void AddMediaToStoreL();
/**
- * delete the file, which transfer incompletely
+ * Rollback functions
*/
void Rollback();
+ void UnreserveObjectL();
+ void RemoveObjectFromDbL();
+ void RemoveObjectFromFs();
private:
enum TMTPSendingObjectState
@@ -257,6 +241,8 @@
ESendObjectFail
};
+ typedef void ( CSendObject::*TMmMtpRollbackAction )();
+
private:
RFs& iFs;
MMTPObjectMgr& iObjectMgr;
@@ -295,10 +281,11 @@
// params which is needed for reserve handle
TMTPTypeRequest iExpectedSendObjectRequest;
- TBool iNoRollback;
+ RArray<TMmMtpRollbackAction> iRollbackList;
TUint32 iPreviousTransactionID;
TUint32 iPreviousOperation;
+
};
#endif // CSENDOBJECT_H
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csetobjectproplist.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csetobjectproplist.h Wed Jun 23 17:51:16 2010 +0100
@@ -36,39 +36,47 @@
public:
/**
* Two-phase construction method
- * @param aFramework, The data provider framework
- * @param aConnection, The connection from which the request comes
- * @param aWrapper medadata access interface
- * @return a pointer to the created request processor object
+ * @param aFramework The data provider framework
+ * @param aConnection The connection from which the request comes
+ * @param aDpConfig Configuration of data provider
+ * @return The pointer to the created request processor object
*/
- //IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
- // MMTPConnection& aConnection,
- // CMmMtpDpMetadataAccessWrapper& aWrapper );
+ IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig );
/**
* Destructor
*/
IMPORT_C virtual ~CSetObjectPropList();
-protected:
+private:
/**
* Standard c++ constructor
- * @param aFramework The data provider framework
- * @param aConnection The connection from which the request comes
- * @param aWrapper medadata access interface
+ * @param aFramework The data provider framework
+ * @param aConnection The connection from which the request comes
+ * @param aDpConfig Configuration of data provider
+ * @return The pointer to the created request processor object
*/
- IMPORT_C CSetObjectPropList( MMTPDataProviderFramework& aFramework,
+ CSetObjectPropList( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig );
/**
* 2nd Phase Constructor
*/
- IMPORT_C void ConstructL();
+ void ConstructL();
protected:
// from CRequestProcessor
/**
+ * Verify the reqeust
+ * @return EMTPRespCodeOK if request is verified, otherwise one of
+ * the error response codes
+ */
+ IMPORT_C TMTPResponseCode CheckRequestL();
+
+ /**
* SetObjectPropList request handler
*/
IMPORT_C void ServiceL();
@@ -100,28 +108,6 @@
*/
IMPORT_C TInt RunError( TInt aError );
-protected:
- // new virtuals
- /**
- * Set MetaData to CMetadataAccessWrapper, for internal use
- * @param aPropCode, specify property code of aMediaProp
- * @param aNewData, object property value which will be get from
- * aObjectMetaData
- * @param aObjectMetaData, owner of the property which should be
- * inserted or updated into database
- * @return response code
- */
- IMPORT_C TMTPResponseCode ServiceMetaDataToWrapperL( const TUint16 aPropCode,
- MMTPType& aNewData,
- const CMTPObjectMetaData& aObjectMetaData );
-
- virtual TMTPResponseCode ServiceSpecificObjectPropertyL( TUint16 aPropCode,
- const CMTPObjectMetaData& aObject,
- const CMTPTypeObjectPropListElement& aElement ) = 0;
-
- virtual TInt HandleSpecificWrapperError( TInt aError,
- const CMTPObjectMetaData& aObject) = 0;
-
private:
/*
* Handle response phase of SetObjectPropListL operation
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csetobjectpropvalue.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csetobjectpropvalue.h Wed Jun 23 17:51:16 2010 +0100
@@ -30,6 +30,7 @@
class CMTPObjectMetaData;
class MMTPObjectMgr;
class MMmMtpDpConfig;
+class RFs;
/**
* Defines SetObjectPropValue request processor for common
@@ -127,6 +128,7 @@
CMTPObjectMetaData* iObjectInfo;
MMTPObjectMgr& iObjectMgr;
MMmMtpDpConfig& iDpConfig;
+ RFs& iFs;
};
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csetobjectreferences.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csetobjectreferences.h Wed Jun 23 17:51:16 2010 +0100
@@ -57,23 +57,16 @@
* @param aConnection The connection from which the request comes
* @param aWrapper medadata access interface
*/
- IMPORT_C CSetObjectReferences( MMTPDataProviderFramework& aFramework,
+ CSetObjectReferences( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig );
protected:
/**
* set references to DB
- * @param aWrapper medadata access interface
- * @param aObjectFormat the format of the file
- * @param aSrcFileName file name, from
- * @param aRefFileArray the array of file names, to
+ * @param aObject, the reference owner
*/
- IMPORT_C virtual void
- DoSetObjectReferencesL( CMmMtpDpMetadataAccessWrapper& aWrapper,
- TUint16 aObjectFormat,
- const TDesC& aSrcFileName,
- CDesCArray& aRefFileArray );
+ void DoSetObjectReferencesL( const CMTPObjectMetaData& aObject );
private:
//from CRequestProcessor
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/ccopyobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/ccopyobject.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -1,28 +1,25 @@
/*
-* 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: Implement the operation: CopyObject
-*
-*/
-
+ * 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: Implement the operation: CopyObject
+ *
+ */
#include <bautils.h>
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/mmtpobjectmgr.h>
#include <mtp/mmtpreferencemgr.h>
#include <mtp/mmtpstoragemgr.h>
-#include <mtp/cmtpobjectmetadata.h>
#include <mtp/cmtptypestring.h>
#include <mtp/cmtptypearray.h>
#include <mtp/cmtptypeobjectproplist.h>
@@ -33,16 +30,17 @@
#include "mmmtpdputility.h"
#include "mmmtpdpconfig.h"
#include "cmmmtpdpmetadataaccesswrapper.h"
+#include "cpropertysettingutility.h"
/**
-* Verification data for the CopyObject request
-*/
+ * Verification data for the CopyObject request
+ */
const TMTPRequestElementInfo KMTPCopyObjectPolicy[] =
{
{
TMTPTypeRequest::ERequestParameter1,
EMTPElementTypeObjectHandle,
- EMTPElementAttrFileOrDir,
+ EMTPElementAttrFile,
0,
0,
0
@@ -74,14 +72,12 @@
{
Cancel();
+ delete iTargetObject;
delete iDest;
- delete iFileMan;
- iObjectHandles.Close();
+
if ( iPropertyElement )
delete iPropertyElement;
delete iPropertyList;
- delete iPathToCopy;
- delete iNewRootFolder;
}
// -----------------------------------------------------------------------------
@@ -92,17 +88,28 @@
EXPORT_C CCopyObject::CCopyObject( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig ) :
- CRequestProcessor( aFramework,
- aConnection,
- sizeof ( KMTPCopyObjectPolicy ) / sizeof(TMTPRequestElementInfo),
- KMTPCopyObjectPolicy ),
- iDpConfig( aDpConfig ),
- iObjectHandles( KMmMtpRArrayGranularity )
+ CRequestProcessor( aFramework,
+ aConnection,
+ sizeof( KMTPCopyObjectPolicy ) / sizeof( TMTPRequestElementInfo ),
+ KMTPCopyObjectPolicy ),
+ iDpConfig( aDpConfig ),
+ iSourceObject( NULL ),
+ iTargetObject( NULL )
{
PRINT( _L( "Operation: CopyObject(0x101A)" ) );
}
// -----------------------------------------------------------------------------
+// CCopyObject::ConstructL
+// Second phase constructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CCopyObject::ConstructL()
+ {
+ iPropertyList = CMTPTypeObjectPropList::NewL();
+ }
+
+// -----------------------------------------------------------------------------
// CCopyObject::ServiceL
// CopyObject request handler
// -----------------------------------------------------------------------------
@@ -110,223 +117,56 @@
EXPORT_C void CCopyObject::ServiceL()
{
PRINT( _L( "MM MTP => CCopyObject::ServiceL" ) );
- iHandle = KMTPHandleNone;
- CopyObjectL( iHandle );
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
+ CopyObjectL();
PRINT( _L( "MM MTP <= CCopyObject::ServiceL" ) );
}
// -----------------------------------------------------------------------------
-// CCopyObject::ConstructL
-// Second phase constructor
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CCopyObject::ConstructL()
- {
- CActiveScheduler::Add( this );
-
- iPropertyList = CMTPTypeObjectPropList::NewL();
-
- // Set the CenRep value of MTP status,
- // also need to do in other processors which related to MPX
- SetPSStatus();
- }
-
-// -----------------------------------------------------------------------------
-// CCopyObject::RunL
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CCopyObject::RunL()
- {
- PRINT( _L( "MM MTP => CCopyObject::RunL" ) );
-
- if ( iCopyObjectIndex < iNumberOfObjects )
- {
- CopyAndUpdateL( iObjectHandles[iCopyObjectIndex++] );
-
- TRequestStatus* status = &iStatus;
- User::RequestComplete( status, iStatus.Int() );
- SetActive();
- }
- else
- {
- PRINT1( _L( "MM MTP <> CCopyObject::RunL iHandle = 0x%x" ), iHandle );
- SendResponseL( EMTPRespCodeOK, 1, &iHandle );
- }
-
- PRINT( _L( "MM MTP <= CCopyObject::RunL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CCopyObject::CopyFileL
-// A helper function of CopyObjectL
-// -----------------------------------------------------------------------------
-//
-TUint32 CCopyObject::CopyFileL( const TDesC& aNewFileName )
- {
- const TDesC& suid( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
- PRINT2( _L( "MM MTP => CCopyObject::CopyFileL old name = %S, aNewFileName = %S" ),
- &suid,
- &aNewFileName );
-
- GetPreviousPropertiesL( *iObjectInfo );
- User::LeaveIfError( iFileMan->Copy( suid, aNewFileName ) ); // iDest just folder
- User::LeaveIfError( iFramework.Fs().SetModified( aNewFileName, iPreviousModifiedTime ) );
- TUint32 handle = UpdateObjectInfoL( suid, aNewFileName );
-
- PRINT1( _L( "MM MTP <= CCopyObject::CopyFileL handle = 0x%x" ), handle );
-
- return handle;
- }
-
-// -----------------------------------------------------------------------------
-// CCopyObject::GenerateObjectHandleListL
-// Generate the list of handles that need to be copied to the new location
-// -----------------------------------------------------------------------------
-//
-void CCopyObject::GenerateObjectHandleListL( TUint32 aParentHandle )
- {
- PRINT1( _L( "MM MTP => CCopyObject::GenerateObjectHandleListL aParentHandle = 0x%x" ),
- aParentHandle );
- RMTPObjectMgrQueryContext context;
- RArray<TUint> handles;
- CleanupClosePushL( context ); // + context
- CleanupClosePushL( handles ); // + handles
-
- TMTPObjectMgrQueryParams params( KMTPStorageAll, KMTPFormatsAll,
- aParentHandle );
- do
- {
- iFramework.ObjectMgr().GetObjectHandlesL( params, context, handles );
-
- TInt numberOfObjects = handles.Count();
- for ( TInt i = 0; i < numberOfObjects; i++ )
- {
- if ( iFramework.ObjectMgr().ObjectOwnerId( handles[i] ) == iFramework.DataProviderId() )
- {
- iObjectHandles.AppendL( handles[i] );
- continue;
- }
-
- // Folder
- if ( iFramework.ObjectMgr().ObjectOwnerId( handles[i] ) == 0 ) // We know that the device dp id is always 0, otherwise the whole MTP won't work.
- {
- GenerateObjectHandleListL( handles[i] );
- }
- }
- }
- while ( !context.QueryComplete() );
-
- CleanupStack::PopAndDestroy( &handles ); // - handles
- CleanupStack::PopAndDestroy( &context ); // - context
- PRINT( _L( "MM MTP <= CCopyObject::GenerateObjectHandleListL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CCopyObject::CopyFolderL
-// A helper function of CopyObjectL
-// -----------------------------------------------------------------------------
-//
-TUint32 CCopyObject::CopyFolderL( const TDesC& aNewFolderName )
- {
- PRINT1( _L( "MM MTP => CCopyObject::CopyFolderL aNewFolderName = %S" ), &aNewFolderName );
- TUint32 handle = iFramework.ObjectMgr().HandleL( aNewFolderName ); // just get it
-
- GenerateObjectHandleListL( iObjectInfo->Uint( CMTPObjectMetaData::EHandle ) );
- iCopyObjectIndex = 0;
- iNumberOfObjects = iObjectHandles.Count();
- PRINT1( _L( "MM MTP <> CCopyObject::CopyFolderL iNumberOfObjects = %d" ), iNumberOfObjects );
-
- TRequestStatus* status = &iStatus;
- User::RequestComplete( status, iStatus.Int() );
- SetActive();
-
- PRINT1( _L( "MM MTP <= CCopyObject::CopyFolderL handle = 0x%x" ), handle );
- return handle;
- }
-
-// -----------------------------------------------------------------------------
// CCopyObject::CopyObjectL
// Copy object operation
// -----------------------------------------------------------------------------
//
-void CCopyObject::CopyObjectL( TUint32& aNewHandle )
+void CCopyObject::CopyObjectL()
{
PRINT( _L( "MM MTP => CCopyObject::CopyObjectL" ) );
+
TMTPResponseCode responseCode = EMTPRespCodeOK;
- aNewHandle = KMTPHandleNone;
GetParametersL();
RBuf newObjectName;
+ newObjectName.CreateL( KMaxFileName );
newObjectName.CleanupClosePushL(); // + newObjectName
- newObjectName.CreateL( KMaxFileName );
newObjectName = *iDest;
- const TDesC& suid( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
+ const TDesC& suid( iSourceObject->DesC( CMTPObjectMetaData::ESuid ) );
TParsePtrC fileNameParser( suid );
+ if ( ( newObjectName.Length() + fileNameParser.NameAndExt().Length() )
+ <= newObjectName.MaxLength() )
+ {
+ newObjectName.Append( fileNameParser.NameAndExt() );
+ responseCode = CanCopyObjectL( suid, newObjectName );
- // Check if the object is a folder or a file.
- TBool isFolder = EFalse;
- User::LeaveIfError( BaflUtils::IsFolder( iFramework.Fs(), suid, isFolder ) );
-
- if ( !isFolder )
- {
- if ( ( newObjectName.Length() + fileNameParser.NameAndExt().Length() ) <= newObjectName.MaxLength() )
+ TUint32 newHandle = KMTPHandleNone;
+ if ( responseCode == EMTPRespCodeOK )
{
- newObjectName.Append( fileNameParser.NameAndExt() );
- }
- responseCode = CanCopyObjectL( suid, newObjectName );
- }
- else // It is a folder.
- {
- TFileName rightMostFolderName;
- User::LeaveIfError( BaflUtils::MostSignificantPartOfFullName( suid,
- rightMostFolderName ) );
- if ( ( newObjectName.Length() + rightMostFolderName.Length() + 1 ) <= newObjectName.MaxLength() )
- {
- newObjectName.Append( rightMostFolderName );
- // Add backslash.
- _LIT( KBackSlash, "\\" );
- newObjectName.Append( KBackSlash );
+ newHandle = CopyFileL( newObjectName );
+ SendResponseL( EMTPRespCodeOK, 1, &newHandle );
+ PRINT2( _L( "MM MTP <= CCopyObject::CopyObjectL responseCode = 0x%x, aNewHandle = 0x%x" ),
+ responseCode,
+ newHandle );
}
- }
-
- delete iNewRootFolder;
- iNewRootFolder = NULL;
- iNewRootFolder = newObjectName.AllocL();
-
- if ( responseCode == EMTPRespCodeOK )
- {
- delete iFileMan;
- iFileMan = NULL;
- iFileMan = CFileMan::NewL( iFramework.Fs() );
-
- if ( !isFolder ) // It is a file.
- {
- aNewHandle = CopyFileL( newObjectName );
-// if ( responseCode == EMTPRespCodeOK )
- SendResponseL( EMTPRespCodeOK, 1, &aNewHandle );
-// else
-// SendResponseL( responseCode );
- }
- else // It is a folder.
- {
- delete iPathToCopy;
- iPathToCopy = NULL;
- iPathToCopy = suid.AllocL();
- PRINT1( _L( "MM MTP <> CCopyObject::CopyObjectL iPathToCopy = %S" ), iPathToCopy );
- aNewHandle = CopyFolderL( newObjectName );
- }
+ else
+ SendResponseL( responseCode );
}
else
- SendResponseL( responseCode );
+ // Destination is not appropriate for the full path name shouldn't be longer than 255
+ SendResponseL( EMTPRespCodeInvalidDataset );
CleanupStack::PopAndDestroy( &newObjectName ); // - newObjectName
- PRINT2( _L( "MM MTP <= CCopyObject::CopyObjectL responseCode = 0x%x, aNewHandle = 0x%x" ),
- responseCode, aNewHandle );
}
// -----------------------------------------------------------------------------
@@ -337,37 +177,41 @@
void CCopyObject::GetParametersL()
{
PRINT( _L( "MM MTP => CCopyObject::GetParametersL" ) );
+
__ASSERT_DEBUG( iRequestChecker, Panic( EMmMTPDpRequestCheckNull ) );
TUint32 objectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
iStorageId = Request().Uint32( TMTPTypeRequest::ERequestParameter2 );
- TUint32 parentObjectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter3 );
- PRINT3( _L( "MM MTP <> CCopyObject::GetParametersL Object Hanlde = 0x%x, StorageId = 0x%x, Parent Handle = 0x%x" ),
- objectHandle, iStorageId, parentObjectHandle );
+ iNewParentHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter3 );
+ PRINT3( _L( "MM MTP <> CCopyObject::GetParametersL Object Handle = 0x%x, StorageId = 0x%x, Parent Handle = 0x%x" ),
+ objectHandle,
+ iStorageId,
+ iNewParentHandle );
// not taking owernship
- iObjectInfo = iRequestChecker->GetObjectInfo( objectHandle );
- __ASSERT_DEBUG( iObjectInfo, Panic( EMmMTPDpObjectNull ) );
+ iSourceObject = iRequestChecker->GetObjectInfo( objectHandle );
+ __ASSERT_DEBUG( iSourceObject, Panic( EMmMTPDpObjectNull ) );
- if ( parentObjectHandle == 0 )
+ if ( iNewParentHandle == KMTPHandleNone )
{
SetDefaultParentObjectL();
}
else
{
- CMTPObjectMetaData* parentObjectInfo = iRequestChecker->GetObjectInfo( parentObjectHandle );
- __ASSERT_DEBUG( parentObjectInfo, Panic( EMmMTPDpObjectNull ) );
+ CMTPObjectMetaData* parentObject = iRequestChecker->GetObjectInfo( iNewParentHandle );
+ __ASSERT_DEBUG( parentObject, Panic( EMmMTPDpObjectNull ) );
+
delete iDest;
iDest = NULL;
- iDest = parentObjectInfo->DesC( CMTPObjectMetaData::ESuid ).AllocL();
- iNewParentHandle = parentObjectHandle;
+ iDest = parentObject->DesC( CMTPObjectMetaData::ESuid ).AllocL();
+ PRINT1( _L( "MM MTP <> CMoveObject::GetParametersL iDest = %S" ), iDest );
}
PRINT( _L( "MM MTP <= CCopyObject::GetParametersL" ) );
}
// -----------------------------------------------------------------------------
// CCopyObject::SetDefaultParentObjectL
-// Get a default parent object, ff the request does not specify a parent object,
+// Set a default destination, if the request does not specify a parent object,
// -----------------------------------------------------------------------------
//
void CCopyObject::SetDefaultParentObjectL()
@@ -376,11 +220,11 @@
delete iDest;
iDest = NULL;
- iDest = ( iFramework.StorageMgr().StorageL( iStorageId ).DesC(
- CMTPStorageMetaData::EStorageSuid ) ).AllocL();
- PRINT1( _L( "MM MTP <> CCopyObject::SetDefaultParentObjectL Destination location is %S" ), iDest );
+ iDest = iFramework.StorageMgr().StorageL( iStorageId ).DesC( CMTPStorageMetaData::EStorageSuid ).AllocL();
+
iNewParentHandle = KMTPHandleNoParent;
- PRINT( _L( "MM MTP <= CCopyObject::SetDefaultParentObjectL" ) );
+
+ PRINT1( _L( "MM MTP <= CCopyObject::SetDefaultParentObjectL, iDest = %S" ), iDest );
}
// -----------------------------------------------------------------------------
@@ -392,17 +236,18 @@
const TDesC& aNewName ) const
{
PRINT2( _L( "MM MTP => CCopyObject::CanCopyObjectL aOldName = %S, aNewName = %S" ),
- &aOldName, &aNewName );
+ &aOldName,
+ &aNewName );
TMTPResponseCode result = EMTPRespCodeOK;
TEntry fileEntry;
User::LeaveIfError( iFramework.Fs().Entry( aOldName, fileEntry ) );
- TDriveNumber drive( static_cast<TDriveNumber>( iFramework.StorageMgr().DriveNumber( iStorageId ) ) );
+ TInt drive = iFramework.StorageMgr().DriveNumber( iStorageId );
User::LeaveIfError( drive );
TVolumeInfo volumeInfo;
User::LeaveIfError( iFramework.Fs().Volume( volumeInfo, drive ) );
- if ( volumeInfo.iFree < fileEntry.iSize )
+ if ( volumeInfo.iFree < fileEntry.FileSize() )
{
result = EMTPRespCodeStoreFull;
}
@@ -433,7 +278,7 @@
#endif
}
// This is used to keep the same behavior in mass storage and device file manager.
- else if ( iObjectInfo->Uint( CMTPObjectMetaData::EFormatCode )
+ else if ( iSourceObject->Uint( CMTPObjectMetaData::EFormatCode )
== EMTPFormatCodeAbstractAudioVideoPlaylist )
{
PRINT( _L( "MM MTP <> CCopyObject::CanCopyObjectL playlist file can't copy" ) );
@@ -445,38 +290,62 @@
}
// -----------------------------------------------------------------------------
+// CCopyObject::CopyFileL
+// A helper function of CopyFileL
+// -----------------------------------------------------------------------------
+//
+TUint32 CCopyObject::CopyFileL( const TDesC& aNewFileName )
+ {
+ PRINT( _L( "MM MTP => CCopyObject::CopyFileL" ) );
+
+ GetPreviousPropertiesL();
+
+ // TODO: Need rollback mechanism for consistant with image dp in fw.
+ // Not sure if it should be trap if something wrong with MPX db.
+ TPtrC oldFileName( iSourceObject->DesC( CMTPObjectMetaData::ESuid ) );
+ TUint32 handle = AddObjectToStoreL( oldFileName, aNewFileName );
+
+ // Only leave when getting proplist element from data received by fw.
+ // It should not happen after ReceiveDataL in which construction of proplist already succeed.
+ SetPreviousPropertiesL();
+
+ CFileMan* fileMan = CFileMan::NewL( iFramework.Fs() );
+ User::LeaveIfError( fileMan->Copy( oldFileName, aNewFileName ) );
+ delete fileMan;
+ fileMan = NULL;
+
+ PRINT( _L( "MM MTP <= CCopyObject::CopyFileL" ) );
+ return handle;
+ }
+
+// -----------------------------------------------------------------------------
// CCopyObject::GetPreviousPropertiesL
// Save the object properties before doing the copy
// -----------------------------------------------------------------------------
//
-void CCopyObject::GetPreviousPropertiesL( const CMTPObjectMetaData& aObject )
+void CCopyObject::GetPreviousPropertiesL()
{
PRINT( _L( "MM MTP => CCopyObject::GetPreviousPropertiesL" ) );
- const TDesC& suid( aObject.DesC( CMTPObjectMetaData::ESuid ) );
-
- User::LeaveIfError( iFramework.Fs().Modified( suid, iPreviousModifiedTime ) );
-
- TUint formatCode = aObject.Uint( CMTPObjectMetaData::EFormatCode );
+ TUint formatCode = iSourceObject->Uint( CMTPObjectMetaData::EFormatCode );
const RArray<TUint>* properties = iDpConfig.GetSupportedPropertiesL( formatCode );
TInt count = properties->Count();
- CMTPTypeString* textData = NULL;
TInt err = KErrNone;
TUint16 propCode;
- TUint32 handle = aObject.Uint( CMTPObjectMetaData::EHandle ) ;
+ TUint32 handle = iSourceObject->Uint( CMTPObjectMetaData::EHandle );
- if ( iPropertyElement )
+ if ( iPropertyElement != NULL )
{
delete iPropertyElement;
iPropertyElement = NULL;
}
-
+
for ( TInt i = 0; i < count; i++ )
{
- propCode = (*properties)[i];
+ propCode = ( *properties )[i];
- switch( propCode )
+ switch ( propCode )
{
case EMTPObjectPropCodeStorageID:
case EMTPObjectPropCodeObjectFormat:
@@ -485,53 +354,51 @@
case EMTPObjectPropCodeObjectFileName:
case EMTPObjectPropCodeParentObject:
case EMTPObjectPropCodePersistentUniqueObjectIdentifier:
- case EMTPObjectPropCodeNonConsumable:
case EMTPObjectPropCodeDateCreated:
case EMTPObjectPropCodeDateModified:
break;
+ case EMTPObjectPropCodeNonConsumable:
+ iPropertyElement = &( iPropertyList->ReservePropElemL( handle, propCode ) );
+ iPropertyElement->SetUint8L( CMTPTypeObjectPropListElement::EValue,
+ iSourceObject->Uint( CMTPObjectMetaData::ENonConsumable ) );
+ break;
+
case EMTPObjectPropCodeName:
case EMTPObjectPropCodeDateAdded:
- if ( ( propCode == EMTPObjectPropCodeName )
- || ( ( !MmMtpDpUtility::IsVideoL( aObject.DesC( CMTPObjectMetaData::ESuid ), iFramework ) )
- && ( propCode == EMTPObjectPropCodeDateAdded ) ) )
- {
- textData = CMTPTypeString::NewLC(); // + textData
+ case EMTPObjectPropCodeAlbumArtist:
+ {
+ CMTPTypeString* textData = CMTPTypeString::NewLC(); // + textData
- TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( propCode,
- *textData,
- aObject ) );
+ TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( propCode,
+ *textData,
+ *iSourceObject ) );
- PRINT1( _L( "MM MTP <> CCopyObject::GetPreviousPropertiesL::ServiceSpecificObjectPropertyL err = %d" ), err );
+ PRINT1( _L( "MM MTP <> CCopyObject::GetPreviousPropertiesL err = %d" ), err );
- if ( err == KErrNone )
- {
- iPropertyElement = &(iPropertyList->ReservePropElemL(handle, propCode));
- iPropertyElement->SetStringL(CMTPTypeObjectPropListElement::EValue, textData->StringChars());
-// iPropertyElement = CMTPTypeObjectPropListElement::NewL(
-// handle, propCode, *textData );
- }
- else if ( err == KErrNotFound )
- {
- iPropertyElement = NULL;
- }
- else
- {
- User::Leave( err );
- }
+ if ( err == KErrNone )
+ {
+ iPropertyElement = &( iPropertyList->ReservePropElemL( handle, propCode ) );
+ iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue,
+ textData->StringChars() );
+ }
+ else
+ {
+ iPropertyElement = NULL;
+ }
- CleanupStack::PopAndDestroy( textData ); // - textData
- }
+ CleanupStack::PopAndDestroy( textData ); // - textData
+ }
break;
default:
{
- ServiceGetSpecificObjectPropertyL( propCode, handle, aObject );
+ ServiceGetSpecificObjectPropertyL( propCode, handle, *iSourceObject );
}
break;
}
- if ( iPropertyElement )
+ if ( iPropertyElement != NULL )
{
iPropertyList->CommitPropElemL( *iPropertyElement );
iPropertyElement = NULL;
@@ -542,78 +409,29 @@
}
// -----------------------------------------------------------------------------
-// CCopyObject::ServiceMetaDataToWrapper
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TMTPResponseCode CCopyObject::ServiceMetaDataToWrapper(
- const TUint16 aPropCode,
- MMTPType& aNewData,
- const CMTPObjectMetaData& aObject )
- {
- TMTPResponseCode resCode = EMTPRespCodeOK;
-
- TRAPD( err, iDpConfig.GetWrapperL().SetObjectMetadataValueL( aPropCode,
- aNewData,
- aObject ) );
-
- PRINT1( _L("MM MTP <> CCopyObject::ServiceMetaDataToWrapper err = %d"), err);
-
- if ( err == KErrNone )
- {
- resCode = EMTPRespCodeOK;
- }
- else if ( err == KErrTooBig )
- // according to the codes of S60
- {
- resCode = EMTPRespCodeInvalidDataset;
- }
- else if ( err == KErrPermissionDenied )
- {
- resCode = EMTPRespCodeAccessDenied;
- }
- else if ( err == KErrNotFound )
- {
- if ( MmMtpDpUtility::HasMetadata( aObject.Uint( CMTPObjectMetaData::EFormatCode ) ) )
- resCode = EMTPRespCodeAccessDenied;
- else
- resCode = EMTPRespCodeOK;
- }
- else
- {
- resCode = EMTPRespCodeGeneralError;
- }
-
- PRINT1( _L("MM MTP <= CCopyObject::ServiceMetaDataToWrapper resCode = 0x%x"), resCode);
-
- return resCode;
- }
-
-// -----------------------------------------------------------------------------
// CCopyObject::SetPreviousPropertiesL
// Set the object properties after doing the copy
// -----------------------------------------------------------------------------
//
-void CCopyObject::SetPreviousPropertiesL( const CMTPObjectMetaData& aObject )
+void CCopyObject::SetPreviousPropertiesL()
{
PRINT( _L( "MM MTP => CCopyObject::SetPreviousPropertiesL" ) );
- const TInt count( iPropertyList->NumberOfElements() );
- PRINT1( _L( "MM MTP <> CCopyObject::SetPreviousPropertiesL count = %d" ), count );
+
TMTPResponseCode respcode = EMTPRespCodeOK;
- CMTPTypeString* stringData = NULL;
+
iPropertyList->ResetCursor();
+ const TInt count = iPropertyList->NumberOfElements();
for ( TInt i = 0; i < count; i++ )
{
CMTPTypeObjectPropListElement& element = iPropertyList->GetNextElementL();
- TUint32 handle = element.Uint32L(
- CMTPTypeObjectPropListElement::EObjectHandle );
- TUint16 propertyCode = element.Uint16L(
- CMTPTypeObjectPropListElement::EPropertyCode );
- TUint16 dataType = element.Uint16L(
- CMTPTypeObjectPropListElement::EDatatype );
+ TUint32 handle = element.Uint32L( CMTPTypeObjectPropListElement::EObjectHandle );
+ TUint16 propertyCode = element.Uint16L( CMTPTypeObjectPropListElement::EPropertyCode );
+ TUint16 dataType = element.Uint16L( CMTPTypeObjectPropListElement::EDatatype );
PRINT3( _L( "MM MTP <> CCopyObject::SetPreviousPropertiesL = 0x%x, propertyCode = 0x%x, dataType = 0x%x" ),
- handle, propertyCode, dataType );
+ handle,
+ propertyCode,
+ dataType );
switch ( propertyCode )
{
@@ -624,21 +442,28 @@
case EMTPObjectPropCodeObjectFileName:
case EMTPObjectPropCodeParentObject:
case EMTPObjectPropCodePersistentUniqueObjectIdentifier:
- case EMTPObjectPropCodeNonConsumable:
case EMTPObjectPropCodeDateCreated:
case EMTPObjectPropCodeDateModified:
case EMTPObjectPropCodeDateAdded:
break;
+ case EMTPObjectPropCodeNonConsumable:
+ iTargetObject->SetUint( CMTPObjectMetaData::ENonConsumable,
+ element.Uint8L( CMTPTypeObjectPropListElement::EValue ) );
+ // should wait all property setting finished then insert object, or not?
+ // need to investigate if it will affect performance result
+ iFramework.ObjectMgr().ModifyObjectL( *iTargetObject );
+ break;
+
case EMTPObjectPropCodeName:
+ case EMTPObjectPropCodeAlbumArtist:
{
- stringData = CMTPTypeString::NewLC(
- element.StringL(
- CMTPTypeObjectPropListElement::EValue)); // + stringData
+ CMTPTypeString *stringData = CMTPTypeString::NewLC( element.StringL( CMTPTypeObjectPropListElement::EValue ) ); // + stringData
- respcode = ServiceMetaDataToWrapper( propertyCode,
+ respcode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig,
+ propertyCode,
*stringData,
- aObject );
+ *iTargetObject );
CleanupStack::PopAndDestroy( stringData ); // - stringData
}
@@ -646,17 +471,19 @@
default:
{
- respcode = ServiceSetSpecificObjectPropertyL( propertyCode,
- aObject,
- element );
+ respcode = iDpConfig.PropSettingUtility()->SetSpecificObjectPropertyL( iDpConfig,
+ propertyCode,
+ *iTargetObject,
+ element );
}
break;
}
} // end of for loop
- if( respcode == EMTPRespCodeOK )
+ // ignore errors
+ if ( respcode == EMTPRespCodeOK )
{
- // do nothing, ignore warning
+ // do nothing, just to get rid of build warning
}
PRINT1( _L( "MM MTP <= CCopyObject::SetPreviousPropertiesL respcode = 0x%x" ), respcode );
@@ -667,168 +494,42 @@
// Update object info in the database
// -----------------------------------------------------------------------------
//
-TUint32 CCopyObject::UpdateObjectInfoL( const TDesC& aOldObjectName, const TDesC& aNewObjectName )
+TUint32 CCopyObject::AddObjectToStoreL( const TDesC& aOldObjectName,
+ const TDesC& aNewObjectName )
{
- PRINT2( _L( "MM MTP => CCopyObject::UpdateObjectInfoL aOldObjectName = %S, aNewObjectName = %S" ),
- &aOldObjectName, &aNewObjectName );
- // We should not modify this object's handle, so just get a "copy".
- CMTPObjectMetaData* objectInfo = CMTPObjectMetaData::NewLC(); // + objectInfo
- const TMTPTypeUint32 objectHandle( iObjectInfo->Uint( CMTPObjectMetaData::EHandle ) );
- if ( iFramework.ObjectMgr().ObjectL( objectHandle, *objectInfo) )
+ PRINT2( _L( "MM MTP => CCopyObject::AddObjectToStoreL aOldObjectName = %S, aNewObjectName = %S" ),
+ &aOldObjectName,
+ &aNewObjectName );
+
+ iTargetObject = CMTPObjectMetaData::NewL();
+
+ // 1. Add new object into objectMgr db
+ iTargetObject->SetUint( CMTPObjectMetaData::EDataProviderId, iSourceObject->Uint( CMTPObjectMetaData::EDataProviderId ) );
+ TUint formatCode = iSourceObject->Uint( CMTPObjectMetaData::EFormatCode );
+ iTargetObject->SetUint( CMTPObjectMetaData::EFormatCode, formatCode );
+ TUint subFormatCode = iSourceObject->Uint( CMTPObjectMetaData::EFormatSubCode );
+ iTargetObject->SetUint( CMTPObjectMetaData::EFormatSubCode, subFormatCode );
+ iTargetObject->SetUint( CMTPObjectMetaData::EParentHandle, iNewParentHandle );
+ iTargetObject->SetUint( CMTPObjectMetaData::EStorageId, iStorageId );
+ iTargetObject->SetDesCL( CMTPObjectMetaData::ESuid, aNewObjectName );
+ iFramework.ObjectMgr().InsertObjectL( *iTargetObject );
+
+ // 2. Add new object into MPX db
+ iDpConfig.GetWrapperL().AddObjectL( *iTargetObject );
+
+ // 3. Set references into references db
+ if ( formatCode == EMTPFormatCodeM3UPlaylist )
{
- objectInfo->SetDesCL( CMTPObjectMetaData::ESuid, aNewObjectName );
- objectInfo->SetUint( CMTPObjectMetaData::EParentHandle,
- iNewParentHandle );
- // Modify storage Id.
- objectInfo->SetUint( CMTPObjectMetaData::EStorageId, iStorageId );
- iFramework.ObjectMgr().InsertObjectL( *objectInfo );
- }
- else
- {
- User::Leave( KErrCorrupt );
+ MMTPReferenceMgr& referenceMgr = iFramework.ReferenceMgr();
+ CDesCArray* references = referenceMgr.ReferencesLC( aOldObjectName ); // + references
+ referenceMgr.SetReferencesL( aNewObjectName, *references );
+ CleanupStack::PopAndDestroy( references ); // - references
}
- TUint32 handle = objectInfo->Uint( CMTPObjectMetaData::EHandle );
- PRINT1( _L( "MM MTP <> CCopyObject::UpdateObjectInfoL handle = 0x%x" ), handle );
- SetPropertiesL( aOldObjectName, aNewObjectName, *objectInfo );
- CleanupStack::PopAndDestroy( objectInfo ); // - objectInfo
- PRINT( _L( "MM MTP <= CCopyObject::UpdateObjectInfoL" ) );
+ TUint32 handle = iTargetObject->Uint( CMTPObjectMetaData::EHandle );
+
+ PRINT1( _L( "MM MTP <= CCopyObject::AddObjectToStoreL handle = 0x%x" ), handle );
return handle;
}
-// -----------------------------------------------------------------------------
-// CCopyObject::CopyAndUpdateL
-// Move a single object and update the database
-// -----------------------------------------------------------------------------
-//
-void CCopyObject::CopyAndUpdateL( TUint32 aObjectHandle )
- {
- PRINT1( _L( "MM MTP => CopyObject::CopyAndUpdateL aObjectHanlde = 0x%x" ), aObjectHandle );
- CMTPObjectMetaData* objectInfo = CMTPObjectMetaData::NewLC(); // + objectInfo
-
- if ( iFramework.ObjectMgr().ObjectL( aObjectHandle, *objectInfo ) )
- {
- // This is used to keep the same behavior in mass storage and device file manager.
- if ( objectInfo->Uint( CMTPObjectMetaData::EFormatCode )
- == EMTPFormatCodeAbstractAudioVideoPlaylist )
- {
- PRINT( _L( "MM MTP <> CopyObject::CopyAndUpdateL Playlist file don't to be copieds" ) );
- CleanupStack::PopAndDestroy( objectInfo ); // - objectInfo
- return;
- }
-
- RBuf fileName; // This is the source object name.
- fileName.CleanupClosePushL(); // + fileName
- fileName.CreateL( KMaxFileName );
-
- RBuf oldFileName;
- oldFileName.CleanupClosePushL(); // + oldFileName
- oldFileName.CreateL( KMaxFileName );
-
- RBuf rightPartName;
- rightPartName.CleanupClosePushL(); // + rightPartName
- rightPartName.CreateL( KMaxFileName );
-
- fileName = objectInfo->DesC( CMTPObjectMetaData::ESuid );
- oldFileName = fileName;
-
- rightPartName = fileName.Right( fileName.Length()
- - iPathToCopy->Length() );
-
- if ( ( iNewRootFolder->Length() + rightPartName.Length() ) > fileName.MaxLength() )
- {
- User::Leave( KErrCorrupt );
- }
-
- fileName.Zero();
- fileName.Append( *iNewRootFolder );
- fileName.Append( rightPartName );
- PRINT1( _L( "MM MTP <> CopyAndUpdateL fileName = %S" ), &fileName );
-
- if ( objectInfo->Uint( CMTPObjectMetaData::EDataProviderId )
- == iFramework.DataProviderId() )
- {
- // should copy before the set metadata DB
- GetPreviousPropertiesL( *objectInfo );
- TInt err = iFileMan->Copy( oldFileName, fileName );
- PRINT1( _L( "MM MTP <> CCopyObject::CopyAndUpdateL err = %d" ), err );
- User::LeaveIfError( err );
- User::LeaveIfError( iFramework.Fs().SetModified( fileName,
- iPreviousModifiedTime ) );
-
- // Modify Suid
- objectInfo->SetDesCL( CMTPObjectMetaData::ESuid, fileName );
-
- // Modify parentHandle
- TParsePtrC parentSuid( fileName );
- PRINT1( _L( "MM MTP <> CCopyObject::CopyAndUpdateL parentSuid = %S" ), &(parentSuid.DriveAndPath()) );
-
- TUint32 parentHandle = iFramework.ObjectMgr().HandleL( parentSuid.DriveAndPath() );
- objectInfo->SetUint( CMTPObjectMetaData::EParentHandle, parentHandle );
- PRINT1( _L( "MM MTP <> CCopyObject::CopyAndUpdateL parentHandle = 0x%x" ), parentHandle );
-
- // Modify storage Id.
- objectInfo->SetUint( CMTPObjectMetaData::EStorageId, iStorageId );
- TRAP( err, iFramework.ObjectMgr().InsertObjectL( *objectInfo ) );
- if ( err != KErrNone )
- PRINT1( _L( "MM MTP <> CCopyObject::CopyAndUpdateL err = %d" ), err );
- // Set the properties of the new object
- SetPropertiesL( oldFileName, fileName, *objectInfo );
- }
- // Else this is not the owner of this object, so don't update the object store.
-
- CleanupStack::PopAndDestroy( &rightPartName ); // - rightPartName
- CleanupStack::PopAndDestroy( &oldFileName ); // - oldFileName
- CleanupStack::PopAndDestroy( &fileName ); // - fileName
- }
- else
- {
- User::Leave( KErrCorrupt );
- }
-
- CleanupStack::PopAndDestroy( objectInfo ); // - objectInfo
-
- PRINT( _L( "MM MTP <= CopyObject::CopyAndUpdateL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CCopyObject::SetPropertiesL
-// Set the object properties in the object property store
-// -----------------------------------------------------------------------------
-//
-void CCopyObject::SetPropertiesL( const TDesC& aOldFileName,
- const TDesC& aNewFileName,
- const CMTPObjectMetaData& aObject )
- {
- PRINT( _L( "MM MTP => CCopyObject::SetPropertiesL" ) );
- // won't leave with KErrAlreadyExist
- iDpConfig.GetWrapperL().AddObjectL( aNewFileName );
-
- TUint formatCode = aObject.Uint( CMTPObjectMetaData::EFormatCode );
- if ( formatCode == EMTPFormatCodeM3UPlaylist )
- {
- MMTPReferenceMgr& referenceMgr = iFramework.ReferenceMgr();
- CDesCArray* references = referenceMgr.ReferencesLC( aOldFileName ); // + references
- referenceMgr.SetReferencesL( aNewFileName, *references );
- CleanupStack::PopAndDestroy( references ); // - references
- }
-
- SetPreviousPropertiesL( aObject );
- PRINT( _L( "MM MTP <= CCopyObject::SetPropertiesL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CCopyObject::RunError
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CCopyObject::RunError( TInt aError )
- {
- if ( aError != KErrNone )
- PRINT1( _L( "MM MTP <> CCopyObject::RunError aError = %d" ), aError );
-
- TRAP_IGNORE( SendResponseL( EMTPRespCodeGeneralError ) );
- return KErrNone;
- }
-
// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,16 +16,17 @@
*/
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/mmtpobjectmgr.h>
-#include <mtp/cmtpobjectmetadata.h>
+#include <mtp/mmtpreferencemgr.h>
#include "cdeleteobject.h"
#include "mmmtpdplogger.h"
#include "mmmtpdpconfig.h"
#include "cmmmtpdpmetadataaccesswrapper.h"
+#include "mmmtpdputility.h"
-// static const TInt KMTPDriveGranularity = 5;
+const TInt KMaxDeletionTimes = 10;
+const TInt KDeletionThreshold = 100 * 1000; // (100 millisec)
// -----------------------------------------------------------------------------
// Verification data for the DeleteObject request
@@ -63,7 +64,6 @@
void CDeleteObject::ConstructL()
{
CActiveScheduler::Add( this );
- SetPSStatus();
}
// -----------------------------------------------------------------------------
@@ -89,9 +89,7 @@
aConnection,
sizeof( KMTPDeleteObjectPolicy ) / sizeof( TMTPRequestElementInfo ),
KMTPDeleteObjectPolicy ),
- iObjectMgr( aFramework.ObjectMgr() ),
- iFs( aFramework.Fs() ),
- iObjectsToDelete( KMmMtpRArrayGranularity ),
+ iObjectsToDelete( KMmMtpRArrayGranularity ),
iDeleteError( KErrNone ),
iDpConfig( aDpConfig )
{
@@ -105,6 +103,8 @@
//
EXPORT_C void CDeleteObject::ServiceL()
{
+ MmMtpDpUtility::SetPSStatus( EMtpPSStatusActive );
+
iObjectsToDelete.Reset();
iDeleteError = KErrNone;
TUint32 objectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
@@ -126,7 +126,6 @@
{
iIsMultiDelete = EFalse;
// Not Owned the object
- // TODO: need to check if this is best way and if it is applicable to other processors
CMTPObjectMetaData* objectInfo = iRequestChecker->GetObjectInfo( objectHandle );
if ( objectInfo->Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeAssociation )
@@ -191,9 +190,10 @@
CMTPObjectMetaData* objectInfo = CMTPObjectMetaData::NewLC(); // + objectInfo
TUint32 handle = iObjectsToDelete[0];
- iObjectMgr.ObjectL( handle, *objectInfo );
- TFileName fileName( objectInfo->DesC( CMTPObjectMetaData::ESuid ) );
- PRINT2( _L( "MM MTP <> CDeleteObject::RunL delete object handle is 0x%x, fileName is %S" ), handle, &fileName );
+ iFramework.ObjectMgr().ObjectL( handle, *objectInfo );
+ PRINT2( _L( "MM MTP <> CDeleteObject::RunL delete object handle is 0x%x, fileName is %S" ),
+ handle,
+ &( objectInfo->DesC( CMTPObjectMetaData::ESuid ) ) );
if ( objectInfo->Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeAssociation )
{
@@ -222,17 +222,14 @@
//
void CDeleteObject::DeleteObjectL( const CMTPObjectMetaData& aObjectInfo )
{
- TFileName fileName( aObjectInfo.DesC( CMTPObjectMetaData::ESuid ) );
+ TPtrC fileName( aObjectInfo.DesC( CMTPObjectMetaData::ESuid ) );
PRINT1( _L( "MM MTP <> CDeleteObject::DeleteObjectL fileName = %S" ), &fileName );
- TParsePtrC parse( fileName );
- iDpConfig.GetWrapperL().SetStorageRootL( parse.Drive() );
-
// To capture special situation: After copy, move, rename playlist folder name,
// record in MPX is not inlined with framework db, playlist should not be deleted
// until next session.
// This is used to keep the same behavior in mass storage and device file manager.
- if ( aObjectInfo.Uint(CMTPObjectMetaData::EFormatCode )
+ if ( aObjectInfo.Uint( CMTPObjectMetaData::EFormatCode )
== EMTPFormatCodeAbstractAudioVideoPlaylist
&& !iDpConfig.GetWrapperL().IsExistL( fileName ) )
{
@@ -243,26 +240,45 @@
// 1. Delete object from file system
TEntry fileInfo;
- iFs.Entry( fileName, fileInfo );
+ iFramework.Fs().Entry( fileName, fileInfo );
if ( fileInfo.IsReadOnly() )
{
iDeleteError = KErrAccessDenied;
PRINT1( _L( "MM MTP <= CDeleteObject::DeleteObjectL, \"%S\" is a read-only file"), &fileName );
return;
}
- iDeleteError = iFs.Delete( fileName );
- if ( iDeleteError != KErrNone && iDeleteError != KErrNotFound )
+ // Some other component might be holding on to the file (MDS background harvesting),
+ // try again after 100 millisec, up to 10 times, before give up
+ TInt count = KMaxDeletionTimes;
+ while ( count > 0 )
{
- PRINT1( _L( "MM MTP <= CDeleteObject::DeleteObjectL, Delete from file system failed, err = %d" ), iDeleteError );
- return;
+ iDeleteError = iFramework.Fs().Delete( fileName );
+ if ( iDeleteError == KErrNone || iDeleteError == KErrNotFound )
+ {
+ break;
+ }
+ else if ( ( iDeleteError == KErrInUse ) && ( count > 1 ) )
+ {
+ User::After( KDeletionThreshold );
+ count--;
+ }
+ else
+ {
+ PRINT1( _L( "MM MTP <= CDeleteObject::DeleteObjectL, Delete from file system failed, err = %d" ), iDeleteError );
+ return;
+ }
}
// 2. Delete object from metadata db
- TRAP( iDeleteError, iDpConfig.GetWrapperL().DeleteObjectL( fileName, aObjectInfo.Uint( CMTPObjectMetaData::EFormatCode ) ));
+ TRAP( iDeleteError, iDpConfig.GetWrapperL().DeleteObjectL( aObjectInfo ) );
PRINT1( _L( "MM MTP <> CDeleteObject::DeleteObjectL, Delete from Media DB, err = %d" ), iDeleteError );
// 3. Delete object from framework db
- iObjectMgr.RemoveObjectL( aObjectInfo.Uint( CMTPObjectMetaData::EHandle ) );
+ iFramework.ObjectMgr().RemoveObjectL( aObjectInfo.Uint( CMTPObjectMetaData::EHandle ) );
+
+ // 4. If the object has references, Delete references from reference manager
+ if ( MmMtpDpUtility::HasReference( aObjectInfo.Uint( CMTPObjectMetaData::EFormatCode ) ) )
+ iFramework.ReferenceMgr().RemoveReferencesL( aObjectInfo.DesC( CMTPObjectMetaData::ESuid ) );
PRINT( _L( "MM MTP <= CDeleteObject::DeleteObjectL" ) );
}
@@ -298,10 +314,14 @@
{
SendResponseL( EMTPRespCodePartialDeletion );
}
- else if( !iIsMultiDelete && iDeleteError == KErrAccessDenied )
+ else if ( !iIsMultiDelete && iDeleteError == KErrAccessDenied )
{
SendResponseL( EMTPRespCodeObjectWriteProtected );
}
+ else if ( iDeleteError == KErrInUse )
+ {
+ SendResponseL( EMTPRespCodeDeviceBusy );
+ }
else
{
SendResponseL( EMTPRespCodeAccessDenied );
@@ -342,7 +362,7 @@
else
{
CMTPObjectMetaData* objectInfo = CMTPObjectMetaData::NewLC(); // + objectInfo
- iObjectMgr.ObjectL( handles[i], *objectInfo );
+ iFramework.ObjectMgr().ObjectL( handles[i], *objectInfo );
if ( EMTPFormatCodeAssociation == objectInfo->Uint( CMTPObjectMetaData::EFormatCode ) )
{
GetObjectHandlesL( KMTPStorageAll, handles[i] );
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdescriptionutility.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,229 @@
+/*
+* 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 <mtp/cmtptypeinterdependentpropdesc.h>
+#include <mtp/cmtptypeobjectpropdesc.h>
+#include <mtp/cmtptypestring.h>
+
+#include "cdescriptionutility.h"
+#include "tobjectdescription.h"
+
+#include "mmmtpdplogger.h"
+
+
+_LIT( KMtpObjDescObjFileName,
+ "[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 7}\\.[[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 2}]?" );
+// RegEx is [a-zA-Z!#\$%&'\(\)\-0-9@\^_\`\{\}\~][a-zA-Z!#\$%&'\(\)\-0-9@\^_\`\{\}\~ ]{0, 7}\.[[a-zA-Z!#\$%&'\(\)\-0-9@\^_\`\{\}\~][a-zA-Z!#\$%&'\(\)\-0-9@\^_\`\{\}\~ ]{0, 2}]?
+
+EXPORT_C CDescriptionUtility::CDescriptionUtility()
+ {
+ // Do nothing
+ }
+
+EXPORT_C CDescriptionUtility::~CDescriptionUtility()
+ {
+ // Do nothing
+ }
+
+CMTPTypeObjectPropDesc* CDescriptionUtility::NewCommonObjectPropertyL( TUint16 aPropCode )
+ {
+ CMTPTypeObjectPropDesc* propertyDesc = NULL;
+
+ switch ( aPropCode )
+ {
+ case EMTPObjectPropCodeStorageID:
+ case EMTPObjectPropCodeObjectFormat:
+ case EMTPObjectPropCodeObjectSize:
+ case EMTPObjectPropCodeParentObject:
+ case EMTPObjectPropCodePersistentUniqueObjectIdentifier:
+ case EMTPObjectPropCodeName:
+ case EMTPObjectPropCodeDateAdded:
+ case EMTPObjectPropCodeAlbumArtist:
+ propertyDesc = CMTPTypeObjectPropDesc::NewL( aPropCode );
+ break;
+
+ // Protection Status (m)
+ case EMTPObjectPropCodeProtectionStatus:
+ propertyDesc = NewProtectionStatusPropDescL();
+ break;
+
+ // FileName
+ case EMTPObjectPropCodeObjectFileName:
+ propertyDesc = NewFileNamePropDescL();
+ break;
+
+ // Consumable (m)
+ case EMTPObjectPropCodeNonConsumable:
+ propertyDesc = NewNonConsumablePropDescL();
+ break;
+
+ case EMTPObjectPropCodeDateModified: // Date Modified
+ case EMTPObjectPropCodeDateCreated: // Date Created
+ {
+ CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
+ propertyInfo.iDataType = EMTPTypeString;
+ propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::EDateTimeForm;
+ propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadOnly;
+ propertyDesc = CMTPTypeObjectPropDesc::NewL( aPropCode,
+ propertyInfo,
+ NULL );
+ }
+ break;
+
+ default:
+ break;
+ }
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CDescriptionUtility::NewRangeFormDescriptionL
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMTPTypeObjectPropDesc* CDescriptionUtility::NewRangeFormDescriptionL( TUint16 aPropertyCode,
+ TUint32 aMinValue,
+ TUint32 aMaxValue,
+ TUint32 aStepValue,
+ TBool aIsReadOnly )
+ {
+ PRINT1( _L( "MM MTP => CDescriptionUtility::NewRangeFormDescriptionL, aPropertyCode = 0x%x" ),
+ aPropertyCode );
+ CMTPTypeObjectPropDescRangeForm* form =
+ CMTPTypeObjectPropDescRangeForm::NewLC( EMTPTypeUINT32 ); // + form
+
+ // Set expected values
+ form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMinimumValue, aMinValue );
+ form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EMaximumValue, aMaxValue );
+ form->SetUint32L( CMTPTypeObjectPropDescRangeForm::EStepSize, aStepValue );
+
+ CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
+ propertyInfo.iDataType = EMTPTypeUINT32;
+ propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::ERangeForm;
+ propertyInfo.iGetSet = !aIsReadOnly;
+
+ CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( aPropertyCode,
+ propertyInfo,
+ form ); // + propertyDesc
+
+ CleanupStack::PopAndDestroy( form ); // - form
+ PRINT( _L( "MM MTP <= CDescriptionUtility::NewRangeFormDescriptionL" ) );
+
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CDescriptionUtility::GetGroupCode
+// Get MTPTypeObjectPropDesc according to property code
+// -----------------------------------------------------------------------------
+//
+TUint32 CDescriptionUtility::GetGroupCode( TUint32 aPropCode )
+ {
+ TInt count = sizeof( KPropGroupMapTable ) / sizeof( KPropGroupMapTable[0] );
+
+ for( TInt i = 0; i < count; i++ )
+ {
+ if ( aPropCode == KPropGroupMapTable[i].iPropCode )
+ return KPropGroupMapTable[i].iGroupCode;
+ }
+ return EGroupCodeNotDefined;
+ }
+
+// -----------------------------------------------------------------------------
+// CDescriptionUtility::NewProtectionStatusPropDescL
+// New MTPTypeObjectPropDesc protection status
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CDescriptionUtility::NewProtectionStatusPropDescL()
+ {
+ PRINT( _L( "MM MTP => CDescriptionUtility::NewProtectionStatusPropDescL" ) );
+
+ CMTPTypeObjectPropDescEnumerationForm* expectedForm =
+ CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT16 ); // + expectedForm
+
+ TUint16 values[] =
+ {
+ EMTPProtectionNoProtection,
+ EMTPProtectionReadOnly
+ };
+
+ TInt numValues = sizeof ( values ) / sizeof ( values[0] ) ;
+ for ( TInt i = 0; i < numValues; i++ )
+ {
+ TMTPTypeUint16 data( values[i] );
+ expectedForm->AppendSupportedValueL( data );
+ }
+
+ CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeProtectionStatus, *expectedForm );
+ CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
+
+ PRINT( _L( "MM MTP <= CDescriptionUtility::NewProtectionStatusPropDescL" ) );
+ return propertyDesc;
+ }
+
+// -----------------------------------------------------------------------------
+// CDescriptionUtility::NewFileNamePropDescL
+// Get MTPTypeObjectPropDesc New file name
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CDescriptionUtility::NewFileNamePropDescL()
+ {
+ PRINT( _L( "MM MTP => CDescriptionUtility::NewFileNamePropDescL" ) );
+ CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName ); // + form
+
+ CMTPTypeObjectPropDesc* ret = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeObjectFileName,
+ CMTPTypeObjectPropDesc::ERegularExpressionForm,
+ form );
+
+ CleanupStack::PopAndDestroy( form ); // - form
+ PRINT( _L( "MM MTP <= CDescriptionUtility::NewFileNamePropDescL" ) );
+ return ret;
+ }
+
+// -----------------------------------------------------------------------------
+// CDescriptionUtility::NewFileNamePropDescL
+// Get MTPTypeObjectPropDesc New file name
+// -----------------------------------------------------------------------------
+//
+CMTPTypeObjectPropDesc* CDescriptionUtility::NewNonConsumablePropDescL()
+ {
+ PRINT( _L( "MM MTP => CDescriptionUtility::NewNonConsumablePropDescL" ) );
+ CMTPTypeObjectPropDescEnumerationForm* expectedForm =
+ CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT8 ); // + expectedForm
+ TUint8 values[] =
+ {
+ EMTPConsumable,
+ EMTPNonConsumable
+ };
+
+ TInt numValues = sizeof ( values ) / sizeof ( values[0] );
+ for ( TInt i = 0; i < numValues; i++ )
+ {
+ TMTPTypeUint8 data( values[i] );
+ expectedForm->AppendSupportedValueL( data );
+ }
+
+ CMTPTypeObjectPropDesc* ret = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeNonConsumable,
+ CMTPTypeObjectPropDesc::EEnumerationForm,
+ expectedForm );
+ CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
+
+ PRINT( _L( "MM MTP <= CDescriptionUtility::NewNonConsumablePropDescL" ) );
+ return ret;
+ }
+
+// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetformatcapabilities.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetformatcapabilities.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -11,50 +11,63 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
#include <mtp/cmtptypeinterdependentpropdesc.h>
#include <mtp/cmtptypeobjectpropdesc.h>
-#include <mtp/mtpprotocolconstants.h>
-#include <mtp/mmtpdataproviderframework.h>
-#include <mtp/cmtptypestring.h>
-
#include "cgetformatcapabilities.h"
-#include "mmmtpdplogger.h"
+#include "cdescriptionutility.h"
#include "mmmtpdpconfig.h"
-#include "tobjectdescription.h"
+#include "mmmtpdplogger.h"
-_LIT( KMtpObjDescObjFileName, "[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 7}\\.[[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 2}]?" );
+// -----------------------------------------------------------------------------
+// CGetFormatCapabilities::NewL
+// Constructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C MMmRequestProcessor* CGetFormatCapabilities::NewL( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig )
+ {
+ CGetFormatCapabilities* self = new ( ELeave ) CGetFormatCapabilities( aFramework, aConnection, aDpConfig );
+
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+
+ return self;
+ }
// -----------------------------------------------------------------------------
// CGetFormatCapabilities::CGetFormatCapabilities
// Standard c++ constructor
// -----------------------------------------------------------------------------
//
-EXPORT_C CGetFormatCapabilities::CGetFormatCapabilities( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig ) :
- CRequestProcessor( aFramework, aConnection, 0, NULL ),
- iDpConfig( aDpConfig )
+CGetFormatCapabilities::CGetFormatCapabilities( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig ) :
+ CRequestProcessor( aFramework, aConnection, 0, NULL ),
+ iDpConfig( aDpConfig )
{
PRINT( _L( "Operation: CGetFormatCapabilities(0x930A)" ) );
}
// -----------------------------------------------------------------------------
// CGetFormatCapabilities::ConstructL
-// Second phase constructor
+// The second phase constructor
// -----------------------------------------------------------------------------
//
-EXPORT_C void CGetFormatCapabilities::ConstructL()
+void CGetFormatCapabilities::ConstructL()
{
+ // Do nothing
}
// -----------------------------------------------------------------------------
// CGetFormatCapabilities::~CGetFormatCapabilities
-// Second phase constructor
+// Destructor
// -----------------------------------------------------------------------------
//
EXPORT_C CGetFormatCapabilities::~CGetFormatCapabilities()
@@ -91,7 +104,7 @@
}
}
- PRINT1( _L( "MM MTP <= CGetFormatCapabilities::CheckRequestL, response = 0x%X" ), response );
+ PRINT1( _L( "MM MTP <= CGetFormatCapabilities::CheckRequestL, response = 0x%x" ), response );
return response;
}
@@ -108,7 +121,6 @@
iCapabilityList = NULL;
iCapabilityList = CMTPTypeFormatCapabilityList::NewL();
- iFormatCode = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
if ( KMTPFormatsAll == iFormatCode )
{
@@ -117,102 +129,55 @@
for( TInt i = 0; i < count; i++ )
{
PRINT( _L( "MM MTP <> CGetFormatCapabilities::ServiceL, KMTPFormatsAll!!!" ) );
+
iFormatCode = ( *formatArray )[i];
- ServiceInterdepentPropDescL();
- CMTPTypeFormatCapability* frmCap = CMTPTypeFormatCapability::NewL( iFormatCode, iInterdependentPropDesc );
- const RArray<TUint>* propertiesArray = iDpConfig.GetSupportedPropertiesL( iFormatCode );
- TInt num = propertiesArray->Count();
- for( TInt j = 0;j < num; j++ )
- {
- CMTPTypeObjectPropDesc* propertyDesc = ServicePropDescL( (*propertiesArray)[j] );
- if ( propertyDesc != NULL )
- {
- frmCap->AppendL( propertyDesc );
- }
- }//end for j
- iCapabilityList->AppendL( frmCap );
- }//end for i
- }//end if
+ ServiceOneFormatCapabilitiesL( iFormatCode );
+ }
+ }
else
- {
- ServiceInterdepentPropDescL();
- PRINT1( _L( "MM MTP <> CGetFormatCapabilities::ServiceL, ONLY one Format!!! formatCode = 0x%X" ), iFormatCode );
-
- CMTPTypeFormatCapability* frmCap = CMTPTypeFormatCapability::NewL( iFormatCode, iInterdependentPropDesc );
- const RArray<TUint>* propertiesArray = iDpConfig.GetSupportedPropertiesL( iFormatCode );
- TInt num = propertiesArray->Count();
- for( TInt j = 0;j < num; j++ )
- {
- CMTPTypeObjectPropDesc* propertyDesc = ServicePropDescL( ( *propertiesArray )[j] );
- if ( propertyDesc != NULL )
- {
- frmCap->AppendL( propertyDesc );
- }
- }//end for j
- iCapabilityList->AppendL( frmCap );
- }
+ ServiceOneFormatCapabilitiesL( iFormatCode );
SendDataL( *iCapabilityList );
PRINT( _L( "MM MTP <= CGetFormatCapabilities::ServiceL" ) );
}
+void CGetFormatCapabilities::ServiceOneFormatCapabilitiesL( TUint aFormatCode )
+ {
+ CMTPTypeInterdependentPropDesc* interdependentPropDesc = iDpConfig.DescriptionUtility()->NewInterdepentPropDescL( iDpConfig, aFormatCode );
+ CMTPTypeFormatCapability* frmCap = CMTPTypeFormatCapability::NewL( aFormatCode, interdependentPropDesc );
+
+ const RArray<TUint>* properties = iDpConfig.GetSupportedPropertiesL( aFormatCode );
+ TInt num = properties->Count();
+ for ( TInt i = 0; i < num; i++ )
+ {
+ CMTPTypeObjectPropDesc* propertyDesc = ServiceOnePropDescL( ( *properties )[i] );
+ if ( propertyDesc != NULL )
+ {
+ frmCap->AppendL( propertyDesc );
+ }
+ }
+ iCapabilityList->AppendL( frmCap );
+ }
+
// -----------------------------------------------------------------------------
// CGetFormatCapabilities::ServicePropDescL
// Get MTPTypeObjectPropDesc according to property code
// -----------------------------------------------------------------------------
//
-CMTPTypeObjectPropDesc* CGetFormatCapabilities::ServicePropDescL( TUint16 aPropCode )
+CMTPTypeObjectPropDesc* CGetFormatCapabilities::ServiceOnePropDescL( TUint16 aPropCode )
{
- PRINT1( _L( "MM MTP => CGetFormatCapabilities::ServicePropDescL, aPropCode = 0x%X" ), aPropCode );
- // implement just like what we did in CGetpropertyDescc::ServiceL
- CMTPTypeObjectPropDesc* propertyDesc;
- CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
-
- /* Create new PropDesc object to return to device
- m - signals only limited supported values - hence these requests require the expected form
- variable to be passed into the NewL contstuctor as well */
- switch( aPropCode )
- {
- case EMTPObjectPropCodeStorageID: // Storage ID
- case EMTPObjectPropCodeObjectFormat: // Format Code
- case EMTPObjectPropCodeObjectSize: // Object Size
- case EMTPObjectPropCodeParentObject: // Parent Object
- case EMTPObjectPropCodePersistentUniqueObjectIdentifier: // Unique Object Identifier
- case EMTPObjectPropCodeName: // Name
- case EMTPObjectPropCodeDateAdded: // Date Added
- propertyDesc = CMTPTypeObjectPropDesc::NewL( aPropCode );
- break;
+ PRINT1( _L( "MM MTP => CGetFormatCapabilities::ServicePropDescL, aPropCode = 0x%x" ), aPropCode );
- // Protection Status (m)
- case EMTPObjectPropCodeProtectionStatus:
- propertyDesc = ServiceProtectionStatusL();
- break;
-
- // FileName
- case EMTPObjectPropCodeObjectFileName:
- propertyDesc = ServiceFileNameL();
- break;
+ // implement just like what we did in CGetpropertyDescc::ServiceL
+ CMTPTypeObjectPropDesc* propertyDesc =
+ iDpConfig.DescriptionUtility()->NewCommonObjectPropertyL( aPropCode );
- // Consumable (m)
- case EMTPObjectPropCodeNonConsumable:
- propertyDesc = ServiceNonConsumableL();
- break;
+ if ( propertyDesc == NULL )
+ propertyDesc = iDpConfig.DescriptionUtility()->NewSpecificPropDescL( iFormatCode, aPropCode );
- case EMTPObjectPropCodeDateModified: // Date Modified
- case EMTPObjectPropCodeDateCreated: // Date Created
- propertyInfo.iDataType = EMTPTypeString;
- propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::EDateTimeForm;
- propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadOnly;
- propertyDesc = CMTPTypeObjectPropDesc::NewL( aPropCode, propertyInfo, NULL);
- break;
-
- default:
- propertyDesc = ServiceSpecificPropertyDescL( aPropCode );
- break;
- }
if ( propertyDesc != NULL )
{
- TUint32 groupCode = GetGroupCode( aPropCode );
+ TUint32 groupCode = iDpConfig.DescriptionUtility()->GetGroupCode( aPropCode );
propertyDesc->SetUint32L( CMTPTypeObjectPropDesc::EGroupCode, groupCode );
}
@@ -221,108 +186,4 @@
return propertyDesc;
}
-// -----------------------------------------------------------------------------
-// CGetFormatCapabilities::GetGroupCode
-// Get MTPTypeObjectPropDesc according to property code
-// -----------------------------------------------------------------------------
-//
-TUint32 CGetFormatCapabilities::GetGroupCode( TUint32 aPropCode )
- {
- TInt count = sizeof( KPropGroupMapTable );
- // TODO: if need to refine the search approach to improve performance
- for( TInt i = 0; i < count; i++ )
- {
- if ( aPropCode == KPropGroupMapTable[i].iPropCode )
- return KPropGroupMapTable[i].iGroupCode;
- }
- return EGroupCodeNotDefined;
- }
-
-// -----------------------------------------------------------------------------
-// CGetFormatCapabilities::ServiceProtectionStatusL
-// Get MTPTypeObjectPropDesc protection status
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CGetFormatCapabilities::ServiceProtectionStatusL()
- {
- PRINT( _L( "MM MTP => CGetFormatCapabilities::ServiceProtectionStatusL" ) );
-
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT16 ); // + expectedForm
-
- TUint16 values[] =
- {
- EMTPProtectionNoProtection,
- EMTPProtectionReadOnly
- };
-
- TInt numValues = sizeof ( values ) / sizeof ( values[0] ) ;
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint16 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- CMTPTypeObjectPropDesc* propertyDesc = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeProtectionStatus, *expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
-
- PRINT( _L( "MM MTP <= CGetFormatCapabilities::ServiceProtectionStatusL" ) );
- return propertyDesc;
- }
-
-// -----------------------------------------------------------------------------
-// CGetFormatCapabilities::ServiceFileNameL
-// Get MTPTypeObjectPropDesc service file name
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CGetFormatCapabilities::ServiceFileNameL()
- {
- PRINT( _L( "MM MTP => CGetFormatCapabilities::ServiceFileNameL" ) );
- CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName ); // + form
-
- CMTPTypeObjectPropDesc* ret = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeObjectFileName,
- CMTPTypeObjectPropDesc::ERegularExpressionForm,
- form );
-
- CleanupStack::PopAndDestroy( form ); // - form
- PRINT( _L( "MM MTP <= CGetFormatCapabilities::ServiceFileNameL" ) );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// CGetFormatCapabilities::ServiceFileNameL
-// Get MTPTypeObjectPropDesc service file name
-// -----------------------------------------------------------------------------
-//
-CMTPTypeObjectPropDesc* CGetFormatCapabilities::ServiceNonConsumableL()
- {
- PRINT( _L( "MM MTP => CGetFormatCapabilities::ServiceNonConsumableL" ) );
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewLC( EMTPTypeUINT8 ); // + expectedForm
- TUint8 values[] =
- {
- EMTPConsumable,
- EMTPNonConsumable
- };
-
- TInt numValues = sizeof ( values ) / sizeof ( values[0] );
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint8 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
- propertyInfo.iDataType = EMTPTypeUINT8;
- propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::EEnumerationForm;
- propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadOnly;
- CMTPTypeObjectPropDesc* ret = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeNonConsumable,
- propertyInfo,
- expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
-
- PRINT( _L( "MM MTP <= CGetFormatCapabilities::ServiceNonConsumableL" ) );
- return ret;
- }
-
// end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetinterdependentpropdesc.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,132 @@
+/*
+* 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: Implement the operation: GetInterdenpendentPropDesc
+*
+*/
+
+#include <mtp/cmtptypeinterdependentpropdesc.h>
+
+#include "cgetinterdependentpropdesc.h"
+#include "mmmtpdplogger.h"
+#include "mmmtpdpconfig.h"
+#include "cdescriptionutility.h"
+
+// -----------------------------------------------------------------------------
+// CGetInterdependentPropDesc::NewL
+// Destructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C MMmRequestProcessor* CGetInterdependentPropDesc::NewL( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig )
+ {
+ CGetInterdependentPropDesc* self = new ( ELeave ) CGetInterdependentPropDesc( aFramework, aConnection, aDpConfig );
+
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CGetInterdependentPropDesc::~CGetInterdependentPropDesc
+// Destructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CGetInterdependentPropDesc::~CGetInterdependentPropDesc()
+ {
+ delete iDataset;
+ iDataset = NULL;
+ }
+
+// -----------------------------------------------------------------------------
+// CMTPGetInterDependentPropDesc::CMTPGetInterDependentPropDesc
+// Standard c++ constructor
+// -----------------------------------------------------------------------------
+//
+CGetInterdependentPropDesc::CGetInterdependentPropDesc( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig ) :
+ CRequestProcessor( aFramework, aConnection, 0, NULL ),
+ iDpConfig( aDpConfig )
+ {
+ PRINT( _L( "Operation: GetInterdependentPropDesc(0x9807)" ) );
+ }
+
+// -----------------------------------------------------------------------------
+// CMediaDpMtpGetInterDependentPropDesc::ConstructL
+// Two-phase construction method
+// -----------------------------------------------------------------------------
+//
+void CGetInterdependentPropDesc::ConstructL()
+ {
+ // Do nothing
+ }
+
+// -----------------------------------------------------------------------------
+// CGetInterdependentPropDesc::CheckRequestL
+// Verify the reqeust and returns it
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TMTPResponseCode CGetInterdependentPropDesc::CheckRequestL()
+ {
+ PRINT( _L( "MM MTP => CGetInterdependentPropDesc::CheckRequestL" ) );
+
+ TMTPResponseCode responseCode = CRequestProcessor::CheckRequestL();
+ iFormatCode = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
+
+ // check if it is what dp supported
+ responseCode = EMTPRespCodeInvalidObjectFormatCode;
+
+ const RArray<TUint>* format = iDpConfig.GetSupportedFormat();
+ TInt count = format->Count();
+
+ for ( TInt i = 0; i < count; i++ )
+ {
+ if ( iFormatCode == ( *format )[i] )
+ {
+ responseCode = EMTPRespCodeOK;
+ break;
+ }
+ }
+
+ // Clear the data set.
+ delete iDataset;
+ iDataset = NULL;
+
+ PRINT2( _L( "MM MTP <= CGetInterdependentPropDesc::CheckRequestL, iFormatCode = 0x%x, responseCode = 0x%x" ),
+ iFormatCode,
+ responseCode );
+
+ return responseCode;
+ }
+
+// -----------------------------------------------------------------------------
+// CGetInterdependentPropDesc::ServiceL
+// service a request at request phase
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CGetInterdependentPropDesc::ServiceL()
+ {
+ PRINT( _L( "MM MTP => CGetInterdependentPropDesc::ServiceL" ) );
+
+ iDataset = iDpConfig.DescriptionUtility()->NewInterdepentPropDescL( iDpConfig, iFormatCode );
+
+ // Send the dataset.
+ SendDataL( *iDataset );
+ PRINT( _L( "MM MTP <= CGetInterdependentPropDesc::ServiceL" ) );
+ }
+
+// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobject.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,11 +16,10 @@
*/
-#include <mtp/mmtpdataproviderframework.h>
-#include <mtp/cmtpobjectmetadata.h>
#include <mtp/cmtptypefile.h>
#include "cgetobject.h"
+#include "mmmtpdputility.h"
#include "mmmtpdplogger.h"
// -----------------------------------------------------------------------------
@@ -62,7 +61,6 @@
//
void CGetObject::ConstructL()
{
- SetPSStatus();
}
// -----------------------------------------------------------------------------
@@ -84,12 +82,11 @@
//
CGetObject::CGetObject( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection ) :
- CRequestProcessor( aFramework,
- aConnection,
- sizeof( KMTPGetObjectPolicy ) / sizeof( TMTPRequestElementInfo ),
- KMTPGetObjectPolicy ),
- iFs( iFramework.Fs() ),
- iError( EMTPRespCodeOK )
+ CRequestProcessor( aFramework,
+ aConnection,
+ sizeof( KMTPGetObjectPolicy ) / sizeof( TMTPRequestElementInfo ),
+ KMTPGetObjectPolicy ),
+ iError( EMTPRespCodeOK )
{
PRINT( _L( "Operation: GetObject(0x1009)" ) );
}
@@ -102,6 +99,8 @@
void CGetObject::ServiceL()
{
PRINT( _L( "MM MTP => CGetObject::ServiceL" ) );
+
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
// Get the objectinfo
TUint32 objectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
@@ -141,7 +140,7 @@
// Create the file object
delete iFileObject;
iFileObject = NULL;
- iFileObject = CMTPTypeFile::NewL( iFs, aFileName, EFileRead );
+ iFileObject = CMTPTypeFile::NewL( iFramework.Fs(), aFileName, EFileRead );
PRINT( _L( "MM MTP <= CGetObject::GetObjectL" ) );
}
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectinfo.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectinfo.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,7 +16,6 @@
*/
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/cmtptypeobjectinfo.h>
#include <f32file.h>
@@ -26,9 +25,8 @@
#include "tmmmtpdppanic.h"
#include "mmmtpdplogger.h"
#include "mmmtpdpconfig.h"
+#include "tobjectdescription.h"
-_LIT( KMtpDateTimeFormat, "%F%Y%M%DT%H%T%S" );
-const TInt KMtpMaxDateTimeStringLength = 15;
// -----------------------------------------------------------------------------
// Verification data for GetObjectInfo request
@@ -98,8 +96,6 @@
EXPORT_C void CGetObjectInfo::ConstructL()
{
CActiveScheduler::Add( this );
-
- SetPSStatus();
}
// -----------------------------------------------------------------------------
@@ -110,6 +106,8 @@
void CGetObjectInfo::ServiceL()
{
PRINT( _L( "MM MTP => CGetObjectInfo::ServiceL" ) );
+
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
delete iObjectInfo;
iObjectInfo = NULL;
@@ -164,7 +162,7 @@
TUint32 width(0);
TUint32 height(0);
TInt err = KErrNone;
- TRAP( err, iDpConfig.GetWrapperL().GetImageObjPropL( suid, width, height ) );
+ TRAP( err, iDpConfig.GetWrapperL().GetImageObjPropL( *object, width, height ) );
if( err != KErrNone )
PRINT1( _L( "MM MTP <> CGetObjectInfo::BuildObjectInfoL TRAP iWrapper.GetImageObjPropL err = %d" ), err );
@@ -188,11 +186,9 @@
TParsePtrC parse( suid );
iObjectInfo->SetStringL( CMTPTypeObjectInfo::EFilename, parse.NameAndExt() );
- TTime dataModified;
- dataModified = MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(), suid );
+ TBuf<KMtpMaxDateTimeStringLength> date;
+ MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(), suid, date );
- TBuf<KMtpMaxDateTimeStringLength> date;
- dataModified.FormatL( date, KMtpDateTimeFormat );
PRINT1( _L( "MM MTP <> CGetObjectInfo::BuildObjectInfo date is %S" ), &date );
// Date Created
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropdesc.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropdesc.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -11,22 +11,35 @@
*
* Contributors:
*
-* Description: Implement operation: GetObjectPropDesc
+* Description: Request processor which handle common property description
*
*/
-
#include <mtp/cmtptypeobjectpropdesc.h>
-#include <mtp/cmtptypestring.h>
#include "cgetobjectpropdesc.h"
+#include "cdescriptionutility.h"
+#include "mmmtpdpconfig.h"
#include "tmmmtpdppanic.h"
#include "mmmtpdplogger.h"
-#include "tobjectdescription.h"
-#include "mmmtpdpconfig.h"
-_LIT( KMtpObjDescObjFileName, "[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 7}\\.[[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 2}]?" );
-// RegEx is [a-zA-Z!#\$%&'\(\)\-0-9@\^_\`\{\}\~][a-zA-Z!#\$%&'\(\)\-0-9@\^_\`\{\}\~ ]{0, 7}\.[[a-zA-Z!#\$%&'\(\)\-0-9@\^_\`\{\}\~][a-zA-Z!#\$%&'\(\)\-0-9@\^_\`\{\}\~ ]{0, 2}]?
+// -----------------------------------------------------------------------------
+// CGetObjectPropDesc::NewL
+// Constructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C MMmRequestProcessor* CGetObjectPropDesc::NewL( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig )
+ {
+ CGetObjectPropDesc* self = new ( ELeave ) CGetObjectPropDesc( aFramework, aConnection, aDpConfig );
+
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+
+ return self;
+ }
// -----------------------------------------------------------------------------
// CGetObjectPropDesc::~CGetObjectPropDesc
@@ -35,7 +48,8 @@
//
EXPORT_C CGetObjectPropDesc::~CGetObjectPropDesc()
{
- delete iObjectProperty;
+ delete iPropertyDesc;
+ iPropertyDesc = NULL;
}
// -----------------------------------------------------------------------------
@@ -43,24 +57,24 @@
// Standard c++ constructor
// -----------------------------------------------------------------------------
//
-EXPORT_C CGetObjectPropDesc::CGetObjectPropDesc( MMTPDataProviderFramework& aFramework,
+CGetObjectPropDesc::CGetObjectPropDesc( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig ) :
- CRequestProcessor( aFramework, aConnection, 0, NULL ),
- iObjectProperty( NULL ),
- iDpConfig( aDpConfig )
+ CRequestProcessor( aFramework, aConnection, 0, NULL ),
+ iDpConfig( aDpConfig ),
+ iPropertyDesc( NULL )
{
PRINT( _L( "Operation: GetObjectPropDesc(0x9802)" ) );
}
// -----------------------------------------------------------------------------
// CGetObjectPropDesc::ConstructL
-// Second phase constructor
+// The second phase constructor
// -----------------------------------------------------------------------------
//
-EXPORT_C void CGetObjectPropDesc::ConstructL()
+void CGetObjectPropDesc::ConstructL()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -72,6 +86,12 @@
{
TMTPResponseCode response = CRequestProcessor::CheckRequestL();
+ iPropCode = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
+ iFormatCode = Request().Uint32( TMTPTypeRequest::ERequestParameter2 );
+ PRINT2( _L( "MM MTP <> CGetObjectPropDesc::CheckPropCode, propCode = 0x%x, iFormatCode = 0x%x" ),
+ iPropCode,
+ iFormatCode );
+
if ( response == EMTPRespCodeOK )
{
response = CheckFormatL();
@@ -87,203 +107,22 @@
}
// -----------------------------------------------------------------------------
-// CGetObjectPropDesc::ServiceL
-// GetObjectPropDesc request handler
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CGetObjectPropDesc::ServiceL()
- {
- PRINT( _L( "MM MTP => CGetObjectPropDesc::ServiceL" ) );
- delete iObjectProperty;
- iObjectProperty = NULL;
-
- TUint32 propCode = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
- iFormatCode = Request().Uint32( TMTPTypeRequest::ERequestParameter2 );
- PRINT2( _L( "MM MTP <> CGetObjectPropDesc::ServiceL propCode = 0x%x, iFormatCode = 0x%x" ),
- propCode,
- iFormatCode );
-
- CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
-
- /* Create new PropDesc object to return to device
- m - signals only limited supported values - hence these requests require the expected form
- variable to be passed into the NewL contstuctor as well */
- switch ( propCode )
- {
- case EMTPObjectPropCodeStorageID: // Storage ID
- case EMTPObjectPropCodeObjectFormat: // Format Code
- case EMTPObjectPropCodeObjectSize: // Object Size
- case EMTPObjectPropCodeParentObject: // Parent Object
- case EMTPObjectPropCodePersistentUniqueObjectIdentifier: // Unique Object Identifier
- case EMTPObjectPropCodeName: // Name
- case EMTPObjectPropCodeDateAdded: // Date Added
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( propCode );
- break;
-
- // Protection Status (m)
- case EMTPObjectPropCodeProtectionStatus:
- ServiceProtectionStatusL();
- break;
-
- // FileName
- case EMTPObjectPropCodeObjectFileName:
- ServiceFileNameL();
- break;
-
- // Consumable (m)
- case EMTPObjectPropCodeNonConsumable:
- ServiceNonConsumableL();
- break;
-
- case EMTPObjectPropCodeDateModified: // Date Modified
- case EMTPObjectPropCodeDateCreated: // Date Created
- propertyInfo.iDataType = EMTPTypeString;
- propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::EDateTimeForm;
- propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadOnly;
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( propCode, propertyInfo, NULL);
- break;
-
- // Error - Should be caught by CheckRequestL
- default:
- ServiceSpecificObjectPropertyL( propCode );
- break;
- }
-
- // Set group code
- TUint32 groupCode = GetGroupCode( propCode );
- PRINT1( _L("MM MTP <> CGetObjectPropDesc::ServiceL, groupCode = 0x%x"), groupCode );
- iObjectProperty->SetUint32L( CMTPTypeObjectPropDesc::EGroupCode, groupCode );
-
- __ASSERT_DEBUG( iObjectProperty, Panic( EMmMTPDpObjectPropertyNull ) );
-
- SendDataL( *iObjectProperty );
-
- PRINT( _L( "MM MTP <= CGetObjectPropDesc::ServiceL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CGetObjectPropDesc::ServiceProtectionStatusL
-// Create list of possible protection status and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-void CGetObjectPropDesc::ServiceProtectionStatusL()
- {
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT16 );
- CleanupStack::PushL( expectedForm ); // + expectedForm
-
- TUint16 values[] =
- {
- EMTPProtectionNoProtection,
- EMTPProtectionReadOnly
- };
-
- TInt numValues = sizeof ( values ) / sizeof ( values[0] ) ;
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint16 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- // Althrough iObjectProperty is released in ServiceL(),
- // release it here maybe a more safer way :)
- if ( iObjectProperty != NULL )
- {
- delete iObjectProperty;
- iObjectProperty = NULL;
- }
-
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeProtectionStatus, *expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
- }
-
-// -----------------------------------------------------------------------------
-// CGetObjectPropDesc::ServiceFileNameL()
-// Create Regular expression for a file name and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-void CGetObjectPropDesc::ServiceFileNameL()
- {
- CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName ); // + form
-
- // Althrough iObjectProperty is released in ServiceL(),
- // release it here maybe a more safer way
- if ( iObjectProperty != NULL )
- {
- delete iObjectProperty;
- iObjectProperty = NULL;
- }
-
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeObjectFileName,
- CMTPTypeObjectPropDesc::ERegularExpressionForm,
- form );
-
- CleanupStack::PopAndDestroy( form ); // - form
- }
-
-// -----------------------------------------------------------------------------
-// CGetObjectPropDesc::ServiceNonConsumableL
-// Create list of possible nonConsumable values and create new ObjectPropDesc
-// -----------------------------------------------------------------------------
-//
-void CGetObjectPropDesc::ServiceNonConsumableL()
- {
- CMTPTypeObjectPropDescEnumerationForm* expectedForm =
- CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT8 );
- CleanupStack::PushL( expectedForm ); // + expectedForm
- TUint8 values[] =
- {
- EMTPConsumable,
- EMTPNonConsumable
- };
-
- TInt numValues = sizeof ( values ) / sizeof ( values[0] );
- for ( TInt i = 0; i < numValues; i++ )
- {
- TMTPTypeUint8 data( values[i] );
- expectedForm->AppendSupportedValueL( data );
- }
-
- // Althrough iObjectProperty is released in ServiceL(),
- // release it here maybe a more safer way :)
- if ( iObjectProperty != NULL )
- {
- delete iObjectProperty;
- iObjectProperty = NULL;
- }
-
- CMTPTypeObjectPropDesc::TPropertyInfo propertyInfo;
- propertyInfo.iDataType = EMTPTypeUINT8;
- propertyInfo.iFormFlag = CMTPTypeObjectPropDesc::EEnumerationForm;
- propertyInfo.iGetSet = CMTPTypeObjectPropDesc::EReadOnly;
- iObjectProperty = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeNonConsumable,
- propertyInfo,
- expectedForm );
- CleanupStack::PopAndDestroy( expectedForm ); // - expectedForm
- }
-
-// -----------------------------------------------------------------------------
// CGetObjectPropList::CheckFormatL
-// Ensures the object format operation parameter is valid
+// Ensure the object format operation parameter is valid
// -----------------------------------------------------------------------------
//
TMTPResponseCode CGetObjectPropDesc::CheckFormatL() const
{
- TMTPResponseCode response = EMTPRespCodeOK;
-
- TUint32 formatCode = Request().Uint32( TMTPTypeRequest::ERequestParameter2 );
- PRINT1( _L( "MM MTP <> CGetObjectPropDesc::CheckFormatL formatCode = 0x%x" ), formatCode );
+ TMTPResponseCode response = EMTPRespCodeInvalidObjectFormatCode;
- if( formatCode != 0)
+ if( iFormatCode != KMTPFormatsAll )
{
- response = EMTPRespCodeInvalidObjectFormatCode;
-
const RArray<TUint>* format = iDpConfig.GetSupportedFormat();
TInt count = format->Count();
for ( TInt i = 0; i < count; i++ )
{
- if ( formatCode == (*format)[i] )
+ if ( iFormatCode == (*format)[i] )
{
response = EMTPRespCodeOK;
break;
@@ -296,60 +135,59 @@
// -----------------------------------------------------------------------------
// CGetObjectPropDesc::CheckPropCodeL
-// Ensures the object prop code operation parameter is valid
+// Ensure the object prop code operation parameter is valid
// -----------------------------------------------------------------------------
//
TMTPResponseCode CGetObjectPropDesc::CheckPropCodeL() const
{
- TMTPResponseCode response = EMTPRespCodeOK;
+ TMTPResponseCode response = EMTPRespCodeInvalidObjectPropCode;
- TUint32 propCode = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
- PRINT1( _L( "MM MTP <> CGetObjectPropDesc::CheckPropCode, propCode = 0x%x" ), propCode );
-
- if ( propCode == 0 )
+ if ( iPropCode != KMTPNotSpecified32 && iPropCode != KMTPObjectPropCodeAll )
{
- // A propCode of 0 means specification by group (which is not supported)
- response = EMTPRespCodeSpecificationByGroupUnsupported;
- }
- else
- {
- TUint32 formatCode = Request().Uint32( TMTPTypeRequest::ERequestParameter2 );
-
- const RArray<TUint>* properties = NULL;
- if ( formatCode == KMTPFormatsAll )
- properties= iDpConfig.GetAllSupportedProperties();
- else
- properties = iDpConfig.GetSupportedPropertiesL( formatCode );
+ const RArray<TUint>* properties = iDpConfig.GetSupportedPropertiesL( iFormatCode );
const TInt count = properties->Count();
- TInt i = 0;
- for( i = 0; i < count; i++ )
+ for( TInt i = 0; i < count; i++ )
{
- if ( (*properties)[i] == propCode )
+ if ( (*properties)[i] == iPropCode )
{
+ response = EMTPRespCodeOK;
break;
}
}
-
- if ( i == count )
- {
- response = EMTPRespCodeInvalidObjectPropCode;
- }
}
return response;
}
-TUint32 CGetObjectPropDesc::GetGroupCode( TUint16 aPropCode )
+// -----------------------------------------------------------------------------
+// CGetObjectPropDesc::ServiceL
+// GetObjectPropDesc request handler
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CGetObjectPropDesc::ServiceL()
{
- TInt count = sizeof( KPropGroupMapTable );
- // TODO: if need to refine the search approach to improve performance
- for( TInt i = 0; i < count; i++ )
- {
- if ( aPropCode == KPropGroupMapTable[i].iPropCode )
- return KPropGroupMapTable[i].iGroupCode;
- }
- return EGroupCodeNotDefined;
+ PRINT( _L( "MM MTP => CGetObjectPropDesc::ServiceL" ) );
+
+ delete iPropertyDesc;
+ iPropertyDesc = NULL;
+
+ iPropertyDesc = iDpConfig.DescriptionUtility()->NewCommonObjectPropertyL( iPropCode );
+
+ // if iPropertyDesc == NULL, iPropCode is not common property but dp specific one.
+ if( iPropertyDesc == NULL )
+ iPropertyDesc = iDpConfig.DescriptionUtility()->NewSpecificPropDescL( iFormatCode, iPropCode );
+
+ __ASSERT_DEBUG( iPropertyDesc, Panic( EMmMTPDpObjectPropertyNull ) );
+
+ // Set group code
+ TUint32 groupCode = iDpConfig.DescriptionUtility()->GetGroupCode( iPropCode );
+ PRINT1( _L("MM MTP <> CGetObjectPropDesc::ServiceL, groupCode = 0x%x"), groupCode );
+ iPropertyDesc->SetUint32L( CMTPTypeObjectPropDesc::EGroupCode, groupCode );
+
+ SendDataL( *iPropertyDesc );
+
+ PRINT( _L( "MM MTP <= CGetObjectPropDesc::ServiceL" ) );
}
// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectproplist.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectproplist.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -18,12 +18,11 @@
#include <bautils.h>
#include <e32std.h>
-#include <mtp/mmtpdataproviderframework.h>
+
#include <mtp/mmtpobjectmgr.h>
#include <mtp/cmtptypeobjectproplist.h>
#include <mtp/cmtptypestring.h>
#include <mtp/cmtptypearray.h>
-#include <mtp/cmtpobjectmetadata.h>
#include "tobjectdescription.h"
#include "cgetobjectproplist.h"
@@ -34,12 +33,7 @@
#include "cmmmtpdpmetadataaccesswrapper.h"
static const TUint32 KMTPAll = 0xffffffff;
-_LIT( KMtpDateTimeFormat, "%F%Y%M%DT%H%T%S" );
-const TInt KMtpMaxDateTimeStringLength = 15;
-#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
-_LIT( KSubFormatParse, "SubFormatParse" );
-#endif
// Verification data for the getObjectPropList request
const TMTPRequestElementInfo KMTPGetObjectPropListPolicy[] =
@@ -82,13 +76,13 @@
EXPORT_C CGetObjectPropList::CGetObjectPropList( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig ) :
- CRequestProcessor( aFramework,
- aConnection,
- sizeof ( KMTPGetObjectPropListPolicy ) / sizeof( TMTPRequestElementInfo ),
- KMTPGetObjectPropListPolicy ),
- iHandles ( KMmMtpRArrayGranularity ),
- iDpConfig( aDpConfig ),
- iPropertyArray( KMmMtpRArrayGranularity )
+ CRequestProcessor( aFramework,
+ aConnection,
+ sizeof ( KMTPGetObjectPropListPolicy ) / sizeof( TMTPRequestElementInfo ),
+ KMTPGetObjectPropListPolicy ),
+ iHandles ( KMmMtpRArrayGranularity ),
+ iDpConfig( aDpConfig ),
+ iPropertyArray( KMmMtpRArrayGranularity )
{
PRINT( _L( "Operation: GetObjectPropList(0x9805)" ) );
}
@@ -104,8 +98,6 @@
iPropertyList = CMTPTypeObjectPropList::NewL();
- SetPSStatus();
-
#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
iPerfLog = CMmMtpDpPerfLog::NewL( _L( "MediaMtpDataProviderEnumerator" ) );
#endif
@@ -144,11 +136,13 @@
// -----------------------------------------------------------------------------
// CGetObjectPropList::ServiceL
-// service a request at request phase
+// GetObjectPropList request handler
// -----------------------------------------------------------------------------
//
EXPORT_C void CGetObjectPropList::ServiceL()
{
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
+
GetObjectHandlesL();
TInt numOfObjects = iHandles.Count();
PRINT2( _L( "MM MTP <> CGetObjectPropList::ServiceL, numOfObjects = %d, iPropCode = 0x%x" ),
@@ -167,7 +161,7 @@
TInt err = KErrNone;
for ( TInt i = 0; i < numOfObjects; i++ )
{
- TUint32 handle = iHandles[i ];
+ TUint32 handle = iHandles[i];
if ( iFramework.ObjectMgr().ObjectOwnerId( handle )
== iFramework.DataProviderId() )
@@ -178,8 +172,6 @@
if ( iFramework.ObjectMgr().ObjectL( handle, *iObject ) ) // Populate the object meta data
{
- SetSubFormatCodeL();
-
err = ServiceOneObjectPropertyL( handle, iPropCode );
if ( err != KErrNone && err != KErrNotSupported )
break;
@@ -187,9 +179,14 @@
}
}
PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceL, one property was queried, Send data to PC! err = %d" ), err );
- if ( err == KErrNone || err == KErrNotSupported )
+ if ( err == KErrNone
+ || ( err == KErrNotSupported && 0 < iPropertyList->NumberOfElements() ) )
+ // Make sure the dataset which is returned to pc is valid
SendDataL( *iPropertyList );
- else if ( err == KErrNotFound )
+ else if ( err == KErrNotFound || err == KErrNotSupported )
+ // The object entry is not in db
+ // or the ONLY required metadata is not in db.
+ // The second case is the same with GetObjectPropValue and device has nothing to return.
SendResponseL( EMTPRespCodeAccessDenied );
else
SendResponseL( EMTPRespCodeGeneralError );
@@ -200,7 +197,7 @@
// -----------------------------------------------------------------------------
// CGetObjectPropList::CheckFormatL
-// Ensures the object format operation parameter is valid
+// Ensure the object format operation parameter is valid
// -----------------------------------------------------------------------------
//
TMTPResponseCode CGetObjectPropList::CheckFormatL() const
@@ -223,7 +220,7 @@
for ( TInt i = 0; i < count; i++ )
{
- if ( formatCode == (*format)[i ] )
+ if ( formatCode == (*format)[i] )
{
response = EMTPRespCodeOK;
break;
@@ -238,7 +235,7 @@
// -----------------------------------------------------------------------------
// CGetObjectPropList::CheckPropCodeL
-// Ensures the object prop code operation parameter is valid
+// Ensure the object prop code operation parameter is valid
// -----------------------------------------------------------------------------
//
TMTPResponseCode CGetObjectPropList::CheckPropCodeL() const
@@ -259,12 +256,11 @@
PRINT1( _L( "MM MTP <> CGetObjectPropList::CheckPropCode, Group Code = 0x%x" ), groupCode );
// check if groupCode is supported
- TInt count = sizeof ( KSupportedGroupCode )
- / sizeof ( KSupportedGroupCode[0] );
+ TInt count = sizeof ( KSupportedGroupCode ) / sizeof ( KSupportedGroupCode[0] );
TInt i = 0;
for ( ; i < count; i++ )
{
- if ( groupCode == KSupportedGroupCode[i ] )
+ if ( groupCode == KSupportedGroupCode[i] )
break;
}
if ( i == count )
@@ -275,15 +271,12 @@
{
PRINT1( _L( "MM MTP <> CGetObjectPropList::CheckPropCode, Property(0x%x) was queried." ), iPropCode );
- TInt err = KErrNone;
const RArray<TUint>* properties = NULL;
if ( formatCode == KMTPFormatsAll )
properties = iDpConfig.GetAllSupportedProperties();
else
properties = iDpConfig.GetSupportedPropertiesL( formatCode );
- User::LeaveIfError( err );
-
const TInt count = properties->Count();
TInt i = 0;
for ( i = 0; i < count; i++ )
@@ -312,7 +305,7 @@
// -----------------------------------------------------------------------------
// CGetObjectPropList::CheckDepth
-// Ensures the depth operation parameter is valid
+// Ensure the depth operation parameter is valid
// -----------------------------------------------------------------------------
//
TMTPResponseCode CGetObjectPropList::CheckDepth() const
@@ -341,7 +334,7 @@
// -----------------------------------------------------------------------------
// CGetObjectPropList::GetObjectHandlesL
-// Gets the handles for the objects that we want the properties for
+// Get the handles for the objects that we want the properties for
// -----------------------------------------------------------------------------
//
void CGetObjectPropList::GetObjectHandlesL()
@@ -361,9 +354,6 @@
else
{
CMTPObjectMetaData* meta( iRequestChecker->GetObjectInfo( iHandle ) );
- TPtrC suid( meta->DesC( CMTPObjectMetaData::ESuid ) );
- TParsePtrC parse( suid );
- iDpConfig.GetWrapperL().SetStorageRootL( parse.Drive() );
__ASSERT_DEBUG( meta, Panic( EMmMTPDpObjectNull ) );
@@ -383,12 +373,12 @@
// -----------------------------------------------------------------------------
// CGetObjectPropList::GetObjectHandlesL
-// Gets all object handles (for GetObjectHandlesL)
+// Get all object handles (for GetObjectHandlesL)
// -----------------------------------------------------------------------------
//
void CGetObjectPropList::GetObjectHandlesL( TUint32 aStorageId,
TUint32 aParentHandle,
- TUint16 aFormat /*= 0x0000*/)
+ TUint16 aFormat /*= 0x0000*/ )
{
PRINT2( _L( "MM MTP => CGetObjectPropList::GetObjectHandlesL, aStorageId = 0x%x, aParentHandle = 0x%x" ),
aStorageId,
@@ -496,7 +486,7 @@
PRINT1( _L( "MM MTP => CGetObjectPropList::ServiceAllPropertiesL aHandle = 0x%x" ), aHandle );
// Append the current object info onto our list
- TFileName fileName( iObject->DesC( CMTPObjectMetaData::ESuid ) );
+ TPtrC fileName( iObject->DesC( CMTPObjectMetaData::ESuid ) );
TUint32 formatCode = iObject->Uint( CMTPObjectMetaData::EFormatCode );
PRINT2( _L( "MM MTP <> CGetObjectPropList::ServiceAllPropertiesL, fileName = %S, formatCode = 0x%x" ),
@@ -512,25 +502,39 @@
const TInt count = properties->Count();
TInt err = KErrNone;
+ TBool successQuery = EFalse;
for ( TInt i = 0; i < count; i++ )
{
- // no need to do the trap anymore, this is being handle internally in Media DP's ServiceSpecificObjectPropertyL, also, this base class should not know too much of different handling between different formats
+ // no need to do the trap anymore, this is being handle internally in Media DP's ServiceSpecificObjectPropertyL,
+ // also, this base class should not know too much of different handling between different formats
err = ServiceOneObjectPropertyL( aHandle, (*properties)[i] );
- if ( err == KErrNotSupported ) // Skip
+ if ( err == KErrNone )
+ successQuery = ETrue;
+ if ( err == KErrNotSupported || err == KErrNotFound ) // Skip
err = KErrNone;
if ( err != KErrNone )
break;
}
+ // In PC Suite combined mode, a file that was found at the beginning could be deleted by PC Suite protocol
+ // Need to fail it here.
+ if ( successQuery == EFalse )
+ err = KErrNotFound;
+
PRINT1( _L( "MM MTP <= CGetObjectPropList::ServiceAllPropertiesL err = %d" ), err );
return err;
}
+// -----------------------------------------------------------------------------
+// CGetObjectPropList::ServiceGroupPropertiesL
+// Get the grouped object properties for specific object
+// -----------------------------------------------------------------------------
+//
TInt CGetObjectPropList::ServiceGroupPropertiesL( TUint32 aHandle )
{
PRINT1( _L( "MM MTP => CGetObjectPropList::ServiceGroupPropertiesL aHandle = 0x%x" ), aHandle );
- TFileName fileName( iObject->DesC( CMTPObjectMetaData::ESuid ) );
+ TPtrC fileName( iObject->DesC( CMTPObjectMetaData::ESuid ) );
TUint32 formatCode = iObject->Uint( CMTPObjectMetaData::EFormatCode );
PRINT2( _L( "MM MTP <> CGetObjectPropList::ServiceGroupPropertiesL, fileName = %S, formatCode = 0x%x" ),
@@ -548,7 +552,7 @@
for ( TInt i = 0; i < count; i++ )
{
err = ServiceOneObjectPropertyL( aHandle, iPropertyArray[i] );
- if ( err == KErrNotSupported ) // Skip
+ if ( err == KErrNotSupported || err == KErrNotFound ) // Skip
err = KErrNone;
if ( err != KErrNone )
break;
@@ -561,7 +565,7 @@
// -----------------------------------------------------------------------------
// CGetObjectPropList::ServiceOneObjectPropertyL
-// Gets the object property information for the required object
+// Get the object property information for the required object
// -----------------------------------------------------------------------------
//
TInt CGetObjectPropList::ServiceOneObjectPropertyL( TUint32 aHandle,
@@ -585,8 +589,8 @@
case EMTPObjectPropCodeStorageID:
{
TMTPTypeUint32 storageId( iObject->Uint( CMTPObjectMetaData::EStorageId ) );
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetUint32L(CMTPTypeObjectPropListElement::EValue, storageId.Value());
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, storageId.Value() );
}
break;
@@ -594,8 +598,8 @@
case EMTPObjectPropCodeObjectFormat:
{
TMTPTypeUint16 objectFormat( iObject->Uint( CMTPObjectMetaData::EFormatCode ) );
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetUint16L(CMTPTypeObjectPropListElement::EValue, objectFormat.Value());
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EValue, objectFormat.Value() );
}
break;
@@ -604,8 +608,8 @@
{
TMTPTypeUint16 protectionStatus( MmMtpDpUtility::GetProtectionStatusL( iFramework.Fs(),
iObject->DesC( CMTPObjectMetaData::ESuid ) ) );
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetUint16L(CMTPTypeObjectPropListElement::EValue, protectionStatus.Value());
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetUint16L( CMTPTypeObjectPropListElement::EValue, protectionStatus.Value() );
}
break;
@@ -630,8 +634,8 @@
#endif // _DEBUG
TParsePtrC parse( iObject->DesC( CMTPObjectMetaData::ESuid ) );
textData = CMTPTypeString::NewLC( parse.NameAndExt() ); // + textData
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetStringL(CMTPTypeObjectPropListElement::EValue, textData->StringChars());
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode) );
+ iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars() );
CleanupStack::PopAndDestroy( textData ); // - textData
}
break;
@@ -639,8 +643,8 @@
// Parent Object
case EMTPObjectPropCodeParentObject:
{
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetUint32L(CMTPTypeObjectPropListElement::EValue, iObject->Uint( CMTPObjectMetaData::EParentHandle ));
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, iObject->Uint( CMTPObjectMetaData::EParentHandle ) );
}
break;
@@ -648,51 +652,42 @@
case EMTPObjectPropCodePersistentUniqueObjectIdentifier:
{
TMTPTypeUint128 puid = iFramework.ObjectMgr().PuidL( aHandle );
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetUint128L(CMTPTypeObjectPropListElement::EValue,puid.UpperValue(), puid.LowerValue() );
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetUint128L( CMTPTypeObjectPropListElement::EValue,puid.UpperValue(), puid.LowerValue() );
}
break;
case EMTPObjectPropCodeName:
case EMTPObjectPropCodeDateAdded:
+ case EMTPObjectPropCodeAlbumArtist:
{
- if ( ( aPropCode == EMTPObjectPropCodeName )
- || ( ( !MmMtpDpUtility::IsVideoL( iObject->DesC( CMTPObjectMetaData::ESuid ), iFramework ) )
- && ( aPropCode == EMTPObjectPropCodeDateAdded ) ) )
- {
- textData = CMTPTypeString::NewLC(); // + textData
-
- TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( aPropCode,
- *textData,
- *iObject ) );
+ textData = CMTPTypeString::NewLC(); // + textData
- PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL err = %d" ), err );
+ TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( aPropCode,
+ *textData,
+ *iObject ) );
- if ( err == KErrNone )
- {
- iPropertyElement = &(iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
- iPropertyElement->SetStringL(CMTPTypeObjectPropListElement::EValue, textData->StringChars());
- }
+ PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL err = %d" ), err );
- CleanupStack::PopAndDestroy( textData ); // - textData
- }
+ iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars() );
+
+ CleanupStack::PopAndDestroy( textData ); // - textData
}
break;
case EMTPObjectPropCodeDateCreated:
case EMTPObjectPropCodeDateModified:
{
- TTime dataModified;
- dataModified = MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(),
- iObject->DesC( CMTPObjectMetaData::ESuid ) );
+ TBuf<KMtpMaxDateTimeStringLength> timeStr;
+ MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(),
+ iObject->DesC( CMTPObjectMetaData::ESuid ),
+ timeStr );
+ PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL Date time %S" ), &timeStr );
- TBuf<KMtpMaxDateTimeStringLength> timeStr;
- dataModified.FormatL( timeStr, KMtpDateTimeFormat );
- PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL Date time %S" ), &timeStr );
CMTPTypeString* datastring = CMTPTypeString::NewLC( timeStr ); // + datastring
-
- iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetStringL(CMTPTypeObjectPropListElement::EValue, datastring->StringChars());
+ iPropertyElement = &(iPropertyList->ReservePropElemL( aHandle, aPropCode ) );
+ iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, datastring->StringChars() );
CleanupStack::PopAndDestroy( datastring ); // - datastring
}
break;
@@ -701,12 +696,15 @@
case EMTPObjectPropCodeNonConsumable:
{
iPropertyElement = &(iPropertyList->ReservePropElemL(aHandle, aPropCode));
- iPropertyElement->SetUint8L(CMTPTypeObjectPropListElement::EValue,0);
+ iPropertyElement->SetUint8L( CMTPTypeObjectPropListElement::EValue,
+ iObject->Uint( CMTPObjectMetaData::ENonConsumable ) );
}
break;
default:
{
+ // "err == KErrNotFound" means the object entry does not exist in DB,
+ // "err == KErrNotSupported" means the entry is there but this metadata not.
err = ServiceSpecificObjectPropertyL( aPropCode, aHandle );
}
break;
@@ -744,8 +742,6 @@
if ( iFramework.ObjectMgr().ObjectL( handle, *iObject ) ) // Populate the object meta data
{
- SetSubFormatCodeL();
-
if ( iPropCode == KMTPAll )
err = ServiceAllPropertiesL( handle );
else if ( iPropCode == EMTPObjectPropCodeUndefined )
@@ -773,7 +769,8 @@
}
else // all handles processed, can send data
{
- PRINT( _L( "MM MTP <> CGetObjectPropList::RunL, Finished, Send data to PC!" ) );
+ PRINT1( _L( "MM MTP <> CGetObjectPropList::RunL, Finished, Send data to PC!, iPropertyList->NumberOfElements() = %d" ),
+ iPropertyList->NumberOfElements() );
SendDataL( *iPropertyList );
}
}
@@ -785,8 +782,10 @@
//
EXPORT_C TInt CGetObjectPropList::RunError( TInt aError )
{
- PRINT1( _L( "MM MTP <> CGetObjectPropList::RunError aError = %d" ), aError );
- TRAP_IGNORE( SendResponseL( EMTPRespCodeGeneralError ) );
+ if ( aError != KErrNone )
+ PRINT1( _L( "MM MTP <> CGetObjectPropList::RunError aError = %d" ), aError );
+
+ TRAP_IGNORE( SendResponseL( EMTPRespCodeGeneralError ) );
return KErrNone;
}
@@ -798,8 +797,6 @@
//
EXPORT_C void CGetObjectPropList::DoCancel()
{
- // TODO: need to send the data here?
- // SendDataL( *iPropertyList );
}
void CGetObjectPropList::GetPropertiesL( RArray<TUint>& aPropArray,
@@ -819,7 +816,7 @@
{
for ( TInt j = 0; j < count; j++ )
{
- if( KPropGroupMapTable[j].iPropCode == (*properties)[i]
+ if( KPropGroupMapTable[j].iPropCode == ( *properties )[i]
&& KPropGroupMapTable[j].iGroupCode == aGroupCode )
{
aPropArray.Append( (*properties)[i] );
@@ -829,35 +826,4 @@
}
}
-void CGetObjectPropList::SetSubFormatCodeL()
- {
- __ASSERT_DEBUG( iObject, Panic( EMmMTPDpObjectNull ) );
-
- // Note: Parsing out subformat code in external enumeration phase.
- // This process was delayed in internal phase to avoid time-out.
- TUint16 formatCode = iObject->Uint( CMTPObjectMetaData::EFormatCode );
- TUint subFormatCode = iObject->Uint( CMTPObjectMetaData::EFormatSubCode );
- PRINT2( _L( "MM MTP <> CGetObjectPropList::SetSubFormatCode, formatCode = 0x%x, subFormatCode = 0x%x" ),
- formatCode,
- subFormatCode );
-
- TBool ifNeedParse = ( ( formatCode == EMTPFormatCodeMP4Container )
- || ( formatCode == EMTPFormatCode3GPContainer )
- || ( formatCode== EMTPFormatCodeASF ) )
- && ( subFormatCode == EMTPSubFormatCodeUnknown );
- if ( ifNeedParse )
- {
- PERFLOGSTART( KSubFormatParse );
-
- if ( MmMtpDpUtility::IsVideoL( iObject->DesC( CMTPObjectMetaData::ESuid ) ) )
- subFormatCode = EMTPSubFormatCodeVideo;
- else
- subFormatCode = EMTPSubFormatCodeAudio;
-
- PERFLOGSTOP( KSubFormatParse );
-
- iObject->SetUint( CMTPObjectMetaData::EFormatSubCode, subFormatCode );
- }
- }
-
// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -18,9 +18,7 @@
#include <mtp/cmtptypestring.h>
#include <mtp/cmtptypearray.h>
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/mmtpobjectmgr.h>
-#include <mtp/cmtpobjectmetadata.h>
#include <f32file.h>
#include "cgetobjectpropvalue.h"
@@ -28,9 +26,8 @@
#include "cmmmtpdpmetadataaccesswrapper.h"
#include "mmmtpdplogger.h"
#include "mmmtpdpconfig.h"
+#include "tobjectdescription.h"
-_LIT( KMtpDateTimeFormat, "%F%Y%M%DT%H%T%S" );
-const TInt KMtpMaxDateTimeStringLength = 15;
// -----------------------------------------------------------------------------
// Verification data for the GetObjectPropValue request
@@ -73,7 +70,6 @@
KMTPGetObjectPropValuePolicy ),
iDpConfig( aDpConfig )
{
- SetPSStatus();
PRINT( _L( "Operation: GetObjectPropValue(0x9803)" ) );
}
@@ -99,10 +95,13 @@
return EMTPRespCodeInvalidObjectHandle;
}
- TFileName fileName = objectInfo->DesC( CMTPObjectMetaData::ESuid );
TUint32 formatCode = objectInfo->Uint( CMTPObjectMetaData::EFormatCode );
- PRINT3( _L( "MM MTP <> CGetObjectPropValue::CheckRequestL, handle = 0x%x, filename = %S, formatCode = 0x%x" ), objectHandle, &fileName, formatCode);
+ PRINT3( _L( "MM MTP <> CGetObjectPropValue::CheckRequestL, handle = 0x%x, filename = %S, formatCode = 0x%x" ),
+ objectHandle,
+ &( objectInfo->DesC( CMTPObjectMetaData::ESuid ) ),
+ formatCode );
+
const RArray<TUint>* properties = iDpConfig.GetSupportedPropertiesL( formatCode );
TInt count = properties->Count();
@@ -133,20 +132,19 @@
EXPORT_C void CGetObjectPropValue::ServiceL()
{
PRINT( _L( "MM MTP => CGetObjectPropValue::ServiceL" ) );
+
+ MmMtpDpUtility::SetPSStatus( EMtpPSStatusActive );
//Get the request information
TUint32 objectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
TUint32 propCode = Request().Uint32( TMTPTypeRequest::ERequestParameter2 );
PRINT2( _L( "MM MTP <> CGetObjectPropValue::ServiceL objectHandle = 0x%x, propCode = 0x%x" ),
- objectHandle, propCode );
+ objectHandle, propCode );
// don't have the ownship of the object
iObjectInfo = iRequestChecker->GetObjectInfo( objectHandle );
TPtrC suid( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
PRINT1( _L( "MM MTP <> CGetObjectPropValue::ServiceL object file name is %S" ), &suid );
- TParsePtrC parse( suid );
-
- iDpConfig.GetWrapperL().SetStorageRootL( parse.Drive() );
if ( iMTPTypeString != NULL )
{
@@ -181,8 +179,7 @@
case EMTPObjectPropCodeProtectionStatus:
{
iMTPTypeUint16.Set( 0 );
- iMTPTypeUint16 = MmMtpDpUtility::GetProtectionStatusL( iFramework.Fs(),
- iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
+ iMTPTypeUint16 = MmMtpDpUtility::GetProtectionStatusL( iFramework.Fs(), suid );
SendDataL( iMTPTypeUint16 );
}
break;
@@ -191,8 +188,7 @@
case EMTPObjectPropCodeObjectSize:
{
iMTPTypeUint64.Set( 0 );
- iMTPTypeUint64 = MmMtpDpUtility::GetObjectSizeL( iFramework.Fs(),
- iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
+ iMTPTypeUint64 = MmMtpDpUtility::GetObjectSizeL( iFramework.Fs(), suid );
SendDataL( iMTPTypeUint64 );
}
break;
@@ -200,11 +196,7 @@
// Filename
case EMTPObjectPropCodeObjectFileName:
{
- const TDesC& suid( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
- PRINT1( _L( "MM MTP <> CGetObjectPropValue::ServiceL SUID = %S" ), &suid );
-
- TPtrC path( suid.Ptr(), suid.Length() );
- TParsePtrC parse( path );
+ TParsePtrC parse( suid );
iMTPTypeString = CMTPTypeString::NewL( parse.NameAndExt() );
SendDataL( *iMTPTypeString );
}
@@ -231,26 +223,19 @@
// Name and DataAdded (audio only) fall under the same branch while dateadded(video)/modified/created fall under another
case EMTPObjectPropCodeName: // 0xDC44
case EMTPObjectPropCodeDateAdded: // 0xDC4E
+ case EMTPObjectPropCodeAlbumArtist:
{
- if ( ( propCode == EMTPObjectPropCodeName)
- || ( ( !MmMtpDpUtility::IsVideoL(iObjectInfo->DesC( CMTPObjectMetaData::ESuid ), iFramework ) )
- && ( propCode == EMTPObjectPropCodeDateAdded ) ) )
- {
- iMTPTypeString = CMTPTypeString::NewL();
- ServiceMetaDataFromWrapperL( propCode, *iMTPTypeString, *iObjectInfo );
- break;
- }
+ iMTPTypeString = CMTPTypeString::NewL();
+ ServiceMetaDataFromWrapperL( propCode, *iMTPTypeString, *iObjectInfo );
}
+ break;
//lint -fallthrough
case EMTPObjectPropCodeDateCreated:
case EMTPObjectPropCodeDateModified:
{
- TTime dataModified;
- dataModified = MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(),
- iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
+ TBuf<KMtpMaxDateTimeStringLength> timeStr;
+ MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(), suid, timeStr );
- TBuf<KMtpMaxDateTimeStringLength> timeStr;
- dataModified.FormatL( timeStr, KMtpDateTimeFormat );
PRINT1( _L( "MM MTP <> CGetObjectPropValue::ServiceL Date time %S" ), &timeStr );
iMTPTypeString = CMTPTypeString::NewL( timeStr );
SendDataL( *iMTPTypeString );
@@ -260,7 +245,7 @@
// Consumable
case EMTPObjectPropCodeNonConsumable:
{
- iMTPTypeUint8.Set( 0 );
+ iMTPTypeUint8.Set( iObjectInfo->Uint( CMTPObjectMetaData::ENonConsumable ) );
SendDataL( iMTPTypeUint8 );
}
break;
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectreferences.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectreferences.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -17,16 +17,27 @@
#include <mtp/cmtptypearray.h>
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/mmtpreferencemgr.h>
+#include <mtp/mmtpobjectmgr.h>
#ifdef _DEBUG
-#include <mtp/cmtpobjectmetadata.h>
-#include <mtp/mmtpobjectmgr.h>
#include <mtp/tmtptypeuint128.h>
#endif
#include "cgetobjectreferences.h"
+#include "mmmtpdputility.h"
#include "mmmtpdplogger.h"
+#include "cmmmtpdpperflog.h"
+#include "mmmtpdpconfig.h"
+#include "cmmmtpdpmetadataaccesswrapper.h"
+#include "tmmmtpdppanic.h"
+
+const TInt KMTPDriveGranularity = 5;
+
+#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
+_LIT( KMpxQueryAbstractMediaReference, "MpxQueryAbstractMediaReference" );
+_LIT( KReferenceManagerSetReference, "ReferenceManagerSetReference" );
+_LIT( KObjectManagerHandle, "ObjectManagerHandle" );
+#endif
// -----------------------------------------------------------------------------
// Verification data for the GetReferences request
@@ -51,10 +62,11 @@
//
EXPORT_C MMmRequestProcessor* CGetObjectReferences::NewL( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
- MMmMtpDpConfig& /*aDpConfig*/ )
+ MMmMtpDpConfig& aDpConfig )
{
CGetObjectReferences* self = new ( ELeave ) CGetObjectReferences( aFramework,
- aConnection );
+ aConnection,
+ aDpConfig );
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
@@ -69,7 +81,9 @@
//
void CGetObjectReferences::ConstructL()
{
- SetPSStatus();
+#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
+ iPerfLog = CMmMtpDpPerfLog::NewL( _L( "CAbstractMediaMtpDataProviderEnumerator" ) );
+#endif
}
// -----------------------------------------------------------------------------
@@ -80,6 +94,10 @@
EXPORT_C CGetObjectReferences::~CGetObjectReferences()
{
delete iReferences;
+
+#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
+ delete iPerfLog;
+#endif // _DEBUG
}
// -----------------------------------------------------------------------------
@@ -88,11 +106,13 @@
// -----------------------------------------------------------------------------
//
CGetObjectReferences::CGetObjectReferences( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection ) :
- CRequestProcessor( aFramework,
- aConnection,
- sizeof ( KMTPGetObjectReferencesPolicy ) / sizeof( TMTPRequestElementInfo ),
- KMTPGetObjectReferencesPolicy )
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig ) :
+ CRequestProcessor( aFramework,
+ aConnection,
+ sizeof ( KMTPGetObjectReferencesPolicy ) / sizeof( TMTPRequestElementInfo ),
+ KMTPGetObjectReferencesPolicy ),
+ iDpConfig( aDpConfig )
{
PRINT( _L( "Operation: GetObjectReferences(0x9810)" ) );
}
@@ -105,13 +125,45 @@
void CGetObjectReferences::ServiceL()
{
PRINT( _L( "MM MTP => CGetObjectReferences::ServiceL" ) );
+
+ MmMtpDpUtility::SetPSStatus( EMtpPSStatusActive );
TUint32 objectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
PRINT1( _L( "MM MTP <> CGetObjectReferences::ServiceL objectHandle = 0x%x" ),
- objectHandle );
- MMTPReferenceMgr& referenceMgr = iFramework.ReferenceMgr();
+ objectHandle );
+
+ CMTPObjectMetaData* parentObject = iRequestChecker->GetObjectInfo( objectHandle );
+ __ASSERT_DEBUG( parentObject, Panic( EMmMTPDpObjectNull ) );
+
+ iFramework.ObjectMgr().ObjectL( objectHandle, *parentObject );
+ TUint subFormatCode = parentObject->Uint( CMTPObjectMetaData::EFormatSubCode );
+ PRINT1( _L( "MM MTP <> CGetObjectReferences::ServiceL subFormatCode = 0x%x" ),
+ subFormatCode );
+
+ if ( MmMtpDpUtility::HasReference( parentObject->Uint( CMTPObjectMetaData::EFormatCode ) )
+ && ( subFormatCode == EMTPSubFormatCodeUnknown ) )
+ {
+ CDesCArray* references = new ( ELeave ) CDesCArrayFlat( KMTPDriveGranularity );
+ CleanupStack::PushL( references ); // + references
+
+ PERFLOGSTART( KMpxQueryAbstractMediaReference );
+ TRAP_IGNORE( iDpConfig.GetWrapperL().GetAllReferenceL( *parentObject, *references ) );
+ PERFLOGSTOP( KMpxQueryAbstractMediaReference );
+
+ // insert references into reference db
+ TPtrC parentSuid( parentObject->DesC( CMTPObjectMetaData::ESuid ) );
+ AddReferencesL( parentSuid, *references );
+
+ CleanupStack::PopAndDestroy( references ); // - references
+
+ parentObject->SetUint( CMTPObjectMetaData::EFormatSubCode, EMTPSubFormatCodeUndefined ); // set it to something else
+ iFramework.ObjectMgr().ModifyObjectL( *parentObject );
+ }
+
+
delete iReferences;
iReferences = NULL;
+ MMTPReferenceMgr& referenceMgr = iFramework.ReferenceMgr();
iReferences = referenceMgr.ReferencesLC( TMTPTypeUint32( objectHandle ) );
CleanupStack::Pop( iReferences );
SendDataL( *iReferences );
@@ -140,4 +192,44 @@
PRINT( _L( "MM MTP <= CGetObjectReferences::ServiceL" ) );
}
+// -----------------------------------------------------------------------------
+// CGetObjectReferences::AddReferencesL
+// GetObjectInfo request handler
+// -----------------------------------------------------------------------------
+//
+void CGetObjectReferences::AddReferencesL( const TDesC& aRefOwnerSuid,
+ CDesCArray& aReferences )
+ {
+ TInt count = aReferences.Count();
+ PRINT2( _L("MM MTP => CGetObjectReferences::AddReferencesL aRefOwnerSuid = %S, ref count = %d"), &aRefOwnerSuid, count );
+
+ // check if references are valid
+ TInt removeCount = 0;
+ for ( TInt i = 0; i < count; i++ )
+ {
+ TInt index = i - removeCount;
+ TPtrC temp( aReferences[index] );
+ PRINT2( _L( "MM MTP <> CGetObjectReferences::AddReferencesL ref[%d]'s name = %S" ), index, &temp );
+ PERFLOGSTART( KObjectManagerHandle );
+ TUint32 handle = iFramework.ObjectMgr().HandleL( temp );
+ PERFLOGSTOP( KObjectManagerHandle );
+ if ( handle == KMTPHandleNone ) // object doesn't exist
+ {
+ PRINT1( _L( "MM MTP <> CGetObjectReferences::AddReferencesL, [%S] doesn't existed in handle db, remove this from reference array" ), &temp );
+
+ // if handle is invalid, remove from reference array
+ aReferences.Delete( index, 1 );
+ removeCount++;
+ }
+ }
+
+ // add all references into references db
+ MMTPReferenceMgr& referenceMgr = iFramework.ReferenceMgr();
+ PERFLOGSTART( KReferenceManagerSetReference );
+ referenceMgr.SetReferencesL( aRefOwnerSuid, aReferences );
+ PERFLOGSTOP( KReferenceManagerSetReference );
+
+ PRINT( _L( "MM MTP <= CGetObjectReferences::AddReferencesL" ) );
+ }
+
// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetpartialobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetpartialobject.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -17,13 +17,11 @@
#include <mtp/cmtptypefile.h>
-#include <mtp/mmtpdataproviderframework.h>
-#include <mtp/cmtpobjectmetadata.h>
#include "cgetpartialobject.h"
+#include "mmmtpdputility.h"
#include "mmmtpdplogger.h"
#include "tmmmtpdppanic.h"
-#include "ttypeflatbuf.h"
#include "mmmtpdpconfig.h"
/**
@@ -41,7 +39,7 @@
//
EXPORT_C MMmRequestProcessor* CGetPartialObject::NewL( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig )
+ MMmMtpDpConfig& /*aDpConfig*/ )
{
CGetPartialObject* self = new (ELeave) CGetPartialObject( aFramework, aConnection );
CleanupStack::PushL( self );
@@ -57,8 +55,6 @@
//
EXPORT_C CGetPartialObject::~CGetPartialObject()
{
- delete iBuffer;
- delete iPartialData;
delete iFileObject;
}
@@ -67,20 +63,27 @@
// Standard c++ constructor
// -----------------------------------------------------------------------------
//
-EXPORT_C CGetPartialObject::CGetPartialObject( MMTPDataProviderFramework& aFramework,
+CGetPartialObject::CGetPartialObject( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection ) :
- CRequestProcessor( aFramework,
- aConnection,
- sizeof( KMTPGetPartialObjectPolicy ) / sizeof( TMTPRequestElementInfo ),
- KMTPGetPartialObjectPolicy ),
- iFramework ( aFramework ),
- iFs( iFramework.Fs() ),
- iBufferPtr8( NULL, 0 )
+ CRequestProcessor( aFramework,
+ aConnection,
+ sizeof( KMTPGetPartialObjectPolicy ) / sizeof( TMTPRequestElementInfo ),
+ KMTPGetPartialObjectPolicy ),
+ iFramework ( aFramework )
{
PRINT( _L( "Operation: GetPartialObject(0x101B)" ) );
}
// -----------------------------------------------------------------------------
+// CGetPartialObject::ConstructL()
+// Second-phase construction
+// -----------------------------------------------------------------------------
+//
+void CGetPartialObject::ConstructL()
+ {
+ }
+
+// -----------------------------------------------------------------------------
// CGetPartialObject::CheckRequestL
// Check the GetPartialObject reqeust
// -----------------------------------------------------------------------------
@@ -106,14 +109,17 @@
TBool CGetPartialObject::VerifyParametersL()
{
PRINT( _L( "MM MTP => CGetPartialObject::VerifyParametersL" ) );
+
__ASSERT_DEBUG( iRequestChecker, Panic( EMmMTPDpRequestCheckNull ) );
TBool result = EFalse;
iObjectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
- PRINT1( _L( "MM MTP <> CGetPartialObject::VerifyParametersL iObjectHandle = 0x%x" ), iObjectHandle );
iOffset = Request().Uint32( TMTPTypeRequest::ERequestParameter2 );
- PRINT1( _L( "MM MTP <> CGetPartialObject::VerifyParametersL iOffset = %d" ), iOffset );
- TUint32 maxLength = Request().Uint32( TMTPTypeRequest::ERequestParameter3 );
- PRINT1( _L( "MM MTP <> CGetPartialObject::VerifyParametersL maxLength = %d" ), maxLength );
+ iPartialDataLength = Request().Uint32( TMTPTypeRequest::ERequestParameter3 );
+
+ PRINT3( _L( "MM MTP <> CGetPartialObject::VerifyParametersL iObjectHandle = 0x%x, iOffset = 0x%x, iMaxLength = 0x%x " ),
+ iObjectHandle,
+ iOffset,
+ iPartialDataLength );
//get object info, but do not have the ownship of the object
CMTPObjectMetaData* objectInfo = iRequestChecker->GetObjectInfo( iObjectHandle );
@@ -122,28 +128,12 @@
const TDesC& suid( objectInfo->DesC( CMTPObjectMetaData::ESuid ) );
PRINT1( _L( "MM MTP <> CGetPartialObject::VerifyParametersL suid = %S" ), &suid );
- if ( objectInfo->Uint( CMTPObjectMetaData::EDataProviderId )
- == iFramework.DataProviderId() )
- result = ETrue;
-
TEntry fileEntry;
- User::LeaveIfError( iFs.Entry( suid, fileEntry ) );
- TInt64 fileSize = fileEntry.iSize;
- if( ( iOffset < fileEntry.iSize ) && result )
+ User::LeaveIfError( iFramework.Fs().Entry( suid, fileEntry ) );
+ if ( iOffset < fileEntry.FileSize() )
{
- if ( maxLength == fileSize )
- {
- iCompleteFile = ETrue;
- }
-
- if( iOffset + maxLength > fileSize )
- {
- maxLength = fileSize - iOffset;
- }
- iPartialDataLength = maxLength;
result = ETrue;
}
- PRINT1( _L( "MM MTP <> CGetPartialObject::VerifyParametersL iPartialDataLength = %d" ), iPartialDataLength );
PRINT1( _L( "MM MTP <= CGetPartialObject::VerifyParametersL result = %d" ), result );
return result;
@@ -157,29 +147,23 @@
EXPORT_C void CGetPartialObject::ServiceL()
{
PRINT( _L( "MM MTP => CGetPartialObject::ServiceL" ) );
+
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
+
// Get file information
CMTPObjectMetaData* objectInfo = iRequestChecker->GetObjectInfo( iObjectHandle );
__ASSERT_DEBUG( objectInfo, Panic( EMmMTPDpObjectNull ) );
- iFileSuid.SetLength( 0 );
- iFileSuid.Append( objectInfo->DesC( CMTPObjectMetaData::ESuid ) );
+
+ TPtrC fileName = objectInfo->DesC( CMTPObjectMetaData::ESuid );
- if ( iCompleteFile )
- {
- // Pass the complete file back to the host
- delete iFileObject;
- iFileObject = NULL;
- iFileObject = CMTPTypeFile::NewL( iFramework.Fs(), iFileSuid, EFileRead );
- SendDataL( *iFileObject );
- }
- else
- {
- // Send partial file fragment back.
- BuildPartialDataL();
- delete iPartialData;
- iPartialData = NULL;
- iPartialData = new (ELeave) TMTPTypeFlatBuf( iBufferPtr8 );
- SendDataL( *iPartialData );
- }
+ iFileObject = CMTPTypeFile::NewL( iFramework.Fs(),
+ fileName,
+ ( TFileMode ) ( EFileRead | EFileShareReadersOnly ),
+ iPartialDataLength,
+ iOffset );
+
+ SendDataL( *iFileObject );
+
PRINT( _L( "MM MTP <= CGetPartialObject::ServiceL" ) );
}
@@ -191,50 +175,12 @@
EXPORT_C TBool CGetPartialObject::DoHandleResponsePhaseL()
{
PRINT( _L( "MM MTP => CGetPartialObject::DoHandleResponsePhaseL" ) );
- TUint32 dataLength = iPartialDataLength;
- PRINT1( _L( "MM MTP <> CGetPartialObject::DoHandleResponsePhaseL dataLength = %d" ), dataLength );
+
+ TUint32 dataLength = iFileObject->GetByteSent();
SendResponseL( EMTPRespCodeOK, 1, &dataLength );
- PRINT( _L( "MM MTP <= CGetPartialObject::DoHandleResponsePhaseL" ) );
+
+ PRINT1( _L( "MM MTP <= CGetPartialObject::DoHandleResponsePhaseL dataLength = %d" ), dataLength );
return EFalse;
}
-// -----------------------------------------------------------------------------
-// CGetPartialObject::ConstructL()
-// Second-phase construction
-// -----------------------------------------------------------------------------
-//
-void CGetPartialObject::ConstructL()
- {
- SetPSStatus();
- }
-
-// -----------------------------------------------------------------------------
-// CGetPartialObject::BuildPartialDataL()
-// Populate the partial data object
-// -----------------------------------------------------------------------------
-//
-void CGetPartialObject::BuildPartialDataL()
- {
- PRINT( _L( "MM MTP => CGetPartialObject::BuildPartialDataL" ) );
- __ASSERT_DEBUG( iRequestChecker, Panic( EMmMTPDpRequestCheckNull ) );
-
- if ( iBuffer )
- {
- delete iBuffer;
- iBuffer = NULL;
- }
-
- // We might fail if we have insufficient memory...
- iBuffer = HBufC8::NewL( iPartialDataLength );
- iBuffer->Des().Zero();
- iBufferPtr8.Set( iBuffer->Des() );
-
- RFile file;
- User::LeaveIfError( file.Open( iFs, iFileSuid, EFileRead ) );
- CleanupClosePushL( file ); // + file
- User::LeaveIfError( file.Read( iOffset, iBufferPtr8, iPartialDataLength ) );
- CleanupStack::PopAndDestroy( &file ); // - file
- PRINT( _L( "MM MTP <= CGetPartialObject::BuildPartialDataL" ) );
- }
-
// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cmoveobject.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -17,14 +17,12 @@
#include <bautils.h>
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/mmtpobjectmgr.h>
#include <mtp/mmtpstoragemgr.h>
-#include <mtp/mmtpreferencemgr.h>
-#include <mtp/cmtpobjectmetadata.h>
#include <mtp/cmtptypearray.h>
#include <mtp/cmtptypestring.h>
#include <mtp/cmtptypeobjectproplist.h>
+#include <mtp/mmtpreferencemgr.h>
#include "cmoveobject.h"
#include "mmmtpdplogger.h"
@@ -32,6 +30,7 @@
#include "mmmtpdputility.h"
#include "cmmmtpdpmetadataaccesswrapper.h"
#include "mmmtpdpconfig.h"
+#include "cpropertysettingutility.h"
/**
* Verification data for the MoveObject request
@@ -39,37 +38,32 @@
const TMTPRequestElementInfo KMTPMoveObjectPolicy[] =
{
{
- TMTPTypeRequest::ERequestParameter1, EMTPElementTypeObjectHandle,
- EMTPElementAttrFileOrDir | EMTPElementAttrWrite, 0, 0, 0
+ TMTPTypeRequest::ERequestParameter1,
+ EMTPElementTypeObjectHandle,
+ EMTPElementAttrFile | EMTPElementAttrWrite,
+ 0,
+ 0,
+ 0
},
{
- TMTPTypeRequest::ERequestParameter2, EMTPElementTypeStorageId,
- EMTPElementAttrWrite, 0, 0, 0
+ TMTPTypeRequest::ERequestParameter2,
+ EMTPElementTypeStorageId,
+ EMTPElementAttrWrite,
+ 0,
+ 0,
+ 0
},
{
- TMTPTypeRequest::ERequestParameter3, EMTPElementTypeObjectHandle,
- EMTPElementAttrDir | EMTPElementAttrWrite, 1, 0, 0
+ TMTPTypeRequest::ERequestParameter3,
+ EMTPElementTypeObjectHandle,
+ EMTPElementAttrDir | EMTPElementAttrWrite,
+ 1,
+ 0,
+ 0
}
};
// -----------------------------------------------------------------------------
-// CMoveObject::NewL
-// Two-phase construction method
-// -----------------------------------------------------------------------------
-//
-//EXPORT_C MMmRequestProcessor* CMoveObject::NewL( MMTPDataProviderFramework& aFramework,
-// MMTPConnection& aConnection,
-// CMmMtpDpMetadataAccessWrapper& aWrapper )
-// {
-// CMoveObject* self = new (ELeave) CMoveObject( aFramework, aConnection, aWrapper );
-// CleanupStack::PushL( self );
-// self->ConstructL();
-// CleanupStack::Pop( self );
-//
-// return self;
-// }
-
-// -----------------------------------------------------------------------------
// CMoveObject::~CMoveObject
// Destructor
// -----------------------------------------------------------------------------
@@ -79,12 +73,10 @@
Cancel();
delete iDest;
- delete iFileMan;
- delete iPathToMove;
- delete iNewRootFolder;
- iObjectHandles.Close();
+
if ( iPropertyElement )
delete iPropertyElement;
+
delete iPropertyList;
}
@@ -94,18 +86,28 @@
// -----------------------------------------------------------------------------
//
EXPORT_C CMoveObject::CMoveObject( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig) :
- CRequestProcessor( aFramework, aConnection, sizeof( KMTPMoveObjectPolicy )
- /sizeof( TMTPRequestElementInfo ), KMTPMoveObjectPolicy),
- iDpConfig( aDpConfig ),
- iObjectHandles( KMmMtpRArrayGranularity ),
- iMoveObjectIndex( 0 )
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig ) :
+ CRequestProcessor( aFramework,
+ aConnection,
+ sizeof( KMTPMoveObjectPolicy ) / sizeof( TMTPRequestElementInfo ),
+ KMTPMoveObjectPolicy ),
+ iDpConfig( aDpConfig )
{
PRINT( _L( "Operation: MoveObject(0x1019)" ) );
}
// -----------------------------------------------------------------------------
+// CMoveObject::ConstructL
+// Second phase constructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMoveObject::ConstructL()
+ {
+ iPropertyList = CMTPTypeObjectPropList::NewL();
+ }
+
+// -----------------------------------------------------------------------------
// CMoveObject::ServiceL
// MoveObject request handler
// -----------------------------------------------------------------------------
@@ -113,156 +115,19 @@
EXPORT_C void CMoveObject::ServiceL()
{
PRINT( _L( "MM MTP => CMoveObject::ServiceL" ) );
- TMTPResponseCode ret = MoveObjectL();
- PRINT1( _L( "MM MTP <> CMoveObject::ServiceL ret = 0x%x" ), ret );
- if ( EMTPRespCodeOK != ret )
- {
- SendResponseL( ret );
- }
+
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
+ MoveObjectL();
+
PRINT( _L( "MM MTP <= CMoveObject::ServiceL" ) );
}
// -----------------------------------------------------------------------------
-// CMoveObject::ConstructL
-// Second phase constructor
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMoveObject::ConstructL()
- {
- CActiveScheduler::Add( this );
-
- iPropertyList = CMTPTypeObjectPropList::NewL();
- SetPSStatus();
- }
-
-// -----------------------------------------------------------------------------
-// CMoveObject::RunL
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMoveObject::RunL()
- {
- PRINT( _L( "MM MTP => CMoveObject::RunL" ) );
- if ( MoveOwnedObjectsL() )
- {
- // Reset iMoveObjectIndex count since move completed
- iMoveObjectIndex = 0;
-
- TMTPResponseCode ret = EMTPRespCodeOK;
- // Delete the original folders in the device dp.
- if ( iObjectInfo->Uint( CMTPObjectMetaData::EDataProviderId )
- == iFramework.DataProviderId() )
- {
- ret = FinalPhaseMove();
- }
- PRINT1( _L("MM MTP <> CMoveObject::RunL ret = 0x%x"), ret );
- SendResponseL( ret );
- }
- PRINT( _L( "MM MTP <= CMoveObject::RunL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CMoveObject::RunError
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMoveObject::RunError( TInt aError )
- {
- if ( aError != KErrNone )
- PRINT1( _L( "MM MTP <> CMoveObject::RunError aError = %d" ), aError );
- TRAP_IGNORE( SendResponseL( EMTPRespCodeGeneralError ) );
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CMoveObject::MoveFileL
-// A helper function of MoveObjectL
+// CMoveObject::MoveObjectL
+// Move object operation
// -----------------------------------------------------------------------------
//
-void CMoveObject::MoveFileL( const TDesC& aNewFileName )
- {
- PRINT1( _L( "MM MTP => CMoveObject::MoveFileL aNewFileName = %S" ), &aNewFileName );
- const TDesC& suid( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
- TFileName oldFileName( suid ); // save the old file name, the suid will be modified
- PRINT1( _L( "MM MTP <> CMoveObject::MoveFileL oldFileName = %S" ), &suid );
-
- if ( iStorageId == iObjectInfo->Uint( CMTPObjectMetaData::EStorageId ) )
- iSameStorage = ETrue;
- else
- iSameStorage = EFalse;
- GetPreviousPropertiesL( *iObjectInfo );
- User::LeaveIfError( iFileMan->Move( suid, aNewFileName ) ); // iDest just Folder
- User::LeaveIfError( iFramework.Fs().SetModified( aNewFileName, iPreviousModifiedTime ) );
-
- iObjectInfo->SetDesCL( CMTPObjectMetaData::ESuid, aNewFileName );
- iObjectInfo->SetUint( CMTPObjectMetaData::EStorageId, iStorageId );
- iObjectInfo->SetUint( CMTPObjectMetaData::EParentHandle, iNewParentHandle );
- iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo );
- SetPropertiesL( oldFileName, aNewFileName, *iObjectInfo );
- PRINT( _L( "MM MTP <= CMoveObject::MoveFileL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CMoveObject::MoveOwnedObjectsL
-// Move the objects through iterations of RunL
-// -----------------------------------------------------------------------------
-//
-TBool CMoveObject::MoveOwnedObjectsL()
- {
- PRINT( _L( "MM MTP => CMoveObject::MoveOwnedObjectsL" ) );
- TBool ret = EFalse;
-
- if ( iMoveObjectIndex < iNumberOfObjects )
- {
- MoveAndUpdateL( iObjectHandles[iMoveObjectIndex++] );
-
- TRequestStatus* status = &iStatus;
- User::RequestComplete( status, iStatus.Int() );
- SetActive();
- }
- else
- {
- ret = ETrue;
- }
-
- PRINT1( _L( "MM MTP <= CMoveObject::MoveOwnedObjectsL ret = %d" ), ret );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// CMoveObject::MoveFolderL
-// A helper function of MoveObjectL
-// -----------------------------------------------------------------------------
-//
-void CMoveObject::MoveFolderL()
- {
- PRINT( _L( "MM MTP => CMoveObject::MoveFolderL" ) );
- RBuf oldFolderName;
- oldFolderName.CreateL( KMaxFileName );
- oldFolderName.CleanupClosePushL(); // + oldFileName
- oldFolderName = iObjectInfo->DesC( CMTPObjectMetaData::ESuid );
- PRINT1( _L( "MM MTP <> CMoveObject::MoveFolderL oldFolderName = %S" ), &oldFolderName );
- iPathToMove = oldFolderName.AllocL();
- CleanupStack::PopAndDestroy( &oldFolderName ); // - oldFolderName
-
- GenerateObjectHandleListL( iObjectInfo->Uint( CMTPObjectMetaData::EHandle ) );
-
- iNumberOfObjects = iObjectHandles.Count();
- PRINT1( _L( "MM MTP <> CMoveObject::MoveFolderL iNumberOfObjects = %d" ), iNumberOfObjects );
-
- TRequestStatus* status = &iStatus;
- User::RequestComplete( status, iStatus.Int() );
- SetActive();
-
- PRINT( _L( "MM MTP <= CMoveObject::MoveFolderL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CMoveObject::MoveObjectL
-// move object operations
-// -----------------------------------------------------------------------------
-//
-TMTPResponseCode CMoveObject::MoveObjectL()
+void CMoveObject::MoveObjectL()
{
PRINT( _L( "MM MTP => CMoveObject::MoveObjectL" ) );
TMTPResponseCode responseCode = EMTPRespCodeOK;
@@ -274,57 +139,26 @@
newObjectName.CleanupClosePushL(); // + newObjectName
newObjectName = *iDest;
- const TDesC& suid( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
+ TPtrC suid( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
TParsePtrC fileNameParser( suid );
-
- // Check if the object is a folder or a file.
- TBool isFolder = EFalse;
- User::LeaveIfError( BaflUtils::IsFolder( iFramework.Fs(), suid, isFolder ) );
-
- if ( !isFolder )
- {
- if ( ( newObjectName.Length() + fileNameParser.NameAndExt().Length() ) <= newObjectName.MaxLength() )
- {
- newObjectName.Append( fileNameParser.NameAndExt() );
- }
- responseCode = CanMoveObjectL( suid, newObjectName );
- }
- else // It is a folder.
+ if ( ( newObjectName.Length() + fileNameParser.NameAndExt().Length() )
+ <= newObjectName.MaxLength() )
{
- TFileName rightMostFolderName;
- User::LeaveIfError( BaflUtils::MostSignificantPartOfFullName( suid,
- rightMostFolderName ) );
- if ( ( newObjectName.Length() + rightMostFolderName.Length() + 1 ) <= newObjectName.MaxLength() )
- {
- newObjectName.Append( rightMostFolderName );
- // Add backslash.
- _LIT( KBackSlash, "\\" );
- newObjectName.Append( KBackSlash );
- }
- }
-
- iNewRootFolder = newObjectName.AllocL();
+ newObjectName.Append( fileNameParser.NameAndExt() );
+ responseCode = CanMoveObjectL( suid, newObjectName );
- if ( responseCode == EMTPRespCodeOK )
- {
- delete iFileMan;
- iFileMan = NULL;
- iFileMan = CFileMan::NewL( iFramework.Fs() );
-
- if ( !isFolder )
- {
+ if ( responseCode == EMTPRespCodeOK )
MoveFileL( newObjectName );
- SendResponseL( responseCode );
- }
- else
- {
- MoveFolderL();
- }
}
- CleanupStack::PopAndDestroy( &newObjectName ); // - newObjectName.
+ else
+ // Destination is not appropriate for the full path name shouldn't be longer than 255
+ responseCode = EMTPRespCodeInvalidDataset;
+
+ SendResponseL( responseCode );
+
+ CleanupStack::PopAndDestroy( &newObjectName ); // - newObjectName
PRINT1( _L( "MM MTP <= CMoveObject::MoveObjectL responseCode = 0x%x" ), responseCode );
- return responseCode;
}
// -----------------------------------------------------------------------------
@@ -335,30 +169,33 @@
void CMoveObject::GetParametersL()
{
PRINT( _L( "MM MTP => CMoveObject::GetParametersL" ) );
+
__ASSERT_DEBUG( iRequestChecker, Panic( EMmMTPDpRequestCheckNull ) );
TUint32 objectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
iStorageId = Request().Uint32( TMTPTypeRequest::ERequestParameter2 );
iNewParentHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter3 );
- PRINT3( _L( "MM MTP <> objectHandle = 0x%x, iStoargeId = 0x%x, iNewParentHandle = 0x%x" ),
- objectHandle, iStorageId, iNewParentHandle );
+ PRINT3( _L( "MM MTP <> objectHandle = 0x%x, iStorageId = 0x%x, iNewParentHandle = 0x%x" ),
+ objectHandle,
+ iStorageId,
+ iNewParentHandle );
// not taking owernship
iObjectInfo = iRequestChecker->GetObjectInfo( objectHandle );
__ASSERT_DEBUG( iObjectInfo, Panic( EMmMTPDpObjectNull ) );
- if ( iNewParentHandle == 0 )
+ if ( iNewParentHandle == KMTPHandleNone )
{
SetDefaultParentObjectL();
}
else
{
- CMTPObjectMetaData* parentObjectInfo =
- iRequestChecker->GetObjectInfo( iNewParentHandle );
- __ASSERT_DEBUG( parentObjectInfo, Panic( EMmMTPDpObjectNull ) );
+ CMTPObjectMetaData* parentObject = iRequestChecker->GetObjectInfo( iNewParentHandle );
+ __ASSERT_DEBUG( parentObject, Panic( EMmMTPDpObjectNull ) );
+
delete iDest;
iDest = NULL;
- iDest = parentObjectInfo->DesC( CMTPObjectMetaData::ESuid ).AllocL();
+ iDest = parentObject->DesC( CMTPObjectMetaData::ESuid ).AllocL();
PRINT1( _L( "MM MTP <> CMoveObject::GetParametersL iDest = %S" ), iDest );
}
PRINT( _L( "MM MTP <= CMoveObject::GetParametersL" ) );
@@ -375,11 +212,10 @@
delete iDest;
iDest = NULL;
- iDest = ( iFramework.StorageMgr().StorageL( iStorageId ).DesC(
- CMTPStorageMetaData::EStorageSuid ) ).AllocL();
- PRINT1( _L( "MM MTP <> CMoveObject::SetDefaultParentObjectL iDest = %S" ), iDest );
+ iDest = iFramework.StorageMgr().StorageL( iStorageId ).DesC( CMTPStorageMetaData::EStorageSuid ).AllocL();
iNewParentHandle = KMTPHandleNoParent;
- PRINT( _L( "MM MTP <= CMoveObject::SetDefaultParentObjectL" ) );
+
+ PRINT1( _L( "MM MTP <= CMoveObject::SetDefaultParentObjectL, iDest = %S" ), iDest );
}
// -----------------------------------------------------------------------------
@@ -388,19 +224,21 @@
// -----------------------------------------------------------------------------
//
TMTPResponseCode CMoveObject::CanMoveObjectL( const TDesC& aOldName,
- const TDesC& aNewName ) const
+ const TDesC& aNewName ) const
{
- PRINT( _L( "MM MTP => CMoveObject::CanMoveObjectL" ) );
+ PRINT2( _L( "MM MTP => CMoveObject::CanMoveObjectL aOldName = %S, aNewName = %S" ),
+ &aOldName,
+ &aNewName );
TMTPResponseCode result = EMTPRespCodeOK;
TEntry fileEntry;
User::LeaveIfError( iFramework.Fs().Entry( aOldName, fileEntry ) );
- TDriveNumber drive( static_cast<TDriveNumber>( iFramework.StorageMgr().DriveNumber( iStorageId ) ) );
+ TInt drive = iFramework.StorageMgr().DriveNumber( iStorageId );
User::LeaveIfError( drive );
TVolumeInfo volumeInfo;
User::LeaveIfError( iFramework.Fs().Volume( volumeInfo, drive ) );
- if ( volumeInfo.iFree < fileEntry.iSize )
+ if ( volumeInfo.iFree < fileEntry.FileSize() )
{
result = EMTPRespCodeStoreFull;
}
@@ -435,6 +273,39 @@
}
// -----------------------------------------------------------------------------
+// CMoveObject::MoveFileL
+// A helper function of MoveObjectL
+// -----------------------------------------------------------------------------
+//
+void CMoveObject::MoveFileL( const TDesC& aNewFileName )
+ {
+ HBufC* oldFileName = iObjectInfo->DesC( CMTPObjectMetaData::ESuid ).AllocLC(); // + oldFileName
+ PRINT2( _L( "MM MTP => CMoveObject::MoveFileL old name = %S, aNewFileName = %S" ),
+ oldFileName,
+ &aNewFileName );
+
+ if ( iStorageId == iObjectInfo->Uint( CMTPObjectMetaData::EStorageId ) )
+ iSameStorage = ETrue;
+ else
+ iSameStorage = EFalse;
+
+ // Move the file first no matter if it will fail in Get/SetPreviousPropertiesL
+ // Already trapped inside
+ GetPreviousPropertiesL( *iObjectInfo );
+ TRAPD( err, SetPropertiesL( aNewFileName ) );
+
+ CFileMan* fileMan = CFileMan::NewL( iFramework.Fs() );
+ err = fileMan->Move( *oldFileName, aNewFileName );
+
+ CleanupStack::PopAndDestroy( oldFileName ); // - oldFileName
+
+ if ( err != KErrNone )
+ PRINT1( _L( "MM MTP <> CMoveObject::MoveFileL err = %d" ), err );
+
+ PRINT( _L( "MM MTP <= CMoveObject::MoveFileL" ) );
+ }
+
+// -----------------------------------------------------------------------------
// CMoveObject::GetPreviousPropertiesL
// Save the object properties before doing the move
// -----------------------------------------------------------------------------
@@ -445,8 +316,6 @@
const TDesC& suid( aObject.DesC( CMTPObjectMetaData::ESuid ) );
- User::LeaveIfError( iFramework.Fs().Modified( suid, iPreviousModifiedTime ) );
-
// same storage, not necessary to get the properties
if ( iSameStorage )
return;
@@ -454,12 +323,11 @@
TUint formatCode = aObject.Uint( CMTPObjectMetaData::EFormatCode );
const RArray<TUint>* properties = iDpConfig.GetSupportedPropertiesL( formatCode );
TInt count = properties->Count();
- CMTPTypeString* textData = NULL;
TInt err = KErrNone;
TUint16 propCode;
- TUint32 handle = aObject.Uint( CMTPObjectMetaData::EHandle ) ;
+ TUint32 handle = aObject.Uint( CMTPObjectMetaData::EHandle );
- if ( iPropertyElement )
+ if ( iPropertyElement != NULL )
{
delete iPropertyElement;
iPropertyElement = NULL;
@@ -467,8 +335,9 @@
for ( TInt i = 0; i < count; i++ )
{
- propCode = (*properties)[i];
- switch( propCode )
+ propCode = ( *properties )[i];
+
+ switch ( propCode )
{
case EMTPObjectPropCodeStorageID:
case EMTPObjectPropCodeObjectFormat:
@@ -477,43 +346,40 @@
case EMTPObjectPropCodeObjectFileName:
case EMTPObjectPropCodeParentObject:
case EMTPObjectPropCodePersistentUniqueObjectIdentifier:
- case EMTPObjectPropCodeNonConsumable:
case EMTPObjectPropCodeDateCreated:
case EMTPObjectPropCodeDateModified:
break;
+ case EMTPObjectPropCodeNonConsumable:
+ iPropertyElement = &( iPropertyList->ReservePropElemL( handle, propCode ) );
+ iPropertyElement->SetUint8L( CMTPTypeObjectPropListElement::EValue,
+ aObject.Uint( CMTPObjectMetaData::ENonConsumable ) );
+ break;
+
case EMTPObjectPropCodeName:
case EMTPObjectPropCodeDateAdded:
- if ( ( propCode == EMTPObjectPropCodeName )
- || ( ( !MmMtpDpUtility::IsVideoL( aObject.DesC( CMTPObjectMetaData::ESuid ), iFramework ) )
- && ( propCode == EMTPObjectPropCodeDateAdded ) ) )
- {
- textData = CMTPTypeString::NewLC(); // + textData
+ case EMTPObjectPropCodeAlbumArtist:
+ {
+ CMTPTypeString* textData = CMTPTypeString::NewLC(); // + textData
- TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( propCode,
- *textData,
- aObject ) );
-
- PRINT1( _L( "MM MTP <> CMoveObject::GetPreviousPropertiesL::ServiceSpecificObjectPropertyL err = %d" ), err );
+ TRAP( err, iDpConfig.GetWrapperL().GetObjectMetadataValueL( propCode,
+ *textData,
+ aObject ) );
+ PRINT1( _L( "MM MTP <> CMoveObject::GetPreviousPropertiesL err = %d" ), err );
- if ( err == KErrNone )
- {
- iPropertyElement = &(iPropertyList->ReservePropElemL(handle, propCode));
- iPropertyElement->SetStringL(CMTPTypeObjectPropListElement::EValue, textData->StringChars());
-// iPropertyElement = CMTPTypeObjectPropListElement::NewL(
-// handle, propCode, *textData );
- }
- else if ( err == KErrNotFound )
- {
- iPropertyElement = NULL;
- }
- else
- {
- User::Leave( err );
- }
+ if ( err == KErrNone )
+ {
+ iPropertyElement = &( iPropertyList->ReservePropElemL( handle, propCode ) );
+ iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue,
+ textData->StringChars() );
+ }
+ else
+ {
+ iPropertyElement = NULL;
+ }
- CleanupStack::PopAndDestroy( textData ); // - textData
- }
+ CleanupStack::PopAndDestroy( textData ); // - textData
+ }
break;
default:
@@ -523,92 +389,40 @@
break;
}
- if ( iPropertyElement )
+ if ( iPropertyElement != NULL )
{
iPropertyList->CommitPropElemL( *iPropertyElement );
-
iPropertyElement = NULL;
}
-
} // end of for loop
PRINT1( _L( "MM MTP <= CMoveObject::GetPreviousPropertiesL err = %d" ), err );
}
// -----------------------------------------------------------------------------
-// CMoveObject::ServiceMetaDataToWrapper
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TMTPResponseCode CMoveObject::ServiceMetaDataToWrapper(
- const TUint16 aPropCode,
- MMTPType& aNewData,
- const CMTPObjectMetaData& aObject )
- {
- TMTPResponseCode resCode = EMTPRespCodeOK;
-
- TRAPD( err, iDpConfig.GetWrapperL().SetObjectMetadataValueL( aPropCode,
- aNewData,
- aObject ) );
-
- PRINT1( _L("MM MTP <> CMoveObject::ServiceMetaDataToWrapper err = %d"), err);
-
- if ( err == KErrNone )
- {
- resCode = EMTPRespCodeOK;
- }
- else if ( err == KErrTooBig )
- // according to the codes of S60
- {
- resCode = EMTPRespCodeInvalidDataset;
- }
- else if ( err == KErrPermissionDenied )
- {
- resCode = EMTPRespCodeAccessDenied;
- }
- else if ( err == KErrNotFound )
- {
- if ( MmMtpDpUtility::HasMetadata( aObject.Uint( CMTPObjectMetaData::EFormatCode ) ) )
- resCode = EMTPRespCodeAccessDenied;
- else
- resCode = EMTPRespCodeOK;
- }
- else
- {
- resCode = EMTPRespCodeGeneralError;
- }
-
- PRINT1( _L("MM MTP <= CMoveObject::ServiceMetaDataToWrapper resCode = 0x%x"), resCode);
-
- return resCode;
- }
-
-// -----------------------------------------------------------------------------
// CMoveObject::SetPreviousPropertiesL
// Set the object properties after doing the move
// -----------------------------------------------------------------------------
//
-void CMoveObject::SetPreviousPropertiesL( const CMTPObjectMetaData& aObject )
+void CMoveObject::SetPreviousPropertiesL()
{
PRINT( _L( "MM MTP => CMoveObject::SetPreviousPropertiesL" ) );
- const TInt count( iPropertyList->NumberOfElements() );
- PRINT1( _L( "MM MTP <> CMoveObject::SetPreviousPropertiesL count = %d" ), count );
+
TMTPResponseCode respcode = EMTPRespCodeOK;
- CMTPTypeString* stringData = NULL;
+
iPropertyList->ResetCursor();
-
+ const TInt count = iPropertyList->NumberOfElements();
for ( TInt i = 0; i < count; i++ )
{
- CMTPTypeObjectPropListElement& element = iPropertyList->GetNextElementL( );
+ CMTPTypeObjectPropListElement& element = iPropertyList->GetNextElementL();
- TUint32 handle = element.Uint32L(
- CMTPTypeObjectPropListElement::EObjectHandle );
- TUint16 propertyCode = element.Uint16L(
- CMTPTypeObjectPropListElement::EPropertyCode );
- TUint16 dataType = element.Uint16L(
- CMTPTypeObjectPropListElement::EDatatype );
+ TUint32 handle = element.Uint32L( CMTPTypeObjectPropListElement::EObjectHandle );
+ TUint16 propertyCode = element.Uint16L( CMTPTypeObjectPropListElement::EPropertyCode );
+ TUint16 dataType = element.Uint16L( CMTPTypeObjectPropListElement::EDatatype );
PRINT3( _L( "MM MTP <> CMoveObject::SetPreviousPropertiesL = 0x%x, propertyCode = 0x%x, dataType = 0x%x" ),
- handle, propertyCode, dataType );
+ handle,
+ propertyCode,
+ dataType );
switch ( propertyCode )
{
@@ -619,20 +433,26 @@
case EMTPObjectPropCodeObjectFileName:
case EMTPObjectPropCodeParentObject:
case EMTPObjectPropCodePersistentUniqueObjectIdentifier:
- case EMTPObjectPropCodeNonConsumable:
case EMTPObjectPropCodeDateCreated:
case EMTPObjectPropCodeDateModified:
case EMTPObjectPropCodeDateAdded:
break;
+ case EMTPObjectPropCodeNonConsumable:
+ iObjectInfo->SetUint( CMTPObjectMetaData::ENonConsumable,
+ element.Uint8L( CMTPTypeObjectPropListElement::EValue ) );
+ iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo );
+ break;
+
case EMTPObjectPropCodeName:
+ case EMTPObjectPropCodeAlbumArtist:
{
- stringData = CMTPTypeString::NewLC(
- element.StringL(CMTPTypeObjectPropListElement::EValue)); // + stringData
+ CMTPTypeString *stringData = CMTPTypeString::NewLC( element.StringL( CMTPTypeObjectPropListElement::EValue ) ); // + stringData
- respcode = ServiceMetaDataToWrapper( propertyCode,
+ respcode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig,
+ propertyCode,
*stringData,
- aObject );
+ *iObjectInfo );
CleanupStack::PopAndDestroy( stringData ); // - stringData
}
@@ -640,17 +460,19 @@
default:
{
- respcode = ServiceSetSpecificObjectPropertyL( propertyCode,
- aObject,
- element );
+ respcode = iDpConfig.PropSettingUtility()->SetSpecificObjectPropertyL( iDpConfig,
+ propertyCode,
+ *iObjectInfo,
+ element );
}
break;
}
} // end of for loop
- if( respcode == EMTPRespCodeOK )
+ // ignore errors
+ if ( respcode == EMTPRespCodeOK )
{
- // do nothing, ignore warning
+ // do nothing, just to get rid of build warning
}
PRINT1( _L( "MM MTP <= CMoveObject::SetPreviousPropertiesL respcode = 0x%x" ), respcode );
@@ -661,189 +483,55 @@
// Set the object properties in the object property store.
// -----------------------------------------------------------------------------
//
-void CMoveObject::SetPropertiesL( const TDesC& aOldFileName, const TDesC& aNewFileName,
- const CMTPObjectMetaData& aNewObject )
+void CMoveObject::SetPropertiesL( const TDesC& aNewFileName )
{
- PRINT2( _L( "MM MTP => CMoveObject::SetPropertiesL aOldFileName = %S, aNewFileName = %S" ),
- &aOldFileName, &aNewFileName );
+ PRINT1( _L( "MM MTP => CMoveObject::SetPropertiesL, aNewFileName = %S" ), &aNewFileName );
- TUint32 formatCode = aNewObject.Uint( CMTPObjectMetaData::EFormatCode );
- // This is used to keep the same behavior in mass storage and device file manager.
+ TUint32 formatCode = iObjectInfo->Uint( CMTPObjectMetaData::EFormatCode );
if ( formatCode == EMTPFormatCodeAbstractAudioVideoPlaylist )
{
+ // This is used to keep the same behavior in mass storage and device file manager.
PRINT( _L( "MM MTP <> CMoveObject::SetPropertiesL Playlist file do not update the MPX DB" ) );
- }
- else
- {
- // if the two object in different stoarge, we should delete the old one and insert new one
- if ( iSameStorage )
- iDpConfig.GetWrapperL().RenameObjectL( aOldFileName, aNewFileName );
- else
- {
- iDpConfig.GetWrapperL().DeleteObjectL( aOldFileName, formatCode );
- iDpConfig.GetWrapperL().AddObjectL( aNewFileName );
- SetPreviousPropertiesL( aNewObject );
- }
+ iDpConfig.GetWrapperL().DeleteDummyFile( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
+ iDpConfig.GetWrapperL().AddDummyFileL( aNewFileName );
}
- // Reference DB is used PUID
-// if ( formatCode == EMTPFormatCodeAbstractAudioVideoPlaylist
-// || formatCode == EMTPFormatCodeM3UPlaylist )
-// {
-// MMTPReferenceMgr& referenceMgr = iFramework.ReferenceMgr();
-// CDesCArray* references = referenceMgr.ReferencesLC( aOldFileName ); // + references
-// referenceMgr.SetReferencesL( aNewFileName, *references );
-// CleanupStack::PopAndDestroy( references ); // - references
-// // delete the old references
-// referenceMgr.RemoveReferencesL( aOldFileName );
-// }
+ if (iSameStorage)
+ {
+ iDpConfig.GetWrapperL().RenameObjectL( *iObjectInfo, aNewFileName );
+ iObjectInfo->SetDesCL( CMTPObjectMetaData::ESuid, aNewFileName );
+ iObjectInfo->SetUint( CMTPObjectMetaData::EStorageId, iStorageId );
+ iObjectInfo->SetUint( CMTPObjectMetaData::EParentHandle, iNewParentHandle );
+ iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo );
+ }
+ else // if the two object in different storage, we should delete the old one and insert new one
+ {
+ iDpConfig.GetWrapperL().DeleteObjectL( *iObjectInfo );
+ HBufC* oldFileName = iObjectInfo->DesC(CMTPObjectMetaData::ESuid).AllocLC(); // + oldFileName
+ iObjectInfo->SetDesCL( CMTPObjectMetaData::ESuid, aNewFileName );
+ iObjectInfo->SetUint( CMTPObjectMetaData::EStorageId, iStorageId );
+ iObjectInfo->SetUint( CMTPObjectMetaData::EParentHandle, iNewParentHandle );
+ iFramework.ObjectMgr().ModifyObjectL(*iObjectInfo);
+
+ iDpConfig.GetWrapperL().AddObjectL( *iObjectInfo );
+
+ if ( formatCode == EMTPFormatCodeAbstractAudioVideoPlaylist
+ || formatCode == EMTPFormatCodeAbstractAudioAlbum )
+ {
+ MMTPReferenceMgr& referenceMgr = iFramework.ReferenceMgr();
+ CDesCArray* references = referenceMgr.ReferencesLC( aNewFileName ); // + references
+ iDpConfig.GetWrapperL().SetReferenceL( *iObjectInfo, *references );
+ CleanupStack::PopAndDestroy( references ); // - references
+ }
+ CleanupStack::PopAndDestroy( oldFileName ); // - oldFileName
+
+ // Only leave when getting proplist element from data received by fw.
+ // It should not happen after ReceiveDataL in which construction of proplist already succeed.
+ SetPreviousPropertiesL();
+ }
PRINT( _L( "MM MTP <= CMoveObject::SetPropertiesL" ) );
}
-// -----------------------------------------------------------------------------
-// CMoveObject::FinalPhaseMove
-// This function will actually delete the orginal folders from the file system
-// -----------------------------------------------------------------------------
-//
-TMTPResponseCode CMoveObject::FinalPhaseMove()
- {
- PRINT( _L( "MM MTP => CMoveObject::FinalPhaseMove" ) );
- TMTPResponseCode ret = EMTPRespCodeOK;
-
- TInt rel = iFileMan->RmDir( *iPathToMove );
- PRINT1( _L( "MM MTP <> CMoveObject::FinalPhaseMove rel = %d" ), rel );
-
- if ( rel != KErrNone )
- {
- ret = EMTPRespCodeGeneralError;
- }
-
- PRINT1( _L( "MM MTP <= CMoveObject::FinalPhaseMove ret = 0x%x" ), ret );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// CMoveObject::GenerateObjectHandleListL
-// Generate the list of handles that need to be moved to the new location
-// -----------------------------------------------------------------------------
-//
-void CMoveObject::GenerateObjectHandleListL( TUint32 aParentHandle )
- {
- PRINT1( _L( "MM MTP => CMoveObject::GenerateObjectHandleListL aParentHandle = 0x%x" ), aParentHandle );
- RMTPObjectMgrQueryContext context;
- RArray<TUint> handles;
- TMTPObjectMgrQueryParams params( KMTPStorageAll, KMTPFormatsAll,
- aParentHandle );
- CleanupClosePushL( context ); // + context
- CleanupClosePushL( handles ); // - handles
-
- do
- {
- iFramework.ObjectMgr().GetObjectHandlesL( params, context, handles );
-
- TInt numberOfObjects = handles.Count();
- for ( TInt i = 0; i < numberOfObjects; i++ )
- {
- if ( iFramework.ObjectMgr().ObjectOwnerId( handles[i] ) == iFramework.DataProviderId() )
- {
- iObjectHandles.AppendL( handles[i] );
- continue;
- }
-
- // Folder
- if ( iFramework.ObjectMgr().ObjectOwnerId( handles[i] ) == 0 ) // We know that the device dp id is always 0, otherwise the whole MTP won't work.
- {
- GenerateObjectHandleListL( handles[i] );
- }
- }
- }
- while ( !context.QueryComplete() );
-
- CleanupStack::PopAndDestroy( &handles ); // - handles
- CleanupStack::PopAndDestroy( &context ); // - contect
-
- PRINT( _L( "MM MTP <= CMoveObject::GenerateObjectHandleListL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CMoveObject::MoveAndUpdateL
-// Move a single object and update the database
-// -----------------------------------------------------------------------------
-//
-void CMoveObject::MoveAndUpdateL( TUint32 aObjectHandle )
- {
- PRINT1( _L( "MM MTP => CMoveObject::MoveAndUpdateL aObjectHanlde = 0x%x" ), aObjectHandle );
-
- CMTPObjectMetaData* objectInfo( CMTPObjectMetaData::NewLC() ); // + objectInfo
-
- RBuf fileName;
- fileName.CreateL( KMaxFileName );
- fileName.CleanupClosePushL(); // + fileName
-
- RBuf rightPartName;
- rightPartName.CreateL( KMaxFileName );
- rightPartName.CleanupClosePushL(); // + rightPartName
-
- RBuf oldName;
- oldName.CreateL( KMaxFileName );
- oldName.CleanupClosePushL(); // + oldName
-
- if ( iFramework.ObjectMgr().ObjectL( TMTPTypeUint32( aObjectHandle ), *objectInfo ) )
- {
- fileName = objectInfo->DesC( CMTPObjectMetaData::ESuid );
- oldName = fileName;
-
- if ( objectInfo->Uint( CMTPObjectMetaData::EDataProviderId )
- == iFramework.DataProviderId() )
- {
- rightPartName = fileName.Right( fileName.Length() - iPathToMove->Length() );
-
- if ( ( iNewRootFolder->Length() + rightPartName.Length() ) > fileName.MaxLength() )
- {
- User::Leave( KErrCorrupt );
- }
-
- fileName.Zero();
- fileName.Append( *iNewRootFolder );
- fileName.Append( rightPartName );
- PRINT1( _L( "MM MTP <> MoveAndUpdateL fileName = %S" ), &fileName );
-
- if ( iStorageId == objectInfo->Uint( CMTPObjectMetaData::EStorageId ) )
- iSameStorage = ETrue;
- else
- iSameStorage = EFalse;
- GetPreviousPropertiesL( *objectInfo );
- TInt err = iFileMan->Move( oldName, fileName );
- PRINT1( _L( "MM MTP <> CMoveObject::MoveAndUpdateL Move error code = %d" ), err );
- User::LeaveIfError( err );
- User::LeaveIfError( iFramework.Fs().SetModified( fileName, iPreviousModifiedTime ) );
-
- objectInfo->SetDesCL( CMTPObjectMetaData::ESuid, fileName );
- objectInfo->SetUint( CMTPObjectMetaData::EStorageId, iStorageId );
- TParsePtrC parentSuid( fileName );
- TUint32 parentHandle = iFramework.ObjectMgr().HandleL( parentSuid.DriveAndPath() );
- objectInfo->SetUint( CMTPObjectMetaData::EParentHandle, parentHandle );
-
- //TUint32 parentHandle = iFramework.ObjectMgr().HandleL( parentSuid.DriveAndPath() );
- PRINT1( _L( "MM MTP <> CMoveObject::MoveAndUpdateL parentHandle = 0x%x" ), parentHandle );
-
- iFramework.ObjectMgr().ModifyObjectL( *objectInfo );
-
- SetPropertiesL( oldName, fileName, *objectInfo );
- }
- }
- else
- {
- User::Leave( KErrCorrupt );
- }
-
- CleanupStack::PopAndDestroy( &oldName ); // - oldName
- CleanupStack::PopAndDestroy( &rightPartName ); // - rightPartName
- CleanupStack::PopAndDestroy( &fileName ); // - fileName
- CleanupStack::PopAndDestroy( objectInfo ); // - objectInfo
- PRINT( _L( "MM MTP <= CMoveObject::MoveAndUpdateL" ) );
- }
-
// end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cpropertysettingutility.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,69 @@
+/*
+* 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 <mtp/cmtptypeobjectproplist.h>
+#include <mtp/cmtptypestring.h>
+#include <mtp/cmtptypearray.h>
+#include <mtp/tmtptypeuint8.h>
+#include <mtp/tmtptypeuint16.h>
+#include <mtp/tmtptypeuint32.h>
+#include <mtp/mtpdatatypeconstants.h>
+
+#include "cpropertysettingutility.h"
+#include "cmmmtpdpmetadataaccesswrapper.h"
+#include "mmmtpdpconfig.h"
+#include "mmmtpdputility.h"
+#include "mmmtpdplogger.h"
+
+EXPORT_C CPropertySettingUtility::CPropertySettingUtility()
+ {
+ // Do nothing
+ }
+
+EXPORT_C CPropertySettingUtility::~CPropertySettingUtility()
+ {
+ // Do nothing
+ }
+
+// -----------------------------------------------------------------------------
+// CPropertySettingUtility::SetMetaDataToWrapper
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TMTPResponseCode CPropertySettingUtility::SetMetaDataToWrapper( MMmMtpDpConfig& aDpConfig,
+ const TUint16 aPropCode,
+ MMTPType& aNewData,
+ const CMTPObjectMetaData& aObjectMetaData )
+ {
+ TMTPResponseCode responseCode = EMTPRespCodeOK;
+ TRAPD( err, aDpConfig.GetWrapperL().SetObjectMetadataValueL( aPropCode,
+ aNewData,
+ aObjectMetaData ) );
+
+ PRINT1( _L("MM MTP <> CPropertySettingUtility::SetMetaDataToWrapper err = %d"), err);
+
+ if ( err == KErrNone )
+ responseCode = EMTPRespCodeOK;
+ else // Other errors are not SetMetaDataToWrapper related, should be respond before this calling
+ responseCode = EMTPRespCodeGeneralError;
+
+ PRINT1( _L( "MM MTP <= CPropertySettingUtility::SetMetaDataToWrapper resCode = 0x%x" ), responseCode );
+
+ return responseCode;
+ }
+
+// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crenameobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crenameobject.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -18,15 +18,14 @@
#include <f32file.h>
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/mmtpobjectmgr.h>
-#include <mtp/cmtpobjectmetadata.h>
#include <mtp/tmtptypeuint32.h>
#include "crenameobject.h"
#include "mmmtpdplogger.h"
#include "cmmmtpdpmetadataaccesswrapper.h"
#include "crequestprocessor.h" // refer to KMmMtpRArrayGranularity
+#include "mmmtpdputility.h"
// -----------------------------------------------------------------------------
// CRenameObject::NewL
@@ -34,7 +33,7 @@
// -----------------------------------------------------------------------------
//
EXPORT_C CRenameObject* CRenameObject::NewL( MMTPDataProviderFramework& aFramework,
- CMmMtpDpMetadataAccessWrapper& aWrapper )
+ CMmMtpDpMetadataAccessWrapper& aWrapper )
{
PRINT( _L( "MM MTP => CRenameObject::NewL" ) );
@@ -59,6 +58,7 @@
iObjectHandles( KMmMtpRArrayGranularity ),
iWrapper ( aWrapper )
{
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -99,6 +99,8 @@
PRINT1( _L( "MM MTP <> CRenameObject::StartL, handle count = %d" ), iCount );
if ( iCount > 0 )
{
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
+
// get the old/new folder full file name
GetParentSuidL( aParentHandle, aOldFolderName );
@@ -121,7 +123,7 @@
//
EXPORT_C void CRenameObject::DoCancel()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -150,12 +152,13 @@
iFileName.Append( iNewFolderName );
iFileName.Append( iRightPartName );
PRINT1( _L( "MM MTP <> CRenameObject::RunL new file name(%S)" ), &iFileName );
+
+ PerformAdditionalActionL();
+
// update framework metadata DB
iObjectInfo->SetDesCL( CMTPObjectMetaData::ESuid, iFileName );
iObjectInfo->SetUint( CMTPObjectMetaData::EObjectMetaDataUpdate, 1 );
iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo );
-
- PerformAdditionalActionL();
}
}
@@ -169,6 +172,8 @@
{
if( iRenameWaiter->IsStarted() )
iRenameWaiter->AsyncStop();
+
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusReadyToSync);
}
PRINT( _L( "MM MTP <= CRenameObject::RunL" ) );
@@ -220,8 +225,7 @@
CleanupClosePushL( context ); // + context
CleanupClosePushL( handles ); // + handles
- TMTPObjectMgrQueryParams params( KMTPStorageAll, KMTPFormatsAll,
- aParentHandle );
+ TMTPObjectMgrQueryParams params( KMTPStorageAll, KMTPFormatsAll, aParentHandle );
do
{
iFramework.ObjectMgr().GetObjectHandlesL( params, context, handles );
@@ -232,14 +236,8 @@
if ( iFramework.ObjectMgr().ObjectOwnerId( handles[i] ) == iFramework.DataProviderId() )
{
iObjectHandles.AppendL( handles[i] );
- continue;
- }
+ // NOTE: Fw changed the mechanism of notification, no need to iterate
- // Folder
- // TODO: need to modify, should not know device dp id
- if ( iFramework.ObjectMgr().ObjectOwnerId( handles[i] ) == 0 ) // We know that the device dp id is always 0, otherwise the whole MTP won't work.
- {
- GenerateObjectHandleListL( handles[i] );
}
}
}
@@ -260,7 +258,8 @@
const TDesC& aFolderName )
{
PRINT2( _L( "MM MTP => CRenameObject::GetParentSuidL aHandle(0x%x), aFolderName(%S)" ),
- aHandle, &aFolderName );
+ aHandle,
+ &aFolderName );
CMTPObjectMetaData* objectInfo( CMTPObjectMetaData::NewLC() ); // + objectInfo
// get the old folder suid
if ( iFramework .ObjectMgr().ObjectL( aHandle, *objectInfo ) )
@@ -268,15 +267,10 @@
iNewFolderName.Zero();
iNewFolderName = objectInfo->DesC( CMTPObjectMetaData::ESuid );
PRINT1( _L( "MM MTP <> CRenameObject::GetParentSuidL new folder full file name(%S)" ), &iNewFolderName );
- const TInt length = iNewFolderName.Length();
-
- TParsePtrC parentSuid( iNewFolderName.Left( length - 1 ) );
iOldFolderFullName.Zero();
- iOldFolderFullName.Append( parentSuid.DriveAndPath() );
iOldFolderFullName.Append( aFolderName ); // just name not suid
- _LIT( KBackSlash, "\\" );
- iOldFolderFullName.Append( KBackSlash );
+
PRINT1( _L( "MM MTP <> CRenameObject::GetParentSuidL = %S" ), &iOldFolderFullName );
}
else
@@ -297,7 +291,7 @@
PRINT( _L( "MM MTP => CRenameObject::PerformAdditionalActionL" ) );
// update MPX DB
- TRAPD( err, iWrapper.RenameObjectL( iOldFileName, iFileName ) );
+ TRAPD( err, iWrapper.RenameObjectL( *iObjectInfo, iFileName ) );
// should not fail for 1 file, keep it going, as folder already renamed
if ( err != KErrNone )
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestchecker.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestchecker.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -11,12 +11,11 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
-#include <mtp/cmtpobjectmetadata.h>
#include <mtp/mmtpconnection.h>
#include <mtp/mmtpdataproviderframework.h>
#include <mtp/mmtpobjectmgr.h>
@@ -54,7 +53,7 @@
iHandles( KMTPRequestCheckerHandleGranularity ),
iObjectArray( KMTPRequestCheckerHandleGranularity )
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -64,7 +63,7 @@
//
void CRequestChecker::ConstructL()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -80,12 +79,12 @@
// -----------------------------------------------------------------------------
// CRequestChecker::VerifyRequestL
-// Verfiy the request
+// Verify the request
// -----------------------------------------------------------------------------
//
TMTPResponseCode CRequestChecker::VerifyRequestL( const TMTPTypeRequest& aRequest,
- TInt aCount,
- const TMTPRequestElementInfo* aElementInfo )
+ TInt aCount,
+ const TMTPRequestElementInfo* aElementInfo )
{
TMTPResponseCode result = EMTPRespCodeOK;
iHandles.Close();
@@ -96,9 +95,11 @@
for ( TInt i = 0; i < aCount && EMTPRespCodeOK == result; i++ )
{
TUint32 parameter = aRequest.Uint32( aElementInfo[i].iElementIndex );
- PRINT3( _L( "MM MTP <> CRequestChecker parameter %d/%d = %d" ),
- i + 1, aCount, parameter );
-
+ PRINT3( _L( "MM MTP <> CRequestChecker parameter %d/%d = %d" ),
+ i + 1,
+ aCount,
+ parameter );
+
if ( !IsSpecialValue( parameter, aElementInfo[i] ) )
{
switch ( aElementInfo[i].iElementType )
@@ -198,7 +199,7 @@
ret = EMTPRespCodeSessionNotOpen;
}
}
-
+
return ret;
}
@@ -209,7 +210,7 @@
// -----------------------------------------------------------------------------
//
TMTPResponseCode CRequestChecker::VerifySessionId( TUint32 aSessionId,
- const TMTPRequestElementInfo& /*aElementInfo*/ ) const
+ const TMTPRequestElementInfo& /*aElementInfo*/ ) const
{
TMTPResponseCode ret = EMTPRespCodeOK;
@@ -224,7 +225,7 @@
{
ret = EMTPRespCodeInvalidParameter;
}
-
+
return ret;
}
@@ -235,7 +236,7 @@
// -----------------------------------------------------------------------------
//
TMTPResponseCode CRequestChecker::VerifyObjectHandleL( TUint32 aHandle,
- const TMTPRequestElementInfo& aElementInfo )
+ const TMTPRequestElementInfo& aElementInfo )
{
PRINT1( _L("MM MTP => CRequestChecker::VerifyObjectHandleL aHandle = 0x%x"), aHandle );
TMTPResponseCode ret = EMTPRespCodeOK;
@@ -252,61 +253,35 @@
const TDesC& suid( object->DesC( CMTPObjectMetaData::ESuid ) );
TEntry entry;
TInt err = iFramework.Fs().Entry( suid, entry );
-
- if ( object->Uint( CMTPObjectMetaData::EFormatCode ) == EMTPFormatCodeAssociation )
-// && ( object->Uint( CMTPObjectMetaData::EFormatSubCode ) == EMTPAssociationTypeGenericFolder ) )
- {
- // Special association type .. not always present on the filesystem.
- return ret;
- }
- else
+
+ if ( err == KErrNotFound )
{
- User::LeaveIfError( err );
-
+ iFramework.ObjectMgr().RemoveObjectL( suid );
+ // TODO: workaround for abstractalbumart
+ // ret = EMTPRespCodeInvalidObjectHandle;
+ }
+ else if ( err != KErrNone )
+ ret = EMTPRespCodeGeneralError;
+ else if ( object->Uint( CMTPObjectMetaData::EFormatCode ) != EMTPFormatCodeAssociation )
+ {
if ( iFramework.ObjectMgr().ObjectOwnerId( aHandle ) != iFramework.DataProviderId() )
- {
- PRINT( _L(" ewrwe ret = EMTPRespCodeInvalidObjectHandle;"));
ret = EMTPRespCodeInvalidObjectHandle;
- }
- }
- if ( aElementInfo.iElementAttr & EMTPElementAttrWrite )
- {
- if ( entry.IsReadOnly() )
- {
+ if ( ( aElementInfo.iElementAttr & EMTPElementAttrWrite ) && entry.IsReadOnly() )
ret = EMTPRespCodeObjectWriteProtected;
- }
- }
-
- //((EMTPRespCodeOK == ret) && (aElementInfo.iElementAttr & EMTPElementAttrFileOrDir)) is
- // covered implicitly here, EMTPRespCodeOK will be returned. It is a valid case for an object to be either a folder or file
- // for certain operation's request parameter, for instance the first parameter of copyObject or
- // moveObject can be either a file or a directory.
- // Other cases.
- if ( ( EMTPRespCodeOK == ret ) && ( aElementInfo.iElementAttr & EMTPElementAttrFile) )
- {
- if ( entry.IsDir() )
- {
+ if ( ( EMTPRespCodeOK == ret ) && ( aElementInfo.iElementAttr & EMTPElementAttrFile ) && entry.IsDir() )
ret = EMTPRespCodeInvalidObjectHandle;
- }
- }
- if ( ( EMTPRespCodeOK == ret ) && ( aElementInfo.iElementAttr & EMTPElementAttrDir ) )
- {
- if (!entry.IsDir())
- {
+ if ( ( EMTPRespCodeOK == ret ) && ( aElementInfo.iElementAttr & EMTPElementAttrDir ) && !entry.IsDir() )
ret = EMTPRespCodeInvalidParentObject;
- }
}
}
else
- {
- PRINT( _L( "MM MTP <> CRequestChecker::VerifyObjectHandleL, Object does not exist." ) );
ret = EMTPRespCodeInvalidObjectHandle;
- }
+
PRINT1( _L( "MM MTP <= CRequestChecker::VerifyObjectHandleL ret = 0x%x" ), ret );
-
+
return ret;
}
@@ -316,7 +291,7 @@
// -----------------------------------------------------------------------------
//
TMTPResponseCode CRequestChecker::VerifyStorageIdL( TUint32 aStorageId,
- const TMTPRequestElementInfo& aElementInfo ) const
+ const TMTPRequestElementInfo& aElementInfo ) const
{
MMTPStorageMgr& mgr( iFramework.StorageMgr() );
TMTPResponseCode ret( EMTPRespCodeOK );
@@ -357,7 +332,7 @@
}
}
}
-
+
return ret;
}
@@ -367,7 +342,7 @@
// -----------------------------------------------------------------------------
//
TMTPResponseCode CRequestChecker::VerifyFormatCode( TUint32 aFormatCode,
- const TMTPRequestElementInfo& aElementInfo ) const
+ const TMTPRequestElementInfo& aElementInfo ) const
{
PRINT1( _L( "MM MTP => CRequestChecker::VerifyFormatCode aFormatCode = 0x%x" ), aFormatCode );
TMTPResponseCode ret = EMTPRespCodeInvalidObjectFormatCode;
@@ -395,7 +370,7 @@
}
PRINT1( _L( "MM MTP => CRequestChecker::VerifyFormatCode ret = 0x%x" ), ret );
-
+
return ret;
}
@@ -405,7 +380,7 @@
// -----------------------------------------------------------------------------
//
TBool CRequestChecker::IsSpecialValue( TUint32 aParameter,
- const TMTPRequestElementInfo& aElementInfo ) const
+ const TMTPRequestElementInfo& aElementInfo ) const
{
TBool result = EFalse;
switch ( aElementInfo.iCount )
@@ -413,16 +388,16 @@
case 1:
result = ( aParameter == aElementInfo.iValue1 );
break;
-
+
case 2:
result = ( aParameter == aElementInfo.iValue1
|| aParameter == aElementInfo.iValue2 );
break;
-
+
default:
break;
}
-
+
return result;
}
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestprocessor.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestprocessor.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -18,15 +18,13 @@
#include <mtp/mtpprotocolconstants.h>
#include <mtp/tmtptyperequest.h>
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/tmtptypeevent.h>
#include <mtp/mmtpconnection.h>
#include <mtp/mmtpobjectmgr.h>
-#include <e32property.h>
-#include <MtpPrivatePSKeys.h>
#include "crequestprocessor.h"
#include "crequestchecker.h"
+#include "mmmtpdputility.h"
#include "mmmtpdplogger.h"
static const TInt KNullBufferSize = 4096;
@@ -39,13 +37,15 @@
EXPORT_C CRequestProcessor::CRequestProcessor( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
TInt aElementCount,
- const TMTPRequestElementInfo* aElements ):
- CActive( EPriorityStandard ),
- iFramework( aFramework ),
- iConnection( aConnection ),
- iElementCount( aElementCount ),
- iElements( aElements )
+ const TMTPRequestElementInfo* aElements ) :
+ CActive( EPriorityStandard ),
+ iFramework( aFramework ),
+ iConnection( aConnection ),
+ iElementCount( aElementCount ),
+ iElements( aElements )
{
+ // Note: It has been moved to specific operation handler
+ // Some operations don't need add into active scheduler
// CActiveScheduler::Add( this );
}
@@ -56,7 +56,9 @@
//
EXPORT_C CRequestProcessor::~CRequestProcessor()
{
-// Cancel();
+ // Note: It has been moved to specific operation handler
+ // Some operations don't need add into active scheduler
+ // Cancel();
iNullBuffer.Close();
delete iRequestChecker;
}
@@ -135,7 +137,6 @@
//
EXPORT_C void CRequestProcessor::UsbDisconnect()
{
- // TODO: reset the CenRep value
}
// -----------------------------------------------------------------------------
@@ -211,6 +212,7 @@
break;
case ECompletingPhase:
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusReadyToSync);
result = DoHandleCompletingPhaseL();
break;
@@ -390,7 +392,7 @@
//
EXPORT_C void CRequestProcessor::RunL()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -400,7 +402,7 @@
//
EXPORT_C void CRequestProcessor::DoCancel()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -410,8 +412,11 @@
//
EXPORT_C TInt CRequestProcessor::RunError( TInt aError )
{
- PRINT1( _L( "MM MTP <> CRequestProcessor RunError = %d" ), aError );
+ if ( aError != KErrNone )
+ PRINT1( _L( "MM MTP <> CRequestProcessor RunError = %d" ), aError );
+
TRAP_IGNORE( SendResponseL( EMTPRespCodeGeneralError ) );
+
return KErrNone;
}
@@ -421,23 +426,6 @@
}
// -----------------------------------------------------------------------------
-// CRequestProcessor::SetPSStatus
-// Set P&S Status to avoid MPX access conflict
-// -----------------------------------------------------------------------------
-//
-void CRequestProcessor::SetPSStatus()
- {
- TInt mtpStatus;
- RProperty::Get( KMtpPSUid, KMtpPSStatus, mtpStatus);
-
- if ( mtpStatus != EMtpPSStatusActive )
- {
- TInt err = RProperty::Set( KMtpPSUid, KMtpPSStatus, EMtpPSStatusActive );
- PRINT1( _L("MM MTP <> CRequestProcessor::SetPSStatus err = %d" ), err );
- }
- }
-
-// -----------------------------------------------------------------------------
// CRequestProcessor::ExtractSessionTransactionId
// retrieve the session id and transaction code from the current request
// -----------------------------------------------------------------------------
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestunknown.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestunknown.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -42,7 +42,7 @@
//
void CRequestUnknown::ConstructL()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -52,7 +52,7 @@
//
EXPORT_C CRequestUnknown::~CRequestUnknown()
{
-
+ // Do nothing
}
// -----------------------------------------------------------------------------
@@ -60,9 +60,9 @@
// Standard c++ constructor
// -----------------------------------------------------------------------------
//
-EXPORT_C CRequestUnknown::CRequestUnknown( MMTPDataProviderFramework& aFramework,
+CRequestUnknown::CRequestUnknown( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection ) :
- CRequestProcessor( aFramework, aConnection, 0, NULL )
+ CRequestProcessor( aFramework, aConnection, 0, NULL )
{
PRINT( _L( "Operation: Unknown" ) );
}
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,14 +16,11 @@
*/
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/mmtpobjectmgr.h>
#include <mtp/cmtptypestring.h>
-#include <mtp/cmtptypearray.h>
#include <mtp/cmtptypeobjectinfo.h>
#include <mtp/cmtptypefile.h>
#include <mtp/mmtpstoragemgr.h>
-#include <mtp/cmtpobjectmetadata.h>
#include <bautils.h>
#include <mtp/cmtptypeobjectproplist.h>
@@ -32,8 +29,11 @@
#include "mmmtpdputility.h"
#include "tmmmtpdppanic.h"
#include "mmmtpdplogger.h"
+#include "cpropertysettingutility.h"
#include "cmmmtpdpmetadataaccesswrapper.h"
+const TInt KMtpRollbackFuncCnt = 3;
+
// Verification data for the SendObjectInfo request
const TMTPRequestElementInfo KMTPSendObjectInfoPolicy[] =
{
@@ -57,21 +57,32 @@
};
// -----------------------------------------------------------------------------
+// CSendObject::NewL
+// Two-phase construction method
+// -----------------------------------------------------------------------------
+//
+EXPORT_C MMmRequestProcessor* CSendObject::NewL( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig )
+ {
+ CSendObject* self = new ( ELeave ) CSendObject( aFramework, aConnection, aDpConfig );
+
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
// CSendObject::~CSendObject
// Destructor
// -----------------------------------------------------------------------------
//
EXPORT_C CSendObject::~CSendObject()
{
- if ( ( iProgress == EObjectInfoSucceed
- || iProgress == EObjectInfoFail
- || iProgress == EObjectInfoInProgress )
- && !iNoRollback )
- {
- // Not finished SendObjectInfo \ SendObject pair detected.
- Rollback();
- PRINT( _L( "MM MTP <> CSendObject::~CSendObject, Rollback" ) );
- }
+ Rollback();
+ iRollbackList.Close();
delete iFileReceived;
delete iParentSuid;
@@ -88,13 +99,14 @@
// Standard C++ Constructor
// -----------------------------------------------------------------------------
//
-EXPORT_C CSendObject::CSendObject( MMTPDataProviderFramework& aFramework,
+CSendObject::CSendObject( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig ) :
- CRequestProcessor( aFramework, aConnection, 0, NULL),
+ CRequestProcessor( aFramework, aConnection, 0, NULL ),
iFs( iFramework.Fs() ),
iObjectMgr( iFramework.ObjectMgr() ),
- iDpConfig( aDpConfig )
+ iDpConfig( aDpConfig ),
+ iRollbackList( KMtpRollbackFuncCnt )
{
PRINT( _L( "Operation: SendObjectInfo/SendObject/SendObjectPropList(0x100C/0x100D/0x9808)" ) );
}
@@ -104,7 +116,7 @@
// 2nd Phase Constructor
// -----------------------------------------------------------------------------
//
-EXPORT_C void CSendObject::ConstructL()
+void CSendObject::ConstructL()
{
PRINT( _L( "MM MTP => CSendObject::ConstructL" ) );
@@ -117,9 +129,6 @@
PRINT1( _L( "MM MTP <> CSendObject::ConstructL DataProviderId = 0x%x" ), iFramework.DataProviderId());
- iNoRollback = EFalse;
-
- SetPSStatus();
PRINT( _L( "MM MTP <= CSendObject::ConstructL" ) );
}
@@ -287,11 +296,6 @@
{
responseCode = EMTPRespCodeObjectTooLarge;
}
-
- if ( ( responseCode != EMTPRespCodeOK ) && !CanStoreFileL( iStorageId, iObjectSize ) )
- {
- responseCode = EMTPRespCodeStoreFull;
- }
}
}
@@ -319,6 +323,8 @@
EXPORT_C void CSendObject::ServiceL()
{
PRINT( _L( "MM MTP => CSendObject::ServiceL" ) );
+
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
if ( iProgress == EObjectNone )
{
@@ -379,22 +385,7 @@
void CSendObject::ServiceObjectL()
{
PRINT( _L( "MM MTP => CSendObject::ServiceObjectL" ) );
-
- delete iFileReceived;
- iFileReceived = NULL;
-
- PRINT2( _L( "MM MTP <> CSendObject::ServiceObjectL, iFullPath is %S, iObjectSize: %Lu" ), &iFullPath, iObjectSize );
- TRAPD( err, iFileReceived = CMTPTypeFile::NewL( iFs,
- iFullPath,
- EFileWrite ) );
-
- PRINT1( _L("MM MTP <> CSendObject::ServiceObjectL, Leave Code is: %d"), err );
- User::LeaveIfError( err );
-
- iFileReceived->SetSizeL( iObjectSize );
-
ReceiveDataL( *iFileReceived );
-
iProgress = ESendObjectInProgress;
PRINT( _L( "MM MTP <= CSendObject::ServiceObjectL" ) );
@@ -466,12 +457,7 @@
if ( IsTooLarge( iObjectSize ) )
{
SendResponseL( EMTPRespCodeObjectTooLarge );
- result = EFalse;
- }
-
- if ( result && !CanStoreFileL( iStorageId, iObjectSize ) )
- {
- SendResponseL( EMTPRespCodeStoreFull );
+ Rollback();
result = EFalse;
}
@@ -483,6 +469,7 @@
&& iProtectionStatus != EMTPProtectionReadOnly )
{
SendResponseL( EMTPRespCodeParameterNotSupported );
+ Rollback();
result = EFalse;
}
}
@@ -494,6 +481,7 @@
{
// File and/or parent pathname invalid.
SendResponseL( EMTPRespCodeInvalidDataset );
+ Rollback();
}
}
@@ -501,16 +489,19 @@
{
if ( ExistsL( iFullPath ) )
{
- // Object with the same name already exists.
- iNoRollback = ETrue;
SendResponseL( EMTPRespCodeAccessDenied );
+ Rollback();
result = EFalse;
}
}
if ( result )
- ReserveObjectL();
-
+ {
+ if ( KErrNone != ReserveObjectL() )
+ {
+ result = EFalse;
+ }
+ }
PRINT1( _L( "MM MTP <= CSendObject::DoHandleResponsePhaseInfoL result = %d" ), result );
return result;
@@ -529,6 +520,7 @@
TInt invalidParameterIndex = KErrNotFound;
responseCode = VerifyObjectPropListL( invalidParameterIndex );
+ TInt err = KErrNone;
if ( responseCode != EMTPRespCodeOK )
{
@@ -538,18 +530,18 @@
parameters[2] = 0;
parameters[3] = invalidParameterIndex;
SendResponseL( responseCode, 4, parameters );
+ Rollback();
}
else if ( ExistsL( iFullPath ) )
{
- // Object with the same name already exists.
- iNoRollback = ETrue;
SendResponseL( EMTPRespCodeAccessDenied );
+ Rollback();
}
else
- ReserveObjectL();
+ err = ReserveObjectL();
PRINT( _L( "MM MTP <= CSendObject::DoHandleResponsePhasePropListL" ) );
- return ( responseCode == EMTPRespCodeOK );
+ return ( responseCode == EMTPRespCodeOK && err == KErrNone);
}
// -----------------------------------------------------------------------------
@@ -563,21 +555,19 @@
TBool result = ETrue;
- delete iFileReceived;
- iFileReceived = NULL;
-
TEntry fileEntry;
User::LeaveIfError( iFs.Entry( iFullPath, fileEntry ) );
- if ( fileEntry.iSize != iObjectSize )
+ if ( fileEntry.FileSize() != iObjectSize )
{
iFs.Delete( iFullPath );
iObjectMgr.UnreserveObjectHandleL( *iReceivedObjectInfo );
TMTPResponseCode responseCode = EMTPRespCodeObjectTooLarge;
- if ( fileEntry.iSize < iObjectSize )
+ if ( fileEntry.FileSize() < iObjectSize )
{
responseCode = EMTPRespCodeIncompleteTransfer;
}
SendResponseL( responseCode );
+ Rollback();
result = EFalse;
}
@@ -586,23 +576,28 @@
{
iFramework.RouteRequestUnregisterL( iExpectedSendObjectRequest,
iConnection );
+ SendResponseL( EMTPRespCodeTransactionCancelled );
Rollback();
- SendResponseL( EMTPRespCodeTransactionCancelled );
}
else if ( result && !iCancelled )
{
if ( iObjectSize > 0 ) // media file
{
- AddMediaToStoreL();
+ TRAPD( err, AddMediaToStoreL() );
+ PRINT1( _L( "MM MTP <= CSendObject::DoHandleResponsePhaseObjectL err = %d" ), err );
- if( iPreviousOperation == EMTPOpCodeSendObjectPropList )
+ if ( ( iPreviousOperation == EMTPOpCodeSendObjectPropList )
+ && ( err == KErrNone ) )
{
- SetObjectPropListL( *iObjectPropList );
+ // Only leave when getting proplist element from data received by fw.
+ // It should not happen after ReceiveDataL in which construction of proplist already succeed.
+ SetObjectPropListL();
}
// Commits into MTP data object enumeration store the object handle and
// storage space previously reserved for the specified object.
iFramework.ObjectMgr().CommitReservedObjectHandleL( *iReceivedObjectInfo );
+ iRollbackList.Append( &CSendObject::RemoveObjectFromDbL );
}
// Commit object to MTP data store
@@ -641,6 +636,9 @@
result = EFalse;
}
+ if ( result )
+ iRollbackList.Reset();
+
PRINT2( _L( "MM MTP <= CSendObject::DoHandleCompletingPhaseL iProgress= %d, result = %d" ),
iProgress,
result );
@@ -684,7 +682,7 @@
}
}
- PRINT1( _L( "MM MTP <= CSendObject::VerifyObjectPropListL, responseCode = 0x%X" ), responseCode );
+ PRINT1( _L( "MM MTP <= CSendObject::VerifyObjectPropListL, responseCode = 0x%x" ), responseCode );
return responseCode;
}
@@ -703,7 +701,7 @@
const RArray<TUint>* properties = iDpConfig.GetSupportedPropertiesL( iObjectFormat );
TUint16 propCode = aElement.Uint16L( CMTPTypeObjectPropListElement::EPropertyCode );
TUint16 dataType = aElement.Uint16L( CMTPTypeObjectPropListElement::EDatatype );
- PRINT2( _L( "MM MTP => CSendObject::CheckPropCodeL propCode = 0x%X, dataType = 0x%X" ), propCode, dataType );
+ PRINT2( _L( "MM MTP => CSendObject::CheckPropCodeL propCode = 0x%x, dataType = 0x%x" ), propCode, dataType );
responseCode = EMTPRespCodeInvalidObjectPropCode;
const TInt count = properties->Count();
@@ -785,7 +783,6 @@
break;
case EMTPObjectPropCodeDateCreated:
- // TODO: this property is read-only, should response EMTPRespCodeAccessDenied or set nothing?
case EMTPObjectPropCodeDateModified:
case EMTPObjectPropCodeObjectFileName:
case EMTPObjectPropCodeName:
@@ -805,11 +802,15 @@
default:
// check types of DP specific properties
// TODO: Is there anything except datatype need to be checked?
- responseCode = CheckSepecificPropType( propCode, dataType );
+ responseCode = MmMtpDpUtility::CheckPropType( propCode, dataType );
+ if ( responseCode == EMTPRespCodeAccessDenied )
+ {
+ responseCode = EMTPRespCodeOK;
+ }
break;
}
- PRINT1( _L( "MM MTP <= CSendObject::CheckPropCode, responseCode = 0x%X" ), responseCode );
+ PRINT1( _L( "MM MTP <= CSendObject::CheckPropCode, responseCode = 0x%x" ), responseCode );
return responseCode;
}
@@ -858,7 +859,7 @@
break;
}
- PRINT1( _L( "MM MTP <= CSendObject::ExtractPropertyL, responseCode = 0x%X" ), responseCode );
+ PRINT1( _L( "MM MTP <= CSendObject::ExtractPropertyL, responseCode = 0x%x" ), responseCode );
return responseCode;
}
@@ -867,7 +868,7 @@
// Reserve object proplist into database
// -----------------------------------------------------------------------------
//
-TMTPResponseCode CSendObject::SetObjectPropListL( const CMTPTypeObjectPropList& aPropList )
+TMTPResponseCode CSendObject::SetObjectPropListL()
{
PRINT( _L( "MM MTP => CSendObject::SetObjectPropListL" ) );
@@ -882,13 +883,13 @@
TUint16 propertyCode = element.Uint16L( CMTPTypeObjectPropListElement::EPropertyCode );
TUint16 dataType = element.Uint16L( CMTPTypeObjectPropListElement::EDatatype );
PRINT2( _L( "MM MTP <> SetObjectPropListL propertyCode = 0x%x, dataType = 0x%x" ),
- propertyCode, dataType );
+ propertyCode,
+ dataType );
switch ( propertyCode )
{
case EMTPObjectPropCodeStorageID:
case EMTPObjectPropCodeObjectFormat:
- case EMTPObjectPropCodeProtectionStatus:
case EMTPObjectPropCodeObjectSize:
case EMTPObjectPropCodeParentObject:
case EMTPObjectPropCodePersistentUniqueObjectIdentifier:
@@ -896,11 +897,15 @@
break;
case EMTPObjectPropCodeNonConsumable:
+ iReceivedObjectInfo->SetUint( CMTPObjectMetaData::ENonConsumable,
+ element.Uint8L( CMTPTypeObjectPropListElement::EValue ) );
+ break;
+
case EMTPObjectPropCodeDateAdded:
case EMTPObjectPropCodeDateCreated:
case EMTPObjectPropCodeDateModified:
case EMTPObjectPropCodeObjectFileName:
- // TODO: Does anything need to be done on these read-only properties?
+ // Do nothing for read-only properties
/* spec:
* Object properties that are get-only (0x00 GET)
* should accept values during object creation by
@@ -908,11 +913,18 @@
*/
break;
+ case EMTPObjectPropCodeProtectionStatus:
+ // Already done in AddMediaToStore, it's not necessary to set it again.
+ // SetProtectionStatus();
+ break;
+
case EMTPObjectPropCodeName:
+ case EMTPObjectPropCodeAlbumArtist:
{
CMTPTypeString* stringData = CMTPTypeString::NewLC( element.StringL( CMTPTypeObjectPropListElement::EValue ) );// + stringData
- responseCode = SetMetaDataToWrapperL( propertyCode,
+ responseCode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig,
+ propertyCode,
*stringData,
*iReceivedObjectInfo );
@@ -922,7 +934,8 @@
default:
{
- responseCode = SetSpecificObjectPropertyL( propertyCode,
+ responseCode = iDpConfig.PropSettingUtility()->SetSpecificObjectPropertyL( iDpConfig,
+ propertyCode,
*iReceivedObjectInfo,
element );
}
@@ -935,53 +948,6 @@
}
// -----------------------------------------------------------------------------
-// CSendObject::SetMetaDataToWrapperL
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TMTPResponseCode CSendObject::SetMetaDataToWrapperL( const TUint16 aPropCode,
- MMTPType& aNewData,
- const CMTPObjectMetaData& aObjectMetaData )
- {
- TMTPResponseCode resCode = EMTPRespCodeOK;
- TRAPD( err, iDpConfig.GetWrapperL().SetObjectMetadataValueL( aPropCode,
- aNewData,
- aObjectMetaData ) );
-
- PRINT1( _L("MM MTP <> CSendObject::SetMetaDataToWrapperL err = %d"), err);
-
- if ( err == KErrNone )
- {
- resCode = EMTPRespCodeOK;
- }
- else if ( err == KErrTooBig )
- // according to the codes of S60
- {
- resCode = EMTPRespCodeInvalidDataset;
- }
- else if ( err == KErrPermissionDenied )
- {
- resCode = EMTPRespCodeAccessDenied;
- }
- else if ( err == KErrNotFound )
- {
- if ( MmMtpDpUtility::HasMetadata( aObjectMetaData.Uint( CMTPObjectMetaData::EFormatCode ) ) )
- SendResponseL( EMTPRespCodeAccessDenied );
- }
- else
- {
- err = HandleSpecificWrapperError( err, aObjectMetaData );
-
- if ( err != KErrNone )
- resCode = EMTPRespCodeGeneralError;
- }
-
- PRINT1( _L( "MM MTP <= CSendObject::SetMetaDataToWrapperL resCode = 0x%x" ), resCode );
-
- return resCode;
- }
-
-// -----------------------------------------------------------------------------
// CSendObject::MatchStoreAndParentL
// -----------------------------------------------------------------------------
//
@@ -991,14 +957,14 @@
iStorageId = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
iParentHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter2 );
- PRINT2( _L( "MM MTP <> CSendObject::MatchStoreAndParentL, iStorageId = 0x%X, iParentHandle = 0x%X" ),
+ PRINT2( _L( "MM MTP <> CSendObject::MatchStoreAndParentL, iStorageId = 0x%x, iParentHandle = 0x%x" ),
iStorageId,
iParentHandle );
if ( iStorageId == KMTPStorageDefault )
{
iStorageId = iDpConfig.GetDefaultStorageIdL();
- PRINT1( _L( "MM MTP <> CSendObject::GetDefaultStorageIdL, iStorageId = 0x%X" ), iStorageId );
+ PRINT1( _L( "MM MTP <> CSendObject::GetDefaultStorageIdL, iStorageId = 0x%x" ), iStorageId );
}
delete iParentSuid;
@@ -1046,38 +1012,14 @@
// @return ETrue if yes, otherwise EFalse
// -----------------------------------------------------------------------------
//
-TBool CSendObject::IsTooLarge( TUint32 aObjectSize ) const
+TBool CSendObject::IsTooLarge( TUint64 aObjectSize ) const
{
- TBool ret = ( aObjectSize > KMaxTInt );
- PRINT2( _L( "MM MTP <> CSendObject::IsTooLarge aObjectSize = %d, ret = %d" ), aObjectSize, ret );
+ const TUint64 KMaxSupportedFileSize = 0xFFFFFFFF; //Maximal file size supported (4GB-1)
+ TBool ret = ( aObjectSize > KMaxSupportedFileSize );
+ PRINT2( _L( "MM MTP <> CSendObject::IsTooLarge aObjectSize = 0x%Lx, ret = %d" ), aObjectSize, ret );
return ret;
}
-// -----------------------------------------------------------------------------
-// CSendObject::CanStoreFileL
-// Check if we can store the file on the storage
-// @return ETrue if yes, otherwise EFalse
-// -----------------------------------------------------------------------------
-//
-TBool CSendObject::CanStoreFileL( TUint32 aStorageId,
- TInt64 aObjectSize ) const
- {
- PRINT( _L( "MM MTP => CSendObject::CanStoreFileL" ) );
-
- TBool result = ETrue;
- TVolumeInfo volumeInfo;
- TInt driveNo = iFramework.StorageMgr().DriveNumber( aStorageId );
- User::LeaveIfError( iFs.Volume( volumeInfo, driveNo ) );
-
- if ( volumeInfo.iFree < aObjectSize )
- {
- result = EFalse;
- }
-
- PRINT1( _L( "MM MTP <= CSendObject::CanStoreFileL , result = %d" ), result );
-
- return result;
- }
// -----------------------------------------------------------------------------
// CSendObject::GetFullPathNameL
@@ -1091,21 +1033,45 @@
PRINT1( _L("MM MTP => CSendObject::GetFullPathNameL aFileName = %S"), &aFileName );
TBool result( EFalse );
+
+ TParsePtrC parser( aFileName );
if ( aFileName.Length() > 0 )
{
iFullPath.Zero();
iFullPath.Append( *iParentSuid );
- if ( ( iFullPath.Length() + aFileName.Length() ) < KMaxFileName )
+
+ // TODO: need to be done in derived class
+ // Only add extension for alb to pass winlogo test cases
+ TInt length = iFullPath.Length() + aFileName.Length();
+
+ TBool isAlbWithoutExt =
+ ( ( iObjectFormat == EMTPFormatCodeAbstractAudioAlbum ) && ( !parser.ExtPresent() ) );
+ if ( isAlbWithoutExt )
+ length += KTxtExtensionALB().Length();
+
+ if ( length < KMaxFileName )
{
iFullPath.Append( aFileName );
+ if ( isAlbWithoutExt )
+ iFullPath.Append( KTxtExtensionALB );
PRINT1( _L( "MM MTP <> CSendObject::GetFullPathNameL iFullPath = %S" ), &iFullPath );
result = iFramework.Fs().IsValidName( iFullPath );
}
}
+
if ( result && ( iObjectFormat != MmMtpDpUtility::FormatFromFilename( iFullPath ) ) )
{
- PRINT2( _L( "MM MTP <> %S does not match 0x%x" ), &iFullPath, iObjectFormat );
- result = EFalse;
+ if ( ( iObjectFormat == EMTPFormatCode3GPContainer ) && ( parser.Ext().CompareF( KTxtExtensionODF ) == 0))
+ {
+ PRINT( _L( "MM MTP <> might happen if function is called before physical file arrives" ) );
+ // might happen if function is called before physical file arrives
+ // do nothing
+ }
+ else
+ {
+ PRINT2( _L( "MM MTP <> %S does not match 0x%x" ), &iFullPath, iObjectFormat );
+ result = EFalse;
+ }
}
PRINT1( _L( "MM MTP <= CSendObject::GetFullPathNameL result = %d" ), result );
@@ -1157,7 +1123,7 @@
// CSendObject::ReserveObjectL
// -----------------------------------------------------------------------------
//
-void CSendObject::ReserveObjectL()
+TInt CSendObject::ReserveObjectL()
{
PRINT( _L( "MM MTP => CSendObject::ReserveObjectL" ) );
TInt err = KErrNone;
@@ -1172,54 +1138,114 @@
// Reserves space for and assigns an object handle to the object described
// by the specified object information record.
TRAP( err, iObjectMgr.ReserveObjectHandleL( *iReceivedObjectInfo,
- iObjectSize ) );
+ iObjectSize ) );
+ iRollbackList.Append( &CSendObject::UnreserveObjectL );
PRINT2( _L( "MM MTP => CSendObject::ReserveObjectL iObjectsize = %Lu, Operation: 0x%x" ), iObjectSize, iOperationCode );
if ( err != KErrNone )
- PRINT1( _L( "MM MTP <> CSendObject::ReserveObjectL err = %d" ), err );
- if ( iObjectSize == 0 )
+ {
+ PRINT1( _L( "MM MTP <> ReserveObjectHandleL err = %d" ), err );
+ }
+
+ if ( err == KErrNone )
{
- SaveEmptyFileL();
- iObjectMgr.CommitReservedObjectHandleL( *iReceivedObjectInfo );
+ delete iFileReceived;
+ iFileReceived = NULL;
+ PRINT2( _L( "MM MTP <> CSendObject::ServiceObjectL, iFullPath is %S, iObjectSize: %Lu" ), &iFullPath, iObjectSize );
+ iRollbackList.Append( &CSendObject::RemoveObjectFromFs );
+ TRAP( err, iFileReceived = CMTPTypeFile::NewL( iFs, iFullPath, EFileWrite ) );
+
+ PRINT1( _L("MM MTP <> CMTPTypeFile::NewL Leave Code is: %d"), err );
+ }
+
+ if ( err == KErrNone )
+ {
+ TRAP( err, iFileReceived->SetSizeL( iObjectSize ) );
+ PRINT1( _L( "MM MTP <> SetSizeL leave code:%d" ), err );
+ if ( err == KErrDiskFull )
+ {
+ SendResponseL( EMTPRespCodeStoreFull );
+ Rollback();
+ return err;
+ }
}
- iExpectedSendObjectRequest.SetUint32( TMTPTypeRequest::ERequestSessionID,
- iSessionId );
- iFramework.RouteRequestRegisterL( iExpectedSendObjectRequest, iConnection );
+ if ( err == KErrNone && iObjectSize == 0 )
+ {
+ // Already trapped inside SaveEmptyFileL.
+ SaveEmptyFileL();
+ if ( iOperationCode == EMTPOpCodeSendObjectPropList )
+ {
+ // Only leave when getting proplist element from data received by fw.
+ // It should not happen after ReceiveDataL in which construction of proplist already succeed.
+ SetObjectPropListL();
+ }
+
+ iObjectMgr.CommitReservedObjectHandleL( *iReceivedObjectInfo );
+ iRollbackList.Reset();
+ }
- TUint32 parameters[3];
- parameters[0] = iStorageId;
- parameters[1] = iParentHandle;
- parameters[2] = iReceivedObjectInfo->Uint( CMTPObjectMetaData::EHandle );
- SendResponseL( EMTPRespCodeOK, 3, parameters );
+ if ( err == KErrNone )
+ {
+ iExpectedSendObjectRequest.SetUint32( TMTPTypeRequest::ERequestSessionID, iSessionId );
+ iFramework.RouteRequestRegisterL( iExpectedSendObjectRequest, iConnection );
+
+ TUint32 parameters[3];
+ parameters[0] = iStorageId;
+ parameters[1] = iParentHandle;
+ parameters[2] = iReceivedObjectInfo->Uint( CMTPObjectMetaData::EHandle );
+ SendResponseL( EMTPRespCodeOK, 3, parameters );
+ }
+ else
+ {
+ SendResponseL( EMTPRespCodeGeneralError );
+ Rollback();
+ }
PRINT( _L( "MM MTP <= CSendObject::ReserveObjectL" ) );
+ return err;
}
// -----------------------------------------------------------------------------
-// CSendObject::SetProtectionStatusL
+// CSendObject::SetProtectionStatus
// -----------------------------------------------------------------------------
//
-void CSendObject::SetProtectionStatusL()
+void CSendObject::SetProtectionStatus()
{
- PRINT1( _L( "MM MTP => CSendObject::SetProtectionStatusL iProtectionStatus = %d" ), iProtectionStatus );
+ PRINT1( _L( "MM MTP => CSendObject::SetProtectionStatus iProtectionStatus = %d" ), iProtectionStatus );
- if ( iProtectionStatus == EMTPProtectionNoProtection
- || iProtectionStatus == EMTPProtectionReadOnly )
+ if ( iFileReceived != NULL )
{
- // TODO: wait for review
- TInt err = KErrNone;
- if ( iProtectionStatus == EMTPProtectionNoProtection )
+ if ( iProtectionStatus == EMTPProtectionNoProtection
+ || iProtectionStatus == EMTPProtectionReadOnly )
{
- iFs.SetAtt( iFullPath, KEntryAttNormal, KEntryAttReadOnly );
+ TInt err = KErrNone;
+ if ( iProtectionStatus == EMTPProtectionNoProtection )
+ {
+ err = iFileReceived->File().SetAtt( KEntryAttNormal, KEntryAttReadOnly );
+ }
+ else
+ {
+ err = iFileReceived->File().SetAtt( KEntryAttReadOnly, KEntryAttNormal );
+ }
+
+ if ( err != KErrNone )
+ {
+ PRINT1( _L("MM MTP <> CSendObject::SetProtectionStatus err = %d" ), err );
+ }
+ }
+ // Close the file after SetProtectionStatus to make sure other process won't open
+ // the file successfully right at the time calling RFile::SetAtt.
+ if ( iObjectSize > 0 )
+ {
+ delete iFileReceived;
+ iFileReceived = NULL;
}
else
- {
- iFs.SetAtt( iFullPath, KEntryAttReadOnly, KEntryAttNormal );
- }
- User::LeaveIfError( err );
+ iFileReceived->File().Close();
}
- PRINT( _L( "MM MTP <= CSendObject::SetProtectionStatusL" ) );
+
+ PRINT( _L( "MM MTP <= CSendObject::SetProtectionStatus" ) );
}
// -----------------------------------------------------------------------------
@@ -1230,30 +1256,29 @@
{
PRINT( _L( "MM MTP => CSendObject::SaveEmptyFileL" ) );
- RFile file;
- User::LeaveIfError( file.Create( iFs, iFullPath, EFileWrite ) );
- file.Close();
-
- // set entry protection status and modified date
- SetProtectionStatusL();
-
- // add playlist to MPX DB
- TParsePtrC parse( iFullPath );
- iDpConfig.GetWrapperL().SetStorageRootL( parse.Drive() );
- iDpConfig.GetWrapperL().AddObjectL( iFullPath );
-
if ( EMTPFormatCodeAbstractAudioVideoPlaylist == iObjectFormat )
{
- TInt err = KErrNone;
- err = iFs.SetAtt( iFullPath,
- KEntryAttSystem | KEntryAttHidden,
+ TInt err = iFileReceived->File().SetAtt( KEntryAttSystem | KEntryAttHidden,
KEntryAttReadOnly | KEntryAttNormal );
if ( err != KErrNone )
PRINT1( _L( "MM MTP <> CSendObject::SaveEmptyFileL err = %d" ), err );
iDpConfig.GetWrapperL().AddDummyFileL( iFullPath );
}
- PRINT( _L( "MM MTP <= CSendObject::SaveEmptyFileL" ) );
+ // Set subformat code to avoid MPX query for the first time to GetObjectReference,
+ // in which case references has been kept in fw.
+ if ( MmMtpDpUtility::HasReference( iObjectFormat ) )
+ iReceivedObjectInfo->SetUint( CMTPObjectMetaData::EFormatSubCode, EMTPSubFormatCodeUndefined );
+
+ // add playlist to MPX DB
+ TRAPD( err, AddMediaToStoreL() );
+
+ if ( err != KErrNone )
+ iRollbackList.Append( &CSendObject::RemoveObjectFromDbL );
+ else
+ iRollbackList.Reset();
+
+ PRINT1( _L( "MM MTP <= CSendObject::SaveEmptyFileL err = %d" ), err );
}
// -----------------------------------------------------------------------------
@@ -1265,56 +1290,15 @@
{
PRINT( _L( "MM MTP => CSendObject::AddMediaToStoreL" ) );
- TBool isVideo = EFalse;
- switch ( iObjectFormat )
- {
- case EMTPFormatCode3GPContainer:
- case EMTPFormatCodeMP4Container:
- case EMTPFormatCodeASF:
- {
- TMmMtpSubFormatCode subFormatCode;
-
- if ( MmMtpDpUtility::IsVideoL( iFullPath ) )
- {
- subFormatCode = EMTPSubFormatCodeVideo;
- isVideo = ETrue;
- }
- else
- {
- subFormatCode = EMTPSubFormatCodeAudio;
- isVideo = EFalse;
- }
-
- iReceivedObjectInfo->SetUint( CMTPObjectMetaData::EFormatSubCode,
- ( TUint ) subFormatCode );
- }
- break;
+ // SetProtectionStatus here make sure no matter the previous operation is SendObjectInfo
+ // or SendObjectPropList
+ // Might need to set dateadded and datemodify for further extension.
+ SetProtectionStatus();
- // put all just video format codes here
- case EMTPFormatCodeWMV:
- {
- isVideo = ETrue;
- }
- break;
-
- default:
- PRINT( _L( "MM MTP <> CSendObject::DoHandleResponsePhaseObjectL default" ) );
- break;
- }
+ PRINT1( _L( "MM MTP <> CSendObject::AddMediaToStoreL iFullPath = %S" ), &iFullPath );
+ iDpConfig.GetWrapperL().AddObjectL( *iReceivedObjectInfo );
- TPtrC suid( iReceivedObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
- PRINT1( _L( "MM MTP <> CSendObject::AddMediaToStoreL suid = %S" ), &suid );
- TParsePtrC parse( suid );
- iDpConfig.GetWrapperL().SetStorageRootL( parse.Drive() );
- iDpConfig.GetWrapperL().AddObjectL( iFullPath, isVideo );
-
- if ( isVideo )
- {
- TInt err = KErrNone;
- TRAP( err, iDpConfig.GetWrapperL().SetImageObjPropL( iFullPath, iWidth, iHeight ) );
-
- PRINT1( _L( "MM MTP <= CSendObject::AddVideoToStoreL err = %d" ), err );
- }
+ iDpConfig.GetWrapperL().SetImageObjPropL( *iReceivedObjectInfo, iWidth, iHeight );
PRINT( _L( "MM MTP <= CSendObject::AddMediaToStoreL" ) );
}
@@ -1338,14 +1322,49 @@
//
void CSendObject::Rollback()
{
- // Delete this object from file system.
- if ( iProgress == ESendObjectInProgress )
+ PRINT( _L("MM MTP => CSendObject::Rollback") );
+
+ TInt count = iRollbackList.Count();
+ PRINT1( _L("MM MTP => CSendObject::Rollback, iRollbackList.Count() = %d"), iRollbackList.Count() );
+
+ for ( TInt i = 0; i < count; i++ )
{
- PRINT1( _L( "MM MTP <> CSendObject::Rollback ROLLBACK_FILE %S" ), &iFullPath );
- iFramework.Fs().Delete( iFullPath );
- TRAP_IGNORE( iFramework.ObjectMgr().UnreserveObjectHandleL( *iReceivedObjectInfo ) );
- iProgress = EObjectNone;
+ TMmMtpRollbackAction tmp = iRollbackList[i];
+ ( this->*((TMmMtpRollbackAction)(iRollbackList[i])))();
}
+ iRollbackList.Reset();
+
+ PRINT( _L("MM MTP <= CSendObject::Rollback") );
+ }
+
+void CSendObject::UnreserveObjectL()
+ {
+ PRINT( _L("MM MTP => CSendObject::UnreserveObjectL") );
+ iFramework.ObjectMgr().UnreserveObjectHandleL( *iReceivedObjectInfo );
+ PRINT( _L("MM MTP <= CSendObject::UnreserveObjectL") );
+ }
+
+void CSendObject::RemoveObjectFromDbL()
+ {
+ PRINT( _L("MM MTP => CSendObject::RemoveObjectFromDbL") );
+ iFramework.ObjectMgr().RemoveObjectL( iReceivedObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
+ iDpConfig.GetWrapperL().DeleteObjectL( *iReceivedObjectInfo );
+ PRINT( _L("MM MTP <= CSendObject::RemoveObjectFromDbL") );
+ }
+
+void CSendObject::RemoveObjectFromFs()
+ {
+ PRINT( _L("MM MTP => CSendObject::RemoveObjectFromFs") );
+
+ delete iFileReceived;
+ iFileReceived = NULL;
+
+ TInt err = iFramework.Fs().Delete( iFullPath );
+ if ( err != KErrNone )
+ {
+ PRINT1( _L("MM MTP <> CSendObject::RemoveObjectFromFs err = %d"), err );
+ }
+ PRINT( _L("MM MTP <= CSendObject::RemoveObjectFromFs") );
}
// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectproplist.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectproplist.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,7 +16,6 @@
*/
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/cmtptypeobjectproplist.h>
#include <mtp/mmtpobjectmgr.h>
#include <mtp/cmtptypestring.h>
@@ -27,38 +26,39 @@
#include "mmmtpdputility.h"
#include "mmmtpdplogger.h"
#include "mmmtpdpconfig.h"
+#include "cpropertysettingutility.h"
// -----------------------------------------------------------------------------
-// CSetObjectPropList::NewL
+// CSendObject::NewL
// Two-phase construction method
// -----------------------------------------------------------------------------
//
-//EXPORT_C MMmRequestProcessor* CSetObjectPropList::NewL( MMTPDataProviderFramework& aFramework,
-// MMTPConnection& aConnection,
-// CMmMtpDpMetadataAccessWrapper& aWrapper )
-// {
-// CSetObjectPropList* self = new ( ELeave ) CSetObjectPropList( aFramework,
-// aConnection,
-// aWrapper );
-// CleanupStack::PushL( self );
-// self->ConstructL();
-// CleanupStack::Pop( self );
-// return self;
-// }
+EXPORT_C MMmRequestProcessor* CSetObjectPropList::NewL( MMTPDataProviderFramework& aFramework,
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig )
+ {
+ CSetObjectPropList* self = new ( ELeave ) CSetObjectPropList( aFramework, aConnection, aDpConfig );
+
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+
+ return self;
+ }
// -----------------------------------------------------------------------------
// CSetObjectPropList::CSetObjectPropList
// Standard c++ constructor
// -----------------------------------------------------------------------------
//
-EXPORT_C CSetObjectPropList::CSetObjectPropList( MMTPDataProviderFramework& aFramework,
+CSetObjectPropList::CSetObjectPropList( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig ) :
- CRequestProcessor( aFramework, aConnection, 0, NULL),
- iObjectMgr( aFramework.ObjectMgr() ),
- iFs( aFramework.Fs() ),
- iDpConfig( aDpConfig ),
- iUnprocessedIndex ( 0 )
+ CRequestProcessor( aFramework, aConnection, 0, NULL),
+ iObjectMgr( aFramework.ObjectMgr() ),
+ iFs( aFramework.Fs() ),
+ iDpConfig( aDpConfig ),
+ iUnprocessedIndex ( 0 )
{
PRINT( _L( "Operation: SetObjectPropList(0x9806)" ) );
}
@@ -68,12 +68,11 @@
// 2nd Phase Constructor
// -----------------------------------------------------------------------------
//
-EXPORT_C void CSetObjectPropList::ConstructL()
+void CSetObjectPropList::ConstructL()
{
CActiveScheduler::Add( this );
iPropertyList = CMTPTypeObjectPropList::NewL();
- SetPSStatus();
}
// -----------------------------------------------------------------------------
@@ -88,6 +87,26 @@
}
// -----------------------------------------------------------------------------
+// CSetObjectPropList::CheckRequestL
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TMTPResponseCode CSetObjectPropList::CheckRequestL()
+ {
+ PRINT( _L( "MM MTP => CSetObjectPropList::CheckRequestL" ) );
+
+ TMTPResponseCode result = CRequestProcessor::CheckRequestL();
+ if ( result == EMTPRespCodeObjectWriteProtected )
+ {
+ // Return AccessDenied for P4S pass rate, instead of EMTPRespCodeObjectWriteProtected
+ result = EMTPRespCodeAccessDenied;
+ }
+
+ PRINT( _L( "MM MTP <= CSetObjectPropList::CheckRequestL" ) );
+ return result;
+ }
+
+// -----------------------------------------------------------------------------
// CSetObjectPropList::ServiceL
// SetObjectPropList request handler
// -----------------------------------------------------------------------------
@@ -95,6 +114,9 @@
EXPORT_C void CSetObjectPropList::ServiceL()
{
PRINT( _L( "MM MTP => CSetObjectPropList::ServiceL" ) );
+
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
+
// Recieve the data from the property list
ReceiveDataL( *iPropertyList );
PRINT( _L( "MM MTP <= CSetObjectPropList::ServiceL" ) );
@@ -132,22 +154,23 @@
// Set object proplist
// -----------------------------------------------------------------------------
//
-TMTPResponseCode CSetObjectPropList::SetObjectPropListL(
- const CMTPTypeObjectPropListElement& aPropListElement )
+TMTPResponseCode CSetObjectPropList::SetObjectPropListL( const CMTPTypeObjectPropListElement& aPropListElement )
{
PRINT( _L( "MM MTP => CSetObjectPropList::SetObjectPropListL" ) );
- TMTPTypeUint16 protectionStatus( EMTPProtectionNoProtection );
TMTPResponseCode responseCode( EMTPRespCodeOK );
TUint32 handle = aPropListElement.Uint32L( CMTPTypeObjectPropListElement::EObjectHandle );
TUint16 propertyCode = aPropListElement.Uint16L( CMTPTypeObjectPropListElement::EPropertyCode );
TUint16 dataType = aPropListElement.Uint16L( CMTPTypeObjectPropListElement::EDatatype );
PRINT3( _L( "MM MTP <> handle = 0x%x, propertyCode = 0x%x, dataType = 0x%x" ),
- handle, propertyCode, dataType );
+ handle,
+ propertyCode,
+ dataType );
responseCode = MmMtpDpUtility::CheckPropType( propertyCode, dataType );
PRINT1( _L( "MM MTP <> CheckPropType response code is 0x%x" ), responseCode );
+
if( responseCode != EMTPRespCodeOK )
return responseCode;
@@ -155,12 +178,16 @@
== iFramework.DataProviderId() )
{
PRINT( _L( "MM MTP => CSetObjectPropList::SetObjectPropListL enter" ) );
+
CMTPObjectMetaData* object = CMTPObjectMetaData::NewLC(); // + object
iFramework.ObjectMgr().ObjectL( handle, *object );
- if ( protectionStatus.Value() != EMTPProtectionNoProtection )
+ // Check the file attribution first. If it is Read-Only, nothing should be set into db which is inlined with P4S cases.
+ TUint16 protectionStatus = EMTPProtectionNoProtection;
+ protectionStatus = MmMtpDpUtility::GetProtectionStatusL( iFs, object->DesC( CMTPObjectMetaData::ESuid ) );
+ if ( protectionStatus != EMTPProtectionNoProtection )
{
- //for some reason, P4S expects Access Denied response instead of write protected
+ // NOTE: P4S expects AccessDenied response instead of ObjectWriteProtected
return EMTPRespCodeAccessDenied; // EMTPRespCodeObjectWriteProtected;
}
@@ -172,7 +199,6 @@
case EMTPObjectPropCodeObjectSize:
case EMTPObjectPropCodeParentObject:
case EMTPObjectPropCodePersistentUniqueObjectIdentifier:
- case EMTPObjectPropCodeNonConsumable:
case EMTPObjectPropCodeDateAdded:
case EMTPObjectPropCodeDateCreated:
case EMTPObjectPropCodeDateModified:
@@ -181,34 +207,50 @@
}
break;
+ case EMTPObjectPropCodeNonConsumable:
+ object->SetUint( CMTPObjectMetaData::ENonConsumable,
+ aPropListElement.Uint8L( CMTPTypeObjectPropListElement::EValue ) );
+ // TODO: need to reconsider,
+ // if propList comprise both non-consumable and objectFileName,
+ // ModifyObjectL would be called twice, need to investigate if it won't affect
+ // performance
+ iFramework.ObjectMgr().ModifyObjectL( *object );
+ break;
+
case EMTPObjectPropCodeObjectFileName:
{
TPtrC suid( object->DesC( CMTPObjectMetaData::ESuid ) );
- TBuf<KMaxFileName> newSuid( aPropListElement.StringL(
- CMTPTypeObjectPropListElement::EValue ) );
- TInt err = KErrNone;
- err = MmMtpDpUtility::UpdateObjectFileName( iFramework.Fs(), suid, newSuid );
- PRINT1( _L( "MM MTP <> Update object file name err = %d" ), err );
- if ( KErrOverflow == err ) // full path name is too long
- {
+ TPtrC ptr( aPropListElement.StringL( CMTPTypeObjectPropListElement::EValue ) );
+ if ( KMaxFileName < ptr.Length() )
responseCode = EMTPRespCodeInvalidDataset;
- }
- else if ( ( KErrNone == err ) || ( KErrAlreadyExists == err ) )
+ else
{
- TRAP( err, iDpConfig.GetWrapperL().RenameObjectL( suid, newSuid ) ); //Update MPX DB
- PRINT1( _L( "MM MTP <> Rename Object err = %d" ), err );
- // it is ok if file is not found in DB, following S60 solution
- if ( KErrNotFound == err )
+ TFileName newSuid( ptr );
+ TInt err = MmMtpDpUtility::UpdateObjectFileName( iFramework.Fs(), suid, newSuid );
+ PRINT1( _L( "MM MTP <> Update object file name err = %d" ), err );
+ if ( KErrOverflow == err ) // full path name is too long
+ {
+ responseCode = EMTPRespCodeInvalidDataset;
+ }
+ else if ( KErrNone == err ) // TODO: ( KErrAlreadyExists == err )
{
- TRAP( err, iDpConfig.GetWrapperL().AddObjectL( newSuid ) );
- PRINT1( _L( "MM MTP <> Add Object err = %d" ), err );
- }
+ TRAP( err, iDpConfig.GetWrapperL().RenameObjectL( *object, newSuid ) ); //Update MPX DB
- if ( KErrNone == err )
- {
+ PRINT1( _L( "MM MTP <> Rename MPX object file name err = %d" ), err );
+ // it is ok if file is not found in DB, following S60 solution
+ if ( KErrNotFound == err )
+ {
+ TRAP( err, iDpConfig.GetWrapperL().AddObjectL( *object ) );
+ PRINT1( _L( "MM MTP <> Add MPX object file name err = %d" ), err );
+ }
+
object->SetDesCL( CMTPObjectMetaData::ESuid, newSuid );
iFramework.ObjectMgr().ModifyObjectL( *object );
}
+ else if ( KErrInUse == err ) // object file is being used by other program
+ {
+ responseCode = EMTPRespCodeDeviceBusy;
+ }
else
{
responseCode = EMTPRespCodeGeneralError;
@@ -218,13 +260,15 @@
break;
case EMTPObjectPropCodeName:
+ case EMTPObjectPropCodeAlbumArtist:
{
CMTPTypeString* stringData = CMTPTypeString::NewLC(
- aPropListElement.StringL(
- CMTPTypeObjectPropListElement::EValue ) );// + stringData
+ aPropListElement.StringL( CMTPTypeObjectPropListElement::EValue ) );// + stringData
- responseCode = ServiceMetaDataToWrapperL( propertyCode,
- *stringData, *object );
+ responseCode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig,
+ propertyCode,
+ *stringData,
+ *object );
CleanupStack::PopAndDestroy( stringData );// - stringData
}
@@ -232,15 +276,9 @@
default:
{
- /*// trap and handle with response code here, so correct fail index should report
- TRAPD( err, responseCode = ServiceSpecificObjectPropertyL( propertyCode, *object, aPropListElement ) );
- PRINT1( _L("MM MTP <> CSetObjectPropList::SetObjectPropListL, ServiceSpecificObjectPropertyL, err = %d"), err );
-
- if ( err == KErrNotSupported )
- {
- responseCode = EMTPRespCodeAccessDenied;
- }*/
- responseCode = ServiceSpecificObjectPropertyL( propertyCode, *object,
+ responseCode = iDpConfig.PropSettingUtility()->SetSpecificObjectPropertyL( iDpConfig,
+ propertyCode,
+ *object,
aPropListElement );
}
break;
@@ -264,56 +302,6 @@
}
// -----------------------------------------------------------------------------
-// CSetObjectPropList::ServiceMetaDataToWrapperL
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TMTPResponseCode CSetObjectPropList::ServiceMetaDataToWrapperL(
- const TUint16 aPropCode,
- MMTPType& aNewData,
- const CMTPObjectMetaData& aObjectMetaData )
- {
- TMTPResponseCode resCode = EMTPRespCodeOK;
-
- TRAPD( err, iDpConfig.GetWrapperL().SetObjectMetadataValueL( aPropCode,
- aNewData,
- aObjectMetaData ) );
-
- PRINT1( _L("MM MTP <> CSetObjectPropList::ServiceMetaDataToWrapperL err = %d"), err);
-
- if ( err == KErrNone )
- {
- resCode = EMTPRespCodeOK;
- }
- else if ( err == KErrTooBig )
- // according to the codes of S60
- {
- resCode = EMTPRespCodeInvalidDataset;
- }
- else if ( err == KErrPermissionDenied )
- {
- resCode = EMTPRespCodeAccessDenied;
- }
- else if ( err == KErrNotFound )
- {
- if( MmMtpDpUtility::HasMetadata( aObjectMetaData.Uint( CMTPObjectMetaData::EFormatCode ) ) )
- SendResponseL( EMTPRespCodeAccessDenied );
- }
- else
- {
- // add new virtual call to see if the above condition can be handle probably
- err = HandleSpecificWrapperError( err, aObjectMetaData );
-
- if ( err != KErrNone )
- resCode = EMTPRespCodeGeneralError;
- }
-
- PRINT1( _L( "MM MTP <= CSetObjectPropList::ServiceMetaDataToWrapperL resCode = 0x%x" ), resCode );
-
- return resCode;
- }
-
-// -----------------------------------------------------------------------------
// CSetObjectPropList::RunL
//
// -----------------------------------------------------------------------------
@@ -351,15 +339,9 @@
//
EXPORT_C TInt CSetObjectPropList::RunError( TInt aError )
{
- PRINT1( _L( "MM MTP <> CSetObjectPropList::RunError with error %d" ), aError );
+ if ( aError != KErrNone )
+ PRINT1( _L( "MM MTP <> CGetObjectPropList::RunError aError = %d" ), aError );
- // Reschedule ourselves
- // TODO: go to next index or increase?
- // iUnprocessedIndex++
-// TRequestStatus* status = &iStatus;
-// User::RequestComplete( status, aError );
-// SetActive();
- PRINT1( _L( "MM MTP <> CGetObjectPropList::RunError aError = %d" ), aError );
TRAP_IGNORE( SendResponseL( EMTPRespCodeGeneralError ) );
return KErrNone;
@@ -372,7 +354,6 @@
//
EXPORT_C void CSetObjectPropList::DoCancel()
{
-
}
// end of file
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectpropvalue.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectpropvalue.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,7 +16,6 @@
*/
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/cmtptypestring.h>
#include <mtp/cmtptypearray.h>
#include <mtp/mmtpobjectmgr.h>
@@ -72,9 +71,9 @@
sizeof(KMTPSetObjectPropValuePolicy) / sizeof(TMTPRequestElementInfo),
KMTPSetObjectPropValuePolicy ),
iObjectMgr( aFramework.ObjectMgr() ),
- iDpConfig( aDpConfig )
+ iDpConfig( aDpConfig ),
+ iFs( aFramework.Fs() )
{
- SetPSStatus();
PRINT( _L( "Operation: SetObjectPropValue(0x9804)" ) );
}
@@ -107,13 +106,15 @@
case EMTPObjectPropCodeObjectSize:
case EMTPObjectPropCodeParentObject:
case EMTPObjectPropCodePersistentUniqueObjectIdentifier:
- case EMTPObjectPropCodeNonConsumable:
case EMTPObjectPropCodeDateAdded:
case EMTPObjectPropCodeDateCreated:
case EMTPObjectPropCodeDateModified:
//case EMTPObjectPropCodeVideoBitRate: // move to specific dp
returnCode = ETrue;
break;
+ case EMTPObjectPropCodeNonConsumable:
+ // It's settable, return EFalse here.
+ break;
default:
returnCode = IsSpecificPropCodeReadOnly(aPropCode);
@@ -133,43 +134,46 @@
PRINT( _L( "MM MTP => CSetObjectPropValue::CheckRequestL" ) );
TMTPResponseCode result = CRequestProcessor::CheckRequestL();
+ if ( result == EMTPRespCodeObjectWriteProtected )
+ {
+ // Return AccessDenied for P4S pass rate, instead of EMTPRespCodeObjectWriteProtected
+ result = EMTPRespCodeAccessDenied;
+ }
// Check if property is supported
if ( result == EMTPRespCodeOK )
{
iPropCode = Request().Uint32( TMTPTypeRequest::ERequestParameter2 );
PRINT1( _L( "MM MTP <> CSetObjectPropValue::CheckRequestL iPropCode = 0x%x" ), iPropCode );
- result = EMTPRespCodeInvalidObjectPropCode;
TUint32 objectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
CMTPObjectMetaData* objectInfo = iRequestChecker->GetObjectInfo( objectHandle );
-
- if (!objectInfo)
+ if ( objectInfo == NULL )
{
- PRINT(_L("MM MTP <> CGetObjectPropValue::CheckRequestL, objectInfo is NULL"));
+ PRINT( _L("MM MTP <> CSetObjectPropValue::CheckRequestL, objectInfo is NULL" ) );
return EMTPRespCodeInvalidObjectHandle;
}
- TFileName fileName = objectInfo->DesC(CMTPObjectMetaData::ESuid);
- TUint32 formatCode = objectInfo->Uint(CMTPObjectMetaData::EFormatCode);
-
- PRINT3( _L( "MM MTP <> CGetObjectPropValue::CheckRequestL, handle = 0x%x, filename = %S, formatCode = 0x%x" ),
- objectHandle,
- &fileName,
- formatCode );
+ TPtrC fileName = objectInfo->DesC( CMTPObjectMetaData::ESuid );
+ TUint32 formatCode = objectInfo->Uint( CMTPObjectMetaData::EFormatCode );
+ PRINT3( _L( "MM MTP <> CSetObjectPropValue::CheckRequestL, handle = 0x%x, filename = %S, formatCode = 0x%x" ),
+ objectHandle,
+ &fileName,
+ formatCode );
const RArray<TUint>* properties = iDpConfig.GetSupportedPropertiesL( formatCode );
TInt count = properties->Count();
+
+ result = EMTPRespCodeInvalidObjectPropCode;
for ( TInt i = 0; i < count; i++ )
{
// Object property code is supported, but can not be set which is read only.
- if ( (*properties)[i] == iPropCode
- && IsPropCodeReadonly( iPropCode ) )
+ if ( ( *properties )[i] == iPropCode && IsPropCodeReadonly( iPropCode ) )
{
result = EMTPRespCodeAccessDenied;
break;
}
// Object property code is supported and can be set.
- else if ( iPropCode == (*properties)[i] )
+ else if ( iPropCode == ( *properties )[i] )
{
result = EMTPRespCodeOK;
break;
@@ -194,6 +198,9 @@
EXPORT_C void CSetObjectPropValue::ServiceL()
{
PRINT( _L( "MM MTP => CSetObjectPropValue::ServiceL" ) );
+
+ MmMtpDpUtility::SetPSStatus( EMtpPSStatusActive );
+
__ASSERT_DEBUG( iRequestChecker, Panic( EMmMTPDpRequestCheckNull ) );
TUint32 handle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
PRINT1( _L( "MM MTP <> CSetObjectPropValue::ServiceL handle = 0x%x" ), handle );
@@ -212,16 +219,20 @@
case EMTPObjectPropCodeDateAdded: // 0xDC4E
case EMTPObjectPropCodeDateCreated: // Date Created(0xDC08)
case EMTPObjectPropCodeDateModified: // Modified Date(0xDC09)
- case EMTPObjectPropCodeNonConsumable: // Non Consumable(0xDC4F)
case EMTPObjectPropCodeVideoBitRate: // 0xDE9C
{
SendResponseL( EMTPRespCodeAccessDenied );
}
break;
+ case EMTPObjectPropCodeNonConsumable: // Non Consumable(0xDC4F)
+ ReceiveDataL( iMTPTypeUint8 );
+ break;
+
// Get Data for String objects
case EMTPObjectPropCodeObjectFileName: // 0xDC07
case EMTPObjectPropCodeName: // 0xDC44
+ case EMTPObjectPropCodeAlbumArtist:
{
delete iMTPTypeString;
iMTPTypeString = NULL;
@@ -252,36 +263,49 @@
switch ( iPropCode )
{
+ case EMTPObjectPropCodeNonConsumable:
+ iObjectInfo->SetUint( CMTPObjectMetaData::ENonConsumable, iMTPTypeUint8.Value() );
+ iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo );
+ break;
+
case EMTPObjectPropCodeObjectFileName:
{
TPtrC suid( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
- TBuf<KMaxFileName> newSuid( iMTPTypeString->StringChars() );
- PRINT2( _L( "MM MTP <> old name = %S, new name = %S" ), &suid, &newSuid );
- TInt err = KErrNone;
- err = MmMtpDpUtility::UpdateObjectFileName( iFramework.Fs(),
- suid,
- newSuid );
- PRINT1( _L( "MM MTP <> Update object file name err = %d" ), err );
- if ( KErrOverflow == err ) // full path name is too long
- {
+ TPtrC ptr ( iMTPTypeString->StringChars() );
+ if ( KMaxFileName < ptr.Length() )
responseCode = EMTPRespCodeInvalidDataset;
- }
- else if ( ( KErrNone == err ) || ( KErrAlreadyExists == err ) )
+ else
{
- TRAP( err, iDpConfig.GetWrapperL().RenameObjectL( suid, newSuid ) ); //Update MPX DB
- PRINT1( _L( "MM MTP <> Rename MPX object file name err = %d" ), err );
- // it is ok if file is not found in DB, following S60 solution
- if ( KErrNotFound == err )
+ TFileName newSuid( ptr );
+ PRINT2( _L( "MM MTP <> old name = %S, new name = %S" ), &suid, &newSuid );
+ TInt err = KErrNone;
+ err = MmMtpDpUtility::UpdateObjectFileName( iFramework.Fs(),
+ suid,
+ newSuid );
+ // TODO: if the new name is the same with old name
+ PRINT1( _L( "MM MTP <> Update object file name err = %d" ), err );
+ if ( KErrOverflow == err ) // full path name is too long
{
- TRAP( err, iDpConfig.GetWrapperL().AddObjectL( newSuid ) );
- PRINT1( _L( "MM MTP <> Add MPX object file name err = %d" ), err );
+ responseCode = EMTPRespCodeInvalidDataset;
}
+ else if ( KErrNone == err )
+ {
+ TRAP( err, iDpConfig.GetWrapperL().RenameObjectL( *iObjectInfo, newSuid ) ); //Update MPX DB
+ PRINT1( _L( "MM MTP <> Rename MPX object file name err = %d" ), err );
+ // it is ok if file is not found in DB, following S60 solution
+ if ( KErrNotFound == err )
+ {
+ TRAP( err, iDpConfig.GetWrapperL().AddObjectL( *iObjectInfo ) );
+ PRINT1( _L( "MM MTP <> Add MPX object file name err = %d" ), err );
+ }
- if ( KErrNone == err )
- {
iObjectInfo->SetDesCL( CMTPObjectMetaData::ESuid, newSuid );
iFramework.ObjectMgr().ModifyObjectL( *iObjectInfo );
}
+ else if ( KErrInUse == err ) // object file is being used by other program
+ {
+ responseCode = EMTPRespCodeDeviceBusy;
+ }
else
{
responseCode = EMTPRespCodeGeneralError;
@@ -291,6 +315,7 @@
break;
case EMTPObjectPropCodeName: // 0xDC44
+ case EMTPObjectPropCodeAlbumArtist:
{
responseCode = ServiceMetaDataToWrapperL( iPropCode,
*iMTPTypeString,
@@ -343,12 +368,8 @@
}
else if ( err == KErrNotFound )
{
-// TMTPFormatCode formatCode =
-// MmMtpDpUtility::FormatFromFilename( aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ) );
if( MmMtpDpUtility::HasMetadata( aObjectMetaData.Uint( CMTPObjectMetaData::EFormatCode ) ) )
SendResponseL( EMTPRespCodeAccessDenied );
- else
- SendDataL( aNewData );
}
else
{
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectreferences.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csetobjectreferences.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -18,7 +18,6 @@
#include <mtp/cmtptypearray.h>
#include <mtp/mmtpobjectmgr.h>
-#include <mtp/mmtpdataproviderframework.h>
#include <mtp/mmtpreferencemgr.h>
#include "csetobjectreferences.h"
@@ -28,6 +27,8 @@
#include "mmmtpdputility.h"
#include "mmmtpdpconfig.h"
+const TInt KMmMtpRefArrayGranularity = 3;
+
// -----------------------------------------------------------------------------
// Verification data for the SetReferences request
// -----------------------------------------------------------------------------
@@ -69,7 +70,6 @@
//
void CSetObjectReferences::ConstructL()
{
- SetPSStatus();
}
// -----------------------------------------------------------------------------
@@ -88,16 +88,14 @@
// Standard c++ constructor
// -----------------------------------------------------------------------------
//
-EXPORT_C CSetObjectReferences::CSetObjectReferences(
- MMTPDataProviderFramework& aFramework,
+CSetObjectReferences::CSetObjectReferences( MMTPDataProviderFramework& aFramework,
MMTPConnection& aConnection,
MMmMtpDpConfig& aDpConfig ) :
- CRequestProcessor(
- aFramework,
- aConnection,
- sizeof( KMTPSetObjectReferencesPolicy )/sizeof( TMTPRequestElementInfo ),
- KMTPSetObjectReferencesPolicy ),
- iDpConfig( aDpConfig )
+ CRequestProcessor( aFramework,
+ aConnection,
+ sizeof( KMTPSetObjectReferencesPolicy ) / sizeof( TMTPRequestElementInfo ),
+ KMTPSetObjectReferencesPolicy ),
+ iDpConfig( aDpConfig )
{
PRINT( _L( "Operation: SetObjectReferences(0x9811)" ) );
}
@@ -107,12 +105,15 @@
// set references to DB
// -----------------------------------------------------------------------------
//
-EXPORT_C void CSetObjectReferences::DoSetObjectReferencesL( CMmMtpDpMetadataAccessWrapper& aWrapper,
- TUint16 aObjectFormat,
- const TDesC& aSrcFileName,
- CDesCArray& aRefFileArray )
+void CSetObjectReferences::DoSetObjectReferencesL( const CMTPObjectMetaData& aObject )
{
- // do nothing, do special thing by inheriting
+ TUint formatCode = aObject.Uint( CMTPObjectMetaData::EFormatCode );
+ TBool hasReference = MmMtpDpUtility::HasReference( formatCode );
+
+ if ( hasReference )
+ {
+ iDpConfig.GetWrapperL().SetReferenceL( aObject, *iReferenceSuids );
+ }
}
// -----------------------------------------------------------------------------
@@ -124,6 +125,9 @@
EXPORT_C void CSetObjectReferences::ServiceL()
{
PRINT( _L( "MM MTP => CSetObjectReferences::ServiceL" ) );
+
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
+
delete iReferences;
iReferences = NULL;
iReferences = CMTPTypeArray::NewL( EMTPTypeAUINT32 );
@@ -142,7 +146,7 @@
delete iReferenceSuids;
iReferenceSuids = NULL;
- iReferenceSuids = new ( ELeave ) CDesCArrayFlat( 3 );
+ iReferenceSuids = new ( ELeave ) CDesCArrayFlat( KMmMtpRefArrayGranularity );
if ( !VerifyReferenceHandlesL() )
{
@@ -152,17 +156,18 @@
{
MMTPReferenceMgr& referenceMgr = iFramework.ReferenceMgr();
TUint32 objectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
- PRINT1( _L( "MM MTP <>CSetObjectReferences::DoHandleResponsePhaseL objectHandle = 0x%x" ), objectHandle );
+ PRINT1( _L( "MM MTP <> CSetObjectReferences::DoHandleResponsePhaseL objectHandle = 0x%x" ), objectHandle );
referenceMgr.SetReferencesL( TMTPTypeUint32( objectHandle ),
*iReferences );
CMTPObjectMetaData* object = CMTPObjectMetaData::NewLC(); // + object
iFramework.ObjectMgr().ObjectL( objectHandle, *object );
PRINT1( _L( "MM MTP <> object file name is %S" ), &(object->DesC( CMTPObjectMetaData::ESuid ) ) );
- DoSetObjectReferencesL( iDpConfig.GetWrapperL(),
- object->Uint( CMTPObjectMetaData::EFormatCode ),
- object->DesC( CMTPObjectMetaData::ESuid ),
- *iReferenceSuids );
+ DoSetObjectReferencesL( *object );
+
+ // set it to something else other than EMTPSubFormatCodeUnknown to prevent being queried from MPX later in the same session
+ object->SetUint( CMTPObjectMetaData::EFormatSubCode, EMTPSubFormatCodeUndefined );
+ iFramework.ObjectMgr().ModifyObjectL( *object );
CleanupStack::PopAndDestroy( object ); // - object
@@ -196,8 +201,9 @@
result = EFalse;
break;
}
-
- iReferenceSuids->AppendL( object->DesC( CMTPObjectMetaData::ESuid ) );
+ // Only audio in playlist is supported
+ if ( iDpConfig.GetWrapperL().Category( *object ) == EMPXSong )
+ iReferenceSuids->AppendL( object->DesC( CMTPObjectMetaData::ESuid ) );
}
CleanupStack::PopAndDestroy( object ); // - object
PRINT( _L( "MM MTP <= CSetObjectReferences::VerifyReferenceHandlesL" ) );
--- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpaccesssingleton.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpaccesssingleton.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -21,6 +21,7 @@
#include "cmmmtpdpaccesssingleton.h"
#include "cmmmtpdpmetadataaccesswrapper.h"
#include "mmmtpdplogger.h"
+#include "mmmtpdputility.h"
// -----------------------------------------------------------------------------
// CMmMtpDpAccessSingleton::~CMmMtpDpAccessSingleton
@@ -30,6 +31,12 @@
CMmMtpDpAccessSingleton::~CMmMtpDpAccessSingleton()
{
delete iWrapper;
+
+ if (iDelayStatusChanger)
+ {
+ iDelayStatusChanger->Cancel();
+ delete iDelayStatusChanger;
+ }
}
// -----------------------------------------------------------------------------
@@ -50,14 +57,13 @@
// create singleton instance
// -----------------------------------------------------------------------------
//
-EXPORT_C void CMmMtpDpAccessSingleton::CreateL( RFs& aRfs,
- MMTPDataProviderFramework& aFramework )
+EXPORT_C void CMmMtpDpAccessSingleton::CreateL( MMTPDataProviderFramework& aFramework )
{
CMmMtpDpAccessSingleton* self = reinterpret_cast<CMmMtpDpAccessSingleton*>( Dll::Tls() );
if ( self == NULL )
{
- self = CMmMtpDpAccessSingleton::NewL( aRfs, aFramework );
+ self = CMmMtpDpAccessSingleton::NewL( aFramework );
Dll::SetTls( reinterpret_cast<TAny*>( self ) );
}
else
@@ -135,12 +141,11 @@
// two-phase construction
// -----------------------------------------------------------------------------
//
-CMmMtpDpAccessSingleton* CMmMtpDpAccessSingleton::NewL( RFs& aRfs,
- MMTPDataProviderFramework& aFramework )
+CMmMtpDpAccessSingleton* CMmMtpDpAccessSingleton::NewL( MMTPDataProviderFramework& aFramework )
{
CMmMtpDpAccessSingleton* self = new(ELeave) CMmMtpDpAccessSingleton;
CleanupStack::PushL( self );
- self->ConstructL(aRfs, aFramework);
+ self->ConstructL( aFramework );
CleanupStack::Pop( self );
return self;
}
@@ -150,11 +155,76 @@
// two-phase construction
// -----------------------------------------------------------------------------
//
-void CMmMtpDpAccessSingleton::ConstructL( RFs& aRfs,
- MMTPDataProviderFramework& aFramework )
+void CMmMtpDpAccessSingleton::ConstructL( MMTPDataProviderFramework& aFramework )
{
- iWrapper = CMmMtpDpMetadataAccessWrapper::NewL( aRfs, aFramework );
+ iWrapper = CMmMtpDpMetadataAccessWrapper::NewL( aFramework );
+ iDelayStatusChanger = CIdle::NewL(CActive::EPriorityIdle);
+ }
+
+// -----------------------------------------------------------------------------
+// CMmMtpDpAccessSingleton::ActiveToIdleStatusChange
+// Issue ActiveToIdle Status Change (ActiveObject)
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMmMtpDpAccessSingleton::ActiveToIdleStatusChange()
+ {
+ PRINT( _L( "CMmMtpDpAccessSingleton::ActiveToIdleStatusChange" ) );
+ CMmMtpDpAccessSingleton* self = CMmMtpDpAccessSingleton::Instance();
+
+ if (self != NULL)
+ {
+ CMmMtpDpAccessSingleton::CancelActiveToIdleStatusChange();
+
+ if (self->DelayStatusChanger() != NULL)
+ self->DelayStatusChanger()->Start(TCallBack(DoActiveToIdleStatusChange, self));
+ }
}
+// -----------------------------------------------------------------------------
+// CMmMtpDpAccessSingleton::CancelActiveToIdleChange
+// Cancel Outstanding ActiveToIdle Status Change
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMmMtpDpAccessSingleton::CancelActiveToIdleStatusChange()
+ {
+ CMmMtpDpAccessSingleton* self = CMmMtpDpAccessSingleton::Instance();
+
+ if ((self != NULL) && (self->DelayStatusChanger() != NULL))
+ {
+ if (self->DelayStatusChanger()->IsActive())
+ {
+ PRINT( _L( "CMmMtpDpAccessSingleton::CancelActiveToIdleStatusChange, cancel outstanding request" ) );
+ self->DelayStatusChanger()->Cancel();
+ }
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CMmMtpDpAccessSingleton::DelayStatusChanger
+// get DelayStatusChanger instance, internal use only
+// -----------------------------------------------------------------------------
+//
+CIdle* CMmMtpDpAccessSingleton::DelayStatusChanger()
+ {
+ CIdle* delayStatusChanger = NULL;
+ CMmMtpDpAccessSingleton* self = CMmMtpDpAccessSingleton::Instance();
+
+ if (self != NULL)
+ delayStatusChanger = self->iDelayStatusChanger;
+
+ return delayStatusChanger;
+ }
+
+// -----------------------------------------------------------------------------
+// CMmMtpDpAccessSingleton::DoActiveToIdleChange
+// Perform actural ActiveToIdle Status Change after active object callback
+// -----------------------------------------------------------------------------
+//
+TInt CMmMtpDpAccessSingleton::DoActiveToIdleStatusChange(TAny* /*Any*/)
+ {
+ PRINT( _L( "CMmMtpDpAccessSingleton::DoActiveToIdleStatusChange ") );
+ MmMtpDpUtility::DoSetPSStatus(EMtpPSStatusReadyToSync);
+ return KErrNone;
+ }
// end of file
--- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadataaccesswrapper.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadataaccesswrapper.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -16,37 +16,41 @@
*/
+#include <mtp/mmtpdataproviderframework.h>
+#include <mtp/mmtpobjectmgr.h>
+#include <mtp/cmtptypestring.h>
+#include <mtp/cmtpobjectmetadata.h>
#include <bautils.h>
#include <e32math.h>
-#include <mtp/mmtpdataproviderframework.h>
#include <e32property.h>
-#include <MtpPrivatePSKeys.h>
+#include <mtpprivatepskeys.h>
+#include "mmmtpdp_variant.hrh"
#include "cmmmtpdpmetadataaccesswrapper.h"
#include "cmmmtpdpmetadatampxaccess.h"
#include "cmmmtpdpmetadatavideoaccess.h"
#include "mmmtpdputility.h"
+#include "tobjectdescription.h"
#include "mmmtpdplogger.h"
-const TInt KMMMTPDummyFileArrayGranularity = 5;
+const TInt KMmMtpDummyFileArrayGranularity = 5;
-CMmMtpDpMetadataAccessWrapper* CMmMtpDpMetadataAccessWrapper::NewL( RFs& aRfs,
- MMTPDataProviderFramework& aFramework )
+CMmMtpDpMetadataAccessWrapper* CMmMtpDpMetadataAccessWrapper::NewL( MMTPDataProviderFramework& aFramework )
{
- CMmMtpDpMetadataAccessWrapper* me = new (ELeave) CMmMtpDpMetadataAccessWrapper( aRfs, aFramework );
+ CMmMtpDpMetadataAccessWrapper* me = new (ELeave) CMmMtpDpMetadataAccessWrapper( aFramework );
CleanupStack::PushL( me );
me->ConstructL();
CleanupStack::Pop( me );
-
+
return me;
}
-CMmMtpDpMetadataAccessWrapper::CMmMtpDpMetadataAccessWrapper( RFs& aRfs,
- MMTPDataProviderFramework& aFramework ) :
- iRfs( aRfs ),
- iFramework( aFramework )
+CMmMtpDpMetadataAccessWrapper::CMmMtpDpMetadataAccessWrapper( MMTPDataProviderFramework& aFramework ) :
+ iFramework( aFramework ),
+ iFs( aFramework.Fs() ),
+ iOpenCount( 0 )
{
-
+ // Do nothing
}
// ---------------------------------------------------------------------------
@@ -58,21 +62,27 @@
{
PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::ConstructL" ) );
- iMmMtpDpMetadataMpxAccess = CMmMtpDpMetadataMpxAccess::NewL( iRfs, iFramework );
+ iMmMtpDpMetadataMpxAccess = CMmMtpDpMetadataMpxAccess::NewL( iFs );
- iMmMtpDpMetadataVideoAccess = CMmMtpDpMetadataVideoAccess::NewL( iRfs );
-
- iPlaylistArray = new ( ELeave ) CDesCArrayFlat( KMMMTPDummyFileArrayGranularity );
-
+ iMmMtpDpMetadataVideoAccess = CMmMtpDpMetadataVideoAccess::NewL( iFs );
+
+ iAbstractMediaArray = new ( ELeave ) CDesCArrayFlat( KMmMtpDummyFileArrayGranularity );
+
// Create the PS key to notify subscribers that MTP mode is activated
_LIT_SECURITY_POLICY_C1(KKeyReadPolicy, ECapabilityReadUserData);
_LIT_SECURITY_POLICY_C1(KKeyWritePolicy, ECapabilityWriteUserData);
- RProperty::Define( KMtpPSUid,
- KMtpPSStatus,
- RProperty::EInt,
- KKeyReadPolicy,
+ RProperty::Define( KMtpPSUid,
+ KMtpPSStatus,
+ RProperty::EInt,
+ KKeyReadPolicy,
KKeyWritePolicy);
+#ifdef MMMTPDP_RESET_STATUS_CLOSESESSION
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusUninitialized);
+#else
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusReadyToSync);
+#endif // MMMTPDP_RESET_STATUS_CLOSESESSION
+
PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::ConstructL" ) );
}
@@ -86,37 +96,40 @@
PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::~CMmMtpDpMetadataAccessWrapper" ) );
RemoveDummyFiles();
- delete iPlaylistArray;
+ delete iAbstractMediaArray;
delete iMmMtpDpMetadataVideoAccess;
delete iMmMtpDpMetadataMpxAccess;
-
+
// unblock MPX
- RProperty::Set( KMtpPSUid,
- KMtpPSStatus,
- EMtpPSStatusUninitialized);
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusUninitialized);
+
PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::~CMmMtpDpMetadataAccessWrapper" ) );
}
// -----------------------------------------------------------------------------
-// CMmMtpDpMetadataAccessWrapper::SetPlaylist
-// Set playlist to DB
+// CMmMtpDpMetadataAccessWrapper::SetReferenceL
+// Set abstract media to DB
// -----------------------------------------------------------------------------
//
-EXPORT_C void CMmMtpDpMetadataAccessWrapper::SetPlaylistL( const TDesC& aPlaylistFileName, CDesCArray& aRefFileArray )
+EXPORT_C void CMmMtpDpMetadataAccessWrapper::SetReferenceL( const CMTPObjectMetaData& aObject,
+ CDesCArray& aRefFileArray )
{
- PRINT1( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::SetPlaylistL aPlaylistFileName = %S" ), &aPlaylistFileName );
+ TPtrC refOwner( aObject.DesC( CMTPObjectMetaData::ESuid ) );
+ PRINT1( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::SetReferenceL reference owner = %S" ),
+ &refOwner );
- if ( !MmMtpDpUtility::IsVideoL( aPlaylistFileName, iFramework ) )
+ TMPXGeneralCategory category = Category( aObject );
+ if ( category == EMPXPlaylist || category == EMPXAbstractAlbum )
{
- iMmMtpDpMetadataMpxAccess->SetPlaylistL( aPlaylistFileName, aRefFileArray );
+ iMmMtpDpMetadataMpxAccess->SetReferenceL( refOwner, aRefFileArray, category );
}
- PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::SetPlaylistL" ) );
+ PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::SetReferenceL" ) );
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataAccessWrapper::AddMediaL
+// CMmMtpDpMetadataAccessWrapper::GetObjectMetadataValueL
// Gets a piece of metadata from the collection
// ---------------------------------------------------------------------------
//
@@ -126,18 +139,53 @@
{
PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::GetObjectMetadataValueL" ) );
- TPtrC fullFileName( aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ) );
- if ( !MmMtpDpUtility::IsVideoL( fullFileName, iFramework ) )
+ TMPXGeneralCategory category = Category( aObjectMetaData );
+ switch ( category )
{
- iMmMtpDpMetadataMpxAccess->GetObjectMetadataValueL( aPropCode,
- aNewData,
- aObjectMetaData );
- }
- else
- {
- iMmMtpDpMetadataVideoAccess->GetObjectMetadataValueL( aPropCode,
- aNewData,
- aObjectMetaData );
+ case EMPXAbstractAlbum:
+ if ( aPropCode == EMTPObjectPropCodeDateAdded && EMTPTypeString == aNewData.Type() )
+ {
+ TBuf<KMtpMaxDateTimeStringLength> timeStr;
+ MmMtpDpUtility::GetObjectDateModifiedL( iFs,
+ aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ),
+ timeStr );
+ PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL Date time %S" ), &timeStr );
+
+ ( ( CMTPTypeString & ) aNewData ).SetL( timeStr );
+ break;
+ }
+ // else
+ // get from mpx
+ case EMPXPlaylist:
+ case EMPXSong:
+ {
+ iMmMtpDpMetadataMpxAccess->GetObjectMetadataValueL( aPropCode,
+ aNewData,
+ aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ),
+ category );
+ }
+ break;
+ case EMPXVideo:
+ if ( aPropCode == EMTPObjectPropCodeDateAdded && EMTPTypeString == aNewData.Type() )
+ {
+ TBuf<KMtpMaxDateTimeStringLength> timeStr;
+ MmMtpDpUtility::GetObjectDateModifiedL( iFs,
+ aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ),
+ timeStr );
+ PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL Date time %S" ), &timeStr );
+
+ ( ( CMTPTypeString & ) aNewData ).SetL( timeStr );
+ }
+ else
+ {
+ iMmMtpDpMetadataVideoAccess->GetObjectMetadataValueL( aPropCode,
+ aNewData,
+ aObjectMetaData );
+ }
+ break;
+ default:
+ // do nothing
+ break;
}
PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::GetObjectMetadataValueL" ) );
@@ -154,96 +202,90 @@
{
PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::SetObjectMetadataValueL" ) );
- TPtrC fullFileName( aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ) );
- if ( MmMtpDpUtility::IsVideoL( fullFileName, iFramework ) )
+ TMPXGeneralCategory category = Category( aObjectMetaData );
+ switch ( category )
{
- iMmMtpDpMetadataVideoAccess->SetObjectMetadataValueL( aPropCode,
- aNewData,
- aObjectMetaData );
+ case EMPXAbstractAlbum:
+ case EMPXSong:
+ case EMPXPlaylist:
+ iMmMtpDpMetadataMpxAccess->SetObjectMetadataValueL( aPropCode,
+ aNewData,
+ aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ),
+ category );
+ break;
+ case EMPXVideo:
+ iMmMtpDpMetadataVideoAccess->SetObjectMetadataValueL( aPropCode,
+ aNewData,
+ aObjectMetaData );
+ break;
+ default:
+ break;
}
- else
- {
- iMmMtpDpMetadataMpxAccess->SetObjectMetadataValueL( aPropCode,
- aNewData,
- aObjectMetaData );
- }
-
PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::SetObjectMetadataValueL" ) );
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataAccessWrapper::SetObjectMetadataValueL
+// CMmMtpDpMetadataAccessWrapper::RenameObjectL
// Renames the file part of a record in the collection database
// ---------------------------------------------------------------------------
//
-EXPORT_C void CMmMtpDpMetadataAccessWrapper::RenameObjectL( const TDesC& aOldFileName,
+EXPORT_C void CMmMtpDpMetadataAccessWrapper::RenameObjectL( const CMTPObjectMetaData& aOldObject,
const TDesC& aNewFileName )
{
+ TPtrC oldFileName( aOldObject.DesC( CMTPObjectMetaData::ESuid ) );
PRINT2( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::RenameObjectL old = %S, new = %S" ),
- &aOldFileName,
+ &oldFileName,
&aNewFileName );
-
- TMTPFormatCode formatCode = MmMtpDpUtility::FormatFromFilename( aOldFileName );
- if ( formatCode == EMTPFormatCodeWMV )
+
+ TMPXGeneralCategory category = Category( aOldObject );
+ switch ( category )
{
- iMmMtpDpMetadataVideoAccess->RenameRecordL( aOldFileName, aNewFileName );
+ case EMPXSong:
+ case EMPXAbstractAlbum:
+ case EMPXPlaylist:
+ {
+ iMmMtpDpMetadataMpxAccess->RenameObjectL( oldFileName,
+ aNewFileName,
+ category );
+ }
+ break;
+ case EMPXVideo:
+ iMmMtpDpMetadataVideoAccess->RenameRecordL( oldFileName, aNewFileName );
+ break;
+ default:
+ break;
}
- else
- {
- if ( !MmMtpDpUtility::IsVideoL( aNewFileName , iFramework ) )
- {
- iMmMtpDpMetadataMpxAccess->RenameObjectL( aOldFileName, aNewFileName, formatCode );
- }
- else
- {
- iMmMtpDpMetadataVideoAccess->RenameRecordL( aOldFileName, aNewFileName );
- }
- }
+
PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::RenameObjectL" ) );
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataAccessWrapper::SetObjectMetadataValueL
+// CMmMtpDpMetadataAccessWrapper::DeleteObjectL
// Deletes metadata information associated with the object
// ---------------------------------------------------------------------------
//
-void CMmMtpDpMetadataAccessWrapper::DeleteObjectL( const TDesC& aFullFileName,
- const TUint aFormatCode )
+EXPORT_C void CMmMtpDpMetadataAccessWrapper::DeleteObjectL( const CMTPObjectMetaData& aObject )
{
- PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::DeleteObjectL" ) );
+ TPtrC fileName( aObject.DesC( CMTPObjectMetaData::ESuid ) );
+ PRINT1( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::DeleteObjectL name = %S" ), &fileName );
- TMPXGeneralCategory category = Category( aFormatCode );
-
- // Have to do this. File might not be in file system anymore, have to
- // reply on ObjectManager
- if ( ( aFormatCode == EMTPFormatCodeMP4Container )
- || ( aFormatCode == EMTPFormatCode3GPContainer )
- || ( aFormatCode == EMTPFormatCodeASF ) )
- {
- if ( MmMtpDpUtility::IsVideoL( aFullFileName, iFramework ) )
- {
- category = EMPXVideo;
- }
- else
- {
- category = EMPXSong;
- }
- }
-
+ TMPXGeneralCategory category = Category( aObject );
+
switch ( category )
{
+ case EMPXSong:
+ case EMPXAbstractAlbum:
case EMPXPlaylist:
- case EMPXSong:
{
- iMmMtpDpMetadataMpxAccess->DeleteObjectL( aFullFileName, category );
+ iMmMtpDpMetadataMpxAccess->DeleteObjectL( fileName, category );
}
break;
case EMPXVideo:
{
- iMmMtpDpMetadataVideoAccess->DeleteRecordL( aFullFileName );
+ iMmMtpDpMetadataVideoAccess->DeleteRecordL( fileName );
}
break;
@@ -255,33 +297,23 @@
PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::DeleteObjectL" ) );
}
-// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataAccessWrapper::SetStorageRootL
-// Sets current Drive info
-// ---------------------------------------------------------------------------
-//
-void CMmMtpDpMetadataAccessWrapper::SetStorageRootL( const TDesC& aStorageRoot )
- {
- PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::SetStorageRootL" ) );
-
- iMmMtpDpMetadataVideoAccess->SetStorageRootL( aStorageRoot );
- iMmMtpDpMetadataMpxAccess->SetStorageRootL( aStorageRoot );
-
- PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::SetStorageRootL" ) );
- }
// -----------------------------------------------------------------------------
// CMmMtpDpMetadataMpxAccess::SetImageObjPropL
// set image specific properties specific to videos
// -----------------------------------------------------------------------------
//
-void CMmMtpDpMetadataAccessWrapper::SetImageObjPropL( const TDesC& aFullFileName,
+void CMmMtpDpMetadataAccessWrapper::SetImageObjPropL( const CMTPObjectMetaData& aObject,
const TUint32 aWidth,
const TUint32 aHeight )
{
- if ( MmMtpDpUtility::IsVideoL( aFullFileName, iFramework ) )
+ TMPXGeneralCategory category = Category( aObject );
+ if ( category == EMPXVideo )
{
- iMmMtpDpMetadataVideoAccess->SetStorageRootL( aFullFileName );
- iMmMtpDpMetadataVideoAccess->SetImageObjPropL( aFullFileName, aWidth, aHeight );
+ TPtrC fullFileName( aObject.DesC( CMTPObjectMetaData::ESuid ) );
+ iMmMtpDpMetadataVideoAccess->SetStorageRootL( fullFileName );
+ iMmMtpDpMetadataVideoAccess->SetImageObjPropL( fullFileName,
+ aWidth,
+ aHeight );
}
}
@@ -290,24 +322,32 @@
// get image specific properties specific to videos
// -----------------------------------------------------------------------------
//
-void CMmMtpDpMetadataAccessWrapper::GetImageObjPropL( const TDesC& aFullFileName,
+void CMmMtpDpMetadataAccessWrapper::GetImageObjPropL( const CMTPObjectMetaData& aObject,
TUint32& aWidth,
TUint32& aHeight )
{
- if ( MmMtpDpUtility::IsVideoL( aFullFileName, iFramework ) )
+ TMPXGeneralCategory category = Category( aObject );
+ if ( category == EMPXVideo )
{
- iMmMtpDpMetadataVideoAccess->SetStorageRootL( aFullFileName );
- iMmMtpDpMetadataVideoAccess->GetImageObjPropL( aFullFileName, aWidth, aHeight );
+ TPtrC fullFileName( aObject.DesC( CMTPObjectMetaData::ESuid ) );
+ iMmMtpDpMetadataVideoAccess->SetStorageRootL( fullFileName );
+ iMmMtpDpMetadataVideoAccess->GetImageObjPropL( fullFileName, aWidth, aHeight );
}
}
-// -----------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------
// CMmMtpDpMetadataAccessWrapper::OpenSessionL
// Called when the MTP session is initialised
// -----------------------------------------------------------------------------
//
void CMmMtpDpMetadataAccessWrapper::OpenSessionL()
{
- iOpenSession = ETrue;
+ iOpenCount++;
+
+#ifdef MMMTPDP_RESET_STATUS_CLOSESESSION
+ if (iOpenCount == 1)
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusReadyToSync);
+#endif // MMMTPDP_RESET_STATUS_CLOSESESSION
}
// -----------------------------------------------------------------------------
@@ -317,15 +357,26 @@
//
void CMmMtpDpMetadataAccessWrapper::CloseSessionL()
{
- if ( iOpenSession )
+ PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::CloseSessionL count = %d" ), iOpenCount );
+
+ if ( iOpenCount >= 1 )
{
- PRINT( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::CloseSessionL close" ) );
- iMmMtpDpMetadataVideoAccess->CloseSessionL();
- iOpenSession = EFalse;
+ iOpenCount--;
+
+ if ( iOpenCount == 0 )
+ {
+ PRINT( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::CloseSessionL close" ) );
+ iMmMtpDpMetadataMpxAccess->CloseSession(); // trigger close and flush CollectionHelper
+ iMmMtpDpMetadataVideoAccess->CloseSessionL();
+
+#ifdef MMMTPDP_RESET_STATUS_CLOSESESSION
+ MmMtpDpUtility::SetPSStatus(EMtpPSStatusUninitialized);
+#endif // MMMTPDP_RESET_STATUS_CLOSESESSION
+ }
}
else
{
- PRINT( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::CloseSessionL alreay close" ) );
+ PRINT( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::CloseSessionL already close" ) );
}
}
@@ -334,29 +385,61 @@
// Get category according format code
// ---------------------------------------------------------------------------
//
-TMPXGeneralCategory CMmMtpDpMetadataAccessWrapper::Category( const TUint aFormatCode )
+TMPXGeneralCategory CMmMtpDpMetadataAccessWrapper::Category( const CMTPObjectMetaData& aObject )
{
TMPXGeneralCategory category = EMPXNoCategory;
- switch ( aFormatCode )
+ TUint formatCode = aObject.Uint( CMTPObjectMetaData::EFormatCode );
+ switch ( formatCode )
{
+ case EMTPFormatCodeASF:
+ case EMTPFormatCodeMP4Container:
+ case EMTPFormatCode3GPContainer:
+ {
+ TUint aSubFormatCode = aObject.Uint( CMTPObjectMetaData::EFormatSubCode );
+ if ( aSubFormatCode == EMTPSubFormatCodeUnknown )
+ {
+ TRAP_IGNORE( category = ContainerCategoryL( aObject.DesC( CMTPObjectMetaData::ESuid ) ) );
+ if ( category == EMPXSong )
+ aSubFormatCode = EMTPSubFormatCodeAudio;
+ else if ( category == EMPXVideo )
+ aSubFormatCode = EMTPSubFormatCodeVideo;
+ else
+ aSubFormatCode = EMTPSubFormatCodeUndefined;
+ const_cast<CMTPObjectMetaData&>(aObject).SetUint( CMTPObjectMetaData::EFormatSubCode, aSubFormatCode );
+ // If object doesn't exist, do nothing
+ TRAP_IGNORE( iFramework.ObjectMgr().ModifyObjectL( aObject ) );
+ }
+ else if ( aSubFormatCode == EMTPSubFormatCodeAudio )
+ category = EMPXSong;
+ else if ( aSubFormatCode == EMTPSubFormatCodeVideo )
+ category = EMPXVideo;
+ else if( aSubFormatCode == EMTPSubFormatCodeUndefined )
+ category = EMPXOther;
+ }
+ break;
+
case EMTPFormatCodeMP3:
case EMTPFormatCodeWAV:
case EMTPFormatCodeWMA:
case EMTPFormatCodeAAC:
- case EMTPFormatCodeASF:
- case EMTPFormatCodeMP4Container:
- case EMTPFormatCode3GPContainer:
{
category = EMPXSong;
}
break;
+ case EMTPFormatCodeM3UPlaylist:
case EMTPFormatCodeAbstractAudioVideoPlaylist:
{
category = EMPXPlaylist;
}
break;
+ case EMTPFormatCodeAbstractAudioAlbum:
+ {
+ category = EMPXAbstractAlbum;
+ }
+ break;
+
case EMTPFormatCodeWMV:
{
category = EMPXVideo;
@@ -366,84 +449,102 @@
default:
break;
}
+ PRINT1( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::Category category = %d" ), category );
+ return category;
+ }
+
+TMPXGeneralCategory CMmMtpDpMetadataAccessWrapper::ContainerCategoryL( const TDesC& aFullFileName )
+ {
+ PRINT1( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::ContainerCategoryL aFullFileName = %S" ), &aFullFileName );
+
+ TMPXGeneralCategory category = EMPXNoCategory;
+ TParsePtrC pathParser( aFullFileName );
+ TPtrC ext( pathParser.Ext() );
+
+ if ( ext.Length() <= 0 )
+ category = EMPXOther;
+ else if ( ext.CompareF( KTxtExtensionO4A ) == 0
+ || ext.CompareF( KTxtExtensionM4A ) == 0 )
+ category = EMPXSong;
+ else if ( ext.CompareF( KTxtExtensionO4V ) == 0 )
+ category = EMPXVideo;
+ else
+ {
+ HBufC8* mimetype = NULL;
+
+ if ( ext.CompareF( KTxtExtensionMP4 ) == 0
+ || ext.CompareF( KTxtExtension3GP ) == 0
+ || ext.CompareF( KTxtExtension3G2 ) == 0 )
+ mimetype = MmMtpDpUtility::Mp4MimeTypeL( aFullFileName );
+ else if ( ext.CompareF( KTxtExtensionODF ) == 0 )
+ mimetype = MmMtpDpUtility::OdfMimeTypeL( aFullFileName );
+ else if ( ext.CompareF( KTxtExtensionASF ) == 0 )
+ mimetype = MmMtpDpUtility::AsfMimeTypeL( aFullFileName );
+ if ( mimetype != NULL )
+ {
+ TMmMtpSubFormatCode subFormatCode =
+ MmMtpDpUtility::SubFormatCodeFromMime( *mimetype );
+
+ if ( subFormatCode == EMTPSubFormatCodeVideo )
+ category = EMPXVideo;
+ else if( subFormatCode == EMTPSubFormatCodeAudio )
+ category = EMPXSong;
+ else
+ category = EMPXOther;
+ }
+ }
+
+ PRINT1( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::ContainerCategoryL, category = %d" ), category );
return category;
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataAccessWrapper::GetAllPlaylistL
-//
+// CMmMtpDpMetadataAccessWrapper::GetAllAbstractMediaL
+//
// ---------------------------------------------------------------------------
-EXPORT_C void CMmMtpDpMetadataAccessWrapper::GetAllPlaylistL( const TDesC& aStoreRoot, CMPXMediaArray** aPlaylists )
+EXPORT_C void CMmMtpDpMetadataAccessWrapper::GetAllAbstractMediaL( const TDesC& aStoreRoot, CDesCArray& aAbstractMedias, TMPXGeneralCategory aCategory )
{
- iMmMtpDpMetadataMpxAccess->GetAllPlaylistL( aStoreRoot, aPlaylists );
+ iMmMtpDpMetadataMpxAccess->GetAllAbstractMediaL( aStoreRoot, aAbstractMedias, aCategory );
}
// ---------------------------------------------------------------------------
// CMmMtpDpMetadataAccessWrapper::GetAllReferenceL
-//
+//
// ---------------------------------------------------------------------------
-//s
-EXPORT_C void CMmMtpDpMetadataAccessWrapper::GetAllReferenceL( CMPXMedia* aPlaylist, CDesCArray& aReferences )
+//
+EXPORT_C void CMmMtpDpMetadataAccessWrapper::GetAllReferenceL( const CMTPObjectMetaData& aRefOwner, CDesCArray& aReferences )
{
- iMmMtpDpMetadataMpxAccess->GetAllReferenceL( aPlaylist, aReferences );
+ TMPXGeneralCategory category = Category( aRefOwner );
+ if ( category == EMPXPlaylist || category == EMPXAbstractAlbum )
+ iMmMtpDpMetadataMpxAccess->GetAllReferenceL( aRefOwner.DesC( CMTPObjectMetaData::ESuid ), category, aReferences );
}
-// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataAccessWrapper::GetPlaylistNameL
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CMmMtpDpMetadataAccessWrapper::GetPlaylistNameL( CMPXMedia* aPlaylist, TDes& aPlaylistName )
- {
- iMmMtpDpMetadataMpxAccess->GetPlaylistNameL( aPlaylist, aPlaylistName );
- }
-
-// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
// CMmMtpDpMetadataAccessWrapper::AddObjectL
-// Add object (music, video and playlist) info to DB
+// Add object (music, video, playlist and abstract media) info to DB
// -----------------------------------------------------------------------------
//
-void CMmMtpDpMetadataAccessWrapper::AddObjectL( const TDesC& aFullFileName, TBool aIsVideo /*= EFalse */ )
+EXPORT_C void CMmMtpDpMetadataAccessWrapper::AddObjectL( const CMTPObjectMetaData& aObject )
{
- PRINT1( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL aFullFileName = %S" ), &aFullFileName );
+ PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL" ) );
+ TMPXGeneralCategory category = Category( aObject );
- if ( aFullFileName.Length() <= 0)
- {
- User::Leave( KErrArgument );
- }
- if ( aIsVideo )
+ TPtrC fullFileName( aObject.DesC( CMTPObjectMetaData::ESuid ) );
+ if ( category == EMPXVideo )
{
PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL Addvideo" ) );
- iMmMtpDpMetadataVideoAccess->AddVideoL( aFullFileName );
+ iMmMtpDpMetadataVideoAccess->AddVideoL( fullFileName );
}
- else
+ else if ( category == EMPXPlaylist || category == EMPXAbstractAlbum )
{
- if ( MmMtpDpUtility::IsVideoL( aFullFileName, iFramework ) )
- {
- PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL Addvideo" ) );
- iMmMtpDpMetadataVideoAccess->AddVideoL( aFullFileName );
- }
- else
- {
- TMTPFormatCode formatCode = MmMtpDpUtility::FormatFromFilename( aFullFileName );
-
- if ( formatCode == EMTPFormatCodeM3UPlaylist
- || formatCode == EMTPFormatCodeMPLPlaylist
- || formatCode == EMTPFormatCodeAbstractAudioVideoPlaylist
- || formatCode == EMTPFormatCodeAbstractAudioPlaylist
- || formatCode == EMTPFormatCodeAbstractVideoPlaylist
- || formatCode == EMTPFormatCodeASXPlaylist
- || formatCode == EMTPFormatCodePLSPlaylist )
- {
- PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL AddPlaylist" ) );
- iMmMtpDpMetadataMpxAccess->AddPlaylistL( aFullFileName );
- }
- else
- {
- PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL AddSong" ) );
- iMmMtpDpMetadataMpxAccess->AddSongL( aFullFileName );
- }
- }
+ PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL AddPlaylist/AbstractAlbum" ) );
+ iMmMtpDpMetadataMpxAccess->AddAbstractMediaL( fullFileName,
+ category );
+ }
+ else if ( category == EMPXSong )
+ {
+ PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::AddObjectL AddSong" ) );
+ iMmMtpDpMetadataMpxAccess->AddSongL( fullFileName );
}
PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::AddObjectL" ) );
@@ -454,8 +555,8 @@
// Get Modified content
// ---------------------------------------------------------------------------
//
-EXPORT_C void CMmMtpDpMetadataAccessWrapper::GetModifiedContentL( const TDesC& aStorageRoot,
- TInt& arrayCount,
+EXPORT_C void CMmMtpDpMetadataAccessWrapper::GetModifiedContentL( const TDesC& aStorageRoot,
+ TInt& arrayCount,
CDesCArray& aModifiedcontent )
{
iMmMtpDpMetadataMpxAccess->SetStorageRootL( aStorageRoot );
@@ -474,12 +575,10 @@
//
TBool CMmMtpDpMetadataAccessWrapper::IsExistL( const TDesC& aSuid )
{
- TParsePtrC parse( aSuid );
- iMmMtpDpMetadataMpxAccess->SetStorageRootL( parse.Drive() );
return iMmMtpDpMetadataMpxAccess->IsExistL( aSuid );
}
-// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
// CMmMtpDpMetadataAccessWrapper::AddDummyFile
// Add one dummy file to dummy files array
// -----------------------------------------------------------------------------
@@ -487,10 +586,10 @@
EXPORT_C void CMmMtpDpMetadataAccessWrapper::AddDummyFileL( const TDesC& aDummyFileName )
{
PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::AddDummyFile aDummyFileName(%S)" ), &aDummyFileName );
- iPlaylistArray->AppendL( aDummyFileName );
+ iAbstractMediaArray->AppendL( aDummyFileName );
}
-// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
// CMmMtpDpMetadataAccessWrapper::DeleteDummyFile
// Delete one dummy file from dummy files array
// -----------------------------------------------------------------------------
@@ -499,12 +598,12 @@
{
PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::DeleteDummyFile aDummyFileName(%S)" ), &aDummyFileName );
TInt pos = 0;
- if ( iPlaylistArray->Count() > 0 )
+ if ( iAbstractMediaArray->Count() > 0 )
{
- if ( 0 == iPlaylistArray->Find( aDummyFileName, pos ) )
+ if ( 0 == iAbstractMediaArray->Find( aDummyFileName, pos ) )
{
PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::DeleteDummyFile pos = %d" ), pos );
- iPlaylistArray->Delete( pos );
+ iAbstractMediaArray->Delete( pos );
}
}
}
@@ -518,57 +617,67 @@
{
PRINT1( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::CreateDummyFile, filename = %S" ), &aPlaylistName );
- if ( MmMtpDpUtility::FormatFromFilename( aPlaylistName ) ==
- EMTPFormatCodeAbstractAudioVideoPlaylist )
+ RFile newfile;
+ TInt err = newfile.Replace( iFs, aPlaylistName, EFileWrite );
+
+ if ( err != KErrNone )
{
- RFile newfile;
- TInt err = newfile.Replace( iFramework.Fs(), aPlaylistName, EFileWrite );
-
+ newfile.Close();
+ PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::CreateDummyFile err = %d" ), err );
+ }
+ else // File created OK
+ {
+ err = newfile.Flush();
+ newfile.Close();
+ err = iFs.SetAtt( aPlaylistName, KEntryAttSystem | KEntryAttHidden,
+ KEntryAttReadOnly | KEntryAttNormal );
if ( err != KErrNone )
- {
- newfile.Close();
- PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::CreateDummyFile err = %d" ), err );
- }
- else // File created OK
- {
- err = newfile.Flush();
- newfile.Close();
- err = iFramework.Fs().SetAtt( aPlaylistName, KEntryAttSystem | KEntryAttHidden,
- KEntryAttReadOnly | KEntryAttNormal );
- if ( err != KErrNone )
- PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::CreateDummyFile Dummy Playlist file created. err = %d" ), err );
- }
+ PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::CreateDummyFile Dummy Playlist file created. err = %d" ), err );
}
}
// -----------------------------------------------------------------------------
// CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles
-// Remove all dummy file of which format is "pla", and leave the "m3u"
+// Remove all dummy file of which format is "pla" and "alb", and leave the "m3u"
// -----------------------------------------------------------------------------
//
void CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles()
{
PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles" ) );
-
- TInt count = iPlaylistArray->Count();
+
+ TInt count = iAbstractMediaArray->Count();
+ PRINT1( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles, count = %d" ), count );
// Check if playlist file is a dummy file or an imported file
for ( TInt i = 0; i < count; i++ )
{
- if ( MmMtpDpUtility::FormatFromFilename( (*iPlaylistArray)[i] ) !=
- EMTPFormatCodeM3UPlaylist )
+ TPtrC fileName( (*iAbstractMediaArray)[i] );
+ PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles, fileName = %S" ), &fileName );
+
+ TMTPFormatCode format = MmMtpDpUtility::FormatFromFilename( fileName );
+ PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles, format = 0x%x" ), format );
+ if ( format == EMTPFormatCodeAbstractAudioAlbum )
{
- // delete the virtual playlist
- // iFramework has release don't use iFramework.FS()
- TInt err = iRfs.Delete( (*iPlaylistArray)[i] );
-
- PRINT2( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFile filename = %S, err %d" ),
- &( (*iPlaylistArray)[i] ),
- err );
+ // delete the abstract album if its size is zero
+ TEntry entry;
+ TInt err = iFs.Entry( fileName, entry );
+ if ( err == KErrNone && entry.iSize == 0 )
+ {
+ TRAP( err, iMmMtpDpMetadataMpxAccess->DeleteObjectL( fileName, EMPXAbstractAlbum ) );
+ if( err == KErrNone )
+ {
+ err = iFs.Delete( fileName );
+ }
+ }
+ PRINT3( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFile filename = %S, err %d, entry.iSize = %d" ),
+ &fileName, err, entry.iSize );
}
else
{
- // leave the Imported playlist in the file system
- PRINT1( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFile, Don't delete m3u file [%S]" ), &( (*iPlaylistArray)[i] ) );
+ TInt err = iFs.Delete( fileName );
+
+ PRINT2( _L( "MM MTP <> CMmMtpDpMetadataAccessWrapper::RemoveDummyFile filename = %S, err %d" ),
+ &fileName,
+ err );
}
}
PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::RemoveDummyFiles" ) );
@@ -579,8 +688,9 @@
// Update Music collection
// ---------------------------------------------------------------------------
//
-EXPORT_C void CMmMtpDpMetadataAccessWrapper::UpdateMusicCollectionL()
+EXPORT_C void CMmMtpDpMetadataAccessWrapper::UpdateMusicCollectionL( const TDesC& aStorageRoot )
{
+ iMmMtpDpMetadataMpxAccess->SetStorageRootL( aStorageRoot );
iMmMtpDpMetadataMpxAccess->UpdateMusicCollectionL( );
}
--- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatampxaccess.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatampxaccess.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -24,9 +24,7 @@
#include <mtp/tmtptypeuint128.h>
#include <mtp/cmtptypestring.h>
#include <mtp/cmtptypearray.h>
-#include <mtp/cmtpobjectmetadata.h>
#include <mtp/mmtpdataproviderframework.h>
-#include <mtp/mmtpreferencemgr.h>
#include <mtp/mtpprotocolconstants.h>
// from MPX
#include <mpxmedia.h>
@@ -44,26 +42,34 @@
#include "mmmtpdplogger.h"
#include "mmmtpdputility.h"
#include "tmmmtpdppanic.h"
+#include "tobjectdescription.h"
static const TInt KMtpInvalidSongID = 0x1FFFFFFF;
static const TInt KMtpChannelMono = 1;
static const TInt KMtpChannelStereo = 2;
-static const TInt KMtpDateTimeStringLength = 15;
-static const TInt KMtpMaxStringLength = 255;
-static const TInt KMtpMaxDescriptionLength = 0x200;
-_LIT( KMtpDateTimeFormat, "%F%Y%M%DT%H%T%S" );
+
_LIT( KMtpDateTimeConnector, "T" );
_LIT( KEmptyText, "" );
-#ifdef _DEBUG
-_LIT( KMtpMpxPanic, "CMmMtpDpMetadataMpxAccess" );
+#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
+_LIT( KMpxCollectionNewL, "MpxCollectionNewL" );
+_LIT( KMpxCollectionAddL, "MpxCollectionAddL" );
+_LIT( KMpxCollectionGetL, "MpxCollectionGetL" );
+_LIT( KMpxCollectionSetL, "MpxCollectionSetL" );
+_LIT( KMpxCollectionSetReferenceL, "MpxCollectionSetReferenceL" );
+_LIT( KMpxCollectionGetAbstractMedia, "MpxCollectionGetAbstractMedia" );
+_LIT( KMpxCollectionGetReference, "MpxCollectionGetReference" );
+_LIT( KMpxCollectionFindAllLValidate, "MpxCollectionValidate" );
+_LIT( KMpxCollectionFindAllLBeforeAdd, "MpxCollectionFindAllLBeforeAdd" );
+_LIT( KMpxCollectionFindAllLModified, "MpxCollectionFindAllLModified" );
+_LIT( KMpxCollectionCleanupDeletedMediasL, "KMpxCollectionCleanupDeletedMediasL" );
+_LIT( KSetMetadataValue, "SetMetadataValueL" );
#endif
-CMmMtpDpMetadataMpxAccess* CMmMtpDpMetadataMpxAccess::NewL( RFs& aRfs,
- MMTPDataProviderFramework& aFramework )
+CMmMtpDpMetadataMpxAccess* CMmMtpDpMetadataMpxAccess::NewL( RFs& aRfs )
{
- CMmMtpDpMetadataMpxAccess* self = new(ELeave) CMmMtpDpMetadataMpxAccess( aRfs, aFramework );
+ CMmMtpDpMetadataMpxAccess* self = new( ELeave ) CMmMtpDpMetadataMpxAccess( aRfs );
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
@@ -71,12 +77,12 @@
return self;
}
-CMmMtpDpMetadataMpxAccess::CMmMtpDpMetadataMpxAccess( RFs& aRfs,
- MMTPDataProviderFramework& aFramework ):
+CMmMtpDpMetadataMpxAccess::CMmMtpDpMetadataMpxAccess( RFs& aRfs ) :
iRfs( aRfs ),
- iFramework( aFramework )
+ iSampleData( NULL ),
+ iHasCleanUp( EFalse )
{
-
+ // Do nothing
}
// ---------------------------------------------------------------------------
@@ -99,12 +105,14 @@
//
CMmMtpDpMetadataMpxAccess::~CMmMtpDpMetadataMpxAccess()
{
- if ( iCollectionHelper )
+ if ( iCollectionHelper != NULL )
{
iCollectionHelper->Close();
iCollectionHelper = NULL;
}
+ delete iSampleData;
+
// for performance measurement purpose
#if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
delete iPerfLog;
@@ -112,31 +120,55 @@
}
// ---------------------------------------------------------------------------
+// CMmMtpDpMetadataMpxAccess::OpenSession
+// This is introduced to fix CollectionHelper Flush problem
+// ---------------------------------------------------------------------------
+//
+void CMmMtpDpMetadataMpxAccess::OpenSession()
+ {
+ // do nothing
+ }
+
+// ---------------------------------------------------------------------------
+// CMmMtpDpMetadataMpxAccess::CloseSession
+// This is introduced to fix CollectionHelper Flush problem
+// ---------------------------------------------------------------------------
+//
+void CMmMtpDpMetadataMpxAccess::CloseSession()
+ {
+ PRINT( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::CloseSession" ) );
+
+ // flush cache
+ if ( iCollectionHelper != NULL )
+ {
+ PRINT( _L( "MM MTP <> Delete & Close CollectionHelper" ) );
+ iCollectionHelper->Close();
+ iCollectionHelper = NULL;
+ }
+
+ iHasCleanUp = EFalse; // must reset, as class is not always destoryed
+ PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::CloseSession" ) );
+ }
+
+// ---------------------------------------------------------------------------
// CMmMtpDpMetadataMpxAccess::GetObjectMetadataValueL
// Gets a piece of metadata from the collection
// ---------------------------------------------------------------------------
//
void CMmMtpDpMetadataMpxAccess::GetObjectMetadataValueL( const TUint16 aPropCode,
MMTPType& aNewData,
- const CMTPObjectMetaData& aObjectMetaData )
+ const TDesC& aFullFileName,
+ TMPXGeneralCategory aCategory )
{
PRINT1( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::GetObjectMetadataValueL aPropCode = 0x%x" ), aPropCode );
- // File Path
- HBufC* suid = aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ).AllocLC(); // + suid
- TUint format = aObjectMetaData.Uint( CMTPObjectMetaData::EFormatCode );
- TMPXGeneralCategory category = ( format == EMTPFormatCodeAbstractAudioVideoPlaylist ) ||
- ( format == EMTPFormatCodeM3UPlaylist ) ? EMPXPlaylist : EMPXSong;
-
PERFLOGSTART( KMpxCollectionGetL );
- const CMPXMedia& media = CollectionHelperL()->GetL( *suid, category );
+ const CMPXMedia& media = CollectionHelperL()->GetL( aFullFileName, aCategory );
PERFLOGSTOP( KMpxCollectionGetL );
- CleanupStack::PopAndDestroy( suid ); // - suid
-
- TMPXAttributeData attrib( MpxAttribFromPropL( media, aPropCode ) );
+ TMPXAttributeData attrib( MpxAttribFromPropL( aPropCode ) );
TBool isSupported = media.IsSupported( attrib );
- PRINT1(_L( "MM MTP <> CMmMtpDpMetadataMpxAccess::GetObjectMetadataValueL isSupported = %d" ), isSupported);
+ PRINT1(_L( "MM MTP <> CMmMtpDpMetadataMpxAccess::GetObjectMetadataValueL isSupported = %d" ), isSupported );
if ( aPropCode != EMTPObjectPropCodeOriginalReleaseDate
&& aPropCode != EMTPObjectPropCodeDRMStatus
@@ -193,7 +225,7 @@
case EMTPObjectPropCodeDateCreated:
{
TTime time( *media.Value<TInt64> ( attrib ) );
- TBuf<KMtpDateTimeStringLength> timeStr;
+ TBuf<KMtpMaxDateTimeStringLength> timeStr;
time.FormatL( timeStr, KMtpDateTimeFormat );
if ( EMTPTypeString == aNewData.Type() )
@@ -245,7 +277,7 @@
case EMTPObjectPropCodeOriginalReleaseDate:
{
// Compose DateTime string in format YYYYMMDDTHHMMSS
- TBuf<KMtpDateTimeStringLength> dateTime;
+ TBuf<KMtpMaxDateTimeStringLength> dateTime;
dateTime.Zero();
// NOTE: Handled specially, shouldn't leave like other property, following S60
@@ -346,9 +378,9 @@
// as a General Error
if ( iCollectionHelper == NULL )
{
- PERFLOGSTART(KMpxCollectionNewL);
+ PERFLOGSTART( KMpxCollectionNewL );
iCollectionHelper = CMPXCollectionHelperFactory::NewCollectionCachedHelperL();
- PERFLOGSTOP(KMpxCollectionNewL);
+ PERFLOGSTOP( KMpxCollectionNewL );
// Do a search for a song ID that does not exist
// This is to validate the presence of the media database.
@@ -364,7 +396,10 @@
searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, EMPXSong );
searchMedia->SetTObjectValueL<TMPXItemId>( KMPXMediaGeneralId,
KMtpInvalidSongID );
- searchMedia->SetTextValueL( KMPXMediaGeneralDrive, iStoreRoot );
+ if ( iStoreRoot.Length() > 0 )
+ {
+ searchMedia->SetTextValueL( KMPXMediaGeneralDrive, iStoreRoot );
+ }
RArray<TMPXAttribute> songAttributes;
CleanupClosePushL( songAttributes ); // + songAttributes
@@ -418,7 +453,6 @@
searchMedia->SetTObjectValueL( KMPXMediaGeneralType, EMPXGroup );
searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, EMPXSong );
searchMedia->SetTObjectValueL<TBool>( aWMPMediaID, aFlag );
-
searchMedia->SetTextValueL( KMPXMediaGeneralDrive, iStoreRoot );
RArray<TMPXAttribute> songAttributes;
@@ -427,9 +461,10 @@
PRINT( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::FindWMPMediaLC searchMedia setup with no problems" ) );
- CMPXMedia* foundMedia = CollectionHelperL()->FindAllL(
- *searchMedia,
+ PERFLOGSTART(KMpxCollectionFindAllLModified);
+ CMPXMedia* foundMedia = CollectionHelperL()->FindAllL( *searchMedia,
songAttributes.Array() );
+ PERFLOGSTOP(KMpxCollectionFindAllLModified);
PRINT( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::FindWMPMediaLC foundMedia assigned from FindAllL" ) );
CleanupStack::PopAndDestroy( &songAttributes ); // - songAttributes
@@ -543,9 +578,9 @@
KMPXMediaGeneralModified,
EFalse );
// Update the song's metadata with the media object
- PERFLOGSTART(KMpxCollectionSetL);
+ PERFLOGSTART( KMpxCollectionSetL );
CollectionHelperL()->SetL( media );
- PERFLOGSTOP(KMpxCollectionSetL);
+ PERFLOGSTOP( KMpxCollectionSetL );
CleanupStack::PopAndDestroy( media ); // - media
}
@@ -560,7 +595,14 @@
// as there is NOT a separate database for deleted files.
PRINT( _L( "MM MTP <> Deleting metadata for deleted files" ) );
- CollectionHelperL()->CleanupDeletedMediasL();
+ if ( !iHasCleanUp )
+ {
+ PERFLOGSTART( KMpxCollectionCleanupDeletedMediasL );
+ CollectionHelperL()->CleanupDeletedMediasL();
+ PERFLOGSTOP( KMpxCollectionCleanupDeletedMediasL );
+
+ iHasCleanUp = ETrue;
+ }
PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::UpdateMusicCollectionL" ) );
}
@@ -593,27 +635,14 @@
//
void CMmMtpDpMetadataMpxAccess::RenameObjectL( const TDesC& aOldFileName,
const TDesC& aNewFileName,
- TUint aFormatCode )
+ TMPXGeneralCategory aCategory )
{
PRINT2( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::RenameObjectL aOldFileName = %S, aNewFileName = %S" ),
- &aOldFileName, &aNewFileName );
+ &aOldFileName,
+ &aNewFileName );
TInt err = KErrNone;
-
- if ( ( aFormatCode == EMTPFormatCodeAbstractAudioVideoPlaylist )
- || ( aFormatCode == EMTPFormatCodeM3UPlaylist ) )
- {
- PRINT( _L( "MM MTP <> Playlist" ) );
- TRAP( err, CollectionHelperL()->RenameL(
- aOldFileName,
- aNewFileName,
- EMPXPlaylist ) );
- }
- else // Not a playlist
- {
- PRINT( _L( "MM MTP <> Non-Playlist" ) );
- TRAP( err, CollectionHelperL()->RenameL( aOldFileName, aNewFileName, EMPXSong ) );
- }
+ TRAP( err, CollectionHelperL()->RenameL( aOldFileName, aNewFileName, aCategory ) );
if ( KErrNotFound == err )
{
@@ -632,119 +661,47 @@
// -----------------------------------------------------------------------------
void CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL( const TUint16 aPropCode,
const MMTPType& aNewData,
- const TDesC& aSuid )
+ const TDesC& aFullFileName,
+ TMPXGeneralCategory aCategory )
{
- PRINT2( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL aPropCode = 0x%x aSuid = %S" ),
- aPropCode,
- &aSuid );
- CMPXMedia* media = NULL;
+ PRINT1( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL aPropCode = 0x%x" ), aPropCode );
- // Creat media properties for the song
RArray<TInt> contentIDs;
CleanupClosePushL( contentIDs ); // + contentIDs
+
contentIDs.AppendL( KMPXMediaIdGeneral );
- contentIDs.AppendL( KMPXMediaIdAudio );
- contentIDs.AppendL( KMPXMediaIdMusic );
- contentIDs.AppendL( KMPXMediaIdMTP );
- media = CMPXMedia::NewL( contentIDs.Array() );
- CleanupStack::PopAndDestroy( &contentIDs ); // - contentIDs
+ if ( aCategory == EMPXSong )
+ {
+ contentIDs.AppendL( KMPXMediaIdAudio );
+ contentIDs.AppendL( KMPXMediaIdMusic );
+ contentIDs.AppendL( KMPXMediaIdMTP );
+ }
+
+ CMPXMedia* media = CMPXMedia::NewL( contentIDs.Array() );
CleanupStack::PushL( media ); // + media
- media->SetTObjectValueL<TMPXGeneralCategory>(
- KMPXMediaGeneralCategory,
- EMPXSong );
+ media->SetTObjectValueL<TMPXGeneralCategory>( KMPXMediaGeneralCategory, aCategory );
// MPXMedia default types
media->SetTObjectValueL<TMPXGeneralType>( KMPXMediaGeneralType, EMPXItem );
- // Get file path
- TParsePtrC parse( aSuid );
- media->SetTextValueL( KMPXMediaGeneralUri, aSuid );
+ TParsePtrC parse( aFullFileName );
+ media->SetTextValueL( KMPXMediaGeneralUri, aFullFileName );
media->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() );
-
- TRAPD( err, SetMetadataValueL( aPropCode, aNewData, *media ) );
-
- if ( err == KErrNone )
- {
- SetStorageRootL( parse.Drive() );
-
- // Update the song's metadata with the media object
- PERFLOGSTART( KMpxCollectionSetL );
- CollectionHelperL()->SetL( media );
- PERFLOGSTOP( KMpxCollectionSetL );
- }
- else
- {
- PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL ERROR = %d" ), err );
-
- User::Leave( err );
- }
-
- CleanupStack::PopAndDestroy( media ); // - media
- PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL" ) );
- }
-
-// -----------------------------------------------------------------------------
-// CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL
-// Updated object metadata in MPX database
-// -----------------------------------------------------------------------------
-void CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL( const TUint16 aPropCode,
- const MMTPType& aNewData,
- const CMTPObjectMetaData& aObjectMetaData )
- {
- PRINT1( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL aPropCode = 0x%x" ), aPropCode );
- CMPXMedia* media = NULL;
-
- RArray<TInt> contentIDs;
- CleanupClosePushL( contentIDs ); // + contentIDs
+ media->SetTObjectValueL( KMPXMediaGeneralModified, EFalse );
- TUint format = aObjectMetaData.Uint( CMTPObjectMetaData::EFormatCode );
- if ( ( format == EMTPFormatCodeAbstractAudioVideoPlaylist )
- || ( format == EMTPFormatCodeM3UPlaylist ) )
- {
- PRINT( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetObjectMetadataValueL format is playlist" ) );
- contentIDs.AppendL( KMPXMediaIdGeneral );
-
- media = CMPXMedia::NewL( contentIDs.Array() );
- CleanupStack::PushL( media ); // + media
-
- media->SetTObjectValueL<TMPXGeneralCategory>(
- KMPXMediaGeneralCategory,
- EMPXPlaylist );
- }
- else
- {
- // Creat media properties for the song
- contentIDs.AppendL( KMPXMediaIdGeneral );
- contentIDs.AppendL( KMPXMediaIdAudio );
- contentIDs.AppendL( KMPXMediaIdMusic );
- contentIDs.AppendL( KMPXMediaIdMTP );
-
- media = CMPXMedia::NewL( contentIDs.Array() );
- CleanupStack::PushL( media ); // + media
-
- media->SetTObjectValueL<TMPXGeneralCategory>(
- KMPXMediaGeneralCategory,
- EMPXSong );
- }
-
- // MPXMedia default types
- media->SetTObjectValueL<TMPXGeneralType>( KMPXMediaGeneralType, EMPXItem );
-
- // Get file path
- HBufC* suid = aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ).AllocLC(); // + suid
- TParsePtrC parse( *suid );
- media->SetTextValueL( KMPXMediaGeneralUri, *suid );
- media->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() );
- CleanupStack::PopAndDestroy( suid ); // - suid
-
+ PERFLOGSTART( KSetMetadataValue );
SetMetadataValueL( aPropCode, aNewData, *media );
+ PERFLOGSTOP( KSetMetadataValue );
// Update the song's metadata with the media object
- PERFLOGSTART(KMpxCollectionSetL);
+ PERFLOGSTART( KMpxCollectionSetL );
CollectionHelperL()->SetL( media );
- PERFLOGSTOP(KMpxCollectionSetL);
+ PERFLOGSTOP( KMpxCollectionSetL );
+
+ delete iSampleData;
+ iSampleData = NULL;
CleanupStack::PopAndDestroy( 2, &contentIDs ); // - media, contentIDs
@@ -760,12 +717,11 @@
CMPXMedia& aMediaProp )
{
PRINT1( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetMetadataValueL aPropCode = 0x%x" ), aPropCode );
- CMTPTypeString* textData = CMTPTypeString::NewLC(); // + textData
CMTPTypeArray* desData = NULL;
TMTPTypeUint16 uint16Data;
TMTPTypeUint32 uint32Data;
- TMPXAttributeData attrib( MpxAttribFromPropL( aMediaProp, aPropCode ) );
+ TMPXAttributeData attrib( MpxAttribFromPropL( aPropCode ) );
switch ( aPropCode )
{
@@ -776,14 +732,12 @@
case EMTPObjectPropCodeComposer:
case EMTPObjectPropCodeAlbumArtist:
{
- PRINT1( _L( "MM MTP <> SetMetadataValueL Before Copy, string length = %d" ), aNewData.Size() );
- MMTPType::CopyL( aNewData, *textData );
- PRINT1( _L( "MM MTP <> SetMetadataValueL string length = %d" ), textData->StringChars().Length() );
- aMediaProp.SetTextValueL( attrib, textData->StringChars() );
- HBufC* log = textData->StringChars().AllocL();
- PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL string = %S" ), log );
- delete log;
- log = NULL;
+ const CMTPTypeString& textData = static_cast<const CMTPTypeString&>( aNewData );
+ HBufC* string = textData.StringChars().AllocLC(); // + string
+ PRINT2( _L( "MM MTP <> SetMetadataValueL des.ptr() = 0x%x, string length = %d" ),string->Des().Ptr(), string->Des().Length() );
+ PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL string = %S" ), string );
+ aMediaProp.SetTextValueL( attrib, string->Des() );
+ CleanupStack::PopAndDestroy( string ); // - string
}
break;
@@ -827,13 +781,13 @@
case EMTPObjectPropCodeOriginalReleaseDate:
{
- MMTPType::CopyL( aNewData, *textData );
+ const CMTPTypeString& textData = static_cast<const CMTPTypeString&>( aNewData );
TBuf<KMtpMaxStringLength> data;
- data.Copy( textData->StringChars().Left( KMtpDateTimeStringLength ) );
+ data.Copy( textData.StringChars().Left( KMtpMaxDateTimeStringLength ) );
PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL 0xDC99 date = %S" ),
&data );
- if ( data.Length() < KMtpDateTimeStringLength )
+ if ( data.Length() < KMtpMaxDateTimeStringLength )
{
PRINT( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL 0xDC99 date string is too short" ) );
break;
@@ -906,27 +860,25 @@
case EMTPObjectPropCodeDescription:
{
#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 <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL length = %d" ),
length );
- if ( length != 0 )
- {
- TBuf<KMtpMaxDescriptionLength> text;
- text.Zero();
- for ( TUint i = 0; i < length; i++ )
- text.Append( desData->ElementUint( i ) );
- PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL text = %S" ),
- &text );
- aMediaProp.SetTextValueL( KMPXMediaGeneralComment, text );
- }
- else
- {
- aMediaProp.SetTextValueL( KMPXMediaGeneralComment, KEmptyText );
- }
+
+ length = ( length < KMTPMaxDescriptionLen ) ? length : KMTPMaxDescriptionLen;
+ HBufC* text = HBufC::NewLC( length ); // + text
+ TPtr ptr = text->Des();
+
+ for ( TUint i = 0; i < length; i++ )
+ ptr.Append( desData->ElementUint( i ) );
+ PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL text = %S" ),
+ text );
+ aMediaProp.SetTextValueL( KMPXMediaGeneralComment, text->Des() );
+ CleanupStack::PopAndDestroy( text ); // - text
+
CleanupStack::PopAndDestroy( desData ); // - desData
#endif //__MUSIC_ID_SUPPORT
}
@@ -940,6 +892,30 @@
}
break;
+ case EMTPObjectPropCodeRepresentativeSampleData:
+ {
+ const CMTPTypeArray& mtpTypeArray = static_cast<const CMTPTypeArray&>( aNewData );
+ TUint32 numElements = mtpTypeArray.NumElements();
+ const TDesC& suid = aMediaProp.ValueText( KMPXMediaGeneralUri );
+ PRINT2( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL SampleData numElements = %d, suid = %S" ), numElements, &suid );
+
+ delete iSampleData;
+ iSampleData = NULL;
+
+ iSampleData = HBufC8::NewL( numElements * sizeof( TUint8 ) );
+ TPtr8 samplePtr = iSampleData->Des();
+ mtpTypeArray.ToDes( samplePtr );
+ RFile sampleFile;
+ CleanupClosePushL( sampleFile );
+ User::LeaveIfError( sampleFile.Replace( iRfs, suid, EFileWrite ) );
+ User::LeaveIfError( sampleFile.Write( samplePtr ) );
+ aMediaProp.SetTObjectValueL<TInt>( KMPXMediaMTPSampleData, (TInt)iSampleData );
+ aMediaProp.SetTObjectValueL<TBool>( attrib, ETrue );
+ CleanupStack::PopAndDestroy( &sampleFile );
+ PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL SampleData is ready = %u" ), 1 );
+ }
+ break;
+
default:
{
User::Leave( KErrNotSupported );
@@ -947,7 +923,6 @@
break;
}
- CleanupStack::PopAndDestroy( textData ); // - textData
PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::SetMetadataValueL" ) );
}
@@ -970,10 +945,11 @@
CleanupStack::PushL( searchMedia ); // + searchMedia
searchMedia->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem );
+ searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, EMPXSong );
+ searchMedia->SetTextValueL( KMPXMediaGeneralUri, aFullFileName );
- searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, EMPXSong );
-
- searchMedia->SetTextValueL( KMPXMediaGeneralUri, aFullFileName );
+ TParsePtrC parse( aFullFileName );
+ searchMedia->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() );
RArray<TMPXAttribute> songAttributes;
CleanupClosePushL( songAttributes ); // + songAttributes
@@ -981,11 +957,10 @@
PRINT( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::AddSongL searchMedia setup with no problems" ) );
- PERFLOGSTART(KMpxCollectionFindAllLBeforeAdd);
- CMPXMedia* foundMedia = CollectionHelperL()->FindAllL(
- *searchMedia,
+ PERFLOGSTART( KMpxCollectionFindAllLBeforeAdd );
+ CMPXMedia* foundMedia = CollectionHelperL()->FindAllL( *searchMedia,
songAttributes.Array() );
- PERFLOGSTOP(KMpxCollectionFindAllLBeforeAdd);
+ PERFLOGSTOP( KMpxCollectionFindAllLBeforeAdd );
CleanupStack::PopAndDestroy( &songAttributes ); // - songAttributes
CleanupStack::PopAndDestroy( searchMedia ); // - searchMedia
@@ -1022,15 +997,12 @@
CleanupStack::PushL( media ); // + media
// MPXMedia default types
- media->SetTObjectValueL<TMPXGeneralType>(
- KMPXMediaGeneralType,
+ media->SetTObjectValueL<TMPXGeneralType>( KMPXMediaGeneralType,
EMPXItem );
- media->SetTObjectValueL<TMPXGeneralCategory>(
- KMPXMediaGeneralCategory,
+ media->SetTObjectValueL<TMPXGeneralCategory>( KMPXMediaGeneralCategory,
EMPXSong );
// File Path
//
- TParsePtrC parse( aFullFileName );
media->SetTextValueL( KMPXMediaGeneralUri, aFullFileName );
media->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() );
@@ -1050,17 +1022,17 @@
if ( foundItemCount == 0 )
{
- PERFLOGSTART(KMpxCollectionAddL);
+ PERFLOGSTART( KMpxCollectionAddL );
CollectionHelperL()->AddL( media );
- PERFLOGSTOP(KMpxCollectionAddL);
+ PERFLOGSTOP( KMpxCollectionAddL );
PRINT( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::AddSongL Media added into collection" ) );
}
else
{
- PERFLOGSTART(KMpxCollectionSetL);
+ PERFLOGSTART( KMpxCollectionSetL );
CollectionHelperL()->SetL( media );
- PERFLOGSTOP(KMpxCollectionSetL);
+ PERFLOGSTOP( KMpxCollectionSetL );
PRINT( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::AddSongL Media metadata updated in collection" ) );
}
@@ -1074,15 +1046,15 @@
}
// -----------------------------------------------------------------------------
-// CMmMtpDpMetadataMpxAccess::AddPlaylistL
-// Adds Playlist to Mpx DB
+// CMmMtpDpMetadataMpxAccess::AddAbstractMediaL
+// Adds abstract media to Mpx DB
// -----------------------------------------------------------------------------
//
-void CMmMtpDpMetadataMpxAccess::AddPlaylistL( const TDesC& aFullFileName )
+void CMmMtpDpMetadataMpxAccess::AddAbstractMediaL( const TDesC& aFullFileName, TMPXGeneralCategory aCategory )
{
- PRINT1( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::AddPlaylistL aFullFileName = %S" ), &aFullFileName );
+ PRINT1( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::AddAbstractMediaL aFullFileName = %S" ), &aFullFileName );
- // Does a record already exist for this playlist?
+ // Does a record already exist for this AbstractMedia?
RArray<TInt> contentIDs;
CleanupClosePushL( contentIDs ); // + contentIDs
contentIDs.AppendL( KMPXMediaIdGeneral );
@@ -1092,21 +1064,21 @@
CleanupStack::PushL( searchMedia ); // + searchMedia
searchMedia->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem );
- searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, EMPXPlaylist );
+ searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, aCategory );
searchMedia->SetTextValueL( KMPXMediaGeneralUri, aFullFileName );
- RArray<TMPXAttribute> playlistAttributes;
- CleanupClosePushL( playlistAttributes ); // + playlistAttributes
- playlistAttributes.AppendL( KMPXMediaGeneralId );
- playlistAttributes.AppendL( KMPXMediaGeneralTitle );
- playlistAttributes.AppendL( KMPXMediaGeneralUri );
+ RArray<TMPXAttribute> abstractMediaAttributes;
+ CleanupClosePushL( abstractMediaAttributes ); // + abstractMediaAttributes
+ abstractMediaAttributes.AppendL( KMPXMediaGeneralId );
+ abstractMediaAttributes.AppendL( KMPXMediaGeneralTitle );
+ abstractMediaAttributes.AppendL( KMPXMediaGeneralUri );
- PERFLOGSTART(KMpxCollectionFindAllLBeforeAdd);
+ PERFLOGSTART( KMpxCollectionFindAllLBeforeAdd );
CMPXMedia* foundMedia = CollectionHelperL()->FindAllL( *searchMedia,
- playlistAttributes.Array() );
- PERFLOGSTOP(KMpxCollectionFindAllLBeforeAdd);
+ abstractMediaAttributes.Array() );
+ PERFLOGSTOP( KMpxCollectionFindAllLBeforeAdd );
- CleanupStack::PopAndDestroy( &playlistAttributes ); // - playlistAttributes
+ CleanupStack::PopAndDestroy( &abstractMediaAttributes ); // - abstractMediaAttributes
CleanupStack::PopAndDestroy( searchMedia ); // - searchMedia
CleanupStack::PushL( foundMedia ); // + foundMedia
@@ -1117,12 +1089,12 @@
if ( foundItemCount != 0 )
{
- PRINT( _L( "MM MTP <> Playlist Media already exists in the collection" ) );
+ PRINT( _L( "MM MTP <> Abstract Media already exists in the collection" ) );
}
else
{
- // Creat media properties for the playlist
- PRINT( _L( "MM MTP <> Create playlist media properties" ) );
+ // Creat media properties for the abstractMedia
+ PRINT( _L( "MM MTP <> Create abstract media properties" ) );
RArray<TInt> contentIDs;
CleanupClosePushL( contentIDs ); // + contentIDs
contentIDs.AppendL( KMPXMediaIdGeneral );
@@ -1131,62 +1103,60 @@
CleanupStack::PopAndDestroy( &contentIDs ); // - contentIDs
CleanupStack::PushL( media ); // + media
- CMPXMediaArray* playlistArray = CMPXMediaArray::NewL();
- CleanupStack::PushL( playlistArray ); // + playlistArray;
+ CMPXMediaArray* abstractMediaArray = CMPXMediaArray::NewL();
+ CleanupStack::PushL( abstractMediaArray ); // + abstractMediaArray;
// MPXMedia default types
media->SetTObjectValueL<TMPXGeneralType>( KMPXMediaGeneralType,
EMPXItem );
media->SetTObjectValueL<TMPXGeneralCategory>( KMPXMediaGeneralCategory,
- EMPXPlaylist );
+ aCategory );
// File Path
//
media->SetTextValueL( KMPXMediaGeneralUri, aFullFileName );
TParsePtrC parse( aFullFileName );
-
media->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() );
media->SetTextValueL( KMPXMediaGeneralTitle, parse.Name() );
media->SetTObjectValueL<TBool>( KMPXMediaGeneralSynchronized, ETrue );
- media->SetCObjectValueL( KMPXMediaArrayContents, playlistArray );
- media->SetTObjectValueL( KMPXMediaArrayCount, playlistArray->Count() );
+ media->SetCObjectValueL( KMPXMediaArrayContents, abstractMediaArray );
+ media->SetTObjectValueL( KMPXMediaArrayCount, abstractMediaArray->Count() );
+ if ( aCategory == EMPXAbstractAlbum )
+ {
+ media->SetTObjectValueL( KMPXMediaMTPSampleDataFlag, EFalse );
+ }
- PERFLOGSTART(KMpxCollectionAddL);
+ PERFLOGSTART( KMpxCollectionAddL );
CollectionHelperL()->AddL( media );
- PERFLOGSTOP(KMpxCollectionAddL);
+ PERFLOGSTOP( KMpxCollectionAddL );
// Clear the array
- CleanupStack::PopAndDestroy( playlistArray ); // - playlistArray
+ CleanupStack::PopAndDestroy( abstractMediaArray ); // - abstractMediaArray
CleanupStack::PopAndDestroy( media ); // - media
}
CleanupStack::PopAndDestroy( foundMedia ); // - foundMedia
- PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::AddPlaylistL" ) );
+ PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::AddAbstractMediaL" ) );
}
// -----------------------------------------------------------------------------
-// CMmMtpDpMetadataMpxAccess::SetPlaylistL
-// Set playlist to DB
+// CMmMtpDpMetadataMpxAccess::SetReferenceL
+// Set abstract media to DB
// -----------------------------------------------------------------------------
//
-void CMmMtpDpMetadataMpxAccess::SetPlaylistL( const TDesC& aPlaylistFileName,
- CDesCArray& aRefFileArray )
+void CMmMtpDpMetadataMpxAccess::SetReferenceL( const TDesC& aRefOwnerName,
+ CDesCArray& aRefFileArray,
+ TMPXGeneralCategory aCategory )
{
- PRINT( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetPlaylistL" ) );
- CMPXMediaArray* playlistArray = CMPXMediaArray::NewL();
- CleanupStack::PushL( playlistArray ); // + playlistArray
+ PRINT( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetReferenceL" ) );
+ CMPXMediaArray* abstractMediaArray = CMPXMediaArray::NewL();
+ CleanupStack::PushL( abstractMediaArray ); // + abstractMediaArray
TUint count = aRefFileArray.Count();
for ( TUint j = 0; j < count; j++ )
{
- // if the file is video, skip it and continue
- if ( MmMtpDpUtility::IsVideoL( aRefFileArray[j], iFramework ) )
- {
- continue;
- }
-
// Creat media properties for the song
RArray<TInt> contentIDs;
CleanupClosePushL( contentIDs ); // + contentIDs
@@ -1204,14 +1174,15 @@
EMPXItem );
media->SetTObjectValueL<TMPXGeneralCategory>( KMPXMediaGeneralCategory,
EMPXSong );
- // File Path
- //
+
+ media->SetTextValueL( KMPXMediaGeneralUri, aRefFileArray[j] );
+ // TODO: need to confirm that should set drive letter or storage root path.
TParsePtrC parse( aRefFileArray[j] );
- media->SetTextValueL( KMPXMediaGeneralUri, aRefFileArray[j] );
media->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() );
+ media->SetTObjectValueL( KMPXMediaGeneralModified, EFalse );
// Add media into array contents
- playlistArray->AppendL( media );
+ abstractMediaArray->AppendL( media );
CleanupStack::Pop( media ); // - media
}
@@ -1220,35 +1191,30 @@
CleanupClosePushL( contentIDs ); // + contentIDs
contentIDs.AppendL( KMPXMediaIdGeneral );
- CMPXMedia* playlistMedia = CMPXMedia::NewL( contentIDs.Array() );
+ CMPXMedia* abstractMedia = CMPXMedia::NewL( contentIDs.Array() );
CleanupStack::PopAndDestroy( &contentIDs ); // - contentIDs
- CleanupStack::PushL( playlistMedia ); // + playlistMedia
-
- playlistMedia->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem );
+ CleanupStack::PushL( abstractMedia ); // + abstractMedia
- playlistMedia->SetTObjectValueL( KMPXMediaGeneralCategory, EMPXPlaylist );
-
- playlistMedia->SetTextValueL( KMPXMediaGeneralUri, aPlaylistFileName );
-
- TParsePtrC parse( aPlaylistFileName );
- playlistMedia->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() );
- playlistMedia->SetTObjectValueL<TBool>( KMPXMediaGeneralSynchronized,
+ abstractMedia->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem );
+ abstractMedia->SetTObjectValueL( KMPXMediaGeneralCategory, aCategory );
+ abstractMedia->SetTextValueL( KMPXMediaGeneralUri, aRefOwnerName );
+ TParsePtrC parse( aRefOwnerName );
+ abstractMedia->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() );
+ abstractMedia->SetTObjectValueL<TBool>( KMPXMediaGeneralSynchronized,
ETrue );
- playlistMedia->SetCObjectValueL( KMPXMediaArrayContents, playlistArray );
- playlistMedia->SetTObjectValueL( KMPXMediaArrayCount,
- playlistArray->Count() );
+ abstractMedia->SetCObjectValueL( KMPXMediaArrayContents, abstractMediaArray );
+ abstractMedia->SetTObjectValueL( KMPXMediaArrayCount,
+ abstractMediaArray->Count() );
- // Update the duplicate playlist(s) with the new playlist array
- PERFLOGSTART(KMpxCollectionSetL);
- CollectionHelperL()->SetL( playlistMedia );
- PERFLOGSTOP(KMpxCollectionSetL);
+ // Update the duplicate abstractMedia(s) with the new abstractMedia array
+ PERFLOGSTART( KMpxCollectionSetReferenceL );
+ CollectionHelperL()->SetL( abstractMedia );
+ PERFLOGSTOP( KMpxCollectionSetReferenceL );
- CleanupStack::PopAndDestroy( playlistMedia ); // - playlistMedia
+ CleanupStack::PopAndDestroy( abstractMedia ); // - abstractMedia
+ CleanupStack::PopAndDestroy( abstractMediaArray ); // - abstractMediaArray
- // Clear the array
- CleanupStack::PopAndDestroy( playlistArray ); // - playlistArray
-
- PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::SetPlaylistL" ) );
+ PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::SetReferenceL" ) );
}
// ---------------------------------------------------------------------------
@@ -1261,8 +1227,7 @@
PRINT1( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::SetStorageRoot aStoreRoot = %S" ), &aStorageRoot );
// get the drive number
- TParse pathParser;
- User::LeaveIfError( pathParser.Set( aStorageRoot, NULL, NULL ) );
+ TParsePtrC pathParser( aStorageRoot );
TChar driveChar( pathParser.Drive()[0] );
TInt driveNumber;
@@ -1299,36 +1264,55 @@
aMediaProp.SetTextValueL( KMPXMediaMusicGenre, KNullDesC );
// Composer
aMediaProp.SetTextValueL( KMPXMediaMusicComposer, KNullDesC );
- // Album artFilename
- aMediaProp.SetTextValueL( KMPXMediaMusicAlbumArtFileName, KNullDesC );
+ // Album Artist
+ aMediaProp.SetTextValueL( KMPXMediaMusicAlbumArtist, KNullDesC );
// URL
aMediaProp.SetTextValueL( KMPXMediaMusicURL, KNullDesC );
+
+ // add below for P4S failed case, that get metadata from cached CMPXMedia object
+ // DateAdded
+ TTime time;
+ time.HomeTime();
+ aMediaProp.SetTObjectValueL( KMPXMediaGeneralDate, time.Int64() );
+ // SampleRate
+ aMediaProp.SetTObjectValueL<TUint32>( KMPXMediaAudioSamplerate, 0 );
+ // AudioBitrate
+ aMediaProp.SetTObjectValueL<TUint32>( KMPXMediaAudioBitrate, 0 );
+ // Duration
+ aMediaProp.SetTObjectValueL<TInt>( KMPXMediaGeneralDuration, 0 );
+ // DrmStatus
+ aMediaProp.SetTObjectValueL<TUint16>( KMPXMediaMTPDrmStatus, 0 );
+ // NumberOfChannels
+ aMediaProp.SetTObjectValueL<TUint32>( KMPXMediaAudioNumberOfChannels, 0 );
+ // AudioCodec
+ aMediaProp.SetTObjectValueL<TUint32>( KMPXMediaAudioAudioCodec, 0 );
+
PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::SetDefaultL" ) );
}
-TMPXAttributeData CMmMtpDpMetadataMpxAccess::MpxAttribFromPropL( const CMPXMedia& aMedia,
- const TUint16 aPropCode )
+TMPXAttributeData CMmMtpDpMetadataMpxAccess::MpxAttribFromPropL( const TUint16 aPropCode )
{
const TMetadataTable KMetadataTable[] =
- {
- { EMTPObjectPropCodeName, KMPXMediaGeneralTitle },
- { EMTPObjectPropCodeArtist, KMPXMediaMusicArtist },
- { EMTPObjectPropCodeAlbumName, KMPXMediaMusicAlbum },
- { EMTPObjectPropCodeDateModified, KMPXMediaGeneralDate },
- { EMTPObjectPropCodeDateAdded, KMPXMediaGeneralDate },
- { EMTPObjectPropCodeDuration, KMPXMediaGeneralDuration },
- { EMTPObjectPropCodeTrack, KMPXMediaMusicAlbumTrack },
- { EMTPObjectPropCodeComposer, KMPXMediaMusicComposer },
- { EMTPObjectPropCodeOriginalReleaseDate, KMPXMediaMusicYear },
- { EMTPObjectPropCodeGenre, KMPXMediaMusicGenre },
- { EMTPObjectPropCodeDRMStatus, KMPXMediaMTPDrmStatus },
- { EMTPObjectPropCodeDescription, KMPXMediaGeneralComment },
- { EMTPObjectPropCodeNumberOfChannels, KMPXMediaAudioNumberOfChannels },
- { EMTPObjectPropCodeAudioBitRate, KMPXMediaAudioBitrate },
- { EMTPObjectPropCodeSampleRate, KMPXMediaAudioSamplerate },
- { EMTPObjectPropCodeAudioWAVECodec, KMPXMediaAudioAudioCodec },
- { EMTPObjectPropCodeAlbumArtist, KMPXMediaMusicArtist }
- };
+ {
+ { EMTPObjectPropCodeName, KMPXMediaGeneralTitle },
+ { EMTPObjectPropCodeArtist, KMPXMediaMusicArtist },
+ { EMTPObjectPropCodeAlbumName, KMPXMediaMusicAlbum },
+ { EMTPObjectPropCodeDateModified, KMPXMediaGeneralDate },
+ { EMTPObjectPropCodeDateAdded, KMPXMediaGeneralDate },
+ { EMTPObjectPropCodeDuration, KMPXMediaGeneralDuration },
+ { EMTPObjectPropCodeTrack, KMPXMediaMusicAlbumTrack },
+ { EMTPObjectPropCodeComposer, KMPXMediaMusicComposer },
+ { EMTPObjectPropCodeOriginalReleaseDate, KMPXMediaMusicYear },
+ { EMTPObjectPropCodeGenre, KMPXMediaMusicGenre },
+ { EMTPObjectPropCodeDRMStatus, KMPXMediaMTPDrmStatus },
+ { EMTPObjectPropCodeDescription, KMPXMediaGeneralComment },
+ { EMTPObjectPropCodeNumberOfChannels, KMPXMediaAudioNumberOfChannels },
+ { EMTPObjectPropCodeAudioBitRate, KMPXMediaAudioBitrate },
+ { EMTPObjectPropCodeSampleRate, KMPXMediaAudioSamplerate },
+ { EMTPObjectPropCodeAudioWAVECodec, KMPXMediaAudioAudioCodec },
+ { EMTPObjectPropCodeAlbumArtist, KMPXMediaMusicAlbumArtist },
+ { EMTPObjectPropCodeRepresentativeSampleData,KMPXMediaMTPSampleDataFlag }
+ };
TInt i = 0;
TInt count = sizeof( KMetadataTable ) / sizeof( KMetadataTable[0] );
@@ -1349,14 +1333,15 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataMpxAccess::GetAllPlaylistL
-// Get all playlists from MPX database in the assigned store
+// CMmMtpDpMetadataMpxAccess::GetAllAbstractMediaL
+// Get all abstract medias from MPX database in the assigned store
// ---------------------------------------------------------------------------
//
-void CMmMtpDpMetadataMpxAccess::GetAllPlaylistL( const TDesC& aStoreRoot,
- CMPXMediaArray** aPlaylists )
+void CMmMtpDpMetadataMpxAccess::GetAllAbstractMediaL( const TDesC& aStoreRoot,
+ CDesCArray& aAbstractMedias,
+ TMPXGeneralCategory aCategory )
{
- PRINT( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::GetAllPlaylistL" ) );
+ PRINT( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::GetAllAbstractMediaL" ) );
SetStorageRootL( aStoreRoot );
@@ -1369,21 +1354,22 @@
CleanupStack::PushL( searchMedia ); // + searchMedia
searchMedia->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem );
- searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, EMPXPlaylist );
+ searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, aCategory );
searchMedia->SetTextValueL( KMPXMediaGeneralDrive, iStoreRoot );
- RArray<TMPXAttribute> playlistAttributes;
- CleanupClosePushL( playlistAttributes ); // + playlistAttributes
- playlistAttributes.AppendL( KMPXMediaGeneralId );
- playlistAttributes.AppendL( KMPXMediaGeneralTitle );
- playlistAttributes.AppendL( KMPXMediaGeneralUri );
+ RArray<TMPXAttribute> abstractMediaAttributes;
+ CleanupClosePushL( abstractMediaAttributes ); // + abstractMediaAttributes
+ abstractMediaAttributes.AppendL( KMPXMediaGeneralId );
+ abstractMediaAttributes.AppendL( KMPXMediaGeneralTitle );
+
+ abstractMediaAttributes.AppendL( KMPXMediaGeneralUri );
- PERFLOGSTART(KMpxCollectionGetPlaylist);
+ PERFLOGSTART( KMpxCollectionGetAbstractMedia );
CMPXMedia* foundMedia = CollectionHelperL()->FindAllL( *searchMedia,
- playlistAttributes.Array() );
- PERFLOGSTOP(KMpxCollectionGetPlaylist);
+ abstractMediaAttributes.Array() );
+ PERFLOGSTOP( KMpxCollectionGetAbstractMedia );
- CleanupStack::PopAndDestroy( &playlistAttributes ); // - playlistAttributes
+ CleanupStack::PopAndDestroy( &abstractMediaAttributes ); // - abstractMediaAttributes
CleanupStack::PopAndDestroy( searchMedia ); // - searchMedia
CleanupStack::PushL( foundMedia ); // + foundMedia
@@ -1392,9 +1378,9 @@
User::Leave( KErrNotSupported );
}
- TInt count = *foundMedia->Value<TInt> ( KMPXMediaArrayCount );
+ TInt count = *foundMedia->Value<TInt>( KMPXMediaArrayCount );
- PRINT1( _L("MM MTP <> CMmMtpDpMetadataMpxAccess::GetAllPlaylistL [%d] playlists found in Playlist Database"), count );
+ PRINT1( _L("MM MTP <> CMmMtpDpMetadataMpxAccess::GetAllAbstractMediaL [%d] abstractMedias found in Database"), count );
if ( count > 0 )
{
@@ -1403,13 +1389,14 @@
User::Leave( KErrNotSupported );
}
- *aPlaylists = CMPXMediaArray::NewL( *( foundMedia->Value<CMPXMediaArray> (
- KMPXMediaArrayContents ) ) );
+ CMPXMediaArray* mediaArray = foundMedia->Value<CMPXMediaArray> ( KMPXMediaArrayContents );
+ for ( TInt i = 0; i < count; i++ )
+ aAbstractMedias.AppendL( ( *mediaArray )[i]->ValueText( KMPXMediaGeneralUri ) );
}
CleanupStack::PopAndDestroy( foundMedia ); // - foundMedia
- PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::GetAllPlaylistL" ) );
+ PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::GetAllAbstractMediaL" ) );
}
// ---------------------------------------------------------------------------
@@ -1417,15 +1404,36 @@
// Get all references of specified playlist
// ---------------------------------------------------------------------------
//
-void CMmMtpDpMetadataMpxAccess::GetAllReferenceL( CMPXMedia* aPlaylist,
- CDesCArray& aReferences )
+void CMmMtpDpMetadataMpxAccess::GetAllReferenceL( const TDesC& aRefOwnerSuid,
+ TMPXGeneralCategory aCategory,
+ CDesCArray& aReferences )
{
PRINT( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::GetAllReferenceL" ) );
- __ASSERT_DEBUG( aPlaylist, User::Panic( KMtpMpxPanic, KErrArgument ) );
+ // 1. Get CMPXMedia object by the reference owner suid
+ RArray<TMPXAttribute> attributes;
+ CleanupClosePushL( attributes ); // + attributes
+ attributes.AppendL( KMPXMediaGeneralId );
+ attributes.AppendL( KMPXMediaGeneralTitle );
+ attributes.AppendL( KMPXMediaGeneralUri );
+
+ CMPXMedia* refOwner = CollectionHelperL()->GetL( aRefOwnerSuid,
+ attributes.Array(),
+ aCategory );
- // Extract the playlist id from the found object
- TUint32 playlistId = *(*aPlaylist).Value<TMPXItemId> ( KMPXMediaGeneralId );
+ __ASSERT_DEBUG( refOwner, Panic( EMmMTPDpObjectNull ) );
+
+ CleanupStack::PushL( refOwner ); // + refOwner
+
+ // 2. Extract the general id from the found object
+ if ( !refOwner->IsSupported( KMPXMediaGeneralId ) )
+ PRINT( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::GetAllReferenceL Before GeneralId" ) );
+
+ TUint32 abstractMediaId = *( *refOwner ).Value<TMPXItemId>( KMPXMediaGeneralId );
+ PRINT( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::GetAllReferenceL After GeneralId" ) );
+
+ CleanupStack::PopAndDestroy( refOwner ); // - refOwner
+ CleanupStack::PopAndDestroy( &attributes ); // - attributes
// find the media object that contains a list of songs in the playlist
RArray<TInt> contentIDs;
@@ -1438,17 +1446,17 @@
searchMedia->SetTObjectValueL( KMPXMediaGeneralType, EMPXGroup );
searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, EMPXSong );
- searchMedia->SetTObjectValueL<TMPXItemId> ( KMPXMediaGeneralId, playlistId );
+ searchMedia->SetTObjectValueL<TMPXItemId>( KMPXMediaGeneralId, abstractMediaId );
RArray<TMPXAttribute> songAttributes;
CleanupClosePushL( songAttributes ); // + songAttributes
songAttributes.AppendL( KMPXMediaGeneralId );
songAttributes.AppendL( KMPXMediaGeneralUri );
- PERFLOGSTART(KMpxCollectionGetReference);
+ PERFLOGSTART( KMpxCollectionGetReference );
CMPXMedia* foundMedia = CollectionHelperL()->FindAllL( *searchMedia,
songAttributes.Array() );
- PERFLOGSTOP(KMpxCollectionGetReference);
+ PERFLOGSTOP( KMpxCollectionGetReference );
CleanupStack::PopAndDestroy( &songAttributes ); // - songAttributes
CleanupStack::PopAndDestroy( searchMedia ); // - searchMedia
@@ -1483,7 +1491,7 @@
// may replace the following 3 statements into the following:
// AppendL(refMedia->ValueText(KMPXMediaGeneralUri));
- HBufC* musicFileLocation = refMedia->ValueText( KMPXMediaGeneralUri ).AllocLC();
+ HBufC* musicFileLocation = refMedia->ValueText( KMPXMediaGeneralUri ).AllocLC(); // + musicFileLocation
aReferences.AppendL( *musicFileLocation );
PRINT1( _L("MM MTP <> CMmMtpDpMetadataMpxAccess::GetAllReferenceL, [%S] found from MPX db"), musicFileLocation );
@@ -1498,32 +1506,12 @@
}
// ---------------------------------------------------------------------------
-// CMmMtpDpMetadataMpxAccess::GetPlaylistNameL
-//
-// ---------------------------------------------------------------------------
-//
-void CMmMtpDpMetadataMpxAccess::GetPlaylistNameL( CMPXMedia* aPlaylist,
- TDes& aPlaylistName )
- {
- PRINT( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::GetPlaylistNameL" ) );
-
- if ( !aPlaylist->IsSupported( KMPXMediaGeneralUri ) )
- {
- User::Leave( KErrNotSupported );
- }
-
- aPlaylistName.Copy( aPlaylist->ValueText( KMPXMediaGeneralUri ) );
-
- PRINT( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::GetPlaylistNameL" ) );
- }
-
-// ---------------------------------------------------------------------------
// CMmMtpDpMetadataMpxAccess::GetModifiedContentL
// Get modified content
// ---------------------------------------------------------------------------
//
void CMmMtpDpMetadataMpxAccess::GetModifiedContentL( TInt& arrayCount,
- CDesCArray& aModifiedcontent )
+ CDesCArray& aModifiedcontent )
{
PRINT( _L( "MM MTP => CMmMtpDpMetadataMpxAccess::GetModifiedContentL" ) );
CMPXMedia* foundMedia;
@@ -1598,6 +1586,9 @@
searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, EMPXPlaylist );
searchMedia->SetTextValueL( KMPXMediaGeneralUri, aSuid );
+ TParsePtrC parse( aSuid );
+ searchMedia->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() );
+
RArray<TMPXAttribute> playlistAttributes;
CleanupClosePushL( playlistAttributes ); // + playlistAttributes
playlistAttributes.AppendL( KMPXMediaGeneralId );
--- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatavideoaccess.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatavideoaccess.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -38,9 +38,8 @@
#include "mmmtpdputility.h"
#include "tmmmtpdppanic.h"
#include "mmmtpvideodbdefs.h"
+#include "tobjectdescription.h"
-static const TInt KMtpMaxStringLength = 255;
-static const TInt KMtpMaxDescriptionLength = 0x200;
const TInt KStorageRootMaxLength = 10;
#ifdef _DEBUG
@@ -304,10 +303,6 @@
formatBuf.Append( KMtpVideoParentalRatingType );
formatBuf.Append( KMtpVideoCommaSign );
- formatBuf.Append( KMtpVideoUseCount );
- formatBuf.Append( KMtpVideoUseCountType );
- formatBuf.Append( KMtpVideoCommaSign );
-
formatBuf.Append( KMtpVideoDRM );
formatBuf.Append( KMtpVideoDRMType );
formatBuf.Append( KMtpVideoCommaSign );
@@ -663,9 +658,6 @@
num = iColSet->ColNo( KMtpVideoParentalRating );
iRecordSet.SetColL( num, KNullDesC );
- num = iColSet->ColNo( KMtpVideoUseCount );
- iRecordSet.SetColL( num, 0 );
-
num = iColSet->ColNo( KMtpVideoDRM );
iRecordSet.SetColL( num, 0 );
}
@@ -1007,22 +999,6 @@
}
break;
- case EMTPObjectPropCodeUseCount:
- {
- PRINT( _L( "MM MTP <> EMTPObjectPropCodeUseCount-MD" ) );
- num = iColSet->ColNo( KMtpVideoUseCount );
- uInt32 = iRecordSet.ColUint32( num );
- if ( EMTPTypeUINT32 == aNewData.Type() )
- {
- ( ( TMTPTypeUint32 & ) aNewData ).Set( uInt32 );
- }
- else
- {
- User::Leave( KErrArgument );
- }
- }
- break;
-
case EMTPObjectPropCodeDRMStatus:
{
PRINT( _L( "MM MTP <> EMTPObjectPropCodeDRMStatus-MD" ) );
@@ -1087,18 +1063,8 @@
// Get file path
TPtrC suid( aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ) );
- TParsePtrC parse( suid );
SetRecordL( suid, ERecordWrite );
- TRAPD( err, SetMetadataL( aPropCode, aNewData ) );
-
- if ( err < KErrNone ) // EPOC error condition
- {
- PRINT1( _L( "MM MTP <> Metadata write failed, with error %d" ), err );
- SetRecordL( suid, EFailedWrite );
- }
-
- if ( err != KErrNone )
- User::Leave( err );
+ SetMetadataL( aPropCode, aNewData );
PRINT( _L( "MM MTP <= CMmMtpDpMetadataVideoAccess::SetObjectMetadataValueL" ) );
}
@@ -1150,18 +1116,21 @@
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;
- text.Zero();
+ length = ( length < KMTPMaxDescriptionLen ) ? length : KMTPMaxDescriptionLen;
+ HBufC* text = HBufC::NewLC( length ); // + text
+ TPtr ptr = text->Des();
+
for ( TUint i = 0; i < length; i++ )
- {
- text.Append( desData->ElementUint( i ) );
- }
- PRINT1( _L( "MM MTP <> CMmMtpDpMetadataVideoAccess::SetMetadataL text = %S" ),
- &text );
- WriteLongTextL( KMtpVideoComment, text );
+ ptr.Append( desData->ElementUint( i ) );
+ PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::SetMetadataValueL text = %S" ),
+ text );
+
+ WriteLongTextL( KMtpVideoComment, *text );
+ CleanupStack::PopAndDestroy( text ); // - text
}
else
{
@@ -1182,7 +1151,6 @@
case EMTPObjectPropCodeVideoBitRate:
case EMTPObjectPropCodeFramesPerThousandSeconds:
case EMTPObjectPropCodeKeyFrameDistance:
- case EMTPObjectPropCodeUseCount:
{
if ( EMTPTypeUINT32 != aNewData.Type() )
{
@@ -1507,7 +1475,6 @@
{ EMTPObjectPropCodeScanType, KMtpVideoScanType },
{ EMTPObjectPropCodeEncodingProfile, KMtpVideoEncodingProfile },
{ EMTPObjectPropCodeParentalRating, KMtpVideoParentalRating },
- { EMTPObjectPropCodeUseCount, KMtpVideoUseCount },
{ EMTPObjectPropCodeAudioWAVECodec, KMtpVideoAudioCodec },
{ EMTPObjectPropCodeDRMStatus, KMtpVideoDRM },
};
@@ -1533,8 +1500,7 @@
PRINT1( _L( "MM MTP => CMmMtpDpMetadataVideoAccess::SetStorageRoot aStoreRoot = %S" ), &aStorageRoot );
// get the drive number
- TParse pathParser;
- User::LeaveIfError( pathParser.Set( aStorageRoot, NULL, NULL ) );
+ TParsePtrC pathParser( aStorageRoot );
TChar driveChar( pathParser.Drive()[0] );
User::LeaveIfError( RFs::CharToDrive( driveChar, iStoreNum ) );
--- a/mmappcomponents/mmmtpdataprovider/src/mmmtpdputility.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/mmmtpdataprovider/src/mmmtpdputility.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -27,6 +27,7 @@
#include <mtp/mmtpdataproviderframework.h>
#include <mtp/mmtpobjectmgr.h>
#include <mtp/tmtptypeuint32.h>
+#include <e32property.h> // for RProperty
// for asf mimetype parsing
#ifdef __WINDOWS_MEDIA
@@ -36,7 +37,10 @@
#include "mmmtpdputility.h"
#include "mmmtpdpfiledefs.h"
+#include "tobjectdescription.h"
#include "mmmtpdplogger.h"
+#include "mmmtpdp_variant.hrh"
+#include "cmmmtpdpaccesssingleton.h"
using namespace ContentAccess;
@@ -44,6 +48,9 @@
_LIT( KHxMimeTypeWma, "audio/x-hx-wma" );
_LIT( KHxMimeTypeWmv, "video/x-hx-wmv" );
+const TInt KMaxRenameTimes = 10;
+const TInt KRenameThreshold = 100 * 1000; // (100 millisec)
+
// -----------------------------------------------------------------------------
// MmMtpDpUtility::FormatFromFilename
// Utility function to get the type of an object from the filename
@@ -53,72 +60,78 @@
//
EXPORT_C TMTPFormatCode MmMtpDpUtility::FormatFromFilename( const TDesC& aFullFileName )
{
+ TMTPFormatCode format = EMTPFormatCodeUndefined;
+
if ( aFullFileName.Right( 1 ).CompareF( KTxtBackSlash ) == 0 ) // We have a directory name
{
- return EMTPFormatCodeAssociation;
+ format = EMTPFormatCodeAssociation;
}
-
- TParsePtrC file( aFullFileName );
+ else
+ {
+ TParsePtrC file( aFullFileName );
- // need to do it in popularity of format, to optmize performance
- if ( file.Ext().CompareF( KTxtExtensionMP3 ) == 0 )
- return EMTPFormatCodeMP3;
-
+ if ( file.ExtPresent() )
+ {
+ // need to do it in popularity of format, to optmize performance
+ if ( file.Ext().CompareF( KTxtExtensionMP3 ) == 0 )
+ format = EMTPFormatCodeMP3;
#ifdef __WINDOWS_MEDIA
- if ( file.Ext().CompareF( KTxtExtensionWMA ) == 0 )
- return EMTPFormatCodeWMA;
+ else if ( file.Ext().CompareF( KTxtExtensionWMA ) == 0 )
+ format = EMTPFormatCodeWMA;
#endif // __WINDOWS_MEDIA
-
- if ( ( file.Ext().CompareF( KTxtExtensionMP4 ) == 0 ) || ( file.Ext().CompareF( KTxtExtensionM4A ) == 0 ) )
- return EMTPFormatCodeMP4Container;
-
- if ( ( file.Ext().CompareF( KTxtExtension3GP ) == 0 ) || ( file.Ext().CompareF( KTxtExtensionO4A ) == 0 ) || ( file.Ext().CompareF( KTxtExtensionO4V ) == 0 ) )
- return EMTPFormatCode3GPContainer;
-
- if ( file.Ext().CompareF( KTxtExtensionAAC ) == 0 )
- return EMTPFormatCodeAAC;
-
- if ( file.Ext().CompareF( KTxtExtensionWAV ) == 0 )
- return EMTPFormatCodeWAV;
-
+ else if (( file.Ext().CompareF( KTxtExtensionPLA ) == 0 )
+ || ( file.Ext().CompareF( KTxtExtensionVIR ) == 0 ) )
+ format = EMTPFormatCodeAbstractAudioVideoPlaylist;
+ else if ( ( file.Ext().CompareF( KTxtExtensionMP4 ) == 0 )
+ || ( file.Ext().CompareF( KTxtExtensionM4A ) == 0 ) )
+ format = EMTPFormatCodeMP4Container;
+ else if ( ( file.Ext().CompareF( KTxtExtension3GP ) == 0 )
+ || ( file.Ext().CompareF( KTxtExtension3G2 ) == 0 )
+ || ( file.Ext().CompareF( KTxtExtensionO4A ) == 0 )
+ || ( file.Ext().CompareF( KTxtExtensionO4V ) == 0 ) )
+ format = EMTPFormatCode3GPContainer;
+ else if ( file.Ext().CompareF( KTxtExtensionAAC ) == 0 )
+ format = EMTPFormatCodeAAC;
+ else if ( file.Ext().CompareF( KTxtExtensionWAV ) == 0 )
+ format = EMTPFormatCodeWAV;
#ifdef __WINDOWS_MEDIA
- if ( file.Ext().CompareF( KTxtExtensionWMV ) == 0 )
- return EMTPFormatCodeWMV;
-
- if ( file.Ext().CompareF( KTxtExtensionASF ) == 0 )
- return EMTPFormatCodeASF;
-
+ else if ( file.Ext().CompareF( KTxtExtensionWMV ) == 0 )
+ format = EMTPFormatCodeWMV;
+ else if ( file.Ext().CompareF( KTxtExtensionASF ) == 0 )
+ format = EMTPFormatCodeASF;
#endif // __WINDOWS_MEDIA
+ else if ( file.Ext().CompareF( KTxtExtensionODF ) == 0 )
+ {
+ HBufC8* mime(NULL);
+ TRAP_IGNORE( mime = MmMtpDpUtility::OdfMimeTypeL( file.FullName() ) );
+ if ( mime != NULL )
+ {
+ // 3GP
+ if ( mime->CompareF( KMimeTypeAudio3gpp ) == 0
+ || mime->CompareF( KMimeTypeVideo3gpp ) == 0 )
+ {
+ delete mime;
+ mime = NULL;
+ format = EMTPFormatCode3GPContainer;
+ }
+ }
- if ( file.Ext().CompareF( KTxtExtensionODF ) == 0 )
- {
- HBufC8* mime = MmMtpDpUtility::ContainerMimeType( file.FullName() );
- if ( mime != NULL )
- {
- // 3GP
- if ( mime->CompareF( KMimeTypeAudio3gpp ) == 0
- || mime->CompareF( KMimeTypeVideo3gpp ) == 0 )
- {
- delete mime;
- mime = NULL;
- return EMTPFormatCode3GPContainer;
+ if ( mime != NULL )
+ {
+ delete mime;
+ mime = NULL;
+ }
}
- }
-
- if ( mime != NULL )
- {
- delete mime;
- mime = NULL;
+#ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT
+ else if ( file.Ext().CompareF( KTxtExtensionALB ) == 0 )
+ format = EMTPFormatCodeAbstractAudioAlbum;
+#endif // MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT
+ else if ( file.Ext().CompareF( KTxtExtensionM3U ) == 0 )
+ format = EMTPFormatCodeM3UPlaylist;
}
}
- if (( file.Ext().CompareF( KTxtExtensionPLA ) == 0 ) || ( file.Ext().CompareF( KTxtExtensionVIR ) == 0 ) )
- return EMTPFormatCodeAbstractAudioVideoPlaylist;
-
- if ( file.Ext().CompareF( KTxtExtensionM3U ) == 0 )
- return EMTPFormatCodeM3UPlaylist;
-
- return EMTPFormatCodeUndefined;
+ return format;
}
// -----------------------------------------------------------------------------
@@ -144,101 +157,18 @@
}
// -----------------------------------------------------------------------------
-// MmMtpDpUtility::IsVideoL (Slow Version)
-// Utility function to determine whether a format is Video or not
+// MmMtpDpUtility::HasReference
+// Utility function to decide if there is any reference
// -----------------------------------------------------------------------------
//
-EXPORT_C TBool MmMtpDpUtility::IsVideoL( const TDesC& aFullFileName )
+TBool MmMtpDpUtility::HasReference( TUint16 aObjFormatCode )
{
- PRINT1( _L( "MM MTP => MmMtpDpUtility::IsVideoL (Slow Version) aFullFileName = %S" ), &aFullFileName );
-
- TParse pathParser;
- User::LeaveIfError( pathParser.Set( aFullFileName, NULL, NULL ) );
-
- TPtrC ext( pathParser.Ext() );
-
- if ( ext.Length() <= 0 )
- {
- PRINT( _L( "MM MTP <> MmMtpDpUtility::IsVideoL ext len <= 0, return false" ) );
- return EFalse;
- }
-
- // move WMV early to optmize comparison
- if ( ext.CompareF( KTxtExtensionWMV ) == 0 )
- {
- return ETrue;
- }
- else if ( ext.CompareF( KTxtExtensionMP4 ) == 0
- || ext.CompareF( KTxtExtension3GP ) == 0
- || ext.CompareF( KTxtExtensionODF ) == 0
- || ext.CompareF( KTxtExtensionASF ) == 0 )
- {
- HBufC8* mimetype = ContainerMimeType( aFullFileName );
- User::LeaveIfNull( mimetype );
-
- CleanupStack::PushL( mimetype ); // + mimetype
-
- TMmMtpSubFormatCode subFormatCode;
-
- User::LeaveIfError( SubFormatCodeFromMime( *mimetype, subFormatCode ) );
- CleanupStack::PopAndDestroy( mimetype ); // - mimetype
-
- if ( subFormatCode == EMTPSubFormatCodeVideo )
- {
- return ETrue;
- }
- else
- {
- return EFalse;
- }
- }
- else if ( ext.CompareF( KTxtExtensionO4V ) == 0 )
+ if ( aObjFormatCode == EMTPFormatCodeAbstractAudioAlbum
+ || aObjFormatCode == EMTPFormatCodeAbstractAudioVideoPlaylist
+ || aObjFormatCode == EMTPFormatCodeM3UPlaylist )
return ETrue;
-
- // other format, as audio
- return EFalse;
- }
-
-// -----------------------------------------------------------------------------
-// MmMtpDpUtility::IsVideoL (Fast Version)
-// Utility function to determine whether a format is Video or not
-// -----------------------------------------------------------------------------
-//
-TBool MmMtpDpUtility::IsVideoL( const TDesC& aFullFileName,
- const MMTPDataProviderFramework& aFramework )
- {
- PRINT1( _L( "MM MTP => MmMtpDpUtility::IsVideoL (Fast Version) aFullFileName = %S" ), &aFullFileName );
-
- CMTPObjectMetaData* info = CMTPObjectMetaData::NewLC(); // + info
- aFramework.ObjectMgr().ObjectL( aFullFileName, *info );
-
- TUint formatCode = info->Uint( CMTPObjectMetaData::EFormatCode );
- TUint subFormatCode = info->Uint( CMTPObjectMetaData::EFormatSubCode );
-
- CleanupStack::PopAndDestroy( info ); // - info
-
- if ( formatCode == EMTPFormatCodeWMV )
- {
- return ETrue;
- }
- else if ( ( formatCode == EMTPFormatCodeMP4Container )
- || ( formatCode == EMTPFormatCode3GPContainer )
- || ( formatCode == EMTPFormatCodeASF ) )
- {
- if ( subFormatCode == EMTPSubFormatCodeAudio )
- {
- return EFalse;
- }
- else if ( subFormatCode == EMTPSubFormatCodeVideo )
- {
- return ETrue;
- }
- }
-
- PRINT( _L( "MM MTP <= MmMtpDpUtility::IsVideoL (Fast Version)" ) );
-
- // other format, as audio
- return EFalse;
+ else
+ return EFalse;
}
// -----------------------------------------------------------------------------
@@ -269,7 +199,7 @@
TEntry fileInfo;
// Shouldn't leave
User::LeaveIfError( aFs.Entry( aFileName, fileInfo ) );
- return fileInfo.iSize;
+ return fileInfo.FileSize();
}
// -----------------------------------------------------------------------------
@@ -277,16 +207,14 @@
// Get the file date modified.
// -----------------------------------------------------------------------------
//
-TTime MmMtpDpUtility::GetObjectDateModifiedL( RFs& aFs, const TDesC& aFullFileName )
+void MmMtpDpUtility::GetObjectDateModifiedL( RFs& aFs, const TDesC& aFullFileName, TDes& aDateModified )
{
- TTime dataModified;
+ TTime date;
TEntry fileInfo;
// Shouldn't leave
User::LeaveIfError( aFs.Entry( aFullFileName, fileInfo ) );
-
- dataModified = fileInfo.iModified;
-
- return dataModified;
+ date = fileInfo.iModified;
+ date.FormatL( aDateModified, KMtpDateTimeFormat );
}
// -----------------------------------------------------------------------------
@@ -306,6 +234,10 @@
protectionStatus = EMTPProtectionReadOnly;
}
+ PRINT2( _L( "MM MTP <> MmMtpDpUtility::GetProtectionStatusL aFullFileName = %S, protectionStatus = 0x%x" ),
+ &aFullFileName,
+ protectionStatus );
+
return protectionStatus;
}
@@ -314,10 +246,10 @@
// Check if property type match datatype.
// -----------------------------------------------------------------------------
//
-TMTPResponseCode MmMtpDpUtility::CheckPropType(TUint16 aPropertyCode, TUint16 aDataType)
+TMTPResponseCode MmMtpDpUtility::CheckPropType( TUint16 aPropertyCode, TUint16 aDataType )
{
- PRINT2( _L( "MM MTP => MmMtpDpUtility::CheckPropCode aPropertyCode = 0x%x, aDataType = 0x%x" ),
- aPropertyCode,
+ PRINT2( _L( "MM MTP => MmMtpDpUtility::CheckPropCode aPropertyCode = 0x%x, aDataType = 0x%x" ),
+ aPropertyCode,
aDataType );
TMTPResponseCode responseCode = EMTPRespCodeOK;
@@ -333,8 +265,11 @@
case EMTPObjectPropCodeDateCreated:
case EMTPObjectPropCodeDateModified:
case EMTPObjectPropCodeDateAdded:
- case EMTPObjectPropCodeNonConsumable:
case EMTPObjectPropCodeVideoBitRate:
+ case EMTPObjectPropCodeRepresentativeSampleFormat:
+ case EMTPObjectPropCodeRepresentativeSampleSize:
+ case EMTPObjectPropCodeRepresentativeSampleHeight:
+ case EMTPObjectPropCodeRepresentativeSampleWidth:
{
responseCode = EMTPRespCodeAccessDenied;
}
@@ -350,6 +285,7 @@
case EMTPObjectPropCodeOriginalReleaseDate: // 0xDC99
case EMTPObjectPropCodeAlbumName: // 0xDC9A
case EMTPObjectPropCodeEncodingProfile: // 0xDEA1
+ case EMTPObjectPropCodeAlbumArtist: // 0xDC9B
{
if ( aDataType != EMTPTypeString )
{
@@ -371,7 +307,6 @@
case EMTPObjectPropCodeWidth: // 0xDC87
case EMTPObjectPropCodeHeight: // 0xDC88
case EMTPObjectPropCodeDuration: // 0xDC89
- case EMTPObjectPropCodeUseCount: // 0xDC91
case EMTPObjectPropCodeSampleRate: // 0xDE93
case EMTPObjectPropCodeAudioWAVECodec: // 0xDE99
case EMTPObjectPropCodeAudioBitRate: // 0xDE9A
@@ -399,13 +334,33 @@
}
break;
+ // Uint8 properties
+ case EMTPObjectPropCodeNonConsumable:
+ case EMTPExtObjectPropCodeOmaDrmStatus: // 0xDB01
+ {
+ if ( aDataType != EMTPTypeUINT8 )
+ {
+ responseCode = EMTPRespCodeInvalidObjectPropFormat;
+ }
+ }
+ break;
+
+ case EMTPObjectPropCodeRepresentativeSampleData:
+ {
+ if ( aDataType != EMTPTypeAUINT8 )
+ {
+ responseCode = EMTPRespCodeInvalidObjectPropFormat;
+ }
+ }
+ break;
+
default:
{
responseCode = EMTPRespCodeInvalidObjectPropCode;
}
break;
}
- PRINT1( _L( "MM MTP <= MmMtpDpUtility::CheckPropCode responseCode = 0x%x" ),
+ PRINT1( _L( "MM MTP <= MmMtpDpUtility::CheckPropCode responseCode = 0x%x" ),
responseCode );
return responseCode;
}
@@ -433,60 +388,27 @@
aNewName.Insert( 0, ptr );
}
- return aFs.Rename( aFullFileName, aNewName );
- }
-
-// -----------------------------------------------------------------------------
-// MetadataAccessWrapper::ContainerMimeType
-// Get mime type from file
-// -----------------------------------------------------------------------------
-//
-HBufC8* MmMtpDpUtility::ContainerMimeType( const TDesC& aFullPath )
- {
- PRINT( _L( "MM MTP => MmMtpDpUtility::ContainerMimeType" ) );
-
- // parse the file path
- TParse pathParser;
- TInt retCode = pathParser.Set( aFullPath, NULL, NULL );
- if ( retCode != KErrNone )
+ TInt ret = KErrNone;
+ // Some other component might be holding on to the file (MDS background harvesting),
+ // try again after 100 millisec, up to 10 times, before give up
+ TInt count = KMaxRenameTimes;
+ while ( count > 0 )
{
- PRINT( _L( "MM MTP <> MmMtpDpUtility::ContainerMimeType parse path failed" ) );
- return NULL;
+ ret = aFs.Rename( aFullFileName, aNewName );
+ if ( ( ret == KErrInUse ) && ( count > 1 ) )
+ {
+ User::After( KRenameThreshold );
+ count--;
+ }
+ else
+ {
+ break;
+ }
}
- // get the extension of file
- TPtrC ext( pathParser.Ext() );
- if ( ext.Length() <= 0 )
- {
- PRINT( _L( "MM MTP <> MmMtpDpUtility::ContainerMimeType file ext len == 0" ) );
- return NULL;
- }
-
- HBufC8* mimebuf = NULL;
- TInt err = KErrNone;
+ PRINT1( _L( "MM MTP <> MmMtpDpUtility::UpdateObjectFileName, ret = %d" ), ret );
- // MP4/3GP
- if ( ext.CompareF( KTxtExtensionMP4 ) == 0
- || ext.CompareF( KTxtExtension3GP ) == 0 )
- {
- TRAP( err, mimebuf = Mp4MimeTypeL( aFullPath ) );
- PRINT1( _L("MM MTP <> MmMtpDpUtility::ContainerMimeType, Mp4MimeTypeL err = %d"), err );
- }
- else if ( ext.CompareF( KTxtExtensionODF ) == 0 )
- {
- TRAP( err, mimebuf = Mp4MimeTypeL( aFullPath ) );
- PRINT1( _L("MM MTP <> MmMtpDpUtility::ContainerMimeType, OdfMimeTypeL err = %d"), err );
- }
-#ifdef __WINDOWS_MEDIA
- else if ( ext.CompareF( KTxtExtensionASF ) == 0 )
- {
- TRAP( err, mimebuf = AsfMimeTypeL( aFullPath ) );
- PRINT1( _L("MM MTP <> MmMtpDpUtility::ContainerMimeType, AsfMimeTypeL err = %d"), err );
- }
-#endif
-
- PRINT( _L( "MM MTP <= MmMtpDpUtility::ContainerMimeType" ) );
- return mimebuf;
+ return ret;
}
// -----------------------------------------------------------------------------
@@ -499,9 +421,10 @@
PRINT( _L( "MM MTP => MmMtpDpUtility::Mp4MimeTypeL" ) );
HBufC8* mimebuf = NULL;
TParsePtrC file( aFullPath );
-
+
if ( file.Ext().CompareF( KTxtExtensionMP4 ) == 0
- || file.Ext().CompareF( KTxtExtension3GP ) == 0 )
+ || file.Ext().CompareF( KTxtExtension3GP ) == 0
+ || file.Ext().CompareF( KTxtExtension3G2 ) == 0 )
{
// get mime from file
MP4Handle mp4Handle = NULL;
@@ -537,7 +460,8 @@
if ( mp4err == MP4_OK )
{
- if ( file.Ext().CompareF( KTxtExtension3GP ) == 0 )
+ if ( file.Ext().CompareF( KTxtExtension3GP ) == 0
+ || file.Ext().CompareF( KTxtExtension3G2 ) == 0 )
{
mimebuf = KMimeTypeAudio3gpp().Alloc();
}
@@ -550,7 +474,8 @@
// is video file
else if ( mp4err == MP4_OK )
{
- if ( file.Ext().CompareF( KTxtExtension3GP ) == 0 )
+ if ( file.Ext().CompareF( KTxtExtension3GP ) == 0
+ || file.Ext().CompareF( KTxtExtension3G2 ) == 0 )
{
mimebuf = KMimeTypeVideo3gpp().Alloc();
}
@@ -573,7 +498,7 @@
{
User::Leave( KErrNotSupported );
}
-
+
if ( mimebuf == NULL )
{
User::Leave( KErrNotFound );
@@ -591,46 +516,37 @@
{
PRINT( _L( "MM MTP => MmMtpDpUtility::OdfMimeTypeL" ) );
HBufC8* mimebuf = NULL;
-
- TParsePtrC file( aFullPath );
-
- if ( file.Ext().CompareF( KTxtExtensionODF ) == 0 )
- {
- CContent* content = CContent::NewL( aFullPath );
- CleanupStack::PushL( content ); // + content
-
- HBufC* buffer = HBufC::NewL( KMimeTypeMaxLength );
- CleanupStack::PushL( buffer ); // + buffer
-
- TPtr data = buffer->Des();
- TInt err = content->GetStringAttribute( EMimeType, data );
-
- if ( err == KErrNone )
- {
- mimebuf = HBufC8::New( buffer->Length() );
-
- if (mimebuf == NULL)
- {
- User::LeaveIfError( KErrNotFound );
- }
-
- mimebuf->Des().Copy( *buffer );
- }
-
- // leave if NULL
+
+ CContent* content = CContent::NewL( aFullPath );
+ CleanupStack::PushL( content ); // + content
+
+ HBufC* buffer = HBufC::NewL( KMimeTypeMaxLength );
+ CleanupStack::PushL( buffer ); // + buffer
+
+ TPtr data = buffer->Des();
+ TInt err = content->GetStringAttribute( EMimeType, data );
+
+ if ( err == KErrNone )
+ {
+ mimebuf = HBufC8::New( buffer->Length() );
+
if ( mimebuf == NULL )
{
- User::Leave( KErrNotFound );
+ User::LeaveIfError( KErrNotFound );
}
-
- CleanupStack::PopAndDestroy( buffer ); // - buffer
- CleanupStack::PopAndDestroy( content ); // - content
+
+ mimebuf->Des().Copy( *buffer );
}
- else
+
+ // leave if NULL
+ if ( mimebuf == NULL )
{
- User::Leave( KErrNotSupported );
+ User::Leave( KErrNotFound );
}
-
+
+ CleanupStack::PopAndDestroy( buffer ); // - buffer
+ CleanupStack::PopAndDestroy( content ); // - content
+
PRINT( _L( "MM MTP <= MmMtpDpUtility::OdfMimeTypeL" ) );
return mimebuf;
}
@@ -642,70 +558,61 @@
//
HBufC8* MmMtpDpUtility::AsfMimeTypeL( const TDesC& aFullPath )
{
- PRINT( _L( "MM MTP => MmMtpDpUtility::AsfMimeTypeL" ) );
-
+ PRINT1( _L( "MM MTP => MmMtpDpUtility::AsfMimeTypeL, aFullPath = %S" ), &aFullPath );
+
HBufC8* mimebuf = NULL;
-
+
#ifdef __WINDOWS_MEDIA
- TParsePtrC file( aFullPath );
-
- if ( file.Ext().CompareF( KTxtExtensionASF ) == 0 )
+ CHXMetaDataUtility *hxUtility = CHXMetaDataUtility::NewL();
+ CleanupStack::PushL( hxUtility );
+
+ hxUtility->OpenFileL( aFullPath );
+ PRINT( _L( "MM MTP <> MmMtpDpUtility::AsfMimeTypeL OpenFileL" ) );
+
+ HXMetaDataKeys::EHXMetaDataId id;
+ TUint count = 0;
+ TBool isAudio = EFalse;
+ hxUtility->GetMetaDataCount( count );
+ for ( TUint i = 0; i < count; i++ )
{
- CHXMetaDataUtility *hxUtility = CHXMetaDataUtility::NewL();
- CleanupStack::PushL( hxUtility );
-
- hxUtility->OpenFileL( aFullPath );
-
- HXMetaDataKeys::EHXMetaDataId id;
- TUint count = 0;
- TBool isAudio = EFalse;
- hxUtility->GetMetaDataCount( count );
- for ( TUint i = 0; i < count; i++ )
- {
- HBufC* buf = NULL;
- hxUtility->GetMetaDataAt( i, id, buf );
+ HBufC* buf = NULL;
+ hxUtility->GetMetaDataAt( i, id, buf );
- if ( id == HXMetaDataKeys::EHXMimeType )
+ if ( id == HXMetaDataKeys::EHXMimeType )
+ {
+ TPtr des = buf->Des();
+
+ if ( des.Find( KHxMimeTypeWma() ) != KErrNotFound )
{
- TPtr des = buf->Des();
-
- if ( des.Find( KHxMimeTypeWma() ) != KErrNotFound )
- {
- isAudio = ETrue;
- }
- else if ( des.Find( KHxMimeTypeWmv() ) != KErrNotFound )
- {
- PRINT( _L( "MM MTP <> MmMtpDpUtility::AsfMimeTypeL, video" ) );
- mimebuf = KMimeTypeVideoWm().Alloc();
- break;
- }
+ isAudio = ETrue;
}
- else if ( i == count - 1 )
+ else if ( des.Find( KHxMimeTypeWmv() ) != KErrNotFound )
{
- if ( isAudio )
- {
- PRINT( _L( "MM MTP <> MmMtpDpUtility::AsfMimeTypeL, audio" ) );
- mimebuf = KMimeTypeAudioWm().Alloc();
- }
- else
- {
- User::Leave( KErrNotFound );
- }
+ PRINT( _L( "MM MTP <> MmMtpDpUtility::AsfMimeTypeL, video" ) );
+ mimebuf = KMimeTypeVideoWm().Alloc();
+ break;
}
}
-
- hxUtility->ResetL();
- CleanupStack::PopAndDestroy( hxUtility );
- }
- else
- {
- User::Leave( KErrNotSupported );
+ else if ( i == count - 1 )
+ {
+ if ( isAudio )
+ {
+ PRINT( _L( "MM MTP <> MmMtpDpUtility::AsfMimeTypeL, audio" ) );
+ mimebuf = KMimeTypeAudioWm().Alloc();
+ }
+ else
+ {
+ User::Leave( KErrNotFound );
+ }
+ }
}
+ hxUtility->ResetL();
+ CleanupStack::PopAndDestroy( hxUtility );
#else
User::Leave( KErrNotSupported );
#endif
-
+
PRINT( _L( "MM MTP <= MmMtpDpUtility::AsfMimeTypeL" ) );
return mimebuf;
}
@@ -715,11 +622,12 @@
// Get subformat code from mime string
// -----------------------------------------------------------------------------
//
-TInt MmMtpDpUtility::SubFormatCodeFromMime( const TDesC8& aMimeType,
- TMmMtpSubFormatCode& aSubFormatCode )
+TMmMtpSubFormatCode MmMtpDpUtility::SubFormatCodeFromMime( const TDesC8& aMimeType )
{
PRINT( _L( "MM MTP => MmMtpDpUtility::SubFormatCodeFromMime" ) );
+ TMmMtpSubFormatCode subFormatCode = EMTPSubFormatCodeUnknown;
+
if ( aMimeType.CompareF( KMimeTypeVideoMp4 ) == 0
|| aMimeType.CompareF( KMimeTypeVideo3gpp ) == 0
#ifdef __WINDOWS_MEDIA
@@ -727,7 +635,7 @@
#endif
)
{
- aSubFormatCode = EMTPSubFormatCodeVideo;
+ subFormatCode = EMTPSubFormatCodeVideo;
}
else if ( aMimeType.CompareF( KMimeTypeAudioMp4 ) == 0
|| aMimeType.CompareF( KMimeTypeAudio3gpp ) == 0
@@ -736,16 +644,17 @@
#endif
)
{
- aSubFormatCode = EMTPSubFormatCodeAudio;
+ subFormatCode = EMTPSubFormatCodeAudio;
}
else
{
PRINT( _L( "MM MTP <= MmMtpDpUtility::SubFormatCodeFromMime format not supported" ) );
- return KErrNotFound;
+ subFormatCode = EMTPSubFormatCodeUndefined;
}
- PRINT( _L( "MM MTP <= MmMtpDpUtility::SubFormatCodeFromMime" ) );
- return KErrNone;
+ PRINT1( _L( "MM MTP <= MmMtpDpUtility::SubFormatCodeFromMime SubFormatCode = %d" ), subFormatCode );
+
+ return subFormatCode;
}
// -----------------------------------------------------------------------------
@@ -791,8 +700,40 @@
}
PRINT1( _L( "MM MTP <= MmMtpDpUtility::GetDrmStatus, drmStatus: %d" ), drmStatus );
-
+
return drmStatus;
}
-//end of file
+EXPORT_C void MmMtpDpUtility::SetPSStatus( TMtpPSStatus aStatus )
+ {
+ TBool changeScheduled = EFalse;
+ CMmMtpDpAccessSingleton::CancelActiveToIdleStatusChange(); // cancel any outstanding delay status change
+
+ if ( aStatus == EMtpPSStatusReadyToSync )
+ {
+ TInt mtpStatus;
+ RProperty::Get( KMtpPSUid, KMtpPSStatus, mtpStatus );
+
+ if ( mtpStatus == EMtpPSStatusActive )
+ {
+ CMmMtpDpAccessSingleton::ActiveToIdleStatusChange();
+ changeScheduled = ETrue;
+ }
+ }
+
+ if ( !changeScheduled )
+ DoSetPSStatus( aStatus );
+ }
+
+void MmMtpDpUtility::DoSetPSStatus( TMtpPSStatus aStatus )
+ {
+ TInt mtpStatus;
+ RProperty::Get( KMtpPSUid, KMtpPSStatus, mtpStatus );
+
+ if ( mtpStatus != aStatus )
+ {
+ TInt err = RProperty::Set( KMtpPSUid, KMtpPSStatus, aStatus );
+ PRINT3( _L("MM MTP <> CRequestProcessor::DoSetPSStatus err = %d, previous = %d, current = %d" ), err , mtpStatus, aStatus);
+ }
+ }
+// end of file
--- a/mmappcomponents/playbackhelper/group/playbackhelper.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/playbackhelper/group/playbackhelper.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -15,9 +15,7 @@
*
*/
-// Version : %version: 5 %
-
-
+// Version : %version: 9 %
#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 Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/playbackhelper/inc/playbackhelper_log.h Wed Jun 23 17:51:16 2010 +0100
@@ -15,9 +15,7 @@
*
*/
-// Version : %version: 4 %
-
-
+// Version : %version: 7 %
#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/playlistengine/group/bld.inf Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/playlistengine/group/bld.inf Wed Jun 23 17:51:16 2010 +0100
@@ -23,9 +23,12 @@
PRJ_EXPORTS
../rom/mpxplaylistengine.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mpxplaylistengine.iby)
-../rom/mpxplaylistrecognizerplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mpxplaylistrecognizerplugin.iby)
+
+//MMMW has a generic recognizer that takes care of m3u files
+//../rom/mpxplaylistrecognizerplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mpxplaylistrecognizerplugin.iby)
PRJ_MMPFILES
-mpxplaylistrecognizer.mmp
+//MMMW has a generic recognizer that takes care of m3u files
+//mpxplaylistrecognizer.mmp
mpxplaylistengine.mmp
--- a/mmappcomponents/playlistengine/inc/mpxplaylistrecognizer.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/playlistengine/inc/mpxplaylistrecognizer.h Wed Jun 23 17:51:16 2010 +0100
@@ -29,6 +29,8 @@
class CMPXPluginHandlerBase;
/**
+* Deprecated. replaced by playlist recognizer in mw/mmmw.
+*
* Concrete implementation of the recognizer API used to recognize playlist files.
*
* This is used by the application framework, as well as CMPXPlaylistEngine to
--- a/mmappcomponents/playlistengine/src/mpxplaylistengine.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/playlistengine/src/mpxplaylistengine.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -59,7 +59,6 @@
#include "mpxplaylistenginedefs.hrh"
#include "mpxplaylistplugin.h"
#include "mpxplaylistengine.h"
-#include "mpxplaylistrecognizer.h"
// ============================ CONSTANTS =====================================
const TInt KMPXBufExpandSize = 0x40;
--- a/mmappcomponents/videoplaylistutility/group/videoplaylistutility.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/videoplaylistutility/group/videoplaylistutility.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -15,9 +15,7 @@
*
*/
-// Version : %version: 3 %
-
-
+// Version : %version: 6 %
#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 Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappcomponents/videoplaylistutility/inc/videoplaylistutility_log.h Wed Jun 23 17:51:16 2010 +0100
@@ -15,130 +15,106 @@
*
*/
-// Version : %version: 2 %
-
-
+// Version : %version: 6 %
#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/collection_helper_api/tsrc/CollectionHelperTestClass/inc/CollectionHelperTestClass.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/collection_helper_api/tsrc/CollectionHelperTestClass/inc/CollectionHelperTestClass.h Wed Jun 23 17:51:16 2010 +0100
@@ -73,6 +73,28 @@
_LIT( KRenameOldUri, "c:\\Blackbird.aac");
_LIT( KRenameNewUri, "c:\\data\\Blackbird.aac");
+_LIT( KFileWmaSong, "f:\\1.wma");
+
+_LIT( KFile1, "e:\\data\\sounds\\digital\\1.mp3"); //ok
+_LIT( KOldAbstractAlbumName, "1.wma"); //ok
+_LIT( KNewAbstractAlbumName, "The 99 Most Essential Beethoven MasterpiecesVarious Artists"); //ok
+_LIT( KFile3, "e:\\data\\sounds\\digital\\(01) Amber - Yes.mp3"); //ok
+_LIT( KFilet, "e:\\data\\sounds\\digital\\02 What A Wonderful World.mp3"); //ok
+
+
+_LIT( KTestFile3, "e:\\data\\sounds\\digital\\Atomic Kitten - It's Ok.mp3"); //ok
+_LIT( KSongtest, "e:\\data\\sounds\\digital\\02 What A Wonderful World.mp3"); //ok
+
+_LIT( KAbstractalbum1, "f:\\1.alb");
+_LIT( KAbstractalbum2, "f:\\2.alb");
+_LIT( KAbstractalbum3, "f:\\3.alb");
+_LIT( KStoreRoot, "f:\\");
+
+_LIT( KAbstractAlbumName, "The 99 Most Essential Beethoven MasterpiecesVarious Artists");
+
+_LIT( KAlbumArtistShort, "testAlbumArtist");
+
+
// FORWARD DECLARATIONS
class CCollectionHelperTestClass;
@@ -300,7 +322,6 @@
TInt SetAllowedPanic( CStifItemParser& aItem );
void CreateTestMediaL( CMPXMedia*& aNewProperty );
-
/**
* Connect to the default client to the server
* @since S60 3.2
@@ -316,8 +337,21 @@
virtual TInt CloseUiHelperL(CStifItemParser& aItem);
virtual TInt CloseHelperL(CStifItemParser& aItem);
virtual TInt CloseCachedHelperL(CStifItemParser& aItem);
-
+ virtual TInt AddSongL(CStifItemParser& aItem);
+ TInt FindMediaL(const TDesC& aPath, TMPXGeneralCategory aCategory);
+ virtual TInt RemoveSongL(CStifItemParser& aItem );
+ virtual TInt AddAbstractAlbumL(CStifItemParser& aItem);
+ virtual TInt RemoveAbstractAlbumL(CStifItemParser& aItem);
+ virtual TInt SetAbstractAlbumL(CStifItemParser& aItem);
+ virtual TInt SetSongAlbumArtistL(CStifItemParser& aItem);
+ virtual TInt GetSongAlbumArtistL(CStifItemParser& aItem);
+ virtual TInt SetAbstractAlbumArtistL(CStifItemParser& aItem);
+ virtual TInt GetAbstractAlbumArtistL(CStifItemParser& aItem);
+ virtual TInt UpdateAbstractAlbumNameL(CStifItemParser& aItem);
+ virtual TInt GetAbstractAlbumAndSongsL(CStifItemParser& aItem);
+ virtual TInt RenameAbstractAlbumL(CStifItemParser& aItem);
+ void AttachSongsL(CMPXMediaArray* aAbstractalbumArray, const TDesC& aPath);
/**
* From MMPXCollectionRemoveObserver
* Handles removing a collection path
@@ -339,7 +373,8 @@
* @param aError error code
*/
void HandleFindAllL(const CMPXMedia& aResults, TBool aComplete,TInt aError);
-
+
+
public: // Data
protected: // Data
--- a/mmappfw_plat/collection_helper_api/tsrc/CollectionHelperTestClass/src/CollectionHelperTestClassBlocks.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/collection_helper_api/tsrc/CollectionHelperTestClass/src/CollectionHelperTestClassBlocks.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -30,6 +30,7 @@
#include <mpxmediacontainerdefs.h>
#include <mpxattribute.h>
#include "debug.h"
+#include <mpxmediamtpdefs.h>
// EXTERNAL DATA STRUCTURES
//extern ?external_data;
@@ -134,6 +135,18 @@
ENTRY( "NewUiHelper", CCollectionHelperTestClass::NewUiHelperL ),
ENTRY( "NewHelper", CCollectionHelperTestClass::NewHelperL ),
ENTRY( "NewCachedHelper", CCollectionHelperTestClass::NewCachedHelperL ),
+ ENTRY( "AddSong", CCollectionHelperTestClass::AddSongL ),
+ ENTRY( "RemoveSong", CCollectionHelperTestClass::RemoveSongL ),
+ ENTRY( "AddAbstractAlbum", CCollectionHelperTestClass::AddAbstractAlbumL ),
+ ENTRY( "RemoveAbstractAlbum", CCollectionHelperTestClass::RemoveAbstractAlbumL ),
+ ENTRY( "SetAbstractAlbum", CCollectionHelperTestClass::SetAbstractAlbumL ),
+ ENTRY( "SetSongAlbumArtist", CCollectionHelperTestClass::SetSongAlbumArtistL ),
+ ENTRY( "GetSongAlbumArtist", CCollectionHelperTestClass::GetSongAlbumArtistL ),
+ ENTRY( "SetAbstractAlbumArtist", CCollectionHelperTestClass::SetAbstractAlbumArtistL ),
+ ENTRY( "GetAbstractAlbumArtist", CCollectionHelperTestClass::GetAbstractAlbumArtistL ),
+ ENTRY( "UpdateAbstractAlbumName", CCollectionHelperTestClass::UpdateAbstractAlbumNameL ),
+ ENTRY("GetAbstractAlbumAndSongs",CCollectionHelperTestClass::GetAbstractAlbumAndSongsL),
+ ENTRY( "RenameAbstractAlbum", CCollectionHelperTestClass::RenameAbstractAlbumL ),
ENTRY( "CloseUiHelper", CCollectionHelperTestClass::CloseUiHelperL ),
ENTRY( "CloseHelper", CCollectionHelperTestClass::CloseHelperL ),
ENTRY( "CloseCachedHelper", CCollectionHelperTestClass::CloseCachedHelperL ),
@@ -511,6 +524,640 @@
return result;
}
+
+
+//Removing song from collection
+//By calling CMPXCollectionCachedHelper API RemoveL
+TInt CCollectionHelperTestClass::RemoveSongL(CStifItemParser& /*aItem*/)
+ {
+ FTRACE(FPrint(_L("CCollectionHelperTest::RemoveSongL")));
+ TRAPD(result, iCachedHelper->RemoveL(KFileWmaSong, EMPXSong));
+ iLog->Log(_L("CCollectionHelperTestClass::RemoveSong done with result=[%d]"), result);
+ return result;
+ }
+
+//Removing AbstractAlbum from collection
+//By calling CMPXCollectionCachedHelper API RemoveL
+//precondition: e:\\data\\sounds\\digital\\1.alb on test HW
+//output: 1.alb is delete from MPX DB
+TInt CCollectionHelperTestClass::RemoveAbstractAlbumL(CStifItemParser& /*aItem*/)
+ {
+ FTRACE(FPrint(_L("CCollectionHelperTest::RemoveAbstractAlbumL")));
+ TRAPD(result, iCachedHelper->RemoveL(KAbstractalbum1, EMPXAbstractAlbum));
+ iLog->Log(_L("CCollectionHelperTestClass::RemoveAbstractAlbumL done with result=[%d]"), result);
+ return result;
+ }
+//Adds song to the database
+//WMP to MTP step1
+//By calling CMPXCollectionCachedHelper API AddL
+//precondition: c:\\data\\sounds\\digital\\1.wma on test emulator
+//precondition: e:\\data\\sounds\\digital\\1.wma on test HW
+//output: 1.wma is added into MPX DB
+TInt CCollectionHelperTestClass::AddSongL(CStifItemParser& /*aItem*/ )
+ {
+ FTRACE(FPrint(_L("CCollectionHelperTest::AddSongL")));
+ //Does a record already exist for this abstractalbum?
+ //this is the part to check if the song already exist in db?
+ TInt result;
+ TPtrC name(KFileWmaSong);
+ TInt mediafound = FindMediaL(name, EMPXSong);
+
+ //media already in collection DB, no need to add
+ if (mediafound == 1)
+ {
+ return 0;
+ }
+
+ else if (mediafound == 0) //media not in collection DB, continue to add*/
+ {
+ // Create media properties for the song will added
+ iLog->Log(_L("Create media properties"));
+ RArray<TInt> contentIDs;
+ contentIDs.AppendL(KMPXMediaIdGeneral);
+ contentIDs.AppendL(KMPXMediaIdAudio);
+ contentIDs.AppendL(KMPXMediaIdMusic);
+ contentIDs.AppendL(KMPXMediaIdMTP);
+
+ CMPXMedia* media = CMPXMedia::NewL(contentIDs.Array());
+ CleanupStack::PushL(media);
+ contentIDs.Close();
+
+ // MPXMedia default types
+ media->SetTObjectValueL<TMPXGeneralType>(KMPXMediaGeneralType, EMPXItem);
+ media->SetTObjectValueL<TMPXGeneralCategory>(KMPXMediaGeneralCategory, EMPXSong);
+
+ // File Path
+ TParsePtrC parse(name);
+
+ media->SetTextValueL(KMPXMediaGeneralUri, name);
+ media->SetTextValueL(KMPXMediaGeneralDrive, parse.Drive());
+
+ // Title
+ media->SetTextValueL(KMPXMediaGeneralTitle, parse.NameAndExt());
+ // Comment
+ media->SetTextValueL(KMPXMediaGeneralComment, KNullDesC);
+ // Artist
+ media->SetTextValueL(KMPXMediaMusicArtist, KNullDesC);
+ // Album
+ media->SetTextValueL(KMPXMediaMusicAlbum, KNullDesC);
+ //AlbumArtist
+ media->SetTextValueL(KMPXMediaMusicAlbumArtist, KAlbumArtistShort);
+ // Track
+ media->SetTextValueL(KMPXMediaMusicAlbumTrack, KNullDesC);
+ // Genre
+ media->SetTextValueL(KMPXMediaMusicGenre, KNullDesC);
+ // Composer
+ media->SetTextValueL(KMPXMediaMusicComposer, KNullDesC);
+ // URL
+ media->SetTextValueL(KMPXMediaMusicURL, KNullDesC);
+ iLog->Log(_L("Default values set to Media"));
+
+ // Update MPX WMP Roundtrip Metadata of the media object
+ media->SetTObjectValueL<TBool>(KMPXMediaGeneralDeleted, EFalse);
+ media->SetTObjectValueL<TBool>(KMPXMediaGeneralModified, EFalse);
+ media->SetTObjectValueL<TBool>(KMPXMediaGeneralSynchronized, ETrue);
+
+ media->SetTObjectValueL<TUint>(KMPXMediaGeneralFlags, KMPXMediaGeneralFlagsIsInvalid|KMPXMediaGeneralFlagsIsCorrupted);
+
+ // Add new media to collection
+ TRAP(result, iCachedHelper->AddL(media));
+ FTRACE(FPrint(_L("CCollectionHelperTestClass::AddSongL, Media added into collection")));
+
+ CleanupStack::PopAndDestroy(media);
+ }
+ iLog->Log(_L("CCollectionHelperTestClass::AddSongL done with result=[%d]"), result);
+
+ return result;
+ }
+
+//Adds abstractalbum to the database, *.alb file
+//WMP to MTP step2
+//By calling CMPXCollectionCachedHelper API AddL
+//precondition: c:\\data\\sounds\\digital\\1.alb on test emulator
+//precondition: e:\\data\\sounds\\digital\\1.alb on test HW
+//output: 1.alb is added into MPX DB
+TInt CCollectionHelperTestClass::AddAbstractAlbumL(CStifItemParser& /*aItem*/)
+ {
+ FTRACE(FPrint(_L("CCollectionHelperTestClass::AddAbstractAlbumL")));
+ TInt result;
+ TPtrC name(KAbstractalbum1);
+ TInt mediafound = FindMediaL(name, EMPXAbstractAlbum);
+
+ //media already in collection DB, no need to add
+ if (mediafound == 1)
+ {
+ return 0;
+ }
+
+ else if(mediafound == 0) // media not in collection DB, continue to add*/
+ {
+ RArray<TInt> contentIDs;
+ contentIDs.AppendL(KMPXMediaIdGeneral);
+
+ CMPXMediaArray* abstractalbumArray = CMPXMediaArray::NewL();
+ CleanupStack::PushL(abstractalbumArray);
+
+ CMPXMedia* media = CMPXMedia::NewL(contentIDs.Array());
+ CleanupStack::PushL(media);
+ contentIDs.Close();
+
+ // MPXMedia default types
+ media->SetTObjectValueL<TMPXGeneralType>(KMPXMediaGeneralType, EMPXItem);
+ //EMPXAbstractAlbum is the new category added for non-embedded art
+ media->SetTObjectValueL<TMPXGeneralCategory>(KMPXMediaGeneralCategory, EMPXAbstractAlbum);
+
+ // File Path
+ media->SetTextValueL(KMPXMediaGeneralUri, name);
+ TParsePtrC parse(name);
+ media->SetTextValueL(KMPXMediaGeneralDrive, parse.Drive());
+ media->SetTextValueL(KMPXMediaGeneralTitle, parse.Name());
+
+ //AlbumArtist
+ media->SetTextValueL(KMPXMediaMusicAlbumArtist, KAlbumArtistShort);
+ media->SetTObjectValueL<TBool>(KMPXMediaGeneralSynchronized, ETrue);
+ media->SetTObjectValueL( KMPXMediaMTPSampleDataFlag, EFalse );
+ media->SetCObjectValueL(KMPXMediaArrayContents, abstractalbumArray);
+ media->SetTObjectValueL(KMPXMediaArrayCount, abstractalbumArray->Count());
+
+ // Add new media to collection
+ TRAP( result, iCachedHelper->AddL(media));
+ CleanupStack::PopAndDestroy(media);
+
+ // Clear the array
+ CleanupStack::PopAndDestroy(abstractalbumArray);
+ }
+ iLog->Log(_L("CCollectionHelperTestClass::AddAbstractAlbumL done with result=[%d]"), result);
+ return result;
+ }
+
+//Associate abstractalbum with songs
+//WMP to MTP step3
+//By calling CMPXCollectionCachedHelper API SetL
+//precondition on emulator: c:\\data\\sounds\\digital\\1.wma
+// c:\\data\\sounds\\digital\\1.alb
+//precondition on HW : f:\\1.wma
+// f:\\1.alb
+//output: 1.wma and 1.alb is associated
+TInt CCollectionHelperTestClass::SetAbstractAlbumL(CStifItemParser& /*aItem*/)
+ {
+ FTRACE(FPrint(_L("CCollectionHelperTest::SetAbstractAlbumL")));
+
+ CMPXMediaArray* mediaArray = CMPXMediaArray::NewL();
+ CleanupStack::PushL(mediaArray);
+ //add songs to media array
+ AttachSongsL(mediaArray, KFileWmaSong());
+ iLog->Log(_L("song added to abstractalbumArray, mediaArray->Count()=%d"), mediaArray->Count() );
+ RArray<TInt> contentIDs;
+ contentIDs.AppendL(KMPXMediaIdGeneral);
+
+ CMPXMedia* abstractalbumMedia = CMPXMedia::NewL(contentIDs.Array());
+ CleanupStack::PushL(abstractalbumMedia);
+ contentIDs.Close();
+
+ abstractalbumMedia->SetTObjectValueL(KMPXMediaGeneralType, EMPXItem);
+ abstractalbumMedia->SetTObjectValueL(KMPXMediaGeneralCategory, EMPXAbstractAlbum);
+
+ abstractalbumMedia->SetTextValueL(KMPXMediaGeneralUri, KAbstractalbum1());
+
+ TParsePtrC parse(KAbstractalbum1());
+ abstractalbumMedia->SetTextValueL(KMPXMediaGeneralDrive, parse.Drive());
+ abstractalbumMedia->SetTObjectValueL<TBool>(KMPXMediaGeneralSynchronized, ETrue);
+
+ abstractalbumMedia->SetCObjectValueL(KMPXMediaArrayContents, mediaArray);
+ abstractalbumMedia->SetTObjectValueL(KMPXMediaArrayCount, mediaArray->Count());
+
+ TRAPD( result, iCachedHelper->SetL(abstractalbumMedia));
+ CleanupStack::PopAndDestroy(abstractalbumMedia);
+
+ // Clear the array
+ CleanupStack::PopAndDestroy(mediaArray);
+ iLog->Log(_L("CCollectionHelperTestClass::SetAbstractAlbumL done with result=[%d]"), result);
+
+ return result;
+}
+
+//Update AlbumArtist field in Music table
+//By calling CMPXCollectionCachedHelper API SetL
+//precondition on emulator: c:\\data\\sounds\\digital\\1.wma
+//precondition on HW: f:\\1.wma
+//output: MUSIC.AlbumArtist field of song 1.wma is changed
+TInt CCollectionHelperTestClass::SetSongAlbumArtistL(CStifItemParser& /*aItem*/)
+ {
+ FTRACE(FPrint(_L("CCollectionHelperTest::SetSongAlbumArtistL")));
+
+ CMPXMedia* media = NULL;
+
+ // Creat media properties for the song
+ RArray<TInt> contentIDs;
+ contentIDs.AppendL( KMPXMediaIdGeneral );
+ contentIDs.AppendL( KMPXMediaIdAudio );
+ contentIDs.AppendL( KMPXMediaIdMusic );
+ contentIDs.AppendL( KMPXMediaIdMTP );
+
+ media = CMPXMedia::NewL( contentIDs.Array() );
+ CleanupStack::PushL( media ); // + media
+ contentIDs.Close();
+
+ media->SetTObjectValueL<TMPXGeneralCategory>(
+ KMPXMediaGeneralCategory,
+ EMPXSong );
+
+ // MPXMedia default types
+ media->SetTObjectValueL<TMPXGeneralType>( KMPXMediaGeneralType, EMPXItem );
+
+ // Get file path
+ media->SetTextValueL( KMPXMediaGeneralUri, KFileWmaSong() ); //wma test file
+
+ media->SetTextValueL( KMPXMediaGeneralDrive, KStoreRoot() );
+ media->SetTextValueL( KMPXMediaMusicAlbumArtist, KAlbumArtistShort());
+
+ TRAPD( result, iCachedHelper->SetL(media));
+
+ CleanupStack::PopAndDestroy( media ); // - media
+ iLog->Log(_L("CCollectionHelperTestClass::SetSongAlbumArtistL done with result=[%d]"), result);
+
+ return result;
+}
+//Retrive MUSIC.AlbumArtist field
+//By calling CMPXCollectionCachedHelper GetL
+//precondition on emulator: c:\\data\\sounds\\digital\\1.wma
+//precondition on HW: f:\\1.wma
+//output: song 1.wma is returned and MUSIC.AlbumArtist field of song 1.wma is retrived.
+TInt CCollectionHelperTestClass::GetSongAlbumArtistL(CStifItemParser& /*aItem*/)
+{
+ FTRACE(FPrint(_L("CCollectionHelperTest::GetSongAlbumArtistL")));
+ TMPXGeneralCategory category = EMPXSong;
+ // CMPXMedia* foundMedia= NULL;
+
+ const CMPXMedia& foundMedia = iCachedHelper->GetL( KFileWmaSong(), category );
+
+ if (foundMedia.IsSupported(KMPXMediaMusicAlbumArtist))
+ {
+ const TDesC& albumartist = foundMedia.ValueText( KMPXMediaMusicAlbumArtist );
+ }
+ iLog->Log(_L("CCollectionHelperTestClass::GetSongAlbumArtistL done "));
+
+ return 1;
+}
+
+
+
+//Update ABSTRACTALBUM.AlbumArtist
+//Update AlbumArtist field in Abstractalbum table
+//By calling CMPXCollectionCachedHelper API SetL
+//precondition on emulator: c:\\data\\sounds\\digital\\1.alb
+//precondition on HW: f:\\1.alb
+//output: ABSTRACTALBUM.AlbumArtist field of abstractalbum 1.alb is changed
+TInt CCollectionHelperTestClass::SetAbstractAlbumArtistL(CStifItemParser& /*aItem*/)
+ {
+ FTRACE(FPrint(_L("CCollectionHelperTest::SetAbstractAlbumArtistL")));
+
+ CMPXMedia* media = NULL;
+
+ RArray<TInt> contentIDs;
+ contentIDs.AppendL( KMPXMediaIdGeneral );
+
+ media = CMPXMedia::NewL( contentIDs.Array() );
+ CleanupStack::PushL( media ); // + media
+ contentIDs.Close();
+ media->SetTObjectValueL<TMPXGeneralCategory>( KMPXMediaGeneralCategory,
+ EMPXAbstractAlbum );
+ media->SetTObjectValueL<TMPXGeneralType>( KMPXMediaGeneralType, EMPXItem );
+
+ media->SetTextValueL( KMPXMediaGeneralUri, KAbstractalbum1() );
+ media->SetTextValueL( KMPXMediaGeneralDrive, KStoreRoot() );
+
+ media->SetTextValueL( KMPXMediaMusicAlbumArtist, KAlbumArtistShort() );
+
+ TRAPD( result, iCachedHelper->SetL(media));
+
+ CleanupStack::PopAndDestroy(media);
+ iLog->Log(_L("CCollectionHelperTestClass::SetAbstractAlbumArtistL done with result=[%d]"), result);
+
+
+ return result;
+}
+
+//Retrieve ABSTRACTALBUM.AlbumArtist
+//By calling CMPXCollectionCachedHelper API GetL
+//precondition on emulator: c:\\data\\sounds\\digital\\1.alb
+//precondition on HW: f:\\1.alb
+//output: abstractalbum 1.alb is returned and ABSTRACTALBUM.AlbumArtist field of 1.alb is retrived.
+TInt CCollectionHelperTestClass::GetAbstractAlbumArtistL(CStifItemParser& /*aItem*/)
+ {
+ FTRACE(FPrint(_L("CCollectionHelperTest::GetAbstractAlbumArtistL")));
+ TMPXGeneralCategory category = EMPXAbstractAlbum;
+ const CMPXMedia& foundMedia = iCachedHelper->GetL( KAbstractalbum1(), category ); //wma test file
+
+
+ //print out foundMedia attributes
+ if (foundMedia.IsSupported(KMPXMediaMusicAlbumArtist))
+ {
+ iLog->Log(_L("CCollectionHelperTestClass::GetAbstractAlbumArtistL, ABSTRACTALBUM.AlbumArtist retrived"));
+
+
+
+
+ const TDesC& albumartist = foundMedia.ValueText( KMPXMediaMusicAlbumArtist );
+
+ }
+
+ if (foundMedia.IsSupported(KMPXMediaGeneralTitle))
+ {
+
+
+ // HBufC* albumartist;
+ // albumartist = foundMedia.ValueText( KMPXMediaMusicAlbumArtist ).AllocLC(); // + data
+ const TDesC& name = foundMedia.ValueText( KMPXMediaGeneralTitle );
+ iLog->Log(_L("CCollectionHelperTestClass::GetAbstractAlbumArtistL, ABSTRACTALBUM.name retrived"));
+
+
+
+ }
+ if (foundMedia.IsSupported(KMPXMediaGeneralUri))
+ {
+
+
+ // HBufC* albumartist;
+ // albumartist = foundMedia.ValueText( KMPXMediaMusicAlbumArtist ).AllocLC(); // + data
+ const TDesC& uri = foundMedia.ValueText( KMPXMediaGeneralUri );
+ iLog->Log(_L("CCollectionHelperTestClass::GetAbstractAlbumArtistL, ABSTRACTALBUM.uri retrived"));
+
+ }
+ iLog->Log(_L("CCollectionHelperTestClass::GetAbstractAlbumArtistL done"));
+ return 1;
+ }
+
+
+//Update ABSTRACTALBUM.Name
+//Update Name field in Abstractalbum table
+//By calling CMPXCollectionCachedHelper API SetL
+//precondition on emulator: c:\\data\\sounds\\digital\\1.alb
+//precondition on HW: f:\\1.alb
+//output: ABSTRACTALBUM.name field of 1.alb is changed.
+TInt CCollectionHelperTestClass::UpdateAbstractAlbumNameL(CStifItemParser& /*aItem*/)
+ {
+ FTRACE(FPrint(_L("CCollectionHelperTest::UpdateAbstractAlbumNameL")));
+ CMPXMedia* media = NULL;
+
+ // Creat media properties for the song
+ RArray<TInt> contentIDs;
+ contentIDs.AppendL( KMPXMediaIdGeneral );
+
+ media = CMPXMedia::NewL( contentIDs.Array() );
+
+ CleanupStack::PushL( media ); // + media
+ contentIDs.Close(); //- contentIDs
+
+ media->SetTObjectValueL<TMPXGeneralCategory>(
+ KMPXMediaGeneralCategory,
+ EMPXAbstractAlbum );
+
+ media->SetTObjectValueL<TMPXGeneralType>( KMPXMediaGeneralType, EMPXItem );
+
+ media->SetTextValueL( KMPXMediaGeneralUri, KAbstractalbum1() );
+ media->SetTextValueL( KMPXMediaGeneralDrive, KStoreRoot() );
+
+ //media->SetTextValueL( KMPXMediaMusicAlbumArtist, KAbstractAlbumName() );
+ media->SetTextValueL( KMPXMediaGeneralTitle, KAbstractAlbumName() );
+ // media->SetTextValueL( KMPXMediaMusicAlbumArtFileName, KNewAbstractAlbumName() );
+
+ TRAPD( result, iCachedHelper->SetL(media));
+ CleanupStack::PopAndDestroy(media); // - media
+
+ iLog->Log(_L("CCollectionHelperTestClass::UpdateAbstractAlbumNameL, done with result[%d]"), result);
+ return result;
+}
+
+
+//Find all abstractalbums on KStoreRoot
+//Find all songs associated with the found Abstractalbums
+//By calling CMPXCollectionCachedHelper API GetL
+//precondition on emulator: c:\\data\\sounds\\digital\\1.wma
+// c:\\data\\sounds\\digital\\1.alb
+//1.wma and 1.alb are associated
+//precondition on HW : f:\\1.wma
+// f:\\1.alb
+//1.wma and 1.alb are associated
+//all AbstractAlbum on drive c: (e:) is returned, all songs associated with the returned AbstractAlbum are returned.
+TInt CCollectionHelperTestClass::GetAbstractAlbumAndSongsL(CStifItemParser& /*aItem*/)
+ {
+ FTRACE(FPrint(_L("CCollectionHelperTest::GetAlbumAndSongsL")));
+ TUint32 abstractalbumId(0);
+ RArray<TInt> contentIDs;
+ contentIDs.AppendL(KMPXMediaIdGeneral);
+
+ CMPXMedia* searchMedia = CMPXMedia::NewL(contentIDs.Array());
+ CleanupStack::PushL(searchMedia);
+ contentIDs.Close();
+
+ searchMedia->SetTObjectValueL(KMPXMediaGeneralType, EMPXItem);
+ searchMedia->SetTObjectValueL(KMPXMediaGeneralCategory, EMPXAbstractAlbum);
+ searchMedia->SetTextValueL(KMPXMediaGeneralDrive, KStoreRoot());
+
+ RArray<TMPXAttribute> abstractalbumAttributes;
+ CleanupClosePushL(abstractalbumAttributes);
+ abstractalbumAttributes.AppendL(KMPXMediaGeneralId);
+ abstractalbumAttributes.AppendL(KMPXMediaGeneralTitle);
+ abstractalbumAttributes.AppendL(KMPXMediaGeneralUri);
+
+ //foundMedia will hold all .alb on KStoreRoot()
+ CMPXMedia* foundMedia = NULL;
+ TRAPD( err, foundMedia = iCachedHelper->FindAllL(
+ *searchMedia, abstractalbumAttributes.Array()));
+
+ iLog->Log(_L("CCollectionHelperTestClass::GetAlbumAndSongsL, foundMedia assigned from FindAllL"));
+
+ CleanupStack::PopAndDestroy(&abstractalbumAttributes);
+ CleanupStack::PopAndDestroy(searchMedia);
+ CleanupStack::PushL(foundMedia); //+ foundMedia
+
+ if ( err != KErrNone )
+ {
+ iLog->Log(_L("CCollectionHelperTestClass::GetAlbumAndSongsL, err = [%d]"), err );
+ iCachedHelper->Close();
+ iCachedHelper = NULL;
+ User::Leave( KErrGeneral );
+ }
+
+ if (!foundMedia->IsSupported(KMPXMediaArrayCount))
+ {
+ User::Leave(KErrNotSupported);
+ }
+
+ TInt foundItemCount = *foundMedia->Value<TInt>(KMPXMediaArrayCount);
+ iLog->Log(_L("CCollectionHelperTestClass::GetAlbumAndSongsL, foundItemCount=%d"), foundItemCount );
+
+ CMPXMediaArray* foundArray =
+ foundMedia->Value<CMPXMediaArray>(KMPXMediaArrayContents);
+ CleanupStack::PopAndDestroy(foundMedia);
+
+ for (TInt j = 0; j < foundItemCount; ++j)
+ {
+ CMPXMedia* abstractalbumMedia = CMPXMedia::NewL(*(*foundArray)[j]);
+ CleanupStack::PushL(abstractalbumMedia);
+
+ //to print out founded media attributes
+ if (abstractalbumMedia->IsSupported(KMPXMediaGeneralTitle))
+ {
+ const TDesC& name = abstractalbumMedia->ValueText( KMPXMediaGeneralTitle );
+ iLog->Log(_L("CCollectionHelperTestClass::GetAlbumAndSongsL, found abstractalbumName = [%s]"), name );
+ }
+
+ if (abstractalbumMedia->IsSupported(KMPXMediaGeneralId))
+ {
+ abstractalbumId = abstractalbumMedia->ValueTObjectL<TMPXItemId>(KMPXMediaGeneralId);
+ abstractalbumMedia->ValueTObjectL<TMPXItemId>(KMPXMediaGeneralId);
+ }
+
+ // find the media object that contains a list of songs in the abstractalbum
+ RArray<TInt> contentIDs;
+ contentIDs.AppendL(KMPXMediaIdGeneral);
+
+ CMPXMedia* searchMediaSong = CMPXMedia::NewL(contentIDs.Array());
+ CleanupStack::PushL(searchMediaSong);
+ contentIDs.Close();
+
+ searchMediaSong->SetTObjectValueL(KMPXMediaGeneralType, EMPXGroup);
+
+ searchMediaSong->SetTObjectValueL(KMPXMediaGeneralCategory, EMPXSong);
+ searchMediaSong->SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, abstractalbumId);
+
+ RArray<TMPXAttribute> songAttributes;
+ CleanupClosePushL(songAttributes);
+ songAttributes.AppendL(KMPXMediaGeneralId);
+ songAttributes.AppendL(KMPXMediaGeneralUri);
+
+ //search from MPX collection to get all songs associated with .alb
+ CMPXMedia* foundSongs = NULL;
+ TRAPD( err, foundSongs = iCachedHelper->FindAllL(
+ *searchMediaSong, songAttributes.Array()));
+
+ CleanupStack::PopAndDestroy(&songAttributes);
+ CleanupStack::PopAndDestroy(searchMediaSong);
+ CleanupStack::PopAndDestroy(abstractalbumMedia);
+
+ CleanupStack::PushL( foundSongs ); // + foundSongs
+ if ( err != KErrNone )
+ {
+ iLog->Log(_L("CCollectionHelperTestClass::GetAlbumAndSongsL, err = [%d]"), err );
+ iCachedHelper->Close();
+ iCachedHelper = NULL;
+ User::Leave( KErrGeneral );
+ }
+
+ if (!foundSongs->IsSupported(KMPXMediaArrayCount))
+ {
+ User::Leave(KErrNotSupported);
+ }
+
+ // Number of references
+ TInt numOfSongsRefs = *foundSongs->Value<TInt>(KMPXMediaArrayCount);
+ iLog->Log(_L("CCollectionHelperTestClass::GetAlbumAndSongsL, numOfSongsRefs=%d"), numOfSongsRefs );
+ CleanupStack::PopAndDestroy( foundSongs ); // - foundSong
+ }
+ return 1;
+ }
+
+
+//By calling CMPXCollectionCachedHelper API RenameL
+//precondition on emulator: c:\\data\\sounds\\digital\\1.wma
+// c:\\data\\sounds\\digital\\1.alb
+//1.wma and 1.alb are associated
+//precondition on HW : f:\\1.wma
+// f:\\1.alb
+//output: 1.alb is renamed to 2.alb and all songs associated with 1.alb are updated in MUSIC table
+TInt CCollectionHelperTestClass::RenameAbstractAlbumL(CStifItemParser& /*aItem*/)
+ {
+ TRAPD( result, iCachedHelper->RenameL( KAbstractalbum1, KAbstractalbum2, EMPXAbstractAlbum ) );
+ iLog->Log(_L("CCollectionHelperTestClass::RenameAbstractAlbumL, done with result=[%d]"));
+
+ return result;
+ }
+
+//Helper function for Finding in the MPX DB
+//By calling CMPXCollectionCachedHelper API FindAllL
+//output: all media with filename: aPath and aCategory is returned
+TInt CCollectionHelperTestClass::FindMediaL(const TDesC& aPath, TMPXGeneralCategory aCategory)
+{
+ FTRACE(FPrint(_L("CCollectionHelperTestClass::FindL")));
+ // Check does a record already exist for this aPath(URI)?
+ RArray<TInt> contentIDs;
+ contentIDs.AppendL( KMPXMediaIdGeneral );
+
+ CMPXMedia* searchMedia = CMPXMedia::NewL( contentIDs.Array() );
+ CleanupStack::PushL( searchMedia ); // + searchMedia
+ contentIDs.Close();
+ searchMedia->SetTObjectValueL( KMPXMediaGeneralType, EMPXItem );
+ searchMedia->SetTObjectValueL( KMPXMediaGeneralCategory, aCategory );
+ searchMedia->SetTextValueL( KMPXMediaGeneralUri, aPath );
+
+//note: some of the attributes are not needed
+ RArray<TMPXAttribute> mediaAttributes;
+ CleanupClosePushL( mediaAttributes ); // + mediaAttributes
+ mediaAttributes.AppendL( KMPXMediaGeneralId );
+ mediaAttributes.AppendL( KMPXMediaGeneralTitle );
+ mediaAttributes.AppendL( KMPXMediaGeneralUri );
+
+ CMPXMedia* foundMedia = iCachedHelper->FindAllL( *searchMedia,
+ mediaAttributes.Array() );
+
+ CleanupStack::PopAndDestroy( &mediaAttributes ); // - mediaAttributes
+ CleanupStack::PopAndDestroy( searchMedia ); // - searchMedia
+ CleanupStack::PushL( foundMedia ); // + foundMedia
+
+ if ( !foundMedia->IsSupported( KMPXMediaArrayCount ) )
+ {
+ CleanupStack::PopAndDestroy( foundMedia ); // - foundMedia
+ return KErrNotSupported;
+ }
+ TInt foundItemCount = *foundMedia->Value<TInt>( KMPXMediaArrayCount );
+ CleanupStack::PopAndDestroy( foundMedia ); // - foundMedia
+
+ iLog->Log(_L("CCollectionHelperTestClass::FindMediaL, foundItemCount=[%d]"), foundItemCount);
+ if ( foundItemCount >1) //more than 1 same item in collection
+ {
+ iLog->Log(_L("CCollectionHelperTestClass::FindMediaL, error, find more than 1 same media in collection"));
+ return KErrGeneral;
+ }
+
+ else if ( foundItemCount ==0 || foundItemCount ==1 ) //no such item in collection
+ {
+ iLog->Log(_L("CCollectionHelperTestClass::FindMediaL, error, no this item in collection"));
+ return foundItemCount;
+ }
+
+ return KErrNone;
+ }
+
+
+
+//Helper function for appending songs for SetAbstractAlbumL()
+void CCollectionHelperTestClass::AttachSongsL(CMPXMediaArray* aAbstractAlbumArray, const TDesC& aPath)
+{
+ FTRACE(FPrint(_L("CCollectionHelperTestClass::AttachSongsL")));
+ RArray<TInt> contentIDs;
+ contentIDs.AppendL(KMPXMediaIdGeneral);
+ contentIDs.AppendL(KMPXMediaIdAudio);
+ contentIDs.AppendL(KMPXMediaIdMusic);
+ contentIDs.AppendL(KMPXMediaIdMTP);
+ CMPXMedia* media = CMPXMedia::NewL(contentIDs.Array());
+ CleanupStack::PushL(media);
+ contentIDs.Close();
+
+ // MPXMedia default types
+ media->SetTObjectValueL<TMPXGeneralType>(KMPXMediaGeneralType, EMPXItem);
+ media->SetTObjectValueL<TMPXGeneralCategory>(KMPXMediaGeneralCategory, EMPXSong);
+ // File Path
+ TParsePtrC parse(aPath);
+ media->SetTextValueL(KMPXMediaGeneralUri, aPath);
+ media->SetTextValueL(KMPXMediaGeneralDrive, parse.Drive());
+
+ // Add media into array contents
+ aAbstractAlbumArray->AppendL(media);
+ CleanupStack::Pop(media);
+}
+
// -----------------------------------------------------------------------------
// CCollectionHelperTestClass::CloseUiHelperL()
// Returns: Symbian OS errors.
--- a/mmappfw_plat/collection_helper_api/tsrc/conf/CollectionHelperTestClass.cfg Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/collection_helper_api/tsrc/conf/CollectionHelperTestClass.cfg Wed Jun 23 17:51:16 2010 +0100
@@ -66,4 +66,165 @@
[Endtest]
+[Test]
+title 4. Add Song
+create CollectionHelperTestClass test
+test OpenCollectionUtility
+waittestclass test
+test NewCachedHelper
+test AddSong
+test CloseCachedHelper
+delete test
+pause 1000
+[Endtest]
+[Test]
+title 5. Remove Song
+create CollectionHelperTestClass test
+test OpenCollectionUtility
+waittestclass test
+test NewCachedHelper
+test RemoveSong
+test CloseCachedHelper
+delete test
+pause 1000
+[Endtest]
+
+[Test]
+title 6. AddAbstractAlbum
+create CollectionHelperTestClass test
+test OpenCollectionUtility
+waittestclass test
+test NewCachedHelper
+test AddAbstractAlbum
+test CloseCachedHelper
+delete test
+pause 1000
+[Endtest]
+
+[Test]
+title 7. Remove AbstractAlbum
+create CollectionHelperTestClass test
+test OpenCollectionUtility
+waittestclass test
+test NewCachedHelper
+test RemoveAbstractAlbum
+test CloseCachedHelper
+delete test
+pause 1000
+[Endtest]
+RemoveAbstractAlbumL
+
+
+[Test]
+title 8. Associate Song with AbstractAlbum
+create CollectionHelperTestClass test
+test OpenCollectionUtility
+waittestclass test
+test NewCachedHelper
+test SetAbstractAlbum
+test CloseCachedHelper
+delete test
+pause 1000
+[Endtest]
+[Test]
+
+
+[Test]
+title 9. Set SongAlbumArtist
+create CollectionHelperTestClass test
+test OpenCollectionUtility
+waittestclass test
+test NewCachedHelper
+test SetSongAlbumArtist
+test CloseCachedHelper
+delete test
+pause 1000
+[Endtest]
+[Test]
+
+
+[Test]
+title 10. Get SongAlbumArtist
+create CollectionHelperTestClass test
+test OpenCollectionUtility
+waittestclass test
+test NewCachedHelper
+test GetSongAlbumArtist
+test CloseCachedHelper
+delete test
+pause 1000
+[Endtest]
+
+[Test]
+title 11. set AbstractAlbumArtist
+create CollectionHelperTestClass test
+test OpenCollectionUtility
+waittestclass test
+test NewCachedHelper
+test SetAbstractAlbumArtist
+test CloseCachedHelper
+delete test
+pause 1000
+[Endtest]
+[Test]
+
+[Test]
+title 12. Get AbstractAlbumArtist
+create CollectionHelperTestClass test
+test OpenCollectionUtility
+waittestclass test
+test NewCachedHelper
+test GetAbstractAlbumArtist
+test CloseCachedHelper
+delete test
+pause 1000
+[Endtest]
+[Test]
+
+
+[Test]
+title 13. Update AbstractAlbumName
+create CollectionHelperTestClass test
+test OpenCollectionUtility
+waittestclass test
+test NewCachedHelper
+test UpdateAbstractAlbumName
+test CloseCachedHelper
+delete test
+pause 1000
+[Endtest]
+
+
+title 14. Get AbstractAlbum and Songs
+create CollectionHelperTestClass test
+test OpenCollectionUtility
+waittestclass test
+test NewCachedHelper
+test GetAbstractAlbumAndSongs
+test CloseCachedHelper
+delete test
+pause 1000
+[Endtest]
+[Test]
+
+title 15. Rename AbstractAlbum
+create CollectionHelperTestClass test
+test OpenCollectionUtility
+waittestclass test
+test NewCachedHelper
+test RenameAbstractAlbum
+test CloseCachedHelper
+delete test
+pause 1000
+[Endtest]
+[Test]
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--- a/mmappfw_plat/collection_helper_api/tsrc/group/bld.inf Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/collection_helper_api/tsrc/group/bld.inf Wed Jun 23 17:51:16 2010 +0100
@@ -28,5 +28,3 @@
PRJ_TESTMMPFILES
#include "../CollectionHelperTestClass/group/bld.inf"
-
-PRJ_TESTMMPFILES
--- a/mmappfw_plat/collection_helper_api/tsrc/init/TestFramework.ini Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/collection_helper_api/tsrc/init/TestFramework.ini Wed Jun 23 17:51:16 2010 +0100
@@ -1,5 +1,5 @@
#
-# This is STIF initialization file
+# This is STIFTestFramework initialization file
# Comment lines start with '#'-character.
# See STIF TestFramework users guide.doc for instructions
@@ -29,15 +29,12 @@
#
# - File Creation Mode indicates test report overwriting if file exist.
# + OVERWRITE, Overwrites if the Test report file exist.
-# + APPEND, Continue logging after the old Test report information if
+# + APPEND, Continue logging after the old Test report information if
# report exist.
# - Sets a device reset module's dll name(Reboot).
# + If Nokia specific reset module is not available or it is not correct one
# StifHWResetStub module may use as a template for user specific reset
-# module.
-# - Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
-# DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
-#
+# module.
[Engine_Defaults]
@@ -46,8 +43,9 @@
CreateTestReport= YES # Possible values: YES or NO
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= TestReport_CollectionHelperTestClass
+#TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFilePath= c:\testing\log\
+TestReportFileName= TestReport
TestReportFormat= TXT # Possible values: TXT or HTML
TestReportOutput= FILE # Possible values: FILE or RDEBUG
@@ -55,14 +53,6 @@
DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-DisableMeasurement= stifmeasurementdisablenone # Possible values are:
- # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
- # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
- # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
- # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 0 # Default timeout value for each test case. In milliseconds
-UITestingSupport= YES
[End_Defaults]
# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
@@ -88,29 +78,28 @@
# In the simplest case it is enough to specify only the
# name of the test module when adding new test module
-[New_Module]
-ModuleName= testscripter
-TestCaseFile= c:\testframework\CollectionHelperTestClass.cfg
-[End_Module]
+#[New_Module]
+#ModuleName= demomodule
+#[End_Module]
# Load testmoduleXXX, optionally with initialization file and/or test case files
-#[New_Module]
-#ModuleName= testmodulexxx
+[New_Module]
+ModuleName= testscripter
#TestModuleXXX used initialization file
#IniFile= c:\testframework\init.txt
#TestModuleXXX used configuration file(s)
-#TestCaseFile= c:\testframework\testcases1.cfg
-#TestCaseFile= c:\testframework\testcases2.cfg
-#TestCaseFile= c:\testframework\manualtestcases.cfg
-
-#[End_Module]
+#TestCaseFile= c:\testframework\epos_omasuplpostestercfg.cfg
+TestCaseFile= c:\testframework\CollectionHelperTestClass.cfg
+[End_Module]
# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIF logging overwrite parameters for Logger.
+# Set STIFTestFramework logging overwrite parameters for Logger.
# Hardware and emulator environment logging path and styles can
# be configured from here to overwrite the Logger's implemented values.
#
@@ -155,40 +144,33 @@
# + NO, No line break(s).
#
# - Will event ranking include to the log file.
-# + YES, Event ranking number added to each line in log file(s). Ranking number
+# + YES, Event ranking number added to each line in log file(s). Ranking number
# depends on environment's tics, for example(includes time stamp also)
# '012 12.Nov.2003 115958 LOGGING INFO'
# + NO, No event ranking.
#
-# - Will write log file in unicode format.
-# + YES, Log file will be written in unicode format
-# + NO, Log will be written as normal, not unicode, file.
-#
[Logger_Defaults]
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#CreateLogDirectories= YES # Possible values: YES or NO
+#CreateLogDirectories= YES # Possible values: YES or NO
#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML # Possible values: TXT or HTML
-#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
+#EmulatorFormat= HTML # Possible values: TXT or HTML
+#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
#HardwareBasePath= D:\LOGS\TestFramework\
-#HardwareFormat= HTML # Possible values: TXT or HTML
-#HardwareOutput= FILE # Possible values: FILE or RDEBUG
+#HardwareFormat= HTML # Possible values: TXT or HTML
+#HardwareOutput= FILE # Possible values: FILE or RDEBUG
-#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-#ThreadIdToLogFile= YES # Possible values: YES or NO
-#WithTimeStamp= YES # Possible values: YES or NO
-#WithLineBreak= YES # Possible values: YES or NO
-#WithEventRanking= YES # Possible values: YES or NO
+#ThreadIdToLogFile= YES # Possible values: YES or NO
+#WithTimeStamp= YES # Possible values: YES or NO
+#WithLineBreak= YES # Possible values: YES or NO
+#WithEventRanking= YES # Possible values: YES or NO
-#FileUnicode= YES # Possible values: YES or NO
-#AddTestCaseTitle= YES # Possible values: YES or NO
[End_Logger_Defaults]
# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--- a/mmappfw_plat/group/bld.inf Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/group/bld.inf Wed Jun 23 17:51:16 2010 +0100
@@ -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.8 %
*
*/
@@ -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"
@@ -45,3 +46,4 @@
#endif
#include "../playback_helper_api/group/bld.inf"
#include "../videoplaylist_utility_api/group/bld.inf"
+#include "../qt_telephony_multimedia_service_api/group/bld.inf"
--- a/mmappfw_plat/harvester_collection_mediator_api/inc/mpxcollectionmediator.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/harvester_collection_mediator_api/inc/mpxcollectionmediator.h Wed Jun 23 17:51:16 2010 +0100
@@ -89,6 +89,14 @@
IMPORT_C void AddItemL( CMPXMedia*& aMediaProp );
/**
+ * Add a media to the collection asynchronously.
+ *
+ * @param aMediaProp media item.
+ * @leave KErrArgument leave if not a supported media type
+ */
+ IMPORT_C void AddItemAsyncL( CMPXMedia*& aMediaProp );
+
+ /**
* Add a list of files to the collection db.
* @since S60 v3.2.3
* @param aArray list of media item.
--- a/mmappfw_plat/harvester_collection_mediator_api/tsrc/HarvesterCollectionMediatorTest/group/HarvesterCollectionMediatorTest.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/harvester_collection_mediator_api/tsrc/HarvesterCollectionMediatorTest/group/HarvesterCollectionMediatorTest.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -49,7 +49,11 @@
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
+LIBRARY mpxcollectionutility.lib
+LIBRARY mpxcollectionengine.lib
+LIBRARY mpxcollectionhelper.lib
+LIBRARY mpxcommon.lib
LANG SC
--- a/mmappfw_plat/harvester_collection_mediator_api/tsrc/group/bld.inf Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/harvester_collection_mediator_api/tsrc/group/bld.inf Wed Jun 23 17:51:16 2010 +0100
@@ -29,4 +29,4 @@
PRJ_TESTMMPFILES
#include "../HarvesterCollectionMediatorTest/group/bld.inf"
-PRJ_TESTMMPFILES
+
--- a/mmappfw_plat/harvester_metadata_extractor_api/group/bld.inf Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/harvester_metadata_extractor_api/group/bld.inf Wed Jun 23 17:51:16 2010 +0100
@@ -25,3 +25,4 @@
PRJ_EXPORTS
../inc/mpxmetadataextractor.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxmetadataextractor.h)
+../inc/mpxmetadataextractorobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxmetadataextractorobserver.h)
--- a/mmappfw_plat/harvester_metadata_extractor_api/inc/mpxmetadataextractor.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/harvester_metadata_extractor_api/inc/mpxmetadataextractor.h Wed Jun 23 17:51:16 2010 +0100
@@ -19,13 +19,17 @@
#ifndef CMPXMETADATAEXTRACTOR_H
#define CMPXMETADATAEXTRACTOR_H
+#include <thumbnailmanager.h>
+#include <thumbnailmanagerobserver.h>
+
+// FORWARD DECLARATION
class CMPXMedia;
class CMPXCollectionPath;
-class CMetaDataUtility;
class CMPXFileInfoUtility;
class CMPXDrmMediaUtility;
-#include <thumbnailmanager.h>
-#include <thumbnailmanagerobserver.h>
+class MMPXMetadataExtractorObserver;
+class CMetaDataUtility;
+class CMetaDataFieldContainer;
/**
* Extracts metadata from a file.
@@ -33,7 +37,7 @@
* @lib mpxfilehandler.lib
*/
class CMPXMetadataExtractor : public CBase,
- public MThumbnailManagerObserver
+ public MThumbnailManagerObserver
{
public:
@@ -72,6 +76,27 @@
*/
IMPORT_C TInt ExtractAlbumArtL( CMPXMedia* aMedia );
+ /*
+ * Create a media object for a file. This is a asynchronous function.
+ * This function will leave with KErrAbort if still processing last request.
+ * Callback function is HandleCreateMediaComplete()
+ * @since 9.2
+ * @param aFile a fullpath to the file.
+ * @param aObs Metadata Extractor Observer
+ * @param aMetadataOnly extract metadata only or not. Default EFalse
+ */
+ IMPORT_C void CreateMediaAsyncL( const TDesC& aFile,
+ MMPXMetadataExtractorObserver* aObs,
+ TBool aMetadataOnly = EFalse );
+
+ /**
+ * Cancel request. This will empty the task array and stop the wait loop. This
+ * will cause the CreateMediaL() to finish more quickly. Also,
+ * all outstanding thumbnail requests are cancelled.
+ * @since 9.2
+ */
+ IMPORT_C void CancelRequest();
+
private: // New Functions:
/**
@@ -84,26 +109,14 @@
/**
* Function to go through the metadata entries.
* @since 3.2.3
- * @param aProp Media Properties to update.
- * @param aFile File name
*/
- void SetMediaPropertiesL( CMPXMedia& aProp,
- const TDesC& aFile );
+ void SetMediaPropertiesL();
/**
* Sets other media properties not found from metadata util.
* @since 3.2.3
- * @param aProp Media Properties to update.
- * @param aFile file name.
- * @param aMetadataOnly extract metadata only or not Default EFalse.
- * @param aFileHandle file handle to the file.
- * @param aFileErr file handle error if file could not be opened
*/
- void SetExtMediaPropertiesL( CMPXMedia& aProp,
- const TDesC& aFile,
- TBool aMetadataOnly,
- RFile& aFileHandle,
- TInt aFileErr );
+ void SetExtMediaPropertiesL();
/**
* Checks to see if a container type is supported.
@@ -151,22 +164,82 @@
static TInt TimeoutTimerCallback(TAny* aPtr);
/**
- * Get album art metadata.
- * @since 5.0
- * @param aMedia
- * @return error ID
- */
- TInt GetMediaAlbumArtL( CMPXMedia& aMedia,
- const TDesC& aFile );
-
- /**
* Add album art to media object.
* @since 5.0
* @param aMedia
*/
void AddMediaAlbumArtL( CMPXMedia& aMedia,
- const TDesC& aFile,
- TDesC8& aValue);
+ const TDesC& aFile );
+
+ /**
+ * Check if can send request to TNM or not.
+ * @since 5.0
+ *
+ */
+ void CheckBeforeSendRequest();
+
+ /**
+ * Cancel all outstanding thumbnail requests
+ * @since 9.2
+ *
+ */
+ void CancelAllThumbnailRequests();
+
+ /**
+ * Create media and set default data.
+ * @since 9.2
+ *
+ */
+ void DoCreateMediaL();
+
+ /**
+ * Execute task at index 0.
+ * @since 9.2
+ *
+ */
+ void ExecuteTaskL();
+
+ /**
+ * Cancel task timer.
+ */
+ void CancelTaskTimer();
+
+ /**
+ * Callback when the task timer expires.
+ */
+ static TInt TaskTimerCallback(TAny* aPtr);
+
+ /**
+ * Populate task array
+ * @since 9.2
+ */
+ void AddTasksL();
+
+ /**
+ * Opens the file
+ * @since 9.2
+ * @return system error
+ */
+ TInt OpenFile();
+
+ /**
+ * Handle task timer expired
+ * @since 9.2
+ */
+ void HandleTaskTimerExpired();
+
+ /**
+ * Clean up
+ * @since 9.2
+ */
+ void CleanUp();
+
+ /**
+ * Sets drm media properties
+ * @since 9.2
+ */
+ void SetDrmMediaPropertiesL(const CMetaDataFieldContainer& aMetaCont);
+
private:
@@ -183,6 +256,15 @@
void ConstructL();
private: // data
+ enum EMetadataExtractorTasks
+ {
+ ETaskCreateMedia,
+ ETaskAddMetadata,
+ ETaskAddExtMetadata,
+ ETaskAddAlbumArt,
+ ETaskCheckBeforeSend
+ };
+
CMetaDataUtility* iMetadataUtility; // extract metadata from file
CMPXDrmMediaUtility* iDrmMediaUtility; // extra drm data from file
CMPXFileInfoUtility* iFileInfoUtil; // extract duration/bitrate etc from file
@@ -193,8 +275,16 @@
CThumbnailManager* iTNManager;
CActiveSchedulerWait* iTNSyncWait; // wait loop use to sync thumbnail
CPeriodic* iTimer; // backup timer to stop wait loop
- TInt iOutstandingThumbnailRequest;
- TInt iTNMBlockCount;
+ RArray<TThumbnailRequestId> iArrayTNRequestId;
+ RArray<EMetadataExtractorTasks> iArrayTasks;
+ TBool iCancelled;
+ CPeriodic* iTaskTimer; // timer for task execution
+ MMPXMetadataExtractorObserver* iObs; // metadata extractor obserer
+ TFileName iFileName;
+ RFile iFile;
+ CMPXMedia* iMedia; // ownership transferred
+ TBool iMetadataOnly;
+ TInt iFileOpenError;
};
#endif // CMPXMETADATAEXTRACTOR_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/harvester_metadata_extractor_api/inc/mpxmetadataextractorobserver.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,43 @@
+/*
+* 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: Observer class for metadata extractor
+*
+*/
+
+
+#ifndef MMPXMETADATAEXTRACTOROBSERVER_H
+#define MMPXMETADATAEXTRACTOROBSERVER_H
+
+class CMPXMediaArray;
+
+/**
+ * Metadata Extractor observer
+ *
+ * @lib mpxfilehandler.lib
+ * @since S60 v9.2
+ */
+class MMPXMetadataExtractorObserver
+ {
+
+public:
+
+ /**
+ * Callback when the CreateMediaL() is completed.
+ * @param aMedia media with metadata populated. Ownership transferred.
+ * @param aError error
+ */
+ virtual void HandleCreateMediaComplete( CMPXMedia* aMedia, TInt aError ) = 0;
+ };
+
+#endif // MMPXMETADATAEXTRACTOROBSERVER_H
--- a/mmappfw_plat/harvester_server_api/group/bld.inf Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/harvester_server_api/group/bld.inf Wed Jun 23 17:51:16 2010 +0100
@@ -26,3 +26,4 @@
../inc/mpxharvestercommon.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxharvestercommon.h)
../inc/mpxharvesterserverdefs.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxharvesterserverdefs.h)
+../inc/mpxharvestercrkeys.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxharvestercrkeys.h)
--- a/mmappfw_plat/harvester_server_api/inc/mpxharvestercommon.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/harvester_server_api/inc/mpxharvestercommon.h Wed Jun 23 17:51:16 2010 +0100
@@ -69,7 +69,7 @@
EUSBMTPEndEvent, // MTP end event
EUSBMTPNotActiveEvent, // MTP selected but not active
ESystemEventMax, // End of event enum
- EPowerKeyEjectEvent // Power key eject mmc
+ EDiskDismountEvent // Disk dismount notification (MPX Harvester internal)
};
#endif // MPX_HARVESTER_COMMON_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/harvester_server_api/inc/mpxharvestercrkeys.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,49 @@
+/*
+* 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: MPX Harvester CenRep keys.
+*
+*/
+
+
+#ifndef MPXHARVESTERCRKEYS_H
+#define MPXHARVESTERCRKEYS_H
+
+
+// MPX Harvester Features Uid
+const TUid KCRUIDMpxHarvesterFeatures = { 0x101FFCD2 };
+
+// List of scan paths for the harvester
+const TInt KMpxHarvesterScanPathKey = 1;
+
+// List of blocked paths for the harvester
+const TInt KMpxHarvesterBlockPathKey = 2;
+
+// List of container types
+const TInt KMpxHarvesterContainerKey = 3;
+
+// List of folders to monitor for file changes
+const TInt KMpxHarvesterAutoScanDirectoryKey = 4;
+
+// Disable the podcasting feature in harvester 1=disabled 0=enabled
+const TInt KMpxHarvesterDisablePodcasting = 5;
+
+// Enable the Ram Drive feature.
+const TInt KMpxHarvesterEnableRamDisk = 6;
+
+// Minimum disk space in Mb on Ram Drive to allow copying of Harvester databases to the Ram Disk.
+const TInt KMpxHarvesterMaxAllowedRamDiskSpace = 7;
+
+#endif // MPXHARVESTERCRKEYS_H
+
+// End of file
--- a/mmappfw_plat/mpx_albumart_utility_api/inc/mpxalbumartutility.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_albumart_utility_api/inc/mpxalbumartutility.h Wed Jun 23 17:51:16 2010 +0100
@@ -21,7 +21,7 @@
#include <e32def.h>
#include <gdi.h>
-#include <metadatafield.hrh>
+#include <MetaDataField.hrh>
class CMPXMedia;
class CMPXImageUtil;
--- a/mmappfw_plat/mpx_base_view_plugins_api/group/bld.inf Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_base_view_plugins_api/group/bld.inf Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_common_api/inc/mpxclientlist.h Wed Jun 23 17:51:16 2010 +0100
@@ -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/mpxmediageneraldefs.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_common_api/inc/mpxmediageneraldefs.h Wed Jun 23 17:51:16 2010 +0100
@@ -451,7 +451,7 @@
EMPXFile,
EMPXImage,
EMPXVideo,
- EMPXRadio,
+ EMPXAbstractAlbum,
EMPXMessage,
EMPXTag,
EMPXCommand,
--- a/mmappfw_plat/mpx_common_api/inc/mpxmediamtpdefs.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_common_api/inc/mpxmediamtpdefs.h Wed Jun 23 17:51:16 2010 +0100
@@ -34,6 +34,8 @@
* Attributes supported for KMPXMediaIdMTP
*/
const TMPXAttributeData KMPXMediaMTPDrmStatus = {KMPXMediaIdMTP, 0x0001}; // TUint16
+const TMPXAttributeData KMPXMediaMTPSampleDataFlag = {KMPXMediaIdMTP, 0x0002}; // TBool
+const TMPXAttributeData KMPXMediaMTPSampleData = {KMPXMediaIdMTP, 0x0004}; // HBufC8*
const TMPXAttributeData KMPXMediaMTPAll = {KMPXMediaIdMTP, 0xffffffff};
#endif // MPXMEDIAMTPDEFS_H
--- a/mmappfw_plat/mpx_common_api/inc/mpxmediamusicdefs.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_common_api/inc/mpxmediamusicdefs.h Wed Jun 23 17:51:16 2010 +0100
@@ -44,6 +44,9 @@
const TMPXAttributeData KMPXMediaMusicOriginalAlbumArtFileName={KMPXMediaIdMusic,0x200}; // Text
const TMPXAttributeData KMPXMediaMusicAlbumArtThumbnail={KMPXMediaIdMusic,0x400}; // CFbsImage
const TMPXAttributeData KMPXMediaMusicAlbumArtThumbnailSize={KMPXMediaIdMusic,0x800}; // TSint
+const TMPXAttributeData KMPXMediaMusicAlbumArtChanged={KMPXMediaIdMusic,0x1000}; // TInt
+const TMPXAttributeData KMPXMediaMusicAlbumArtist={KMPXMediaIdMusic,0x2000}; // Text
+const TMPXAttributeData KMPXMediaMusicAlbumId={KMPXMediaIdMusic,0x4000}; // TMPXItemId
const TMPXAttributeData KMPXMediaMusicAll={KMPXMediaIdMusic,0xffffffff}; // Text
/**
@@ -65,6 +68,8 @@
EMPXMediaMusicOriginalAlbumArtFileName=0x200, // Text
EMPXMediaMusicAlbumArtThumbnail=0x400,
EMPXMediaMusicAlbumArtThumbnailSize=0x800,
+ EMPXMediaMusicAlbumArtist=0x2000,
+ EMPXMediaMusicAlbumId=0x4000,
EMPXMediaMusicAll=0xffffffff
};
--- a/mmappfw_plat/mpx_common_api/inc/mpxmessagequeue.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_common_api/inc/mpxmessagequeue.h Wed Jun 23 17:51:16 2010 +0100
@@ -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_common_definition_api/group/bld.inf Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_common_definition_api/group/bld.inf Wed Jun 23 17:51:16 2010 +0100
@@ -36,4 +36,5 @@
../inc/mpxmessage2.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxmessage2.h)
../inc/mpxpathconfiguration.hrh MW_LAYER_PLATFORM_EXPORT_PATH(mpxpathconfiguration.hrh)
../inc/mpxprivatecrkeys.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxprivatecrkeys.h)
-../inc/mpxsearchcriteria.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxsearchcriteria.h)
\ No newline at end of file
+../inc/mpxsearchcriteria.h MW_LAYER_PLATFORM_EXPORT_PATH(mpxsearchcriteria.h)
+../inc/EqualizerConstants.h MW_LAYER_PLATFORM_EXPORT_PATH(EqualizerConstants.h)
\ No newline at end of file
--- a/mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackcommanddefs.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackcommanddefs.h Wed Jun 23 17:51:16 2010 +0100
@@ -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 Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackframeworkdefs.h Wed Jun 23 17:51:16 2010 +0100
@@ -247,6 +247,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 Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackpluginobserver.h Wed Jun 23 17:51:16 2010 +0100
@@ -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_common_definition_api/inc/mpxplaybackpluginversion2.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackpluginversion2.h Wed Jun 23 17:51:16 2010 +0100
@@ -39,8 +39,9 @@
* @param aUri URI of the item
* @param aType the mime type of the item
* @param aAccessPoint the access point
+ * @param aPosition the starting position
*/
- virtual void InitStreamingL(const TDesC& aUri, const TDesC8& aType, TInt aAccessPoint) = 0;
+ virtual void InitStreamingL(const TDesC& aUri, const TDesC8& aType, TInt aAccessPoint, TInt aPosition = 0) = 0;
/**
* Initializes a file handle for playback.
@@ -48,8 +49,9 @@
* @since S60 9.2
* @param aFile file handle of a file
* @param aAccessPoint the access point
+ * @param aPosition the starting position
*/
- virtual void InitStreamingL(RFile& aFile, TInt aAccessPoint) = 0;
+ virtual void InitStreamingL(RFile& aFile, TInt aAccessPoint, TInt aPosition = 0) = 0;
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
/**
@@ -58,17 +60,39 @@
* @since S60 9.2
* @param aFile 64 bit file handle of a file
* @param aAccessPoint the access point
+ * @param aPosition the starting position
*/
- virtual void InitStreaming64L(RFile64& aFile, TInt aAccessPoint) = 0;
+ virtual void InitStreaming64L(RFile64& aFile, TInt aAccessPoint, TInt aPosition = 0) = 0;
/**
* Initializes a song for playback.
*
* @since S60 9.2
* @param aFile 64 bit file handle of a song
+ * @param aPosition the starting position
*/
- virtual void Initialise64L(RFile64& aSong) = 0;
+ virtual void Initialise64L(RFile64& aSong, TInt aPosition = 0) = 0;
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+
+
+ /**
+ * Initializes a song for playback.
+ *
+ * @since S60 9.2
+ * @param aSong the song path
+ * @param aPosition the starting position
+ */
+ virtual void InitialiseWithPositionL(const TDesC& aSong, TInt aPosition = 0) = 0;
+
+ /**
+ * Initializes a song for playback.
+ *
+ * @since S60 9.2
+ * @param aFile file handle of a song
+ * @param aPosition the starting position
+ */
+ virtual void InitialiseWithPositionL(RFile& aSong, TInt aPosition = 0) = 0;
+
};
#endif // CMPXPLAYBACKPLUGINVERSION2_H
--- a/mmappfw_plat/mpx_playback_utility_api/inc/mpxplaybackutility.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/inc/mpxplaybackutility.h Wed Jun 23 17:51:16 2010 +0100
@@ -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_playback_utility_api/tsrc/conf/mpxplaybackutilitytest.cfg Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/conf/mpxplaybackutilitytest.cfg Wed Jun 23 17:51:16 2010 +0100
@@ -1,40 +1,253 @@
+
+[Define]
+KErrNotFound -1
+KErrNotSupported -5
+KErrArgument -6
+KErrNotReady -18
+KErrAccessDenied -21
+
+KTrue 1
+KFalse 0
+
+// UID definition for playback mode
+KPbModeDefault 271067440 // 0x10282930 Uses same player as any other player running in same.
+KPbModeActivePlayer 271067441 // 0x10282931 Currently active player or any player if no active player.
+KPbModeNewPlayer 271067442 // 0x10282932 New player
+KPbModeAppUID 111 // Application UID
+
+// Category for playback utility creation.
+KMPXCategoryUndefined 0
+KMPXCategoryMusic 1
+KMPXCategoryVideo 2
+
+// UID for Helix Plugin
+KVideoHelixPlaybackPluginUid 271066449 // 0x10282551
+
+// Timers
+KTimerEndTest 5000 // 5 sec
+
+[Enddefine]
+
[Test]
+//
+// Test NewL
+// - Mode NewPlayer
+// - Category Default(Music)
+//
title 1 MMPXPlaybackUtilityNewL
-create mpxplaybackutilitytest foobar
-foobar MMPXPlaybackUtilityNewL
-delete foobar
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityNewL KPbModeNewPlayer
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test NewL
+// - Mode ActivePlayer
+// - Category Video
+//
+title 2 MMPXPlaybackUtilityNewL with category video
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityNewWithCatL KMPXCategoryVideo KPbModeActivePlayer
+pbutil EndTest
+delete pbutil
[Endtest]
[Test]
-title 2 MMPXPlaybackUtilityUtilityL
-create mpxplaybackutilitytest foobar
-foobar MMPXPlaybackUtilityUtilityL
-delete foobar
+//
+// Test UtilityL
+// - Mode UID
+// - Category Default(Music)
+//
+title 3 MMPXPlaybackUtilityUtilityL
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityL KPbModeAppUID
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test UtilityL
+// - Mode Default
+// - Category Video
+//
+title 4 MMPXPlaybackUtilityUtilityL with category video
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeDefault
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test InitL with Playlist
+// - Mode NewPlayer
+// - Category Default (Music)
+//
+title 5 MMPXPlaybackUtilityInitL(playlist)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityL KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityInitWithPlaylistL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test InitL with URI
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+//
+title 6 MMPXPlaybackUtilityInitL(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
[Endtest]
[Test]
-title 3 MMPXPlaybackUtilityInit64L
-create mpxplaybackutilitytest foobar
-foobar MMPXPlaybackUtilityNewL
-foobar MMPXPlaybackUtilityInit64L Battle_160x100_30kbps.rm
-delete foobar
+//
+// Test InitL with URI
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File XVID_176x144_15fps_261Kbps.avi
+//
+title 7 MMPXPlaybackUtilityInitL(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL XVID_176x144_15fps_261Kbps.avi
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test InitL with RFile
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with RFile, File 20k_H263_WB_176x144_15fps.3gp
+//
+title 8 MMPXPlaybackUtilityInitL(rfile)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithRFileL 20k_H263_WB_176x144_15fps.3gp
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test InitStreamingL with URI
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitStreamingL with URI, File 30k_MPEG4_AAC_8Khz_176x144_15fps_30secs.mp4
+//
+title 9 MMPXPlaybackUtilityInitStreamingL(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitStreamingWithUriL 30k_MPEG4_AAC_8Khz_176x144_15fps_30secs.mp4
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
[Endtest]
[Test]
-title 4 MMPXPlaybackUtilityInitStreaming64L
-create mpxplaybackutilitytest foobar
-foobar MMPXPlaybackUtilityNewL
-foobar MMPXPlaybackUtilityInitStreaming64L Battle_160x100_30kbps.rm
-delete foobar
+//
+// Test InitStreamingL with RFile
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitStreamingL with RFile, File 80k_H264_AAC16M22_176x144_15fps.3gp
+//
+title 10 MMPXPlaybackUtilityInitStreamingL(rfile)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitStreamingWithRFileL 80k_H264_AAC16M22_176x144_15fps.3gp
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test Init64L
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - Init64L with RFile64, File DivX_MP3_256x112_30fps_300Kbps.avi
+//
+title 11 MMPXPlaybackUtilityInit64L
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInit64L DivX_MP3_256x112_30fps_300Kbps.avi
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
[Endtest]
[Test]
-title 5 MMPXPlaybackUtilityFile64L
-create mpxplaybackutilitytest foobar
-foobar MMPXPlaybackUtilityNewL
-foobar MMPXPlaybackUtilityInit64L Battle_160x100_30kbps.rm
-foobar MMPXPlaybackUtilityFile64L
-delete foobar
+//
+// Test InitStreaming64L
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitStreaming64L with RFile64, File honey_im_home_horror_ad.avi
+//
+title 12 MMPXPlaybackUtilityInitStreaming64L
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitStreaming64L honey_im_home_horror_ad.avi
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
[Endtest]
+[Test]
+//
+// Test File64L
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - Init64L with RFile64, File MPEG4_VBR_176x144_15fps.3gp
+// - File64L to get RFile64 file handler
+//
+title 13 MMPXPlaybackUtilityFile64L
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInit64L MPEG4_VBR_176x144_15fps.3gp
+pause KTimerEndTest
+pbutil MMPXPlaybackUtilityFile64L
+pbutil EndTest
+delete pbutil
+[Endtest]
+
Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/20k_H263_WB_176x144_15fps.3gp has changed
Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/30k_MPEG4_AAC_8Khz_176x144_15fps_30secs.mp4 has changed
Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/80k_H264_AAC16M22_176x144_15fps.3gp has changed
Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/DivX_MP3_256x112_30fps_300Kbps.avi has changed
Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/MPEG4_VBR_176x144_15fps.3gp has changed
Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/XVID_176x144_15fps_261Kbps.avi has changed
Binary file mmappfw_plat/mpx_playback_utility_api/tsrc/data/mmc/honey_im_home_horror_ad.avi has changed
--- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -54,6 +54,7 @@
LIBRARY stiftestengine.lib
LIBRARY mpxplaybackutility.lib
LIBRARY mpxcommon.lib
+LIBRARY mpxcollectionutility.lib
LANG SC
--- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.pkg Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.pkg Wed Jun 23 17:51:16 2010 +0100
@@ -21,7 +21,7 @@
&EN
; Provide value for uid
-#{"STIF mpxplaybackutilitytest Application"},(0x10005942),1,1,0,TYPE=SA
+#{"MPX PlaybackUtility STIF"}, (0x101FB3E3), 1, 0, 1, TYPE=SA, RU
; Series60 product id for S60 3.0
[0x101F7961], 0, 0, 0, {"Series60ProductID"}
@@ -32,35 +32,16 @@
; Unique Vendor name
:"Nokia"
-; Logo
-; None
-
-; Package signature - Optional
-; None
-
-; Start of Package body
-
-; Condition blocks
-; None
-
-; Options list
-; None
+; Install files
+"\epoc32\release\armv5\udeb\mpxplaybackutilitytest.dll" - "!:\Sys\Bin\mpxplaybackutilitytest.dll"
+"..\..\init\TestFramework.ini" - "c:\testframework\TestFramework.ini"
+"..\..\conf\mpxplaybackutilitytest.cfg" - "c:\testframework\mpxplaybackutilitytest.cfg"
-; Install files
-"..\..\data\mmc\Battle_160x100_30kbps.rm" - "e:\testing\data\Battle_160x100_30kbps.rm"
-
-"..\..\init\TestFramework.ini" - "c:\testframework\TestFramework.ini"
-"..\..\conf\mpxplaybackutilitytest.cfg" - "c:\testframework\mpxplaybackutilitytest.cfg"
-
-"\epoc32\release\armv5\udeb\mpxplaybackutilitytest.dll" - "c:\Sys\Bin\mpxplaybackutilitytest.dll"
-
-; Embedded SIS
-; None
-
-; End of Package body
-
-; PKG dependencies
-; None
-
-; PKG capabilities
-; None
+"..\..\data\mmc\Battle_160x100_30kbps.rm" - "f:\testing\data\Battle_160x100_30kbps.rm"
+"..\..\data\mmc\20k_H263_WB_176x144_15fps.3gp" - "f:\testing\data\20k_H263_WB_176x144_15fps.3gp"
+"..\..\data\mmc\30k_MPEG4_AAC_8Khz_176x144_15fps_30secs.mp4" - "f:\testing\data\30k_MPEG4_AAC_8Khz_176x144_15fps_30secs.mp4"
+"..\..\data\mmc\80k_H264_AAC16M22_176x144_15fps.3gp" - "f:\testing\data\80k_H264_AAC16M22_176x144_15fps.3gp"
+"..\..\data\mmc\DivX_MP3_256x112_30fps_300Kbps.avi" - "f:\testing\data\DivX_MP3_256x112_30fps_300Kbps.avi"
+"..\..\data\mmc\honey_im_home_horror_ad.avi" - "f:\testing\data\honey_im_home_horror_ad.avi"
+"..\..\data\mmc\MPEG4_VBR_176x144_15fps.3gp" - "f:\testing\data\MPEG4_VBR_176x144_15fps.3gp"
+"..\..\data\mmc\XVID_176x144_15fps_261Kbps.avi" - "f:\testing\data\XVID_176x144_15fps_261Kbps.avi"
--- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/inc/mpxplaybackutilitytest.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/inc/mpxplaybackutilitytest.h Wed Jun 23 17:51:16 2010 +0100
@@ -27,11 +27,8 @@
#include <TestclassAssert.h>
#include <mpxplaybackutility.h>
#include <mpxplaybackobserver.h>
-// CONSTANTS
-//const ?type ?constant_var = ?constant;
// MACROS
-//#define ?macro ?macro_def
#define TEST_CLASS_VERSION_MAJOR 0
#define TEST_CLASS_VERSION_MINOR 0
#define TEST_CLASS_VERSION_BUILD 0
@@ -45,26 +42,29 @@
// data file
_LIT( KmpxplaybackutilityTestFilePath, "C:\\testing\\data\\" );
#else
-_LIT( KmpxplaybackutilitytestLogPath, "\\logs\\testframework\\mpxplaybackutilitytest\\" );
+_LIT( KmpxplaybackutilitytestLogPath, "f:\\logs\\testframework\\mpxplaybackutilitytest\\" );
// Log file
_LIT( KmpxplaybackutilitytestLogFile, "mpxplaybackutilitytest.txt" );
_LIT( KmpxplaybackutilitytestLogFileWithTitle, "mpxplaybackutilitytest_[%S].txt" );
// data file
-_LIT( KmpxplaybackutilityTestFilePath, "e:\\testing\\data\\" );
+_LIT( KmpxplaybackutilityTestFilePath, "f:\\testing\\data\\" );
#endif
+
// FUNCTION PROTOTYPES
//?type ?function_name(?arg_list);
// FORWARD DECLARATIONS
//class ?FORWARD_CLASSNAME;
-class Cmpxplaybackutilitytest;
-class MMPXPlaybackUtility;
-class MMPXPlaybackObserver;
// DATA TYPES
-//enum ?declaration
-//typedef ?declaration
-//extern ?data_type;
+typedef struct
+{
+ TInt iEvent;
+ TInt iType;
+ TInt iData;
+} TMpxPlaybackTestEvent;
+
+typedef CArrayPtrFlat<TMpxPlaybackTestEvent> CMpxPlaybackTestEventArray;
// CLASS DECLARATION
@@ -76,82 +76,151 @@
* @since ?Series60_version
*/
NONSHARABLE_CLASS(Cmpxplaybackutilitytest) : public CScriptBase,
- public MMPXPlaybackObserver
+ public MMPXPlaybackObserver,
+ public MMPXPlaybackCallback
{
- public: // Constructors and destructor
+public: // Constructors and destructor
- /**
- * Two-phased constructor.
- */
- static Cmpxplaybackutilitytest* NewL( CTestModuleIf& aTestModuleIf );
+ /**
+ * Two-phased constructor.
+ */
+ static Cmpxplaybackutilitytest* NewL( CTestModuleIf& aTestModuleIf );
- /**
- * Destructor.
- */
- virtual ~Cmpxplaybackutilitytest();
+ /**
+ * Destructor.
+ */
+ virtual ~Cmpxplaybackutilitytest();
-
- public: // Functions from base classes
+public: // Functions from base classes
- /**
- * From CScriptBase Runs a script line.
- * @since ?Series60_version
- * @param aItem Script line containing method name and parameters
- * @return Symbian OS error code
- */
- virtual TInt RunMethodL( CStifItemParser& aItem );
-
- // From base class MMPXPlaybackObserver
- /**
- * Handle playback message
- *
- * @since 3.1
- * @param aMessage playback message
- * @param aErr system error code.
- */
- void HandlePlaybackMessage(
- CMPXMessage* aMessage, TInt aError );
- private:
+ /**
+ * From CScriptBase Runs a script line.
+ * @since ?Series60_version
+ * @param aItem Script line containing method name and parameters
+ * @return Symbian OS error code
+ */
+ virtual TInt RunMethodL( CStifItemParser& aItem );
+
+ // From base class MMPXPlaybackObserver
+ /**
+ * Handle playback message
+ *
+ * @since 3.1
+ * @param aMessage playback message
+ * @param aErr system error code.
+ */
+ void HandlePlaybackMessage( CMPXMessage* aMessage, TInt aError );
+
+ /**
+ * Handle playback property.
+ *
+ * @since S60 3.2.3
+ * @param aProperty the property
+ * @param aValue the value of the property
+ * @param aError error code
+ */
+ void HandlePropertyL(TMPXPlaybackProperty aProperty, TInt aValue, TInt aError);
- /**
- * C++ default constructor.
- */
- Cmpxplaybackutilitytest( CTestModuleIf& aTestModuleIf );
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
- // Prohibit copy constructor if not deriving from CBase.
- // ?classname( const ?classname& );
- // Prohibit assigment operator if not deriving from CBase.
- // ?classname& operator=( const ?classname& );
- /**
- * Frees all resources allocated from test methods.
- * @since ?Series60_version
- */
- void Delete();
- /**
- * Test methods are listed below.
- */
- TInt MMPXPlaybackUtilityNewL(CStifItemParser& /*aItem*/);
- TInt MMPXPlaybackUtilityUtilityL(CStifItemParser& /*aItem*/);
- TInt MMPXPlaybackUtilityInit64L(CStifItemParser& /*aItem*/);
- TInt MMPXPlaybackUtilityInitStreaming64L(CStifItemParser& /*aItem*/);
- TInt MMPXPlaybackUtilityFile64L(CStifItemParser& /*aItem*/);
-
- /**
- * Method used to log version of test class
- */
- void SendTestClassVersion();
- //ADD NEW METHOD DEC HERE
- //[TestMethods] - Do not remove
- private: // Friend classes
- //From mpxplaybackutility.h
- MMPXPlaybackUtility* iMPXPlaybackUtility;
- RFs iFs;
+ /**
+ * Method is called continously until aComplete=ETrue, signifying that
+ * it is done and there will be no more callbacks.
+ * Only new items are passed each time.
+ *
+ * @since S60 3.2.3
+ * @param aPlayer UID of the subplayer
+ * @param aSubPlayers a list of sub players
+ * @param aComplete ETrue no more sub players. EFalse more subplayer
+ * expected
+ * @param aError error code
+ */
+ void HandleSubPlayerNamesL(TUid aPlayer,
+ const MDesCArray* aSubPlayers,
+ TBool aComplete,
+ TInt aError);
+
+ /**
+ * Call back of media request.
+ *
+ * @since S60 3.2.3
+ * @param aMedia media
+ * @param aError error code
+ */
+ void HandleMediaL(const CMPXMedia& aProperties, TInt aError);
+
+ /**
+ * Handle completion of a asynchronous command.
+ * Note: All clients should implement this callback.
+ *
+ * @since S60 3.2.3
+ * @param aCommandResult result of the command, NULL if error
+ * @param aError error code
+ */
+ void HandlePlaybackCommandComplete(CMPXCommand* aCommandResult, TInt aError);
+
+private: // functions
+
+ /**
+ * C++ default constructor.
+ */
+ Cmpxplaybackutilitytest( CTestModuleIf& aTestModuleIf );
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+ // Prohibit copy constructor if not deriving from CBase.
+ // ?classname( const ?classname& );
+ // Prohibit assigment operator if not deriving from CBase.
+ // ?classname& operator=( const ?classname& );
+ /**
+ * Frees all resources allocated from test methods.
+ * @since ?Series60_version
+ */
+ void Delete();
+
+ /*
+ * Create resources
+ */
+ void CreateL();
+
+ void AddExpectedEventL(TInt aEvent, TInt aType, TInt aData);
+ void RemoveExpectedEventL(TInt aEvent, TInt aType, TInt aData);
+
+ /**
+ * Test methods are listed below.
+ */
+ TInt MMPXPlaybackUtilityNewL(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityNewWithCatL(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityUtilityL(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityUtilityWithCatL(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityInitWithPlaylistL(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityInitWithUriL(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityInitWithRFileL(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityInitStreamingWithUriL(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityInitStreamingWithRFileL(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityInit64L(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityInitStreaming64L(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityFile64L(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityAddObserverL(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityRemoveObserverL(CStifItemParser& /*aItem*/);
+ TInt MMPXPlaybackUtilityPlayerManagerSelectPlayerL(CStifItemParser& /*aItem*/);
+ TInt EndTest(CStifItemParser& /*aItem*/);
+
+ /**
+ * Method used to log version of test class
+ */
+ void SendTestClassVersion();
+ //ADD NEW METHOD DEC HERE
+ //[TestMethods] - Do not remove
+
+private: // data
+ MMPXPlaybackUtility* iMPXPlaybackUtility;
+ CMpxPlaybackTestEventArray* iExpectedEventArray;
+ RFs iFs;
+ TInt iCallbackError;
+ RFile iFile;
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
- RFile64 iFile64;
+ RFile64 iFile64;
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/inc/mpxplaybackutilitytestdefs.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2002 - 2007 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: mpxplaybackutilitytestdefs header for STIF Test Framework TestScripter.
+*
+*/
+
+#ifndef MPXPLAYBACKUTILITYTESTDEFS_H
+#define MPXPLAYBACKUTILITYTESTDEFS_H
+
+const TInt KGeneralPlaybackMsgOffset = 0;
+const TInt KVideoPlaybackMsgOffset = 100;
+const TInt KStifPlaybackMsgOffset = 200;
+const TInt KMPXMessageStif = 0x20011397;
+
+
+#endif // MPXPLAYBACKUTILITYTESTDEFS_H
+
+// End of File
--- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/src/mpxplaybackutilitytest.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/src/mpxplaybackutilitytest.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -131,10 +131,8 @@
EFalse );
SendTestClassVersion();
-
-
- iFs.Connect();
- iFs.ShareProtected();
+
+ CreateL();
}
// -----------------------------------------------------------------------------
--- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/src/mpxplaybackutilitytestBlocks.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/src/mpxplaybackutilitytestBlocks.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -21,18 +21,105 @@
#include <e32svr.h>
#include <StifParser.h>
#include <Stiftestinterface.h>
+#include <mpxvideoplaybackdefs.h>
+#include <mpxplaybackcommanddefs.h>
+#include <mpxcommandgeneraldefs.h>
+#include <mpxcommand.h>
+#include <mpxmessagegeneraldefs.h>
+#include <mpxplaybackmessage.h>
+#include <mpxmediageneraldefs.h>
+#include <mpxlog.h>
+#include <mpxcollectionplaylist.h>
#include "mpxplaybackutilitytest.h"
+#include "mpxplaybackutilitytestdefs.h"
+
// ============================ MEMBER FUNCTIONS ===============================
// ---------------------------------------------------------------------------
// From MMPXPlaybackObserver
// Handle playback message.
// ---------------------------------------------------------------------------
//
-void Cmpxplaybackutilitytest::HandlePlaybackMessage(
- CMPXMessage* /*aMessage*/, TInt aError )
+void Cmpxplaybackutilitytest::HandlePlaybackMessage( CMPXMessage* aMessage, TInt aError )
{
- iLog->Log(_L("Cmpxharvestertest::HandlePlaybackMessage: %d"), aError);
+ iLog->Log(_L("Cmpxharvestertest::HandlePlaybackMessage: Error %d"), aError);
+ if ( !aError )
+ {
+ TMPXMessageId id( *(aMessage->Value<TMPXMessageId>(KMPXMessageGeneralId)) );
+ TInt event( *aMessage->Value<TInt>( KMPXMessageGeneralEvent ) );
+ TInt type( *aMessage->Value<TInt>( KMPXMessageGeneralType ) );
+ TInt data( *aMessage->Value<TInt>( KMPXMessageGeneralData ) );
+
+ if ( KMPXMessageGeneral == id )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::HandlePlaybackMessage() General event = %d type = %d value = %d"),
+ event, type, data );
+ RemoveExpectedEventL( KGeneralPlaybackMsgOffset + event, type, data );
+ }
+ else if ( KMPXMediaIdVideoPlayback == id )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::HandlePlaybackMessage() Video event = %d type = %d value = %d"),
+ event, type, data );
+ RemoveExpectedEventL( KVideoPlaybackMsgOffset + event, type, data );
+ }
+ else if ( KMPXMessageStif )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::HandlePlaybackMessage() STIF event = %d type = %d value = %d"),
+ event, type, data );
+ RemoveExpectedEventL( KStifPlaybackMsgOffset + event, type, data );
+ }
+ }
+ else
+ {
+ if ( !iCallbackError )
+ {
+ iCallbackError = aError;
+ }
+ }
}
+
+// ---------------------------------------------------------------------------
+// Handle playback property.
+// ---------------------------------------------------------------------------
+//
+void Cmpxplaybackutilitytest::HandlePropertyL( TMPXPlaybackProperty aProperty, TInt aValue, TInt aError )
+ {
+ iLog->Log(_L("Cmpxharvestertest::HandlePropertyL: Property %d, Value %d, Error %d"),
+ aProperty, aValue, aError);
+ }
+
+// ---------------------------------------------------------------------------
+// Method is called continously until aComplete=ETrue, signifying that
+// it is done and there will be no more callbacks.
+// Only new items are passed each time.
+// ---------------------------------------------------------------------------
+//
+void Cmpxplaybackutilitytest::HandleSubPlayerNamesL( TUid aPlayer,
+ const MDesCArray* aSubPlayers,
+ TBool aComplete,
+ TInt aError )
+ {
+ iLog->Log(_L("Cmpxharvestertest::HandleSubPlayerNamesL: Complete %d, Error %d"), aComplete, aError);
+ }
+
+// ---------------------------------------------------------------------------
+// Call back of media request.
+// ---------------------------------------------------------------------------
+//
+void Cmpxplaybackutilitytest::HandleMediaL( const CMPXMedia& aProperties, TInt aError )
+ {
+ iLog->Log(_L("Cmpxharvestertest::HandleMediaL: Error %d"), aError);
+ }
+
+// ---------------------------------------------------------------------------
+// Handle completion of a asynchronous command.
+// Note: All clients should implement this callback.
+// ---------------------------------------------------------------------------
+//
+void Cmpxplaybackutilitytest::HandlePlaybackCommandComplete( CMPXCommand* aCommandResult, TInt aError )
+ {
+ iLog->Log(_L("Cmpxharvestertest::HandlePlaybackCommandComplete: Error %d"), aError);
+ }
+
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::Delete
// Delete here all resources allocated and opened from test methods.
@@ -45,7 +132,58 @@
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
iFile64.Close();
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+ iFile.Close();
iFs.Close();
+ iExpectedEventArray->ResetAndDestroy();
+ }
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::CreateL
+// Create here all resources needed for test methods.
+// Called from ConstructL().
+// -----------------------------------------------------------------------------
+//
+void Cmpxplaybackutilitytest::CreateL()
+ {
+ iFs.Connect();
+ iFs.ShareProtected();
+
+ iExpectedEventArray = new (ELeave) CArrayPtrFlat<TMpxPlaybackTestEvent>( 1 );
+ iCallbackError = KErrNone;
+ iMPXPlaybackUtility = NULL;
+ }
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::AddExpectedEventL
+// -----------------------------------------------------------------------------
+//
+void Cmpxplaybackutilitytest::AddExpectedEventL( TInt aEvent, TInt aType, TInt aData )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::AddExpectedEventL() event = %d type = %d value = %d"),
+ aEvent, aType, aData );
+
+ TMpxPlaybackTestEvent* event = new (ELeave) TMpxPlaybackTestEvent;
+ event->iEvent = aEvent;
+ event->iType = aType;
+ event->iData = aData;
+ iExpectedEventArray->AppendL( event );
+ }
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::RemoveExpectedEventL
+// -----------------------------------------------------------------------------
+//
+void Cmpxplaybackutilitytest::RemoveExpectedEventL( TInt aEvent, TInt aType, TInt aData )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::RemoveExpectedEventL() event = %d type = %d value = %d"),
+ aEvent, aType, aData );
+
+ if ( (iExpectedEventArray->Count() > 0) &&
+ ((*iExpectedEventArray)[0]->iEvent == aEvent) )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::RemoveExpectedEventL() event = %d removed."), aEvent);
+ iExpectedEventArray->Delete( 0 );
+ }
}
// -----------------------------------------------------------------------------
@@ -53,32 +191,38 @@
// Run specified method. Contains also table of test mothods and their names.
// -----------------------------------------------------------------------------
//
-TInt Cmpxplaybackutilitytest::RunMethodL(
- CStifItemParser& aItem )
+TInt Cmpxplaybackutilitytest::RunMethodL( CStifItemParser& aItem )
{
-
static TStifFunctionInfo const KFunctions[] =
{
// Copy this line for every implemented function.
// First string is the function name used in TestScripter script file.
// Second is the actual implementation member function.
-
+
+ //ADD NEW ENTRY HERE
+ // [test cases entries] - Do not remove
ENTRY( "MMPXPlaybackUtilityNewL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL ),
+ ENTRY( "MMPXPlaybackUtilityNewWithCatL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL ),
ENTRY( "MMPXPlaybackUtilityUtilityL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL ),
+ ENTRY( "MMPXPlaybackUtilityUtilityWithCatL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL ),
+ ENTRY( "MMPXPlaybackUtilityInitWithPlaylistL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL ),
+ ENTRY( "MMPXPlaybackUtilityInitWithUriL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL ),
+ ENTRY( "MMPXPlaybackUtilityInitWithRFileL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL ),
+ ENTRY( "MMPXPlaybackUtilityInitStreamingWithUriL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL ),
+ ENTRY( "MMPXPlaybackUtilityInitStreamingWithRFileL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL ),
ENTRY( "MMPXPlaybackUtilityInit64L", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L ),
ENTRY( "MMPXPlaybackUtilityInitStreaming64L", Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L ),
ENTRY( "MMPXPlaybackUtilityFile64L", Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L ),
-
- //ADD NEW ENTRY HERE
- // [test cases entries] - Do not remove
-
+ ENTRY( "MMPXPlaybackUtilityAddObserverL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL ),
+ ENTRY( "MMPXPlaybackUtilityRemoveObserverL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL ),
+ ENTRY( "MMPXPlaybackUtilityPlayerManagerSelectPlayerL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL ),
+ ENTRY( "EndTest", Cmpxplaybackutilitytest::EndTest ),
};
const TInt count = sizeof( KFunctions ) /
sizeof( TStifFunctionInfo );
return RunInternalL( KFunctions, count, aItem );
-
}
// -----------------------------------------------------------------------------
@@ -87,49 +231,325 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL(CStifItemParser& /*aItem*/)
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL( CStifItemParser& aItem )
{
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL"));
TInt err = KErrNone;
-
- TRAP( err,iMPXPlaybackUtility = MMPXPlaybackUtility::NewL(KPbModeDefault,this ));
+ TInt mode;
+
+ if ( aItem.GetNextInt(mode) != KErrNone )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityNewL - Missing playback mode."));
+ err = KErrArgument;
+ return err;
+ }
+
+ iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewL: mode %d"), mode);
+ TRAP( err,iMPXPlaybackUtility = MMPXPlaybackUtility::NewL(TUid::Uid(mode), this ));
if (err!= KErrNone)
{
- iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewL: %d"), err);
+ iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewL: error %d"), err);
}
return err;
}
// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL
+// NewL test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL( CStifItemParser& aItem )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL"));
+ TInt err = KErrNone;
+ TInt mode;
+ TInt category;
+ if ( aItem.GetNextInt(category) != KErrNone )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityNewWithCatL - Missing category."));
+ err = KErrArgument;
+ return err;
+ }
+
+ if ( aItem.GetNextInt(mode) != KErrNone )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityNewWithCatL - Missing playback mode."));
+ err = KErrArgument;
+ return err;
+ }
+
+ iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewWithCatL: category %d"), category);
+ iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewWithCatL: mode %d"), mode);
+ TRAP( err,iMPXPlaybackUtility = MMPXPlaybackUtility::NewL((TMPXCategory)category, TUid::Uid(mode), this ));
+
+ if (err!= KErrNone)
+ {
+ iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewWithCatL: error %d"), err);
+ }
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL
// UtilityL test method function.
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL(CStifItemParser& /*aItem*/)
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL( CStifItemParser& aItem )
{
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL"));
TInt err = KErrNone;
+ TInt mode = 0;
- TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL());
+ aItem.GetNextInt(mode);
+ iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityL: mode %d"), mode);
+ if ( mode )
+ {
+ TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL(TUid::Uid(mode)));
+ }
+ else
+ {
+ TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL());
+ }
- if (err!= KErrNone)
- {
- iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityL: %d"), err);
- }
+ iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityL: error %d"), err);
return err;
}
// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL
+// UtilityL test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL( CStifItemParser& aItem )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL"));
+ TInt err = KErrNone;
+ TInt category;
+ TInt mode = 0;
+
+ if ( aItem.GetNextInt(category) != KErrNone )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityNewWithCatL - Missing category."));
+ err = KErrArgument;
+ return err;
+ }
+
+ aItem.GetNextInt(mode);
+ iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityWithCatL: category %d"), category);
+ iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityWithCatL: mode %d"), mode);
+ if ( mode )
+ {
+ TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL((TMPXCategory)category, TUid::Uid(mode)));
+ }
+ else
+ {
+ TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL((TMPXCategory)category));
+ }
+
+ iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityWithCatL: error %d"), err);
+
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL
+// InitL(CMPXCollectionPlaylist) test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL( CStifItemParser& /*aItem*/ )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL"));
+ TInt err = KErrNone;
+ CMPXCollectionPlaylist* playlist = CMPXCollectionPlaylist::NewL();
+ CleanupStack::PushL(playlist);
+ TRAP(err,iMPXPlaybackUtility->InitL(*playlist));
+ CleanupStack::PopAndDestroy(playlist);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL - error=%d"),err);
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL
+// InitL(Uri) test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL( CStifItemParser& aItem )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL"));
+ TInt err = KErrNone;
+ TPtrC string;
+
+ if( aItem.GetNextString( string ) == KErrNone )
+ {
+ TBuf<120> uri;
+ uri.Append(KmpxplaybackutilityTestFilePath);
+ uri.Append(string);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL - uri = %S."), &uri);
+ TRAP(err,iMPXPlaybackUtility->InitL(uri));
+
+ if ( !err )
+ {
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged;
+ AddExpectedEventL(event, 0, 0);
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete;
+ AddExpectedEventL(event, 0, 0);
+ }
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL - error=%d"),err);
+ }
+ else
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityInitWithUriL - Missing file name."));
+ err = KErrArgument;
+ }
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL
+// Init64L test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL( CStifItemParser& aItem )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL"));
+ TInt err = KErrNone;
+ TPtrC string;
+
+ if( aItem.GetNextString( string ) == KErrNone )
+ {
+ TBuf<120> KFrom;
+ KFrom.Append(KmpxplaybackutilityTestFilePath);
+ KFrom.Append(string);
+ if ( iFile.SubSessionHandle() )
+ {
+ iFile.Close();
+ }
+ err = iFile.Open(iFs, KFrom, EFileRead | EFileShareReadersOrWriters);
+ if ( err == KErrNone )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL - Open passed."));
+ TRAP(err,iMPXPlaybackUtility->InitL(iFile));
+
+ if ( !err )
+ {
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged;
+ AddExpectedEventL(event, 0, 0);
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete;
+ AddExpectedEventL(event, 0, 0);
+ }
+ }
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL - error=%d"),err);
+ }
+ else
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityInitWithRFileL - Missing file name."));
+ err = KErrArgument;
+ }
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL
+// InitStreamingL(Uri) test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL( CStifItemParser& aItem )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL"));
+ TInt err = KErrNone;
+ TPtrC string;
+ TInt accessPoint = 1;
+
+ if( aItem.GetNextString( string ) == KErrNone )
+ {
+ TBuf<120> uri;
+ uri.Append(KmpxplaybackutilityTestFilePath);
+ uri.Append(string);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL - uri = %S."), &uri);
+ TRAP(err,iMPXPlaybackUtility->InitStreamingL(uri, NULL, accessPoint));
+
+ if ( !err )
+ {
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged;
+ AddExpectedEventL(event, 0, 0);
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete;
+ AddExpectedEventL(event, 0, 0);
+ }
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL - error=%d"),err);
+ }
+ else
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityInitStreamingWithUriL - Missing file name."));
+ err = KErrArgument;
+ }
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL
+// InitStreamingL(RFile) test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL( CStifItemParser& aItem )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL"));
+ TInt err = KErrNone;
+ TPtrC string;
+ TInt accessPoint = 1;
+
+ if( aItem.GetNextString( string ) == KErrNone )
+ {
+ TBuf<120> KFrom;
+ KFrom.Append(KmpxplaybackutilityTestFilePath);
+ KFrom.Append(string);
+ if ( iFile.SubSessionHandle() )
+ {
+ iFile.Close();
+ }
+ err = iFile.Open(iFs, KFrom, EFileRead | EFileShareReadersOrWriters);
+ if ( err == KErrNone )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL - Open passed."));
+ TRAP(err,iMPXPlaybackUtility->InitStreamingL(iFile, accessPoint));
+
+ if ( !err )
+ {
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged;
+ AddExpectedEventL(event, 0, 0);
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete;
+ AddExpectedEventL(event, 0, 0);
+ }
+ }
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL - error=%d"),err);
+ }
+ else
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityInitStreamingWithRFileL - Missing file name."));
+ err = KErrArgument;
+ }
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L
// Init64L test method function.
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L(CStifItemParser& aItem)
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L( CStifItemParser& aItem )
{
- iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L testing Init64L() begin"));
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L"));
TInt err = KErrNone;
#ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
err = KErrNotSupported;
@@ -149,10 +569,18 @@
err = iFile64.Open(iFs, KFrom, EFileRead | EFileShareReadersOrWriters);
if ( err == KErrNone )
{
- iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L testing Init64L() Open passed."));
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L - Open passed."));
TRAP(err,iMPXPlaybackUtility->Init64L(iFile64));
+
+ if ( !err )
+ {
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged;
+ AddExpectedEventL(event, 0, 0);
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete;
+ AddExpectedEventL(event, 0, 0);
+ }
}
- iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L testing Init64L() error=%d"),err);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L - error=%d"),err);
}
else
{
@@ -169,13 +597,13 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L(CStifItemParser& aItem)
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L( CStifItemParser& aItem )
{
- iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L testing InitStreaming64L() begin"));
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L"));
TInt err = KErrNone;
#ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
err = KErrNotSupported;
- iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L testing InitStreaming64L() error=%d"),err);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L - error=%d"),err);
#else // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
TPtrC string;
TInt accessPoint = 1;
@@ -192,10 +620,18 @@
err = iFile64.Open(iFs, KFrom, EFileRead | EFileShareReadersOrWriters);
if ( err == KErrNone )
{
- iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L testing InitStreaming64L() Open passed."));
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L - Open passed."));
TRAP(err,iMPXPlaybackUtility->InitStreaming64L(iFile64, accessPoint));
+
+ if ( !err )
+ {
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged;
+ AddExpectedEventL(event, 0, 0);
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete;
+ AddExpectedEventL(event, 0, 0);
+ }
}
- iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L testing InitStreaming64L() error=%d"),err);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L - error=%d"),err);
}
else
{
@@ -212,22 +648,106 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L(CStifItemParser& /*aItem*/)
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L( CStifItemParser& /*aItem*/ )
{
- iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L testing File64L() begin"));
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L"));
TInt err = KErrNone;
#ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
err = KErrNotSupported;
- iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L testing File64L() error=%d"),err);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L - error=%d"),err);
#else // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
- RFile64* file64Ptr;
+ RFile64* file64Ptr=NULL;
TRAP(err, file64Ptr=iMPXPlaybackUtility->Source()->File64L());
if ( !file64Ptr->SubSessionHandle() )
{
iLog->Log(_L("MMPXPlaybackUtilityFile64L - file64 = NULL."));
}
- iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L testing File64L() error=%d"),err);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L - error=%d"),err);
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
return err;
}
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL
+// AddObserverL test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL( CStifItemParser& /*aItem*/ )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL"));
+ TInt err = KErrNone;
+ TRAP(err, iMPXPlaybackUtility->AddObserverL(*this));
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL - error=%d"),err);
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL
+// RemoveObserverL test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL( CStifItemParser& /*aItem*/ )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL"));
+ TInt err = KErrNone;
+ TRAP(err, iMPXPlaybackUtility->RemoveObserverL(*this));
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL - error=%d"),err);
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL
+// RemoveObserverL test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL(CStifItemParser& aItem)
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL"));
+ TInt uidInt;
+ TInt err = KErrNone;
+
+ // read in UID
+ if ( aItem.GetNextInt(uidInt) != KErrNone )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL - Missing UID."));
+ err = KErrArgument;
+ return err;
+ }
+
+ iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL - UID = 0x%x."), uidInt);
+ if ( iMPXPlaybackUtility )
+ {
+ MMPXPlayerManager& manager = iMPXPlaybackUtility->PlayerManager();
+ TRAP( err, manager.SelectPlayerL( TUid::Uid(uidInt) ) );
+ iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL - SelectPlayer err = %d."), err);
+ }
+ else
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL - MPX Playback Utility not created."));
+ err = KErrGeneral;
+ }
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::EndTest
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::EndTest( CStifItemParser& /*aItem*/ )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::EndTest"));
+ TInt err = iCallbackError;
+
+ // check if event queue is empty
+ if ( !err && (iExpectedEventArray->Count() > 0 ) )
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::EndTest error = KErrTimedOut"));
+ err = KErrTimedOut;
+ }
+ return err;
+ }
+
+// end of file
--- a/mmappfw_plat/mpx_view_utility_api/group/bld.inf Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/mpx_view_utility_api/group/bld.inf Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/group/bld.inf Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/qtms.h MW_LAYER_PLATFORM_EXPORT_PATH(qtms.h)
+../inc/qtmsamrformat.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsamrformat.h)
+../inc/qtmsbuffer.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsbuffer.h)
+../inc/qtmscall.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmscall.h)
+../inc/qtmsclientsink.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsclientsink.h)
+../inc/qtmsclientsource.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsclientsource.h)
+../inc/qtmsdtmf.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsdtmf.h)
+../inc/qtmseffect.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmseffect.h)
+../inc/qtmsfactory.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsfactory.h)
+../inc/qtmsformat.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsformat.h)
+../inc/qtmsg711format.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsg711format.h)
+../inc/qtmsg729format.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsg729format.h)
+../inc/qtmsgaineffect.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsgaineffect.h)
+../inc/qtmsglobalgaineffect.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsglobalgaineffect.h)
+../inc/qtmsglobalrouting.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsglobalrouting.h)
+../inc/qtmsglobalvoleffect.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsglobalvoleffect.h)
+../inc/qtmsilbcformat.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsilbcformat.h)
+../inc/qtmspcmformat.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmspcmformat.h)
+../inc/qtmsringtone.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsringtone.h)
+../inc/qtmssink.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmssink.h)
+../inc/qtmssource.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmssource.h)
+../inc/qtmsstream.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsstream.h)
+../inc/qtmsvolumeeffect.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsvolumeeffect.h)
+../inc/qtmsmicsource.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsmicsource.h)
+../inc/qtmsmodemsink.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsmodemsink.h)
+../inc/qtmsmodemsource.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsmodemsource.h)
+../inc/qtmsspeakersink.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsspeakersink.h)
+../inc/qtmsinbandtone.h MW_LAYER_PLATFORM_EXPORT_PATH(qtmsinbandtone.h)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtms.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_H
+#define QTMS_H
+
+// Include files
+#include <glib.h>
+#include <vector>
+
+namespace QTMS {
+
+// FORWARD DECLARATION
+class QTMSFormat;
+
+// Result codes
+#define QTMS_RESULT_SUCCESS ((gint)0x00000000)
+#define QTMS_RESULT_ALREADY_EXIST ((gint)0x00000001)
+#define QTMS_RESULT_DOES_NOT_EXIST ((gint)0x00000002)
+#define QTMS_RESULT_NULL_ARGUMENT ((gint)0x00000003)
+#define QTMS_RESULT_INVALID_ARGUMENT ((gint)0x00000004)
+#define QTMS_RESULT_INVALID_STATE ((gint)0x00000005)
+#define QTMS_RESULT_UNINITIALIZED_OBJECT ((gint)0x00000006)
+#define QTMS_RESULT_INSUFFICIENT_MEMORY ((gint)0x00000007)
+#define QTMS_RESULT_GENERAL_ERROR ((gint)0x00000008)
+#define QTMS_RESULT_FATAL_ERROR ((gint)0x00000009)
+#define QTMS_RESULT_OPERATION_CANCELLED ((gint)0x0000000A)
+#define QTMS_RESULT_ILLEGAL_OPERATION ((gint)0x0000000B)
+#define QTMS_RESULT_BUFFER_LATENCY_ERROR ((gint)0x0000000C)
+#define QTMS_RESULT_CALL_TYPE_NOT_SUPPORTED ((gint)0x0000000D)
+#define QTMS_RESULT_BUFFER_TYPE_NOT_SUPPORTED ((gint)0x0000000E)
+#define QTMS_RESULT_SOURCE_TYPE_NOT_SUPPORTED ((gint)0x0000000F)
+#define QTMS_RESULT_SINK_TYPE_NOT_SUPPORTED ((gint)0x00000010)
+#define QTMS_RESULT_STREAM_TYPE_NOT_SUPPORTED ((gint)0x00000011)
+#define QTMS_RESULT_FORMAT_TYPE_NOT_SUPPORTED ((gint)0x00000012)
+#define QTMS_RESULT_EFFECT_TYPE_NOT_SUPPORTED ((gint)0x00000013)
+#define QTMS_RESULT_VERSION_NOT_SUPPORTED ((gint)0x00000014)
+#define QTMS_RESULT_FORMAT_TYPE_UNSPECIFIED ((gint)0x00000015)
+#define QTMS_RESULT_FEATURE_NOT_SUPPORTED ((gint)0x00000016)
+
+// Reasons codes
+#define QTMS_REASON_CLIENT_INITIATED ((gint)0x00000000)
+#define QTMS_REASON_DEVICE_IN_USE ((gint)0x00000001) // Device not available
+#define QTMS_REASON_DEVICE_TAKEN ((gint)0x00000002) // Preemption
+#define QTMS_REASON_INSUFFICIENT_MEMORY ((gint)0x00000003) // Memory
+#define QTMS_REASON_PERMISSION_DENIED ((gint)0x00000004) // Client app does not have perission
+#define QTMS_REASON_EMERGENCY_CALL_ONGOING ((gint)0x00000005) // Already ongoing emergency call
+#define QTMS_REASON_EMERGENCY_CALL_STARTED ((gint)0x00000006) // Preemption because of emergency call
+#define QTMS_REASON_SOURCE_NULL ((gint)0x00000007) // Could be checked on client side
+#define QTMS_REASON_SOURCE_NOT_SUPPORTED ((gint)0x00000008)
+#define QTMS_REASON_FORMAT_NULL ((gint)0x00000009) // Could be checked on client side
+#define QTMS_REASON_EFFECT_NOT_SUPPORTED ((gint)0x0000000A)
+#define QTMS_REASON_SINK_NULL ((gint)0x0000000B) // Could be checked on client side
+#define QTMS_REASON_SINK_NOT_SUPPORTED ((gint)0x0000000C)
+#define QTMS_REASON_CALL_NOT_ACTIVE ((gint)0x0000000D)
+
+// Event codes
+#define QTMS_EVENT_STREAM_STATE_CHANGED ((gint)0x00000000)
+#define QTMS_EVENT_SOURCE_FILL_BUFFER ((gint)0x00000001)
+#define QTMS_EVENT_SOURCE_PROCESSED_BUFFER ((gint)0x00000002)
+#define QTMS_EVENT_SINK_PROCESS_BUFFER ((gint)0x00000003)
+#define QTMS_EVENT_EFFECT_VOL_CHANGED ((gint)0x00000004)
+#define QTMS_EVENT_EFFECT_GAIN_CHANGED ((gint)0x00000005)
+#define QTMS_EVENT_ROUTING_AVAIL_OUTPUTS_CHANGED ((gint)0x00000006)
+#define QTMS_EVENT_ROUTING_OUTPUT_CHANGED ((gint)0x00000007)
+#define QTMS_EVENT_ROUTING_SET_OUTPUT_COMPLETE ((gint)0x00000008)
+#define QTMS_EVENT_RINGTONE_OPEN_COMPLETE ((gint)0x00000009)
+#define QTMS_EVENT_RINGTONE_PLAY_COMPLETE ((gint)0x0000000A)
+#define QTMS_EVENT_RINGTONE_DEINIT_COMPLETE ((gint)0x0000000B)
+#define QTMS_EVENT_DTMF_TONE_STARTED ((gint)0x0000000C)
+#define QTMS_EVENT_DTMF_TONE_STOPPED ((gint)0x0000000D)
+#define QTMS_EVENT_INBAND_TONE_STARTED ((gint)0x0000000E)
+#define QTMS_EVENT_INBAND_TONE_STOPPED ((gint)0x0000000F)
+
+// Stream states
+typedef gint QTMSStreamState;
+#define QTMS_STREAM_UNINITIALIZED ((gint)0x00000000)
+#define QTMS_STREAM_INITIALIZED ((gint)0x00000001)
+#define QTMS_STREAM_PAUSED ((gint)0x00000002)
+#define QTMS_STREAM_STARTED ((gint)0x00000003)
+
+#define DEFAULT_CALL_CONTEXT ((gint)1)
+
+// QTMS object types
+typedef gint QTMSStreamType;
+#define QTMS_STREAM_UPLINK ((gint)0)
+#define QTMS_STREAM_DOWNLINK ((gint)1)
+
+typedef gint QTMSBufferType;
+#define QTMS_BUFFER_MEMORY ((gint)2)
+
+typedef gint QTMSSourceType;
+#define QTMS_SOURCE_CLIENT ((gint)3)
+#define QTMS_SOURCE_MODEM ((gint)4)
+#define QTMS_SOURCE_MIC ((gint)5)
+
+typedef gint QTMSSinkType;
+#define QTMS_SINK_CLIENT ((gint)6)
+#define QTMS_SINK_MODEM ((gint)7)
+#define QTMS_SINK_SPEAKER ((gint)8)
+
+typedef gint QTMSEffectType;
+#define QTMS_EFFECT_GLOBAL_VOL ((gint)9)
+#define QTMS_EFFECT_GLOBAL_GAIN ((gint)10)
+#define QTMS_EFFECT_VOLUME ((gint)11)
+#define QTMS_EFFECT_GAIN ((gint)12)
+
+typedef gint QTMSFormatType;
+#define QTMS_FORMAT_PCM ((gint)13)
+#define QTMS_FORMAT_AMR ((gint)14)
+#define QTMS_FORMAT_G711 ((gint)15)
+#define QTMS_FORMAT_G729 ((gint)16)
+#define QTMS_FORMAT_ILBC ((gint)17)
+
+typedef gint QTMSRingToneType;
+#define QTMS_RINGTONE_DEFAULT ((gint)0)
+#define QTMS_RINGTONE_FILE ((gint)1)
+#define QTMS_RINGTONE_SEQUENCE ((gint)2)
+#define QTMS_RINGTONE_BEEP_ONCE ((gint)3)
+#define QTMS_RINGTONE_SILENT ((gint)4)
+#define QTMS_RINGTONE_UNSECURE_VOIP ((gint)5)
+
+typedef gint QTMSRTPSessionType;
+#define QTMS_SESSION_RTP_PULL ((gint)0)
+#define QTMS_SESSION_RTP_PUSH ((gint)1)
+
+// QTMS vectors
+typedef std::vector<QTMSFormat*> FormatVector;
+typedef std::vector<guint> BitRateVector;
+typedef std::vector<guint> OutputVector;
+
+// Call types
+typedef gint QTMSCallType;
+#define QTMS_CALL_CS ((gint)0)
+#define QTMS_CALL_ECS ((gint)1)
+#define QTMS_CALL_IP ((gint)2)
+#define QTMS_CALL_RTP ((gint)3)
+
+// Codec modes
+typedef gint QTMSG711CodecMode;
+#define QTMS_G711_CODEC_MODE_ALAW ((gint)0)
+#define QTMS_G711_CODEC_MODE_MULAW ((gint)1)
+
+typedef gint QTMSILBCCodecMode;
+#define QTMS_ILBC_CODEC_MODE_20MS_FRAME ((gint)0)
+#define QTMS_ILBC_CODEC_MODE_30MS_FRAME ((gint)1)
+
+// Audio output types
+typedef gint QTMSAudioOutput;
+#define QTMS_AUDIO_OUTPUT_NONE ((gint)0)
+#define QTMS_AUDIO_OUTPUT_PUBLIC ((gint)1)
+#define QTMS_AUDIO_OUTPUT_PRIVATE ((gint)2)
+#define QTMS_AUDIO_OUTPUT_HANDSET ((gint)3)
+#define QTMS_AUDIO_OUTPUT_LOUDSPEAKER ((gint)4)
+#define QTMS_AUDIO_OUTPUT_WIRED_ACCESSORY ((gint)5)
+#define QTMS_AUDIO_OUTPUT_ACCESSORY ((gint)6)
+#define QTMS_AUDIO_OUTPUT_ETTY ((gint)7)
+#define QTMS_AUDIO_OUTPUT_NOT_ACTIVE ((gint)8)
+
+typedef gint QTMSInbandToneType;
+#define QTMS_INBAND_USER_BUSY ((gint)0)
+#define QTMS_INBAND_RADIO_PATH_NOT_AVAIL ((gint)1)
+#define QTMS_INBAND_CONGESTION ((gint)2)
+#define QTMS_INBAND_SPECIAL_INFO ((gint)3)
+#define QTMS_INBAND_REORDER ((gint)4)
+#define QTMS_INBAND_REMOTE_ALEARTING ((gint)5)
+#define QTMS_INBAND_CALL_WAITING ((gint)6)
+#define QTMS_INBAND_DATA_CALL ((gint)7)
+#define QTMS_INBAND_NO_SEQUENCE ((gint)8)
+#define QTMS_INBAND_BEEP_SEQUENCE ((gint)9)
+
+// Structure signalling callback notifications
+struct QTMSSignalEvent
+ {
+ guint type;
+ guint reason;
+ gpointer event_data;
+ gpointer user_data;
+ gint curr_state;
+ gint prev_state;
+ };
+
+// Structure for global volume effect change event
+struct QTMSVolumeEventChangeData
+ {
+ guint level;
+ QTMSAudioOutput output;
+ gboolean output_changed;
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsamrformat.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_AMR_FORMAT_H
+#define QTMS_AMR_FORMAT_H
+
+#include <QObject>
+#include <qtmsformat.h>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSFormat;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSAMRFormat class
+ *
+ * This class provides access methods to configure and query AMR-NB codec
+ * format settings.
+ *
+ * This format class can be used for both the encoder and decoder.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSAMRFormat : public QObject,
+ public QTMSFormat
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSAMRFormat();
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSAMRFormat();
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_AMR_FORMAT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsbuffer.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_BUFFER_H
+#define QTMS_BUFFER_H
+
+#include <qtms.h>
+#include <QObject>
+
+namespace QTMS {
+
+/**
+ * QTMSBuffer class
+ *
+ * This interface provides data buffers to QTMS clients. This class allows
+ * clients to allocate data by themselves or request a specific size of the
+ * buffer from the factory.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMSBuffer : public QObject
+ {
+ Q_OBJECT
+public:
+ /**
+ * Return buffer type.
+ *
+ * @param buftype
+ * Type of the buffer object (QTMS_BUFFER_MEMORY).
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetType(QTMSBufferType& buftype) = 0;
+
+ /**
+ * Returns time stamp of the buffer so that the framework can determine
+ * the time at which this buffer has to be rendered by the output device
+ * sink.
+ *
+ * @param ts
+ * Time stamp in microseconds.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetTimeStamp(guint64& ts) = 0;
+
+ /**
+ * Sets the time stamp on the Buffer so that the framework can determine
+ * the time at which this buffer has to be rendered by the output device
+ * sink.
+ *
+ * @param ts
+ * Time stamp in microseconds.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint SetTimeStamp(const guint64 ts) = 0;
+
+ /**
+ * Returns size of data in the buffer.
+ *
+ * @param size
+ * Size of data in the buffer.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetDataSize(guint& size) = 0;
+
+ /**
+ * Set size of data in the buffer after filling in by the client.
+ *
+ * @param size
+ * Size of data in the buffer.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint SetDataSize(const guint size) = 0;
+
+ /**
+ * Return pointer to the memory location of the data associated with this
+ * buffer.
+ *
+ * @param bufptr
+ * Pointer to the data stored in the buffer.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetDataPtr(guint8*& bufptr) = 0;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_BUFFER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmscall.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_CALL_H
+#define QTMS_CALL_H
+
+#include <qtms.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSCall;
+}
+
+namespace QTMS {
+
+// FORWARD DECLARATIONS
+class QTMSStream;
+
+/**
+ * QTMSCall class
+ *
+ * This class instantiates QTMS call object of one of the following types:
+ * QTMS_CALL_CS
+ * QTMS_CALL_ECS
+ * QTMS_CALL_IP
+ *
+ * Each QTMS call contains at least 1 stream (uplink or downlink).
+ *
+ * Usage:
+ * <code>
+ * QTMSFactory *iFactory;
+ * QTMSCall *iCall;
+ * QTMSStream *iUplink;
+ * QTMSStream *iDownlink;
+ * gint err;
+ * err = QTMSFactory::CreateFactory(iFactory);
+ * err = iFactory->CreateCall(QTMS_CALL_IP, iCall);
+ * err = iCall->CreateStream(QTMS_STREAM_UPLINK, iUplink);
+ * err = iCall->CreateStream(QTMS_STREAM_DOWNLINK, iDownlink);
+ * ...
+ * err = iCall->DeleteStream(iDownlink);
+ * err = iCall->DeleteStream(iUplink);
+ * err = iFactory->DeleteCall(iCall);
+ * delete iFactory;
+ * ...
+ * </code>
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSCall : public QObject
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ *
+ */
+ virtual ~QTMSCall();
+
+ /**
+ * Return call type.
+ *
+ * This function can be called at any time.
+ *
+ * Possible call types are as follows:
+ * QTMS_CALL_CS,
+ * QTMS_CALL_ECS
+ * QTMS_CALL_IP
+ *
+ * @return
+ * Call type as indicated above.
+ *
+ */
+ QTMSCallType GetCallType();
+
+ /**
+ * Get call context ID.
+ *
+ * This ID is passed during the creation of the call object.
+ *
+ * @param ctxid
+ * Context ID.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_FATAL_ERROR if an error occured.
+ *
+ */
+ gint GetCallContextId(guint& ctxid);
+
+ /**
+ * Create QTMS stream of the given type.
+ *
+ * @param type
+ * Stream type to be created.
+ *
+ * @param strm
+ * Created stream.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_INSUFFICIENT_MEMORY if call creation failed due to
+ * insufficient memory.
+ * QTMS_RESULT_STREAM_TYPE_NOT_SUPPORTED if stream type is not
+ * supported.
+ * QTMS_RESULT_FATAL_ERROR if an error occured.
+ * QTMS_REASON_EMERGENCY_CALL_ONGOING if emergency call is active.
+ * QTMS_REASON_PERMISSION_DENIED if permission is denied.
+ *
+ */
+ gint CreateStream(const QTMSStreamType type, QTMSStream*& strm);
+
+ /**
+ * Delete stream object.
+ *
+ * @param strm
+ * Stream to be deleted.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_INVALID_ARGUMENT if the stream is not valid.
+ */
+ gint DeleteStream(QTMSStream*& strm);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSCall();
+
+protected:
+ TMS::TMSCall* iTmsCall;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_CALL_H
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsclientsink.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_CLIENT_SINK_H
+#define QTMS_CLIENT_SINK_H
+
+#include <qtms.h>
+#include <qtmssink.h>
+#include <QObject>
+#include <qglobal.h>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSSink;
+class TMSBuffer;
+}
+
+namespace QTMS {
+
+// FORWARD DECLARATIONS
+class QTMSBuffer;
+
+/**
+ * QTMSClientSink class
+ *
+ * This class provides QTMS client sink interface. It serves as a data sink
+ * to the QTMS, which supplies the client with buffers recorded by the a/v
+ * recording device. The constant flow of data between the a/v recorder
+ * device and the client is accomplished by sending BufferProcessed() events
+ * in response to TMSClientSinkObserver::ProcessBuffer sink observer callbacks.
+ * This indicates to the QTMS that the supplied buffer has been consumed by the
+ * client and it is ready to receive more recorded data.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSClientSink : public QObject,
+ public QTMSSink
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSClientSink();
+
+ /**
+ * Tell the sink that the buffer passed in has been processed by
+ * the client and is ready to be reused by the Sink.
+ *
+ * This function must be called in response to the callback from the
+ * sink observer QTMSClientSinkObserver::ProcessBuffer().
+ *
+ * @param buffer
+ * The buffer which has been processed by the client (filled in
+ * with data).
+ *
+ * @return
+ * Status of the operation.
+ *
+ */
+ gint BufferProcessed(TMS::TMSBuffer* buffer);
+
+ /**
+ * Return sink type.
+ *
+ * This function can be called at any time.
+ *
+ * @param sinktype
+ * The type of sink object (QTMS_SINK_CLIENT).
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetType(QTMSSinkType& sinktype);
+
+ Q_SIGNALS:
+ void ProcessBuffer(const TMS::TMSBuffer* buffer);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSClientSink();
+
+protected:
+ TMS::TMSSink* iSink;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_CLIENT_SINK_H
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsclientsource.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_CLIENT_SOURCE_H
+#define QTMS_CLIENT_SOURCE_H
+
+#include <qtms.h>
+#include <qtmssource.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSSource;
+class TMSBuffer;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSClientSource class
+ *
+ * This class instantiates QTMS client source interface. It serves as a data
+ * source to the QTMS, through which the client submits data buffers to the
+ * QTMS call server for playback on the audio and/or video output device.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSClientSource : public QObject,
+ public QTMSSource
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSClientSource();
+
+ /**
+ * PULL MODE ONLY
+ *
+ * Tell the source that the buffer passed in has been filled in with data
+ * by the client and it is ready to be sent do the QTMS for processing.
+ *
+ * This function must be called in response to the callback from the
+ * source observer QTMSClientSourceObserver::FillBuffer.
+ *
+ * @param buffer
+ * The buffer which has been processed by the client (filled in
+ * with data).
+ *
+ * @return
+ * Status of the operation.
+ *
+ */
+ gint BufferFilled(TMS::TMSBuffer& buffer);
+
+ /**
+ * In the PUSH MODE, tell the source that the supplied buffer filled in
+ * with data should be queued before being sent for processing by the
+ * server. All ProcessBuffer requests will be queued until client calls
+ * Flush(). After all queued buffers are pushed to the server and
+ * processed, the QTMS will respond by issuing
+ * QTMSClientSourceObserver::BufferProcessed
+ * callback event.
+ *
+ * @param buffer
+ * The buffer with audio data supplied by the client for playback.
+ *
+ */
+ gint ProcessBuffer(TMS::TMSBuffer* buffer);
+
+ /**
+ * PUSH MODE ONLY
+ *
+ * Tell the QTMS framework to queue ProcessBuffer events. To request the
+ * QTMS push mode operation, the SetEnqueueMode must be called with the
+ * flag set TRUE. Buffer enqueuing continues until the client calls
+ * Flush(). At this point all queued data (buffers) are sent over to the
+ * QTMS for processing and the enqueuing mode is turned OFF. To turn it
+ * ON again, the client has to call SetEnqueueMode with TRUE parameter.
+ *
+ * Has no effect in the PULL mode.
+ *
+ * @param enable
+ * Toggles buffer enqueuing ON and OFF.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint SetEnqueueMode(const gboolean enable);
+
+ /**
+ * PUSH MODE ONLY
+ *
+ * Return current buffer enqueuing mode setting.
+ * Has no effect in the PULL mode.
+ *
+ * @param enable
+ * Current enqueuing mode.
+ *
+ */
+ gint GetEnqueueMode(gboolean& enable);
+
+ /**
+ * PUSH MODE ONLY
+ *
+ * Push all queued buffers by ProcessBuffer to the server for processing.
+ * After calling this function, the enqueuing mode is turned OFF. To set
+ * it ON, the client has to call SetEnqueueMode again.
+ *
+ * Has no effect in the PULL mode.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint Flush();
+
+ /**
+ * Return the source type.
+ *
+ * This function can be called at any time.
+ *
+ * @param QTMSSourceType&
+ * The type of the source object. The supported source types are
+ * as follows:
+ * QTMS_SOURCE_CLIENT
+ * QTMS_SOURCE_MODEM
+ * QTMS_SOURCE_MIC
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetType(QTMSSourceType& sourcetype);
+
+ Q_SIGNALS:
+ void FillBuffer(TMS::TMSBuffer& buffer);
+ void BufferProcessed(const TMS::TMSBuffer* buffer, gint reason);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSClientSource();
+
+protected:
+ TMS::TMSSource* iSource;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_CLIENT_SOURCE_H
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsdtmf.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_DTMF_H
+#define QTMS_DTMF_H
+
+#include <qtms.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSDTMF;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSDTMFclass
+ *
+ * This class provides DTMF playback capability to the QTMS clients. Each
+ * DTMF player session is associated either with an uplink or downlink stream.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSDTMF : public QObject
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSDTMF();
+
+ /**
+ * Starts DTMF playback. In the case of downlink, the tone will be played
+ * locally. In case of uplink, the network will play tones.
+ *
+ * Common for CS and VOIP (uplink and downlink)
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint Start();
+
+ /**
+ * Stops DTMF playback.
+ * Common for CS and VOIP (Uplink and Downlink).
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint Stop();
+
+ /**
+ * Supply DTMF player with a string of tones to be played on local
+ * playback device or sent via the uplink.
+ *
+ * @param string
+ * String containing one or more DTMF digits.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint SetTone(GString* string);
+
+ /**
+ * Allows a client to continue or cancel the sending of a DTMF string
+ * when it was stopped by the use of ‘w’ char in the string.
+ * The client will set sending param to true if it wishes to continue
+ * the DTMF string sending and will set sending param to false if it
+ * wishes to discard the rest of the DTMF string.
+ * Reference: Multimode ETel API Design Document
+ *
+ * For CS calltype
+ *
+ * @param sending
+ * Boolean to continue sending DTMF string.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint ContinueDTMFStringSending(gboolean sending);
+
+ Q_SIGNALS:
+ void DTMFEvent(const QTMSDTMF& dtmf, QTMSSignalEvent event);
+
+protected:
+
+ /**
+ * Constructor
+ */
+ QTMSDTMF();
+
+protected:
+ TMS::TMSDTMF* iDtmf;
+ };
+
+} //namespace QTMS
+
+#endif //__QTMS_DTMF_H__
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmseffect.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_EFFECT_H
+#define QTMS_EFFECT_H
+
+#include <qtms.h>
+#include <QObject>
+
+namespace QTMS {
+
+/**
+ * QTMSEffect class
+ *
+ * Base class for all effect object classes.
+ * This is an abstract class.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMSEffect
+ {
+public:
+ /**
+ * Return effect type.
+ *
+ * @param effecttype
+ * Type of the effect object.
+ *
+ * @return
+ * The status of the operation.
+ *
+ */
+ virtual gint GetType(QTMSEffectType& effecttype) = 0;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_EFFECT_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsfactory.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,458 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_FACTORY_H
+#define QTMS_FACTORY_H
+
+#include <qtms.h>
+#include <QObject>
+#include <QtCore/qglobal.h>
+#include "qtmswrapperexport.h"
+
+namespace QTMS {
+
+// FORWARD DECLARATIONS
+class QTMSCall;
+class QTMSFormat;
+class QTMSEffect;
+class QTMSBuffer;
+class QTMSSource;
+class QTMSSink;
+class QTMSFactoryImpl;
+class QTMSVer; // QTMS version definition
+class QTMSGlobalRouting;
+class QTMSDTMF;
+class QTMSRingTone;
+class QTMSInbandTone;
+
+/**
+ * QTMSFactory class
+ *
+ * This class serves as a factory crating all necessary QTMS components.
+ *
+ * Usage:
+ * <code>
+ * QTMSFactory* iFactory;
+ * QTMSCall* iCall;
+ * gint err;
+ * err = QTMSFactory::CreateFactory(iFactory);
+ * err = iFactory->CreateCall(QTMS_CALL_IP, iCall);
+ * ...
+ * err = iFactory->DeleteCall(iCall);
+ * delete iFactory;
+ * ...
+ * </code>
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSFactory : public QObject
+ {
+ Q_OBJECT
+public:
+ /**
+ * Returns pointer reference to created QTMS Factory object. The specified
+ * API version will allow using different QTMS API variants.
+ *
+ * @param QTMSfactory
+ * Created Factory object.
+ *
+ * @param ver
+ * API version which should be used to create QTMS components.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if factory is created successfully.
+ * QTMS_RESULT_INSUFFICIENT_MEMORY if factory creation failed due to
+ * insufficient of memory.
+ * QTMS_RESULT_VERSION_NOT_SUPPORTED if requested API version is not
+ * supported.
+ *
+ */
+ static gint CreateFactory(QTMSFactory*& tmsfactory, QTMSVer& ver);
+
+ /**
+ * Destructor
+ *
+ * Deletes the QTMS Factory.
+ *
+ */
+ virtual ~QTMSFactory();
+
+ /**
+ * Creates QTMS Call of the given type with context ID.
+ *
+ * @param ctype
+ * Call type to be created.
+ * Supported call types:
+ * QTMS_CALL_CS
+ * QTMS_CALL_ECS
+ * QTMS_CALL_IP
+ *
+ * @param QTMScall
+ * Created Call object.
+ *
+ * @param ctxid
+ * The Context ID to be assigned to the call. The default is
+ * DEFAULT_CALL_CONTEXT.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if call is created successfully.
+ * QTMS_RESULT_INSUFFICIENT_MEMORY if call creation failed due to
+ * insufficient memory.
+ * QTMS_RESULT_CALL_TYPE_NOT_SUPPORTED if calltype is not supported.
+ * QTMS_RESULT_INVALID_ARGUMENT if the context id is not valid.
+ * QTMS_RESULT_FATAL_ERROR if there is any other error.
+ *
+ */
+ gint CreateCall(QTMSCallType ctype, QTMSCall*& QTMScall,
+ guint ctxid = DEFAULT_CALL_CONTEXT);
+
+ /**
+ * Deletes QTMS Call.
+ *
+ * @param QTMSct
+ * The call to be deleted.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if call is deleted successfully.
+ * QTMS_RESULT_INVALID_ARGUMENT if the call is not valid.
+ *
+ */
+ gint DeleteCall(QTMSCall*& qtmsct);
+
+ /**
+ * Is the given calltype supported by the QTMS API.
+ *
+ * @param ctype
+ * The call type to be validated.
+ *
+ * @param flag
+ * Indicates wheter the call type is supported or not.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if operation was successful.
+ * QTMS_RESULT_FATAL_ERROR if operation failed.
+ *
+ */
+ gint IsCallTypeSupported(QTMSCallType ctype, gboolean& flag);
+
+ /**
+ * Returns supported codec format types.
+ *
+ * @param strmtype
+ * Stream type: Uplink or Downlink
+ *
+ * @param fmtlist
+ * Format vector in which the supported formats are stored
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if operation was successful.
+ * QTMS_RESULT_FATAL_ERROR if operation failed.
+ *
+ */
+ gint GetSupportedFormats(const QTMSStreamType strmtype,
+ FormatVector& fmtlist);
+
+ /**
+ * Creates Format object of the given format type.
+ *
+ * @param fmttype
+ * Format type to be created.
+ *
+ * @param QTMSfmt
+ * Crated Format object.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if format is created successfully.
+ * QTMS_RESULT_INSUFFICIENT_MEMORY if format creation failed due to
+ * insufficient of memory.
+ * QTMS_RESULT_FORMAT_TYPE_NOT_SUPPORTED if format type is not
+ * supported.
+ *
+ */
+ gint CreateFormat(QTMSFormatType fmttype, QTMSFormat*& qtmsfmt);
+
+ /**
+ * Deletes Format object.
+ *
+ * @param QTMSfmt
+ * Format to be deleted.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if format is deleted successfully.
+ * QTMS_RESULT_INVALID_ARGUMENT if the format is not valid.
+ *
+ */
+ gint DeleteFormat(QTMSFormat*& qtmsfmt);
+
+ /**
+ * Creates Effect object of the given type.
+ *
+ * @param QTMSeffecttype
+ * Effect type to be created.
+ *
+ * @param QTMSeffect
+ * Created Effect object.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if effect is created successfully.
+ * QTMS_RESULT_INSUFFICIENT_MEMORY if effect creation failed due to
+ * insufficient memory.
+ * QTMS_RESULT_EFFECT_TYPE_NOT_SUPPORTED if the effect type is not
+ * supported.
+ *
+ */
+ gint CreateEffect(QTMSEffectType QTMSeffecttype,
+ QTMSEffect*& qtmseffect);
+
+ /**
+ * Deletes Effect object.
+ *
+ * @param QTMSeffect
+ * Effect object to be deleted.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if effect is deleted successfully.
+ * QTMS_RESULT_INVALID_ARGUMENT if the effect is not valid.
+ */
+ gint DeleteEffect(QTMSEffect*& qtmseffect);
+
+ /**
+ * Creates Buffer object of the given type and size.
+ * The memory is allocated on the heap.
+ *
+ * @param buffertype
+ * Buffer type to be created.
+ *
+ * @param size
+ * Size of the buffer to be created.
+ *
+ * @param QTMSbuffer
+ * Created buffer object.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if buffer is created successfully.
+ * QTMS_RESULT_INSUFFICIENT_MEMORY if buffer creation failed due to
+ * insufficient memory.
+ * QTMS_RESULT_BUFFER_TYPE_NOT_SUPPORTED if the buffer type is not
+ * supported.
+ *
+ */
+ gint CreateBuffer(QTMSBufferType buffertype, guint size,
+ QTMSBuffer*& qtmsbuffer);
+
+ /**
+ * Deletes the Buffer object.
+ *
+ * @param QTMSbuffer
+ * Buffer to be deleted.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if buffer is deleted successfully.
+ * QTMS_RESULT_INVALID_ARGUMENT if the buffer is not valid.
+ */
+ gint DeleteBuffer(QTMSBuffer*& qtmsbuffer);
+
+ /**
+ * Creates the Source object of the given type.
+ *
+ * @param srctype
+ * Source type to be created.
+ *
+ * @param QTMSsrc
+ * Crated source object.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if source is created successfully.
+ * QTMS_RESULT_INSUFFICIENT_MEMORY if source creation failed due to
+ * lack of memory.
+ * QTMS_RESULT_SOURCE_TYPE_NOT_SUPPORTED if the source type is not
+ * supported.
+ *
+ */
+ gint CreateSource(QTMSSourceType srctype, QTMSSource*& qtmssrc);
+
+ /**
+ * Deletes the Source object.
+ *
+ * @param QTMSsrc
+ * Source to be deleted.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if source is deleted successfully.
+ * QTMS_RESULT_INVALID_ARGUMENT if the source is not valid.
+ *
+ */
+ gint DeleteSource(QTMSSource*& qtmssrc);
+
+ /**
+ * Creates the Sink object of the given QTMSSinkType.
+ *
+ * @param sinktype
+ * Sink type to be created.
+ *
+ * @param QTMSsink
+ * Created sink object.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if sink is created successfully.
+ * QTMS_RESULT_INSUFFICIENT_MEMORY if sink creation failed due to
+ * lack of memory.
+ * QTMS_RESULT_SOURCE_TYPE_NOT_SUPPORTED if the sink type is not
+ * supported.
+ *
+ */
+ gint CreateSink(QTMSSinkType sinktype, QTMSSink*& qtmssink);
+
+ /**
+ * Deletes the Sink object.
+ *
+ * @param QTMSsink
+ * The sink to be deleted.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if sink is deleted successfully.
+ * QTMS_RESULT_INVALID_ARGUMENT if the sink is not valid.
+ */
+ gint DeleteSink(QTMSSink*& qtmssink);
+
+ /**
+ * Creates QTMSGlobalRouting object.
+ *
+ * @param globrouting
+ * Created global routing object.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if global routing object is created successfully.
+ * QTMS_RESULT_INSUFFICIENT_MEMORY if global routing creation failed
+ * due to lack of memory.
+ * QTMS_RESULT_SOURCE_TYPE_NOT_SUPPORTED if global routing is not
+ * supported.
+ *
+ */
+ gint CreateGlobalRouting(QTMSGlobalRouting*& globrouting);
+
+ /**
+ * Deletes QTMSGlobalRouting object.
+ *
+ * @param globrouting
+ * Global routing object to be deleted.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if global routing object is deleted successfully.
+ * QTMS_RESULT_INVALID_ARGUMENT if the global routing object is invalid.
+ */
+ gint DeleteGlobalRouting(QTMSGlobalRouting*& globrouting);
+
+ /**
+ * Create DTMF player object.
+ *
+ * @param streamtype
+ * Stream ID to be used to create the DTMF player.
+ * QTMS_STREAM_UPLINK
+ * QTMS_STREAM_DOWNLINK
+ *
+ * @param dtmf
+ * Created DTMF player.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_INSUFFICIENT_MEMORY if DTMF player creation failed due
+ * to insufficient memory.
+ * QTMS_RESULT_FATAL_ERROR if an error occured.
+ * QTMS_REASON_EMERGENCY_CALL_ONGOING if emergency call is active.
+ * QTMS_REASON_PERMISSION_DENIED if permission is denied.
+ *
+ */
+ gint CreateDTMF(QTMSStreamType streamtype, QTMSDTMF*& dtmf);
+
+ /**
+ * Delete DTMF player object.
+ *
+ * @param dtmf
+ * DTMF player to be deleted.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_INVALID_ARGUMENT if the DTMF player is not valid.
+ *
+ */
+ gint DeleteDTMF(QTMSDTMF*& dtmf);
+
+ /**
+ * Creates QTMSRingTone player object for audio ring tone.
+ *
+ * @param rt
+ * RingTone player object to be created.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS when object is created successfully.
+ * QTMS_RESULT_INSUFFICIENT_MEMORY when object creation failed due to
+ * insufficient memory.
+ */
+ gint CreateRingTonePlayer(QTMSRingTone*& rt);
+
+ /**
+ * Deletes QTMSRingTone object.
+ *
+ * @param rt
+ * RingTone player object to be deleted.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS when object is deleted successfully.
+ * QTMS_RESULT_INVALID_ARGUMENT if RingTone player object is invalid.
+ */
+ gint DeleteRingTonePlayer(QTMSRingTone*& rt);
+
+ /**
+ * Creates QTMSInbandTone player object.
+ *
+ * @param inbandtone
+ * InbandTone player object to be created.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS when object is created successfully.
+ * QTMS_RESULT_INSUFFICIENT_MEMORY when object creation failed due to
+ * insufficient memory.
+ */
+ gint CreateInbandTonePlayer(QTMSInbandTone*& inbandtone);
+
+ /**
+ * Deletes QTMSInbandTone object.
+ *
+ * @param inbandtone
+ * InbandTone player object to be deleted.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS when object is deleted successfully.
+ * QTMS_RESULT_INVALID_ARGUMENT if InbandTone player object is invalid.
+ */
+ gint DeleteInbandTonePlayer(QTMSInbandTone*& inbandtone);
+
+private:
+ /**
+ * Constructor
+ */
+ QTMSFactory();
+
+private:
+ QTMSFactoryImpl* impl;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_FACTORY_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsformat.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_FORMAT_H
+#define QTMS_FORMAT_H
+
+#include <qtms.h>
+#include "qtmswrapperexport.h"
+
+namespace TMS {
+class TMSFormat;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSFormat class
+ *
+ * This is base class for codec format classes. Provides access methods to
+ * configure and query common codec format settings.
+ *
+ * This format class can be used for both the encoder and decoder.
+ *
+ * Usage:
+ * <code>
+ * QTMSFactory* iFactory;
+ * QTMSFormat* iFormat
+ * gint err;
+ * err = QTMSFactory::CreateFactory(iFactory);
+ * err = iFactory->Create(QTMS_FORMAT_XXX,iFormat);
+ * ...
+ * </code>
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSFormat
+ {
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSFormat();
+
+ /**
+ * Get supported bitrates. Returns list of supported bitrates for the
+ * selected encoder
+ *
+ * This method is allowable at all times, while actively encoding or not.
+ *
+ * @param bitrates
+ * The typedef std::vector<guint> BitRateVector; list of codecs.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
+ * by the adaptation.
+ *
+ */
+ gint GetSupportedBitRates(BitRateVector& bitrates);
+
+ /**
+ * Set bitrate.
+ *
+ * This method is allowable at all times, while actively encoding or not.
+ *
+ * @param bitrate
+ * Bitrate to be set for the encoder.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_INVALID_ARGUMENT if requested bitrate is invalid.
+ * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
+ * by the adaptation.
+ *
+ */
+ gint SetBitRate(const guint bitrate);
+
+ /**
+ * Get current encoder's bitrate.
+ *
+ * This method is allowable at all times, while actively encoding or not.
+ *
+ * @param bitrate
+ * Current bitrate.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
+ * by the adaptation.
+ *
+ */
+ gint GetBitRate(guint& bitrate);
+
+ /**
+ * Return format type.
+ *
+ * @param fmttype
+ * Type of the format object.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetType(QTMSFormatType& fmttype);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSFormat();
+
+protected:
+ TMS::TMSFormat* iFormat;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_FORMAT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsg711format.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,205 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_G711_FORMAT_H
+#define QTMS_G711_FORMAT_H
+
+#include <qtms.h>
+#include <qtmsformat.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSFormat;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSG711Format class
+ *
+ * This class provides access methods to configure and query G.711 codec
+ * format settings.
+ *
+ * This format class can be used for both the encoder and decoder.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSG711Format : public QObject,
+ public QTMSFormat
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSG711Format();
+
+ /**
+ * Set G.711 codec mode.
+ *
+ * This method is allowable when encoding is not active; i.e. anytime
+ * before encoding is started or after it is stopped.
+ *
+ * Supported G.711 codec modes are:
+ * QTMS_G711_CODEC_MODE_ALAW
+ * QTMS_G711_CODEC_MODE_MULAW
+ *
+ * @param mode
+ * Sets selected G.711 encoding or decoding mode.
+
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_INVALID_STATE if this method is used during active
+ * encoding or decoding operation.
+ * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
+ * by the adaptation.
+ *
+ */
+ gint SetMode(const QTMSG711CodecMode mode);
+
+ /**
+ * Return current G.711 codec mode.
+ *
+ * This method is allowable at all times, while actively encoding/decoding
+ * or not.
+ *
+ * Supported G.711 codec modes are:
+ * QTMS_G711_CODEC_MODE_ALAW
+ * QTMS_G711_CODEC_MODE_MULAW
+ *
+ * @param mode
+ * Returns current G.711 encoding or decoding mode.
+
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetMode(QTMSG711CodecMode& mode);
+
+ /**
+ * Toggles on and off Comfort Noise Generator (CNG) for G.711 decoder.
+ * Not supported by the encoder.
+ *
+ * This method is allowable when decoding is not active; i.e. anytime
+ * before decoding is started or after it is stopped.
+ *
+ * @param cng
+ * Sets CNG feature on or off.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_INVALID_STATE if this method is used during active
+ * decoding operation.
+ * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
+ * by the adaptation.
+ *
+ */
+ gint SetCNG(const gboolean cng);
+
+ /**
+ * Returns current CNG setting of the G.711 decoder.
+ *
+ * This method is allowable when decoding is not active; i.e. anytime
+ * before decoding is started or after it is stopped.
+ *
+ * @param cng
+ * Current CNG setting of the decoder.
+ *
+ * @return gint
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetCNG(gboolean& cng);
+
+ /**
+ * Toggles on and off Packet Loss Concealment (PLC) for G.711 decoder.
+ * Not supported by the encoder.
+ *
+ * This method is allowable when decoding is not active; i.e. anytime
+ * before decoding is started or after it is stopped.
+ *
+ * @param plc
+ * Sets PLC feature on or off.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_INVALID_STATE if this method is used during active
+ * decoding operation.
+ * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
+ * by the adaptation.
+ *
+ */
+ gint SetPlc(const gboolean plc);
+
+ /**
+ * Returns current PLC setting of the G.711 decoder.
+ *
+ * This method is allowable at all times, while actively decoding or not.
+ *
+ * @param plc
+ * Current CNG setting of the decoder.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetPlc(gboolean& plc);
+
+ /**
+ * Toggles on and off Voice Activation Detection (VAD) for G.711 encoder.
+ * Not supported by the decoder.
+ *
+ * This method is allowable at all times, while actively encoding or not.
+ *
+ * @param vad
+ * Sets VAD feature on or off.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
+ * by the adaptation.
+ *
+ */
+ gint SetVADMode(const gboolean vad);
+
+ /**
+ * Returns current VAD setting of the G.711 encoder.
+ *
+ * This method is allowable at all times, while actively encoding or not.
+ *
+ * @param vad
+ * Current VAD setting of the encoder.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetVADMode(gboolean& vad);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSG711Format();
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_G711_FORMAT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsg729format.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_G729_FORMAT_H
+#define QTMS_G729_FORMAT_H
+
+#include <qtms.h>
+#include <qtmsformat.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSFormat;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSG729Format class
+ *
+ * This class provides access methods to configure and query G.729 codec
+ * format settings.
+ *
+ * This format class can be used for both the encoder and decoder.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSG729Format : public QObject,
+ public QTMSFormat
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSG729Format();
+
+ /**
+ * Toggles on and off Voice Activation Detection (VAD) for G.729 encoder.
+ * Not supported by the decoder.
+ *
+ * This method is allowable at all times, while actively encoding or not.
+ *
+ * @param vad
+ * Sets VAD feature on or off.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
+ * by the adaptation.
+ * QTMS_RESULT_DOES_NOT_EXIST if the custom interface handle does
+ * not exist.
+ *
+ */
+ gint SetVADMode(const gboolean vad);
+
+ /**
+ * Returns current VAD setting of the G.729 encoder.
+ *
+ * This method is allowable at all times, while actively encoding or not.
+ *
+ * @param vad
+ * Current VAD setting of the encoder.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetVADMode(gboolean& vad);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSG729Format();
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_G729_FORMAT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsgaineffect.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_GAIN_EFFECT_H
+#define QTMS_GAIN_EFFECT_H
+
+#include <qtms.h>
+#include <qtmseffect.h>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSEffect;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSGainEffect class
+ *
+ * This class provides microphone gain level control in the stream scope.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSGainEffect : public QObject,
+ public QTMSEffect
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSGainEffect();
+
+ /**
+ * Set mic gain level. The gain level should not be higher than
+ * the value returned by GetMaxLevel().
+ *
+ * @param level
+ * Gain level to be set.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint SetLevel(const guint level);
+
+ /**
+ * Return mic gain level.
+ *
+ * @param level
+ * Current mic gain level.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetLevel(guint& level);
+
+ /**
+ * Return max microphone gain level supported by the device.
+ *
+ * @param level
+ * Max gain level.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetMaxLevel(guint& level);
+
+ /**
+ * Returns type of the effect.
+ *
+ * This function can be called at any time.
+ *
+ * @param effecttype
+ * Variable that contains the effect type on return.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetType(QTMSEffectType& effecttype);
+
+ Q_SIGNALS:
+ void EffectsEvent(const QTMSEffect& tmseffect, QTMSSignalEvent event);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSGainEffect();
+
+protected:
+ TMS::TMSEffect *iEffect;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_GAIN_EFFECT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsglobalgaineffect.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_GLOBAL_GAIN_EFFECT_H
+#define QTMS_GLOBAL_GAIN_EFFECT_H
+
+#include <qtms.h>
+#include <qtmseffect.h>
+#include "qtmswrapperexport.h"
+#include <QObject>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSEffect;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSGlobalGainEffect class
+ *
+ * This class provides microphone gain level control in the global QTMS scope.
+ * Mic gain level changes done by any client are adjusted accross all calls
+ * serviced by the QTMS server.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSGlobalGainEffect : public QObject,
+ public QTMSEffect
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSGlobalGainEffect();
+
+ /**
+ * Set global microphone gain level. The global gain level should be
+ * between 0 and the max value returned by GetMaxLevel().
+ *
+ * @param level
+ * Gain level to be set.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint SetLevel(const guint level);
+
+ /**
+ * Return current global microphone gain level.
+ *
+ * @param level
+ * Current mic gain level.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetLevel(guint& level);
+
+ /**
+ * Return max microphone gain level supported by the device.
+ *
+ * @param level
+ * Max mic gain level.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetMaxLevel(guint& level);
+
+ /**
+ * Return effect type.
+ *
+ * @param effecttype
+ * Type of the effect object (QTMS_EFFECT_GLOBAL_GAIN).
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetType(QTMSEffectType& effecttype);
+
+ Q_SIGNALS:
+ void EffectsEvent(const QTMSEffect& tmseffect, QTMSSignalEvent event);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSGlobalGainEffect();
+
+protected:
+ TMS::TMSEffect* iEffect;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_GLOBAL_GAIN_EFFECT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsglobalrouting.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_GLOBAL_ROUTING_H
+#define QTMS_GLOBAL_ROUTING_H
+
+#include <qtms.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSGlobalRouting;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSGlobalRouting class
+ *
+ * This class provides audio routing control in the global QTMS scope.
+ * Audio routing changes done by any client are adjusted accross all calls
+ * serviced by the QTMS server.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSGlobalRouting : public QObject
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSGlobalRouting();
+
+ /**
+ * Set global output device audio should be routed to.
+ *
+ * Settings are call-type dependent.
+ *
+ * Common:
+ * QTMS_AUDIO_OUTPUT_NONE
+ * VoIP call type:
+ * QTMS_AUDIO_OUTPUT_PUBLIC
+ * QTMS_AUDIO_OUTPUT_PRIVATE
+ * CS call type:
+ * QTMS_AUDIO_OUTPUT_HANDSET
+ * QTMS_AUDIO_OUTPUT_LOUDSPEAKER
+ * QTMS_AUDIO_OUTPUT_WIRED_ACCESSORY
+ * QTMS_AUDIO_OUTPUT_ACCESSORY
+ * QTMS_AUDIO_OUTPUT_ETTY
+ *
+ * @param output
+ * Sets call-specific audio output device.
+ *
+ * @return
+ * QTMS_RESULT_INVALID_ARGUMENT if set to QTMS_AUDIO_OUTPUT_NONE.
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint SetOutput(const QTMSAudioOutput output);
+
+ /**
+ * Return current global audio output device settings.
+ *
+ * Settings are call-type dependent.
+ * See SetOutput() (above)
+ *
+ * @param output
+ * Current audio output device.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetOutput(QTMSAudioOutput& output);
+
+ /**
+ * Return previous audio output device.
+ *
+ * Settings are call-type dependent.
+ * See SetOutput() (above)
+ *
+ * @param output
+ * Previous audio output device.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetPreviousOutput(QTMSAudioOutput& output);
+
+ /**
+ * Return list of supported audio output devices.
+ *
+ * Settings are call-type dependent.
+ * See SetOutput() (above)
+ *
+ * @param outputs
+ * The typedef std::vector<guint> OutputVector; list of supported
+ * audio output devices (QTMSAudioOutput-type).
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetAvailableOutputs(OutputVector& outputs);
+
+ Q_SIGNALS:
+ void GlobalRoutingEvent(const QTMSGlobalRouting& routing,
+ QTMSSignalEvent event, QTMSAudioOutput output);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSGlobalRouting();
+
+protected:
+ TMS::TMSGlobalRouting* iRouting;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_GLOBAL_ROUTING_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsglobalvoleffect.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_GLOBAL_VOL_EFFECT_H
+#define QTMS_GLOBAL_VOL_EFFECT_H
+
+#include <qtms.h>
+#include <qtmseffect.h>
+#include <QObject>
+#include <qglobal.h>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSEffect;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSGlobalVolEffect class
+ *
+ * This class provides volume level control in the global QTMS scope. Volume
+ * level changes done by any client are adjusted accross all calls serviced
+ * by the QTMS server.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSGlobalVolEffect : public QObject,
+ public QTMSEffect
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSGlobalVolEffect();
+
+ /**
+ * Set global audio volume level. The volume level should be between 0
+ * and the max value returned by GetMaxLevel().
+ *
+ * @param level
+ * the volume level to be set.
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ */
+ gint SetLevel(const guint level);
+
+ /**
+ * Return current global audio volume level.
+ *
+ * @param level
+ * Volume level to be set.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetLevel(guint& level);
+
+ /**
+ * Return max volume level supported by the device.
+ *
+ * @param level
+ * Max volume level.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetMaxLevel(guint& level);
+
+ /**
+ * Return effect type.
+ *
+ * @param effecttype
+ * Type of the effect object (QTMS_EFFECT_GLOBAL_VOL).
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetType(QTMSEffectType& effecttype);
+
+ Q_SIGNALS:
+ void EffectsEvent(const QTMSEffect& tmseffect, QTMSSignalEvent event);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSGlobalVolEffect();
+
+protected:
+ TMS::TMSEffect* iEffect;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_GLOBAL_VOL_EFFECT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsilbcformat.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,177 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_ILBC_FORMAT_H
+#define QTMS_ILBC_FORMAT_H
+
+#include <qtms.h>
+#include <qtmsformat.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSFormat;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSILBCFormat class
+ *
+ * This class provides access methods to configure and query iLBC codec
+ * format settings.
+ *
+ * This format class can be used for both the encoder and decoder.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSILBCFormat : public QObject,
+ public QTMSFormat
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSILBCFormat();
+
+ /**
+ * Set iLBC codec mode.
+ *
+ * This method is allowable when encoding is not active; i.e. anytime
+ * before encoding is started or after it is stopped.
+ *
+ * Supported iLBC codec modes are:
+ * QTMS_ILBC_CODEC_MODE_20MILLI_SEC_FRAME
+ * QTMS_ILBC_CODEC_MODE_30MILLI_SEC_FRAME
+ *
+ * @param mode
+ * Sets selected iLBC encoding or decoding mode.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_INVALID_STATE if this method is used during active
+ * encoding or decoding operation.
+ * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
+ * by the adaptation.
+ * QTMS_RESULT_DOES_NOT_EXIST if the custom interface handle does
+ * not exist.
+ *
+ */
+ gint SetMode(const QTMSILBCCodecMode mode);
+
+ /**
+ * Return current iLBC codec mode.
+ *
+ * This method is allowable at all times, while actively encoding/decoding
+ * or not.
+ *
+ * Supported iLBC codec modes are:
+ * QTMS_ILBC_CODEC_MODE_20MILLI_SEC_FRAME
+ * QTMS_ILBC_CODEC_MODE_30MILLI_SEC_FRAME
+ *
+ * @param mode
+ * Returns current iLBC encoding or decoding mode.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetMode(QTMSILBCCodecMode& mode);
+
+ /**
+ * Toggles on and off Comfort Noise Generator (CNG) for iLBC decoder.
+ * Not supported by the encoder.
+ *
+ * This method is allowable when decoding is not active; i.e. anytime
+ * before decoding is started or after it is stopped.
+ *
+ * @param cng
+ * Sets CNG feature on or off.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_INVALID_STATE if this method is used during active
+ * decoding operation.
+ * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
+ * by the adaptation.
+ * QTMS_RESULT_DOES_NOT_EXIST if the custom interface handle does
+ * not exist.
+ *
+ */
+ gint SetCNG(const gboolean cng);
+
+ /**
+ * Returns current CNG setting of the iLBC decoder.
+ *
+ * This method is allowable when decoding is not active; i.e. anytime
+ * before decoding is started or after it is stopped.
+ *
+ * @param cng
+ * Current CNG setting of the decoder.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetCNG(gboolean& cng);
+
+ /**
+ * Toggles on and off Voice Activation Detection (VAD) for iLBC encoder.
+ * Not supported by the decoder.
+ *
+ * This method is allowable at all times, while actively encoding or not.
+ *
+ * @param vad
+ * Sets VAD feature on or off.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ * QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
+ * by the adaptation.
+ * QTMS_RESULT_DOES_NOT_EXIST if the custom interface handle does
+ * not exist.
+ *
+ */
+ gint SetVADMode(const gboolean vad);
+
+ /**
+ * Returns current VAD setting of the iLBC encoder.
+ *
+ * This method is allowable at all times, while actively encoding or not.
+ *
+ * @param vad
+ * Current VAD setting of the encoder.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetVADMode(gboolean& vad);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSILBCFormat();
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_ILBC_FORMAT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsinbandtone.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_INBAND_TONE_H
+#define QTMS_INBAND_TONE_H
+
+#include <glib.h>
+#include <qtms.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSInbandTone;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSInbandTone class
+ *
+ * This class provides Inband tone playback capability to the QTMS clients.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSInbandTone : public QObject
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSInbandTone();
+
+ /**
+ * Starts the inband tone playback. The inband volume will correspond to
+ * the current downlink volume level.
+ *
+ * For CS calltype.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint Start(QTMSInbandToneType inbandtonetype);
+
+ /**
+ * Stops the inband tone playback.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint Stop();
+
+ Q_SIGNALS:
+ void InbandToneEvent(const QTMSInbandTone& inbandtone,
+ QTMSSignalEvent event);
+
+protected:
+
+ /**
+ * Constructor
+ */
+ QTMSInbandTone();
+
+protected:
+ TMS::TMSInbandTone* iInbandTone;
+ };
+
+} //namespace QTMS
+
+#endif //__QTMS_INBAND_TONE_H__
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsmicsource.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_MIC_SOURCE_H
+#define QTMS_MIC_SOURCE_H
+
+#include <qtms.h>
+#include <qtmssource.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSSource;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSMicSource class
+ *
+ * This class instantiates QTMS mic source object.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSMicSource : public QObject,
+ public QTMSSource
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSMicSource();
+
+ /**
+ * Return source type.
+ *
+ * This function can be called at any time.
+ *
+ * @param sourcetype
+ * The type of sink object (QTMS_SOURCE_MIC).
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetType(QTMSSourceType& sourcetype);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSMicSource();
+
+protected:
+ TMS::TMSSource *iSource;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_MIC_SOURCE_H
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsmodemsink.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_MODEM_SINK_H
+#define QTMS_MODEM_SINK_H
+
+#include <qtms.h>
+#include <qtmssink.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSSink;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSModemSink class
+ *
+ * This class instantiates QTMS modem sink object.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSModemSink : public QObject,
+ public QTMSSink
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSModemSink();
+
+ /**
+ * Return sink type.
+ *
+ * This function can be called at any time.
+ *
+ * @param sinktype
+ * The type of sink object (QTMS_SINK_MODEM).
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetType(QTMSSinkType& sinktype);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSModemSink();
+
+protected:
+ TMS::TMSSink *iSink;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_MODEM_SINK_H
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsmodemsource.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_MODEM_SOURCE_H
+#define QTMS_MODEM_SOURCE_H
+
+#include <qtms.h>
+#include <qtmssource.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSSource;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSModemSource class
+ *
+ * This class instantiates QTMS mode source object.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSModemSource : public QObject,
+ public QTMSSource
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSModemSource();
+
+ /**
+ * Return source type.
+ *
+ * This function can be called at any time.
+ *
+ * @param sourcetype
+ * The type of sink object (QTMS_SOURCE_MODEM).
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetType(QTMSSourceType& sourcetype);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSModemSource();
+
+protected:
+ TMS::TMSSource *iSource;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_MODEM_SOURCE_H
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmspcmformat.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_PCM_FORMAT_H
+#define QTMS_PCM_FORMAT_H
+
+#include <qtms.h>
+#include <qtmsformat.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSFormat;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSPCMFormat class
+ *
+ * This class provides access methods to configure and query PCM-16 codec
+ * format settings.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSPCMFormat : public QObject,
+ public QTMSFormat
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSPCMFormat();
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSPCMFormat();
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_PCM_FORMAT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsringtone.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_RINGTONE_H
+#define QTMS_RINGTONE_H
+
+#include <qtms.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSRingTone;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSRingTone class
+ *
+ * This class provides ring tone playback capability to the QTMS clients.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSRingTone : public QObject
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSRingTone();
+
+ /**
+ * Init ring tone player to play supplied content based on its type.
+ *
+ * @param type
+ * Type of the content descriptor. Allowed types:
+ * - QTMS_RINGTONE_DEFAULT - use RT from current Profile
+ * - QTMS_RINGTONE_FILE - A/V File
+ * - QTMS_RINGTONE_SEQUENCE - RNG sequence in the descriptor format
+ * - QTMS_RINGTONE_BEEP_ONCE - play a beep
+ * - QTMS_RINGTONE_SILENT - play silent tone
+ * - QTMS_RINGTONE_UNSECURE_VOIP - play tone for uncecure VoIP call
+ *
+ * @param str
+ * Content descriptor to play. String containing one of the following:
+ * - File with folder name
+ * - Nokia ring tone sequence in a descriptor format
+ * - NULL - Will use current Profile.
+ *
+ * @param tts
+ * Text to be played. When added it will be played along with the
+ * tone. TTS can only be played with QTMS_RINGTONE_DEFAULT and
+ * TMS_RINGTONE_FILE. Parameter will be ignored for all other types.
+ * - NULL - Will use current Profile TTS setting - caller's name
+ * will be played from the phone book (if available).
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint Init(const QTMSRingToneType type = QTMS_RINGTONE_DEFAULT,
+ GString* str = NULL, GString* tts = NULL);
+
+ /**
+ * Deinit ring tone player.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint Deinit();
+
+ /**
+ * Start ring tone playback.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint Play();
+
+ /**
+ * Stop ring tone playback.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint Stop();
+
+ /**
+ * Pause video ring tone playback.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint Pause();
+
+ /**
+ * Mute ring tone playback.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint Mute();
+
+ Q_SIGNALS:
+ void RingtoneEvent(const QTMSRingTone& rt, QTMSSignalEvent event);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSRingTone();
+
+protected:
+ TMS::TMSRingTone *iRingTone;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_RINGTONE_H
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmssink.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_SINK_H
+#define QTMS_SINK_H
+
+#include <qtms.h>
+
+namespace QTMS {
+
+/**
+ * QTMSSink class
+ *
+ * Base class for QTMS data sink type objects.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMSSink
+ {
+public:
+ /**
+ * Returns type of the concrete data sink object implementation.
+ *
+ * This function can be called at any time.
+ *
+ * @param sinktype&
+ * Contains data sink type on return.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if sink type is returned successfully.
+ *
+ */
+ virtual gint GetType(QTMSSinkType& sinktype) = 0;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_SINK_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmssource.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_SOURCE_H
+#define QTMS_SOURCE_H
+
+#include <qtms.h>
+
+namespace QTMS {
+
+/**
+ * QTMSSource class
+ *
+ * Base class for QTMS data source type objects.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMSSource
+ {
+public:
+ /**
+ * Returns type of the concrete data source object implementation.
+ *
+ * This function can be called at any time.
+ *
+ * @param sourcetype
+ * Contains data source type on return.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if source type is returned successfully.
+ *
+ */
+ virtual gint GetType(QTMSSourceType& sourcetype) = 0;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_SOURCE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsspeakersink.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_SPEAKER_SINK_H
+#define QTMS_SPEAKER_SINK_H
+
+#include <qtms.h>
+#include <qtmssink.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSSink;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSSpeakerSink class
+ *
+ * This class instantiates QTMS speaker sink object.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSSpeakerSink : public QObject,
+ public QTMSSink
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSSpeakerSink();
+
+ /**
+ * Return sink type.
+ *
+ * This function can be called at any time.
+ *
+ * @param sinktype
+ * The type of sink object (QTMS_SINK_SPEAKER).
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetType(QTMSSinkType& sinktype);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSSpeakerSink();
+
+protected:
+ TMS::TMSSink *iSink;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_SPEAKER_SINK_H
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsstream.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,508 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_STREAM_H
+#define QTMS_STREAM_H
+
+// Include files
+#include <qtms.h>
+#include <QObject>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSStream;
+}
+
+namespace QTMS {
+
+// Forward declarations
+class QTMSSource;
+class QTMSSink;
+class QTMSEffect;
+class QTMSFormat;
+class QTMSBuffer;
+
+/**
+ * QTMSStream class
+ *
+ * QTMSStream class represents either uplink or downlink stream associated with
+ * a QTMSCall.
+ *
+ * This class provides means for setting up and controlling telephony
+ * multimedia streams associated with a Circuit Switching (CS) call or Packet
+ * Switching (PS) such as IP call.
+ *
+ * QTMSStream instances are created by QTMSCall instance. Multiple QTMSStream
+ * instances (uplink and/or downlink streams) can be created. The QTMS engine
+ * does not limit the number of streams created per QTMSCall object. However,
+ * the combination of device policy and device run-time resources (both
+ * software and hardware) may limit this use-case.
+ *
+ * QTMSCall is a container which owns all its QTMSStream instances. The client
+ * has an option of creating and deleting individual streams. However, when a
+ * QTMSCall instance is deleted, all the streams associated with it are
+ * automatically deleted as well.
+ *
+ * QTMS ver 1.0.0.0:
+ * (1) An initialized stream will have one source, zero or one format,
+ * zero or more effects, and one or more sinks.
+ *
+ * (2) In the initial version of the QTMS implementation, the CS uplink and
+ * downlink streams will not control or communicate with the cellular modem.
+ * Also, the PS (IP) uplink and downlink streams will not handle network
+ * protocol. It is assumed that the QTMS client will handle this functionality.
+ *
+ * States:
+ * (1) QTMS_STREAM_UNINITIALIZED (initial state): The stream is alive but has
+ * not allocated all the resources it needs to function.
+ *
+ * (2) QTMS_STREAM_INITIALIZED: The stream has all the information required to
+ * acquire the media resources. Stream in this state will have most of the
+ * resources allocated, except the critical system resources, such as policy
+ * and/or hardware resources.
+ *
+ * (3) QTMS_STREAM_PAUSED: The stream has all the resources allocated, which may
+ * include critical system resources such as policy and/or hardware resources.
+ *
+ * (4) QTMS_STREAM_STARTED: The stream has all the resources allocated,
+ * including critical system resources such as policy and/or hardware resources
+ * and is active.
+ *
+ * Usage:
+ * <code>
+ * QTMSFactory *iFactory;
+ * QTMSCall *iCall;
+ * QTMSStream *iUplink;
+ * QTMSStream *iDownlink;
+ * gint err;
+ *
+ * err = QTMSFactory::CreateFactory(iFactory);
+ * err = iFactory->CreateCall(QTMS_CALL_IP, iCall);
+ * err = iCall->CreateStream(QTMS_STREAM_UPLINK, iUplink);
+ * err = iCall->CreateStream(QTMS_STREAM_DOWNLINK, iDownlink);
+ * // Configure CS uplink stream
+ * iUplinkStream->AddObserver(*this);
+ * iUplinkStream->AddSource(iMicSource);
+ * iUplinkStream->AddSink(iModemSink);
+ * iUplinkStream->AddEffect(iGainEffect); // To control mic gain
+ * iUplinkStream->Init();
+ * // Wait for state change callback
+ * iUplinkStream->Play();
+ * // Wait for state change callback
+ * ...
+ * // call terminated on the cell modem side, now signal multimedia system
+ * iUplinkStream->Stop();
+ * ...
+ * err = iCall->DeleteStream(iDownlink);
+ * err = iCall->DeleteStream(iUplink);
+ * err = iFactory->DeleteCall(iCall);
+ * delete iFactory;
+ *
+ * </code>
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+
+class QTMS_WRAPPER_DLL_EXPORT QTMSStream : public QObject
+ {
+ Q_OBJECT
+public:
+
+ /**
+ * Destructor
+ */
+ virtual ~QTMSStream();
+
+ /**
+ * Add source for this stream.
+ *
+ * This function can be called only when stream is in
+ * QTMS_STREAM_UNINITIALIZED state.
+ *
+ * After source is added to the stream successfully, ownership of the source
+ * is vested in this stream. If the client wants to reuse the source, it
+ * should call RemoveSource() to re-claim QTMSSource ownership.
+ *
+ * @param source
+ * Source object to be added to the stream.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if source is added successfully to the stream.
+ * QTMS_RESULT_NULL_ARGUMENT if source is a NULL.
+ * QTMS_RESULT_ALREADY_EXIST if source has already been added to the
+ * stream.
+ * QTMS_RESULT_INVALID_STATE if stream is not
+ * in the QTMS_STREAM_UNINITIALIZED state.
+ *
+ */
+ gint AddSource(QTMSSource* source);
+
+ /**
+ * Remove source from this stream.
+ *
+ * This function can be called only when stream is in
+ * QTMS_STREAM_UNINITIALIZED state.
+ *
+ * After source is removed from the stream successfully, ownership of
+ * source is re-claimed by the client.
+ *
+ * @param source
+ * The source to remove.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if source is removed successfully from the
+ * stream.
+ * QTMS_RESULT_NULL_ARGUMENT if source is a NULL.
+ * QTMS_RESULT_DOES_NOT_EXIST if trying to remove the source that has
+ * not been added to stream.
+ * QTMS_RESULT_INVALID_STATE if stream is not
+ * in the QTMS_STREAM_UNINITIALIZED state.
+ *
+ */
+ gint RemoveSource(QTMSSource* source);
+
+ /**
+ * Add sink to the stream.
+ *
+ * Multiple sinks of different types can be added to a stream.
+ *
+ * This function can be called only when stream is in
+ * QTMS_STREAM_UNINITIALIZED state.
+ *
+ * After sink is added to the stream successfully, ownership of the sink is
+ * vested in the stream. If the client wants to reuse sink, it should call
+ * RemoveSink() to re-claim QTMSSink ownership.
+ *
+ * @param sink
+ * Data sink to be added to the stream.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if sink is added successfully to the stream.
+ * QTMS_RESULT_NULL_ARGUMENT if sink is a NULL.
+ * QTMS_RESULT_ALREADY_EXIST if sink type is already added to the
+ * stream.
+ * QTMS_RESULT_INVALID_STATE if stream is not
+ * in the QTMS_STREAM_UNINITIALIZED state.
+ *
+ */
+ gint AddSink(QTMSSink* sink);
+
+ /**
+ * Remove sink from the stream.
+ *
+ * This function can be called only when stream is in
+ * QTMS_STREAM_UNINITIALIZED state.
+ *
+ * After sink is removed from the stream successfully, ownership of the
+ * sink is re-claimed by the client.
+ *
+ * @param sink
+ * Sink to removed from the stream.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if sink is removed successfully from the stream.
+ * QTMS_RESULT_NULL_ARGUMENT if sink is a NULL.
+ * QTMS_RESULT_DOES_NOT_EXIST if trying to remove sink that has not
+ * been added to the stream.
+ * QTMS_RESULT_INVALID_STATE if stream is not
+ * in the QTMS_STREAM_UNINITIALIZED state.
+ *
+ */
+ gint RemoveSink(QTMSSink* sink);
+
+ /**
+ * Set data format for the stream.
+ *
+ * This function can be called only when stream is in the
+ * QTMS_STREAM_UNINITIALIZED state.
+ *
+ * After format is added to the stream successfully, ownership of the
+ * format is vested in this stream. If the client wants to reuse format,
+ * it should call ResetFormat() to re-claim QTMSFormat ownership.
+ *
+ * Note: In QTMS Ver 1.0.0.0, setting data format for CS call is not
+ * required.
+ *
+ * @param format
+ * Data format to be set on the stream.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if format is set successfully on the stream.
+ * QTMS_RESULT_NULL_ARGUMENT if format is a NULL.
+ * QTMS_RESULT_ALREADY_EXIST if format is already set on the stream.
+ * QTMS_RESULT_INVALID_STATE if stream is not
+ * in the QTMS_STREAM_UNINITIALIZED state.
+ *
+ */
+ gint SetFormat(QTMSFormat* format);
+
+ /**
+ * Remove data format from the stream.
+ *
+ * This function can be called only when stream is in the
+ * QTMS_STREAM_UNINITIALIZED state.
+ *
+ * After format is removed from the stream successfully, ownership of
+ * the format object is re-claimed by the client.
+ *
+ * @param format
+ * Data format to be removed from the stream.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if format is removed successfully from the
+ * stream.
+ * QTMS_RESULT_NULL_ARGUMENT if format is a NULL.
+ * QTMS_RESULT_DOES_NOT_EXIST if format is not currently set on the
+ * stream.
+ * QTMS_RESULT_INVALID_STATE if stream is not in the
+ * QTMS_STREAM_UNINITIALIZED state.
+ *
+ */
+ gint ResetFormat(QTMSFormat* format);
+
+ /**
+ * Add an effect to the stream.
+ *
+ * Multiple effect objects of different types can be added to the stream.
+ *
+ * This function can be called only when stream is in the
+ * QTMS_STREAM_UNINITIALIZED state.
+ *
+ * After effect is added to the stream successfully, ownership of the
+ * effect is vested in the stream. If the client wants to reuse the effect,
+ * it shall call RemoveEffect() to re-claim QTMSEffect ownership.
+ *
+ * @param effect
+ * Stream effect to be added to the stream.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if effect is added successfully to the stream.
+ * QTMS_RESULT_NULL_ARGUMENT if effect is a NULL.
+ * QTMS_RESULT_ALREADY_EXIST if effect type is already added to the
+ * stream.
+ * QTMS_RESULT_INVALID_STATE if stream is not in the
+ * QTMS_STREAM_UNINITIALIZED state.
+ *
+ */
+ gint AddEffect(QTMSEffect* effect);
+
+ /**
+ * Remove effect from the stream.
+ *
+ * This function can be called only when stream is in the
+ * QTMS_STREAM_UNINITIALIZED state.
+ *
+ * After effect is removed from the stream successfully, ownership of the
+ * effect is re-claimed by the client.
+ *
+ * @param effect
+ * Stream effect to be removed from the stream.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if effect is removed successfully from the
+ * stream.
+ * QTMS_RESULT_NULL_ARGUMENT if effect is a NULL.
+ * QTMS_RESULT_DOES_NOT_EXIST if trying to remove an effect that has
+ * not been added to the stream.
+ * QTMS_RESULT_INVALID_STATE if stream is not in the
+ * QTMS_STREAM_UNINITIALIZED state.
+ *
+ */
+ gint RemoveEffect(QTMSEffect* effect);
+
+ /**
+ * Get current state of the stream.
+ *
+ * This function can be called at any time.
+ *
+ * Possible states are:
+ * QTMS_STREAM_UNINITIALIZED,
+ * QTMS_STREAM_INITIALIZED,
+ * QTMS_STREAM_PAUSED,
+ * QTMS_STREAM_STARTED.
+
+ * @return
+ * Stream's current state.
+ *
+ */
+ gint GetState();
+
+ /**
+ * Get stream ID.
+ *
+ * This function can be called at any time.
+ *
+ * @return
+ * Unique ID of the stream.
+ *
+ */
+ gint GetStreamId();
+
+ /**
+ * Get stream type.
+ *
+ * This function can be called at any time.
+ *
+ * The possible types are:
+ * TMS_STREAM_UPLINK
+ * TMS_STREAM_DOWNLINK
+ *
+ * @return
+ * Stream type indicating whether it is an uplink or downlink.
+ *
+ */
+ gint GetStreamType();
+
+ /**
+ * Trigger stream to transition to the initialized state.
+ *
+ * This function can be called only when stream is in the
+ * QTMS_STREAM_UNINITIALIZED state.
+ *
+ * If Init() is called when stream is already in initialized state, the
+ * request will be ignored and the function will return QTMS_RESULT_SUCCESS.
+ *
+ * Upon stream's successful transition to initialized state, the stream will
+ * be in the QTMS_STREAM_INITIALIZED state.
+ *
+ * Before stream can transition to initialized state the following
+ * objects must be added to the stream:
+ * CS call: UPL: mic source and modem sink
+ * CS call: DNL: modem source and speaker sink
+ * IP call: UPL: mic source, codec format and client sink
+ * IP call: DNL: client source, codec format and speaker sink
+ *
+ * @return
+ * Common return codes:
+ * QTMS_RESULT_SUCCESS if stream transitioned to the initialized state.
+ * QTMS_RESULT_INVALID_STATE if stream has not transitioned to the
+ * QTMS_STREAM_INITIALIZED state.
+ * QTMS_RESULT_FORMAT_TYPE_UNSPECIFIED (IP call only) when stream
+ * has no format attached to it.
+ * QTMS_RESULT_UNINITIALIZED_OBJECT when stream has no sink or source
+ * element attached to it.
+ *
+ */
+ gint Init();
+
+ /**
+ * Trigger stream to transition to the paused state.
+ *
+ * This function can be called only when stream is in the
+ * QTMS_STREAM_UNINITIALIZED or QTMS_STREAM_STARTED state.
+ *
+ * If Pause() is called when stream is already in paused state, the
+ * request will be ignored and the function will return QTMS_RESULT_SUCCESS.
+ *
+ * Upon stream's successful transition to the paused state, the stream will
+ * be in the QTMS_STREAM_PAUSED state.
+ *
+ * Note: In QTMS Ver 1.0.0.0, pausing stream for CS call is not supported.
+ *
+ * @return
+ * Common return codes:
+ * QTMS_RESULT_SUCCESS if stream successfully transitioned to the
+ * paused state.
+ * QTMS_RESULT_INVALID_STATE if stream is not in the
+ * QTMS_STREAM_INITIALIZED or QTMS_STREAM_PAUSED state.
+ *
+ */
+ gint Pause();
+
+ /**
+ * Trigger stream to transition to the started state.
+ *
+ * This function can be called only when stream is in the
+ * QTMS_STREAM_INITIALIZED or QTMS_STREAM_PAUSED state.
+ *
+ * If Start() is called when stream is already in the started state, the
+ * request will be ignored and the function will return QTMS_RESULT_SUCCESS.
+ *
+ * If Start() is called when stream is already in the initialized state, the
+ * stream will implicitly pause, but the observer will only receive one
+ * state change callback.
+ *
+ * Upon stream's successful transition to the started state, the stream will
+ * be in the QTMS_STREAM_STARTED state.
+ *
+ * @return
+ * Common return codes:
+ * QTMS_RESULT_SUCCESS if stream successfully transitioned to the
+ * started state.
+ * QTMS_RESULT_INVALID_STATE if stream is not in the
+ * QTMS_STREAM_INITIALIZED or QTMS_STREAM_STARTED state.
+ *
+ */
+ gint Start();
+
+ /**
+ * Trigger stream to transition to the initialized state.
+ *
+ * This function can be called only when stream is in the
+ * QTMS_STREAM_STARTED or QTMS_STREAM_PAUSED state.
+ *
+ * If Stop() is called when stream is already in the stopped state, the
+ * request will be ignored and the function will return QTMS_RESULT_SUCCESS.
+ *
+ * Upon stream's successful transition to the started state, the stream will
+ * be in the QTMS_STREAM_INITIALIZED state.
+ *
+ * @return
+ * Common return codes:
+ * QTMS_RESULT_SUCCESS if stream successfully transitioned to the
+ * stopped state.
+ * QTMS_RESULT_INVALID_STATE if stream is not in the
+ * QTMS_STREAM_STARTED or QTMS_STREAM_PAUSED state.
+ *
+ */
+ gint Stop();
+
+ /**
+ * Trigger stream to transition to un-initialized state.
+ *
+ * This function can be called only when stream is NOT in
+ * QTMS_STREAM_UNINITIALIZED state.
+ *
+ * If Deinit() is called when stream is already in un-initialized state, the
+ * request will be ignored.
+ *
+ * Upon stream's successful transition to the un-initialized state, the
+ * stream will be in the QTMS_STREAM_UNINITIALIZED state.
+ *
+ */
+ void Deinit();
+
+ Q_SIGNALS:
+ void TMSStreamEvent(const QTMSStream& stream, QTMSSignalEvent event);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSStream();
+
+protected:
+ TMS::TMSStream *iStream;
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_STREAM_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsvolumeeffect.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_VOLUME_EFFECT_H
+#define QTMS_VOLUME_EFFECT_H
+
+#include <qtms.h>
+#include <qtmseffect.h>
+#include "qtmswrapperexport.h"
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSEffect;
+}
+
+namespace QTMS {
+
+/**
+ * QTMSVolumeEffect class
+ *
+ * This class provides volume level control in the stream scope.
+ *
+ * @lib QTMSapi.lib
+ *
+ */
+class QTMS_WRAPPER_DLL_EXPORT QTMSVolumeEffect : public QObject,
+ public QTMSEffect
+ {
+ Q_OBJECT
+public:
+ /**
+ * Destructor
+ */
+ virtual ~QTMSVolumeEffect();
+
+ /**
+ * Set audio volume level. The volume level should not be higher than
+ * the value returned by GetMaxLevel().
+ *
+ * @param level
+ * Volume level to be set.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint SetLevel(const guint level);
+
+ /**
+ * Return current audio volume level settings.
+ *
+ * @param level
+ * Volume level.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetLevel(guint& level);
+
+ /**
+ * Return max volume level supported by the device.
+ *
+ * @param level
+ * Max volume level.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ gint GetMaxLevel(guint& level);
+
+ /**
+ * Returns type of the effect.
+ *
+ * This function can be called at any time.
+ *
+ * @param effecttype
+ * Variable that contains the effect type on return.
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetType(QTMSEffectType& effecttype);
+
+Q_SIGNALS:
+ void EffectsEvent(const QTMSEffect& tmseffect, QTMSSignalEvent event);
+
+protected:
+ /**
+ * Constructor
+ */
+ QTMSVolumeEffect();
+
+protected:
+ TMS::TMSEffect *iEffect;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_VOLUME_EFFECT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmswrapperexport.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2010 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 QTMS_WRAPPER_EXPORT_H_
+#define QTMS_WRAPPER_EXPORT_H_
+
+// System includes
+#include <qglobal.h>
+
+#ifdef BUILD_TMS_WRAPPER_DLL
+#define QTMS_WRAPPER_DLL_EXPORT Q_DECL_EXPORT
+#else
+#define QTMS_WRAPPER_DLL_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // QTMS_WRAPPER_EXPORT_H_
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/tsrc/qtmscstest/qtestmains60.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,39 @@
+/*
+* 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 QTESTMAINS60
+#define QTESTMAINS60
+
+#define QTEST_MAIN_S60(QTmsCsTest) \
+int main(int argc, char *argv[]) \
+{ \
+char *new_argv[3]; \
+QCoreApplication app(argc, argv); \
+\
+QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; \
+QByteArray bytes = str.toAscii(); \
+\
+char arg1[] = "-o"; \
+\
+new_argv[0] = argv[0]; \
+new_argv[1] = arg1; \
+new_argv[2] = bytes.data(); \
+\
+QTmsCsTest tc; \
+return QTest::qExec(&tc, 3, new_argv); \
+}
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/tsrc/qtmscstest/qtmscstest.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,1208 @@
+/*
+* 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: QTMS CS test
+*
+*/
+#include <QObject>
+#include <QtTest/QtTest>
+#include "qtestmains60.h"
+
+#include <qtms.h>
+#include <qtmsfactory.h>
+#include <qtmscall.h>
+#include <qtmsstream.h>
+#include <tmsstreamobsrvr.h>
+#include <qtmsformat.h>
+
+#include <qtmspcmformat.h>
+#include <qtmsamrformat.h>
+#include <qtmsilbcformat.h>
+#include <qtmsg711format.h>
+#include <qtmsg729format.h>
+
+#include <qtmsclientsink.h>
+#include <qtmsclientsource.h>
+#include <qtmsvolumeeffect.h>
+#include <qtmsgaineffect.h>
+#include <qtmsglobalvoleffect.h>
+#include <qtmsglobalgaineffect.h>
+#include <qtmsglobalrouting.h>
+
+#include <qtmsbuffer.h>
+#include <qtmsdtmf.h>
+#include <qtmsringtone.h>
+#include <qtmsinbandtone.h>
+#include <tmsbuffer.h>
+
+using namespace QTMS;
+
+_LIT8(KRTBeepSequence, "\x00\x11\x0A\x0A\x08\x73\x0A\x40\x28\x0A\xF7\
+\x05\xFC\x40\x64\x0A\x08\x40\x32\x0A\xF7\x06\x0B");
+_LIT16(KTestFile1, "c:\\data\\sounds\\digital\\test_8khz.wav");
+
+class QTmsCsTest : public QObject
+ {
+Q_OBJECT
+private slots:
+ void initTestCase();
+ void CSCallSetup();
+
+ void CreateUplink();
+ void CreateDnlink();
+ void CreateMicSource();
+ void AddMicSourceToStream();
+ void CreateModemSink();
+ void AddModemSinkToStream();
+ void CreateModemSource();
+ void AddModemSourceToStream();
+ void CreateSpeakerSink();
+ void AddSpeakerSinkToStream();
+
+ void CreateStreamVol();
+ void CreateStreamGain();
+
+ void InitUplink();
+ void InitDnlink();
+
+ void StartUplink();
+ void StopUplink();
+ void StartDnlink();
+
+ void StreamVol();
+ void StreamGain();
+ // void StopDnlink();
+
+ void CreateGlobalVol();
+ void CreateGlobalGain();
+ void CreateRouting_data();
+ void CreateRouting();
+
+ void CreateInband_data();
+ void CreateInband();
+ void CreateDnlinkDtmf();
+ void CreateUplinkDtmf();
+
+ void CreateRingTone();
+
+ void InitRingTonePlayerFromProfiles();
+ void PlayRingTone();
+ void PauseRingTone();
+ void MuteRingTone();
+ void StopRingTone();
+ void CloseRingTonePlayer();
+
+ void CloseUplink();
+ void CloseDownlink();
+ void cleanupTestCase();
+public slots:
+ //From TMSStreamObserver
+ void TMSStreamEvent(const QTMSStream& stream, QTMSSignalEvent event);
+ //From TMSClientSinkObserver
+ void EffectsEvent(const QTMSEffect& tmseffect, QTMSSignalEvent event);
+ //From TMSGlobalRoutingObserver
+ void GlobalRoutingEvent(const QTMSGlobalRouting& routing,
+ QTMSSignalEvent event, QTMSAudioOutput output);
+ //From TMSRingToneObserver
+ void RingtoneEvent(const QTMSRingTone& rt, QTMSSignalEvent event);
+ //From TMSDTMFObserver
+ void DTMFEvent(const QTMSDTMF& dtmf, QTMSSignalEvent event);
+ //From TMSInbandToneObserver
+ void InbandToneEvent(const QTMSInbandTone& inbandtone,
+ QTMSSignalEvent event);
+
+private:
+ void InitRingToneSequencePlayer();
+ void InitRingTonePlayerFromFile();
+ void StopDnlink();
+ void GetAvailableOutput();
+ void DisplayDevice(QTMSAudioOutput device);
+
+private:
+ QTMSFactory *m_Factory;
+ QTMSCall *m_Call;
+ QTMSDTMF *m_Dnlnkdtmf;
+ QTMSDTMF *m_Uplnkdtmf;
+ QTMSStream *m_Dnlink;
+ QTMSStream *m_Uplink;
+ QTMSSource *m_MicSource;
+ QTMSSource *m_ModemSource;
+ QTMSSink *m_SpeakerSink;
+ QTMSSink *m_ModemSink;
+ QTMSEffect *m_Vol;
+ QTMSEffect *m_Gain;
+ QTMSEffect *m_GlobalVol;
+ QTMSEffect *m_GlobalGain;
+ QTMSGlobalRouting *m_Routing;
+ QTMSInbandTone *m_InbandTonePlayer;
+ QTMSRingTone *m_RingTonePlayer;
+ GString* m_RTStr;
+ GString* m_TTSStr;
+ QSignalSpy *m_UplinkSpy;
+ QSignalSpy *m_DnlinkSpy;
+ QSignalSpy *m_InbandSpy;
+ QSignalSpy *m_RoutingSpy;
+ OutputVector m_Availableoutputs;
+
+ };
+
+void QTmsCsTest::initTestCase()
+ {
+ qDebug("Start QTms CS tests");
+
+ g_setenv("G_SLICE", "always-malloc", 1);
+ m_Factory = NULL;
+ m_Call = NULL;
+ m_Dnlink = NULL;
+ m_Uplink = NULL;
+ m_MicSource = NULL;
+ m_ModemSource = NULL;
+ m_SpeakerSink = NULL;
+ m_ModemSink = NULL;
+ m_Vol = NULL;
+ m_Gain = NULL;
+ m_GlobalVol = NULL;
+ m_GlobalGain = NULL;
+ m_Routing = NULL;
+ m_Dnlnkdtmf = NULL;
+ m_Uplnkdtmf = NULL;
+ m_InbandTonePlayer = NULL;
+ m_RingTonePlayer = NULL;
+ m_UplinkSpy = NULL;
+ m_DnlinkSpy = NULL;
+
+ QTMSVer *ver(NULL);
+ gint status;
+ status = QTMSFactory::CreateFactory(m_Factory, *ver);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ qRegisterMetaType<QTMSSignalEvent>("QTMSSignalEvent");
+ qRegisterMetaType<QTMSAudioOutput>("QTMSAudioOutput");
+
+
+ }
+
+void QTmsCsTest::cleanupTestCase()
+ {
+ qDebug("End QTms tests");
+
+ StopDnlink();
+
+ m_Factory->DeleteSource(m_MicSource);
+ m_Factory->DeleteSource(m_ModemSource);
+ m_Factory->DeleteSink(m_ModemSink);
+ m_Factory->DeleteSink(m_SpeakerSink);
+
+ m_Factory->DeleteDTMF(m_Dnlnkdtmf);
+ m_Factory->DeleteInbandTonePlayer(m_InbandTonePlayer);
+ m_Factory->DeleteRingTonePlayer(m_RingTonePlayer);
+
+ m_Factory->DeleteEffect(m_Vol);
+ m_Factory->DeleteEffect(m_Gain);
+ m_Factory->DeleteEffect(m_GlobalVol);
+ m_Factory->DeleteEffect(m_GlobalGain);
+
+ m_Factory->DeleteGlobalRouting(m_Routing);
+
+ m_Call->DeleteStream(m_Uplink);
+ m_Call->DeleteStream(m_Dnlink);
+
+ m_Factory->DeleteCall(m_Call);
+
+ delete m_Factory;
+
+ }
+
+void QTmsCsTest::CSCallSetup()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Factory && !m_Call)
+ {
+ gboolean issupported(FALSE);
+ m_Factory->IsCallTypeSupported(QTMS_CALL_CS, issupported);
+ QVERIFY(issupported == TRUE);
+ status = m_Factory->CreateCall(QTMS_CALL_CS, m_Call, 0);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTMSCallType calltype = m_Call->GetCallType();
+ QVERIFY(calltype == QTMS_CALL_CS);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+void QTmsCsTest::CreateUplink()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Call)
+ {
+ status = m_Call->CreateStream(QTMS_STREAM_UPLINK, m_Uplink);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ m_UplinkSpy = new QSignalSpy(m_Uplink,
+ SIGNAL(TMSStreamEvent(const QTMSStream&, QTMSSignalEvent)));
+
+ QVERIFY( m_UplinkSpy->isValid() );
+
+ //QCOMPARE(m_UplinkSpy->count(), 0 );
+
+
+ connect(m_Uplink,
+ SIGNAL(TMSStreamEvent(const QTMSStream&, QTMSSignalEvent)),
+ this,
+ SLOT(TMSStreamEvent(const QTMSStream&, QTMSSignalEvent)));
+
+ }
+ }
+
+ void QTmsCsTest::CreateDnlink()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Call)
+ {
+ status = m_Call->CreateStream(QTMS_STREAM_DOWNLINK, m_Dnlink);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ m_DnlinkSpy = new QSignalSpy(m_Dnlink,
+ SIGNAL(TMSStreamEvent(const QTMSStream&, QTMSSignalEvent)));
+
+ QVERIFY( m_DnlinkSpy->isValid() );
+
+ //QCOMPARE(m_DnlinkSpy->count(), 0 );
+
+ connect(m_Dnlink,
+ SIGNAL(TMSStreamEvent(const QTMSStream&, QTMSSignalEvent)),
+ this,
+ SLOT(TMSStreamEvent(const QTMSStream&, QTMSSignalEvent)));
+ }
+ }
+
+
+ void QTmsCsTest::CreateModemSink()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && !m_ModemSink)
+ {
+ status = m_Factory->CreateSink(QTMS_SINK_MODEM, m_ModemSink);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+ void QTmsCsTest::CreateModemSource()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && !m_ModemSource)
+ {
+ status = m_Factory->CreateSource(QTMS_SOURCE_MODEM, m_ModemSource);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+ void QTmsCsTest::AddModemSinkToStream()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Uplink && m_ModemSink)
+ {
+ status = m_Uplink->AddSink(m_ModemSink);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+ void QTmsCsTest::AddModemSourceToStream()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Dnlink && m_ModemSource)
+ {
+ status = m_Dnlink->AddSource(m_ModemSource);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+
+ void QTmsCsTest::CreateMicSource()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && !m_MicSource)
+ {
+ status = m_Factory->CreateSource(TMS_SOURCE_MIC, m_MicSource);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+ void QTmsCsTest::AddMicSourceToStream()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Uplink && m_MicSource)
+ {
+ status = m_Uplink->AddSource(m_MicSource);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+ void QTmsCsTest::CreateSpeakerSink()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && !m_SpeakerSink)
+ {
+ status = m_Factory->CreateSink(QTMS_SINK_SPEAKER, m_SpeakerSink);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+ void QTmsCsTest::AddSpeakerSinkToStream()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Dnlink && m_SpeakerSink)
+ {
+ status = m_Dnlink->AddSink(m_SpeakerSink);
+ qDebug("QTMS speaker sink added to stream");
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+ void QTmsCsTest::InitUplink()
+ {
+ QVERIFY(m_Uplink->Init() == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(m_UplinkSpy->count(), 1 );
+ }
+
+ void QTmsCsTest::InitDnlink()
+ {
+ QVERIFY(m_Dnlink->Init() == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(m_DnlinkSpy->count(), 1 );
+ }
+
+ void QTmsCsTest::StartUplink()
+ {
+ QVERIFY(m_Uplink->Start() == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(m_UplinkSpy->count(), 2 );
+ }
+
+ void QTmsCsTest::StartDnlink()
+ {
+ QVERIFY(m_Dnlink->Start() == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(m_DnlinkSpy->count(), 2 );
+ }
+void QTmsCsTest::StopUplink()
+ {
+ QVERIFY(m_Uplink->Stop() == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(m_UplinkSpy->count(), 3 );
+ }
+
+void QTmsCsTest::StopDnlink()
+ {
+ QVERIFY(m_Dnlink->Stop() == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(m_DnlinkSpy->count(), 3 );
+ }
+
+void QTmsCsTest::CloseUplink()
+ {
+ m_Uplink->Deinit();
+ QTest::qWait(1000);
+ if (m_Uplink)
+ {
+ if (m_Gain)
+ {
+ QVERIFY(m_Uplink->RemoveEffect(m_Gain)== QTMS_RESULT_SUCCESS);
+ }
+ if (m_MicSource)
+ {
+ QVERIFY(m_Uplink->RemoveSource(m_MicSource)== QTMS_RESULT_SUCCESS);
+ }
+ if (m_ModemSink)
+ {
+ QVERIFY(m_Uplink->RemoveSink(m_ModemSink)== QTMS_RESULT_SUCCESS);
+ }
+ }
+ }
+
+void QTmsCsTest::CloseDownlink()
+ {
+ m_Dnlink->Deinit();
+ QTest::qWait(1000);
+ if (m_Dnlink)
+ {
+ if (m_Vol)
+ {
+ QVERIFY(m_Dnlink->RemoveEffect(m_Vol)== QTMS_RESULT_SUCCESS);
+ }
+ if (m_ModemSource)
+ {
+ QVERIFY(m_Dnlink->RemoveSource(m_ModemSource)== QTMS_RESULT_SUCCESS);
+ }
+ if (m_SpeakerSink)
+ {
+ QVERIFY(m_Dnlink->RemoveSink(m_SpeakerSink) == QTMS_RESULT_SUCCESS);
+ }
+ }
+
+ }
+
+void QTmsCsTest::CreateStreamVol()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && !m_Vol)
+ {
+ status = m_Factory->CreateEffect(QTMS_EFFECT_VOLUME, m_Vol);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ connect(static_cast<QTMSVolumeEffect*> (m_Vol),
+ SIGNAL(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)),
+ this, SLOT(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)));
+
+ if(m_Dnlink)
+ {
+ status = m_Dnlink->AddEffect(m_Vol);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ }
+ }
+
+void QTmsCsTest::StreamVol()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ guint maxvol(0);
+ if (m_Vol)
+ {
+ status = static_cast<QTMSVolumeEffect*> (m_Vol)->GetMaxLevel(maxvol);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ status = static_cast<QTMSVolumeEffect*> (m_Vol)->SetLevel(maxvol);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+
+ guint vol(0);
+ status = static_cast<QTMSVolumeEffect*> (m_Vol)->GetLevel(vol);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ QCOMPARE(vol,maxvol);
+ }
+ }
+
+void QTmsCsTest::CreateStreamGain()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && !m_Gain)
+ {
+ status = m_Factory->CreateEffect(QTMS_EFFECT_GAIN, m_Gain);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ connect(static_cast<QTMSGainEffect*> (m_Gain),
+ SIGNAL(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)),
+ this,
+ SLOT(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)));
+
+ if(m_Uplink)
+ {
+ status = m_Uplink->AddEffect(m_Gain);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+ }
+
+void QTmsCsTest::StreamGain()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Gain)
+ {
+ guint maxgain(0);
+ static_cast<QTMSGainEffect*> (m_Gain)->GetMaxLevel(maxgain);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ static_cast<QTMSGainEffect*> (m_Gain)->SetLevel(maxgain);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+
+ guint gain(0);
+ static_cast<QTMSGainEffect*> (m_Gain)->GetLevel(gain);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ QCOMPARE(gain,maxgain);
+ }
+
+ }
+
+
+void QTmsCsTest::CreateGlobalVol()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && !m_GlobalVol)
+ {
+ status = m_Factory->CreateEffect(QTMS_EFFECT_GLOBAL_VOL, m_GlobalVol);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ connect(static_cast<QTMSGlobalVolEffect*> (m_GlobalVol),
+ SIGNAL(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)),
+ this, SLOT(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)));
+
+ guint maxvol(0);
+ status = static_cast<QTMSGlobalVolEffect*>(m_GlobalVol)->GetMaxLevel(
+ maxvol);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ status = static_cast<QTMSGlobalVolEffect*>(m_GlobalVol)->SetLevel(
+ maxvol);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+
+ guint vol(0);
+ status = static_cast<QTMSGlobalVolEffect*> (m_GlobalVol)->GetLevel(vol);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ QCOMPARE(vol,maxvol);
+
+ }
+ }
+
+
+void QTmsCsTest::CreateGlobalGain()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && !m_GlobalGain)
+ {
+ status = m_Factory->CreateEffect(QTMS_EFFECT_GLOBAL_GAIN, m_GlobalGain);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ connect(static_cast<QTMSGlobalGainEffect*> (m_GlobalGain),
+ SIGNAL(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)),
+ this,
+ SLOT(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)));
+
+ guint maxgain(0);
+ static_cast<QTMSGlobalGainEffect*>(m_GlobalGain)->GetMaxLevel(maxgain);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ static_cast<QTMSGlobalGainEffect*>(m_GlobalGain)->SetLevel(maxgain);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+
+ guint gain(0);
+ static_cast<QTMSGlobalGainEffect*>(m_GlobalGain)->GetLevel(gain);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ QCOMPARE(gain,maxgain);
+
+ }
+ }
+
+void QTmsCsTest::CreateRouting_data()
+ {
+ gint status;
+ if (m_Factory && !m_Routing)
+ {
+ status = m_Factory->CreateGlobalRouting(m_Routing);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ m_RoutingSpy = new QSignalSpy(m_Routing,
+ SIGNAL(GlobalRoutingEvent(const QTMSGlobalRouting&,
+ QTMSSignalEvent,
+ QTMSAudioOutput)));
+
+ QVERIFY( m_RoutingSpy->isValid() );
+
+ // QCOMPARE(m_RoutingSpy->count(), 0 );
+ connect(m_Routing,
+ SIGNAL(GlobalRoutingEvent(const QTMSGlobalRouting&,
+ QTMSSignalEvent,QTMSAudioOutput)),
+ this,
+ SLOT(GlobalRoutingEvent(const QTMSGlobalRouting&,
+ QTMSSignalEvent,QTMSAudioOutput)));
+ }
+
+ //Populate data and test based on available output
+ GetAvailableOutput();
+ }
+
+void QTmsCsTest::CreateRouting()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ QFETCH(QTMSAudioOutput, routing);
+
+ if(m_Routing)
+ {
+ status = m_Routing->SetOutput(routing);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+#ifndef __WINSCW__
+ QTest::qWait(1000);
+ // QCOMPARE(m_RoutingSpy->count(), 1 );
+#endif
+ QTMSAudioOutput current;
+ status = m_Routing->GetOutput(current);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QCOMPARE(routing,current);
+
+ QTMSAudioOutput previous;
+ status = m_Routing->GetPreviousOutput(previous);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("Previous routing:");
+ DisplayDevice(previous);
+ }
+ }
+
+void QTmsCsTest::GetAvailableOutput()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Routing)
+ {
+ status = m_Routing->GetAvailableOutputs(m_Availableoutputs);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ qDebug("Available outputs: %d",m_Availableoutputs.size());
+ std::vector<guint>::iterator iteroutputs =
+ m_Availableoutputs.begin();
+ for (; iteroutputs < m_Availableoutputs.end(); iteroutputs++)
+ {
+ DisplayDevice(*iteroutputs);
+ }
+ }
+ }
+
+void QTmsCsTest::DisplayDevice(QTMSAudioOutput device)
+ {
+ QTest::addColumn<QTMSAudioOutput>("routing");
+
+ switch (device)
+ {
+ case QTMS_AUDIO_OUTPUT_NONE:
+ {
+ qDebug("none");
+ QTest::newRow("None")<<QTMS_AUDIO_OUTPUT_NONE;
+ }
+ break;
+ case QTMS_AUDIO_OUTPUT_PUBLIC:
+ {
+ qDebug("Public");
+ QTest::newRow("Public")<<QTMS_AUDIO_OUTPUT_PUBLIC;
+ }
+ break;
+ case QTMS_AUDIO_OUTPUT_PRIVATE:
+ {
+ qDebug("Private");
+ QTest::newRow("Private")<<QTMS_AUDIO_OUTPUT_PRIVATE;
+ }
+ break;
+ case QTMS_AUDIO_OUTPUT_HANDSET:
+ {
+ qDebug("Handset");
+ QTest::newRow("Handset")<<QTMS_AUDIO_OUTPUT_HANDSET;
+ }
+ break;
+ case QTMS_AUDIO_OUTPUT_LOUDSPEAKER:
+ {
+ qDebug("Loudspeaker");
+ QTest::newRow("Loud speaker")<< QTMS_AUDIO_OUTPUT_LOUDSPEAKER;
+ }
+ break;
+ case QTMS_AUDIO_OUTPUT_WIRED_ACCESSORY:
+ {
+ qDebug("Wired accessory");
+ QTest::newRow("Wired accessory")<<QTMS_AUDIO_OUTPUT_WIRED_ACCESSORY;
+ }
+ break;
+ case QTMS_AUDIO_OUTPUT_ACCESSORY:
+ {
+ qDebug("Accessory");
+ QTest::newRow("Accessory")<< QTMS_AUDIO_OUTPUT_ACCESSORY;
+ }
+ break;
+ case QTMS_AUDIO_OUTPUT_ETTY:
+ {
+ qDebug("TTY");
+ QTest::newRow("ETTY")<< QTMS_AUDIO_OUTPUT_ETTY;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+void QTmsCsTest::CreateDnlinkDtmf()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ GString* dtmfstring(NULL);
+
+ status = m_Factory->CreateDTMF(QTMS_STREAM_DOWNLINK, m_Dnlnkdtmf);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ if (m_Dnlnkdtmf)
+ {
+ QSignalSpy dtmfspy(m_Dnlnkdtmf,
+ SIGNAL(DTMFEvent(const QTMSDTMF&,QTMSSignalEvent)));
+
+ QVERIFY( dtmfspy.isValid() );
+
+ //QCOMPARE(dtmfspy.count(), 0 );
+
+ connect(m_Dnlnkdtmf,
+ SIGNAL(DTMFEvent(const QTMSDTMF&,QTMSSignalEvent)), this,
+ SLOT(DTMFEvent(const QTMSDTMF&,QTMSSignalEvent)));
+
+ dtmfstring = g_string_new("4723");
+ status = m_Dnlnkdtmf->SetTone(dtmfstring);
+
+ m_Dnlnkdtmf->Start();
+ QTest::qWait(1000);
+ g_string_free(dtmfstring, TRUE);
+ //QCOMPARE(dtmfspy.count(), 1 );
+
+ status = m_Dnlnkdtmf->Stop();
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(dtmfspy.count(), 2 );
+
+ }
+ }
+
+void QTmsCsTest::CreateUplinkDtmf()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ GString* dtmfstring(NULL);
+
+ status = m_Factory->CreateDTMF(QTMS_STREAM_UPLINK, m_Uplnkdtmf);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ if (m_Uplnkdtmf)
+ {
+ QSignalSpy uplinkdtmfspy(m_Uplnkdtmf,
+ SIGNAL(DTMFEvent(const QTMSDTMF&,QTMSSignalEvent)));
+
+ QVERIFY( uplinkdtmfspy.isValid() );
+
+ //QCOMPARE(dtmfspy.count(), 0 );
+
+ connect(m_Uplnkdtmf,
+ SIGNAL(DTMFEvent(const QTMSDTMF&,QTMSSignalEvent)), this,
+ SLOT(DTMFEvent(const QTMSDTMF&,QTMSSignalEvent)));
+
+ dtmfstring = g_string_new("4723");
+ status = m_Uplnkdtmf->SetTone(dtmfstring);
+
+ m_Uplnkdtmf->Start();
+ QTest::qWait(1000);
+ g_string_free(dtmfstring, TRUE);
+ //QCOMPARE(dtmfspy.count(), 1 );
+
+ m_Uplnkdtmf->ContinueDTMFStringSending(FALSE);
+
+ status = m_Uplnkdtmf->Stop();
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(dtmfspy.count(), 2 );
+
+ }
+ }
+
+
+void QTmsCsTest::CreateInband_data()
+ {
+
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Factory && !m_InbandTonePlayer)
+ {
+ status = m_Factory->CreateInbandTonePlayer(m_InbandTonePlayer);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ m_InbandSpy = new QSignalSpy(m_InbandTonePlayer,
+ SIGNAL(InbandToneEvent(const QTMSInbandTone&,QTMSSignalEvent)));
+
+ QVERIFY( m_InbandSpy->isValid() );
+
+ //QCOMPARE(m_InbandSpy->count(), 0 );
+ connect(m_InbandTonePlayer,
+ SIGNAL(InbandToneEvent(const QTMSInbandTone&, QTMSSignalEvent)),
+ this,
+ SLOT(InbandToneEvent(const QTMSInbandTone&, QTMSSignalEvent)));
+ }
+
+ QTest::addColumn<QTMSInbandToneType>("inbandTone");
+
+ QTest::newRow("Busy")<<QTMS_INBAND_USER_BUSY;
+ QTest::newRow("Path not avail")<<QTMS_INBAND_RADIO_PATH_NOT_AVAIL;
+ QTest::newRow("Congestion")<< QTMS_INBAND_CONGESTION;
+ QTest::newRow("Special info")<<QTMS_INBAND_SPECIAL_INFO;
+ QTest::newRow("Reorder")<< QTMS_INBAND_REORDER;
+ QTest::newRow("Remote alerting")<<QTMS_INBAND_REMOTE_ALEARTING;
+ QTest::newRow("call waiting")<< QTMS_INBAND_CALL_WAITING;
+ QTest::newRow("data call")<< QTMS_INBAND_DATA_CALL;
+ QTest::newRow("no sequence")<< QTMS_INBAND_NO_SEQUENCE;
+ QTest::newRow("beep sequence")<<QTMS_INBAND_BEEP_SEQUENCE;
+
+ }
+
+
+void QTmsCsTest::CreateInband()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ QFETCH(QTMSInbandToneType, inbandTone);
+
+ if (m_InbandTonePlayer)
+ {
+ status = m_InbandTonePlayer->Start(inbandTone);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ // QCOMPARE(m_InbandSpy->count(), 1 );
+
+ status = m_InbandTonePlayer->Stop();
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ // QCOMPARE(m_InbandSpy->count(), 2 );
+ }
+ }
+
+
+void QTmsCsTest::CreateRingTone()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory)
+ {
+ status = m_Factory->CreateRingTonePlayer(m_RingTonePlayer);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ connect(m_RingTonePlayer,
+ SIGNAL(RingtoneEvent(const QTMSRingTone&,QTMSSignalEvent)),
+ this,
+ SLOT(RingtoneEvent(const QTMSRingTone&,QTMSSignalEvent)));
+ }
+
+ }
+
+void QTmsCsTest::InitRingTonePlayerFromProfiles()
+ {
+ if (m_RingTonePlayer)
+ {
+ gint status = m_RingTonePlayer->Init(QTMS_RINGTONE_DEFAULT);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ }
+
+ }
+
+void QTmsCsTest::InitRingTonePlayerFromFile()
+ {
+ if (m_RingTonePlayer)
+ {
+ TBuf<sizeof(KTestFile1)> buf(KTestFile1);
+ m_RTStr = g_string_new_len((gchar*) buf.Ptr(), buf.Length() * 2);
+ gint status = m_RingTonePlayer->Init(QTMS_RINGTONE_FILE, m_RTStr);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ g_string_free(m_RTStr, TRUE);
+ m_RTStr = NULL;
+ }
+
+ }
+
+
+void QTmsCsTest::InitRingToneSequencePlayer()
+ {
+ if (m_RingTonePlayer)
+ {
+ TBuf8<sizeof(KRTBeepSequence)> buf(KRTBeepSequence);
+ m_RTStr = g_string_new_len((gchar*) buf.Ptr(), buf.Length());
+ gint status = m_RingTonePlayer->Init(QTMS_RINGTONE_SEQUENCE, m_RTStr);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ g_string_free(m_RTStr, TRUE);
+ }
+ }
+
+
+void QTmsCsTest::PlayRingTone()
+ {
+ if (m_RingTonePlayer)
+ {
+ gint status = m_RingTonePlayer->Play();
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ }
+ }
+
+
+void QTmsCsTest::PauseRingTone()
+ {
+ if (m_RingTonePlayer)
+ {
+ gint status = m_RingTonePlayer->Pause(); //pause audio for video RT only
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ }
+ }
+
+
+void QTmsCsTest::StopRingTone()
+ {
+ if (m_RingTonePlayer)
+ {
+ gint status = m_RingTonePlayer->Stop();
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ }
+ }
+
+
+void QTmsCsTest::MuteRingTone()
+ {
+ if (m_RingTonePlayer)
+ {
+ m_RingTonePlayer->Mute();
+ }
+ }
+
+void QTmsCsTest::CloseRingTonePlayer()
+ {
+ if (m_Factory && m_RingTonePlayer)
+ {
+ m_RingTonePlayer->Deinit();
+ m_Factory->DeleteRingTonePlayer(m_RingTonePlayer);
+ }
+ }
+
+void QTmsCsTest::EffectsEvent(const QTMSEffect& tmseffect,
+ QTMSSignalEvent event)
+ {
+ QTMSEffectType effecttype;
+ const_cast<QTMSEffect&> (tmseffect).GetType(effecttype);
+
+ QVERIFY(event.reason == QTMS_RESULT_SUCCESS);
+
+ switch (effecttype)
+ {
+ case TMS_EFFECT_GLOBAL_VOL:
+ {
+ switch (event.type)
+ {
+ case TMS_EVENT_EFFECT_VOL_CHANGED:
+ qDebug("Global vol effect change");
+ break;
+ default:
+ break;
+ }
+ }
+ break;
+ case TMS_EFFECT_GLOBAL_GAIN:
+ {
+ switch (event.type)
+ {
+ case TMS_EVENT_EFFECT_GAIN_CHANGED:
+ qDebug("Global gain effect change");
+ break;
+ default:
+ break;
+ }
+ }
+ break;
+ case TMS_EFFECT_VOLUME:
+ qDebug("Stream vol effect change");
+ break;
+ case TMS_EFFECT_GAIN:
+ qDebug("Stream gain effect change");
+ break;
+ default:
+ break;
+ }
+ }
+
+
+void QTmsCsTest::GlobalRoutingEvent(const QTMSGlobalRouting& /*routing*/,
+ QTMSSignalEvent event, QTMSAudioOutput /*output*/)
+ {
+ QVERIFY(event.reason == QTMS_RESULT_SUCCESS);
+ switch (event.type)
+ {
+ case TMS_EVENT_ROUTING_AVAIL_OUTPUTS_CHANGED:
+ qDebug("Available outputs changed");
+ break;
+ case TMS_EVENT_ROUTING_OUTPUT_CHANGED:
+ qDebug("output changed");
+ break;
+ case TMS_EVENT_ROUTING_SET_OUTPUT_COMPLETE:
+ qDebug("set output complete");
+ break;
+ default:
+ break;
+ }
+
+ }
+
+void QTmsCsTest::TMSStreamEvent(const QTMSStream& stream,
+ QTMSSignalEvent event)
+ {
+
+ QVERIFY(event.reason == QTMS_RESULT_SUCCESS);
+
+ gint streamId;
+ streamId = const_cast<QTMSStream&> (stream).GetStreamId();
+ qDebug("StreamID %d",streamId);
+ gint state;
+ state = const_cast<QTMSStream&> (stream).GetState();
+ QVERIFY(state == event.curr_state);
+
+ switch (const_cast<QTMSStream&> (stream).GetStreamType())
+ {
+ case QTMS_STREAM_UPLINK:
+ {
+ switch (event.type)
+ {
+ case QTMS_EVENT_STREAM_STATE_CHANGED:
+ {
+ switch (event.curr_state)
+ {
+ case QTMS_STREAM_INITIALIZED:
+ {
+ qDebug("Uplink initialized ");
+ break;
+ }
+ case QTMS_STREAM_UNINITIALIZED:
+ qDebug("Uplink uninitialized ");
+ break;
+ case QTMS_STREAM_PAUSED:
+ qDebug("Uplink paused ");
+ break;
+ case QTMS_STREAM_STARTED:
+ qDebug("Uplink started ");
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ break;
+ }
+ case QTMS_STREAM_DOWNLINK:
+ {
+ switch (event.type)
+ {
+ case QTMS_EVENT_STREAM_STATE_CHANGED:
+ {
+ switch (event.curr_state)
+ {
+ case QTMS_STREAM_INITIALIZED:
+ {
+ qDebug("Downlink initialized ");
+ break;
+ }
+ case QTMS_STREAM_UNINITIALIZED:
+ qDebug("Downlink uninitialized ");
+ break;
+ case QTMS_STREAM_PAUSED:
+ qDebug("Downlink paused ");
+ break;
+ case QTMS_STREAM_STARTED:
+ qDebug("Downlink started ");
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+
+void QTmsCsTest::RingtoneEvent(const QTMSRingTone& /*rt*/,
+ QTMSSignalEvent event)
+ {
+ QVERIFY(event.reason == QTMS_RESULT_SUCCESS);
+ switch (event.type)
+ {
+ case TMS_EVENT_RINGTONE_OPEN_COMPLETE:
+ qDebug("RT Open Complete");
+ break;
+ case TMS_EVENT_RINGTONE_PLAY_COMPLETE:
+ qDebug("RT Play Complete");
+ break;
+ default:
+ break;
+ }
+ }
+
+
+void QTmsCsTest::DTMFEvent(const QTMSDTMF& /*dtmf*/, QTMSSignalEvent event)
+ {
+ if(event.reason!= QTMS_RESULT_SUCCESS)
+ {
+ QEXPECT_FAIL("","Need to be in call, expect uplink dtmf to fail", Continue);
+ }
+ QVERIFY(event.reason == QTMS_RESULT_SUCCESS);
+
+ switch (event.type)
+ {
+ case QTMS_EVENT_DTMF_TONE_STARTED:
+ qDebug("DTMF Started");
+ break;
+ case QTMS_EVENT_DTMF_TONE_STOPPED:
+ qDebug("DTMF Stopped");
+ break;
+ default:
+ break;
+ }
+ }
+
+void QTmsCsTest::InbandToneEvent(const QTMSInbandTone& /*inbandtone*/,
+ QTMSSignalEvent event)
+ {
+ QVERIFY(event.reason == QTMS_RESULT_SUCCESS);
+ switch (event.type)
+ {
+ case QTMS_EVENT_INBAND_TONE_STARTED:
+ qDebug("Inband Tone Started");
+ break;
+ case QTMS_EVENT_INBAND_TONE_STOPPED:
+ qDebug("Inband Tone Stopped");
+ break;
+ default:
+ break;
+ }
+ }
+
+QTEST_MAIN_S60(QTmsCsTest)
+
+#include "qtmscstest.moc"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/tsrc/qtmscstest/qtmscstest.pro Wed Jun 23 17:51:16 2010 +0100
@@ -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:
+# Project specification file for tsrc.
+#
+
+
+CONFIG += qtestlib
+TEMPLATE = app
+TARGET =
+TARGET.CAPABILITY = CAP_APPLICATION MultimediaDD
+TARGET.EPOCALLOWDLLDATA = 1
+
+
+LIBS += -lqtmsapi \
+ -llibglib \
+ -llibgobject \
+ -llibgmodule \
+ -llibstdcpp
+
+DEPENDPATH += .
+INCLUDEPATH += .
+
+
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+ $$OS_LAYER_LIBC_SYSTEMINCLUDE \
+ $$OS_LAYER_GLIB_SYSTEMINCLUDE \
+ ..\..\..\qt_telephony_multimedia_service_api\inc
+
+# Input
+HEADERS += qtestmains60.h
+SOURCES += qtmscstest.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/tsrc/qtmsvoiptest/qtestmains60.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,39 @@
+/*
+* 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 QTESTMAINS60
+#define QTESTMAINS60
+
+#define QTEST_MAIN_S60(QTmsVoipTest) \
+int main(int argc, char *argv[]) \
+{ \
+char *new_argv[3]; \
+QCoreApplication app(argc, argv); \
+\
+QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; \
+QByteArray bytes = str.toAscii(); \
+\
+char arg1[] = "-o"; \
+\
+new_argv[0] = argv[0]; \
+new_argv[1] = arg1; \
+new_argv[2] = bytes.data(); \
+\
+QTmsVoipTest tc; \
+return QTest::qExec(&tc, 3, new_argv); \
+}
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/tsrc/qtmsvoiptest/qtmsvoiptest.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,1933 @@
+/*
+* 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: QTMS Voip test
+*
+*/
+#include <QObject>
+#include <QtTest/QtTest>
+#include "qtestmains60.h"
+
+#include <qtms.h>
+#include <qtmsfactory.h>
+#include <qtmscall.h>
+#include <qtmsstream.h>
+#include <tmsstreamobsrvr.h>
+#include <qtmsformat.h>
+
+#include <qtmspcmformat.h>
+#include <qtmsamrformat.h>
+#include <qtmsilbcformat.h>
+#include <qtmsg711format.h>
+#include <qtmsg729format.h>
+
+#include <qtmsclientsink.h>
+#include <qtmsclientsource.h>
+#include <qtmsvolumeeffect.h>
+#include <qtmsgaineffect.h>
+#include <qtmsglobalvoleffect.h>
+#include <qtmsglobalgaineffect.h>
+#include <qtmsglobalrouting.h>
+
+#include <qtmsbuffer.h>
+#include <qtmsdtmf.h>
+#include <qtmsringtone.h>
+#include <qtmsinbandtone.h>
+#include <tmsbuffer.h>
+
+
+// CONSTANTS
+#define __TEST_CODE_COVERAGE__
+
+using namespace QTMS;
+
+class QTmsVoipTest : public QObject
+ {
+Q_OBJECT
+private slots:
+ void initTestCase();
+ void init();
+ void cleanup();
+ void SupportedFormats();
+ void CreateRouting_data();
+ void CreateRouting();
+ void CreateGlobalVol();
+ void CreateGlobalGain();
+ void CreateFormat_data();
+ void CreateFormat();
+ void CreateStreamVol();
+ void CreateStreamGain();
+ void CreateDnlinkDtmf();
+ void CreateBuffer();
+
+ void cleanupTestCase();
+public slots:
+ //From TMSClientSourceObserver
+ void FillBuffer(TMS::TMSBuffer& buffer);
+ void BufferProcessed(TMS::TMSBuffer* buffer, gint reason);
+ //From TMSClientSinkObserver
+ void ProcessBuffer(const TMS::TMSBuffer* buffer);
+ //From TMSStreamObserver
+ void TMSStreamEvent(const QTMSStream& stream, QTMSSignalEvent event);
+ //From TMSClientSinkObserver
+ void EffectsEvent(const QTMSEffect& tmseffect, QTMSSignalEvent event);
+ //From TMSGlobalRoutingObserver
+ void GlobalRoutingEvent(const QTMSGlobalRouting& routing,
+ QTMSSignalEvent event, QTMSAudioOutput output);
+ //From TMSRingToneObserver
+ void RingtoneEvent(const QTMSRingTone& rt, QTMSSignalEvent event);
+ //From TMSDTMFObserver
+ void DTMFEvent(const QTMSDTMF& dtmf, QTMSSignalEvent event);
+
+private:
+
+ void VoipCallSetup();
+
+ void SupportedUplinkFormats();
+ void SupportedDnlinkFormats();
+
+ void CreateUplink();
+ void CreateDnlink();
+
+ void CreateMicSource();
+ void AddMicSourceToStream();
+
+ void CreateClientSink();
+ void AddClientSinkToStream();
+
+ void CreateClientSource();
+ void AddClientSourceToStream();
+
+ void CreateSpeakerSink();
+ void AddSpeakerSinkToStream();
+
+ void InitUplink();
+ void InitDnlink();
+
+ void DeinitUplink();
+ void DeinitDnlink();
+
+ void StartUplink();
+ void StopUplink();
+ void StartDnlink();
+
+ void ResetUplnkFormat();
+ void ResetDnlnkFormat();
+
+ void StreamVol();
+ void StreamGain();
+
+ void CloseUplink();
+ void CloseDownlink();
+
+ void DisplayFormat(QTMSFormatType format);
+ void StopDnlink();
+ void CreateRingTone();
+
+ void ToggleVad();
+ void GetVad();
+ void ToggleCng();
+ void GetCng();
+ void TogglePlc();
+ void GetPlc();
+
+ void SelectMinBitrate();
+ void SelectMaxBitrate();
+ void SetBitrate(guint bitrate);
+ void GetSupportedBitrates();
+ gint GetSupportedBitrates(BitRateVector& aBrArr);
+ void GetBitrate();
+
+ void SetDnLinkG711ALAW();
+ void SetDnLinkG711uLAW();
+ void SetDnLinkILBC20MS();
+ void SetDnLinkILBC30MS();
+ void SetUpLinkG711ALAW();
+ void SetUpLinkG711uLAW();
+ void SetUpLinkILBC20MS();
+ void SetUpLinkILBC30MS();
+ void GetDnLinkG711Mode();
+ void GetDnLinkILBCMode();
+ void GetUpLinkG711Mode();
+ void GetUpLinkILBCMode();
+
+ void DisplayDevice(QTMSAudioOutput device);
+
+private:
+ QTMSFactory *m_Factory;
+ QTMSCall *m_Call;
+ QTMSDTMF *m_Dnlnkdtmf;
+ QTMSStream *m_Dnlink;
+ QTMSStream *m_Uplink;
+
+ QTMSSource *m_MicSource;
+ QTMSSource *m_ClientSource;
+ QTMSSink *m_ClientSink;
+ QTMSSink *m_SpeakerSink;
+
+ QTMSFormat *m_G711EncFormatIntfc;
+ QTMSFormat *m_G711DecFormatIntfc;
+ QTMSFormat *m_G729EncFormatIntfc;
+ QTMSFormat *m_G729DecFormatIntfc;
+ QTMSFormat *m_ILBCEncFormatIntfc;
+ QTMSFormat *m_ILBCDecFormatIntfc;
+ QTMSFormat *m_AMRNBEncFormatIntfc;
+ QTMSFormat *m_AMRNBDecFormatIntfc;
+ QTMSFormat *m_PCM16EncFormatIntfc;
+ QTMSFormat *m_PCM16DecFormatIntfc;
+
+ QTMS::FormatVector m_UplCodecs;
+ QTMS::FormatVector m_DnlCodecs;
+
+ BitRateVector m_BitratesVector;
+ guint iBitrate;
+
+ QTMSEffect *m_Vol;
+ QTMSEffect *m_Gain;
+ QTMSEffect *m_GlobalVol;
+ QTMSEffect *m_GlobalGain;
+ QTMSGlobalRouting *m_Routing;
+
+ QTMSFormatType m_DnLinkCodec;
+ QTMSFormatType m_UpLinkCodec;
+
+ QSignalSpy *m_UplinkSpy;
+ QSignalSpy *m_DnlinkSpy;
+ QSignalSpy *m_RoutingSpy;
+
+ gboolean m_Vad;
+ gboolean m_Cng;
+ gboolean m_Plc;
+
+ };
+
+void QTmsVoipTest::initTestCase()
+ {
+ qDebug("Start QTms Voip tests");
+
+ g_setenv("G_SLICE", "always-malloc", 1);
+
+ qRegisterMetaType<QTMSSignalEvent>("QTMSSignalEvent");
+ qRegisterMetaType<QTMSAudioOutput>("QTMSAudioOutput");
+
+ }
+
+void QTmsVoipTest::cleanupTestCase()
+ {
+ qDebug("End QTms tests");
+ }
+
+void QTmsVoipTest::init()
+ {
+ qDebug("****NEW TEST****");
+ m_Factory = NULL;
+ m_Call = NULL;
+ m_Dnlink = NULL;
+ m_Uplink = NULL;
+ m_MicSource = NULL;
+ m_ClientSource = NULL;
+ m_SpeakerSink = NULL;
+ m_ClientSink = NULL;
+ m_Vol = NULL;
+ m_Gain = NULL;
+ m_GlobalVol = NULL;
+ m_GlobalGain = NULL;
+ m_Routing = NULL;
+ m_Dnlnkdtmf = NULL;
+
+ m_G711EncFormatIntfc = NULL;
+ m_G711DecFormatIntfc = NULL;
+ m_G729EncFormatIntfc = NULL;
+ m_G729DecFormatIntfc = NULL;
+ m_ILBCEncFormatIntfc = NULL;
+ m_ILBCDecFormatIntfc = NULL;
+ m_AMRNBEncFormatIntfc = NULL;
+ m_AMRNBDecFormatIntfc = NULL;
+ m_PCM16EncFormatIntfc = NULL;
+ m_PCM16DecFormatIntfc = NULL;
+
+ m_UplinkSpy = NULL;
+ m_DnlinkSpy = NULL;
+
+ QTMSVer *ver(NULL);
+ gint status;
+ status = QTMSFactory::CreateFactory(m_Factory, *ver);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ VoipCallSetup();
+
+ CreateUplink();
+ CreateDnlink();
+
+ CreateMicSource();
+ AddMicSourceToStream();
+
+ CreateClientSink();
+ AddClientSinkToStream();
+
+ CreateClientSource();
+ AddClientSourceToStream();
+
+ CreateSpeakerSink();
+ AddSpeakerSinkToStream();
+
+ }
+void QTmsVoipTest::cleanup()
+ {
+ qDebug("****END TEST******");
+
+ ResetUplnkFormat();
+ ResetDnlnkFormat();
+
+ CloseUplink();
+ CloseDownlink();
+
+ if (m_MicSource)
+ m_Factory->DeleteSource(m_MicSource);
+ if (m_ClientSource)
+ m_Factory->DeleteSource(m_ClientSource);
+ if (m_ClientSink)
+ m_Factory->DeleteSink(m_ClientSink);
+ if (m_SpeakerSink)
+ m_Factory->DeleteSink(m_SpeakerSink);
+
+ if (m_Dnlnkdtmf)
+ m_Factory->DeleteDTMF(m_Dnlnkdtmf);
+
+ if (m_Vol)
+ m_Factory->DeleteEffect(m_Vol);
+ if (m_Gain)
+ m_Factory->DeleteEffect(m_Gain);
+ if (m_GlobalVol)
+ m_Factory->DeleteEffect(m_GlobalVol);
+ if (m_GlobalGain)
+ m_Factory->DeleteEffect(m_GlobalGain);
+
+ if (m_Routing)
+ m_Factory->DeleteGlobalRouting(m_Routing);
+
+ if (m_PCM16EncFormatIntfc)
+ m_Factory->DeleteFormat(m_PCM16EncFormatIntfc);
+ if (m_ILBCEncFormatIntfc)
+ m_Factory->DeleteFormat(m_ILBCEncFormatIntfc);
+ if (m_AMRNBEncFormatIntfc)
+ m_Factory->DeleteFormat(m_AMRNBEncFormatIntfc);
+ if (m_G711EncFormatIntfc)
+ m_Factory->DeleteFormat(m_G711EncFormatIntfc);
+ if (m_G729EncFormatIntfc)
+ m_Factory->DeleteFormat(m_G729EncFormatIntfc);
+ if (m_PCM16DecFormatIntfc)
+ m_Factory->DeleteFormat(m_PCM16DecFormatIntfc);
+ if (m_ILBCDecFormatIntfc)
+ m_Factory->DeleteFormat(m_ILBCDecFormatIntfc);
+ if (m_AMRNBDecFormatIntfc)
+ m_Factory->DeleteFormat(m_AMRNBDecFormatIntfc);
+ if (m_G711DecFormatIntfc)
+ m_Factory->DeleteFormat(m_G711DecFormatIntfc);
+ if (m_G729DecFormatIntfc)
+ m_Factory->DeleteFormat(m_G729DecFormatIntfc);
+
+ if (m_Uplink)
+ m_Call->DeleteStream(m_Uplink);
+ if (m_Dnlink)
+ m_Call->DeleteStream(m_Dnlink);
+
+ if (m_Call)
+ m_Factory->DeleteCall(m_Call);
+
+ if (m_Factory)
+ delete m_Factory;
+
+ }
+
+void QTmsVoipTest::VoipCallSetup()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Factory && !m_Call)
+ {
+ gboolean issupported(FALSE);
+ m_Factory->IsCallTypeSupported(QTMS_CALL_IP,issupported);
+ QVERIFY(issupported == TRUE);
+ status = m_Factory->CreateCall(QTMS_CALL_IP, m_Call, 0);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ guint ctxid;
+ m_Call->GetCallContextId(ctxid);
+ }
+
+ }
+
+void QTmsVoipTest::SupportedFormats()
+ {
+ SupportedUplinkFormats();
+ SupportedDnlinkFormats();
+ }
+
+void QTmsVoipTest::SupportedUplinkFormats()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ status = m_Factory->GetSupportedFormats(QTMS_STREAM_UPLINK,m_UplCodecs);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ qDebug("Supported UPL codecs");
+ std::vector<QTMSFormat*>::iterator codecs = m_UplCodecs.begin();
+ QTMSFormatType fmttype;
+ for (; codecs < m_UplCodecs.end(); codecs++)
+ {
+ (*codecs)->GetType(fmttype);
+ DisplayFormat(fmttype);
+ }
+ gint size = m_UplCodecs.size();
+ for (gint i = 0; i < size; i++)
+ {
+ codecs = m_UplCodecs.begin();
+ m_Factory->DeleteFormat(*codecs);
+ m_UplCodecs.erase(codecs);
+ }
+
+ }
+
+void QTmsVoipTest::SupportedDnlinkFormats()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ status = m_Factory->GetSupportedFormats(QTMS_STREAM_DOWNLINK,m_DnlCodecs);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ qDebug("Supported DNL codecs");
+ std::vector<QTMSFormat*>::iterator codecs = m_DnlCodecs.begin();
+ QTMSFormatType fmttype;
+ for (; codecs < m_DnlCodecs.end(); codecs++)
+ {
+ (*codecs)->GetType(fmttype);
+ DisplayFormat(fmttype);
+ }
+ gint size = m_DnlCodecs.size();
+ for (gint i = 0; i < size; i++)
+ {
+ codecs = m_DnlCodecs.begin();
+ m_Factory->DeleteFormat(*codecs);
+ m_DnlCodecs.erase(codecs);
+ }
+ }
+
+
+void QTmsVoipTest::DisplayFormat(QTMSFormatType format)
+ {
+ switch (format)
+ {
+ case QTMS_FORMAT_AMR:
+ qDebug("AMR-NB");
+ break;
+ case QTMS_FORMAT_G711:
+ qDebug("G.711");
+ break;
+ case QTMS_FORMAT_G729:
+ qDebug("G.729");
+ break;
+ case QTMS_FORMAT_ILBC:
+ qDebug("iLBC");
+ break;
+ case QTMS_FORMAT_PCM:
+ qDebug("PCM-16");
+ break;
+ default:
+ break;
+ }
+ }
+
+void QTmsVoipTest::CreateUplink()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Call)
+ {
+ status = m_Call->CreateStream(QTMS_STREAM_UPLINK, m_Uplink);
+
+ m_UplinkSpy = new QSignalSpy(m_Uplink,
+ SIGNAL(TMSStreamEvent(const QTMSStream&, QTMSSignalEvent)));
+
+ QVERIFY( m_UplinkSpy->isValid() );
+
+ // QCOMPARE(m_UplinkSpy->count(), 0 );
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ connect(m_Uplink,
+ SIGNAL(TMSStreamEvent(const QTMSStream&, QTMSSignalEvent)),
+ this,
+ SLOT(TMSStreamEvent(const QTMSStream&, QTMSSignalEvent)));
+ }
+ }
+
+ void QTmsVoipTest::CreateDnlink()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Call)
+ {
+ status = m_Call->CreateStream(QTMS_STREAM_DOWNLINK, m_Dnlink);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ m_DnlinkSpy = new QSignalSpy(m_Dnlink,
+ SIGNAL(TMSStreamEvent(const QTMSStream&, QTMSSignalEvent)));
+
+ QVERIFY( m_DnlinkSpy->isValid() );
+
+ // QCOMPARE(m_DnlinkSpy->count(), 0 );
+
+ connect(m_Dnlink,
+ SIGNAL(TMSStreamEvent(const QTMSStream&, QTMSSignalEvent)),
+ this,
+ SLOT(TMSStreamEvent(const QTMSStream&, QTMSSignalEvent)));
+ }
+ }
+
+void QTmsVoipTest::CreateClientSource()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Factory && !m_ClientSource)
+ {
+ status = m_Factory->CreateSource(QTMS_SOURCE_CLIENT, m_ClientSource);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+
+void QTmsVoipTest::AddClientSourceToStream()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Dnlink && m_ClientSource)
+ {
+ connect(static_cast<QTMSClientSource*> (m_ClientSource),
+ SIGNAL(FillBuffer(TMS::TMSBuffer&)), this,
+ SLOT(FillBuffer(TMS::TMSBuffer&)));
+ status = m_Dnlink->AddSource(m_ClientSource);
+
+#ifdef __TEST_CODE_COVERAGE__
+ QTMSSourceType st;
+ static_cast<QTMSClientSource*>(m_ClientSource)->GetType(st);
+ gboolean enqueue(FALSE);
+ static_cast<QTMSClientSource*>(m_ClientSource)->GetEnqueueMode(enqueue);
+ static_cast<QTMSClientSource*>(m_ClientSource)->SetEnqueueMode(FALSE);
+ static_cast<QTMSClientSource*>(m_ClientSource)->Flush();
+#endif //__TEST_CODE_COVERAGE__
+ }
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+
+ void QTmsVoipTest::CreateClientSink()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && !m_ClientSink)
+ {
+ status = m_Factory->CreateSink(QTMS_SINK_CLIENT, m_ClientSink);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+ void QTmsVoipTest::AddClientSinkToStream()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Uplink && m_ClientSink)
+ {
+ connect(static_cast<QTMSClientSink*> (m_ClientSink),
+ SIGNAL(ProcessBuffer(const TMS::TMSBuffer*)), this,
+ SLOT(ProcessBuffer(const TMS::TMSBuffer*)));
+ status = m_Uplink->AddSink(m_ClientSink);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+
+
+ void QTmsVoipTest::CreateMicSource()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && !m_MicSource)
+ {
+ status = m_Factory->CreateSource(TMS_SOURCE_MIC, m_MicSource);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+ void QTmsVoipTest::AddMicSourceToStream()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Uplink && m_MicSource)
+ {
+ status = m_Uplink->AddSource(m_MicSource);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+ void QTmsVoipTest::CreateSpeakerSink()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && !m_SpeakerSink)
+ {
+ status = m_Factory->CreateSink(QTMS_SINK_SPEAKER, m_SpeakerSink);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+ void QTmsVoipTest::AddSpeakerSinkToStream()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Dnlink && m_SpeakerSink)
+ {
+ status = m_Dnlink->AddSink(m_SpeakerSink);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ }
+
+ void QTmsVoipTest::InitUplink()
+ {
+ QVERIFY(m_Uplink->Init() == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(m_UplinkSpy->count(), 1 );
+
+ GetSupportedBitrates();
+ SelectMinBitrate();
+ SelectMaxBitrate();
+ GetBitrate();
+
+ ToggleVad();
+ GetVad();
+
+ SetUpLinkG711ALAW();
+ SetUpLinkG711uLAW();
+ GetUpLinkG711Mode();
+
+ SetUpLinkILBC20MS();
+ SetUpLinkILBC30MS();
+ GetUpLinkILBCMode();
+
+ }
+
+ void QTmsVoipTest::InitDnlink()
+ {
+ QVERIFY(m_Dnlink->Init() == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(m_DnlinkSpy->count(), 1 );
+ ToggleCng();
+ GetCng();
+ TogglePlc();
+ GetPlc();
+
+ SetDnLinkG711ALAW();
+ SetDnLinkG711uLAW();
+ GetDnLinkG711Mode();
+
+ SetDnLinkILBC20MS();
+ SetDnLinkILBC30MS();
+ GetDnLinkILBCMode();
+
+ }
+ void QTmsVoipTest::DeinitUplink()
+ {
+ m_Uplink->Deinit();
+ QTest::qWait(1000);
+ }
+
+ void QTmsVoipTest::DeinitDnlink()
+ {
+ m_Dnlink->Deinit();
+ QTest::qWait(1000);
+ }
+
+ void QTmsVoipTest::StartUplink()
+ {
+ QVERIFY(m_Uplink->Start() == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(m_UplinkSpy->count(), 2 );
+ }
+
+ void QTmsVoipTest::StartDnlink()
+ {
+ QVERIFY(m_Dnlink->Start() == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(m_DnlinkSpy->count(), 2 );
+ }
+void QTmsVoipTest::StopUplink()
+ {
+#ifdef __TEST_CODE_COVERAGE__
+ QVERIFY(m_Uplink->Pause()== QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+#endif //__TEST_CODE_COVERAGE__
+
+ QVERIFY(m_Uplink->Stop() == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(m_UplinkSpy->count(), 3 );
+ }
+
+void QTmsVoipTest::StopDnlink()
+ {
+#ifdef __TEST_CODE_COVERAGE__
+ QVERIFY(m_Dnlink->Pause() == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+#endif //__TEST_CODE_COVERAGE__
+
+ QVERIFY(m_Dnlink->Stop() == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(m_DnlinkSpy->count(), 3 );
+ }
+
+void QTmsVoipTest::CloseUplink()
+ {
+ m_Uplink->Deinit();
+ QTest::qWait(1000);
+ if (m_Uplink)
+ {
+ if (m_Gain)
+ {
+ QVERIFY(m_Uplink->RemoveEffect(m_Gain)== QTMS_RESULT_SUCCESS);
+ }
+ if (m_MicSource)
+ {
+ QVERIFY(m_Uplink->RemoveSource(m_MicSource)== QTMS_RESULT_SUCCESS);
+ }
+ if (m_ClientSink)
+ {
+ QVERIFY(m_Uplink->RemoveSink(m_ClientSink)== QTMS_RESULT_SUCCESS);
+ }
+ }
+ }
+
+void QTmsVoipTest::CloseDownlink()
+ {
+ m_Dnlink->Deinit();
+ QTest::qWait(1000);
+ if (m_Dnlink)
+ {
+ if (m_Vol)
+ {
+ QVERIFY(m_Dnlink->RemoveEffect(m_Vol)== QTMS_RESULT_SUCCESS);
+ }
+ if (m_ClientSource)
+ {
+ QVERIFY(m_Dnlink->RemoveSource(m_ClientSource)== QTMS_RESULT_SUCCESS);
+ }
+ if (m_SpeakerSink)
+ {
+ QVERIFY(m_Dnlink->RemoveSink(m_SpeakerSink) == QTMS_RESULT_SUCCESS);
+ }
+ }
+
+ }
+
+void QTmsVoipTest::ResetUplnkFormat()
+ {
+ if (m_Uplink)
+ {
+ switch (m_UpLinkCodec)
+ {
+ case QTMS_FORMAT_PCM:
+ m_Uplink->ResetFormat(m_PCM16EncFormatIntfc);
+ break;
+ case QTMS_FORMAT_AMR:
+ m_Uplink->ResetFormat(m_AMRNBEncFormatIntfc);
+ break;
+ case QTMS_FORMAT_G711:
+ m_Uplink->ResetFormat(m_G711EncFormatIntfc);
+ break;
+ case QTMS_FORMAT_G729:
+ m_Uplink->ResetFormat(m_G729EncFormatIntfc);
+ break;
+ case QTMS_FORMAT_ILBC:
+ m_Uplink->ResetFormat(m_ILBCEncFormatIntfc);
+ break;
+ default:
+ break;
+ }
+ }
+
+ }
+
+void QTmsVoipTest::ResetDnlnkFormat()
+ {
+ if (m_Dnlink)
+ {
+ switch (m_DnLinkCodec)
+ {
+ case QTMS_FORMAT_PCM:
+ m_Dnlink->ResetFormat(m_PCM16DecFormatIntfc);
+ break;
+ case QTMS_FORMAT_AMR:
+ m_Dnlink->ResetFormat(m_AMRNBDecFormatIntfc);
+ break;
+ case QTMS_FORMAT_G711:
+ m_Dnlink->ResetFormat(m_G711DecFormatIntfc);
+ break;
+ case QTMS_FORMAT_G729:
+ m_Dnlink->ResetFormat(m_G729DecFormatIntfc);
+ break;
+ case QTMS_FORMAT_ILBC:
+ m_Dnlink->ResetFormat(m_ILBCDecFormatIntfc);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+void QTmsVoipTest::CreateFormat_data()
+ {
+ QTest::addColumn<QTMSFormatType>("format");
+
+#ifndef __WINSCW__
+ QTest::newRow("G711")<<QTMS_FORMAT_G711;
+ QTest::newRow("G729")<<QTMS_FORMAT_G729;
+ QTest::newRow("iLBC")<<QTMS_FORMAT_ILBC;
+ QTest::newRow("AMR")<<QTMS_FORMAT_AMR;
+#endif
+ QTest::newRow("PCM") << QTMS_FORMAT_PCM;
+ }
+
+void QTmsVoipTest::CreateFormat()
+ {
+ gint decstatus(QTMS_RESULT_SUCCESS);
+ gint encstatus(QTMS_RESULT_SUCCESS);
+ gint setencstatus(QTMS_RESULT_SUCCESS);
+ gint setdecstatus(QTMS_RESULT_SUCCESS);
+ QFETCH(QTMSFormatType, format);
+
+ m_DnLinkCodec = format;
+ m_UpLinkCodec = format;
+
+ switch (format)
+ {
+ case QTMS_FORMAT_G711:
+ {
+ decstatus = m_Factory->CreateFormat(QTMS_FORMAT_G711,
+ m_G711DecFormatIntfc);
+ encstatus = m_Factory->CreateFormat(QTMS_FORMAT_G711,
+ m_G711EncFormatIntfc);
+ setdecstatus = m_Dnlink->SetFormat(m_G711DecFormatIntfc);
+ setencstatus = m_Uplink->SetFormat(m_G711EncFormatIntfc);
+ qDebug("G.711 Set");
+
+ }
+ break;
+ case QTMS_FORMAT_G729:
+ {
+ decstatus = m_Factory->CreateFormat(QTMS_FORMAT_G729,
+ m_G729DecFormatIntfc);
+ encstatus = m_Factory->CreateFormat(QTMS_FORMAT_G729,
+ m_G729EncFormatIntfc);
+ setdecstatus = m_Dnlink->SetFormat(m_G729DecFormatIntfc);
+ setdecstatus = m_Uplink->SetFormat(m_G729EncFormatIntfc);
+ qDebug("G.729 Set");
+ }
+ break;
+ case QTMS_FORMAT_ILBC:
+ {
+ decstatus = m_Factory->CreateFormat(QTMS_FORMAT_ILBC,
+ m_ILBCDecFormatIntfc);
+ encstatus = m_Factory->CreateFormat(QTMS_FORMAT_ILBC,
+ m_ILBCEncFormatIntfc);
+ setdecstatus = m_Dnlink->SetFormat(m_ILBCDecFormatIntfc);
+ setencstatus = m_Uplink->SetFormat(m_ILBCEncFormatIntfc);
+ qDebug("iLBC Set");
+ }
+ break;
+ case QTMS_FORMAT_AMR:
+ {
+ decstatus = m_Factory->CreateFormat(QTMS_FORMAT_AMR,
+ m_AMRNBDecFormatIntfc);
+ encstatus = m_Factory->CreateFormat(QTMS_FORMAT_AMR,
+ m_AMRNBEncFormatIntfc);
+ setdecstatus = m_Dnlink->SetFormat(m_AMRNBDecFormatIntfc);
+ setencstatus = m_Uplink->SetFormat(m_AMRNBEncFormatIntfc);
+ qDebug("AMR-NB Set");
+ }
+ break;
+ case QTMS_FORMAT_PCM:
+ {
+ decstatus = m_Factory->CreateFormat(QTMS_FORMAT_PCM,
+ m_PCM16DecFormatIntfc);
+ encstatus = m_Factory->CreateFormat(QTMS_FORMAT_PCM,
+ m_PCM16EncFormatIntfc);
+ setdecstatus = m_Dnlink->SetFormat(m_PCM16DecFormatIntfc);
+ setencstatus = m_Uplink->SetFormat(m_PCM16EncFormatIntfc);
+ qDebug("PCM-16 Set");
+ }
+ break;
+ default:
+ break;
+ }
+
+ QVERIFY(decstatus == QTMS_RESULT_SUCCESS);
+ QVERIFY(encstatus == QTMS_RESULT_SUCCESS);
+ QVERIFY(setdecstatus == QTMS_RESULT_SUCCESS);
+ QVERIFY(setencstatus == QTMS_RESULT_SUCCESS);
+
+ InitUplink();
+ InitDnlink();
+ }
+
+
+void QTmsVoipTest::ToggleVad()
+ {
+ //m_Vad = (m_Vad) ? EFalse : ETrue;
+
+ m_Vad = ETrue;
+ switch (m_UpLinkCodec)
+ {
+ case QTMS_FORMAT_G711:
+ static_cast<QTMSG711Format*> (m_G711EncFormatIntfc)->SetVADMode(
+ m_Vad);
+ qDebug("G711 VAD set %d", m_Vad);
+ break;
+ case QTMS_FORMAT_G729:
+ static_cast<QTMSG729Format*> (m_G729EncFormatIntfc)->SetVADMode(
+ m_Vad);
+ qDebug("G729 VAD set %d",m_Vad);
+ break;
+ case QTMS_FORMAT_ILBC:
+ static_cast<QTMSILBCFormat*> (m_ILBCEncFormatIntfc)->SetVADMode(
+ m_Vad);
+ qDebug("iLBC VAD set %d",m_Vad);
+ break;
+ case QTMS_FORMAT_AMR:
+ //static_cast<TMSAMRFormat*>(iAMRNBEncFormatIntfc)->SetVADMode(m_Vad);
+ break;
+ case QTMS_FORMAT_PCM:
+ // Not supported; just for testing failing condition
+ //static_cast<QTMSPCMFormat*>(iPCM16EncFormatIntfc)->SetVADMode(m_Vad);
+ break;
+ default:
+ break;
+ }
+ }
+
+
+void QTmsVoipTest::GetVad()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ gboolean vad = EFalse;
+
+ switch (m_UpLinkCodec)
+ {
+ case QTMS_FORMAT_G711:
+ status = static_cast<QTMSG711Format*> (m_G711EncFormatIntfc)->GetVADMode(
+ vad);
+ qDebug("get G711 VAD: %d", vad);
+ break;
+ case QTMS_FORMAT_G729:
+ status = static_cast<QTMSG729Format*> (m_G729EncFormatIntfc)->GetVADMode(
+ vad);
+ qDebug("get G729 VAD: %d", vad);
+ break;
+ case QTMS_FORMAT_ILBC:
+ status = static_cast<QTMSILBCFormat*> (m_ILBCEncFormatIntfc)->GetVADMode(
+ vad);
+ qDebug("get iLBC VAD: %d", vad);
+ break;
+ default:
+ return;
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ // QVERIFY(vad == m_Vad);
+
+
+ }
+
+void QTmsVoipTest::ToggleCng()
+ {
+// m_Cng = (m_Cng) ? EFalse : ETrue;
+
+ m_Cng = ETrue;
+ switch (m_DnLinkCodec)
+ {
+ case QTMS_FORMAT_G711:
+ //case EG711_10MS:
+ static_cast<QTMSG711Format*> (m_G711DecFormatIntfc)->SetCNG(m_Cng);
+ qDebug("G711 CNG set %d", m_Cng);
+ break;
+ case QTMS_FORMAT_ILBC:
+ static_cast<QTMSILBCFormat*> (m_ILBCDecFormatIntfc)->SetCNG(m_Cng);
+ qDebug("iLBC CNG set %d", m_Cng);
+ break;
+ default:
+ break;
+ }
+ }
+
+
+void QTmsVoipTest::GetCng()
+ {
+ gint status;
+ gboolean cng = EFalse;
+ switch (m_DnLinkCodec)
+ {
+ case QTMS_FORMAT_G711:
+ status = static_cast<QTMSG711Format*>(m_G711DecFormatIntfc)->GetCNG(cng);
+ qDebug("G711 CNG: %d", cng);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ break;
+ case QTMS_FORMAT_ILBC:
+ status = static_cast<QTMSILBCFormat*>(m_ILBCDecFormatIntfc)->GetCNG(cng);
+ qDebug("iLBC CNG: %d", cng);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ break;
+ default:
+ break;
+ }
+
+ // QVERIFY(cng == m_Cng);
+
+ }
+
+
+void QTmsVoipTest::TogglePlc()
+ {
+// m_Plc = (m_Plc) ? EFalse : ETrue;
+ m_Plc = ETrue;
+ if (m_DnLinkCodec == QTMS_FORMAT_G711)
+ {
+ static_cast<QTMSG711Format*> (m_G711DecFormatIntfc)->SetPlc(m_Plc);
+ qDebug("G711 PLC set %d",m_Plc );
+ }
+ }
+
+void QTmsVoipTest::GetPlc()
+ {
+ gboolean plc = EFalse;
+ if (m_G711DecFormatIntfc && m_DnLinkCodec == QTMS_FORMAT_G711)
+ {
+ gint status =
+ static_cast<QTMSG711Format*> (m_G711DecFormatIntfc)->GetPlc(
+ plc);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("G711 PLC: %d", plc);
+ // QVERIFY(plc == m_Plc);
+ }
+ }
+
+
+
+void QTmsVoipTest::SelectMinBitrate()
+ {
+ if (m_BitratesVector.size() > 0)
+ {
+ std::vector<guint>::iterator bitrate = m_BitratesVector.begin();
+ iBitrate = *bitrate;
+ SetBitrate(iBitrate);
+ qDebug("BR set %d",iBitrate);
+ }
+ }
+
+
+void QTmsVoipTest::SelectMaxBitrate()
+ {
+ if (m_BitratesVector.size() > 0)
+ {
+ iBitrate = m_BitratesVector.back();
+ SetBitrate(iBitrate);
+ qDebug("BR set %d",iBitrate);
+ }
+ }
+
+
+void QTmsVoipTest::SetBitrate(guint bitrate)
+ {
+ switch (m_UpLinkCodec)
+ {
+ case QTMS_FORMAT_G711:
+ static_cast<QTMSG711Format*> (m_G711EncFormatIntfc)->SetBitRate(
+ bitrate);
+ qDebug("Set BR %d",bitrate);
+ break;
+ case QTMS_FORMAT_G729:
+ static_cast<QTMSG729Format*> (m_G729EncFormatIntfc)->SetBitRate(
+ bitrate);
+ qDebug("Set BR %d",bitrate);
+ break;
+ case QTMS_FORMAT_ILBC:
+ static_cast<QTMSILBCFormat*> (m_ILBCEncFormatIntfc)->SetBitRate(
+ bitrate);
+ qDebug("Set BR %d",bitrate);
+ break;
+ case QTMS_FORMAT_AMR:
+ static_cast<QTMSAMRFormat*> (m_AMRNBEncFormatIntfc)->SetBitRate(
+ bitrate);
+ qDebug("Set BR %d",bitrate);
+ break;
+ case QTMS_FORMAT_PCM:
+ default:
+ break;
+ }
+ }
+
+
+void QTmsVoipTest::GetSupportedBitrates()
+ {
+ gint numOfItems(0);
+ m_BitratesVector.clear();
+ gint status = GetSupportedBitrates(m_BitratesVector);
+
+ numOfItems = m_BitratesVector.size();
+ qDebug("BR Count %d", numOfItems);
+ std::vector<guint>::iterator itBitrates = m_BitratesVector.begin();
+ for (; itBitrates < m_BitratesVector.end(); itBitrates++)
+ {
+ qDebug("BR %d", *itBitrates);
+ }
+ }
+
+
+gint QTmsVoipTest::GetSupportedBitrates(BitRateVector& aBrArr)
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ switch (m_UpLinkCodec)
+ {
+ case QTMS_FORMAT_G711:
+ status = m_G711EncFormatIntfc->GetSupportedBitRates(aBrArr);
+ break;
+ case QTMS_FORMAT_G729:
+ status = m_G729EncFormatIntfc->GetSupportedBitRates(aBrArr);
+ break;
+ case QTMS_FORMAT_ILBC:
+ status = m_ILBCEncFormatIntfc->GetSupportedBitRates(aBrArr);
+ break;
+ case QTMS_FORMAT_AMR:
+ status = m_AMRNBEncFormatIntfc->GetSupportedBitRates(aBrArr);
+ break;
+ case QTMS_FORMAT_PCM:
+ // not supported, but test for correct error handling
+ //status = m_PCM16EncFormatIntfc->GetSupportedBitRates(aBrArr);
+ break;
+ default:
+ status = KErrNotSupported;
+ break;
+ }
+
+ return status;
+ }
+
+
+void QTmsVoipTest::GetBitrate()
+ {
+ guint bitrate;
+ switch (m_UpLinkCodec)
+ {
+ case QTMS_FORMAT_G711:
+ static_cast<QTMSG711Format*> (m_G711EncFormatIntfc)->GetBitRate(
+ bitrate);
+ qDebug("G711 bitrate: %d", bitrate);
+ break;
+ case QTMS_FORMAT_G729:
+ static_cast<QTMSG729Format*> (m_G729EncFormatIntfc)->GetBitRate(
+ bitrate);
+ qDebug("G729 bitrate: %d", bitrate);
+ break;
+ case QTMS_FORMAT_ILBC:
+ static_cast<QTMSILBCFormat*> (m_ILBCEncFormatIntfc)->GetBitRate(
+ bitrate);
+ qDebug("iLBC bitrate: %d", bitrate);
+ break;
+ case QTMS_FORMAT_AMR:
+ static_cast<QTMSAMRFormat*> (m_AMRNBEncFormatIntfc)->GetBitRate(
+ bitrate);
+ qDebug("AMR bitrate: %d", bitrate);
+ break;
+ case TMS_FORMAT_PCM:
+ default:
+ break;
+ }
+ }
+
+
+void QTmsVoipTest::SetDnLinkG711ALAW()
+ {
+ if (m_G711DecFormatIntfc && m_DnLinkCodec == QTMS_FORMAT_G711)
+ {
+ gint status = static_cast<QTMSG711Format*> (m_G711DecFormatIntfc)->SetMode(
+ QTMS_G711_CODEC_MODE_ALAW);
+ qDebug("SetDnLinkG711ALAW status %d",status);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("DNL G.711 Mode Set: [aLaw]");
+ }
+ }
+
+
+void QTmsVoipTest::SetDnLinkG711uLAW()
+ {
+ if (m_G711DecFormatIntfc && m_DnLinkCodec == QTMS_FORMAT_G711)
+ {
+ gint status = static_cast<QTMSG711Format*> (m_G711DecFormatIntfc)->SetMode(
+ QTMS_G711_CODEC_MODE_MULAW);
+ qDebug("SetDnLinkG711uLAW status %d",status);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("DNL G.711 Mode Set: [uLaw]");
+ }
+ }
+
+
+void QTmsVoipTest::GetDnLinkG711Mode()
+ {
+ QTMSG711CodecMode mode;
+ if (m_G711DecFormatIntfc && m_DnLinkCodec == QTMS_FORMAT_G711)
+ {
+ gint status =
+ static_cast<QTMSG711Format*> (m_G711DecFormatIntfc)->GetMode(
+ mode);
+ qDebug("GetDnLinkG711Mode status %d",status);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ if (mode == TMS_G711_CODEC_MODE_MULAW)
+ {
+ qDebug("DNL G711 Mode: [uLaw]");
+ }
+ else
+ {
+ qDebug("DNL G711 Mode: [aLaw]");
+ }
+ }
+ }
+
+
+void QTmsVoipTest::SetDnLinkILBC20MS()
+ {
+ if (m_ILBCDecFormatIntfc && m_DnLinkCodec == QTMS_FORMAT_ILBC)
+ {
+ gint status =
+ static_cast<QTMSILBCFormat*> (m_ILBCDecFormatIntfc)->SetMode(
+ TMS_ILBC_CODEC_MODE_20MS_FRAME);
+ qDebug("SetDnLinkILBC20MS status %d",status);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("DNL iLBC Mode Set: [20ms]");
+ }
+ }
+
+
+void QTmsVoipTest::SetDnLinkILBC30MS()
+ {
+ if (m_ILBCDecFormatIntfc && m_DnLinkCodec == QTMS_FORMAT_ILBC)
+ {
+ gint status =
+ static_cast<QTMSILBCFormat*> (m_ILBCDecFormatIntfc)->SetMode(
+ TMS_ILBC_CODEC_MODE_30MS_FRAME);
+ qDebug("SetDnLinkILBC30MS status %d",status);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("DNL iLBC Mode Set: [30ms]");
+ }
+ }
+
+
+void QTmsVoipTest::GetDnLinkILBCMode()
+ {
+ QTMSILBCCodecMode mode;
+ if (m_ILBCDecFormatIntfc && m_DnLinkCodec == QTMS_FORMAT_ILBC)
+ {
+ gint status =
+ static_cast<QTMSILBCFormat*> (m_ILBCDecFormatIntfc)->GetMode(
+ mode);
+ qDebug("GetDnLinkILBCMode status %d",status);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ if (mode == QTMS_ILBC_CODEC_MODE_30MS_FRAME)
+ {
+ qDebug("DNL iLBC Mode: [30ms]");
+ }
+ else if (mode == QTMS_ILBC_CODEC_MODE_20MS_FRAME)
+ {
+ qDebug("DNL iLBC Mode: [20ms]");
+ }
+ }
+ }
+
+void QTmsVoipTest::SetUpLinkG711ALAW()
+ {
+ if (m_G711EncFormatIntfc && m_UpLinkCodec == QTMS_FORMAT_G711)
+ {
+ gint status =
+ static_cast<QTMSG711Format*> (m_G711EncFormatIntfc)->SetMode(
+ QTMS_G711_CODEC_MODE_ALAW);
+
+ qDebug("SetUpLinkG711ALAW status %d",status);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("UPL G.711 Mode Set: [aLaw]");
+ }
+ }
+
+void QTmsVoipTest::SetUpLinkG711uLAW()
+ {
+ if (m_G711EncFormatIntfc && m_UpLinkCodec == QTMS_FORMAT_G711)
+ {
+ gint status =
+ static_cast<QTMSG711Format*> (m_G711EncFormatIntfc)->SetMode(
+ QTMS_G711_CODEC_MODE_MULAW);
+ qDebug("SetUpLinkG711uLAW status %d",status);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("UPL G.711 Mode Set: [uLaw]");
+ }
+ }
+
+void QTmsVoipTest::GetUpLinkG711Mode()
+ {
+ QTMSG711CodecMode mode;
+ if (m_G711EncFormatIntfc && m_UpLinkCodec == QTMS_FORMAT_G711)
+ {
+ gint status =
+ static_cast<QTMSG711Format*> (m_G711EncFormatIntfc)->GetMode(
+ mode);
+ qDebug("GetUpLinkG711Mode status %d",status);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ if (mode == QTMS_G711_CODEC_MODE_MULAW)
+ {
+ qDebug("UPL G.711 Mode: [uLaw]");
+ }
+ else if (mode == QTMS_G711_CODEC_MODE_ALAW)
+ {
+ qDebug("UPL G.711 Mode: [aLaw]");
+ }
+ }
+
+ }
+
+
+void QTmsVoipTest::SetUpLinkILBC20MS()
+ {
+ if (m_ILBCEncFormatIntfc && m_UpLinkCodec == QTMS_FORMAT_ILBC)
+ {
+ gint status =
+ static_cast<QTMSILBCFormat*> (m_ILBCEncFormatIntfc)->SetMode(
+ QTMS_ILBC_CODEC_MODE_20MS_FRAME);
+ qDebug("SetUpLinkILBC20MS status %d",status);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("UPL iLBC Mode Set: [20ms]");
+ }
+ }
+
+
+void QTmsVoipTest::SetUpLinkILBC30MS()
+ {
+ if (m_ILBCEncFormatIntfc && m_UpLinkCodec == QTMS_FORMAT_ILBC)
+ {
+ gint status =
+ static_cast<QTMSILBCFormat*> (m_ILBCEncFormatIntfc)->SetMode(
+ QTMS_ILBC_CODEC_MODE_30MS_FRAME);
+ qDebug("SetUpLinkILBC30MS status %d",status);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("UPL iLBC Mode Set: [30ms]");
+ }
+ }
+
+void QTmsVoipTest::GetUpLinkILBCMode()
+ {
+ QTMSILBCCodecMode mode;
+ if (m_ILBCEncFormatIntfc && m_UpLinkCodec == QTMS_FORMAT_ILBC)
+ {
+ gint status =
+ static_cast<QTMSILBCFormat*> (m_ILBCEncFormatIntfc)->GetMode(
+ mode);
+ qDebug("GetUpLinkILBCMode status %d",status);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ if (mode == QTMS_ILBC_CODEC_MODE_30MS_FRAME)
+ {
+ qDebug("UPL iLBC Mode: [30ms]");
+ }
+ else if (mode == QTMS_ILBC_CODEC_MODE_20MS_FRAME)
+ {
+ qDebug("UPL iLBC Mode: [20ms]");
+ }
+ }
+
+ }
+
+
+void QTmsVoipTest::CreateStreamVol()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && m_Dnlink && !m_Vol)
+ {
+ m_Factory->CreateFormat(QTMS_FORMAT_PCM, m_PCM16DecFormatIntfc);
+ m_Dnlink->SetFormat(m_PCM16DecFormatIntfc);
+
+ status = m_Factory->CreateEffect(QTMS_EFFECT_VOLUME, m_Vol);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ connect(static_cast<QTMSVolumeEffect*> (m_Vol),
+ SIGNAL(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)),
+ this, SLOT(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)));
+
+ if(m_Dnlink)
+ {
+ status = m_Dnlink->AddEffect(m_Vol);
+ }
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ InitDnlink();
+
+ StreamVol();
+
+ }
+ }
+
+void QTmsVoipTest::StreamVol()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ guint maxvol(0);
+ if (m_Vol)
+ {
+ status = static_cast<QTMSVolumeEffect*> (m_Vol)->GetMaxLevel(maxvol);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ status = static_cast<QTMSVolumeEffect*> (m_Vol)->SetLevel(maxvol);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+
+ guint vol(0);
+ status = static_cast<QTMSVolumeEffect*> (m_Vol)->GetLevel(vol);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ QCOMPARE(vol,maxvol);
+ }
+ }
+
+void QTmsVoipTest::CreateStreamGain()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && m_Uplink && !m_Gain)
+ {
+
+ m_Factory->CreateFormat(QTMS_FORMAT_PCM, m_PCM16EncFormatIntfc);
+ m_Uplink->SetFormat(m_PCM16EncFormatIntfc);
+ status = m_Factory->CreateEffect(QTMS_EFFECT_GAIN, m_Gain);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ connect(static_cast<QTMSGainEffect*> (m_Gain),
+ SIGNAL(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)),
+ this,
+ SLOT(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)));
+
+ status = m_Uplink->AddEffect(m_Gain);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ InitUplink();
+
+ StreamGain();
+ }
+ }
+
+void QTmsVoipTest::StreamGain()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Gain)
+ {
+ guint maxgain(0);
+ static_cast<QTMSGainEffect*> (m_Gain)->GetMaxLevel(maxgain);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ static_cast<QTMSGainEffect*> (m_Gain)->SetLevel(maxgain);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+
+ guint gain(0);
+ static_cast<QTMSGainEffect*> (m_Gain)->GetLevel(gain);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ QCOMPARE(gain,maxgain);
+ }
+
+ }
+
+void QTmsVoipTest::CreateGlobalVol()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && !m_GlobalVol)
+ {
+ status = m_Factory->CreateEffect(QTMS_EFFECT_GLOBAL_VOL, m_GlobalVol);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ connect(static_cast<QTMSGlobalVolEffect*> (m_GlobalVol),
+ SIGNAL(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)),
+ this, SLOT(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)));
+
+ guint maxvol(0);
+ status = static_cast<QTMSGlobalVolEffect*>(m_GlobalVol)->GetMaxLevel(
+ maxvol);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("global max vol %d",maxvol);
+
+ status = static_cast<QTMSGlobalVolEffect*>(m_GlobalVol)->SetLevel(
+ maxvol);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+
+ guint vol(0);
+ status = static_cast<QTMSGlobalVolEffect*> (m_GlobalVol)->GetLevel(vol);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("global vol %d",vol);
+
+ QCOMPARE(vol,maxvol);
+
+ }
+ }
+
+
+void QTmsVoipTest::CreateGlobalGain()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ if (m_Factory && !m_GlobalGain)
+ {
+ status = m_Factory->CreateEffect(QTMS_EFFECT_GLOBAL_GAIN, m_GlobalGain);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ connect(static_cast<QTMSGlobalGainEffect*> (m_GlobalGain),
+ SIGNAL(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)),
+ this,
+ SLOT(EffectsEvent(const QTMSEffect&,QTMSSignalEvent)));
+
+ guint maxgain(0);
+ static_cast<QTMSGlobalGainEffect*>(m_GlobalGain)->GetMaxLevel(maxgain);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("global max gain %d",maxgain);
+
+ static_cast<QTMSGlobalGainEffect*>(m_GlobalGain)->SetLevel(maxgain);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+
+ guint gain(0);
+ static_cast<QTMSGlobalGainEffect*>(m_GlobalGain)->GetLevel(gain);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ qDebug("global gain %d",gain);
+
+ QCOMPARE(gain,maxgain);
+
+ }
+ }
+
+void QTmsVoipTest::CreateRouting_data()
+ {
+
+ QTest::addColumn<QTMSAudioOutput>("routing");
+
+ QTest::newRow("Public")<<QTMS_AUDIO_OUTPUT_PUBLIC;
+ QTest::newRow("Private")<<QTMS_AUDIO_OUTPUT_PRIVATE;
+
+
+ }
+
+void QTmsVoipTest::CreateRouting()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+
+ QFETCH(QTMSAudioOutput, routing);
+
+ if (m_Factory && !m_Routing)
+ {
+ m_UpLinkCodec = QTMS_FORMAT_PCM;
+ m_Factory->CreateFormat(QTMS_FORMAT_PCM, m_PCM16DecFormatIntfc);
+ m_Dnlink->SetFormat(m_PCM16DecFormatIntfc);
+
+ InitDnlink();
+ StartDnlink();
+
+ status = m_Factory->CreateGlobalRouting(m_Routing);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ m_RoutingSpy = new QSignalSpy(m_Routing,
+ SIGNAL(GlobalRoutingEvent(const QTMSGlobalRouting&,
+ QTMSSignalEvent,
+ QTMSAudioOutput)));
+
+ QVERIFY( m_RoutingSpy->isValid() );
+
+ //QCOMPARE(m_RoutingSpy->count(), 0 );
+ connect(m_Routing,
+ SIGNAL(GlobalRoutingEvent(const QTMSGlobalRouting&,QTMSSignalEvent,QTMSAudioOutput)),
+ this,
+ SLOT(GlobalRoutingEvent(const QTMSGlobalRouting&,QTMSSignalEvent,QTMSAudioOutput)));
+ }
+
+ if(m_Routing)
+ {
+ status = m_Routing->SetOutput(routing);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+#ifndef __WINSCW__
+ QTest::qWait(1000);
+ //QCOMPARE(m_RoutingSpy->count(), 1 );
+#endif
+ QTMSAudioOutput current;
+ status = m_Routing->GetOutput(current);
+ DisplayDevice(current);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+#ifndef __WINSCW__
+ QCOMPARE(routing,current);
+#endif
+ StopDnlink();
+ }
+ }
+
+
+void QTmsVoipTest::DisplayDevice(QTMSAudioOutput device)
+ {
+ qDebug("Current Output:");
+
+ switch (device)
+ {
+ case QTMS_AUDIO_OUTPUT_NONE:
+ {
+ qDebug("none");
+ }
+ break;
+ case QTMS_AUDIO_OUTPUT_PUBLIC:
+ {
+ qDebug("Public");
+ }
+ break;
+ case QTMS_AUDIO_OUTPUT_PRIVATE:
+ {
+ qDebug("Private");
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+
+void QTmsVoipTest::CreateDnlinkDtmf()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ GString* dtmfstring(NULL);
+
+ if (m_Factory && m_Dnlink && !m_Dnlnkdtmf)
+ {
+ m_UpLinkCodec = QTMS_FORMAT_PCM;
+ m_Factory->CreateFormat(QTMS_FORMAT_PCM, m_PCM16DecFormatIntfc);
+ m_Dnlink->SetFormat(m_PCM16DecFormatIntfc);
+
+ InitDnlink();
+
+ status = m_Factory->CreateDTMF(QTMS_STREAM_DOWNLINK, m_Dnlnkdtmf);
+
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+
+ QSignalSpy dtmfspy(m_Dnlnkdtmf,
+ SIGNAL(DTMFEvent(const QTMSDTMF&,QTMSSignalEvent)));
+
+ QVERIFY( dtmfspy.isValid() );
+
+ //QCOMPARE(dtmfspy.count(), 0 );
+
+ connect(m_Dnlnkdtmf,
+ SIGNAL(DTMFEvent(const QTMSDTMF&,QTMSSignalEvent)), this,
+ SLOT(DTMFEvent(const QTMSDTMF&,QTMSSignalEvent)));
+
+ dtmfstring = g_string_new("4723");
+ status = m_Dnlnkdtmf->SetTone(dtmfstring);
+
+ m_Dnlnkdtmf->Start();
+ QTest::qWait(1000);
+ g_string_free(dtmfstring, TRUE);
+ //QCOMPARE(dtmfspy.count(), 1 );
+
+ status = m_Dnlnkdtmf->Stop();
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ QTest::qWait(1000);
+ //QCOMPARE(dtmfspy.count(), 2 );
+ }
+ }
+
+void QTmsVoipTest::CreateRingTone()
+ {
+
+ }
+
+
+void QTmsVoipTest::CreateBuffer()
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ if (m_Factory)
+ {
+ QTMSBuffer* qtmsbuffer(NULL);
+ QTMSBufferType buftype(QTMS_BUFFER_MEMORY);
+ guint size(100);
+ status = m_Factory->CreateBuffer(QTMS_BUFFER_MEMORY,
+ size, qtmsbuffer);
+ QVERIFY(status == QTMS_RESULT_SUCCESS);
+ if (qtmsbuffer)
+ {
+ qtmsbuffer->GetType(buftype);
+ qtmsbuffer->GetDataSize(size);
+ qtmsbuffer->SetDataSize(size);
+ guint8* pbuf(NULL);
+ qtmsbuffer->GetDataPtr(pbuf);
+ guint64 ts(0);
+ qtmsbuffer->GetTimeStamp(ts);
+ qtmsbuffer->SetTimeStamp(ts);
+ m_Factory->DeleteBuffer(qtmsbuffer);
+ }
+ }
+ }
+
+
+void QTmsVoipTest::FillBuffer(TMS::TMSBuffer& buffer)
+ {
+ //TODO: add loopback test and file playback
+#ifdef __TEST_CODE_COVERAGE__
+ if(m_ClientSource)
+ {
+ static_cast<QTMSClientSource*> (m_ClientSource)->BufferFilled(
+ buffer);
+ }
+#endif
+
+ }
+
+void QTmsVoipTest::BufferProcessed(TMS::TMSBuffer* /*buffer*/, gint /*reason*/)
+ {
+ }
+
+void QTmsVoipTest::ProcessBuffer(const TMS::TMSBuffer* buffer)
+ {
+ //TODO: add loopback test
+#ifdef __TEST_CODE_COVERAGE__
+ TMS::TMSBuffer* recBuf(NULL);
+ recBuf = const_cast<TMS::TMSBuffer*> (buffer);
+ if(m_ClientSink)
+ {
+ static_cast<QTMSClientSink*> (m_ClientSink)->BufferProcessed(
+ recBuf);
+ }
+#endif
+ }
+
+
+
+void QTmsVoipTest::EffectsEvent(const QTMSEffect& tmseffect,
+ QTMSSignalEvent event)
+ {
+ QTMSEffectType effecttype;
+ const_cast<QTMSEffect&> (tmseffect).GetType(effecttype);
+
+ QVERIFY(event.reason == QTMS_RESULT_SUCCESS);
+
+ switch (effecttype)
+ {
+ case QTMS_EFFECT_GLOBAL_VOL:
+ {
+ switch (event.type)
+ {
+ case QTMS_EVENT_EFFECT_VOL_CHANGED:
+ qDebug("Global vol effect change");
+ break;
+ default:
+ break;
+ }
+ }
+ break;
+ case QTMS_EFFECT_GLOBAL_GAIN:
+ {
+ switch (event.type)
+ {
+ case QTMS_EVENT_EFFECT_GAIN_CHANGED:
+ qDebug("Global gain effect change");
+ break;
+ default:
+ break;
+ }
+ }
+ break;
+ case QTMS_EFFECT_VOLUME:
+ {
+ switch (event.type)
+ {
+ case QTMS_EVENT_EFFECT_GAIN_CHANGED:
+ qDebug("Stream vol effect change");
+ break;
+ default:
+ break;
+ }
+ }
+ break;
+ case QTMS_EFFECT_GAIN:
+ {
+ switch (event.type)
+ {
+ case QTMS_EVENT_EFFECT_GAIN_CHANGED:
+ qDebug("Stream gain effect change");
+ break;
+ default:
+ break;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+
+
+void QTmsVoipTest::GlobalRoutingEvent(const QTMSGlobalRouting& /*routing*/,
+ QTMSSignalEvent event, QTMSAudioOutput /*output*/)
+ {
+ QVERIFY(event.reason == QTMS_RESULT_SUCCESS);
+ switch (event.type)
+ {
+ case QTMS_EVENT_ROUTING_AVAIL_OUTPUTS_CHANGED:
+ qDebug("Available outputs changed");
+ break;
+ case QTMS_EVENT_ROUTING_OUTPUT_CHANGED:
+ qDebug("output changed");
+ break;
+ case QTMS_EVENT_ROUTING_SET_OUTPUT_COMPLETE:
+ qDebug("set output complete");
+ break;
+ default:
+ break;
+ }
+
+ }
+
+void QTmsVoipTest::TMSStreamEvent(const QTMSStream& stream,
+ QTMSSignalEvent event)
+ {
+
+ QVERIFY(event.reason == QTMS_RESULT_SUCCESS);
+
+ gint streamId;
+ streamId = const_cast<QTMSStream&> (stream).GetStreamId();
+ qDebug("StreamID %d",streamId);
+ gint state;
+ state = const_cast<QTMSStream&> (stream).GetState();
+ QVERIFY(state == event.curr_state);
+
+ switch (const_cast<QTMSStream&> (stream).GetStreamType())
+ {
+ case QTMS_STREAM_UPLINK:
+ {
+ switch (event.type)
+ {
+ case QTMS_EVENT_STREAM_STATE_CHANGED:
+ {
+ switch (event.curr_state)
+ {
+ case QTMS_STREAM_INITIALIZED:
+ {
+ qDebug("Uplink initialized ");
+ break;
+ }
+ case QTMS_STREAM_UNINITIALIZED:
+ qDebug("Uplink uninitialized ");
+ break;
+ case QTMS_STREAM_PAUSED:
+ qDebug("Uplink paused ");
+ break;
+ case QTMS_STREAM_STARTED:
+ qDebug("Uplink started ");
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ break;
+ }
+ case QTMS_STREAM_DOWNLINK:
+ {
+ switch (event.type)
+ {
+ case QTMS_EVENT_STREAM_STATE_CHANGED:
+ {
+ switch (event.curr_state)
+ {
+ case QTMS_STREAM_INITIALIZED:
+ qDebug("Downlink initialized ");
+ break;
+ case QTMS_STREAM_UNINITIALIZED:
+ qDebug("Downlink uninitialized ");
+ break;
+ case QTMS_STREAM_PAUSED:
+ qDebug("Downlink paused ");
+ break;
+ case QTMS_STREAM_STARTED:
+ qDebug("Downlink started ");
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+
+void QTmsVoipTest::RingtoneEvent(const QTMSRingTone& /*rt*/,
+ QTMSSignalEvent event)
+ {
+ QVERIFY(event.reason == QTMS_RESULT_SUCCESS);
+ switch (event.type)
+ {
+ case QTMS_EVENT_RINGTONE_OPEN_COMPLETE:
+ qDebug("RT Open Complete");
+ break;
+ case QTMS_EVENT_RINGTONE_PLAY_COMPLETE:
+ qDebug("RT Play Complete");
+ break;
+ default:
+ break;
+ }
+ }
+
+
+void QTmsVoipTest::DTMFEvent(const QTMSDTMF& /*dtmf*/, QTMSSignalEvent event)
+ {
+
+ QVERIFY(event.reason == QTMS_RESULT_SUCCESS);
+ switch (event.type)
+ {
+ case QTMS_EVENT_DTMF_TONE_STARTED:
+ qDebug("DTMF Started");
+ break;
+ case QTMS_EVENT_DTMF_TONE_STOPPED:
+ qDebug("DTMF Stopped");
+ break;
+ default:
+ break;
+ }
+ }
+
+
+QTEST_MAIN_S60(QTmsVoipTest)
+
+#include "qtmsvoiptest.moc"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/tsrc/qtmsvoiptest/qtmsvoiptest.pro Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,42 @@
+#
+# 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:
+# Project specification file for tsrc.
+#
+
+TEMPLATE = app
+TARGET =
+QT += testlib
+
+
+TARGET.CAPABILITY = CAP_APPLICATION MultimediaDD
+TARGET.EPOCALLOWDLLDATA = 1
+
+
+LIBS += -lqtmsapi \
+ -llibglib \
+ -llibgobject \
+ -llibgmodule \
+ -llibstdcpp
+
+DEPENDPATH += .
+INCLUDEPATH += .
+
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+ $$OS_LAYER_LIBC_SYSTEMINCLUDE \
+ $$OS_LAYER_GLIB_SYSTEMINCLUDE \
+ ..\..\..\qt_telephony_multimedia_service_api\inc
+# Input
+HEADERS += qtestmains60.h
+SOURCES += qtmsvoiptest.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/qt_telephony_multimedia_service_api/tsrc/tsrc.pro Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,26 @@
+# 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 <platform_paths.hrh>
+
+TEMPLATE = subdirs
+
+BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>"
+
+
+SUBDIRS = qtmscstest \
+ qtmsvoiptest
+
+
+SYMBIAN_PLATFORMS = DEFAULT
--- a/mmappfw_plat/videoplaylist_utility_api/tsrc/videoplaylistutilitytest/group/videoplaylistutilitytest.mmp Fri Feb 19 16:32:39 2010 +0000
+++ b/mmappfw_plat/videoplaylist_utility_api/tsrc/videoplaylistutilitytest/group/videoplaylistutilitytest.mmp Wed Jun 23 17:51:16 2010 +0100
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 2 %
+// Version : %version: 5 %
#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
Binary file mpx/Conf/mpx.confml has changed
Binary file mpx/Conf/mpx_101FFCD2.crml has changed
Binary file mpx/cenrep/101FFCD2.txt has changed
--- a/mpx/collectionframework/collectionengine/inc/mpxcollectionengine.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/collectionframework/collectionengine/inc/mpxcollectionengine.h Wed Jun 23 17:51:16 2010 +0100
@@ -79,6 +79,14 @@
* @param aData some data
*/
IMPORT_C void NotifyL(TMPXCollectionBroadCastMsg aMsg, TInt aData);
+
+
+ /**
+ * Broadcast a command to all plug-ins
+ * @param aCmd command to send
+ * @param aData some data
+ */
+ void Command(TMPXCollectionCommand aCmd, TInt aData);
/**
* Retrieves the set of supported file types in the collection server
--- a/mpx/collectionframework/collectionengine/src/mpxcollectionclientcontext.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/collectionframework/collectionengine/src/mpxcollectionclientcontext.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -619,6 +619,13 @@
iEngine.PluginPop();
break;
}
+ case EMcCloseCollection:
+ {
+ // Forward to all plug-ins; argument is drive number
+ iEngine.Command ( aCmd, aData );
+ break;
+ }
+
default:
{
User::Leave(KErrNotSupported);
@@ -2440,7 +2447,11 @@
// Check for open playlist only mode. If in that mode, do not return the media
// from the cache but call the plugin to open, as that will callback a
// different HandleOpenL() with the collection path instead.
- TMPXOpenMode mode( iBrowsePath->OpenNextMode() );
+ TMPXOpenMode mode = EMPXOpenDefault;
+ if(iBrowsePath)
+ {
+ mode = iBrowsePath->OpenNextMode();
+ }
CMPXCollectionPlugin* plugin = LoadedPlugin(EContextBrowse);
if ( !iFilter && mode != EMPXOpenPlaylistOnly )
{
--- a/mpx/collectionframework/collectionengine/src/mpxcollectionengine.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/collectionframework/collectionengine/src/mpxcollectionengine.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -194,6 +194,9 @@
TInt command = KErrNotSupported;
TInt data = 0;
TBool clearCache ( EFalse );
+ TBool notify( ETrue );
+ TInt count = iContexts.Count();
+ CMPXCollectionClientContext* context( NULL );
switch( aMsg )
{
case EMcMsgFormatStart:
@@ -207,8 +210,14 @@
clearCache = ETrue;
break;
}
+ case EMcMsgDiskInserted:
+ for( TInt i=0; i<count; ++i )
+ {
+ context = iContexts[i];
+ context->NotifyL( aMsg, aData );
+ }
+ notify = EFalse;
case EMcMsgFormatEnd:
- case EMcMsgDiskInserted:
case EMcMsgUSBMassStorageEnd:
{
command = EMcReOpenCollection;
@@ -253,12 +262,7 @@
}
if( command != KErrNotSupported )
{
- TArray<CMPXCollectionPlugin*> plugins = iPluginHandler->LoadedPlugins();
- for( TInt i=0; i<plugins.Count(); ++i )
- {
- CMPXCollectionPlugin* plugin = plugins[i];
- TRAP_IGNORE(plugin->CommandL( (TMPXCollectionCommand)command, data));
- }
+ Command( (TMPXCollectionCommand)command, data );
}
if( clearCache )
@@ -286,12 +290,22 @@
rfs.Close();
}
- TInt count = iContexts.Count();
- for( TInt i=0; i<count; ++i )
+ if ( notify )
+ {
+ for( TInt i=0; i<count; ++i )
+ {
+ context = iContexts[i];
+ context->NotifyL( aMsg, aData );
+ }
+ }
+ }
+void CMPXCollectionEngine::Command( TMPXCollectionCommand aCmd, TInt aData )
+ {
+ TArray<CMPXCollectionPlugin*> plugins = iPluginHandler->LoadedPlugins();
+ for( TInt i=0; i<plugins.Count(); ++i )
{
- CMPXCollectionClientContext* context;
- context = iContexts[i];
- context->NotifyL( aMsg, aData );
+ CMPXCollectionPlugin* plugin = plugins[i];
+ TRAP_IGNORE(plugin->CommandL( aCmd, aData));
}
}
--- a/mpx/collectionframework/collectionserver/src/mpxcollectionserver.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/collectionframework/collectionserver/src/mpxcollectionserver.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -72,8 +72,8 @@
CleanupStack::PushL(server);
RProcess::Rendezvous(KErrNone);
CActiveScheduler::Start();
+ CleanupStack::PopAndDestroy(server);
CActiveScheduler::Install(NULL);
- CleanupStack::PopAndDestroy(server);
CleanupStack::PopAndDestroy(scheduler);
}
--- a/mpx/collectionframework/collectionserver/src/mpxcollectionserversession.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/collectionframework/collectionserver/src/mpxcollectionserversession.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -570,14 +570,14 @@
//
void CMPXCollectionSession::CancelRequests()
{
+ if (iContext)
+ {
+ iContext->CancelRequest(this);
+ }
if (!iMessage.IsNull())
{
iMessage.Complete(KErrCancel);
}
- if (iContext)
- {
- iContext->CancelRequest(this);
- }
}
// ----------------------------------------------------------------------------
--- a/mpx/collectionframework/collectionutility/src/mpxcollectionplaylist.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/collectionframework/collectionutility/src/mpxcollectionplaylist.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -1256,6 +1256,19 @@
if( changeType == EMPXItemDeleted )
{
refresh = ETrue;
+ MPX_DEBUG1("CMPXCollectionPlaylist::DoHandleCollectionChangeMessageL -- current item deleted");
+
+ TBool lastItemDeleted( iItemIndex == 0 && iItemIndexes.Count() == 1 );
+
+ if ( lastItemDeleted ) // playlist is now empty, notify observer immediately
+ {
+ MPX_DEBUG1("CMPXCollectionPlaylist::DoHandleCollectionChangeMessageL -- last playlist item deleted");
+ Invalidate();
+ if ( iPlObs )
+ {
+ iPlObs->HandleCollectionPlaylistChange(KErrEof);
+ }
+ }
}
// Modified
else if( changeType == EMPXItemModified )
@@ -1333,7 +1346,8 @@
}
}
- if (iAutoPlaylist && refresh)
+ // update playlist immediately when item is deleted in order to detect deletion of the last item in the playlist
+ if ( refresh && iItemIndexes.Count() > 0 )
{
// For autoplaylist, affected by the event.
// Path clip will never happen for autoplaylist
--- a/mpx/commonframework/common/bwinscw/mpxcommonU.DEF Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/commonframework/common/bwinscw/mpxcommonU.DEF Wed Jun 23 17:51:16 2010 +0100
@@ -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 Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/commonframework/common/eabi/mpxcommonU.DEF Wed Jun 23 17:51:16 2010 +0100
@@ -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 Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/commonframework/common/src/mpxclientlist.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -24,6 +24,41 @@
#include "mpxclientlist.h"
#include <mpxsubscription.h>
+// ============================ LOCAL FUNCTIONS ==============================
+
+// ----------------------------------------------------------------------------
+// Searches process id for target selector plugin.
+// When the player has been opened in a mode, which is bound to the same engine
+// than certain application's engine, then need to fetch its process id.
+// (As a reference for parameter aMode see MMPXPlaybackUtility modes.)
+// Otherwise target selector plugin is notified wrongly about registered client
+// and key events are not propagated to correct application.
+// ----------------------------------------------------------------------------
+//
+static void FindProcessIdForTsp( TInt aMode, TProcessId& aProcessId )
+ {
+ TBool processFound( EFalse );
+ TFindProcess processFinder;
+ TFullName processName;
+
+ while ( processFinder.Next( processName ) == KErrNone && !processFound )
+ {
+ RProcess process;
+ TInt err = process.Open( processFinder );
+ if( err == KErrNone )
+ {
+ if( process.SecureId().iId == aMode && process.ExitType() == EExitPending )
+ {
+ MPX_DEBUG4("FindProcessIdForTsp(): pid changed from %d to %d (mode 0x%x)",
+ TUint(aProcessId), TUint(process.Id()), aMode);
+ aProcessId = process.Id();
+ processFound = ETrue;
+ }
+ process.Close();
+ }
+ }
+ }
+
// ============================ MEMBER FUNCTIONS ==============================
// ----------------------------------------------------------------------------
@@ -46,7 +81,8 @@
//
CMPXClientList::CMPXClientList(MMPXClientlistObserver* aObserver)
: iIdentity(CMPXClientList::ClientsMatch),
- iObserver(aObserver)
+ iObserver(aObserver),
+ iPrimaryClient(NULL)
{}
// ----------------------------------------------------------------------------
@@ -108,6 +144,7 @@
iClientProcesses.AppendL(pid);
if (iObserver)
{
+ FindProcessIdForTsp(aMode, pid);
iObserver->HandleClientChange(pid, MMPXClientlistObserver::EAdd);
}
}
@@ -139,6 +176,7 @@
iClientProcesses.AppendL(pid);
if (iObserver)
{
+ FindProcessIdForTsp(aMode, pid);
iObserver->HandleClientChange(pid, MMPXClientlistObserver::EAdd);
}
}
@@ -155,7 +193,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
@@ -167,7 +213,9 @@
{
if (iObserver)
{
- iObserver->HandleClientChange(id->iPid, MMPXClientlistObserver::ERemove);
+ TProcessId pid(id->iPid);
+ FindProcessIdForTsp(id->iMode, pid);
+ iObserver->HandleClientChange(pid, MMPXClientlistObserver::ERemove);
}
iClientProcesses.Remove(i);
}
@@ -484,8 +532,8 @@
: iTid(aTid),
iPid(aPid),
iMode(aMode),
- iMsgQueue(aMsgQueue),
- iCategory(aCategory)
+ iCategory(aCategory),
+ iMsgQueue(aMsgQueue)
{}
// -----------------------------------------------------------------------------
@@ -601,4 +649,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/mpxdataarray.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/commonframework/common/src/mpxdataarray.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -55,7 +55,10 @@
//
void RMPXDataItem::Copy(TUint aClientHandle,TAny* aSrc,TInt aSize)
{
- MPX_ASSERT(aSrc&&aClientHandle);
+ //The source could be zero-length descriptor: aSize is 0 and aSrc is NULL
+ //ASSERT if aSrc is NULL while aSize is not zero, invalid descriptor
+ MPX_ASSERT(((aSrc!=NULL)?ETrue:(aSize==0))&&aClientHandle);
+
//
Reset(aClientHandle);
RMPXHeapManager& m=RMPXHeapManager::HeapManager(aClientHandle);
--- a/mpx/commonframework/common/src/mpxmessagequeue.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/commonframework/common/src/mpxmessagequeue.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -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
--- a/mpx/commonframework/common/src/mpxpluginmonitor.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/commonframework/common/src/mpxpluginmonitor.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -145,8 +145,11 @@
MPX_DEBUG3("CMPXPluginMonitor::RunError interface id 0x%08x, error",
iInterfaceUid.iUid, aError);
// Restart observer
- iECs.NotifyOnChange(iStatus);
- SetActive();
+ if ( !IsActive() )
+ {
+ iECs.NotifyOnChange(iStatus);
+ SetActive();
+ }
return KErrNone;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpx/mpxviewframeworkqt/bwins/mpxviewframeworkqt.def Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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 Wed Jun 23 17:51:16 2010 +0100
@@ -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/mpxautoresumehandler.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/playbackframework/playbackengine/inc/mpxautoresumehandler.h Wed Jun 23 17:51:16 2010 +0100
@@ -136,6 +136,11 @@
* in that case
*/
TBool IsPlaybackRemote();
+
+ /**
+ * Handle change in voice command state.
+ */
+ void DoHandleVoiceCmdChange();
private: // data
CMPXPlaybackEngine& iEngine;
@@ -148,6 +153,10 @@
// Timer for resume operation. Owned.
CPeriodic* iResumeTimer;
+
+ CMPXPSKeyWatcher* iVoiceCmdObserver; // owned
+ TBool iPausedForVoiceCmd;
+ TBool iVoiceCmdResumeOngoing;
};
#endif // CMPXAUTORESUMEHANDLER_H
--- a/mpx/playbackframework/playbackengine/inc/mpxplaybackengine.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/playbackframework/playbackengine/inc/mpxplaybackengine.h Wed Jun 23 17:51:16 2010 +0100
@@ -192,13 +192,6 @@
inline TProcessId LastActiveProcessId() const;
/**
- * Retursn last inactive process id
- *
- * @return process id of last inactive process
- */
- inline TProcessId LastInactiveProcessId() const;
-
- /**
* Initializes the player with a song in the collection
*
* @param aCollectionPath collection path
@@ -857,11 +850,16 @@
void SavePlaybackCompleteInfoL();
/**
- * Restore playback position and state if it was saved previously
+ * Restore playback position if it was saved previously
*/
- void RestorePlaybackPositionAndStateL( const CMPXMedia& aMedia );
+ void RestorePlaybackPositionL( const CMPXMedia& aMedia );
/**
+ * Restore playback state if it was saved previously
+ */
+ void RestorePlaybackStateL();
+
+ /**
* Sets the volume increment depending on accessory state
*/
void SetVolumeIncrement( TMPXPlaybackAccessoryMode aMode );
@@ -924,6 +922,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 +1018,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
@@ -1001,6 +1029,9 @@
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
RFile64 iFile64;
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+
+ TInt iPositionFromMedia;
+
};
#include "mpxplaybackengine.inl"
--- a/mpx/playbackframework/playbackengine/inc/mpxplaybackengine.inl Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/playbackframework/playbackengine/inc/mpxplaybackengine.inl Wed Jun 23 17:51:16 2010 +0100
@@ -156,15 +156,6 @@
}
// ----------------------------------------------------------------------------
-// Return last inactive process id
-// ----------------------------------------------------------------------------
-//
-inline TProcessId CMPXPlaybackEngine::LastInactiveProcessId() const
- {
- return iLastInactiveProcess;
- }
-
-// ----------------------------------------------------------------------------
// CPlaybackCallbackReflector constructor
// ----------------------------------------------------------------------------
//
--- a/mpx/playbackframework/playbackengine/inc/mpxplaybackinitializer.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/playbackframework/playbackengine/inc/mpxplaybackinitializer.h Wed Jun 23 17:51:16 2010 +0100
@@ -193,7 +193,7 @@
/**
* Initialize streaming
*/
- void InitL(const TDesC& aUri, const TDesC8& aType, TInt aAccessPoint);
+ void InitL(const TDesC& aUri, const TDesC8& aType );
private:
/**
--- a/mpx/playbackframework/playbackengine/src/mpxautoresumehandler.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/playbackframework/playbackengine/src/mpxautoresumehandler.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -29,6 +29,20 @@
// Time to wait before resume after call has ended.
const TInt KMPXResumeWaitTime = 3000000; // 3.0s
+// TODO: the following constants and definitions are copied from nssvascoreconstant.h, which is not
+// included directly because it is an App layer API. Way to fix this is to ask Speechsrv to move the header file to MW layer.
+const TUid KSINDUID = {KUidSystemCategoryValue};
+const TInt ERecognitionState=0;
+
+// Recognition state values for the P&S key ERecognitionState
+enum TRecognitionStateValues
+ {
+ ERecognitionStarted = 0,
+ ERecognitionSpeechEnd,
+ ERecognitionSuccess,
+ ERecognitionFail
+ };
+// End TODO
// ================= MEMBER FUNCTIONS =======================
@@ -60,6 +74,9 @@
// Listen to call type changes
iTypeObserver = CMPXPSKeyWatcher::NewL(KPSUidCtsyCallInformation,
KCTsyCallType,this);
+
+ iVoiceCmdObserver = CMPXPSKeyWatcher::NewL( KSINDUID, ERecognitionState, this );
+
iResumeTimer = CPeriodic::NewL(CActive::EPriorityStandard);
}
@@ -88,6 +105,7 @@
//
CMPXAutoResumeHandler::~CMPXAutoResumeHandler()
{
+ delete iVoiceCmdObserver;
delete iStateObserver;
delete iTypeObserver;
if ( iResumeTimer )
@@ -135,13 +153,15 @@
MPX_DEBUG2("CMPXAutoResumeHandler::HandlePlaybackComplete(%d) entering", aError);
iPausedForCall = EFalse;
if ( KErrDied == aError ||
- KErrAccessDenied == aError )
+ KErrAccessDenied == aError ||
+ KErrInUse == aError )
{
iKErrDiedTime.HomeTime();
TInt callType = EPSCTsyCallTypeNone;
TInt callState = EPSCTsyCallStateNone;
-
+ TInt voiceCmdState(0);
+
if (!iTypeObserver->GetValue(callType) &&
!iStateObserver->GetValue(callState))
{
@@ -155,8 +175,16 @@
iPausedForCall = ETrue;
}
}
+
+ if ( !iPausedForCall && !iVoiceCmdObserver->GetValue( voiceCmdState ) ) // key exist if voice commanding is in progress
+ {
+ // Paused due voice command activity
+ iPausedForVoiceCmd = ETrue;
+ }
}
- MPX_DEBUG1("CMPXAutoResumeHandler::HandlePlaybackComplete() exiting");
+
+ MPX_DEBUG3("CMPXAutoResumeHandler::HandlePlaybackComplete() exiting: iPausedForCall=%d, iPausedForVoiceCmd=%d",
+ iPausedForCall, iPausedForVoiceCmd);
}
// -----------------------------------------------------------------------------
@@ -175,10 +203,18 @@
// CMPXAutoResumeHandler::HandlePSEvent
// -----------------------------------------------------------------------------
//
-void CMPXAutoResumeHandler::HandlePSEvent(TUid /*aUid*/, TInt /*aKey*/)
+void CMPXAutoResumeHandler::HandlePSEvent(TUid aUid, TInt /*aKey*/)
{
MPX_FUNC("CMPXAutoResumeHandler::HandlePSEvent()");
- TRAP_IGNORE(DoHandleStateChangeL());
+
+ if ( aUid == KSINDUID )
+ {
+ DoHandleVoiceCmdChange();
+ }
+ else
+ {
+ TRAP_IGNORE(DoHandleStateChangeL());
+ }
}
// -----------------------------------------------------------------------------
@@ -246,6 +282,19 @@
iPausedForCall = ETrue;
}
}
+
+ if ( shouldPause && iVoiceCmdResumeOngoing )
+ {
+ // Resume timer has been started after a voice command, cancel it now
+ // so that playback is not resumed while calling
+ if ( iResumeTimer->IsActive() )
+ {
+ iResumeTimer->Cancel();
+ }
+ iVoiceCmdResumeOngoing = EFalse;
+ iPausedForCall = ETrue; // resume playback once call has been ended
+ }
+
MPX_DEBUG2("CMPXAutoResumeHandler::DoHandleStateChangeL(): iPausedForCall = %d", iPausedForCall);
}
@@ -317,6 +366,8 @@
{
MPX_FUNC("CMPXAutoResumeHandler::HandleResumeTimerCallback() entering");
+ iVoiceCmdResumeOngoing = EFalse;
+
CancelResumeTimer();
TRAP_IGNORE( iEngine.HandleCommandL( EPbCmdPlayWithFadeIn ));
}
@@ -374,4 +425,39 @@
iAutoResume = aAutoResume;
}
+// -----------------------------------------------------------------------------
+// CMPXAutoResumeHandler::DoHandleVoiceCmdChange
+// -----------------------------------------------------------------------------
+//
+void CMPXAutoResumeHandler::DoHandleVoiceCmdChange()
+ {
+ MPX_FUNC("CMPXAutoResumeHandler::DoHandleVoiceCmdChange()");
+
+ TInt voiceCmdState( 0 );
+ TInt err( iVoiceCmdObserver->GetValue( voiceCmdState ) );
+
+ MPX_DEBUG4("CMPXAutoResumeHandler::DoHandleVoiceCmdChange(): iPausedForVoiceCmd = %d, err=%d, state=%d",
+ iPausedForVoiceCmd, err, voiceCmdState);
+
+ if ( iPausedForVoiceCmd && !iPausedForCall )
+ {
+ if ( err == KErrNotFound ) // voice command has been finished once the P&S key is deleted
+ {
+ if ( iResumeTimer->IsActive() )
+ iResumeTimer->Cancel();
+
+ iResumeTimer->Start( KMPXResumeWaitTime, KMPXResumeWaitTime, TCallBack(ResumeTimerCallback, this) );
+
+ iPausedForVoiceCmd = EFalse;
+
+ iVoiceCmdResumeOngoing = ETrue; // flag for cancelling resume timer due to a call
+ }
+ }
+
+ if ( iPausedForCall ) // ensure that not interfering with call handling in any circumstances
+ {
+ iPausedForVoiceCmd = EFalse;
+ }
+ }
+
// End of File
--- a/mpx/playbackframework/playbackengine/src/mpxplaybackengine.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/playbackframework/playbackengine/src/mpxplaybackengine.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -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");
@@ -108,6 +109,7 @@
iState(EPbStateNotInitialised),
iNextState(EPbStateNotInitialised),
iPluginState(EPbStateNotInitialised),
+ iCategory(EMPXCategoryUndefined),
iModeId(aModeId),
iObserver(aObserver),
iPreservedState( EPbStateNotInitialised ),
@@ -115,7 +117,8 @@
iSkipping(EFalse),
iPluginUid(KNullUid),
iLastActiveProcess(KNullProcessId),
- iLastInactiveProcess(KNullProcessId)
+ iLastInactiveProcess(KNullProcessId),
+ iPositionFromMedia( KErrNotFound )
{
iProperties[EPbPropertyVolumeRamp]=KPbFadeInDurationMicroSeconds;
}
@@ -139,6 +142,7 @@
iNextState(EPbStateNotInitialised),
iPluginState(EPbStateNotInitialised),
iModeId(aModeId),
+ iCategory(aCategory),
iObserver(aObserver),
iPreservedState( EPbStateNotInitialised ),
iPreservedPosition( KErrNotFound ),
@@ -146,7 +150,7 @@
iPluginUid(KNullUid),
iLastActiveProcess(KNullProcessId),
iLastInactiveProcess(KNullProcessId),
- iCategory(aCategory)
+ iPositionFromMedia( KErrNotFound )
{
iProperties[EPbPropertyVolumeRamp]=KPbFadeInDurationMicroSeconds;
}
@@ -179,14 +183,24 @@
iMediaHelper = CMPXPlaybackMediaHelper::NewL( *this );
iDummyMediaObserver = new(ELeave) CMPXPlaybackDummyMediaObserver();
- // Select local plugin by default if none selected
- iPluginHandler->SelectPlayersL( EPbLocal );
- iInitVolume = ETrue;
+ iInitVolume = EFalse;
+
+ if (iCategory != EMPXCategoryVideo)
+ {
+ // Select local plugin by default if none selected
+ iPluginHandler->SelectPlayersL( EPbLocal );
+ iInitVolume = ETrue;
+ iPluginHandler->Plugin()->PropertyL( EPbPropertyVolume );
+ }
+
#if defined(__HIGH_RESOLUTION_VOLUME)
iVolRoundedUp = EFalse;
#endif
- iPluginHandler->Plugin()->PropertyL( EPbPropertyVolume );
- }
+
+ iSyncMsgTimer = CPeriodic::NewL( CActive::EPriorityIdle );
+ iSyncMsgWait = new (ELeave) CActiveSchedulerWait;
+ iProperties[EPbPropertyPosition] = 0;
+ }
// ----------------------------------------------------------------------------
// Destructor
@@ -232,6 +246,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;
}
// ----------------------------------------------------------------------------
@@ -295,8 +315,11 @@
TMPXPlaybackMessage::EInitializeComplete,
0,
EFalse));
-
- iPluginUid = iPluginHandler->Plugin()->Uid();
+
+ if ( iPluginHandler->PlayerFound() )
+ {
+ iPluginUid = iPluginHandler->Plugin()->Uid();
+ }
RArray<TMPXAttribute> dummy;
CleanupClosePushL( dummy );
@@ -507,12 +530,6 @@
iLastActiveProcess = aCmd.ValueTObjectL<TProcessId>(
KMPXCommandPlaybackGeneralClientPid);
}
- else if (EPbCmdStop == cmd)
- {
- ASSERT(aCmd.IsSupported(KMPXCommandPlaybackGeneralClientPid));
- iLastInactiveProcess = aCmd.ValueTObjectL<TProcessId>(
- KMPXCommandPlaybackGeneralClientPid);
- }
TInt data(0);
if (aCmd.IsSupported(KMPXCommandPlaybackGeneralData))
{
@@ -628,6 +645,7 @@
break;
case EPbPropertyMute:
MPX_DEBUG2( "CMPXPlaybackEngine::SetL EPbPropertyMute %d", aValue );
+ iProperties[EPbPropertyMute] = aValue; // set now, needed when EPSetComplete is converted to EPropertyChanged
if ( iPluginHandler->Plugin() )
{
PluginL()->SetL( aProperty, aValue );
@@ -961,7 +979,8 @@
TMPXPlaybackMessage(
TMPXPlaybackMessage::EStateChanged, iState, aError ));
if ( KErrDied == aError ||
- KErrAccessDenied == aError )
+ KErrAccessDenied == aError ||
+ KErrInUse == aError )
{
iPluginState = EPbStateNotInitialised;
// fixed
@@ -1110,14 +1129,12 @@
}
case EPMuteChanged:
{
- if ( iProperties[EPbPropertyMute] != aData )
- {
- iProperties[EPbPropertyMute] = aData;
- iClientList->SendMsgL(
- TMPXPlaybackMessage(TMPXPlaybackMessage::EPropertyChanged,
+ // property changed broadcast message after successful return from plugins
+ iProperties[EPbPropertyMute] = aData;
+ iClientList->SendMsgL(
+ TMPXPlaybackMessage(TMPXPlaybackMessage::EPropertyChanged,
EPbPropertyMute,
iProperties[EPbPropertyMute]));
- }
break;
}
case EPPositionChanged:
@@ -1454,10 +1471,23 @@
{
iProperties[EPbPropertyPosition] = 0;
}
-
- // Set position to restore saved position.
- TRAP_IGNORE( // uPnP leaves if set position in stop state
- PluginL()->SetL( EPbPropertyPosition, iProperties[EPbPropertyPosition] ));
+
+ //check whether plugin is KMPXPlaybackPluginVersion2, if not, set saved position
+ CDesCArray* interfaces = iPluginHandler->SupportedInterfacesL( iPluginUid );
+ TBool version2InterfaceSupported = EFalse;
+ if ( interfaces->MdcaCount() )
+ {
+ TInt pos(0);
+ version2InterfaceSupported = !interfaces->FindIsq( KMPXPlaybackPluginVersion2, pos );
+ }
+ delete interfaces;
+
+ if ( !version2InterfaceSupported )
+ {
+ // Set position to restore saved position.
+ TRAP_IGNORE( // uPnP leaves if set position in stop state
+ PluginL()->SetL( EPbPropertyPosition, iProperties[EPbPropertyPosition] ));
+ }
iAutoResumeHandler->HandleOpenFileComplete();
@@ -1658,14 +1688,6 @@
iCallback->HandleProperty(aProperty,aValue,aError);
iCallback = NULL;
iTaskQueue->CompleteTask();
-
- // notify client the new position during the playback
- if ((EPbPropertyPosition == aProperty) && (iProgressTimer->IsActive()))
- {
- TRAP_IGNORE(iClientList->SendMsgL(
- TMPXPlaybackMessage(TMPXPlaybackMessage::EPropertyChanged,
- EPbPropertyPosition,aValue)));
- }
}
MPX_DEBUG2("<--CMPXPlaybackEngine::HandleProperty 0x%08x", this);
}
@@ -1986,6 +2008,18 @@
SetStateL( msg );
iProperties[EPbPropertyPosition]=0;
+ if ( KErrNotFound != iPreservedPosition )
+ {
+ iProperties[EPbPropertyPosition] = iPreservedPosition;
+ iPreservedPosition = KErrNotFound;
+ }
+ else if ( KErrNotFound != iPositionFromMedia )
+ {
+ iProperties[EPbPropertyPosition] = iPositionFromMedia;
+ iPositionFromMedia = KErrNotFound;
+ }
+ MPX_DEBUG2("CMPXPlaybackEngine::InitL iPropertyPosition %d", iProperties[EPbPropertyPosition] );
+
// make sure our interface is supported
CDesCArray* interfaces = iPluginHandler->SupportedInterfacesL( p->Uid() );
TBool version2InterfaceSupported = EFalse;
@@ -2009,22 +2043,22 @@
{
if (aSong && aType)
{
- plugin->InitStreamingL( *aSong, *aType, aAccessPoint );
+ plugin->InitStreamingL( *aSong, *aType, aAccessPoint, iProperties[EPbPropertyPosition] );
}
else if (aFile)
{
- plugin->InitStreamingL( *aFile, aAccessPoint );
+ plugin->InitStreamingL( *aFile, aAccessPoint, iProperties[EPbPropertyPosition] );
}
}
else
{
if (aSong && aType)
{
- plugin->InitialiseL( *aSong );
+ plugin->InitialiseWithPositionL( *aSong, iProperties[EPbPropertyPosition] );
}
else if (aFile)
{
- plugin->InitialiseL( *aFile );
+ plugin->InitialiseWithPositionL( *aFile, iProperties[EPbPropertyPosition] );
}
}
}
@@ -2175,6 +2209,11 @@
iAutoResumeHandler->SetAutoResume( aData );
break;
}
+ case EPbCmdSyncMsgComplete:
+ {
+ StopWaitLoop();
+ break;
+ }
default:
ASSERT(0);
}
@@ -2242,6 +2281,7 @@
}
else
{
+ RestorePlaybackPositionL( aMedia );
TRAP( aError, InitL( iUri, mimeType, NULL, iAccessPoint) );
/*
// 20 steps fix
@@ -2270,7 +2310,7 @@
*/
if ( KErrNone == aError )
{
- RestorePlaybackPositionAndStateL( aMedia );
+ RestorePlaybackStateL();
}
else
{
@@ -2590,7 +2630,7 @@
MPX_DEBUG1("==>CMPXPlaybackEngine::DoStopL()");
Suspend();
if (iState == EPbStatePaused || iState == EPbStatePlaying ||
- iState == EPbStateInitialising)
+ iState == EPbStateInitialising || iState == EPbStateBuffering)
{
if (aSavePlaybackInfo && (iState == EPbStatePaused || iState == EPbStatePlaying ))
{
@@ -3454,36 +3494,37 @@
// Restore playback position if it was saved previously
// ----------------------------------------------------------------------------
//
-void CMPXPlaybackEngine::RestorePlaybackPositionAndStateL(
+void CMPXPlaybackEngine::RestorePlaybackPositionL(
const CMPXMedia& aMedia )
{
- MPX_DEBUG1("CMPXPlaybackEngine::RestorePlaybackPositionAndStateL() entering");
+ MPX_FUNC("CMPXPlaybackEngine::RestorePlaybackPositionL() ");
// Restore Position
iProperties[EPbPropertyPosition] = 0;
- if ( KErrNotFound != iPreservedPosition )
- {
- iProperties[EPbPropertyPosition] = iPreservedPosition;
- iPreservedPosition = KErrNotFound;
- }
- else
- {
+
// Check media
if (aMedia.IsSupported(KMPXMediaGeneralLastPlaybackPosition))
{
- iProperties[EPbPropertyPosition] =
- aMedia.ValueTObjectL<TInt>( KMPXMediaGeneralLastPlaybackPosition );
+ iPositionFromMedia =
+ aMedia.ValueTObjectL<TInt>( KMPXMediaGeneralLastPlaybackPosition );
}
- }
+ MPX_DEBUG2("CMPXPlaybackEngine::RestorePlaybackPositionL iPositionFromMedia %d", iPositionFromMedia );
+ }
+
+// ----------------------------------------------------------------------------
+// Restore playback state if it was saved previously
+// ----------------------------------------------------------------------------
+//
+void CMPXPlaybackEngine::RestorePlaybackStateL()
+ {
+ MPX_FUNC("CMPXPlaybackEngine::RestorePlaybackStateL() ");
// Restore State
if ( EPbStateNotInitialised != iPreservedState )
{
iNextState = iPreservedState;
iPreservedState = EPbStateNotInitialised;
- }
-
- MPX_DEBUG1("CMPXPlaybackEngine::RestorePlaybackPositionAndStateL() exiting");
+ }
}
// ----------------------------------------------------------------------------
@@ -3818,6 +3859,18 @@
SetStateL( msg );
iProperties[EPbPropertyPosition]=0;
+ if ( KErrNotFound != iPreservedPosition )
+ {
+ iProperties[EPbPropertyPosition] = iPreservedPosition;
+ iPreservedPosition = KErrNotFound;
+ }
+ else if ( KErrNotFound != iPositionFromMedia )
+ {
+ iProperties[EPbPropertyPosition] = iPositionFromMedia;
+ iPositionFromMedia = KErrNotFound;
+ }
+ MPX_DEBUG2("CMPXPlaybackEngine::InitL iPropertyPosition %d", iProperties[EPbPropertyPosition] );
+
// Check if version2 interface is supported.
CDesCArray* interfaces = iPluginHandler->SupportedInterfacesL( p->Uid() );
TBool version2InterfaceSupported = EFalse;
@@ -3839,11 +3892,11 @@
{
if ( iAccessPointSet )
{
- plugin->InitStreaming64L( *aFile, aAccessPoint );
+ plugin->InitStreaming64L( *aFile, aAccessPoint, iProperties[EPbPropertyPosition] );
}
else
{
- plugin->Initialise64L( *aFile );
+ plugin->Initialise64L( *aFile, iProperties[EPbPropertyPosition] );
}
}
else
@@ -3859,4 +3912,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/playbackengine/src/mpxplaybackinitializer.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/playbackframework/playbackengine/src/mpxplaybackinitializer.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -424,7 +424,8 @@
{
if ( iMedia )
{
- iEngine.RestorePlaybackPositionAndStateL( *iMedia );
+ iEngine.RestorePlaybackPositionL( *iMedia );
+ iEngine.RestorePlaybackStateL();
}
//
// Set plug-in handler
@@ -620,13 +621,8 @@
{
iHandler->SelectPlayersL(t);
}
- }
- TInt accessPoint = 0;
- if ( aMedia.IsSupported(KMPXMediaGeneralExtAccessPoint) )
- {
- accessPoint = aMedia.ValueTObjectL<TInt>( KMPXMediaGeneralExtAccessPoint );
- MPX_DEBUG2("CMPXPlaybackInitializer::InitL accessPoint %d", accessPoint );
- }
+ }
+
HBufC8* mimeType =
MPXUser::Alloc8L(aMedia.ValueText(KMPXMediaGeneralMimeType));
CleanupStack::PushL(mimeType);
@@ -635,7 +631,7 @@
// Plugin handler guarantee to choose a plugin
// In case there is file open in the audio controller
iHandler->Plugin()->CommandL(EPbCmdClose);
- InitL(uri, *mimeType, accessPoint);
+ InitL(uri, *mimeType);
CleanupStack::PopAndDestroy(mimeType);
}
else // No URI
@@ -840,7 +836,7 @@
// Initialize.
// ----------------------------------------------------------------------------
//
-void CMPXPlaybackInitializer::InitL(const TDesC& aUri, const TDesC8& aType, TInt aAccessPoint)
+void CMPXPlaybackInitializer::InitL(const TDesC& aUri, const TDesC8& aType )
{
MPX_FUNC("CMPXPlaybackInitializer::InitL");
CMPXPlaybackPlugin* p = iHandler->Plugin();
@@ -868,14 +864,29 @@
// if cast was successful, then init streaming with access point
if (plugin)
- {
- if ( aAccessPoint )
+ {
+ TInt accessPoint = 0;
+ if ( iMedia->IsSupported(KMPXMediaGeneralExtAccessPoint) )
{
- plugin->InitStreamingL( aUri, aType, aAccessPoint );
+ accessPoint = iMedia->ValueTObjectL<TInt>( KMPXMediaGeneralExtAccessPoint );
+ MPX_DEBUG2("CMPXPlaybackInitializer::InitL accessPoint %d", accessPoint );
+ }
+
+ TInt position = 0;
+ if (iMedia->IsSupported(KMPXMediaGeneralLastPlaybackPosition))
+ {
+ position = iMedia->ValueTObjectL<TInt>( KMPXMediaGeneralLastPlaybackPosition );
+ MPX_DEBUG2("CMPXPlaybackInitializer::InitL position %d", position );
+ }
+
+
+ if ( accessPoint )
+ {
+ plugin->InitStreamingL( aUri, aType, accessPoint, position );
}
else
{
- plugin->InitialiseL(aUri);
+ plugin->InitialiseWithPositionL(aUri, position);
}
}
else
--- a/mpx/playbackframework/playbackserver/inc/mpxplaybackserver.h Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/playbackframework/playbackserver/inc/mpxplaybackserver.h Wed Jun 23 17:51:16 2010 +0100
@@ -151,6 +151,15 @@
*/
void ConstructL();
+ /**
+ * Process id finder.
+ *
+ * @param aEngine pointer to active engine
+ * @param aProcessId process id of owning process
+ */
+ void FindProcessIdForTsp(const CMPXPlaybackEngine* aEngine,
+ TProcessId& aProcessId );
+
private: // from base class
/**
* From MMPXPlaybackActiveEngineObserver
--- a/mpx/playbackframework/playbackserver/src/mpxplaybackserver.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/playbackframework/playbackserver/src/mpxplaybackserver.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -72,8 +72,8 @@
CleanupStack::PushL(server);
RProcess::Rendezvous(KErrNone);
CActiveScheduler::Start();
+ CleanupStack::PopAndDestroy(server);
CActiveScheduler::Install(NULL);
- CleanupStack::PopAndDestroy(server);
CleanupStack::PopAndDestroy(scheduler);
}
@@ -129,6 +129,42 @@
}
// ----------------------------------------------------------------------------
+// Searches process id for target selector plugin.
+// When the player has been opened in a mode, which is bound to the same engine
+// than certain application's engine, then need to fetch its process id.
+// (As a reference for parameter aMode see MMPXPlaybackUtility modes.)
+// Otherwise target selector plugin is notified wrongly about client statuses
+// and key events are not propagated to correct application.
+// ----------------------------------------------------------------------------
+//
+void CMPXPlaybackServer::FindProcessIdForTsp(
+ const CMPXPlaybackEngine* aEngine,
+ TProcessId& aProcessId )
+ {
+ TBool processFound( EFalse );
+ TFindProcess processFinder;
+ TFullName processName;
+
+ while ( processFinder.Next( processName ) == KErrNone && !processFound )
+ {
+ RProcess process;
+ TInt err = process.Open( processFinder );
+ if( err == KErrNone )
+ {
+ if( process.SecureId().iId == aEngine->ModeId().iUid &&
+ process.ExitType() == EExitPending )
+ {
+ MPX_DEBUG4("CMPXPlaybackServer::FindProcessIdForTsp(): pid changed from %d to %d (mode 0x%x)",
+ TUint(aProcessId), TUint(process.Id()), aEngine->ModeId().iUid);
+ aProcessId = process.Id();
+ processFound = ETrue;
+ }
+ process.Close();
+ }
+ }
+ }
+
+// ----------------------------------------------------------------------------
// Increments number of sessions this server holds
// ----------------------------------------------------------------------------
//
@@ -160,8 +196,16 @@
if (cl->ClientCount()==0)
{
MPX_DEBUG1("CMPXPlaybackServer::RemoveClient delete a player");
+ CMPXPlaybackEngine* enginePtr = p;
delete p;
- iPlayers.Remove(i);
+ //Due to callbacks in PlaybackServer we have to remove engine from the iPlayers array after deleting.
+ //enginePtr is a invalid pointer as p is already deleted
+ //Find the index of deleted engine using its address
+ TInt engineIndex = iPlayers.Find(enginePtr);
+ if ( engineIndex != KErrNotFound )
+ {
+ iPlayers.Remove(engineIndex);
+ }
}
break;
}
@@ -386,12 +430,13 @@
if (!aActive)
{
#ifdef RD_TSP_CLIENT_MAPPER
+ TProcessId lastPid( aEngine->LastActiveProcessId() );
+ FindProcessIdForTsp( aEngine, lastPid );
iClientMapper->SetTspTargetClientToOtherType(
CTspClientMapper::EStoppedClients,
- aEngine->LastActiveProcessId());
- MPX_DEBUG2("CMPXPlaybackServer::HandleActiveEngineL(): Adding to stopped client %d",
- TUint( aEngine->LastActiveProcessId()));
-
+ lastPid);
+ MPX_DEBUG2("CMPXPlaybackServer::HandleActiveEngineL(): Added as stopped client %d",
+ TUint( lastPid));
#endif
if (EPbStatePaused != aEngine->State())
{
@@ -406,11 +451,20 @@
else
{// else aEngine is active player
#ifdef RD_TSP_CLIENT_MAPPER
- iClientMapper->SetTspTargetClientToOtherType(
- CTspClientMapper::EPlayingClients,
- aEngine->LastActiveProcessId());
- MPX_DEBUG2("CMPXPlaybackServer::HandleActiveEngineL(): Adding to playing client %d",
- TUint( aEngine->LastActiveProcessId()));
+ TProcessId lastPid( aEngine->LastActiveProcessId() );
+ FindProcessIdForTsp( aEngine, lastPid );
+ TInt err = iClientMapper->SetTspTargetClientToOtherType(
+ CTspClientMapper::EPlayingClients, lastPid );
+ if ( err != KErrNone && (TUint)lastPid != KNullProcessId )
+ {
+ // Setting target type failed probably because client PID could not be found.
+ // As a fallback set client as new playing client.
+ MPX_DEBUG2("CMPXPlaybackServer::HandleActiveEngineL(): Adding to playing client %d",
+ (TUint)lastPid );
+ iClientMapper->SetTspTargetClient( CTspClientMapper::EPlayingClients, lastPid );
+ }
+ MPX_DEBUG2("CMPXPlaybackServer::HandleActiveEngineL(): Added as playing client %d",
+ (TUint)lastPid );
#endif
}
@@ -466,9 +520,9 @@
if (MMPXClientlistObserver::EAdd == aChangeType)
{
iClientMapper->SetTspTargetClient(
- CTspClientMapper::EPlayingClients,
+ CTspClientMapper::ERegisteredClients,
aPid);
- MPX_DEBUG2("CMPXPlaybackServer::HandleClientChange(): Adding to registered client %d",
+ MPX_DEBUG2("CMPXPlaybackServer::HandleClientChange(): Added as registered client %d",
TUint( aPid ));
}
else
@@ -476,7 +530,7 @@
iClientMapper->RemoveTspTargetClient(
CTspClientMapper::EPlayingClients,
aPid);
- MPX_DEBUG2("CMPXPlaybackServer::HandleClientChange(): Adding to EPlayingClients client %d",
+ MPX_DEBUG2("CMPXPlaybackServer::HandleClientChange(): Removed from EPlayingClients client %d",
TUint( aPid ));
}
#else
--- a/mpx/playbackframework/playbackserver/src/mpxplaybackserversession.cpp Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/playbackframework/playbackserver/src/mpxplaybackserversession.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -475,10 +475,6 @@
CMPXCommand* cmd( NULL );
::NewFromMessageL<CMPXMedia>(aMessage, 1, cmd);
CleanupStack::PushL(cmd);
- if (aMessage.Int0())
- { // aSync command
- SetAsync(aMessage);
- } // else sync command
iPlayer->CommandL(*cmd, *iMessageQueue);
CleanupStack::PopAndDestroy(cmd);
break;
@@ -515,6 +511,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 Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/playbackframework/playbackutility/inc/mpxplaybackutilityimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -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 Fri Feb 19 16:32:39 2010 +0000
+++ b/mpx/playbackframework/playbackutility/src/mpxplaybackutilityimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -386,6 +386,7 @@
TPtr8 ptr = buf->Ptr(0);
if (asyncVar)
{ // async request
+ MPX_DEBUG1("CMPXPlaybackUtility::CommandL asynchronous command");
ASSERT(aCallback); // callback must be provided for asynchronous command
// Increase reference count on command ownership transferred
CMPXCommand* ref = CMPXCommand::NewL(aCmd);
@@ -1337,4 +1338,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
--- a/package_definition.xml Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<SystemDefinition schema="3.0.0">
- <package id="mmappfw" name="Multimedia App Framework" levels="fw utils if">
- <collection id="mmappcomponents" name="Multimedia App Components" level="utils">
- <component id="collectionhelper" filter="s60" name="Media Player Collection Helper" introduced="^1">
- <unit bldFile="mmappcomponents/collectionhelper/group"/>
- </component>
- <component id="playlistengine" filter="s60" name="Playlist Engine" introduced="^1">
- <unit bldFile="mmappcomponents/playlistengine/group"/>
- </component>
- <component id="mpxharvester" filter="s60" name="Media Player Harvester" introduced="^1">
- <unit bldFile="mmappcomponents/harvester/group"/>
- </component>
- <component id="mmappcommonui" filter="s60" name="Multimedia App Common UI" introduced="^1">
- <unit bldFile="mmappcomponents/mmappcommonui/group"/>
- </component>
- <component id="mediaplayersettingsengine" filter="s60" name="Media Player Settings Engine" introduced="^1">
- <unit bldFile="mmappcomponents/mediaplayersettingsengine/group"/>
- </component>
- <component id="audiofetcher" filter="s60" name="Audio Fetcher" class="plugin" introduced="^1">
- <unit bldFile="mmappcomponents/audiofetcher/group"/>
- </component>
- <component id="asxparser" filter="s60" name="ASX Parser" introduced="^1">
- <unit bldFile="mmappcomponents/asxparser/group"/>
- <!-- does the test bld.inf need to be #included? -->
- <!-- <unit bldFile="mmappcomponents/asxparser/test"/> -->
- </component>
- </collection>
- <collection id="mpx" name="Multimedia Player" level="fw">
- <component id="commonframework" filter="s60" name="MPX Common Framework" introduced="^1">
- <unit bldFile="mpx/commonframework/group"/>
- </component>
- <component id="playbackframework" filter="s60" name="MPX Playback Framework" introduced="^1">
- <unit bldFile="mpx/playbackframework/group"/>
- </component>
- <component id="mpxcollectionfw" filter="s60" name="MPX Collection Framework" introduced="^1">
- <unit bldFile="mpx/collectionframework/group"/>
- </component>
- <component id="mpxviewfw" filter="s60" name="MPX View Framework" introduced="^1">
- <unit bldFile="mpx/viewframework/group"/>
- </component>
- <component id="mpx_build" filter="s60" name="MPX Build" introduced="^1">
- <!-- can the exports from here be distribtued to the above bld.infs? -->
- <unit bldFile="mpx/group"/>
- </component>
- </collection>
- <collection id="mmappfw_info" name="Multimedia App Framework Info" level="if">
- <component id="mmappfw_build" filter="s60" name="Multimedia App Framework Build" introduced="^1">
- <!-- does the export from ehre really belong in one of the other components? -->
- <unit bldFile="group"/>
- </component>
- <component id="mmappfw_test" filter="s60" name="Multimedia App Framework Test" purpose="development" introduced="^1">
- <!-- should this component exist? -->
- <!-- <unit bldFile="tsrc/group"/> -->
- </component>
- <component id="mmappfw_plat" filter="s60" name="Multimedia App Framework Platform Interfaces" class="api" introduced="^1">
- <!-- there can only be a single unit, these should be #included from a main bld.inf -->
- <unit bldFile="mmappfw_plat/group"/>
- <unit bldFile="mmappfw_plat/asx_parser_api/tsrc/group"/>
- <unit bldFile="mmappfw_plat/collection_helper_api/tsrc/group"/>
- <unit bldFile="mmappfw_plat/harvester_collection_mediator_api/tsrc/group"/>
- <unit bldFile="mmappfw_plat/harvester_metadata_extractor_api/tsrc/group"/>
- <unit bldFile="mmappfw_plat/harvester_utility_api/tsrc/group"/>
- <unit bldFile="mmappfw_plat/media_player_settings_engine_api/tsrc/group"/>
- <unit bldFile="mmappfw_plat/mpx_albumart_utility_api/tsrc/group"/>
- <unit bldFile="mmappfw_plat/mpx_base_view_plugins_api/tsrc/group"/>
- <unit bldFile="mmappfw_plat/mpx_collection_utility_api/tsrc/group"/>
- <unit bldFile="mmappfw_plat/mpx_common_api/tsrc/group"/>
- <unit bldFile="mmappfw_plat/mpx_playback_utility_api/tsrc/group"/>
- <unit bldFile="mmappfw_plat/mpx_view_utility_api/tsrc/group"/>
- <unit bldFile="mmappfw_plat/playlist_engine_api/tsrc/group"/>
- </component>
- </collection>
- </package>
-</SystemDefinition>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/SIS/QTMS_udeb_STUB_SIS.bat Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,64 @@
+rem
+rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description: Create QTMS UDEB SIS package
+rem
+
+@echo off
+echo ----------------------------
+echo Configuring for RnD SIS
+echo ----------------------------
+echo Start of configure time:
+time /t
+
+:CREATE_DIR
+echo.
+echo - create Sis folder (created only if needed)
+mkdir .\SIS
+
+:COPY_DLL
+echo.
+echo - Copy dlls [udeb]:
+copy %EPOCROOT%epoc32\release\armv5\udeb\qtmsapi.dll .
+
+if errorlevel == 1 goto END_ERROR
+
+:CALL_ELFTRAIN
+echo - Updating Version No [10.1] (calling elftran)
+call elftran.exe -version 10.1 qtmsapi.dll
+
+:MAKESIS
+makesis ..\SIS\qtms.pkg ..\SIS\qtms.sis
+signsis ..\SIS\qtms.sis ..\SIS\qtms.sisx rd.crt rd.key
+if errorlevel == 1 goto END_ERROR
+
+:DELETE_DLL
+echo.
+echo - remove the copied dlls from current folder
+del qtmsapi.dll
+
+goto END
+
+:END_ERROR
+echo.
+echo Sis creation failed.
+goto FINAL_END
+
+:END
+echo.
+echo Sis file created succesfully
+echo ============================
+
+:FINAL_END
+echo End of configure time is:
+time /t
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/SIS/qtms.pkg Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,35 @@
+;
+; Copyright (c) 2010 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: Telephony Multimedia Services (TMS) - UDEB build
+;
+;File: tms.pkg
+
+;Languages
+&EN
+
+;Header
+#{"QTMS"},(0x10207CB2),1,0,0, TYPE=SA, RU
+
+;Series 60 v5.0
+[0x101F7961], 0,0,0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique Vendor name
+:"Nokia"
+
+;Files To Copy...<src> <destination>
+"/epoc32/release/armv5/udeb/qtmsapi.dll"-"!:/sys/bin/qtmsapi.dll"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/bwins/qtmsu.def Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,388 @@
+EXPORTS
+ ?qt_metacast@QTMSSpeakerSink@QTMS@@UAEPAXPBD@Z @ 1 NONAME ; void * QTMS::QTMSSpeakerSink::qt_metacast(char const *)
+ ?getStaticMetaObject@QTMSGainEffect@QTMS@@SAABUQMetaObject@@XZ @ 2 NONAME ; struct QMetaObject const & QTMS::QTMSGainEffect::getStaticMetaObject(void)
+ ??0QTMSStream@QTMS@@IAE@XZ @ 3 NONAME ; QTMS::QTMSStream::QTMSStream(void)
+ ??0QTMSAMRFormat@QTMS@@IAE@XZ @ 4 NONAME ; QTMS::QTMSAMRFormat::QTMSAMRFormat(void)
+ ?tr@QTMSG729Format@QTMS@@SA?AVQString@@PBD0H@Z @ 5 NONAME ; class QString QTMS::QTMSG729Format::tr(char const *, char const *, int)
+ ?tr@QTMSModemSource@QTMS@@SA?AVQString@@PBD0@Z @ 6 NONAME ; class QString QTMS::QTMSModemSource::tr(char const *, char const *)
+ ?CreateRingTonePlayer@QTMSFactory@QTMS@@QAEHAAPAVQTMSRingTone@2@@Z @ 7 NONAME ; int QTMS::QTMSFactory::CreateRingTonePlayer(class QTMS::QTMSRingTone * &)
+ ?qt_metacall@QTMSClientSource@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 8 NONAME ; int QTMS::QTMSClientSource::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?trUtf8@QTMSVolumeEffect@QTMS@@SA?AVQString@@PBD0H@Z @ 9 NONAME ; class QString QTMS::QTMSVolumeEffect::trUtf8(char const *, char const *, int)
+ ?trUtf8@QTMSG711Format@QTMS@@SA?AVQString@@PBD0H@Z @ 10 NONAME ; class QString QTMS::QTMSG711Format::trUtf8(char const *, char const *, int)
+ ?Start@QTMSStream@QTMS@@QAEHXZ @ 11 NONAME ; int QTMS::QTMSStream::Start(void)
+ ??_EQTMSGlobalRouting@QTMS@@UAE@I@Z @ 12 NONAME ; QTMS::QTMSGlobalRouting::~QTMSGlobalRouting(unsigned int)
+ ?metaObject@QTMSGlobalRouting@QTMS@@UBEPBUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const * QTMS::QTMSGlobalRouting::metaObject(void) const
+ ?SetPlc@QTMSG711Format@QTMS@@QAEHH@Z @ 14 NONAME ; int QTMS::QTMSG711Format::SetPlc(int)
+ ?BufferProcessed@QTMSClientSource@QTMS@@IAEXPBVTMSBuffer@TMS@@H@Z @ 15 NONAME ; void QTMS::QTMSClientSource::BufferProcessed(class TMS::TMSBuffer const *, int)
+ ?AddSink@QTMSStream@QTMS@@QAEHPAVQTMSSink@2@@Z @ 16 NONAME ; int QTMS::QTMSStream::AddSink(class QTMS::QTMSSink *)
+ ?tr@QTMSPCMFormat@QTMS@@SA?AVQString@@PBD0H@Z @ 17 NONAME ; class QString QTMS::QTMSPCMFormat::tr(char const *, char const *, int)
+ ??_EQTMSG729Format@QTMS@@UAE@I@Z @ 18 NONAME ; QTMS::QTMSG729Format::~QTMSG729Format(unsigned int)
+ ?Deinit@QTMSRingTone@QTMS@@QAEHXZ @ 19 NONAME ; int QTMS::QTMSRingTone::Deinit(void)
+ ?qt_metacast@QTMSClientSink@QTMS@@UAEPAXPBD@Z @ 20 NONAME ; void * QTMS::QTMSClientSink::qt_metacast(char const *)
+ ?tr@QTMSG729Format@QTMS@@SA?AVQString@@PBD0@Z @ 21 NONAME ; class QString QTMS::QTMSG729Format::tr(char const *, char const *)
+ ??_EQTMSSpeakerSink@QTMS@@UAE@I@Z @ 22 NONAME ; QTMS::QTMSSpeakerSink::~QTMSSpeakerSink(unsigned int)
+ ?getStaticMetaObject@QTMSInbandTone@QTMS@@SAABUQMetaObject@@XZ @ 23 NONAME ; struct QMetaObject const & QTMS::QTMSInbandTone::getStaticMetaObject(void)
+ ??0QTMSGainEffect@QTMS@@IAE@XZ @ 24 NONAME ; QTMS::QTMSGainEffect::QTMSGainEffect(void)
+ ?tr@QTMSRingTone@QTMS@@SA?AVQString@@PBD0@Z @ 25 NONAME ; class QString QTMS::QTMSRingTone::tr(char const *, char const *)
+ ?tr@QTMSClientSink@QTMS@@SA?AVQString@@PBD0H@Z @ 26 NONAME ; class QString QTMS::QTMSClientSink::tr(char const *, char const *, int)
+ ?GetType@QTMSGlobalGainEffect@QTMS@@UAEHAAH@Z @ 27 NONAME ; int QTMS::QTMSGlobalGainEffect::GetType(int &)
+ ??1QTMSInbandTone@QTMS@@UAE@XZ @ 28 NONAME ; QTMS::QTMSInbandTone::~QTMSInbandTone(void)
+ ?trUtf8@QTMSInbandTone@QTMS@@SA?AVQString@@PBD0H@Z @ 29 NONAME ; class QString QTMS::QTMSInbandTone::trUtf8(char const *, char const *, int)
+ ?GetType@QTMSModemSink@QTMS@@UAEHAAH@Z @ 30 NONAME ; int QTMS::QTMSModemSink::GetType(int &)
+ ?trUtf8@QTMSSpeakerSink@QTMS@@SA?AVQString@@PBD0H@Z @ 31 NONAME ; class QString QTMS::QTMSSpeakerSink::trUtf8(char const *, char const *, int)
+ ?Stop@QTMSDTMF@QTMS@@QAEHXZ @ 32 NONAME ; int QTMS::QTMSDTMF::Stop(void)
+ ?DeleteRingTonePlayer@QTMSFactory@QTMS@@QAEHAAPAVQTMSRingTone@2@@Z @ 33 NONAME ; int QTMS::QTMSFactory::DeleteRingTonePlayer(class QTMS::QTMSRingTone * &)
+ ?tr@QTMSVolumeEffect@QTMS@@SA?AVQString@@PBD0H@Z @ 34 NONAME ; class QString QTMS::QTMSVolumeEffect::tr(char const *, char const *, int)
+ ?AddSource@QTMSStream@QTMS@@QAEHPAVQTMSSource@2@@Z @ 35 NONAME ; int QTMS::QTMSStream::AddSource(class QTMS::QTMSSource *)
+ ??1QTMSGlobalVolEffect@QTMS@@UAE@XZ @ 36 NONAME ; QTMS::QTMSGlobalVolEffect::~QTMSGlobalVolEffect(void)
+ ?GetType@QTMSSpeakerSink@QTMS@@UAEHAAH@Z @ 37 NONAME ; int QTMS::QTMSSpeakerSink::GetType(int &)
+ ?getStaticMetaObject@QTMSGlobalVolEffect@QTMS@@SAABUQMetaObject@@XZ @ 38 NONAME ; struct QMetaObject const & QTMS::QTMSGlobalVolEffect::getStaticMetaObject(void)
+ ??0QTMSModemSource@QTMS@@IAE@XZ @ 39 NONAME ; QTMS::QTMSModemSource::QTMSModemSource(void)
+ ?trUtf8@QTMSMicSource@QTMS@@SA?AVQString@@PBD0@Z @ 40 NONAME ; class QString QTMS::QTMSMicSource::trUtf8(char const *, char const *)
+ ?Pause@QTMSRingTone@QTMS@@QAEHXZ @ 41 NONAME ; int QTMS::QTMSRingTone::Pause(void)
+ ?GetVADMode@QTMSILBCFormat@QTMS@@QAEHAAH@Z @ 42 NONAME ; int QTMS::QTMSILBCFormat::GetVADMode(int &)
+ ?qt_metacast@QTMSDTMF@QTMS@@UAEPAXPBD@Z @ 43 NONAME ; void * QTMS::QTMSDTMF::qt_metacast(char const *)
+ ?RingtoneEvent@QTMSRingTone@QTMS@@IAEXABV12@UQTMSSignalEvent@2@@Z @ 44 NONAME ; void QTMS::QTMSRingTone::RingtoneEvent(class QTMS::QTMSRingTone const &, struct QTMS::QTMSSignalEvent)
+ ??_EQTMSCall@QTMS@@UAE@I@Z @ 45 NONAME ; QTMS::QTMSCall::~QTMSCall(unsigned int)
+ ?trUtf8@QTMSILBCFormat@QTMS@@SA?AVQString@@PBD0@Z @ 46 NONAME ; class QString QTMS::QTMSILBCFormat::trUtf8(char const *, char const *)
+ ?staticMetaObject@QTMSRingTone@QTMS@@2UQMetaObject@@B @ 47 NONAME ; struct QMetaObject const QTMS::QTMSRingTone::staticMetaObject
+ ?SetMode@QTMSILBCFormat@QTMS@@QAEHH@Z @ 48 NONAME ; int QTMS::QTMSILBCFormat::SetMode(int)
+ ?trUtf8@QTMSModemSink@QTMS@@SA?AVQString@@PBD0H@Z @ 49 NONAME ; class QString QTMS::QTMSModemSink::trUtf8(char const *, char const *, int)
+ ?GetVADMode@QTMSG711Format@QTMS@@QAEHAAH@Z @ 50 NONAME ; int QTMS::QTMSG711Format::GetVADMode(int &)
+ ?staticMetaObject@QTMSDTMF@QTMS@@2UQMetaObject@@B @ 51 NONAME ; struct QMetaObject const QTMS::QTMSDTMF::staticMetaObject
+ ??0QTMSMicSource@QTMS@@IAE@XZ @ 52 NONAME ; QTMS::QTMSMicSource::QTMSMicSource(void)
+ ?GetPreviousOutput@QTMSGlobalRouting@QTMS@@QAEHAAH@Z @ 53 NONAME ; int QTMS::QTMSGlobalRouting::GetPreviousOutput(int &)
+ ??1QTMSGainEffect@QTMS@@UAE@XZ @ 54 NONAME ; QTMS::QTMSGainEffect::~QTMSGainEffect(void)
+ ?trUtf8@QTMSClientSink@QTMS@@SA?AVQString@@PBD0@Z @ 55 NONAME ; class QString QTMS::QTMSClientSink::trUtf8(char const *, char const *)
+ ?EffectsEvent@QTMSGainEffect@QTMS@@IAEXABVQTMSEffect@2@UQTMSSignalEvent@2@@Z @ 56 NONAME ; void QTMS::QTMSGainEffect::EffectsEvent(class QTMS::QTMSEffect const &, struct QTMS::QTMSSignalEvent)
+ ?qt_metacast@QTMSILBCFormat@QTMS@@UAEPAXPBD@Z @ 57 NONAME ; void * QTMS::QTMSILBCFormat::qt_metacast(char const *)
+ ?TMSStreamEvent@QTMSStream@QTMS@@IAEXABV12@UQTMSSignalEvent@2@@Z @ 58 NONAME ; void QTMS::QTMSStream::TMSStreamEvent(class QTMS::QTMSStream const &, struct QTMS::QTMSSignalEvent)
+ ?trUtf8@QTMSRingTone@QTMS@@SA?AVQString@@PBD0@Z @ 59 NONAME ; class QString QTMS::QTMSRingTone::trUtf8(char const *, char const *)
+ ??1QTMSModemSink@QTMS@@UAE@XZ @ 60 NONAME ; QTMS::QTMSModemSink::~QTMSModemSink(void)
+ ?metaObject@QTMSVolumeEffect@QTMS@@UBEPBUQMetaObject@@XZ @ 61 NONAME ; struct QMetaObject const * QTMS::QTMSVolumeEffect::metaObject(void) const
+ ??_EQTMSClientSink@QTMS@@UAE@I@Z @ 62 NONAME ; QTMS::QTMSClientSink::~QTMSClientSink(unsigned int)
+ ?qt_metacast@QTMSModemSink@QTMS@@UAEPAXPBD@Z @ 63 NONAME ; void * QTMS::QTMSModemSink::qt_metacast(char const *)
+ ??1QTMSClientSource@QTMS@@UAE@XZ @ 64 NONAME ; QTMS::QTMSClientSource::~QTMSClientSource(void)
+ ?qt_metacall@QTMSGainEffect@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 65 NONAME ; int QTMS::QTMSGainEffect::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?CreateSource@QTMSFactory@QTMS@@QAEHHAAPAVQTMSSource@2@@Z @ 66 NONAME ; int QTMS::QTMSFactory::CreateSource(int, class QTMS::QTMSSource * &)
+ ?trUtf8@QTMSFactory@QTMS@@SA?AVQString@@PBD0@Z @ 67 NONAME ; class QString QTMS::QTMSFactory::trUtf8(char const *, char const *)
+ ?qt_metacall@QTMSGlobalVolEffect@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 68 NONAME ; int QTMS::QTMSGlobalVolEffect::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?GetLevel@QTMSGlobalGainEffect@QTMS@@QAEHAAI@Z @ 69 NONAME ; int QTMS::QTMSGlobalGainEffect::GetLevel(unsigned int &)
+ ?trUtf8@QTMSGlobalVolEffect@QTMS@@SA?AVQString@@PBD0H@Z @ 70 NONAME ; class QString QTMS::QTMSGlobalVolEffect::trUtf8(char const *, char const *, int)
+ ?trUtf8@QTMSCall@QTMS@@SA?AVQString@@PBD0@Z @ 71 NONAME ; class QString QTMS::QTMSCall::trUtf8(char const *, char const *)
+ ?GetMaxLevel@QTMSGlobalGainEffect@QTMS@@QAEHAAI@Z @ 72 NONAME ; int QTMS::QTMSGlobalGainEffect::GetMaxLevel(unsigned int &)
+ ?RemoveSource@QTMSStream@QTMS@@QAEHPAVQTMSSource@2@@Z @ 73 NONAME ; int QTMS::QTMSStream::RemoveSource(class QTMS::QTMSSource *)
+ ?DTMFEvent@QTMSDTMF@QTMS@@IAEXABV12@UQTMSSignalEvent@2@@Z @ 74 NONAME ; void QTMS::QTMSDTMF::DTMFEvent(class QTMS::QTMSDTMF const &, struct QTMS::QTMSSignalEvent)
+ ?GetCNG@QTMSILBCFormat@QTMS@@QAEHAAH@Z @ 75 NONAME ; int QTMS::QTMSILBCFormat::GetCNG(int &)
+ ?qt_metacast@QTMSG729Format@QTMS@@UAEPAXPBD@Z @ 76 NONAME ; void * QTMS::QTMSG729Format::qt_metacast(char const *)
+ ?tr@QTMSILBCFormat@QTMS@@SA?AVQString@@PBD0@Z @ 77 NONAME ; class QString QTMS::QTMSILBCFormat::tr(char const *, char const *)
+ ?GetType@QTMSClientSink@QTMS@@UAEHAAH@Z @ 78 NONAME ; int QTMS::QTMSClientSink::GetType(int &)
+ ?tr@QTMSModemSink@QTMS@@SA?AVQString@@PBD0H@Z @ 79 NONAME ; class QString QTMS::QTMSModemSink::tr(char const *, char const *, int)
+ ?staticMetaObject@QTMSMicSource@QTMS@@2UQMetaObject@@B @ 80 NONAME ; struct QMetaObject const QTMS::QTMSMicSource::staticMetaObject
+ ?metaObject@QTMSModemSource@QTMS@@UBEPBUQMetaObject@@XZ @ 81 NONAME ; struct QMetaObject const * QTMS::QTMSModemSource::metaObject(void) const
+ ?ContinueDTMFStringSending@QTMSDTMF@QTMS@@QAEHH@Z @ 82 NONAME ; int QTMS::QTMSDTMF::ContinueDTMFStringSending(int)
+ ?GetCNG@QTMSG711Format@QTMS@@QAEHAAH@Z @ 83 NONAME ; int QTMS::QTMSG711Format::GetCNG(int &)
+ ?CreateGlobalRouting@QTMSFactory@QTMS@@QAEHAAPAVQTMSGlobalRouting@2@@Z @ 84 NONAME ; int QTMS::QTMSFactory::CreateGlobalRouting(class QTMS::QTMSGlobalRouting * &)
+ ?tr@QTMSRingTone@QTMS@@SA?AVQString@@PBD0H@Z @ 85 NONAME ; class QString QTMS::QTMSRingTone::tr(char const *, char const *, int)
+ ?trUtf8@QTMSGlobalRouting@QTMS@@SA?AVQString@@PBD0H@Z @ 86 NONAME ; class QString QTMS::QTMSGlobalRouting::trUtf8(char const *, char const *, int)
+ ?tr@QTMSClientSink@QTMS@@SA?AVQString@@PBD0@Z @ 87 NONAME ; class QString QTMS::QTMSClientSink::tr(char const *, char const *)
+ ?trUtf8@QTMSModemSink@QTMS@@SA?AVQString@@PBD0@Z @ 88 NONAME ; class QString QTMS::QTMSModemSink::trUtf8(char const *, char const *)
+ ?qt_metacall@QTMSInbandTone@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 89 NONAME ; int QTMS::QTMSInbandTone::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?staticMetaObject@QTMSSpeakerSink@QTMS@@2UQMetaObject@@B @ 90 NONAME ; struct QMetaObject const QTMS::QTMSSpeakerSink::staticMetaObject
+ ?staticMetaObject@QTMSGainEffect@QTMS@@2UQMetaObject@@B @ 91 NONAME ; struct QMetaObject const QTMS::QTMSGainEffect::staticMetaObject
+ ?staticMetaObject@QTMSModemSink@QTMS@@2UQMetaObject@@B @ 92 NONAME ; struct QMetaObject const QTMS::QTMSModemSink::staticMetaObject
+ ?tr@QTMSModemSource@QTMS@@SA?AVQString@@PBD0H@Z @ 93 NONAME ; class QString QTMS::QTMSModemSource::tr(char const *, char const *, int)
+ ?tr@QTMSDTMF@QTMS@@SA?AVQString@@PBD0@Z @ 94 NONAME ; class QString QTMS::QTMSDTMF::tr(char const *, char const *)
+ ?tr@QTMSGlobalVolEffect@QTMS@@SA?AVQString@@PBD0H@Z @ 95 NONAME ; class QString QTMS::QTMSGlobalVolEffect::tr(char const *, char const *, int)
+ ?GetType@QTMSGainEffect@QTMS@@UAEHAAH@Z @ 96 NONAME ; int QTMS::QTMSGainEffect::GetType(int &)
+ ?trUtf8@QTMSSpeakerSink@QTMS@@SA?AVQString@@PBD0@Z @ 97 NONAME ; class QString QTMS::QTMSSpeakerSink::trUtf8(char const *, char const *)
+ ??_EQTMSG711Format@QTMS@@UAE@I@Z @ 98 NONAME ; QTMS::QTMSG711Format::~QTMSG711Format(unsigned int)
+ ?qt_metacast@QTMSAMRFormat@QTMS@@UAEPAXPBD@Z @ 99 NONAME ; void * QTMS::QTMSAMRFormat::qt_metacast(char const *)
+ ?GlobalRoutingEvent@QTMSGlobalRouting@QTMS@@IAEXABV12@UQTMSSignalEvent@2@H@Z @ 100 NONAME ; void QTMS::QTMSGlobalRouting::GlobalRoutingEvent(class QTMS::QTMSGlobalRouting const &, struct QTMS::QTMSSignalEvent, int)
+ ?trUtf8@QTMSAMRFormat@QTMS@@SA?AVQString@@PBD0H@Z @ 101 NONAME ; class QString QTMS::QTMSAMRFormat::trUtf8(char const *, char const *, int)
+ ?getStaticMetaObject@QTMSRingTone@QTMS@@SAABUQMetaObject@@XZ @ 102 NONAME ; struct QMetaObject const & QTMS::QTMSRingTone::getStaticMetaObject(void)
+ ?metaObject@QTMSMicSource@QTMS@@UBEPBUQMetaObject@@XZ @ 103 NONAME ; struct QMetaObject const * QTMS::QTMSMicSource::metaObject(void) const
+ ??1QTMSSpeakerSink@QTMS@@UAE@XZ @ 104 NONAME ; QTMS::QTMSSpeakerSink::~QTMSSpeakerSink(void)
+ ??0QTMSVolumeEffect@QTMS@@IAE@XZ @ 105 NONAME ; QTMS::QTMSVolumeEffect::QTMSVolumeEffect(void)
+ ?staticMetaObject@QTMSAMRFormat@QTMS@@2UQMetaObject@@B @ 106 NONAME ; struct QMetaObject const QTMS::QTMSAMRFormat::staticMetaObject
+ ?Init@QTMSStream@QTMS@@QAEHXZ @ 107 NONAME ; int QTMS::QTMSStream::Init(void)
+ ?GetVADMode@QTMSG729Format@QTMS@@QAEHAAH@Z @ 108 NONAME ; int QTMS::QTMSG729Format::GetVADMode(int &)
+ ??1QTMSGlobalGainEffect@QTMS@@UAE@XZ @ 109 NONAME ; QTMS::QTMSGlobalGainEffect::~QTMSGlobalGainEffect(void)
+ ??_EQTMSInbandTone@QTMS@@UAE@I@Z @ 110 NONAME ; QTMS::QTMSInbandTone::~QTMSInbandTone(unsigned int)
+ ?trUtf8@QTMSAMRFormat@QTMS@@SA?AVQString@@PBD0@Z @ 111 NONAME ; class QString QTMS::QTMSAMRFormat::trUtf8(char const *, char const *)
+ ?qt_metacast@QTMSRingTone@QTMS@@UAEPAXPBD@Z @ 112 NONAME ; void * QTMS::QTMSRingTone::qt_metacast(char const *)
+ ?GetType@QTMSClientSource@QTMS@@UAEHAAH@Z @ 113 NONAME ; int QTMS::QTMSClientSource::GetType(int &)
+ ?metaObject@QTMSPCMFormat@QTMS@@UBEPBUQMetaObject@@XZ @ 114 NONAME ; struct QMetaObject const * QTMS::QTMSPCMFormat::metaObject(void) const
+ ?tr@QTMSMicSource@QTMS@@SA?AVQString@@PBD0@Z @ 115 NONAME ; class QString QTMS::QTMSMicSource::tr(char const *, char const *)
+ ??1QTMSGlobalRouting@QTMS@@UAE@XZ @ 116 NONAME ; QTMS::QTMSGlobalRouting::~QTMSGlobalRouting(void)
+ ?getStaticMetaObject@QTMSStream@QTMS@@SAABUQMetaObject@@XZ @ 117 NONAME ; struct QMetaObject const & QTMS::QTMSStream::getStaticMetaObject(void)
+ ?trUtf8@QTMSClientSource@QTMS@@SA?AVQString@@PBD0@Z @ 118 NONAME ; class QString QTMS::QTMSClientSource::trUtf8(char const *, char const *)
+ ?tr@QTMSAMRFormat@QTMS@@SA?AVQString@@PBD0H@Z @ 119 NONAME ; class QString QTMS::QTMSAMRFormat::tr(char const *, char const *, int)
+ ?qt_metacast@QTMSModemSource@QTMS@@UAEPAXPBD@Z @ 120 NONAME ; void * QTMS::QTMSModemSource::qt_metacast(char const *)
+ ?getStaticMetaObject@QTMSG711Format@QTMS@@SAABUQMetaObject@@XZ @ 121 NONAME ; struct QMetaObject const & QTMS::QTMSG711Format::getStaticMetaObject(void)
+ ??_EQTMSClientSource@QTMS@@UAE@I@Z @ 122 NONAME ; QTMS::QTMSClientSource::~QTMSClientSource(unsigned int)
+ ?GetLevel@QTMSGainEffect@QTMS@@QAEHAAI@Z @ 123 NONAME ; int QTMS::QTMSGainEffect::GetLevel(unsigned int &)
+ ?tr@QTMSFactory@QTMS@@SA?AVQString@@PBD0@Z @ 124 NONAME ; class QString QTMS::QTMSFactory::tr(char const *, char const *)
+ ?qt_metacast@QTMSGlobalRouting@QTMS@@UAEPAXPBD@Z @ 125 NONAME ; void * QTMS::QTMSGlobalRouting::qt_metacast(char const *)
+ ?getStaticMetaObject@QTMSFactory@QTMS@@SAABUQMetaObject@@XZ @ 126 NONAME ; struct QMetaObject const & QTMS::QTMSFactory::getStaticMetaObject(void)
+ ??_EQTMSAMRFormat@QTMS@@UAE@I@Z @ 127 NONAME ; QTMS::QTMSAMRFormat::~QTMSAMRFormat(unsigned int)
+ ?getStaticMetaObject@QTMSPCMFormat@QTMS@@SAABUQMetaObject@@XZ @ 128 NONAME ; struct QMetaObject const & QTMS::QTMSPCMFormat::getStaticMetaObject(void)
+ ?Flush@QTMSClientSource@QTMS@@QAEHXZ @ 129 NONAME ; int QTMS::QTMSClientSource::Flush(void)
+ ?Stop@QTMSRingTone@QTMS@@QAEHXZ @ 130 NONAME ; int QTMS::QTMSRingTone::Stop(void)
+ ?DeleteGlobalRouting@QTMSFactory@QTMS@@QAEHAAPAVQTMSGlobalRouting@2@@Z @ 131 NONAME ; int QTMS::QTMSFactory::DeleteGlobalRouting(class QTMS::QTMSGlobalRouting * &)
+ ?tr@QTMSGlobalRouting@QTMS@@SA?AVQString@@PBD0H@Z @ 132 NONAME ; class QString QTMS::QTMSGlobalRouting::tr(char const *, char const *, int)
+ ?SetMode@QTMSG711Format@QTMS@@QAEHH@Z @ 133 NONAME ; int QTMS::QTMSG711Format::SetMode(int)
+ ?GetMode@QTMSILBCFormat@QTMS@@QAEHAAH@Z @ 134 NONAME ; int QTMS::QTMSILBCFormat::GetMode(int &)
+ ?GetMode@QTMSG711Format@QTMS@@QAEHAAH@Z @ 135 NONAME ; int QTMS::QTMSG711Format::GetMode(int &)
+ ?GetAvailableOutputs@QTMSGlobalRouting@QTMS@@QAEHAAV?$vector@IV?$allocator@I@std@@@std@@@Z @ 136 NONAME ; int QTMS::QTMSGlobalRouting::GetAvailableOutputs(class std::vector<unsigned int, class std::allocator<unsigned int> > &)
+ ?staticMetaObject@QTMSFactory@QTMS@@2UQMetaObject@@B @ 137 NONAME ; struct QMetaObject const QTMS::QTMSFactory::staticMetaObject
+ ?DeleteFormat@QTMSFactory@QTMS@@QAEHAAPAVQTMSFormat@2@@Z @ 138 NONAME ; int QTMS::QTMSFactory::DeleteFormat(class QTMS::QTMSFormat * &)
+ ?tr@QTMSILBCFormat@QTMS@@SA?AVQString@@PBD0H@Z @ 139 NONAME ; class QString QTMS::QTMSILBCFormat::tr(char const *, char const *, int)
+ ??1QTMSPCMFormat@QTMS@@UAE@XZ @ 140 NONAME ; QTMS::QTMSPCMFormat::~QTMSPCMFormat(void)
+ ?trUtf8@QTMSGainEffect@QTMS@@SA?AVQString@@PBD0@Z @ 141 NONAME ; class QString QTMS::QTMSGainEffect::trUtf8(char const *, char const *)
+ ??0QTMSG711Format@QTMS@@IAE@XZ @ 142 NONAME ; QTMS::QTMSG711Format::QTMSG711Format(void)
+ ?staticMetaObject@QTMSILBCFormat@QTMS@@2UQMetaObject@@B @ 143 NONAME ; struct QMetaObject const QTMS::QTMSILBCFormat::staticMetaObject
+ ?metaObject@QTMSG729Format@QTMS@@UBEPBUQMetaObject@@XZ @ 144 NONAME ; struct QMetaObject const * QTMS::QTMSG729Format::metaObject(void) const
+ ?tr@QTMSFactory@QTMS@@SA?AVQString@@PBD0H@Z @ 145 NONAME ; class QString QTMS::QTMSFactory::tr(char const *, char const *, int)
+ ?tr@QTMSCall@QTMS@@SA?AVQString@@PBD0H@Z @ 146 NONAME ; class QString QTMS::QTMSCall::tr(char const *, char const *, int)
+ ?staticMetaObject@QTMSClientSink@QTMS@@2UQMetaObject@@B @ 147 NONAME ; struct QMetaObject const QTMS::QTMSClientSink::staticMetaObject
+ ?EffectsEvent@QTMSGlobalVolEffect@QTMS@@IAEXABVQTMSEffect@2@UQTMSSignalEvent@2@@Z @ 148 NONAME ; void QTMS::QTMSGlobalVolEffect::EffectsEvent(class QTMS::QTMSEffect const &, struct QTMS::QTMSSignalEvent)
+ ?CreateFormat@QTMSFactory@QTMS@@QAEHHAAPAVQTMSFormat@2@@Z @ 149 NONAME ; int QTMS::QTMSFactory::CreateFormat(int, class QTMS::QTMSFormat * &)
+ ?SetCNG@QTMSILBCFormat@QTMS@@QAEHH@Z @ 150 NONAME ; int QTMS::QTMSILBCFormat::SetCNG(int)
+ ??1QTMSAMRFormat@QTMS@@UAE@XZ @ 151 NONAME ; QTMS::QTMSAMRFormat::~QTMSAMRFormat(void)
+ ?metaObject@QTMSClientSink@QTMS@@UBEPBUQMetaObject@@XZ @ 152 NONAME ; struct QMetaObject const * QTMS::QTMSClientSink::metaObject(void) const
+ ?trUtf8@QTMSInbandTone@QTMS@@SA?AVQString@@PBD0@Z @ 153 NONAME ; class QString QTMS::QTMSInbandTone::trUtf8(char const *, char const *)
+ ?staticMetaObject@QTMSG711Format@QTMS@@2UQMetaObject@@B @ 154 NONAME ; struct QMetaObject const QTMS::QTMSG711Format::staticMetaObject
+ ?BufferFilled@QTMSClientSource@QTMS@@QAEHAAVTMSBuffer@TMS@@@Z @ 155 NONAME ; int QTMS::QTMSClientSource::BufferFilled(class TMS::TMSBuffer &)
+ ?trUtf8@QTMSDTMF@QTMS@@SA?AVQString@@PBD0H@Z @ 156 NONAME ; class QString QTMS::QTMSDTMF::trUtf8(char const *, char const *, int)
+ ?InbandToneEvent@QTMSInbandTone@QTMS@@IAEXABV12@UQTMSSignalEvent@2@@Z @ 157 NONAME ; void QTMS::QTMSInbandTone::InbandToneEvent(class QTMS::QTMSInbandTone const &, struct QTMS::QTMSSignalEvent)
+ ?tr@QTMSModemSink@QTMS@@SA?AVQString@@PBD0@Z @ 158 NONAME ; class QString QTMS::QTMSModemSink::tr(char const *, char const *)
+ ?tr@QTMSGainEffect@QTMS@@SA?AVQString@@PBD0H@Z @ 159 NONAME ; class QString QTMS::QTMSGainEffect::tr(char const *, char const *, int)
+ ?qt_metacast@QTMSG711Format@QTMS@@UAEPAXPBD@Z @ 160 NONAME ; void * QTMS::QTMSG711Format::qt_metacast(char const *)
+ ?GetMaxLevel@QTMSVolumeEffect@QTMS@@QAEHAAI@Z @ 161 NONAME ; int QTMS::QTMSVolumeEffect::GetMaxLevel(unsigned int &)
+ ??0QTMSSpeakerSink@QTMS@@IAE@XZ @ 162 NONAME ; QTMS::QTMSSpeakerSink::QTMSSpeakerSink(void)
+ ?ProcessBuffer@QTMSClientSource@QTMS@@QAEHPAVTMSBuffer@TMS@@@Z @ 163 NONAME ; int QTMS::QTMSClientSource::ProcessBuffer(class TMS::TMSBuffer *)
+ ??_EQTMSMicSource@QTMS@@UAE@I@Z @ 164 NONAME ; QTMS::QTMSMicSource::~QTMSMicSource(unsigned int)
+ ?metaObject@QTMSModemSink@QTMS@@UBEPBUQMetaObject@@XZ @ 165 NONAME ; struct QMetaObject const * QTMS::QTMSModemSink::metaObject(void) const
+ ?DeleteCall@QTMSFactory@QTMS@@QAEHAAPAVQTMSCall@2@@Z @ 166 NONAME ; int QTMS::QTMSFactory::DeleteCall(class QTMS::QTMSCall * &)
+ ?tr@QTMSGlobalGainEffect@QTMS@@SA?AVQString@@PBD0H@Z @ 167 NONAME ; class QString QTMS::QTMSGlobalGainEffect::tr(char const *, char const *, int)
+ ?qt_metacall@QTMSMicSource@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 168 NONAME ; int QTMS::QTMSMicSource::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?GetType@QTMSFormat@QTMS@@UAEHAAH@Z @ 169 NONAME ; int QTMS::QTMSFormat::GetType(int &)
+ ?DeleteStream@QTMSCall@QTMS@@QAEHAAPAVQTMSStream@2@@Z @ 170 NONAME ; int QTMS::QTMSCall::DeleteStream(class QTMS::QTMSStream * &)
+ ?trUtf8@QTMSVolumeEffect@QTMS@@SA?AVQString@@PBD0@Z @ 171 NONAME ; class QString QTMS::QTMSVolumeEffect::trUtf8(char const *, char const *)
+ ?CreateInbandTonePlayer@QTMSFactory@QTMS@@QAEHAAPAVQTMSInbandTone@2@@Z @ 172 NONAME ; int QTMS::QTMSFactory::CreateInbandTonePlayer(class QTMS::QTMSInbandTone * &)
+ ?trUtf8@QTMSGlobalRouting@QTMS@@SA?AVQString@@PBD0@Z @ 173 NONAME ; class QString QTMS::QTMSGlobalRouting::trUtf8(char const *, char const *)
+ ??1QTMSG711Format@QTMS@@UAE@XZ @ 174 NONAME ; QTMS::QTMSG711Format::~QTMSG711Format(void)
+ ?tr@QTMSGainEffect@QTMS@@SA?AVQString@@PBD0@Z @ 175 NONAME ; class QString QTMS::QTMSGainEffect::tr(char const *, char const *)
+ ??_EQTMSModemSource@QTMS@@UAE@I@Z @ 176 NONAME ; QTMS::QTMSModemSource::~QTMSModemSource(unsigned int)
+ ?qt_metacall@QTMSPCMFormat@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 177 NONAME ; int QTMS::QTMSPCMFormat::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??0QTMSILBCFormat@QTMS@@IAE@XZ @ 178 NONAME ; QTMS::QTMSILBCFormat::QTMSILBCFormat(void)
+ ?trUtf8@QTMSStream@QTMS@@SA?AVQString@@PBD0H@Z @ 179 NONAME ; class QString QTMS::QTMSStream::trUtf8(char const *, char const *, int)
+ ?qt_metacast@QTMSPCMFormat@QTMS@@UAEPAXPBD@Z @ 180 NONAME ; void * QTMS::QTMSPCMFormat::qt_metacast(char const *)
+ ?qt_metacall@QTMSSpeakerSink@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 181 NONAME ; int QTMS::QTMSSpeakerSink::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?GetLevel@QTMSVolumeEffect@QTMS@@QAEHAAI@Z @ 182 NONAME ; int QTMS::QTMSVolumeEffect::GetLevel(unsigned int &)
+ ?trUtf8@QTMSFactory@QTMS@@SA?AVQString@@PBD0H@Z @ 183 NONAME ; class QString QTMS::QTMSFactory::trUtf8(char const *, char const *, int)
+ ??_EQTMSGainEffect@QTMS@@UAE@I@Z @ 184 NONAME ; QTMS::QTMSGainEffect::~QTMSGainEffect(unsigned int)
+ ?tr@QTMSGlobalRouting@QTMS@@SA?AVQString@@PBD0@Z @ 185 NONAME ; class QString QTMS::QTMSGlobalRouting::tr(char const *, char const *)
+ ?tr@QTMSAMRFormat@QTMS@@SA?AVQString@@PBD0@Z @ 186 NONAME ; class QString QTMS::QTMSAMRFormat::tr(char const *, char const *)
+ ?getStaticMetaObject@QTMSSpeakerSink@QTMS@@SAABUQMetaObject@@XZ @ 187 NONAME ; struct QMetaObject const & QTMS::QTMSSpeakerSink::getStaticMetaObject(void)
+ ?CreateDTMF@QTMSFactory@QTMS@@QAEHHAAPAVQTMSDTMF@2@@Z @ 188 NONAME ; int QTMS::QTMSFactory::CreateDTMF(int, class QTMS::QTMSDTMF * &)
+ ?trUtf8@QTMSStream@QTMS@@SA?AVQString@@PBD0@Z @ 189 NONAME ; class QString QTMS::QTMSStream::trUtf8(char const *, char const *)
+ ?tr@QTMSInbandTone@QTMS@@SA?AVQString@@PBD0@Z @ 190 NONAME ; class QString QTMS::QTMSInbandTone::tr(char const *, char const *)
+ ?tr@QTMSStream@QTMS@@SA?AVQString@@PBD0@Z @ 191 NONAME ; class QString QTMS::QTMSStream::tr(char const *, char const *)
+ ??1QTMSMicSource@QTMS@@UAE@XZ @ 192 NONAME ; QTMS::QTMSMicSource::~QTMSMicSource(void)
+ ??_EQTMSFactory@QTMS@@UAE@I@Z @ 193 NONAME ; QTMS::QTMSFactory::~QTMSFactory(unsigned int)
+ ??1QTMSCall@QTMS@@UAE@XZ @ 194 NONAME ; QTMS::QTMSCall::~QTMSCall(void)
+ ?staticMetaObject@QTMSG729Format@QTMS@@2UQMetaObject@@B @ 195 NONAME ; struct QMetaObject const QTMS::QTMSG729Format::staticMetaObject
+ ??0QTMSClientSource@QTMS@@IAE@XZ @ 196 NONAME ; QTMS::QTMSClientSource::QTMSClientSource(void)
+ ?Stop@QTMSInbandTone@QTMS@@QAEHXZ @ 197 NONAME ; int QTMS::QTMSInbandTone::Stop(void)
+ ?tr@QTMSCall@QTMS@@SA?AVQString@@PBD0@Z @ 198 NONAME ; class QString QTMS::QTMSCall::tr(char const *, char const *)
+ ?qt_metacall@QTMSCall@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 199 NONAME ; int QTMS::QTMSCall::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?metaObject@QTMSSpeakerSink@QTMS@@UBEPBUQMetaObject@@XZ @ 200 NONAME ; struct QMetaObject const * QTMS::QTMSSpeakerSink::metaObject(void) const
+ ?SetTone@QTMSDTMF@QTMS@@QAEHPAU_GString@@@Z @ 201 NONAME ; int QTMS::QTMSDTMF::SetTone(struct _GString *)
+ ?SetEnqueueMode@QTMSClientSource@QTMS@@QAEHH@Z @ 202 NONAME ; int QTMS::QTMSClientSource::SetEnqueueMode(int)
+ ?staticMetaObject@QTMSClientSource@QTMS@@2UQMetaObject@@B @ 203 NONAME ; struct QMetaObject const QTMS::QTMSClientSource::staticMetaObject
+ ?trUtf8@QTMSModemSource@QTMS@@SA?AVQString@@PBD0@Z @ 204 NONAME ; class QString QTMS::QTMSModemSource::trUtf8(char const *, char const *)
+ ?trUtf8@QTMSG729Format@QTMS@@SA?AVQString@@PBD0H@Z @ 205 NONAME ; class QString QTMS::QTMSG729Format::trUtf8(char const *, char const *, int)
+ ?GetType@QTMSVolumeEffect@QTMS@@UAEHAAH@Z @ 206 NONAME ; int QTMS::QTMSVolumeEffect::GetType(int &)
+ ?qt_metacall@QTMSVolumeEffect@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 207 NONAME ; int QTMS::QTMSVolumeEffect::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?tr@QTMSG711Format@QTMS@@SA?AVQString@@PBD0H@Z @ 208 NONAME ; class QString QTMS::QTMSG711Format::tr(char const *, char const *, int)
+ ??1QTMSILBCFormat@QTMS@@UAE@XZ @ 209 NONAME ; QTMS::QTMSILBCFormat::~QTMSILBCFormat(void)
+ ?Play@QTMSRingTone@QTMS@@QAEHXZ @ 210 NONAME ; int QTMS::QTMSRingTone::Play(void)
+ ?qt_metacall@QTMSILBCFormat@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 211 NONAME ; int QTMS::QTMSILBCFormat::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?tr@QTMSSpeakerSink@QTMS@@SA?AVQString@@PBD0H@Z @ 212 NONAME ; class QString QTMS::QTMSSpeakerSink::tr(char const *, char const *, int)
+ ?GetBitRate@QTMSFormat@QTMS@@QAEHAAI@Z @ 213 NONAME ; int QTMS::QTMSFormat::GetBitRate(unsigned int &)
+ ?GetType@QTMSModemSource@QTMS@@UAEHAAH@Z @ 214 NONAME ; int QTMS::QTMSModemSource::GetType(int &)
+ ?staticMetaObject@QTMSGlobalVolEffect@QTMS@@2UQMetaObject@@B @ 215 NONAME ; struct QMetaObject const QTMS::QTMSGlobalVolEffect::staticMetaObject
+ ??1QTMSFormat@QTMS@@UAE@XZ @ 216 NONAME ; QTMS::QTMSFormat::~QTMSFormat(void)
+ ?GetPlc@QTMSG711Format@QTMS@@QAEHAAH@Z @ 217 NONAME ; int QTMS::QTMSG711Format::GetPlc(int &)
+ ?Start@QTMSInbandTone@QTMS@@QAEHH@Z @ 218 NONAME ; int QTMS::QTMSInbandTone::Start(int)
+ ?trUtf8@QTMSClientSink@QTMS@@SA?AVQString@@PBD0H@Z @ 219 NONAME ; class QString QTMS::QTMSClientSink::trUtf8(char const *, char const *, int)
+ ?tr@QTMSInbandTone@QTMS@@SA?AVQString@@PBD0H@Z @ 220 NONAME ; class QString QTMS::QTMSInbandTone::tr(char const *, char const *, int)
+ ??_EQTMSPCMFormat@QTMS@@UAE@I@Z @ 221 NONAME ; QTMS::QTMSPCMFormat::~QTMSPCMFormat(unsigned int)
+ ?metaObject@QTMSAMRFormat@QTMS@@UBEPBUQMetaObject@@XZ @ 222 NONAME ; struct QMetaObject const * QTMS::QTMSAMRFormat::metaObject(void) const
+ ?metaObject@QTMSStream@QTMS@@UBEPBUQMetaObject@@XZ @ 223 NONAME ; struct QMetaObject const * QTMS::QTMSStream::metaObject(void) const
+ ?getStaticMetaObject@QTMSGlobalGainEffect@QTMS@@SAABUQMetaObject@@XZ @ 224 NONAME ; struct QMetaObject const & QTMS::QTMSGlobalGainEffect::getStaticMetaObject(void)
+ ?tr@QTMSGlobalVolEffect@QTMS@@SA?AVQString@@PBD0@Z @ 225 NONAME ; class QString QTMS::QTMSGlobalVolEffect::tr(char const *, char const *)
+ ?staticMetaObject@QTMSInbandTone@QTMS@@2UQMetaObject@@B @ 226 NONAME ; struct QMetaObject const QTMS::QTMSInbandTone::staticMetaObject
+ ?trUtf8@QTMSGlobalGainEffect@QTMS@@SA?AVQString@@PBD0H@Z @ 227 NONAME ; class QString QTMS::QTMSGlobalGainEffect::trUtf8(char const *, char const *, int)
+ ?qt_metacast@QTMSClientSource@QTMS@@UAEPAXPBD@Z @ 228 NONAME ; void * QTMS::QTMSClientSource::qt_metacast(char const *)
+ ?metaObject@QTMSCall@QTMS@@UBEPBUQMetaObject@@XZ @ 229 NONAME ; struct QMetaObject const * QTMS::QTMSCall::metaObject(void) const
+ ?qt_metacall@QTMSClientSink@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 230 NONAME ; int QTMS::QTMSClientSink::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?CreateStream@QTMSCall@QTMS@@QAEHHAAPAVQTMSStream@2@@Z @ 231 NONAME ; int QTMS::QTMSCall::CreateStream(int, class QTMS::QTMSStream * &)
+ ?DeleteInbandTonePlayer@QTMSFactory@QTMS@@QAEHAAPAVQTMSInbandTone@2@@Z @ 232 NONAME ; int QTMS::QTMSFactory::DeleteInbandTonePlayer(class QTMS::QTMSInbandTone * &)
+ ?SetLevel@QTMSGlobalGainEffect@QTMS@@QAEHI@Z @ 233 NONAME ; int QTMS::QTMSGlobalGainEffect::SetLevel(unsigned int)
+ ?GetStreamType@QTMSStream@QTMS@@QAEHXZ @ 234 NONAME ; int QTMS::QTMSStream::GetStreamType(void)
+ ?getStaticMetaObject@QTMSGlobalRouting@QTMS@@SAABUQMetaObject@@XZ @ 235 NONAME ; struct QMetaObject const & QTMS::QTMSGlobalRouting::getStaticMetaObject(void)
+ ??0QTMSGlobalVolEffect@QTMS@@IAE@XZ @ 236 NONAME ; QTMS::QTMSGlobalVolEffect::QTMSGlobalVolEffect(void)
+ ?CreateSink@QTMSFactory@QTMS@@QAEHHAAPAVQTMSSink@2@@Z @ 237 NONAME ; int QTMS::QTMSFactory::CreateSink(int, class QTMS::QTMSSink * &)
+ ?EffectsEvent@QTMSVolumeEffect@QTMS@@IAEXABVQTMSEffect@2@UQTMSSignalEvent@2@@Z @ 238 NONAME ; void QTMS::QTMSVolumeEffect::EffectsEvent(class QTMS::QTMSEffect const &, struct QTMS::QTMSSignalEvent)
+ ?getStaticMetaObject@QTMSG729Format@QTMS@@SAABUQMetaObject@@XZ @ 239 NONAME ; struct QMetaObject const & QTMS::QTMSG729Format::getStaticMetaObject(void)
+ ??1QTMSDTMF@QTMS@@UAE@XZ @ 240 NONAME ; QTMS::QTMSDTMF::~QTMSDTMF(void)
+ ?DeleteDTMF@QTMSFactory@QTMS@@QAEHAAPAVQTMSDTMF@2@@Z @ 241 NONAME ; int QTMS::QTMSFactory::DeleteDTMF(class QTMS::QTMSDTMF * &)
+ ??_EQTMSFormat@QTMS@@UAE@I@Z @ 242 NONAME ; QTMS::QTMSFormat::~QTMSFormat(unsigned int)
+ ?staticMetaObject@QTMSGlobalGainEffect@QTMS@@2UQMetaObject@@B @ 243 NONAME ; struct QMetaObject const QTMS::QTMSGlobalGainEffect::staticMetaObject
+ ?SetVADMode@QTMSILBCFormat@QTMS@@QAEHH@Z @ 244 NONAME ; int QTMS::QTMSILBCFormat::SetVADMode(int)
+ ??0QTMSCall@QTMS@@IAE@XZ @ 245 NONAME ; QTMS::QTMSCall::QTMSCall(void)
+ ?GetEnqueueMode@QTMSClientSource@QTMS@@QAEHAAH@Z @ 246 NONAME ; int QTMS::QTMSClientSource::GetEnqueueMode(int &)
+ ?metaObject@QTMSGlobalVolEffect@QTMS@@UBEPBUQMetaObject@@XZ @ 247 NONAME ; struct QMetaObject const * QTMS::QTMSGlobalVolEffect::metaObject(void) const
+ ?staticMetaObject@QTMSGlobalRouting@QTMS@@2UQMetaObject@@B @ 248 NONAME ; struct QMetaObject const QTMS::QTMSGlobalRouting::staticMetaObject
+ ?qt_metacast@QTMSFactory@QTMS@@UAEPAXPBD@Z @ 249 NONAME ; void * QTMS::QTMSFactory::qt_metacast(char const *)
+ ?SetCNG@QTMSG711Format@QTMS@@QAEHH@Z @ 250 NONAME ; int QTMS::QTMSG711Format::SetCNG(int)
+ ?qt_metacall@QTMSG729Format@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 251 NONAME ; int QTMS::QTMSG729Format::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?tr@QTMSStream@QTMS@@SA?AVQString@@PBD0H@Z @ 252 NONAME ; class QString QTMS::QTMSStream::tr(char const *, char const *, int)
+ ?SetLevel@QTMSVolumeEffect@QTMS@@QAEHI@Z @ 253 NONAME ; int QTMS::QTMSVolumeEffect::SetLevel(unsigned int)
+ ?DeleteEffect@QTMSFactory@QTMS@@QAEHAAPAVQTMSEffect@2@@Z @ 254 NONAME ; int QTMS::QTMSFactory::DeleteEffect(class QTMS::QTMSEffect * &)
+ ?qt_metacast@QTMSCall@QTMS@@UAEPAXPBD@Z @ 255 NONAME ; void * QTMS::QTMSCall::qt_metacast(char const *)
+ ?SetFormat@QTMSStream@QTMS@@QAEHPAVQTMSFormat@2@@Z @ 256 NONAME ; int QTMS::QTMSStream::SetFormat(class QTMS::QTMSFormat *)
+ ?getStaticMetaObject@QTMSDTMF@QTMS@@SAABUQMetaObject@@XZ @ 257 NONAME ; struct QMetaObject const & QTMS::QTMSDTMF::getStaticMetaObject(void)
+ ?getStaticMetaObject@QTMSMicSource@QTMS@@SAABUQMetaObject@@XZ @ 258 NONAME ; struct QMetaObject const & QTMS::QTMSMicSource::getStaticMetaObject(void)
+ ?qt_metacall@QTMSRingTone@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 259 NONAME ; int QTMS::QTMSRingTone::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?trUtf8@QTMSClientSource@QTMS@@SA?AVQString@@PBD0H@Z @ 260 NONAME ; class QString QTMS::QTMSClientSource::trUtf8(char const *, char const *, int)
+ ?qt_metacall@QTMSGlobalGainEffect@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 261 NONAME ; int QTMS::QTMSGlobalGainEffect::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?CreateCall@QTMSFactory@QTMS@@QAEHHAAPAVQTMSCall@2@I@Z @ 262 NONAME ; int QTMS::QTMSFactory::CreateCall(int, class QTMS::QTMSCall * &, unsigned int)
+ ?SetVADMode@QTMSG729Format@QTMS@@QAEHH@Z @ 263 NONAME ; int QTMS::QTMSG729Format::SetVADMode(int)
+ ?DeleteBuffer@QTMSFactory@QTMS@@QAEHAAPAVQTMSBuffer@2@@Z @ 264 NONAME ; int QTMS::QTMSFactory::DeleteBuffer(class QTMS::QTMSBuffer * &)
+ ?trUtf8@QTMSG711Format@QTMS@@SA?AVQString@@PBD0@Z @ 265 NONAME ; class QString QTMS::QTMSG711Format::trUtf8(char const *, char const *)
+ ?qt_metacall@QTMSDTMF@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 266 NONAME ; int QTMS::QTMSDTMF::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QTMSModemSource@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 267 NONAME ; int QTMS::QTMSModemSource::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?CreateFactory@QTMSFactory@QTMS@@SAHAAPAV12@AAVQTMSVer@2@@Z @ 268 NONAME ; int QTMS::QTMSFactory::CreateFactory(class QTMS::QTMSFactory * &, class QTMS::QTMSVer &)
+ ?tr@QTMSClientSource@QTMS@@SA?AVQString@@PBD0H@Z @ 269 NONAME ; class QString QTMS::QTMSClientSource::tr(char const *, char const *, int)
+ ??1QTMSStream@QTMS@@UAE@XZ @ 270 NONAME ; QTMS::QTMSStream::~QTMSStream(void)
+ ?Init@QTMSRingTone@QTMS@@QAEHHPAU_GString@@0@Z @ 271 NONAME ; int QTMS::QTMSRingTone::Init(int, struct _GString *, struct _GString *)
+ ?qt_metacast@QTMSVolumeEffect@QTMS@@UAEPAXPBD@Z @ 272 NONAME ; void * QTMS::QTMSVolumeEffect::qt_metacast(char const *)
+ ??1QTMSRingTone@QTMS@@UAE@XZ @ 273 NONAME ; QTMS::QTMSRingTone::~QTMSRingTone(void)
+ ??_EQTMSStream@QTMS@@UAE@I@Z @ 274 NONAME ; QTMS::QTMSStream::~QTMSStream(unsigned int)
+ ?tr@QTMSSpeakerSink@QTMS@@SA?AVQString@@PBD0@Z @ 275 NONAME ; class QString QTMS::QTMSSpeakerSink::tr(char const *, char const *)
+ ?RemoveSink@QTMSStream@QTMS@@QAEHPAVQTMSSink@2@@Z @ 276 NONAME ; int QTMS::QTMSStream::RemoveSink(class QTMS::QTMSSink *)
+ ?trUtf8@QTMSModemSource@QTMS@@SA?AVQString@@PBD0H@Z @ 277 NONAME ; class QString QTMS::QTMSModemSource::trUtf8(char const *, char const *, int)
+ ?metaObject@QTMSILBCFormat@QTMS@@UBEPBUQMetaObject@@XZ @ 278 NONAME ; struct QMetaObject const * QTMS::QTMSILBCFormat::metaObject(void) const
+ ?staticMetaObject@QTMSPCMFormat@QTMS@@2UQMetaObject@@B @ 279 NONAME ; struct QMetaObject const QTMS::QTMSPCMFormat::staticMetaObject
+ ?getStaticMetaObject@QTMSClientSource@QTMS@@SAABUQMetaObject@@XZ @ 280 NONAME ; struct QMetaObject const & QTMS::QTMSClientSource::getStaticMetaObject(void)
+ ??1QTMSFactory@QTMS@@UAE@XZ @ 281 NONAME ; QTMS::QTMSFactory::~QTMSFactory(void)
+ ?DeleteSource@QTMSFactory@QTMS@@QAEHAAPAVQTMSSource@2@@Z @ 282 NONAME ; int QTMS::QTMSFactory::DeleteSource(class QTMS::QTMSSource * &)
+ ?qt_metacall@QTMSGlobalRouting@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 283 NONAME ; int QTMS::QTMSGlobalRouting::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??0QTMSGlobalGainEffect@QTMS@@IAE@XZ @ 284 NONAME ; QTMS::QTMSGlobalGainEffect::QTMSGlobalGainEffect(void)
+ ?trUtf8@QTMSPCMFormat@QTMS@@SA?AVQString@@PBD0@Z @ 285 NONAME ; class QString QTMS::QTMSPCMFormat::trUtf8(char const *, char const *)
+ ??0QTMSDTMF@QTMS@@IAE@XZ @ 286 NONAME ; QTMS::QTMSDTMF::QTMSDTMF(void)
+ ?GetLevel@QTMSGlobalVolEffect@QTMS@@QAEHAAI@Z @ 287 NONAME ; int QTMS::QTMSGlobalVolEffect::GetLevel(unsigned int &)
+ ?GetType@QTMSGlobalVolEffect@QTMS@@UAEHAAH@Z @ 288 NONAME ; int QTMS::QTMSGlobalVolEffect::GetType(int &)
+ ?getStaticMetaObject@QTMSILBCFormat@QTMS@@SAABUQMetaObject@@XZ @ 289 NONAME ; struct QMetaObject const & QTMS::QTMSILBCFormat::getStaticMetaObject(void)
+ ??_EQTMSGlobalGainEffect@QTMS@@UAE@I@Z @ 290 NONAME ; QTMS::QTMSGlobalGainEffect::~QTMSGlobalGainEffect(unsigned int)
+ ?trUtf8@QTMSGlobalVolEffect@QTMS@@SA?AVQString@@PBD0@Z @ 291 NONAME ; class QString QTMS::QTMSGlobalVolEffect::trUtf8(char const *, char const *)
+ ?qt_metacast@QTMSGlobalGainEffect@QTMS@@UAEPAXPBD@Z @ 292 NONAME ; void * QTMS::QTMSGlobalGainEffect::qt_metacast(char const *)
+ ??_EQTMSModemSink@QTMS@@UAE@I@Z @ 293 NONAME ; QTMS::QTMSModemSink::~QTMSModemSink(unsigned int)
+ ??0QTMSModemSink@QTMS@@IAE@XZ @ 294 NONAME ; QTMS::QTMSModemSink::QTMSModemSink(void)
+ ?tr@QTMSG711Format@QTMS@@SA?AVQString@@PBD0@Z @ 295 NONAME ; class QString QTMS::QTMSG711Format::tr(char const *, char const *)
+ ?GetState@QTMSStream@QTMS@@QAEHXZ @ 296 NONAME ; int QTMS::QTMSStream::GetState(void)
+ ?qt_metacall@QTMSG711Format@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 297 NONAME ; int QTMS::QTMSG711Format::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?getStaticMetaObject@QTMSClientSink@QTMS@@SAABUQMetaObject@@XZ @ 298 NONAME ; struct QMetaObject const & QTMS::QTMSClientSink::getStaticMetaObject(void)
+ ?qt_metacast@QTMSInbandTone@QTMS@@UAEPAXPBD@Z @ 299 NONAME ; void * QTMS::QTMSInbandTone::qt_metacast(char const *)
+ ?getStaticMetaObject@QTMSModemSource@QTMS@@SAABUQMetaObject@@XZ @ 300 NONAME ; struct QMetaObject const & QTMS::QTMSModemSource::getStaticMetaObject(void)
+ ?metaObject@QTMSGainEffect@QTMS@@UBEPBUQMetaObject@@XZ @ 301 NONAME ; struct QMetaObject const * QTMS::QTMSGainEffect::metaObject(void) const
+ ??0QTMSGlobalRouting@QTMS@@IAE@XZ @ 302 NONAME ; QTMS::QTMSGlobalRouting::QTMSGlobalRouting(void)
+ ?metaObject@QTMSClientSource@QTMS@@UBEPBUQMetaObject@@XZ @ 303 NONAME ; struct QMetaObject const * QTMS::QTMSClientSource::metaObject(void) const
+ ?qt_metacast@QTMSStream@QTMS@@UAEPAXPBD@Z @ 304 NONAME ; void * QTMS::QTMSStream::qt_metacast(char const *)
+ ?DeleteSink@QTMSFactory@QTMS@@QAEHAAPAVQTMSSink@2@@Z @ 305 NONAME ; int QTMS::QTMSFactory::DeleteSink(class QTMS::QTMSSink * &)
+ ?getStaticMetaObject@QTMSModemSink@QTMS@@SAABUQMetaObject@@XZ @ 306 NONAME ; struct QMetaObject const & QTMS::QTMSModemSink::getStaticMetaObject(void)
+ ?tr@QTMSClientSource@QTMS@@SA?AVQString@@PBD0@Z @ 307 NONAME ; class QString QTMS::QTMSClientSource::tr(char const *, char const *)
+ ?Mute@QTMSRingTone@QTMS@@QAEHXZ @ 308 NONAME ; int QTMS::QTMSRingTone::Mute(void)
+ ??_EQTMSDTMF@QTMS@@UAE@I@Z @ 309 NONAME ; QTMS::QTMSDTMF::~QTMSDTMF(unsigned int)
+ ?qt_metacall@QTMSStream@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 310 NONAME ; int QTMS::QTMSStream::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?tr@QTMSDTMF@QTMS@@SA?AVQString@@PBD0H@Z @ 311 NONAME ; class QString QTMS::QTMSDTMF::tr(char const *, char const *, int)
+ ?qt_metacast@QTMSGainEffect@QTMS@@UAEPAXPBD@Z @ 312 NONAME ; void * QTMS::QTMSGainEffect::qt_metacast(char const *)
+ ?GetCallContextId@QTMSCall@QTMS@@QAEHAAI@Z @ 313 NONAME ; int QTMS::QTMSCall::GetCallContextId(unsigned int &)
+ ?GetCallType@QTMSCall@QTMS@@QAEHXZ @ 314 NONAME ; int QTMS::QTMSCall::GetCallType(void)
+ ?Start@QTMSDTMF@QTMS@@QAEHXZ @ 315 NONAME ; int QTMS::QTMSDTMF::Start(void)
+ ?trUtf8@QTMSGlobalGainEffect@QTMS@@SA?AVQString@@PBD0@Z @ 316 NONAME ; class QString QTMS::QTMSGlobalGainEffect::trUtf8(char const *, char const *)
+ ?SetOutput@QTMSGlobalRouting@QTMS@@QAEHH@Z @ 317 NONAME ; int QTMS::QTMSGlobalRouting::SetOutput(int)
+ ??0QTMSClientSink@QTMS@@IAE@XZ @ 318 NONAME ; QTMS::QTMSClientSink::QTMSClientSink(void)
+ ?SetLevel@QTMSGlobalVolEffect@QTMS@@QAEHI@Z @ 319 NONAME ; int QTMS::QTMSGlobalVolEffect::SetLevel(unsigned int)
+ ?metaObject@QTMSRingTone@QTMS@@UBEPBUQMetaObject@@XZ @ 320 NONAME ; struct QMetaObject const * QTMS::QTMSRingTone::metaObject(void) const
+ ?IsCallTypeSupported@QTMSFactory@QTMS@@QAEHHAAH@Z @ 321 NONAME ; int QTMS::QTMSFactory::IsCallTypeSupported(int, int &)
+ ?qt_metacast@QTMSGlobalVolEffect@QTMS@@UAEPAXPBD@Z @ 322 NONAME ; void * QTMS::QTMSGlobalVolEffect::qt_metacast(char const *)
+ ?staticMetaObject@QTMSModemSource@QTMS@@2UQMetaObject@@B @ 323 NONAME ; struct QMetaObject const QTMS::QTMSModemSource::staticMetaObject
+ ?GetStreamId@QTMSStream@QTMS@@QAEHXZ @ 324 NONAME ; int QTMS::QTMSStream::GetStreamId(void)
+ ??0QTMSG729Format@QTMS@@IAE@XZ @ 325 NONAME ; QTMS::QTMSG729Format::QTMSG729Format(void)
+ ??_EQTMSGlobalVolEffect@QTMS@@UAE@I@Z @ 326 NONAME ; QTMS::QTMSGlobalVolEffect::~QTMSGlobalVolEffect(unsigned int)
+ ?getStaticMetaObject@QTMSAMRFormat@QTMS@@SAABUQMetaObject@@XZ @ 327 NONAME ; struct QMetaObject const & QTMS::QTMSAMRFormat::getStaticMetaObject(void)
+ ?staticMetaObject@QTMSVolumeEffect@QTMS@@2UQMetaObject@@B @ 328 NONAME ; struct QMetaObject const QTMS::QTMSVolumeEffect::staticMetaObject
+ ??_EQTMSRingTone@QTMS@@UAE@I@Z @ 329 NONAME ; QTMS::QTMSRingTone::~QTMSRingTone(unsigned int)
+ ??0QTMSFormat@QTMS@@IAE@XZ @ 330 NONAME ; QTMS::QTMSFormat::QTMSFormat(void)
+ ?GetSupportedFormats@QTMSFactory@QTMS@@QAEHHAAV?$vector@PAVQTMSFormat@QTMS@@V?$allocator@PAVQTMSFormat@QTMS@@@std@@@std@@@Z @ 331 NONAME ; int QTMS::QTMSFactory::GetSupportedFormats(int, class std::vector<class QTMS::QTMSFormat *, class std::allocator<class QTMS::QTMSFormat *> > &)
+ ?SetVADMode@QTMSG711Format@QTMS@@QAEHH@Z @ 332 NONAME ; int QTMS::QTMSG711Format::SetVADMode(int)
+ ?getStaticMetaObject@QTMSVolumeEffect@QTMS@@SAABUQMetaObject@@XZ @ 333 NONAME ; struct QMetaObject const & QTMS::QTMSVolumeEffect::getStaticMetaObject(void)
+ ?qt_metacall@QTMSModemSink@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 334 NONAME ; int QTMS::QTMSModemSink::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?trUtf8@QTMSILBCFormat@QTMS@@SA?AVQString@@PBD0H@Z @ 335 NONAME ; class QString QTMS::QTMSILBCFormat::trUtf8(char const *, char const *, int)
+ ?trUtf8@QTMSDTMF@QTMS@@SA?AVQString@@PBD0@Z @ 336 NONAME ; class QString QTMS::QTMSDTMF::trUtf8(char const *, char const *)
+ ?tr@QTMSGlobalGainEffect@QTMS@@SA?AVQString@@PBD0@Z @ 337 NONAME ; class QString QTMS::QTMSGlobalGainEffect::tr(char const *, char const *)
+ ?AddEffect@QTMSStream@QTMS@@QAEHPAVQTMSEffect@2@@Z @ 338 NONAME ; int QTMS::QTMSStream::AddEffect(class QTMS::QTMSEffect *)
+ ?ResetFormat@QTMSStream@QTMS@@QAEHPAVQTMSFormat@2@@Z @ 339 NONAME ; int QTMS::QTMSStream::ResetFormat(class QTMS::QTMSFormat *)
+ ?metaObject@QTMSG711Format@QTMS@@UBEPBUQMetaObject@@XZ @ 340 NONAME ; struct QMetaObject const * QTMS::QTMSG711Format::metaObject(void) const
+ ??1QTMSVolumeEffect@QTMS@@UAE@XZ @ 341 NONAME ; QTMS::QTMSVolumeEffect::~QTMSVolumeEffect(void)
+ ?EffectsEvent@QTMSGlobalGainEffect@QTMS@@IAEXABVQTMSEffect@2@UQTMSSignalEvent@2@@Z @ 342 NONAME ; void QTMS::QTMSGlobalGainEffect::EffectsEvent(class QTMS::QTMSEffect const &, struct QTMS::QTMSSignalEvent)
+ ?GetSupportedBitRates@QTMSFormat@QTMS@@QAEHAAV?$vector@IV?$allocator@I@std@@@std@@@Z @ 343 NONAME ; int QTMS::QTMSFormat::GetSupportedBitRates(class std::vector<unsigned int, class std::allocator<unsigned int> > &)
+ ?staticMetaObject@QTMSCall@QTMS@@2UQMetaObject@@B @ 344 NONAME ; struct QMetaObject const QTMS::QTMSCall::staticMetaObject
+ ??1QTMSModemSource@QTMS@@UAE@XZ @ 345 NONAME ; QTMS::QTMSModemSource::~QTMSModemSource(void)
+ ??1QTMSClientSink@QTMS@@UAE@XZ @ 346 NONAME ; QTMS::QTMSClientSink::~QTMSClientSink(void)
+ ?metaObject@QTMSFactory@QTMS@@UBEPBUQMetaObject@@XZ @ 347 NONAME ; struct QMetaObject const * QTMS::QTMSFactory::metaObject(void) const
+ ?metaObject@QTMSInbandTone@QTMS@@UBEPBUQMetaObject@@XZ @ 348 NONAME ; struct QMetaObject const * QTMS::QTMSInbandTone::metaObject(void) const
+ ?trUtf8@QTMSGainEffect@QTMS@@SA?AVQString@@PBD0H@Z @ 349 NONAME ; class QString QTMS::QTMSGainEffect::trUtf8(char const *, char const *, int)
+ ?trUtf8@QTMSMicSource@QTMS@@SA?AVQString@@PBD0H@Z @ 350 NONAME ; class QString QTMS::QTMSMicSource::trUtf8(char const *, char const *, int)
+ ?GetMaxLevel@QTMSGlobalVolEffect@QTMS@@QAEHAAI@Z @ 351 NONAME ; int QTMS::QTMSGlobalVolEffect::GetMaxLevel(unsigned int &)
+ ??_EQTMSVolumeEffect@QTMS@@UAE@I@Z @ 352 NONAME ; QTMS::QTMSVolumeEffect::~QTMSVolumeEffect(unsigned int)
+ ??1QTMSG729Format@QTMS@@UAE@XZ @ 353 NONAME ; QTMS::QTMSG729Format::~QTMSG729Format(void)
+ ?tr@QTMSVolumeEffect@QTMS@@SA?AVQString@@PBD0@Z @ 354 NONAME ; class QString QTMS::QTMSVolumeEffect::tr(char const *, char const *)
+ ?GetType@QTMSMicSource@QTMS@@UAEHAAH@Z @ 355 NONAME ; int QTMS::QTMSMicSource::GetType(int &)
+ ?CreateEffect@QTMSFactory@QTMS@@QAEHHAAPAVQTMSEffect@2@@Z @ 356 NONAME ; int QTMS::QTMSFactory::CreateEffect(int, class QTMS::QTMSEffect * &)
+ ?getStaticMetaObject@QTMSCall@QTMS@@SAABUQMetaObject@@XZ @ 357 NONAME ; struct QMetaObject const & QTMS::QTMSCall::getStaticMetaObject(void)
+ ?metaObject@QTMSGlobalGainEffect@QTMS@@UBEPBUQMetaObject@@XZ @ 358 NONAME ; struct QMetaObject const * QTMS::QTMSGlobalGainEffect::metaObject(void) const
+ ??0QTMSFactory@QTMS@@AAE@XZ @ 359 NONAME ; QTMS::QTMSFactory::QTMSFactory(void)
+ ?GetOutput@QTMSGlobalRouting@QTMS@@QAEHAAH@Z @ 360 NONAME ; int QTMS::QTMSGlobalRouting::GetOutput(int &)
+ ?tr@QTMSPCMFormat@QTMS@@SA?AVQString@@PBD0@Z @ 361 NONAME ; class QString QTMS::QTMSPCMFormat::tr(char const *, char const *)
+ ?CreateBuffer@QTMSFactory@QTMS@@QAEHHIAAPAVQTMSBuffer@2@@Z @ 362 NONAME ; int QTMS::QTMSFactory::CreateBuffer(int, unsigned int, class QTMS::QTMSBuffer * &)
+ ?trUtf8@QTMSPCMFormat@QTMS@@SA?AVQString@@PBD0H@Z @ 363 NONAME ; class QString QTMS::QTMSPCMFormat::trUtf8(char const *, char const *, int)
+ ?qt_metacast@QTMSMicSource@QTMS@@UAEPAXPBD@Z @ 364 NONAME ; void * QTMS::QTMSMicSource::qt_metacast(char const *)
+ ??0QTMSRingTone@QTMS@@IAE@XZ @ 365 NONAME ; QTMS::QTMSRingTone::QTMSRingTone(void)
+ ?trUtf8@QTMSG729Format@QTMS@@SA?AVQString@@PBD0@Z @ 366 NONAME ; class QString QTMS::QTMSG729Format::trUtf8(char const *, char const *)
+ ?BufferProcessed@QTMSClientSink@QTMS@@QAEHPAVTMSBuffer@TMS@@@Z @ 367 NONAME ; int QTMS::QTMSClientSink::BufferProcessed(class TMS::TMSBuffer *)
+ ?trUtf8@QTMSRingTone@QTMS@@SA?AVQString@@PBD0H@Z @ 368 NONAME ; class QString QTMS::QTMSRingTone::trUtf8(char const *, char const *, int)
+ ?ProcessBuffer@QTMSClientSink@QTMS@@IAEXPBVTMSBuffer@TMS@@@Z @ 369 NONAME ; void QTMS::QTMSClientSink::ProcessBuffer(class TMS::TMSBuffer const *)
+ ?qt_metacall@QTMSAMRFormat@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 370 NONAME ; int QTMS::QTMSAMRFormat::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??0QTMSInbandTone@QTMS@@IAE@XZ @ 371 NONAME ; QTMS::QTMSInbandTone::QTMSInbandTone(void)
+ ?RemoveEffect@QTMSStream@QTMS@@QAEHPAVQTMSEffect@2@@Z @ 372 NONAME ; int QTMS::QTMSStream::RemoveEffect(class QTMS::QTMSEffect *)
+ ?SetBitRate@QTMSFormat@QTMS@@QAEHI@Z @ 373 NONAME ; int QTMS::QTMSFormat::SetBitRate(unsigned int)
+ ?Stop@QTMSStream@QTMS@@QAEHXZ @ 374 NONAME ; int QTMS::QTMSStream::Stop(void)
+ ?trUtf8@QTMSCall@QTMS@@SA?AVQString@@PBD0H@Z @ 375 NONAME ; class QString QTMS::QTMSCall::trUtf8(char const *, char const *, int)
+ ??_EQTMSILBCFormat@QTMS@@UAE@I@Z @ 376 NONAME ; QTMS::QTMSILBCFormat::~QTMSILBCFormat(unsigned int)
+ ?qt_metacall@QTMSFactory@QTMS@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 377 NONAME ; int QTMS::QTMSFactory::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?staticMetaObject@QTMSStream@QTMS@@2UQMetaObject@@B @ 378 NONAME ; struct QMetaObject const QTMS::QTMSStream::staticMetaObject
+ ??0QTMSPCMFormat@QTMS@@IAE@XZ @ 379 NONAME ; QTMS::QTMSPCMFormat::QTMSPCMFormat(void)
+ ?tr@QTMSMicSource@QTMS@@SA?AVQString@@PBD0H@Z @ 380 NONAME ; class QString QTMS::QTMSMicSource::tr(char const *, char const *, int)
+ ?SetLevel@QTMSGainEffect@QTMS@@QAEHI@Z @ 381 NONAME ; int QTMS::QTMSGainEffect::SetLevel(unsigned int)
+ ?FillBuffer@QTMSClientSource@QTMS@@IAEXAAVTMSBuffer@TMS@@@Z @ 382 NONAME ; void QTMS::QTMSClientSource::FillBuffer(class TMS::TMSBuffer &)
+ ?Pause@QTMSStream@QTMS@@QAEHXZ @ 383 NONAME ; int QTMS::QTMSStream::Pause(void)
+ ?Deinit@QTMSStream@QTMS@@QAEXXZ @ 384 NONAME ; void QTMS::QTMSStream::Deinit(void)
+ ?metaObject@QTMSDTMF@QTMS@@UBEPBUQMetaObject@@XZ @ 385 NONAME ; struct QMetaObject const * QTMS::QTMSDTMF::metaObject(void) const
+ ?GetMaxLevel@QTMSGainEffect@QTMS@@QAEHAAI@Z @ 386 NONAME ; int QTMS::QTMSGainEffect::GetMaxLevel(unsigned int &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/data/create_qtms_stub_sis.bat Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,17 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description: PKG for QT Telephony Media Services (QTMS)
+rem
+
+makesis -s qtmsapi_stub.pkg qtmsapi_stub.sis
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/data/qtmsapi_stub.pkg Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,29 @@
+;
+; 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: QT Telephony Multimedia Services (QTMS)
+;
+;File: qtms_stub.pkg
+
+;Languages
+&EN
+
+;Header
+#{"QTMS"},(0x10207CB3),1,0,0, TYPE=SA
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique Vendor name
+:"Nokia"
+
Binary file qtms/data/qtmsapi_stub.sis has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/eabi/qtmsu.def Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,412 @@
+EXPORTS
+ _ZN4QTMS10QTMSFormat10GetBitRateERj @ 1 NONAME
+ _ZN4QTMS10QTMSFormat10SetBitRateEj @ 2 NONAME
+ _ZN4QTMS10QTMSFormat20GetSupportedBitRatesERSt6vectorIjSaIjEE @ 3 NONAME
+ _ZN4QTMS10QTMSFormat7GetTypeERi @ 4 NONAME
+ _ZN4QTMS10QTMSFormatC1Ev @ 5 NONAME
+ _ZN4QTMS10QTMSFormatC2Ev @ 6 NONAME
+ _ZN4QTMS10QTMSFormatD0Ev @ 7 NONAME
+ _ZN4QTMS10QTMSFormatD1Ev @ 8 NONAME
+ _ZN4QTMS10QTMSFormatD2Ev @ 9 NONAME
+ _ZN4QTMS10QTMSStream10RemoveSinkEPNS_8QTMSSinkE @ 10 NONAME
+ _ZN4QTMS10QTMSStream11GetStreamIdEv @ 11 NONAME
+ _ZN4QTMS10QTMSStream11ResetFormatEPNS_10QTMSFormatE @ 12 NONAME
+ _ZN4QTMS10QTMSStream11qt_metacallEN11QMetaObject4CallEiPPv @ 13 NONAME
+ _ZN4QTMS10QTMSStream11qt_metacastEPKc @ 14 NONAME
+ _ZN4QTMS10QTMSStream12RemoveEffectEPNS_10QTMSEffectE @ 15 NONAME
+ _ZN4QTMS10QTMSStream12RemoveSourceEPNS_10QTMSSourceE @ 16 NONAME
+ _ZN4QTMS10QTMSStream13GetStreamTypeEv @ 17 NONAME
+ _ZN4QTMS10QTMSStream14TMSStreamEventERKS0_NS_15QTMSSignalEventE @ 18 NONAME
+ _ZN4QTMS10QTMSStream16staticMetaObjectE @ 19 NONAME DATA 16
+ _ZN4QTMS10QTMSStream19getStaticMetaObjectEv @ 20 NONAME
+ _ZN4QTMS10QTMSStream4InitEv @ 21 NONAME
+ _ZN4QTMS10QTMSStream4StopEv @ 22 NONAME
+ _ZN4QTMS10QTMSStream5PauseEv @ 23 NONAME
+ _ZN4QTMS10QTMSStream5StartEv @ 24 NONAME
+ _ZN4QTMS10QTMSStream6DeinitEv @ 25 NONAME
+ _ZN4QTMS10QTMSStream7AddSinkEPNS_8QTMSSinkE @ 26 NONAME
+ _ZN4QTMS10QTMSStream8GetStateEv @ 27 NONAME
+ _ZN4QTMS10QTMSStream9AddEffectEPNS_10QTMSEffectE @ 28 NONAME
+ _ZN4QTMS10QTMSStream9AddSourceEPNS_10QTMSSourceE @ 29 NONAME
+ _ZN4QTMS10QTMSStream9SetFormatEPNS_10QTMSFormatE @ 30 NONAME
+ _ZN4QTMS10QTMSStreamC1Ev @ 31 NONAME
+ _ZN4QTMS10QTMSStreamC2Ev @ 32 NONAME
+ _ZN4QTMS10QTMSStreamD0Ev @ 33 NONAME
+ _ZN4QTMS10QTMSStreamD1Ev @ 34 NONAME
+ _ZN4QTMS10QTMSStreamD2Ev @ 35 NONAME
+ _ZN4QTMS11QTMSFactory10CreateCallEiRPNS_8QTMSCallEj @ 36 NONAME
+ _ZN4QTMS11QTMSFactory10CreateDTMFEiRPNS_8QTMSDTMFE @ 37 NONAME
+ _ZN4QTMS11QTMSFactory10CreateSinkEiRPNS_8QTMSSinkE @ 38 NONAME
+ _ZN4QTMS11QTMSFactory10DeleteCallERPNS_8QTMSCallE @ 39 NONAME
+ _ZN4QTMS11QTMSFactory10DeleteDTMFERPNS_8QTMSDTMFE @ 40 NONAME
+ _ZN4QTMS11QTMSFactory10DeleteSinkERPNS_8QTMSSinkE @ 41 NONAME
+ _ZN4QTMS11QTMSFactory11qt_metacallEN11QMetaObject4CallEiPPv @ 42 NONAME
+ _ZN4QTMS11QTMSFactory11qt_metacastEPKc @ 43 NONAME
+ _ZN4QTMS11QTMSFactory12CreateBufferEijRPNS_10QTMSBufferE @ 44 NONAME
+ _ZN4QTMS11QTMSFactory12CreateEffectEiRPNS_10QTMSEffectE @ 45 NONAME
+ _ZN4QTMS11QTMSFactory12CreateFormatEiRPNS_10QTMSFormatE @ 46 NONAME
+ _ZN4QTMS11QTMSFactory12CreateSourceEiRPNS_10QTMSSourceE @ 47 NONAME
+ _ZN4QTMS11QTMSFactory12DeleteBufferERPNS_10QTMSBufferE @ 48 NONAME
+ _ZN4QTMS11QTMSFactory12DeleteEffectERPNS_10QTMSEffectE @ 49 NONAME
+ _ZN4QTMS11QTMSFactory12DeleteFormatERPNS_10QTMSFormatE @ 50 NONAME
+ _ZN4QTMS11QTMSFactory12DeleteSourceERPNS_10QTMSSourceE @ 51 NONAME
+ _ZN4QTMS11QTMSFactory13CreateFactoryERPS0_RNS_7QTMSVerE @ 52 NONAME
+ _ZN4QTMS11QTMSFactory16staticMetaObjectE @ 53 NONAME DATA 16
+ _ZN4QTMS11QTMSFactory19CreateGlobalRoutingERPNS_17QTMSGlobalRoutingE @ 54 NONAME
+ _ZN4QTMS11QTMSFactory19DeleteGlobalRoutingERPNS_17QTMSGlobalRoutingE @ 55 NONAME
+ _ZN4QTMS11QTMSFactory19GetSupportedFormatsEiRSt6vectorIPNS_10QTMSFormatESaIS3_EE @ 56 NONAME
+ _ZN4QTMS11QTMSFactory19IsCallTypeSupportedEiRi @ 57 NONAME
+ _ZN4QTMS11QTMSFactory19getStaticMetaObjectEv @ 58 NONAME
+ _ZN4QTMS11QTMSFactory20CreateRingTonePlayerERPNS_12QTMSRingToneE @ 59 NONAME
+ _ZN4QTMS11QTMSFactory20DeleteRingTonePlayerERPNS_12QTMSRingToneE @ 60 NONAME
+ _ZN4QTMS11QTMSFactory22CreateInbandTonePlayerERPNS_14QTMSInbandToneE @ 61 NONAME
+ _ZN4QTMS11QTMSFactory22DeleteInbandTonePlayerERPNS_14QTMSInbandToneE @ 62 NONAME
+ _ZN4QTMS11QTMSFactoryC1Ev @ 63 NONAME
+ _ZN4QTMS11QTMSFactoryC2Ev @ 64 NONAME
+ _ZN4QTMS11QTMSFactoryD0Ev @ 65 NONAME
+ _ZN4QTMS11QTMSFactoryD1Ev @ 66 NONAME
+ _ZN4QTMS11QTMSFactoryD2Ev @ 67 NONAME
+ _ZN4QTMS12QTMSRingTone11qt_metacallEN11QMetaObject4CallEiPPv @ 68 NONAME
+ _ZN4QTMS12QTMSRingTone11qt_metacastEPKc @ 69 NONAME
+ _ZN4QTMS12QTMSRingTone13RingtoneEventERKS0_NS_15QTMSSignalEventE @ 70 NONAME
+ _ZN4QTMS12QTMSRingTone16staticMetaObjectE @ 71 NONAME DATA 16
+ _ZN4QTMS12QTMSRingTone19getStaticMetaObjectEv @ 72 NONAME
+ _ZN4QTMS12QTMSRingTone4InitEiP8_GStringS2_ @ 73 NONAME
+ _ZN4QTMS12QTMSRingTone4MuteEv @ 74 NONAME
+ _ZN4QTMS12QTMSRingTone4PlayEv @ 75 NONAME
+ _ZN4QTMS12QTMSRingTone4StopEv @ 76 NONAME
+ _ZN4QTMS12QTMSRingTone5PauseEv @ 77 NONAME
+ _ZN4QTMS12QTMSRingTone6DeinitEv @ 78 NONAME
+ _ZN4QTMS12QTMSRingToneC1Ev @ 79 NONAME
+ _ZN4QTMS12QTMSRingToneC2Ev @ 80 NONAME
+ _ZN4QTMS12QTMSRingToneD0Ev @ 81 NONAME
+ _ZN4QTMS12QTMSRingToneD1Ev @ 82 NONAME
+ _ZN4QTMS12QTMSRingToneD2Ev @ 83 NONAME
+ _ZN4QTMS13QTMSAMRFormat11qt_metacallEN11QMetaObject4CallEiPPv @ 84 NONAME
+ _ZN4QTMS13QTMSAMRFormat11qt_metacastEPKc @ 85 NONAME
+ _ZN4QTMS13QTMSAMRFormat16staticMetaObjectE @ 86 NONAME DATA 16
+ _ZN4QTMS13QTMSAMRFormat19getStaticMetaObjectEv @ 87 NONAME
+ _ZN4QTMS13QTMSAMRFormatC1Ev @ 88 NONAME
+ _ZN4QTMS13QTMSAMRFormatC2Ev @ 89 NONAME
+ _ZN4QTMS13QTMSAMRFormatD0Ev @ 90 NONAME
+ _ZN4QTMS13QTMSAMRFormatD1Ev @ 91 NONAME
+ _ZN4QTMS13QTMSAMRFormatD2Ev @ 92 NONAME
+ _ZN4QTMS13QTMSMicSource11qt_metacallEN11QMetaObject4CallEiPPv @ 93 NONAME
+ _ZN4QTMS13QTMSMicSource11qt_metacastEPKc @ 94 NONAME
+ _ZN4QTMS13QTMSMicSource16staticMetaObjectE @ 95 NONAME DATA 16
+ _ZN4QTMS13QTMSMicSource19getStaticMetaObjectEv @ 96 NONAME
+ _ZN4QTMS13QTMSMicSource7GetTypeERi @ 97 NONAME
+ _ZN4QTMS13QTMSMicSourceC1Ev @ 98 NONAME
+ _ZN4QTMS13QTMSMicSourceC2Ev @ 99 NONAME
+ _ZN4QTMS13QTMSMicSourceD0Ev @ 100 NONAME
+ _ZN4QTMS13QTMSMicSourceD1Ev @ 101 NONAME
+ _ZN4QTMS13QTMSMicSourceD2Ev @ 102 NONAME
+ _ZN4QTMS13QTMSModemSink11qt_metacallEN11QMetaObject4CallEiPPv @ 103 NONAME
+ _ZN4QTMS13QTMSModemSink11qt_metacastEPKc @ 104 NONAME
+ _ZN4QTMS13QTMSModemSink16staticMetaObjectE @ 105 NONAME DATA 16
+ _ZN4QTMS13QTMSModemSink19getStaticMetaObjectEv @ 106 NONAME
+ _ZN4QTMS13QTMSModemSink7GetTypeERi @ 107 NONAME
+ _ZN4QTMS13QTMSModemSinkC1Ev @ 108 NONAME
+ _ZN4QTMS13QTMSModemSinkC2Ev @ 109 NONAME
+ _ZN4QTMS13QTMSModemSinkD0Ev @ 110 NONAME
+ _ZN4QTMS13QTMSModemSinkD1Ev @ 111 NONAME
+ _ZN4QTMS13QTMSModemSinkD2Ev @ 112 NONAME
+ _ZN4QTMS13QTMSPCMFormat11qt_metacallEN11QMetaObject4CallEiPPv @ 113 NONAME
+ _ZN4QTMS13QTMSPCMFormat11qt_metacastEPKc @ 114 NONAME
+ _ZN4QTMS13QTMSPCMFormat16staticMetaObjectE @ 115 NONAME DATA 16
+ _ZN4QTMS13QTMSPCMFormat19getStaticMetaObjectEv @ 116 NONAME
+ _ZN4QTMS13QTMSPCMFormatC1Ev @ 117 NONAME
+ _ZN4QTMS13QTMSPCMFormatC2Ev @ 118 NONAME
+ _ZN4QTMS13QTMSPCMFormatD0Ev @ 119 NONAME
+ _ZN4QTMS13QTMSPCMFormatD1Ev @ 120 NONAME
+ _ZN4QTMS13QTMSPCMFormatD2Ev @ 121 NONAME
+ _ZN4QTMS14QTMSClientSink11qt_metacallEN11QMetaObject4CallEiPPv @ 122 NONAME
+ _ZN4QTMS14QTMSClientSink11qt_metacastEPKc @ 123 NONAME
+ _ZN4QTMS14QTMSClientSink13ProcessBufferEPKN3TMS9TMSBufferE @ 124 NONAME
+ _ZN4QTMS14QTMSClientSink15BufferProcessedEPN3TMS9TMSBufferE @ 125 NONAME
+ _ZN4QTMS14QTMSClientSink16staticMetaObjectE @ 126 NONAME DATA 16
+ _ZN4QTMS14QTMSClientSink19getStaticMetaObjectEv @ 127 NONAME
+ _ZN4QTMS14QTMSClientSink7GetTypeERi @ 128 NONAME
+ _ZN4QTMS14QTMSClientSinkC1Ev @ 129 NONAME
+ _ZN4QTMS14QTMSClientSinkC2Ev @ 130 NONAME
+ _ZN4QTMS14QTMSClientSinkD0Ev @ 131 NONAME
+ _ZN4QTMS14QTMSClientSinkD1Ev @ 132 NONAME
+ _ZN4QTMS14QTMSClientSinkD2Ev @ 133 NONAME
+ _ZN4QTMS14QTMSG711Format10GetVADModeERi @ 134 NONAME
+ _ZN4QTMS14QTMSG711Format10SetVADModeEi @ 135 NONAME
+ _ZN4QTMS14QTMSG711Format11qt_metacallEN11QMetaObject4CallEiPPv @ 136 NONAME
+ _ZN4QTMS14QTMSG711Format11qt_metacastEPKc @ 137 NONAME
+ _ZN4QTMS14QTMSG711Format16staticMetaObjectE @ 138 NONAME DATA 16
+ _ZN4QTMS14QTMSG711Format19getStaticMetaObjectEv @ 139 NONAME
+ _ZN4QTMS14QTMSG711Format6GetCNGERi @ 140 NONAME
+ _ZN4QTMS14QTMSG711Format6GetPlcERi @ 141 NONAME
+ _ZN4QTMS14QTMSG711Format6SetCNGEi @ 142 NONAME
+ _ZN4QTMS14QTMSG711Format6SetPlcEi @ 143 NONAME
+ _ZN4QTMS14QTMSG711Format7GetModeERi @ 144 NONAME
+ _ZN4QTMS14QTMSG711Format7SetModeEi @ 145 NONAME
+ _ZN4QTMS14QTMSG711FormatC1Ev @ 146 NONAME
+ _ZN4QTMS14QTMSG711FormatC2Ev @ 147 NONAME
+ _ZN4QTMS14QTMSG711FormatD0Ev @ 148 NONAME
+ _ZN4QTMS14QTMSG711FormatD1Ev @ 149 NONAME
+ _ZN4QTMS14QTMSG711FormatD2Ev @ 150 NONAME
+ _ZN4QTMS14QTMSG729Format10GetVADModeERi @ 151 NONAME
+ _ZN4QTMS14QTMSG729Format10SetVADModeEi @ 152 NONAME
+ _ZN4QTMS14QTMSG729Format11qt_metacallEN11QMetaObject4CallEiPPv @ 153 NONAME
+ _ZN4QTMS14QTMSG729Format11qt_metacastEPKc @ 154 NONAME
+ _ZN4QTMS14QTMSG729Format16staticMetaObjectE @ 155 NONAME DATA 16
+ _ZN4QTMS14QTMSG729Format19getStaticMetaObjectEv @ 156 NONAME
+ _ZN4QTMS14QTMSG729FormatC1Ev @ 157 NONAME
+ _ZN4QTMS14QTMSG729FormatC2Ev @ 158 NONAME
+ _ZN4QTMS14QTMSG729FormatD0Ev @ 159 NONAME
+ _ZN4QTMS14QTMSG729FormatD1Ev @ 160 NONAME
+ _ZN4QTMS14QTMSG729FormatD2Ev @ 161 NONAME
+ _ZN4QTMS14QTMSGainEffect11GetMaxLevelERj @ 162 NONAME
+ _ZN4QTMS14QTMSGainEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 163 NONAME
+ _ZN4QTMS14QTMSGainEffect11qt_metacastEPKc @ 164 NONAME
+ _ZN4QTMS14QTMSGainEffect12EffectsEventERKNS_10QTMSEffectENS_15QTMSSignalEventE @ 165 NONAME
+ _ZN4QTMS14QTMSGainEffect16staticMetaObjectE @ 166 NONAME DATA 16
+ _ZN4QTMS14QTMSGainEffect19getStaticMetaObjectEv @ 167 NONAME
+ _ZN4QTMS14QTMSGainEffect7GetTypeERi @ 168 NONAME
+ _ZN4QTMS14QTMSGainEffect8GetLevelERj @ 169 NONAME
+ _ZN4QTMS14QTMSGainEffect8SetLevelEj @ 170 NONAME
+ _ZN4QTMS14QTMSGainEffectC1Ev @ 171 NONAME
+ _ZN4QTMS14QTMSGainEffectC2Ev @ 172 NONAME
+ _ZN4QTMS14QTMSGainEffectD0Ev @ 173 NONAME
+ _ZN4QTMS14QTMSGainEffectD1Ev @ 174 NONAME
+ _ZN4QTMS14QTMSGainEffectD2Ev @ 175 NONAME
+ _ZN4QTMS14QTMSILBCFormat10GetVADModeERi @ 176 NONAME
+ _ZN4QTMS14QTMSILBCFormat10SetVADModeEi @ 177 NONAME
+ _ZN4QTMS14QTMSILBCFormat11qt_metacallEN11QMetaObject4CallEiPPv @ 178 NONAME
+ _ZN4QTMS14QTMSILBCFormat11qt_metacastEPKc @ 179 NONAME
+ _ZN4QTMS14QTMSILBCFormat16staticMetaObjectE @ 180 NONAME DATA 16
+ _ZN4QTMS14QTMSILBCFormat19getStaticMetaObjectEv @ 181 NONAME
+ _ZN4QTMS14QTMSILBCFormat6GetCNGERi @ 182 NONAME
+ _ZN4QTMS14QTMSILBCFormat6SetCNGEi @ 183 NONAME
+ _ZN4QTMS14QTMSILBCFormat7GetModeERi @ 184 NONAME
+ _ZN4QTMS14QTMSILBCFormat7SetModeEi @ 185 NONAME
+ _ZN4QTMS14QTMSILBCFormatC1Ev @ 186 NONAME
+ _ZN4QTMS14QTMSILBCFormatC2Ev @ 187 NONAME
+ _ZN4QTMS14QTMSILBCFormatD0Ev @ 188 NONAME
+ _ZN4QTMS14QTMSILBCFormatD1Ev @ 189 NONAME
+ _ZN4QTMS14QTMSILBCFormatD2Ev @ 190 NONAME
+ _ZN4QTMS14QTMSInbandTone11qt_metacallEN11QMetaObject4CallEiPPv @ 191 NONAME
+ _ZN4QTMS14QTMSInbandTone11qt_metacastEPKc @ 192 NONAME
+ _ZN4QTMS14QTMSInbandTone15InbandToneEventERKS0_NS_15QTMSSignalEventE @ 193 NONAME
+ _ZN4QTMS14QTMSInbandTone16staticMetaObjectE @ 194 NONAME DATA 16
+ _ZN4QTMS14QTMSInbandTone19getStaticMetaObjectEv @ 195 NONAME
+ _ZN4QTMS14QTMSInbandTone4StopEv @ 196 NONAME
+ _ZN4QTMS14QTMSInbandTone5StartEi @ 197 NONAME
+ _ZN4QTMS14QTMSInbandToneC1Ev @ 198 NONAME
+ _ZN4QTMS14QTMSInbandToneC2Ev @ 199 NONAME
+ _ZN4QTMS14QTMSInbandToneD0Ev @ 200 NONAME
+ _ZN4QTMS14QTMSInbandToneD1Ev @ 201 NONAME
+ _ZN4QTMS14QTMSInbandToneD2Ev @ 202 NONAME
+ _ZN4QTMS15QTMSModemSource11qt_metacallEN11QMetaObject4CallEiPPv @ 203 NONAME
+ _ZN4QTMS15QTMSModemSource11qt_metacastEPKc @ 204 NONAME
+ _ZN4QTMS15QTMSModemSource16staticMetaObjectE @ 205 NONAME DATA 16
+ _ZN4QTMS15QTMSModemSource19getStaticMetaObjectEv @ 206 NONAME
+ _ZN4QTMS15QTMSModemSource7GetTypeERi @ 207 NONAME
+ _ZN4QTMS15QTMSModemSourceC1Ev @ 208 NONAME
+ _ZN4QTMS15QTMSModemSourceC2Ev @ 209 NONAME
+ _ZN4QTMS15QTMSModemSourceD0Ev @ 210 NONAME
+ _ZN4QTMS15QTMSModemSourceD1Ev @ 211 NONAME
+ _ZN4QTMS15QTMSModemSourceD2Ev @ 212 NONAME
+ _ZN4QTMS15QTMSSpeakerSink11qt_metacallEN11QMetaObject4CallEiPPv @ 213 NONAME
+ _ZN4QTMS15QTMSSpeakerSink11qt_metacastEPKc @ 214 NONAME
+ _ZN4QTMS15QTMSSpeakerSink16staticMetaObjectE @ 215 NONAME DATA 16
+ _ZN4QTMS15QTMSSpeakerSink19getStaticMetaObjectEv @ 216 NONAME
+ _ZN4QTMS15QTMSSpeakerSink7GetTypeERi @ 217 NONAME
+ _ZN4QTMS15QTMSSpeakerSinkC1Ev @ 218 NONAME
+ _ZN4QTMS15QTMSSpeakerSinkC2Ev @ 219 NONAME
+ _ZN4QTMS15QTMSSpeakerSinkD0Ev @ 220 NONAME
+ _ZN4QTMS15QTMSSpeakerSinkD1Ev @ 221 NONAME
+ _ZN4QTMS15QTMSSpeakerSinkD2Ev @ 222 NONAME
+ _ZN4QTMS16QTMSClientSource10FillBufferERN3TMS9TMSBufferE @ 223 NONAME
+ _ZN4QTMS16QTMSClientSource11qt_metacallEN11QMetaObject4CallEiPPv @ 224 NONAME
+ _ZN4QTMS16QTMSClientSource11qt_metacastEPKc @ 225 NONAME
+ _ZN4QTMS16QTMSClientSource12BufferFilledERN3TMS9TMSBufferE @ 226 NONAME
+ _ZN4QTMS16QTMSClientSource13ProcessBufferEPN3TMS9TMSBufferE @ 227 NONAME
+ _ZN4QTMS16QTMSClientSource14GetEnqueueModeERi @ 228 NONAME
+ _ZN4QTMS16QTMSClientSource14SetEnqueueModeEi @ 229 NONAME
+ _ZN4QTMS16QTMSClientSource15BufferProcessedEPKN3TMS9TMSBufferEi @ 230 NONAME
+ _ZN4QTMS16QTMSClientSource16staticMetaObjectE @ 231 NONAME DATA 16
+ _ZN4QTMS16QTMSClientSource19getStaticMetaObjectEv @ 232 NONAME
+ _ZN4QTMS16QTMSClientSource5FlushEv @ 233 NONAME
+ _ZN4QTMS16QTMSClientSource7GetTypeERi @ 234 NONAME
+ _ZN4QTMS16QTMSClientSourceC1Ev @ 235 NONAME
+ _ZN4QTMS16QTMSClientSourceC2Ev @ 236 NONAME
+ _ZN4QTMS16QTMSClientSourceD0Ev @ 237 NONAME
+ _ZN4QTMS16QTMSClientSourceD1Ev @ 238 NONAME
+ _ZN4QTMS16QTMSClientSourceD2Ev @ 239 NONAME
+ _ZN4QTMS16QTMSVolumeEffect11GetMaxLevelERj @ 240 NONAME
+ _ZN4QTMS16QTMSVolumeEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 241 NONAME
+ _ZN4QTMS16QTMSVolumeEffect11qt_metacastEPKc @ 242 NONAME
+ _ZN4QTMS16QTMSVolumeEffect12EffectsEventERKNS_10QTMSEffectENS_15QTMSSignalEventE @ 243 NONAME
+ _ZN4QTMS16QTMSVolumeEffect16staticMetaObjectE @ 244 NONAME DATA 16
+ _ZN4QTMS16QTMSVolumeEffect19getStaticMetaObjectEv @ 245 NONAME
+ _ZN4QTMS16QTMSVolumeEffect7GetTypeERi @ 246 NONAME
+ _ZN4QTMS16QTMSVolumeEffect8GetLevelERj @ 247 NONAME
+ _ZN4QTMS16QTMSVolumeEffect8SetLevelEj @ 248 NONAME
+ _ZN4QTMS16QTMSVolumeEffectC1Ev @ 249 NONAME
+ _ZN4QTMS16QTMSVolumeEffectC2Ev @ 250 NONAME
+ _ZN4QTMS16QTMSVolumeEffectD0Ev @ 251 NONAME
+ _ZN4QTMS16QTMSVolumeEffectD1Ev @ 252 NONAME
+ _ZN4QTMS16QTMSVolumeEffectD2Ev @ 253 NONAME
+ _ZN4QTMS17QTMSGlobalRouting11qt_metacallEN11QMetaObject4CallEiPPv @ 254 NONAME
+ _ZN4QTMS17QTMSGlobalRouting11qt_metacastEPKc @ 255 NONAME
+ _ZN4QTMS17QTMSGlobalRouting16staticMetaObjectE @ 256 NONAME DATA 16
+ _ZN4QTMS17QTMSGlobalRouting17GetPreviousOutputERi @ 257 NONAME
+ _ZN4QTMS17QTMSGlobalRouting18GlobalRoutingEventERKS0_NS_15QTMSSignalEventEi @ 258 NONAME
+ _ZN4QTMS17QTMSGlobalRouting19GetAvailableOutputsERSt6vectorIjSaIjEE @ 259 NONAME
+ _ZN4QTMS17QTMSGlobalRouting19getStaticMetaObjectEv @ 260 NONAME
+ _ZN4QTMS17QTMSGlobalRouting9GetOutputERi @ 261 NONAME
+ _ZN4QTMS17QTMSGlobalRouting9SetOutputEi @ 262 NONAME
+ _ZN4QTMS17QTMSGlobalRoutingC1Ev @ 263 NONAME
+ _ZN4QTMS17QTMSGlobalRoutingC2Ev @ 264 NONAME
+ _ZN4QTMS17QTMSGlobalRoutingD0Ev @ 265 NONAME
+ _ZN4QTMS17QTMSGlobalRoutingD1Ev @ 266 NONAME
+ _ZN4QTMS17QTMSGlobalRoutingD2Ev @ 267 NONAME
+ _ZN4QTMS19QTMSGlobalVolEffect11GetMaxLevelERj @ 268 NONAME
+ _ZN4QTMS19QTMSGlobalVolEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 269 NONAME
+ _ZN4QTMS19QTMSGlobalVolEffect11qt_metacastEPKc @ 270 NONAME
+ _ZN4QTMS19QTMSGlobalVolEffect12EffectsEventERKNS_10QTMSEffectENS_15QTMSSignalEventE @ 271 NONAME
+ _ZN4QTMS19QTMSGlobalVolEffect16staticMetaObjectE @ 272 NONAME DATA 16
+ _ZN4QTMS19QTMSGlobalVolEffect19getStaticMetaObjectEv @ 273 NONAME
+ _ZN4QTMS19QTMSGlobalVolEffect7GetTypeERi @ 274 NONAME
+ _ZN4QTMS19QTMSGlobalVolEffect8GetLevelERj @ 275 NONAME
+ _ZN4QTMS19QTMSGlobalVolEffect8SetLevelEj @ 276 NONAME
+ _ZN4QTMS19QTMSGlobalVolEffectC1Ev @ 277 NONAME
+ _ZN4QTMS19QTMSGlobalVolEffectC2Ev @ 278 NONAME
+ _ZN4QTMS19QTMSGlobalVolEffectD0Ev @ 279 NONAME
+ _ZN4QTMS19QTMSGlobalVolEffectD1Ev @ 280 NONAME
+ _ZN4QTMS19QTMSGlobalVolEffectD2Ev @ 281 NONAME
+ _ZN4QTMS20QTMSGlobalGainEffect11GetMaxLevelERj @ 282 NONAME
+ _ZN4QTMS20QTMSGlobalGainEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 283 NONAME
+ _ZN4QTMS20QTMSGlobalGainEffect11qt_metacastEPKc @ 284 NONAME
+ _ZN4QTMS20QTMSGlobalGainEffect12EffectsEventERKNS_10QTMSEffectENS_15QTMSSignalEventE @ 285 NONAME
+ _ZN4QTMS20QTMSGlobalGainEffect16staticMetaObjectE @ 286 NONAME DATA 16
+ _ZN4QTMS20QTMSGlobalGainEffect19getStaticMetaObjectEv @ 287 NONAME
+ _ZN4QTMS20QTMSGlobalGainEffect7GetTypeERi @ 288 NONAME
+ _ZN4QTMS20QTMSGlobalGainEffect8GetLevelERj @ 289 NONAME
+ _ZN4QTMS20QTMSGlobalGainEffect8SetLevelEj @ 290 NONAME
+ _ZN4QTMS20QTMSGlobalGainEffectC1Ev @ 291 NONAME
+ _ZN4QTMS20QTMSGlobalGainEffectC2Ev @ 292 NONAME
+ _ZN4QTMS20QTMSGlobalGainEffectD0Ev @ 293 NONAME
+ _ZN4QTMS20QTMSGlobalGainEffectD1Ev @ 294 NONAME
+ _ZN4QTMS20QTMSGlobalGainEffectD2Ev @ 295 NONAME
+ _ZN4QTMS8QTMSCall11GetCallTypeEv @ 296 NONAME
+ _ZN4QTMS8QTMSCall11qt_metacallEN11QMetaObject4CallEiPPv @ 297 NONAME
+ _ZN4QTMS8QTMSCall11qt_metacastEPKc @ 298 NONAME
+ _ZN4QTMS8QTMSCall12CreateStreamEiRPNS_10QTMSStreamE @ 299 NONAME
+ _ZN4QTMS8QTMSCall12DeleteStreamERPNS_10QTMSStreamE @ 300 NONAME
+ _ZN4QTMS8QTMSCall16GetCallContextIdERj @ 301 NONAME
+ _ZN4QTMS8QTMSCall16staticMetaObjectE @ 302 NONAME DATA 16
+ _ZN4QTMS8QTMSCall19getStaticMetaObjectEv @ 303 NONAME
+ _ZN4QTMS8QTMSCallC1Ev @ 304 NONAME
+ _ZN4QTMS8QTMSCallC2Ev @ 305 NONAME
+ _ZN4QTMS8QTMSCallD0Ev @ 306 NONAME
+ _ZN4QTMS8QTMSCallD1Ev @ 307 NONAME
+ _ZN4QTMS8QTMSCallD2Ev @ 308 NONAME
+ _ZN4QTMS8QTMSDTMF11qt_metacallEN11QMetaObject4CallEiPPv @ 309 NONAME
+ _ZN4QTMS8QTMSDTMF11qt_metacastEPKc @ 310 NONAME
+ _ZN4QTMS8QTMSDTMF16staticMetaObjectE @ 311 NONAME DATA 16
+ _ZN4QTMS8QTMSDTMF19getStaticMetaObjectEv @ 312 NONAME
+ _ZN4QTMS8QTMSDTMF25ContinueDTMFStringSendingEi @ 313 NONAME
+ _ZN4QTMS8QTMSDTMF4StopEv @ 314 NONAME
+ _ZN4QTMS8QTMSDTMF5StartEv @ 315 NONAME
+ _ZN4QTMS8QTMSDTMF7SetToneEP8_GString @ 316 NONAME
+ _ZN4QTMS8QTMSDTMF9DTMFEventERKS0_NS_15QTMSSignalEventE @ 317 NONAME
+ _ZN4QTMS8QTMSDTMFC1Ev @ 318 NONAME
+ _ZN4QTMS8QTMSDTMFC2Ev @ 319 NONAME
+ _ZN4QTMS8QTMSDTMFD0Ev @ 320 NONAME
+ _ZN4QTMS8QTMSDTMFD1Ev @ 321 NONAME
+ _ZN4QTMS8QTMSDTMFD2Ev @ 322 NONAME
+ _ZNK4QTMS10QTMSStream10metaObjectEv @ 323 NONAME
+ _ZNK4QTMS11QTMSFactory10metaObjectEv @ 324 NONAME
+ _ZNK4QTMS12QTMSRingTone10metaObjectEv @ 325 NONAME
+ _ZNK4QTMS13QTMSAMRFormat10metaObjectEv @ 326 NONAME
+ _ZNK4QTMS13QTMSMicSource10metaObjectEv @ 327 NONAME
+ _ZNK4QTMS13QTMSModemSink10metaObjectEv @ 328 NONAME
+ _ZNK4QTMS13QTMSPCMFormat10metaObjectEv @ 329 NONAME
+ _ZNK4QTMS14QTMSClientSink10metaObjectEv @ 330 NONAME
+ _ZNK4QTMS14QTMSG711Format10metaObjectEv @ 331 NONAME
+ _ZNK4QTMS14QTMSG729Format10metaObjectEv @ 332 NONAME
+ _ZNK4QTMS14QTMSGainEffect10metaObjectEv @ 333 NONAME
+ _ZNK4QTMS14QTMSILBCFormat10metaObjectEv @ 334 NONAME
+ _ZNK4QTMS14QTMSInbandTone10metaObjectEv @ 335 NONAME
+ _ZNK4QTMS15QTMSModemSource10metaObjectEv @ 336 NONAME
+ _ZNK4QTMS15QTMSSpeakerSink10metaObjectEv @ 337 NONAME
+ _ZNK4QTMS16QTMSClientSource10metaObjectEv @ 338 NONAME
+ _ZNK4QTMS16QTMSVolumeEffect10metaObjectEv @ 339 NONAME
+ _ZNK4QTMS17QTMSGlobalRouting10metaObjectEv @ 340 NONAME
+ _ZNK4QTMS19QTMSGlobalVolEffect10metaObjectEv @ 341 NONAME
+ _ZNK4QTMS20QTMSGlobalGainEffect10metaObjectEv @ 342 NONAME
+ _ZNK4QTMS8QTMSCall10metaObjectEv @ 343 NONAME
+ _ZNK4QTMS8QTMSDTMF10metaObjectEv @ 344 NONAME
+ _ZTIN4QTMS10QTMSFormatE @ 345 NONAME
+ _ZTIN4QTMS10QTMSStreamE @ 346 NONAME
+ _ZTIN4QTMS11QTMSFactoryE @ 347 NONAME
+ _ZTIN4QTMS12QTMSRingToneE @ 348 NONAME
+ _ZTIN4QTMS13QTMSAMRFormatE @ 349 NONAME
+ _ZTIN4QTMS13QTMSMicSourceE @ 350 NONAME
+ _ZTIN4QTMS13QTMSModemSinkE @ 351 NONAME
+ _ZTIN4QTMS13QTMSPCMFormatE @ 352 NONAME
+ _ZTIN4QTMS14QTMSClientSinkE @ 353 NONAME
+ _ZTIN4QTMS14QTMSG711FormatE @ 354 NONAME
+ _ZTIN4QTMS14QTMSG729FormatE @ 355 NONAME
+ _ZTIN4QTMS14QTMSGainEffectE @ 356 NONAME
+ _ZTIN4QTMS14QTMSILBCFormatE @ 357 NONAME
+ _ZTIN4QTMS14QTMSInbandToneE @ 358 NONAME
+ _ZTIN4QTMS15QTMSModemSourceE @ 359 NONAME
+ _ZTIN4QTMS15QTMSSpeakerSinkE @ 360 NONAME
+ _ZTIN4QTMS16QTMSClientSourceE @ 361 NONAME
+ _ZTIN4QTMS16QTMSVolumeEffectE @ 362 NONAME
+ _ZTIN4QTMS17QTMSGlobalRoutingE @ 363 NONAME
+ _ZTIN4QTMS19QTMSGlobalVolEffectE @ 364 NONAME
+ _ZTIN4QTMS20QTMSGlobalGainEffectE @ 365 NONAME
+ _ZTIN4QTMS8QTMSCallE @ 366 NONAME
+ _ZTIN4QTMS8QTMSDTMFE @ 367 NONAME
+ _ZTVN4QTMS10QTMSFormatE @ 368 NONAME
+ _ZTVN4QTMS10QTMSStreamE @ 369 NONAME
+ _ZTVN4QTMS11QTMSFactoryE @ 370 NONAME
+ _ZTVN4QTMS12QTMSRingToneE @ 371 NONAME
+ _ZTVN4QTMS13QTMSAMRFormatE @ 372 NONAME
+ _ZTVN4QTMS13QTMSMicSourceE @ 373 NONAME
+ _ZTVN4QTMS13QTMSModemSinkE @ 374 NONAME
+ _ZTVN4QTMS13QTMSPCMFormatE @ 375 NONAME
+ _ZTVN4QTMS14QTMSClientSinkE @ 376 NONAME
+ _ZTVN4QTMS14QTMSG711FormatE @ 377 NONAME
+ _ZTVN4QTMS14QTMSG729FormatE @ 378 NONAME
+ _ZTVN4QTMS14QTMSGainEffectE @ 379 NONAME
+ _ZTVN4QTMS14QTMSILBCFormatE @ 380 NONAME
+ _ZTVN4QTMS14QTMSInbandToneE @ 381 NONAME
+ _ZTVN4QTMS15QTMSModemSourceE @ 382 NONAME
+ _ZTVN4QTMS15QTMSSpeakerSinkE @ 383 NONAME
+ _ZTVN4QTMS16QTMSClientSourceE @ 384 NONAME
+ _ZTVN4QTMS16QTMSVolumeEffectE @ 385 NONAME
+ _ZTVN4QTMS17QTMSGlobalRoutingE @ 386 NONAME
+ _ZTVN4QTMS19QTMSGlobalVolEffectE @ 387 NONAME
+ _ZTVN4QTMS20QTMSGlobalGainEffectE @ 388 NONAME
+ _ZTVN4QTMS8QTMSCallE @ 389 NONAME
+ _ZTVN4QTMS8QTMSDTMFE @ 390 NONAME
+ _ZThn8_N4QTMS13QTMSAMRFormatD0Ev @ 391 NONAME
+ _ZThn8_N4QTMS13QTMSAMRFormatD1Ev @ 392 NONAME
+ _ZThn8_N4QTMS13QTMSMicSource7GetTypeERi @ 393 NONAME
+ _ZThn8_N4QTMS13QTMSModemSink7GetTypeERi @ 394 NONAME
+ _ZThn8_N4QTMS13QTMSPCMFormatD0Ev @ 395 NONAME
+ _ZThn8_N4QTMS13QTMSPCMFormatD1Ev @ 396 NONAME
+ _ZThn8_N4QTMS14QTMSClientSink7GetTypeERi @ 397 NONAME
+ _ZThn8_N4QTMS14QTMSG711FormatD0Ev @ 398 NONAME
+ _ZThn8_N4QTMS14QTMSG711FormatD1Ev @ 399 NONAME
+ _ZThn8_N4QTMS14QTMSG729FormatD0Ev @ 400 NONAME
+ _ZThn8_N4QTMS14QTMSG729FormatD1Ev @ 401 NONAME
+ _ZThn8_N4QTMS14QTMSGainEffect7GetTypeERi @ 402 NONAME
+ _ZThn8_N4QTMS14QTMSILBCFormatD0Ev @ 403 NONAME
+ _ZThn8_N4QTMS14QTMSILBCFormatD1Ev @ 404 NONAME
+ _ZThn8_N4QTMS15QTMSModemSource7GetTypeERi @ 405 NONAME
+ _ZThn8_N4QTMS15QTMSSpeakerSink7GetTypeERi @ 406 NONAME
+ _ZThn8_N4QTMS16QTMSClientSource7GetTypeERi @ 407 NONAME
+ _ZThn8_N4QTMS16QTMSVolumeEffect7GetTypeERi @ 408 NONAME
+ _ZThn8_N4QTMS19QTMSGlobalVolEffect7GetTypeERi @ 409 NONAME
+ _ZThn8_N4QTMS20QTMSGlobalGainEffect7GetTypeERi @ 410 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsamrimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_AMR_FORMAT_IMPL_H
+#define QTMS_AMR_FORMAT_IMPL_H
+
+#include <qtms.h>
+#include <qtmsamrformat.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSFormat;
+}
+
+namespace QTMS {
+
+// Class declaration
+class QTMSAMRFormatImpl : public QTMSAMRFormat
+ {
+public:
+
+ static gint Create(QTMSFormat*& qformat, TMS::TMSFormat*& tmsformat);
+ virtual ~QTMSAMRFormatImpl();
+
+ gint GetFormat(TMS::TMSFormat*& fmt);
+
+ // From QTMSFormat
+ gint GetType(QTMSFormatType& fmttype);
+
+private:
+ QTMSAMRFormatImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_AMR_FORMAT_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsbufferimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_BUFFER_IMPL_H
+#define QTMS_BUFFER_IMPL_H
+
+#include <qtms.h>
+
+namespace QTMS {
+
+// FORWARD DECLARATIONS
+class QTMSBuffer;
+
+// TMSBufferImpl class
+class QTMSBufferImpl
+ {
+public:
+ static gint Create(QTMSBufferType ctype, guint size,
+ QTMSBuffer*& tmsbuffer);
+ static gint Delete(QTMSBuffer*& tmsbuffer);
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_BUFFER_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmscallimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_CALL_IMPL_H
+#define QTMS_CALL_IMPL_H
+
+#include <glib.h>
+#include <qtmscall.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSCall;
+}
+
+namespace QTMS {
+
+// FORWARD DECLARATIONS
+class QTMSStream;
+class QTMSDTMF;
+class QTMSRingTone;
+
+// QTMSCallImpl class
+class QTMSCallImpl : public QTMSCall
+ {
+public:
+ static gint Create(QTMSCall*& qtmscall, TMS::TMSCall*& tmscall);
+
+ virtual ~QTMSCallImpl();
+
+ // From QTMSCallBody
+ // QTMSCallType GetCallType();
+ // gint GetCallContextId(guint& ctxid);
+ // gint CreateStream(QTMSStreamType type, QTMSStream*& strm);
+ // gint DeleteStream(QTMSStream*& strm);
+
+private:
+ // TMS::TMSCall* iTmsCall;
+ QTMSCallImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_CALL_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsclientsinkimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_CLIENT_SINK_IMPL_H
+#define QTMS_CLIENT_SINK_IMPL_H
+
+#include <qtms.h>
+#include <qtmsclientsink.h>
+#include <tmsclientsinkobsrvr.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSBuffer;
+class TMSSink;
+}
+
+namespace QTMS {
+
+// QTMSClientSinkImpl class
+class QTMSClientSinkImpl : public QTMSClientSink,
+ public TMS::TMSClientSinkObserver
+ {
+public:
+ static gint Create(QTMSSink*& qsink, TMS::TMSSink*& tmsclientsink);
+ virtual ~QTMSClientSinkImpl();
+
+ gint AddObserver(TMS::TMSClientSinkObserver& obsrvr, gpointer user_data);
+ gint RemoveObserver(TMS::TMSClientSinkObserver& obsrvr);
+
+ gint GetSink(TMS::TMSSink*& tmssink);
+
+ // From TMSClientSinkObserver
+ void ProcessBuffer(const TMS::TMSBuffer* buffer);
+
+private:
+ QTMSClientSinkImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_CLIENT_SINK_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsclientsourceimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_CLIENT_SOURCE_IMPL_H
+#define QTMS_CLIENT_SOURCE_IMPL_H
+
+#include <qtms.h>
+#include <qtmsclientsource.h>
+#include <tmsclientsourceobsrvr.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSBuffer;
+class TMSSource;
+}
+
+namespace QTMS {
+
+// QTMSClientSourceImpl class
+class QTMSClientSourceImpl : public QTMSClientSource,
+ public TMS::TMSClientSourceObserver
+ {
+public:
+
+ static gint Create(QTMSSource*& qsource, TMS::TMSSource*& tmssource);
+ virtual ~QTMSClientSourceImpl();
+
+ gint AddObserver(TMS::TMSClientSourceObserver& obsrvr, gpointer user_data);
+ gint RemoveObserver(TMS::TMSClientSourceObserver& obsrvr);
+
+ gint GetSource(TMS::TMSSource*& tmssource);
+
+ //From TMSClientSourceObserver
+ void FillBuffer(TMS::TMSBuffer& buffer);
+ void BufferProcessed(const TMS::TMSBuffer* buffer, gint reason);
+
+private:
+ QTMSClientSourceImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_CLIENT_SOURCE_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsdtmfimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_DTMF_IMPL_H
+#define QTMS_DTMF_IMPL_H
+
+#include <tms.h>
+#include <tmsdtmfobsrvr.h>
+#include <qtms.h>
+#include <qtmsdtmf.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSDTMF;
+}
+
+namespace QTMS {
+
+// QTMSDTMFImpl class
+class QTMSDTMFImpl : public QTMSDTMF,
+ public TMS::TMSDTMFObserver
+ {
+public:
+ static gint Create(QTMSDTMF*& qdtmf, TMS::TMSDTMF*& tmsdtmf);
+ virtual ~QTMSDTMFImpl();
+
+ gint AddObserver(TMS::TMSDTMFObserver& obsrvr, gpointer user_data);
+ gint RemoveObserver(TMS::TMSDTMFObserver& obsrvr);
+
+ //from TMS::TMSDTMFObserver
+ void DTMFEvent(const TMS::TMSDTMF& dtmf, TMS::TMSSignalEvent event);
+
+private:
+ QTMSDTMFImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_DTMF_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsfactoryimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMSFACTORYIMPL_H_
+#define QTMSFACTORYIMPL_H_
+
+#include <e32cmn.h>
+#include <qtms.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSFactory;
+}
+
+namespace QTMS {
+
+// FORWARD DECLARATIONS
+class QTMSCall;
+class QTMSFormat;
+class QTMSEffect;
+class QTMSBuffer;
+class QTMSSource;
+class QTMSSink;
+class QTMSGlobalRouting;
+class QTMSRTPSession;
+class QTMSDTMF;
+class QTMSRingTone;
+class QTMSInbandTone;
+
+// CLASS DECLARATION
+class QTMSFactoryImpl
+ {
+public:
+ QTMSFactoryImpl();
+ virtual ~QTMSFactoryImpl();
+
+ gint CreateCall(QTMSCallType ctype, QTMSCall*& QTMScall, guint ctxid);
+ gint DeleteCall(QTMSCall*& QTMSct);
+ gint IsCallTypeSupported(QTMSCallType ctype, gboolean& flag);
+ gint GetSupportedFormats(const QTMSStreamType strmtype,
+ FormatVector& fmtlist);
+ gint CreateFormat(QTMSFormatType fmttype, QTMSFormat*& QTMSfmt);
+ gint DeleteFormat(QTMSFormat*& QTMSfmt);
+ gint CreateEffect(QTMSEffectType QTMSeffecttype,
+ QTMSEffect*& QTMSeffect);
+ gint DeleteEffect(QTMSEffect*& QTMSeffect);
+ gint CreateBuffer(QTMSBufferType buffertype, guint size,
+ QTMSBuffer*& QTMSbuffer);
+ gint DeleteBuffer(QTMSBuffer*& QTMSbuffer);
+ gint CreateSource(QTMSSourceType srctype, QTMSSource*& QTMSsrc);
+ gint DeleteSource(QTMSSource*& QTMSsrc);
+ gint CreateSink(QTMSSinkType sinktype, QTMSSink*& QTMSsink);
+ gint DeleteSink(QTMSSink*& QTMSsink);
+ gint CreateGlobalRouting(QTMSGlobalRouting*& globrouting);
+ gint DeleteGlobalRouting(QTMSGlobalRouting*& globrouting);
+ gint CreateDTMF(QTMSStreamType streamid, QTMSDTMF*& dtmf);
+ gint DeleteDTMF(QTMSDTMF*& dtmf);
+ gint CreateRingTonePlayer(QTMSRingTone*& rt);
+ gint DeleteRingTonePlayer(QTMSRingTone*& rt);
+ gint CreateInbandTonePlayer(QTMSInbandTone*& inbandtone);
+ gint DeleteInbandTonePlayer(QTMSInbandTone*& inbandtone);
+
+private:
+ TMS::TMSFactory *iFactory;
+ };
+
+} //namespace QTMS
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsg711impl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_G711_FORMAT_IMPL_H
+#define QTMS_G711_FORMAT_IMPL_H
+
+#include <qtms.h>
+#include <qtmsg711format.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSFormat;
+}
+
+namespace QTMS {
+
+// QTMSG711FormatImpl class
+class QTMSG711FormatImpl : public QTMSG711Format
+ {
+public:
+ static gint Create(QTMSFormat*& qformat, TMS::TMSFormat*& tmsformat);
+ virtual ~QTMSG711FormatImpl();
+
+ gint GetFormat(TMS::TMSFormat*& fmt);
+
+ // From QTMSFormat
+ gint GetType(QTMSFormatType& fmttype);
+
+private:
+ QTMSG711FormatImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_G711_FORMAT_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsg729impl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_G729_FORMAT_IMPL_H
+#define QTMS_G729_FORMAT_IMPL_H
+
+#include <qtms.h>
+#include <qtmsg729format.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSFormat;
+}
+
+namespace QTMS {
+
+// QTMSG729FormatImpl class
+class QTMSG729FormatImpl : public QTMSG729Format
+ {
+public:
+
+ static gint Create(QTMSFormat*& qformat, TMS::TMSFormat*& tmsformat);
+ virtual ~QTMSG729FormatImpl();
+
+ gint GetFormat(TMS::TMSFormat*& fmt);
+
+ // From QTMSFormat
+ gint GetType(QTMSFormatType& fmttype);
+
+private:
+ QTMSG729FormatImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_G729_FORMAT_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsgaineffectimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_GAIN_EFFECT_IMPL_H
+#define QTMS_GAIN_EFFECT_IMPL_H
+
+#include <qtms.h>
+#include <tms.h>
+#include <qtmsgaineffect.h>
+#include <tmseffectobsrvr.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSEffect;
+}
+
+namespace QTMS {
+
+// QTMSGainEffectImpl class
+class QTMSGainEffectImpl : public QTMSGainEffect,
+ public TMS::TMSEffectObserver
+ {
+public:
+ static gint Create(QTMSEffect*& qvol, TMS::TMSEffect*& tmsvol);
+ virtual ~QTMSGainEffectImpl();
+
+ gint AddObserver(TMS::TMSEffectObserver& obsrvr, gpointer user_data);
+ gint RemoveObserver(TMS::TMSEffectObserver& obsrvr);
+
+ gint GetEffect(TMS::TMSEffect*& tmseffect);
+
+ //From TMSEffectObserver
+ void EffectsEvent(const TMS::TMSEffect& tmseffect,
+ TMS::TMSSignalEvent event);
+
+private:
+ QTMSGainEffectImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_GAIN_EFFECT_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsglobalgaineffectimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_GLOBAL_GAIN_EFFECT_IMPL_H
+#define QTMS_GLOBAL_GAIN_EFFECT_IMPL_H
+
+#include <qtms.h>
+#include <qtmsglobalgaineffect.h>
+#include <tmseffectobsrvr.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSEffect;
+}
+
+namespace QTMS {
+
+// FORWARD DECLARATIONS
+class QTMSEffect;
+
+// QTMSGlobalGainEffectImpl class
+class QTMSGlobalGainEffectImpl : public QTMSGlobalGainEffect,
+ public TMS::TMSEffectObserver
+ {
+public:
+ static gint Create(QTMSEffect*& qglobalgain,
+ TMS::TMSEffect*& tmsglobalgain);
+ virtual ~QTMSGlobalGainEffectImpl();
+
+ gint AddObserver(TMS::TMSEffectObserver& obsrvr, gpointer user_data);
+ gint RemoveObserver(TMS::TMSEffectObserver& obsrvr);
+
+ //from TMSEffectObserver
+ void EffectsEvent(const TMS::TMSEffect& tmseffect,
+ TMS::TMSSignalEvent event);
+
+private:
+ QTMSGlobalGainEffectImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_GLOBAL_GAIN_EFFECT_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsglobalroutingimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_GLOBAL_ROUTING_IMPL_H
+#define QTMS_GLOBAL_ROUTING_IMPL_H
+
+#include <tms.h>
+#include <qtms.h>
+#include <qtmsglobalrouting.h>
+#include <tmsglobalroutingobsrvr.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSGlobalRouting;
+}
+
+namespace QTMS {
+
+// QTMSGlobalRoutingImpl class
+class QTMSGlobalRoutingImpl : public QTMSGlobalRouting,
+ public TMS::TMSGlobalRoutingObserver
+ {
+public:
+
+ static gint Create(QTMSGlobalRouting*& qrouting,
+ TMS::TMSGlobalRouting*& tmsrouting);
+ virtual ~QTMSGlobalRoutingImpl();
+
+ gint AddObserver(TMS::TMSGlobalRoutingObserver& obsrvr, gpointer user_data);
+ gint RemoveObserver(TMS::TMSGlobalRoutingObserver& obsrvr);
+
+ //from TMSGlobalRoutingObserver
+ void GlobalRoutingEvent(const TMS::TMSGlobalRouting& routing,
+ TMS::TMSSignalEvent event, TMS::TMSAudioOutput output);
+
+private:
+ QTMSGlobalRoutingImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_GLOBAL_ROUTING_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsglobalvoleffectimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_GLOBAL_VOLUME_EFFECT_IMPL_H
+#define QTMS_GLOBAL_VOLUME_EFFECT_IMPL_H
+
+#include <qtms.h>
+#include <qtmsglobalvoleffect.h>
+#include <tmseffectobsrvr.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSEffect;
+}
+
+namespace QTMS {
+
+// FORWARD DECLARATIONS
+class QTMSEffect;
+
+// QTMSGlobalVolEffectImpl class
+class QTMSGlobalVolEffectImpl : public QTMSGlobalVolEffect,
+ public TMS::TMSEffectObserver
+ {
+public:
+
+ static gint Create(QTMSEffect*& qglobalvol, TMS::TMSEffect*& tmsglobalvol);
+ virtual ~QTMSGlobalVolEffectImpl();
+
+ gint AddObserver(TMS::TMSEffectObserver& obsrvr, gpointer user_data);
+ gint RemoveObserver(TMS::TMSEffectObserver& obsrvr);
+
+ //from TMSEffectObserver
+ void EffectsEvent(const TMS::TMSEffect& tmseffect,
+ TMS::TMSSignalEvent event);
+
+private:
+ QTMSGlobalVolEffectImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_GLOBAL_VOLUME_EFFECT_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsilbcimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_ILBC_FORMAT_IMPL_H
+#define QTMS_ILBC_FORMAT_IMPL_H
+
+#include <qtms.h>
+#include <qtmsilbcformat.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSFormat;
+}
+
+namespace QTMS {
+
+// QTMSILBCFormatImpl class
+class QTMSILBCFormatImpl : public QTMSILBCFormat
+ {
+public:
+ static gint Create(QTMSFormat*& qformat, TMS::TMSFormat*& tmsformat);
+ virtual ~QTMSILBCFormatImpl();
+
+ gint GetFormat(TMS::TMSFormat*& fmt);
+
+ // From QTMSFormat
+ gint GetType(QTMSFormatType& fmttype);
+
+private:
+ QTMSILBCFormatImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_ILBC_FORMAT_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsinbandtoneimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_INBAND_IMPL_H
+#define QTMS_INBAND_IMPL_H
+
+#include <tmsinbandtoneobsrvr.h>
+#include <qtms.h>
+#include <qtmsinbandtone.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSInbandTone;
+}
+
+namespace QTMS {
+
+// QTMSInbandImpl class
+class QTMSInbandToneImpl : public QTMSInbandTone,
+ public TMS::TMSInbandToneObserver
+ {
+public:
+ static gint Create(QTMSInbandTone*& qinband,
+ TMS::TMSInbandTone*& tmsinband);
+ virtual ~QTMSInbandToneImpl();
+
+ gint AddObserver(TMS::TMSInbandToneObserver& obsrvr, gpointer user_data);
+ gint RemoveObserver(TMS::TMSInbandToneObserver& obsrvr);
+
+ //from TMS::TMSInbandToneObserver
+ void InbandToneEvent(const TMS::TMSInbandTone& inbandtone,
+ TMS::TMSSignalEvent event);
+
+private:
+ QTMSInbandToneImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_DTMF_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsmembuffer.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_MEM_BUFFER_H
+#define QTMS_MEM_BUFFER_H
+
+#include <qtmsbuffer.h>
+
+namespace TMS {
+class TMSBuffer;
+}
+
+namespace QTMS {
+
+// QTMSMemBuffer class
+class QTMSMemBuffer : public QTMSBuffer
+ {
+public:
+ virtual ~QTMSMemBuffer();
+
+ /**
+ * Creates Memory Buffer object of the given size.
+ * The memory is allocated on the heap.
+ *
+ * @param size
+ * Size of the buffer to be created.
+ *
+ * @param qbuffer
+ * Created QTMSBuffer object.
+ *
+ * @param buffer
+ * TMS::TMSBuffer buffer object.
+ *
+ * @return
+ * TMS_RESULT_SUCCESS if buffer is created successfully.
+ * TMS_RESULT_INSUFFICIENT_MEMORY if buffer creation failed due to
+ * insufficient memory.
+ * TMS_RESULT_BUFFER_TYPE_NOT_SUPPORTED if the buffer type is not
+ * supported.
+ *
+ */
+ static gint Create(guint size, QTMSBuffer*& qbuffer,
+ TMS::TMSBuffer*& tmsbuffer);
+
+ /**
+ * Return buffer type.
+ *
+ * @param buftype
+ * Type of the buffer object (QTMS_BUFFER_MEMORY).
+ *
+ * @return
+ * QTMS_RESULT_SUCCESS if the operation was successful.
+ *
+ */
+ virtual gint GetType(QTMSBufferType& buftype);
+
+ /**
+ Gets the timestamp on the Buffer so that the framework can
+ determine the time at which this buffer has to be rendered
+ by the output device sink.
+
+ @param ts
+ timestamp in microseconds
+ */
+ virtual gint GetTimeStamp(guint64& ts);
+
+ /**
+ Sets the timestamp on the Buffer so that the framework can
+ determine the time at which this buffer has to be rendered
+ by the output device sink.
+
+ @param ts
+ timestamp in milliseconds
+ */
+ virtual gint SetTimeStamp(const guint64 ts);
+
+ /**
+ Gets the size of data in the buffer specified by the client.
+
+ @param size
+ size of data in bytes
+ */
+ virtual gint GetDataSize(guint& size);
+
+ /**
+ Sets the size of data in the buffer after the client
+ fill it.
+
+ @param size
+ size of data in bytes
+ */
+ virtual gint SetDataSize(const guint size);
+
+ /**
+ Gets the pointer to the memory location associated with this
+ buffer where the data is stored.
+
+ @param bufptr
+ ptr to the data stored in the buffer.
+ */
+ virtual gint GetDataPtr(guint8*& bufptr);
+
+private:
+ QTMSMemBuffer();
+ gint PostConstruct();
+
+protected:
+ TMS::TMSBuffer* iBuffer;
+ };
+
+} //namespace QTMS
+
+#endif //QTMS_MEM_BUFFER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsmicsourceimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_MIC_SOURCE_IMPL_H
+#define QTMS_MIC_SOURCE_IMPL_H
+
+#include <qtms.h>
+#include <qtmsmicsource.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSSource;
+}
+
+namespace QTMS {
+
+// QTMSMicSourceImpl class
+class QTMSMicSourceImpl : public QTMSMicSource
+ {
+public:
+ static gint Create(QTMSSource*& qsource, TMS::TMSSource*& tmssource);
+ virtual ~QTMSMicSourceImpl();
+ gint GetSource(TMS::TMSSource*& tmssource);
+
+private:
+ QTMSMicSourceImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_MIC_SOURCE_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsmodemsinkimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_MODEM_SINK_IMPL_H
+#define QTMS_MODEM_SINK_IMPL_H
+
+#include <qtms.h>
+#include <qtmsmodemsink.h>
+#include <qtmssink.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSSink;
+}
+
+namespace QTMS {
+
+// QTMSModemSinkImpl class
+class QTMSModemSinkImpl : public QTMSModemSink
+ {
+public:
+ static gint Create(QTMSSink*& qsink, TMS::TMSSink*& tmssink);
+ virtual ~QTMSModemSinkImpl();
+
+ gint GetSink(TMS::TMSSink*& tmssink);
+
+private:
+ QTMSModemSinkImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_MODEM_SINK_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsmodemsourceimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_MODEM_SOURCE_IMPL_H
+#define QTMS_MODEM_SOURCE_IMPL_H
+
+#include <qtms.h>
+#include <qtmsmodemsource.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSSource;
+}
+
+namespace QTMS {
+
+// QTMSModemSourceImpl class
+class QTMSModemSourceImpl : public QTMSModemSource
+ {
+public:
+ static gint Create(QTMSSource*& qsource, TMS::TMSSource*& tmssource);
+ virtual ~QTMSModemSourceImpl();
+
+ gint GetSource(TMS::TMSSource*& tmssource);
+
+private:
+ QTMSModemSourceImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_MODEM_SOURCE_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmspcmimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_PCM_FORMAT_IMPL_H
+#define QTMS_PCM_FORMAT_IMPL_H
+
+#include <qtms.h>
+#include <qtmspcmformat.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSFormat;
+}
+
+namespace QTMS {
+
+// QTMSPCMFormatImpl class
+class QTMSPCMFormatImpl : public QTMSPCMFormat
+ {
+public:
+ static gint Create(QTMSFormat*& qformat, TMS::TMSFormat*& tmsformat);
+ virtual ~QTMSPCMFormatImpl();
+
+ gint GetFormat(TMS::TMSFormat*& fmt);
+
+ // From QTMSFormat
+ gint GetType(QTMSFormatType& Formattype);
+
+private:
+ QTMSPCMFormatImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_PCM_FORMAT_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsringtoneimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMSRINGTONEBODYIMPL_H
+#define QTMSRINGTONEBODYIMPL_H
+
+#include <tms.h>
+#include <tmsringtoneobsrvr.h>
+#include <qtms.h>
+#include <qtmsringtone.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSRingTone;
+}
+
+namespace QTMS {
+
+// QTMSRingToneImpl class
+class QTMSRingToneImpl : public QTMSRingTone,
+ public TMS::TMSRingToneObserver
+ {
+public:
+ static gint Create(QTMSRingTone*& qrt, TMS::TMSRingTone*& tmsrt);
+ virtual ~QTMSRingToneImpl();
+
+ gint AddObserver(TMS::TMSRingToneObserver& obsrvr, gpointer user_data);
+ gint RemoveObserver(TMS::TMSRingToneObserver& obsrvr);
+
+ //from TMS::TMSRingToneObserver
+ void RingtoneEvent(const TMS::TMSRingTone& rt, TMS::TMSSignalEvent event);
+
+private:
+ QTMSRingToneImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif //QTMSRINGTONEBODYIMPL_H
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmssinkimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_SINK_IMPL_H
+#define QTMS_SINK_IMPL_H
+
+#include <qtms.h>
+
+namespace QTMS {
+
+// FORWARD DECLARATIONS
+class QTMSSink;
+
+// TMSSinkImpl class
+class QTMSSinkImpl
+ {
+public:
+ static gint Create(QTMSSinkType sinktype, QTMSSink*& tmssink);
+ static gint Delete(QTMSSink*& tmssink);
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_SINK_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmssourceimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_SOURCE_IMPL_H
+#define QTMS_SOURCE_IMPL_H
+
+#include <qtms.h>
+
+namespace QTMS {
+
+// FORWARD DECLARATIONS
+class QTMSSource;
+
+// TMSSourceImpl class
+class QTMSSourceImpl
+ {
+public:
+ static gint Create(QTMSSourceType sourcetype, QTMSSource*& tmssource);
+ static gint Delete(QTMSSource*& tmssource);
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_SOURCE_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsspeakersinkimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_SPEAKER_SINK_IMPL_H
+#define QTMS_SPEAKER_SINK_IMPL_H
+
+#include <qtms.h>
+#include <qtmsspeakersink.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSSink;
+}
+
+namespace QTMS {
+
+// QTMSSpeakerSinkImpl class
+class QTMSSpeakerSinkImpl : public QTMSSpeakerSink
+ {
+public:
+ static gint Create(QTMSSink*& qsink, TMS::TMSSink*& tmssink);
+ virtual ~QTMSSpeakerSinkImpl();
+
+ gint GetSink(TMS::TMSSink*& tmssink);
+
+private:
+ QTMSSpeakerSinkImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_SPEAKER_SINK_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsstreamimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_STREAM_IMPL_H
+#define QTMS_STREAM_IMPL_H
+
+#include <qtms.h>
+#include <qtmsstream.h>
+#include <tmsstreamobsrvr.h>
+#include <QObject>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSStream;
+}
+
+namespace QTMS {
+
+// QTMSStreamImpl class
+class QTMSStreamImpl : public QTMSStream,
+ public TMS::TMSStreamObserver
+ {
+public:
+ static gint Create(QTMSCallType callType, QTMSStreamType stype,
+ QTMSStream*& qstrm, TMS::TMSStream*& tmsstrm);
+
+ virtual ~QTMSStreamImpl();
+
+ // From QTMSStreamBody
+ gint AddObserver(TMS::TMSStreamObserver& obsrvr, gpointer user_data);
+ gint RemoveObserver(TMS::TMSStreamObserver& obsrvr);
+
+ // From TMSStreamObserver
+ void TMSStreamEvent(const TMS::TMSStream& stream,
+ TMS::TMSSignalEvent event);
+
+protected:
+ QTMSStreamImpl();
+
+ gint PostConstruct(QTMSCallType callType, QTMSStreamType stype,
+ QTMSStream& parent);
+
+ gint CreateQueue(const gint aNumSlots);
+ void ReceiveMsgQHandlerEventsL();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_STREAM_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmsvolumeeffectimpl.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef QTMS_VOLUME_EFFECT_IMPL_H
+#define QTMS_VOLUME_EFFECT_IMPL_H
+
+#include <qtms.h>
+#include <tms.h>
+#include <qtmsvolumeeffect.h>
+#include <tmseffectobsrvr.h>
+
+// FORWARD DECLARATIONS
+namespace TMS {
+class TMSEffect;
+}
+
+namespace QTMS {
+
+// QTMSVolumeEffectImpl class
+class QTMSVolumeEffectImpl : public QTMSVolumeEffect,
+ public TMS::TMSEffectObserver
+ {
+public:
+ static gint Create(QTMSEffect*& qvol, TMS::TMSEffect*& tmsvol);
+ virtual ~QTMSVolumeEffectImpl();
+
+ gint AddObserver(TMS::TMSEffectObserver& obsrvr, gpointer user_data);
+ gint RemoveObserver(TMS::TMSEffectObserver& obsrvr);
+
+ gint GetEffect(TMS::TMSEffect*& tmseffect);
+
+ //From TMSEffectObserver
+ void EffectsEvent(const TMS::TMSEffect& tmseffect,
+ TMS::TMSSignalEvent event);
+
+private:
+ QTMSVolumeEffectImpl();
+ gint PostConstruct();
+ };
+
+} //namespace QTMS
+
+#endif // QTMS_VOLUME_EFFECT_IMPL_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/qtmswrapperexport.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,30 @@
+/*
+* 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 the License "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 QTMS_WRAPPER_EXPORT_H_
+#define QTMS_WRAPPER_EXPORT_H_
+
+// System includes
+#include <qglobal.h>
+
+#ifdef BUILD_TMS_WRAPPER_DLL
+ #define QTMS_WRAPPER_DLL_EXPORT Q_DECL_EXPORT
+#else
+ #define QTMS_WRAPPER_DLL_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // QTMS_WRAPPER_EXPORT_H_
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/inc/tmsutility.h Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#ifndef __TMSUTILITY_H__
+#define __TMSUTILITY_H__
+
+#include <e32std.h>
+#include <tms.h>
+#include <TelephonyAudioRouting.h>
+#ifdef _DEBUG
+#include <e32debug.h>
+#endif
+
+namespace TMS {
+
+// DEBUG TRACE DEFINITIONS
+#ifdef _DEBUG
+#define TRACE_PRN_FN_ENT RDebug::Printf("%s>ENTER", __PRETTY_FUNCTION__)
+#define TRACE_PRN_FN_EXT RDebug::Printf("%s>EXIT", __PRETTY_FUNCTION__)
+#define TRACE_PRN_IF_ERR(err) if (err != KErrNone) RDebug::Printf( "%s>BREAK[%d]", __PRETTY_FUNCTION__, err )
+
+#define TRACE_PRN_0(str) RDebug::Print(str, this)
+#define TRACE_PRN_1(str, val1) RDebug::Print(str, this, val1)
+#define TRACE_PRN_2(str, val1, val2) RDebug::Print(str, this, val1, val2)
+
+#define TRACE_PRN_N(str) RDebug::Print(str)
+#define TRACE_PRN_N1(str, val1) RDebug::Print(str, val1)
+#define TRACE_PRN_N2(str, val1, val2) RDebug::Print(str, val1, val2)
+#else
+#define TRACE_PRN_FN_ENT
+#define TRACE_PRN_FN_EXT
+#define TRACE_PRN_IF_ERR(err)
+#define TRACE_PRN_0(str)
+#define TRACE_PRN_1(str, val1)
+#define TRACE_PRN_2(str, val1, val2)
+#define TRACE_PRN_N(str)
+#define TRACE_PRN_N1(str, val1)
+#define TRACE_PRN_N2(str, val1, val2)
+#endif //_DEBUG
+
+
+// MACRO DEFINITIONS
+#define RET_ERR_IF_ERR(err) if ( err != 0) return err;
+#define RET_REASON_IF_ERR(s) if(s!=0) return s
+
+#define TMSRESULT(result) TMSUtility::TMSResult(result)
+#define TOTMSOUTPUT(output) TMSUtility::ToTMSOutput(output)
+#define TOTAROUTPUT(output) TMSUtility::ToTAROutput(output)
+#define TOFOURCC(format) TMSUtility::ToFourCC(format)
+#define TOTMSFORMAT(fourcc) TMSUtility::FourCCToTMSFormat(fourcc)
+
+_LIT(KQTMSPanic, "QTMS Panic!" );
+#define PANIC(reason) User::Panic(KQTMSPanic, reason)
+
+// TMSUtility class
+class TMSUtility
+ {
+public:
+ IMPORT_C static gint TMSResult(const gint error);
+ IMPORT_C static gint EtelToTMSResult(const gint error);
+ IMPORT_C static TMSAudioOutput ToTMSOutput(
+ CTelephonyAudioRouting::TAudioOutput taroutput);
+ IMPORT_C static CTelephonyAudioRouting::TAudioOutput ToTAROutput(
+ TMSAudioOutput output);
+ IMPORT_C static TUint32 ToFourCC(TMSFormatType frmtType);
+ IMPORT_C static TMSFormatType FourCCToTMSFormat(TUint32 fourcc);
+ };
+
+} //namespace TMS
+
+#endif //__TMSUTILITY_H__
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/qtmsapi.pro Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,129 @@
+TEMPLATE = lib
+TARGET = qtmsapi
+CONFIG += dll
+DEFINES += BUILD_TMS_WRAPPER_DLL
+
+QT = core
+CONFIG -= gui
+
+DEFINES += SYMBIAN
+TARGET.CAPABILITY = All -tcb
+TARGET.EPOCALLOWDLLDATA = 1
+TARGET.UID2 = 0x10009D8D
+TARGET.UID3 = 0x10207CA5
+
+BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
+ "rom/qtms.iby CORE_MW_LAYER_IBY_EXPORT_PATH(qtms.iby)" \
+ "data/qtmsapi_stub.sis /epoc32/data/z/system/install/qtmsapi_stub.sis"
+
+DEPENDPATH += . inc
+INCLUDEPATH += . \
+ .\inc
+
+qtmsDefFiles = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE bwins/qtms.def" \
+ "$${LITERAL_HASH}else" \
+ "DEFFILE eabi/qtms.def" \
+ "$${LITERAL_HASH}endif"
+
+MMP_RULES += qtmsDefFiles
+
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+ $$OS_LAYER_LIBC_SYSTEMINCLUDE \
+ $$OS_LAYER_GLIB_SYSTEMINCLUDE
+
+LIBS += -ltmsfactory \
+ -ltmsapi \
+ -ltmsutility \
+ -llibglib \
+ -llibgobject \
+ -llibgmodule \
+ -llibstdcpp
+
+# $$_PRO_FILE_PWD_ points to the directory of the pro file
+MOC_DIR = ./tmp
+
+INCLUDEPATH += . \
+ . inc \
+ ../ \
+ ../mmappfw_plat/qt_telephony_multimedia_service_api/inc/
+
+DEPENDPATH += $$INCLUDEPATH src
+
+# Headers
+HEADERS += qtmsfactory.h \
+ qtmscall.h \
+ qtmsstream.h \
+ qtmsbuffer.h \
+ qtmsclientsource.h \
+ qtmsclientsink.h \
+ qtmsvolumeeffect.h \
+ qtmsgaineffect.h \
+ qtmsglobalgaineffect.h \
+ qtmsglobalvoleffect.h \
+ qtmsglobalrouting.h \
+ qtmsamrformat.h \
+ qtmspcmformat.h \
+ qtmsilbcformat.h \
+ qtmsg711format.h \
+ qtmsg729format.h \
+ qtmsformat.h \
+ qtmsmodemsink.h \
+ qtmsspeakersink.h \
+ qtmsmodemsource.h \
+ qtmsmicsource.h \
+ qtmsringtone.h \
+ qtmsdtmf.h \
+ qtmsinbandtone.h
+
+# Source
+SOURCES += qtmsfactory.cpp \
+ qtmsfactoryimpl.cpp \
+ qtmsmembuffer.cpp \
+ qtmscall.cpp \
+ qtmscallimpl.cpp \
+ qtmsstream.cpp \
+ qtmsstreamimpl.cpp \
+ qtmsclientsource.cpp \
+ qtmsclientsourceimpl.cpp \
+ qtmsclientsink.cpp \
+ qtmsclientsinkimpl.cpp \
+ qtmsvolumeeffect.cpp \
+ qtmsvolumeeffectimpl.cpp \
+ qtmsgaineffect.cpp \
+ qtmsgaineffectimpl.cpp \
+ qtmsglobalgaineffect.cpp \
+ qtmsglobalgaineffectimpl.cpp \
+ qtmsglobalvoleffect.cpp \
+ qtmsglobalvoleffectimpl.cpp \
+ qtmsglobalrouting.cpp \
+ qtmsglobalroutingimpl.cpp \
+ qtmspcm.cpp \
+ qtmspcmimpl.cpp \
+ qtmsilbc.cpp \
+ qtmsilbcimpl.cpp \
+ qtmsamr.cpp \
+ qtmsamrimpl.cpp \
+ qtmsg711.cpp \
+ qtmsg711impl.cpp \
+ qtmsg729.cpp \
+ qtmsg729impl.cpp \
+ qtmsformat.cpp \
+ qtmsmodemsink.cpp \
+ qtmsmodemsinkimpl.cpp \
+ qtmsspeakersink.cpp \
+ qtmsspeakersinkimpl.cpp \
+ qtmsmodemsource.cpp \
+ qtmsmodemsourceimpl.cpp \
+ qtmsmicsource.cpp \
+ qtmsmicsourceimpl.cpp \
+ qtmsringtone.cpp \
+ qtmsringtoneimpl.cpp \
+ qtmsdtmf.cpp \
+ qtmsdtmfimpl.cpp \
+ qtmsinbandtone.cpp \
+ qtmsinbandtoneimpl.cpp
+
+SYMBIAN_PLATFORMS = DEFAULT
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/rom/qtms.iby Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 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: Iby file for QTMS
+*
+*/
+
+#ifndef QTMS_IBY
+#define QTMS_IBY
+
+// Use standard macros
+#include <data_caging_paths_for_iby.hrh>
+
+#ifdef FF_TMS
+file=ABI_DIR\BUILD_DIR\qtmsapi.dll SHARED_LIB_DIR\qtmsapi.dll
+
+//QTMS_Stub
+data=ZSYSTEM/install/qtmsapi_stub.sis System/Install/qtmsapi_stub.sis
+
+#endif //FF_TMS
+#endif //QTMS_IBY
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsamr.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtmsamrformat.h>
+
+using namespace QTMS;
+
+QTMSAMRFormat::QTMSAMRFormat()
+ {
+ }
+
+QTMSAMRFormat::~QTMSAMRFormat()
+ {
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsamrimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsamrformat.h>
+#include "tmsutility.h"
+#include "qtmsamrimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSAMRFormatImpl::QTMSAMRFormatImpl()
+ {
+ }
+
+QTMSAMRFormatImpl::~QTMSAMRFormatImpl()
+ {
+ TRACE_PRN_FN_ENT;
+ TRACE_PRN_FN_EXT;
+ }
+
+gint QTMSAMRFormatImpl::Create(QTMSFormat*& qformat, TMS::TMSFormat*& tmsformat)
+ {
+ gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSAMRFormatImpl* self = new QTMSAMRFormatImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != TMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iFormat = tmsformat;
+ }
+ qformat = self;
+ return ret;
+ }
+
+gint QTMSAMRFormatImpl::PostConstruct()
+ {
+ gint ret(TMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSAMRFormatImpl::GetFormat(TMS::TMSFormat*& fmt)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iFormat)
+ {
+ fmt = iFormat;
+ ret = QTMS_RESULT_SUCCESS;
+ }
+ return ret;
+ }
+
+gint QTMSAMRFormatImpl::GetType(QTMSFormatType& fmttype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = iFormat->GetType(fmttype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmscall.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmscall.h>
+#include <qtmscall.h>
+#include <tmsstream.h>
+#include "qtmscallimpl.h"
+#include "qtmsstreamimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSCall::QTMSCall() :
+ iTmsCall(NULL)
+ {
+ }
+
+QTMSCall::~QTMSCall()
+ {
+ }
+
+QTMSCallType QTMSCall::GetCallType()
+ {
+ QTMSCallType calltype(-1);
+ if (iTmsCall)
+ {
+ calltype = iTmsCall->GetCallType();
+ }
+ return calltype;
+ }
+
+gint QTMSCall::GetCallContextId(guint& ctxid)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iTmsCall)
+ {
+ status = iTmsCall->GetCallContextId(ctxid);
+ }
+ return status;
+ }
+
+gint QTMSCall::CreateStream(const QTMSStreamType type, QTMSStream*& qstrm)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ TMSStream* tmsstrm(NULL);
+ if (iTmsCall)
+ {
+ status = iTmsCall->CreateStream(type, tmsstrm);
+ }
+
+ if (status == TMS_RESULT_SUCCESS)
+ {
+ QTMSCallType calltype = iTmsCall->GetCallType();
+ switch (type)
+ {
+ case TMS_STREAM_UPLINK:
+ case TMS_STREAM_DOWNLINK:
+ status = QTMSStreamImpl::Create(calltype, type, qstrm, tmsstrm);
+ break;
+ default:
+ status = QTMS_RESULT_STREAM_TYPE_NOT_SUPPORTED;
+ break;
+ }
+ }
+ return status;
+ }
+
+gint QTMSCall::DeleteStream(QTMSStream*& strm)
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ delete strm;
+ strm = NULL;
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmscallimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmscall.h>
+#include <qtms.h>
+#include "qtmscallimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSCallImpl::QTMSCallImpl()
+ {
+ }
+
+QTMSCallImpl::~QTMSCallImpl()
+ {
+ }
+
+gint QTMSCallImpl::Create(QTMSCall*& qtmscall, TMS::TMSCall*& tmscall)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSCallImpl* self = new QTMSCallImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iTmsCall = tmscall;
+ }
+ qtmscall = self;
+ return ret;
+ }
+
+gint QTMSCallImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsclientsink.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsclientsink.h>
+#include <tmsbuffer.h>
+#include <qtmsclientsink.h>
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSClientSink::QTMSClientSink() :
+ iSink(NULL)
+ {
+ }
+
+QTMSClientSink::~QTMSClientSink()
+ {
+ delete iSink;
+ }
+
+// Push mode
+gint QTMSClientSink::BufferProcessed(TMS::TMSBuffer* buffer)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSink)
+ {
+ status = static_cast<TMSClientSink*> (iSink)->BufferProcessed(buffer);
+ }
+ return status;
+ }
+
+gint QTMSClientSink::GetType(QTMSSinkType& sinktype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSink)
+ {
+ status = static_cast<TMSClientSink*> (iSink)->GetType(sinktype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsclientsinkimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsbuffer.h>
+#include <tmsclientsink.h>
+#include "qtmsclientsinkimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSClientSinkImpl::QTMSClientSinkImpl()
+ {
+ }
+
+QTMSClientSinkImpl::~QTMSClientSinkImpl()
+ {
+ RemoveObserver(*this);
+ }
+
+gint QTMSClientSinkImpl::Create(QTMSSink*& qsink, TMS::TMSSink*& tmssink)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSClientSinkImpl* self = new QTMSClientSinkImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iSink = tmssink;
+ self->AddObserver(*self, NULL);
+ }
+ qsink = self;
+ return ret;
+ }
+
+gint QTMSClientSinkImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSClientSinkImpl::AddObserver(TMS::TMSClientSinkObserver& obsrvr,
+ gpointer user_data)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ if (iSink)
+ {
+ ret = static_cast<TMSClientSink*> (iSink)->AddObserver(obsrvr,
+ user_data);
+ }
+ return ret;
+ }
+
+gint QTMSClientSinkImpl::RemoveObserver(TMS::TMSClientSinkObserver& obsrvr)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSink)
+ {
+ ret = static_cast<TMSClientSink*> (iSink)->RemoveObserver(obsrvr);
+ }
+ return ret;
+ }
+
+gint QTMSClientSinkImpl::GetSink(TMS::TMSSink*& tmssink)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iSink)
+ {
+ tmssink = iSink;
+ ret = QTMS_RESULT_SUCCESS;
+ }
+ return ret;
+ }
+
+void QTMSClientSinkImpl::ProcessBuffer(const TMS::TMSBuffer* buffer)
+ {
+ emit QTMS::QTMSClientSink::ProcessBuffer(buffer);
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsclientsource.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsclientsource.h>
+#include <tmsbuffer.h>
+#include <qtmsclientsource.h>
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSClientSource::QTMSClientSource() :
+ iSource(NULL)
+ {
+ }
+
+QTMSClientSource::~QTMSClientSource()
+ {
+ delete iSource;
+ }
+
+gint QTMSClientSource::SetEnqueueMode(const gboolean enable)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSource)
+ {
+ status = static_cast<TMSClientSource*> (iSource)->SetEnqueueMode(
+ enable);
+ }
+ return status;
+ }
+
+gint QTMSClientSource::GetEnqueueMode(gboolean& enable)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSource)
+ {
+ status = static_cast<TMSClientSource*> (iSource)->GetEnqueueMode(
+ enable);
+ }
+ return status;
+ }
+
+gint QTMSClientSource::Flush()
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSource)
+ {
+ status = static_cast<TMSClientSource*> (iSource)->Flush();
+ }
+ return status;
+ }
+
+gint QTMSClientSource::GetType(QTMSSourceType& sourcetype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSource)
+ {
+ status = static_cast<TMSClientSource*> (iSource)->GetType(sourcetype);
+ }
+ return status;
+ }
+
+gint QTMSClientSource::BufferFilled(TMS::TMSBuffer& buffer)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSource)
+ {
+ status = static_cast<TMSClientSource*> (iSource)->BufferFilled(buffer);
+ }
+ return status;
+ }
+
+// Push mode
+gint QTMSClientSource::ProcessBuffer(TMS::TMSBuffer* buffer)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSource)
+ {
+ status = static_cast<TMSClientSource*> (iSource)->ProcessBuffer(buffer);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsclientsourceimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsbuffer.h>
+#include <tmsclientsource.h>
+#include "qtmsclientsourceimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSClientSourceImpl::QTMSClientSourceImpl()
+ {
+ }
+
+QTMSClientSourceImpl::~QTMSClientSourceImpl()
+ {
+ RemoveObserver(*this);
+ }
+
+gint QTMSClientSourceImpl::Create(QTMSSource*& qsource,
+ TMS::TMSSource*& tmssource)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSClientSourceImpl* self = new QTMSClientSourceImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iSource = tmssource;
+ self->AddObserver(*self, NULL);
+ }
+ qsource = self;
+ return ret;
+ }
+
+gint QTMSClientSourceImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSClientSourceImpl::AddObserver(TMS::TMSClientSourceObserver& obsrvr,
+ gpointer user_data)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSource)
+ {
+ ret = static_cast<TMSClientSource*> (iSource)->AddObserver(obsrvr,
+ user_data);
+ }
+ return ret;
+ }
+
+gint QTMSClientSourceImpl::RemoveObserver(TMS::TMSClientSourceObserver& obsrvr)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSource)
+ {
+ ret = static_cast<TMSClientSource*> (iSource)->RemoveObserver(obsrvr);
+ }
+ return ret;
+ }
+
+gint QTMSClientSourceImpl::GetSource(TMS::TMSSource*& tmssource)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iSource)
+ {
+ tmssource = iSource;
+ ret = QTMS_RESULT_SUCCESS;
+ }
+ return ret;
+ }
+
+void QTMSClientSourceImpl::FillBuffer(TMS::TMSBuffer& buffer)
+ {
+ emit QTMS::QTMSClientSource::FillBuffer(buffer);
+ }
+
+void QTMSClientSourceImpl::BufferProcessed(const TMS::TMSBuffer* buffer,
+ gint reason)
+ {
+ emit QTMS::QTMSClientSource::BufferProcessed(buffer, reason);
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsdtmf.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsdtmf.h>
+#include <qtmsdtmf.h>
+#include "qtmsdtmfimpl.h"
+//#include "qtmswrapperexport.h"
+
+using namespace QTMS;
+
+QTMSDTMF::QTMSDTMF(void) :
+ iDtmf(NULL)
+ {
+ }
+
+QTMSDTMF::~QTMSDTMF(void)
+ {
+ delete iDtmf;
+ }
+
+gint QTMSDTMF::Start()
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iDtmf)
+ {
+ status = iDtmf->Start();
+ }
+ return status;
+ }
+
+gint QTMSDTMF::Stop()
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iDtmf)
+ {
+ status = iDtmf->Stop();
+ }
+ return status;
+ }
+
+gint QTMSDTMF::SetTone(GString* string)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iDtmf)
+ {
+ status = iDtmf->SetTone(string);
+ }
+ return status;
+ }
+
+gint QTMSDTMF::ContinueDTMFStringSending(gboolean aContinue)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iDtmf)
+ {
+ status = iDtmf->ContinueDTMFStringSending(aContinue);
+ }
+ return status;
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsdtmfimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsdtmf.h>
+#include "tmsutility.h"
+#include "qtmsdtmfimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSDTMFImpl::QTMSDTMFImpl()
+ {
+ }
+
+QTMSDTMFImpl::~QTMSDTMFImpl()
+ {
+ RemoveObserver(*this);
+ }
+
+gint QTMSDTMFImpl::Create(QTMSDTMF*& qdtmf, TMS::TMSDTMF*& tmsdtmf)
+ {
+ gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSDTMFImpl* self = new QTMSDTMFImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iDtmf = tmsdtmf;
+ ret = self->AddObserver(*self, NULL);
+ }
+ qdtmf = self;
+ return ret;
+ }
+
+gint QTMSDTMFImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSDTMFImpl::AddObserver(TMS::TMSDTMFObserver& obsrvr,
+ gpointer user_data)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iDtmf)
+ {
+ ret = iDtmf->AddObserver(obsrvr, user_data);
+ }
+ return ret;
+ }
+
+gint QTMSDTMFImpl::RemoveObserver(TMS::TMSDTMFObserver& obsrvr)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iDtmf)
+ {
+ ret = iDtmf->RemoveObserver(obsrvr);
+ }
+ return ret;
+ }
+
+void QTMSDTMFImpl::DTMFEvent(const TMS::TMSDTMF& /*dtmf*/,
+ TMS::TMSSignalEvent event)
+ {
+ QTMSSignalEvent qevent;
+
+ qevent.type = event.type;
+ qevent.reason = event.reason;
+ qevent.curr_state = event.curr_state;
+ qevent.prev_state = event.prev_state;
+ qevent.event_data = event.event_data;
+ qevent.user_data = event.user_data;
+
+ emit QTMS::QTMSDTMF::DTMFEvent(static_cast<QTMSDTMF&> (*this), qevent);
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmseffect.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include "qtmseffectimpl.h"
+#include "qtmseffect.h"
+#include "qtmswrapperexport.h"
+
+
+void QTMSEffect::Construct(QTMSEffectImpl* impl)
+ {
+ QTMSeffectimpl = impl;
+ }
+
+QTMSEffect::QTMSEffect(void)
+ {
+ }
+
+ QTMSEffect::~QTMSEffect(void)
+ {
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsfactory.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,266 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tms.h>
+#include <QObject>
+#include <qtmsfactory.h>
+#include "qtmswrapperexport.h"
+#include "qtmsfactoryimpl.h"
+
+using namespace QTMS;
+
+QTMSFactory::QTMSFactory()
+ {
+ impl = new QTMSFactoryImpl();
+ }
+
+QTMSFactory::~QTMSFactory()
+ {
+ delete impl;
+ }
+
+gint QTMSFactory::CreateFactory(QTMSFactory*& tmsfactory, QTMSVer& /*ver*/)
+ {
+ QTMSFactory* self = new QTMSFactory();
+ tmsfactory = self;
+ return QTMS_RESULT_SUCCESS;
+ }
+
+gint QTMSFactory::CreateCall(QTMSCallType ctype, QTMSCall*& tmscall,
+ guint ctxid)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->CreateCall(ctype, tmscall, ctxid);
+ }
+ return status;
+ }
+
+gint QTMSFactory::DeleteCall(QTMSCall*& tmscall)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->DeleteCall(tmscall);
+ }
+ return status;
+ }
+
+gint QTMSFactory::IsCallTypeSupported(QTMSCallType ctype, gboolean& flag)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->IsCallTypeSupported(ctype, flag);
+ }
+ return status;
+ }
+
+gint QTMSFactory::GetSupportedFormats(const QTMSStreamType strmtype,
+ FormatVector& fmtlist)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->GetSupportedFormats(strmtype, fmtlist);
+ }
+ return status;
+ }
+
+gint QTMSFactory::CreateFormat(QTMSFormatType qfmttype, QTMSFormat*& qfmt)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->CreateFormat(qfmttype, qfmt);
+ }
+ return status;
+
+ }
+
+gint QTMSFactory::DeleteFormat(QTMSFormat*& qfmt)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->DeleteFormat(qfmt);
+ }
+ return status;
+ }
+
+gint QTMSFactory::CreateEffect(QTMSEffectType tmseffecttype,
+ QTMSEffect*& tmseffect)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->CreateEffect(tmseffecttype, tmseffect);
+ }
+ return status;
+ }
+
+gint QTMSFactory::DeleteEffect(QTMSEffect*& qtmseffect)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ impl->DeleteEffect(qtmseffect);
+ }
+ return status;
+ }
+
+gint QTMSFactory::CreateBuffer(QTMSBufferType buffertype, guint size,
+ QTMSBuffer*& qbuffer)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->CreateBuffer(buffertype, size, qbuffer);
+ }
+ return status;
+ }
+
+gint QTMSFactory::DeleteBuffer(QTMSBuffer*& qbuffer)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->DeleteBuffer(qbuffer);
+ }
+ return status;
+ }
+
+gint QTMSFactory::CreateSource(QTMSSourceType srctype, QTMSSource*& qtmssrc)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->CreateSource(srctype, qtmssrc);
+ }
+ return status;
+ }
+
+gint QTMSFactory::DeleteSource(QTMSSource*& qtmssrc)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->DeleteSource(qtmssrc);
+ }
+ return status;
+ }
+
+gint QTMSFactory::CreateSink(QTMSSinkType sinktype, QTMSSink*& qtmssink)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->CreateSink(sinktype, qtmssink);
+ }
+ return status;
+ }
+
+gint QTMSFactory::DeleteSink(QTMSSink*& qtmssink)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->DeleteSink(qtmssink);
+ }
+ return status;
+ }
+
+gint QTMSFactory::CreateGlobalRouting(QTMSGlobalRouting*& globalrouting)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->CreateGlobalRouting(globalrouting);
+ }
+ return status;
+ }
+
+gint QTMSFactory::DeleteGlobalRouting(QTMSGlobalRouting*& globrouting)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->DeleteGlobalRouting(globrouting);
+ }
+ return status;
+ }
+
+gint QTMSFactory::CreateDTMF(QTMSStreamType streamtype, QTMSDTMF*& dtmf)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->CreateDTMF(streamtype, dtmf);
+ }
+ return status;
+ }
+
+gint QTMSFactory::DeleteDTMF(QTMSDTMF*& dtmf)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->DeleteDTMF(dtmf);
+ }
+ return status;
+ }
+
+gint QTMSFactory::CreateRingTonePlayer(QTMSRingTone*& rt)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->CreateRingTonePlayer(rt);
+ }
+ return status;
+ }
+
+gint QTMSFactory::DeleteRingTonePlayer(QTMSRingTone*& rt)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->DeleteRingTonePlayer(rt);
+ }
+ return status;
+ }
+
+gint QTMSFactory::CreateInbandTonePlayer(QTMSInbandTone*& inbandtone)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->CreateInbandTonePlayer(inbandtone);
+ }
+ return status;
+ }
+
+gint QTMSFactory::DeleteInbandTonePlayer(QTMSInbandTone*& inbandtone)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (impl)
+ {
+ status = impl->DeleteInbandTonePlayer(inbandtone);
+ }
+ return status;
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsfactoryimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,612 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tms.h>
+#include <tmsfactory.h>
+#include <tmsformat.h>
+#include <qtms.h>
+#include <qtmscall.h>
+#include <qtmsformat.h>
+#include <qtmseffect.h>
+#include <qtmsbuffer.h>
+#include <qtmssource.h>
+#include <qtmssink.h>
+#include <qtmsringtone.h>
+#include <qtmsdtmf.h>
+#include <qtmsinbandtone.h>
+#include "tmsutility.h"
+#include "qtmscallimpl.h"
+#include "qtmsglobalroutingimpl.h"
+#include "qtmsglobalvoleffectimpl.h"
+#include "qtmsglobalgaineffectimpl.h"
+#include "qtmsvolumeeffectimpl.h"
+#include "qtmsgaineffectimpl.h"
+#include "qtmsclientsinkimpl.h"
+#include "qtmsmodemsinkimpl.h"
+#include "qtmsspeakersinkimpl.h"
+#include "qtmsclientsourceimpl.h"
+#include "qtmsmodemsourceimpl.h"
+#include "qtmsmicsourceimpl.h"
+#include "qtmsringtoneimpl.h"
+#include "qtmsdtmfimpl.h"
+#include "qtmsinbandtoneimpl.h"
+#include "qtmsfactoryimpl.h"
+#include "qtmspcmimpl.h"
+#include "qtmsamrimpl.h"
+#include "qtmsg711impl.h"
+#include "qtmsg729impl.h"
+#include "qtmsilbcimpl.h"
+#include "qtmsmembuffer.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSFactoryImpl::QTMSFactoryImpl()
+ {
+ TRACE_PRN_FN_ENT;
+ TMSVer* ver = NULL;
+ TMSFactory::CreateFactory(iFactory, *ver);
+ TRACE_PRN_FN_EXT;
+ }
+
+QTMSFactoryImpl::~QTMSFactoryImpl()
+ {
+ TRACE_PRN_FN_ENT;
+ delete iFactory;
+ TRACE_PRN_FN_EXT;
+ }
+
+gint QTMSFactoryImpl::CreateCall(QTMSCallType ctype, QTMSCall*& qtmscall,
+ guint /*ctxid*/)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ TMSCall* tmscall(NULL);
+ if (iFactory)
+ {
+ ret = iFactory->CreateCall((TMSCallType) ctype, tmscall);
+
+ if (ret == TMS_RESULT_SUCCESS)
+ {
+ ret = QTMSCallImpl::Create(qtmscall, tmscall);
+ }
+ }
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::DeleteCall(QTMSCall*& qtmscall)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_SUCCESS);
+ delete qtmscall;
+ qtmscall = NULL;
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::IsCallTypeSupported(QTMSCallType ctype, gboolean& flag)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ switch (ctype)
+ {
+ case QTMS_CALL_CS:
+ case QTMS_CALL_IP:
+ flag = ETrue;
+ break;
+ case QTMS_CALL_ECS: //from TB 10.1
+ default:
+ flag = EFalse;
+ break;
+ }
+ return ret;
+ }
+
+gint QTMSFactoryImpl::GetSupportedFormats(const QTMSStreamType strmtype,
+ FormatVector& fmtlist)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ TMS::FormatVector tmsfmtlist;
+ if (iFactory)
+ {
+ ret = iFactory->GetSupportedFormats(strmtype,tmsfmtlist);
+ }
+
+ std::vector<TMSFormat*>::iterator itCodecs = tmsfmtlist.begin();
+ TMSFormatType fmttype;
+ for (; itCodecs < tmsfmtlist.end(); itCodecs++)
+ {
+ (*itCodecs)->GetType(fmttype);
+ QTMSFormat* qtmsfmt(NULL);
+ switch (fmttype)
+ {
+ case QTMS_FORMAT_PCM:
+ ret = QTMSPCMFormatImpl::Create(qtmsfmt,*itCodecs);
+ break;
+ case QTMS_FORMAT_AMR:
+ ret = QTMSAMRFormatImpl::Create(qtmsfmt,*itCodecs);
+ break;
+ case QTMS_FORMAT_G711:
+ ret = QTMSG711FormatImpl::Create(qtmsfmt,*itCodecs);
+ break;
+ case QTMS_FORMAT_G729:
+ ret = QTMSG729FormatImpl::Create(qtmsfmt,*itCodecs);
+ break;
+ case QTMS_FORMAT_ILBC:
+ ret = QTMSILBCFormatImpl::Create(qtmsfmt,*itCodecs);
+ break;
+ default:
+ break;
+ }
+
+ if (qtmsfmt)
+ {
+ fmtlist.push_back(qtmsfmt);
+ }
+ }
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::CreateFormat(QTMSFormatType fmttype,
+ QTMSFormat*& qtmsfmt)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ TMSFormat* tmsformat(NULL);
+
+ if (iFactory)
+ {
+ ret = iFactory->CreateFormat((TMSFormatType) fmttype, tmsformat);
+
+ if (ret == TMS_RESULT_SUCCESS)
+ {
+ switch (fmttype)
+ {
+ case QTMS_FORMAT_PCM:
+ ret = QTMSPCMFormatImpl::Create(qtmsfmt, tmsformat);
+ break;
+ case QTMS_FORMAT_AMR:
+ ret = QTMSAMRFormatImpl::Create(qtmsfmt, tmsformat);
+ break;
+ case QTMS_FORMAT_G711:
+ ret = QTMSG711FormatImpl::Create(qtmsfmt, tmsformat);
+ break;
+ case QTMS_FORMAT_G729:
+ ret = QTMSG729FormatImpl::Create(qtmsfmt, tmsformat);
+ break;
+ case QTMS_FORMAT_ILBC:
+ ret = QTMSILBCFormatImpl::Create(qtmsfmt, tmsformat);
+ break;
+ default:
+ ret = QTMS_RESULT_FORMAT_TYPE_NOT_SUPPORTED;
+ break;
+ }
+ }
+ }
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::DeleteFormat(QTMSFormat*& qtmsfmt)
+ {
+ TRACE_PRN_FN_ENT;
+ __ASSERT_ALWAYS(qtmsfmt, PANIC(QTMS_RESULT_NULL_ARGUMENT));
+
+ gint ret(QTMS_RESULT_SUCCESS);
+ QTMSFormatType fmttype;
+ ret = qtmsfmt->GetType(fmttype);
+ switch (fmttype)
+ {
+ case QTMS_FORMAT_PCM:
+ delete (static_cast<QTMSPCMFormatImpl*>(qtmsfmt));
+ qtmsfmt = NULL;
+ break;
+ case QTMS_FORMAT_AMR:
+ delete (static_cast<QTMSAMRFormatImpl*>(qtmsfmt));
+ qtmsfmt = NULL;
+ break;
+ case QTMS_FORMAT_G711:
+ delete (static_cast<QTMSG711FormatImpl*>(qtmsfmt));
+ qtmsfmt = NULL;
+ break;
+ case QTMS_FORMAT_G729:
+ delete (static_cast<QTMSG729FormatImpl*>(qtmsfmt));
+ qtmsfmt = NULL;
+ break;
+ case QTMS_FORMAT_ILBC:
+ delete (static_cast<QTMSILBCFormatImpl*>(qtmsfmt));
+ qtmsfmt = NULL;
+ break;
+ default:
+ ret = QTMS_RESULT_FORMAT_TYPE_NOT_SUPPORTED;
+ break;
+ }
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::CreateEffect(QTMSEffectType tmseffecttype,
+ QTMSEffect*& qtmseffect)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ TMSEffect* tmseffect(NULL);
+
+ if (iFactory)
+ {
+ ret = iFactory->CreateEffect((TMSEffectType) tmseffecttype, tmseffect);
+
+ if (ret == TMS_RESULT_SUCCESS)
+ {
+ switch (tmseffecttype)
+ {
+ case TMS_EFFECT_VOLUME:
+ ret = QTMSVolumeEffectImpl::Create(qtmseffect, tmseffect);
+ break;
+ case TMS_EFFECT_GAIN:
+ ret = QTMSGainEffectImpl::Create(qtmseffect, tmseffect);
+ break;
+ case TMS_EFFECT_GLOBAL_VOL:
+ ret = QTMSGlobalVolEffectImpl::Create(qtmseffect,
+ tmseffect);
+ break;
+ case TMS_EFFECT_GLOBAL_GAIN:
+ ret = QTMSGlobalGainEffectImpl::Create(qtmseffect,
+ tmseffect);
+ break;
+ default:
+ ret = TMS_RESULT_EFFECT_TYPE_NOT_SUPPORTED;
+ break;
+ }
+ }
+ }
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::DeleteEffect(QTMSEffect*& qtmseffect)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ QTMSEffectType effecttype;
+ ret = qtmseffect->GetType(effecttype);
+ switch (effecttype)
+ {
+ case QTMS_EFFECT_VOLUME:
+ delete (static_cast<QTMSVolumeEffectImpl*> (qtmseffect));
+ qtmseffect = NULL;
+ break;
+ case QTMS_EFFECT_GAIN:
+ delete (static_cast<QTMSGainEffectImpl*> (qtmseffect));
+ qtmseffect = NULL;
+ break;
+ case QTMS_EFFECT_GLOBAL_VOL:
+ delete (static_cast<QTMSGlobalVolEffectImpl*> (qtmseffect));
+ qtmseffect = NULL;
+ break;
+ case QTMS_EFFECT_GLOBAL_GAIN:
+ delete (static_cast<QTMSGlobalGainEffectImpl*> (qtmseffect));
+ qtmseffect = NULL;
+ break;
+ default:
+ ret = QTMS_RESULT_EFFECT_TYPE_NOT_SUPPORTED;
+ break;
+ }
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::CreateBuffer(QTMSBufferType buffertype, guint size,
+ QTMSBuffer*& qtmsbuffer)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ TMSBuffer* tmsbuffer(NULL);
+ if (iFactory)
+ {
+ ret = iFactory->CreateBuffer(buffertype, size, tmsbuffer);
+ if (ret == TMS_RESULT_SUCCESS)
+ {
+ switch (buffertype)
+ {
+ case QTMS_BUFFER_MEMORY:
+ ret = QTMSMemBuffer::Create(size, qtmsbuffer, tmsbuffer);
+ break;
+ default:
+ ret = QTMS_RESULT_BUFFER_TYPE_NOT_SUPPORTED;
+ break;
+ }
+ }
+ }
+
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::DeleteBuffer(QTMSBuffer*& qtmsbuffer)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_SUCCESS);
+ delete (static_cast<QTMSMemBuffer*> (qtmsbuffer));
+ qtmsbuffer = NULL;
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::CreateSource(QTMSSourceType srctype,
+ QTMSSource*& qtmssrc)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ TMS::TMSSource* tmssource(NULL);
+ if (iFactory)
+ {
+ ret = iFactory->CreateSource(srctype, tmssource);
+
+ if (ret == TMS_RESULT_SUCCESS)
+ {
+ switch (srctype)
+ {
+ case QTMS_SOURCE_CLIENT:
+ ret = QTMSClientSourceImpl::Create(qtmssrc, tmssource);
+ break;
+ case QTMS_SOURCE_MODEM:
+ ret = QTMSModemSourceImpl::Create(qtmssrc, tmssource);
+ break;
+ case QTMS_SOURCE_MIC:
+ ret = QTMSMicSourceImpl::Create(qtmssrc, tmssource);
+ break;
+ default:
+ ret = TMS_RESULT_SOURCE_TYPE_NOT_SUPPORTED;
+ break;
+ }
+ }
+ }
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::DeleteSource(QTMSSource*& qtmssrc)
+ {
+ TRACE_PRN_FN_ENT;
+ __ASSERT_ALWAYS(qtmssrc, PANIC(QTMS_RESULT_NULL_ARGUMENT));
+
+ gint ret(QTMS_RESULT_SUCCESS);
+ QTMSSourceType sourcetype;
+ ret = qtmssrc->GetType(sourcetype);
+ switch (sourcetype)
+ {
+ case QTMS_SOURCE_CLIENT:
+ delete (static_cast<QTMSClientSourceImpl*>(qtmssrc));
+ qtmssrc = NULL;
+ break;
+ case QTMS_SOURCE_MODEM:
+ {
+ delete (static_cast<QTMSModemSourceImpl*>(qtmssrc));
+ qtmssrc = NULL;
+ }
+ break;
+ case TMS_SOURCE_MIC:
+ {
+ delete (static_cast<QTMSMicSourceImpl*>(qtmssrc));
+ qtmssrc = NULL;
+ }
+ break;
+ default:
+ ret = TMS_RESULT_SOURCE_TYPE_NOT_SUPPORTED;
+ break;
+ }
+
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::CreateSink(QTMSSinkType sinktype, QTMSSink*& qtmssink)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ TMS::TMSSink* tmssink(NULL);
+
+ if (iFactory)
+ {
+ ret = iFactory->CreateSink(sinktype, tmssink);
+
+ if (ret == TMS_RESULT_SUCCESS)
+ {
+ switch (sinktype)
+ {
+ case QTMS_SINK_CLIENT:
+ ret = QTMSClientSinkImpl::Create(qtmssink, tmssink);
+ break;
+ case QTMS_SINK_MODEM:
+ ret = QTMSModemSinkImpl::Create(qtmssink, tmssink);
+ break;
+ case QTMS_SINK_SPEAKER:
+ ret = QTMSSpeakerSinkImpl::Create(qtmssink, tmssink);
+ break;
+ default:
+ ret = TMS_RESULT_SINK_TYPE_NOT_SUPPORTED;
+ break;
+ }
+ }
+ }
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::DeleteSink(QTMSSink*& qtmssink)
+ {
+ TRACE_PRN_FN_ENT;
+ __ASSERT_ALWAYS(qtmssink, PANIC(QTMS_RESULT_NULL_ARGUMENT));
+
+ gint ret(QTMS_RESULT_SUCCESS);
+ QTMSSinkType sinktype;
+ ret = qtmssink->GetType(sinktype);
+ switch (sinktype)
+ {
+ case QTMS_SINK_CLIENT:
+ {
+ delete (static_cast<QTMSClientSinkImpl*>(qtmssink));
+ qtmssink = NULL;
+ }
+ break;
+ case QTMS_SINK_MODEM:
+ {
+ delete (static_cast<QTMSModemSinkImpl*>(qtmssink));
+ qtmssink = NULL;
+ }
+ break;
+ case QTMS_SINK_SPEAKER:
+ {
+ delete (static_cast<QTMSSpeakerSinkImpl*>(qtmssink));
+ qtmssink = NULL;
+ }
+ break;
+ default:
+ ret = QTMS_RESULT_SINK_TYPE_NOT_SUPPORTED;
+ break;
+ }
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::CreateGlobalRouting(QTMSGlobalRouting*& qrouting)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ TMS::TMSGlobalRouting* tmsrouting(NULL);
+ if (iFactory)
+ {
+ ret = iFactory->CreateGlobalRouting(tmsrouting);
+
+ if (ret == TMS_RESULT_SUCCESS)
+ {
+ ret = QTMSGlobalRoutingImpl::Create(qrouting, tmsrouting);
+ }
+ }
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::DeleteGlobalRouting(QTMSGlobalRouting*& globalrouting)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_SUCCESS);
+ delete (static_cast<QTMSGlobalRoutingImpl*>(globalrouting));
+ globalrouting = NULL;
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::CreateDTMF(QTMSStreamType streamtype, QTMSDTMF*& qdtmf)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ TMS::TMSDTMF* tmsdtmf = NULL;
+
+ if (iFactory)
+ {
+ ret = iFactory->CreateDTMF(streamtype, tmsdtmf);
+
+ if (ret == TMS_RESULT_SUCCESS)
+ {
+ ret = QTMSDTMFImpl::Create(qdtmf, tmsdtmf);
+ }
+ }
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::DeleteDTMF(QTMSDTMF*& dtmf)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_SUCCESS);
+ delete (static_cast<QTMSDTMFImpl*>(dtmf));
+ dtmf = NULL;
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::CreateRingTonePlayer(QTMSRingTone*& rt)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ TMS::TMSRingTone* tmsrt = NULL;
+
+ if (iFactory)
+ {
+ ret = iFactory->CreateRingTonePlayer(tmsrt);
+
+ if (ret == TMS_RESULT_SUCCESS)
+ {
+ ret = QTMSRingToneImpl::Create(rt, tmsrt);
+ }
+ }
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::DeleteRingTonePlayer(QTMSRingTone*& rt)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_SUCCESS);
+ delete (static_cast<QTMSRingToneImpl*>(rt));
+ rt = NULL;
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::CreateInbandTonePlayer(QTMSInbandTone*& qinbandtone)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ TMS::TMSInbandTone* tmsinband = NULL;
+ if (iFactory)
+ {
+ ret = iFactory->CreateInbandTonePlayer(tmsinband);
+
+ if (ret == TMS_RESULT_SUCCESS)
+ {
+ ret = QTMSInbandToneImpl::Create(qinbandtone, tmsinband);
+ }
+ }
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSFactoryImpl::DeleteInbandTonePlayer(QTMSInbandTone*& inbandtone)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(QTMS_RESULT_SUCCESS);
+ delete (static_cast<QTMSInbandToneImpl*>(inbandtone));
+ inbandtone = NULL;
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsformat.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsformat.h>
+#include <qtmsformat.h>
+
+using namespace QTMS;
+
+QTMSFormat::QTMSFormat() :
+ iFormat(NULL)
+ {
+ }
+
+QTMSFormat::~QTMSFormat()
+ {
+ delete iFormat;
+ }
+
+gint QTMSFormat::GetSupportedBitRates(BitRateVector& aVector)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = iFormat->GetSupportedBitRates(aVector);
+ }
+ return status;
+ }
+
+gint QTMSFormat::SetBitRate(const guint aBitrate)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = iFormat->SetBitRate(aBitrate);
+ }
+ return status;
+ }
+
+gint QTMSFormat::GetBitRate(guint& aBitrate)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = iFormat->GetBitRate(aBitrate);
+ }
+ return status;
+ }
+
+gint QTMSFormat::GetType(QTMSFormatType& fmttype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = iFormat->GetType(fmttype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsg711.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsg711format.h>
+#include <qtmsg711format.h>
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSG711Format::QTMSG711Format()
+ {
+ }
+
+QTMSG711Format::~QTMSG711Format()
+ {
+ }
+
+gint QTMSG711Format::SetMode(const QTMSG711CodecMode aMode)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSG711Format*> (iFormat)->SetMode(aMode);
+ }
+ return status;
+ }
+
+gint QTMSG711Format::GetMode(QTMSG711CodecMode& aMode)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSG711Format*> (iFormat)->GetMode(aMode);
+ }
+ return status;
+ }
+
+gint QTMSG711Format::SetCNG(const gboolean aCng)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSG711Format*> (iFormat)->SetCNG(aCng);
+ }
+ return status;
+ }
+
+gint QTMSG711Format::GetCNG(gboolean& aCng)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSG711Format*> (iFormat)->GetCNG(aCng);
+ }
+ return status;
+ }
+
+gint QTMSG711Format::SetPlc(const gboolean aPlc)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSG711Format*> (iFormat)->SetPlc(aPlc);
+ }
+ return status;
+ }
+
+gint QTMSG711Format::GetPlc(gboolean& aPlc)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSG711Format*> (iFormat)->GetPlc(aPlc);
+ }
+ return status;
+ }
+
+gint QTMSG711Format::SetVADMode(const gboolean aVad)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSG711Format*> (iFormat)->SetVADMode(aVad);
+ }
+ return status;
+ }
+
+gint QTMSG711Format::GetVADMode(gboolean& aVad)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSG711Format*> (iFormat)->GetVADMode(aVad);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsg711impl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsg711format.h>
+#include "qtmsg711impl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSG711FormatImpl::QTMSG711FormatImpl()
+ {
+ }
+
+QTMSG711FormatImpl::~QTMSG711FormatImpl()
+ {
+ }
+
+gint QTMSG711FormatImpl::Create(QTMSFormat*& qformat,
+ TMS::TMSFormat*& tmsformat)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSG711FormatImpl* self = new QTMSG711FormatImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iFormat = tmsformat;
+ }
+ qformat = self;
+ return ret;
+ }
+
+gint QTMSG711FormatImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSG711FormatImpl::GetFormat(TMS::TMSFormat*& fmt)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iFormat)
+ {
+ fmt = iFormat;
+ ret = QTMS_RESULT_SUCCESS;
+ }
+ return ret;
+ }
+
+gint QTMSG711FormatImpl::GetType(QTMSFormatType& fmttype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = iFormat->GetType(fmttype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsg729.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsg729format.h>
+#include <qtmsg729format.h>
+#include "tmsutility.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSG729Format::QTMSG729Format()
+ {
+ }
+
+QTMSG729Format::~QTMSG729Format()
+ {
+ }
+
+gint QTMSG729Format::SetVADMode(const gboolean aVad)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSG729Format*> (iFormat)->SetVADMode(aVad);
+ }
+ return status;
+ }
+
+gint QTMSG729Format::GetVADMode(gboolean& aVad)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSG729Format*> (iFormat)->GetVADMode(aVad);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsg729impl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsilbcformat.h>
+#include "tmsutility.h"
+#include "qtmsg729impl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSG729FormatImpl::QTMSG729FormatImpl()
+ {
+ }
+
+QTMSG729FormatImpl::~QTMSG729FormatImpl()
+ {
+ TRACE_PRN_FN_ENT;
+ TRACE_PRN_FN_EXT;
+ }
+
+gint QTMSG729FormatImpl::Create(QTMSFormat*& qformat,
+ TMS::TMSFormat*& tmsformat)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSG729FormatImpl* self = new QTMSG729FormatImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iFormat = tmsformat;
+ }
+ qformat = self;
+ return ret;
+ }
+
+gint QTMSG729FormatImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSG729FormatImpl::GetFormat(TMS::TMSFormat*& fmt)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iFormat)
+ {
+ fmt = iFormat;
+ ret = QTMS_RESULT_SUCCESS;
+ }
+ return ret;
+ }
+
+gint QTMSG729FormatImpl::GetType(QTMSFormatType& fmttype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = iFormat->GetType(fmttype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsgaineffect.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsgaineffect.h>
+#include <qtmsgaineffect.h>
+#include "qtmsgaineffectimpl.h"
+#include "qtmswrapperexport.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSGainEffect::QTMSGainEffect() :
+ iEffect(NULL)
+ {
+ }
+
+QTMSGainEffect::~QTMSGainEffect()
+ {
+ delete iEffect;
+ }
+
+gint QTMSGainEffect::GetLevel(guint& level)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSGainEffect*> (iEffect)->GetLevel(level);
+ }
+ return status;
+ }
+
+gint QTMSGainEffect::SetLevel(const guint level)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSGainEffect*> (iEffect)->SetLevel(level);
+ }
+ return status;
+ }
+
+gint QTMSGainEffect::GetMaxLevel(guint& level)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSGainEffect*> (iEffect)->GetMaxLevel(level);
+ }
+ return status;
+ }
+
+gint QTMSGainEffect::GetType(QTMSSourceType& sourcetype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSGainEffect*> (iEffect)->GetType(sourcetype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsgaineffectimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsgaineffect.h>
+#include "qtmsgaineffectimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSGainEffectImpl::QTMSGainEffectImpl()
+ {
+ }
+
+QTMSGainEffectImpl::~QTMSGainEffectImpl()
+ {
+ RemoveObserver(*this);
+ }
+
+gint QTMSGainEffectImpl::Create(QTMSEffect*& qgain, TMS::TMSEffect*& tmsgain)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSGainEffectImpl* self = new QTMSGainEffectImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iEffect = tmsgain;
+ ret = self->AddObserver(*self, NULL);
+ }
+ qgain = self;
+ return ret;
+ }
+
+gint QTMSGainEffectImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSGainEffectImpl::AddObserver(TMS::TMSEffectObserver& obsrvr,
+ gpointer user_data)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iEffect)
+ {
+ ret = static_cast<TMSGainEffect*> (iEffect)->AddObserver(obsrvr,
+ user_data);
+ }
+ return ret;
+ }
+
+gint QTMSGainEffectImpl::RemoveObserver(TMS::TMSEffectObserver& obsrvr)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iEffect)
+ {
+ ret = static_cast<TMSGainEffect*> (iEffect)->RemoveObserver(obsrvr);
+ }
+ return ret;
+ }
+
+gint QTMSGainEffectImpl::GetEffect(TMS::TMSEffect*& tmseffect)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iEffect)
+ {
+ tmseffect = iEffect;
+ ret = QTMS_RESULT_SUCCESS;
+ }
+ return ret;
+ }
+
+void QTMSGainEffectImpl::EffectsEvent(const TMS::TMSEffect& /*tmseffect*/,
+ TMS::TMSSignalEvent event)
+ {
+ QTMSSignalEvent qevent;
+
+ qevent.type = event.type;
+ qevent.reason = event.reason;
+ qevent.curr_state = event.curr_state;
+ qevent.prev_state = event.prev_state;
+ qevent.event_data = event.event_data;
+ qevent.user_data = event.user_data;
+
+ emit QTMS::QTMSGainEffect::EffectsEvent(static_cast<QTMSEffect&> (*this),
+ qevent);
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsglobalgaineffect.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsglobalgaineffect.h>
+#include <qtmsglobalgaineffect.h>
+#include "qtmsglobalgaineffectimpl.h"
+#include "qtmswrapperexport.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSGlobalGainEffect::QTMSGlobalGainEffect() :
+ iEffect(NULL)
+ {
+ }
+
+QTMSGlobalGainEffect::~QTMSGlobalGainEffect()
+ {
+ delete (static_cast<TMSGlobalGainEffect*>(iEffect));
+ }
+
+gint QTMSGlobalGainEffect::GetLevel(guint& level)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSGlobalGainEffect*> (iEffect)->GetLevel(level);
+ }
+ return status;
+ }
+
+gint QTMSGlobalGainEffect::SetLevel(const guint level)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSGlobalGainEffect*> (iEffect)->SetLevel(level);
+ }
+ return status;
+ }
+
+gint QTMSGlobalGainEffect::GetMaxLevel(guint& level)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSGlobalGainEffect*> (iEffect)->GetMaxLevel(
+ level);
+ }
+ return status;
+ }
+
+gint QTMSGlobalGainEffect::GetType(QTMSSourceType& sourcetype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSGlobalGainEffect*> (iEffect)->GetType(
+ sourcetype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsglobalgaineffectimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsglobalgaineffect.h>
+#include "tmsutility.h"
+#include "qtmsglobalgaineffectimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSGlobalGainEffectImpl::QTMSGlobalGainEffectImpl()
+ {
+ }
+
+QTMSGlobalGainEffectImpl::~QTMSGlobalGainEffectImpl()
+ {
+ RemoveObserver(*this);
+ }
+
+gint QTMSGlobalGainEffectImpl::Create(QTMSEffect*& qglobalgain,
+ TMS::TMSEffect*& tmsglobalgain)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSGlobalGainEffectImpl* self = new QTMSGlobalGainEffectImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iEffect = tmsglobalgain;
+ ret = self->AddObserver(*self, NULL);
+ }
+ qglobalgain = self;
+ return ret;
+ }
+
+gint QTMSGlobalGainEffectImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSGlobalGainEffectImpl::AddObserver(TMS::TMSEffectObserver& obsrvr,
+ gpointer user_data)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iEffect)
+ {
+ ret = static_cast<TMSGlobalGainEffect*> (iEffect)->AddObserver(obsrvr,
+ user_data);
+ }
+ return ret;
+ }
+
+gint QTMSGlobalGainEffectImpl::RemoveObserver(TMS::TMSEffectObserver& obsrvr)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iEffect)
+ {
+ ret = static_cast<TMSGlobalGainEffect*> (iEffect)->RemoveObserver(
+ obsrvr);
+ }
+ return ret;
+ }
+
+void QTMSGlobalGainEffectImpl::EffectsEvent(
+ const TMS::TMSEffect& /*tmseffect*/, TMS::TMSSignalEvent event)
+ {
+ QTMSSignalEvent qevent;
+
+ qevent.type = event.type;
+ qevent.reason = event.reason;
+ qevent.curr_state = event.curr_state;
+ qevent.prev_state = event.prev_state;
+ qevent.event_data = event.event_data;
+ qevent.user_data = event.user_data;
+
+ emit QTMS::QTMSGlobalGainEffect::EffectsEvent(
+ static_cast<QTMSEffect&> (*this), qevent);
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsglobalrouting.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsglobalrouting.h>
+#include <qtmsglobalrouting.h>
+#include "qtmsglobalroutingimpl.h"
+#include "qtmswrapperexport.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSGlobalRouting::QTMSGlobalRouting() :
+ iRouting(NULL)
+ {
+ }
+
+QTMSGlobalRouting::~QTMSGlobalRouting()
+ {
+ delete iRouting;
+ }
+
+gint QTMSGlobalRouting::SetOutput(const QTMSAudioOutput output)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iRouting)
+ {
+ status = iRouting->SetOutput(output);
+ }
+ return status;
+ }
+
+gint QTMSGlobalRouting::GetOutput(QTMSAudioOutput& output)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iRouting)
+ {
+ status = iRouting->GetOutput(output);
+ }
+ return status;
+ }
+
+gint QTMSGlobalRouting::GetPreviousOutput(QTMSAudioOutput& output)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iRouting)
+ {
+ status = iRouting->GetPreviousOutput(output);
+ }
+ return status;
+ }
+
+gint QTMSGlobalRouting::GetAvailableOutputs(OutputVector& outputs)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iRouting)
+ {
+ status = iRouting->GetAvailableOutputs(outputs);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsglobalroutingimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsglobalrouting.h>
+#include "tmsutility.h"
+#include "qtmsglobalroutingimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSGlobalRoutingImpl::QTMSGlobalRoutingImpl()
+ {
+ }
+
+QTMSGlobalRoutingImpl::~QTMSGlobalRoutingImpl()
+ {
+ RemoveObserver(*this);
+ }
+
+gint QTMSGlobalRoutingImpl::Create(QTMSGlobalRouting*& qrouting,
+ TMS::TMSGlobalRouting*& tmsrouting)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSGlobalRoutingImpl* self = new QTMSGlobalRoutingImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iRouting = tmsrouting;
+ ret = self->AddObserver(*self, NULL);
+ }
+ qrouting = self;
+ return ret;
+ }
+
+gint QTMSGlobalRoutingImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSGlobalRoutingImpl::AddObserver(TMS::TMSGlobalRoutingObserver& obsrvr,
+ gpointer user_data)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iRouting)
+ {
+ ret = iRouting->AddObserver(obsrvr, user_data);
+ }
+ return ret;
+ }
+
+gint QTMSGlobalRoutingImpl::RemoveObserver(
+ TMS::TMSGlobalRoutingObserver& obsrvr)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iRouting)
+ {
+ ret = iRouting->RemoveObserver(obsrvr);
+ }
+ return ret;
+ }
+
+void QTMSGlobalRoutingImpl::GlobalRoutingEvent(
+ const TMS::TMSGlobalRouting& /*routing*/, TMS::TMSSignalEvent event,
+ TMS::TMSAudioOutput output)
+ {
+ QTMSSignalEvent qevent;
+ QTMSAudioOutput qoutput;
+
+ qevent.type = event.type;
+ qevent.reason = event.reason;
+ qevent.curr_state = event.curr_state;
+ qevent.prev_state = event.prev_state;
+ qevent.event_data = event.event_data;
+ qevent.user_data = event.user_data;
+ qoutput = output;
+
+ emit QTMS::QTMSGlobalRouting::GlobalRoutingEvent(
+ static_cast<QTMSGlobalRouting&> (*this), qevent, qoutput);
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsglobalvoleffect.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include<tmsglobalvoleffect.h>
+#include <qtmsglobalvoleffect.h>
+#include "qtmsglobalvoleffectimpl.h"
+#include "qtmswrapperexport.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSGlobalVolEffect::QTMSGlobalVolEffect() :
+ iEffect(NULL)
+ {
+ }
+
+QTMSGlobalVolEffect::~QTMSGlobalVolEffect()
+ {
+ delete (static_cast<TMSGlobalVolEffect*>(iEffect));
+ }
+
+gint QTMSGlobalVolEffect::GetLevel(guint& level)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSGlobalVolEffect*> (iEffect)->GetLevel(level);
+ }
+ return status;
+ }
+
+gint QTMSGlobalVolEffect::SetLevel(const guint level)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSGlobalVolEffect*> (iEffect)->SetLevel(level);
+ }
+ return status;
+ }
+
+gint QTMSGlobalVolEffect::GetMaxLevel(guint& level)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSGlobalVolEffect*> (iEffect)->GetMaxLevel(
+ level);
+ }
+ return status;
+ }
+
+gint QTMSGlobalVolEffect::GetType(QTMSSourceType& sourcetype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSGlobalVolEffect*> (iEffect)->GetType(
+ sourcetype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsglobalvoleffectimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsglobalvoleffect.h>
+#include "tmsutility.h"
+#include "qtmsglobalvoleffectimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSGlobalVolEffectImpl::QTMSGlobalVolEffectImpl()
+ {
+ }
+
+QTMSGlobalVolEffectImpl::~QTMSGlobalVolEffectImpl()
+ {
+ RemoveObserver(*this);
+ }
+
+gint QTMSGlobalVolEffectImpl::Create(QTMSEffect*& qglobalvol,
+ TMS::TMSEffect*& tmsglobalvol)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSGlobalVolEffectImpl* self = new QTMSGlobalVolEffectImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iEffect = tmsglobalvol;
+ ret = self->AddObserver(*self, NULL);
+ }
+ qglobalvol = self;
+ return ret;
+ }
+
+gint QTMSGlobalVolEffectImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSGlobalVolEffectImpl::AddObserver(TMS::TMSEffectObserver& obsrvr,
+ gpointer user_data)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iEffect)
+ {
+ ret = static_cast<TMSGlobalVolEffect*> (iEffect)->AddObserver(obsrvr,
+ user_data);
+ }
+ return ret;
+ }
+
+gint QTMSGlobalVolEffectImpl::RemoveObserver(TMS::TMSEffectObserver& obsrvr)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iEffect)
+ {
+ ret = static_cast<TMSGlobalVolEffect*> (iEffect)->RemoveObserver(
+ obsrvr);
+ }
+ return ret;
+ }
+
+void QTMSGlobalVolEffectImpl::EffectsEvent(const TMS::TMSEffect& /*tmseffect*/,
+ TMS::TMSSignalEvent event)
+ {
+ QTMSSignalEvent qevent;
+
+ qevent.type = event.type;
+ qevent.reason = event.reason;
+ qevent.curr_state = event.curr_state;
+ qevent.prev_state = event.prev_state;
+ qevent.event_data = event.event_data;
+ qevent.user_data = event.user_data;
+
+ emit QTMS::QTMSGlobalVolEffect::EffectsEvent(static_cast<QTMSEffect&>
+ (*this), qevent);
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsilbc.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsilbcformat.h>
+#include <qtmsilbcformat.h>
+#include "tmsutility.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSILBCFormat::QTMSILBCFormat()
+ {
+ }
+
+QTMSILBCFormat::~QTMSILBCFormat()
+ {
+ }
+
+gint QTMSILBCFormat::SetMode(const QTMSG711CodecMode aMode)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSILBCFormat*> (iFormat)->SetMode(aMode);
+ }
+ return status;
+ }
+
+gint QTMSILBCFormat::GetMode(QTMSG711CodecMode& aMode)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSILBCFormat*> (iFormat)->GetMode(aMode);
+ }
+ return status;
+ }
+
+gint QTMSILBCFormat::SetCNG(const gboolean aCng)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSILBCFormat*> (iFormat)->SetCNG(aCng);
+ }
+ return status;
+ }
+
+gint QTMSILBCFormat::GetCNG(gboolean& aCng)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSILBCFormat*> (iFormat)->GetCNG(aCng);
+ }
+ return status;
+ }
+
+gint QTMSILBCFormat::SetVADMode(const gboolean aVad)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSILBCFormat*> (iFormat)->SetVADMode(aVad);
+ }
+ return status;
+ }
+
+gint QTMSILBCFormat::GetVADMode(gboolean& aVad)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = static_cast<TMSILBCFormat*> (iFormat)->GetVADMode(aVad);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsilbcimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsilbcformat.h>
+#include "qtmsilbcimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSILBCFormatImpl::QTMSILBCFormatImpl()
+ {
+ }
+
+QTMSILBCFormatImpl::~QTMSILBCFormatImpl()
+ {
+ }
+
+gint QTMSILBCFormatImpl::Create(QTMSFormat*& qformat,
+ TMS::TMSFormat*& tmsformat)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSILBCFormatImpl* self = new QTMSILBCFormatImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iFormat = tmsformat;
+ }
+ qformat = self;
+ return ret;
+ }
+
+gint QTMSILBCFormatImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSILBCFormatImpl::GetFormat(TMS::TMSFormat*& fmt)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iFormat)
+ {
+ fmt = iFormat;
+ ret = QTMS_RESULT_SUCCESS;
+ }
+ return ret;
+ }
+
+gint QTMSILBCFormatImpl::GetType(QTMSFormatType& fmttype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = iFormat->GetType(fmttype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsinbandtone.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtmsinbandtone.h>
+#include <tmsinbandtone.h>
+#include "qtmswrapperexport.h"
+#include "qtmsinbandtoneimpl.h"
+
+using namespace QTMS;
+
+QTMSInbandTone::QTMSInbandTone(void) :
+ iInbandTone(NULL)
+ {
+ }
+
+QTMSInbandTone::~QTMSInbandTone(void)
+ {
+ delete iInbandTone;
+ }
+
+gint QTMSInbandTone::Start(QTMSInbandToneType inbandtonetype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iInbandTone)
+ {
+ status = iInbandTone->Start(inbandtonetype);
+ }
+ return status;
+ }
+
+gint QTMSInbandTone::Stop()
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iInbandTone)
+ {
+ status = iInbandTone->Stop();
+ }
+ return status;
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsinbandtoneimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsinbandtone.h>
+#include "tmsutility.h"
+#include "qtmsinbandtoneimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSInbandToneImpl::QTMSInbandToneImpl()
+ {
+ }
+
+QTMSInbandToneImpl::~QTMSInbandToneImpl()
+ {
+ RemoveObserver(*this);
+ }
+
+gint QTMSInbandToneImpl::Create(QTMSInbandTone*& qinband,
+ TMS::TMSInbandTone*& tmsinband)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSInbandToneImpl* self = new QTMSInbandToneImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iInbandTone = tmsinband;
+ self->AddObserver(*self, NULL);
+ }
+ qinband = self;
+ return ret;
+ }
+
+gint QTMSInbandToneImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSInbandToneImpl::AddObserver(TMS::TMSInbandToneObserver& obsrvr,
+ gpointer user_data)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iInbandTone)
+ {
+ ret = iInbandTone->AddObserver(obsrvr, user_data);
+ }
+ return ret;
+ }
+
+gint QTMSInbandToneImpl::RemoveObserver(TMS::TMSInbandToneObserver& obsrvr)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iInbandTone)
+ {
+ ret = iInbandTone->RemoveObserver(obsrvr);
+ }
+ return ret;
+ }
+
+void QTMSInbandToneImpl::InbandToneEvent(
+ const TMS::TMSInbandTone& /*inbandtone*/, TMS::TMSSignalEvent event)
+ {
+ QTMSSignalEvent qevent;
+
+ qevent.type = event.type;
+ qevent.reason = event.reason;
+ qevent.curr_state = event.curr_state;
+ qevent.prev_state = event.prev_state;
+ qevent.event_data = event.event_data;
+ qevent.user_data = event.user_data;
+
+ emit QTMS::QTMSInbandTone::InbandToneEvent(
+ static_cast<QTMSInbandTone&> (*this), qevent);
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsmembuffer.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,155 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsbuffer.h>
+#include "qtmsmembuffer.h"
+#include "tmsutility.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSMemBuffer::QTMSMemBuffer()
+ {
+ }
+
+QTMSMemBuffer::~QTMSMemBuffer()
+ {
+ delete iBuffer;
+ }
+
+gint QTMSMemBuffer::Create(guint size, QTMSBuffer*& qbuffer,
+ TMS::TMSBuffer*& tmsbuffer)
+ {
+ TRACE_PRN_FN_ENT;
+ gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSMemBuffer* self = new QTMSMemBuffer();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != TMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iBuffer = tmsbuffer;
+ }
+ qbuffer = self;
+ TRACE_PRN_FN_EXT;
+ return ret;
+ }
+
+gint QTMSMemBuffer::PostConstruct()
+ {
+ gint ret(TMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSMemBuffer::GetType(QTMSBufferType& buffertype)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iBuffer)
+ {
+ ret = iBuffer->GetType(buffertype);
+ }
+ return ret;
+ }
+
+/**
+ * Gets the timestamp on the Buffer so that the framework can
+ * determine the time at which this buffer has to be rendered
+ * by the output device sink.
+ *
+ * @param ts timestamp in microseconds
+ *
+ */
+gint QTMSMemBuffer::GetTimeStamp(guint64& ts)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iBuffer)
+ {
+ ret = iBuffer->GetTimeStamp(ts);
+ }
+ return ret;
+ }
+
+/**
+ * Sets the timestamp on the Buffer so that the framework can
+ * determine the time at which this buffer has to be rendered
+ * by the output device sink.
+ *
+ * @param ts timestamp in milliseconds
+ *
+ */
+gint QTMSMemBuffer::SetTimeStamp(const guint64 ts)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iBuffer)
+ {
+ ret = iBuffer->SetTimeStamp(ts);
+ }
+ return ret;
+ }
+
+/**
+ * Gets the size of data in the buffer specified by the client.
+ *
+ * @param size size of data in bytes
+ *
+ */
+gint QTMSMemBuffer::GetDataSize(guint& size)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iBuffer)
+ {
+ ret = iBuffer->GetDataSize(size);
+ }
+ return ret;
+ }
+
+/**
+ * Sets the size of data in the buffer after the client fill it.
+ *
+ * @param size size of data in bytes
+ *
+ */
+gint QTMSMemBuffer::SetDataSize(const guint size)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iBuffer)
+ {
+ ret = iBuffer->SetDataSize(size);
+ }
+ return ret;
+ }
+
+/**
+ * Gets the pointer to the memory location associated with this
+ * buffer where the data is stored.
+ *
+ * @param bufptr ptr to the data stored in the buffer.
+ *
+ */
+gint QTMSMemBuffer::GetDataPtr(guint8*& bufptr)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iBuffer)
+ {
+ ret = iBuffer->GetDataPtr(bufptr);
+ }
+ return ret;
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsmicsource.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsmicsource.h>
+#include <qtmsmicsource.h>
+#include "qtmsmicsourceimpl.h"
+#include "qtmswrapperexport.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSMicSource::QTMSMicSource() :
+ iSource(NULL)
+ {
+ }
+
+QTMSMicSource::~QTMSMicSource()
+ {
+ delete (static_cast<TMSMicSource*> (iSource));
+ }
+
+gint QTMSMicSource::GetType(QTMSSourceType& sourcetype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSource)
+ {
+ //status = iSource->GetType(sourcetype);
+ status = static_cast<TMSMicSource*> (iSource)->GetType(sourcetype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsmicsourceimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsmicsource.h>
+#include "qtmsmicsourceimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSMicSourceImpl::QTMSMicSourceImpl()
+ {
+ }
+
+QTMSMicSourceImpl::~QTMSMicSourceImpl()
+ {
+ }
+
+gint QTMSMicSourceImpl::Create(QTMSSource*& qsource, TMS::TMSSource*& tmssource)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSMicSourceImpl* self = new QTMSMicSourceImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iSource = tmssource;
+ }
+ qsource = self;
+ return ret;
+ }
+
+gint QTMSMicSourceImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSMicSourceImpl::GetSource(TMS::TMSSource*& tmssource)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSource)
+ {
+ tmssource = iSource;
+ ret = QTMS_RESULT_SUCCESS;
+ }
+ return ret;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsmodemsink.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtmsmodemsink.h>
+#include <tmsmodemsink.h>
+#include "qtmsmodemsinkimpl.h"
+#include "qtmswrapperexport.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSModemSink::QTMSModemSink() :
+ iSink(NULL)
+ {
+ }
+
+QTMSModemSink::~QTMSModemSink()
+ {
+ delete (static_cast<TMSModemSink*>(iSink));
+ }
+
+gint QTMSModemSink::GetType(QTMSSinkType& sinktype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSink)
+ {
+ //status = iSink->GetType(sinktype);
+ status = static_cast<TMSModemSink*> (iSink)->GetType(sinktype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsmodemsinkimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsmodemsink.h>
+#include "qtmsmodemsinkimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSModemSinkImpl::QTMSModemSinkImpl()
+ {
+ }
+
+QTMSModemSinkImpl::~QTMSModemSinkImpl()
+ {
+ }
+
+gint QTMSModemSinkImpl::Create(QTMSSink*& qsink,TMS::TMSSink*& tmssink)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSModemSinkImpl* self = new QTMSModemSinkImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iSink = tmssink;
+ }
+ qsink = self;
+ return ret;
+ }
+
+gint QTMSModemSinkImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSModemSinkImpl::GetSink(TMS::TMSSink*& tmssink)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSink)
+ {
+ tmssink = iSink;
+ ret = QTMS_RESULT_SUCCESS;
+ }
+ return ret;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsmodemsource.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtmsmodemsource.h>
+#include <tmsmodemsource.h>
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSModemSource::QTMSModemSource() :
+ iSource(NULL)
+ {
+ }
+
+QTMSModemSource::~QTMSModemSource()
+ {
+ delete (static_cast<TMSModemSource*> (iSource));
+ }
+
+gint QTMSModemSource::GetType(QTMSSourceType& sourcetype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSource)
+ {
+ //status = iSource->GetType(sourcetype);
+ status = static_cast<TMSModemSource*> (iSource)->GetType(sourcetype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsmodemsourceimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsmodemsource.h>
+#include "qtmsmodemsourceimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSModemSourceImpl::QTMSModemSourceImpl()
+ {
+ }
+
+QTMSModemSourceImpl::~QTMSModemSourceImpl()
+ {
+ }
+
+gint QTMSModemSourceImpl::Create(QTMSSource*& qsource,
+ TMS::TMSSource*& tmssource)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSModemSourceImpl* self = new QTMSModemSourceImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iSource = tmssource;
+ }
+ qsource = self;
+ return ret;
+ }
+
+gint QTMSModemSourceImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSModemSourceImpl::GetSource(TMS::TMSSource*& tmssource)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSource)
+ {
+ tmssource = iSource;
+ ret = QTMS_RESULT_SUCCESS;
+ }
+ return ret;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmspcm.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtmspcmformat.h>
+
+using namespace QTMS;
+
+QTMSPCMFormat::QTMSPCMFormat()
+ {
+ }
+
+QTMSPCMFormat::~QTMSPCMFormat()
+ {
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmspcmimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmspcmformat.h>
+#include "tmsutility.h"
+#include "qtmspcmimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSPCMFormatImpl::QTMSPCMFormatImpl()
+ {
+ }
+
+QTMSPCMFormatImpl::~QTMSPCMFormatImpl()
+ {
+ TRACE_PRN_FN_ENT;
+ TRACE_PRN_FN_EXT;
+ }
+
+gint QTMSPCMFormatImpl::Create(QTMSFormat*& qformat, TMS::TMSFormat*& tmsformat)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSPCMFormatImpl* self = new QTMSPCMFormatImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iFormat = tmsformat;
+ }
+ qformat = self;
+ return ret;
+ }
+
+gint QTMSPCMFormatImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSPCMFormatImpl::GetFormat(TMS::TMSFormat*& fmt)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iFormat)
+ {
+ fmt = iFormat;
+ ret = QTMS_RESULT_SUCCESS;
+ }
+ return ret;
+ }
+
+gint QTMSPCMFormatImpl::GetType(QTMSFormatType& fmttype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iFormat)
+ {
+ status = iFormat->GetType(fmttype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsringtone.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsringtone.h>
+#include <qtmsringtone.h>
+#include "qtmsringtoneimpl.h"
+
+using namespace QTMS;
+
+QTMSRingTone::QTMSRingTone() :
+ iRingTone(NULL)
+ {
+ }
+
+QTMSRingTone::~QTMSRingTone()
+ {
+ delete iRingTone;
+ }
+
+gint QTMSRingTone::Init(const QTMSRingToneType type, GString* str, GString* tts)
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iRingTone)
+ {
+ status = iRingTone->Init(type, str, tts);
+ }
+ return status;
+ }
+
+gint QTMSRingTone::Deinit()
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iRingTone)
+ {
+ status = iRingTone->Deinit();
+ }
+ return status;
+ }
+
+gint QTMSRingTone::Play()
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iRingTone)
+ {
+ status = iRingTone->Play();
+ }
+ return status;
+ }
+
+gint QTMSRingTone::Stop()
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iRingTone)
+ {
+ status = iRingTone->Stop();
+ }
+ return status;
+ }
+
+gint QTMSRingTone::Pause()
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iRingTone)
+ {
+ status = iRingTone->Pause();
+ }
+ return status;
+ }
+
+gint QTMSRingTone::Mute()
+ {
+ gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iRingTone)
+ {
+ status = iRingTone->Mute();
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsringtoneimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsringtone.h>
+#include <qtmseffect.h>
+#include "tmsutility.h"
+#include "qtmsringtoneimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSRingToneImpl::QTMSRingToneImpl()
+ {
+ }
+
+QTMSRingToneImpl::~QTMSRingToneImpl()
+ {
+ RemoveObserver(*this);
+ }
+
+gint QTMSRingToneImpl::Create(QTMSRingTone*& qrt, TMS::TMSRingTone*& tmsrt)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSRingToneImpl* self = new QTMSRingToneImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iRingTone = tmsrt;
+ ret = self->AddObserver(*self, NULL);
+ }
+ qrt = self;
+ return ret;
+ }
+
+gint QTMSRingToneImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSRingToneImpl::AddObserver(TMS::TMSRingToneObserver& obsrvr,
+ gpointer user_data)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iRingTone)
+ {
+ ret = iRingTone->AddObserver(obsrvr, user_data);
+ }
+ return ret;
+ }
+
+gint QTMSRingToneImpl::RemoveObserver(TMS::TMSRingToneObserver& obsrvr)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iRingTone)
+ {
+ ret = iRingTone->RemoveObserver(obsrvr);
+ }
+ return ret;
+ }
+
+void QTMSRingToneImpl::RingtoneEvent(const TMS::TMSRingTone& /*rt*/,
+ TMS::TMSSignalEvent event)
+ {
+ QTMSSignalEvent qevent;
+ qevent.type = event.type;
+ qevent.reason = event.reason;
+ qevent.curr_state = event.curr_state;
+ qevent.prev_state = event.prev_state;
+ qevent.event_data = event.event_data;
+ qevent.user_data = event.user_data;
+
+ emit QTMS::QTMSRingTone::RingtoneEvent(static_cast<QTMSRingTone&> (*this),
+ qevent);
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsspeakersink.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtmsspeakersink.h>
+#include <tmsspeakersink.h>
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSSpeakerSink::QTMSSpeakerSink() :
+ iSink(NULL)
+ {
+ }
+
+QTMSSpeakerSink::~QTMSSpeakerSink()
+ {
+ delete (static_cast<TMSSpeakerSink*>(iSink));
+ }
+
+gint QTMSSpeakerSink::GetType(QTMSSinkType& sinktype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iSink)
+ {
+ //status = iSink->GetType(sinktype); //should be ok
+ status = static_cast<TMSSpeakerSink*> (iSink)->GetType(sinktype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsspeakersinkimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsspeakersink.h>
+#include "qtmsspeakersinkimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSSpeakerSinkImpl::QTMSSpeakerSinkImpl()
+ {
+ }
+
+QTMSSpeakerSinkImpl::~QTMSSpeakerSinkImpl()
+ {
+ }
+
+gint QTMSSpeakerSinkImpl::Create(QTMSSink*& qsink, TMS::TMSSink*& tmssink)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSSpeakerSinkImpl* self = new QTMSSpeakerSinkImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iSink = tmssink;
+ }
+ qsink = self;
+ return ret;
+ }
+
+gint QTMSSpeakerSinkImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSSpeakerSinkImpl::GetSink(TMS::TMSSink*& tmssink)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iSink)
+ {
+ tmssink = iSink;
+ ret = QTMS_RESULT_SUCCESS;
+ }
+ return ret;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsstream.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,411 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmssource.h>
+#include <tmsformat.h>
+#include <tmsstream.h>
+#include <qtmseffect.h>
+#include <qtmsstream.h>
+#include "qtmsstreamimpl.h"
+#include "qtmssource.h"
+#include "qtmsclientsourceimpl.h"
+#include "qtmsmodemsourceimpl.h"
+#include "qtmsmicsourceimpl.h"
+#include "qtmsclientsinkimpl.h"
+#include "qtmsmodemsinkimpl.h"
+#include "qtmsspeakersinkimpl.h"
+#include "qtmspcmimpl.h"
+#include "qtmsamrimpl.h"
+#include "qtmsg711impl.h"
+#include "qtmsg729impl.h"
+#include "qtmsilbcimpl.h"
+#include "qtmsvolumeeffectimpl.h"
+#include "qtmsgaineffectimpl.h"
+#include "qtmswrapperexport.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSStream::QTMSStream(void) :
+ iStream(NULL)
+ {
+ }
+
+QTMSStream::~QTMSStream()
+ {
+ //delete iStream;
+ //delete (static_cast<QTMSStreamImpl*> (iStream));
+ }
+
+gint QTMSStream::AddSource(QTMSSource* qsource)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iStream && qsource)
+ {
+ QTMSSourceType qsrctype;
+ TMSSource* tmssource(NULL);
+
+ qsource->GetType(qsrctype);
+
+ switch (qsrctype)
+ {
+ case QTMS_SOURCE_CLIENT:
+ status = static_cast<QTMSClientSourceImpl*>
+ (qsource)->GetSource(tmssource);
+ break;
+ case QTMS_SOURCE_MODEM:
+ status = static_cast<QTMSModemSourceImpl*>
+ (qsource)->GetSource(tmssource);
+ break;
+ case QTMS_SOURCE_MIC:
+ status = static_cast<QTMSMicSourceImpl*>
+ (qsource)->GetSource(tmssource);
+ break;
+ default:
+ break;
+ }
+ if (status == QTMS_RESULT_SUCCESS && tmssource)
+ {
+ status = iStream->AddSource(tmssource);
+ }
+ }
+ return status;
+ }
+
+gint QTMSStream::RemoveSource(QTMSSource* qsource)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iStream && qsource)
+ {
+ QTMSSourceType qsrctype;
+ TMSSource* tmssource(NULL);
+
+ qsource->GetType(qsrctype);
+
+ switch (qsrctype)
+ {
+ case QTMS_SOURCE_CLIENT:
+ status = static_cast<QTMSClientSourceImpl*>
+ (qsource)->GetSource(tmssource);
+ break;
+ case QTMS_SOURCE_MODEM:
+ status = static_cast<QTMSModemSourceImpl*>
+ (qsource)->GetSource(tmssource);
+ break;
+ case QTMS_SOURCE_MIC:
+ status = static_cast<QTMSMicSourceImpl*>
+ (qsource)->GetSource(tmssource);
+ break;
+ default:
+ break;
+ }
+ if (status == QTMS_RESULT_SUCCESS && tmssource)
+ {
+ status = iStream->RemoveSource(tmssource);
+ }
+ }
+
+ return status;
+ }
+
+gint QTMSStream::AddSink(QTMSSink* qsink)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iStream && qsink)
+ {
+ QTMSSinkType qsinktype;
+ TMSSink* tmssink(NULL);
+
+ qsink->GetType(qsinktype);
+
+ switch (qsinktype)
+ {
+ case QTMS_SINK_CLIENT:
+ status = static_cast<QTMSClientSinkImpl*>
+ (qsink)->GetSink(tmssink);
+ break;
+ case QTMS_SINK_MODEM:
+ status = static_cast<QTMSModemSinkImpl*>
+ (qsink)->GetSink(tmssink);
+ break;
+ case QTMS_SINK_SPEAKER:
+ status = static_cast<QTMSSpeakerSinkImpl*>
+ (qsink)->GetSink(tmssink);
+ break;
+ default:
+ break;
+ }
+ if (status == QTMS_RESULT_SUCCESS && tmssink)
+ {
+ status = iStream->AddSink(tmssink);
+ }
+ }
+ return status;
+ }
+
+gint QTMSStream::RemoveSink(QTMSSink* qsink)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iStream && qsink)
+ {
+ QTMSSinkType qsinktype;
+ TMSSink* tmssink(NULL);
+
+ qsink->GetType(qsinktype);
+
+ switch (qsinktype)
+ {
+ case QTMS_SINK_CLIENT:
+ status = static_cast<QTMSClientSinkImpl*>
+ (qsink)->GetSink(tmssink);
+ break;
+ case QTMS_SINK_MODEM:
+ status = static_cast<QTMSModemSinkImpl*>
+ (qsink)->GetSink(tmssink);
+ break;
+ case QTMS_SINK_SPEAKER:
+ status = static_cast<QTMSSpeakerSinkImpl*>
+ (qsink)->GetSink(tmssink);
+ break;
+ default:
+ break;
+ }
+ if (status == QTMS_RESULT_SUCCESS && tmssink)
+ {
+ status = iStream->RemoveSink(tmssink);
+ }
+ }
+
+ return status;
+ }
+
+gint QTMSStream::SetFormat(QTMSFormat* qformat)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iStream && qformat)
+ {
+ QTMSFormatType fmttype;
+ TMSFormat* tmsformat(NULL);
+ qformat->GetType(fmttype);
+ switch (fmttype)
+ {
+ case QTMS_FORMAT_PCM:
+ status = static_cast<QTMSPCMFormatImpl*>
+ (qformat)->GetFormat(tmsformat);
+ break;
+ case QTMS_FORMAT_AMR:
+ status = static_cast<QTMSAMRFormatImpl*>
+ (qformat)->GetFormat(tmsformat);
+ break;
+ case QTMS_FORMAT_G711:
+ status = static_cast<QTMSG711FormatImpl*>
+ (qformat)->GetFormat(tmsformat);
+ break;
+ case QTMS_FORMAT_G729:
+ status = static_cast<QTMSG729FormatImpl*>
+ (qformat)->GetFormat(tmsformat);
+ break;
+ case QTMS_FORMAT_ILBC:
+ status = static_cast<QTMSILBCFormatImpl*>
+ (qformat)->GetFormat(tmsformat);
+ break;
+ default:
+ break;
+ }
+
+ status = iStream->SetFormat(tmsformat);
+ }
+ return status;
+ }
+
+gint QTMSStream::ResetFormat(QTMSFormat* qformat)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iStream && qformat)
+ {
+ QTMSFormatType fmttype;
+ TMSFormat* tmsformat(NULL);
+ qformat->GetType(fmttype);
+ switch (fmttype)
+ {
+ case QTMS_FORMAT_PCM:
+ status = static_cast<QTMSPCMFormatImpl*>
+ (qformat)->GetFormat(tmsformat);
+ break;
+ case QTMS_FORMAT_AMR:
+ status = static_cast<QTMSAMRFormatImpl*>
+ (qformat)->GetFormat(tmsformat);
+ break;
+ case QTMS_FORMAT_G711:
+ status = static_cast<QTMSG711FormatImpl*>
+ (qformat)->GetFormat(tmsformat);
+ break;
+ case QTMS_FORMAT_G729:
+ status = static_cast<QTMSG729FormatImpl*>
+ (qformat)->GetFormat(tmsformat);
+ break;
+ case QTMS_FORMAT_ILBC:
+ status = static_cast<QTMSILBCFormatImpl*>
+ (qformat)->GetFormat(tmsformat);
+ break;
+ default:
+ break;
+ }
+
+ status = iStream->ResetFormat(tmsformat);
+ }
+ return status;
+ }
+
+gint QTMSStream::AddEffect(QTMSEffect* qeffect)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iStream && qeffect)
+ {
+ QTMSEffectType effecttype;
+ TMSEffect* tmseffect(NULL);
+ qeffect->GetType(effecttype);
+
+ switch (effecttype)
+ {
+ case QTMS_EFFECT_VOLUME:
+ status = static_cast<QTMSVolumeEffectImpl*>
+ (qeffect)->GetEffect(tmseffect);
+ break;
+ case QTMS_EFFECT_GAIN:
+ status = static_cast<QTMSGainEffectImpl*>
+ (qeffect)->GetEffect(tmseffect);
+ break;
+ default:
+ break;
+ }
+ status = iStream->AddEffect(tmseffect);
+ }
+ return status;
+ }
+
+gint QTMSStream::RemoveEffect(QTMSEffect* qeffect)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iStream && qeffect)
+ {
+ QTMSEffectType effecttype;
+ TMSEffect* tmseffect(NULL);
+ qeffect->GetType(effecttype);
+
+ switch (effecttype)
+ {
+ case QTMS_EFFECT_VOLUME:
+ status = static_cast<QTMSVolumeEffectImpl*>
+ (qeffect)->GetEffect(tmseffect);
+ break;
+ case QTMS_EFFECT_GAIN:
+ status = static_cast<QTMSGainEffectImpl*>
+ (qeffect)->GetEffect(tmseffect);
+ break;
+ default:
+ break;
+ }
+ status = iStream->RemoveEffect(tmseffect);
+ }
+ return status;
+ }
+
+gint QTMSStream::GetState()
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iStream)
+ {
+ status = iStream->GetState();
+ }
+ return status;
+ }
+
+gint QTMSStream::GetStreamType()
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iStream)
+ {
+ status = iStream->GetStreamType();
+ }
+ return status;
+ }
+
+gint QTMSStream::GetStreamId()
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iStream)
+ {
+ status = iStream->GetStreamId();
+ }
+ return status;
+ }
+
+gint QTMSStream::Init()
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iStream)
+ {
+ status = iStream->Init();
+ }
+ return status;
+ }
+
+gint QTMSStream::Pause()
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iStream)
+ {
+ status = iStream->Pause();
+ }
+ return status;
+ }
+
+gint QTMSStream::Start()
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iStream)
+ {
+ status = iStream->Start();
+ }
+ return status;
+ }
+
+gint QTMSStream::Stop()
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iStream)
+ {
+ status = iStream->Stop();
+ }
+ return status;
+ }
+
+void QTMSStream::Deinit()
+ {
+ if (iStream)
+ {
+ iStream->Deinit();
+ }
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsstreamimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <qtmseffect.h>
+#include <tmsstream.h>
+#include "tmsutility.h"
+#include "qtmsstreamimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSStreamImpl::QTMSStreamImpl()
+ {
+ }
+
+QTMSStreamImpl::~QTMSStreamImpl()
+ {
+ RemoveObserver(*this);
+ }
+
+gint QTMSStreamImpl::Create(QTMSCallType callType, QTMSStreamType stype,
+ QTMSStream*& qstrm, TMS::TMSStream*& tmsstrm)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSStreamImpl* self = new QTMSStreamImpl();
+ if (self)
+ {
+ ret = self->PostConstruct(callType, stype, *self);
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iStream = tmsstrm;
+ self->AddObserver(*self, NULL);
+ }
+ qstrm = self;
+ return ret;
+ }
+
+gint QTMSStreamImpl::PostConstruct(QTMSCallType /*callType*/,
+ QTMSStreamType /*stype*/, QTMSStream& /*parent*/)
+ {
+ gint status(QTMS_RESULT_SUCCESS);
+ return status;
+ }
+
+gint QTMSStreamImpl::AddObserver(TMS::TMSStreamObserver& obsrvr,
+ gpointer user_data)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iStream)
+ {
+ iStream->AddObserver(obsrvr, user_data);
+ }
+
+ return ret;
+ }
+
+gint QTMSStreamImpl::RemoveObserver(TMS::TMSStreamObserver& obsrvr)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iStream)
+ {
+ ret = iStream->RemoveObserver(obsrvr);
+ }
+
+ return ret;
+ }
+
+void QTMSStreamImpl::TMSStreamEvent(const TMS::TMSStream& /*stream*/,
+ TMS::TMSSignalEvent event)
+ {
+ QTMSSignalEvent qevent;
+
+ qevent.type = event.type;
+ qevent.reason = event.reason;
+ qevent.curr_state = event.curr_state;
+ qevent.prev_state = event.prev_state;
+ qevent.event_data = event.event_data;
+ qevent.user_data = event.user_data;
+
+ emit QTMS::QTMSStream::TMSStreamEvent(static_cast<QTMSStream&> (*this),
+ qevent);
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsvolumeeffect.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <tmsvolumeeffect.h>
+#include <qtmsvolumeeffect.h>
+#include "qtmsvolumeeffectimpl.h"
+#include "qtmswrapperexport.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSVolumeEffect::QTMSVolumeEffect() :
+ iEffect(NULL)
+ {
+ }
+
+QTMSVolumeEffect::~QTMSVolumeEffect()
+ {
+ delete (static_cast<TMSVolumeEffect*>(iEffect));
+ }
+
+gint QTMSVolumeEffect::GetLevel(guint& level)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSVolumeEffect*> (iEffect)->GetLevel(level);
+ }
+ return status;
+ }
+
+gint QTMSVolumeEffect::SetLevel(const guint level)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSVolumeEffect*> (iEffect)->SetLevel(level);
+ }
+ return status;
+ }
+
+gint QTMSVolumeEffect::GetMaxLevel(guint& level)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSVolumeEffect*> (iEffect)->GetMaxLevel(level);
+ }
+ return status;
+ }
+
+gint QTMSVolumeEffect::GetType(QTMSSourceType& sourcetype)
+ {
+ gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+ if (iEffect)
+ {
+ status = static_cast<TMSVolumeEffect*> (iEffect)->GetType(sourcetype);
+ }
+ return status;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsvolumeeffectimpl.cpp Wed Jun 23 17:51:16 2010 +0100
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2010 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: QT Bindings for TMS
+ *
+ */
+
+#include <qtms.h>
+#include <tmsvolumeeffect.h>
+#include "qtmsvolumeeffectimpl.h"
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSVolumeEffectImpl::QTMSVolumeEffectImpl()
+ {
+ }
+
+QTMSVolumeEffectImpl::~QTMSVolumeEffectImpl()
+ {
+ RemoveObserver(*this);
+ }
+
+gint QTMSVolumeEffectImpl::Create(QTMSEffect*& qvol, TMS::TMSEffect*& tmsvol)
+ {
+ gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
+ QTMSVolumeEffectImpl* self = new QTMSVolumeEffectImpl();
+ if (self)
+ {
+ ret = self->PostConstruct();
+ if (ret != QTMS_RESULT_SUCCESS)
+ {
+ delete self;
+ self = NULL;
+ }
+ self->iEffect = tmsvol;
+ ret = self->AddObserver(*self, NULL);
+ }
+ qvol = self;
+ return ret;
+ }
+
+gint QTMSVolumeEffectImpl::PostConstruct()
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+ return ret;
+ }
+
+gint QTMSVolumeEffectImpl::AddObserver(TMS::TMSEffectObserver& obsrvr,
+ gpointer user_data)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iEffect)
+ {
+ ret = static_cast<TMSVolumeEffect*> (iEffect)->AddObserver(obsrvr,
+ user_data);
+ }
+ return ret;
+ }
+
+gint QTMSVolumeEffectImpl::RemoveObserver(TMS::TMSEffectObserver& obsrvr)
+ {
+ gint ret(QTMS_RESULT_SUCCESS);
+
+ if (iEffect)
+ {
+ ret = static_cast<TMSVolumeEffect*> (iEffect)->RemoveObserver(obsrvr);
+ }
+ return ret;
+ }
+
+gint QTMSVolumeEffectImpl::GetEffect(TMS::TMSEffect*& tmseffect)
+ {
+ gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
+
+ if (iEffect)
+ {
+ tmseffect = iEffect;
+ ret = QTMS_RESULT_SUCCESS;
+ }
+ return ret;
+ }
+
+void QTMSVolumeEffectImpl::EffectsEvent(const TMS::TMSEffect& /*tmseffect*/,
+ TMS::TMSSignalEvent event)
+ {
+ QTMSSignalEvent qevent;
+
+ qevent.type = event.type;
+ qevent.reason = event.reason;
+ qevent.curr_state = event.curr_state;
+ qevent.prev_state = event.prev_state;
+ qevent.event_data = event.event_data;
+ qevent.user_data = event.user_data;
+
+ emit QTMS::QTMSVolumeEffect::EffectsEvent(
+ static_cast<QTMSEffect&> (*this), qevent);
+ }
+
+// End of file
--- a/sysdef_1_4_0.dtd Fri Feb 19 16:32:39 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
- <!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>
- <!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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysdef_1_5_1.dtd Wed Jun 23 17:51:16 2010 +0100
@@ -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>