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

void CancelFill ( )

Cancels an ongoing Fill operation.

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

void ConvertToURI ( 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 & aDeviceUid the UID of the device, in string form
const CUpnpObject & aItem browsed UPnP item to be converted
TDes & aBuffer the buffer for result URI

DoComplete()

void DoComplete ( ) [protected]

Completes the filler, resulting it to be deleted

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

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

Fills the initial items into the playlist

Parameters

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

DoFillObjectL(CMPXMediaArray &, const CUpnpObject &, TInt)

void DoFillObjectL ( CMPXMediaArray & aPlaylist,
const CUpnpObject & aObject,
TInt aIndex
) [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 & aPlaylist the MPX playlist
const CUpnpObject & aObject the object to fill
TInt aIndex playlist index of the item being added

FillL(CUPnPMusicAdapter &, CMPXMediaArray &)

void FillL ( 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 & aHost the host adapter in which context the filler operates
CMPXMediaArray & aPlaylist playlist to be filled

Host()

CUPnPMusicAdapter & Host ( ) const [protected]

The music adapter that hosts this filler

InsertObjectL(const CUpnpAVDevice &, const CUpnpObject &)

IMPORT_C void InsertObjectL ( 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 & aMediaServer External Media Server device
const CUpnpObject & aObject reference 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 &)

void SetHost ( CUPnPMusicAdapter & aHost ) [protected]

Sets the host for this filler

Parameters

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

SetSelectedIndex(TInt)

IMPORT_C void SetSelectedIndex ( TInt aSelectedIndex )

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 aSelectedIndex index 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