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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __MSVOFFPEAKTIME_H__
17 #define __MSVOFFPEAKTIME_H__
22 /////////////////////////////////////////////////////////////////////////////
26 /////////////////////////////////////////////////////////////////////////////
29 /////////////////////////////////////////////////////////////////////////////
31 // TMsvOffPeakTime Declaration
33 /////////////////////////////////////////////////////////////////////////////
36 Defines an off-peak period for message sending.
38 An off-peak period is specified as a start time and a duration.
47 IMPORT_C TMsvOffPeakTime();
48 IMPORT_C TMsvOffPeakTime(const TDay aDay, const TInt aHour, const TInt aMinute, const TTimeIntervalMinutes aValidityPeriod);
51 IMPORT_C void Reset();
53 IMPORT_C TDay Day() const;
54 IMPORT_C void SetDay(const TDay aDay);
56 IMPORT_C TInt Hour() const;
57 IMPORT_C void SetHour(const TInt aHour);
59 IMPORT_C TInt Minute() const;
60 IMPORT_C void SetMinute(const TInt aMinute);
62 IMPORT_C const TTimeIntervalMinutes ValidityPeriod() const;
63 IMPORT_C void SetValidityPeriod(const TTimeIntervalMinutes aValidityPeriod);
65 IMPORT_C const TTime NextTimeInclusive(const TTime& aFromTime) const;
69 TInt8 iHour; //Start hour
70 TInt8 iMinute; //Start minute
71 TTimeIntervalMinutes iValidityPeriod; //Validity period. Must be less than 24 hours
74 /////////////////////////////////////////////////////////////////////////////
76 // CMsvOffPeakTimes Declaration
78 /////////////////////////////////////////////////////////////////////////////
81 Array of off-peak time data.
83 This represents all the off-peak time periods in each week.
89 class CMsvOffPeakTimes : public CArrayFixFlat<TMsvOffPeakTime>
92 IMPORT_C CMsvOffPeakTimes();
95 IMPORT_C TInt GetNextOffPeakTime(const TTime& aFromTime, TMsvOffPeakTime& aNext, TTime& aNextTime) const;
103 #endif // __MSVOFFPEAKTIME_H__