epoc32/include/wapengstd.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 1999-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // WAP Engine Standard 
    15 // Standard status codes used by data handlers and the WAP engine. Note that some are exact duplicates of error
    16 // codes from sub-components (e.g. HTTP) or from components outside of the WAP Browser (e.g. NetDial, ETEL)
    17 // 
    18 //
    19 
    20 #ifndef __WAPENGINESTANDARD_H__
    21 #define __WAPENGINESTANDARD_H__
    22 
    23 // System includes
    24 //
    25 #include <e32std.h>
    26 
    27 //
    28 // Status code offset for HTTP status values and stack connection progress
    29 // e.g. HTTP/200 becomes KHttpPluginStatusBase + 200
    30 //
    31 const TInt KHttpPluginStatusBase = 1000;
    32 const TInt KWapDocumentLoadStatusBase = 2000;
    33 
    34 typedef enum TWapEngineStatus
    35 {
    36 	// DRAFT
    37 	// Some of these errors MAY be handled in the control level.
    38 
    39 	//
    40 	// HTTP/1.1 Status/Error codes from 40x and 50x series
    41 	//
    42 	EWapErrHttp_505_HTTPVersionNotSupported = -20505,	// has to be 1.1 at the client end; talking to a 1.0 origin server might cause this? Or the client erroneously claiming to do HTTP/3 or something.
    43 	EWapErrHttp_504_GatewayTimeout = -20504,			// not sure if this refers to Gateway in the WAP sense
    44 	EWapErrHttp_503_ServiceUnavailable = -20503,		// ?
    45 	EWapErrHttp_502_BadGateway = -20502,				// could occur with a badly configured WAP GW = e.g. the gateway uses a proxy which cannot be reached = there should probably be some indication to the user.
    46 	EWapErrHttp_501_NotImplemented = -20501,			// duh. Bad server.
    47 	EWapErrHttp_500_InternalServerError = -20500,		// bad news again; this one can either come from the origin server _or_ from the WAP GW, which may convert a different server code into 500 if the WML is bad. Report.
    48 
    49 	EWapErrHttp_415_UnsupportedMediaType = -20415,		// see RFC2068
    50 	EWapErrHttp_414_RequestUriTooLong = -20414,			// report to user
    51 	EWapErrHttp_413_RequestEntityTooLarge = -20413,		// see RFC2068
    52 	EWapErrHttp_412_PreconditionFailed = -20412,		// see RFC2068
    53 	EWapErrHttp_411_LengthRequired = -20411,			// error in our use of HTTP if this occurs.
    54 	EWapErrHttp_410_Gone = -20410,						// like 404, except more definite! report to user.
    55 	EWapErrHttp_409_Conflict = -20409,					// see RFC2068
    56 	EWapErrHttp_408_RequestTimeout = -20408,			//  dealt with in HTTP, shouldn't have to be presented to the user
    57 	EWapErrHttp_407_ProxyAuthenticationRequired = -20407,//  - not sure, we don't correctly deal with this at the moment. Is it needed?
    58 	EWapErrHttp_406_NotAcceptable = -20406,				//  this is returned if the resource requested is not acceptable to the client according to its own accept- strings in the HTTP request header. e.g. accept-charset, accept (content types). accept-language. This shows that we're getting our headers wrong, so should be considered a software error and not be reported. I think.
    59 	EWapErrHttp_405_MethodNotAllowed = -20405,			//  e.g. attempt to POST to a URL that is not appropriate for POSTing. Probably a result of poor site design?
    60 	EWapErrHttp_404_NotFound = -20404,					//  document missing on origin server. This one would be a good one to report to the user since it happens frequently with badly maintained sites!
    61 	EWapErrHttp_403_Forbidden = -20403,					// the server HTTPD does refuses to return the requested document, for internal reasons not necessarily disclosed to the client
    62 	EWapErrHttp_402_PaymentRequired = -20402,			//  I don't think this is used in our world of e-commerce. RFC2068 says it is reserved for future use.
    63 //
    64 //														// NOTE THAT HTTP/401 IS NOT TREATED AS AN ERROR, BECAUSE IT IS
    65 //														// FULLY HANDLED IN HTTP - see HTTP status codes below
    66 //
    67 	EWapErrHttp_400_BadRequest = -20400,				// client sent a request with a malformed syntax (in HTTP request headers) = I assume this indicates a programming error on our part ,and should not happen, or be reported?
    68 
    69 	//
    70 	// HTTP Data Provider plug-in 'inherited' error codes
    71 	//
    72 	EWapErrHttpReceivingErrorDeck		= -20014,	// Could not find document, so receiving an error deck
    73 	EWapErrHttpCancellationAbort		= -20013,	// Error code for leave when cancellation has occured during RunL()
    74 	EWapErrHttpGatewaySessionDisconnect	= -20012,	// The session was disconnected by the WAP Gateway
    75 	EWapErrHttpGatewayTransactionAbort	= -20011,	// A transaction was aborted by the gateway or the stack
    76 	EWapErrHttpGatewayCannotBeReached	= -20010,	// A session could not be established with the WAP Gateway
    77 	// Note that EWapErrHttpAuthenticationFailed and EWapErrHttpAuthenticationCancelled are now information status codes - see below.
    78 	EWapErrHttpWtlsCipherRejected		= -20009,	// The user rejected the cipher strength negotiated in WTLS
    79 	EWapErrHttpWtlsServerCertRejected	= -20008,	// The user rejected the certificate from the WAP GW
    80 	EWapErrHttpWtlsBadServerCert		= -20007,	// WTLS rejected the certificate obtained from the WAP GW
    81 	EWapErrHttpWtlsConfigFailed			= -20006,	// Failed to configure the WTLS layer of the WAP Stack
    82 	EWapErrHttpNetDialSetupFailed		= -20005,	// Failed to configure Net Dial
    83 	EWapErrHttpWapAPReadFailure			= -20004,	// An error occurred when reading the WAP AP from CommsDB
    84 	EWapErrHttpUnsupportedMethod		= -20003,	// An HTTP method was specified that is not supported
    85 	EWapErrHttpCannotFindPlugin			= -20002,	// Plug-in server failed to create an HTTP plugin
    86 	EWapErrHttpCannotFindServer			= -20001,	// URL specified a non-existent or inaccessible domain
    87 	EWapErrHttpGeneralError				= -20000,	// Unspecified error condition
    88 
    89 	//
    90 	//	XMLLIB ERROR CODES
    91 	//
    92 
    93 	// XmlLib
    94 #define XmlLibErrorBase -13200
    95 	EWapErrXmlLibInvalidDocument				= XmlLibErrorBase,
    96 	EWapErrXmlLibDocumentBuffered				= XmlLibErrorBase -  1,
    97 	EWapErrXmlLibDocumentAlreadyValid			= XmlLibErrorBase -  2,
    98 	EWapErrXmlLibInvalidDTD						= XmlLibErrorBase -  3,
    99 
   100 	// Validator
   101 #define XmlValidatorErrorBase -13100
   102 	EWapErrXmlLibIllegalTagName					= XmlValidatorErrorBase,
   103 	EWapErrXmlLibIllegalFixedAttributeValue		= XmlValidatorErrorBase -  1,
   104 	EWapErrXmlLibMissingRequiredAttribute		= XmlValidatorErrorBase -  2,
   105 	EWapErrXmlLibMissingDocument				= XmlValidatorErrorBase -  4,
   106 	EWapErrXmlLibInvalidDocumentStructure		= XmlValidatorErrorBase -  6,
   107 	EWapErrXmlLibIllegalAttributeValue			= XmlValidatorErrorBase -  7,
   108 
   109 	// Parser
   110 #define XmlParserErrorBase -13000
   111 	EWapErrXmlLibMissingCDATASectionEndTag		= XmlParserErrorBase,
   112 	EWapErrXmlLibInvalidAttributeDeclaration	= XmlParserErrorBase -  1,
   113 	EWapErrXmlLibEndTagMismatch					= XmlParserErrorBase -  2,
   114 	EWapErrXmlLibInvalidCharacterReference		= XmlParserErrorBase -  3,
   115 	EWapErrXmlLibUnknownEntityReference			= XmlParserErrorBase -  4,
   116 	EWapErrXmlLibNoDTD							= XmlParserErrorBase -  5,
   117 	EWapErrXmlLibMissingDocumentRootNode		= XmlParserErrorBase -  6,
   118 	EWapErrXmlLibInvalidXmlVersionDefinition	= XmlParserErrorBase -  7,
   119 	EWapErrXmlLibRootElementNameMismatch		= XmlParserErrorBase -  8,
   120 
   121 
   122 	//
   123 	//	WMLLIB ERROR CODES
   124 	//
   125 
   126 	// WmlLib
   127 	// No WmlLib (interface module) specific errors defined
   128 
   129 	// Validator
   130 #define WmlValidatorErrorBase -12100
   131 	EWapErrWmlLibAccessViolation			= WmlValidatorErrorBase -   1,
   132 	EWapErrWmlLibInvalidVariableReference	= WmlValidatorErrorBase - 	2,
   133 	EWapErrWmlLibInvalidConversionMethod	= WmlValidatorErrorBase -   3,
   134 	EWapErrWmlLibIllegalVariableName		= WmlValidatorErrorBase -   4,
   135 	EWapErrWmlLibIllegalTaskCountOnAnchor	= WmlValidatorErrorBase -   5,
   136 	EWapErrWmlLibNULLVariableName			= WmlValidatorErrorBase -   6,
   137 	EWapErrWmlLibNestedTables               = WmlValidatorErrorBase -   7,
   138 	EWapErrWmlLibDuplicateDoNodeName        = WmlValidatorErrorBase -   8,
   139 	EWapErrWmlLibUsageOfReservedWord        = WmlValidatorErrorBase -   9,
   140 	EWapErrWmlLibZeroTableColumns           = WmlValidatorErrorBase -  10,
   141 	EWapErrWmlLibNonWmlDocument				= WmlValidatorErrorBase -  11,
   142 	EWapErrWmlLibMultipleMetaPropertyName   = WmlValidatorErrorBase -  12,
   143 	EWapErrWmlLibEventBindingConflict       = WmlValidatorErrorBase -  14,
   144 	EWapErrWmlLibMultipleAccessElements		= WmlValidatorErrorBase -  15,
   145 	EWapErrWmlLibNonUniqueIds				= WmlValidatorErrorBase -  16,
   146 	EWapErrWmlLibVariableInInvalidLocation	= WmlValidatorErrorBase -  17,
   147 
   148 	// Parser
   149 #define WmlParserErrorBase -12000
   150 	EWapErrWmlLibNullNode					= WmlParserErrorBase,
   151 	EWapErrWmlLibCDATANodeWithoutParent		= WmlParserErrorBase -   1,
   152 
   153 
   154 	// 
   155 	// WAP Engine 'native' error codes
   156 	//
   157 	EWapErrSubDocumentNotFound	= -10027,
   158 	EWapErrCannotCreateDeck		= -10026,			// Failed to create a deck
   159 	EWapErrMimeTypeMissing		= -10025,			// Engine tried to access the mime-type attribute in a
   160 													// tree node but it was missing
   161 	EWapErrUnknownDocument		= -10024,
   162 	EWapErrInvalidDTD			= -10023,
   163 	EWapErrDTDUnavailable		= -10022,			// Document cannot be validated as DTD is not available
   164 
   165 	EWapErrUnknownScheme = -10021,					// unknown scheme
   166 	EWapErrCorruptScheme = -10020,					// scheme contains invalid characters
   167 	EWapErrCorruptUrl	 = -10019,					// part of url contains invalid characters
   168 
   169 	EWapErrPluginNotFound = -10018,					// couldn't find the requested plugin
   170 
   171 	EWapErrImageConversionFailed = -10017,			// image data handler got error from media server
   172 
   173 	EWapErrAccessPointNotSetUpForCSD	=  -10016,	// Access point lacked info for Data call
   174 	EWapErrAccessPointNotSetUpForSMS	=  -10015,
   175 	EWapErrAccessPointNotSetUpForUSSD	=  -10014,
   176 	EWapErrAccessPointNotSetUpGeneric	=  -10013,
   177 	EWapErrProtocolNotSupported			=  -10012,	// Current network does not support the requested service
   178 
   179 	EWapErrAuthorizationFailed			= -10011,
   180 		
   181 	EWapErrScriptObscureLibraryCall	= -10010,		// The script function was unavailable
   182 	EWapErrScriptIllegalAction		= -10009,		// The script attempted an illegal action and was terminated
   183 	EWapErrScriptCorrupt			= -10008,		// Script had errors
   184 	EWapErrScriptError				= -10007,		// Script returned a fatal error
   185 	EWapErrScriptNotFound			= -10006,		// Requested script was not found
   186 		
   187 	EWapErrDataCallUnavailable	= -10005,			// The data call is being used by another application
   188 	EWapErrDataCallDropped		= -10004,			// CSD connection was closed 
   189 
   190 	EWapErrAccessViolation		= -10003,			// Access to the document was denied
   191 	EWapErrDocumentCorrupted	= -10002,
   192 	EWapErrDocumentNotFound		= -10001,
   193 	EWapErrGeneral				= -10000,
   194 
   195 	//
   196 	// PPP connection 'inherited' error codes
   197 	//
   198 	EWapErrPppIfLRDBadLine			   = -3059,	// ??
   199 	EWapErrPppIfDNSNotFound			= -3058,	// ??
   200 	EWapErrPppIfCallbackNotAcceptable = -3057,	// NTRAS: client requested server Callback but was refused
   201 	EWapErrPppIfChangingPassword      = -3056,	// NTRAS: User's password is currently being changed
   202 	EWapErrPppIfNoDialInPermission    = -3055,	// NTRAS: User has not got dial-in permission on the server
   203 	EWapErrPppIfPasswdExpired         = -3054,	// NTRAS: User's password has expired
   204 	EWapErrPppIfRestrictedLogonHours  = -3053,	// NTRAS: User is attempting to log-in outside their hours
   205 	EWapErrPppIfAccountDisabled       = -3052,	// NTRAS: User's account has been disabled
   206 	EWapErrPppIfAuthNotSecure         = -3051,	// ??
   207 	EWapErrPppIfAuthenticationFailure = -3050,	// The supplied password was wrong??
   208 
   209 	//
   210 	// NetDial 'inherited' error codes
   211 	//
   212 	EWapErrNetDialScriptError	= -3005,	// NetDial Exit Condition - Script Error
   213 	EWapErrNetDialScriptTimeOut	= -3004,	// NetDial Exit Condition - Script Timed Out
   214 	EWapErrNetDialLoginFail		= -3003,	// NetDial Exit Condition - Login Failure
   215 	EWapErrNetDialModemError	= -3002,	// NetDial Exit Condition - Modem error
   216 	EWapErrNetDialNoModem		= -3001,	// NetDial Exit Condition - No Modem Response
   217 
   218 	//
   219 	// ETEL 'inherited' error codes
   220 	//
   221 	EWapErrEtelModemSettingsCorrupt		= -2018,
   222 	EWapErrEtelModemNotDetected			= -2017,
   223 	EWapErrEtelAnswerAlreadyOutstanding	= -2016,
   224 	EWapErrEtelUnknownModemCapability		= -2015,
   225 	EWapErrEtelWrongModemType				= -2014,
   226 	EWapErrEtelPortNotLoanedToClient		= -2013,
   227 	EWapErrEtelNotFaxOwner					= -2012,
   228 	EWapErrEtelFaxChunkNotCreated			= -2011,
   229 	EWapErrEtelConfigPortFailure			= -2010,
   230 	EWapErrEtelNoDialTone					= -2009,
   231 	EWapErrEtelNoAnswer					= -2008,
   232 	EWapErrEtelCallNotActive				= -2007,
   233 	EWapErrEtelInitialisationFailure		= -2006,
   234 	EWapErrEtelNoClientInterestedInThisCall= -2005,
   235 	EWapErrEtelBusyDetected				= -2004,
   236 	EWapErrEtelNoCarrier					= -2003,
   237 	EWapErrEtelAlreadyCallOwner			= -2002,
   238 	EWapErrEtelDuplicatePhoneName			= -2001,
   239 	EWapErrEtelNotCallOwner				= -2000,
   240 
   241 	//
   242 	// General EPOC 'inherited' error codes
   243 	//
   244 	EWapErrEpocTimedOut						= -33,
   245 	EWapErrEpocNotFound						= -1,
   246 	EWapErrEpocAccessDenied						= -21,
   247 
   248 	// 
   249 	// 
   250 	// Wap engine status messages
   251 	//
   252 	EWapStatusDownloadProgress = 1,		// Amount complete in aValue (0...100)
   253 	EWapStatusDownloadComplete,			// Document fetch is complete
   254 	EWapStatusSubDocumentChanged,		// XML subdocument (card in WML) has changed 
   255 	EWapStatusRefreshRequest,			// Observer is requested to refresh display
   256 	EWapStatusError,					// Error
   257 	EWapStatusInformational,			// Information other than download progress
   258 	EWapStatusInitialisingConnection	= KHttpPluginStatusBase,
   259 	EWapStatusConnecting				= KHttpPluginStatusBase + 1,
   260 	EWapStatusAuthenticating			= KHttpPluginStatusBase + 2,
   261 	EWapStatusConnected					= KHttpPluginStatusBase + 3,
   262 	EWapStatusDisconnecting				= KHttpPluginStatusBase + 4,
   263 	EWapStatusHttpAuthenticationFailed	= KHttpPluginStatusBase + 10,		// The user's password was rejected by the origin server
   264 	EWapStatusHttpAuthenticationAborted	= KHttpPluginStatusBase + 11,		// The user cancelled the password box
   265 	EWapStatusHttp_401_Unauthorized		= KHttpPluginStatusBase + 401,		// occurs when HTTP authentication is used, username/password dialogs raised as a response. Need to consider how UI deals with authentication failures here.
   266 	EWapStatusValidating				= KWapDocumentLoadStatusBase,		// Validating document
   267 	EWapStatusReceivingErrorDeck		= KWapDocumentLoadStatusBase + 1	// Receiving error deck
   268 
   269 } TWapEngineStatus;
   270 
   271 enum TWmlFetchFlag
   272 	{
   273 	EWmlFetchNoFlag		= 0x00,
   274 	EWmlFetchReload		= 0x01,
   275 	EWmlFetchTimerFetch	= 0x02
   276 	};
   277 
   278 #endif // __WAPENGINESTANDARD_H__