epoc32/include/app/smutset.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 epoc32/include/smutset.h@2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
williamr@2
     1
// Copyright (c) 1999-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
//
williamr@2
    15
williamr@2
    16
#ifndef __SMUTSET_H__
williamr@2
    17
#define __SMUTSET_H__
williamr@2
    18
williamr@2
    19
 
williamr@2
    20
williamr@2
    21
williamr@2
    22
#include <gsmumsg.h>
williamr@2
    23
#include <msvrcpt.h>
williamr@2
    24
#include <msvstore.h>
williamr@2
    25
#include <logwrap.h>
williamr@2
    26
williamr@2
    27
class CSmsServiceCenter;
williamr@2
    28
class CSmsEmailFields;
williamr@2
    29
williamr@2
    30
// Both the recipient's number  and SC number (TP-Destination-Address and RP-Destination-Address) 
williamr@2
    31
// can be 12 octets which means that there can be 21 characters (including + sign) in the number string. 
williamr@2
    32
williamr@2
    33
/**
williamr@2
    34
The maximum length of recipient's number.
williamr@2
    35
williamr@2
    36
The number returned by CSmsNumber::Address() and CSmsServiceCenter::Address() is limited this maximum length.
williamr@2
    37
williamr@2
    38
@see	CSmsNumber::Address
williamr@2
    39
@see	CSmsServiceCenter::Address
williamr@2
    40
williamr@2
    41
@publishedAll
williamr@2
    42
@released
williamr@2
    43
*/
williamr@2
    44
const TInt KSmcmSmsNumberMaxNumberLength = 21;
williamr@2
    45
williamr@2
    46
/**
williamr@2
    47
The maximum length of recipient's name.
williamr@2
    48
williamr@2
    49
The number returned by CSmsNumber::Name() and CSmsServiceCenter::Name() is limited this maximum length.
williamr@2
    50
williamr@2
    51
@see	CSmsNumber::Name
williamr@2
    52
@see	CSmsServiceCenter::Name
williamr@2
    53
williamr@2
    54
@publishedAll
williamr@2
    55
@released
williamr@2
    56
*/
williamr@2
    57
const TInt KSmcmSmsNumberMaxNameLength = 256;
williamr@2
    58
williamr@2
    59
/** 
williamr@2
    60
Defines the possible forms in which an SMS message should be delivered to the 
williamr@2
    61
recipient by the service centre.
williamr@2
    62
williamr@2
    63
The specified format may or may not actually be supported by the service centre. 
williamr@2
    64
Note that the format of the recipient address(es) may need to be different 
williamr@2
    65
to a normal telephone number if the conversion is set to any other value than 
williamr@2
    66
ESmsConvPIDNone, ESmsConvFax, ESmsConvPaging or ESmsConvErmes. 
williamr@2
    67
williamr@2
    68
@publishedAll
williamr@2
    69
@released
williamr@2
    70
*/
williamr@2
    71
enum TSmsPIDConversion
williamr@2
    72
		{
williamr@2
    73
/**
williamr@2
    74
No conversion (i.e. use SMS itself). 
williamr@2
    75
*/
williamr@2
    76
		ESmsConvPIDNone	= TSmsProtocolIdentifier::ESmsNoTelematicDevice,
williamr@2
    77
/** 
williamr@2
    78
Convert to fax. 
williamr@2
    79
*/
williamr@2
    80
		ESmsConvFax		= TSmsProtocolIdentifier::ESmsGroup3TeleFax,
williamr@2
    81
/** 
williamr@2
    82
Convert to X.400. 
williamr@2
    83
*/
williamr@2
    84
		ESmsConvX400	= TSmsProtocolIdentifier::ESmsX400MessageHandlingSystem,
williamr@2
    85
/** 
williamr@2
    86
Convert to pager message. 
williamr@2
    87
*/
williamr@2
    88
		ESmsConvPaging	= TSmsProtocolIdentifier::ESmsNationalPagingSystem,
williamr@2
    89
/** 
williamr@2
    90
Convert to Internet email. 
williamr@2
    91
*/
williamr@2
    92
		ESmsConvMail	= TSmsProtocolIdentifier::ESmsInternetElectronicMail,
williamr@2
    93
/** 
williamr@2
    94
Convert to ERMES paging. 
williamr@2
    95
*/
williamr@2
    96
		ESmsConvErmes	= TSmsProtocolIdentifier::ESmsERMES,
williamr@2
    97
/**
williamr@2
    98
Convert to sppech. 
williamr@2
    99
*/
williamr@2
   100
		ESmsConvSpeech	= TSmsProtocolIdentifier::ESmsVoiceTelephone
williamr@2
   101
		};
williamr@2
   102
williamr@2
   103
