CMPXCollectionPlaylist Class Reference

class CMPXCollectionPlaylist : public CBase

Encapsulates a playlist

mpxcollectionutility.lib

Inherits from

Public Member Functions
~CMPXCollectionPlaylist ()
IMPORT_C TBool AutoPlay ()
IMPORT_C void CancelRequest ()
IMPORT_C void CopyContentL (const CMPXCollectionPlaylist &)
IMPORT_C TInt Count ()
IMPORT_C TBool EmbeddedPlaylist ()
IMPORT_C void ExternalizeL ( RWriteStream &)
IMPORT_C TInt Index ()
IMPORT_C void InternalizeL ( RReadStream &)
IMPORT_C void Invalidate ()
IMPORT_C TBool IsSingleItemPlaylist ()
IMPORT_C TInt Levels ()
IMPORT_C void MediaL (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 TBool Next ( TBool )
IMPORT_C TBool NextIndex ( TBool , TInt &)
IMPORT_C const CMPXCollectionPath & Path ()
IMPORT_C TInt PathIndex ( TInt )
IMPORT_C TBool PreInitPlugin ()
IMPORT_C TBool Previous ( TBool )
IMPORT_C TBool Remote ()
IMPORT_C TRepeatMode RepeatMode ()
IMPORT_C void SetAutoPlay ( TBool )
IMPORT_C void SetEmbeddedPlaylist ( TBool )
IMPORT_C void SetL (const CMPXMedia &)
IMPORT_C void SetObserver (MMPXCollectionMediaObserver &, MMPXCollectionPlaylistObserver *, MMPXCollectionObserver *)
IMPORT_C void SetPreInitPlugin ( TBool )
IMPORT_C void SetRepeatEnabled ( TBool )
IMPORT_C void SetRepeatMode ( TRepeatMode )
IMPORT_C void SetShuffleEnabledL ( TBool )
IMPORT_C void SetShuffleL ( TBool , TBool )
IMPORT_C void SetSingleItemPlaylist ()
IMPORT_C void SetToFirst ()
IMPORT_C void SetToIndex ( TInt )
IMPORT_C void SetToLast ()
IMPORT_C TBool Shuffle ()
Private Member Functions
CMPXCollectionPlaylist (MMPXCollectionPlaylistObserver *)
void ConstructL (const CMPXCollectionPath &)
void ConstructL (const CMPXCollectionPlaylist &)
void ConstructL ( RReadStream &)
void ConstructL ()
TBool DoHandleCollectionChangeMessageL ( CMPXMessage &)
void DoHandleCollectionMessageL ( CMPXMessage *, TInt )
void DoHandleIncompleteOpenL (const CMPXMedia &, TBool )
void DoIncrementalOpenL ()
void HandleCollectionMediaL (const CMPXMedia &, TInt )
void HandleCollectionMessage ( CMPXMessage *, TInt )
void HandleOpenL (const CMPXMedia &, TInt , TBool , TInt )
void HandleOpenL (const CMPXCollectionPlaylist &, TInt )
void RestoreOrdinalL (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
enum TRepeatMode { 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 * aPlObs playlist observer

~CMPXCollectionPlaylist()

IMPORT_C ~CMPXCollectionPlaylist ( ) [virtual]

Destructor.

Since
S60 3.2.3

Member Functions Documentation

AutoPlay()

IMPORT_C TBool AutoPlay ( ) const

AutoPlay

Since
S60 TB9.2

CancelRequest()

IMPORT_C void CancelRequest ( )

Stops any async operations that are currently under way.

Since
S60 3.2.3

ConstructL(const CMPXCollectionPath &)

void ConstructL ( const CMPXCollectionPath & aPath ) [private]

2nd phase constructor.

Since
S60 3.2.3

Parameters

const CMPXCollectionPath & aPath collection path

ConstructL(const CMPXCollectionPlaylist &)

void ConstructL ( const CMPXCollectionPlaylist & aPlaylist ) [private]

2nd phase constructor.

Since
S60 3.2.3

Parameters

const CMPXCollectionPlaylist & aPlaylist playlist

ConstructL(RReadStream &)

void ConstructL ( RReadStream & aStream ) [private]

2nd phase contructor.

Since
S60 3.2.3

Parameters

RReadStream & aStream stream

ConstructL()

void ConstructL ( ) [private]

2nd phase contructor.

Since
S60 3.2.3

CopyContentL(const CMPXCollectionPlaylist &)

IMPORT_C void CopyContentL ( const CMPXCollectionPlaylist & aPlaylist )

Copy content from other playlist.

Since
S60 3.2.3

Parameters

const CMPXCollectionPlaylist & aPlaylist reference to an existing playlist

Count()

IMPORT_C TInt Count ( ) 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 & aMessage single collection message to handle

DoHandleCollectionMessageL(CMPXMessage *, TInt)

void DoHandleCollectionMessageL ( CMPXMessage * aMessage,
TInt aErr
) [private]

Handle collection message.

Since
S60 3.2.3
leave
IfNull

Parameters

CMPXMessage * aMessage collection message
TInt aErr system error code.

DoHandleIncompleteOpenL(const CMPXMedia &, TBool)

void DoHandleIncompleteOpenL ( const CMPXMedia & aMedia,
TBool aComplete
) [private]

Do Restore Ordinal for incremental opens.

Since
S60 3.2.3

Parameters

const CMPXMedia & aMedia media returned from collection
TBool aComplete OpenL Completed or not

DoIncrementalOpenL()

void DoIncrementalOpenL ( ) [private]

Handle starting of fetch for incremental algorithm.

Since
S60 3.2.3

EmbeddedPlaylist()

IMPORT_C TBool EmbeddedPlaylist ( ) const

Is this playlist launched from embedded mode.

Since
S60 3.2.3

ExternalizeL(RWriteStream &)

IMPORT_C void ExternalizeL ( RWriteStream & aStream ) const

Externalize an object of this class to stream.

Since
S60 3.2.3

Parameters

RWriteStream & aStream write stream

HandleCollectionMediaL(const CMPXMedia &, TInt)

void HandleCollectionMediaL ( const CMPXMedia & aMedia,
TInt aError
) [private]

Handle media. From MMPXCollectionObserver / MMPXCollectionMediaObserver.

Since
S60 3.2.3

Parameters

const CMPXMedia & aMedia media properties
TInt aError error code

HandleCollectionMessage(CMPXMessage *, TInt)

void HandleCollectionMessage ( CMPXMessage * aMessage,
TInt aErr
) [private]

Handle collection message. From MMPXCollectionObserver

Since
S60 3.2.3

Parameters

CMPXMessage * aMessage collection message
TInt aErr system error code.

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

void HandleOpenL ( const CMPXMedia & aEntries,
TInt aIndex,
TBool aComplete,
TInt aError
) [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 & aEntries collection entries opened
TInt aIndex focused entry
TBool aComplete ETrue no more entries. EFalse more entries expected
TInt aError error code

HandleOpenL(const CMPXCollectionPlaylist &, TInt)

void HandleOpenL ( const CMPXCollectionPlaylist & aPlaylist,
TInt aError
) [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 & aPlaylist collection playlist
TInt aError error code

Index()

IMPORT_C TInt Index ( ) const

Index to current item in the playlist.

Since
S60 3.2.3

InternalizeL(RReadStream &)

IMPORT_C void InternalizeL ( RReadStream & aStream )

Internalize an object of this class from stream.

Since
S60 3.2.3

Parameters

RReadStream & aStream read stream

Invalidate()

IMPORT_C void Invalidate ( )

Invalidate the playlist.

IsSingleItemPlaylist()

IMPORT_C TBool IsSingleItemPlaylist ( )

Single item playlist.

Since
S60 TB9.2

Levels()

IMPORT_C TInt Levels ( ) const

Depth of the playlist.

Since
S60 3.2.3

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

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

Get extended media of current item.

Since
S60 3.2.3

Parameters

const TArray < TMPXAttribute > & aAttrs attributes requested
MMPXCollectionMediaObserver & aMediaObs properties 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 & aPlaylist reference to an existing playlist
MMPXCollectionPlaylistObserver * aPlObs = NULL playlist 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 & aPath reference to a collection path
MMPXCollectionPlaylistObserver * aPlObs = NULL playlist observer

NewL(RReadStream &, MMPXCollectionPlaylistObserver *)

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

Two-phase constructor.

Since
S60 3.2.3

Parameters

RReadStream & aStream reference to a collection path
MMPXCollectionPlaylistObserver * aPlObs = NULL playlist observer

Next(TBool)

IMPORT_C TBool Next ( TBool aIgnoreRepeat = EFalse )

Next item.

Since
S60 3.2.3

Parameters

TBool aIgnoreRepeat = EFalse ETrue to ignore repeat setting

NextIndex(TBool, TInt &)

IMPORT_C TBool NextIndex ( TBool aIgnoreRepeat,
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 aIgnoreRepeat ETrue to ignore repeat setting
TInt & aPlaylistIndex Out 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 TInt PathIndex ( TInt aPlaylistIndex ) const

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

Since
S60 3.2.3

Parameters

TInt aPlaylistIndex Index of item in the playlist

PreInitPlugin()

IMPORT_C TBool PreInitPlugin ( ) const

Pre-initialize next plugin.

Since
S60 TB9.2

Previous(TBool)

IMPORT_C TBool Previous ( TBool aIgnoreRepeat = EFalse )

Previous item.

Since
S60 3.2.3

Parameters

TBool aIgnoreRepeat = EFalse ETrue to ignore repeat setting

Remote()

IMPORT_C TBool Remote ( ) const

Remote playlist.

Since
S60 3.2.3

RepeatMode()

IMPORT_C TRepeatMode RepeatMode ( ) const

Repeat mode.

Since
S60 3.2.3

RestoreOrdinalL(const CMPXMedia &, TInt)

void RestoreOrdinalL ( const CMPXMedia & aEntries,
TInt aIndex
) [private]

Restore ordinal after changes.

Since
S60 3.2.3
leave
IfNull

Parameters

const CMPXMedia & aEntries collection entries opened
TInt aIndex index of current item

SetAutoPlay(TBool)

IMPORT_C void SetAutoPlay ( TBool aAutoPlay )

Set auto play.

Since
S60 TB9.2

Parameters

TBool aAutoPlay new value

SetEmbeddedPlaylist(TBool)

IMPORT_C void SetEmbeddedPlaylist ( TBool aEmbedded )

Set or clear the embedded playlist flag.

Since
S60 3.2.3

Parameters

TBool aEmbedded is this playlist embedded?

SetL(const CMPXMedia &)

IMPORT_C void SetL ( const CMPXMedia & aMedia )

Sets/updates the media for the item provided.

Since
S60 3.2.3

Parameters

const CMPXMedia & aMedia new value Callback via EMediaChanged message if currently opened

SetObserver(MMPXCollectionMediaObserver &, MMPXCollectionPlaylistObserver *, MMPXCollectionObserver *)

IMPORT_C void SetObserver ( 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 & aMediaObs properties observer
MMPXCollectionPlaylistObserver * aPlObs = NULL playlist observer
MMPXCollectionObserver * aCollectionObs = NULL collection observer

SetPreInitPlugin(TBool)

IMPORT_C void SetPreInitPlugin ( TBool aPreInitPlugin )

Set pre-initialize next plugin.

Since
S60 TB9.2

Parameters

TBool aPreInitPlugin

SetRepeatEnabled(TBool)

IMPORT_C void SetRepeatEnabled ( TBool aEnable )

Set repeat enabled.

Since
S60 3.2.3

Parameters

TBool aEnable To enable repeat mode or not

SetRepeatMode(TRepeatMode)

IMPORT_C void SetRepeatMode ( TRepeatMode aMode )

Set repeat mode.

Since
S60 3.2.3

Parameters

TRepeatMode aMode the repeat mode

SetShuffleEnabledL(TBool)

IMPORT_C void SetShuffleEnabledL ( TBool aEnable )

Set shuffle enabled.

Since
S60 3.2.3

Parameters

TBool aEnable To enable shuffle mode or not

SetShuffleL(TBool, TBool)

IMPORT_C void SetShuffleL ( TBool aShuffle,
TBool aCurrentToTop
)

Turn shuffle mode on/off.

Since
S60 3.2.3

Parameters

TBool aShuffle new shuffle mode
TBool aCurrentToTop move current item to the top

SetSingleItemPlaylist()

IMPORT_C void SetSingleItemPlaylist ( )

Set single item playlist.

Since
S60 TB9.2

SetToFirst()

IMPORT_C void SetToFirst ( )

Go to the first item.

Since
S60 3.2.3

SetToIndex(TInt)

IMPORT_C void SetToIndex ( TInt aIndex )

Go to a particular item.

Since
S60 3.2.3

Parameters

TInt aIndex index 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 void SetToLast ( )

Go to the last item.

Since
S60 3.2.3

Shuffle()

IMPORT_C TBool Shuffle ( ) 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]