1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
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 |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
10 // |
10 // |
11 // Contributors: |
11 // Contributors: |
15 |
15 |
16 #ifndef __TZUPDATE_H__ |
16 #ifndef __TZUPDATE_H__ |
17 #define __TZUPDATE_H__ |
17 #define __TZUPDATE_H__ |
18 |
18 |
19 #include <e32cmn.h> // TUid. |
19 #include <e32cmn.h> // TUid. |
|
20 #include <e32std.h> |
20 |
21 |
21 /** UTC Offset update notification constants. When the UTC offset is automatically |
22 /** UTC Offset update notification constants. When the UTC offset is automatically |
22 adjusted for Daylight Saving then it is possible to receive |
23 adjusted for Daylight Saving then it is possible to receive |
23 notification using the Publish and Subscribe API with the |
24 notification using the Publish and Subscribe API with the |
24 values defined here. Note that this property is updated by the Time Zone Server |
25 values defined here. Note that this property is updated by the Time Zone Server |
25 as this is the only component that can modify the UTC Offset. |
26 as this is the only component that can modify the UTC Offset. |
26 |
27 |
27 @see RProperty in e32property.h |
28 @see RProperty in e32property.h |
28 @publishedAll |
|
29 @released |
|
30 @since 9.1 |
|
31 */ |
29 */ |
32 namespace NTzUpdate |
30 namespace NTzUpdate |
33 { |
31 { |
|
32 /** Time zone services publish and subscribe property category. |
|
33 @publishedAll |
|
34 @released |
|
35 */ |
34 const TUid KPropertyCategory = { 0x1020383E }; |
36 const TUid KPropertyCategory = { 0x1020383E }; |
35 |
37 |
|
38 /** Time zone services publish and subscribe property keys. |
|
39 @publishedAll |
|
40 @released |
|
41 */ |
36 enum TPropertyKeys |
42 enum TPropertyKeys |
37 { |
43 { |
38 EUtcOffsetChangeNotification, |
44 EUtcOffsetChangeNotification, |
39 ECurrentTimeZoneId, |
45 ECurrentTimeZoneId, |
40 EHomeTimeZoneId, |
46 EHomeTimeZoneId, |
41 ENextDSTChange |
47 ENextDSTChange, |
|
48 ETzRulesChange, |
|
49 ETzNamesChange, |
42 }; |
50 }; |
43 |
51 |
|
52 /** Structure used to return the value for ECurrentTimeZoneId or |
|
53 EHomeTimeZoneId property. |
|
54 @see RTz::NotifyHomeTimeZoneChangedL |
|
55 @publishedAll |
|
56 @released |
|
57 */ |
44 struct TTimeZoneChange |
58 struct TTimeZoneChange |
45 { |
59 { |
46 TInt iNewTimeZoneId; |
60 TInt iNewTimeZoneId; |
47 TInt iOldTimeZoneId; |
61 TInt iOldTimeZoneId; |
48 }; |
62 }; |
49 |
63 |
50 /** This struct is used to publish DST Change info in an RProperty. |
64 /** This struct is used to publish DST Change info in an RProperty. |
51 Subscribers to the property will define a copy of this struct |
65 Subscribers to the ENextDSTChange property will define a copy of this struct |
52 so that they are not dependant on the tz component. |
66 so that they are not dependant on the tz component. |
53 If this struct changes then the copies must also be changed. |
67 If this struct changes then the copies must also be changed. |
54 @internalTechnology |
68 @publishedAll |
|
69 @released |
55 */ |
70 */ |
56 struct TDSTChangeInfo |
71 struct TDSTChangeInfo |
57 { |
72 { |
58 /** The version of the struct. Currently always 1 */ |
73 /** The version of the struct. Currently always 1 */ |
59 TUint8 iVersion; |
74 TUint8 iVersion; |
67 TTime iPreviousDSTChangeUTC; |
82 TTime iPreviousDSTChangeUTC; |
68 |
83 |
69 /** The offset from UTC (in minutes) before the previous DST change took place. This member is only valid |
84 /** The offset from UTC (in minutes) before the previous DST change took place. This member is only valid |
70 if the version is 2 or above.*/ |
85 if the version is 2 or above.*/ |
71 TInt iPreviousUTCOffset; |
86 TInt iPreviousUTCOffset; |
72 |
87 private: |
73 /** Reserved for future use. */ |
88 /** Reserved for future use. |
|
89 */ |
74 TInt iReserved[12]; |
90 TInt iReserved[12]; |
75 }; |
91 }; |
76 } |
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 } |
77 |
114 |
78 #endif // __TZUPDATE_H__ |
115 #endif // __TZUPDATE_H__ |