idlefw/inc/framework/aipluginstate.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Plugin state main class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_AIPLUGINSTATE_H
       
    20 #define M_AIPLUGINSTATE_H
       
    21 
       
    22 #include "aipluginstatemachine.h"
       
    23 
       
    24 /**
       
    25  * Plugin state interface.
       
    26  * 
       
    27  *  @lib aifw
       
    28  *  @since S60 3.2
       
    29  */
       
    30 class MAiPluginState
       
    31     {
       
    32 public:
       
    33     
       
    34     /**
       
    35      * This method is called when state is entered.
       
    36      * 
       
    37      * @param aStateMachine reference to the owning state machine.
       
    38      * @param aStateChange the system state variable change that caused this 
       
    39      *        state change.
       
    40      */
       
    41     virtual void Enter( MAiPluginStateMachine& aStateMachine,
       
    42                         TAiStateChanges aStateChange ) = 0;
       
    43     
       
    44     /**
       
    45      * This method handles system state variable state changes
       
    46      * handles events in the current state.
       
    47      * 
       
    48      * @param aStateMachine reference to the owning state machine.
       
    49      * @param aStateChange the system state variable change that is the cause
       
    50      *        of this event.
       
    51      * @return TBool did the state handle the event.
       
    52      */
       
    53     virtual TBool HandleEvent( MAiPluginStateMachine& aStateMachine,
       
    54                               TAiStateChanges aStateChange ) = 0;
       
    55     
       
    56     /**
       
    57      * This method is called when state is exited.
       
    58      * 
       
    59      * @param aStateMachine reference to the owning state machine.
       
    60      * @param aStateChange the system state variable change that caused this 
       
    61      *        state change.
       
    62      */
       
    63     virtual void Exit( MAiPluginStateMachine& aStateMachine,
       
    64                        TAiStateChanges aStateChange ) = 0;
       
    65 
       
    66 protected:
       
    67 
       
    68     ~MAiPluginState()
       
    69         {
       
    70         };
       
    71     
       
    72     };
       
    73 
       
    74 #endif // M_AIPLUGINSTATE_H