httpdownloadmgrcommon.h File Reference

API published in: S60 2nd Ed FP 3

Link against: downloadmgr.lib

Capability Information

Required Capabilities

None

Exceptions

The capability NetworkServices is required in: RHttpDownloadMgr::ConnectL( TUid aAppUid, MHttpDownloadMgrObserver& aObserver, TBool aMaster)


#include <e32base.h>

Go to the source code of this file.


Enumerations

enum   THttpDownloadState {
  EHttpDlCreated = 1, EHttpDlInprogress, EHttpDlPaused, EHttpDlCompleted,
  EHttpDlFailed, EHttpDlMoved, EHttpDlMediaRemoved, EHttpDlMediaInserted,
  EHttpDlPausable, EHttpDlNonPausable, EHttpDlDeleted, EHttpDlAlreadyRunning,
  EHttpDlDeleting, EHttpDlNonPausableNetworkLoss, EHttpDlCancelTransaction = 128
}
  Enumeration indicating download state. More...
enum   THttpProgressState {
  EHttpProgNone = 0, EHttpStarted = 500, EHttpProgCreatingConnection = 1000, EHttpProgConnectionNeeded = 1010,
  EHttpProgConnected = 1020, EHttpProgConnectionSuspended = 1022, EHttpProgDisconnected = 1030, EHttpProgDownloadStarted = 2000,
  EHttpContentTypeRequested = EHttpProgDownloadStarted + 20, EHttpContentTypeReceived, EHttpProgSubmitIssued = EHttpProgDownloadStarted + 30, EHttpProgResponseHeaderReceived = 2050,
  EHttpProgResponseBodyReceived, EHttpProgRedirectedPermanently, EHttpProgRedirectedTemporarily, EHttpProgDlNameChanged,
  EHttpProgContentTypeChanged, EHttpProgCodDescriptorDownloaded = 2500, EHttpProgCodDownloadStarted, EHttpProgCodDescriptorAccepted,
  EHttpProgCodLoadEnd, EHttpProgSupportedMultiPart, EHttpProgCodPdAvailable, EHttpProgMovingContentFile = 3000,
  EHttpProgContentFileMoved, EHttpContTypeRecognitionAvail, EHttpProgContentFileMovedAndDestFNChanged
}
  Enumeration indicating download progress state. More...
enum   THttpDownloadMgrAttrib {
  EDlMgrAppUid, EDlMgrIap, EDlMgrExitAction, EDlMgrSilentMode,
  EDlMgrMaster, EDlMgrAllDlsInMaster, EDlMgrNoMediaDlsInMaster, EDlMgrConnectionName,
  EDlMgrAPName, EDlMgrNumInprogressDownloads, EDlMgrConnected, EDlMgrNoMediaDls,
  EDlMgrEnableCookies, EDlAutoConnect, EDlMgrAutoConnect = EDlAutoConnect, EDlMgrFotaDownload,
  EDlMgrCodFolder, EDlMgrNumOfClientSideDownload, EDlMgrHasActiveDownloads, EDlMgrAutoAcceptCod
}
  Enums to access session level attributes. More...
