1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/gsmuieoperations.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,220 @@
1.4 +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// 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
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// This file defines the container class CSmsIEOperation and its specialisations.
1.18 +// The classes provide interfaces that allow the client to operate on a number
1.19 +// of control information elements.
1.20 +//
1.21 +//
1.22 +
1.23 +
1.24 +
1.25 +/**
1.26 + @file
1.27 +*/
1.28 +
1.29 +#ifndef __GSMUIEOPERATIONS_
1.30 +#define __GSMUIEOPERATIONS_
1.31 +
1.32 +
1.33 +#include <e32base.h>
1.34 +#include <gsmumsg.h>
1.35 +#include <gsmuelem.h>
1.36 +
1.37 +
1.38 +/**
1.39 + * SMS Stack clients use specialisations of this class to configure a SMS Message with Control Information Elements
1.40 + * which have been introduced in 23.040 v6.5.0.
1.41 + *
1.42 + * The 23.040 v6.5.0 standard defines individual requirements for how each of these control information elements
1.43 + * is to be encoded and decoded. These requirements mean that these control information elements need to be
1.44 + * configured in the CSmsMessage using derivations of this interface, rather than CSmsUserData::AddInformationElementL().
1.45 + *
1.46 + * CSmsUserData::AddInformationElement specifies those information elements it supports and those that are supported
1.47 + * by CSmsIEOperation and its derivatives.
1.48 + *
1.49 + * Each control information element that uses this interface is supported by a class derived from CSmsIEOperation.
1.50 + * The derived class operates on the CSmsMessage, allowing the client to add, remove and access control information
1.51 + * elements inside the CSmsMessage.
1.52 + *
1.53 + * The client gets access to an operations class using the following interface:
1.54 + *
1.55 + * CSmsIEOperation& CSmsMessage::GetOperationsForIEL(CSmsInformationElement::TSmsInformationElementIdentifier aId);
1.56 + *
1.57 + * When the CSmsMessage is deleted, all its associated CSmsIEOperations classes are also deleted and references to
1.58 + * them become stale. Each instance of the CSmsIEOperation Class is an attributes of the CSmsMessage itself.
1.59 + *
1.60 + * @publishedAll
1.61 + */
1.62 +class CSmsIEOperation : public CBase
1.63 +{
1.64 +public:
1.65 + static CSmsIEOperation* NewL(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs);
1.66 + IMPORT_C CSmsInformationElement::TSmsInformationElementIdentifier Id() const;
1.67 + virtual ~CSmsIEOperation(){};
1.68 +protected:
1.69 + virtual TBool MessageTypeSupported() const;
1.70 + virtual void ValidateOperationL() const {};
1.71 +private:
1.72 + void ConstructL();
1.73 +private:
1.74 + CSmsInformationElement::TSmsInformationElementIdentifier iId;
1.75 +protected:
1.76 + CSmsMessage& iMessage;
1.77 + CSmsIEOperation(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage);
1.78 + void operator=(const CSmsIEOperation&);
1.79 + TBool operator==(const CSmsIEOperation&);
1.80 +};
1.81 +
1.82 +class CSmsCtrlOperation : public CSmsIEOperation
1.83 +{
1.84 +protected:
1.85 + CSmsCtrlOperation(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage);
1.86 + ~CSmsCtrlOperation(){};
1.87 + void operator=(const CSmsCtrlOperation&);
1.88 + TBool operator==(const CSmsCtrlOperation&);
1.89 +};
1.90 +
1.91 +
1.92 +/**
1.93 + * Clients use this class to configure a CSmsMessage with hyperlinks per 23.040 v6.5.0 section 9.2.3.24.12.
1.94 + *
1.95 + * @publishedAll
1.96 + */
1.97 +class CSmsHyperLinkOperations : public CSmsCtrlOperation
1.98 +{
1.99 +public:
1.100 + IMPORT_C void AddHyperLinkL(TUint aPosition, TUint8 aTitleLength, TUint8 aURLLength) const;
1.101 + IMPORT_C TUint NumberOfHyperLinksL() const;
1.102 + IMPORT_C void CopyHyperLinkAtIndexL(TUint index, TUint& aPosition, TUint8& aTitleLength, TUint8& aURLLength) const;
1.103 + IMPORT_C void RemoveAllHyperLinksL() const;
1.104 + IMPORT_C void RemoveHyperLinkL(TUint aIndex) const;
1.105 + CSmsHyperLinkOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage);
1.106 + ~CSmsHyperLinkOperations(){};
1.107 +protected:
1.108 + void ValidateOperationL() const;
1.109 + void operator=(const CSmsHyperLinkOperations&);
1.110 + TBool operator==(const CSmsHyperLinkOperations&);
1.111 +};
1.112 +
1.113 +
1.114 +/**
1.115 + * 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.
1.116 + *
1.117 + * @publishedAll
1.118 + */
1.119 +class CSmsReplyAddressOperations : public CSmsCtrlOperation
1.120 +{
1.121 +public:
1.122 + static CSmsReplyAddressOperations* NewL(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage,
1.123 + CCnvCharacterSetConverter& iCharacterSetConverter, RFs& iFs);
1.124 +
1.125 + IMPORT_C void AddReplyAddressL(const TDesC& aAddress) const;
1.126 + IMPORT_C void AddParsedReplyAddressL(const TGsmSmsTelNumber& aParsedAddress) const;
1.127 + IMPORT_C TBool ContainsReplyAddressIEL() const;
1.128 + IMPORT_C HBufC* GetReplyAddressL() const;
1.129 + IMPORT_C TInt GetParsedReplyAddressL(TGsmSmsTelNumber& aParsedAddress) const;
1.130 + IMPORT_C void RemoveReplyAddressL() const;
1.131 + CSmsReplyAddressOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage,
1.132 + CCnvCharacterSetConverter& iCharacterSetConverter, RFs& iFs);
1.133 + ~CSmsReplyAddressOperations() {};
1.134 +protected:
1.135 + void ValidateOperationL() const;
1.136 + void operator=(const CSmsReplyAddressOperations&);
1.137 + TBool operator==(const CSmsReplyAddressOperations&);
1.138 +protected:
1.139 + CCnvCharacterSetConverter& iCharacterSetConverter;
1.140 + RFs& iFs;
1.141 +};
1.142 +
1.143 +
1.144 +/**
1.145 + * Clients use this class to configure a CSmsMessage with a Special SMS Message Indication Information Element per 23.040 v6.5.0
1.146 + * section 9.2.3.24.2.
1.147 + *
1.148 + * @publishedAll
1.149 + */
1.150 +class CSmsSpecialSMSMessageOperations : public CSmsCtrlOperation
1.151 +{
1.152 +public:
1.153 + IMPORT_C void AddSpecialMessageIndicationL(TBool aStore, TSmsMessageIndicationType aMessageIndicationType,
1.154 + TExtendedSmsIndicationType aExtendedType, TSmsMessageProfileType aProfile,
1.155 + TUint8 aMessageCount) const;
1.156 + IMPORT_C TUint GetCountOfSpecialMessageIndicationsL() const;
1.157 + IMPORT_C void GetMessageIndicationIEL(TUint aIndex, TBool& aStore, TSmsMessageIndicationType& aMessageIndicationType,
1.158 + TExtendedSmsIndicationType& aExtendedType, TSmsMessageProfileType& aProfile,
1.159 + TUint8& aMessageCount) const;
1.160 + IMPORT_C void RemoveSpecialMessageIndicationL(TSmsMessageIndicationType aMessageIndicationType, TExtendedSmsIndicationType aExtendedType) const;
1.161 + IMPORT_C void RemoveAllSpecialMessageIndicationsL() const;
1.162 + CSmsSpecialSMSMessageOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage);
1.163 + ~CSmsSpecialSMSMessageOperations() {};
1.164 +protected:
1.165 + void ValidateOperationL() const;
1.166 + void operator=(const CSmsSpecialSMSMessageOperations&);
1.167 + TBool operator==(const CSmsSpecialSMSMessageOperations&);
1.168 +};
1.169 +
1.170 +
1.171 +/**
1.172 + * Clients use this class to configure a CSmsMessage with either an Enhanced Voice Mail Notification or a
1.173 + * Enhanced Voice Mail Delete Confirmation per 23.040 v6.5.0 section 9.2.3.24.13.
1.174 + *
1.175 + * Clients should be aware that 23.040 v6.5.0 specifies that this information element must fit into the
1.176 + * user data field of a single PDU. The amount of space available in the user data field depends on both
1.177 + * the number and size of the mandatory information elements that must also be present.
1.178 + * Intuitively the largest Enhanced Voice Mail information element can be added when no mandatory information
1.179 + * elements need to be encoded in the PDU. To achieve this, the CSmsMessage must be configured with
1.180 + * only the Enhanced Voice Mail Information Element and no other information elements or text.
1.181 + *
1.182 + * @publishedAll
1.183 + */
1.184 +class CSmsEnhancedVoiceMailOperations : public CSmsCtrlOperation
1.185 +{
1.186 +public:
1.187 + IMPORT_C void AddEnhancedVoiceMailIEL(const CEnhancedVoiceMailBoxInformation& aEVMI) const;
1.188 + IMPORT_C CEnhancedVoiceMailBoxInformation* RemoveEnhancedVoiceMailIEL() const;
1.189 + IMPORT_C CEnhancedVoiceMailBoxInformation* CopyEnhancedVoiceMailIEL() const;
1.190 + IMPORT_C TBool ContainsEnhancedVoiceMailIEL() const;
1.191 + CSmsEnhancedVoiceMailOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage,
1.192 + CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs);
1.193 + ~CSmsEnhancedVoiceMailOperations() {};
1.194 +protected:
1.195 + CEnhancedVoiceMailBoxInformation* GetEnhancedVoiceMailIEL(TBool aRemove) const;
1.196 + void ValidateOperationL() const;
1.197 + void operator=(const CSmsEnhancedVoiceMailOperations&);
1.198 + TBool operator==(const CSmsEnhancedVoiceMailOperations&);
1.199 +protected:
1.200 + CCnvCharacterSetConverter& iCharacterSetConverter;
1.201 + RFs& iFs;
1.202 +};
1.203 +
1.204 +
1.205 +class CSmsSMSCCtrlParameterOperations : public CSmsCtrlOperation
1.206 + {
1.207 +public:
1.208 + CSmsSMSCCtrlParameterOperations(CSmsInformationElement::TSmsInformationElementIdentifier aId, CSmsMessage& aMessage);
1.209 + ~CSmsSMSCCtrlParameterOperations() {};
1.210 + IMPORT_C TInt GetStatusReport(TUint aSegmentSequenceNum, TUint8& aSelectiveStatus) const;
1.211 + IMPORT_C TInt SetStatusReportL(TUint aSegmentSequenceNum, TUint8 aSelectiveStatus);
1.212 + IMPORT_C void SetSchemeL();
1.213 + IMPORT_C TSmsStatusReportScheme GetScheme() const;
1.214 + IMPORT_C void ResetSchemeL();
1.215 + IMPORT_C void SetDefaultL(TUint8 aDefaultSelectiveStatus);
1.216 +protected:
1.217 + void ValidateOperationL() const;
1.218 + TBool ValidateControlParametersL(TUint8& aSelectiveStatus) const;
1.219 + void operator=(const CSmsSMSCCtrlParameterOperations&);
1.220 + TBool operator==(const CSmsSMSCCtrlParameterOperations&);
1.221 + };
1.222 +
1.223 +#endif // __GSMUIEOPERATIONS_