calendarui/regionalplugins/KoreanLunar/inc/CalenLunarLocalizedInfo.h
branchRCL_3
changeset 74 97232defd20e
equal deleted inserted replaced
66:bd7edf625bdd 74:97232defd20e
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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 : Class looking after alarm fields for forms.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CALENLUNARLOCALIZEDINFO_H__
       
    19 #define __CALENLUNARLOCALIZEDINFO_H__
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 
       
    24 // FORWARD DECLARATION
       
    25 class CCalenLunarLocalizer;
       
    26 
       
    27 /**
       
    28 * Class declaration for Lunar localized info
       
    29 */ 
       
    30 class CCalenLunarLocalizedInfo : public CBase
       
    31     {
       
    32 public:
       
    33     enum TField
       
    34         {
       
    35         ELunarFestival,
       
    36         ESolarFestival,
       
    37         ESolarTerm,
       
    38         ELunarMonthAndDay,
       
    39         EGregorianDate
       
    40         };
       
    41 
       
    42 
       
    43 public: // public API
       
    44     static CCalenLunarLocalizedInfo* NewL();
       
    45 
       
    46     virtual ~CCalenLunarLocalizedInfo();
       
    47 
       
    48     /**
       
    49      * Get specific field. This is useful, when you have ordered array of TFields
       
    50      * and you want to process them in a loop.
       
    51      * If day didn't had e.g. festival or solar term, KNullDesC is returned for those.
       
    52      */
       
    53     const TDesC& GetField( TField aField );
       
    54 
       
    55     const TDesC& LunarFestival() { return iLunarFestival; }
       
    56     const TDesC& SolarFestival() { return iSolarFestival; }
       
    57     const TDesC& SolarTerm() { return iSolarTerm; }
       
    58     const TDesC& LunarMonthAndDay() { return iLunarMonthAndDay; }
       
    59     const TDesC& GregorianDate() { return iGregorianDate; }
       
    60 
       
    61 private:
       
    62     CCalenLunarLocalizedInfo();
       
    63 
       
    64     void ConstructL();
       
    65 
       
    66 private:
       
    67 
       
    68     TPtrC iLunarFestival;
       
    69     TPtrC iSolarFestival;
       
    70     TPtrC iSolarTerm;
       
    71 
       
    72     TBuf<50> iLunarMonthAndDay;
       
    73     TBuf<50> iGregorianDate;
       
    74 private:
       
    75     friend class CCalenLunarLocalizer;
       
    76     };
       
    77 
       
    78 #endif // __CALENLUNARLOCALIZEDINFO_H__