bluetoothengine/bteng/btengconnman/inc/btengpairinghandler.h
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
child 61 269724087bed
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
     1 /*
       
     2 * Copyright (c) 2010 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:  Bluetooth Engine API for connection management functionality.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef BTENGPAIRINGHANDLER_H
       
    19 #define BTENGPAIRINGHANDLER_H
       
    20 
       
    21 #include <btnotifclient.h>
       
    22 #include <btmanclient.h>
       
    23 
       
    24 #include "btengactive.h"
       
    25 
       
    26 class CBTEngConnMan;
       
    27 class MBTEngConnObserver;
       
    28 
       
    29 
       
    30 /**
       
    31  *  ?one_line_short_description
       
    32  *
       
    33  *  ?more_complete_description
       
    34  *
       
    35  *  @lib ?library
       
    36  *  @since S60 v3.2
       
    37  */
       
    38 NONSHARABLE_CLASS( CBTEngPairingHandler ) : public CBase, public MBTEngActiveObserver
       
    39     {
       
    40 
       
    41 public:
       
    42 
       
    43     /**
       
    44      * Two-phase constructor
       
    45      */
       
    46     static CBTEngPairingHandler* NewL( MBTEngConnObserver* aObserver, 
       
    47                                         CBTEngConnMan* aParent );
       
    48 
       
    49     /**
       
    50      * Destructor
       
    51      */
       
    52     virtual ~CBTEngPairingHandler();
       
    53 
       
    54     /**
       
    55      * ?description
       
    56      *
       
    57      * @since S60 v3.2
       
    58      * @param ?arg1 ?description
       
    59      * @param ?arg2 ?description
       
    60      * @return ?description
       
    61      */
       
    62     void StartPairingL( const TBTDevAddr& aAddr, TBTDeviceClass& aDeviceClass );
       
    63 
       
    64     /**
       
    65      * ?description
       
    66      *
       
    67      * @since S60 v3.2
       
    68      * @param ?arg1 ?description
       
    69      * @param ?arg2 ?description
       
    70      * @return ?description
       
    71      */
       
    72     void CancelPairing();   
       
    73 
       
    74 // from base class MBTEngActiveObserver
       
    75 
       
    76     /**
       
    77      * From MBTEngActiveObserver.
       
    78      * ?description
       
    79      *
       
    80      * @since S60 v3.2
       
    81      * @param ?arg1 ?description
       
    82      */
       
    83     virtual void RequestCompletedL( CBTEngActive* aActive, 
       
    84                                     TInt aStatus );
       
    85 
       
    86     /**
       
    87      * Callback for handling cancelation of an outstanding request.
       
    88      *
       
    89      * @param aId The ID that identifies the outstanding request.
       
    90      */
       
    91     virtual void CancelRequest( TInt aRequestId );
       
    92     
       
    93     /**
       
    94      * From MBTEngActiveObserver.
       
    95      * ?description
       
    96      *
       
    97      * @since S60 v3.2
       
    98      * @param ?arg1 ?description
       
    99      */
       
   100     virtual void HandleError( CBTEngActive* aActive, 
       
   101                                     TInt aError );
       
   102 
       
   103 private:
       
   104 
       
   105     /**
       
   106      * C++ default constructor
       
   107      */
       
   108     CBTEngPairingHandler( MBTEngConnObserver* aObserver, 
       
   109                            CBTEngConnMan* aParent );
       
   110 
       
   111     /**
       
   112      * Symbian 2nd-phase constructor
       
   113      */
       
   114     void ConstructL();
       
   115 
       
   116 private: // data
       
   117 
       
   118     /**
       
   119      * the address of the remote device to be paired.
       
   120      */
       
   121     TBTDevAddrPckgBuf iAddr;
       
   122     
       
   123     /**
       
   124      * the class of device value of the remote device to be paired.
       
   125      */
       
   126     TBTDeviceClass iCod; 
       
   127 
       
   128     /**
       
   129      * the session to notifier which handles the actual pairing operation.
       
   130      * Own.
       
   131      */
       
   132     RBTNotifier iBtNotifier;
       
   133 
       
   134     /**
       
   135      * Active object for pairing request
       
   136      * Own.
       
   137      */
       
   138     CBTEngActive* iActive;
       
   139 
       
   140     /**
       
   141      * the observer that receives the result of pairing operation.
       
   142      * Not own.
       
   143      */
       
   144     MBTEngConnObserver* iObserver;
       
   145 
       
   146     /**
       
   147      * ?description_of_pointer_member
       
   148      * Not own.
       
   149      */
       
   150     CBTEngConnMan* iParent;
       
   151 
       
   152     };
       
   153 
       
   154 
       
   155 #endif // BTENGPAIRINGHANDLER_H