bluetoothengine/bthid/bthidserver/inc/btconnectionobserver.h
changeset 0 f63038272f30
child 9 a42ed326b458
equal deleted inserted replaced
-1:000000000000 0:f63038272f30
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Declares main application class.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __BTCONNECTIONOBSERVER_H__
       
    20 #define __BTCONNECTIONOBSERVER_H__
       
    21 
       
    22 /*!
       
    23  This class specifies the connection observer interface
       
    24  Used in conjunction with CBTHidConnection class
       
    25  */
       
    26 
       
    27 class MBTConnectionObserver
       
    28     {
       
    29 public:
       
    30 
       
    31     /*!
       
    32      Reports control data received from the HID device
       
    33      @param aConnID connection id
       
    34      @param aBuffer the data buffer
       
    35      */
       
    36     virtual void HandleControlData(TInt aConnID, const TDesC8& aBuffer) = 0;
       
    37 
       
    38     /*!
       
    39      Reports completion of a Set/Get command to the HID device for  commands that
       
    40      do not have a data response
       
    41      @param aConnID connection id
       
    42      @param aStatus command ack status code.
       
    43      */
       
    44     virtual void HandleCommandAck(TInt aConnID, TInt aStatus) = 0;
       
    45 
       
    46     /*!
       
    47      Reports interrupt data received from the HID device
       
    48      @param aConnID connection id
       
    49      @param aBuffer the data buffer
       
    50      */
       
    51     virtual void HandleInterruptData(TInt aConnID, const TDesC8& aBuffer) = 0;
       
    52 
       
    53     /*!
       
    54      Report a change in the connection status
       
    55      @param aConnID connection id
       
    56      @param aStatus KErrNone, or system error code.
       
    57      */
       
    58     virtual void FirstTimeConnectionComplete(TInt aConnID, TInt aStatus) = 0;
       
    59 
       
    60     /*!
       
    61      Reports that a connection has entered the link loss state
       
    62      @param aConnID connection id
       
    63      */
       
    64     virtual void LinkLost(TInt aConnID) = 0;
       
    65 
       
    66     /*!
       
    67      Reports that a connection has been re-established
       
    68      @param aConnID connection id
       
    69      */
       
    70     virtual void LinkRestored(TInt aConnID) = 0;
       
    71 
       
    72     /*!
       
    73      Reports that the Bluetooth Link has been intentionally disconnected
       
    74      @param aConnID connection id
       
    75      */
       
    76     virtual void Disconnected(TInt aConnID) = 0;
       
    77 
       
    78     /*!
       
    79      Reports that a connection has been unplugged
       
    80      @param aConnID connection id
       
    81      */
       
    82     virtual void Unplugged(TInt aConnID) = 0;
       
    83     };
       
    84 
       
    85 #endif // __BTCONNECTIONOBSERVER_H__