CUPnPDownloadItemResolver Class Reference

class CUPnPDownloadItemResolver : public CBase

Resolves remote upnp items from a plain item id. This resolving is done by executing a upnp metadata browse, or possibly several ones of those.

upnpavcontrollerhelper.lib
Since
S60 3.2

Inherits from

Public Member Functions
~CUPnPDownloadItemResolver ()
IMPORT_C void DeleteTempDownloadFilesL ()
const CUpnpItem & Item ()
CUPnPDownloadItemResolver * NewL (const TDesC8 &, MUPnPAVController &, MUPnPAVBrowsingSession &, MUPnPResourceSelector &, const TDesC8 &)
void ResolveL ( MUPnPItemResolverObserver &)
const CUpnpElement & Resource ()
Protected Member Functions
void MediaServerDisappeared (TUPnPDeviceDisconnectedReason)
void ResolveComplete (const MUPnPItemResolver &, TInt )
void TransferCompleted ( TInt , TInt , const TDesC &)
void TransferProgress ( TInt , TInt , TInt )
void TransferStarted ( TInt , TInt )
Private Member Functions
CUPnPDownloadItemResolver (const TDesC8 &, MUPnPAVController &, MUPnPAVBrowsingSession &, MUPnPResourceSelector &, const TDesC8 &)
void Cleanup ()
void Complete ( TInt )
void ConstructL (const TDesC8 &, MUPnPAVController &, MUPnPAVBrowsingSession &, MUPnPResourceSelector &, const TDesC8 &)
TInt CreateRFile (const TDesC &)
HBufC * CreateTmpFileNameL ()
HBufC * GetSelectedDownloadLocationL ()
void InitiateDownloadL ()
void IsLocallySupportedL (const CUpnpElement &)
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()
Private Member Enumerations
enum TInternalState { EStateIdle , EStateResolving , EStateDownloading , EStateReady }
Private Attributes
MUPnPAVController & iAvController
MUPnPFileDownloadSession * iDownloadSession
RFile iFile
RFs iFsSession
HBufC * iLocalFile
MUPnPItemResolverObserver * iObserver
CUpnpAVDevice * iRemoteDevice
CUPnPRemoteItemResolver * iRemoteResolver
MUPnPResourceSelector & iSelector
CUPnPSettingsEngine * iSettingsEngine
TInternalState iState

Constructor & Destructor Documentation

CUPnPDownloadItemResolver(const TDesC8 &, MUPnPAVController &, MUPnPAVBrowsingSession &, MUPnPResourceSelector &, const TDesC8 &)

CUPnPDownloadItemResolver ( const TDesC8 & aItemId,
MUPnPAVController & aAvController,
MUPnPAVBrowsingSession & aHostSession,
MUPnPResourceSelector & aSelector,
const TDesC8 & aBrowseFilter
) [private]

default constructor

Since
Series 60 3.2

Parameters

const TDesC8 & aItemId
MUPnPAVController & aAvController
MUPnPAVBrowsingSession & aHostSession
MUPnPResourceSelector & aSelector
const TDesC8 & aBrowseFilter

~CUPnPDownloadItemResolver()

~CUPnPDownloadItemResolver ( ) [virtual]

destructor

Member Functions Documentation

Cleanup()

void Cleanup ( ) [private]

Clean up all resources

Complete(TInt)

void Complete ( TInt aError ) [private]

Completes ongoing async operation

Parameters

TInt aError

ConstructL(const TDesC8 &, MUPnPAVController &, MUPnPAVBrowsingSession &, MUPnPResourceSelector &, const TDesC8 &)

void ConstructL ( const TDesC8 & aItemId,
MUPnPAVController & aAvController,
MUPnPAVBrowsingSession & aHostSession,
MUPnPResourceSelector & aSelector,
const TDesC8 & aBrowseFilter
) [private]

2nd phase constructor

Since
Series 60 3.2

Parameters

const TDesC8 & aItemId
MUPnPAVController & aAvController
MUPnPAVBrowsingSession & aHostSession
MUPnPResourceSelector & aSelector
const TDesC8 & aBrowseFilter

CreateRFile(const TDesC &)

TInt CreateRFile ( const TDesC & aFilePath ) [private]

Creates RFile

Parameters

const TDesC & aFilePath

CreateTmpFileNameL()

