CMPXMetadataExtractor Class Reference

class CMPXMetadataExtractor : public CBase

Extracts metadata from a file.

mpxfilehandler.lib

Inherits from

Public Member Functions
~CMPXMetadataExtractor ()
IMPORT_C void CancelRequest ()
IMPORT_C void CreateMediaAsyncL (const TDesC &, MMPXMetadataExtractorObserver *, TBool )
IMPORT_C void CreateMediaL (const TDesC &, CMPXMedia *&, TBool )
IMPORT_C TInt ExtractAlbumArtL ( CMPXMedia *)
IMPORT_C CMPXMetadataExtractor * NewL ( RFs &, RApaLsSession &, RPointerArray < CMPXCollectionType > &)
Private Member Functions
CMPXMetadataExtractor ( RFs &, RApaLsSession &, RPointerArray < CMPXCollectionType > &)
void AddMediaAlbumArtL ( CMPXMedia &, const TDesC &)
void AddTasksL ()
void CancelAllThumbnailRequests ()
void CancelTaskTimer ()
void CancelTimeoutTimer ()
void CheckBeforeSendRequest ()
void CleanUp ()
void ConstructL ()
void DoCreateMediaL ()
void ExecuteTaskL ()
void HandleTaskTimerExpired ()
TInt OpenFile ()
void SetDefaultL ( CMPXMedia &)
void SetDrmMediaPropertiesL (const CMetaDataFieldContainer &)
void SetExtMediaPropertiesL ()
void SetMediaPropertiesL ()
void StopWaitLoop ()
TInt SupportedContainerTypeL (const TDesC &, TInt )
TInt TaskTimerCallback ( TAny *)
void ThumbnailPreviewReady (MThumbnailData &, TThumbnailRequestId )
void ThumbnailReady ( TInt , MThumbnailData &, TThumbnailRequestId )
TInt TimeoutTimerCallback ( TAny *)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Member Enumerations
enum EMetadataExtractorTasks { ETaskCreateMedia , ETaskAddMetadata , ETaskAddExtMetadata , ETaskAddAlbumArt , ETaskCheckBeforeSend }
Private Attributes
RApaLsSession & iAppArc
RArray < TThumbnailRequestId > iArrayTNRequestId
RArray < EMetadataExtractorTasks > iArrayTasks
TBool iCancelled
CMPXDrmMediaUtility * iDrmMediaUtility
RFile iFile
CMPXFileInfoUtility * iFileInfoUtil
TFileName iFileName
TInt iFileOpenError
RFs & iFs
CMPXMedia * iMedia
TBool iMetadataOnly
CMetaDataUtility * iMetadataUtility
MMPXMetadataExtractorObserver * iObs
RPointerArray < CMPXCollectionType > & iSupportedTypes
CThumbnailManager * iTNManager
CActiveSchedulerWait * iTNSyncWait
CPeriodic * iTaskTimer
CPeriodic * iTimer

Constructor & Destructor Documentation

CMPXMetadataExtractor(RFs &, RApaLsSession &, RPointerArray< CMPXCollectionType > &)

CMPXMetadataExtractor ( RFs & aFs,
RApaLsSession & aAppArc,
RPointerArray < CMPXCollectionType > & aTypes
) [private]
Private Two-Phased constuctor.
Since
3.2.3

Parameters

RFs & aFs file path.
RApaLsSession & aAppArc address for the session application information.
RPointerArray < CMPXCollectionType > & aTypes

~CMPXMetadataExtractor()

~CMPXMetadataExtractor ( ) [virtual]

Member Functions Documentation

AddMediaAlbumArtL(CMPXMedia &, const TDesC &)

void AddMediaAlbumArtL ( CMPXMedia & aMedia,
const TDesC & aFile
) [private]
Add album art to media object.
Since
5.0

Parameters

CMPXMedia & aMedia
const TDesC & aFile

AddTasksL()

void AddTasksL ( ) [private]
Populate task array
Since
9.2

CancelAllThumbnailRequests()

void CancelAllThumbnailRequests ( ) [private]
Cancel all outstanding thumbnail requests
Since
9.2

CancelRequest()

IMPORT_C void CancelRequest ( )
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

CancelTaskTimer()

void CancelTaskTimer ( ) [private]

Cancel task timer.

CancelTimeoutTimer()

void CancelTimeoutTimer ( ) [private]

Cancel timer.

CheckBeforeSendRequest()

void CheckBeforeSendRequest ( ) [private]
Check if can send request to TNM or not.
Since
5.0

CleanUp()

void CleanUp ( ) [private]
Clean up
Since
9.2

ConstructL()

void ConstructL ( ) [private]

CreateMediaAsyncL(const TDesC &, MMPXMetadataExtractorObserver *, TBool)

IMPORT_C void CreateMediaAsyncL ( const TDesC & aFile,
MMPXMetadataExtractorObserver * aObs,
TBool aMetadataOnly = EFalse
)

Parameters

const TDesC & aFile
MMPXMetadataExtractorObserver * aObs
TBool aMetadataOnly = EFalse

CreateMediaL(const TDesC &, CMPXMedia *&, TBool)

IMPORT_C void CreateMediaL ( const TDesC & aFile,
CMPXMedia *& aNewProperty,
TBool aMetadataOnly = EFalse
)

Parameters

const TDesC & aFile
CMPXMedia *& aNewProperty
TBool aMetadataOnly = EFalse

DoCreateMediaL()

void DoCreateMediaL ( ) [private]
Create media and set default data.
Since
9.2