/**
williamr@2
   104
Defines the set of possible validity periods for mobile originated messages.
williamr@2
   105
williamr@2
   106
Mobile originated messages have a PDU type of SMS-SUBMIT.
williamr@2
   107
williamr@2
   108
@publishedAll
williamr@2
   109
@released
williamr@2
   110
*/
williamr@2
   111
enum TSmcmValidityPeriod
williamr@2
   112
	{
williamr@2
   113
/**
williamr@2
   114
Validity period of an hour.
williamr@2
   115
*/
williamr@2
   116
	ESmsVPHour			= TSmsValidityPeriod::EHalfHourUnitInMinutes*2,
williamr@2
   117
/**
williamr@2
   118
Validity period of six hours.
williamr@2
   119
*/
williamr@2
   120
	ESmsVPSixHours		= TSmsValidityPeriod::EHalfHourUnitInMinutes*12,
williamr@2
   121
/**
williamr@2
   122
Validity period of 24 hours.
williamr@2
   123
*/
williamr@2
   124
	ESmsVP24Hours		= TSmsValidityPeriod::EOneDayUnitInMinutes,
williamr@2
   125
/**
williamr@2
   126
Validity period of a week.
williamr@2
   127
*/
williamr@2
   128
	ESmsVPWeek			= TSmsValidityPeriod::EOneWeekUnitInMinutes,
williamr@2
   129
/**
williamr@2
   130
The maximum validity period - currently set as 63 weeks.
williamr@2
   131
*/
williamr@2
   132
	ESmsVPMaximum		= TSmsValidityPeriod::EOneWeekUnitInMinutes*63,
williamr@2
   133
/**
williamr@2
   134
An enum that specifies that a validity period is not supported.
williamr@2
   135
*/
williamr@2
   136
	ESmsVPNotSupported	= KErrNotSupported,
williamr@2
   137
/**
williamr@2
   138
The default validy period - currently set to a week.
williamr@2
   139
*/
williamr@2
   140
	ESmsVPDefault		= ESmsVPWeek
williamr@2
   141
	}; 
williamr@2
   142
williamr@2
   143
/** 
williamr@2
   144
Defines options for the preferred default sending schedule type of a new message
williamr@2
   145
created using the SMS client MTM.
williamr@2
   146
williamr@2
   147
The option has no direct effect on the SMS MTM. When it is sending an SMS
williamr@2
   148
message it automatically appends other SMS messages in the outbox whose send
williamr@2
   149
states are marked as KMsvSendStatewaiting or KMsvSendSateUnknown.
williamr@2
   150
williamr@2
   151
Therefore it is the responsibility of the messaging client to set the correct
williamr@2
   152
send state of new SMS messages correctly given the preferred sending schedule.
williamr@2
   153
williamr@2
   154
@publishedAll
williamr@2
   155
@released
williamr@2
   156
*/
williamr@2
   157
enum TSmsDelivery
williamr@2
   158
	{
williamr@2
   159
/** 
williamr@2
   160
Send message immediately. The message send state should be set to KMsvSendStateWaiting. 
williamr@2
   161
*/
williamr@2
   162
	ESmsDeliveryImmediately,
williamr@2
   163
/** 
williamr@2
   164
Send message when client requests. The message send state should be set to KMsvSendStateUponRequest.
williamr@2
   165
*/
williamr@2
   166
	ESmsDeliveryUponRequest,
williamr@2
   167
/**
williamr@2
   168
Send message at scheduled time. The message send state should be set to KMsvSendStateScheduled.
williamr@2
   169
*/
williamr@2
   170
	ESmsDeliveryScheduled
williamr@2
   171
	};
williamr@2
   172
williamr@2
   173
/**
williamr@2
   174
Defines the flags and masks for some of the message settings.
williamr@2
   175
williamr@2
   176
The settings classes CSmsMessageSettings and CSmsSettings use these flags to 
williamr@2
   177
store the specified information.
williamr@2
   178
williamr@2
   179
@internalComponent
williamr@2
   180
@released
williamr@2
   181
*/
williamr@2
   182
