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 "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".
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.
24 #ifndef __GSMUNONIEOPERATIONS_
25 #define __GSMUNONIEOPERATIONS_
33 * SMS Stack clients use specialisations of this class to configure a SMS Message with parameters which are not
34 * a type of Information Element.
36 * Each parameter that uses this interface is supported by a class derived from CSmsNonIEOperation.
37 * The derived class operates on the CSmsMessage, allowing the client to add, remove and access these parameters
38 * inside the CSmsMessage.
40 * The client gets access to an operations class using the following interface:
42 * CSmsNonIEOperation& CSmsMessage::GetOperationsForNonIEL(TSmsNonIEIdentifier aId);
44 * When the CSmsMessage is deleted, all its associated CSmsNonIEOperations classes are also deleted and references to
45 * them become stale. Each instance of the CSmsNonIEOperation Class is an attribute of the CSmsMessage itself.
50 class CSmsNonIEOperation : public CBase
53 static CSmsNonIEOperation* NewL(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
54 IMPORT_C TSmsNonIEIdentifier Id() const;
55 virtual ~CSmsNonIEOperation(){};
57 virtual TBool MessageTypeSupported() const;
58 virtual void ValidateOperationL() const {};
62 TSmsNonIEIdentifier iId;
64 CSmsMessage& iMessage;
65 CSmsNonIEOperation(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
66 void operator=(const CSmsNonIEOperation&);
67 TBool operator==(const CSmsNonIEOperation&);
70 class CSmsCtrlNonIEOperation : public CSmsNonIEOperation
73 CSmsCtrlNonIEOperation(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
74 ~CSmsCtrlNonIEOperation(){};
75 void operator=(const CSmsCtrlNonIEOperation&);
76 TBool operator==(const CSmsCtrlNonIEOperation&);
79 class CSmsTPSRROperations : public CSmsCtrlNonIEOperation
82 CSmsTPSRROperations(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
83 ~CSmsTPSRROperations() {};
84 IMPORT_C TInt GetStatusReport(TUint aSegmentSequenceNum) const;
85 IMPORT_C void SetLastSegmentStatusReportL(TBool aEnable);
86 IMPORT_C TInt SetSegmentStatusReportL(TUint aSegmentSequenceNum, TBool aEnable);
87 IMPORT_C void SetSchemeL();
88 IMPORT_C TSmsStatusReportScheme GetScheme() const;
89 IMPORT_C void ResetSchemeL();
90 IMPORT_C void SetDefaultL(TBool aEnable);
92 void ValidateOperationL() const;
93 void operator=(const CSmsTPSRROperations&);
94 TBool operator==(const CSmsTPSRROperations&);
98 * This class will store the incomplete class 0 message information.
101 * The object of this class will be stored inside CSmsMessageAdditionalAttributes class.
102 * This class will provide 2 exported functions which will allow the caller of this class
103 * to get/set incomplete class 0 message information.
107 class CIncompleteClass0MessageInfo : public CSmsNonIEOperation
110 CIncompleteClass0MessageInfo(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
111 IMPORT_C void GetIncompleteMessageInfoL(TInt& aStartPos, TInt& aEndPos, TBool& aIsLastIncompleteMessage);
112 IMPORT_C void SetIncompleteMessageInfoL(TInt aStartPos, TInt aEndPos, TBool aIsLastIncompleteMessage);
114 void SetVersion(TInt aVersion);
115 void InternalizeL(RReadStream& aStream);
116 void ExternalizeL(RWriteStream& aStream) const;
119 TBool MessageTypeSupported() const;
120 void ValidateOperationL() const;
121 void operator=(const CIncompleteClass0MessageInfo&);
122 TBool operator==(const CIncompleteClass0MessageInfo&);
126 * Incomplete Class 0 Message versions
128 enum TSmsIncompleteClass0MessageVersion
130 /** The default value. */
131 ESmsIncompleteClass0MessageV0,
132 // for all other versions the corresponding enum values would be added i.e. ESmsIncompleteClass0MessageV1, etc.
133 EMaxSmsIncompleteClass0MessageV
138 * iVersion is the version of CIncompleteClass0MessageInfo. This parameter will be
139 * used to identify what iAdditionalInfo points to for that particular
140 * version of CIncompleteClass0MessageInfo
146 TBool iIsLastIncompleteMessage;