bluetoothengine/bteng/btengconnman/src/btengconnman.cpp
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
--- a/bluetoothengine/bteng/btengconnman/src/btengconnman.cpp	Tue Aug 31 15:25:10 2010 +0300
+++ b/bluetoothengine/bteng/btengconnman/src/btengconnman.cpp	Wed Sep 01 12:20:04 2010 +0100
@@ -23,7 +23,6 @@
 
 #include "btengconnman.h"
 #include "btengconnhandler.h"
-#include "btengpairinghandler.h"
 #include "debug.h"
 
 // ======== MEMBER FUNCTIONS ========
@@ -93,7 +92,6 @@
     {
     TRACE_FUNC_ENTRY
     delete iConnHandler;
-    delete iPairingHandler;
     }
 
 
@@ -226,20 +224,9 @@
 EXPORT_C TInt CBTEngConnMan::PairDevice( const TBTDevAddr& aAddr, TBTDeviceClass aDeviceClass )
     {
     TRACE_FUNC_ENTRY
-    TInt err = KErrNone;
-    if( !iPairingHandler )
-        {
-        TRAP( err, iPairingHandler = CBTEngPairingHandler::NewL( iObserver, this ) );
-        }
-    if( !err )
-        {
-        iPairingHandler->CancelPairing();
+    return  iConnHandler->StartPairing( aAddr, aDeviceClass );
+    }
 
-        TRAP( err, iPairingHandler->StartPairingL( aAddr, aDeviceClass ) );
-        }
-    TRACE_FUNC_RES( ( _L( "result: %d" ), err ) )
-    return err;
-    }
 
 // ---------------------------------------------------------------------------
 // Cancels an ongoing pairing.
@@ -248,25 +235,21 @@
 EXPORT_C void CBTEngConnMan::CancelPairDevice()
     {
     TRACE_FUNC_ENTRY
-    if( iPairingHandler )
+    if( iConnHandler )
         {
-        iPairingHandler->CancelPairing();
-        delete iPairingHandler;
-        iPairingHandler = NULL;
+        iConnHandler->CancelPairing();
         }
     }
 
 
 // ---------------------------------------------------------------------------
 // Tell BTEng to start observing the status of an ongoing pairing.
-// Deprecated since Symbian^4.
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt CBTEngConnMan::StartPairingObserver( const TBTDevAddr& aAddr )
     {
     TRACE_FUNC_ENTRY
-    (void) aAddr;
-    return KErrNone;
+    return CBTEngConnHandler::SetPairingObserver( aAddr, ETrue );
     }
 
 
@@ -281,14 +264,13 @@
     }
 
 // ---------------------------------------------------------------------------
-// Deprecated since Symbian^4.
+// ?implementation_description
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt CBTEngConnMan::StopPairingObserver( const TBTDevAddr& aAddr )
     {
     TRACE_FUNC_ENTRY
-    (void) aAddr;
-    return KErrNone;
+    return CBTEngConnHandler::SetPairingObserver( aAddr, EFalse );
     }
 
 // ---------------------------------------------------------------------------