1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/smsuaddr.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,267 @@
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 +// Defines types for SMS adressing and the class TSmsAddr
1.18 +//
1.19 +//
1.20 +
1.21 +
1.22 +
1.23 +/**
1.24 + @file
1.25 + @publishedAll
1.26 + @released
1.27 +*/
1.28 +
1.29 +#if !defined(SMSUADDR_H__)
1.30 +/** @internalComponent */
1.31 +#define SMSUADDR_H__
1.32 +
1.33 +#include <e32property.h>
1.34 +#include <es_sock.h>
1.35 +#include <etelmm.h>
1.36 +
1.37 +/** SMS sockets family identifier.*/
1.38 +const TUint KSMSAddrFamily = 0x010;
1.39 +/** SMS sockets protocol ID. */
1.40 +const TUint KSMSDatagramProtocol = 0x02;
1.41 +/** The maximum number of SAPs the SMS sockets protocol supports. */
1.42 +const TInt KSMSNumberSockets = 0x100;
1.43 +/** The maximum datagram size the SMS sockets protocol supports. */
1.44 +const TUint KSMSMaxDatagramSize = 255*160; // Based on 7 bit encoding
1.45 +/** SMS sockets service flags. */
1.46 +const TUint KSMSDatagramServiceInfo = KSIConnectionLess | KSIMessageBased ;
1.47 +
1.48 +/**
1.49 + * @internalComponent
1.50 + */
1.51 +_LIT(KSmsDatagram,"SMS Datagram");
1.52 +
1.53 +/** Specifies SMS sockets protocol level for the provider in the aLevel argument of RSocket::Ioctl(). */
1.54 +const TUint KSolSmsProv = 0x100;
1.55 +
1.56 +/**
1.57 + * Ioctl command for deleting SMS messages.
1.58 + *
1.59 + * For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
1.60 + *
1.61 + * @capability WriteUserData
1.62 + * @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
1.63 + */
1.64 +const TUint KIoctlDeleteSmsMessage = 0x0300;
1.65 +
1.66 +/**
1.67 + * Ioctl command for counting stored SMS messages.
1.68 + *
1.69 + * For this command, the aDesc argument of RSocket::Ioctl() should be a packaged
1.70 + * TUint. On completion, this holds the count of messages enumerated.
1.71 + *
1.72 + * @capability ReadUserData
1.73 + * @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
1.74 + */
1.75 +const TUint KIoctlEnumerateSmsMessages = 0x0301;
1.76 +
1.77 +/**
1.78 + * Ioctl command to indicate to the protocol that the client received messages
1.79 + * successfully.
1.80 + *
1.81 + * For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
1.82 + *
1.83 + * @capability ReadUserData
1.84 + * @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
1.85 + */
1.86 +const TUint KIoctlReadMessageSucceeded = 0x0304;
1.87 +
1.88 +/**
1.89 + * Ioctl command to indicate to the protocol that the client failed to receive
1.90 + * messages successfully.
1.91 + *
1.92 + * For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
1.93 + *
1.94 + * @capability ReadUserData
1.95 + * @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
1.96 + */
1.97 +const TUint KIoctlReadMessageFailed = 0x0305;
1.98 +
1.99 +/**
1.100 + * Ioctl command for sending SMS messages.
1.101 + *
1.102 + * For this command, the aDesc argument of RSocket::Ioctl() should be a packaged
1.103 + * TUint.
1.104 + *
1.105 + * @capability NetworkServices
1.106 + * @see RSocket::Ioctl()
1.107 + */
1.108 +const TUint KIoctlSendSmsMessage = 0x0306;
1.109 +
1.110 +/**
1.111 + * Ioctl command for writing SMS messages to SIM.
1.112 + *
1.113 + * For this command, the aDesc argument of RSocket::Ioctl() may be NULL or may hold a packaged
1.114 + * descriptor large enough to store information on slots for the message. This descriptor will
1.115 + * be populated upon completion of the request and shall be used by the client to update the
1.116 + * CSmsMessage object that has been written, by invoking its UpdateSlotsL() method. This has
1.117 + * to be done if the client wants to be able to delete this message from the store at some
1.118 + * point, unless it opts to enumerate messages before deletion takes place.
1.119 + *
1.120 + * @capability WriteUserData
1.121 + * @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
1.122 + */
1.123 +const TUint KIoctlWriteSmsMessage = 0x0307;
1.124 +
1.125 +/**
1.126 + * Ioctl command for enumerating SMS parameter sets.
1.127 + *
1.128 + * For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
1.129 + *
1.130 + * @capability ReadDeviceData
1.131 + * @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
1.132 + */
1.133 +const TUint KIoctlReadSmsParams = 0x0308;
1.134 +
1.135 +/**
1.136 + * Ioctl command for completing SMSP list read request.
1.137 + *
1.138 + * For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
1.139 + *
1.140 + * @capability ReadDeviceData
1.141 + * @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
1.142 + */
1.143 +const TUint KIoctlCompleteReadSmsParams = 0x0309;
1.144 +
1.145 +/**
1.146 + * Ioctl command ofr writing SMS parameter sets.
1.147 + *
1.148 + * For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
1.149 + *
1.150 + * @capability WriteDeviceData
1.151 + * @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
1.152 + */
1.153 +const TUint KIoctlWriteSmsParams = 0x0310;
1.154 +
1.155 +/**
1.156 + * Ioctl command for finding out whether SMS stack is configured for handling
1.157 + * of class 0 messages in out-of-disk condition or not.
1.158 + *
1.159 + * For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
1.160 + *
1.161 + * @capability WriteDeviceData
1.162 + * @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
1.163 + */
1.164 +const TUint KIoctlSupportOODClass0SmsMessages = 0x0311;
1.165 +
1.166 +/**
1.167 + * KIOctlSelect completion status if a modem is present.
1.168 + *
1.169 + * @capability WriteDeviceData
1.170 + * @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
1.171 + */
1.172 +const TUint KIoctlSelectModemPresent = 0x400;
1.173 +
1.174 +/**
1.175 + * KIOctlSelect completion status if a modem is not present.
1.176 + *
1.177 + * @capability WriteDeviceData
1.178 + * @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
1.179 + */
1.180 +const TUint KIoctlSelectModemNotPresent = 0x401;
1.181 +
1.182 +
1.183 +/**
1.184 + * Category for SMS Stack P&S variables.
1.185 + */
1.186 +const TUid KUidPSSMSStackCategory = {0x101F7989}; // RootServer's KUidCommsProcess
1.187 +
1.188 +
1.189 +/**
1.190 + * Key for SMS Stack P&S Disk Space Monitor
1.191 + */
1.192 +const TInt KUidPSSMSStackDiskSpaceMonitorKey = 0x10282FAF;
1.193 +
1.194 +
1.195 +/**
1.196 + * Category for SMS Stack P&S variables.
1.197 + */
1.198 +const RProperty::TType KUidPSSMSStackDiskSpaceMonitorKeyType = RProperty::EInt;
1.199 +
1.200 +
1.201 +/**
1.202 + * State of Disk Space Monitor.
1.203 + */
1.204 +enum TSmsDiskSpaceMonitorStatus
1.205 + {
1.206 + /** The Disk Space status is unknown. */
1.207 + ESmsDiskSpaceUnknown = 0,
1.208 +
1.209 + /** The Disk Space status is believed to be available. */
1.210 + ESmsDiskSpaceAvailable = 1,
1.211 +
1.212 + /** The Disk Space status was not present during the last receive operation
1.213 + and some PDU have been negatively acknowledged. */
1.214 + ESmsDiskSpaceFull = 2
1.215 + };
1.216 +
1.217 +
1.218 +//ahe TODO
1.219 +//typedef TBuf<KGsmMaxTelNumberSize> TSmsServiceCenterAddress;
1.220 +
1.221 +/** Buffer to hold Service Center address. */
1.222 +typedef TBuf<14> TSmsServiceCenterAddress;
1.223 +/** Package buffer for TSmsServiceCenterAddress objects. */
1.224 +typedef TPckgBuf<TSmsServiceCenterAddress> TSmsServiceCenterAddressBuf;
1.225 +
1.226 +//note: Maintainers, please do *not* change the order of these enums!
1.227 +/**
1.228 + * SMS address family for a socket.
1.229 + * @publishedAll
1.230 + * @released
1.231 + */
1.232 +enum TSmsAddrFamily
1.233 + {
1.234 + ESmsAddrUnbound = 0, ///< Not bound yet.
1.235 + ESmsAddrSendOnly = 1, ///< Only for sending, no reception.
1.236 + ESmsAddrMessageIndication = 2, ///< Matches on IEI 0x01 and DCS 0x1100xxxx, 0x1101xxxx and 0x1110xxxx.
1.237 + ESmsAddrMatchIEI = 3, ///< For matching Information Element Identifiers (IEI)
1.238 + ESmsAddrMatchText = 4, ///< For matching any text patterns
1.239 + ESmsAddrRecvAny = 5, ///< Receive all messages. Only one client can use this.
1.240 + ESmsAddrStatusReport = 6, ///< For receiving Status Reports.
1.241 + ESmsAddrLocalOperation = 7, ///< For local SIM operations.
1.242 + ESmsAddrApplication8BitPort = 8, ///< For sock port identification.
1.243 + ESmsAddrApplication16BitPort = 9, ///< For sock port identification.
1.244 + ESmsAddrEmail = 10 ///< for matching of email messages.
1.245 + };
1.246 +
1.247 +
1.248 +
1.249 +/**
1.250 + * SMS address for a socket.
1.251 + * @publishedAll
1.252 + * @released
1.253 + */
1.254 +class TSmsAddr : public TSockAddr
1.255 + {
1.256 +public:
1.257 + enum { EMaxTextMatchLength = 24 };
1.258 +public:
1.259 + IMPORT_C TSmsAddr();
1.260 + IMPORT_C TSmsAddrFamily SmsAddrFamily() const;
1.261 + IMPORT_C void SetSmsAddrFamily(TSmsAddrFamily aFamily);
1.262 + IMPORT_C TInt IdentifierMatch() const;
1.263 + IMPORT_C void SetIdentifierMatch(TInt aIdentifier);
1.264 + IMPORT_C TPtrC8 TextMatch() const;
1.265 + IMPORT_C void SetTextMatch(const TDesC8& aText);
1.266 + IMPORT_C TBool operator==(const TSmsAddr& aAddr) const;
1.267 + };
1.268 +
1.269 +
1.270 +#endif // SMSUADDR_H__