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