calendarui/controller/inc/calenviewpopulator.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2007 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 view populator active object
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CALENVIEWPOPULATOR_H
       
    20 #define CALENVIEWPOPULATOR_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <calennotificationhandler.h>
       
    24 #include <calenview.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CCalenController;
       
    28 class CCalenGlobalData;
       
    29 
       
    30 // CLASS DEFINITIONS
       
    31 
       
    32 /**
       
    33  * View population active object
       
    34  */
       
    35 class CCalenViewPopulator : private CActive,
       
    36                                       public MCalenNotificationHandler
       
    37     {
       
    38     public:  // Construction and destruction
       
    39         /**
       
    40          * Symbian 1st phase constructor
       
    41          * @param aController Reference to the CCalenController
       
    42          * @return pointer to CCalenViewPopulator
       
    43          */
       
    44         static CCalenViewPopulator* NewL( CCalenController& aController );
       
    45         ~CCalenViewPopulator();
       
    46 
       
    47     public:  // New functions
       
    48         /**
       
    49          * Starts populating the given view
       
    50          * @param aView Pointer to CCalenView to be populated
       
    51          */
       
    52         void BeginPopulationL( CCalenView* aView );
       
    53         
       
    54         /**
       
    55          * Stops current population
       
    56          */
       
    57         void InterruptPopulationL();
       
    58 
       
    59     public: //  FromMCalenNotificationHandler
       
    60         /**
       
    61          * Calls back when the entry view or instance view has been created
       
    62          * @param aNotification Notfication to be handled
       
    63          */
       
    64         void HandleNotification(const TCalenNotification aNotification );
       
    65 
       
    66     protected:  // From CActive
       
    67         void RunL();
       
    68         void DoCancel();
       
    69 
       
    70     private:  // Construction and destruction
       
    71         /**
       
    72          * C++ Constructor
       
    73          * @param aController Reference to CCalenController
       
    74          */
       
    75         CCalenViewPopulator( CCalenController& aController );
       
    76         
       
    77         /**
       
    78          * Symbian 2nd phase contructor
       
    79          */
       
    80         void ConstructL();
       
    81 
       
    82     private:  // New functions
       
    83         /**
       
    84          * Leaving function that handles ECalenNotifyViewCreated
       
    85          */
       
    86         void HandleECalenNotifyViewCreatedL();
       
    87 
       
    88 
       
    89     private:  // Data
       
    90         CCalenView* iPopulatingView;                     // Not owned
       
    91         CCalenView::TNextPopulationStep iPopulationStep; // Stage of population
       
    92         CCalenController& iController;
       
    93         TBool iNeedsInstanceView;
       
    94         TBool iNeedsEntryView;
       
    95         CCalenGlobalData* iGlobalData;
       
    96     };
       
    97 
       
    98 #endif // CALENVIEWPOPULATOR_H
       
    99 
       
   100 // End of file