1.1 --- a/epoc32/include/httperr.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/httperr.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,882 @@
1.4 -httperr.h
1.5 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +
1.21 +
1.22 +/**
1.23 + @file httperr.h
1.24 + @warning : This file contains Rose Model ID comments - please do not delete
1.25 +*/
1.26 +
1.27 +#ifndef __HTTPERR_H__
1.28 +#define __HTTPERR_H__
1.29 +
1.30 +// System includes
1.31 +#include <e32std.h>
1.32 +
1.33 +//##ModelId=3C4C18750141
1.34 +class HTTPStatus
1.35 +/**
1.36 +The complete set of HTTP Status codes, as defined in RFC2616.
1.37 +@publishedAll
1.38 +@released
1.39 +*/
1.40 + {
1.41 +public:
1.42 + enum
1.43 + {
1.44 + /** 'Informational' range of codes 1xx
1.45 + */
1.46 + /** Continue.
1.47 + */
1.48 + EContinue = 100,
1.49 + /** Switching Protocols.
1.50 + */
1.51 + ESwitchingProtocols = 101,
1.52 + /** 'Successful' range of codes 2xx
1.53 + */
1.54 + /** Ok.
1.55 + */
1.56 + EOk = 200,
1.57 + /** Created.
1.58 + */
1.59 + ECreated = 201,
1.60 + /** The entry has been accepted.
1.61 + */
1.62 + EAccepted = 202,
1.63 + /** Non-Authoritative Information.
1.64 + */
1.65 + ENonAuthoritativeInfo = 203,
1.66 + /** No Content.
1.67 + */
1.68 + ENoContent = 204,
1.69 + /** Reset Content.
1.70 + */
1.71 + EResetContent = 205,
1.72 + /** Partial Content.
1.73 + */
1.74 + EPartialContent = 206,
1.75 + /** 'Redirection' range of codes 3xx
1.76 + */
1.77 + /** Multiple Choices.
1.78 + */
1.79 + EMultipleChoices = 300,
1.80 + /** Moved Permanently.
1.81 + */
1.82 + EMovedPermanently = 301,
1.83 + /** Found.
1.84 + Note, this is deprecated in HTTP/1.1 - 307 will be used instead
1.85 + */
1.86 + EFound = 302,
1.87 + /** See Other.
1.88 + */
1.89 + ESeeOther = 303,
1.90 + /** Not Modified.
1.91 + */
1.92 + ENotModified = 304,
1.93 + /** Use Proxy.
1.94 + */
1.95 + EUseProxy = 305,
1.96 + /** Unused.
1.97 + */
1.98 + EUnused = 306,
1.99 + /** Temporary Redirect.
1.100 + */
1.101 + ETemporaryRedirect = 307,
1.102 + /** 'Client Error' range of codes 4xx
1.103 + */
1.104 + /** Bad Request.
1.105 + */
1.106 + EBadRequest = 400,
1.107 + /** Unauthorized.
1.108 + */
1.109 + EUnauthorized = 401,
1.110 + /** Payment Required. Note, this is reserved in HTTP/1.1
1.111 + */
1.112 + EPaymentRequired = 402,
1.113 + /** Forbidden.
1.114 + */
1.115 + EForbidden = 403,
1.116 + /** Not Found.
1.117 + */
1.118 + ENotFound = 404,
1.119 + /** Method Not Allowed.
1.120 + */
1.121 + EMethodNotAllowed = 405,
1.122 + /** Not Acceptable.
1.123 + */
1.124 + ENotAcceptable = 406,
1.125 + /** Proxy Authentication Required.
1.126 + */
1.127 + EProxyAuthenticationRequired = 407,
1.128 + /** Request Timeout.
1.129 + */
1.130 + ERequestTimeout = 408,
1.131 + /** Conflict.
1.132 + */
1.133 + EConflict = 409,
1.134 + /** Gone.
1.135 + */
1.136 + EGone = 410,
1.137 + /** Length Required.
1.138 + */
1.139 + ELengthRequired = 411,
1.140 + /** Precondition Failed.
1.141 + */
1.142 + EPreconditionFailed = 412,
1.143 + /** Request Entity Too Large.
1.144 + */
1.145 + ERequestEntityTooLarge = 413,
1.146 + /** Request-URI Too Long.
1.147 + */
1.148 + ERequestURITooLong = 414,
1.149 + /** Unsupported Media Type.
1.150 + */
1.151 + EUnsupportedMediaType = 415,
1.152 + /** Requested Range Not Satisfiable.
1.153 + */
1.154 + ERequestedRangeNotSatisfiable = 416,
1.155 + /** Expectation Failed.
1.156 + */
1.157 + EExpectationFailed = 417,
1.158 + /** 'Server Error' range of codes 5xx
1.159 + */
1.160 + /** Internal Server Error.
1.161 + */
1.162 + EInternalServerError = 500,
1.163 + /** Not Implemented.
1.164 + */
1.165 + ENotImplemented = 501,
1.166 + /** Bad Gateway.
1.167 + */
1.168 + EBadGateway = 502,
1.169 + /** Service Unavailable.
1.170 + */
1.171 + EServiceUnavailable = 503,
1.172 + /** Gateway Timeout.
1.173 + */
1.174 + EGatewayTimeout = 504,
1.175 + /** HTTP Version Not Supported.
1.176 + */
1.177 + EHTTPVersionNotSupported = 505
1.178 + };
1.179 +
1.180 + /** Is the supplied status code in the 1xx Informational range?
1.181 + @param aStatus Is the supplied status code in the 1xx Informational range?
1.182 + @return ETrue if the specified status code is in the 1xx Informational range.
1.183 + ##ModelId=3C4C18750162
1.184 + */
1.185 + inline static TBool IsInformational(TInt aStatus);
1.186 +
1.187 +
1.188 + /** Is the supplied status code in the 2xx Successful range?
1.189 + @param aStatus Is the supplied status code in the 2xx Successful range?
1.190 + @return ETrue if the specified status code is in the 2xx Successful range
1.191 + ##ModelId=3C4C18750160
1.192 + */
1.193 + inline static TBool IsSuccessful(TInt aStatus);
1.194 +
1.195 + /** Is the supplied status code in the 3xx Redirection range?
1.196 + @param aStatus Is the supplied status code in the 3xx Redirection range?
1.197 + @return ETrue if the specified status code is in the 3xx Redirection range.
1.198 + ##ModelId=3C4C18750159
1.199 + */
1.200 + inline static TBool IsRedirection(TInt aStatus);
1.201 +
1.202 + /** Is the supplied status code in the 4xx Client Error range?
1.203 + @param aStatus Is the supplied status code in the 4xx Client Error range?
1.204 + @return ETrue if the specified status code is in the 4xx Client Error range.
1.205 + ##ModelId=3C4C18750157
1.206 + */
1.207 + inline static TBool IsClientError(TInt aStatus);
1.208 +
1.209 + /** Is the supplied status code in the 5xx Server Error range?
1.210 + @param aStatus Is the supplied status code in the 5xx Server Error range?
1.211 + @return ETrue if the specified status code is in the 5xx Server Error range.
1.212 + ##ModelId=3C4C18750155
1.213 + */
1.214 + inline static TBool IsServerError(TInt aStatus);
1.215 + };
1.216 +
1.217 +//
1.218 +// HTTP Panic codes
1.219 +//
1.220 +
1.221 +#include <e32base.h>
1.222 +
1.223 +// HTTPPanic::Panic(HTTPPanic:: )
1.224 +
1.225 +//##ModelId=3C4C18740352
1.226 +class HTTPPanic
1.227 +/**
1.228 +HTTP panic codes
1.229 +@publishedAll
1.230 +@released
1.231 +*/
1.232 + {
1.233 +public:
1.234 + enum THTTPPanic
1.235 + {
1.236 + /** RHTTPSession session is already open. ( Panic HTTP-CORE 0 )
1.237 + */
1.238 + ESessionAlreadyOpen,
1.239 + /** Specified field is missing. ( Panic HTTP-CORE 1 )
1.240 + */
1.241 + EHeaderFieldMissing,
1.242 + /** Unused. ( Panic HTTP-CORE 2 )
1.243 + */
1.244 + EHeaderParamMissing,
1.245 + /** Unused. ( Panic HTTP-CORE 2 )
1.246 + */
1.247 + EHeaderInvalidPart,
1.248 + /** Mismatch between header's type and its attempted use. ( Panic HTTP-CORE 4 )
1.249 + */
1.250 + EHeaderInvalidType,
1.251 + /** Unused. ( Panic HTTP-CORE 5 )
1.252 + */
1.253 + ETransactionEventOutstanding,
1.254 + /** A transaction error occurred, and the MHFRunError() in use didn't handle it. ( Panic HTTP-CORE 6 )
1.255 + */
1.256 + ETransactionUnhandledError,
1.257 + /** Attempted to add a filter while there is a transaction outstanding. ( Panic HTTP-CORE 6 )
1.258 + */
1.259 + EAddingFilterWithOutstandingTransactions,
1.260 + /** Attempted to add a filter at a position not between the protocol handler and the client. ( Panic HTTP-CORE 8 )
1.261 + */
1.262 + EFilterInvalidPosition,
1.263 + /** CHTTPEncoder object destroyed without its data being released. ( Panic HTTP-CORE 9 )
1.264 + */
1.265 + EHTTPFormDataUnreleased,
1.266 + /** CHTTPEncoder object at the wrong state for adding data. ( Panic HTTP-CORE 10 )
1.267 + */
1.268 + EHTTPFormSupplyingData,
1.269 + /** Unused. ( Panic HTTP-CORE 11 )
1.270 + */
1.271 + EValidationFilterFailure,
1.272 + /** Invalid request data. ( Panic HTTP-CORE 12 )
1.273 + */
1.274 + EInvalidTxData,
1.275 + /** Invalid response data. ( Panic HTTP-CORE 13 )
1.276 + */
1.277 + EInvalidRxData,
1.278 + /** Unused. ( Panic HTTP-CORE 14 )
1.279 + */
1.280 + ENoTransportHandlerSet,
1.281 + /** Unused. ( Panic HTTP-CORE 15 )
1.282 + */
1.283 + EAuthenticationFilterBadState,
1.284 + /** An invalid filter handle was specified. ( Panic HTTP-CORE 16 )
1.285 + */
1.286 + EInvalidFilterHandle
1.287 + };
1.288 +
1.289 + //##ModelId=3C4C18740366
1.290 + static void Panic(THTTPPanic aPanic);
1.291 + };
1.292 +
1.293 +// HTTP external errors/leave codes. Add new sub-ranges at the end; do not insert between the sub-ranges that
1.294 +// are already here. This is to allow a client to reasonably check for errors between two adjacent range
1.295 +// base values rather than check for individual codes.
1.296 +
1.297 +/**
1.298 +Base value for the HTTP error code range (-7200 to -7399)
1.299 +@publishedAll
1.300 +@released
1.301 +*/
1.302 +const TInt KHttpErrorBase = -7200;
1.303 +
1.304 +//
1.305 +// Text mode HTTP protocol handler
1.306 +//
1.307 +
1.308 +/**
1.309 +Codec encoding errors for HTTP headers
1.310 +@publishedAll
1.311 +@released
1.312 +*/
1.313 +const TInt KHttpHeaderEncodeErrorBase = KHttpErrorBase;
1.314 +
1.315 +/**
1.316 +Error making a default encoding of unrecognised headers
1.317 +@publishedAll
1.318 +@released
1.319 +*/
1.320 +const TInt KErrHttpEncodeDefault = KHttpHeaderEncodeErrorBase;
1.321 +/**
1.322 +Error encoding the Accept field
1.323 +@publishedAll
1.324 +@released
1.325 +*/
1.326 +const TInt KErrHttpEncodeAccept = KHttpHeaderEncodeErrorBase - 1;
1.327 +/**
1.328 +Error encoding the Accept-Charset field
1.329 +@publishedAll
1.330 +@released
1.331 +*/
1.332 +const TInt KErrHttpEncodeAcceptCharset = KHttpHeaderEncodeErrorBase - 2;
1.333 +/**
1.334 +Error encoding a q-value parameter
1.335 +@publishedAll
1.336 +@released
1.337 +*/
1.338 +const TInt KErrHttpEncodeQValue = KHttpHeaderEncodeErrorBase - 3;
1.339 +/**
1.340 +Error encoding the Authorization field
1.341 +@publishedAll
1.342 +@released
1.343 +*/
1.344 +const TInt KErrHttpEncodeAuthorization = KHttpHeaderEncodeErrorBase - 4;
1.345 +/**
1.346 +Error encoding Basic credentials
1.347 +@publishedAll
1.348 +@released
1.349 +*/
1.350 +const TInt KErrHttpEncodeBasicAuth = KHttpHeaderEncodeErrorBase - 5;
1.351 +/**
1.352 +Error encoding Digest credentials
1.353 +@publishedAll
1.354 +@released
1.355 +*/
1.356 +const TInt KErrHttpEncodeDigestAuth = KHttpHeaderEncodeErrorBase - 6;
1.357 +/**
1.358 +Error encoding the Connection field
1.359 +@publishedAll
1.360 +@released
1.361 +*/
1.362 +const TInt KErrHttpEncodeConnection = KHttpHeaderEncodeErrorBase - 7;
1.363 +/**
1.364 +Error encoding the Content-Length field
1.365 +@publishedAll
1.366 +@released
1.367 +*/
1.368 +const TInt KErrHttpEncodeContentLength = KHttpHeaderEncodeErrorBase - 8;
1.369 +/**
1.370 +Error encoding the Content-Type field
1.371 +@publishedAll
1.372 +@released
1.373 +*/
1.374 +const TInt KErrHttpEncodeContentType = KHttpHeaderEncodeErrorBase - 9;
1.375 +/**
1.376 +Error encoding the Host field
1.377 +@publishedAll
1.378 +@released
1.379 +*/
1.380 +const TInt KErrHttpEncodeHost = KHttpHeaderEncodeErrorBase - 10;
1.381 +/**
1.382 +Error encoding the Host field's port parameter
1.383 +@publishedAll
1.384 +@released
1.385 +*/
1.386 +const TInt KErrHttpEncodeHostPort = KHttpHeaderEncodeErrorBase - 11;
1.387 +/**
1.388 +Error encoding the Transfer-Encoding field
1.389 +@publishedAll
1.390 +@released
1.391 +*/
1.392 +const TInt KErrHttpEncodeTransferEncoding = KHttpHeaderEncodeErrorBase - 12;
1.393 +/**
1.394 +Error encoding the User-Agent field
1.395 +@publishedAll
1.396 +@released
1.397 +*/
1.398 +const TInt KErrHttpEncodeUserAgent = KHttpHeaderEncodeErrorBase - 13;
1.399 +/**
1.400 +Error encoding the Date field
1.401 +@publishedAll
1.402 +@released
1.403 +*/
1.404 +const TInt KErrHttpEncodeDate = KHttpHeaderEncodeErrorBase - 14;
1.405 +/**
1.406 +Error encoding the Cookie field
1.407 +@publishedAll
1.408 +@released
1.409 +*/
1.410 +const TInt KErrHttpEncodeCookie = KHttpHeaderEncodeErrorBase - 15;
1.411 +/**
1.412 +Error encoding the Cache-Control field
1.413 +@publishedAll
1.414 +@released
1.415 +*/
1.416 +const TInt KErrHttpEncodeCacheControl = KHttpHeaderEncodeErrorBase - 16;
1.417 +/**
1.418 +Error encoding the Pragma field
1.419 +@publishedAll
1.420 +@released
1.421 +*/
1.422 +const TInt KErrHttpEncodePragma = KHttpHeaderEncodeErrorBase - 17;
1.423 +/**
1.424 +Error encoding the if match field
1.425 +@publishedAll
1.426 +@released
1.427 +*/
1.428 +const TInt KErrHttpEncodeIfMatch = KHttpHeaderEncodeErrorBase - 18;
1.429 +/**
1.430 +Error encoding the if none match field
1.431 +@publishedAll
1.432 +@released
1.433 +*/
1.434 +const TInt KErrHttpEncodeIfNoneMatch = KHttpHeaderEncodeErrorBase - 19;
1.435 +/**
1.436 +Error encoding the if modified since field
1.437 +@publishedAll
1.438 +@released
1.439 +*/
1.440 +const TInt KErrHttpEncodeIfModifiedSince = KHttpHeaderEncodeErrorBase - 20;
1.441 +/**
1.442 +Error encoding the if unmodified since field
1.443 +@publishedAll
1.444 +@released
1.445 +*/
1.446 +const TInt KErrHttpEncodeIfUnmodifiedSince = KHttpHeaderEncodeErrorBase - 21;
1.447 +/**
1.448 +Error encoding the Cookie2 field
1.449 +@publishedAll
1.450 +@released
1.451 +*/
1.452 +const TInt KErrHttpEncodeCookie2 = KHttpHeaderEncodeErrorBase - 22;
1.453 +/**
1.454 +Error encoding the Content-Language field
1.455 +@publishedAll
1.456 +@released
1.457 +*/
1.458 +const TInt KErrHttpEncodeContentLanguage = KHttpHeaderEncodeErrorBase - 23;
1.459 +/**
1.460 +Error encoding the WWWAuthenticate field
1.461 +@publishedAll
1.462 +@released
1.463 +*/
1.464 +const TInt KErrHttpEncodeDoWWWAuthenticate = KHttpHeaderEncodeErrorBase - 24;
1.465 +/**
1.466 +Error encoding the Age field
1.467 +@publishedAll
1.468 +@released
1.469 +*/
1.470 +const TInt KErrHttpEncodeDoAge = KHttpHeaderEncodeErrorBase - 25;
1.471 +/**
1.472 +Error encoding the Vary field
1.473 +@publishedAll
1.474 +@released
1.475 +*/
1.476 +const TInt KErrHttpEncodeDoVary = KHttpHeaderEncodeErrorBase - 26;
1.477 +/**
1.478 +Error encoding the Content-Language field
1.479 +@publishedAll
1.480 +@released
1.481 +*/
1.482 +const TInt KErrHttpEncodeDoContentLanguage = KHttpHeaderEncodeErrorBase - 27;
1.483 +/**
1.484 +Error encoding the Content-Encoding field
1.485 +@publishedAll
1.486 +@released
1.487 +*/
1.488 +const TInt KErrHttpEncodeContentEncoding = KHttpHeaderEncodeErrorBase - 28;
1.489 +/**
1.490 +Error encoding the Content-Location field
1.491 +@publishedAll
1.492 +@released
1.493 +*/
1.494 +const TInt KErrHttpEncodeContentLocation = KHttpHeaderEncodeErrorBase - 29;
1.495 +/**
1.496 +Error encoding the Content-MD5 field
1.497 +@publishedAll
1.498 +@released
1.499 +*/
1.500 +const TInt KErrHttpEncodeContentMD5 = KHttpHeaderEncodeErrorBase - 30;
1.501 +/**
1.502 +Error encoding the Accept-Encoding field
1.503 +@publishedAll
1.504 +@released
1.505 +*/
1.506 +const TInt KErrHttpEncodeAcceptLanguage = KHttpHeaderEncodeErrorBase - 31;
1.507 +/**
1.508 +Error encoding the Accept-Language field
1.509 +@publishedAll
1.510 +@released
1.511 +*/
1.512 +const TInt KErrHttpEncodeAcceptEncoding = KHttpHeaderEncodeErrorBase - 32;
1.513 +/**
1.514 +Error encoding the TE field
1.515 +@publishedAll
1.516 +@released
1.517 +*/
1.518 +const TInt KErrHttpEncodeTE = KHttpHeaderEncodeErrorBase - 33;
1.519 +/**
1.520 +Error encoding the Upgrade field
1.521 +@publishedAll
1.522 +@released
1.523 +*/
1.524 +const TInt KErrHttpEncodeUpgrade = KHttpHeaderEncodeErrorBase - 34;
1.525 +
1.526 +/**
1.527 +Codec decoding errors for values found in HTTP headers
1.528 +@publishedAll
1.529 +@released
1.530 +*/
1.531 +const TInt KHttpValueDecodeErrorBase = KHttpErrorBase - 60;
1.532 +
1.533 +/**
1.534 +General formatting error for date values
1.535 +@publishedAll
1.536 +@released
1.537 +*/
1.538 +const TInt KErrHttpDecodeMalformedDate = KHttpValueDecodeErrorBase;
1.539 +/**
1.540 +Malformed year
1.541 +@publishedAll
1.542 +@released
1.543 +*/
1.544 +const TInt KErrHttpDecodeMalformedYear = KHttpValueDecodeErrorBase - 1;
1.545 +/**
1.546 +Malformed short month name
1.547 +@publishedAll
1.548 +@released
1.549 +*/
1.550 +const TInt KErrHttpDecodeMalformedMonth = KHttpValueDecodeErrorBase - 2;
1.551 +/**
1.552 +Malformed number of day in month
1.553 +@publishedAll
1.554 +@released
1.555 +*/
1.556 +const TInt KErrHttpDecodeMalformedDay = KHttpValueDecodeErrorBase - 3;
1.557 +/**
1.558 +Malformed short day name
1.559 +@publishedAll
1.560 +@released
1.561 +*/
1.562 +const TInt KErrHttpDecodeMalformedWkDay = KHttpValueDecodeErrorBase - 4;
1.563 +/**
1.564 +Malformed long day name
1.565 +@publishedAll
1.566 +@released
1.567 +*/
1.568 +const TInt KErrHttpDecodeMalformedWeekDay = KHttpValueDecodeErrorBase - 5;
1.569 +/**
1.570 +Malformed integer value
1.571 +@publishedAll
1.572 +@released
1.573 +*/
1.574 +const TInt KErrHttpDecodeMalformedInteger = KHttpValueDecodeErrorBase - 6;
1.575 +/**
1.576 +Malformed quoted string
1.577 +@publishedAll
1.578 +@released
1.579 +*/
1.580 +const TInt KErrHttpDecodeMalformedQuotedStr = KHttpValueDecodeErrorBase - 7;
1.581 +
1.582 +/**
1.583 +Codec decoding errors for HTTP headers
1.584 +@publishedAll
1.585 +@released
1.586 +*/
1.587 +const TInt KHttpHeaderDecodeErrorBase = KHttpErrorBase - 70;
1.588 +
1.589 +/**
1.590 +Error decoding the Accept field
1.591 +@publishedAll
1.592 +@released
1.593 +*/
1.594 +const TInt KErrHttpDecodeAccept = KHttpHeaderDecodeErrorBase;
1.595 +/**
1.596 +Error decoding the Connection field
1.597 +@publishedAll
1.598 +@released
1.599 +*/
1.600 +const TInt KErrHttpDecodeConnection = KHttpHeaderDecodeErrorBase - 1;
1.601 +/**
1.602 +Error decoding the Content-Length field
1.603 +@publishedAll
1.604 +@released
1.605 +*/
1.606 +const TInt KErrHttpDecodeContentLength = KHttpHeaderDecodeErrorBase - 2;
1.607 +/**
1.608 +Error decoding the Content-Type field
1.609 +@publishedAll
1.610 +@released
1.611 +*/
1.612 +const TInt KErrHttpDecodeContentType = KHttpHeaderDecodeErrorBase - 3;
1.613 +/**
1.614 +Error decoding the Transfer-Encoding field
1.615 +@publishedAll
1.616 +@released
1.617 +*/
1.618 +const TInt KErrHttpDecodeTransferEncoding = KHttpHeaderDecodeErrorBase - 4;
1.619 +/**
1.620 +Error decoding the WWWAuthenticate field
1.621 +@publishedAll
1.622 +@released
1.623 +*/
1.624 +const TInt KErrHttpDecodeWWWAuthenticate = KHttpHeaderDecodeErrorBase - 5;
1.625 +/**
1.626 +The WWWAuthenticate field contained an unrecognised authentication scheme
1.627 +@publishedAll
1.628 +@released
1.629 +*/
1.630 +const TInt KErrHttpDecodeUnknownAuthScheme = KHttpHeaderDecodeErrorBase - 6;
1.631 +/**
1.632 +Error decoding a Basic WWWAuthenticate challenge
1.633 +@publishedAll
1.634 +@released
1.635 +*/
1.636 +const TInt KErrHttpDecodeBasicAuth = KHttpHeaderDecodeErrorBase - 7;
1.637 +/**
1.638 +Error decoding a Digest WWWAuthenticate challenge
1.639 +@publishedAll
1.640 +@released
1.641 +*/
1.642 +const TInt KErrHttpDecodeDigestAuth = KHttpHeaderDecodeErrorBase - 8;
1.643 +/**
1.644 +Error decoding a Set-Cookie field
1.645 +@publishedAll
1.646 +@released
1.647 +*/
1.648 +const TInt KErrHttpDecodeCookie = KHttpHeaderDecodeErrorBase - 9;
1.649 +/**
1.650 +Error decoding the Authorization field
1.651 +@publishedAll
1.652 +@released
1.653 +*/
1.654 +const TInt KErrHttpDecodeAuthorization = KHttpHeaderDecodeErrorBase - 10;
1.655 +/**
1.656 +Error decoding the Accept-Charset field
1.657 +@publishedAll
1.658 +@released
1.659 +*/
1.660 +const TInt KErrHttpDecodeAcceptCharset = KHttpHeaderDecodeErrorBase - 11;
1.661 +/**
1.662 +Error decoding the Accept-Language field
1.663 +@publishedAll
1.664 +@released
1.665 +*/
1.666 +const TInt KErrHttpDecodeAcceptLanguage = KHttpHeaderDecodeErrorBase - 12;
1.667 +/**
1.668 +Error decoding the Accept-Encoding field
1.669 +@publishedAll
1.670 +@released
1.671 +*/
1.672 +const TInt KErrHttpDecodeAcceptEncoding = KHttpHeaderDecodeErrorBase - 13;
1.673 +/**
1.674 +Error decoding the TE field
1.675 +@publishedAll
1.676 +@released
1.677 +*/
1.678 +const TInt KErrHttpDecodeTE = KHttpHeaderEncodeErrorBase - 14;
1.679 +/**
1.680 +Error decoding the Expect field
1.681 +@publishedAll
1.682 +@released
1.683 +*/
1.684 +const TInt KErrHttpDecodeExpect = KHttpHeaderEncodeErrorBase - 15;
1.685 +/**
1.686 +Error decoding the Content-Disposition field
1.687 +@publishedAll
1.688 +@released
1.689 +*/
1.690 +const TInt KErrHttpDecodeContentDisposition = KHttpHeaderDecodeErrorBase - 14;
1.691 +/**
1.692 +Response errors. These represent specific failure cases
1.693 +@publishedAll
1.694 +@released
1.695 +*/
1.696 +const TInt KErrHttpResponseFailureBase = KHttpErrorBase - 100;
1.697 +
1.698 +/**
1.699 +A uri redirected too many times, possibly indicating a circular redirection
1.700 +@publishedAll
1.701 +@released
1.702 +*/
1.703 +const TInt KErrHttpRedirectExceededLimit = KErrHttpResponseFailureBase;
1.704 +/**
1.705 +A server responded that the uri must be fetched via a proxy
1.706 +@publishedAll
1.707 +@released
1.708 +*/
1.709 +const TInt KErrHttpRedirectUseProxy = KErrHttpResponseFailureBase - 1;
1.710 +/**
1.711 +A server sent a redirection response that did not include a Location header
1.712 +@publishedAll
1.713 +@released
1.714 +*/
1.715 +const TInt KErrHttpRedirectNoLocationField = KErrHttpResponseFailureBase - 2;
1.716 +/**
1.717 +An error occured in parsing which left the parser in a unknown state
1.718 +@publishedAll
1.719 +@released
1.720 +*/
1.721 +const TInt KErrHttpUnknownParseState = KErrHttpResponseFailureBase - 3;
1.722 +
1.723 +/**
1.724 +Request building errors: cause the Validation Filter to make a transaction fail and terminate
1.725 +@publishedAll
1.726 +@released
1.727 +*/
1.728 +const TInt KErrHttpReqBuildErrorBase = KHttpErrorBase - 130;
1.729 +
1.730 +/**
1.731 +A body is provided with a method that doesn't allow bodys to be transmitted
1.732 +@publishedAll
1.733 +@released
1.734 +*/
1.735 +const TInt KErrHttpRequestHasBody = KErrHttpReqBuildErrorBase;
1.736 +/**
1.737 +A body is missing from a method that requires it
1.738 +@publishedAll
1.739 +@released
1.740 +*/
1.741 +const TInt KErrHttpRequestBodyMissing = KErrHttpReqBuildErrorBase - 1;
1.742 +/**
1.743 +Should contain The Max-Forward header
1.744 +@publishedAll
1.745 +@released
1.746 +*/
1.747 +const TInt KErrHttpTraceReqWithoutMaxForwardHeader = KErrHttpReqBuildErrorBase - 2;
1.748 +/**
1.749 +Body must NOT be sent chunked if using HTTP/1.0
1.750 +@publishedAll
1.751 +@released
1.752 +*/
1.753 +const TInt KErrHttpPostReqBodyWithoutSizeOnHTTP10 = KErrHttpReqBuildErrorBase - 3;
1.754 +/**
1.755 +Request contained a response header or a entity header but no body
1.756 +@publishedAll
1.757 +@released
1.758 +*/
1.759 +const TInt KErrHttpInvalidHeaderInRequest = KErrHttpReqBuildErrorBase - 4;
1.760 +/**
1.761 +Missing but required header errors
1.762 +@publishedAll
1.763 +@released
1.764 +*/
1.765 +
1.766 +const TInt KErrHttpMissingHeaderBase = KHttpErrorBase - 160;
1.767 +/**
1.768 +A body was provided in the request but no Content-Type header was set
1.769 +@publishedAll
1.770 +@released
1.771 +*/
1.772 +
1.773 +const TInt KErrHttpEntityHeaderMissingContentType = KErrHttpMissingHeaderBase;
1.774 +/**
1.775 +The request URI was relative, but no Host header was set to indicate a server to connect to
1.776 +@publishedAll
1.777 +@released
1.778 +*/
1.779 +const TInt KErrHttpGeneralHeaderMissingHost = KErrHttpMissingHeaderBase - 1;
1.780 +/**
1.781 +Protocol handler errors
1.782 +@publishedAll
1.783 +@released
1.784 +*/
1.785 +const TInt KErrHttpProtocolHandlerBase = KHttpErrorBase - 170;
1.786 +/**
1.787 +The request body needed to be rewound but the client but it doesn't support
1.788 +@publishedAll
1.789 +@released
1.790 +*/
1.791 +const TInt KErrHttpCantResetRequestBody = KErrHttpProtocolHandlerBase;
1.792 +/**
1.793 +The Protocol handler is not initialised
1.794 +@publishedAll
1.795 +@released
1.796 +*/
1.797 +const TInt KErrHttpProtTransactionNotInitialised = KErrHttpProtocolHandlerBase -1;
1.798 +/**
1.799 +Unable to establish a tunnel.
1.800 +@publishedAll
1.801 +@released
1.802 +*/
1.803 +const TInt KErrHttpCannotEstablishTunnel = KErrHttpProtocolHandlerBase -2;
1.804 +/**
1.805 +Invalid URI
1.806 +@publishedAll
1.807 +@released
1.808 +*/
1.809 +const TInt KErrHttpInvalidUri = KErrHttpProtocolHandlerBase -3;
1.810 +/**
1.811 +Protocol handler experienced a non-pipelining error
1.812 +@publishedAll
1.813 +@released
1.814 +*/
1.815 +const TInt KErrHttpNonPipeliningError = KErrHttpProtocolHandlerBase -4;
1.816 +/**
1.817 +Protocol handler experienced a pipelining error
1.818 +@publishedAll
1.819 +@released
1.820 +*/
1.821 +const TInt KErrHttpPipeliningError = KErrHttpProtocolHandlerBase -5;
1.822 +
1.823 +/**
1.824 +The request has been not sent for the transaction and connection has been disconnected.
1.825 +This error will be propagated to the client only, if the HTTP:ENotifyOnDisconnect property
1.826 +is set with a value HTTP::EEnableDisconnectNotification
1.827 +
1.828 +@publishedAll
1.829 +@released
1.830 +*/
1.831 +const TInt KErrHttpRequestNotSent = KErrHttpProtocolHandlerBase -6;
1.832 +
1.833 +/**
1.834 +The response has been not received for the transaction and connection has been disconnected.
1.835 +This error will be propagated to the client only, if the HTTP:ENotifyOnDisconnect property is
1.836 +set with a value HTTP::EEnableDisconnectNotification
1.837 +
1.838 +@publishedAll
1.839 +@released
1.840 +*/
1.841 +const TInt KErrHttpResponseNotReceived = KErrHttpProtocolHandlerBase -7;
1.842 +
1.843 +/**
1.844 +Partial response has been received and connection has been disconnected. This error will be
1.845 +propagated to the client only, if the HTTP:ENotifyOnDisconnect property is set with a value
1.846 +HTTP::EEnableDisconnectNotification
1.847 +
1.848 +@publishedAll
1.849 +@released
1.850 +*/
1.851 +const TInt KErrHttpPartialResponseReceived = KErrHttpProtocolHandlerBase -8;
1.852 +
1.853 +/**
1.854 +ClientApplication wants to fail the transaction that was in process by the HTTPMessageParser
1.855 +@publishedAll
1.856 +@released
1.857 +*/
1.858 +const TInt KErrHttpOptimiserFailsTrans = KErrHttpProtocolHandlerBase -9;
1.859 +
1.860 +// end of error codes - maximum error value is -7399 - must not be exceeded!
1.861 +// Inline methods from HTTPStatus
1.862 +
1.863 +inline TBool HTTPStatus::IsInformational(TInt aStatus)
1.864 + {
1.865 + return ((aStatus >= HTTPStatus::EContinue) && (aStatus < HTTPStatus::EOk));
1.866 + }
1.867 +inline TBool HTTPStatus::IsSuccessful(TInt aStatus)
1.868 + {
1.869 + return ((aStatus >= HTTPStatus::EOk) && (aStatus < HTTPStatus::EMultipleChoices));
1.870 + }
1.871 +inline TBool HTTPStatus::IsRedirection(TInt aStatus)
1.872 + {
1.873 + return ((aStatus >= HTTPStatus::EMultipleChoices) && (aStatus < HTTPStatus::EBadRequest));
1.874 + }
1.875 +inline TBool HTTPStatus::IsClientError(TInt aStatus)
1.876 + {
1.877 + return ((aStatus >= HTTPStatus::EBadRequest) && (aStatus < HTTPStatus::EInternalServerError));
1.878 + }
1.879 +inline TBool HTTPStatus::IsServerError(TInt aStatus)
1.880 + {
1.881 + return (aStatus >= HTTPStatus::EInternalServerError);
1.882 + }
1.883 +
1.884 +
1.885 +
1.886 +#endif // __HTTPERR_H__