smsprotocols/smsstack/wapprot/Inc/es_wsms.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @publishedAll
       
    19 */
       
    20 
       
    21 #if !defined(__ES_WSMS_H__)
       
    22 #define __ES_WSMS_H__
       
    23 
       
    24 #include <es_sock.h>
       
    25 
       
    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;
       
    38 
       
    39 /**
       
    40  *  @publishedAll
       
    41  */
       
    42 _LIT(KWAPSMSProtocolId,"WAPSMS Datagram");
       
    43 _LIT(KWAPCDMASMSProtocolId,"WAP CDMA SMS Datagram");
       
    44 
       
    45 //
       
    46 // Wap Address / Port Settings
       
    47 //
       
    48 
       
    49 /** WAP port setting. */
       
    50 enum TWapPortNumber
       
    51 	{
       
    52 	/** Unspecified. */
       
    53 	EWapPortUnspecified = -1,
       
    54 	/** Connectionless session protocol. */
       
    55 	EWapPortWsp         = 9200,
       
    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,
       
    62 	/** vCard. */
       
    63 	EWapPortVCard       = 9204,
       
    64 	/** Secure vCard. */
       
    65 	EWapPortVCardWtls   = 9206,
       
    66 	/** vCal. */
       
    67 	EWapPortVCal        = 9205,
       
    68 	/** Secure vCal. */
       
    69 	EWapPortVCalWtls    = 9207
       
    70 	};
       
    71 
       
    72 
       
    73 /**
       
    74  *  Socket address type used with the WAP SMS Protocol Module.
       
    75  *  @publishedAll
       
    76  *  @released
       
    77  */
       
    78 class TWapAddr : public TSockAddr
       
    79 	{
       
    80 public:
       
    81 	enum { EMaxWapAddressLength = 24 };
       
    82 public:
       
    83 	/**
       
    84 	 *  Gets the WAP port number.
       
    85 	 *  
       
    86 	 *  	* @return	WAP port number 
       
    87 	 */
       
    88 	inline TWapPortNumber WapPort() const;
       
    89 
       
    90 	/**
       
    91 	 *  Sets the WAP port number.
       
    92 	 *  
       
    93 	 *  	* @param aPort	WAP port number 
       
    94 	 */
       
    95 	inline void SetWapPort(TWapPortNumber aPort);
       
    96 
       
    97 	/**
       
    98 	 *  Sets the WAP address.
       
    99 	 *  
       
   100 	 *  	* @param aTel	WAP address 
       
   101 	 */
       
   102 	inline void SetWapAddress(const TDesC8& aTel);
       
   103 
       
   104 	/**
       
   105 	 *  Gets the WAP address.
       
   106 	 *  
       
   107 	 *  	* @return	WAP address 
       
   108 	 */
       
   109 	inline TPtrC8 WapAddress() const;
       
   110 
       
   111 	/**
       
   112 	 *  Equality operator.
       
   113 	 *  
       
   114 	 *  @param aAddr	Object to compare
       
   115 	 *  	* @return		ETrue if the object value's are equal 
       
   116 	 */
       
   117 	inline TBool operator==(const TWapAddr& aAddr) const;
       
   118 	};
       
   119 
       
   120 //
       
   121 // Option Settings
       
   122 //
       
   123 
       
   124 /** WAP SMS Protocol Module option level, for RSocket::SetOpt() and RSocket::GetOpt() calls. */
       
   125 const TInt KWapSmsOptionLevel = KSOLSocket + 1;
       
   126 
       
   127 /**
       
   128  *  WAP SMS Protocol Module option for the data coding scheme.
       
   129  *  
       
   130  *  * anOption in RSocket::GetOpt() and RSocket::SetOpt() should be a TWapSmsDataCodingScheme value. 
       
   131  */
       
   132 const TInt KWapSmsOptionNameDCS      = 0x01;
       
   133 
       
   134 /** Unused. */
       
   135 const TInt KWapSmsOptionSmartMessage = 0x02;
       
   136 
       
   137 /** WAP SMS Protocol Module option to set the message type to WAP datagram. */
       
   138 const TInt KWapSmsOptionWapDatagram  = 0x03;
       
   139 
       
   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
       
   144 
       
   145 
       
   146 /**
       
   147  *  WAP Data Coding Scheme types.
       
   148  *  
       
   149  *  * These are used with KWapSmsOptionNameDCS. 
       
   150  */
       
   151 enum TWapSmsDataCodingScheme
       
   152 	{
       
   153 	/** 7-bit. */
       
   154 	EWapSms7BitDCS,
       
   155 	/** 8-bit. */
       
   156 	EWapSms8BitDCS
       
   157 	};
       
   158 	
       
   159 
       
   160 /** WAP Status Report Scheme types.
       
   161 *
       
   162 * These are used with KWapSmsStatusReportScheme. */
       
   163 enum TWapSmsStatusReportScheme
       
   164 	{
       
   165 	/** Default Scheme. */
       
   166 	EWapSmsDefault,
       
   167 	/** TPSRR Scheme. */
       
   168 	EWapSmsTPSRR,
       
   169 	/** Control Information Element Scheme. */
       
   170 	EWapSmsCtrlInfoElement
       
   171 	};
       
   172 
       
   173 #include "es_wsms.inl"
       
   174 
       
   175 #endif