enum TSmsSettingsFlags
williamr@2
   183
	{
williamr@2
   184
/**
williamr@2
   185
Mask that resets the flags.
williamr@2
   186
*/
williamr@2
   187
	ESmsSettingsNoFlags					=0,
williamr@2
   188
/**
williamr@2
   189
Flag that indicates if messages can be concatenated.
williamr@2
   190
williamr@2
   191
If true, the UI should pass a long message in one piece to the MTM. If false, 
williamr@2
   192
it should split the message manually into 140 byte parts. The value of this 
williamr@2
   193
flag does not affect the behaviour of the SMS MTM.
williamr@2
   194
*/
williamr@2
   195
	ESmsSettingsCanConcatenate			=0x00000001,
williamr@2
   196
/**
williamr@2
   197
Flag that indicates whether the original message should be included in relpy
williamr@2
   198
messages.
williamr@2
   199
williamr@2
   200
If true, the received message should be quoted at the beginning of the reply 
williamr@2
   201
message. If false, reply messages should be initially empty.
williamr@2
   202
*/
williamr@2
   203
	ESmsSettingsReplyQuoted				=0x00000002,
williamr@2
   204
/**
williamr@2
   205
Flag that indicates whether duplicate messages should be rejected.
williamr@2
   206
*/
williamr@2
   207
	ESmsSettingsRejectDuplicate			=0x00000004,
williamr@2
   208
/**
williamr@2
   209
Flag that indicates if a status report (TP-SRR in GSM spec 03.40) should be 
williamr@2
   210
requested from the Service Centre.
williamr@2
   211
*/
williamr@2
   212
	ESmsSettingsDeliveryReport			=0x00000008,
williamr@2
   213
/**
williamr@2
   214
Flag that indicates if the reply path (Service Centre address) should be included
williamr@2
   215
in the delivered message (TP-RP in GSM spec 03.40).
williamr@2
   216
*/
williamr@2
   217
	ESmsSettingsReplyPathRequested		=0x00000010,
williamr@2
   218
/**  
williamr@2
   219
Flag that indicates if a status report (TP-SRR in GSM spec 03.40) for the last segment
williamr@2
   220
should be requested from the Service Centre.
williamr@2
   221
*/
williamr@2
   222
	ESmsSettingsLastSegmentDeliveryReport	=0x00000020	,
williamr@2
   223
	
williamr@2
   224
/**
williamr@2
   225
Flag that indicates if a status report (TP-SRR in GSM spec 03.40) for the last segment 
williamr@2
   226
is not requested from the Service Centre.
williamr@2
   227
*/
williamr@2
   228
	ENoSmsSettingsLastSegmentDeliveryReport	=0x00000040,
williamr@2
   229
/**
williamr@2
   230
Flag that indicates that the service center time stamp should be used for the date
williamr@2
   231
field in any TMsvEntry that corresponds to a SMS message.
williamr@2
   232
*/
williamr@2
   233
	ESmsSettingsUseServiceCenterTimeStamp =0x00000080,
williamr@2
   234
/**
williamr@2
   235
Mask for the set of flags defined.
williamr@2
   236
*/
williamr@2
   237
	ESmsSettingsMask                    =0x000000FF,
williamr@2
   238
	};
williamr@2
   239
williamr@2
   240
williamr@2
   241
/**
williamr@2
   242
Defines the types of acknowledgements that can be received from recipients.
williamr@2
   243
*/
williamr@2
   244
enum TSmsAckType
williamr@2
   245
	{
williamr@2
   246
/**
williamr@2
   247
Acknowlwdgement of delivery to a recipient.
williamr@2
   248
*/
williamr@2
   249
	ESmsAckTypeDelivery		=0	
williamr@2
   250
	};
williamr@2
   251
williamr@2
   252
/** 
williamr@2
   253
Progress information for SMS MTM operations.
williamr@2
   254
williamr@2
   255
This information is returned by CMsvOperation::ProgressL() in a TSmsProgressBuf 
williamr@2
   256
package.
williamr@2
   257
williamr@2
   258
@see	CMsvOperation::ProgressL
williamr@2
   259
williamr@2
   260
@publishedAll
williamr@2
   261
@released
williamr@2
   262
*/
williamr@2
   263
