williamr@2: // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // WAP Engine Standard williamr@2: // Standard status codes used by data handlers and the WAP engine. Note that some are exact duplicates of error williamr@2: // codes from sub-components (e.g. HTTP) or from components outside of the WAP Browser (e.g. NetDial, ETEL) williamr@2: // williamr@2: // williamr@2: williamr@2: #ifndef __WAPENGINESTANDARD_H__ williamr@2: #define __WAPENGINESTANDARD_H__ williamr@2: williamr@2: // System includes williamr@2: // williamr@2: #include williamr@2: williamr@2: // williamr@2: // Status code offset for HTTP status values and stack connection progress williamr@2: // e.g. HTTP/200 becomes KHttpPluginStatusBase + 200 williamr@2: // williamr@2: const TInt KHttpPluginStatusBase = 1000; williamr@2: const TInt KWapDocumentLoadStatusBase = 2000; williamr@2: williamr@2: typedef enum TWapEngineStatus williamr@2: { williamr@2: // DRAFT williamr@2: // Some of these errors MAY be handled in the control level. williamr@2: williamr@2: // williamr@2: // HTTP/1.1 Status/Error codes from 40x and 50x series williamr@2: // williamr@2: 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. williamr@2: EWapErrHttp_504_GatewayTimeout = -20504, // not sure if this refers to Gateway in the WAP sense williamr@2: EWapErrHttp_503_ServiceUnavailable = -20503, // ? williamr@2: 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. williamr@2: EWapErrHttp_501_NotImplemented = -20501, // duh. Bad server. williamr@2: 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. williamr@2: williamr@2: EWapErrHttp_415_UnsupportedMediaType = -20415, // see RFC2068 williamr@2: EWapErrHttp_414_RequestUriTooLong = -20414, // report to user williamr@2: EWapErrHttp_413_RequestEntityTooLarge = -20413, // see RFC2068 williamr@2: EWapErrHttp_412_PreconditionFailed = -20412, // see RFC2068 williamr@2: EWapErrHttp_411_LengthRequired = -20411, // error in our use of HTTP if this occurs. williamr@2: EWapErrHttp_410_Gone = -20410, // like 404, except more definite! report to user. williamr@2: EWapErrHttp_409_Conflict = -20409, // see RFC2068 williamr@2: EWapErrHttp_408_RequestTimeout = -20408, // dealt with in HTTP, shouldn't have to be presented to the user williamr@2: EWapErrHttp_407_ProxyAuthenticationRequired = -20407,// - not sure, we don't correctly deal with this at the moment. Is it needed? williamr@2: 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. williamr@2: 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? williamr@2: 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! williamr@2: EWapErrHttp_403_Forbidden = -20403, // the server HTTPD does refuses to return the requested document, for internal reasons not necessarily disclosed to the client williamr@2: 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. williamr@2: // williamr@2: // // NOTE THAT HTTP/401 IS NOT TREATED AS AN ERROR, BECAUSE IT IS williamr@2: // // FULLY HANDLED IN HTTP - see HTTP status codes below williamr@2: // williamr@2: 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? williamr@2: williamr@2: // williamr@2: // HTTP Data Provider plug-in 'inherited' error codes williamr@2: // williamr@2: EWapErrHttpReceivingErrorDeck = -20014, // Could not find document, so receiving an error deck williamr@2: EWapErrHttpCancellationAbort = -20013, // Error code for leave when cancellation has occured during RunL() williamr@2: EWapErrHttpGatewaySessionDisconnect = -20012, // The session was disconnected by the WAP Gateway williamr@2: EWapErrHttpGatewayTransactionAbort = -20011, // A transaction was aborted by the gateway or the stack williamr@2: EWapErrHttpGatewayCannotBeReached = -20010, // A session could not be established with the WAP Gateway williamr@2: // Note that EWapErrHttpAuthenticationFailed and EWapErrHttpAuthenticationCancelled are now information status codes - see below. williamr@2: EWapErrHttpWtlsCipherRejected = -20009, // The user rejected the cipher strength negotiated in WTLS williamr@2: EWapErrHttpWtlsServerCertRejected = -20008, // The user rejected the certificate from the WAP GW williamr@2: EWapErrHttpWtlsBadServerCert = -20007, // WTLS rejected the certificate obtained from the WAP GW williamr@2: EWapErrHttpWtlsConfigFailed = -20006, // Failed to configure the WTLS layer of the WAP Stack williamr@2: EWapErrHttpNetDialSetupFailed = -20005, // Failed to configure Net Dial williamr@2: EWapErrHttpWapAPReadFailure = -20004, // An error occurred when reading the WAP AP from CommsDB williamr@2: EWapErrHttpUnsupportedMethod = -20003, // An HTTP method was specified that is not supported williamr@2: EWapErrHttpCannotFindPlugin = -20002, // Plug-in server failed to create an HTTP plugin williamr@2: EWapErrHttpCannotFindServer = -20001, // URL specified a non-existent or inaccessible domain williamr@2: EWapErrHttpGeneralError = -20000, // Unspecified error condition williamr@2: williamr@2: // williamr@2: // XMLLIB ERROR CODES williamr@2: // williamr@2: williamr@2: // XmlLib williamr@2: #define XmlLibErrorBase -13200 williamr@2: EWapErrXmlLibInvalidDocument = XmlLibErrorBase, williamr@2: EWapErrXmlLibDocumentBuffered = XmlLibErrorBase - 1, williamr@2: EWapErrXmlLibDocumentAlreadyValid = XmlLibErrorBase - 2, williamr@2: EWapErrXmlLibInvalidDTD = XmlLibErrorBase - 3, williamr@2: williamr@2: // Validator williamr@2: #define XmlValidatorErrorBase -13100 williamr@2: EWapErrXmlLibIllegalTagName = XmlValidatorErrorBase, williamr@2: EWapErrXmlLibIllegalFixedAttributeValue = XmlValidatorErrorBase - 1, williamr@2: EWapErrXmlLibMissingRequiredAttribute = XmlValidatorErrorBase - 2, williamr@2: EWapErrXmlLibMissingDocument = XmlValidatorErrorBase - 4, williamr@2: EWapErrXmlLibInvalidDocumentStructure = XmlValidatorErrorBase - 6, williamr@2: EWapErrXmlLibIllegalAttributeValue = XmlValidatorErrorBase - 7, williamr@2: williamr@2: // Parser williamr@2: #define XmlParserErrorBase -13000 williamr@2: EWapErrXmlLibMissingCDATASectionEndTag = XmlParserErrorBase, williamr@2: EWapErrXmlLibInvalidAttributeDeclaration = XmlParserErrorBase - 1, williamr@2: EWapErrXmlLibEndTagMismatch = XmlParserErrorBase - 2, williamr@2: EWapErrXmlLibInvalidCharacterReference = XmlParserErrorBase - 3, williamr@2: EWapErrXmlLibUnknownEntityReference = XmlParserErrorBase - 4, williamr@2: EWapErrXmlLibNoDTD = XmlParserErrorBase - 5, williamr@2: EWapErrXmlLibMissingDocumentRootNode = XmlParserErrorBase - 6, williamr@2: EWapErrXmlLibInvalidXmlVersionDefinition = XmlParserErrorBase - 7, williamr@2: EWapErrXmlLibRootElementNameMismatch = XmlParserErrorBase - 8, williamr@2: williamr@2: williamr@2: // williamr@2: // WMLLIB ERROR CODES williamr@2: // williamr@2: williamr@2: // WmlLib williamr@2: // No WmlLib (interface module) specific errors defined williamr@2: williamr@2: // Validator williamr@2: #define WmlValidatorErrorBase -12100 williamr@2: EWapErrWmlLibAccessViolation = WmlValidatorErrorBase - 1, williamr@2: EWapErrWmlLibInvalidVariableReference = WmlValidatorErrorBase - 2, williamr@2: EWapErrWmlLibInvalidConversionMethod = WmlValidatorErrorBase - 3, williamr@2: EWapErrWmlLibIllegalVariableName = WmlValidatorErrorBase - 4, williamr@2: EWapErrWmlLibIllegalTaskCountOnAnchor = WmlValidatorErrorBase - 5, williamr@2: EWapErrWmlLibNULLVariableName = WmlValidatorErrorBase - 6, williamr@2: EWapErrWmlLibNestedTables = WmlValidatorErrorBase - 7, williamr@2: EWapErrWmlLibDuplicateDoNodeName = WmlValidatorErrorBase - 8, williamr@2: EWapErrWmlLibUsageOfReservedWord = WmlValidatorErrorBase - 9, williamr@2: EWapErrWmlLibZeroTableColumns = WmlValidatorErrorBase - 10, williamr@2: EWapErrWmlLibNonWmlDocument = WmlValidatorErrorBase - 11, williamr@2: EWapErrWmlLibMultipleMetaPropertyName = WmlValidatorErrorBase - 12, williamr@2: EWapErrWmlLibEventBindingConflict = WmlValidatorErrorBase - 14, williamr@2: EWapErrWmlLibMultipleAccessElements = WmlValidatorErrorBase - 15, williamr@2: EWapErrWmlLibNonUniqueIds = WmlValidatorErrorBase - 16, williamr@2: EWapErrWmlLibVariableInInvalidLocation = WmlValidatorErrorBase - 17, williamr@2: williamr@2: // Parser williamr@2: #define WmlParserErrorBase -12000 williamr@2: EWapErrWmlLibNullNode = WmlParserErrorBase, williamr@2: EWapErrWmlLibCDATANodeWithoutParent = WmlParserErrorBase - 1, williamr@2: williamr@2: williamr@2: // williamr@2: // WAP Engine 'native' error codes williamr@2: // williamr@2: EWapErrSubDocumentNotFound = -10027, williamr@2: EWapErrCannotCreateDeck = -10026, // Failed to create a deck williamr@2: EWapErrMimeTypeMissing = -10025, // Engine tried to access the mime-type attribute in a williamr@2: // tree node but it was missing williamr@2: EWapErrUnknownDocument = -10024, williamr@2: EWapErrInvalidDTD = -10023, williamr@2: EWapErrDTDUnavailable = -10022, // Document cannot be validated as DTD is not available williamr@2: williamr@2: EWapErrUnknownScheme = -10021, // unknown scheme williamr@2: EWapErrCorruptScheme = -10020, // scheme contains invalid characters williamr@2: EWapErrCorruptUrl = -10019, // part of url contains invalid characters williamr@2: williamr@2: EWapErrPluginNotFound = -10018, // couldn't find the requested plugin williamr@2: williamr@2: EWapErrImageConversionFailed = -10017, // image data handler got error from media server williamr@2: williamr@2: EWapErrAccessPointNotSetUpForCSD = -10016, // Access point lacked info for Data call williamr@2: EWapErrAccessPointNotSetUpForSMS = -10015, williamr@2: EWapErrAccessPointNotSetUpForUSSD = -10014, williamr@2: EWapErrAccessPointNotSetUpGeneric = -10013, williamr@2: EWapErrProtocolNotSupported = -10012, // Current network does not support the requested service williamr@2: williamr@2: EWapErrAuthorizationFailed = -10011, williamr@2: williamr@2: EWapErrScriptObscureLibraryCall = -10010, // The script function was unavailable williamr@2: EWapErrScriptIllegalAction = -10009, // The script attempted an illegal action and was terminated williamr@2: EWapErrScriptCorrupt = -10008, // Script had errors williamr@2: EWapErrScriptError = -10007, // Script returned a fatal error williamr@2: EWapErrScriptNotFound = -10006, // Requested script was not found williamr@2: williamr@2: EWapErrDataCallUnavailable = -10005, // The data call is being used by another application williamr@2: EWapErrDataCallDropped = -10004, // CSD connection was closed williamr@2: williamr@2: EWapErrAccessViolation = -10003, // Access to the document was denied williamr@2: EWapErrDocumentCorrupted = -10002, williamr@2: EWapErrDocumentNotFound = -10001, williamr@2: EWapErrGeneral = -10000, williamr@2: williamr@2: // williamr@2: // PPP connection 'inherited' error codes williamr@2: // williamr@2: EWapErrPppIfLRDBadLine = -3059, // ?? williamr@2: EWapErrPppIfDNSNotFound = -3058, // ?? williamr@2: EWapErrPppIfCallbackNotAcceptable = -3057, // NTRAS: client requested server Callback but was refused williamr@2: EWapErrPppIfChangingPassword = -3056, // NTRAS: User's password is currently being changed williamr@2: EWapErrPppIfNoDialInPermission = -3055, // NTRAS: User has not got dial-in permission on the server williamr@2: EWapErrPppIfPasswdExpired = -3054, // NTRAS: User's password has expired williamr@2: EWapErrPppIfRestrictedLogonHours = -3053, // NTRAS: User is attempting to log-in outside their hours williamr@2: EWapErrPppIfAccountDisabled = -3052, // NTRAS: User's account has been disabled williamr@2: EWapErrPppIfAuthNotSecure = -3051, // ?? williamr@2: EWapErrPppIfAuthenticationFailure = -3050, // The supplied password was wrong?? williamr@2: williamr@2: // williamr@2: // NetDial 'inherited' error codes williamr@2: // williamr@2: EWapErrNetDialScriptError = -3005, // NetDial Exit Condition - Script Error williamr@2: EWapErrNetDialScriptTimeOut = -3004, // NetDial Exit Condition - Script Timed Out williamr@2: EWapErrNetDialLoginFail = -3003, // NetDial Exit Condition - Login Failure williamr@2: EWapErrNetDialModemError = -3002, // NetDial Exit Condition - Modem error williamr@2: EWapErrNetDialNoModem = -3001, // NetDial Exit Condition - No Modem Response williamr@2: williamr@2: // williamr@2: // ETEL 'inherited' error codes williamr@2: // williamr@2: EWapErrEtelModemSettingsCorrupt = -2018, williamr@2: EWapErrEtelModemNotDetected = -2017, williamr@2: EWapErrEtelAnswerAlreadyOutstanding = -2016, williamr@2: EWapErrEtelUnknownModemCapability = -2015, williamr@2: EWapErrEtelWrongModemType = -2014, williamr@2: EWapErrEtelPortNotLoanedToClient = -2013, williamr@2: EWapErrEtelNotFaxOwner = -2012, williamr@2: EWapErrEtelFaxChunkNotCreated = -2011, williamr@2: EWapErrEtelConfigPortFailure = -2010, williamr@2: EWapErrEtelNoDialTone = -2009, williamr@2: EWapErrEtelNoAnswer = -2008, williamr@2: EWapErrEtelCallNotActive = -2007, williamr@2: EWapErrEtelInitialisationFailure = -2006, williamr@2: EWapErrEtelNoClientInterestedInThisCall= -2005, williamr@2: EWapErrEtelBusyDetected = -2004, williamr@2: EWapErrEtelNoCarrier = -2003, williamr@2: EWapErrEtelAlreadyCallOwner = -2002, williamr@2: EWapErrEtelDuplicatePhoneName = -2001, williamr@2: EWapErrEtelNotCallOwner = -2000, williamr@2: williamr@2: // williamr@2: // General EPOC 'inherited' error codes williamr@2: // williamr@2: EWapErrEpocTimedOut = -33, williamr@2: EWapErrEpocNotFound = -1, williamr@2: EWapErrEpocAccessDenied = -21, williamr@2: williamr@2: // williamr@2: // williamr@2: // Wap engine status messages williamr@2: // williamr@2: EWapStatusDownloadProgress = 1, // Amount complete in aValue (0...100) williamr@2: EWapStatusDownloadComplete, // Document fetch is complete williamr@2: EWapStatusSubDocumentChanged, // XML subdocument (card in WML) has changed williamr@2: EWapStatusRefreshRequest, // Observer is requested to refresh display williamr@2: EWapStatusError, // Error williamr@2: EWapStatusInformational, // Information other than download progress williamr@2: EWapStatusInitialisingConnection = KHttpPluginStatusBase, williamr@2: EWapStatusConnecting = KHttpPluginStatusBase + 1, williamr@2: EWapStatusAuthenticating = KHttpPluginStatusBase + 2, williamr@2: EWapStatusConnected = KHttpPluginStatusBase + 3, williamr@2: EWapStatusDisconnecting = KHttpPluginStatusBase + 4, williamr@2: EWapStatusHttpAuthenticationFailed = KHttpPluginStatusBase + 10, // The user's password was rejected by the origin server williamr@2: EWapStatusHttpAuthenticationAborted = KHttpPluginStatusBase + 11, // The user cancelled the password box williamr@2: 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. williamr@2: EWapStatusValidating = KWapDocumentLoadStatusBase, // Validating document williamr@2: EWapStatusReceivingErrorDeck = KWapDocumentLoadStatusBase + 1 // Receiving error deck williamr@2: williamr@2: } TWapEngineStatus; williamr@2: williamr@2: enum TWmlFetchFlag williamr@2: { williamr@2: EWmlFetchNoFlag = 0x00, williamr@2: EWmlFetchReload = 0x01, williamr@2: EWmlFetchTimerFetch = 0x02 williamr@2: }; williamr@2: williamr@2: #endif // __WAPENGINESTANDARD_H__