williamr@2
|
1 |
// Copyright (c) 2001-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@2
|
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
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
|
williamr@2
|
17 |
|
williamr@2
|
18 |
/**
|
williamr@2
|
19 |
@file WspTypes.h
|
williamr@2
|
20 |
@warning : This file contains Rose Model ID comments - please do not delete
|
williamr@2
|
21 |
*/
|
williamr@2
|
22 |
|
williamr@2
|
23 |
#ifndef __WSPTYPES_H__
|
williamr@2
|
24 |
#define __WSPTYPES_H__
|
williamr@2
|
25 |
|
williamr@2
|
26 |
// System includes
|
williamr@2
|
27 |
#include <e32base.h>
|
williamr@2
|
28 |
#include <stringpool.h>
|
williamr@2
|
29 |
|
williamr@2
|
30 |
//TODO - These will move to a common WAPMSG/WSPTransport file at a later stage,
|
williamr@2
|
31 |
//in the wap-stack subsystem, to be shared with the WAP Messaging API.
|
williamr@2
|
32 |
|
williamr@2
|
33 |
namespace Wap
|
williamr@2
|
34 |
/**
|
williamr@2
|
35 |
All type definitions and enumerations used in WSP are in placed in a wider WAP
|
williamr@2
|
36 |
namespace, to avoid name conflicts with other components.
|
williamr@2
|
37 |
@publishedAll
|
williamr@2
|
38 |
@released
|
williamr@2
|
39 |
*/
|
williamr@2
|
40 |
{
|
williamr@2
|
41 |
|
williamr@2
|
42 |
/** The TWspPrimitive type represents the WSP primitives defined in the WSP
|
williamr@2
|
43 |
Specification, July 2001.
|
williamr@2
|
44 |
*/
|
williamr@2
|
45 |
enum TWspPrimitive
|
williamr@2
|
46 |
{
|
williamr@2
|
47 |
/**
|
williamr@2
|
48 |
*/
|
williamr@2
|
49 |
ESConnect = 0,
|
williamr@2
|
50 |
/**
|
williamr@2
|
51 |
*/
|
williamr@2
|
52 |
ESDisconnect,
|
williamr@2
|
53 |
/**
|
williamr@2
|
54 |
*/
|
williamr@2
|
55 |
ESSuspend,
|
williamr@2
|
56 |
/**
|
williamr@2
|
57 |
*/
|
williamr@2
|
58 |
ESResume,
|
williamr@2
|
59 |
/**
|
williamr@2
|
60 |
*/
|
williamr@2
|
61 |
ESException,
|
williamr@2
|
62 |
/**
|
williamr@2
|
63 |
*/
|
williamr@2
|
64 |
ESMethodInvoke,
|
williamr@2
|
65 |
/**
|
williamr@2
|
66 |
*/
|
williamr@2
|
67 |
ESMethodInvokeData,
|
williamr@2
|
68 |
/**
|
williamr@2
|
69 |
*/
|
williamr@2
|
70 |
ESMethodResult,
|
williamr@2
|
71 |
/**
|
williamr@2
|
72 |
*/
|
williamr@2
|
73 |
ESMethodResultData,
|
williamr@2
|
74 |
/**
|
williamr@2
|
75 |
*/
|
williamr@2
|
76 |
ESMethodAbort,
|
williamr@2
|
77 |
/**
|
williamr@2
|
78 |
*/
|
williamr@2
|
79 |
ESPush,
|
williamr@2
|
80 |
/**
|
williamr@2
|
81 |
*/
|
williamr@2
|
82 |
ESConfirmedPush,
|
williamr@2
|
83 |
/**
|
williamr@2
|
84 |
*/
|
williamr@2
|
85 |
ESPushAbort
|
williamr@2
|
86 |
};
|
williamr@2
|
87 |
|
williamr@2
|
88 |
/** The TWspProtocolOptions type represents the optional protocol functions
|
williamr@2
|
89 |
defined in the WSP Specification, July 2001. When the client sends the
|
williamr@2
|
90 |
Protocol Capability to the server, it indicates which functions it will
|
williamr@2
|
91 |
accept from the server. The server returns from the set of functions sent
|
williamr@2
|
92 |
by the client those that it will perform.
|
williamr@2
|
93 |
*/
|
williamr@2
|
94 |
enum TWspProtocolOptions
|
williamr@2
|
95 |
{
|
williamr@2
|
96 |
/** The Large Data Transfer feature includes support for multiple SDU's and
|
williamr@2
|
97 |
support for the Data Fragment PDU. Setting this falg indicates support
|
williamr@2
|
98 |
for sending and receiving large data. If a client only wishes to receive
|
williamr@2
|
99 |
large data, then it should set the Client and Server Message size fields
|
williamr@2
|
100 |
appropriately.
|
williamr@2
|
101 |
*/
|
williamr@2
|
102 |
ELargeDataTransfer = 0x08,
|
williamr@2
|
103 |
/** The acknowledgement headers flag specifies that the client wishes to send
|
williamr@2
|
104 |
acknowledgement headers. If the server cannot process them (indicated by
|
williamr@2
|
105 |
negotiating down the flag) the client should not send the headers as they
|
williamr@2
|
106 |
will be ignored.
|
williamr@2
|
107 |
*/
|
williamr@2
|
108 |
EAcknowledgementHeaders = 0x10,
|
williamr@2
|
109 |
/** The client enables the Suspend Resume facility when it wishes to suspend
|
williamr@2
|
110 |
and resume the session. If the server does not support suspend and resume
|
williamr@2
|
111 |
then this flag must be cleared in the negotiated capabilities.
|
williamr@2
|
112 |
*/
|
williamr@2
|
113 |
ESessionResumeFacility = 0x20,
|
williamr@2
|
114 |
/** The client uses this flag to indicate that it is able and willing to
|
williamr@2
|
115 |
receive push information. If the server cannot send pushes then this flag
|
williamr@2
|
116 |
must be cleared in the negotiated capabilities.
|
williamr@2
|
117 |
*/
|
williamr@2
|
118 |
EPushFacility = 0x40,
|
williamr@2
|
119 |
/** The client uses this flag to indicate that it is able and willing to
|
williamr@2
|
120 |
receive confirmed push information. If the server cannot send pushes
|
williamr@2
|
121 |
then this flag must be cleared in the negotiated capabilities.
|
williamr@2
|
122 |
*/
|
williamr@2
|
123 |
EConfirmedPushFacility = 0x80
|
williamr@2
|
124 |
};
|
williamr@2
|
125 |
|
williamr@2
|
126 |
/** The TWspSessionState type represents the states of a WSP session, as defined
|
williamr@2
|
127 |
by the WSP Specification, July 2001.
|
williamr@2
|
128 |
*/
|
williamr@2
|
129 |
enum TWspSessionState
|
williamr@2
|
130 |
{
|
williamr@2
|
131 |
/**
|
williamr@2
|
132 |
*/
|
williamr@2
|
133 |
ENull = 0,
|
williamr@2
|
134 |
/**
|
williamr@2
|
135 |
*/
|
williamr@2
|
136 |
EConnecting,
|
williamr@2
|
137 |
/**
|
williamr@2
|
138 |
*/
|
williamr@2
|
139 |
EConnected,
|
williamr@2
|
140 |
/**
|
williamr@2
|
141 |
*/
|
williamr@2
|
142 |
ESuspending,
|
williamr@2
|
143 |
/**
|
williamr@2
|
144 |
*/
|
williamr@2
|
145 |
ESuspended,
|
williamr@2
|
146 |
/**
|
williamr@2
|
147 |
*/
|
williamr@2
|
148 |
EClosing,
|
williamr@2
|
149 |
/**
|
williamr@2
|
150 |
*/
|
williamr@2
|
151 |
EResuming
|
williamr@2
|
152 |
};
|
williamr@2
|
153 |
|
williamr@2
|
154 |
/** The TWspMethodState type represents the states of a WSP method transaction,
|
williamr@2
|
155 |
as defined by the WSP Specification, July 2001.
|
williamr@2
|
156 |
*/
|
williamr@2
|
157 |
enum TWspMethodState
|
williamr@2
|
158 |
{
|
williamr@2
|
159 |
/**
|
williamr@2
|
160 |
*/
|
williamr@2
|
161 |
ENullMethod =0,
|
williamr@2
|
162 |
/**
|
williamr@2
|
163 |
*/
|
williamr@2
|
164 |
ERequesting,
|
williamr@2
|
165 |
/**
|
williamr@2
|
166 |
*/
|
williamr@2
|
167 |
EWaiting,
|
williamr@2
|
168 |
/**
|
williamr@2
|
169 |
*/
|
williamr@2
|
170 |
EWaiting2,
|
williamr@2
|
171 |
/**
|
williamr@2
|
172 |
*/
|
williamr@2
|
173 |
ECompleting,
|
williamr@2
|
174 |
/**
|
williamr@2
|
175 |
*/
|
williamr@2
|
176 |
EAborting
|
williamr@2
|
177 |
};
|
williamr@2
|
178 |
|
williamr@2
|
179 |
/** The TWspBearer type defines the set of supported bearers.
|
williamr@2
|
180 |
*/
|
williamr@2
|
181 |
enum TWspBearer
|
williamr@2
|
182 |
{
|
williamr@2
|
183 |
/** Specifier for any bearer.
|
williamr@2
|
184 |
*/
|
williamr@2
|
185 |
EAny = 0,
|
williamr@2
|
186 |
/** IP bearer.
|
williamr@2
|
187 |
*/
|
williamr@2
|
188 |
EIP,
|
williamr@2
|
189 |
/** A 7-bit SMS bearer.
|
williamr@2
|
190 |
*/
|
williamr@2
|
191 |
ESMS7,
|
williamr@2
|
192 |
/** An 8-bit SMS bearer.
|
williamr@2
|
193 |
*/
|
williamr@2
|
194 |
ESMS,
|
williamr@2
|
195 |
/** A 7-bit WAP SMS bearer.
|
williamr@2
|
196 |
*/
|
williamr@2
|
197 |
EWAPSMS7,
|
williamr@2
|
198 |
/** An 8-bit WAP SMS bearer.
|
williamr@2
|
199 |
*/
|
williamr@2
|
200 |
EWAPSMS
|
williamr@2
|
201 |
};
|
williamr@2
|
202 |
|
williamr@2
|
203 |
/** The TWspSession type defines the 2 types of WSP Session Service; Connection
|
williamr@2
|
204 |
Oriented and Connectionless.
|
williamr@2
|
205 |
*/
|
williamr@2
|
206 |
enum TWspSession
|
williamr@2
|
207 |
{
|
williamr@2
|
208 |
/** Specifier for Connection Oriented Session Service.
|
williamr@2
|
209 |
*/
|
williamr@2
|
210 |
EWspConnectionOriented = 0,
|
williamr@2
|
211 |
/** Specifier for Connectionless Session Service.
|
williamr@2
|
212 |
*/
|
williamr@2
|
213 |
EWspConnectionLess
|
williamr@2
|
214 |
};
|
williamr@2
|
215 |
|
williamr@2
|
216 |
/** The TWspReason type is used by to report the cause of a particular indication
|
williamr@2
|
217 |
primitive. The WSP Specification, July 2001, specifies a given set that MUST
|
williamr@2
|
218 |
be recognised (6.2.5). Further values may be added.
|
williamr@2
|
219 |
*/
|
williamr@2
|
220 |
enum TWspReason
|
williamr@2
|
221 |
{
|
williamr@2
|
222 |
/** The rules of the protocol were broken and in its current state, the peer
|
williamr@2
|
223 |
could not perform the specified operation. E.g. the PDU was not allowed.
|
williamr@2
|
224 |
*/
|
williamr@2
|
225 |
EProtoErr = 0xE0,
|
williamr@2
|
226 |
/** The session was disconnected while the operation was still in progress.
|
williamr@2
|
227 |
*/
|
williamr@2
|
228 |
EDisconnect = 0xE1,
|
williamr@2
|
229 |
/** The session was suspended while the operation was still in progress.
|
williamr@2
|
230 |
*/
|
williamr@2
|
231 |
ESuspend = 0xE2,
|
williamr@2
|
232 |
/** The session was resumed while the operation was still in progress.
|
williamr@2
|
233 |
*/
|
williamr@2
|
234 |
EResume = 0xE3,
|
williamr@2
|
235 |
/** The request could not be processed due to a lack of resources.
|
williamr@2
|
236 |
*/
|
williamr@2
|
237 |
ECongestion = 0xE4,
|
williamr@2
|
238 |
/** The connection was prevented due to an error.
|
williamr@2
|
239 |
*/
|
williamr@2
|
240 |
EConnectErr = 0xE5,
|
williamr@2
|
241 |
/** The SDU size in a request exceeded the maximum negotiated SDU size.
|
williamr@2
|
242 |
*/
|
williamr@2
|
243 |
EMRUExceeded = 0xE6,
|
williamr@2
|
244 |
/** The negotiated value of the maximum outstanding transactions (either for
|
williamr@2
|
245 |
push or method transactions) has been exceeded.
|
williamr@2
|
246 |
*/
|
williamr@2
|
247 |
EMORExceeded = 0xE7,
|
williamr@2
|
248 |
/** The operation was aborted by the Provider.
|
williamr@2
|
249 |
*/
|
williamr@2
|
250 |
EPeerReq = 0xE8,
|
williamr@2
|
251 |
/** An underlying network error prevented the completion of a request.
|
williamr@2
|
252 |
*/
|
williamr@2
|
253 |
ENetErr = 0xE9,
|
williamr@2
|
254 |
/** The cause of the indication was an action by the Client.
|
williamr@2
|
255 |
*/
|
williamr@2
|
256 |
EUserReq = 0xEA,
|
williamr@2
|
257 |
/** The client has refesed the Push message, no specific reason, no retries.
|
williamr@2
|
258 |
*/
|
williamr@2
|
259 |
EUserRfs = 0xEB,
|
williamr@2
|
260 |
/** The Push message cannot be delivered to the intended destination.
|
williamr@2
|
261 |
*/
|
williamr@2
|
262 |
EUserPnd = 0xEC,
|
williamr@2
|
263 |
/** The Push message was discarded due to resource shortage.
|
williamr@2
|
264 |
*/
|
williamr@2
|
265 |
EUserDcr = 0xED,
|
williamr@2
|
266 |
/** The content-type of the Push message cannot be processed.
|
williamr@2
|
267 |
*/
|
williamr@2
|
268 |
EUserDcu = 0xEE,
|
williamr@2
|
269 |
/** The session connect request has been redirected to a new proxy. This is
|
williamr@2
|
270 |
a temporary redirection and the original proxy should be used in the
|
williamr@2
|
271 |
future when trying to access this service. This is not defined by the
|
williamr@2
|
272 |
WSP Specification.
|
williamr@2
|
273 |
*/
|
williamr@2
|
274 |
ETemporaryRedirectedProxy =0,
|
williamr@2
|
275 |
/** The session connect request has been redirected to a new proxy. This is
|
williamr@2
|
276 |
a permanent redirection and the new proxy should be used in the future
|
williamr@2
|
277 |
when trying to access this service. The client will be notified of this
|
williamr@2
|
278 |
event and the HTTP session property EWspProxyAddressnew will contain the
|
williamr@2
|
279 |
new proxy's address. The client should update its access point database.
|
williamr@2
|
280 |
This is not defined by the WSP Specification.
|
williamr@2
|
281 |
*/
|
williamr@2
|
282 |
EPermanentRedirectedProxy,
|
williamr@2
|
283 |
/** The client had disconnected the session, but as Suspend Resume facility
|
williamr@2
|
284 |
was being used, the session was suspended. The client then changed the
|
williamr@2
|
285 |
proxy and did a connect. The suspended session cannot be resumed, so the
|
williamr@2
|
286 |
the current session must be disconnected (with this reason) and a
|
williamr@2
|
287 |
session connect initiated with the new proxy. This is not defined by the
|
williamr@2
|
288 |
WSP Specification.
|
williamr@2
|
289 |
*/
|
williamr@2
|
290 |
EChangedProxyInSuspendedSession,
|
williamr@2
|
291 |
/** The client's WSP session was disconnected in the Connecting state because
|
williamr@2
|
292 |
configuration of the underlying WTLS layer failed prior to the phase 1
|
williamr@2
|
293 |
WTLS handshake.
|
williamr@2
|
294 |
*/
|
williamr@2
|
295 |
EWtlsConfigurationFailed,
|
williamr@2
|
296 |
/** The client's WSP session was disconnected in the Connecting state because
|
williamr@2
|
297 |
phase 1 of the WTLS handshake failed.
|
williamr@2
|
298 |
*/
|
williamr@2
|
299 |
EWtlsPhase1HandshakeFailed,
|
williamr@2
|
300 |
/** The client's WSP session was disconnected in the Connecting state because
|
williamr@2
|
301 |
phase 2 of the WTLS handshake failed.
|
williamr@2
|
302 |
*/
|
williamr@2
|
303 |
EWtlsPhase2HandshakeFailed,
|
williamr@2
|
304 |
/** The client's WSP session was disconnected in the Connecting state because
|
williamr@2
|
305 |
the proxy's WTLS certificate was invalid - e.g. badly formed, or out of date.
|
williamr@2
|
306 |
*/
|
williamr@2
|
307 |
EWtlsInvalidServerCert,
|
williamr@2
|
308 |
/** The client's WSP session was disconnected in the Connecting state because
|
williamr@2
|
309 |
the proxy's WTLS certificate could not be trusted. This means it was not signed
|
williamr@2
|
310 |
by any root certificate on the device, and the security policy criteria could not
|
williamr@2
|
311 |
determine further whether it could be trusted or not.
|
williamr@2
|
312 |
*/
|
williamr@2
|
313 |
EWtlsUntrustedServerCert,
|
williamr@2
|
314 |
/** The client's WSP session was disconnected in the Connecting state because
|
williamr@2
|
315 |
the negotiated WTLS configuration at completion of the secure handshake was
|
williamr@2
|
316 |
rejected by criteria in the security policy.
|
williamr@2
|
317 |
*/
|
williamr@2
|
318 |
EWtlsNegotiatedConfigRejected,
|
williamr@2
|
319 |
/** The client's transaction or session has failed due to an out-of-memory situation.
|
williamr@2
|
320 |
*/
|
williamr@2
|
321 |
EOutOfMemory,
|
williamr@2
|
322 |
/** The client's session has entered an inconsistent state, probably due to a failure caused
|
williamr@2
|
323 |
by an out-of-memory situation.
|
williamr@2
|
324 |
*/
|
williamr@2
|
325 |
ESessionStateFailure
|
williamr@2
|
326 |
};
|
williamr@2
|
327 |
|
williamr@2
|
328 |
/** The enum TWspCapabilty is used to select a capability to reset (if required)
|
williamr@2
|
329 |
before setting the value of the capability.
|
williamr@2
|
330 |
*/
|
williamr@2
|
331 |
enum TWspCapability
|
williamr@2
|
332 |
{
|
williamr@2
|
333 |
/** Specifies the Alias Addresses capability.
|
williamr@2
|
334 |
*/
|
williamr@2
|
335 |
EAliasAddresses = 0,
|
williamr@2
|
336 |
/** Specifies the Extended Methods capability.
|
williamr@2
|
337 |
*/
|
williamr@2
|
338 |
EExtendedMethods,
|
williamr@2
|
339 |
/** Specifies the Header Code Pages capability.
|
williamr@2
|
340 |
*/
|
williamr@2
|
341 |
EHeaderCodePages,
|
williamr@2
|
342 |
/** Specifies the Method Maximum Outstanding Requests capability. Default value is 1.
|
williamr@2
|
343 |
*/
|
williamr@2
|
344 |
EMethodMOR,
|
williamr@2
|
345 |
/** Specifies the Push Maximum Outstanding Requests capability. Default value is 1.
|
williamr@2
|
346 |
*/
|
williamr@2
|
347 |
EPushMOR,
|
williamr@2
|
348 |
/** Specifies the Protocol Options capability. Default value is 0x00.
|
williamr@2
|
349 |
*/
|
williamr@2
|
350 |
EProtocolOptions,
|
williamr@2
|
351 |
/** Specifies the Client SDU size capability. Default value is 1400 octets.
|
williamr@2
|
352 |
*/
|
williamr@2
|
353 |
EClientSDUSize,
|
williamr@2
|
354 |
/** Specifies the Server SDU size capability. Default value is 1400 octets.
|
williamr@2
|
355 |
*/
|
williamr@2
|
356 |
EServerSDUSize,
|
williamr@2
|
357 |
/** Specifies the Client Message size capability. Default value is 1400 octets.
|
williamr@2
|
358 |
*/
|
williamr@2
|
359 |
EClientMessageSize,
|
williamr@2
|
360 |
/** Specifies the Server Message size capability. Default value is 1400 octets.
|
williamr@2
|
361 |
*/
|
williamr@2
|
362 |
EServerMessageSize,
|
williamr@2
|
363 |
/** Specifies the Unknown capabilities.
|
williamr@2
|
364 |
*/
|
williamr@2
|
365 |
EUnknownCapabilities,
|
williamr@2
|
366 |
/** Specifies all the capabilities.
|
williamr@2
|
367 |
*/
|
williamr@2
|
368 |
EAllCapabilities
|
williamr@2
|
369 |
};
|
williamr@2
|
370 |
|
williamr@2
|
371 |
} // end of namespace Wap
|
williamr@2
|
372 |
|
williamr@2
|
373 |
|
williamr@2
|
374 |
/**
|
williamr@2
|
375 |
Maximum Proxy address length, this is large enough for a full IPv6 address.
|
williamr@2
|
376 |
@publishedAll
|
williamr@2
|
377 |
@released
|
williamr@2
|
378 |
*/
|
williamr@2
|
379 |
const TInt KMaxProxyAddrLen = 40;
|
williamr@2
|
380 |
|
williamr@2
|
381 |
//##ModelId=3C4C41B20079
|
williamr@2
|
382 |
class TWspRedirectedAddress
|
williamr@2
|
383 |
/**
|
williamr@2
|
384 |
The TWspRedirectedAddress type represents an alternate address to which
|
williamr@2
|
385 |
Clients must use to establish a session with the same service that was
|
williamr@2
|
386 |
initially contacted. If the bearer or port fields have been excluded, then
|
williamr@2
|
387 |
the orginal bearer and port should be used to contact the new server. The
|
williamr@2
|
388 |
WSP Specification, July 2001, defines an Address Type (8.2.2.3) upon which
|
williamr@2
|
389 |
this class is based.
|
williamr@2
|
390 |
@publishedAll
|
williamr@2
|
391 |
@released
|
williamr@2
|
392 |
*/
|
williamr@2
|
393 |
{
|
williamr@2
|
394 |
public: // Attributes
|
williamr@2
|
395 |
|
williamr@2
|
396 |
/** A flag to indicate that the port field is set.
|
williamr@2
|
397 |
*/
|
williamr@2
|
398 |
//##ModelId=3C4C41B200DD
|
williamr@2
|
399 |
TBool iHasPort;
|
williamr@2
|
400 |
|
williamr@2
|
401 |
/** A flag to indicate that the bearer field is set.
|
williamr@2
|
402 |
*/
|
williamr@2
|
403 |
//##ModelId=3C4C41B200CB
|
williamr@2
|
404 |
TBool iHasBearer;
|
williamr@2
|
405 |
|
williamr@2
|
406 |
/** The proxy address.
|
williamr@2
|
407 |
*/
|
williamr@2
|
408 |
//##ModelId=3C4C41B200C1
|
williamr@2
|
409 |
TBuf8<KMaxProxyAddrLen> iProxyAddress;
|
williamr@2
|
410 |
|
williamr@2
|
411 |
/** The port number.
|
williamr@2
|
412 |
*/
|
williamr@2
|
413 |
//##ModelId=3C4C41B200B5
|
williamr@2
|
414 |
TUint16 iPort;
|
williamr@2
|
415 |
|
williamr@2
|
416 |
/** The bearer type.
|
williamr@2
|
417 |
*/
|
williamr@2
|
418 |
//##ModelId=3C4C41B200A3
|
williamr@2
|
419 |
Wap::TWspBearer iBearer;
|
williamr@2
|
420 |
};
|
williamr@2
|
421 |
|
williamr@2
|
422 |
/**
|
williamr@2
|
423 |
Maximum length of a key ID for WTLS
|
williamr@2
|
424 |
@publishedAll
|
williamr@2
|
425 |
@released
|
williamr@2
|
426 |
*/
|
williamr@2
|
427 |
const TInt KWtlsMaxKeyIdLength = 512;
|
williamr@2
|
428 |
|
williamr@2
|
429 |
class TWtlsKeyExchangeSuite
|
williamr@2
|
430 |
/**
|
williamr@2
|
431 |
The class TWtlsKeyExchangeSuite contain the definitions of WTLS
|
williamr@2
|
432 |
Key Exchange Suites as defined in the WAP WTLS Specification, July 2001
|
williamr@2
|
433 |
@publishedAll
|
williamr@2
|
434 |
@released
|
williamr@2
|
435 |
*/
|
williamr@2
|
436 |
{
|
williamr@2
|
437 |
public:
|
williamr@2
|
438 |
enum TKeyExchangeSuite
|
williamr@2
|
439 |
{
|
williamr@2
|
440 |
ENULL =0,
|
williamr@2
|
441 |
ESHARED_SECRET =1,
|
williamr@2
|
442 |
EDH_anon =2,
|
williamr@2
|
443 |
EDH_anon_512 =3,
|
williamr@2
|
444 |
EDH_anon_768 =4,
|
williamr@2
|
445 |
ERSA_anon =5,
|
williamr@2
|
446 |
ERSA_anon_512 =6,
|
williamr@2
|
447 |
ERSA_anon_768 =7,
|
williamr@2
|
448 |
ERSA =8,
|
williamr@2
|
449 |
ERSA_512 =9,
|
williamr@2
|
450 |
ERSA_768 =10,
|
williamr@2
|
451 |
EECDH_anon =11,
|
williamr@2
|
452 |
EECDH_anon_113 =12,
|
williamr@2
|
453 |
EECDH_anon_131 =13,
|
williamr@2
|
454 |
EECDH_ECDSA =14,
|
williamr@2
|
455 |
EECDH_anon_uncomp =15,
|
williamr@2
|
456 |
EECDH_anon_uncomp_113 =16,
|
williamr@2
|
457 |
EECDH_anon_uncomp_131 =17,
|
williamr@2
|
458 |
EECDH_ECDSA_uncomp =18
|
williamr@2
|
459 |
};
|
williamr@2
|
460 |
enum TKeyIdType
|
williamr@2
|
461 |
{
|
williamr@2
|
462 |
EIdNull = 0,
|
williamr@2
|
463 |
EText = 1,
|
williamr@2
|
464 |
EBinary = 2,
|
williamr@2
|
465 |
EKeyHashSha = 254,
|
williamr@2
|
466 |
EX509Name = 255
|
williamr@2
|
467 |
};
|
williamr@2
|
468 |
|
williamr@2
|
469 |
public:
|
williamr@2
|
470 |
TWtlsKeyExchangeSuite(TKeyExchangeSuite aKeyExchangeSuite, TKeyIdType aKeyIdType, const TBuf8<KWtlsMaxKeyIdLength>& aKeyId);
|
williamr@2
|
471 |
|
williamr@2
|
472 |
public:
|
williamr@2
|
473 |
TKeyExchangeSuite iKeyExchangeSuite;
|
williamr@2
|
474 |
TKeyIdType iKeyIdType;
|
williamr@2
|
475 |
TBuf8<KWtlsMaxKeyIdLength> iKeyId;
|
williamr@2
|
476 |
};
|
williamr@2
|
477 |
|
williamr@2
|
478 |
class TWtlsCipherSuite
|
williamr@2
|
479 |
/**
|
williamr@2
|
480 |
The class TWtlsCipherSuite encapsulates a WTLS cipher suite as defined in
|
williamr@2
|
481 |
the WAP WTLS Specification, July 2001
|
williamr@2
|
482 |
This is a pair made up of a Bulk Encryption Algorithm and a Mac Algorithm
|
williamr@2
|
483 |
@publishedAll
|
williamr@2
|
484 |
@released
|
williamr@2
|
485 |
*/
|
williamr@2
|
486 |
{
|
williamr@2
|
487 |
public:
|
williamr@2
|
488 |
|
williamr@2
|
489 |
enum TBulkEncryptionAlgorithm
|
williamr@2
|
490 |
{
|
williamr@2
|
491 |
ENULL =0,
|
williamr@2
|
492 |
ERC5_CBC_40 =1,
|
williamr@2
|
493 |
ERC5_CBC_56 =2,
|
williamr@2
|
494 |
ERC5_CBC =3,
|
williamr@2
|
495 |
EDES_CBC_40 =4,
|
williamr@2
|
496 |
EDES_CBC =5,
|
williamr@2
|
497 |
E3DES_CBC_EDE =6,
|
williamr@2
|
498 |
EIDEA_CBC_40 =7,
|
williamr@2
|
499 |
EIDEA_CBC_56 =8,
|
williamr@2
|
500 |
EIDEA_CBC =9,
|
williamr@2
|
501 |
ERC5_CBC_64 =10,
|
williamr@2
|
502 |
EIDEA_CBC_64 =11
|
williamr@2
|
503 |
};
|
williamr@2
|
504 |
|
williamr@2
|
505 |
enum TMacAlgorithm
|
williamr@2
|
506 |
{
|
williamr@2
|
507 |
ESHA_0 =0,
|
williamr@2
|
508 |
ESHA_40 =1,
|
williamr@2
|
509 |
ESHA_80 =2,
|
williamr@2
|
510 |
ESHA =3,
|
williamr@2
|
511 |
// N/A (removed) =4,
|
williamr@2
|
512 |
EMD5_40 =5,
|
williamr@2
|
513 |
EMD5_80 =6,
|
williamr@2
|
514 |
EMD5 =7,
|
williamr@2
|
515 |
};
|
williamr@2
|
516 |
|
williamr@2
|
517 |
TWtlsCipherSuite(TBulkEncryptionAlgorithm aBulkEncryptionAlgorithm, TMacAlgorithm aMacAlgorithm);
|
williamr@2
|
518 |
|
williamr@2
|
519 |
public:
|
williamr@2
|
520 |
TBulkEncryptionAlgorithm iBulkEncryptionAlgorithm;
|
williamr@2
|
521 |
TMacAlgorithm iMacAlgorithm;
|
williamr@2
|
522 |
};
|
williamr@2
|
523 |
|
williamr@2
|
524 |
inline TWtlsCipherSuite::TWtlsCipherSuite(TBulkEncryptionAlgorithm aBulkEncryptionAlgorithm, TMacAlgorithm aMacAlgorithm)
|
williamr@2
|
525 |
: iBulkEncryptionAlgorithm(aBulkEncryptionAlgorithm), iMacAlgorithm(aMacAlgorithm)
|
williamr@2
|
526 |
{
|
williamr@2
|
527 |
}
|
williamr@2
|
528 |
|
williamr@2
|
529 |
inline TWtlsKeyExchangeSuite::TWtlsKeyExchangeSuite(TKeyExchangeSuite aKeyExchangeSuite, TKeyIdType aKeyIdType, const TBuf8<KWtlsMaxKeyIdLength>& aKeyId)
|
williamr@2
|
530 |
: iKeyExchangeSuite(aKeyExchangeSuite), iKeyIdType(aKeyIdType), iKeyId(aKeyId)
|
williamr@2
|
531 |
{
|
williamr@2
|
532 |
}
|
williamr@2
|
533 |
|
williamr@2
|
534 |
|
williamr@2
|
535 |
#endif // __WSPTYPES_H__
|