class TSmsProgress 
williamr@2
   264
	{
williamr@2
   265
public:
williamr@2
   266
/** 
williamr@2
   267
Defines type of operation for which progress information is being given.
williamr@2
   268
williamr@2
   269
These types correspond to the commands defined in TSmsMtmCommand.
williamr@2
   270
williamr@2
   271
@see	TSmsMtmCommand
williamr@2
   272
*/
williamr@2
   273
	enum TSmsProgressType
williamr@2
   274
		{
williamr@2
   275
/** 
williamr@2
   276
The default operation type - no operation.
williamr@2
   277
*/
williamr@2
   278
		ESmsProgressTypeDefault,
williamr@2
   279
/** 
williamr@2
   280
Reading SIM parameters.
williamr@2
   281
		
williamr@2
   282
Pre v7.0, this was named ESmsProgressTypeReadingServiceCenterAddress.
williamr@2
   283
*/
williamr@2
   284
		ESmsProgressTypeReadSimParams,
williamr@2
   285
/**
williamr@2
   286
Writing SIM parameters.
williamr@2
   287
		
williamr@2
   288
Pre v7.0 this was named ESmsProgressTypeWritingServiceCenterAddress. 
williamr@2
   289
*/
williamr@2
   290
		ESmsProgressTypeWriteSimParams,
williamr@2
   291
/**
williamr@2
   292
Sending messages.
williamr@2
   293
*/
williamr@2
   294
		ESmsProgressTypeSending,
williamr@2
   295
/**
williamr@2
   296
Scheduling sending messages.
williamr@2
   297
*/
williamr@2
   298
		ESmsProgressTypeScheduling,
williamr@2
   299
/**
williamr@2
   300
Enumerating phone stores.
williamr@2
   301
		
williamr@2
   302
Pre v7.0, this was named ESmsProgressTypeEnumeratingSim.
williamr@2
   303
*/
williamr@2
   304
		ESmsProgressTypeEnumeratingPhoneStores, 
williamr@2
   305
/**
williamr@2
   306
Copying messages from phone stores.
williamr@2
   307
		
williamr@2
   308
Pre v7.0, this was named ESmsProgressTypeCopyFromSim.
williamr@2
   309
*/
williamr@2
   310
		ESmsProgressTypeCopyFromPhoneStore, 
williamr@2
   311
/**
williamr@2
   312
Moving messages from phone stores.
williamr@2
   313
		
williamr@2
   314
Pre v7.0, this was named ESmsProgressTypeMoveFromSim.
williamr@2
   315
*/
williamr@2
   316
		ESmsProgressTypeMoveFromPhoneStore, 
williamr@2
   317
/**
williamr@2
   318
Deleting messages from phone stores.
williamr@2
   319
		
williamr@2
   320
Pre v7.0, this was named ESmsProgressTypeDeleteFromSim.
williamr@2
   321
*/
williamr@2
   322
		ESmsProgressTypeDeleteFromPhoneStore, 
williamr@2
   323
/**
williamr@2
   324
Removing all messages from the task scheduler list.
williamr@2
   325
*/
williamr@2
   326
		ESmsProgressTypeDeleteSchedule,
williamr@2
   327
/**
williamr@2
   328
Checking the current scheduled status of the messages.
williamr@2
   329
*/
williamr@2
   330
		ESmsProgressTypeCheckSchedule,
williamr@2
   331
/**
williamr@2
   332
Recursively deleting messages.
williamr@2
   333
*/
williamr@2
   334
		ESmsProgressTypeDeleteAll,
williamr@2
   335
/**
williamr@2
   336
Copying messages to a phone store.
williamr@2
   337
		
williamr@2
   338
Pre v7.0, this was named ESmsProgressTypeCopyToSim.
williamr@2
   339
*/
williamr@2
   340
		ESmsProgressTypeCopyToPhoneStore,  
williamr@2
   341
/**
williamr@2
   342
Moving messages to a phone store.
williamr@2
   343
		
williamr@2
   344
Pre v7.0, this was named ESmsProgressTypeMoveToSim.
williamr@2
   345
*/
williamr@2
   346
		ESmsProgressTypeMoveToPhoneStore,
williamr@2
   347
/**
williamr@2
   348
Moving message entries.
williamr@2
   349
williamr@2
   350
This is the second part of ESmsProgressTypeMoveFromPhoneStore. The first part
williamr@2
   351
deletes the messages from the phone storageSIM. This second part moves the 
williamr@2
   352
messages from the folder that represents the phone storage to the specified
williamr@2
   353
destination.
williamr@2
   354
*/
williamr@2
   355
		ESmsProgressTypeMovingEntries
williamr@2
   356
		};
williamr@2
   357
	
williamr@2
   358
	inline TSmsProgress(TSmsProgressType aType = ESmsProgressTypeDefault);
williamr@2
   359
williamr@2
   360
public:
williamr@2
   361
	
williamr@2
   362
/** 
williamr@2
   363
The error code.
williamr@2
   364
*/
williamr@2
   365
	TInt iError; 
williamr@2
   366
/** 
williamr@2
   367
The type of operation. 
williamr@2
   368
williamr@2
   369
@see	TSmsProgress::TSmsProgressType
williamr@2
   370
*/
williamr@2
   371
	TSmsProgressType iType;
williamr@2
   372
/** 
williamr@2
   373
The state of the operation.
williamr@2
   374
*/
williamr@2
   375
	TInt iState;
williamr@2
   376
/** 
williamr@2
   377
The number of recipients processed so far for the current message.
williamr@2
   378
*/
williamr@2
   379
	TInt iRcpDone;
williamr@2
   380
/**
williamr@2
   381
The total number of recipients in the current message.
williamr@2
   382
*/
williamr@2
   383
	TInt iRcpCount;
williamr@2
   384
/** 
williamr@2
   385
The nmber of messages processed so far for the current operation.
williamr@2
   386
*/
williamr@2
   387
	TInt iMsgDone;
williamr@2
   388
/**
williamr@2
   389
The total number of messages for the current operation.
williamr@2
   390
*/
williamr@2
   391
	TInt iMsgCount; 
williamr@2
   392
/** 
williamr@2
   393
The Service Centre address.
williamr@2
   394
	
williamr@2
   395
This is set by the command ESmsMtmCommandReadServiceCenter.
williamr@2
   396
williamr@2
   397
@removed
williamr@2
   398
This is no longer used since v7.0.
williamr@2
   399
*/
williamr@2
   400
	TBuf<14> iServiceCenterAddress;
williamr@2
   401
/** 
williamr@2
   402
The invisible folder that contains the messages read from the SIM by the command
williamr@2
   403
ESmsMtmCommandEnumeratePhoneStores.
williamr@2
   404
*/
williamr@2
   405
	TMsvId iEnumerateFolder;
williamr@2
   406
	};
