bluetoothengine/btnotif/btnotifsrv/src/btnotifincomingpairinghandler.cpp
changeset 70 f5508c13dfe0
parent 57 5ebadcda06cb
equal deleted inserted replaced
67:16e4b9007960 70:f5508c13dfe0
   194 		// view. In this way, user is able to disconnect the device from our UI.
   194 		// view. In this way, user is able to disconnect the device from our UI.
   195 		// Otherwise the link key has been created by a device without IO requesting 
   195 		// Otherwise the link key has been created by a device without IO requesting 
   196 		// a service connection with phone. We won't take any action (e.g. remove 
   196 		// a service connection with phone. We won't take any action (e.g. remove 
   197 		// link key) in this case. As the result, this device can't be seen in our UI, 
   197 		// link key) in this case. As the result, this device can't be seen in our UI, 
   198 		// however other applications are still freely to use its services.
   198 		// however other applications are still freely to use its services.
   199         BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNotif]: JW pairing with no IO device");
   199         BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,_L("[BTNotif]: JW pairing with no IO device"));
   200 		TBTEngConnectionStatus status = iParent.ConnectStatus( aDev.Address() );
   200 		TBTEngConnectionStatus status = iParent.ConnectStatus( aDev.Address() );
   201 		if ( status == EBTEngConnecting || status == EBTEngConnected )
   201 		if ( status == EBTEngConnecting || status == EBTEngConnected )
   202 			{
   202 			{
   203 			// the return error is ingore as we can not have other proper 
   203 			// the return error is ingore as we can not have other proper 
   204 			// exception handling option:
   204 			// exception handling option:
   209 		}
   209 		}
   210     else if (aDev.LinkKeyType() == ELinkKeyUnauthenticatedUpgradable && !iUserAwarePairing)
   210     else if (aDev.LinkKeyType() == ELinkKeyUnauthenticatedUpgradable && !iUserAwarePairing)
   211 		{
   211 		{
   212 		// The linkkey has been created  by an incoming OBEX service request
   212 		// The linkkey has been created  by an incoming OBEX service request
   213 		// which resulted a pairing event received from pair server.
   213 		// which resulted a pairing event received from pair server.
   214         BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNotif]: JW pairing with IO device");
   214         BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,_L("[BTNotif]: JW pairing with IO device"));
   215 		iParent.RenewPairingHandler( NULL );
   215 		iParent.RenewPairingHandler( NULL );
   216 		}
   216 		}
   217     else
   217     else
   218 		{
   218 		{
   219 		if (aDev.LinkKeyType() == ELinkKeyUnauthenticatedNonUpgradable || aDev.LinkKeyType() == ELinkKeyUnauthenticatedUpgradable)
   219 		if (aDev.LinkKeyType() == ELinkKeyUnauthenticatedNonUpgradable || aDev.LinkKeyType() == ELinkKeyUnauthenticatedUpgradable)
   220 			{
   220 			{
   221 			// The user was involved in the pairing, so display in the paired devices list
   221 			// The user was involved in the pairing, so display in the paired devices list
   222 			(void) iParent.AddUiCookieJustWorksPaired(aDev);
   222 			(void) iParent.AddUiCookieJustWorksPaired(aDev);
   223 			}
   223 			}
   224 		BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNotif]: Non-JW pairing");
   224 		BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,_L("[BTNotif]: Non-JW pairing"));
   225 		// Other pairing model than Just Works:
   225 		// Other pairing model than Just Works:
   226 		CancelPlaNotification();
   226 		CancelPlaNotification();
   227 		SetPairResult( KErrNone );
   227 		SetPairResult( KErrNone );
   228 		TRAP_IGNORE(ShowPairingResultNoteL(KErrNone));
   228 		TRAP_IGNORE(ShowPairingResultNoteL(KErrNone));
   229 		iParent.RenewPairingHandler( NULL );
   229 		iParent.RenewPairingHandler( NULL );
   345         // This can happen for outgoing dedicated bonding with 
   345         // This can happen for outgoing dedicated bonding with 
   346         // non-SSP device, as the PIN dialog can be kept open even 
   346         // non-SSP device, as the PIN dialog can be kept open even 
   347         // though the link has dropped because of a time-out.
   347         // though the link has dropped because of a time-out.
   348         err = iPla.Open( iParent.SocketServ(), iAddr );
   348         err = iPla.Open( iParent.SocketServ(), iAddr );
   349         }
   349         }
   350     BOstrace1(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNotif]:HasPhysicalLink ? %d", iPla.IsOpen() );
   350     BOstrace1(TRACE_DEBUG,DUMMY_DEVLIST,_L("[BTNotif]:HasPhysicalLink ? %d"), iPla.IsOpen() );
   351     BOstraceFunctionExit0( DUMMY_DEVLIST );
   351     BOstraceFunctionExit0( DUMMY_DEVLIST );
   352     return err;
   352     return err;
   353     }
   353     }
   354 
   354 
   355 // ---------------------------------------------------------------------------
   355 // ---------------------------------------------------------------------------