accessoryservices/pluggeddisplay/pluggeddisplayengine/inc/pdefsm.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: Finite State Machine's body interface for Plugged Display Engine.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef M_PDEFSM_H
       
    19 #define M_PDEFSM_H
       
    20 
       
    21 
       
    22 //#include <e32def.h>
       
    23 //#include <e32cmn.h> 
       
    24 #include <e32def.h>
       
    25 #include "multifinitestatemachine.h"
       
    26 #include <AsyCmdTypes.h>
       
    27 #include <AsyCommandHandlerBase.h>
       
    28 
       
    29 
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class MPDAsyCmdHandler;
       
    33 
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38  *  Finite State Machine's body interface for Plugged Display Engine.
       
    39  *
       
    40  *  This callback interface has to be implemented by FSM body
       
    41  *  implementation class.
       
    42  *  @code
       
    43  *   ?good_class_usage_example(s)
       
    44  *  @endcode
       
    45  *
       
    46  *  @lib none.
       
    47  *  @since TB 9.2
       
    48  */
       
    49 NONSHARABLE_CLASS( MPdeFSM ) : public MFSMForBody
       
    50     {
       
    51 public:
       
    52     virtual ~MPdeFSM() {} // Destructor needed for ownership transfer
       
    53 
       
    54 
       
    55     /**
       
    56      * Process a command received from the Accessory FW.
       
    57      * Process command handled will be replied through the MPDAsyCmdHandler
       
    58      * interface when the command is fully handled.
       
    59      * 
       
    60      * @since TB9.2
       
    61      * @param aCommand Command to be processed.
       
    62      * @param aCmdParams Command parameters.
       
    63      * @param aAsyCmdHandler Call back interface to process command response.
       
    64      * @return TBool ETrue if command belonged to called FSM.
       
    65      */
       
    66     virtual TBool ProcessCommandL( 
       
    67             const TProcessCmdId aCommand,
       
    68             const TASYCmdParams& aCmdParams,
       
    69             MPDAsyCmdHandler& aAsyCmdHandler 
       
    70             ) = 0;
       
    71 
       
    72     /**
       
    73      * Get the Generic ID of connected accessory.
       
    74      * 
       
    75      * @since TB9.2
       
    76      * @param aAccPolGenericID Object where to copy actual values.
       
    77      * @return Error code. KErrNotFound if don't exist.
       
    78      */
       
    79     virtual TInt GetAccPolGenericID( TAccPolGenericID& aAccPolGenericID ) = 0;
       
    80 
       
    81     };
       
    82 
       
    83 
       
    84 #endif // M_PDEFSM_H