williamr@2
   407
williamr@2
   408
/** 
williamr@2
   409
Package buffer for TSmsProgress. 
williamr@2
   410
williamr@2
   411
@see	TSmsProgress
williamr@2
   412
williamr@2
   413
@publishedAll
williamr@2
   414
@released
williamr@2
   415
*/
williamr@2
   416
typedef TPckgBuf<TSmsProgress> TSmsProgressBuf;
williamr@2
   417
williamr@2
   418
williamr@2
   419
/**
williamr@2
   420
The SMS settings that are relevant on a per message basis.
williamr@2
   421
williamr@2
   422
Each SMS message has its own settings. Initially they have a default set of 
williamr@2
   423
values derived from the SMS service settings. They can be changed on an
williamr@2
   424
individual message basis. For instance, a messaging application may allow a
williamr@2
   425
user to specify/not specify status reports individually for each message.
williamr@2
   426
williamr@2
   427
These settings are only relevant to mobile originated messages - those of 
williamr@2
   428
SMS-SUBMIT type.
williamr@2
   429
williamr@2
   430
@publishedAll
williamr@2
   431
@released
williamr@2
   432
*/
williamr@2
   433
class CSmsMessageSettings : public CBase
williamr@2
   434
	{
williamr@2
   435
public:
williamr@2
   436
	IMPORT_C virtual void InternalizeL(RReadStream& aReadStream);
williamr@2
   437
	IMPORT_C virtual void ExternalizeL(RWriteStream& aWriteStream) const;
williamr@2
   438
williamr@2
   439
	inline const TTimeIntervalMinutes& ValidityPeriod() const;
williamr@2
   440
	inline void SetValidityPeriod(TTimeIntervalMinutes);
williamr@2
   441
williamr@2
   442
	inline void SetValidityPeriodFormat(TSmsFirstOctet::TSmsValidityPeriodFormat aValidityPeriodFormat);
williamr@2
   443
	inline const TSmsFirstOctet::TSmsValidityPeriodFormat ValidityPeriodFormat() const;
williamr@2
   444
williamr@2
   445
	inline TBool RejectDuplicate() const;
williamr@2
   446
	inline void SetRejectDuplicate(TBool);
williamr@2
   447
williamr@2
   448
	inline TBool DeliveryReport() const;
williamr@2
   449
	inline void SetDeliveryReport(TBool);
williamr@2
   450
williamr@2
   451
	inline TBool ReplyPath() const;
williamr@2
   452
	inline void SetReplyPath(TBool);
williamr@2
   453
williamr@2
   454
	inline TSmsPIDConversion MessageConversion() const;
williamr@2
   455
	inline void SetMessageConversion(TSmsPIDConversion);
williamr@2
   456
williamr@2
   457
	inline TBool CanConcatenate() const;
williamr@2
   458
	inline void SetCanConcatenate(TBool);
williamr@2
   459
williamr@2
   460
	inline enum TSmsDataCodingScheme::TSmsAlphabet CharacterSet() const;
williamr@2
   461
	inline void SetCharacterSet(TSmsDataCodingScheme::TSmsAlphabet);
williamr@2
   462
williamr@2
   463
    IMPORT_C virtual void CopyL(const CSmsMessageSettings& aSettings);
williamr@2
   464
williamr@2
   465
	TUint32 MessageFlags() const;
williamr@2
   466
	void SetMessageFlags(TUint32 aMsgFlags);
williamr@2
   467
	inline TBool LastSegmentDeliveryReport() const;
williamr@2
   468
	inline void SetLastSegmentDeliveryReport(TBool);
williamr@2
   469
williamr@2
   470
	inline void SetUseServiceCenterTimeStampForDate(TBool aUseServiceCenterTimestamp);
williamr@2
   471
	inline TBool UseServiceCenterTimeStampForDate() const;
williamr@2
   472
williamr@2
   473
protected:
williamr@2
   474
williamr@2
   475
	CSmsMessageSettings();
williamr@2
   476
williamr@2
   477
private:
williamr@2
   478
williamr@2
   479
	TUint32 iMsgFlags;
williamr@2
   480
	TSmsPIDConversion iMessageConversion;
williamr@2
   481
	TSmsDataCodingScheme::TSmsAlphabet iAlphabet;
williamr@2
   482
	TTimeIntervalMinutes iValidityPeriod;
williamr@2
   483
	TSmsFirstOctet::TSmsValidityPeriodFormat iValidityPeriodFormat;
williamr@2
   484
	};
