calendarui/commonutils/inc/KoreanCalConv.h
branchRCL_3
changeset 74 97232defd20e
equal deleted inserted replaced
66:bd7edf625bdd 74:97232defd20e
       
     1 /*
       
     2 * Copyright (c) 2010 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __KOREANCALCONV_H__
       
    19 #define __KOREANCALCONV_H__
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <CalendarConverter.h>
       
    23 
       
    24 typedef class TChineseDate TKoreanDate;
       
    25  
       
    26 
       
    27  enum TLunarCalendarType
       
    28      {
       
    29      ESolar = 0,
       
    30      ELunar,
       
    31      ELunarLeap
       
    32      };
       
    33 	 
       
    34 class CKoreanCalConv : public CBase
       
    35 {
       
    36     public: /* exported public methods */
       
    37         /* Construction methods */
       
    38     	IMPORT_C static CKoreanCalConv* NewL();
       
    39     	IMPORT_C static CKoreanCalConv* NewLC();
       
    40 
       
    41         /* Method converting gregorian date to korean lunar date,
       
    42            supported range is 1.1.1900 - 31.12.2099
       
    43            Leaves with KErrArgument if date is uncovertible.
       
    44         */
       
    45         IMPORT_C void DateTimeToKoreanL( const TDateTime& aDateTime, TKoreanDate& aKoreanDate );
       
    46 
       
    47         /* Method converting korean lunar date to gregorian date,
       
    48            supported range is 1.1.1900 - 31.12.2099
       
    49            Leaves with KErrArgument if date is uncovertible.
       
    50         */
       
    51         IMPORT_C void KoreanToDateTimeL( TKoreanDate& aKoreanDate, TDateTime& aDateTime );
       
    52 
       
    53         /* Method getting supported gregorian date range
       
    54         */
       
    55         IMPORT_C void DateRange( TDateTime& aLower, TDateTime& aUpper );
       
    56 
       
    57         /* Method getting supported korean lunar date range
       
    58         */
       
    59         IMPORT_C void DateRange( TKoreanDate& aLower, TKoreanDate& aUpper );
       
    60 
       
    61     public: /* public methods */
       
    62         /* Desctructor */
       
    63     	virtual ~CKoreanCalConv();
       
    64 
       
    65     private: /* private methods */
       
    66         /* C++ constructor */
       
    67         CKoreanCalConv();
       
    68 
       
    69         /* Second phase constructor */
       
    70         void ConstructL();
       
    71 
       
    72     private: /* Own private data */
       
    73         CChineseCalendarConverter* chineseConv;
       
    74 
       
    75 };
       
    76 
       
    77 #endif /* __KOREANCALCONV_H__ */