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