1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/es_wsms.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,176 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// 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
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +
1.20 +
1.21 +/**
1.22 + @file
1.23 +*/
1.24 +
1.25 +#if !defined(__ES_WSMS_H__)
1.26 +#define __ES_WSMS_H__
1.27 +
1.28 +#include <es_sock.h>
1.29 +
1.30 +/** WAP SMS Protocol Module address family ID. */
1.31 +const TUint KWAPSMSAddrFamily=0x011;
1.32 +/** WAP SMS Protocol Module datagram protocol ID. */
1.33 +const TUint KWAPSMSDatagramProtocol=0x01;
1.34 +/** WAP SMS Protocol Module maximum number of sockets supported. */
1.35 +const TInt KWAPSMSNumberSockets=0x100;
1.36 +/** The maximum datagram size the SMS sockets protocol supports. */
1.37 +const TUint KWAPSMSMaxDatagramSize = 255*160; // Based on 7 bit encoding
1.38 +/** WAP SMS Protocol Module service information flags. */
1.39 +const TUint KWAPSMSDatagramServiceInfo = KSIConnectionLess | KSIMessageBased;
1.40 +/** CDMA WAP SMS Protocol Module address family ID for legacy WDP application. */
1.41 +const TUint KWAPCDMASMSAddrFamily=0x013;
1.42 +
1.43 +/**
1.44 + * @internalComponent
1.45 + */
1.46 +_LIT(KWAPSMSProtocolId,"WAPSMS Datagram");
1.47 +_LIT(KWAPCDMASMSProtocolId,"WAP CDMA SMS Datagram");
1.48 +
1.49 +//////////////////////////////////////////////////////////////////////////////
1.50 +// Wap Address / Port Settings
1.51 +//////////////////////////////////////////////////////////////////////////////
1.52 +
1.53 +/** WAP port setting. */
1.54 +enum TWapPortNumber
1.55 + {
1.56 + /** Unspecified. */
1.57 + EWapPortUnspecified = -1,
1.58 + /** Connectionless session protocol. */
1.59 + EWapPortWsp = 9200,
1.60 + /** Connection oriented session protocol. */
1.61 + EWapPortWspWtp = 9201,
1.62 + /** Secure connectionless session protocol. */
1.63 + EWapPortWspWtls = 9202,
1.64 + /** Secure connection oriented session protocol. */
1.65 + EWapPortWspWtpWtls = 9203,
1.66 + /** vCard. */
1.67 + EWapPortVCard = 9204,
1.68 + /** Secure vCard. */
1.69 + EWapPortVCardWtls = 9206,
1.70 + /** vCal. */
1.71 + EWapPortVCal = 9205,
1.72 + /** Secure vCal. */
1.73 + EWapPortVCalWtls = 9207
1.74 + };
1.75 +
1.76 +
1.77 +/**
1.78 + * Socket address type used with the WAP SMS Protocol Module.
1.79 + * @publishedAll
1.80 + * @released
1.81 + */
1.82 +class TWapAddr : public TSockAddr
1.83 + {
1.84 +public:
1.85 + enum { EMaxWapAddressLength = 24 };
1.86 +public:
1.87 + /**
1.88 + * Gets the WAP port number.
1.89 + *
1.90 + * * @return WAP port number
1.91 + */
1.92 + inline TWapPortNumber WapPort() const;
1.93 +
1.94 + /**
1.95 + * Sets the WAP port number.
1.96 + *
1.97 + * * @param aPort WAP port number
1.98 + */
1.99 + inline void SetWapPort(TWapPortNumber aPort);
1.100 +
1.101 + /**
1.102 + * Sets the WAP address.
1.103 + *
1.104 + * * @param aTel WAP address
1.105 + */
1.106 + inline void SetWapAddress(const TDesC8& aTel);
1.107 +
1.108 + /**
1.109 + * Gets the WAP address.
1.110 + *
1.111 + * * @return WAP address
1.112 + */
1.113 + inline TPtrC8 WapAddress() const;
1.114 +
1.115 + /**
1.116 + * Equality operator.
1.117 + *
1.118 + * @param aAddr Object to compare
1.119 + * * @return ETrue if the object value's are equal
1.120 + */
1.121 + inline TBool operator==(const TWapAddr& aAddr) const;
1.122 + };
1.123 +
1.124 +//////////////////////////////////////////////////////////////////////////////
1.125 +// Option Settings
1.126 +//////////////////////////////////////////////////////////////////////////////
1.127 +
1.128 +/** WAP SMS Protocol Module option level, for RSocket::SetOpt() and RSocket::GetOpt() calls. */
1.129 +const TInt KWapSmsOptionLevel = KSOLSocket + 1;
1.130 +
1.131 +/**
1.132 + * WAP SMS Protocol Module option for the data coding scheme.
1.133 + *
1.134 + * * anOption in RSocket::GetOpt() and RSocket::SetOpt() should be a TWapSmsDataCodingScheme value.
1.135 + */
1.136 +const TInt KWapSmsOptionNameDCS = 0x01;
1.137 +
1.138 +/** Unused. */
1.139 +const TInt KWapSmsOptionSmartMessage = 0x02;
1.140 +
1.141 +/** WAP SMS Protocol Module option to set the message type to WAP datagram. */
1.142 +const TInt KWapSmsOptionWapDatagram = 0x03;
1.143 +
1.144 +/** WAP SMS Protocol Module option to set the status report of the last segment. */
1.145 +const TInt KWapSmsStatusReportScheme = 0x06; // KWapSmsOptionNewStyleClient = 0x04;
1.146 + // KWapSmsOptionOKToDeleteMessage = 0x05;
1.147 + // Defined in wap_sock.h
1.148 +
1.149 +
1.150 +/**
1.151 + * WAP Data Coding Scheme types.
1.152 + *
1.153 + * * These are used with KWapSmsOptionNameDCS.
1.154 + */
1.155 +enum TWapSmsDataCodingScheme
1.156 + {
1.157 + /** 7-bit. */
1.158 + EWapSms7BitDCS,
1.159 + /** 8-bit. */
1.160 + EWapSms8BitDCS
1.161 + };
1.162 +
1.163 +
1.164 +/** WAP Status Report Scheme types.
1.165 +*
1.166 +* These are used with KWapSmsStatusReportScheme. */
1.167 +enum TWapSmsStatusReportScheme
1.168 + {
1.169 + /** Default Scheme. */
1.170 + EWapSmsDefault,
1.171 + /** TPSRR Scheme. */
1.172 + EWapSmsTPSRR,
1.173 + /** Control Information Element Scheme. */
1.174 + EWapSmsCtrlInfoElement
1.175 + };
1.176 +
1.177 +#include "es_wsms.inl"
1.178 +
1.179 +#endif