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@2: // 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: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // This file defines the container class CSmsIEOperation and its specialisations. williamr@2: // The classes provide interfaces that allow the client to operate on a number williamr@2: // of control information elements. williamr@2: // williamr@2: // williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: */ williamr@2: williamr@2: #ifndef __GSMUIEOPERATIONS_ williamr@2: #define __GSMUIEOPERATIONS_ williamr@2: williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: williamr@2: /** williamr@2: * SMS Stack clients use specialisations of this class to configure a SMS Message with Control Information Elements williamr@2: * which have been introduced in 23.040 v6.5.0. williamr@2: * williamr@2: * The 23.040 v6.5.0 standard defines individual requirements for how each of these control information elements williamr@2: * is to be encoded and decoded. These requirements mean that these control information elements need to be williamr@2: * configured in the CSmsMessage using derivations of this interface, rather than CSmsUserData::AddInformationElementL(). williamr@2: * williamr@2: * CSmsUserData::AddInformationElement specifies those information elements it supports and those that are supported williamr@2: * by CSmsIEOperation and its derivatives. williamr@2: * williamr@2: * Each control information element that uses this interface is supported by a class derived from CSmsIEOperation. williamr@2: * The derived class operates on the CSmsMessage, allowing the client to add, remove and access control information williamr@2: * elements inside the CSmsMessage. williamr@2: * williamr@2: * The client gets access to an operations class using the following interface: williamr@2: * williamr@2: * CSmsIEOperation& CSmsMessage::GetOperationsForIEL(CSmsInformationElement::TSmsInformationElementIdentifier aId); williamr@2: * williamr@2: * When the CSmsMessage is deleted, all its associated CSmsIEOperations classes are also deleted and references to williamr@2: * them become stale. Each instance of the CSmsIEOperation Class is an attributes of the CSmsMessage itself. williamr@2: * williamr@2: * @publishedAll williamr@2: */ williamr@2: class CSmsIEOperation : public CBase williamr@2: { williamr@2: public: williamr@2: static CSmsIEOperation* NewL(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs); williamr@2: IMPORT_C CSmsInformationElement::TSmsInformationElementIdentifier Id() const; williamr@2: virtual ~CSmsIEOperation(){}; williamr@2: protected: williamr@2: virtual TBool MessageTypeSupported() const; williamr@2: virtual void ValidateOperationL() const {}; williamr@2: private: williamr@2: void ConstructL(); williamr@2: private: williamr@2: CSmsInformationElement::TSmsInformationElementIdentifier iId; williamr@2: protected: williamr@2: CSmsMessage& iMessage; williamr@2: CSmsIEOperation(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage); williamr@2: void operator=(const CSmsIEOperation&); williamr@2: TBool operator==(const CSmsIEOperation&); williamr@2: }; williamr@2: williamr@2: class CSmsCtrlOperation : public CSmsIEOperation williamr@2: { williamr@2: protected: williamr@2: CSmsCtrlOperation(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage); williamr@2: ~CSmsCtrlOperation(){}; williamr@2: void operator=(const CSmsCtrlOperation&); williamr@2: TBool operator==(const CSmsCtrlOperation&); williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: * Clients use this class to configure a CSmsMessage with hyperlinks per 23.040 v6.5.0 section 9.2.3.24.12. williamr@2: * williamr@2: * @publishedAll williamr@2: */ williamr@2: class CSmsHyperLinkOperations : public CSmsCtrlOperation williamr@2: { williamr@2: public: williamr@2: IMPORT_C void AddHyperLinkL(TUint aPosition, TUint8 aTitleLength, TUint8 aURLLength) const; williamr@2: IMPORT_C TUint NumberOfHyperLinksL() const; williamr@2: IMPORT_C void CopyHyperLinkAtIndexL(TUint index, TUint& aPosition, TUint8& aTitleLength, TUint8& aURLLength) const; williamr@2: IMPORT_C void RemoveAllHyperLinksL() const; williamr@2: IMPORT_C void RemoveHyperLinkL(TUint aIndex) const; williamr@2: CSmsHyperLinkOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage); williamr@2: ~CSmsHyperLinkOperations(){}; williamr@2: protected: williamr@2: void ValidateOperationL() const; williamr@2: void operator=(const CSmsHyperLinkOperations&); williamr@2: TBool operator==(const CSmsHyperLinkOperations&); williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: * Clients use this class to configure a CSmsMessage with a reply address per 23.040 v6.5.0 section 9.2.3.24.10.1.17. williamr@2: * williamr@2: * @publishedAll williamr@2: */ williamr@2: class CSmsReplyAddressOperations : public CSmsCtrlOperation williamr@2: { williamr@2: public: williamr@2: static CSmsReplyAddressOperations* NewL(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage, williamr@2: CCnvCharacterSetConverter& iCharacterSetConverter, RFs& iFs); williamr@2: williamr@2: IMPORT_C void AddReplyAddressL(const TDesC& aAddress) const; williamr@2: IMPORT_C void AddParsedReplyAddressL(const TGsmSmsTelNumber& aParsedAddress) const; williamr@2: IMPORT_C TBool ContainsReplyAddressIEL() const; williamr@2: IMPORT_C HBufC* GetReplyAddressL() const; williamr@2: IMPORT_C TInt GetParsedReplyAddressL(TGsmSmsTelNumber& aParsedAddress) const; williamr@2: IMPORT_C void RemoveReplyAddressL() const; williamr@2: CSmsReplyAddressOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage, williamr@2: CCnvCharacterSetConverter& iCharacterSetConverter, RFs& iFs); williamr@2: ~CSmsReplyAddressOperations() {}; williamr@2: protected: williamr@2: void ValidateOperationL() const; williamr@2: void operator=(const CSmsReplyAddressOperations&); williamr@2: TBool operator==(const CSmsReplyAddressOperations&); williamr@2: protected: williamr@2: CCnvCharacterSetConverter& iCharacterSetConverter; williamr@2: RFs& iFs; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: * Clients use this class to configure a CSmsMessage with a Special SMS Message Indication Information Element per 23.040 v6.5.0 williamr@2: * section 9.2.3.24.2. williamr@2: * williamr@2: * @publishedAll williamr@2: */ williamr@2: class CSmsSpecialSMSMessageOperations : public CSmsCtrlOperation williamr@2: { williamr@2: public: williamr@2: IMPORT_C void AddSpecialMessageIndicationL(TBool aStore, TSmsMessageIndicationType aMessageIndicationType, williamr@2: TExtendedSmsIndicationType aExtendedType, TSmsMessageProfileType aProfile, williamr@2: TUint8 aMessageCount) const; williamr@2: IMPORT_C TUint GetCountOfSpecialMessageIndicationsL() const; williamr@2: IMPORT_C void GetMessageIndicationIEL(TUint aIndex, TBool& aStore, TSmsMessageIndicationType& aMessageIndicationType, williamr@2: TExtendedSmsIndicationType& aExtendedType, TSmsMessageProfileType& aProfile, williamr@2: TUint8& aMessageCount) const; williamr@2: IMPORT_C void RemoveSpecialMessageIndicationL(TSmsMessageIndicationType aMessageIndicationType, TExtendedSmsIndicationType aExtendedType) const; williamr@2: IMPORT_C void RemoveAllSpecialMessageIndicationsL() const; williamr@2: CSmsSpecialSMSMessageOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage); williamr@2: ~CSmsSpecialSMSMessageOperations() {}; williamr@2: protected: williamr@2: void ValidateOperationL() const; williamr@2: void operator=(const CSmsSpecialSMSMessageOperations&); williamr@2: TBool operator==(const CSmsSpecialSMSMessageOperations&); williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: * Clients use this class to configure a CSmsMessage with either an Enhanced Voice Mail Notification or a williamr@2: * Enhanced Voice Mail Delete Confirmation per 23.040 v6.5.0 section 9.2.3.24.13. williamr@2: * williamr@2: * Clients should be aware that 23.040 v6.5.0 specifies that this information element must fit into the williamr@2: * user data field of a single PDU. The amount of space available in the user data field depends on both williamr@2: * the number and size of the mandatory information elements that must also be present. williamr@2: * Intuitively the largest Enhanced Voice Mail information element can be added when no mandatory information williamr@2: * elements need to be encoded in the PDU. To achieve this, the CSmsMessage must be configured with williamr@2: * only the Enhanced Voice Mail Information Element and no other information elements or text. williamr@2: * williamr@2: * @publishedAll williamr@2: */ williamr@2: class CSmsEnhancedVoiceMailOperations : public CSmsCtrlOperation williamr@2: { williamr@2: public: williamr@2: IMPORT_C void AddEnhancedVoiceMailIEL(const CEnhancedVoiceMailBoxInformation& aEVMI) const; williamr@2: IMPORT_C CEnhancedVoiceMailBoxInformation* RemoveEnhancedVoiceMailIEL() const; williamr@2: IMPORT_C CEnhancedVoiceMailBoxInformation* CopyEnhancedVoiceMailIEL() const; williamr@2: IMPORT_C TBool ContainsEnhancedVoiceMailIEL() const; williamr@2: CSmsEnhancedVoiceMailOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage, williamr@2: CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs); williamr@2: ~CSmsEnhancedVoiceMailOperations() {}; williamr@2: protected: williamr@2: CEnhancedVoiceMailBoxInformation* GetEnhancedVoiceMailIEL(TBool aRemove) const; williamr@2: void ValidateOperationL() const; williamr@2: void operator=(const CSmsEnhancedVoiceMailOperations&); williamr@2: TBool operator==(const CSmsEnhancedVoiceMailOperations&); williamr@2: protected: williamr@2: CCnvCharacterSetConverter& iCharacterSetConverter; williamr@2: RFs& iFs; williamr@2: }; williamr@2: williamr@2: williamr@2: class CSmsSMSCCtrlParameterOperations : public CSmsCtrlOperation williamr@2: { williamr@2: public: williamr@2: CSmsSMSCCtrlParameterOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage); williamr@2: ~CSmsSMSCCtrlParameterOperations() {}; williamr@2: IMPORT_C TInt GetStatusReport(TUint aSegmentSequenceNum, TUint8& aSelectiveStatus) const; williamr@2: IMPORT_C TInt SetStatusReportL(TUint aSegmentSequenceNum, TUint8 aSelectiveStatus); williamr@2: IMPORT_C void SetSchemeL(); williamr@2: IMPORT_C TSmsStatusReportScheme GetScheme() const; williamr@2: IMPORT_C void ResetSchemeL(); williamr@2: IMPORT_C void SetDefaultL(TUint8 aDefaultSelectiveStatus); williamr@2: protected: williamr@2: void ValidateOperationL() const; williamr@2: TBool ValidateControlParametersL(TUint8& aSelectiveStatus) const; williamr@2: void operator=(const CSmsSMSCCtrlParameterOperations&); williamr@2: TBool operator==(const CSmsSMSCCtrlParameterOperations&); williamr@2: }; williamr@2: williamr@2: #endif // __GSMUIEOPERATIONS_