epoc32/include/smsuaddr.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     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
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
// Defines types for SMS adressing and the class TSmsAddr
williamr@2
    15
// 
williamr@2
    16
//
williamr@2
    17
williamr@2
    18
williamr@2
    19
williamr@2
    20
/**
williamr@2
    21
 @file
williamr@2
    22
 @publishedAll
williamr@2
    23
 @released
williamr@2
    24
*/
williamr@2
    25
williamr@2
    26
#if !defined(SMSUADDR_H__)
williamr@2
    27
/** @internalComponent */
williamr@2
    28
#define SMSUADDR_H__
williamr@2
    29
williamr@2
    30
#include <e32property.h>
williamr@2
    31
#include <es_sock.h>
williamr@2
    32
#include <etelmm.h>
williamr@2
    33
williamr@2
    34
/** SMS sockets family identifier.*/
williamr@2
    35
const TUint KSMSAddrFamily = 0x010;
williamr@2
    36
/** SMS sockets protocol ID. */
williamr@2
    37
const TUint KSMSDatagramProtocol = 0x02;
williamr@2
    38
/** The maximum number of SAPs the SMS sockets protocol supports. */
williamr@2
    39
const TInt KSMSNumberSockets = 0x100;
williamr@2
    40
/** The maximum datagram size the SMS sockets protocol supports. */
williamr@2
    41
const TUint KSMSMaxDatagramSize = 255*160; // Based on 7 bit encoding
williamr@2
    42
/** SMS sockets service flags. */
williamr@2
    43
const TUint KSMSDatagramServiceInfo = KSIConnectionLess | KSIMessageBased ;
williamr@2
    44
williamr@2
    45
/**
williamr@2
    46
 *  @internalComponent
williamr@2
    47
 */
williamr@2
    48
_LIT(KSmsDatagram,"SMS Datagram");
williamr@2
    49
williamr@2
    50
/** Specifies SMS sockets protocol level for the provider in the aLevel argument of RSocket::Ioctl(). */
williamr@2
    51
const TUint KSolSmsProv = 0x100;
williamr@2
    52
williamr@2
    53
/**
williamr@2
    54
 *  Ioctl command for deleting SMS messages.
williamr@2
    55
 *  
williamr@2
    56
 *  For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
williamr@2
    57
 *  
williamr@2
    58
 *  @capability WriteUserData
williamr@2
    59
 *  @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
williamr@2
    60
 */
williamr@2
    61
const TUint KIoctlDeleteSmsMessage        = 0x0300;
williamr@2
    62
williamr@2
    63
/**
williamr@2
    64
 *  Ioctl command for counting stored SMS messages.
williamr@2
    65
 *  
williamr@2
    66
 *  For this command, the aDesc argument of RSocket::Ioctl() should be a packaged
williamr@2
    67
 *  TUint. On completion, this holds the count of messages enumerated.
williamr@2
    68
 *  
williamr@2
    69
 *  @capability ReadUserData
williamr@2
    70
 *  @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
williamr@2
    71
 */
williamr@2
    72
const TUint KIoctlEnumerateSmsMessages    = 0x0301;
williamr@2
    73
williamr@2
    74
/**
williamr@2
    75
 *  Ioctl command to indicate to the protocol that the client received messages
williamr@2
    76
 *  successfully.
williamr@2
    77
 *  
williamr@2
    78
 *  For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
williamr@2
    79
 *  
williamr@2
    80
 *  @capability ReadUserData
williamr@2
    81
 *  @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
williamr@2
    82
 */
williamr@2
    83
const TUint KIoctlReadMessageSucceeded    = 0x0304;
williamr@2
    84
williamr@2
    85
/**
williamr@2
    86
 *  Ioctl command to indicate to the protocol that the client failed to receive
williamr@2
    87
 *  messages successfully.
williamr@2
    88
 *  
williamr@2
    89
 *  For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
williamr@2
    90
 *  
williamr@2
    91
 *  @capability ReadUserData
williamr@2
    92
 *  @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
williamr@2
    93
 */
williamr@2
    94
const TUint KIoctlReadMessageFailed       = 0x0305;
williamr@2
    95
williamr@2
    96
/**
williamr@2
    97
 *  Ioctl command for sending SMS messages.
williamr@2
    98
 *  
williamr@2
    99
 *  For this command, the aDesc argument of RSocket::Ioctl() should be a packaged
williamr@2
   100
 *  TUint.
williamr@2
   101
 *  
williamr@2
   102
 *  @capability NetworkServices
williamr@2
   103
 *  @see RSocket::Ioctl()
williamr@2
   104
 */
williamr@2
   105
