CCodDownload Class Reference

class CCodDownload : public CBase
Descriptor-based download. Supported descriptor types:
  • text/x-co-desc (Nokia COD)

  • application/vnd.oma.dd+xml (OMA DD)

  • multipart/related, where the first part is one of the two above.

Inherits from

Public Member Functions
~CCodDownload()
IMPORT_C TIntActiveDownload()
IMPORT_C TPtrCGetDestFilePath(TInt)
IMPORT_C TPtrCGetPath()
IMPORT_C HBufC8 *GetPostResponseUrlL()
IMPORT_C TPtrCName()
IMPORT_C CCodDownload *NewL(const TDesC8 &, const TDesC8 &, MCodDownloadObserver &, CEikonEnv *)
IMPORT_C CCodDownload *NewL(const TDesC8 &, const TDesC8 &, MCodDownloadObserver &, CEikonEnv *, const TDesC8 *, const TDesC16 *)
IMPORT_C CCodDownload *NewL(const TInt, const TUid, const TDesC8 &, MCodDownloadObserver &, CEikonEnv *)
IMPORT_C HBufC8 *NextUrlL()
IMPORT_C voidPause()
IMPORT_C const TCodDownloadProgress &Progress()
IMPORT_C TBoolRemovableMedia()
IMPORT_C voidServiceFlowL()
IMPORT_C voidSetCodDlAttached(const TBool)
IMPORT_C voidSetUserData(TAny *)
IMPORT_C voidStartL(const CAiwGenericParamList *)
IMPORT_C voidStop()
IMPORT_C TPtrC8Type()
IMPORT_C HBufC8 *UpdatedDDUriL()
IMPORT_C HBufC8 *UpdatedDownloadDataL()
IMPORT_C HBufC8 *UpdatedTrackDataL(TInt &)
IMPORT_C TAny *UserData()
Private Member Functions
CCodDownload()
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 Attributes
CCodDownloadImpl *iImpl

Constructor & Destructor Documentation

CCodDownload()

CCodDownload()[private]

Constructor.

~CCodDownload()

IMPORT_C~CCodDownload()[virtual]

Destructor.

Member Functions Documentation

ActiveDownload()

IMPORT_C TIntActiveDownload()

Get COD Active download

GetDestFilePath(TInt)

IMPORT_C TPtrCGetDestFilePath(TIntaMOIndex)const

Get Destination file name

Parameters

TInt aMOIndexmedia object index between 1 to 'n'

GetPath()

IMPORT_C TPtrCGetPath()const

Get path of saved content (or empty string). Available in ESucceeded state only.

GetPostResponseUrlL()

IMPORT_C HBufC8 *GetPostResponseUrlL()const

Get PostResponse-URL.

Name()

IMPORT_C TPtrCName()

Get name attribute. This may be empty string, if attribute is empty or not available. Do not store pointer (data may change as download proceeds).

NewL(const TDesC8 &, const TDesC8 &, MCodDownloadObserver &, CEikonEnv *)

IMPORT_C CCodDownload *NewL(const TDesC8 &aBuf,
const TDesC8 &aType,
MCodDownloadObserver &aObserver,
CEikonEnv *aEikEnv
)[static]

Two-phased constructor. Leaves on failure.

Parameters

const TDesC8 & aBufThe descriptor.
const TDesC8 & aTypeDescriptor data type.
MCodDownloadObserver & aObserverObserver.
CEikonEnv * aEikEnvEikon environment or NULL. Can be NULL if download does not require UI functionality. If download needs UI but NULL is passed here, the download fails with EFailedPermanent KErrCancel.

NewL(const TDesC8 &, const TDesC8 &, MCodDownloadObserver &, CEikonEnv *, const TDesC8 *, const TDesC16 *)

IMPORT_C CCodDownload *NewL(const TDesC8 &aBuf,
const TDesC8 &aType,
MCodDownloadObserver &aObserver,
CEikonEnv *aEikEnv,
const TDesC8 *aMultipartBoundary,
const TDesC16 *aMultipartUrl
)[static]

Two-phased constructor. Leaves on failure. This one supports multipart/related where the first part of the multipart is the descriptor.

Parameters

const TDesC8 & aBufData buffer (descriptor or multipart).
const TDesC8 & aTypeData type.
MCodDownloadObserver & aObserverObserver.
CEikonEnv * aEikEnvEikon environment or NULL. Can be NULL if download does not require UI functionality. If download needs UI but NULL is passed here, the download fails with EFailedPermanent KErrCancel.
const TDesC8 * aMultipartBoundaryMultipart boundary or NULL. Required for processing multipart.
const TDesC16 * aMultipartUrlMultipart URL or NULL. Required for processing multipart.

NewL(const TInt, const TUid, const TDesC8 &, MCodDownloadObserver &, CEikonEnv *)

IMPORT_C CCodDownload *NewL(const TIntaDownloadId,
const TUidaDlUid,
const TDesC8 &aType,
MCodDownloadObserver &aObserver,
CEikonEnv *aEikEnv
)[static]

Two-phased constructor. Leaves on failure.

Parameters

const TInt aDownloadIdDownload ID.
const TUid aDlUidApp UID.
const TDesC8 & aTypeDescriptor data type.
MCodDownloadObserver & aObserverObserver.
CEikonEnv * aEikEnvEikon environment or NULL. Can be NULL if download does not require UI functionality. If download needs UI but NULL is passed here, the download fails with EFailedPermanent KErrCancel.

NextUrlL()

IMPORT_C HBufC8 *NextUrlL()const

Get Next-URL.

Pause()

IMPORT_C voidPause()

Pauses the COD download

Progress()

IMPORT_C const TCodDownloadProgress &Progress()const

Get progress.

RemovableMedia()

IMPORT_C TBoolRemovableMedia()const

Check if downloading to removable media. Available after EAccept event.

ServiceFlowL()

IMPORT_C voidServiceFlowL()
Perform service flow after a succesful or failed download. This consists of zero, one or both of
  • launching downloaded content

  • activating Next-URL. Load may also be retried. Call this in response to EEndLoad event.

SetCodDlAttached(const TBool)

IMPORT_C voidSetCodDlAttached(const TBoolaValue)

Set COD download attached

Parameters

const TBool aValueIf equals ETrue - download is attached

SetUserData(TAny *)

IMPORT_C voidSetUserData(TAny *aUserData)

Set tansparent user data.

Parameters

TAny * aUserDataUser data.

StartL(const CAiwGenericParamList *)

IMPORT_C voidStartL(const CAiwGenericParamList *aParams)

Start download. Panics if already active. Restart is OK for completed downloads.

Parameters

const CAiwGenericParamList * aParamsParameters or NULL.

Stop()

IMPORT_C voidStop()

Stop (cancel) download. Safe to call in any state. Note: processing continues until MCodDownloadObserver::EDone event.

Type()

IMPORT_C TPtrC8Type()const

Get data type of content (or empty string: type may not be available).

UpdatedDDUriL()

IMPORT_C HBufC8 *UpdatedDDUriL()const

Get the updated DD URL.

UpdatedDownloadDataL()

IMPORT_C HBufC8 *UpdatedDownloadDataL()const

Set the CodData stream descriptor.

UpdatedTrackDataL(TInt &)

IMPORT_C HBufC8 *UpdatedTrackDataL(TInt &aValue)const

Set the stream descriptor for single media object (track).

Parameters

TInt & aValue

UserData()

IMPORT_C TAny *UserData()const

Get tansparent user data.

Member Data Documentation

CCodDownloadImpl * iImpl

CCodDownloadImpl *iImpl[private]