williamr@2: // Copyright (c) 1998-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@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.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: // Purpose: This file sets the values for HTTP's return/error codes and williamr@2: // panic codes. williamr@2: // williamr@2: // williamr@2: williamr@2: #if !defined(__HTTPSTD_H__) williamr@2: #define __HTTPSTD_H__ williamr@2: williamr@2: // System includes williamr@2: // williamr@2: #if !defined(__E32STD_H__) williamr@2: #include williamr@2: #endif williamr@2: #if !defined(__WAPENGSTD_H__) williamr@2: #include williamr@2: #endif williamr@2: williamr@2: enum williamr@2: /** williamr@2: Base values of code ranges williamr@2: @publishedAll williamr@2: @deprecated williamr@2: */{ williamr@2: EHttpRetCodeBase = -20000, williamr@2: EHttpPanicCodeBase = EHttpRetCodeBase - 200 williamr@2: }; williamr@2: williamr@2: typedef enum williamr@2: /** williamr@2: Return/leave codes for HTTPUTIL and HTTP plugins williamr@2: @publishedAll williamr@2: @deprecated williamr@2: */ williamr@2: { williamr@2: // Informational (+ve) status codes williamr@2: EHttp_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: EHttpAuthenticationAborted = KHttpPluginStatusBase + 11,// The user cancelled the password box williamr@2: EHttpAuthenticationFailed = KHttpPluginStatusBase + 10,// The user's password was rejected by the origin server williamr@2: EHttpNoError = KErrNone, // No error williamr@2: // Error (-ve) status codes williamr@2: EHttpGeneralError = EHttpRetCodeBase, // Unspecified error condition williamr@2: EHttpCannotFindServer = EHttpRetCodeBase - 1, // URL specified a non-existent or inaccessible domain williamr@2: EHttpCannotFindPlugin = EHttpRetCodeBase - 2, // Plug-in server failed to create an HTTP plugin williamr@2: EHttpUnsupportedMethod = EHttpRetCodeBase - 3, // An HTTP method was specified that is not supported williamr@2: EHttpWapAPReadFailure = EHttpRetCodeBase - 4, // An error occurred when reading the WAP AP from CommsDB williamr@2: EHttpNetDialSetupFailed = EHttpRetCodeBase - 5, // Failed to configure Net Dial williamr@2: EHttpWtlsConfigFailed = EHttpRetCodeBase - 6, // Failed to configure the WTLS layer of the WAP Stack williamr@2: EHttpWtlsBadServerCert = EHttpRetCodeBase - 7, // WTLS rejected the certificate obtained from the WAP GW williamr@2: EHttpWtlsServerCertRejected = EHttpRetCodeBase - 8, // The user rejected the certificate from the WAP GW williamr@2: EHttpWtlsCipherRejected = EHttpRetCodeBase - 9, // The user rejected the cipher strength negotiated in WTLS williamr@2: EHttpGatewayCannotBeReached = EHttpRetCodeBase - 10,// A session could not be established with the WAP Gateway williamr@2: EHttpGatewayTransactionAbort = EHttpRetCodeBase - 11,// A transaction was aborted by the gateway or the stack williamr@2: EHttpGatewaySessionDisconnect = EHttpRetCodeBase - 12,// The session was disconnected by the WAP Gateway williamr@2: EHttpCancellationAbort = EHttpRetCodeBase - 13,// Error code for leave when cancellation has occured during RunL() williamr@2: EHttpReceivingErrorDeck = EHttpRetCodeBase - 14 // Could not find document, so receiving an error deck williamr@2: } THttpReturnCode; williamr@2: williamr@2: // Note that HTTP Status codes series 40x and 50x are error conditions. They williamr@2: // will be added to the EHttpRetCodeBase to send to the HTTP Data Provider williamr@2: // observer. e.g. HTTP/404 will become EHttpRetCodeBase-404 = -20404. The williamr@2: // exception to this rule is HTTP/401, which gets fully handled in HTTP and williamr@2: // so is treated above as an informational status message. williamr@2: williamr@2: typedef enum williamr@2: /** williamr@2: Panic codes for HTTPUTIL and HTTP plugins williamr@2: @publishedAll williamr@2: @deprecated williamr@2: */ williamr@2: { williamr@2: EHttpGeneralPanic = EHttpPanicCodeBase, // Unspecified panic condition williamr@2: EHttpDialInNotSupported = EHttpPanicCodeBase - 1, // The WAP Access Point specified a dial-in ISP! williamr@2: EHttpWapAccessPointInfoChanged = EHttpPanicCodeBase - 2, // The WAP AP info changed between initial read and williamr@2: // the subsequent NetDial override (debug only) williamr@2: EHttpCommDBContainsBadData = EHttpPanicCodeBase - 3, // Comms DB contains garbled/inconsistent WAP AP data williamr@2: EHttpConnectionLessNotSupported = EHttpPanicCodeBase - 4, // Comms DB specified a CL mode, which isn't available (yet) williamr@2: EHttpNoHandlerAvailable = EHttpPanicCodeBase - 5, // Very bad situation for HTTP Methods williamr@2: EHttpResourceFileLoadFailed = EHttpPanicCodeBase - 6, // Resource file missing or corrupt williamr@2: EHttpReservedForFutureExpansion = EHttpPanicCodeBase - 7 // Feature not available - reserved for BC only williamr@2: } THttpPanicCode; williamr@2: williamr@2: williamr@2: #endif // __HTTPSTD_H__