CMPXCollectionPlaylist Class Reference

class CMPXCollectionPlaylist : public CBase

Encapsulates a playlist

mpxcollectionutility.lib

Inherits from

  • CMPXCollectionPlaylist
Public Member Functions
~CMPXCollectionPlaylist()
IMPORT_C TBoolAutoPlay()
IMPORT_C voidCancelRequest()
IMPORT_C voidCopyContentL(const CMPXCollectionPlaylist &)
IMPORT_C TIntCount()
IMPORT_C TBoolEmbeddedPlaylist()
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C TIntIndex()
IMPORT_C voidInternalizeL(RReadStream &)
IMPORT_C voidInvalidate()
IMPORT_C TBoolIsSingleItemPlaylist()
IMPORT_C TIntLevels()
IMPORT_C voidMediaL(const TArray< TMPXAttribute > &, MMPXCollectionMediaObserver &)
IMPORT_C CMPXCollectionPlaylist *NewL()
IMPORT_C CMPXCollectionPlaylist *NewL(const CMPXCollectionPlaylist &, MMPXCollectionPlaylistObserver *)
IMPORT_C CMPXCollectionPlaylist *NewL(const CMPXCollectionPath &, MMPXCollectionPlaylistObserver *)
IMPORT_C CMPXCollectionPlaylist *NewL(RReadStream &, MMPXCollectionPlaylistObserver *)
IMPORT_C TBoolNext(TBool)
IMPORT_C TBoolNextIndex(TBool, TInt &)
IMPORT_C const CMPXCollectionPath &Path()
IMPORT_C TIntPathIndex(TInt)
IMPORT_C TBoolPreInitPlugin()
IMPORT_C TBoolPrevious(TBool)
IMPORT_C TBoolRemote()
IMPORT_C TRepeatModeRepeatMode()
IMPORT_C voidSetAutoPlay(TBool)
IMPORT_C voidSetEmbeddedPlaylist(TBool)
IMPORT_C voidSetL(const CMPXMedia &)
IMPORT_C voidSetObserver(MMPXCollectionMediaObserver &, MMPXCollectionPlaylistObserver *, MMPXCollectionObserver *)
IMPORT_C voidSetPreInitPlugin(TBool)
IMPORT_C voidSetRepeatEnabled(TBool)
IMPORT_C voidSetRepeatMode(TRepeatMode)
IMPORT_C voidSetShuffleEnabledL(TBool)
IMPORT_C voidSetShuffleL(TBool, TBool)
IMPORT_C voidSetSingleItemPlaylist()
IMPORT_C voidSetToFirst()
IMPORT_C voidSetToIndex(TInt)
IMPORT_C voidSetToLast()
IMPORT_C TBoolShuffle()
Private Member Functions
CMPXCollectionPlaylist(MMPXCollectionPlaylistObserver *)
voidConstructL(const CMPXCollectionPath &)
voidConstructL(const CMPXCollectionPlaylist &)
voidConstructL(RReadStream &)
voidConstructL()
TBool DoHandleCollectionChangeMessageL(CMPXMessage &)
voidDoHandleCollectionMessageL(CMPXMessage *, TInt)
voidDoHandleIncompleteOpenL(const CMPXMedia &, TBool)
voidDoIncrementalOpenL()
voidHandleCollectionMediaL(const CMPXMedia &, TInt)
voidHandleCollectionMessage(CMPXMessage *, TInt)
voidHandleOpenL(const CMPXMedia &, TInt, TBool, TInt)
voidHandleOpenL(const CMPXCollectionPlaylist &, TInt)
voidRestoreOrdinalL(const CMPXMedia &, TInt)
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()
Public Member Enumerations
enumTRepeatMode { ERepeatOff, ERepeatOne, ERepeatAll }
Private Attributes
TBool iAutoPlay
TBool iAutoPlaylist
MMPXCollectionUtility *iColUtil
MMPXCollectionObserver *iCollectionObs
TBool iEmbedded
CMPXCollectionOpenUtility *iIncOpenUtil
TInt iItemIndex
RArray< TInt >iItemIndexes
MMPXCollectionMediaObserver *iMediaObs
CMPXCollectionPath *iPath
MMPXCollectionPlaylistObserver *iPlObs
TBool iPreInitPlugin
TBool iRemote
TBool iReopenForChange
TBool iRepeatEnabled
TRepeatMode iRepeatMode
TBool iShuffle
TBool iShuffleEnabled
TBool iSingleItemPlaylist

