equal
deleted
inserted
replaced
|
1 // Copyright (c) 2000-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 __CONVERTDATES_H__ |
|
17 #define __CONVERTDATES_H__ |
|
18 |
|
19 // System includes |
|
20 #include <e32base.h> |
|
21 #include <s32strm.h> |
|
22 #include <f32file.h> |
|
23 #include <flogger.h> |
|
24 #include "calconv.h" |
|
25 |
|
26 // Constants |
|
27 const TInt KDateLen = 60; |
|
28 |
|
29 // Enumerations |
|
30 enum TCalTypes |
|
31 { |
|
32 EGreg, |
|
33 EHebr, |
|
34 EChin |
|
35 }; |
|
36 |
|
37 // Classes |
|
38 class CConvertDates : public CBase |
|
39 { |
|
40 public: |
|
41 static CConvertDates* NewLC(); |
|
42 static CConvertDates* NewL(); |
|
43 ~CConvertDates(); |
|
44 |
|
45 private: |
|
46 void ConstructL(); |
|
47 |
|
48 public: |
|
49 void ConvertL(); |
|
50 |
|
51 private: |
|
52 void Cal1ToCal2() const; |
|
53 void GetCalL(TDes8& aDateToConvert); |
|
54 void SetCalL(TDes8& aDate); |
|
55 void OpenFilesL(); |
|
56 TInt ReadLine(); |
|
57 |
|
58 private: |
|
59 TCalTypes iCalTypeFrom; |
|
60 TCalTypes iCalTypeTo; |
|
61 TArithmeticalDate iArithDateOut; |
|
62 TArithmeticalDate iArithDateIn; |
|
63 TChineseDate iChinDateOut; |
|
64 TChineseDate iChinDateIn; |
|
65 TGregorianCalendar iGreg; |
|
66 TChineseCalendar iChin; |
|
67 |
|
68 RFs iRFSession; |
|
69 RFile iInputFile; |
|
70 RFile iOutputFile; |
|
71 |
|
72 RFileLogger iLogger; |
|
73 |
|
74 TBuf8<KDateLen> iDateLine; |
|
75 }; |
|
76 |
|
77 #endif |