CMPXMetadataExtractor Class Reference

class CMPXMetadataExtractor : public CBase

Extracts metadata from a file.

mpxfilehandler.lib

Inherits from

  • CMPXMetadataExtractor
Public Member Functions
~CMPXMetadataExtractor()
IMPORT_C voidCancelRequest()
IMPORT_C voidCreateMediaAsyncL(const TDesC &, MMPXMetadataExtractorObserver *, TBool)
IMPORT_C voidCreateMediaL(const TDesC &, CMPXMedia *&, TBool)
IMPORT_C TIntExtractAlbumArtL(CMPXMedia *)
IMPORT_C CMPXMetadataExtractor *NewL(RFs &, RApaLsSession &, RPointerArray< CMPXCollectionType > &)
Private Member Functions
CMPXMetadataExtractor(RFs &, RApaLsSession &, RPointerArray< CMPXCollectionType > &)
voidAddMediaAlbumArtL(CMPXMedia &, const TDesC &)
voidAddTasksL()
voidCancelAllThumbnailRequests()
voidCancelTaskTimer()
voidCancelTimeoutTimer()
voidCheckBeforeSendRequest()
voidCleanUp()
voidConstructL()
voidDoCreateMediaL()
voidExecuteTaskL()
voidHandleTaskTimerExpired()
TInt OpenFile()
voidSetDefaultL(CMPXMedia &)
voidSetDrmMediaPropertiesL(const CMetaDataFieldContainer &)
voidSetExtMediaPropertiesL()
voidSetMediaPropertiesL()
voidStopWaitLoop()
TInt SupportedContainerTypeL(const TDesC &, TInt)
TInt TaskTimerCallback(TAny *)
voidThumbnailPreviewReady(MThumbnailData &, TThumbnailRequestId)
voidThumbnailReady(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
enumEMetadataExtractorTasks { 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 & aFsfile path.
RApaLsSession & aAppArcaddress for the session application information.
RPointerArray< CMPXCollectionType > & aTypes

~CMPXMetadataExtractor()

~CMPXMetadataExtractor()[virtual]

Member Functions Documentation

AddMediaAlbumArtL(CMPXMedia &, const TDesC &)

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

Parameters

CMPXMedia & aMedia
const TDesC & aFile

AddTasksL()

voidAddTasksL()[private]
Populate task array
Since
9.2

CancelAllThumbnailRequests()

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

CancelRequest()

IMPORT_C voidCancelRequest()
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()

voidCancelTaskTimer()[private]

Cancel task timer.

CancelTimeoutTimer()

voidCancelTimeoutTimer()[private]

Cancel timer.

CheckBeforeSendRequest()

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

CleanUp()

voidCleanUp()[private]
Clean up
Since
9.2

ConstructL()

voidConstructL()[private]

CreateMediaAsyncL(const TDesC &, MMPXMetadataExtractorObserver *, TBool)

IMPORT_C voidCreateMediaAsyncL(const TDesC &aFile,
MMPXMetadataExtractorObserver *aObs,
TBoolaMetadataOnly = EFalse
)

Parameters

const TDesC & aFile
MMPXMetadataExtractorObserver * aObs
TBool aMetadataOnly = EFalse

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

IMPORT_C voidCreateMediaL(const TDesC &aFile,
CMPXMedia *&aNewProperty,
TBoolaMetadataOnly = EFalse
)

Parameters

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

DoCreateMediaL()

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

ExecuteTaskL()

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

ExtractAlbumArtL(CMPXMedia *)

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

Parameters

CMPXMedia * aMediaMPX Media object to add album art attribute.

HandleTaskTimerExpired()

voidHandleTaskTimerExpired()[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 &)

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

Parameters

CMPXMedia & aMediaPropmedia properties to update

SetDrmMediaPropertiesL(const CMetaDataFieldContainer &)

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

Parameters

const CMetaDataFieldContainer & aMetaCont

SetExtMediaPropertiesL()

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

SetMediaPropertiesL()

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

StopWaitLoop()

voidStopWaitLoop()[private]

Stop the wait loop.

SupportedContainerTypeL(const TDesC &, TInt)

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

Parameters

const TDesC & aFilefile path.
TInt aIndexindex 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)

voidThumbnailPreviewReady(MThumbnailData &aThumbnail,
TThumbnailRequestIdaId
)[private]
Preview thumbnail generation or loading is complete.
Since
S60 v5.0

Parameters

MThumbnailData & aThumbnailAn object representing the resulting thumbnail.
TThumbnailRequestId aIdRequest ID for the operation

ThumbnailReady(TInt, MThumbnailData &, TThumbnailRequestId)

voidThumbnailReady(TIntaError,
MThumbnailData &aThumbnail,
TThumbnailRequestIdaId
)[private]
Final thumbnail bitmap generation or loading is complete.
Since
S60 v5.0

Parameters

TInt aErrorError code.
MThumbnailData & aThumbnailAn object representing the resulting thumbnail.
TThumbnailRequestId aIdRequest 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]