Constructor & Destructor Documentation

CMPXCollectionPlaylist(MMPXCollectionPlaylistObserver *)

CMPXCollectionPlaylist(MMPXCollectionPlaylistObserver *aPlObs)[private]

C++ default constructor. content not constructed yet, it may be internalized from buffer

Since
S60 3.2.3

Parameters

MMPXCollectionPlaylistObserver * aPlObsplaylist observer

~CMPXCollectionPlaylist()

IMPORT_C~CMPXCollectionPlaylist()[virtual]

Destructor.

Since
S60 3.2.3

Member Functions Documentation

AutoPlay()

IMPORT_C TBoolAutoPlay()const

AutoPlay

Since
S60 TB9.2

CancelRequest()

IMPORT_C voidCancelRequest()

Stops any async operations that are currently under way.

Since
S60 3.2.3

ConstructL(const CMPXCollectionPath &)

voidConstructL(const CMPXCollectionPath &aPath)[private]

2nd phase constructor.

Since
S60 3.2.3

Parameters

const CMPXCollectionPath & aPathcollection path

ConstructL(const CMPXCollectionPlaylist &)

voidConstructL(const CMPXCollectionPlaylist &aPlaylist)[private]

2nd phase constructor.

Since
S60 3.2.3

Parameters

const CMPXCollectionPlaylist & aPlaylistplaylist

ConstructL(RReadStream &)

voidConstructL(RReadStream &aStream)[private]

2nd phase contructor.

Since
S60 3.2.3

Parameters

RReadStream & aStreamstream

ConstructL()

voidConstructL()[private]

2nd phase contructor.

Since
S60 3.2.3

CopyContentL(const CMPXCollectionPlaylist &)

IMPORT_C voidCopyContentL(const CMPXCollectionPlaylist &aPlaylist)

Copy content from other playlist.

Since
S60 3.2.3

Parameters

const CMPXCollectionPlaylist & aPlaylistreference to an existing playlist

Count()

IMPORT_C TIntCount()const

Number of items.

Since
S60 3.2.3

DoHandleCollectionChangeMessageL(CMPXMessage &)

TBool DoHandleCollectionChangeMessageL(CMPXMessage &aMessage)[private]

Handle a CMPXCollection message with a change event.

Since
S60 3.2.3

Parameters

CMPXMessage & aMessagesingle collection message to handle

DoHandleCollectionMessageL(CMPXMessage *, TInt)

voidDoHandleCollectionMessageL(CMPXMessage *aMessage,
TIntaErr
)[private]

Handle collection message.

Since
S60 3.2.3
leave
IfNull

Parameters

CMPXMessage * aMessagecollection message
TInt aErrsystem error code.

DoHandleIncompleteOpenL(const CMPXMedia &, TBool)

voidDoHandleIncompleteOpenL(const CMPXMedia &aMedia,
TBoolaComplete
)[private]

Do Restore Ordinal for incremental opens.

Since
S60 3.2.3

Parameters

const CMPXMedia & aMediamedia returned from collection
TBool aCompleteOpenL Completed or not

DoIncrementalOpenL()

voidDoIncrementalOpenL()[private]

Handle starting of fetch for incremental algorithm.

Since
S60 3.2.3

EmbeddedPlaylist()

IMPORT_C TBoolEmbeddedPlaylist()const

Is this playlist launched from embedded mode.

