CMPXCollectionMediator Class Reference

class CMPXCollectionMediator : public CBase

Mediator class to handle Music Player specific requirements ie: files with genre podcast must be stored in podcast db.

mpxcollectionmediator.lib

Inherits from

  • CMPXCollectionMediator

Constructor & Destructor Documentation

CMPXCollectionMediator(MMPXCollection &, MMPXMediatorObserver *)

CMPXCollectionMediator(MMPXCollection &aColUtil,
MMPXMediatorObserver *aObs
)[private]
Private constructor.
Since
S60 v3.2.3

Parameters

MMPXCollection & aColUtilcollection utility to share with the owner.
MMPXMediatorObserver * aObsobserver to mediator operations

CMPXCollectionMediator()

CMPXCollectionMediator()[private]
Private constructor.
Since
S60 v3.2.3

~CMPXCollectionMediator()

~CMPXCollectionMediator()[virtual]
Virtual destructor.
Since
S60 v3.2.3

Member Functions Documentation

AddItemAsyncL(CMPXMedia *&)

IMPORT_C voidAddItemAsyncL(CMPXMedia *&aMediaProp)

Add a media to the collection asynchronously.

leave
KErrArgument leave if not a supported media type

Parameters

CMPXMedia *& aMediaPropmedia item.

AddItemL(CMPXMedia *&)

IMPORT_C voidAddItemL(CMPXMedia *&aMediaProp)
Add a media to the collection. Upon successfull addition, its KMPXMediaGeneralId will be updated.
Since
S60 v3.2.3
leave
KErrArgument leave if not a supported media type

Parameters

CMPXMedia *& aMediaPropmedia item.

AddItemL(CMPXMediaArray &)

IMPORT_C voidAddItemL(CMPXMediaArray &aMPArray)
Add a list of files to the collection db.
Since
S60 v3.2.3
leave
KErrArgument leave if not a supported media type

Parameters

CMPXMediaArray & aMPArray

CheckItemL(CMPXMedia &)

IMPORT_C voidCheckItemL(CMPXMedia &aMedia)
Static item to check if the collection id is correct. Updates the collection path object to podcast if it is podcast.
Since
S60 v3.2.3

Parameters

CMPXMedia & aMediamedia object

ConstructL()

voidConstructL()[private]
2nd phase constructor.
Since
S60 v3.2.3

DoAddToCollectionL(CMPXMedia *, TUid)

voidDoAddToCollectionL(CMPXMedia *aMedia,
TUidaCollectionId
)[private]
Add a file to the collection.
Since
S60 v3.2.3

Parameters

CMPXMedia * aMediamedia to add.
TUid aCollectionId

DoMoveItemL(CMPXMedia *&, TUid)

voidDoMoveItemL(CMPXMedia *&aMedia,
TUidaNewCollection
)[private]
Move a file from one db to another.
Since
S60 v3.2.3

Parameters

CMPXMedia *& aMediamedia object.
TUid aNewCollectionnew colection

DoSetToCollectionL(CMPXMedia *, TUid)

voidDoSetToCollectionL(CMPXMedia *aMedia,
TUidaCollectionId
)[private]
Set a file to the collection.
Since
S60 v3.2.3

Parameters

CMPXMedia * aMediamedia to set.
TUid aCollectionId

IsPodcastL(CMPXMedia &)

TBool IsPodcastL(CMPXMedia &aMedia)[private]
Is this item recognizable as podcast.
Since
S60 v3.2.3

Parameters

CMPXMedia & aMediamedia object.

MoveItemL(CMPXMedia *&, TUid, TUid)

IMPORT_C voidMoveItemL(CMPXMedia *&aMedia,
TUidaOldCollectionId,
TUidaNewCollectionId
)
Moves an item from one collection to another. Updates the media properties "genre" to Unknown if moving from podcast -> local audio.
Since
S60 v3.2.3

Parameters

