calendarui/controller/inc/calenactionui.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 14:57:40 +0300
changeset 18 c198609911f9
parent 0 f979ecb2b13e
child 55 2c54b51f39c4
permissions -rw-r--r--
Revision: 201011 Kit: 201015

/*
* Copyright (c) 2007 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:  Calendar controller
*
*/


#ifndef CALENACTIONUI_H
#define CALENACTIONUI_H

// INCLUDES
#include <e32base.h>
#include "hb_calencommands.hrh"
#include "calencommandhandler.h"

// FORWARD DECLARATIONS
class CCalenController;
class CalenDeleteUi;
class CCalenEditUi;
class MCalenCommandHandler;

// CLASS DEFINITIONS

/**
 * The action ui handles events passed from the controller and delegates
 * them to the appropriate place (i.e. the specific action ui classes).
 */
class CCalenActionUi : public CBase,
                       public MCalenCommandHandler
    {
    public:  // Construction and destruction
        /**
         * 1st phase constructor
         * @param aController A reference to CCalenController
         */
        static CCalenActionUi* NewL( CCalenController& aController );
        
        /**
         * Virtual destructor
         */
        virtual ~CCalenActionUi();

    public: // MCalenCommandHandler
        TBool HandleCommandL( const TCalenCommand& aCommand );

    public:  // New functions
        
        /**
         * Gets a command handler or NULL.
         */
        MCalenCommandHandler* GetCommandHandlerL( TInt aCommand );

    private:  // Construction and destruction
        /**
         * C++ constructor, non-leaving
         * @param aController A reference to the CCalenController
         */
        CCalenActionUi( CCalenController& aController );
        
        /**
         * 2nd phase constructor
         */
        void ConstructL();
        
        /**
         * Launches the settings view
         */
        void launchSettingsView();
   

    private:  // Data
        CalenDeleteUi*             iDeleteUi;     // pointer to the deleteui
        CCalenEditUi*                iEditUi;         // pointer to the seditui       
        CCalenController&           iController;    // reference to the CCalenController
    };

#endif // CALENACTIONUI_H

// End of file