williamr@2
   485
williamr@2
   486
/** 
williamr@2
   487
The SMS Service settings.
williamr@2
   488
williamr@2
   489
An SMS service entry stores an object of this type in its message store. These
williamr@2
   490
settings define the default settings for mobile originated messages (SMS-SUBMIT
williamr@2
   491
type messages). They also provide some global settings that are applied to all
williamr@2
   492
messages, both outward going and received messages.
williamr@2
   493
williamr@2
   494
The SMS service also uses this class to store the set of avilable Servive Centre
williamr@2
   495
numbers. The default Service Centre is defined from this set.
williamr@2
   496
williamr@2
   497
@publishedAll
williamr@2
   498
@released
williamr@2
   499
*/
williamr@2
   500
class CSmsSettings : public CSmsMessageSettings
williamr@2
   501
	{
williamr@2
   502
public:
williamr@2
   503
williamr@2
   504
/**
williamr@2
   505
Defines the ways in which status reports that are received by the watcher may
williamr@2
   506
be handled.
williamr@2
   507
williamr@2
   508
This can be applied to both SMS-STATUS-REPORT type messages and Special Messages
williamr@2
   509
(e.g. Voice Mail Indication messages).
williamr@2
   510
*/
williamr@2
   511
	enum TSmsReportHandling
williamr@2
   512
		{
williamr@2
   513
/** 
williamr@2
   514
The reports are put in the inbox and made invisible. 
williamr@2
   515
*/
williamr@2
   516
		EMoveReportToInboxInvisible,
williamr@2
   517
/** 
williamr@2
   518
The reports are put in the inbox and made visible.
williamr@2
   519
*/
williamr@2
   520
		EMoveReportToInboxVisible,
williamr@2
   521
/**
williamr@2
   522
The reports are deleted.
williamr@2
   523
*/
williamr@2
   524
		EDiscardReport,
williamr@2
   525
/** 
williamr@2
   526
Not supported.
williamr@2
   527
*/
williamr@2
   528
		EDoNotWatchForReport,
williamr@2
   529
/**
williamr@2
   530
Reports are put in the inbox and made invisible. The status report 
williamr@2
   531
is matched against the sent mesasge and its summary info updated.
williamr@2
   532
*/
williamr@2
   533
		EMoveReportToInboxInvisibleAndMatch,
williamr@2
   534
/**
williamr@2
   535
Reports are put in the inbox and made visible. The status report 
williamr@2
   536
is matched against the sent mesasge and its summary info updated.
williamr@2
   537
*/
williamr@2
   538
		EMoveReportToInboxVisibleAndMatch,
williamr@2
   539
/**
williamr@2
   540
Reports are deleted. The status report is matched against the sent
williamr@2
   541
mesasge and its summary info updated.
williamr@2
   542
*/
williamr@2
   543
		EDiscardReportAndMatch
williamr@2
   544
		};
williamr@2
   545
williamr@2
   546
/** 
williamr@2
   547
Sets whether the service settings should be used to update the communications 
williamr@2
   548
database. 
williamr@2
   549
williamr@2
   550
If the update is specified, it is done when the Service settings are stored into
williamr@2
   551
the message store.
williamr@2
   552
*/
williamr@2
   553
	enum TSmsSettingsCommDbAction
williamr@2
   554
		{
williamr@2
   555
/** 
williamr@2
   556
The comms database should not be updated.
williamr@2
   557
*/
williamr@2
   558
		ENone,
williamr@2
   559
/** 
williamr@2
   560
Use the Service settings to update the comms datebase.
williamr@2
   561
*/
williamr@2
   562
		EStoreToCommDb
williamr@2
   563
		};
williamr@2
   564
williamr@2
   565
/** Defines the SMS bearer.
williamr@2
   566
Modes: GSM */
williamr@2
   567
enum TMobileSmsBearer
williamr@2
   568
	{
williamr@2
   569
	/** SMS messages will only be sent over a packet-switched (GPRS) network. */
williamr@2
   570
		ESmsBearerPacketOnly,
williamr@2
   571
	/** SMS messages will only be sent over a circuit-switched (GSM) network. */
williamr@2
   572
		ESmsBearerCircuitOnly,
williamr@2
   573
	/** SMS messages will be sent over the packet-switched (GPRS) network if possible, 
williamr@2
   574
	otherwise over circuit-switched (GSM) network. */
williamr@2
   575
		ESmsBearerPacketPreferred,
williamr@2
   576
	/** SMS messages will be sent over the circuit-switched (GSM) network if possible, 
williamr@2
   577
	otherwise over packet-switched (GPRS) network. */
williamr@2
   578
		ESmsBearerCircuitPreferred
williamr@2
   579
	};
williamr@2
   580
williamr@2
   581
public:
williamr@2
   582
williamr@2
   583
	IMPORT_C static CSmsSettings* NewL();
williamr@2
   584
	IMPORT_C static CSmsSettings* NewLC();
williamr@2
   585
	IMPORT_C virtual ~CSmsSettings();
williamr@2
   586
williamr@2
   587
	IMPORT_C TInt ServiceCenterCount() const;
williamr@2
   588
	IMPORT_C CSmsServiceCenter& GetServiceCenter(TInt aIndex) const;
williamr@2
   589
	IMPORT_C void AddServiceCenterL(const TDesC& aName,const TDesC& aNumber);
williamr@2
   590
	IMPORT_C void RemoveServiceCenter(TInt aIndex);
williamr@2
   591
	IMPORT_C TInt DefaultServiceCenter() const;
williamr@2
   592
	IMPORT_C void SetDefaultServiceCenter(TInt aDefaultSC);
williamr@2
   593
	inline TSmsDelivery Delivery() const;
williamr@2
   594
	inline void SetDelivery(TSmsDelivery);
williamr@2
   595
williamr@2
   596
	inline TBool ReplyQuoted() const;
williamr@2
   597
	inline void SetReplyQuoted(TBool);
williamr@2
   598
williamr@2
   599
    IMPORT_C void CopyL(const CSmsSettings& aSmsSettings);
williamr@2
   600
williamr@2
   601
	inline TSmsReportHandling StatusReportHandling() const;
williamr@2
   602
	inline void SetStatusReportHandling(TSmsReportHandling aStatusReportHandling);
williamr@2
   603
	inline TSmsReportHandling SpecialMessageHandling() const;
williamr@2
   604
	inline void SetSpecialMessageHandling(TSmsReportHandling aSpecialMessageHandling);
williamr@2
   605
williamr@2
   606
	inline void SetCommDbAction(TSmsSettingsCommDbAction aCommDbAction);
williamr@2
   607
	inline TSmsSettingsCommDbAction CommDbAction() const;
williamr@2
   608
williamr@2
   609
	inline void SetSmsBearerAction(TSmsSettingsCommDbAction aSmsBearerAction);
williamr@2
   610
	inline TSmsSettingsCommDbAction SmsBearerAction() const;
williamr@2
   611
williamr@2
   612
	inline void SetSmsBearer(TMobileSmsBearer aSmsBearer);
williamr@2
   613
	inline TMobileSmsBearer SmsBearer() const;
williamr@2
   614
williamr@2
   615
	inline void SetClass2Folder(TMsvId aId);
williamr@2
   616
	inline TMsvId Class2Folder() const;
williamr@2
   617
williamr@2
   618
	inline void SetDescriptionLength(TInt aLength);
williamr@2
   619
	inline TInt DescriptionLength() const;
williamr@2
   620
williamr@2
   621
	TUint32 SettingsFlags() const;
williamr@2
   622
	void SetSettingsFlags(TUint32 aSetFlags);
williamr@2
   623
williamr@2
   624
	void RemoveSCAddresses();
williamr@2
   625
	void StoreToCommDbL() const;
williamr@2
   626
williamr@2
   627
private:
williamr@2
   628
williamr@2
   629
	CSmsSettings();
williamr@2
   630
	void ConstructL();
williamr@2
   631
williamr@2
   632
private:
williamr@2
   633
williamr@2
   634
	TUint32 iSetFlags;
williamr@2
   635
	CArrayPtrFlat<CSmsServiceCenter> *iServiceCenters;
williamr@2
   636
	TSmsDelivery iDelivery;
williamr@2
   637
	TInt iDefaultSC;
williamr@2
   638
	TSmsReportHandling iStatusReportHandling;
williamr@2
   639
	TSmsReportHandling iSpecialMessageHandling;
williamr@2
   640
	TSmsSettingsCommDbAction iCommDbAction;
williamr@2
   641
	TSmsSettingsCommDbAction iSmsBearerAction;
williamr@2
   642
	TMobileSmsBearer iSmsBearer;
williamr@2
   643
	TMsvId iClass2Folder;
williamr@2
   644
	TInt iDescriptionLength;
williamr@2
   645
	};
