bluetoothengine/bteng/src/btengsrvsession.cpp
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
    19 
    19 
    20 #include <e32base.h>
    20 #include <e32base.h>
    21 #include "btengsrvsession.h"
    21 #include "btengsrvsession.h"
    22 #include "btengserver.h"
    22 #include "btengserver.h"
    23 #include "btengsrvbbconnectionmgr.h"
    23 #include "btengsrvbbconnectionmgr.h"
       
    24 #include "btengpairman.h"
    24 #include "btengsrvsettingsmgr.h"
    25 #include "btengsrvsettingsmgr.h"
    25 #include "btengclientserver.h"
    26 #include "btengclientserver.h"
    26 #include "debug.h"
    27 #include "debug.h"
    27 
    28 
    28 
    29 
   155     {
   156     {
   156     TRAPD( err, DispatchMessageL( aMessage ) );
   157     TRAPD( err, DispatchMessageL( aMessage ) );
   157     if( !aMessage.IsNull() &&
   158     if( !aMessage.IsNull() &&
   158         ( err || 
   159         ( err || 
   159           ( aMessage.Function() != EBTEngNotifyConnectionEvents && 
   160           ( aMessage.Function() != EBTEngNotifyConnectionEvents && 
       
   161             aMessage.Function() != EBTEngPairDevice &&
   160             aMessage.Function() != EBTEngSetPowerState ) ) )
   162             aMessage.Function() != EBTEngSetPowerState ) ) )
   161         {
   163         {
   162             // Return the error code to the client.
   164             // Return the error code to the client.
   163         aMessage.Complete( err );
   165         aMessage.Complete( err );
   164         }
   166         }
   256             {
   258             {
   257             aMessage.Complete( KErrNone );  // Client does not have to wait.
   259             aMessage.Complete( KErrNone );  // Client does not have to wait.
   258             Server()->BasebandConnectionManager()->ManageTopology( ETrue );
   260             Server()->BasebandConnectionManager()->ManageTopology( ETrue );
   259             }
   261             }
   260             break;
   262             break;
       
   263         case EBTEngSetPairingObserver:
       
   264             {
       
   265             CheckPowerOnL();
       
   266             // Simply forward it to the pairing manager
       
   267             Server()->PairManager()->ProcessCommandL( aMessage );
       
   268             break;
       
   269             }
       
   270         case EBTEngPairDevice:
       
   271             {
       
   272             CheckPowerOnL();
       
   273             // Simply forward it to the pairing manager
       
   274             Server()->PairManager()->ProcessCommandL( aMessage );
       
   275             break;
       
   276             }
       
   277         case EBTEngCancelPairDevice:
       
   278             {
       
   279             Server()->PairManager()->ProcessCommandL( aMessage );
       
   280             break;
       
   281             }
   261         default:
   282         default:
   262             {
   283             {
   263             TRACE_INFO( ( _L( "[BTENG]\t DispatchMessageL: bad request (%d)" ), aMessage.Function() ) )
   284             TRACE_INFO( ( _L( "[BTENG]\t DispatchMessageL: bad request (%d)" ), aMessage.Function() ) )
   264             User::Leave( KErrArgument );
   285             User::Leave( KErrArgument );
   265             }
   286             }