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