Since
S60 3.2.3

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Externalize an object of this class to stream.

Since
S60 3.2.3

Parameters

RWriteStream & aStreamwrite stream

HandleCollectionMediaL(const CMPXMedia &, TInt)

voidHandleCollectionMediaL(const CMPXMedia &aMedia,
TIntaError
)[private]

Handle media. From MMPXCollectionObserver / MMPXCollectionMediaObserver.

Since
S60 3.2.3

Parameters

const CMPXMedia & aMediamedia properties
TInt aErrorerror code

HandleCollectionMessage(CMPXMessage *, TInt)

voidHandleCollectionMessage(CMPXMessage *aMessage,
TIntaErr
)[private]

Handle collection message. From MMPXCollectionObserver

Since
S60 3.2.3

Parameters

CMPXMessage * aMessagecollection message
TInt aErrsystem error code.

HandleOpenL(const CMPXMedia &, TInt, TBool, TInt)

voidHandleOpenL(const CMPXMedia &aEntries,
TIntaIndex,
TBoolaComplete,
TIntaError
)[private]

Handles the collection entries being opened. Typically called when client has Open()'d a folder. From MMPXCollectionObserver

Since
S60 3.2.3

Parameters

const CMPXMedia & aEntriescollection entries opened
TInt aIndexfocused entry
TBool aCompleteETrue no more entries. EFalse more entries expected
TInt aErrorerror code

HandleOpenL(const CMPXCollectionPlaylist &, TInt)

voidHandleOpenL(const CMPXCollectionPlaylist &aPlaylist,
TIntaError
)[private]

Handles the item being opened. Typically called when client has Open()'d an item. Client typically responds by 'playing' the item via the playlist From MMPXCollectionObserver

Since
S60 3.2.3

Parameters

const CMPXCollectionPlaylist & aPlaylistcollection playlist
TInt aErrorerror code

Index()

IMPORT_C TIntIndex()const

Index to current item in the playlist.

Since
S60 3.2.3

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)

Internalize an object of this class from stream.

Since
S60 3.2.3

Parameters

RReadStream & aStreamread stream

Invalidate()

IMPORT_C voidInvalidate()

Invalidate the playlist.

IsSingleItemPlaylist()

IMPORT_C TBoolIsSingleItemPlaylist()

Single item playlist.

Since
S60 TB9.2

Levels()

IMPORT_C TIntLevels()const

Depth of the playlist.

Since
S60 3.2.3

MediaL(const TArray< TMPXAttribute > &, MMPXCollectionMediaObserver &)

IMPORT_C voidMediaL(const TArray< TMPXAttribute > &aAttrs,
MMPXCollectionMediaObserver &aMediaObs
)

Get extended media of current item.

Since
S60 3.2.3

Parameters

const TArray< TMPXAttribute > & aAttrsattributes requested
MMPXCollectionMediaObserver & aMediaObsproperties observer

NewL()

IMPORT_C CMPXCollectionPlaylist *NewL()[static]

Two-phase constructor.

Since
S60 3.2.3

NewL(const CMPXCollectionPlaylist &, MMPXCollectionPlaylistObserver *)

IMPORT_C CMPXCollectionPlaylist *NewL(const CMPXCollectionPlaylist &aPlaylist,
MMPXCollectionPlaylistObserver *aPlObs = NULL
)[static]

Two-phase constructor.

Since
S60 3.2.3

Parameters

const CMPXCollectionPlaylist & aPlaylistreference to an existing playlist
MMPXCollectionPlaylistObserver * aPlObs = NULLplaylist observer

NewL(const CMPXCollectionPath &, MMPXCollectionPlaylistObserver *)

IMPORT_C CMPXCollectionPlaylist *NewL(const CMPXCollectionPath &aPath,
MMPXCollectionPlaylistObserver *aPlObs = NULL
)[static]

Two-phase constructor.

Since
S60 3.2.3

