24
|
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".
|
|
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 |
@file
|
|
22 |
*/
|
|
23 |
|
|
24 |
#ifndef __GSMUIEOPERATIONS_
|
|
25 |
#define __GSMUIEOPERATIONS_
|
|
26 |
|
|
27 |
|
|
28 |
#include <e32base.h>
|
|
29 |
#include <gsmumsg.h>
|
|
30 |
#include <gsmuelem.h>
|
|
31 |
|
|
32 |
|
|
33 |
/**
|
|
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.
|
|
36 |
*
|
|
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().
|
|
40 |
*
|
|
41 |
* CSmsUserData::AddInformationElement specifies those information elements it supports and those that are supported
|
|
42 |
* by CSmsIEOperation and its derivatives.
|
|
43 |
*
|
|
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.
|
|
47 |
*
|
|
48 |
* The client gets access to an operations class using the following interface:
|
|
49 |
*
|
|
50 |
* CSmsIEOperation& CSmsMessage::GetOperationsForIEL(CSmsInformationElement::TSmsInformationElementIdentifier aId);
|
|
51 |
*
|
|
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.
|
|
54 |
*
|
|
55 |
* @publishedAll
|
|
56 |
* @released
|
|
57 |
*/
|
|
58 |
class CSmsIEOperation : public CBase
|
|
59 |
{
|
|
60 |
public:
|
|
61 |
static CSmsIEOperation* NewL(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs);
|
|
62 |
IMPORT_C CSmsInformationElement::TSmsInformationElementIdentifier Id() const;
|
|
63 |
virtual ~CSmsIEOperation(){};
|
|
64 |
protected:
|
|
65 |
virtual TBool MessageTypeSupported() const;
|
|
66 |
virtual void ValidateOperationL() const {};
|
|
67 |
private:
|
|
68 |
void ConstructL();
|
|
69 |
private:
|
|
70 |
CSmsInformationElement::TSmsInformationElementIdentifier iId;
|
|
71 |
protected:
|
|
72 |
CSmsMessage& iMessage;
|
|
73 |
CSmsIEOperation(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage);
|
|
74 |
void operator=(const CSmsIEOperation&);
|
|
75 |
TBool operator==(const CSmsIEOperation&);
|
|
76 |
};
|
|
77 |
|
|
78 |
class CSmsCtrlOperation : public CSmsIEOperation
|
|
79 |
{
|
|
80 |
protected:
|
|
81 |
CSmsCtrlOperation(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage);
|
|
82 |
~CSmsCtrlOperation(){};
|
|
83 |
void operator=(const CSmsCtrlOperation&);
|
|
84 |
TBool operator==(const CSmsCtrlOperation&);
|
|
85 |
};
|
|
86 |
|
|
87 |
|
|
88 |
/**
|
|
89 |
* Clients use this class to configure a CSmsMessage with hyperlinks per 23.040 v6.5.0 section 9.2.3.24.12.
|
|
90 |
*
|
|
91 |
* @publishedAll
|
|
92 |
* @released
|
|
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 |
* @released
|
|
116 |
*/
|
|
117 |
class CSmsReplyAddressOperations : public CSmsCtrlOperation
|
|
118 |
{
|
|
119 |
public:
|
|
120 |
static CSmsReplyAddressOperations* NewL(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage,
|
|
121 |
CCnvCharacterSetConverter& iCharacterSetConverter, RFs& iFs);
|
|
122 |
|
|
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() {};
|
|
132 |
protected:
|
|
133 |
void ValidateOperationL() const;
|
|
134 |
void operator=(const CSmsReplyAddressOperations&);
|
|
135 |
TBool operator==(const CSmsReplyAddressOperations&);
|
|
136 |
protected:
|
|
137 |
CCnvCharacterSetConverter& iCharacterSetConverter;
|
|
138 |
RFs& iFs;
|
|
139 |
};
|
|
140 |
|
|
141 |
|
|
142 |
/**
|
|
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.
|
|
145 |
*
|
|
146 |
* @publishedAll
|
|
147 |
* @released
|
|
148 |
*/
|
|
149 |
class CSmsSpecialSMSMessageOperations : public CSmsCtrlOperation
|
|
150 |
{
|
|
151 |
public:
|
|
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() {};
|
|
163 |
protected:
|
|
164 |
void ValidateOperationL() const;
|
|
165 |
void operator=(const CSmsSpecialSMSMessageOperations&);
|
|
166 |
TBool operator==(const CSmsSpecialSMSMessageOperations&);
|
|
167 |
};
|
|
168 |
|
|
169 |
|
|
170 |
/**
|
|
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.
|
|
173 |
*
|
|
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.
|
|
180 |
*
|
|
181 |
* @publishedAll
|
|
182 |
* @released
|
|
183 |
*/
|
|
184 |
class CSmsEnhancedVoiceMailOperations : public CSmsCtrlOperation
|
|
185 |
{
|
|
186 |
public:
|
|
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() {};
|
|
194 |
protected:
|
|
195 |
CEnhancedVoiceMailBoxInformation* GetEnhancedVoiceMailIEL(TBool aRemove) const;
|
|
196 |
void ValidateOperationL() const;
|
|
197 |
void operator=(const CSmsEnhancedVoiceMailOperations&);
|
|
198 |
TBool operator==(const CSmsEnhancedVoiceMailOperations&);
|
|
199 |
protected:
|
|
200 |
CCnvCharacterSetConverter& iCharacterSetConverter;
|
|
201 |
RFs& iFs;
|
|
202 |
};
|
|
203 |
|
|
204 |
|
|
205 |
class CSmsSMSCCtrlParameterOperations : public CSmsCtrlOperation
|
|
206 |
{
|
|
207 |
public:
|
|
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);
|
|
216 |
protected:
|
|
217 |
void ValidateOperationL() const;
|
|
218 |
TBool ValidateControlParametersL(TUint8& aSelectiveStatus) const;
|
|
219 |
void operator=(const CSmsSMSCCtrlParameterOperations&);
|
|
220 |
TBool operator==(const CSmsSMSCCtrlParameterOperations&);
|
|
221 |
};
|
|
222 |
|
|
223 |
#endif // __GSMUIEOPERATIONS_
|