1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // 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
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __WAPMSGERR_H__
17 #define __WAPMSGERR_H__
23 * Defines WAP-related types and error codes.
26 _LIT(KWapMsgPanicDescriptor, "WAPMESSAGE");
28 /** Defines start values for categories of WAP-related error codes. */
31 /** Base value for all error codes. */
33 /** Base value for connection-orientated WSP error codes. */
34 EWSPCORetCodeBase = ERetCodeBase + 25,
35 /** Base value for connectionless WSP error codes. */
36 EWSPCLRetCodeBase = ERetCodeBase + 50,
37 /** Base value for WTP error codes. */
38 EWTPRetCodeBase = ERetCodeBase + 75,
39 /** Base value for WDP error codes. */
40 EWDPRetCodeBase = ERetCodeBase + 100,
41 /** Base value for WTLS error codes. */
42 EWTLSRetCodeBase = ERetCodeBase + 125,
43 /** Maximum value for WAP-related error codes. */
44 ERetCodeTop = ERetCodeBase + 200
47 /** General WAP error codes. */
48 enum TGeneralReturnCodes
50 /** There is more data to be read. */
51 EMoreData = ERetCodeBase + 0,
52 /** One of: no bearer set; unknown bearer; a connection exists with different bearer;
53 * unable to get a local host name from bearer. */
54 EBearerError = ERetCodeBase + 1,
55 /** The port is already used in another bound connection. */
56 EPortAlreadyBound = ERetCodeBase + 2,
57 /** Local port cannot be opened. */
58 ECannotOpenPort = ERetCodeBase + 3,
59 /** There are too many existing connections. */
60 ETooManyConnections = ERetCodeBase + 4,
61 /** Connection handle is invalid. */
62 EBadConnection = ERetCodeBase + 5,
63 /** Passed buffer is too small. */
64 EBufferTooSmall = ERetCodeBase + 6
67 /** WTLS-related error codes. */
71 EWtlsOutOfMemory = EWTLSRetCodeBase + 0,
73 EWtlsSocketError = EWTLSRetCodeBase + 1,
74 /** Invalid parameter used. */
75 EWtlsBadParameters = EWTLSRetCodeBase + 2,
77 EWtlsSocketError2 = EWTLSRetCodeBase + 3,
78 /** Resume ID not found. */
79 EWtlsResumeIDNotFound = EWTLSRetCodeBase + 4,
81 EWtlsResumeError = EWTLSRetCodeBase + 5,
82 /** Renegotiation request error. */
83 EWtlsRenegotiationRequest = EWTLSRetCodeBase + 6,
85 EWtlsIllegalCall = EWTLSRetCodeBase + 7,
86 /** Connection close notify error. */
87 EWtlsConnectionCloseNotify = EWTLSRetCodeBase + 8,
88 /** Close notify error. */
89 EWtlsSessionCloseNotify = EWTLSRetCodeBase + 9,
91 EWtlsNoConnection = EWTLSRetCodeBase + 10,
92 /** Unexpected message. */
93 EWtlsUnexpectedMessage = EWTLSRetCodeBase + 11,
94 /** Bad MAC record. */
95 EWtlsBadRecordMac = EWTLSRetCodeBase + 12,
96 /** Decryption failed. */
97 EWtlsDecryptionFailed = EWTLSRetCodeBase + 13,
98 /** Record overflow. */
99 EWtlsRecordOverflow = EWTLSRetCodeBase + 14,
100 /** Handshake failure. */
101 EWtlsHandshakeFailure = EWTLSRetCodeBase + 15,
102 /** Decompression failure. */
103 EWtlsDecompressionFailure = EWTLSRetCodeBase + 16,
104 /** Bad certificate. */
105 EWtlsBadCertificate = EWTLSRetCodeBase + 17,
106 /** Unsupported certificate. */
107 EWtlsUnsupportedCertificate = EWTLSRetCodeBase + 18,
108 /** Certificate revoked. */
109 EWtlsCertificateRevoked = EWTLSRetCodeBase + 19,
110 /** Certificate expired. */
111 EWtlsCertificateExpired = EWTLSRetCodeBase + 20,
112 /** Certificate unknown. */
113 EWtlsCertificateUnknown = EWTLSRetCodeBase + 21,
114 /** Illegal parameter. */
115 EWtlsIllegalParameter = EWTLSRetCodeBase + 22,
116 /** Unknown certificate authority. */
117 EWtlsUnknownCA = EWTLSRetCodeBase + 23,
118 /** Access denied. */
119 EWtlsAccessDenied = EWTLSRetCodeBase + 24,
120 /** Decoding error. */
121 EWtlsDecodeError = EWTLSRetCodeBase + 25,
122 /** Decryption error. */
123 EWtlsDecryptError = EWTLSRetCodeBase + 26,
124 /** Unknown key ID. */
125 EWtlsUnknownKeyId = EWTLSRetCodeBase + 27,
126 /** Disabled key ID. */
127 EWtlsDisableKeyId = EWTLSRetCodeBase + 28,
128 /** Key exchange disabled. */
129 EWtlsKeyExchangeDisabled = EWTLSRetCodeBase + 29,
130 /** Session not ready. */
131 EWtlsSessionNotReady = EWTLSRetCodeBase + 30,
132 /** Unknown parameter index. */
133 EWtlsUnknownParameterIndex = EWTLSRetCodeBase + 31,
134 /** Duplicate finished Recv() call. */
135 EWtlsDuplicateFinishedRecv = EWTLSRetCodeBase + 32,
136 /** Export restriction error. */
137 EWtlsExportRestriction = EWTLSRetCodeBase + 33,
138 /** Protocol version error. */
139 EWtlsProtocolVersion = EWTLSRetCodeBase + 34,
140 /** Insufficient security. */
141 EWtlsInsufficientSecurity = EWTLSRetCodeBase + 35,
142 /** Internal error. */
143 EWtlsInternalError = EWTLSRetCodeBase + 36,
144 /** User cancelled operation. */
145 EWtlsUserCanceled = EWTLSRetCodeBase + 37,
146 /** No renegotiation. */
147 EWtlsNoRenegotiation = EWTLSRetCodeBase + 38,
149 /** General error. */
150 EWtlsErrGeneral = EWTLSRetCodeBase + 39,
151 /** Bulk algorithm error. */
152 EWtlsErrBulk = EWTLSRetCodeBase + 40,
153 /** MAC algorithm error. */
154 EWtlsErrMac = EWTLSRetCodeBase + 41,
155 /** Sequence number mode error. */
156 EWtlsErrSequenceNumberMode = EWTLSRetCodeBase + 42,
157 /** Key refresh rate error. */
158 EWtlsErrKeyRefreshRate = EWTLSRetCodeBase + 43,
162 /** Connection-orientated WSP error codes. */
163 enum TWspCoReturnCodes
165 /** Given buffer is too small. */
166 EWspCoBufferTooSmall = EWSPCORetCodeBase + 0,
167 /** Session handle is not valid. */
168 EWspCoInvalidSession = EWSPCORetCodeBase + 1,
169 /** Invalid transaction. */
170 EWspCoInvalidTransaction = EWSPCORetCodeBase + 2,
171 /** Given parameter is invalid. */
172 EWspCoParameterError = EWSPCORetCodeBase + 3,
173 /** Session is not connected. */
174 EWspCoSessionNotConnected = EWSPCORetCodeBase + 4,
175 /** Functionality is not supported in this session. */
176 EWspCoNotSupported = EWSPCORetCodeBase + 5,
177 /** Function is not applicable in this state of an object. */
178 EWspCoInvalidState = EWSPCORetCodeBase + 6,
179 /** Session has been closed. */
180 EWspCoSessionClosed = EWSPCORetCodeBase + 7,
181 /** Server MRU exceeded. */
182 EWspCoMRUExceeded = EWSPCORetCodeBase + 8,
183 /** Invalid buffer size. */
184 EWspCoInvalidBufferSize = EWSPCORetCodeBase + 9,
185 /** Data not available. */
186 EWspCoDataNotAvailable = EWSPCORetCodeBase + 10,
187 /** Timeout error. */
188 EWspCoErrorTimeout = EWSPCORetCodeBase + 11
192 /** Connectionless WSP error codes. */
193 enum TWspClReturnCodes
195 /** Given buffer is too small. */
196 EWspClBufferTooSmall = EWSPCLRetCodeBase + 0,
197 /** Session handle is not valid. */
198 EWspClInvalidSession = EWSPCLRetCodeBase + 1,
199 /** Given parameter is invalid. */
200 EWspClParameterError = EWSPCLRetCodeBase + 2,
201 /** Session is not connected. */
202 EWspClSessionNotConnected = EWSPCLRetCodeBase + 3,
203 /** Functionality is not supported in this session. */
204 EWspClNotSupported = EWSPCLRetCodeBase + 4,
205 /** Function is not applicable in this state of an object. */
206 EWspClInvalidState = EWSPCLRetCodeBase + 5,
207 /** Session has been closed. */
208 EWspClSessionClosed = EWSPCLRetCodeBase + 6,
209 /** Server MRU exceeded. */
210 EWspClMRUExceeded = EWSPCLRetCodeBase + 7,
211 /** Invalid buffer size. */
212 EWspClInvalidBufferSize = EWSPCLRetCodeBase + 8,
213 /** Data not available. */
214 EWspClDataNotAvailable = EWSPCLRetCodeBase + 9,
215 /** Timeout error. */
216 EWspClErrorTimeout = EWSPCLRetCodeBase + 10
219 /** WTP-related error codes. */
222 /** Out of memory. */
223 EWtpNoMemory = EWTPRetCodeBase + 0,
224 /** Invalid argument. */
225 EWtpBadArgument = EWTPRetCodeBase + 1,
226 /** Provider aborted. */
227 EWtpProviderProtoErr = EWTPRetCodeBase + 2,
228 /** Provider aborted. */
229 EWtpProviderAbortInvalidTID = EWTPRetCodeBase + 3,
230 /** Provider aborted. */
231 EWtpProviderAbortNoClass2 = EWTPRetCodeBase + 4,
232 /** Provider aborted. */
233 EWtpProviderAbortNoSAR = EWTPRetCodeBase + 5,
234 /** Provider aborted. */
235 EWtpProviderAbortNoUACK = EWTPRetCodeBase + 6,
236 /** Provider aborted. */
237 EWtpProviderAbortVers1 = EWTPRetCodeBase + 7,
238 /** Provider aborted. */
239 EWtpProviderAbortNoResponse = EWTPRetCodeBase + 8,
240 /** Provider aborted. */
241 EWtpProviderAbortMsgTooLarge = EWTPRetCodeBase + 9,
242 /** Provider aborted. */
243 EWtpProviderAbortGeneral = EWTPRetCodeBase + 10,
244 /** Service has shutdown. */
245 EWtpShutdownError = EWTPRetCodeBase + 11
249 #endif // __WAPMSGERR_H__