const TUint KIoctlSendSmsMessage          = 0x0306;
williamr@2
   106
williamr@2
   107
/**
williamr@2
   108
 *  Ioctl command for writing SMS messages to SIM.
williamr@2
   109
 *  
williamr@2
   110
 *  For this command, the aDesc argument of RSocket::Ioctl() may be NULL or may hold a packaged
williamr@2
   111
 *  descriptor large enough to store information on slots for the message. This descriptor will
williamr@2
   112
 *  be populated upon completion of the request and shall be used by the client to update the
williamr@2
   113
 *  CSmsMessage object that has been written, by invoking its UpdateSlotsL() method. This has
williamr@2
   114
 *  to be done if the client wants to be able to delete this message from the store at some
williamr@2
   115
 *  point, unless it opts to enumerate messages before deletion takes place.
williamr@2
   116
 *  
williamr@2
   117
 *  @capability WriteUserData
williamr@2
   118
 *  @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
williamr@2
   119
 */
williamr@2
   120
const TUint KIoctlWriteSmsMessage         = 0x0307;
williamr@2
   121
williamr@2
   122
/**
williamr@2
   123
 *  Ioctl command for enumerating SMS parameter sets.
williamr@2
   124
 *  
williamr@2
   125
 *  For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
williamr@2
   126
 *  
williamr@2
   127
 *  @capability ReadDeviceData
williamr@2
   128
 *  @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
williamr@2
   129
 */
williamr@2
   130
const TUint KIoctlReadSmsParams           = 0x0308;
williamr@2
   131
williamr@2
   132
/**
williamr@2
   133
 *  Ioctl command for completing SMSP list read request.
williamr@2
   134
 *  
williamr@2
   135
 *  For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
williamr@2
   136
 *  
williamr@2
   137
 *  @capability ReadDeviceData
williamr@2
   138
 *  @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
williamr@2
   139
 */
williamr@2
   140
const TUint KIoctlCompleteReadSmsParams   = 0x0309;
williamr@2
   141
williamr@2
   142
/**
williamr@2
   143
 *  Ioctl command ofr writing SMS parameter sets.
williamr@2
   144
 *  
williamr@2
   145
 *  For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
williamr@2
   146
 *  
williamr@2
   147
 *  @capability WriteDeviceData
williamr@2
   148
 *  @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
williamr@2
   149
 */
williamr@2
   150
const TUint KIoctlWriteSmsParams          = 0x0310;
williamr@2
   151
williamr@2
   152
/**
williamr@2
   153
 *  Ioctl command for finding out whether SMS stack is configured for handling 
williamr@2
   154
 *	of class 0 messages in out-of-disk condition or not.
williamr@2
   155
 *  
williamr@2
   156
 *  For this command, the aDesc argument of RSocket::Ioctl() should be NULL.
williamr@2
   157
 *  
williamr@2
   158
 *  @capability WriteDeviceData
williamr@2
   159
 *  @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
williamr@2
   160
 */
williamr@2
   161
const TUint KIoctlSupportOODClass0SmsMessages	= 0x0311;
williamr@2
   162
williamr@2
   163
/**
williamr@2
   164
 *  KIOctlSelect completion status if a modem is present.
williamr@2
   165
 *  
williamr@2
   166
 *  @capability WriteDeviceData
williamr@2
   167
 *  @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
williamr@2
   168
 */
williamr@2
   169
const TUint KIoctlSelectModemPresent    = 0x400;
williamr@2
   170
williamr@2
   171
/**
williamr@2
   172
 *  KIOctlSelect completion status if a modem is not present.
williamr@2
   173
 *  
williamr@2
   174
 *  @capability WriteDeviceData
williamr@2
   175
 *  @see RSocket::Ioctl(TUint aLevel,TUint aName,TDes8* aOption)
williamr@2
   176
 */
williamr@2
   177
const TUint KIoctlSelectModemNotPresent = 0x401;
williamr@2
   178
williamr@2
   179
williamr@2
   180
/**
williamr@2
   181
 *  Category for SMS Stack P&S variables.
williamr@2
   182
 */
williamr@2
   183
const TUid KUidPSSMSStackCategory = {0x101F7989}; // RootServer's KUidCommsProcess
williamr@2
   184
williamr@2
   185
williamr@2
   186
/**
williamr@2
   187
 *  Key for SMS Stack P&S Disk Space Monitor 
williamr@2
   188
 */
williamr@2
   189
const TInt KUidPSSMSStackDiskSpaceMonitorKey = 0x10282FAF;
williamr@2
   190
williamr@2
   191
williamr@2
   192
/**
williamr@2
   193
 *  Category for SMS Stack P&S variables.
williamr@2
   194
 */
