2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Common constants used in Download Manager Engine
20 #ifndef HTTPDOWNLOADMGRCOMMON_H
21 #define HTTPDOWNLOADMGRCOMMON_H
27 const TInt KMaxUrlLength = 2048;
28 const TInt KMaxChunkSize = 4096;
29 const TUint KMaxDefAttrLength = 32;
30 const TUint KMaxRealmLength = 128;
31 const TUint KMaxContentTypeLength = 256;
32 const TUint KMaxDispositionTypeLength = 256;
33 const TInt32 KDefaultPort = 80;
34 const TInt32 KDefaultContentLength = -1;
35 const TUint KMaxGeneralHeaderFieldLength = 256;
36 /** Length of a digest hash when represented in hex */
37 const TInt KHashLength = 32;
38 /** Length of a digest hash before converting to hex. */
39 const TInt KRawHashLength = 16;
40 /** Default FOTA package id. Default means no FOTA download! */
41 const TInt32 KDefaultFotaPckgId = -1;
42 /** Non-MediaObject index */
43 const TInt32 KNonMoIndex = 0;
44 /** Index of first media object */
45 const TInt32 KFirstMoIndex = 1;
47 const TInt KColon( ':' );
48 const TInt KSemiColon( ';' );
49 const TInt KQuote( '"' );
50 const TInt KEqual( '=' );
52 _LIT8( KHttpFieldSeparator, "\n");
53 _LIT8( KHttpDispositionTypeAttachment, "attachment");
54 _LIT8( KHttpDispositionTypeInline, "inline");
55 _LIT8( KHttpFileNameParm, "filename");
57 /** OMA DD specific definition */
58 _LIT8( KCodMimeType, "text/x-co-desc" );
59 /** OMA DD specific definition */
60 _LIT8( KDdMimeType, "application/vnd.oma.dd+xml" );
61 /** OMA DD specific definition */
62 _LIT8( KDd2MimeType, "application/vnd.oma.dd2+xml" );
63 _LIT8( KRoapMimeType, "application/vnd.oma.drm.roap-trigger+xml" );
65 /// FOTA Update Package type.
66 _LIT8( KFotaPackageDataType, "application/vnd.nokia.swupd.dp2" );
68 /** OMA DD specific definition */
69 _LIT8( KMultiPartMimeType, "multipart/related" );
71 /** DRM specific MIME type */
72 _LIT8( KDrmMessageMimeType, "application/vnd.oma.drm.message" );
73 /** DRM specific MIME type */
74 _LIT8( KDrmMessageMimeTypeDrmContent, "application/vnd.oma.drm.content" );
75 /** DRM specific MIME type */
76 _LIT8( KDrmMessageMimeTypeDrmDcf, "application/vnd.oma.drm.dcf" );
78 /** DRM specific MIME type */
79 _LIT8( KRoapPduMimeType, "application/vnd.oma.drm.roap-pdu+xml" );
81 /** Enumeration indicating download state.
82 * The download states from EHttpDlMoved are temporary. E.g. download adopt
83 * EHttpDlMoved state, but right after that, it returns to the original
84 * EHttpDlCompleted state.
86 enum THttpDownloadState
94 /// download is moved from one client instance to another one.
96 /// MMC card or other storage media is removed from the phone.
98 /** MMC card or other storage media inserted and
99 * downloaded content file found on it.
100 * If MMC card inserted, but (partially) downloaded content file
101 * is not found on it, download is failed with error reason
102 * EContentFileIntegrity. */
103 EHttpDlMediaInserted,
104 /** Download process can be paused again. This event only occurs after
105 * EHttpDlNonPausable. */
107 /// Download process cannot be paused, or the content will be lost.
109 /// Download is deleted from another client instance.
111 /// Download is started when it's already progressing
112 EHttpDlAlreadyRunning,
113 /// Download is going to be deleted.
115 /// Out of network coverage, in case of non-pausable downloads
116 EHttpDlNonPausableNetworkLoss,
117 EHttpDlMultipleMOStarted,
118 EHttpDlMultipleMOCompleted,
119 EHttpDlMultipleMOFailed,
120 /// Internally used download event. Do NOT deal with them
121 EHttpDlCancelTransaction = 128
124 /** Enumeration indicating download progress state.
125 * These enumarated values usually come with EHttpDlInprogress.
126 * An exception is EHttpContentTypeReceived that pauses the download
127 * until client app accepts and resumes, or deletes/resets it.
129 enum THttpProgressState
135 EHttpProgCreatingConnection = 1000,
136 EHttpProgConnectionNeeded = 1010,
137 EHttpProgConnected = 1020,
139 EHttpProgConnectionSuspended = 1022,
141 EHttpProgDisconnected = 1030,
143 EHttpProgDownloadStarted = 2000,
144 EHttpContentTypeRequested = EHttpProgDownloadStarted + 20,
146 /** Download status is EHttpDlPaused!
147 * Application can check the received content type here and decide whether
148 * to accept it or not. Call Start again to carry on download, or Delete to
149 * delete this download. */
150 EHttpContentTypeReceived,
152 EHttpProgSubmitIssued = EHttpProgDownloadStarted + 30,
154 EHttpProgResponseHeaderReceived = 2050,
155 EHttpProgResponseBodyReceived,
156 EHttpProgRedirectedPermanently,
157 EHttpProgRedirectedTemporarily,
158 EHttpProgDlNameChanged,
159 EHttpProgContentTypeChanged,
161 /// OMA DD specific progress
162 EHttpProgCodDescriptorDownloaded = 2500,
163 /// OMA DD specific progress
164 EHttpProgCodDownloadStarted,
166 EHttpProgCodDescriptorAccepted,
167 /** Cod Handler downloaded the content, but still needs to continue some
168 * operation. Call Start again to carry on! Download status is
169 * EHttpDlInprogress! */
171 EHttpProgSupportedMultiPart,
173 EHttpProgCodPdAvailable,
174 EHttpProgCodDownloadShouldResume,
175 EHttpProgCodDownloadPause,
177 EHttpProgMovingContentFile = 3000,
178 EHttpProgContentFileMoved,
180 // We have received sufficient HTTP response body to allow us to recognize
181 // content-type from data rather than trust content-type header
182 EHttpContTypeRecognitionAvail,
184 //The state is used for duplicate files .The duplicate file is renamed
185 //and move happens simultaneously
186 EHttpProgContentFileMovedAndDestFNChanged,
188 // Progress event to indicate download is progressively played
189 EHttpDlProgProgressive,
191 // Progress event to indicate download is not progressively played
192 EHttpDlProgNonProgressive
195 /** Enums to access session level attributes.
196 * Attribute types: string(8/16), TInt32, TBool.
197 * Some of them indicated as read-only. In debug mode if the client
198 * application tries to write such attribute server panics.
199 * In release mode it only returns with KErrArgument.
200 * If not specified other, buffer size is KMaxDefAttrLength.
202 * Every 8bits string attribute can be queried into 16bits descriptor.
203 * In this case the 8bits buffer is converted into a 16bits one.
205 enum THttpDownloadMgrAttrib
207 EDlMgrAppUid, /**< Unique id of the application
209 * (TInt32 - read only) */
211 EDlMgrIap, /**< Internet Access Point
212 * (TInt32 - read/write)
213 * (default: default AP used from CommsDb) */
215 EDlMgrExitAction, /**< See THttpDownloadMgrExitAction
216 * (TInt32 - read/write)
217 * (default: EExitNothing) */
219 EDlMgrSilentMode, /**< No UI interaction in download process
220 * (TBool - read/write)
222 * It is supported only in case of FOTA!!! */
224 EDlMgrMaster, /**< Used if application can be executed in multiple
225 * instances (stand-alone and embedded).
226 * This flag indicates that this instance, while running,
227 * will inherit downloads of all other instances's
229 * Two masters are forbidden in the same time.
230 * (TBool - read/write)
231 * (default: EFalse) */
233 EDlMgrAllDlsInMaster, /**< Returns the number of downloads of the Master
234 * instance of the application
235 * (TInt32 - read-only) */
237 EDlMgrNoMediaDlsInMaster, /**< Returns the number of downloads of the
238 * Master instance, those downloads were stored on a
239 * media, that media is not present in the phone.
240 * (TInt32 - read-only) */
242 EDlMgrConnectionName, /**< Name of the connection to be used to create
244 * Or on return it is name of connection used by this instance of
245 * download manager. Connection has to be established before this
246 * attribute could be returned. Same as RConnection::Name().
247 * Download Manager automatically connects to network with the
249 * (String16<KMaxName> - read/write) */
251 EDlMgrAPName, /**< Name of the access point used. Valid only if the IAP id
252 * is known by download manager
253 * (String16 - read-only)
254 * (Not supported on yet!) */
256 EDlMgrNumInprogressDownloads,
257 /**< Number of in-progress downloads of the client.
258 * (TInt32 - read-only) */
260 EDlMgrConnected, /**< Returns ETrue if the session have active connection.
261 * (TBool - read-only) */
263 EDlMgrNoMediaDls, /**< Returns the number of downloads that are
264 * stored on a media that is not present in the phone.
265 * (e.g. MMC that is unplugged) */
267 EDlMgrEnableCookies, /**< Client can specify cookie usage in downloads
268 * via this attribute.
269 * (TBool - read/write)
270 * (default: ETrue) */
272 EDlAutoConnect, /**< Connection is automatically created if not
273 * exists and this attribute is ETrue. If it's EFalse and no
274 * connection, EHttpProgConnectionNeeded is sent to
276 * (TBool - read/write)
277 * (default: ETrue) */
278 EDlMgrAutoConnect = EDlAutoConnect,
280 EDlMgrFotaDownload, /**< Deprecated! Do not use!!!
281 * Indicates that it is a FOTA download
282 * (TBool - read/write)
283 * (default: EFalse) */
285 EDlMgrCodFolder, /**< Folder to store COD contents
286 * (String16<KMaxPath> - read-only)
287 * (Not supported on yet!) */
288 EDlMgrNumOfClientSideDownload,
289 /**< Number of client side download
290 * (TInt32 - read-only) */
291 EDlMgrHasActiveDownloads,
292 /**< Indicates there are unfinished downloads, particularly
293 * important during re-start of DownloadMgr after failure
294 * of DownloadManager or device */
295 EDlMgrAutoAcceptCod, /**< Tells CODHandler to suppress download confirmation
296 * dialog for user acceptance of COD/OMA downloads */
298 EDlMgrProgressiveDownload /**< Used to control progressiveness
299 * of all downoads in a session
300 * (TBool - read/write)*/
304 /** Enums to access download specific attributes.
305 * Attribute types: string(8/16), TInt32, TBool.
306 * Some of them indicated as read-only. In debug mode
307 * if the client application tries to write such attribute
308 * server panics. In release mode it only returns with
310 * If not specified anyway buffer size is KMaxDefAttrLength.
312 enum THttpDownloadAttrib
314 // Download progress attributes
315 EDlAttrState, /**< See THttpDownloadState
316 * (TInt32 - read-only) */
318 EDlAttrProgressState, /**< See THttpProgressState
319 * (TInt32 - read-only) */
321 EDlAttrUserData, /**< Any user defined data that can fit into 32bits
322 * (TInt32 - read/write) */
324 EDlAttrId, /**< Unique id of the download.
325 * (TInt32 - read-only) */
328 // Attributes mandatory to issue the request
330 EDlAttrReqUrl = 100, /**< Requested URL of the content.
331 * (String8<KMaxUrlLength> - read/write */
333 EDlAttrRedirUlr, /**< URL after the last permanent redirection.
334 * When download is created or reseted it's the same
336 * (String8<KMaxUrlLength> - read-only) */
337 EDlAttrRedirUrl = EDlAttrRedirUlr,
339 EDlAttrCurrentUrl, /**< Current URL of the content. It's always updated if
340 * transaction redirected (permanently/temporary).
341 * (String8<KMaxUrlLength> - read-only) */
343 EDlAttrName, /**< Name of the download. Generated from URL path.
344 * If URL doesn't contain filename in the path
345 * this name is 'index.html' as per default.
346 * (String16<KMaxPath> - read-only) */
348 EDlAttrPort, /**< Port address of the host
349 * (TInt32 - read/write)
350 * (default: KDefaultPort) */
352 EDlAttrMethod, /**< Do not use it. For internal usage only!!!
353 * (TInt32 - read/write) */
355 EDlAttrRequestHeaderAddon, /**< Client application can specify addition request
356 * header field with this attribute.
357 * Additional header fields cannot override the ones
358 * set by Download Manager!
360 * fieldname KColon fieldrawdata [KHttpFieldSeparator fieldname KColon fieldrawdata]
361 * Do not insert whitespaces between fieldname and ":" and fieldrawdata!
362 * Sample format string: "%S%c%S".
363 * (String8 - read/write) */
365 EDlAttrNextBodyData, /**< Returns the next body chunk.
366 * (String8<KMaxChunkSize> - read-only)
367 * (Not supported on v2.8!) */
369 EDlAttrReleaseBodyData, /**< Retrieving attribute releases memory allocated
370 * for body chunk returned in a previous
371 * EDlAttrNextBodyData call.
372 * On return it indicates that that chunk was the last one.
373 * (TBool - read-only)
374 * (Not supported on v2.8!) */
376 EDlAttrRedirected, /**< Indicates that temporary redirection occured.
377 * Pausing this download is dangerous, because on
378 * restart only the original URL, or the last
379 * permenently redirected URL is used. It's not
380 * guaranteed that HTTP server will provide the same
381 * content on restart after a temporary redirection.
382 * (TBool - read-only) */
384 EDlAttrResponseHeader, /**< In continue download, client application can
385 * pass the received response header via this
387 * Format is the same as in case of EDlAttrRequestHeaderAddon.
388 * (String8 - write-only. Accepted only if EDlAttrContinue is ETrue) */
390 EDlAttrRequestHeaderAddonLength, /**< Length of the request header add-on,
391 * set by client application.
392 * (TInt - read-only) */
395 // HTTP/Proxy authentication attributes.
396 // Have to be set when state is EHttpDlPaused/EHttpContentTypeReceived
398 EDlAttrAuthScheme = 200, /**< Scheme of authentication.
399 * See THttpAuthenticationScheme!
400 * (TInt - read/write. Write is accepted only if EDlAttrContinue is ETrue) */
402 EDlAttrRealm, /**< Realm of the HTTP authentication
403 * (String8<KMaxRealmLength> - read/write.
404 * Write is accepted only if EDlAttrContinue is ETrue) */
406 EDlAttrUsername, /**< User name.
407 * (String8 - read/write) */
409 EDlAttrPassword, /**< Password.
410 * (String8 - write-only) */
412 EDlAttrProxyRealm, /**< Realm of the proxy authentication.
413 * (String8<KMaxRealmLength> - read/write.
414 * Write is accepted only if EDlAttrContinue is ETrue) */
416 EDlAttrProxyUsername, /**< User name for proxy authentication.
417 * (String8 - read/write) */
419 EDlAttrProxyPassword, /**< Password for proxy authentication.
420 * (String8 - write-only) */
423 // Miscellaneous download attributes
425 EDlAttrDestFilename, /**< Destination filename. Content will be
426 * moved/renamed here after download completed.
427 * Can be set only before Start and after
428 * download successfully completed.
429 * (String16<KMaxPath> - read/write) */
431 EDlAttrLength, /**< Full size of the content.
432 * (TInt32 - read/write.
433 * Write is accepted only if EDlAttrContinue is ETrue)
434 * (default: KDefaultContentLength - until content size is known) */
436 EDlAttrDownloadedSize, /**< Downloaded size of the content.
437 * (TInt32 - read-only) */
439 EDlAttrNoContentTypeCheck, /**< Content is downloaded w/o content type validation.
440 * (TBool - read/write)
441 * (default: EFalse) */
443 EDlAttrContinueBody, /**< In case of continue download, the client application
444 * can pass already received body data to download manager
445 * via this attribute. Note that if the download is not started this
446 * data is lost, because download manager doesn't persist it until that.
447 * It is because it's actually not surely known what the destination file
448 * size&name until that.
449 * (String8 - write only. Accepted only if EDlAttrContinue is ETrue)
450 * (String16 - write only. Accepted only if EDlAttrContinue is ETrue.
451 * 8bits data stream stored in 16bits descriptor.) */
453 EDlAttrDestRemovable, /**< Indicates that the content file is stored on
455 * (TBool - read-only) */
458 // Attributes to indicate error occured during download
460 EDlAttrStatusCode = 500, /**< Status code from response header
461 * (TInt32 - read-only) */
463 EDlAttrErrorId, /**< See THttpDownloadMgrError
464 * (TInt32 - read-only) */
466 EDlAttrGlobalErrorId, /**< Global error id
467 * (TInt32 - read-only) */
469 EDlAttrContentType, /**< Content type from response header
470 * (String8<KMaxContentTypeLength> - read/write.
471 * Write is accepted only if EDlAttrCodDownload is ETrue) */
473 EDlAttrTargetApp, /**< Target app that can open the content
474 * (TInt32 - read/write.
475 * Write is accepted only if EDlAttrContinue is ETrue) */
477 EDlAttrMediaType, /**< Media type from response header. See RFC2616.
478 * (String8<KMaxContentTypeLength> - read-only) */
479 EDlAttrMediaTypeBoundary, /**< Boundary attribute from media type.
480 * (String8<KMaxContentTypeLength> - read-only) */
482 EDlAttrAttachmentFileName,
487 EDlAttrDisconnectOnReset = 1000, /**< Automatic disconnection when Reset called.
488 * (TBool - read/write)
489 * (default: ETrue) */
491 EDlAttrDisconnectOnPause, /**< Automatic disconnection when Pause called.
492 * In progress state EHttpContentTypeReceived
493 * download is in paused state but connection is
495 * (TBool - read/write)
496 * (default: ETrue) */
500 EDlAttrAction, /**< See THttpDownloadMgrAction
501 * (TInt32 - read/write)
502 * (default: ELaunch ) */
504 EDlAttrRestartAction, /**< See THttpRestartActions
505 * (TInt32 - read/write)
506 * (default: ERestartIfExpired ) */
508 EDlAttrNoMedia, /**< ETrue if the media, on which the download is stored, is removed.
509 * A Reset clears this flag.
510 * (TBool - read only) */
512 EDlAttrContinue, /**< Indicates that download was started in
513 * client app but that doesn't handle it.
514 * Download is created with RHttpDownloadMgr::CreateClientSideDownloadL().
515 * (TBool - read-only)
516 * (default: EFalse) */
518 EDlAttrPausable, /**< If EFalse, download cannot be paused, or the
519 * content will be lost.
520 * (TBool - read-only)
521 * (default: ETrue) */
523 EDlAttrHidden, /**< If true download is NOT shows in the download
524 * list or in any way to the user.
525 * (TBool - read/write)
526 * (default: EFalse) */
528 EDlAttrSilent, /**< No progress events sent to the client application.
529 * Only exceptions are:
530 * EHttpDlInprogress - EHttpStarted
533 * (TBool - read/write)
534 * (default: EFalse) */
536 EDlAttrProgressive, /**< Indicates that this is a progressive download.
537 * (TBool - read/write)
538 * (default: EFalse) */
540 EDlAttrFotaPckgId, /**< Fota package ID.
541 * (TInt32 - read/write)
542 * (default: KDefaultFotaPckgId. Default means no FOTA download! ) */
544 EDlAttrDownloadNextUrl, /**< This attribute is not supported from 3.0!
545 * Beginning from 3.0, Download Manager never
546 * downloads the next-uri of OMA/COD downloads
547 * automatically, but forwards the next-uri to the
548 * client via MHttpDownloadMgrNextUriObserver,
549 * then the client can create a new download with
550 * the next-uri it has got, if it wants so. */
552 EDlAttrDownloadUpdatedDDUri,/**< If ETrue, updated DD URI is present in download descriptor.
553 * Start download with updatd DD URI.
554 * (TBool - read/write)
558 EDlAttrUpdatedDDUri, /**< Updated DD URI.
559 * (String8<KMaxUrlLength> - read/write
562 EDlAttrDDType, /**< Content type of the descriptor for OMA downloads.
563 * For HTTP this will be content type of the MO
564 * (String8<KMaxContentTypeLength> - read only.
567 /** Application can set and query raw header
568 * fields and values via these attributes.
569 * (String<KMaxGeneralHeaderFieldLength> - read/write) */
570 EDlAttrHeaderFields = 1500,
571 EDlAttrCharSet = EDlAttrHeaderFields, // Character Set
572 EDlAttrResponseCharSet = EDlAttrCharSet,
575 EDlAttrResponseLocation,
576 EDlAttrResponseRetryAfter,
577 EDlAttrResponseServer,
580 /** Request headers */
581 EDlAttrRequestAccept = 2000,
582 EDlAttrRequestAcceptCharSet,
583 EDlAttrRequestAcceptLanguage,
584 EDlAttrRequestExpect,
587 EDlAttrRequestMaxForwards,
588 EDlAttrRequestPragma,
589 EDlAttrRequestReferer,
590 EDlAttrRequestUserAgent,
593 /** Entity header fields */
594 EDlAttrEntityAllow = 2500,
595 EDlAttrEntityContentEncoding,
596 EDlAttrEntityContentLanguage,
597 EDlAttrEntityContentLocation,
598 EDlAttrEntityExpires,
599 EDlAttrEntityLastModified,
601 /** General header fields */
602 EDlAttrGeneralCacheControl = 3000,
604 EDlAttrGeneralPragma,
606 EDlAttrGeneralWarning,
608 /** Internally used attribute! Do NOT use! */
609 EDlAttrSucceeded = 8192,
610 /** Internally used attribute! Do NOT use! */
612 /** Internally used attribute! Do NOT use! */
615 EDlAttrCodDownload, /**< Indicates that it is an OMA DD downlad,
616 * and the content is downloaded by COD Handler.
617 * (TBool - read-only)
618 * (default: EFalse) */
620 /** Internally used attribute! Do NOT use! */
621 EDlAttrHashedMsgBody,
622 /** Internally used attribute! Do NOT use! */
624 /** Internally used attribute! Do NOT use! */
625 EDlAttrRedirectedTemporary,
626 /** Internally used attribute! Do NOT use! */
627 EDlAttrRedirectedPermanently,
628 /** Internally used attribute! Do NOT use! */
629 EDlAttrCodDescriptorAccepted,
630 /** Internally used attribute! Do NOT use! */
633 EDlAttrDiskBufferingSize,
634 /**< Indicates how large a buffer (in bytes) to
635 * use when writing this download to disk. A
636 * value of 0 indicates no buffering. */
638 /** Internally used attribute! Do NOT use! */
639 EDlAttrCodPdAvailable, /* This is introduced for OMA 2 (DD2). Indicates that progressive download is available
640 * in case if license element exists in the DD2 this attribute is set when the right obj
641 * is available and the Progressive download element is true.
642 * In case when the license element in not represented this attribute is set if
643 * the Progressive download element is true.
646 EDlAttrLocalFileName, /* This is introduced for OMA 2 (DD2).
647 * Local filename. Content will be
648 * moved from this location.
649 * This attribute should be set before the client sends the Move command
650 * (String16<KMaxPath> - read/write) */
652 /** Internally used attribute! Do NOT use! */
654 EDlAttrCodPausable, /**< Would update the server about Pausability of COD Download.
655 * This attribute is only used for COD downloads to update pause attibure in server
656 * (TBool - write only)
659 EDlAttrDdFileName, /** For storing DD File name. */
660 EDlAttrActiveDownload,
661 EDlAttrActivePlayedDownload,
662 EDlAttrNumMediaObjects,
663 EDlAttrMultipleMOLength,/**< specifies total length of all MOs for the download.
664 * (TInt32 - read/write. */
666 EDlAttrMultipleMODownloadedSize, /**< current downloaded size (the sum of downloaded size of all completed MOs. Completed MOs can be successful/failed/paused MOs). .
667 * (TInt32 - read-only) */
668 EDlAttrAlbumName /**< Name of the album. In case of non-album download, this is the download name.
669 * (String16<KMaxPath> - read-only) */
683 * Authentication scheme
685 enum THttpAuthenticationScheme
687 EAuthBasic, ///< Basic authentication scheme
688 EAuthDigest ///< Digest authentication scheme
692 * This attribute specifies what Download Manager do
693 * with the downloads on exit.
695 enum THttpDownloadMgrExitAction
697 EExitNothing, ///< Downloads remain intacted on exit (default).
698 EExitPause, ///< All downloads paused on exit.
699 EExitDelete ///< All downloads deleted on exit.
703 * The action to do when a download completes.
705 enum THttpDownloadMgrAction
708 * Do nothing when download completed.
712 * Automatically move content to the location pointed by EDlAttrDestFilename
716 * Automatically lauch target application when download
717 * completed. This is the default if not set (default).
721 * Automatically lauch progressive download
729 enum THttpRestartActions
731 ERestartIfExpired, /**< Download content again if content is expired (default). */
732 ERestartNoIfCompleted, /**< (Re)Start completes with EHttpDlCompleted at
733 * once if already completed.
734 * Anyway starts to download the content only if it's
735 * not modified since last partial download.
736 * Restarted anyway. No content update/expiry check. */
737 ERestartForced /**< Forced download. Don't matter if content is
738 * expired, or not. */
742 * Allocated usable error range: -30421 -> -30470 (includes the 1st and last numbers).
744 enum THttpDownloadMgrError
747 EGeneral = -30421, ///< Non-download specific error. See global error code.
748 EInternal = -30422, /**< Internal error occured. Most probably a programming error.
749 * (e.g. download that is stored on a media, that is not present
750 * in the phone, cannot be started) */
751 EContentFileIntegrity = -30423, /**< Content file is missing or has different size then
752 * it should be. EDlAttrNoMedia is ETrue if the media, on which
753 * content file was (partially) stored, removed. */
754 EDiskFull = -30424, ///< Not enough disk space for the content
755 EConnectionFailed = -30425, /**< Most probably IAP id was wrong or no network coverage.
756 * For more specific info about the error see EDlAttrGlobalErrorId. */
757 ETransactionFailed = -30426, /**< Error occured in the transaction.
758 * For more specific info about the error see EDlAttrGlobalErrorId. */
759 EMoveFailed = -30427, /**< Moving content file failed.
760 * See EDlAttrGlobalErrorId for specific reason. */
761 EDestFileWriteFailed = -30428, ///< Destination file write failed.
762 EMMCRemoved = -30429, ///< MMC card, where th download is being persisted, removed.
763 EBadUrl = -30430, /**< Download Manager cannot handle this URL:
767 // Download attributes related error
769 EWrongDestFilename = -30431,
770 ///< Error in destination filename. Most probably not a real filename.
771 EDestFileInUse = -30432,
772 /**< Destination file cannot be opened/created. It's most probably
773 * in use by other app. or download. */
777 EHttpUnhandled = -30433,
778 /**< Unhandled HTTP error code. See it in
779 * EDlAttrGlobalErrorId. */
780 EHttpAuthenticationFailed = -30434,
781 /**< 401 - Client has to set username/password
782 * and Start download again. */
783 EProxyAuthenticationFailed = -30435,
784 /**< 407 - Client has to set proxy
785 * username/password and Start download again. */
786 EObjectNotFound = -30436,
787 /**< 404 - Object not found. */
788 EPartialContentModified = -30437,
789 /**< 412: partial content cannot be downloaded because
790 * it's already modified.
791 * Call Reset or set THttpRestartActions::ERestartForced */
793 EContentExpired = -30438,
794 /**< Paused content is expired, or content
795 * is modified between two requests.
796 * Call Reset() or see THttpRestartActions. */
798 // miscellaneous errors
799 EHttpRestartFailed = -30450 /**< Resuming progressive download failed. */
802 #endif // HTTPDOWNLOADMGRCOMMON_H