williamr@2: // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@4: // SMUTSET.H williamr@2: // williamr@4: /** williamr@4: * @file williamr@4: * @publishedAll williamr@4: * @released williamr@4: */ williamr@2: #ifndef __SMUTSET_H__ williamr@2: #define __SMUTSET_H__ williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: class CSmsServiceCenter; williamr@2: class CSmsEmailFields; williamr@2: williamr@2: // Both the recipient's number and SC number (TP-Destination-Address and RP-Destination-Address) williamr@2: // can be 12 octets which means that there can be 21 characters (including + sign) in the number string. williamr@2: williamr@2: /** williamr@2: The maximum length of recipient's number. williamr@2: williamr@2: The number returned by CSmsNumber::Address() and CSmsServiceCenter::Address() is limited this maximum length. williamr@2: williamr@2: @see CSmsNumber::Address williamr@2: @see CSmsServiceCenter::Address williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: const TInt KSmcmSmsNumberMaxNumberLength = 21; williamr@2: williamr@2: /** williamr@2: The maximum length of recipient's name. williamr@2: williamr@2: The number returned by CSmsNumber::Name() and CSmsServiceCenter::Name() is limited this maximum length. williamr@2: williamr@2: @see CSmsNumber::Name williamr@2: @see CSmsServiceCenter::Name williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: const TInt KSmcmSmsNumberMaxNameLength = 256; williamr@2: williamr@2: /** williamr@2: Defines the possible forms in which an SMS message should be delivered to the williamr@2: recipient by the service centre. williamr@2: williamr@2: The specified format may or may not actually be supported by the service centre. williamr@2: Note that the format of the recipient address(es) may need to be different williamr@2: to a normal telephone number if the conversion is set to any other value than williamr@2: ESmsConvPIDNone, ESmsConvFax, ESmsConvPaging or ESmsConvErmes. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: enum TSmsPIDConversion williamr@2: { williamr@2: /** williamr@2: No conversion (i.e. use SMS itself). williamr@2: */ williamr@2: ESmsConvPIDNone = TSmsProtocolIdentifier::ESmsNoTelematicDevice, williamr@2: /** williamr@2: Convert to fax. williamr@2: */ williamr@2: ESmsConvFax = TSmsProtocolIdentifier::ESmsGroup3TeleFax, williamr@2: /** williamr@2: Convert to X.400. williamr@2: */ williamr@2: ESmsConvX400 = TSmsProtocolIdentifier::ESmsX400MessageHandlingSystem, williamr@2: /** williamr@2: Convert to pager message. williamr@2: */ williamr@2: ESmsConvPaging = TSmsProtocolIdentifier::ESmsNationalPagingSystem, williamr@2: /** williamr@2: Convert to Internet email. williamr@2: */ williamr@2: ESmsConvMail = TSmsProtocolIdentifier::ESmsInternetElectronicMail, williamr@2: /** williamr@2: Convert to ERMES paging. williamr@2: */ williamr@2: ESmsConvErmes = TSmsProtocolIdentifier::ESmsERMES, williamr@2: /** williamr@2: Convert to sppech. williamr@2: */ williamr@2: ESmsConvSpeech = TSmsProtocolIdentifier::ESmsVoiceTelephone williamr@2: }; williamr@2: williamr@2: /** williamr@2: Defines the set of possible validity periods for mobile originated messages. williamr@2: williamr@2: Mobile originated messages have a PDU type of SMS-SUBMIT. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: enum TSmcmValidityPeriod williamr@2: { williamr@2: /** williamr@2: Validity period of an hour. williamr@2: */ williamr@2: ESmsVPHour = TSmsValidityPeriod::EHalfHourUnitInMinutes*2, williamr@2: /** williamr@2: Validity period of six hours. williamr@2: */ williamr@2: ESmsVPSixHours = TSmsValidityPeriod::EHalfHourUnitInMinutes*12, williamr@2: /** williamr@2: Validity period of 24 hours. williamr@2: */ williamr@2: ESmsVP24Hours = TSmsValidityPeriod::EOneDayUnitInMinutes, williamr@2: /** williamr@2: Validity period of a week. williamr@2: */ williamr@2: ESmsVPWeek = TSmsValidityPeriod::EOneWeekUnitInMinutes, williamr@2: /** williamr@2: The maximum validity period - currently set as 63 weeks. williamr@2: */ williamr@2: ESmsVPMaximum = TSmsValidityPeriod::EOneWeekUnitInMinutes*63, williamr@2: /** williamr@2: An enum that specifies that a validity period is not supported. williamr@2: */ williamr@2: ESmsVPNotSupported = KErrNotSupported, williamr@2: /** williamr@2: The default validy period - currently set to a week. williamr@2: */ williamr@2: ESmsVPDefault = ESmsVPWeek williamr@2: }; williamr@2: williamr@2: /** williamr@2: Defines options for the preferred default sending schedule type of a new message williamr@2: created using the SMS client MTM. williamr@2: williamr@2: The option has no direct effect on the SMS MTM. When it is sending an SMS williamr@2: message it automatically appends other SMS messages in the outbox whose send williamr@2: states are marked as KMsvSendStatewaiting or KMsvSendSateUnknown. williamr@2: williamr@2: Therefore it is the responsibility of the messaging client to set the correct williamr@2: send state of new SMS messages correctly given the preferred sending schedule. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: enum TSmsDelivery williamr@2: { williamr@2: /** williamr@2: Send message immediately. The message send state should be set to KMsvSendStateWaiting. williamr@2: */ williamr@2: ESmsDeliveryImmediately, williamr@2: /** williamr@2: Send message when client requests. The message send state should be set to KMsvSendStateUponRequest. williamr@2: */ williamr@2: ESmsDeliveryUponRequest, williamr@2: /** williamr@2: Send message at scheduled time. The message send state should be set to KMsvSendStateScheduled. williamr@2: */ williamr@2: ESmsDeliveryScheduled williamr@2: }; williamr@2: williamr@2: /** williamr@2: Defines the flags and masks for some of the message settings. williamr@2: williamr@2: The settings classes CSmsMessageSettings and CSmsSettings use these flags to williamr@2: store the specified information. williamr@2: williamr@4: @publishedAll williamr@2: @released williamr@2: */ williamr@2: enum TSmsSettingsFlags williamr@2: { williamr@2: /** williamr@2: Mask that resets the flags. williamr@2: */ williamr@4: ESmsSettingsNoFlags =0x00000000, williamr@2: /** williamr@2: Flag that indicates if messages can be concatenated. williamr@2: williamr@2: If true, the UI should pass a long message in one piece to the MTM. If false, williamr@2: it should split the message manually into 140 byte parts. The value of this williamr@2: flag does not affect the behaviour of the SMS MTM. williamr@2: */ williamr@2: ESmsSettingsCanConcatenate =0x00000001, williamr@2: /** williamr@2: Flag that indicates whether the original message should be included in relpy williamr@2: messages. williamr@2: williamr@2: If true, the received message should be quoted at the beginning of the reply williamr@2: message. If false, reply messages should be initially empty. williamr@2: */ williamr@2: ESmsSettingsReplyQuoted =0x00000002, williamr@2: /** williamr@2: Flag that indicates whether duplicate messages should be rejected. williamr@2: */ williamr@2: ESmsSettingsRejectDuplicate =0x00000004, williamr@2: /** williamr@2: Flag that indicates if a status report (TP-SRR in GSM spec 03.40) should be williamr@2: requested from the Service Centre. williamr@2: */ williamr@2: ESmsSettingsDeliveryReport =0x00000008, williamr@2: /** williamr@2: Flag that indicates if the reply path (Service Centre address) should be included williamr@2: in the delivered message (TP-RP in GSM spec 03.40). williamr@2: */ williamr@2: ESmsSettingsReplyPathRequested =0x00000010, williamr@2: /** williamr@2: Flag that indicates if a status report (TP-SRR in GSM spec 03.40) for the last segment williamr@2: should be requested from the Service Centre. williamr@2: */ williamr@2: ESmsSettingsLastSegmentDeliveryReport =0x00000020 , williamr@2: williamr@2: /** williamr@2: Flag that indicates if a status report (TP-SRR in GSM spec 03.40) for the last segment williamr@2: is not requested from the Service Centre. williamr@2: */ williamr@2: ENoSmsSettingsLastSegmentDeliveryReport =0x00000040, williamr@2: /** williamr@2: Flag that indicates that the service center time stamp should be used for the date williamr@2: field in any TMsvEntry that corresponds to a SMS message. williamr@2: */ williamr@2: ESmsSettingsUseServiceCenterTimeStamp =0x00000080, williamr@2: /** williamr@4: Flag that indicates if message received from unknown port, williamr@4: discard the message without indicating the user. williamr@4: */ williamr@4: ESmsSettingsDiscardUnknownPortMsgs =0x00000100, williamr@4: /** williamr@2: Mask for the set of flags defined. williamr@2: */ williamr@2: ESmsSettingsMask =0x000000FF, williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: Defines the types of acknowledgements that can be received from recipients. williamr@2: */ williamr@2: enum TSmsAckType williamr@2: { williamr@2: /** williamr@2: Acknowlwdgement of delivery to a recipient. williamr@2: */ williamr@2: ESmsAckTypeDelivery =0 williamr@2: }; williamr@2: williamr@2: /** williamr@2: Progress information for SMS MTM operations. williamr@2: williamr@2: This information is returned by CMsvOperation::ProgressL() in a TSmsProgressBuf williamr@2: package. williamr@2: williamr@2: @see CMsvOperation::ProgressL williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: class TSmsProgress williamr@2: { williamr@2: public: williamr@2: /** williamr@2: Defines type of operation for which progress information is being given. williamr@2: williamr@2: These types correspond to the commands defined in TSmsMtmCommand. williamr@2: williamr@2: @see TSmsMtmCommand williamr@2: */ williamr@2: enum TSmsProgressType williamr@2: { williamr@2: /** williamr@2: The default operation type - no operation. williamr@2: */ williamr@2: ESmsProgressTypeDefault, williamr@2: /** williamr@2: Reading SIM parameters. williamr@2: williamr@2: Pre v7.0, this was named ESmsProgressTypeReadingServiceCenterAddress. williamr@2: */ williamr@2: ESmsProgressTypeReadSimParams, williamr@2: /** williamr@2: Writing SIM parameters. williamr@2: williamr@2: Pre v7.0 this was named ESmsProgressTypeWritingServiceCenterAddress. williamr@2: */ williamr@2: ESmsProgressTypeWriteSimParams, williamr@2: /** williamr@2: Sending messages. williamr@2: */ williamr@2: ESmsProgressTypeSending, williamr@2: /** williamr@2: Scheduling sending messages. williamr@2: */ williamr@2: ESmsProgressTypeScheduling, williamr@2: /** williamr@2: Enumerating phone stores. williamr@2: williamr@2: Pre v7.0, this was named ESmsProgressTypeEnumeratingSim. williamr@2: */ williamr@2: ESmsProgressTypeEnumeratingPhoneStores, williamr@2: /** williamr@2: Copying messages from phone stores. williamr@2: williamr@2: Pre v7.0, this was named ESmsProgressTypeCopyFromSim. williamr@2: */ williamr@2: ESmsProgressTypeCopyFromPhoneStore, williamr@2: /** williamr@2: Moving messages from phone stores. williamr@2: williamr@2: Pre v7.0, this was named ESmsProgressTypeMoveFromSim. williamr@2: */ williamr@2: ESmsProgressTypeMoveFromPhoneStore, williamr@2: /** williamr@2: Deleting messages from phone stores. williamr@2: williamr@2: Pre v7.0, this was named ESmsProgressTypeDeleteFromSim. williamr@2: */ williamr@2: ESmsProgressTypeDeleteFromPhoneStore, williamr@2: /** williamr@2: Removing all messages from the task scheduler list. williamr@2: */ williamr@2: ESmsProgressTypeDeleteSchedule, williamr@2: /** williamr@2: Checking the current scheduled status of the messages. williamr@2: */ williamr@2: ESmsProgressTypeCheckSchedule, williamr@2: /** williamr@2: Recursively deleting messages. williamr@2: */ williamr@2: ESmsProgressTypeDeleteAll, williamr@2: /** williamr@2: Copying messages to a phone store. williamr@2: williamr@2: Pre v7.0, this was named ESmsProgressTypeCopyToSim. williamr@2: */ williamr@2: ESmsProgressTypeCopyToPhoneStore, williamr@2: /** williamr@2: Moving messages to a phone store. williamr@2: williamr@2: Pre v7.0, this was named ESmsProgressTypeMoveToSim. williamr@2: */ williamr@2: ESmsProgressTypeMoveToPhoneStore, williamr@2: /** williamr@2: Moving message entries. williamr@2: williamr@2: This is the second part of ESmsProgressTypeMoveFromPhoneStore. The first part williamr@2: deletes the messages from the phone storageSIM. This second part moves the williamr@2: messages from the folder that represents the phone storage to the specified williamr@2: destination. williamr@2: */ williamr@2: ESmsProgressTypeMovingEntries williamr@2: }; williamr@2: williamr@2: inline TSmsProgress(TSmsProgressType aType = ESmsProgressTypeDefault); williamr@2: williamr@2: public: williamr@2: williamr@2: /** williamr@2: The error code. williamr@2: */ williamr@2: TInt iError; williamr@2: /** williamr@2: The type of operation. williamr@2: williamr@2: @see TSmsProgress::TSmsProgressType williamr@2: */ williamr@2: TSmsProgressType iType; williamr@2: /** williamr@2: The state of the operation. williamr@2: */ williamr@2: TInt iState; williamr@2: /** williamr@2: The number of recipients processed so far for the current message. williamr@2: */ williamr@2: TInt iRcpDone; williamr@2: /** williamr@2: The total number of recipients in the current message. williamr@2: */ williamr@2: TInt iRcpCount; williamr@2: /** williamr@2: The nmber of messages processed so far for the current operation. williamr@2: */ williamr@2: TInt iMsgDone; williamr@2: /** williamr@2: The total number of messages for the current operation. williamr@2: */ williamr@2: TInt iMsgCount; williamr@2: /** williamr@2: The Service Centre address. williamr@2: williamr@2: This is set by the command ESmsMtmCommandReadServiceCenter. williamr@2: williamr@2: @removed williamr@2: This is no longer used since v7.0. williamr@2: */ williamr@2: TBuf<14> iServiceCenterAddress; williamr@2: /** williamr@2: The invisible folder that contains the messages read from the SIM by the command williamr@2: ESmsMtmCommandEnumeratePhoneStores. williamr@2: */ williamr@2: TMsvId iEnumerateFolder; williamr@2: }; williamr@2: williamr@2: /** williamr@2: Package buffer for TSmsProgress. williamr@2: williamr@2: @see TSmsProgress williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: typedef TPckgBuf TSmsProgressBuf; williamr@2: williamr@2: williamr@2: /** williamr@2: The SMS settings that are relevant on a per message basis. williamr@2: williamr@2: Each SMS message has its own settings. Initially they have a default set of williamr@2: values derived from the SMS service settings. They can be changed on an williamr@2: individual message basis. For instance, a messaging application may allow a williamr@2: user to specify/not specify status reports individually for each message. williamr@2: williamr@2: These settings are only relevant to mobile originated messages - those of williamr@2: SMS-SUBMIT type. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@4: NONSHARABLE_CLASS(CSmsMessageSettings): public CBase williamr@2: { williamr@2: public: williamr@2: IMPORT_C virtual void InternalizeL(RReadStream& aReadStream); williamr@2: IMPORT_C virtual void ExternalizeL(RWriteStream& aWriteStream) const; williamr@2: williamr@2: inline const TTimeIntervalMinutes& ValidityPeriod() const; williamr@2: inline void SetValidityPeriod(TTimeIntervalMinutes); williamr@2: williamr@2: inline void SetValidityPeriodFormat(TSmsFirstOctet::TSmsValidityPeriodFormat aValidityPeriodFormat); williamr@2: inline const TSmsFirstOctet::TSmsValidityPeriodFormat ValidityPeriodFormat() const; williamr@2: williamr@2: inline TBool RejectDuplicate() const; williamr@2: inline void SetRejectDuplicate(TBool); williamr@2: williamr@2: inline TBool DeliveryReport() const; williamr@2: inline void SetDeliveryReport(TBool); williamr@2: williamr@2: inline TBool ReplyPath() const; williamr@2: inline void SetReplyPath(TBool); williamr@2: williamr@2: inline TSmsPIDConversion MessageConversion() const; williamr@2: inline void SetMessageConversion(TSmsPIDConversion); williamr@2: williamr@2: inline TBool CanConcatenate() const; williamr@2: inline void SetCanConcatenate(TBool); williamr@2: williamr@2: inline enum TSmsDataCodingScheme::TSmsAlphabet CharacterSet() const; williamr@2: inline void SetCharacterSet(TSmsDataCodingScheme::TSmsAlphabet); williamr@2: williamr@2: IMPORT_C virtual void CopyL(const CSmsMessageSettings& aSettings); williamr@2: williamr@2: TUint32 MessageFlags() const; williamr@2: void SetMessageFlags(TUint32 aMsgFlags); williamr@2: inline TBool LastSegmentDeliveryReport() const; williamr@2: inline void SetLastSegmentDeliveryReport(TBool); williamr@2: williamr@2: inline void SetUseServiceCenterTimeStampForDate(TBool aUseServiceCenterTimestamp); williamr@2: inline TBool UseServiceCenterTimeStampForDate() const; williamr@2: williamr@2: protected: williamr@2: williamr@2: CSmsMessageSettings(); williamr@2: williamr@2: private: williamr@2: williamr@2: TUint32 iMsgFlags; williamr@2: TSmsPIDConversion iMessageConversion; williamr@2: TSmsDataCodingScheme::TSmsAlphabet iAlphabet; williamr@2: TTimeIntervalMinutes iValidityPeriod; williamr@2: TSmsFirstOctet::TSmsValidityPeriodFormat iValidityPeriodFormat; williamr@2: }; williamr@2: williamr@2: /** williamr@2: The SMS Service settings. williamr@2: williamr@2: An SMS service entry stores an object of this type in its message store. These williamr@2: settings define the default settings for mobile originated messages (SMS-SUBMIT williamr@2: type messages). They also provide some global settings that are applied to all williamr@2: messages, both outward going and received messages. williamr@2: williamr@2: The SMS service also uses this class to store the set of avilable Servive Centre williamr@2: numbers. The default Service Centre is defined from this set. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@4: NONSHARABLE_CLASS(CSmsSettings): public CSmsMessageSettings williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Defines the ways in which status reports that are received by the watcher may williamr@2: be handled. williamr@2: williamr@2: This can be applied to both SMS-STATUS-REPORT type messages and Special Messages williamr@2: (e.g. Voice Mail Indication messages). williamr@2: */ williamr@2: enum TSmsReportHandling williamr@2: { williamr@2: /** williamr@2: The reports are put in the inbox and made invisible. williamr@2: */ williamr@2: EMoveReportToInboxInvisible, williamr@2: /** williamr@2: The reports are put in the inbox and made visible. williamr@2: */ williamr@2: EMoveReportToInboxVisible, williamr@2: /** williamr@2: The reports are deleted. williamr@2: */ williamr@2: EDiscardReport, williamr@2: /** williamr@2: Not supported. williamr@2: */ williamr@2: EDoNotWatchForReport, williamr@2: /** williamr@2: Reports are put in the inbox and made invisible. The status report williamr@2: is matched against the sent mesasge and its summary info updated. williamr@2: */ williamr@2: EMoveReportToInboxInvisibleAndMatch, williamr@2: /** williamr@2: Reports are put in the inbox and made visible. The status report williamr@2: is matched against the sent mesasge and its summary info updated. williamr@2: */ williamr@2: EMoveReportToInboxVisibleAndMatch, williamr@2: /** williamr@2: Reports are deleted. The status report is matched against the sent williamr@2: mesasge and its summary info updated. williamr@2: */ williamr@2: EDiscardReportAndMatch williamr@2: }; williamr@2: williamr@2: /** williamr@2: Sets whether the service settings should be used to update the communications williamr@2: database. williamr@2: williamr@2: If the update is specified, it is done when the Service settings are stored into williamr@2: the message store. williamr@2: */ williamr@2: enum TSmsSettingsCommDbAction williamr@2: { williamr@2: /** williamr@2: The comms database should not be updated. williamr@2: */ williamr@2: ENone, williamr@2: /** williamr@2: Use the Service settings to update the comms datebase. williamr@2: */ williamr@2: EStoreToCommDb williamr@2: }; williamr@2: williamr@2: /** Defines the SMS bearer. williamr@2: Modes: GSM */ williamr@2: enum TMobileSmsBearer williamr@2: { williamr@2: /** SMS messages will only be sent over a packet-switched (GPRS) network. */ williamr@2: ESmsBearerPacketOnly, williamr@2: /** SMS messages will only be sent over a circuit-switched (GSM) network. */ williamr@2: ESmsBearerCircuitOnly, williamr@2: /** SMS messages will be sent over the packet-switched (GPRS) network if possible, williamr@2: otherwise over circuit-switched (GSM) network. */ williamr@2: ESmsBearerPacketPreferred, williamr@2: /** SMS messages will be sent over the circuit-switched (GSM) network if possible, williamr@2: otherwise over packet-switched (GPRS) network. */ williamr@2: ESmsBearerCircuitPreferred williamr@2: }; williamr@2: williamr@2: public: williamr@2: williamr@2: IMPORT_C static CSmsSettings* NewL(); williamr@2: IMPORT_C static CSmsSettings* NewLC(); williamr@2: IMPORT_C virtual ~CSmsSettings(); williamr@2: williamr@2: IMPORT_C TInt ServiceCenterCount() const; williamr@2: IMPORT_C CSmsServiceCenter& GetServiceCenter(TInt aIndex) const; williamr@2: IMPORT_C void AddServiceCenterL(const TDesC& aName,const TDesC& aNumber); williamr@2: IMPORT_C void RemoveServiceCenter(TInt aIndex); williamr@2: IMPORT_C TInt DefaultServiceCenter() const; williamr@2: IMPORT_C void SetDefaultServiceCenter(TInt aDefaultSC); williamr@2: inline TSmsDelivery Delivery() const; williamr@2: inline void SetDelivery(TSmsDelivery); williamr@2: williamr@2: inline TBool ReplyQuoted() const; williamr@2: inline void SetReplyQuoted(TBool); williamr@2: williamr@2: IMPORT_C void CopyL(const CSmsSettings& aSmsSettings); williamr@2: williamr@2: inline TSmsReportHandling StatusReportHandling() const; williamr@2: inline void SetStatusReportHandling(TSmsReportHandling aStatusReportHandling); williamr@2: inline TSmsReportHandling SpecialMessageHandling() const; williamr@2: inline void SetSpecialMessageHandling(TSmsReportHandling aSpecialMessageHandling); williamr@2: williamr@2: inline void SetCommDbAction(TSmsSettingsCommDbAction aCommDbAction); williamr@2: inline TSmsSettingsCommDbAction CommDbAction() const; williamr@2: williamr@2: inline void SetSmsBearerAction(TSmsSettingsCommDbAction aSmsBearerAction); williamr@2: inline TSmsSettingsCommDbAction SmsBearerAction() const; williamr@2: williamr@2: inline void SetSmsBearer(TMobileSmsBearer aSmsBearer); williamr@2: inline TMobileSmsBearer SmsBearer() const; williamr@2: williamr@2: inline void SetClass2Folder(TMsvId aId); williamr@2: inline TMsvId Class2Folder() const; williamr@2: williamr@2: inline void SetDescriptionLength(TInt aLength); williamr@2: inline TInt DescriptionLength() const; williamr@2: williamr@4: inline TBool DiscardUnknownPortMessage() const; williamr@4: inline void SetDiscardUnknownPortMessage(TBool aDeleteMessage); williamr@2: TUint32 SettingsFlags() const; williamr@2: void SetSettingsFlags(TUint32 aSetFlags); williamr@2: williamr@2: void RemoveSCAddresses(); williamr@2: void StoreToCommDbL() const; williamr@2: williamr@2: private: williamr@2: williamr@2: CSmsSettings(); williamr@2: void ConstructL(); williamr@2: williamr@2: private: williamr@2: williamr@2: TUint32 iSetFlags; williamr@2: CArrayPtrFlat *iServiceCenters; williamr@2: TSmsDelivery iDelivery; williamr@2: TInt iDefaultSC; williamr@2: TSmsReportHandling iStatusReportHandling; williamr@2: TSmsReportHandling iSpecialMessageHandling; williamr@2: TSmsSettingsCommDbAction iCommDbAction; williamr@2: TSmsSettingsCommDbAction iSmsBearerAction; williamr@2: TMobileSmsBearer iSmsBearer; williamr@2: TMsvId iClass2Folder; williamr@2: TInt iDescriptionLength; williamr@2: }; williamr@2: williamr@2: /** williamr@2: Recipient information for an SMS message. williamr@2: williamr@2: A SMS-SUBMIT message may have several recipients williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@4: NONSHARABLE_CLASS(CSmsNumber): public CMsvRecipient williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Defines the status of an acknowledgement for a recipient. williamr@2: */ williamr@2: enum TSmsAckStatus williamr@2: { williamr@2: /** williamr@2: An acknowledgement for this recipient has not been requested. williamr@2: */ williamr@2: ENoAckRequested = 0, williamr@2: /** williamr@2: The delivery status for this recipient has been requested, but the status report williamr@2: has not yet been received. williamr@2: */ williamr@2: EPendingAck, williamr@2: /** williamr@2: A successful acknowledgement for this recipient has been received. williamr@2: */ williamr@2: EAckSuccessful, williamr@2: /** williamr@2: A failed acknowledgement for this recipient has been received. williamr@2: */ williamr@2: EAckError williamr@2: }; williamr@2: williamr@2: public: williamr@2: williamr@2: IMPORT_C static CSmsNumber* NewL(); williamr@2: IMPORT_C static CSmsNumber* NewL(const CSmsNumber& aSmsNumber); williamr@2: IMPORT_C virtual ~CSmsNumber(); williamr@2: williamr@2: IMPORT_C void InternalizeL(RReadStream& aStream); williamr@2: IMPORT_C void ExternalizeL(RWriteStream& aStream) const; williamr@2: williamr@2: IMPORT_C TPtrC Address() const; williamr@2: IMPORT_C void SetAddressL(const TDesC& aAddress); williamr@2: void SetEmailAddressL(const TDesC& aAddress, CSmsEmailFields* aEmailFields, const TDesC& aAlias); williamr@2: williamr@2: IMPORT_C TPtrC Name() const; williamr@2: IMPORT_C void SetNameL(const TDesC& aName); williamr@2: williamr@2: inline TLogId LogId() const; williamr@2: inline void SetLogId(TLogId aLogId); williamr@2: williamr@2: IMPORT_C CSmsNumber& CopyL(const CSmsNumber& aSmsNumber); williamr@2: williamr@2: IMPORT_C TSmsAckStatus AckStatus(TSmsAckType aAckType) const; williamr@2: IMPORT_C void SetAckStatus(TSmsAckType aAckType, TSmsAckStatus aAckStatus); williamr@2: williamr@2: private: williamr@2: williamr@2: CSmsNumber(); williamr@2: TPtrC LimitStringSize(const TPtrC& aString, TInt aMaxLength) const; williamr@2: williamr@2: private: williamr@2: williamr@2: HBufC* iNumber; williamr@2: HBufC* iName; williamr@2: TLogId iLogId; williamr@2: TSmsAckStatus iDeliveryStatus; williamr@2: }; williamr@2: williamr@2: /** williamr@2: Used to store Service Centre numbers and their associated name. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@4: NONSHARABLE_CLASS (CSmsServiceCenter) : public CBase williamr@2: { williamr@2: public: williamr@2: IMPORT_C static CSmsServiceCenter* NewL(); williamr@2: IMPORT_C static CSmsServiceCenter* NewL(const CSmsServiceCenter& aSmsSC); williamr@2: IMPORT_C ~CSmsServiceCenter(); williamr@2: williamr@2: IMPORT_C TPtrC Address() const; williamr@2: IMPORT_C void SetAddressL(const TDesC& aAddress); williamr@2: williamr@2: IMPORT_C TPtrC Name() const; williamr@2: IMPORT_C void SetNameL(const TDesC& aName); williamr@2: williamr@2: IMPORT_C CSmsServiceCenter& CopyL(const CSmsServiceCenter& aSmsSc); williamr@2: williamr@2: private: williamr@2: CSmsServiceCenter(); williamr@2: TPtrC LimitStringSize(const TPtrC& aString, TInt aMaxLength) const; williamr@2: williamr@2: private: williamr@2: HBufC* iNumber; williamr@2: HBufC* iName; williamr@2: }; williamr@2: williamr@2: #include williamr@2: williamr@2: #endif // __SMUTSET_H__