|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Calendar Lunar Plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CALENLUNARLOCALIZEDINFO_H__ |
|
21 #define __CALENLUNARLOCALIZEDINFO_H__ |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 class CCalenLunarLocalizer; |
|
26 |
|
27 class CCalenLunarLocalizedInfo : public CBase |
|
28 { |
|
29 public: |
|
30 enum TField |
|
31 { |
|
32 EFestival, |
|
33 ESolarTerm, |
|
34 EFullLunarDate, |
|
35 ELunarYear, |
|
36 ELunarMonthAndDay, |
|
37 EAnimalYear, |
|
38 EGregorianDate |
|
39 }; |
|
40 |
|
41 |
|
42 public: // public API |
|
43 IMPORT_C static CCalenLunarLocalizedInfo* NewL(); |
|
44 |
|
45 IMPORT_C virtual ~CCalenLunarLocalizedInfo(); |
|
46 |
|
47 /** |
|
48 * Get specific field. This is useful, when you have ordered array of TFields |
|
49 * and you want to process them in a loop. |
|
50 * If day didn't had e.g. festival or solar term, KNullDesC is returned for those. |
|
51 */ |
|
52 IMPORT_C const TDesC& GetField( TField aField ); |
|
53 |
|
54 IMPORT_C const TDesC& Festival(); |
|
55 IMPORT_C const TDesC& SolarTerm(); |
|
56 IMPORT_C const TDesC& FullLunarDate(); |
|
57 IMPORT_C const TDesC& LunarYear(); |
|
58 IMPORT_C const TDesC& LunarMonthAndDay(); |
|
59 IMPORT_C const TDesC& AnimalYear(); |
|
60 IMPORT_C const TDesC& GregorianDate(); |
|
61 |
|
62 private: |
|
63 CCalenLunarLocalizedInfo(); |
|
64 |
|
65 void ConstructL(); |
|
66 |
|
67 private: |
|
68 |
|
69 TPtrC iFestival; |
|
70 TPtrC iSolarTerm; |
|
71 TPtrC iAnimalYear; |
|
72 |
|
73 TBuf<50> iLunarYear; |
|
74 TBuf<50> iLunarMonthAndDay; |
|
75 TBuf<50> iFullLunarDate; |
|
76 TBuf<50> iGregorianDate; |
|
77 private: |
|
78 friend class CCalenLunarLocalizer; |
|
79 friend class CCalenLunarVietnameseLocalizer; |
|
80 }; |
|
81 |
|
82 #endif // __CALENLUNARLOCALIZEDINFO_H__ |