Parameters

const CMPXCollectionPath & aPathreference to a collection path
MMPXCollectionPlaylistObserver * aPlObs = NULLplaylist observer

NewL(RReadStream &, MMPXCollectionPlaylistObserver *)

IMPORT_C CMPXCollectionPlaylist *NewL(RReadStream &aStream,
MMPXCollectionPlaylistObserver *aPlObs = NULL
)[static]

Two-phase constructor.

Since
S60 3.2.3

Parameters

RReadStream & aStreamreference to a collection path
MMPXCollectionPlaylistObserver * aPlObs = NULLplaylist observer

Next(TBool)

IMPORT_C TBoolNext(TBoolaIgnoreRepeat = EFalse)

Next item.

Since
S60 3.2.3

Parameters

TBool aIgnoreRepeat = EFalseETrue to ignore repeat setting

NextIndex(TBool, TInt &)

IMPORT_C TBoolNextIndex(TBoolaIgnoreRepeat,
TInt &aPlaylistIndex
)const

Gets the next index to play. This method should not change any of the internal index values (const method).

Since
S60 3.2.3

Parameters

TBool aIgnoreRepeatETrue to ignore repeat setting
TInt & aPlaylistIndexOut Parameter - The next index. KErrNotFound if no valid index.This is the index in the playlist order.

Path()

IMPORT_C const CMPXCollectionPath &Path()const

Get collection path.

Since
S60 3.2.3

PathIndex(TInt)

IMPORT_C TIntPathIndex(TIntaPlaylistIndex)const

Gets the path index of the item given it's position in the playlist.

Since
S60 3.2.3

Parameters

TInt aPlaylistIndexIndex of item in the playlist

PreInitPlugin()

IMPORT_C TBoolPreInitPlugin()const

Pre-initialize next plugin.

Since
S60 TB9.2

Previous(TBool)

IMPORT_C TBoolPrevious(TBoolaIgnoreRepeat = EFalse)

Previous item.

Since
S60 3.2.3

Parameters

TBool aIgnoreRepeat = EFalseETrue to ignore repeat setting

Remote()

IMPORT_C TBoolRemote()const

Remote playlist.

Since
S60 3.2.3

RepeatMode()

IMPORT_C TRepeatModeRepeatMode()const

Repeat mode.

Since
S60 3.2.3

RestoreOrdinalL(const CMPXMedia &, TInt)

voidRestoreOrdinalL(const CMPXMedia &aEntries,
TIntaIndex
)[private]

Restore ordinal after changes.

Since
S60 3.2.3
leave
IfNull

Parameters

const CMPXMedia & aEntriescollection entries opened
TInt aIndexindex of current item

SetAutoPlay(TBool)

IMPORT_C voidSetAutoPlay(TBoolaAutoPlay)

Set auto play.

Since
S60 TB9.2

Parameters

TBool aAutoPlaynew value

SetEmbeddedPlaylist(TBool)

IMPORT_C voidSetEmbeddedPlaylist(TBoolaEmbedded)

Set or clear the embedded playlist flag.

Since
S60 3.2.3

Parameters

TBool aEmbeddedis this playlist embedded?

SetL(const CMPXMedia &)

IMPORT_C voidSetL(const CMPXMedia &aMedia)

Sets/updates the media for the item provided.

Since
S60 3.2.3

Parameters

const CMPXMedia & aMedianew value Callback via EMediaChanged message if currently opened

SetObserver(MMPXCollectionMediaObserver &, MMPXCollectionPlaylistObserver *, MMPXCollectionObserver *)

IMPORT_C voidSetObserver(MMPXCollectionMediaObserver &aMediaObs,
MMPXCollectionPlaylistObserver *aPlObs = NULL,
MMPXCollectionObserver *aCollectionObs = NULL
)

Set a new observer for current request. Used when handling pre-initializing.

Since
S60 3.2.3

Parameters

