epoc32/include/mw/httperr.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 /**
    17  @file httperr.h
    18  @warning : This file contains Rose Model ID comments - please do not delete
    19 */
    20 
    21 #ifndef __HTTPERR_H__
    22 #define __HTTPERR_H__
    23 
    24 // System includes
    25 #include <e32std.h>
    26 
    27 //##ModelId=3C4C18750141
    28 class HTTPStatus
    29 /** 
    30 The complete set of HTTP Status codes, as defined in RFC2616.
    31 @publishedAll
    32 @released
    33 */
    34 	{
    35 public:
    36 	enum 
    37 		{
    38 		/** 'Informational' range of codes 1xx 
    39 		*/ 
    40 		/** Continue.
    41 		*/
    42 		EContinue						= 100, 
    43 		/** Switching Protocols.
    44 		*/
    45 		ESwitchingProtocols				= 101,  
    46 		/** 'Successful' range of codes 2xx 
    47 		*/
    48 		/** Ok.
    49 		*/
    50 		EOk								= 200,
    51 		/** Created.
    52 		*/
    53 		ECreated						= 201,  
    54 		/** The entry has been accepted.
    55 		*/
    56 		EAccepted						= 202,
    57 		/** Non-Authoritative Information.
    58 		*/
    59 		ENonAuthoritativeInfo			= 203,
    60 		/** No Content.
    61 		*/
    62 		ENoContent						= 204,
    63 		/** Reset Content.
    64 		*/
    65 		EResetContent					= 205, 
    66 		/** Partial Content.
    67 		*/
    68 		EPartialContent					= 206,
    69 		/** 'Redirection' range of codes 3xx 
    70 		*/
    71 		/** Multiple Choices.
    72 		*/
    73 		EMultipleChoices				= 300, 
    74 		/** Moved Permanently.
    75 		*/
    76 		EMovedPermanently				= 301,
    77 		/** Found.
    78 		Note, this is deprecated in HTTP/1.1 - 307 will be used instead
    79 		*/
    80 		EFound							= 302,  
    81 		/** See Other.
    82 		*/
    83 		ESeeOther						= 303,
    84 		/** Not Modified.
    85 		*/
    86 		ENotModified					= 304,
    87 		/** Use Proxy.
    88 		*/
    89 		EUseProxy						= 305,
    90 		/** Unused.
    91 		*/
    92 		EUnused							= 306,
    93 		/** Temporary Redirect.
    94 		*/
    95 		ETemporaryRedirect				= 307,
    96 		/** 'Client Error' range of codes 4xx 
    97 		*/
    98 		/** Bad Request.
    99 		*/
   100 		EBadRequest						= 400,
   101 		/** Unauthorized.
   102 		*/
   103 		EUnauthorized					= 401,
   104 		/** Payment Required. Note, this is reserved in HTTP/1.1
   105 		*/
   106 		EPaymentRequired				= 402, 
   107 		/** Forbidden.
   108 		*/
   109 		EForbidden						= 403,
   110 		/** Not Found.
   111 		*/
   112 		ENotFound						= 404,
   113 		/** Method Not Allowed.
   114 		*/
   115 		EMethodNotAllowed				= 405,
   116 		/** Not Acceptable.
   117 		*/
   118 		ENotAcceptable					= 406,
   119 		/** Proxy Authentication Required.
   120 		*/
   121 		EProxyAuthenticationRequired	= 407,
   122 		/** Request Timeout.
   123 		*/
   124 		ERequestTimeout					= 408,
   125 		/** Conflict.
   126 		*/
   127 		EConflict						= 409,
   128 		/** Gone.
   129 		*/
   130 		EGone							= 410,
   131 		/** Length Required.
   132 		*/
   133 		ELengthRequired					= 411,
   134 		/** Precondition Failed.
   135 		*/
   136 		EPreconditionFailed				= 412,
   137 		/** Request Entity Too Large. 
   138 		*/
   139 		ERequestEntityTooLarge			= 413,
   140 		/** Request-URI Too Long.
   141 		*/
   142 		ERequestURITooLong				= 414,
   143 		/** Unsupported Media Type.
   144 		*/
   145 		EUnsupportedMediaType			= 415,
   146 		/** Requested Range Not Satisfiable.
   147 		*/
   148 		ERequestedRangeNotSatisfiable	= 416,
   149 		/** Expectation Failed.
   150 		*/
   151 		EExpectationFailed				= 417,
   152 		/** 'Server Error' range of codes 5xx 
   153 		*/
   154 		/** Internal Server Error.
   155 		*/
   156 		EInternalServerError			= 500,
   157 		/** Not Implemented.
   158 		*/
   159 		ENotImplemented					= 501,
   160 		/** Bad Gateway.
   161 		*/
   162 		EBadGateway						= 502,
   163 		/** Service Unavailable.
   164 		*/
   165 		EServiceUnavailable				= 503, 
   166 		/** Gateway Timeout.
   167 		*/
   168 		EGatewayTimeout					= 504,
   169 		/** HTTP Version Not Supported.
   170 		*/
   171 		EHTTPVersionNotSupported		= 505
   172 		};
   173 
   174 		/** Is the supplied status code in the 1xx Informational range?
   175 		@param aStatus Is the supplied status code in the 1xx Informational range?
   176 		@return ETrue if the specified status code is in the 1xx Informational range.
   177 		##ModelId=3C4C18750162
   178 		*/
   179 		inline static TBool IsInformational(TInt aStatus);
   180 		
   181 		
   182 		/** Is the supplied status code in the 2xx Successful range?
   183 		@param aStatus Is the supplied status code in the 2xx Successful range?
   184 		@return ETrue if the specified status code is in the 2xx Successful range
   185 		##ModelId=3C4C18750160
   186 		*/
   187 		inline static TBool IsSuccessful(TInt aStatus);
   188 
   189 		/** Is the supplied status code in the 3xx Redirection range? 
   190 		@param aStatus Is the supplied status code in the 3xx Redirection range?
   191 		@return	ETrue if the specified status code is in the 3xx Redirection range.
   192 		##ModelId=3C4C18750159
   193 		*/
   194 		inline static TBool IsRedirection(TInt aStatus);
   195 
   196 		/** Is the supplied status code in the 4xx Client Error range? 
   197 		@param aStatus Is the supplied status code in the 4xx Client Error range?
   198 		@return ETrue if the specified status code is in the 4xx Client Error range.
   199 		##ModelId=3C4C18750157
   200 		*/
   201 		inline static TBool IsClientError(TInt aStatus);
   202 
   203 		/** Is the supplied status code in the 5xx Server Error range? 
   204 		@param aStatus Is the supplied status code in the 5xx Server Error range?
   205 		@return ETrue if the specified status code is in the 5xx Server Error range.
   206 		##ModelId=3C4C18750155
   207 		*/
   208 		inline static TBool IsServerError(TInt aStatus);
   209 	};
   210 
   211 //
   212 // HTTP Panic codes
   213 //
   214 
   215 #include <e32base.h>
   216 
   217 // HTTPPanic::Panic(HTTPPanic:: )
   218 
   219 //##ModelId=3C4C18740352
   220 class HTTPPanic
   221 /**
   222 HTTP panic codes
   223 @publishedAll
   224 @released
   225 */
   226 	{
   227 public:
   228 	enum THTTPPanic
   229 		{
   230 		/** RHTTPSession session is already open. ( Panic HTTP-CORE 0 )
   231 		*/
   232 		ESessionAlreadyOpen,
   233 		/** Specified field is missing. ( Panic HTTP-CORE 1 )
   234 		*/
   235 		EHeaderFieldMissing,
   236 		/** Unused. ( Panic HTTP-CORE 2 )
   237 		*/
   238 		EHeaderParamMissing,
   239 		/** Unused. ( Panic HTTP-CORE 3 )
   240 		*/
   241 		EHeaderInvalidPart,
   242 		/** Mismatch between header's type and its attempted use. ( Panic HTTP-CORE 4 )
   243 		*/
   244 		EHeaderInvalidType,
   245 		/** Unused. ( Panic HTTP-CORE 5 )
   246 		*/
   247 		ETransactionEventOutstanding,
   248 		/** A transaction error occurred, and the MHFRunError() in use didn't handle it. ( Panic HTTP-CORE 6 )
   249 		*/
   250 		ETransactionUnhandledError,
   251 		/** Attempted to add a filter while there is a transaction outstanding. ( Panic HTTP-CORE 7 )
   252 		*/
   253 		EAddingFilterWithOutstandingTransactions,
   254 		/** Attempted to add a filter at a position not between the protocol handler and the client. ( Panic HTTP-CORE 8 )
   255 		*/
   256 		EFilterInvalidPosition,
   257 		/** CHTTPEncoder object destroyed without its data being released. ( Panic HTTP-CORE 9 )
   258 		*/
   259 		EHTTPFormDataUnreleased,
   260 		/** CHTTPEncoder object at the wrong state for adding data. ( Panic HTTP-CORE 10 ) 
   261 		*/
   262 		EHTTPFormSupplyingData,
   263 		/** Unused. ( Panic HTTP-CORE 11 )
   264 		*/
   265 		EValidationFilterFailure,
   266 		/** Invalid request data. ( Panic HTTP-CORE 12 )
   267 		*/
   268 		EInvalidTxData,
   269 		/** Invalid response data. ( Panic HTTP-CORE 13 )
   270 		*/
   271 		EInvalidRxData,
   272 		/** Unused. ( Panic HTTP-CORE 14 )
   273 		*/
   274 		ENoTransportHandlerSet,
   275 		/** Unused. ( Panic HTTP-CORE 15 )
   276 		*/
   277 		EAuthenticationFilterBadState,
   278 		/** An invalid filter handle was specified. ( Panic HTTP-CORE 16 )
   279 		*/
   280 		EInvalidFilterHandle,
   281 		/** An invalid event ( Panic HTTP-CORE 17 )
   282 		*/
   283 		EInvalidEvent
   284 		};
   285 
   286 	//##ModelId=3C4C18740366
   287 	static void Panic(THTTPPanic aPanic);
   288 	};
   289 
   290 // HTTP external errors/leave codes. Add new sub-ranges at the end; do not insert between the sub-ranges that
   291 // are already here.  This is to allow a client to reasonably check for errors between two adjacent range
   292 // base values rather than check for individual codes.
   293 
   294 /**
   295 Base value for the HTTP error code range (-7200 to -7399)
   296 @publishedAll
   297 @released
   298 */
   299 const TInt KHttpErrorBase = -7200;
   300 
   301 //
   302 // Text mode HTTP protocol handler
   303 //
   304 
   305 /**
   306 Codec encoding errors for HTTP headers
   307 @publishedAll
   308 @released
   309 */
   310 const TInt KHttpHeaderEncodeErrorBase = KHttpErrorBase;
   311 
   312 /**
   313 Error making a default encoding of unrecognised headers
   314 @publishedAll
   315 @released
   316 */
   317 const TInt KErrHttpEncodeDefault			= KHttpHeaderEncodeErrorBase;
   318 /**
   319 Error encoding the Accept field
   320 @publishedAll
   321 @released
   322 */
   323 const TInt KErrHttpEncodeAccept				= KHttpHeaderEncodeErrorBase - 1; 
   324 /**
   325 Error encoding the Accept-Charset field
   326 @publishedAll
   327 @released
   328 */
   329 const TInt KErrHttpEncodeAcceptCharset		= KHttpHeaderEncodeErrorBase - 2; 
   330 /**
   331 Error encoding a q-value parameter
   332 @publishedAll
   333 @released
   334 */
   335 const TInt KErrHttpEncodeQValue				= KHttpHeaderEncodeErrorBase - 3; 
   336 /**
   337 Error encoding the Authorization field
   338 @publishedAll
   339 @released
   340 */
   341 const TInt KErrHttpEncodeAuthorization		= KHttpHeaderEncodeErrorBase - 4; 
   342 /**
   343 Error encoding Basic credentials
   344 @publishedAll
   345 @released
   346 */
   347 const TInt KErrHttpEncodeBasicAuth			= KHttpHeaderEncodeErrorBase - 5; 
   348 /**
   349 Error encoding Digest credentials
   350 @publishedAll
   351 @released
   352 */
   353 const TInt KErrHttpEncodeDigestAuth			= KHttpHeaderEncodeErrorBase - 6; 
   354 /**
   355 Error encoding the Connection field
   356 @publishedAll
   357 @released
   358 */
   359 const TInt KErrHttpEncodeConnection			= KHttpHeaderEncodeErrorBase - 7; 
   360 /**
   361 Error encoding the Content-Length field
   362 @publishedAll
   363 @released
   364 */
   365 const TInt KErrHttpEncodeContentLength		= KHttpHeaderEncodeErrorBase - 8; 
   366 /**
   367 Error encoding the Content-Type field
   368 @publishedAll
   369 @released
   370 */
   371 const TInt KErrHttpEncodeContentType		= KHttpHeaderEncodeErrorBase - 9; 
   372 /**
   373 Error encoding the Host field
   374 @publishedAll
   375 @released
   376 */
   377 const TInt KErrHttpEncodeHost				= KHttpHeaderEncodeErrorBase - 10;
   378 /**
   379 Error encoding the Host field's port parameter
   380 @publishedAll
   381 @released
   382 */
   383 const TInt KErrHttpEncodeHostPort			= KHttpHeaderEncodeErrorBase - 11;
   384 /**
   385 Error encoding the Transfer-Encoding field
   386 @publishedAll
   387 @released
   388 */
   389 const TInt KErrHttpEncodeTransferEncoding	= KHttpHeaderEncodeErrorBase - 12;
   390 /**
   391 Error encoding the User-Agent field
   392 @publishedAll
   393 @released
   394 */
   395 const TInt KErrHttpEncodeUserAgent			= KHttpHeaderEncodeErrorBase - 13;
   396 /**
   397 Error encoding the Date field
   398 @publishedAll
   399 @released
   400 */
   401 const TInt KErrHttpEncodeDate				= KHttpHeaderEncodeErrorBase - 14;
   402 /**
   403 Error encoding the Cookie field 
   404 @publishedAll
   405 @released
   406 */
   407 const TInt KErrHttpEncodeCookie				= KHttpHeaderEncodeErrorBase - 15;
   408 /**
   409 Error encoding the Cache-Control field
   410 @publishedAll
   411 @released
   412 */
   413 const TInt KErrHttpEncodeCacheControl		= KHttpHeaderEncodeErrorBase - 16; 
   414 /**
   415 Error encoding the Pragma field 
   416 @publishedAll
   417 @released
   418 */
   419 const TInt KErrHttpEncodePragma				= KHttpHeaderEncodeErrorBase - 17;
   420 /**
   421 Error encoding the if match field
   422 @publishedAll
   423 @released
   424 */
   425 const TInt KErrHttpEncodeIfMatch			= KHttpHeaderEncodeErrorBase - 18; 
   426 /**
   427 Error encoding the if none match field 
   428 @publishedAll
   429 @released
   430 */
   431 const TInt KErrHttpEncodeIfNoneMatch		= KHttpHeaderEncodeErrorBase - 19;
   432 /**
   433 Error encoding the if modified since field 
   434 @publishedAll
   435 @released
   436 */
   437 const TInt KErrHttpEncodeIfModifiedSince	= KHttpHeaderEncodeErrorBase - 20;
   438 /**
   439 Error encoding the if unmodified since field 
   440 @publishedAll
   441 @released
   442 */
   443 const TInt KErrHttpEncodeIfUnmodifiedSince	= KHttpHeaderEncodeErrorBase - 21;
   444 /**
   445 Error encoding the Cookie2 field 
   446 @publishedAll
   447 @released
   448 */
   449 const TInt KErrHttpEncodeCookie2			= KHttpHeaderEncodeErrorBase - 22;
   450 /**
   451 Error encoding the Content-Language field
   452 @publishedAll
   453 @released
   454 */
   455 const TInt KErrHttpEncodeContentLanguage	= KHttpHeaderEncodeErrorBase - 23;
   456 /**
   457 Error encoding the WWWAuthenticate field
   458 @publishedAll
   459 @released
   460 */
   461 const TInt KErrHttpEncodeDoWWWAuthenticate	= KHttpHeaderEncodeErrorBase - 24;
   462 /**
   463 Error encoding the Age field
   464 @publishedAll
   465 @released
   466 */
   467 const TInt KErrHttpEncodeDoAge				= KHttpHeaderEncodeErrorBase - 25;
   468 /**
   469 Error encoding the Vary field
   470 @publishedAll
   471 @released
   472 */
   473 const TInt KErrHttpEncodeDoVary				= KHttpHeaderEncodeErrorBase - 26;
   474 /**
   475 Error encoding the Content-Language field
   476 @publishedAll
   477 @released
   478 */
   479 const TInt KErrHttpEncodeDoContentLanguage	= KHttpHeaderEncodeErrorBase - 27;
   480 /**
   481 Error encoding the Content-Encoding field
   482 @publishedAll
   483 @released
   484 */
   485 const TInt KErrHttpEncodeContentEncoding	= KHttpHeaderEncodeErrorBase - 28;
   486 /**
   487 Error encoding the Content-Location field
   488 @publishedAll
   489 @released
   490 */
   491 const TInt KErrHttpEncodeContentLocation	= KHttpHeaderEncodeErrorBase - 29;
   492 /**
   493 Error encoding the Content-MD5 field
   494 @publishedAll
   495 @released
   496 */
   497 const TInt KErrHttpEncodeContentMD5			= KHttpHeaderEncodeErrorBase - 30;
   498 /**
   499 Error encoding the Accept-Encoding field
   500 @publishedAll
   501 @released
   502 */
   503 const TInt KErrHttpEncodeAcceptLanguage		= KHttpHeaderEncodeErrorBase - 31;
   504 /**
   505 Error encoding the Accept-Language field
   506 @publishedAll
   507 @released
   508 */
   509 const TInt KErrHttpEncodeAcceptEncoding		= KHttpHeaderEncodeErrorBase - 32;
   510 /**
   511 Error encoding the TE field
   512 @publishedAll
   513 @released
   514 */
   515 const TInt KErrHttpEncodeTE					= KHttpHeaderEncodeErrorBase - 33;
   516 /**
   517 Error encoding the Upgrade field
   518 @publishedAll
   519 @released
   520 */
   521 const TInt KErrHttpEncodeUpgrade			= KHttpHeaderEncodeErrorBase - 34;
   522 /**
   523 Error encoding the ST field
   524 @publishedAll
   525 @released
   526 */
   527 const TInt KErrHttpEncodeST			= KHttpHeaderEncodeErrorBase - 35;
   528 /**
   529 Error encoding the USN field
   530 @publishedAll
   531 @released
   532 */
   533 const TInt KErrHttpEncodeUSN			= KHttpHeaderEncodeErrorBase - 36;
   534 /**
   535 Error encoding the Timeout field
   536 @publishedAll
   537 @released
   538 */
   539 const TInt KErrHttpEncodeTimeout			= KHttpHeaderEncodeErrorBase - 37;
   540 /**
   541 Error encoding the EXT field
   542 @publishedAll
   543 @released
   544 */
   545 const TInt KErrHttpEncodeExt			= KHttpHeaderEncodeErrorBase - 38;
   546 /**
   547 Error encoding the SID field
   548 @publishedAll
   549 @released
   550 */
   551 const TInt KErrHttpEncodeSID			= KHttpHeaderEncodeErrorBase - 39;
   552 /**
   553 Error encoding the NTS field
   554 @publishedAll
   555 @released
   556 */
   557 const TInt KErrHttpEncodeNTS			= KHttpHeaderEncodeErrorBase - 40;
   558 /**
   559 Error encoding the NT field
   560 @publishedAll
   561 @released
   562 */
   563 const TInt KErrHttpEncodeNT			= KHttpHeaderEncodeErrorBase - 41;
   564 /**
   565 Error encoding the MX field
   566 @publishedAll
   567 @released
   568 */
   569 const TInt KErrHttpEncodeMX			= KHttpHeaderEncodeErrorBase - 42;
   570 /**
   571 Error encoding the SEQ field
   572 @publishedAll
   573 @released
   574 */
   575 const TInt KErrHttpEncodeSEQ			= KHttpHeaderEncodeErrorBase - 43;
   576 /**
   577 Error encoding the MAN field
   578 @publishedAll
   579 @released
   580 */
   581 const TInt KErrHttpEncodeMAN			= KHttpHeaderEncodeErrorBase - 44;
   582 /**
   583 Error encoding the SoapAction field
   584 @publishedAll
   585 @released
   586 */
   587 const TInt KErrHttpEncodeSoapAction			= KHttpHeaderEncodeErrorBase - 45;
   588 /**
   589 Error encoding the Callback field
   590 @publishedAll
   591 @released
   592 */
   593 const TInt KErrHttpEncodeCallback			= KHttpHeaderEncodeErrorBase - 46;
   594 
   595 /**
   596 Codec decoding errors for values found in HTTP headers
   597 @publishedAll
   598 @released
   599 */
   600 const TInt KHttpValueDecodeErrorBase = KHttpErrorBase - 60;
   601 
   602 /**
   603 General formatting error for date values
   604 @publishedAll
   605 @released
   606 */
   607 const TInt KErrHttpDecodeMalformedDate		= KHttpValueDecodeErrorBase;	 
   608 /**
   609 Malformed year
   610 @publishedAll
   611 @released
   612 */
   613 const TInt KErrHttpDecodeMalformedYear 		= KHttpValueDecodeErrorBase - 1; 
   614 /**
   615 Malformed short month name
   616 @publishedAll
   617 @released
   618 */
   619 const TInt KErrHttpDecodeMalformedMonth		= KHttpValueDecodeErrorBase - 2; 
   620 /**
   621 Malformed number of day in month
   622 @publishedAll
   623 @released
   624 */
   625 const TInt KErrHttpDecodeMalformedDay		= KHttpValueDecodeErrorBase - 3; 
   626 /**
   627 Malformed short day name
   628 @publishedAll
   629 @released
   630 */
   631 const TInt KErrHttpDecodeMalformedWkDay		= KHttpValueDecodeErrorBase - 4; 
   632 /**
   633 Malformed long day name
   634 @publishedAll
   635 @released
   636 */
   637 const TInt KErrHttpDecodeMalformedWeekDay	= KHttpValueDecodeErrorBase - 5; 
   638 /**
   639 Malformed integer value
   640 @publishedAll
   641 @released
   642 */
   643 const TInt KErrHttpDecodeMalformedInteger	= KHttpValueDecodeErrorBase - 6; 
   644 /**
   645 Malformed quoted string
   646 @publishedAll
   647 @released
   648 */
   649 const TInt KErrHttpDecodeMalformedQuotedStr	= KHttpValueDecodeErrorBase - 7; 
   650 
   651 /**
   652 Codec decoding errors for HTTP headers
   653 @publishedAll
   654 @released
   655 */
   656 const TInt KHttpHeaderDecodeErrorBase = KHttpErrorBase - 70;
   657 
   658 /**
   659 Error decoding the Accept field
   660 @publishedAll
   661 @released
   662 */
   663 const TInt KErrHttpDecodeAccept				= KHttpHeaderDecodeErrorBase;
   664 /**
   665 Error decoding the Connection field
   666 @publishedAll
   667 @released
   668 */
   669 const TInt KErrHttpDecodeConnection			= KHttpHeaderDecodeErrorBase - 1;
   670 /**
   671 Error decoding the Content-Length field
   672 @publishedAll
   673 @released
   674 */
   675 const TInt KErrHttpDecodeContentLength		= KHttpHeaderDecodeErrorBase - 2;
   676 /**
   677 Error decoding the Content-Type field
   678 @publishedAll
   679 @released
   680 */
   681 const TInt KErrHttpDecodeContentType		= KHttpHeaderDecodeErrorBase - 3;
   682 /**
   683 Error decoding the Transfer-Encoding field
   684 @publishedAll
   685 @released
   686 */
   687 const TInt KErrHttpDecodeTransferEncoding	= KHttpHeaderDecodeErrorBase - 4;
   688 /**
   689 Error decoding the WWWAuthenticate field
   690 @publishedAll
   691 @released
   692 */
   693 const TInt KErrHttpDecodeWWWAuthenticate	= KHttpHeaderDecodeErrorBase - 5;
   694 /**
   695 The WWWAuthenticate field contained an unrecognised authentication scheme
   696 @publishedAll
   697 @released
   698 */
   699 const TInt KErrHttpDecodeUnknownAuthScheme	= KHttpHeaderDecodeErrorBase - 6;
   700 /**
   701 Error decoding a Basic WWWAuthenticate challenge
   702 @publishedAll
   703 @released
   704 */
   705 const TInt KErrHttpDecodeBasicAuth			= KHttpHeaderDecodeErrorBase - 7;
   706 /**
   707 Error decoding a Digest WWWAuthenticate challenge
   708 @publishedAll
   709 @released
   710 */
   711 const TInt KErrHttpDecodeDigestAuth			= KHttpHeaderDecodeErrorBase - 8;
   712 /**
   713 Error decoding a Set-Cookie field
   714 @publishedAll
   715 @released
   716 */
   717 const TInt KErrHttpDecodeCookie				= KHttpHeaderDecodeErrorBase - 9;
   718 /**
   719 Error decoding the Authorization field
   720 @publishedAll
   721 @released
   722 */
   723 const TInt KErrHttpDecodeAuthorization		= KHttpHeaderDecodeErrorBase - 10;
   724 /**
   725 Error decoding the Accept-Charset field
   726 @publishedAll
   727 @released
   728 */
   729 const TInt KErrHttpDecodeAcceptCharset		= KHttpHeaderDecodeErrorBase - 11;
   730 /**
   731 Error decoding the Accept-Language field
   732 @publishedAll
   733 @released
   734 */
   735 const TInt KErrHttpDecodeAcceptLanguage		= KHttpHeaderDecodeErrorBase - 12;
   736 /**
   737 Error decoding the Accept-Encoding field
   738 @publishedAll
   739 @released
   740 */
   741 const TInt KErrHttpDecodeAcceptEncoding		= KHttpHeaderDecodeErrorBase - 13;
   742 /**
   743 Error decoding the TE field
   744 @publishedAll
   745 @released
   746 */
   747 const TInt KErrHttpDecodeTE					= KHttpHeaderEncodeErrorBase - 14;
   748 /**
   749 Error decoding the Expect field
   750 @publishedAll
   751 @released
   752 */
   753 const TInt KErrHttpDecodeExpect				= KHttpHeaderEncodeErrorBase - 15;
   754 /**
   755 Error decoding the Content-Disposition field
   756 @publishedAll
   757 @released
   758 */
   759 const TInt KErrHttpDecodeContentDisposition	= KHttpHeaderDecodeErrorBase - 14;
   760 /**
   761 Error decoding the MAN field.
   762 @publishedAll
   763 @released
   764 */
   765 const TInt KErrHttpDecodeMAN	=	KHttpHeaderDecodeErrorBase - 15;
   766 /**
   767 Response errors. These represent specific failure cases
   768 @publishedAll
   769 @released
   770 */
   771 const TInt KErrHttpResponseFailureBase = KHttpErrorBase - 100;
   772 
   773 /**
   774 A uri redirected too many times, possibly indicating a circular redirection
   775 @publishedAll
   776 @released
   777 */
   778 const TInt KErrHttpRedirectExceededLimit		= KErrHttpResponseFailureBase;	  
   779 /**
   780 A server responded that the uri must be fetched via a proxy
   781 @publishedAll
   782 @released
   783 */
   784 const TInt KErrHttpRedirectUseProxy				= KErrHttpResponseFailureBase - 1;
   785 /**
   786 A server sent a redirection response that did not include a Location header
   787 @publishedAll
   788 @released
   789 */
   790 const TInt KErrHttpRedirectNoLocationField		= KErrHttpResponseFailureBase - 2;
   791 /**
   792 An error occured in parsing which left the parser in a unknown state
   793 @publishedAll
   794 @released
   795 */
   796 const TInt KErrHttpUnknownParseState			= KErrHttpResponseFailureBase - 3;
   797 
   798 /**
   799 Request building errors: cause the Validation Filter to make a transaction fail and terminate 
   800 @publishedAll
   801 @released
   802 */
   803 const TInt KErrHttpReqBuildErrorBase = KHttpErrorBase - 130;
   804 
   805 /**
   806 A body is provided with a method that doesn't allow bodys to be transmitted
   807 @publishedAll
   808 @released
   809 */
   810 const TInt KErrHttpRequestHasBody					= KErrHttpReqBuildErrorBase;	
   811 /**
   812 A body is missing from a method that requires it
   813 @publishedAll
   814 @released
   815 */
   816 const TInt KErrHttpRequestBodyMissing				= KErrHttpReqBuildErrorBase - 1;			
   817 /**
   818 Should contain The Max-Forward header
   819 @publishedAll
   820 @released
   821 */
   822 const TInt KErrHttpTraceReqWithoutMaxForwardHeader	= KErrHttpReqBuildErrorBase - 2;
   823 /**
   824 Body must NOT be sent chunked if using HTTP/1.0
   825 @publishedAll
   826 @released
   827 */
   828 const TInt KErrHttpPostReqBodyWithoutSizeOnHTTP10	= KErrHttpReqBuildErrorBase - 3;
   829 /**
   830 Request contained a response header or a entity header but no body
   831 @publishedAll
   832 @released
   833 */
   834 const TInt KErrHttpInvalidHeaderInRequest	  		= KErrHttpReqBuildErrorBase - 4;
   835 /**
   836 Missing but required header errors
   837 @publishedAll
   838 @released
   839 */
   840 
   841 const TInt KErrHttpMissingHeaderBase = KHttpErrorBase - 160;
   842 /**
   843 A body was provided in the request but no Content-Type header was set
   844 @publishedAll
   845 @released
   846 */
   847 
   848 const TInt KErrHttpEntityHeaderMissingContentType		= KErrHttpMissingHeaderBase;	
   849 /**
   850 The request URI was relative, but no Host header was set to indicate a server to connect to
   851 @publishedAll
   852 @released
   853 */
   854 const TInt KErrHttpGeneralHeaderMissingHost				= KErrHttpMissingHeaderBase - 1;
   855 /**
   856 Protocol handler errors
   857 @publishedAll
   858 @released
   859 */
   860 const TInt KErrHttpProtocolHandlerBase = KHttpErrorBase - 170;
   861 /**
   862 The request body needed to be rewound but the client but it doesn't support 
   863 @publishedAll
   864 @released
   865 */
   866 const TInt KErrHttpCantResetRequestBody				= KErrHttpProtocolHandlerBase;
   867 /**
   868 The Protocol handler is not initialised
   869 @publishedAll
   870 @released
   871 */
   872 const TInt KErrHttpProtTransactionNotInitialised	= KErrHttpProtocolHandlerBase -1;
   873 /**
   874 Unable to establish a tunnel.
   875 @publishedAll
   876 @released
   877 */
   878 const TInt KErrHttpCannotEstablishTunnel			= KErrHttpProtocolHandlerBase -2;
   879 /**
   880 Invalid URI
   881 @publishedAll
   882 @released
   883 */
   884 const TInt KErrHttpInvalidUri						= KErrHttpProtocolHandlerBase -3;
   885 /**
   886 Protocol handler experienced a non-pipelining error
   887 @publishedAll
   888 @released
   889 */
   890 const TInt KErrHttpNonPipeliningError				= KErrHttpProtocolHandlerBase -4;
   891 /**
   892 Protocol handler experienced a pipelining error
   893 @publishedAll
   894 @released
   895 */
   896 const TInt KErrHttpPipeliningError					= KErrHttpProtocolHandlerBase -5;
   897 
   898 /**
   899 The request has been not sent for the transaction and connection has been disconnected. 
   900 This error will be propagated to the client only, if the HTTP:ENotifyOnDisconnect property 
   901 is set with a value HTTP::EEnableDisconnectNotification
   902 
   903 @publishedAll
   904 @released
   905 */
   906 const TInt KErrHttpRequestNotSent 					= KErrHttpProtocolHandlerBase -6;
   907 
   908 /**
   909 The response has been not received for the transaction and connection has been disconnected. 
   910 This error will be propagated to the client only, if the HTTP:ENotifyOnDisconnect property is 
   911 set with a value HTTP::EEnableDisconnectNotification
   912 
   913 @publishedAll
   914 @released
   915 */
   916 const TInt KErrHttpResponseNotReceived				= KErrHttpProtocolHandlerBase -7;
   917 
   918 /**
   919 Partial response has been received and connection has been disconnected. This error will be 
   920 propagated to the client only, if the HTTP:ENotifyOnDisconnect property is set with a value
   921 HTTP::EEnableDisconnectNotification
   922 
   923 @publishedAll
   924 @released
   925 */
   926 const TInt KErrHttpPartialResponseReceived			= KErrHttpProtocolHandlerBase -8;
   927 
   928 /**
   929 ClientApplication wants to fail the transaction that was in process by the HTTPMessageParser
   930 @publishedAll
   931 @released
   932 */
   933 const TInt KErrHttpOptimiserFailsTrans				= KErrHttpProtocolHandlerBase -9;
   934 
   935 // end of error codes - maximum error value is -7399 - must not be exceeded!
   936 // Inline methods from HTTPStatus
   937 
   938 inline TBool HTTPStatus::IsInformational(TInt aStatus)
   939 	{ 
   940 	return ((aStatus >= HTTPStatus::EContinue) && (aStatus < HTTPStatus::EOk));
   941 	}
   942 inline TBool HTTPStatus::IsSuccessful(TInt aStatus)
   943 	{ 
   944 	return ((aStatus >= HTTPStatus::EOk) && (aStatus < HTTPStatus::EMultipleChoices));
   945 	}
   946 inline TBool HTTPStatus::IsRedirection(TInt aStatus)
   947 	{
   948 	return ((aStatus >= HTTPStatus::EMultipleChoices) && (aStatus < HTTPStatus::EBadRequest));
   949 	}
   950 inline TBool HTTPStatus::IsClientError(TInt aStatus)
   951 	{
   952 	return ((aStatus >= HTTPStatus::EBadRequest) && (aStatus < HTTPStatus::EInternalServerError));
   953 	}
   954 inline TBool HTTPStatus::IsServerError(TInt aStatus)
   955 	{
   956 	return (aStatus >= HTTPStatus::EInternalServerError);
   957 	}
   958 
   959 
   960 
   961 #endif // __HTTPERR_H__