diff -r 42814f902fe6 -r 38571fd2a704 pimappsupport/chinesecalendaralg/originaltsrc/ConvertDates.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pimappsupport/chinesecalendaralg/originaltsrc/ConvertDates.h Fri Mar 12 15:42:35 2010 +0200 @@ -0,0 +1,77 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CONVERTDATES_H__ +#define __CONVERTDATES_H__ + +// System includes +#include +#include +#include +#include +#include "calconv.h" + +// Constants +const TInt KDateLen = 60; + +// Enumerations +enum TCalTypes + { + EGreg, + EHebr, + EChin + }; + +// Classes +class CConvertDates : public CBase + { +public: + static CConvertDates* NewLC(); + static CConvertDates* NewL(); + ~CConvertDates(); + +private: + void ConstructL(); + +public: + void ConvertL(); + +private: + void Cal1ToCal2() const; + void GetCalL(TDes8& aDateToConvert); + void SetCalL(TDes8& aDate); + void OpenFilesL(); + TInt ReadLine(); + +private: + TCalTypes iCalTypeFrom; + TCalTypes iCalTypeTo; + TArithmeticalDate iArithDateOut; + TArithmeticalDate iArithDateIn; + TChineseDate iChinDateOut; + TChineseDate iChinDateIn; + TGregorianCalendar iGreg; + TChineseCalendar iChin; + + RFs iRFSession; + RFile iInputFile; + RFile iOutputFile; + + RFileLogger iLogger; + + TBuf8 iDateLine; + }; + +#endif