|
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 __MSVOFFPEAKTIME_H__ |
|
17 #define __MSVOFFPEAKTIME_H__ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 // |
|
23 // |
|
24 // Constants |
|
25 // |
|
26 // |
|
27 |
|
28 |
|
29 // |
|
30 // |
|
31 // TMsvOffPeakTime Declaration |
|
32 // |
|
33 // |
|
34 |
|
35 /** |
|
36 Defines an off-peak period for message sending. |
|
37 |
|
38 An off-peak period is specified as a start time and a duration. |
|
39 |
|
40 @publishedAll |
|
41 @released |
|
42 */ |
|
43 |
|
44 class TMsvOffPeakTime |
|
45 { |
|
46 public: |
|
47 IMPORT_C TMsvOffPeakTime(); |
|
48 IMPORT_C TMsvOffPeakTime(const TDay aDay, const TInt aHour, const TInt aMinute, const TTimeIntervalMinutes aValidityPeriod); |
|
49 |
|
50 |
|
51 IMPORT_C void Reset(); |
|
52 |
|
53 IMPORT_C TDay Day() const; |
|
54 IMPORT_C void SetDay(const TDay aDay); |
|
55 |
|
56 IMPORT_C TInt Hour() const; |
|
57 IMPORT_C void SetHour(const TInt aHour); |
|
58 |
|
59 IMPORT_C TInt Minute() const; |
|
60 IMPORT_C void SetMinute(const TInt aMinute); |
|
61 |
|
62 IMPORT_C const TTimeIntervalMinutes ValidityPeriod() const; |
|
63 IMPORT_C void SetValidityPeriod(const TTimeIntervalMinutes aValidityPeriod); |
|
64 |
|
65 IMPORT_C const TTime NextTimeInclusive(const TTime& aFromTime) const; |
|
66 |
|
67 private: |
|
68 TDay iDay; |
|
69 TInt8 iHour; //Start hour |
|
70 TInt8 iMinute; //Start minute |
|
71 TTimeIntervalMinutes iValidityPeriod; //Validity period. Must be less than 24 hours |
|
72 }; |
|
73 |
|
74 // |
|
75 // |
|
76 // CMsvOffPeakTimes Declaration |
|
77 // |
|
78 // |
|
79 |
|
80 /** |
|
81 Array of off-peak time data. |
|
82 |
|
83 This represents all the off-peak time periods in each week. |
|
84 |
|
85 @publishedAll |
|
86 @released |
|
87 */ |
|
88 |
|
89 class CMsvOffPeakTimes : public CArrayFixFlat<TMsvOffPeakTime> |
|
90 { |
|
91 public: |
|
92 IMPORT_C CMsvOffPeakTimes(); |
|
93 |
|
94 |
|
95 IMPORT_C TInt GetNextOffPeakTime(const TTime& aFromTime, TMsvOffPeakTime& aNext, TTime& aNextTime) const; |
|
96 |
|
97 protected: |
|
98 |
|
99 |
|
100 private: |
|
101 }; |
|
102 |
|
103 #endif // __MSVOFFPEAKTIME_H__ |