|
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 // |
|
15 |
|
16 #ifndef __MSVSCHEDULESETTINGS_H__ |
|
17 #define __MSVSCHEDULESETTINGS_H__ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #include <msvrcpt.h> |
|
23 #include <schinfo.h> |
|
24 #include <msvsenderroraction.h> |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 /** |
|
31 Stores the MTM-specific (general) settings for scheduling messages on the |
|
32 Task Scheduler. |
|
33 |
|
34 These settings include the latency (minimum amount of time between now and when |
|
35 the message is scheduled for), the intervals (short, long or variable) to wait |
|
36 for before attempting to re-send the message and the timout value for messages |
|
37 pending conditions to be met. |
|
38 |
|
39 The other MTM scheduling releated settings are stored in CMsvOffPeakTimes |
|
40 and CMsvSendErrorActions. |
|
41 |
|
42 @publishedAll |
|
43 @released |
|
44 */ |
|
45 |
|
46 class CMsvScheduleSettings : public CBase |
|
47 { |
|
48 public: |
|
49 |
|
50 IMPORT_C static CMsvScheduleSettings* NewL(); |
|
51 IMPORT_C static CMsvScheduleSettings* NewLC(); |
|
52 IMPORT_C ~CMsvScheduleSettings(); |
|
53 |
|
54 |
|
55 IMPORT_C void Reset(); |
|
56 |
|
57 |
|
58 IMPORT_C void SetPriority(const TInt aPriority); |
|
59 IMPORT_C TInt Priority() const; |
|
60 |
|
61 IMPORT_C void SetValidityPeriod(const TTimeIntervalMinutes& aValidityPeriod); |
|
62 IMPORT_C const TTimeIntervalMinutes& ValidityPeriod() const; |
|
63 |
|
64 IMPORT_C void SetIntervalType(const TIntervalType aIntervalType); |
|
65 IMPORT_C TIntervalType IntervalType() const; |
|
66 |
|
67 IMPORT_C void SetLongInterval(const TTimeIntervalSeconds& aInterval); |
|
68 IMPORT_C const TTimeIntervalSeconds& LongInterval() const; |
|
69 |
|
70 IMPORT_C void SetShortInterval(const TTimeIntervalSeconds& aInterval); |
|
71 IMPORT_C const TTimeIntervalSeconds& ShortInterval() const; |
|
72 |
|
73 IMPORT_C const CArrayFixFlat<TTimeIntervalSeconds>& VariableIntervals() const; |
|
74 IMPORT_C void SetVariableIntervalsL(const CArrayFixFlat<TTimeIntervalSeconds>& aIntervals); |
|
75 |
|
76 IMPORT_C const TTimeIntervalMicroSeconds32& Latency() const; |
|
77 IMPORT_C void SetLatency(const TTimeIntervalMicroSeconds32& aLatency); |
|
78 |
|
79 IMPORT_C void SetPendingConditionsTimeout(const TTimeIntervalMinutes& aTimeout); |
|
80 IMPORT_C const TTimeIntervalMinutes& PendingConditionsTimeout() const; |
|
81 |
|
82 /** Default scheduler settings values. */ |
|
83 enum |
|
84 { |
|
85 /** Default priority. */ |
|
86 EDefaultPriority = 27, |
|
87 /** Default validity period: 10080 Minutes in 1 week. */ |
|
88 EDefaultValidityPeriod = 10080, |
|
89 /** Default interval type: EYearly */ |
|
90 EDefaultIntervalType = 3, |
|
91 /** Default short retry interval. */ |
|
92 EDefaultShortInterval = 5, |
|
93 /** Default long retry interval. */ |
|
94 EDefaultLongInterval = 120, |
|
95 /** Default latency. */ |
|
96 EDefaultLatency = 1500000, |
|
97 /** Default timeout. Zero minutes - no timeout. */ |
|
98 EDefaultPendingConditionsTimeout = 0 |
|
99 }; |
|
100 |
|
101 private: |
|
102 CMsvScheduleSettings(); |
|
103 |
|
104 void ConstructL(); |
|
105 |
|
106 |
|
107 TInt iPriority; //Priority of the schedules on the task scheduler |
|
108 TTimeIntervalMinutes iValidityPeriod;//Validity period of message on the task scheduler |
|
109 TIntervalType iIntervalType; //See TIntervalType declaration and Task Scheduler user documentation |
|
110 TTimeIntervalMicroSeconds32 iLatency; //Minimum amount of time between now and when the message is scheduled for. Cannot be negative. |
|
111 TTimeIntervalMinutes iPendingConditionsTimeout; |
|
112 |
|
113 TTimeIntervalSeconds iLongInterval; |
|
114 TTimeIntervalSeconds iShortInterval; |
|
115 CArrayFixFlat<TTimeIntervalSeconds>* iVariableIntervals; |
|
116 }; |
|
117 |
|
118 #endif // __MSVSCHEDULESETTINGS_H__ |