|
1 // Copyright (c) 2004-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 __TZUPDATE_H__ |
|
17 #define __TZUPDATE_H__ |
|
18 |
|
19 #include <e32cmn.h> // TUid. |
|
20 #include <e32std.h> |
|
21 |
|
22 /** UTC Offset update notification constants. When the UTC offset is automatically |
|
23 adjusted for Daylight Saving then it is possible to receive |
|
24 notification using the Publish and Subscribe API with the |
|
25 values defined here. Note that this property is updated by the Time Zone Server |
|
26 as this is the only component that can modify the UTC Offset. |
|
27 |
|
28 @see RProperty in e32property.h |
|
29 */ |
|
30 namespace NTzUpdate |
|
31 { |
|
32 /** Time zone services publish and subscribe property category. |
|
33 @publishedAll |
|
34 @released |
|
35 */ |
|
36 const TUid KPropertyCategory = { 0x1020383E }; |
|
37 |
|
38 /** Time zone services publish and subscribe property keys. |
|
39 @publishedAll |
|
40 @released |
|
41 */ |
|
42 enum TPropertyKeys |
|
43 { |
|
44 EUtcOffsetChangeNotification, |
|
45 ECurrentTimeZoneId, |
|
46 EHomeTimeZoneId, |
|
47 ENextDSTChange, |
|
48 ETzRulesChange, |
|
49 ETzNamesChange, |
|
50 }; |
|
51 |
|
52 /** Structure used to return the value for ECurrentTimeZoneId or |
|
53 EHomeTimeZoneId property. |
|
54 @see RTz::NotifyHomeTimeZoneChangedL |
|
55 @publishedAll |
|
56 @released |
|
57 */ |
|
58 struct TTimeZoneChange |
|
59 { |
|
60 TInt iNewTimeZoneId; |
|
61 TInt iOldTimeZoneId; |
|
62 }; |
|
63 |
|
64 /** This struct is used to publish DST Change info in an RProperty. |
|
65 Subscribers to the ENextDSTChange property will define a copy of this struct |
|
66 so that they are not dependant on the tz component. |
|
67 If this struct changes then the copies must also be changed. |
|
68 @publishedAll |
|
69 @released |
|
70 */ |
|
71 struct TDSTChangeInfo |
|
72 { |
|
73 /** The version of the struct. Currently always 1 */ |
|
74 TUint8 iVersion; |
|
75 |
|
76 /** The time of the next offset change in UTC */ |
|
77 TTime iNextDSTChangeUTC; |
|
78 /** The offset from UTC (in minutes) after the next DST change will take place.*/ |
|
79 TInt iNextUTCOffset; |
|
80 |
|
81 /** The time of the previous offset change in UTC. This member is only valid if the version is 2 or above. */ |
|
82 TTime iPreviousDSTChangeUTC; |
|
83 |
|
84 /** The offset from UTC (in minutes) before the previous DST change took place. This member is only valid |
|
85 if the version is 2 or above.*/ |
|
86 TInt iPreviousUTCOffset; |
|
87 private: |
|
88 /** Reserved for future use. |
|
89 */ |
|
90 TInt iReserved[12]; |
|
91 }; |
|
92 /** Structure used to return the value for ETzRulesChange property. |
|
93 This property covers changes to the system TZ database, the current/system |
|
94 TZ rules or user-defined TZ rules. |
|
95 @publishedAll |
|
96 @released |
|
97 */ |
|
98 struct TTzRulesChange |
|
99 { |
|
100 TTime iUTCTimeOfRulesChange; |
|
101 }; |
|
102 |
|
103 /** Structure used to return the value for ETzNamesChange property. |
|
104 This property covers changes to either the localized system TZ names |
|
105 or non-localized user-defined TZ names. |
|
106 @publishedAll |
|
107 @released |
|
108 */ |
|
109 struct TTzNamesChange |
|
110 { |
|
111 TTime iUTCTimeOfNamesChange; |
|
112 }; |
|
113 } |
|
114 |
|
115 #endif // __TZUPDATE_H__ |