bluetoothengine/btaudioman/inc/BTAccFwIf.h
changeset 0 f63038272f30
equal deleted inserted replaced
-1:000000000000 0:f63038272f30
       
     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 *  Version     : %version:  3.2.3 %
       
    12 *
       
    13 * Contributors:
       
    14 *
       
    15 * Description:  An abstract class implemented by classes which are communicating 
       
    16 *                with Accessory Fw or DOS 
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef BTACC_FW_IF_H
       
    22 #define BTACC_FW_IF_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <AccessoryTypes.h> // TAccAudioType
       
    26 
       
    27 // FORWARD DECLARATION
       
    28 class TAccInfo;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  CBTSession class represent session on server side
       
    34 *
       
    35 */
       
    36 NONSHARABLE_CLASS(CBasrvAccfwIf) : public CBase
       
    37     {
       
    38  
       
    39     public: // New Functions
       
    40 
       
    41          /**
       
    42         * Constructor.        
       
    43         */
       
    44         static CBasrvAccfwIf* NewL(const TAccInfo* aInfo = NULL); 
       
    45 
       
    46          /**
       
    47         * Informs the class that there is a request pending.
       
    48         * @param    aUse True if a request is pending, false otherwise.
       
    49         * return     None.
       
    50         */
       
    51         virtual void CompleteReq(TBool aUse) = 0;
       
    52     
       
    53         /**
       
    54         * Request Accessory Framework to attach accessory
       
    55         * @param    aBDAddr BT Device Address of accessory to be attached
       
    56         * @param     aStatus Success status of the operation.
       
    57         * return     success code of request to attach accessory
       
    58         */
       
    59         virtual void AttachAccessory(const TBTDevAddr& aBDAddr, TRequestStatus& aStatus) = 0;
       
    60         
       
    61         /**
       
    62         * Request Accessory Framework to cancel attach accessory
       
    63         * @param    aBDAddr BT Device Address of accessory to be attached
       
    64         * return     success code of request to attach accessory
       
    65         */
       
    66         virtual void CancelAttachAccessory(const TBTDevAddr& aBDAddr)= 0;
       
    67         
       
    68         /**
       
    69         * Request Accessory Framework to detatch accessory
       
    70         * @param    aBDAddr BT Device Address of accessory to be attached
       
    71         * @param     aStatus Success status of the operation.
       
    72         * return     None.
       
    73         */
       
    74         virtual void DetatchAccessory(const TBTDevAddr& aBDAddr, TRequestStatus& aStatus)= 0;
       
    75         
       
    76         /**
       
    77         * Register for notification when audio link is required to be opened.
       
    78         * @param aStatus                Success status of the operation.
       
    79         * @return                       None.
       
    80         */
       
    81           virtual void NotifyBTAudioLinkOpenReq(TBTDevAddr& aBDAddress, TRequestStatus& aStatus, TAccAudioType& aType )= 0;
       
    82 
       
    83         /**
       
    84         * Register for notification when audio link is required to be closed.
       
    85         * @param aStatus                Success status of the operation.
       
    86         * @return                       None.
       
    87         */
       
    88         virtual void NotifyBTAudioLinkCloseReq(TBTDevAddr& aBDAdress, TRequestStatus& aStatus, TAccAudioType& aType )= 0; 
       
    89 
       
    90         /**
       
    91         * Cancel registeration for notification when audio link is required to be opened.
       
    92         * @param aStatus                Success status of the operation.
       
    93         * @return                       None.
       
    94         */
       
    95           virtual void CancelNotifyBTAudioLinkOpenReq()= 0;
       
    96 
       
    97         /**
       
    98         * Cancel registeration for notification when audio link is required to be closed.
       
    99         * @param aStatus                Success status of the operation.
       
   100         * @return                       None.
       
   101         */
       
   102         virtual void CancelNotifyBTAudioLinkCloseReq()= 0; 
       
   103 
       
   104         /**
       
   105         * Informs that the audio connection open operation has completed.
       
   106         * @param aStatus                Success status of the operation.
       
   107         * @return                       None.
       
   108         */
       
   109         virtual void AudioConnectionOpenCompleteL( const TBTDevAddr& aBDAddress,
       
   110                                           TInt aResp, TInt aLatency = 0 )= 0;
       
   111 
       
   112         /**
       
   113         * Informs that the audio connection close operation has completed.
       
   114         * @param aStatus                Success status of the operation.
       
   115         * @return                       None.
       
   116         */
       
   117         virtual void AudioConnectionCloseCompleteL( const TBTDevAddr& aBDAddress, 
       
   118                                             TInt aResp )= 0;
       
   119 
       
   120         /**
       
   121         * Notifies the DOS that an audio connection to the currently connected
       
   122         * accessory has been opened.
       
   123         * @param aBDAddress             BT hardware address of the accessory.
       
   124         * @return                       None.
       
   125         */
       
   126         virtual void NotifyAudioLinkOpenL( const TBTDevAddr& aBDAddress, TAccAudioType aType )= 0;
       
   127 
       
   128         /**
       
   129         * Notifies the DOS that the audio connection to the currently connected
       
   130         * accessory has been closed.
       
   131         * @param aBDAddress             BT hardware address of the accessory.
       
   132         * @return                       None.
       
   133         */
       
   134         virtual void NotifyAudioLinkCloseL( const TBTDevAddr& aBDAddress, TAccAudioType aType )= 0;
       
   135        
       
   136   
       
   137         /**
       
   138         * Requests Accessory Framework or Dos to disable NREC
       
   139         * @param aBDAddress             BT hardware address of the accessory.
       
   140         * @return                       None.
       
   141         */
       
   142         virtual TInt DisableNREC(const TBTDevAddr& aBDAddress) = 0; 
       
   143     };
       
   144     
       
   145 #endif