|
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 // 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. |
|
17 // |
|
18 // |
|
19 |
|
20 |
|
21 |
|
22 /** |
|
23 @file |
|
24 */ |
|
25 |
|
26 #ifndef __GSMUIEOPERATIONS_ |
|
27 #define __GSMUIEOPERATIONS_ |
|
28 |
|
29 |
|
30 #include <e32base.h> |
|
31 #include <gsmumsg.h> |
|
32 #include <gsmuelem.h> |
|
33 |
|
34 |
|
35 /** |
|
36 * SMS Stack clients use specialisations of this class to configure a SMS Message with Control Information Elements |
|
37 * which have been introduced in 23.040 v6.5.0. |
|
38 * |
|
39 * The 23.040 v6.5.0 standard defines individual requirements for how each of these control information elements |
|
40 * is to be encoded and decoded. These requirements mean that these control information elements need to be |
|
41 * configured in the CSmsMessage using derivations of this interface, rather than CSmsUserData::AddInformationElementL(). |
|
42 * |
|
43 * CSmsUserData::AddInformationElement specifies those information elements it supports and those that are supported |
|
44 * by CSmsIEOperation and its derivatives. |
|
45 * |
|
46 * Each control information element that uses this interface is supported by a class derived from CSmsIEOperation. |
|
47 * The derived class operates on the CSmsMessage, allowing the client to add, remove and access control information |
|
48 * elements inside the CSmsMessage. |
|
49 * |
|
50 * The client gets access to an operations class using the following interface: |
|
51 * |
|
52 * CSmsIEOperation& CSmsMessage::GetOperationsForIEL(CSmsInformationElement::TSmsInformationElementIdentifier aId); |
|
53 * |
|
54 * When the CSmsMessage is deleted, all its associated CSmsIEOperations classes are also deleted and references to |
|
55 * them become stale. Each instance of the CSmsIEOperation Class is an attributes of the CSmsMessage itself. |
|
56 * |
|
57 * @publishedAll |
|
58 */ |
|
59 class CSmsIEOperation : public CBase |
|
60 { |
|
61 public: |
|
62 static CSmsIEOperation* NewL(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs); |
|
63 IMPORT_C CSmsInformationElement::TSmsInformationElementIdentifier Id() const; |
|
64 virtual ~CSmsIEOperation(){}; |
|
65 protected: |
|
66 virtual TBool MessageTypeSupported() const; |
|
67 virtual void ValidateOperationL() const {}; |
|
68 private: |
|
69 void ConstructL(); |
|
70 private: |
|
71 CSmsInformationElement::TSmsInformationElementIdentifier iId; |
|
72 protected: |
|
73 CSmsMessage& iMessage; |
|
74 CSmsIEOperation(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage); |
|
75 void operator=(const CSmsIEOperation&); |
|
76 TBool operator==(const CSmsIEOperation&); |
|
77 }; |
|
78 |
|
79 class CSmsCtrlOperation : public CSmsIEOperation |
|
80 { |
|
81 protected: |
|
82 CSmsCtrlOperation(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage); |
|
83 ~CSmsCtrlOperation(){}; |
|
84 void operator=(const CSmsCtrlOperation&); |
|
85 TBool operator==(const CSmsCtrlOperation&); |
|
86 }; |
|
87 |
|
88 |
|
89 /** |
|
90 * Clients use this class to configure a CSmsMessage with hyperlinks per 23.040 v6.5.0 section 9.2.3.24.12. |
|
91 * |
|
92 * @publishedAll |
|
93 */ |
|
94 class CSmsHyperLinkOperations : public CSmsCtrlOperation |
|
95 { |
|
96 public: |
|
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(){}; |
|
104 protected: |
|
105 void ValidateOperationL() const; |
|
106 void operator=(const CSmsHyperLinkOperations&); |
|
107 TBool operator==(const CSmsHyperLinkOperations&); |
|
108 }; |
|
109 |
|
110 |
|
111 /** |
|
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. |
|
113 * |
|
114 * @publishedAll |
|
115 */ |
|
116 class CSmsReplyAddressOperations : public CSmsCtrlOperation |
|
117 { |
|
118 public: |
|
119 static CSmsReplyAddressOperations* NewL(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage, |
|
120 CCnvCharacterSetConverter& iCharacterSetConverter, RFs& iFs); |
|
121 |
|
122 IMPORT_C void AddReplyAddressL(const TDesC& aAddress) const; |
|
123 IMPORT_C void AddParsedReplyAddressL(const TGsmSmsTelNumber& aParsedAddress) const; |
|
124 IMPORT_C TBool ContainsReplyAddressIEL() const; |
|
125 IMPORT_C HBufC* GetReplyAddressL() const; |
|
126 IMPORT_C TInt GetParsedReplyAddressL(TGsmSmsTelNumber& aParsedAddress) const; |
|
127 IMPORT_C void RemoveReplyAddressL() const; |
|
128 CSmsReplyAddressOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage, |
|
129 CCnvCharacterSetConverter& iCharacterSetConverter, RFs& iFs); |
|
130 ~CSmsReplyAddressOperations() {}; |
|
131 protected: |
|
132 void ValidateOperationL() const; |
|
133 void operator=(const CSmsReplyAddressOperations&); |
|
134 TBool operator==(const CSmsReplyAddressOperations&); |
|
135 protected: |
|
136 CCnvCharacterSetConverter& iCharacterSetConverter; |
|
137 RFs& iFs; |
|
138 }; |
|
139 |
|
140 |
|
141 /** |
|
142 * Clients use this class to configure a CSmsMessage with a Special SMS Message Indication Information Element per 23.040 v6.5.0 |
|
143 * section 9.2.3.24.2. |
|
144 * |
|
145 * @publishedAll |
|
146 */ |
|
147 class CSmsSpecialSMSMessageOperations : public CSmsCtrlOperation |
|
148 { |
|
149 public: |
|
150 IMPORT_C void AddSpecialMessageIndicationL(TBool aStore, TSmsMessageIndicationType aMessageIndicationType, |
|
151 TExtendedSmsIndicationType aExtendedType, TSmsMessageProfileType aProfile, |
|
152 TUint8 aMessageCount) const; |
|
153 IMPORT_C TUint GetCountOfSpecialMessageIndicationsL() const; |
|
154 IMPORT_C void GetMessageIndicationIEL(TUint aIndex, TBool& aStore, TSmsMessageIndicationType& aMessageIndicationType, |
|
155 TExtendedSmsIndicationType& aExtendedType, TSmsMessageProfileType& aProfile, |
|
156 TUint8& aMessageCount) const; |
|
157 IMPORT_C void RemoveSpecialMessageIndicationL(TSmsMessageIndicationType aMessageIndicationType, TExtendedSmsIndicationType aExtendedType) const; |
|
158 IMPORT_C void RemoveAllSpecialMessageIndicationsL() const; |
|
159 CSmsSpecialSMSMessageOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage); |
|
160 ~CSmsSpecialSMSMessageOperations() {}; |
|
161 protected: |
|
162 void ValidateOperationL() const; |
|
163 void operator=(const CSmsSpecialSMSMessageOperations&); |
|
164 TBool operator==(const CSmsSpecialSMSMessageOperations&); |
|
165 }; |
|
166 |
|
167 |
|
168 /** |
|
169 * Clients use this class to configure a CSmsMessage with either an Enhanced Voice Mail Notification or a |
|
170 * Enhanced Voice Mail Delete Confirmation per 23.040 v6.5.0 section 9.2.3.24.13. |
|
171 * |
|
172 * Clients should be aware that 23.040 v6.5.0 specifies that this information element must fit into the |
|
173 * user data field of a single PDU. The amount of space available in the user data field depends on both |
|
174 * the number and size of the mandatory information elements that must also be present. |
|
175 * Intuitively the largest Enhanced Voice Mail information element can be added when no mandatory information |
|
176 * elements need to be encoded in the PDU. To achieve this, the CSmsMessage must be configured with |
|
177 * only the Enhanced Voice Mail Information Element and no other information elements or text. |
|
178 * |
|
179 * @publishedAll |
|
180 */ |
|
181 class CSmsEnhancedVoiceMailOperations : public CSmsCtrlOperation |
|
182 { |
|
183 public: |
|
184 IMPORT_C void AddEnhancedVoiceMailIEL(const CEnhancedVoiceMailBoxInformation& aEVMI) const; |
|
185 IMPORT_C CEnhancedVoiceMailBoxInformation* RemoveEnhancedVoiceMailIEL() const; |
|
186 IMPORT_C CEnhancedVoiceMailBoxInformation* CopyEnhancedVoiceMailIEL() const; |
|
187 IMPORT_C TBool ContainsEnhancedVoiceMailIEL() const; |
|
188 CSmsEnhancedVoiceMailOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage, |
|
189 CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs); |
|
190 ~CSmsEnhancedVoiceMailOperations() {}; |
|
191 protected: |
|
192 CEnhancedVoiceMailBoxInformation* GetEnhancedVoiceMailIEL(TBool aRemove) const; |
|
193 void ValidateOperationL() const; |
|
194 void operator=(const CSmsEnhancedVoiceMailOperations&); |
|
195 TBool operator==(const CSmsEnhancedVoiceMailOperations&); |
|
196 protected: |
|
197 CCnvCharacterSetConverter& iCharacterSetConverter; |
|
198 RFs& iFs; |
|
199 }; |
|
200 |
|
201 |
|
202 class CSmsSMSCCtrlParameterOperations : public CSmsCtrlOperation |
|
203 { |
|
204 public: |
|
205 CSmsSMSCCtrlParameterOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage); |
|
206 ~CSmsSMSCCtrlParameterOperations() {}; |
|
207 IMPORT_C TInt GetStatusReport(TUint aSegmentSequenceNum, TUint8& aSelectiveStatus) const; |
|
208 IMPORT_C TInt SetStatusReportL(TUint aSegmentSequenceNum, TUint8 aSelectiveStatus); |
|
209 IMPORT_C void SetSchemeL(); |
|
210 IMPORT_C TSmsStatusReportScheme GetScheme() const; |
|
211 IMPORT_C void ResetSchemeL(); |
|
212 IMPORT_C void SetDefaultL(TUint8 aDefaultSelectiveStatus); |
|
213 protected: |
|
214 void ValidateOperationL() const; |
|
215 TBool ValidateControlParametersL(TUint8& aSelectiveStatus) const; |
|
216 void operator=(const CSmsSMSCCtrlParameterOperations&); |
|
217 TBool operator==(const CSmsSMSCCtrlParameterOperations&); |
|
218 }; |
|
219 |
|
220 #endif // __GSMUIEOPERATIONS_ |