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