systemswstubs/asyreference/inc/ASYReferenceCmdHandlerBase.h
changeset 43 e71858845f73
parent 40 b7e5ed8c1342
child 46 e1758cbb96ac
equal deleted inserted replaced
40:b7e5ed8c1342 43:e71858845f73
     1 /*
       
     2 * Copyright (c) 2002-2004 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:  Used as an reference implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CASYREFERENCECMDHANDLERBASE_H
       
    20 #define CASYREFERENCECMDHANDLERBASE_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <AsyCommandHandlerBase.h>
       
    24 #include "ASYAdaptation.h"
       
    25 #include "ASYmessage.h"
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // DATA TYPES
       
    32 
       
    33 // FUNCTION PROTOTYPES
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 //class CSACSession;
       
    37 class CASYReferenceMainServiceBase;
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42 *  CSACAccessoryCommandHandler
       
    43 *  This class declarates the CSACAccessoryCommandHandler
       
    44 */
       
    45 
       
    46 class CASYReferenceCmdHandlerBase : public CASYCommandHandlerBase, public MASYAdaptation
       
    47     {
       
    48     public: // constructor and destructor
       
    49 
       
    50         /**
       
    51         * Constructor
       
    52         */
       
    53         static CASYReferenceCmdHandlerBase* NewL();
       
    54 
       
    55         /**
       
    56         * Destructor.
       
    57         */
       
    58         virtual ~CASYReferenceCmdHandlerBase();
       
    59 
       
    60     private: // constuctors
       
    61 
       
    62         /**
       
    63         * C++ constructor.
       
    64         */
       
    65         CASYReferenceCmdHandlerBase();
       
    66 
       
    67         /**
       
    68         * 2nd phase constructor.
       
    69         */
       
    70         void ConstructL();
       
    71 
       
    72          /**
       
    73         * Maps ASY command parameter to internal accessory feature
       
    74         * @param aCommandParamRecord    Accessory Server parameter
       
    75         * @param aAccessoryFeature      Internal accessory feature
       
    76         */
       
    77         void MapCommandToAccessoryFeatureL( const TASYCommandParamRecord& aCommandParamRecord, 
       
    78                                             AccessoryFeature::TAccessoryFeature& aAccessoryFeature );
       
    79 
       
    80     private: // functions from base classes
       
    81     
       
    82         /**
       
    83         * From CASYCommandHandlerBase
       
    84         * Processes command from Accessory FW
       
    85         * @param aCommand               Command
       
    86         * @param aCmdParams             Parameters
       
    87         * @return none
       
    88         */
       
    89         void ProcessCommandL( const TProcessCmdId aCommand, const TASYCmdParams& aCmdParams );
       
    90         
       
    91     private: // functions from base classes
       
    92 
       
    93         /**
       
    94         * From MASYAdaptation
       
    95         * Indicates ASY about received response message
       
    96         * @param aMessage              Reference to a received message
       
    97         * @return                      none
       
    98         */
       
    99         void ProcessResponseL( TASYMessage& aMessage );
       
   100 
       
   101         /**
       
   102         * From MASYAdaptation
       
   103         * Indicates ASY about received error response message
       
   104         * @param aErrorCode             Error code for current message
       
   105         * @param aMessage               Reference to a received message
       
   106         * @return none
       
   107         */
       
   108         void ProcessErrorResponseL( TInt aErrorCode, TASYMessage& aMessage );
       
   109         
       
   110         /**
       
   111         * From MASYAdaptation
       
   112         * Indicates ASY about received accessory event message
       
   113         * @param aMessage               Reference to a received message
       
   114         * @return none
       
   115         */
       
   116         void RaiseEventL( TASYMessage& aMessage );
       
   117 
       
   118     private: // data
       
   119                 
       
   120     };
       
   121 
       
   122 #endif //CASYREFERENCECMDHANDLERBASE_H
       
   123             
       
   124 // End of File
       
   125