|
1 // Copyright (c) 1997-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #if !defined(__ES_WSMS_H__) |
|
23 #define __ES_WSMS_H__ |
|
24 |
|
25 #include <es_sock.h> |
|
26 |
|
27 /** WAP SMS Protocol Module address family ID. */ |
|
28 const TUint KWAPSMSAddrFamily=0x011; |
|
29 /** WAP SMS Protocol Module datagram protocol ID. */ |
|
30 const TUint KWAPSMSDatagramProtocol=0x01; |
|
31 /** WAP SMS Protocol Module maximum number of sockets supported. */ |
|
32 const TInt KWAPSMSNumberSockets=0x100; |
|
33 /** The maximum datagram size the SMS sockets protocol supports. */ |
|
34 const TUint KWAPSMSMaxDatagramSize = 255*160; // Based on 7 bit encoding |
|
35 /** WAP SMS Protocol Module service information flags. */ |
|
36 const TUint KWAPSMSDatagramServiceInfo = KSIConnectionLess | KSIMessageBased; |
|
37 /** CDMA WAP SMS Protocol Module address family ID for legacy WDP application. */ |
|
38 const TUint KWAPCDMASMSAddrFamily=0x013; |
|
39 |
|
40 /** |
|
41 * @internalComponent |
|
42 */ |
|
43 _LIT(KWAPSMSProtocolId,"WAPSMS Datagram"); |
|
44 _LIT(KWAPCDMASMSProtocolId,"WAP CDMA SMS Datagram"); |
|
45 |
|
46 ////////////////////////////////////////////////////////////////////////////// |
|
47 // Wap Address / Port Settings |
|
48 ////////////////////////////////////////////////////////////////////////////// |
|
49 |
|
50 /** WAP port setting. */ |
|
51 enum TWapPortNumber |
|
52 { |
|
53 /** Unspecified. */ |
|
54 EWapPortUnspecified = -1, |
|
55 /** Connectionless session protocol. */ |
|
56 EWapPortWsp = 9200, |
|
57 /** Connection oriented session protocol. */ |
|
58 EWapPortWspWtp = 9201, |
|
59 /** Secure connectionless session protocol. */ |
|
60 EWapPortWspWtls = 9202, |
|
61 /** Secure connection oriented session protocol. */ |
|
62 EWapPortWspWtpWtls = 9203, |
|
63 /** vCard. */ |
|
64 EWapPortVCard = 9204, |
|
65 /** Secure vCard. */ |
|
66 EWapPortVCardWtls = 9206, |
|
67 /** vCal. */ |
|
68 EWapPortVCal = 9205, |
|
69 /** Secure vCal. */ |
|
70 EWapPortVCalWtls = 9207 |
|
71 }; |
|
72 |
|
73 |
|
74 /** |
|
75 * Socket address type used with the WAP SMS Protocol Module. |
|
76 * @publishedAll |
|
77 * @released |
|
78 */ |
|
79 class TWapAddr : public TSockAddr |
|
80 { |
|
81 public: |
|
82 enum { EMaxWapAddressLength = 24 }; |
|
83 public: |
|
84 /** |
|
85 * Gets the WAP port number. |
|
86 * |
|
87 * * @return WAP port number |
|
88 */ |
|
89 inline TWapPortNumber WapPort() const; |
|
90 |
|
91 /** |
|
92 * Sets the WAP port number. |
|
93 * |
|
94 * * @param aPort WAP port number |
|
95 */ |
|
96 inline void SetWapPort(TWapPortNumber aPort); |
|
97 |
|
98 /** |
|
99 * Sets the WAP address. |
|
100 * |
|
101 * * @param aTel WAP address |
|
102 */ |
|
103 inline void SetWapAddress(const TDesC8& aTel); |
|
104 |
|
105 /** |
|
106 * Gets the WAP address. |
|
107 * |
|
108 * * @return WAP address |
|
109 */ |
|
110 inline TPtrC8 WapAddress() const; |
|
111 |
|
112 /** |
|
113 * Equality operator. |
|
114 * |
|
115 * @param aAddr Object to compare |
|
116 * * @return ETrue if the object value's are equal |
|
117 */ |
|
118 inline TBool operator==(const TWapAddr& aAddr) const; |
|
119 }; |
|
120 |
|
121 ////////////////////////////////////////////////////////////////////////////// |
|
122 // Option Settings |
|
123 ////////////////////////////////////////////////////////////////////////////// |
|
124 |
|
125 /** WAP SMS Protocol Module option level, for RSocket::SetOpt() and RSocket::GetOpt() calls. */ |
|
126 const TInt KWapSmsOptionLevel = KSOLSocket + 1; |
|
127 |
|
128 /** |
|
129 * WAP SMS Protocol Module option for the data coding scheme. |
|
130 * |
|
131 * * anOption in RSocket::GetOpt() and RSocket::SetOpt() should be a TWapSmsDataCodingScheme value. |
|
132 */ |
|
133 const TInt KWapSmsOptionNameDCS = 0x01; |
|
134 |
|
135 /** Unused. */ |
|
136 const TInt KWapSmsOptionSmartMessage = 0x02; |
|
137 |
|
138 /** WAP SMS Protocol Module option to set the message type to WAP datagram. */ |
|
139 const TInt KWapSmsOptionWapDatagram = 0x03; |
|
140 |
|
141 /** WAP SMS Protocol Module option to set the status report of the last segment. */ |
|
142 const TInt KWapSmsStatusReportScheme = 0x06; // KWapSmsOptionNewStyleClient = 0x04; |
|
143 // KWapSmsOptionOKToDeleteMessage = 0x05; |
|
144 // Defined in wap_sock.h |
|
145 |
|
146 |
|
147 /** |
|
148 * WAP Data Coding Scheme types. |
|
149 * |
|
150 * * These are used with KWapSmsOptionNameDCS. |
|
151 */ |
|
152 enum TWapSmsDataCodingScheme |
|
153 { |
|
154 /** 7-bit. */ |
|
155 EWapSms7BitDCS, |
|
156 /** 8-bit. */ |
|
157 EWapSms8BitDCS |
|
158 }; |
|
159 |
|
160 |
|
161 /** WAP Status Report Scheme types. |
|
162 * |
|
163 * These are used with KWapSmsStatusReportScheme. */ |
|
164 enum TWapSmsStatusReportScheme |
|
165 { |
|
166 /** Default Scheme. */ |
|
167 EWapSmsDefault, |
|
168 /** TPSRR Scheme. */ |
|
169 EWapSmsTPSRR, |
|
170 /** Control Information Element Scheme. */ |
|
171 EWapSmsCtrlInfoElement |
|
172 }; |
|
173 |
|
174 #include "es_wsms.inl" |
|
175 |
|
176 #endif |