accessoryservices/pluggeddisplay/pluggeddisplayengine/inc/hdmicablestaterejected.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2009 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:  HDMI Cable Status FSM's "Rejected" state.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_HDMICABLESTATEREJECTED_H
       
    20 #define C_HDMICABLESTATEREJECTED_H
       
    21 
       
    22 
       
    23 #include "multifinitestatemachine.h"
       
    24 
       
    25 
       
    26 class CTVOutConfigForHDMI;
       
    27 class CEDIDHandler;
       
    28 
       
    29 
       
    30 
       
    31 /**
       
    32  * "Rejected" state implementation for HDMI Cable Status FSM.
       
    33  * HDMI Cable connection has been failed for reason or another
       
    34  * and user action to disconnect the cable is waited in this state.
       
    35  *
       
    36  *  @code
       
    37  *   ?good_class_usage_example(s)
       
    38  *  @endcode
       
    39  *
       
    40  *  @lib none.
       
    41  *  @since TB 9.2
       
    42  */
       
    43 NONSHARABLE_CLASS( CHDMICableStateRejected ): public CBase, public MFSMState
       
    44     {
       
    45 
       
    46 
       
    47 public:
       
    48 
       
    49     
       
    50     /**
       
    51      * Two-phased constructor.
       
    52      * @param aFSMForState Finite State Machine interface for State.
       
    53      * @param aTVOutConfigForHDMI TV Out Configurer.
       
    54      * @param aEDIDHandler EDID Handler object.
       
    55      */
       
    56     static CHDMICableStateRejected* NewL(
       
    57             MFSMForState& aFSMForState, 
       
    58             CTVOutConfigForHDMI& aTVOutConfigForHDMI,
       
    59             CEDIDHandler& aEDIDHandler );
       
    60     
       
    61 
       
    62     /**
       
    63     * Destructor.
       
    64     */
       
    65     virtual ~CHDMICableStateRejected();
       
    66 
       
    67     
       
    68 // from base class MFSMState
       
    69 
       
    70 
       
    71     /**
       
    72      * From MFSMState.
       
    73      * Function is called when entering the state. State can perform
       
    74      * necessary entry actions if any.
       
    75      *
       
    76      * @since TB 9.2
       
    77      * @param none. 
       
    78      * @return aFSMBody Interface pointer of a FSM body.
       
    79      */
       
    80     virtual void Enter();
       
    81 
       
    82     /**
       
    83      * From MFSMState.
       
    84      * Function is called by FSM Body whenever an event that might have 
       
    85      * impact on the state has been fired. Implementation has to found
       
    86      * out what event has occurred and decide whether it enforces
       
    87      * transition to another state.
       
    88      *
       
    89      * @since TB 9.2
       
    90      * @param aInterfaceId Interface identification.
       
    91      * @param aEvent Event identification.
       
    92      * @return none.
       
    93      */
       
    94     virtual void Input(
       
    95             TFSMInterfaceId aInterfaceId ,
       
    96             TFSMEventId aEvent );
       
    97 
       
    98     /**
       
    99      * From MFSMState.
       
   100      * Function returns state's identification.
       
   101      *
       
   102      * @since TB 9.2
       
   103      * @param none. 
       
   104      * @return TFSMState State's identification.
       
   105      */
       
   106     virtual TFSMState Id();
       
   107 
       
   108     /**
       
   109      * From MFSMState.
       
   110      * Function returns state's name.
       
   111      *
       
   112      * @since TB 9.2
       
   113      * @param none. 
       
   114      * @return TPtrC Name of the state.
       
   115      */
       
   116     virtual TPtrC Name();
       
   117 
       
   118     /**
       
   119      * Function returns substate's identification.
       
   120      *
       
   121      * @since TB 9.2
       
   122      * @param none. 
       
   123      * @return TFSMState Substate's identification.
       
   124      */
       
   125     virtual TFSMState SubId();
       
   126     
       
   127     
       
   128 protected:
       
   129 
       
   130 
       
   131 private:
       
   132 
       
   133 
       
   134     /**
       
   135      * C++ default constructor.
       
   136      * @param aFSMForState Finite State Machine interface for State.
       
   137      * @param aTVOutConfigForHDMI TV Out Configurer.
       
   138      * @param aEDIDHandler EDID Handler object.
       
   139      */
       
   140     CHDMICableStateRejected(
       
   141             MFSMForState& aFSMForState, 
       
   142             CTVOutConfigForHDMI& aTVOutConfigForHDMI,
       
   143             CEDIDHandler& aEDIDHandler );
       
   144 
       
   145     /**
       
   146      * By default Symbian OS constructor is private.
       
   147      */
       
   148     void ConstructL();
       
   149 
       
   150 private: // data
       
   151 
       
   152     enum TSubState
       
   153       {
       
   154       ESubStateUndefined = 0
       
   155       };
       
   156 
       
   157     /**
       
   158      * FSM.
       
   159      * Not own.
       
   160      */
       
   161     MFSMForState& iFSMForState;
       
   162     
       
   163     /**
       
   164      * TV Out Configurer.
       
   165      * Not own.
       
   166      */
       
   167     CTVOutConfigForHDMI& iTVOutConfigForHDMI;
       
   168 
       
   169     /**
       
   170      * EDID data Handler.
       
   171      * Not own.
       
   172      */
       
   173     CEDIDHandler& iEDIDHandler;
       
   174 
       
   175 
       
   176     // Substate
       
   177     TSubState iSubState;
       
   178 
       
   179     };
       
   180 
       
   181 #endif // C_HDMICABLESTATEREJECTED_H