CUPnPPlayListFiller Class Reference

class CUPnPPlayListFiller : public CBase

A base class providing services for filling MPX playlist

upnpmusicadapter.lib
Since
S60 v3.1

Inherits from

Constructor & Destructor Documentation

CUPnPPlayListFiller()

CUPnPPlayListFiller()[protected]

default constructor

~CUPnPPlayListFiller()

IMPORT_C~CUPnPPlayListFiller()[virtual]

Destructor

Since
Series 60 3.1

Member Functions Documentation

CancelFill()

voidCancelFill()

Cancels an ongoing Fill operation.

ConvertToURI(const TDesC &, const CUpnpObject &, TDes &)

voidConvertToURI(const TDesC &aDeviceUid,
const CUpnpObject &aItem,
TDes &aBuffer
)[protected]

Convert UPnP item to playlist item URI string URI string format is upnp:<device_id>*<object_id>

Parameters

const TDesC & aDeviceUidthe UID of the device, in string form
const CUpnpObject & aItembrowsed UPnP item to be converted
TDes & aBufferthe buffer for result URI

DoComplete()

voidDoComplete()[protected]

Completes the filler, resulting it to be deleted

DoFillL(CMPXMediaArray &, const RPointerArray< CUpnpObject > &, TInt)

TInt DoFillL(CMPXMediaArray &aPlaylist,
const RPointerArray< CUpnpObject > &aSource,
TIntaStartIndex = 0
)[protected]

Fills the initial items into the playlist

Parameters

CMPXMediaArray & aPlaylistthe MPX playlist
const RPointerArray< CUpnpObject > & aSourcethe source list of objects
TInt aStartIndex = 0playlist index of items being added

DoFillObjectL(CMPXMediaArray &, const CUpnpObject &, TInt)

voidDoFillObjectL(CMPXMediaArray &aPlaylist,
const CUpnpObject &aObject,
TIntaIndex
)[protected]

Fills a single object with given index into a playlist. if item is not an audio item, does not fill. Checks current selected index and adjusts it if necessary.

Parameters

CMPXMediaArray & aPlaylistthe MPX playlist
const CUpnpObject & aObjectthe object to fill
TInt aIndexplaylist index of the item being added

FillL(CUPnPMusicAdapter &, CMPXMediaArray &)

voidFillL(CUPnPMusicAdapter &aHost,
CMPXMediaArray &aPlaylist
)

Fill track data into the playlist. Calling method will fulfill the purpose of this object, and therefore this object will be deleted.

Since
Series 60 3.1

Parameters

CUPnPMusicAdapter & aHostthe host adapter in which context the filler operates
CMPXMediaArray & aPlaylistplaylist to be filled

Host()

CUPnPMusicAdapter &Host()const [protected]

The music adapter that hosts this filler

InsertObjectL(const CUpnpAVDevice &, const CUpnpObject &)

IMPORT_C voidInsertObjectL(const CUpnpAVDevice &aMediaServer,
const CUpnpObject &aObject
)

Inserts an initial object to be filled in the playlist should be called after construction, but before use. Note that the class refers to the object, so it should be persistent in memory when Fill() is called.

Since
Series 60 3.1

Parameters

const CUpnpAVDevice & aMediaServerExternal Media Server device
const CUpnpObject & aObjectreference to the object.

NewL()

IMPORT_C CUPnPPlayListFiller *NewL()[static]

1st phase constructor

Since
Series 60 3.1

ObjectArray()

const RPointerArray< CUpnpObject > &ObjectArray()

Returns a non-modifiable reference to the object array

Since
Series 60 3.1

PlaylistSize()

TInt PlaylistSize()

Size for which the playlist is to be created. Default implementation returns number of items added in the cache.

SelectedIndex()

TInt SelectedIndex()const

Index of selected item (where playback should start)

SetHost(CUPnPMusicAdapter &)

voidSetHost(CUPnPMusicAdapter &aHost)[protected]

Sets the host for this filler

Parameters

CUPnPMusicAdapter & aHostpointer to the music adapter in which context the filler is running

SetSelectedIndex(TInt)

IMPORT_C voidSetSelectedIndex(TIntaSelectedIndex)

Sets the index (starting from zero = the first inserted item) of selected item. Playback will begin from the selected item. If no item is selected, the first item is selected by default. Note that this method must be called AFTER inserting the objects.

Since
Series 60 3.1

Parameters

TInt aSelectedIndexindex of the item selected

SourceDevice()

const CUpnpAVDevice &SourceDevice()

The source device for the playlist

Since
Series 60 3.1

Member Data Documentation

HBufC * iDeviceUid

HBufC *iDeviceUid[private]

Media server device id Own

CUPnPMusicAdapter * iHost

CUPnPMusicAdapter *iHost[private]

The host music adapter in which context the filler is running (not owned)

RPointerArray< CUpnpObject > iItemList

RPointerArray< CUpnpObject >iItemList[private]

The initial set of items that we are about to set into the playlist Note: NO OWNERSHIP ON THE CONTENT

TInt iSelectedIndex

TInt iSelectedIndex[private]

index of selected item

const CUpnpAVDevice * iSourceDevice

const CUpnpAVDevice *iSourceDevice[private]

The media server we are playing on

TBuf< KMaxUriSize > iTempBuf

TBuf< KMaxUriSize >iTempBuf[private]

Temporary buffer for 8->16-bit conversion