HBufC * CreateTmpFileNameL ( ) [private]

Create temporary file name for file to be download. Format is upnpfwtemp<item_id><file extension>=""> The following characters are replaced with an underscore: >, <, ", \, /, *, |, * : and ?

DeleteTempDownloadFilesL()

IMPORT_C void DeleteTempDownloadFilesL ( ) [static]

Delete upnp genereated temporary files from download locations Leave in case of fatal errors

Since
S60 3.2

GetSelectedDownloadLocationL()

HBufC * GetSelectedDownloadLocationL ( ) [private]

Get selected download location from settings engine.

InitiateDownloadL()

void InitiateDownloadL ( ) [private]

Starts download when the remote item itself has been resolved using the remote resolver

IsLocallySupportedL(const CUpnpElement &)

void IsLocallySupportedL ( const CUpnpElement & aRes ) [private]
Check if the audio is DLNA supported in remote to local playback
Since
Series 60 3.1

Parameters

const CUpnpElement & aRes

Item()

const CUpnpItem & Item ( ) const

see UPnPItemResolver

MediaServerDisappeared(TUPnPDeviceDisconnectedReason)

void MediaServerDisappeared ( TUPnPDeviceDisconnectedReason aReason ) [protected]

Parameters

TUPnPDeviceDisconnectedReason aReason

NewL(const TDesC8 &, MUPnPAVController &, MUPnPAVBrowsingSession &, MUPnPResourceSelector &, const TDesC8 &)

CUPnPDownloadItemResolver * NewL ( const TDesC8 & aItemId,
MUPnPAVController & aAvController,
MUPnPAVBrowsingSession & aHostSession,
MUPnPResourceSelector & aSelector,
const TDesC8 & aBrowseFilter
) [static]

static constructor

Since
Series 60 3.2

Parameters

const TDesC8 & aItemId
MUPnPAVController & aAvController
MUPnPAVBrowsingSession & aHostSession
MUPnPResourceSelector & aSelector
const TDesC8 & aBrowseFilter

ResolveComplete(const MUPnPItemResolver &, TInt)

void ResolveComplete ( const MUPnPItemResolver & aResolver,
TInt aError
) [protected]

Parameters

const MUPnPItemResolver & aResolver
TInt aError

ResolveL(MUPnPItemResolverObserver &)

void ResolveL ( MUPnPItemResolverObserver & aObserver )

see UPnPItemResolver

Parameters

MUPnPItemResolverObserver & aObserver

Resource()

const CUpnpElement & Resource ( ) const

see UPnPItemResolver

TransferCompleted(TInt, TInt, const TDesC &)

void TransferCompleted ( TInt aKey,
TInt aStatus,
const TDesC & aFilePath
) [protected]

Parameters

TInt aKey
TInt aStatus
const TDesC & aFilePath

TransferProgress(TInt, TInt, TInt)

void TransferProgress ( TInt aKey,
TInt aBytes,
TInt aTotalBytes
) [protected]

Parameters

TInt aKey
TInt aBytes
TInt aTotalBytes

TransferStarted(TInt, TInt)

void TransferStarted ( TInt aKey,
TInt aStatus
) [protected]

Parameters

TInt aKey
TInt aStatus

Member Enumerations Documentation

Enum TInternalState

internal state machinery

Enumerators

EStateIdle
EStateResolving
EStateDownloading
EStateReady

Member Data Documentation

MUPnPAVController & iAvController

MUPnPAVController & iAvController [private]

MUPnPFileDownloadSession * iDownloadSession

MUPnPFileDownloadSession * iDownloadSession [private]

RFile iFile

RFile iFile [private]

RFs iFsSession

RFs iFsSession [private]

HBufC * iLocalFile

HBufC * iLocalFile [private]

MUPnPItemResolverObserver * iObserver

MUPnPItemResolverObserver * iObserver [private]

CUpnpAVDevice * iRemoteDevice

CUpnpAVDevice * iRemoteDevice [private]

CUPnPRemoteItemResolver * iRemoteResolver

CUPnPRemoteItemResolver * iRemoteResolver [private]

MUPnPResourceSelector & iSelector

MUPnPResourceSelector & iSelector [private]

CUPnPSettingsEngine * iSettingsEngine

CUPnPSettingsEngine * iSettingsEngine [private]

TInternalState iState

TInternalState iState [private]