// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_SESSION_H_ #define DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_SESSION_H_ #include <memory> #include "base/functional/callback.h" #include "base/functional/callback_helpers.h" #include "base/memory/scoped_refptr.h" #include "base/memory/weak_ptr.h" #include "device/bluetooth/bluetooth_adapter.h" #include "device/bluetooth/bluetooth_discovery_filter.h" #include "device/bluetooth/bluetooth_discovery_session_outcome.h" #include "device/bluetooth/bluetooth_export.h" namespace device { // BluetoothDiscoverySession represents a current active or inactive device // discovery session. Instances of this class are obtained by calling // BluetoothAdapter::StartDiscoverySession. The Bluetooth adapter will be // constantly searching for nearby devices, as long as at least one instance // of an active BluetoothDiscoverySession exists. A BluetoothDiscoverySession is // considered active, as long as the adapter is discovering AND the owner of the // instance has not called BluetoothDiscoverySession::Stop. A // BluetoothDiscoverySession might unexpectedly become inactive, if the adapter // unexpectedly stops discovery. Users can implement the // AdapterDiscoveringChanged method of the BluetoothAdapter::Observer interface // to be notified of such a change and promptly request a new // BluetoothDiscoverySession if their existing sessions have become inactive. class DEVICE_BLUETOOTH_EXPORT BluetoothDiscoverySession { … }; } // namespace device #endif // DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_SESSION_H_