williamr@2
   646
williamr@2
   647
/** 
williamr@2
   648
Recipient information for an SMS message.
williamr@2
   649
williamr@2
   650
A SMS-SUBMIT message may have several recipients
williamr@2
   651
williamr@2
   652
@publishedAll
williamr@2
   653
@released
williamr@2
   654
*/
williamr@2
   655
class CSmsNumber : public CMsvRecipient 
williamr@2
   656
	{
williamr@2
   657
public:
williamr@2
   658
williamr@2
   659
/**
williamr@2
   660
Defines the status of an acknowledgement for a recipient.
williamr@2
   661
*/
williamr@2
   662
	enum TSmsAckStatus
williamr@2
   663
		{
williamr@2
   664
/**
williamr@2
   665
An acknowledgement for this recipient has not been requested.
williamr@2
   666
*/
williamr@2
   667
		ENoAckRequested		= 0,
williamr@2
   668
/**
williamr@2
   669
The delivery status for this recipient has been requested, but the status report
williamr@2
   670
has not yet been received.
williamr@2
   671
*/
williamr@2
   672
		EPendingAck,
williamr@2
   673
/**
williamr@2
   674
A successful acknowledgement for this recipient has been received.
williamr@2
   675
*/
williamr@2
   676
		EAckSuccessful,
williamr@2
   677
/**
williamr@2
   678
A failed acknowledgement for this recipient has been received.
williamr@2
   679
*/
williamr@2
   680
		EAckError
williamr@2
   681
		};
williamr@2
   682
williamr@2
   683
public:
williamr@2
   684
williamr@2
   685
	IMPORT_C static CSmsNumber* NewL();
williamr@2
   686
	IMPORT_C static CSmsNumber* NewL(const CSmsNumber& aSmsNumber);
williamr@2
   687
	IMPORT_C virtual ~CSmsNumber();
williamr@2
   688
williamr@2
   689
	IMPORT_C void InternalizeL(RReadStream& aStream);
williamr@2
   690
	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
williamr@2
   691
williamr@2
   692
	IMPORT_C TPtrC Address() const;
williamr@2
   693
	IMPORT_C void SetAddressL(const TDesC& aAddress);
williamr@2
   694
	void SetEmailAddressL(const TDesC& aAddress, CSmsEmailFields* aEmailFields, const TDesC& aAlias);
williamr@2
   695
williamr@2
   696
	IMPORT_C TPtrC Name() const;
williamr@2
   697
	IMPORT_C void SetNameL(const TDesC& aName);
williamr@2
   698
williamr@2
   699
	inline TLogId LogId() const;
williamr@2
   700
	inline void SetLogId(TLogId aLogId);
williamr@2
   701
williamr@2
   702
	IMPORT_C CSmsNumber& CopyL(const CSmsNumber& aSmsNumber);
williamr@2
   703
williamr@2
   704
	IMPORT_C TSmsAckStatus AckStatus(TSmsAckType aAckType) const;
williamr@2
   705
	IMPORT_C void SetAckStatus(TSmsAckType aAckType, TSmsAckStatus aAckStatus);
williamr@2
   706
	
williamr@2
   707
private:
williamr@2
   708
williamr@2
   709
	CSmsNumber();
williamr@2
   710
	TPtrC LimitStringSize(const TPtrC& aString, TInt aMaxLength) const;
williamr@2
   711
williamr@2
   712
private:
williamr@2
   713
williamr@2
   714
	HBufC* iNumber;
williamr@2
   715
	HBufC* iName;
williamr@2
   716
	TLogId iLogId;
williamr@2
   717
	TSmsAckStatus iDeliveryStatus;
williamr@2
   718
	};