CMPXMedia *& aMedia
TUid aOldCollectionIdold collection id.
TUid aNewCollectionIdnew collection id

MoveItemL(CMPXMedia *&, TUid, TUid, MMPXMoveItemObserver *)

IMPORT_C voidMoveItemL(CMPXMedia *&aMedia,
TUidaOldCollectionId,
TUidaNewCollectionId,
MMPXMoveItemObserver *aObs
)
Moves an item from one collection to another. Updates the media properties "genre" to Unknown if moving from podcast -> local audio.
Since
S60 v3.2.3

Parameters

CMPXMedia *& aMediaproperties of the object.
TUid aOldCollectionIdold collection id.
TUid aNewCollectionIdnew collection id.
MMPXMoveItemObserver * aObsobserver for event

NewL(MMPXCollection &, MMPXMediatorObserver *)

IMPORT_C CMPXCollectionMediator *NewL(MMPXCollection &aColUtil,
MMPXMediatorObserver *aObs = NULL
)[static]
Two-phased constructor.
Since
S60 v3.2.3

Parameters

MMPXCollection & aColUtilcollection utility.
MMPXMediatorObserver * aObs = NULLobserver.

NewL()

IMPORT_C CMPXCollectionMediator *NewL()[static]
Two-phased constructor. Only use to execute "CheckItemL" not for adding/moving in collection.
Since
S60 v3.2.3

NewLC(MMPXCollection &, MMPXMediatorObserver *)

IMPORT_C CMPXCollectionMediator *NewLC(MMPXCollection &aColUtil,
MMPXMediatorObserver *aObs = NULL
)[static]
Two-phased constructor.
Since
S60 v3.2.3

Parameters

MMPXCollection & aColUtil
MMPXMediatorObserver * aObs = NULL

SetItemL(CMPXMedia *&)

IMPORT_C voidSetItemL(CMPXMedia *&aMediaProp)
Updates the media properties of a file. Used for media objects where the caller does not know the collection for which the item should belong to.
Since
S60 v3.2.3

Parameters

CMPXMedia *& aMediaPropmedia to update

SetItemL(CMPXMediaArray &)

IMPORT_C voidSetItemL(CMPXMediaArray &aMPArray)
Updates media for a list of items. Used for media objects where the caller does not know the collection for which the item should belong to.
Since
S60 v3.2.3

Parameters

CMPXMediaArray & aMPArraylist of media item

SetItemL(TArray< CMPXMedia * > &, CMPXCollectionPath &, RArray< TInt > &)

IMPORT_C voidSetItemL(TArray< CMPXMedia * > &aArray,
CMPXCollectionPath &aPath,
RArray< TInt > &aIndices
)
Update media for items in the same collection depth. Not implemented.
Since
S60 v3.2.3

Parameters

TArray< CMPXMedia * > & aArraylist of items.
CMPXCollectionPath & aPathcollection path of the item.
RArray< TInt > & aIndiceslist of indices

UpdatePathToPodcastL(CMPXMedia &)

voidUpdatePathToPodcastL(CMPXMedia &aMedia)[private]
Change a collection id to the podcast db.
Since
S60 v3.2.3

Parameters

CMPXMedia & aMediamedia to update the collection id to podcast

Member Data Documentation

MMPXCollection * iColUtil

MMPXCollection *iColUtil[private]

RFs iFs

RFs iFs[private]

CMPXMoveItemHelper * iMoveHelper

CMPXMoveItemHelper *iMoveHelper[private]

TUid iMusicCollectionID

TUid iMusicCollectionID[private]

MMPXMediatorObserver * iObserver

MMPXMediatorObserver *iObserver[private]

HBufC * iPodCastBuf

HBufC *iPodCastBuf[private]

TUid iPodCastCollectionID

TUid iPodCastCollectionID[private]

HBufC * iPodCastEngBuf

HBufC *iPodCastEngBuf[private]

HBufC * iUnknownBuf

HBufC *iUnknownBuf[private]