enum   THttpDownloadAttrib {
  EDlAttrState, EDlAttrProgressState, EDlAttrUserData, EDlAttrId,
  EDlAttrReqUrl = 100, EDlAttrRedirUlr, EDlAttrRedirUrl = EDlAttrRedirUlr, EDlAttrCurrentUrl,
  EDlAttrName, EDlAttrPort, EDlAttrMethod, EDlAttrRequestHeaderAddon,
  EDlAttrNextBodyData, EDlAttrReleaseBodyData, EDlAttrRedirected, EDlAttrResponseHeader,
  EDlAttrRequestHeaderAddonLength, EDlAttrAuthScheme = 200, EDlAttrRealm, EDlAttrUsername,
  EDlAttrPassword, EDlAttrProxyRealm, EDlAttrProxyUsername, EDlAttrProxyPassword,
  EDlAttrDestFilename, EDlAttrLength, EDlAttrDownloadedSize, EDlAttrNoContentTypeCheck,
  EDlAttrContinueBody, EDlAttrDestRemovable, EDlAttrStatusCode = 500, EDlAttrErrorId,
  EDlAttrGlobalErrorId, EDlAttrContentType, EDlAttrTargetApp, EDlAttrMediaType,
  EDlAttrMediaTypeBoundary, EDlAttrAttachmentFileName, EDlAttrDisconnectOnReset = 1000, EDlAttrDisconnectOnPause,
  EDlAttrUnused1, EDlAttrAction, EDlAttrRestartAction, EDlAttrNoMedia,
  EDlAttrContinue, EDlAttrPausable, EDlAttrHidden, EDlAttrSilent,
  EDlAttrProgressive, EDlAttrFotaPckgId, EDlAttrDownloadNextUrl, EDlAttrHeaderFields = 1500,
  EDlAttrCharSet = EDlAttrHeaderFields, EDlAttrResponseCharSet = EDlAttrCharSet, EDlAttrResponseAge, EDlAttrResponseETag,
  EDlAttrResponseLocation, EDlAttrResponseRetryAfter, EDlAttrResponseServer, EDlAttrResponseVary,
  EDlAttrRequestAccept = 2000, EDlAttrRequestAcceptCharSet, EDlAttrRequestAcceptLanguage, EDlAttrRequestExpect,
  EDlAttrRequestFrom, EDlAttrRequestHost, EDlAttrRequestMaxForwards, EDlAttrRequestPragma,
  EDlAttrRequestReferer, EDlAttrRequestUserAgent, EDlAttrRequestVary, EDlAttrEntityAllow = 2500,
  EDlAttrEntityContentEncoding, EDlAttrEntityContentLanguage, EDlAttrEntityContentLocation, EDlAttrEntityExpires,
  EDlAttrEntityLastModified, EDlAttrGeneralCacheControl = 3000, EDlAttrGeneralDate, EDlAttrGeneralPragma,
  EDlAttrGeneralVia, EDlAttrGeneralWarning, EDlAttrSucceeded = 8192, EDlAttUnused2,
  EDlAttrFailed, EDlAttrCodDownload, EDlAttrHashedMsgBody, EDlAttrDefaultEvent,
  EDlAttrRedirectedTemporary, EDlAttrRedirectedPermanently, EDlAttrCodDescriptorAccepted, EDlAttrCodLoadEnd,
  EDlAttrDiskBufferingSize, EDlAttrCodPdAvailable, EDlAttrLocalFileName
}
  Enums to access download specific attributes. More...
enum   THttpMethod { EMethodGET, EMethodPOST, EMethodHEAD }
  See RFC2616. More...
enum   THttpAuthenticationScheme { EAuthBasic, EAuthDigest }
  Authentication scheme. More...
enum   THttpDownloadMgrExitAction { EExitNothing, EExitPause, EExitDelete }
  This attribute specifies what Download Manager do with the downloads on exit. More...
enum   THttpDownloadMgrAction { EDoNothing = 0, EMove = 0x0001, ELaunch = 0x0002, EPdLaunch = 0x0004 }
  The action to do when a download completes. More...
enum   THttpRestartActions { ERestartIfExpired, ERestartNoIfCompleted, ERestartForced }
  Restart actions. More...
enum   THttpDownloadMgrError {
  ENoError = 0, EGeneral = -30421, EInternal = -30422, EContentFileIntegrity = -30423,
  EDiskFull = -30424, EConnectionFailed = -30425, ETransactionFailed = -30426, EMoveFailed = -30427,
  EDestFileWriteFailed = -30428, EMMCRemoved = -30429, EBadUrl = -30430, EWrongDestFilename = -30431,
  EDestFileInUse = -30432, EHttpUnhandled = -30433, EHttpAuthenticationFailed = -30434, EProxyAuthenticationFailed = -30435,
  EObjectNotFound = -30436, EPartialContentModified = -30437, EContentExpired = -30438, EHttpRestartFailed = -30450
}
  Allocated usable error range: -30421 -> -30470 (includes the 1st and last numbers). More...

