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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __MSVSCHEDULESETTINGS_H__
17 #define __MSVSCHEDULESETTINGS_H__
24 #include <msvsenderroraction.h>
31 Stores the MTM-specific (general) settings for scheduling messages on the
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.
39 The other MTM scheduling releated settings are stored in CMsvOffPeakTimes
40 and CMsvSendErrorActions.
46 class CMsvScheduleSettings : public CBase
50 IMPORT_C static CMsvScheduleSettings* NewL();
51 IMPORT_C static CMsvScheduleSettings* NewLC();
52 IMPORT_C ~CMsvScheduleSettings();
55 IMPORT_C void Reset();
58 IMPORT_C void SetPriority(const TInt aPriority);
59 IMPORT_C TInt Priority() const;
61 IMPORT_C void SetValidityPeriod(const TTimeIntervalMinutes& aValidityPeriod);
62 IMPORT_C const TTimeIntervalMinutes& ValidityPeriod() const;
64 IMPORT_C void SetIntervalType(const TIntervalType aIntervalType);
65 IMPORT_C TIntervalType IntervalType() const;
67 IMPORT_C void SetLongInterval(const TTimeIntervalSeconds& aInterval);
68 IMPORT_C const TTimeIntervalSeconds& LongInterval() const;
70 IMPORT_C void SetShortInterval(const TTimeIntervalSeconds& aInterval);
71 IMPORT_C const TTimeIntervalSeconds& ShortInterval() const;
73 IMPORT_C const CArrayFixFlat<TTimeIntervalSeconds>& VariableIntervals() const;
74 IMPORT_C void SetVariableIntervalsL(const CArrayFixFlat<TTimeIntervalSeconds>& aIntervals);
76 IMPORT_C const TTimeIntervalMicroSeconds32& Latency() const;
77 IMPORT_C void SetLatency(const TTimeIntervalMicroSeconds32& aLatency);
79 IMPORT_C void SetPendingConditionsTimeout(const TTimeIntervalMinutes& aTimeout);
80 IMPORT_C const TTimeIntervalMinutes& PendingConditionsTimeout() const;
82 /** Default scheduler settings values. */
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
102 CMsvScheduleSettings();
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;
113 TTimeIntervalSeconds iLongInterval;
114 TTimeIntervalSeconds iShortInterval;
115 CArrayFixFlat<TTimeIntervalSeconds>* iVariableIntervals;
118 #endif // __MSVSCHEDULESETTINGS_H__