|
1 // Copyright (c) 1997-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 #ifndef __TIMEZONE_USERNAMES_H__ |
|
16 #define __TIMEZONE_USERNAMES_H__ |
|
17 |
|
18 #include <e32base.h> |
|
19 |
|
20 class RWriteStream; |
|
21 /** |
|
22 The CTzUserNames class is used to encapsulate the names for a user-defined |
|
23 time zone. |
|
24 |
|
25 When creating an instance of this class the client can specify the following |
|
26 names: |
|
27 |
|
28 - Long standard time name, for example "Mountain Standard Time" |
|
29 - Short standard time name, for example "MST" |
|
30 - Long daylight saving time name, for example "Mountain Daylight Time" |
|
31 - Short daylight saving time name, for example "MDT" |
|
32 - City name, for example "Shiprock" |
|
33 - Region name, for example "America" |
|
34 |
|
35 The client can also read these names. |
|
36 |
|
37 @publishedPartner |
|
38 @released |
|
39 */ |
|
40 class CTzUserNames : public CBase |
|
41 { |
|
42 public: |
|
43 IMPORT_C static CTzUserNames* NewL(const TDesC& aStandardName, |
|
44 const TDesC& aShortStandardName, const TDesC& aDaylightSaveName, |
|
45 const TDesC& aShortDaylightSaveName, const TDesC& aCityName, |
|
46 const TDesC& aRegionName); |
|
47 IMPORT_C static CTzUserNames* NewLC(const TDesC& aStandardName, |
|
48 const TDesC& aShortStandardName, const TDesC& aDayLightSaveName, |
|
49 const TDesC& aShortDaylightSaveName, const TDesC& aCityName, |
|
50 const TDesC& aRegionName); |
|
51 IMPORT_C ~CTzUserNames(); |
|
52 |
|
53 IMPORT_C const TDesC& StandardName() const; |
|
54 IMPORT_C const TDesC& ShortStandardName() const; |
|
55 IMPORT_C const TDesC& DaylightSaveName() const; |
|
56 IMPORT_C const TDesC& ShortDaylightSaveName() const; |
|
57 IMPORT_C const TDesC& CityName() const; |
|
58 IMPORT_C const TDesC& RegionName() const; |
|
59 |
|
60 IMPORT_C static CTzUserNames* NewL(RReadStream& aStream); |
|
61 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
62 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
63 IMPORT_C TInt SizeOfObject() const; |
|
64 |
|
65 private: |
|
66 CTzUserNames(); |
|
67 void ConstructL(const TDesC& aStandardName, const TDesC& aShortStandardName, |
|
68 const TDesC& aDayLightSaveName, const TDesC& aShortDayLightSaveName, |
|
69 const TDesC& aCityName, const TDesC& aRegionName); |
|
70 |
|
71 private: |
|
72 HBufC* iStandardName; |
|
73 HBufC* iShortStandardName; |
|
74 HBufC* iDaylightName; |
|
75 HBufC* iShortDaylightName; |
|
76 HBufC* iCityName; |
|
77 HBufC* iRegionName; |
|
78 }; |
|
79 |
|
80 #endif //__TIMEZONE_USERNAMES_H__ |