ExecuteTaskL()

void ExecuteTaskL ( ) [private]
Execute task at index 0.
Since
9.2

ExtractAlbumArtL(CMPXMedia *)

IMPORT_C TInt ExtractAlbumArtL ( CMPXMedia * aMedia )
Extract album art from a file and add to thumbnail manager.
Since
5.0

Parameters

CMPXMedia * aMedia MPX Media object to add album art attribute.

HandleTaskTimerExpired()

void HandleTaskTimerExpired ( ) [private]
Handle task timer expired
Since
9.2

NewL(RFs &, RApaLsSession &, RPointerArray< CMPXCollectionType > &)

IMPORT_C CMPXMetadataExtractor * NewL ( RFs & aFs,
RApaLsSession & aAppArc,
RPointerArray < CMPXCollectionType > & aTypes
) [static]

Parameters

RFs & aFs
RApaLsSession & aAppArc
RPointerArray < CMPXCollectionType > & aTypes

OpenFile()

TInt OpenFile ( ) [private]
Opens the file
Since
9.2

SetDefaultL(CMPXMedia &)

void SetDefaultL ( CMPXMedia & aMediaProp ) [private]
Set default media properties.
Since
3.2.3

Parameters

CMPXMedia & aMediaProp media properties to update

SetDrmMediaPropertiesL(const CMetaDataFieldContainer &)

void SetDrmMediaPropertiesL ( const CMetaDataFieldContainer & aMetaCont ) [private]
Sets drm media properties
Since
9.2

Parameters

const CMetaDataFieldContainer & aMetaCont

SetExtMediaPropertiesL()

void SetExtMediaPropertiesL ( ) [private]
Sets other media properties not found from metadata util.
Since
3.2.3

SetMediaPropertiesL()

void SetMediaPropertiesL ( ) [private]
Function to go through the metadata entries.
Since
3.2.3

StopWaitLoop()

void StopWaitLoop ( ) [private]

Stop the wait loop.

SupportedContainerTypeL(const TDesC &, TInt)

TInt SupportedContainerTypeL ( const TDesC & aFile,
TInt aIndex
) [private]
Checks to see if a container type is supported.
Since
3.2.3

Parameters

const TDesC & aFile file path.
TInt aIndex index to the supported types array.

TaskTimerCallback(TAny *)

TInt TaskTimerCallback ( TAny * aPtr ) [private, static]

Callback when the task timer expires.

Parameters

TAny * aPtr

ThumbnailPreviewReady(MThumbnailData &, TThumbnailRequestId)

void ThumbnailPreviewReady ( MThumbnailData & aThumbnail,
TThumbnailRequestId aId
) [private]
Preview thumbnail generation or loading is complete.
Since
S60 v5.0

Parameters

MThumbnailData & aThumbnail An object representing the resulting thumbnail.
TThumbnailRequestId aId Request ID for the operation

ThumbnailReady(TInt, MThumbnailData &, TThumbnailRequestId)

void ThumbnailReady ( TInt aError,
MThumbnailData & aThumbnail,
TThumbnailRequestId aId
) [private]
Final thumbnail bitmap generation or loading is complete.
Since
S60 v5.0

Parameters

TInt aError Error code.
MThumbnailData & aThumbnail An object representing the resulting thumbnail.
TThumbnailRequestId aId Request ID for the operation.

TimeoutTimerCallback(TAny *)

TInt TimeoutTimerCallback ( TAny * aPtr ) [private, static]

Callback when the timer times out.

Parameters

TAny * aPtr

Member Enumerations Documentation

Enum EMetadataExtractorTasks

Enumerators

ETaskCreateMedia
ETaskAddMetadata
ETaskAddExtMetadata
ETaskAddAlbumArt
ETaskCheckBeforeSend

Member Data Documentation

RApaLsSession & iAppArc

RApaLsSession & iAppArc [private]

RArray< TThumbnailRequestId > iArrayTNRequestId

RArray < TThumbnailRequestId > iArrayTNRequestId [private]

RArray< EMetadataExtractorTasks > iArrayTasks

RArray < EMetadataExtractorTasks > iArrayTasks [private]

TBool iCancelled

TBool iCancelled [private]

CMPXDrmMediaUtility * iDrmMediaUtility

CMPXDrmMediaUtility * iDrmMediaUtility [private]

RFile iFile

RFile iFile [private]

CMPXFileInfoUtility * iFileInfoUtil

CMPXFileInfoUtility * iFileInfoUtil [private]

TFileName iFileName

TFileName iFileName [private]

TInt iFileOpenError

TInt iFileOpenError [private]

RFs & iFs

RFs & iFs [private]

CMPXMedia * iMedia

CMPXMedia * iMedia [private]

TBool iMetadataOnly

TBool iMetadataOnly [private]

CMetaDataUtility * iMetadataUtility

CMetaDataUtility * iMetadataUtility [private]

MMPXMetadataExtractorObserver * iObs

MMPXMetadataExtractorObserver * iObs [private]

RPointerArray< CMPXCollectionType > & iSupportedTypes

RPointerArray < CMPXCollectionType > & iSupportedTypes [private]

CThumbnailManager * iTNManager

CThumbnailManager * iTNManager [private]

CActiveSchedulerWait * iTNSyncWait

CActiveSchedulerWait * iTNSyncWait [private]

CPeriodic * iTaskTimer

CPeriodic * iTaskTimer [private]

CPeriodic * iTimer

CPeriodic * iTimer [private]