MMPXCollectionMediaObserver & aMediaObsproperties observer
MMPXCollectionPlaylistObserver * aPlObs = NULLplaylist observer
MMPXCollectionObserver * aCollectionObs = NULLcollection observer

SetPreInitPlugin(TBool)

IMPORT_C voidSetPreInitPlugin(TBoolaPreInitPlugin)

Set pre-initialize next plugin.

Since
S60 TB9.2

Parameters

TBool aPreInitPlugin

SetRepeatEnabled(TBool)

IMPORT_C voidSetRepeatEnabled(TBoolaEnable)

Set repeat enabled.

Since
S60 3.2.3

Parameters

TBool aEnableTo enable repeat mode or not

SetRepeatMode(TRepeatMode)

IMPORT_C voidSetRepeatMode(TRepeatModeaMode)

Set repeat mode.

Since
S60 3.2.3

Parameters

TRepeatMode aModethe repeat mode

SetShuffleEnabledL(TBool)

IMPORT_C voidSetShuffleEnabledL(TBoolaEnable)

Set shuffle enabled.

Since
S60 3.2.3

Parameters

TBool aEnableTo enable shuffle mode or not

SetShuffleL(TBool, TBool)

IMPORT_C voidSetShuffleL(TBoolaShuffle,
TBoolaCurrentToTop
)

Turn shuffle mode on/off.

Since
S60 3.2.3

Parameters

TBool aShufflenew shuffle mode
TBool aCurrentToTopmove current item to the top

SetSingleItemPlaylist()

IMPORT_C voidSetSingleItemPlaylist()

Set single item playlist.

Since
S60 TB9.2

SetToFirst()

IMPORT_C voidSetToFirst()

Go to the first item.

Since
S60 3.2.3

SetToIndex(TInt)

IMPORT_C voidSetToIndex(TIntaIndex)

Go to a particular item.

Since
S60 3.2.3

Parameters

TInt aIndexindex to goto The index can be -1 for no selection and must be Smaller than the number of items in the playlist

SetToLast()

IMPORT_C voidSetToLast()

Go to the last item.

Since
S60 3.2.3

Shuffle()

IMPORT_C TBoolShuffle()const

Shuffle mode.

Since
S60 3.2.3

Member Enumerations Documentation

Enum TRepeatMode

Enumerators

ERepeatOff
ERepeatOne
ERepeatAll

Member Data Documentation

TBool iAutoPlay

TBool iAutoPlay[private]

TBool iAutoPlaylist

TBool iAutoPlaylist[private]

MMPXCollectionUtility * iColUtil

MMPXCollectionUtility *iColUtil[private]

MMPXCollectionObserver * iCollectionObs

MMPXCollectionObserver *iCollectionObs[private]

TBool iEmbedded

TBool iEmbedded[private]

CMPXCollectionOpenUtility * iIncOpenUtil

CMPXCollectionOpenUtility *iIncOpenUtil[private]

TInt iItemIndex

TInt iItemIndex[private]

RArray< TInt > iItemIndexes

RArray< TInt >iItemIndexes[private]

MMPXCollectionMediaObserver * iMediaObs

MMPXCollectionMediaObserver *iMediaObs[private]

CMPXCollectionPath * iPath

CMPXCollectionPath *iPath[private]

MMPXCollectionPlaylistObserver * iPlObs

MMPXCollectionPlaylistObserver *iPlObs[private]

TBool iPreInitPlugin

TBool iPreInitPlugin[private]

TBool iRemote

TBool iRemote[private]

TBool iReopenForChange

TBool iReopenForChange[private]

TBool iRepeatEnabled

TBool iRepeatEnabled[private]

TRepeatMode iRepeatMode

TRepeatMode iRepeatMode[private]

TBool iShuffle

TBool iShuffle[private]

TBool iShuffleEnabled

TBool iShuffleEnabled[private]

TBool iSingleItemPlaylist

TBool iSingleItemPlaylist[private]