1 // Copyright (c) 2006-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // This file defines the container class CSmsNonIEOperation and its specialisations.
15 // The classes provide interfaces that allow the client to operate on a number
16 // of features which are not associated with Information Elements.
26 #ifndef __GSMUNONIEOPERATIONS_
27 #define __GSMUNONIEOPERATIONS_
35 * SMS Stack clients use specialisations of this class to configure a SMS Message with parameters which are not
36 * a type of Information Element.
38 * Each parameter that uses this interface is supported by a class derived from CSmsNonIEOperation.
39 * The derived class operates on the CSmsMessage, allowing the client to add, remove and access these parameters
40 * inside the CSmsMessage.
42 * The client gets access to an operations class using the following interface:
44 * CSmsNonIEOperation& CSmsMessage::GetOperationsForNonIEL(TSmsNonIEIdentifier aId);
46 * When the CSmsMessage is deleted, all its associated CSmsNonIEOperations classes are also deleted and references to
47 * them become stale. Each instance of the CSmsNonIEOperation Class is an attribute of the CSmsMessage itself.
51 class CSmsNonIEOperation : public CBase
54 static CSmsNonIEOperation* NewL(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
55 IMPORT_C TSmsNonIEIdentifier Id() const;
56 virtual ~CSmsNonIEOperation(){};
58 virtual TBool MessageTypeSupported() const;
59 virtual void ValidateOperationL() const {};
63 TSmsNonIEIdentifier iId;
65 CSmsMessage& iMessage;
66 CSmsNonIEOperation(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
67 void operator=(const CSmsNonIEOperation&);
68 TBool operator==(const CSmsNonIEOperation&);
71 class CSmsCtrlNonIEOperation : public CSmsNonIEOperation
74 CSmsCtrlNonIEOperation(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
75 ~CSmsCtrlNonIEOperation(){};
76 void operator=(const CSmsCtrlNonIEOperation&);
77 TBool operator==(const CSmsCtrlNonIEOperation&);
80 class CSmsTPSRROperations : public CSmsCtrlNonIEOperation
83 CSmsTPSRROperations(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
84 ~CSmsTPSRROperations() {};
85 IMPORT_C TInt GetStatusReport(TUint aSegmentSequenceNum) const;
86 IMPORT_C void SetLastSegmentStatusReportL(TBool aEnable);
87 IMPORT_C TInt SetSegmentStatusReportL(TUint aSegmentSequenceNum, TBool aEnable);
88 IMPORT_C void SetSchemeL();
89 IMPORT_C TSmsStatusReportScheme GetScheme() const;
90 IMPORT_C void ResetSchemeL();
91 IMPORT_C void SetDefaultL(TBool aEnable);
93 void ValidateOperationL() const;
94 void operator=(const CSmsTPSRROperations&);
95 TBool operator==(const CSmsTPSRROperations&);
99 * This class will store the incomplete class 0 message information.
102 * The object of this class will be stored inside CSmsMessageAdditionalAttributes class.
103 * This class will provide 2 exported functions which will allow the caller of this class
104 * to get/set incomplete class 0 message information.
108 class CIncompleteClass0MessageInfo : public CSmsNonIEOperation
111 CIncompleteClass0MessageInfo(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
112 IMPORT_C void GetIncompleteMessageInfoL(TInt& aStartPos, TInt& aEndPos, TBool& aIsLastIncompleteMessage);
113 IMPORT_C void SetIncompleteMessageInfoL(TInt aStartPos, TInt aEndPos, TBool aIsLastIncompleteMessage);
115 void SetVersion(TInt aVersion);
116 void InternalizeL(RReadStream& aStream);
117 void ExternalizeL(RWriteStream& aStream) const;
120 TBool MessageTypeSupported() const;
121 void ValidateOperationL() const;
122 void operator=(const CIncompleteClass0MessageInfo&);
123 TBool operator==(const CIncompleteClass0MessageInfo&);
127 * Incomplete Class 0 Message versions
129 enum TSmsIncompleteClass0MessageVersion
131 /** The default value. */
132 ESmsIncompleteClass0MessageV0,
133 // for all other versions the corresponding enum values would be added i.e. ESmsIncompleteClass0MessageV1, etc.
134 EMaxSmsIncompleteClass0MessageV
139 * iVersion is the version of CIncompleteClass0MessageInfo. This parameter will be
140 * used to identify what iAdditionalInfo points to for that particular
141 * version of CIncompleteClass0MessageInfo
147 TBool iIsLastIncompleteMessage;