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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
21 #if !defined(__ES_WSMS_H__)
26 /** WAP SMS Protocol Module address family ID. */
27 const TUint KWAPSMSAddrFamily=0x011;
28 /** WAP SMS Protocol Module datagram protocol ID. */
29 const TUint KWAPSMSDatagramProtocol=0x01;
30 /** WAP SMS Protocol Module maximum number of sockets supported. */
31 const TInt KWAPSMSNumberSockets=0x100;
32 /** The maximum datagram size the SMS sockets protocol supports. */
33 const TUint KWAPSMSMaxDatagramSize = 255*160; // Based on 7 bit encoding
34 /** WAP SMS Protocol Module service information flags. */
35 const TUint KWAPSMSDatagramServiceInfo = KSIConnectionLess | KSIMessageBased;
36 /** CDMA WAP SMS Protocol Module address family ID for legacy WDP application. */
37 const TUint KWAPCDMASMSAddrFamily=0x013;
42 _LIT(KWAPSMSProtocolId,"WAPSMS Datagram");
43 _LIT(KWAPCDMASMSProtocolId,"WAP CDMA SMS Datagram");
46 // Wap Address / Port Settings
49 /** WAP port setting. */
53 EWapPortUnspecified = -1,
54 /** Connectionless session protocol. */
56 /** Connection oriented session protocol. */
57 EWapPortWspWtp = 9201,
58 /** Secure connectionless session protocol. */
59 EWapPortWspWtls = 9202,
60 /** Secure connection oriented session protocol. */
61 EWapPortWspWtpWtls = 9203,
65 EWapPortVCardWtls = 9206,
69 EWapPortVCalWtls = 9207
74 * Socket address type used with the WAP SMS Protocol Module.
78 class TWapAddr : public TSockAddr
81 enum { EMaxWapAddressLength = 24 };
84 * Gets the WAP port number.
86 * * @return WAP port number
88 inline TWapPortNumber WapPort() const;
91 * Sets the WAP port number.
93 * * @param aPort WAP port number
95 inline void SetWapPort(TWapPortNumber aPort);
98 * Sets the WAP address.
100 * * @param aTel WAP address
102 inline void SetWapAddress(const TDesC8& aTel);
105 * Gets the WAP address.
107 * * @return WAP address
109 inline TPtrC8 WapAddress() const;
114 * @param aAddr Object to compare
115 * * @return ETrue if the object value's are equal
117 inline TBool operator==(const TWapAddr& aAddr) const;
124 /** WAP SMS Protocol Module option level, for RSocket::SetOpt() and RSocket::GetOpt() calls. */
125 const TInt KWapSmsOptionLevel = KSOLSocket + 1;
128 * WAP SMS Protocol Module option for the data coding scheme.
130 * * anOption in RSocket::GetOpt() and RSocket::SetOpt() should be a TWapSmsDataCodingScheme value.
132 const TInt KWapSmsOptionNameDCS = 0x01;
135 const TInt KWapSmsOptionSmartMessage = 0x02;
137 /** WAP SMS Protocol Module option to set the message type to WAP datagram. */
138 const TInt KWapSmsOptionWapDatagram = 0x03;
140 /** WAP SMS Protocol Module option to set the status report of the last segment. */
141 const TInt KWapSmsStatusReportScheme = 0x06; // KWapSmsOptionNewStyleClient = 0x04;
142 // KWapSmsOptionOKToDeleteMessage = 0x05;
143 // Defined in wap_sock.h
147 * WAP Data Coding Scheme types.
149 * * These are used with KWapSmsOptionNameDCS.
151 enum TWapSmsDataCodingScheme
160 /** WAP Status Report Scheme types.
162 * These are used with KWapSmsStatusReportScheme. */
163 enum TWapSmsStatusReportScheme
165 /** Default Scheme. */
169 /** Control Information Element Scheme. */
170 EWapSmsCtrlInfoElement
173 #include "es_wsms.inl"