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

Constructor & Destructor Documentation

CCodDownload()

CCodDownload ( ) [private]

Constructor.

~CCodDownload()

IMPORT_C ~CCodDownload ( ) [virtual]

Destructor.

Member Functions Documentation

ActiveDownload()

IMPORT_C TInt ActiveDownload ( )

Get COD Active download

GetDestFilePath(TInt)

IMPORT_C TPtrC GetDestFilePath ( TInt aMOIndex ) const

Get Destination file name

Parameters

TInt aMOIndex media object index between 1 to 'n'

GetPath()

IMPORT_C TPtrC GetPath ( ) 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 TPtrC Name ( )

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 & aBuf The descriptor.
const TDesC8 & aType Descriptor data type.
MCodDownloadObserver & aObserver Observer.
CEikonEnv * aEikEnv Eikon 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 & aBuf Data buffer (descriptor or multipart).
const TDesC8 & aType Data type.
MCodDownloadObserver & aObserver Observer.
CEikonEnv * aEikEnv Eikon 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 * aMultipartBoundary Multipart boundary or NULL. Required for processing multipart.
const TDesC16 * aMultipartUrl Multipart URL or NULL. Required for processing multipart.

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

IMPORT_C CCodDownload * NewL ( const TInt aDownloadId,
const TUid aDlUid,
const TDesC8 & aType,
MCodDownloadObserver & aObserver,
CEikonEnv * aEikEnv
) [static]

Two-phased constructor. Leaves on failure.

Parameters

const TInt aDownloadId Download ID.
const TUid aDlUid App UID.
const TDesC8 & aType Descriptor data type.
MCodDownloadObserver & aObserver Observer.
CEikonEnv * aEikEnv Eikon 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 void Pause ( )

Pauses the COD download

Progress()

IMPORT_C const TCodDownloadProgress & Progress ( ) const

Get progress.

RemovableMedia()

IMPORT_C TBool RemovableMedia ( ) const

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

ServiceFlowL()

IMPORT_C void ServiceFlowL ( )
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 void SetCodDlAttached ( const TBool aValue )

Set COD download attached

Parameters

const TBool aValue If equals ETrue - download is attached

SetUserData(TAny *)

IMPORT_C void SetUserData ( TAny * aUserData )

Set tansparent user data.

Parameters

TAny * aUserData User data.

StartL(const CAiwGenericParamList *)

IMPORT_C void StartL ( const CAiwGenericParamList * aParams )

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

Parameters

const CAiwGenericParamList * aParams Parameters or NULL.

Stop()

IMPORT_C void Stop ( )

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

Type()

IMPORT_C TPtrC8 Type ( ) 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]