bluetoothengine/headsetsimulator/profiles/hspprofile/inc/features/hspfeaturecommons.h
branchheadsetsimulator
changeset 60 90dbfc0435e3
equal deleted inserted replaced
59:02103bf20ee5 60:90dbfc0435e3
       
     1 /* 
       
     2  *
       
     3  * Copyright (c) <2010> Comarch S.A. and/or its subsidiary(-ies).
       
     4  * All rights reserved.
       
     5  * This component and the accompanying materials are made available
       
     6  * under the terms of the License "Eclipse Public License v1.0"
       
     7  * which accompanies this distribution, and is available
       
     8  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9  *
       
    10  * Original Contributors:
       
    11  * Comarch S.A. - original contribution.
       
    12  *
       
    13  * Contributors:
       
    14  *
       
    15  * Description:
       
    16  *
       
    17  */
       
    18 
       
    19 #ifndef HSPFEATURECOMMONS_H_
       
    20 #define HSPFEATURECOMMONS_H_
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CHsHSPCommand;
       
    25 
       
    26 /** Profile's procedures */
       
    27 enum THSPProcedure
       
    28 {
       
    29     /** Voice call termination */
       
    30     EHSPCallTerminate,
       
    31     /** Voice call acceptance */
       
    32     EHSPCallAccept,
       
    33     /** Remote volume control */
       
    34     EHSPVolumeControl,
       
    35     /** Other state */
       
    36     EHSPIdle
       
    37 };
       
    38 
       
    39 /**
       
    40  * @brief Observer for feature's classes
       
    41  */
       
    42 class MHsHSPFeatureProviderObserver
       
    43 {
       
    44 public:
       
    45     /**
       
    46      * Callback method indicates that procedure is finished
       
    47      * 
       
    48      * @param aErr KErrNone if procedure finishes successfully, 
       
    49      *        otherwise one of the system-wide error codes
       
    50      * @param aProcedure type of procedure
       
    51      */
       
    52     virtual void HandleProcedureCompleted( TInt aErr,
       
    53             const THSPProcedure aProcedure ) = 0
       
    54 };
       
    55 
       
    56 /**
       
    57  * @brief Abstract class for particular features 
       
    58  */
       
    59 class MHsHSPProcedureCommons
       
    60 {
       
    61 public:
       
    62 
       
    63     /**
       
    64      * Processes AT command and prepares response
       
    65      * 
       
    66      * @param aInputCmd input AT command
       
    67      * @param aOutputCmd response
       
    68      * @return KErrNone if successful, otherwise one of the system-wide error
       
    69      *         codes
       
    70      */
       
    71     virtual TInt ProcessCommand( const CHsHSPCommand* aInputCmd,
       
    72             CHsHSPCommand &aOutputCmd ) = 0;
       
    73 };
       
    74 
       
    75 #endif /* HSPFEATURECOMMONS_H_ */