Functions

const TInt  KColon ( ':')
const TInt  KSemiColon ( ';')
const TInt  KQuote ( '"' )
const TInt  KEqual ( '=')
  _LIT8 (KHttpFieldSeparator,"\n")
  _LIT8 (KHttpDispositionTypeAttachment,"attachment")
  _LIT8 (KHttpDispositionTypeInline,"inline")
  _LIT8 (KHttpFileNameParm,"filename")
  _LIT8 (KCodMimeType,"text/x-co-desc")
  OMA DD specific definition.
  _LIT8 (KDdMimeType,"application/vnd.oma.dd+xml")
  OMA DD specific definition.
  _LIT8 (KDd2MimeType,"application/vnd.oma.dd2+xml")
  OMA DD specific definition.
  _LIT8 (KRoapMimeType,"application/vnd.oma.drm.roap-trigger+xml")
  _LIT8 (KMultiPartMimeType,"multipart/related")
  OMA DD specific definition.
  _LIT8 (KDrmMessageMimeType,"application/vnd.oma.drm.message")
  DRM specific MIME type.
  _LIT8 (KDrmMessageMimeTypeDrmContent,"application/vnd.oma.drm.content")
  DRM specific MIME type.
  _LIT8 (KDrmMessageMimeTypeDrmDcf,"application/vnd.oma.drm.dcf")
  DRM specific MIME type.

Variables

const TInt  KMaxUrlLength = 2048
const TInt  KMaxChunkSize = 4096
const TUint  KMaxDefAttrLength = 32
const TUint  KMaxRealmLength = 128
const TUint  KMaxContentTypeLength = 256
const TUint  KMaxDispositionTypeLength = 256
const TInt32  KDefaultPort = 80
const TInt32  KDefaultContentLength = -1
const TUint  KMaxGeneralHeaderFieldLength = 256
const TInt  KHashLength = 32
  Length of a digest hash when represented in hex.
const TInt  KRawHashLength = 16
  Length of a digest hash before converting to hex.
const TInt32  KDefaultFotaPckgId = -1
  Default FOTA package id.

Enumeration Type Documentation

enum THttpAuthenticationScheme
 

Authentication scheme.

Enumerator:
EAuthBasic  Basic authentication scheme.
EAuthDigest  Digest authentication scheme.
enum THttpDownloadAttrib
 

Enums to access download specific attributes.

Attribute types: string(8/16), TInt32, TBool. Some of them indicated as read-only. In debug mode if the client application tries to write such attribute server panics. In release mode it only returns with KErrArgument. If not specified anyway buffer size is KMaxDefAttrLength.

Enumerator:
EDlAttrState  See THttpDownloadState (TInt32 - read-only).
EDlAttrProgressState  See THttpProgressState (TInt32 - read-only).
EDlAttrUserData  Any user defined data that can fit into 32bits (TInt32 - read/write).
EDlAttrId  Unique id of the download.

(TInt32 - read-only)

EDlAttrReqUrl  Requested URL of the content.

