williamr@2
|
1 |
// Copyright (c) 1998-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 |
// Purpose: This file sets the values for HTTP's return/error codes and
|
williamr@2
|
15 |
// panic codes.
|
williamr@2
|
16 |
//
|
williamr@2
|
17 |
//
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#if !defined(__HTTPSTD_H__)
|
williamr@2
|
20 |
#define __HTTPSTD_H__
|
williamr@2
|
21 |
|
williamr@2
|
22 |
// System includes
|
williamr@2
|
23 |
//
|
williamr@2
|
24 |
#if !defined(__E32STD_H__)
|
williamr@2
|
25 |
#include <e32std.h>
|
williamr@2
|
26 |
#endif
|
williamr@2
|
27 |
#if !defined(__WAPENGSTD_H__)
|
williamr@2
|
28 |
#include <wapengstd.h>
|
williamr@2
|
29 |
#endif
|
williamr@2
|
30 |
|
williamr@2
|
31 |
enum
|
williamr@2
|
32 |
/**
|
williamr@2
|
33 |
Base values of code ranges
|
williamr@2
|
34 |
@publishedAll
|
williamr@2
|
35 |
@deprecated
|
williamr@2
|
36 |
*/{
|
williamr@2
|
37 |
EHttpRetCodeBase = -20000,
|
williamr@2
|
38 |
EHttpPanicCodeBase = EHttpRetCodeBase - 200
|
williamr@2
|
39 |
};
|
williamr@2
|
40 |
|
williamr@2
|
41 |
typedef enum
|
williamr@2
|
42 |
/**
|
williamr@2
|
43 |
Return/leave codes for HTTPUTIL and HTTP plugins
|
williamr@2
|
44 |
@publishedAll
|
williamr@2
|
45 |
@deprecated
|
williamr@2
|
46 |
*/
|
williamr@2
|
47 |
{
|
williamr@2
|
48 |
// Informational (+ve) status codes
|
williamr@2
|
49 |
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
|
50 |
EHttpAuthenticationAborted = KHttpPluginStatusBase + 11,// The user cancelled the password box
|
williamr@2
|
51 |
EHttpAuthenticationFailed = KHttpPluginStatusBase + 10,// The user's password was rejected by the origin server
|
williamr@2
|
52 |
EHttpNoError = KErrNone, // No error
|
williamr@2
|
53 |
// Error (-ve) status codes
|
williamr@2
|
54 |
EHttpGeneralError = EHttpRetCodeBase, // Unspecified error condition
|
williamr@2
|
55 |
EHttpCannotFindServer = EHttpRetCodeBase - 1, // URL specified a non-existent or inaccessible domain
|
williamr@2
|
56 |
EHttpCannotFindPlugin = EHttpRetCodeBase - 2, // Plug-in server failed to create an HTTP plugin
|
williamr@2
|
57 |
EHttpUnsupportedMethod = EHttpRetCodeBase - 3, // An HTTP method was specified that is not supported
|
williamr@2
|
58 |
EHttpWapAPReadFailure = EHttpRetCodeBase - 4, // An error occurred when reading the WAP AP from CommsDB
|
williamr@2
|
59 |
EHttpNetDialSetupFailed = EHttpRetCodeBase - 5, // Failed to configure Net Dial
|
williamr@2
|
60 |
EHttpWtlsConfigFailed = EHttpRetCodeBase - 6, // Failed to configure the WTLS layer of the WAP Stack
|
williamr@2
|
61 |
EHttpWtlsBadServerCert = EHttpRetCodeBase - 7, // WTLS rejected the certificate obtained from the WAP GW
|
williamr@2
|
62 |
EHttpWtlsServerCertRejected = EHttpRetCodeBase - 8, // The user rejected the certificate from the WAP GW
|
williamr@2
|
63 |
EHttpWtlsCipherRejected = EHttpRetCodeBase - 9, // The user rejected the cipher strength negotiated in WTLS
|
williamr@2
|
64 |
EHttpGatewayCannotBeReached = EHttpRetCodeBase - 10,// A session could not be established with the WAP Gateway
|
williamr@2
|
65 |
EHttpGatewayTransactionAbort = EHttpRetCodeBase - 11,// A transaction was aborted by the gateway or the stack
|
williamr@2
|
66 |
EHttpGatewaySessionDisconnect = EHttpRetCodeBase - 12,// The session was disconnected by the WAP Gateway
|
williamr@2
|
67 |
EHttpCancellationAbort = EHttpRetCodeBase - 13,// Error code for leave when cancellation has occured during RunL()
|
williamr@2
|
68 |
EHttpReceivingErrorDeck = EHttpRetCodeBase - 14 // Could not find document, so receiving an error deck
|
williamr@2
|
69 |
} THttpReturnCode;
|
williamr@2
|
70 |
|
williamr@2
|
71 |
// Note that HTTP Status codes series 40x and 50x are error conditions. They
|
williamr@2
|
72 |
// will be added to the EHttpRetCodeBase to send to the HTTP Data Provider
|
williamr@2
|
73 |
// observer. e.g. HTTP/404 will become EHttpRetCodeBase-404 = -20404. The
|
williamr@2
|
74 |
// exception to this rule is HTTP/401, which gets fully handled in HTTP and
|
williamr@2
|
75 |
// so is treated above as an informational status message.
|
williamr@2
|
76 |
|
williamr@2
|
77 |
typedef enum
|
williamr@2
|
78 |
/**
|
williamr@2
|
79 |
Panic codes for HTTPUTIL and HTTP plugins
|
williamr@2
|
80 |
@publishedAll
|
williamr@2
|
81 |
@deprecated
|
williamr@2
|
82 |
*/
|
williamr@2
|
83 |
{
|
williamr@2
|
84 |
EHttpGeneralPanic = EHttpPanicCodeBase, // Unspecified panic condition
|
williamr@2
|
85 |
EHttpDialInNotSupported = EHttpPanicCodeBase - 1, // The WAP Access Point specified a dial-in ISP!
|
williamr@2
|
86 |
EHttpWapAccessPointInfoChanged = EHttpPanicCodeBase - 2, // The WAP AP info changed between initial read and
|
williamr@2
|
87 |
// the subsequent NetDial override (debug only)
|
williamr@2
|
88 |
EHttpCommDBContainsBadData = EHttpPanicCodeBase - 3, // Comms DB contains garbled/inconsistent WAP AP data
|
williamr@2
|
89 |
EHttpConnectionLessNotSupported = EHttpPanicCodeBase - 4, // Comms DB specified a CL mode, which isn't available (yet)
|
williamr@2
|
90 |
EHttpNoHandlerAvailable = EHttpPanicCodeBase - 5, // Very bad situation for HTTP Methods
|
williamr@2
|
91 |
EHttpResourceFileLoadFailed = EHttpPanicCodeBase - 6, // Resource file missing or corrupt
|
williamr@2
|
92 |
EHttpReservedForFutureExpansion = EHttpPanicCodeBase - 7 // Feature not available - reserved for BC only
|
williamr@2
|
93 |
} THttpPanicCode;
|
williamr@2
|
94 |
|
williamr@2
|
95 |
|
williamr@2
|
96 |
#endif // __HTTPSTD_H__
|