williamr@2
   719
williamr@2
   720
/** 
williamr@2
   721
Used to store Service Centre numbers and their associated name.
williamr@2
   722
williamr@2
   723
@publishedAll
williamr@2
   724
@released
williamr@2
   725
*/
williamr@2
   726
class CSmsServiceCenter : public CBase
williamr@2
   727
	{
williamr@2
   728
public:
williamr@2
   729
	IMPORT_C static CSmsServiceCenter* NewL();
williamr@2
   730
	IMPORT_C static CSmsServiceCenter* NewL(const CSmsServiceCenter& aSmsSC);
williamr@2
   731
	IMPORT_C ~CSmsServiceCenter();
williamr@2
   732
williamr@2
   733
	IMPORT_C TPtrC Address() const;
williamr@2
   734
	IMPORT_C void SetAddressL(const TDesC& aAddress);
williamr@2
   735
williamr@2
   736
	IMPORT_C TPtrC Name() const;
williamr@2
   737
	IMPORT_C void SetNameL(const TDesC& aName);
williamr@2
   738
	
williamr@2
   739
	IMPORT_C CSmsServiceCenter& CopyL(const CSmsServiceCenter& aSmsSc);
williamr@2
   740
williamr@2
   741
private:
williamr@2
   742
	CSmsServiceCenter();
williamr@2
   743
	TPtrC LimitStringSize(const TPtrC& aString, TInt aMaxLength) const;
williamr@2
   744
	
williamr@2
   745
private:
williamr@2
   746
	HBufC* iNumber;
williamr@2
   747
	HBufC* iName;
williamr@2
   748
	};
williamr@2
   749
williamr@2
   750
#include <smutset.inl>
williamr@2
   751
williamr@2
   752
#endif // __SMUTSET_H__