williamr@2
   195
const RProperty::TType KUidPSSMSStackDiskSpaceMonitorKeyType = RProperty::EInt;
williamr@2
   196
williamr@2
   197
williamr@2
   198
/**
williamr@2
   199
 *  State of Disk Space Monitor.
williamr@2
   200
 */
williamr@2
   201
enum TSmsDiskSpaceMonitorStatus
williamr@2
   202
	{
williamr@2
   203
	/** The Disk Space status is unknown. */
williamr@2
   204
	ESmsDiskSpaceUnknown   = 0,
williamr@2
   205
williamr@2
   206
	/** The Disk Space status is believed to be available. */
williamr@2
   207
	ESmsDiskSpaceAvailable = 1,
williamr@2
   208
williamr@2
   209
	/** The Disk Space status was not present during the last receive operation
williamr@2
   210
	    and some PDU have been negatively acknowledged. */
williamr@2
   211
	ESmsDiskSpaceFull      = 2
williamr@2
   212
	};
williamr@2
   213
williamr@2
   214
williamr@2
   215
//ahe TODO
williamr@2
   216
//typedef TBuf<KGsmMaxTelNumberSize> TSmsServiceCenterAddress;
williamr@2
   217
williamr@2
   218
/** Buffer to hold Service Center address. */
williamr@2
   219
typedef TBuf<14> TSmsServiceCenterAddress;
williamr@2
   220
/** Package buffer for TSmsServiceCenterAddress objects. */
williamr@2
   221
typedef TPckgBuf<TSmsServiceCenterAddress> TSmsServiceCenterAddressBuf;
williamr@2
   222
williamr@2
   223
//note: Maintainers, please do *not* change the order of these enums!
williamr@2
   224
/**
williamr@2
   225
 *  SMS address family for a socket.
williamr@2
   226
 *  @publishedAll
williamr@2
   227
 *  @released 
williamr@2
   228
 */
williamr@2
   229
enum TSmsAddrFamily
williamr@2
   230
	{
williamr@2
   231
	ESmsAddrUnbound                = 0, ///< Not bound yet.
williamr@2
   232
	ESmsAddrSendOnly               = 1, ///< Only for sending, no reception.
williamr@2
   233
	ESmsAddrMessageIndication      = 2, ///< Matches on IEI 0x01 and DCS 0x1100xxxx, 0x1101xxxx and 0x1110xxxx.
williamr@2
   234
	ESmsAddrMatchIEI               = 3, ///< For matching Information Element Identifiers (IEI)
williamr@2
   235
	ESmsAddrMatchText              = 4, ///< For matching any text patterns
williamr@2
   236
	ESmsAddrRecvAny                = 5, ///< Receive all messages. Only one client can use this.
williamr@2
   237
	ESmsAddrStatusReport           = 6, ///< For receiving Status Reports.
williamr@2
   238
	ESmsAddrLocalOperation         = 7, ///< For local SIM operations.
williamr@2
   239
	ESmsAddrApplication8BitPort    = 8, ///< For sock port identification.
williamr@2
   240
	ESmsAddrApplication16BitPort   = 9, ///< For sock port identification.
williamr@2
   241
	ESmsAddrEmail			  	   = 10 ///< for matching of email messages.
williamr@2
   242
	};
williamr@2
   243
williamr@2
   244
williamr@2
   245
williamr@2
   246
/**
williamr@2
   247
 *  SMS address for a socket.
williamr@2
   248
 *  @publishedAll
williamr@2
   249
 *  @released
williamr@2
   250
 */
williamr@2
   251
class TSmsAddr : public TSockAddr
williamr@2
   252
	{
williamr@2
   253
public:
williamr@2
   254
	enum { EMaxTextMatchLength = 24 };
williamr@2
   255
public:
williamr@2
   256
	IMPORT_C TSmsAddr();
williamr@2
   257
	IMPORT_C TSmsAddrFamily SmsAddrFamily() const;
williamr@2
   258
	IMPORT_C void SetSmsAddrFamily(TSmsAddrFamily aFamily);
williamr@2
   259
	IMPORT_C TInt IdentifierMatch() const;
williamr@2
   260
	IMPORT_C void SetIdentifierMatch(TInt aIdentifier);
williamr@2
   261
	IMPORT_C TPtrC8 TextMatch() const;
williamr@2
   262
	IMPORT_C void SetTextMatch(const TDesC8& aText);
williamr@2
   263
	IMPORT_C TBool operator==(const TSmsAddr& aAddr) const;
williamr@2
   264
	};
williamr@2
   265
williamr@2
   266
williamr@2
   267
#endif // SMSUADDR_H__