(String8<KMaxUrlLength> - read/write

EDlAttrRedirUlr  URL after the last permanent redirection.

When download is created or reseted it's the same as EDlAttrReqUrl. (String8<KMaxUrlLength> - read-only)

EDlAttrRedirUrl 
EDlAttrCurrentUrl  Current URL of the content.

It's always updated if transaction redirected (permanently/temporary). (String8<KMaxUrlLength> - read-only)

EDlAttrName  Name of the download.

Generated from URL path. If URL doesn't contain filename in the path this name is 'index.html' as per default. (String16<KMaxPath> - read-only)

EDlAttrPort  Port address of the host (TInt32 - read/write) (default: KDefaultPort).
EDlAttrMethod  Do not use it.

For internal usage only!!! (TInt32 - read/write)

EDlAttrRequestHeaderAddon  Client application can specify addition request header field with this attribute.

Additional header fields cannot override the ones set by Download Manager! Format is: fieldname KColon fieldrawdata [KHttpFieldSeparator fieldname KColon fieldrawdata] Do not insert whitespaces between fieldname and ":" and fieldrawdata! Sample format string: "%S%c%S". (String8 - read/write)

EDlAttrNextBodyData  Returns the next body chunk.

(String8<KMaxChunkSize> - read-only) (Not supported on v2.8!)

EDlAttrReleaseBodyData  Retrieving attribute releases memory allocated for body chunk returned in a previous EDlAttrNextBodyData call.

On return it indicates that that chunk was the last one. (TBool - read-only) (Not supported on v2.8!)

EDlAttrRedirected  Indicates that temporary redirection occured.

Pausing this download is dangerous, because on restart only the original URL, or the last permenently redirected URL is used. It's not guaranteed that HTTP server will provide the same content on restart after a temporary redirection. (TBool - read-only)

EDlAttrResponseHeader  In continue download, client application can pass the received response header via this attribute.

Format is the same as in case of EDlAttrRequestHeaderAddon. (String8 - write-only. Accepted only if EDlAttrContinue is ETrue)

EDlAttrRequestHeaderAddonLength  Length of the request header add-on, set by client application.

(TInt - read-only)

EDlAttrAuthScheme  Scheme of authentication.

See THttpAuthenticationScheme! (TInt - read/write. Write is accepted only if EDlAttrContinue is ETrue)

EDlAttrRealm  Realm of the HTTP authentication (String8<KMaxRealmLength> - read/write.

Write is accepted only if EDlAttrContinue is ETrue)

EDlAttrUsername  User name.

(String8 - read/write)

EDlAttrPassword  Password.

(String8 - write-only)

EDlAttrProxyRealm  Realm of the proxy authentication.

(String8<KMaxRealmLength> - read/write. Write is accepted only if EDlAttrContinue is ETrue)

EDlAttrProxyUsername  User name for proxy authentication.

(String8 - read/write)

EDlAttrProxyPassword  Password for proxy authentication.

(String8 - write-only)

EDlAttrDestFilename  Destination filename.

Content will be moved/renamed here after download completed. Can be set only before Start and after download successfully completed. (String16<KMaxPath> - read/write)

EDlAttrLength  Full size of the content.

(TInt32 - read/write. Write is accepted only if EDlAttrContinue is ETrue) (default: KDefaultContentLength - until content size is known)

EDlAttrDownloadedSize  Downloaded size of the content.

(TInt32 - read-only)

EDlAttrNoContentTypeCheck  Content is downloaded w/o content type validation.

(TBool - read/write) (default: EFalse)

EDlAttrContinueBody  In case of continue download, the client application can pass already received body data to download manager via this attribute.

Note that if the download is not started this data is lost, because download manager doesn't persist it until that. It is because it's actually not surely known what the destination file size&name until that. (String8 - write only. Accepted only if EDlAttrContinue is ETrue) (String16 - write only. Accepted only if EDlAttrContinue is ETrue. 8bits data stream stored in 16bits descriptor.)

EDlAttrDestRemovable  Indicates that the content file is stored on a removable media.

(TBool - read-only)

EDlAttrStatusCode  Status code from response header (TInt32 - read-only).
EDlAttrErrorId  See THttpDownloadMgrError (TInt32 - read-only).
EDlAttrGlobalErrorId  Global error id (TInt32 - read-only).
EDlAttrContentType  Content type from response header (String8<KMaxContentTypeLength> - read/write.

Write is accepted only if EDlAttrCodDownload is ETrue)

EDlAttrTargetApp  Target app that can open the content (TInt32 - read/write.

Write is accepted only if EDlAttrContinue is ETrue)

EDlAttrMediaType  Media type from response header.

See RFC2616. (String8<KMaxContentTypeLength> - read-only)

EDlAttrMediaTypeBoundary  Boundary attribute from media type.

(String8<KMaxContentTypeLength> - read-only)

EDlAttrAttachmentFileName 
EDlAttrDisconnectOnReset  Automatic disconnection when Reset called.

(TBool - read/write) (default: ETrue)

EDlAttrDisconnectOnPause  Automatic disconnection when Pause called.

In progress state EHttpContentTypeReceived download is in paused state but connection is not closed. (TBool - read/write) (default: ETrue)

EDlAttrUnused1 
EDlAttrAction  See THttpDownloadMgrAction (TInt32 - read/write) (default: ELaunch ).
EDlAttrRestartAction  See THttpRestartActions (TInt32 - read/write) (default: ERestartIfExpired ).
EDlAttrNoMedia  ETrue if the media, on which the download is stored, is removed.

A Reset clears this flag. (TBool - read only)

EDlAttrContinue  Indicates that download was started in client app but that doesn't handle it.

Download is created with RHttpDownloadMgr::CreateClientSideDownloadL(). (TBool - read-only) (default: EFalse)

EDlAttrPausable  If EFalse, download cannot be paused, or the content will be lost.

(TBool - read-only) (default: ETrue)

EDlAttrHidden  If true download is NOT shows in the download list or in any way to the user.

(TBool - read/write) (default: EFalse)

EDlAttrSilent  No progress events sent to the client application.

Only exceptions are: EHttpDlInprogress - EHttpStarted EHttpDlCompleted EHttpDlFailed (TBool - read/write) (default: EFalse)

EDlAttrProgressive  Indicates that this is a progressive download.

(TBool - read/write) (default: EFalse)

EDlAttrFotaPckgId  Fota package ID.

(TInt32 - read/write) (default: KDefaultFotaPckgId. Default means no FOTA download! )

EDlAttrDownloadNextUrl  This attribute is not supported from 3.0! Beginning from 3.0, Download Manager never downloads the next-uri of OMA/COD downloads automatically, but forwards the next-uri to the client via MHttpDownloadMgrNextUriObserver, then the client can create a new download with the next-uri it has got, if it wants so.
EDlAttrHeaderFields  Application can set and query raw header fields and values via these attributes.

(String<KMaxGeneralHeaderFieldLength> - read/write)

EDlAttrCharSet 
EDlAttrResponseCharSet 
EDlAttrResponseAge 
EDlAttrResponseETag 
EDlAttrResponseLocation 
EDlAttrResponseRetryAfter 
EDlAttrResponseServer 
EDlAttrResponseVary 
EDlAttrRequestAccept  Request headers.
EDlAttrRequestAcceptCharSet 
EDlAttrRequestAcceptLanguage 
EDlAttrRequestExpect 
EDlAttrRequestFrom 
EDlAttrRequestHost 
EDlAttrRequestMaxForwards 
EDlAttrRequestPragma 
EDlAttrRequestReferer 
EDlAttrRequestUserAgent 
EDlAttrRequestVary 
EDlAttrEntityAllow  Entity header fields.
EDlAttrEntityContentEncoding 
EDlAttrEntityContentLanguage 
EDlAttrEntityContentLocation 
EDlAttrEntityExpires 
EDlAttrEntityLastModified 
EDlAttrGeneralCacheControl  General header fields.
EDlAttrGeneralDate 
EDlAttrGeneralPragma 
EDlAttrGeneralVia 
EDlAttrGeneralWarning 
EDlAttrSucceeded  Internally used attribute! Do NOT use!
EDlAttUnused2  Internally used attribute! Do NOT use!
EDlAttrFailed  Internally used attribute! Do NOT use!
EDlAttrCodDownload  Indicates that it is an OMA DD downlad, and the content is downloaded by COD Handler.

(TBool - read-only) (default: EFalse)

EDlAttrHashedMsgBody  Internally used attribute! Do NOT use!
EDlAttrDefaultEvent  Internally used attribute! Do NOT use!
EDlAttrRedirectedTemporary  Internally used attribute! Do NOT use!
EDlAttrRedirectedPermanently  Internally used attribute! Do NOT use!
EDlAttrCodDescriptorAccepted  Internally used attribute! Do NOT use!
EDlAttrCodLoadEnd  Internally used attribute! Do NOT use!
EDlAttrDiskBufferingSize  Indicates how large a buffer (in bytes) to use when writing this download to disk.

A value of 0 indicates no buffering.

EDlAttrCodPdAvailable  Internally used attribute! Do NOT use!
EDlAttrLocalFileName 
enum THttpDownloadMgrAction
 

The action to do when a download completes.

Enumerator:
EDoNothing  Do nothing when download completed.
EMove  Automatically move content to the location pointed by EDlAttrDestFilename.
ELaunch  Automatically lauch target application when download completed.

This is the default if not set (default).

EPdLaunch  Automatically lauch progressive download.
enum THttpDownloadMgrAttrib
 

Enums to access session level attributes.

Attribute types: string(8/16), TInt32, TBool. Some of them indicated as read-only. In debug mode if the client application tries to write such attribute server panics. In release mode it only returns with KErrArgument. If not specified other, buffer size is KMaxDefAttrLength.

Every 8bits string attribute can be queried into 16bits descriptor. In this case the 8bits buffer is converted into a 16bits one.

Enumerator:
EDlMgrAppUid  Unique id of the application passed in Connect.

(TInt32 - read only)

EDlMgrIap  Internet Access Point (TInt32 - read/write) (default: default AP used from CommsDb).
EDlMgrExitAction  See THttpDownloadMgrExitAction (TInt32 - read/write) (default: EExitNothing).
EDlMgrSilentMode  No UI interaction in download process (TBool - read/write) (default: EFalse) It is supported only in case of FOTA!!!
EDlMgrMaster  Used if application can be executed in multiple instances (stand-alone and embedded).

This flag indicates that this instance, while running, will inherit downloads of all other instances's when they closed. Two masters are forbidden in the same time. (TBool - read/write) (default: EFalse)

EDlMgrAllDlsInMaster  Returns the number of downloads of the Master instance of the application (TInt32 - read-only).
EDlMgrNoMediaDlsInMaster  Returns the number of downloads of the Master instance, those downloads were stored on a media, that media is not present in the phone.

(TInt32 - read-only)

EDlMgrConnectionName  Name of the connection to be used to create connection.

Or on return it is name of connection used by this instance of download manager. Connection has to be established before this attribute could be returned. Same as RConnection::Name(). Download Manager automatically connects to network with the given name. (String16<KMaxName> - read/write)

EDlMgrAPName  Name of the access point used.

Valid only if the IAP id is known by download manager (String16 - read-only) (Not supported on yet!)

EDlMgrNumInprogressDownloads  Number of in-progress downloads of the client.

(TInt32 - read-only)

EDlMgrConnected  Returns ETrue if the session have active connection.

(TBool - read-only)

EDlMgrNoMediaDls  Returns the number of downloads that are stored on a media that is not present in the phone.

(e.g. MMC that is unplugged)

EDlMgrEnableCookies  Client can specify cookie usage in downloads via this attribute.

(TBool - read/write) (default: ETrue)

EDlAutoConnect  Connection is automatically created if not exists and this attribute is ETrue.

If it's EFalse and no connection, EHttpProgConnectionNeeded is sent to the client. (TBool - read/write) (default: ETrue)

EDlMgrAutoConnect 
EDlMgrFotaDownload  Deprecated! Do not use!!! Indicates that it is a FOTA download (TBool - read/write) (default: EFalse).
EDlMgrCodFolder  Folder to store COD contents (String16<KMaxPath> - read-only) (Not supported on yet!).
EDlMgrNumOfClientSideDownload  Number of client side download (TInt32 - read-only).
EDlMgrHasActiveDownloads  Indicates there are unfinished downloads, particularly important during re-start of DownloadMgr after failure of DownloadManager or device.
EDlMgrAutoAcceptCod  Tells CODHandler to suppress download confirmation dialog for user acceptance of COD/OMA downloads.
enum THttpDownloadMgrError
 

Allocated usable error range: -30421 -> -30470 (includes the 1st and last numbers).

Enumerator:
ENoError 
EGeneral  Non-download specific error. See global error code.
EInternal  Internal error occured.

Most probably a programming error. (e.g. download that is stored on a media, that is not present in the phone, cannot be started)

EContentFileIntegrity  Content file is missing or has different size then it should be.

EDlAttrNoMedia is ETrue if the media, on which content file was (partially) stored, removed.

EDiskFull  Not enough disk space for the content.
EConnectionFailed  Most probably IAP id was wrong or no network coverage.

For more specific info about the error see EDlAttrGlobalErrorId.

ETransactionFailed  Error occured in the transaction.

For more specific info about the error see EDlAttrGlobalErrorId.

EMoveFailed  Moving content file failed.

See EDlAttrGlobalErrorId for specific reason.

EDestFileWriteFailed  Destination file write failed.
EMMCRemoved  MMC card, where th download is being persisted, removed.
EBadUrl  Download Manager cannot handle this URL:
  • it's too long
  • malformed.
EWrongDestFilename  Error in destination filename. Most probably not a real filename.
EDestFileInUse  Destination file cannot be opened/created.

It's most probably in use by other app. or download.

EHttpUnhandled  Unhandled HTTP error code.

See it in EDlAttrGlobalErrorId.

EHttpAuthenticationFailed  401 - Client has to set username/password and Start download again.
EProxyAuthenticationFailed  407 - Client has to set proxy username/password and Start download again.
EObjectNotFound  404 - Object not found.
EPartialContentModified  412: partial content cannot be downloaded because it's already modified.

Call Reset or set THttpRestartActions::ERestartForced

EContentExpired  Paused content is expired, or content is modified between two requests.

Call Reset() or see THttpRestartActions.

EHttpRestartFailed  Resuming progressive download failed.
enum THttpDownloadMgrExitAction
 

This attribute specifies what Download Manager do with the downloads on exit.

Enumerator:
EExitNothing  Downloads remain intacted on exit (default).
EExitPause  All downloads paused on exit.
EExitDelete  All downloads deleted on exit.
enum THttpDownloadState
 

Enumeration indicating download state.

The download states from EHttpDlMoved are temporary. E.g. download adopt EHttpDlMoved state, but right after that, it returns to the original EHttpDlCompleted state.

Enumerator:
EHttpDlCreated 
EHttpDlInprogress 
EHttpDlPaused 
EHttpDlCompleted 
EHttpDlFailed 
EHttpDlMoved  download is moved from one client instance to another one.
EHttpDlMediaRemoved  MMC card or other storage media is removed from the phone.
EHttpDlMediaInserted  MMC card or other storage media inserted and downloaded content file found on it.

If MMC card inserted, but (partially) downloaded content file is not found on it, download is failed with error reason EContentFileIntegrity.

EHttpDlPausable  Download process can be paused again.

This event only occurs after EHttpDlNonPausable.

EHttpDlNonPausable  Download process cannot be paused, or the content will be lost.
EHttpDlDeleted  Download is deleted from another client instance.
EHttpDlAlreadyRunning  Download is started when it's already progressing.
EHttpDlDeleting  Download is going to be deleted.
EHttpDlNonPausableNetworkLoss  Out of network coverage, in case of non-pausable downloads.
EHttpDlCancelTransaction  Internally used download event. Do NOT deal with them.
enum THttpMethod
 

See RFC2616.

Enumerator:
EMethodGET 
EMethodPOST 
EMethodHEAD 
enum THttpProgressState
 

Enumeration indicating download progress state.

These enumarated values usually come with EHttpDlInprogress. An exception is EHttpContentTypeReceived that pauses the download until client app accepts and resumes, or deletes/resets it.

Enumerator:
EHttpProgNone 
EHttpStarted 
EHttpProgCreatingConnection 
EHttpProgConnectionNeeded 
EHttpProgConnected 
EHttpProgConnectionSuspended 
EHttpProgDisconnected 
EHttpProgDownloadStarted 
EHttpContentTypeRequested 
EHttpContentTypeReceived  Download status is EHttpDlPaused! Application can check the received content type here and decide whether to accept it or not.

Call Start again to carry on download, or Delete to delete this download.

EHttpProgSubmitIssued 
EHttpProgResponseHeaderReceived 
EHttpProgResponseBodyReceived 
EHttpProgRedirectedPermanently 
EHttpProgRedirectedTemporarily 
EHttpProgDlNameChanged 
EHttpProgContentTypeChanged 
EHttpProgCodDescriptorDownloaded  OMA DD specific progress.
EHttpProgCodDownloadStarted  OMA DD specific progress.
EHttpProgCodDescriptorAccepted  Cod is accepted.
EHttpProgCodLoadEnd  Cod Handler downloaded the content, but still needs to continue some operation.

Call Start again to carry on! Download status is EHttpDlInprogress!

EHttpProgSupportedMultiPart 
EHttpProgCodPdAvailable 
EHttpProgMovingContentFile 
EHttpProgContentFileMoved 
EHttpContTypeRecognitionAvail 
EHttpProgContentFileMovedAndDestFNChanged 
enum THttpRestartActions
 

Restart actions.

Enumerator:
ERestartIfExpired  Download content again if content is expired (default).
ERestartNoIfCompleted  (Re)Start completes with EHttpDlCompleted at once if already completed.

Anyway starts to download the content only if it's not modified since last partial download. Restarted anyway. No content update/expiry check.

ERestartForced  Forced download.

Don't matter if content is expired, or not.


Function Documentation

_LIT8 KDrmMessageMimeTypeDrmDcf  ,
"application/vnd.oma.drm.dcf" 
 

DRM specific MIME type.

_LIT8 KDrmMessageMimeTypeDrmContent  ,
"application/vnd.oma.drm.content" 
 

DRM specific MIME type.

_LIT8 KDrmMessageMimeType  ,
"application/vnd.oma.drm.message" 
 

DRM specific MIME type.

_LIT8 KMultiPartMimeType  ,
"multipart/related" 
 

OMA DD specific definition.

_LIT8 KRoapMimeType  ,
"application/vnd.oma.drm.roap-trigger+xml" 
 
_LIT8 KDd2MimeType  ,
"application/vnd.oma.dd2+xml" 
 

OMA DD specific definition.

_LIT8 KDdMimeType  ,
"application/vnd.oma.dd+xml" 
 

OMA DD specific definition.

_LIT8 KCodMimeType  ,
"text/x-co-desc" 
 

OMA DD specific definition.

_LIT8 KHttpFileNameParm  ,
"filename" 
 
_LIT8 KHttpDispositionTypeInline  ,
"inline" 
 
_LIT8 KHttpDispositionTypeAttachment  ,
"attachment" 
 
_LIT8 KHttpFieldSeparator  ,
"\n" 
 
const TInt KColon ':'   ) 
 
const TInt KEqual = '  ) 
 
const TInt KQuote '"'   ) 
 
const TInt KSemiColon ';'   ) 
 

Variable Documentation

const TInt32 KDefaultContentLength = -1
 
const TInt32 KDefaultFotaPckgId = -1
 

Default FOTA package id.

Default means no FOTA download!

const TInt32 KDefaultPort = 80
 
const TInt KHashLength = 32
 

Length of a digest hash when represented in hex.

const TInt KMaxChunkSize = 4096
 
const TUint KMaxContentTypeLength = 256
 
const TUint KMaxDefAttrLength = 32
 
const TUint KMaxDispositionTypeLength = 256
 
const TUint KMaxGeneralHeaderFieldLength = 256
 
const TUint KMaxRealmLength = 128
 
const TInt KMaxUrlLength = 2048
 
const TInt KRawHashLength = 16
 

Length of a digest hash before converting to hex.


Copyright © Nokia Corporation 2001-2008
Back to top