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 |
// contains header file of the SMS settings.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
*/
|
|
21 |
|
|
22 |
|
|
23 |
#if !defined (__SMSUSET_H__)
|
|
24 |
#define __SMSUSET_H__
|
|
25 |
|
|
26 |
#if !defined (__E32STD_H__)
|
|
27 |
#include "e32std.h"
|
|
28 |
#endif
|
|
29 |
|
|
30 |
|
|
31 |
class RReadStream;
|
|
32 |
class RWriteStream;
|
|
33 |
|
|
34 |
|
|
35 |
/**
|
|
36 |
* SMS settings.
|
|
37 |
*
|
|
38 |
* SMSPROT uses an instance of TSmsSettings to configure the sms stack timeouts.
|
|
39 |
*
|
|
40 |
* The SMSPROT calls TSmsSettings' default constructor during initialisation.
|
|
41 |
* It then parses smswap.sms.esk for customised settings and updates its instance of
|
|
42 |
* TSmsSettings accordingly.
|
|
43 |
*
|
|
44 |
* Customised settings in smswap.sms.esk should comply with the following syntax:
|
|
45 |
*
|
|
46 |
* [customTimeoutSettings]
|
|
47 |
* sendTryTimeout= value
|
|
48 |
* bootTimerTimeout = value
|
|
49 |
*
|
|
50 |
* where the identifier 'value' is to be substituted with an integer value.
|
|
51 |
* Integer values less than zero will cause the stack to leave.
|
|
52 |
*
|
|
53 |
* Only parameters that need to be customised are required in smswap.sms.esk
|
|
54 |
*
|
|
55 |
* @publishedAll
|
|
56 |
* @released
|
|
57 |
*/
|
|
58 |
class TSmsSettings
|
|
59 |
{
|
|
60 |
public:
|
|
61 |
IMPORT_C TSmsSettings();
|
|
62 |
|
|
63 |
inline const TTimeIntervalMicroSeconds32& Timeout() const;
|
|
64 |
inline void SetTimeout(const TTimeIntervalMicroSeconds32& aTimeout);
|
|
65 |
inline TInt SendTryLimit() const;
|
|
66 |
inline void SetSendTryLimit(TInt aLimit);
|
|
67 |
inline TBool DeletePDUsFromSIM() const;
|
|
68 |
inline void SetDeletePDUsFromSIM(TBool aDelete);
|
|
69 |
inline TBool DeletePDUsFromPhoneStores() const;
|
|
70 |
inline void SetDeletePDUsFromPhoneStores(TBool aDelete);
|
|
71 |
inline TBool DeletePDUsFromCombinedStores() const;
|
|
72 |
inline void SetDeletePDUsFromCombinedStores(TBool aDelete);
|
|
73 |
inline const TTimeIntervalMinutes& ReassemblyLifetime() const;
|
|
74 |
inline void SetReassemblyLifetime(const TTimeIntervalMinutes& aReassemblyLifetime);
|
|
75 |
inline TInt KSegmentationLifetimeMultiplier() const;
|
|
76 |
inline void SetKSegmentationLifetimeMultiplier(TInt aKSegmentationLifetimeMultiplier);
|
|
77 |
inline const TTimeIntervalMicroSeconds32& ModemInitializationTimeout() const;
|
|
78 |
inline void SetModemInitializationTimeout(const TTimeIntervalMicroSeconds32& aTimeout);
|
|
79 |
inline const TTimeIntervalMicroSeconds32& SendTryTimeout() const;
|
|
80 |
inline void SetSendTryTimeout(const TTimeIntervalMicroSeconds32& aTimeout);
|
|
81 |
inline const TTimeIntervalMicroSeconds32& BootTimerTimeout();
|
|
82 |
inline void SetBootTimerTimeout(const TTimeIntervalMicroSeconds32& aTimeout);
|
|
83 |
|
|
84 |
IMPORT_C void InternalizeL(RReadStream& aStream);
|
|
85 |
IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
|
|
86 |
|
|
87 |
private:
|
|
88 |
enum
|
|
89 |
{
|
|
90 |
KDefaultTimeoutMicroSeconds32=60000000 //<60 sec
|
|
91 |
};
|
|
92 |
enum
|
|
93 |
{
|
|
94 |
KDefaultSendTryLimit=4
|
|
95 |
};
|
|
96 |
enum
|
|
97 |
{
|
|
98 |
KDefaultReassemblyLifetime=2*1440 //< two days
|
|
99 |
};
|
|
100 |
enum
|
|
101 |
{
|
|
102 |
KDefaultKSegmentationLifetimeMultiplier=1200 //< 1.2
|
|
103 |
};
|
|
104 |
enum
|
|
105 |
{
|
|
106 |
KDefaultModemInitializationTimeoutMicroSeconds32=30000000 //<30sec
|
|
107 |
};
|
|
108 |
enum
|
|
109 |
{
|
|
110 |
KDefaultSendTryTimeoutMicroSeconds32=60000000 //< 60sec
|
|
111 |
};
|
|
112 |
enum
|
|
113 |
{
|
|
114 |
KDefaultBootTimerMicroSeconds32=60000000 // 60sec
|
|
115 |
};
|
|
116 |
enum TSmsSettingsFlags
|
|
117 |
{
|
|
118 |
ESmsFlagDeletePDUsFromSIM=0x01,
|
|
119 |
ESmsFlagDeletePDUsFromPhoneStores=0x02,
|
|
120 |
ESmsFlagDeletePDUsFromCombinedStores=0x04
|
|
121 |
};
|
|
122 |
private:
|
|
123 |
TTimeIntervalMicroSeconds32 iTimeoutMicroSeconds32; //<TimeOut period in microseconds for sending a PDU
|
|
124 |
/**
|
|
125 |
* Number of attempts for sending a PDU.
|
|
126 |
* @deprecated 7.0
|
|
127 |
*/
|
|
128 |
TInt iSendTryLimit;
|
|
129 |
TInt iFlags; //<Contains TSmsSettingsFlags
|
|
130 |
TTimeIntervalMinutes iReassemblyLifetime;//< Maximum time PDUs making a concatenated message stay in the reassembly store before they have all arrived
|
|
131 |
TInt iKSegmentationLifetimeMultiplier; //< Validity period is multiplied by this fraction, 1000=1:1
|
|
132 |
TTimeIntervalMicroSeconds32 iModemInitializationTimeoutMicroSeconds32;//<TimeOut period in microseconds for initialising the modem
|
|
133 |
TTimeIntervalMicroSeconds32 iSendTryTimeoutMicroSeconds32;//< TimeOut period in microseconds for the send operation
|
|
134 |
TTimeIntervalMicroSeconds32 iBootTimerTimeout32; // TimeOut period in microseconds for the boot timer.
|
|
135 |
};
|
|
136 |
|
|
137 |
#include "smsuset.inl"
|
|
138 |
|
|
139 |
#endif // !defined __SMSUSET_H__
|