1.1 --- a/epoc32/include/wapengstd.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,278 +0,0 @@
1.4 -// Copyright (c) 1999-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 -// WAP Engine Standard
1.18 -// Standard status codes used by data handlers and the WAP engine. Note that some are exact duplicates of error
1.19 -// codes from sub-components (e.g. HTTP) or from components outside of the WAP Browser (e.g. NetDial, ETEL)
1.20 -//
1.21 -//
1.22 -
1.23 -#ifndef __WAPENGINESTANDARD_H__
1.24 -#define __WAPENGINESTANDARD_H__
1.25 -
1.26 -// System includes
1.27 -//
1.28 -#include <e32std.h>
1.29 -
1.30 -//
1.31 -// Status code offset for HTTP status values and stack connection progress
1.32 -// e.g. HTTP/200 becomes KHttpPluginStatusBase + 200
1.33 -//
1.34 -const TInt KHttpPluginStatusBase = 1000;
1.35 -const TInt KWapDocumentLoadStatusBase = 2000;
1.36 -
1.37 -typedef enum TWapEngineStatus
1.38 -{
1.39 - // DRAFT
1.40 - // Some of these errors MAY be handled in the control level.
1.41 -
1.42 - //
1.43 - // HTTP/1.1 Status/Error codes from 40x and 50x series
1.44 - //
1.45 - 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.
1.46 - EWapErrHttp_504_GatewayTimeout = -20504, // not sure if this refers to Gateway in the WAP sense
1.47 - EWapErrHttp_503_ServiceUnavailable = -20503, // ?
1.48 - 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.
1.49 - EWapErrHttp_501_NotImplemented = -20501, // duh. Bad server.
1.50 - 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.
1.51 -
1.52 - EWapErrHttp_415_UnsupportedMediaType = -20415, // see RFC2068
1.53 - EWapErrHttp_414_RequestUriTooLong = -20414, // report to user
1.54 - EWapErrHttp_413_RequestEntityTooLarge = -20413, // see RFC2068
1.55 - EWapErrHttp_412_PreconditionFailed = -20412, // see RFC2068
1.56 - EWapErrHttp_411_LengthRequired = -20411, // error in our use of HTTP if this occurs.
1.57 - EWapErrHttp_410_Gone = -20410, // like 404, except more definite! report to user.
1.58 - EWapErrHttp_409_Conflict = -20409, // see RFC2068
1.59 - EWapErrHttp_408_RequestTimeout = -20408, // dealt with in HTTP, shouldn't have to be presented to the user
1.60 - EWapErrHttp_407_ProxyAuthenticationRequired = -20407,// - not sure, we don't correctly deal with this at the moment. Is it needed?
1.61 - 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.
1.62 - 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?
1.63 - 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!
1.64 - EWapErrHttp_403_Forbidden = -20403, // the server HTTPD does refuses to return the requested document, for internal reasons not necessarily disclosed to the client
1.65 - 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.
1.66 -//
1.67 -// // NOTE THAT HTTP/401 IS NOT TREATED AS AN ERROR, BECAUSE IT IS
1.68 -// // FULLY HANDLED IN HTTP - see HTTP status codes below
1.69 -//
1.70 - 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?
1.71 -
1.72 - //
1.73 - // HTTP Data Provider plug-in 'inherited' error codes
1.74 - //
1.75 - EWapErrHttpReceivingErrorDeck = -20014, // Could not find document, so receiving an error deck
1.76 - EWapErrHttpCancellationAbort = -20013, // Error code for leave when cancellation has occured during RunL()
1.77 - EWapErrHttpGatewaySessionDisconnect = -20012, // The session was disconnected by the WAP Gateway
1.78 - EWapErrHttpGatewayTransactionAbort = -20011, // A transaction was aborted by the gateway or the stack
1.79 - EWapErrHttpGatewayCannotBeReached = -20010, // A session could not be established with the WAP Gateway
1.80 - // Note that EWapErrHttpAuthenticationFailed and EWapErrHttpAuthenticationCancelled are now information status codes - see below.
1.81 - EWapErrHttpWtlsCipherRejected = -20009, // The user rejected the cipher strength negotiated in WTLS
1.82 - EWapErrHttpWtlsServerCertRejected = -20008, // The user rejected the certificate from the WAP GW
1.83 - EWapErrHttpWtlsBadServerCert = -20007, // WTLS rejected the certificate obtained from the WAP GW
1.84 - EWapErrHttpWtlsConfigFailed = -20006, // Failed to configure the WTLS layer of the WAP Stack
1.85 - EWapErrHttpNetDialSetupFailed = -20005, // Failed to configure Net Dial
1.86 - EWapErrHttpWapAPReadFailure = -20004, // An error occurred when reading the WAP AP from CommsDB
1.87 - EWapErrHttpUnsupportedMethod = -20003, // An HTTP method was specified that is not supported
1.88 - EWapErrHttpCannotFindPlugin = -20002, // Plug-in server failed to create an HTTP plugin
1.89 - EWapErrHttpCannotFindServer = -20001, // URL specified a non-existent or inaccessible domain
1.90 - EWapErrHttpGeneralError = -20000, // Unspecified error condition
1.91 -
1.92 - //
1.93 - // XMLLIB ERROR CODES
1.94 - //
1.95 -
1.96 - // XmlLib
1.97 -#define XmlLibErrorBase -13200
1.98 - EWapErrXmlLibInvalidDocument = XmlLibErrorBase,
1.99 - EWapErrXmlLibDocumentBuffered = XmlLibErrorBase - 1,
1.100 - EWapErrXmlLibDocumentAlreadyValid = XmlLibErrorBase - 2,
1.101 - EWapErrXmlLibInvalidDTD = XmlLibErrorBase - 3,
1.102 -
1.103 - // Validator
1.104 -#define XmlValidatorErrorBase -13100
1.105 - EWapErrXmlLibIllegalTagName = XmlValidatorErrorBase,
1.106 - EWapErrXmlLibIllegalFixedAttributeValue = XmlValidatorErrorBase - 1,
1.107 - EWapErrXmlLibMissingRequiredAttribute = XmlValidatorErrorBase - 2,
1.108 - EWapErrXmlLibMissingDocument = XmlValidatorErrorBase - 4,
1.109 - EWapErrXmlLibInvalidDocumentStructure = XmlValidatorErrorBase - 6,
1.110 - EWapErrXmlLibIllegalAttributeValue = XmlValidatorErrorBase - 7,
1.111 -
1.112 - // Parser
1.113 -#define XmlParserErrorBase -13000
1.114 - EWapErrXmlLibMissingCDATASectionEndTag = XmlParserErrorBase,
1.115 - EWapErrXmlLibInvalidAttributeDeclaration = XmlParserErrorBase - 1,
1.116 - EWapErrXmlLibEndTagMismatch = XmlParserErrorBase - 2,
1.117 - EWapErrXmlLibInvalidCharacterReference = XmlParserErrorBase - 3,
1.118 - EWapErrXmlLibUnknownEntityReference = XmlParserErrorBase - 4,
1.119 - EWapErrXmlLibNoDTD = XmlParserErrorBase - 5,
1.120 - EWapErrXmlLibMissingDocumentRootNode = XmlParserErrorBase - 6,
1.121 - EWapErrXmlLibInvalidXmlVersionDefinition = XmlParserErrorBase - 7,
1.122 - EWapErrXmlLibRootElementNameMismatch = XmlParserErrorBase - 8,
1.123 -
1.124 -
1.125 - //
1.126 - // WMLLIB ERROR CODES
1.127 - //
1.128 -
1.129 - // WmlLib
1.130 - // No WmlLib (interface module) specific errors defined
1.131 -
1.132 - // Validator
1.133 -#define WmlValidatorErrorBase -12100
1.134 - EWapErrWmlLibAccessViolation = WmlValidatorErrorBase - 1,
1.135 - EWapErrWmlLibInvalidVariableReference = WmlValidatorErrorBase - 2,
1.136 - EWapErrWmlLibInvalidConversionMethod = WmlValidatorErrorBase - 3,
1.137 - EWapErrWmlLibIllegalVariableName = WmlValidatorErrorBase - 4,
1.138 - EWapErrWmlLibIllegalTaskCountOnAnchor = WmlValidatorErrorBase - 5,
1.139 - EWapErrWmlLibNULLVariableName = WmlValidatorErrorBase - 6,
1.140 - EWapErrWmlLibNestedTables = WmlValidatorErrorBase - 7,
1.141 - EWapErrWmlLibDuplicateDoNodeName = WmlValidatorErrorBase - 8,
1.142 - EWapErrWmlLibUsageOfReservedWord = WmlValidatorErrorBase - 9,
1.143 - EWapErrWmlLibZeroTableColumns = WmlValidatorErrorBase - 10,
1.144 - EWapErrWmlLibNonWmlDocument = WmlValidatorErrorBase - 11,
1.145 - EWapErrWmlLibMultipleMetaPropertyName = WmlValidatorErrorBase - 12,
1.146 - EWapErrWmlLibEventBindingConflict = WmlValidatorErrorBase - 14,
1.147 - EWapErrWmlLibMultipleAccessElements = WmlValidatorErrorBase - 15,
1.148 - EWapErrWmlLibNonUniqueIds = WmlValidatorErrorBase - 16,
1.149 - EWapErrWmlLibVariableInInvalidLocation = WmlValidatorErrorBase - 17,
1.150 -
1.151 - // Parser
1.152 -#define WmlParserErrorBase -12000
1.153 - EWapErrWmlLibNullNode = WmlParserErrorBase,
1.154 - EWapErrWmlLibCDATANodeWithoutParent = WmlParserErrorBase - 1,
1.155 -
1.156 -
1.157 - //
1.158 - // WAP Engine 'native' error codes
1.159 - //
1.160 - EWapErrSubDocumentNotFound = -10027,
1.161 - EWapErrCannotCreateDeck = -10026, // Failed to create a deck
1.162 - EWapErrMimeTypeMissing = -10025, // Engine tried to access the mime-type attribute in a
1.163 - // tree node but it was missing
1.164 - EWapErrUnknownDocument = -10024,
1.165 - EWapErrInvalidDTD = -10023,
1.166 - EWapErrDTDUnavailable = -10022, // Document cannot be validated as DTD is not available
1.167 -
1.168 - EWapErrUnknownScheme = -10021, // unknown scheme
1.169 - EWapErrCorruptScheme = -10020, // scheme contains invalid characters
1.170 - EWapErrCorruptUrl = -10019, // part of url contains invalid characters
1.171 -
1.172 - EWapErrPluginNotFound = -10018, // couldn't find the requested plugin
1.173 -
1.174 - EWapErrImageConversionFailed = -10017, // image data handler got error from media server
1.175 -
1.176 - EWapErrAccessPointNotSetUpForCSD = -10016, // Access point lacked info for Data call
1.177 - EWapErrAccessPointNotSetUpForSMS = -10015,
1.178 - EWapErrAccessPointNotSetUpForUSSD = -10014,
1.179 - EWapErrAccessPointNotSetUpGeneric = -10013,
1.180 - EWapErrProtocolNotSupported = -10012, // Current network does not support the requested service
1.181 -
1.182 - EWapErrAuthorizationFailed = -10011,
1.183 -
1.184 - EWapErrScriptObscureLibraryCall = -10010, // The script function was unavailable
1.185 - EWapErrScriptIllegalAction = -10009, // The script attempted an illegal action and was terminated
1.186 - EWapErrScriptCorrupt = -10008, // Script had errors
1.187 - EWapErrScriptError = -10007, // Script returned a fatal error
1.188 - EWapErrScriptNotFound = -10006, // Requested script was not found
1.189 -
1.190 - EWapErrDataCallUnavailable = -10005, // The data call is being used by another application
1.191 - EWapErrDataCallDropped = -10004, // CSD connection was closed
1.192 -
1.193 - EWapErrAccessViolation = -10003, // Access to the document was denied
1.194 - EWapErrDocumentCorrupted = -10002,
1.195 - EWapErrDocumentNotFound = -10001,
1.196 - EWapErrGeneral = -10000,
1.197 -
1.198 - //
1.199 - // PPP connection 'inherited' error codes
1.200 - //
1.201 - EWapErrPppIfLRDBadLine = -3059, // ??
1.202 - EWapErrPppIfDNSNotFound = -3058, // ??
1.203 - EWapErrPppIfCallbackNotAcceptable = -3057, // NTRAS: client requested server Callback but was refused
1.204 - EWapErrPppIfChangingPassword = -3056, // NTRAS: User's password is currently being changed
1.205 - EWapErrPppIfNoDialInPermission = -3055, // NTRAS: User has not got dial-in permission on the server
1.206 - EWapErrPppIfPasswdExpired = -3054, // NTRAS: User's password has expired
1.207 - EWapErrPppIfRestrictedLogonHours = -3053, // NTRAS: User is attempting to log-in outside their hours
1.208 - EWapErrPppIfAccountDisabled = -3052, // NTRAS: User's account has been disabled
1.209 - EWapErrPppIfAuthNotSecure = -3051, // ??
1.210 - EWapErrPppIfAuthenticationFailure = -3050, // The supplied password was wrong??
1.211 -
1.212 - //
1.213 - // NetDial 'inherited' error codes
1.214 - //
1.215 - EWapErrNetDialScriptError = -3005, // NetDial Exit Condition - Script Error
1.216 - EWapErrNetDialScriptTimeOut = -3004, // NetDial Exit Condition - Script Timed Out
1.217 - EWapErrNetDialLoginFail = -3003, // NetDial Exit Condition - Login Failure
1.218 - EWapErrNetDialModemError = -3002, // NetDial Exit Condition - Modem error
1.219 - EWapErrNetDialNoModem = -3001, // NetDial Exit Condition - No Modem Response
1.220 -
1.221 - //
1.222 - // ETEL 'inherited' error codes
1.223 - //
1.224 - EWapErrEtelModemSettingsCorrupt = -2018,
1.225 - EWapErrEtelModemNotDetected = -2017,
1.226 - EWapErrEtelAnswerAlreadyOutstanding = -2016,
1.227 - EWapErrEtelUnknownModemCapability = -2015,
1.228 - EWapErrEtelWrongModemType = -2014,
1.229 - EWapErrEtelPortNotLoanedToClient = -2013,
1.230 - EWapErrEtelNotFaxOwner = -2012,
1.231 - EWapErrEtelFaxChunkNotCreated = -2011,
1.232 - EWapErrEtelConfigPortFailure = -2010,
1.233 - EWapErrEtelNoDialTone = -2009,
1.234 - EWapErrEtelNoAnswer = -2008,
1.235 - EWapErrEtelCallNotActive = -2007,
1.236 - EWapErrEtelInitialisationFailure = -2006,
1.237 - EWapErrEtelNoClientInterestedInThisCall= -2005,
1.238 - EWapErrEtelBusyDetected = -2004,
1.239 - EWapErrEtelNoCarrier = -2003,
1.240 - EWapErrEtelAlreadyCallOwner = -2002,
1.241 - EWapErrEtelDuplicatePhoneName = -2001,
1.242 - EWapErrEtelNotCallOwner = -2000,
1.243 -
1.244 - //
1.245 - // General EPOC 'inherited' error codes
1.246 - //
1.247 - EWapErrEpocTimedOut = -33,
1.248 - EWapErrEpocNotFound = -1,
1.249 - EWapErrEpocAccessDenied = -21,
1.250 -
1.251 - //
1.252 - //
1.253 - // Wap engine status messages
1.254 - //
1.255 - EWapStatusDownloadProgress = 1, // Amount complete in aValue (0...100)
1.256 - EWapStatusDownloadComplete, // Document fetch is complete
1.257 - EWapStatusSubDocumentChanged, // XML subdocument (card in WML) has changed
1.258 - EWapStatusRefreshRequest, // Observer is requested to refresh display
1.259 - EWapStatusError, // Error
1.260 - EWapStatusInformational, // Information other than download progress
1.261 - EWapStatusInitialisingConnection = KHttpPluginStatusBase,
1.262 - EWapStatusConnecting = KHttpPluginStatusBase + 1,
1.263 - EWapStatusAuthenticating = KHttpPluginStatusBase + 2,
1.264 - EWapStatusConnected = KHttpPluginStatusBase + 3,
1.265 - EWapStatusDisconnecting = KHttpPluginStatusBase + 4,
1.266 - EWapStatusHttpAuthenticationFailed = KHttpPluginStatusBase + 10, // The user's password was rejected by the origin server
1.267 - EWapStatusHttpAuthenticationAborted = KHttpPluginStatusBase + 11, // The user cancelled the password box
1.268 - 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.
1.269 - EWapStatusValidating = KWapDocumentLoadStatusBase, // Validating document
1.270 - EWapStatusReceivingErrorDeck = KWapDocumentLoadStatusBase + 1 // Receiving error deck
1.271 -
1.272 -} TWapEngineStatus;
1.273 -
1.274 -enum TWmlFetchFlag
1.275 - {
1.276 - EWmlFetchNoFlag = 0x00,
1.277 - EWmlFetchReload = 0x01,
1.278 - EWmlFetchTimerFetch = 0x02
1.279 - };
1.280 -
1.281 -#endif // __WAPENGINESTANDARD_H__