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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // This file defines the container class CSmsIEOperation and its specialisations.
15 // The classes provide interfaces that allow the client to operate on a number
16 // of control information elements.
24 #ifndef __GSMUIEOPERATIONS_
25 #define __GSMUIEOPERATIONS_
34 * SMS Stack clients use specialisations of this class to configure a SMS Message with Control Information Elements
35 * which have been introduced in 23.040 v6.5.0.
37 * The 23.040 v6.5.0 standard defines individual requirements for how each of these control information elements
38 * is to be encoded and decoded. These requirements mean that these control information elements need to be
39 * configured in the CSmsMessage using derivations of this interface, rather than CSmsUserData::AddInformationElementL().
41 * CSmsUserData::AddInformationElement specifies those information elements it supports and those that are supported
42 * by CSmsIEOperation and its derivatives.
44 * Each control information element that uses this interface is supported by a class derived from CSmsIEOperation.
45 * The derived class operates on the CSmsMessage, allowing the client to add, remove and access control information
46 * elements inside the CSmsMessage.
48 * The client gets access to an operations class using the following interface:
50 * CSmsIEOperation& CSmsMessage::GetOperationsForIEL(CSmsInformationElement::TSmsInformationElementIdentifier aId);
52 * When the CSmsMessage is deleted, all its associated CSmsIEOperations classes are also deleted and references to
53 * them become stale. Each instance of the CSmsIEOperation Class is an attributes of the CSmsMessage itself.
58 class CSmsIEOperation : public CBase
61 static CSmsIEOperation* NewL(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs);
62 IMPORT_C CSmsInformationElement::TSmsInformationElementIdentifier Id() const;
63 virtual ~CSmsIEOperation(){};
65 virtual TBool MessageTypeSupported() const;
66 virtual void ValidateOperationL() const {};
70 CSmsInformationElement::TSmsInformationElementIdentifier iId;
72 CSmsMessage& iMessage;
73 CSmsIEOperation(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage);
74 void operator=(const CSmsIEOperation&);
75 TBool operator==(const CSmsIEOperation&);
78 class CSmsCtrlOperation : public CSmsIEOperation
81 CSmsCtrlOperation(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage);
82 ~CSmsCtrlOperation(){};
83 void operator=(const CSmsCtrlOperation&);
84 TBool operator==(const CSmsCtrlOperation&);
89 * Clients use this class to configure a CSmsMessage with hyperlinks per 23.040 v6.5.0 section 9.2.3.24.12.
94 class CSmsHyperLinkOperations : public CSmsCtrlOperation
97 IMPORT_C void AddHyperLinkL(TUint aPosition, TUint8 aTitleLength, TUint8 aURLLength) const;
98 IMPORT_C TUint NumberOfHyperLinksL() const;
99 IMPORT_C void CopyHyperLinkAtIndexL(TUint index, TUint& aPosition, TUint8& aTitleLength, TUint8& aURLLength) const;
100 IMPORT_C void RemoveAllHyperLinksL() const;
101 IMPORT_C void RemoveHyperLinkL(TUint aIndex) const;
102 CSmsHyperLinkOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage);
103 ~CSmsHyperLinkOperations(){};
105 void ValidateOperationL() const;
106 void operator=(const CSmsHyperLinkOperations&);
107 TBool operator==(const CSmsHyperLinkOperations&);
112 * 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.
117 class CSmsReplyAddressOperations : public CSmsCtrlOperation
120 static CSmsReplyAddressOperations* NewL(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage,
121 CCnvCharacterSetConverter& iCharacterSetConverter, RFs& iFs);
123 IMPORT_C void AddReplyAddressL(const TDesC& aAddress) const;
124 IMPORT_C void AddParsedReplyAddressL(const TGsmSmsTelNumber& aParsedAddress) const;
125 IMPORT_C TBool ContainsReplyAddressIEL() const;
126 IMPORT_C HBufC* GetReplyAddressL() const;
127 IMPORT_C TInt GetParsedReplyAddressL(TGsmSmsTelNumber& aParsedAddress) const;
128 IMPORT_C void RemoveReplyAddressL() const;
129 CSmsReplyAddressOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage,
130 CCnvCharacterSetConverter& iCharacterSetConverter, RFs& iFs);
131 ~CSmsReplyAddressOperations() {};
133 void ValidateOperationL() const;
134 void operator=(const CSmsReplyAddressOperations&);
135 TBool operator==(const CSmsReplyAddressOperations&);
137 CCnvCharacterSetConverter& iCharacterSetConverter;
143 * Clients use this class to configure a CSmsMessage with a Special SMS Message Indication Information Element per 23.040 v6.5.0
144 * section 9.2.3.24.2.
149 class CSmsSpecialSMSMessageOperations : public CSmsCtrlOperation
152 IMPORT_C void AddSpecialMessageIndicationL(TBool aStore, TSmsMessageIndicationType aMessageIndicationType,
153 TExtendedSmsIndicationType aExtendedType, TSmsMessageProfileType aProfile,
154 TUint8 aMessageCount) const;
155 IMPORT_C TUint GetCountOfSpecialMessageIndicationsL() const;
156 IMPORT_C void GetMessageIndicationIEL(TUint aIndex, TBool& aStore, TSmsMessageIndicationType& aMessageIndicationType,
157 TExtendedSmsIndicationType& aExtendedType, TSmsMessageProfileType& aProfile,
158 TUint8& aMessageCount) const;
159 IMPORT_C void RemoveSpecialMessageIndicationL(TSmsMessageIndicationType aMessageIndicationType, TExtendedSmsIndicationType aExtendedType) const;
160 IMPORT_C void RemoveAllSpecialMessageIndicationsL() const;
161 CSmsSpecialSMSMessageOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage);
162 ~CSmsSpecialSMSMessageOperations() {};
164 void ValidateOperationL() const;
165 void operator=(const CSmsSpecialSMSMessageOperations&);
166 TBool operator==(const CSmsSpecialSMSMessageOperations&);
171 * Clients use this class to configure a CSmsMessage with either an Enhanced Voice Mail Notification or a
172 * Enhanced Voice Mail Delete Confirmation per 23.040 v6.5.0 section 9.2.3.24.13.
174 * Clients should be aware that 23.040 v6.5.0 specifies that this information element must fit into the
175 * user data field of a single PDU. The amount of space available in the user data field depends on both
176 * the number and size of the mandatory information elements that must also be present.
177 * Intuitively the largest Enhanced Voice Mail information element can be added when no mandatory information
178 * elements need to be encoded in the PDU. To achieve this, the CSmsMessage must be configured with
179 * only the Enhanced Voice Mail Information Element and no other information elements or text.
184 class CSmsEnhancedVoiceMailOperations : public CSmsCtrlOperation
187 IMPORT_C void AddEnhancedVoiceMailIEL(const CEnhancedVoiceMailBoxInformation& aEVMI) const;
188 IMPORT_C CEnhancedVoiceMailBoxInformation* RemoveEnhancedVoiceMailIEL() const;
189 IMPORT_C CEnhancedVoiceMailBoxInformation* CopyEnhancedVoiceMailIEL() const;
190 IMPORT_C TBool ContainsEnhancedVoiceMailIEL() const;
191 CSmsEnhancedVoiceMailOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage,
192 CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs);
193 ~CSmsEnhancedVoiceMailOperations() {};
195 CEnhancedVoiceMailBoxInformation* GetEnhancedVoiceMailIEL(TBool aRemove) const;
196 void ValidateOperationL() const;
197 void operator=(const CSmsEnhancedVoiceMailOperations&);
198 TBool operator==(const CSmsEnhancedVoiceMailOperations&);
200 CCnvCharacterSetConverter& iCharacterSetConverter;
205 class CSmsSMSCCtrlParameterOperations : public CSmsCtrlOperation
208 CSmsSMSCCtrlParameterOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage);
209 ~CSmsSMSCCtrlParameterOperations() {};
210 IMPORT_C TInt GetStatusReport(TUint aSegmentSequenceNum, TUint8& aSelectiveStatus) const;
211 IMPORT_C TInt SetStatusReportL(TUint aSegmentSequenceNum, TUint8 aSelectiveStatus);
212 IMPORT_C void SetSchemeL();
213 IMPORT_C TSmsStatusReportScheme GetScheme() const;
214 IMPORT_C void ResetSchemeL();
215 IMPORT_C void SetDefaultL(TUint8 aDefaultSelectiveStatus);
217 void ValidateOperationL() const;
218 TBool ValidateControlParametersL(TUint8& aSelectiveStatus) const;
219 void operator=(const CSmsSMSCCtrlParameterOperations&);
220 TBool operator==(const CSmsSMSCCtrlParameterOperations&);
223 #endif // __GSMUIEOPERATIONS_