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