|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HTTPLOADERDEFS_H |
|
19 #define HTTPLOADERDEFS_H |
|
20 |
|
21 // Encoding |
|
22 // IMPORTANT: Sync with \browser\settingsinc\settingscontainer.h |
|
23 // The order of these enums can NOT be changed |
|
24 enum TEncoding |
|
25 { |
|
26 EGb2312, |
|
27 EISO8859_1, |
|
28 EBig5, |
|
29 EUTF8, |
|
30 EISO8859_2, |
|
31 EISO8859_4, |
|
32 EISO8859_5, |
|
33 EISO8859_7, |
|
34 EISO8859_9, |
|
35 EISO8859_8i, |
|
36 EISO8859_8, |
|
37 EISO8859_6, |
|
38 EISO8859_15, |
|
39 EWindows1256, |
|
40 EWindows1255, |
|
41 EWindows1250, |
|
42 EWindows1251, |
|
43 EWindows1252, |
|
44 EWindows1253, |
|
45 EWindows1254, |
|
46 EWindows1257, |
|
47 EAutomatic, |
|
48 EISO10646_UCS_2, |
|
49 ETis620, |
|
50 EShiftJis, |
|
51 EJisX0201_1997, |
|
52 EJisX0208_1997, |
|
53 EEucJp, |
|
54 EIso2022Jp, |
|
55 EWindows874, |
|
56 EDummyLast |
|
57 }; |
|
58 |
|
59 enum TUrlCacheMode |
|
60 { |
|
61 ECacheNormal, // Normal Http load, use cache if not stale |
|
62 ECacheHistPrev, // History Prev load, use cache even if stale unless must-revalidate |
|
63 ECacheNoCache, // Do not use cache, even if fresh |
|
64 ECacheOnlyCache // Only load from cache, for loading saved deck |
|
65 } ; |
|
66 |
|
67 // HTTP Default Headers |
|
68 enum TUrlDefaultHeaderType |
|
69 { |
|
70 EDefaultHeadersNotAny = 0x00, |
|
71 EDefaultHeadersContent = 0x01, |
|
72 EDefaultHeadersCharset = 0x02, |
|
73 EDefaultHeadersLang = 0x04, |
|
74 EDefaultHeadersAll = 0x07 |
|
75 }; |
|
76 |
|
77 // These types are for optimized accept headers |
|
78 enum TUrlLoadType |
|
79 { |
|
80 EUrlRequestTypeAny, // Any type |
|
81 EUrlRequestTypeImage, // Load an image type |
|
82 EUrlRequestTypeCss, // Load a stylesheet type |
|
83 EUrlRequestTypeJavaScript, // JavaScript type |
|
84 EUrlRequestTypePlugin, // Load plugin resource |
|
85 EUrlRequestTypeNone // No content types - related to WMLSCRIPT |
|
86 }; |
|
87 |
|
88 enum TUrlLoadMethod |
|
89 { |
|
90 EUrlGet, // get |
|
91 EUrlPost, // post |
|
92 EUrlHead // head |
|
93 }; |
|
94 |
|
95 enum THttpStatus |
|
96 { |
|
97 ESuccess = 200, |
|
98 ECreated = 201, |
|
99 EAccepted = 202, |
|
100 ENonAuthInfo = 203, |
|
101 ENoContent = 204, |
|
102 EResetContent = 205, |
|
103 EPartialContent = 206 |
|
104 }; |
|
105 |
|
106 #define KBrowserFailure -26000 |
|
107 #define KBrowserFileNotFound -26003 |
|
108 #define KBrowserFileWriteError -26008 |
|
109 #define KBrowserFileDiskFullError -26009 |
|
110 #define KBrowserOutOfMemory -26011 |
|
111 #define KBrowserUnexpectedError -26012 |
|
112 #define KBrowserNotImplemented -26013 |
|
113 #define KBrowserWaitTimeout -26014 |
|
114 #define KBrowserBufferTooSmall -26015 |
|
115 #define KBrowserBadInputParam -26016 |
|
116 #define KBrowserMissingInputParam -26017 |
|
117 #define KBrowserMalformedUrl -26018 |
|
118 #define KBrowserNotFound -26021 |
|
119 #define KBrowserBufferEnd -26022 |
|
120 #define KBrowserIterateMore -26023 |
|
121 #define KBrowserIterateDone -26024 |
|
122 #define KBrowserUnknownScheme -26026 |
|
123 #define KBrowserBadRedirect -26027 |
|
124 #define KBrowserTooManyRedirects -26028 |
|
125 #define KBrowserHttpStatus -26035 |
|
126 #define KBrowserMissingAuthHeader -26037 |
|
127 #define KBrowserCancelled -26038 |
|
128 #define KBrowserWpsaNoActiveTransactions -26067 |
|
129 #define KBrowserNoContentLength -26068 |
|
130 #define KBrowserTransactionCompete -26069 |
|
131 #define KBrowserWimiInvalidPin -26072 |
|
132 #define KBrowserWimiPinBlocked -26073 |
|
133 #define KBrowserWimiNoCard -26075 |
|
134 #define KBrowserWimiNoInit -26084 |
|
135 #define KBrowserWimiBadCert -26085 |
|
136 #define KBrowserWimiWimErr -26089 |
|
137 #define KBrowserWimiSessionNotSet -26090 |
|
138 #define KBrowserWimiCertNotFound -26091 |
|
139 #define KBrowserWimiKeyNotFound -26092 |
|
140 #define KBrowserWimiDuplicateCert -26093 |
|
141 #define KBrowserWtlsHandshakeFail -26102 |
|
142 #define KBrowserWtlsUnknowCertAuth -26110 |
|
143 #define KBrowserWtlsUcNotYetValid -26111 |
|
144 #define KBrowserWtlsUcExpired -26112 |
|
145 #define KBrowserWtlsUnsupCert -26114 |
|
146 #define KBrowserWtlsDecodeFail -26116 |
|
147 #define KBrowserScriptCardNotInDeck -26131 |
|
148 #define KBrowserScriptNoAccess -26132 |
|
149 #define KBrowserScriptBadContent -26133 |
|
150 #define KBrowserScriptErrorUserExit -26134 |
|
151 #define KBrowserScriptErrorUserAbort -26135 |
|
152 #define KBrowserScriptErrorStackUnderflow -26136 |
|
153 #define KBrowserScriptErrorStackOverflow -26137 |
|
154 #define KBrowserScriptFatalLibFuncError -26138 |
|
155 #define KBrowserScriptInvalidFuncArgs -26139 |
|
156 #define KBrowserScriptVerificationFailed -26140 |
|
157 #define KBrowserScriptExternalFunctionNotFound -26141 |
|
158 #define KBrowserScriptUnableToLoadCompilationUnit -26142 |
|
159 #define KBrowserScriptAccessViolation -26143 |
|
160 #define KBrowserWmlbrowserCardNotInDeck -26144 |
|
161 #define KBrowserWmlbrowserNoAccess -26145 |
|
162 #define KBrowserBadContent -26146 |
|
163 #define KBrowserBadContentType -26148 |
|
164 #define KBrowserWmlbrowserInputNonconformingToMask -26149 |
|
165 #define KBrowserWmlbrowserOnPickEx -26150 |
|
166 #define KBrowserXhtmlBadContent -26151 |
|
167 #define KBrowserCryptoUserCancel -26152 |
|
168 #define KBrowserCryptoNoCert -26153 |
|
169 #define KBrowserUnsupportedFormCharset -26156 |
|
170 #define KBrowserScrproxyScrAbort -26163 |
|
171 #define KBrowserScrproxyScrBusy -26164 |
|
172 #define KBrowserScrproxyScrNotResponding -26165 |
|
173 #define KBrowserWaeNavigationCancelled -26167 |
|
174 #define KBrowserConnCancelled -26172 |
|
175 #define KBrowserConnFailed -26173 |
|
176 #define KBrowserLmgrConstraintTooSmall -26189 |
|
177 #define KBrowserLmgrNotConstrained -26190 |
|
178 #define KBrowserLmgrFormatOverflow -26191 |
|
179 #define KBrowserLmgrSplitOk -26192 |
|
180 #define KBrowserLmgrNoSplit -26194 |
|
181 #define KBrowserLmgrNotClear -26196 |
|
182 #define KBrowserDomNoStringReturned -26199 |
|
183 #define KBrowserDomNodeTypeErr -26200 |
|
184 #define KBrowserDomNoValuePrefix -26201 |
|
185 #define KBrowserWbxmlErrorBytecode -26202 |
|
186 #define KBrowserWbxmlErrorCharsetUnsupported -26203 |
|
187 #define KBrowserHedNoCurrentHistEntry -26211 |
|
188 #define KBrowserHedNoPreviousHistEntry -26212 |
|
189 #define KBrowserHedNoNextHistEntry -26213 |
|
190 #define KBrowserHedContentDispatched -26215 |
|
191 #define KBrowserTcpHostUnreachable -26223 |
|
192 #define KBrowserSavedPageFailed -26224 |
|
193 #define KBrowserRestartParsing -26225 |
|
194 #define KBrowserMvcConverterNotFound -26226 |
|
195 #define KBrowserContinue -26227 |
|
196 #define KBrowserLastErrorCode -26999 |
|
197 |
|
198 // HTTP status codes |
|
199 #define KBrowserHTTP100 -25100 |
|
200 #define KBrowserHTTP101 -25101 |
|
201 #define KBrowserHTTP102 -25102 |
|
202 #define KBrowserHTTP200 -25200 |
|
203 #define KBrowserHTTP201 -25201 |
|
204 #define KBrowserHTTP202 -25202 |
|
205 #define KBrowserHTTP203 -25203 |
|
206 #define KBrowserHTTP204 -25204 |
|
207 #define KBrowserHTTP205 -25205 |
|
208 #define KBrowserHTTP206 -25206 |
|
209 #define KBrowserHTTP300 -25300 |
|
210 #define KBrowserHTTP301 -25301 |
|
211 #define KBrowserHTTP302 -25302 |
|
212 #define KBrowserHTTP303 -25303 |
|
213 #define KBrowserHTTP304 -25304 |
|
214 #define KBrowserHTTP305 -25305 |
|
215 #define KBrowserHTTP400 -25400 |
|
216 #define KBrowserHTTP401 -25401 |
|
217 #define KBrowserHTTP402 -25402 |
|
218 #define KBrowserHTTP403 -25403 |
|
219 #define KBrowserHTTP404 -25404 |
|
220 #define KBrowserHTTP405 -25405 |
|
221 #define KBrowserHTTP406 -25406 |
|
222 #define KBrowserHTTP407 -25407 |
|
223 #define KBrowserHTTP408 -25408 |
|
224 #define KBrowserHTTP409 -25409 |
|
225 #define KBrowserHTTP410 -25410 |
|
226 #define KBrowserHTTP411 -25411 |
|
227 #define KBrowserHTTP412 -25412 |
|
228 #define KBrowserHTTP413 -25413 |
|
229 #define KBrowserHTTP414 -25414 |
|
230 #define KBrowserHTTP415 -25415 |
|
231 #define KBrowserHTTP500 -25500 |
|
232 #define KBrowserHTTP501 -25501 |
|
233 #define KBrowserHTTP502 -25502 |
|
234 #define KBrowserHTTP503 -25503 |
|
235 #define KBrowserHTTP504 -25504 |
|
236 #define KBrowserHTTP505 -25505 |
|
237 |
|
238 #endif // HTTPLOADERDEFS_H |