00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef HTTPDOWNLOADMGRCOMMON_H
00023 #define HTTPDOWNLOADMGRCOMMON_H
00024
00025
00026 #include <e32base.h>
00027
00028
00029 const TInt KMaxUrlLength = 2048;
00030 const TInt KMaxChunkSize = 4096;
00031 const TUint KMaxDefAttrLength = 32;
00032 const TUint KMaxRealmLength = 128;
00033 const TUint KMaxContentTypeLength = 256;
00034 const TUint KMaxDispositionTypeLength = 256;
00035 const TInt32 KDefaultPort = 80;
00036 const TInt32 KDefaultContentLength = -1;
00037 const TUint KMaxGeneralHeaderFieldLength = 256;
00039 const TInt KHashLength = 32;
00041 const TInt KRawHashLength = 16;
00043 const TInt32 KDefaultFotaPckgId = -1;
00045 const TInt32 KNonMoIndex = 0;
00047 const TInt32 KFirstMoIndex = 1;
00048
00049 const TInt KColon( ':' );
00050 const TInt KSemiColon( ';' );
00051 const TInt KQuote( '"' );
00052 const TInt KEqual( '=' );
00053
00054 _LIT8( KHttpFieldSeparator, "\n");
00055 _LIT8( KHttpDispositionTypeAttachment, "attachment");
00056 _LIT8( KHttpDispositionTypeInline, "inline");
00057 _LIT8( KHttpFileNameParm, "filename");
00058
00060 _LIT8( KCodMimeType, "text/x-co-desc" );
00062 _LIT8( KDdMimeType, "application/vnd.oma.dd+xml" );
00064 _LIT8( KDd2MimeType, "application/vnd.oma.dd2+xml" );
00065 _LIT8( KRoapMimeType, "application/vnd.oma.drm.roap-trigger+xml" );
00066
00068 _LIT8( KFotaPackageDataType, "application/vnd.nokia.swupd.dp2" );
00069
00071 _LIT8( KMultiPartMimeType, "multipart/related" );
00072
00074 _LIT8( KDrmMessageMimeType, "application/vnd.oma.drm.message" );
00076 _LIT8( KDrmMessageMimeTypeDrmContent, "application/vnd.oma.drm.content" );
00078 _LIT8( KDrmMessageMimeTypeDrmDcf, "application/vnd.oma.drm.dcf" );
00079
00081 _LIT8( KRoapPduMimeType, "application/vnd.oma.drm.roap-pdu+xml" );
00082
00088 enum THttpDownloadState
00089 {
00090 EHttpDlCreated = 1,
00091 EHttpDlInprogress,
00092 EHttpDlPaused,
00093 EHttpDlCompleted,
00094 EHttpDlFailed,
00095
00097 EHttpDlMoved,
00099 EHttpDlMediaRemoved,
00105 EHttpDlMediaInserted,
00108 EHttpDlPausable,
00110 EHttpDlNonPausable,
00112 EHttpDlDeleted,
00114 EHttpDlAlreadyRunning,
00116 EHttpDlDeleting,
00118 EHttpDlNonPausableNetworkLoss,
00119 EHttpDlMultipleMOStarted,
00120 EHttpDlMultipleMOCompleted,
00121 EHttpDlMultipleMOFailed,
00123 EHttpDlCancelTransaction = 128
00124 };
00125
00131 enum THttpProgressState
00132 {
00133 EHttpProgNone = 0,
00134
00135 EHttpStarted = 500,
00136
00137 EHttpProgCreatingConnection = 1000,
00138 EHttpProgConnectionNeeded = 1010,
00139 EHttpProgConnected = 1020,
00140
00141 EHttpProgConnectionSuspended = 1022,
00142
00143 EHttpProgDisconnected = 1030,
00144
00145 EHttpProgDownloadStarted = 2000,
00146 EHttpContentTypeRequested = EHttpProgDownloadStarted + 20,
00147
00152 EHttpContentTypeReceived,
00153
00154 EHttpProgSubmitIssued = EHttpProgDownloadStarted + 30,
00155
00156 EHttpProgResponseHeaderReceived = 2050,
00157 EHttpProgResponseBodyReceived,
00158 EHttpProgRedirectedPermanently,
00159 EHttpProgRedirectedTemporarily,
00160 EHttpProgDlNameChanged,
00161 EHttpProgContentTypeChanged,
00162
00164 EHttpProgCodDescriptorDownloaded = 2500,
00166 EHttpProgCodDownloadStarted,
00168 EHttpProgCodDescriptorAccepted,
00172 EHttpProgCodLoadEnd,
00173 EHttpProgSupportedMultiPart,
00174
00175 EHttpProgCodPdAvailable,
00176 EHttpProgCodDownloadShouldResume,
00177 EHttpProgCodDownloadPause,
00178
00179 EHttpProgMovingContentFile = 3000,
00180 EHttpProgContentFileMoved,
00181
00182
00183
00184 EHttpContTypeRecognitionAvail,
00185
00186
00187
00188 EHttpProgContentFileMovedAndDestFNChanged,
00189
00190
00191 EHttpDlProgProgressive,
00192
00193
00194 EHttpDlProgNonProgressive
00195 };
00196
00207 enum THttpDownloadMgrAttrib
00208 {
00209 EDlMgrAppUid,
00213 EDlMgrIap,
00217 EDlMgrExitAction,
00221 EDlMgrSilentMode,
00226 EDlMgrMaster,
00235 EDlMgrAllDlsInMaster,
00239 EDlMgrNoMediaDlsInMaster,
00244 EDlMgrConnectionName,
00253 EDlMgrAPName,
00258 EDlMgrNumInprogressDownloads,
00262 EDlMgrConnected,
00265 EDlMgrNoMediaDls,
00269 EDlMgrEnableCookies,
00274 EDlAutoConnect,
00280 EDlMgrAutoConnect = EDlAutoConnect,
00281
00282 EDlMgrFotaDownload,
00287 EDlMgrCodFolder,
00290 EDlMgrNumOfClientSideDownload,
00293 EDlMgrHasActiveDownloads,
00297 EDlMgrAutoAcceptCod,
00300 EDlMgrProgressiveDownload
00304 };
00305
00314 enum THttpDownloadAttrib
00315 {
00316
00317 EDlAttrState,
00320 EDlAttrProgressState,
00323 EDlAttrUserData,
00326 EDlAttrId,
00329
00330
00331
00332 EDlAttrReqUrl = 100,
00335 EDlAttrRedirUlr,
00339 EDlAttrRedirUrl = EDlAttrRedirUlr,
00340
00341 EDlAttrCurrentUrl,
00345 EDlAttrName,
00350 EDlAttrPort,
00354 EDlAttrMethod,
00357 EDlAttrRequestHeaderAddon,
00367 EDlAttrNextBodyData,
00371 EDlAttrReleaseBodyData,
00378 EDlAttrRedirected,
00386 EDlAttrResponseHeader,
00392 EDlAttrRequestHeaderAddonLength,
00396
00397
00398
00399
00400 EDlAttrAuthScheme = 200,
00404 EDlAttrRealm,
00408 EDlAttrUsername,
00411 EDlAttrPassword,
00414 EDlAttrProxyRealm,
00418 EDlAttrProxyUsername,
00421 EDlAttrProxyPassword,
00424
00425
00426
00427 EDlAttrDestFilename,
00433 EDlAttrLength,
00438 EDlAttrDownloadedSize,
00441 EDlAttrNoContentTypeCheck,
00445 EDlAttrContinueBody,
00455 EDlAttrDestRemovable,
00459
00460
00461
00462 EDlAttrStatusCode = 500,
00465 EDlAttrErrorId,
00468 EDlAttrGlobalErrorId,
00471 EDlAttrContentType,
00475 EDlAttrTargetApp,
00479 EDlAttrMediaType,
00481 EDlAttrMediaTypeBoundary,
00484 EDlAttrAttachmentFileName,
00485
00486
00487
00488
00489 EDlAttrDisconnectOnReset = 1000,
00493 EDlAttrDisconnectOnPause,
00500 EDlAttrUnused1,
00501
00502 EDlAttrAction,
00506 EDlAttrRestartAction,
00510 EDlAttrNoMedia,
00514 EDlAttrContinue,
00520 EDlAttrPausable,
00525 EDlAttrHidden,
00530 EDlAttrSilent,
00538 EDlAttrProgressive,
00542 EDlAttrFotaPckgId,
00546 EDlAttrDownloadNextUrl,
00554 EDlAttrDownloadUpdatedDDUri,
00560 EDlAttrUpdatedDDUri,
00564 EDlAttrDDType,
00572 EDlAttrHeaderFields = 1500,
00573 EDlAttrCharSet = EDlAttrHeaderFields,
00574 EDlAttrResponseCharSet = EDlAttrCharSet,
00575 EDlAttrResponseAge,
00576 EDlAttrResponseETag,
00577 EDlAttrResponseLocation,
00578 EDlAttrResponseRetryAfter,
00579 EDlAttrResponseServer,
00580 EDlAttrResponseVary,
00581
00583 EDlAttrRequestAccept = 2000,
00584 EDlAttrRequestAcceptCharSet,
00585 EDlAttrRequestAcceptLanguage,
00586 EDlAttrRequestExpect,
00587 EDlAttrRequestFrom,
00588 EDlAttrRequestHost,
00589 EDlAttrRequestMaxForwards,
00590 EDlAttrRequestPragma,
00591 EDlAttrRequestReferer,
00592 EDlAttrRequestUserAgent,
00593 EDlAttrRequestVary,
00594
00596 EDlAttrEntityAllow = 2500,
00597 EDlAttrEntityContentEncoding,
00598 EDlAttrEntityContentLanguage,
00599 EDlAttrEntityContentLocation,
00600 EDlAttrEntityExpires,
00601 EDlAttrEntityLastModified,
00602
00604 EDlAttrGeneralCacheControl = 3000,
00605 EDlAttrGeneralDate,
00606 EDlAttrGeneralPragma,
00607 EDlAttrGeneralVia,
00608 EDlAttrGeneralWarning,
00609
00611 EDlAttrSucceeded = 8192,
00613 EDlAttUnused2,
00615 EDlAttrFailed,
00616
00617 EDlAttrCodDownload,
00623 EDlAttrHashedMsgBody,
00625 EDlAttrDefaultEvent,
00627 EDlAttrRedirectedTemporary,
00629 EDlAttrRedirectedPermanently,
00631 EDlAttrCodDescriptorAccepted,
00633 EDlAttrCodLoadEnd,
00634
00635 EDlAttrDiskBufferingSize,
00641 EDlAttrCodPdAvailable,
00642
00643
00644
00645
00646
00647
00648 EDlAttrLocalFileName,
00649
00650
00651
00652
00653
00656 EDlAttrCodPausable,
00661 EDlAttrDdFileName,
00662 EDlAttrActiveDownload,
00663 EDlAttrActivePlayedDownload,
00664 EDlAttrNumMediaObjects,
00665 EDlAttrMultipleMOLength,
00668 EDlAttrMultipleMODownloadedSize,
00670 EDlAttrAlbumName
00672 };
00673
00677 enum THttpMethod
00678 {
00679 EMethodGET,
00680 EMethodPOST,
00681 EMethodHEAD
00682 };
00683
00687 enum THttpAuthenticationScheme
00688 {
00689 EAuthBasic,
00690 EAuthDigest
00691 };
00692
00697 enum THttpDownloadMgrExitAction
00698 {
00699 EExitNothing,
00700 EExitPause,
00701 EExitDelete
00702 };
00703
00707 enum THttpDownloadMgrAction
00708 {
00712 EDoNothing = 0,
00716 EMove = 0x0001,
00721 ELaunch = 0x0002,
00725 EPdLaunch = 0x0004
00726 };
00727
00731 enum THttpRestartActions
00732 {
00733 ERestartIfExpired,
00734 ERestartNoIfCompleted,
00739 ERestartForced
00741 };
00742
00746 enum THttpDownloadMgrError
00747 {
00748 ENoError = 0,
00749 EGeneral = -30421,
00750 EInternal = -30422,
00753 EContentFileIntegrity = -30423,
00756 EDiskFull = -30424,
00757 EConnectionFailed = -30425,
00759 ETransactionFailed = -30426,
00761 EMoveFailed = -30427,
00763 EDestFileWriteFailed = -30428,
00764 EMMCRemoved = -30429,
00765 EBadUrl = -30430,
00769
00770
00771 EWrongDestFilename = -30431,
00773 EDestFileInUse = -30432,
00777
00778
00779 EHttpUnhandled = -30433,
00782 EHttpAuthenticationFailed = -30434,
00785 EProxyAuthenticationFailed = -30435,
00788 EObjectNotFound = -30436,
00790 EPartialContentModified = -30437,
00795 EContentExpired = -30438,
00800
00801 EHttpRestartFailed = -30450
00802 };
00803
00804 #endif // HTTPDOWNLOADMGRCOMMON_H
00805
00806