24
|
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".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
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.
|
|
17 |
//
|
|
18 |
//
|
|
19 |
|
|
20 |
/**
|
|
21 |
@file
|
|
22 |
*/
|
|
23 |
|
|
24 |
#ifndef __GSMUNONIEOPERATIONS_
|
|
25 |
#define __GSMUNONIEOPERATIONS_
|
|
26 |
|
|
27 |
|
|
28 |
#include <e32base.h>
|
|
29 |
#include <gsmumsg.h>
|
|
30 |
#include <gsmuelem.h>
|
|
31 |
|
|
32 |
/**
|
|
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.
|
|
35 |
*
|
|
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.
|
|
39 |
*
|
|
40 |
* The client gets access to an operations class using the following interface:
|
|
41 |
*
|
|
42 |
* CSmsNonIEOperation& CSmsMessage::GetOperationsForNonIEL(TSmsNonIEIdentifier aId);
|
|
43 |
*
|
|
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.
|
|
46 |
*
|
|
47 |
* @publishedAll
|
|
48 |
* @released
|
|
49 |
*/
|
|
50 |
class CSmsNonIEOperation : public CBase
|
|
51 |
{
|
|
52 |
public:
|
|
53 |
static CSmsNonIEOperation* NewL(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
|
|
54 |
IMPORT_C TSmsNonIEIdentifier Id() const;
|
|
55 |
virtual ~CSmsNonIEOperation(){};
|
|
56 |
protected:
|
|
57 |
virtual TBool MessageTypeSupported() const;
|
|
58 |
virtual void ValidateOperationL() const {};
|
|
59 |
private:
|
|
60 |
void ConstructL();
|
|
61 |
private:
|
|
62 |
TSmsNonIEIdentifier iId;
|
|
63 |
protected:
|
|
64 |
CSmsMessage& iMessage;
|
|
65 |
CSmsNonIEOperation(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
|
|
66 |
void operator=(const CSmsNonIEOperation&);
|
|
67 |
TBool operator==(const CSmsNonIEOperation&);
|
|
68 |
};
|
|
69 |
|
|
70 |
class CSmsCtrlNonIEOperation : public CSmsNonIEOperation
|
|
71 |
{
|
|
72 |
protected:
|
|
73 |
CSmsCtrlNonIEOperation(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
|
|
74 |
~CSmsCtrlNonIEOperation(){};
|
|
75 |
void operator=(const CSmsCtrlNonIEOperation&);
|
|
76 |
TBool operator==(const CSmsCtrlNonIEOperation&);
|
|
77 |
};
|
|
78 |
|
|
79 |
class CSmsTPSRROperations : public CSmsCtrlNonIEOperation
|
|
80 |
{
|
|
81 |
public:
|
|
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);
|
|
91 |
protected:
|
|
92 |
void ValidateOperationL() const;
|
|
93 |
void operator=(const CSmsTPSRROperations&);
|
|
94 |
TBool operator==(const CSmsTPSRROperations&);
|
|
95 |
};
|
|
96 |
|
|
97 |
/**
|
|
98 |
* This class will store the incomplete class 0 message information.
|
|
99 |
*
|
|
100 |
*
|
|
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.
|
|
104 |
* @publishedAll
|
|
105 |
* @released
|
|
106 |
*/
|
|
107 |
class CIncompleteClass0MessageInfo : public CSmsNonIEOperation
|
|
108 |
{
|
|
109 |
public:
|
|
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);
|
|
113 |
TInt Version();
|
|
114 |
void SetVersion(TInt aVersion);
|
|
115 |
void InternalizeL(RReadStream& aStream);
|
|
116 |
void ExternalizeL(RWriteStream& aStream) const;
|
|
117 |
|
|
118 |
protected:
|
|
119 |
TBool MessageTypeSupported() const;
|
|
120 |
void ValidateOperationL() const;
|
|
121 |
void operator=(const CIncompleteClass0MessageInfo&);
|
|
122 |
TBool operator==(const CIncompleteClass0MessageInfo&);
|
|
123 |
|
|
124 |
public:
|
|
125 |
/**
|
|
126 |
* Incomplete Class 0 Message versions
|
|
127 |
*/
|
|
128 |
enum TSmsIncompleteClass0MessageVersion
|
|
129 |
{
|
|
130 |
/** The default value. */
|
|
131 |
ESmsIncompleteClass0MessageV0,
|
|
132 |
// for all other versions the corresponding enum values would be added i.e. ESmsIncompleteClass0MessageV1, etc.
|
|
133 |
EMaxSmsIncompleteClass0MessageV
|
|
134 |
};
|
|
135 |
|
|
136 |
private:
|
|
137 |
/**
|
|
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
|
|
141 |
*/
|
|
142 |
TInt iVersion;
|
|
143 |
|
|
144 |
TInt iStartPos;
|
|
145 |
TInt iEndPos;
|
|
146 |
TBool iIsLastIncompleteMessage;
|
|
147 |
};
|
|
148 |
|
|
149 |
#endif
|