epoc32/include/msvschedulesettings.h
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/msvschedulesettings.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,118 @@
     1.4 +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __MSVSCHEDULESETTINGS_H__
    1.20 +#define __MSVSCHEDULESETTINGS_H__
    1.21 +
    1.22 + 
    1.23 +
    1.24 +
    1.25 +#include <msvrcpt.h>
    1.26 +#include <schinfo.h>
    1.27 +#include <msvsenderroraction.h>
    1.28 +
    1.29 +
    1.30 +
    1.31 +
    1.32 +
    1.33 +/**
    1.34 +Stores the MTM-specific (general) settings for scheduling messages on the
    1.35 +Task Scheduler. 
    1.36 +
    1.37 +These settings include the latency (minimum amount of time between now and when
    1.38 +the message is scheduled for), the intervals (short, long or variable) to wait 
    1.39 +for before attempting to re-send the message and the timout value for messages
    1.40 +pending conditions to be met.
    1.41 +
    1.42 +The other MTM scheduling releated settings are stored in CMsvOffPeakTimes 
    1.43 +and CMsvSendErrorActions. 
    1.44 +
    1.45 +@publishedAll
    1.46 +@released
    1.47 +*/
    1.48 +
    1.49 +class CMsvScheduleSettings : public CBase
    1.50 +	{
    1.51 +public:
    1.52 +
    1.53 +	IMPORT_C static CMsvScheduleSettings* NewL();
    1.54 +	IMPORT_C static CMsvScheduleSettings* NewLC();	
    1.55 +	IMPORT_C ~CMsvScheduleSettings();
    1.56 +
    1.57 +
    1.58 +	IMPORT_C void Reset();
    1.59 +
    1.60 +
    1.61 +	IMPORT_C void SetPriority(const TInt aPriority);
    1.62 +	IMPORT_C TInt Priority() const;
    1.63 +
    1.64 +	IMPORT_C void SetValidityPeriod(const TTimeIntervalMinutes& aValidityPeriod);
    1.65 +	IMPORT_C const TTimeIntervalMinutes& ValidityPeriod() const;
    1.66 +
    1.67 +	IMPORT_C void SetIntervalType(const TIntervalType aIntervalType);
    1.68 +	IMPORT_C TIntervalType IntervalType() const;
    1.69 +
    1.70 +	IMPORT_C void SetLongInterval(const TTimeIntervalSeconds& aInterval);
    1.71 +	IMPORT_C const TTimeIntervalSeconds& LongInterval() const;
    1.72 +	
    1.73 +	IMPORT_C void SetShortInterval(const TTimeIntervalSeconds& aInterval);
    1.74 +	IMPORT_C const TTimeIntervalSeconds& ShortInterval() const;
    1.75 +
    1.76 +	IMPORT_C const CArrayFixFlat<TTimeIntervalSeconds>& VariableIntervals() const;
    1.77 +	IMPORT_C void SetVariableIntervalsL(const CArrayFixFlat<TTimeIntervalSeconds>& aIntervals);
    1.78 +
    1.79 +	IMPORT_C const TTimeIntervalMicroSeconds32& Latency() const;
    1.80 +	IMPORT_C void SetLatency(const TTimeIntervalMicroSeconds32& aLatency);
    1.81 +	
    1.82 +	IMPORT_C void SetPendingConditionsTimeout(const TTimeIntervalMinutes& aTimeout);
    1.83 +	IMPORT_C const TTimeIntervalMinutes& PendingConditionsTimeout() const;
    1.84 +
    1.85 +	/** Default scheduler settings values. */
    1.86 +	enum
    1.87 +		{
    1.88 +		/** Default priority. */
    1.89 +		EDefaultPriority		= 27,
    1.90 +		/** Default validity period: 10080 Minutes in 1 week. */
    1.91 +		EDefaultValidityPeriod	= 10080,
    1.92 +		/** Default interval type: EYearly */	
    1.93 +		EDefaultIntervalType	= 3,
    1.94 +		/** Default short retry interval. */		
    1.95 +		EDefaultShortInterval	= 5,
    1.96 +		/** Default long retry interval. */
    1.97 +		EDefaultLongInterval	= 120,
    1.98 +		/** Default latency. */
    1.99 +		EDefaultLatency			= 1500000,
   1.100 +		/** Default timeout. Zero minutes - no timeout. */
   1.101 +		EDefaultPendingConditionsTimeout	= 0
   1.102 +		};
   1.103 +
   1.104 +private:
   1.105 +	CMsvScheduleSettings();
   1.106 +
   1.107 +	void ConstructL();
   1.108 +
   1.109 +
   1.110 +	TInt					iPriority;		//Priority of the schedules on the task scheduler
   1.111 +	TTimeIntervalMinutes	iValidityPeriod;//Validity period of message on the task scheduler
   1.112 +	TIntervalType			iIntervalType;	//See TIntervalType declaration and Task Scheduler user documentation
   1.113 +	TTimeIntervalMicroSeconds32 iLatency;		//Minimum amount of time between now and when the message is scheduled for. Cannot be negative.
   1.114 +	TTimeIntervalMinutes	iPendingConditionsTimeout;
   1.115 +
   1.116 +	TTimeIntervalSeconds iLongInterval;
   1.117 +	TTimeIntervalSeconds iShortInterval;
   1.118 +	CArrayFixFlat<TTimeIntervalSeconds>* iVariableIntervals;
   1.119 +	};
   1.120 +
   1.121 +#endif	// __MSVSCHEDULESETTINGS_H__