src/connectivity/bluetooth/core/bt-host/fidl/host_server.cc
// Attempt to disconnect the peer identified by |peer_id| from all transports.
// If the peer is already not connected, return success. If the peer is
// disconnected succesfully, return success.
Attempt to disconnect the peer identified by |peer_id| from all transports.
If the peer is already not connected, return success. If the peer is
disconnected succesfully, return success.
Attempt to disconnect the peer identified by |peer_id| from all transports . If the peer is already not connected return success . If the peer is disconnected succesfully return success .
void HostServer::Disconnect(fbt::PeerId peer_id, DisconnectCallback callback) {
  bt::PeerId id{peer_id.value};
  auto le_disc = adapter()->le_connection_manager()->Disconnect(id);
  auto bredr_disc = adapter()->bredr_connection_manager()->Disconnect(id);
  if (le_disc && bredr_disc) {
    callback(fit::ok());
  } else {
    callback(fit::error(fsys::Error::FAILED));
  }
}
void HostServer :: Disconnect ( fbt :: PeerId peer_id , DisconnectCallback callback ) { bt :: PeerId id { peer_id . value } ; auto le_disc = adapter ( ) -> le_connection_manager ( ) -> Disconnect ( id ) ; auto bredr_disc = adapter ( ) -> bredr_connection_manager ( ) -> Disconnect ( id ) ; if ( le_disc && bredr_disc ) { callback ( fit :: ok ( ) ) ; } else { callback ( fit :: error ( fsys :: Error :: FAILED ) ) ; } }
Attempt to disconnect the peer identified by |peer_id| from all transports.
Attempt to disconnect the peer identified by |peer_id| from all transports .