Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1153)

Unified Diff: device/bluetooth/bluetooth_discovery_filter.h

Issue 2063353002: device/bluetooth: split out transport enum (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing new use in components/arc/bluetooth Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/bluetooth_common.h ('k') | device/bluetooth/bluetooth_discovery_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_discovery_filter.h
diff --git a/device/bluetooth/bluetooth_discovery_filter.h b/device/bluetooth/bluetooth_discovery_filter.h
index 366af10a5f47797fd651d7db68c839475d21e002..1c83ee72e9da079be8e648d45aee9d262f0aed91 100644
--- a/device/bluetooth/bluetooth_discovery_filter.h
+++ b/device/bluetooth/bluetooth_discovery_filter.h
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
+#include "device/bluetooth/bluetooth_common.h"
#include "device/bluetooth/bluetooth_export.h"
#include "device/bluetooth/bluetooth_uuid.h"
@@ -20,15 +21,7 @@ namespace device {
// Used to keep a discovery filter that can be used to limit reported devices.
class DEVICE_BLUETOOTH_EXPORT BluetoothDiscoveryFilter {
public:
- // Possible transports to use for scan filter.
- enum Transport {
- TRANSPORT_CLASSIC = 0x01,
- TRANSPORT_LE = 0x02,
- TRANSPORT_DUAL = (TRANSPORT_CLASSIC | TRANSPORT_LE)
- };
- using TransportMask = uint8_t;
-
- BluetoothDiscoveryFilter(TransportMask transport);
+ BluetoothDiscoveryFilter(BluetoothTransport transport);
~BluetoothDiscoveryFilter();
// These getters return true when given field is set in filter, and copy this
@@ -40,8 +33,8 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDiscoveryFilter {
void SetPathloss(uint16_t pathloss);
// Return and set transport field of this filter.
- TransportMask GetTransport() const;
- void SetTransport(TransportMask transport);
+ BluetoothTransport GetTransport() const;
+ void SetTransport(BluetoothTransport transport);
// Make |out_uuids| represent all uuids assigned to this filter.
void GetUUIDs(std::set<device::BluetoothUUID>& out_uuids) const;
@@ -68,7 +61,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDiscoveryFilter {
private:
std::unique_ptr<int16_t> rssi_;
std::unique_ptr<uint16_t> pathloss_;
- TransportMask transport_;
+ BluetoothTransport transport_;
ScopedVector<device::BluetoothUUID> uuids_;
DISALLOW_COPY_AND_ASSIGN(BluetoothDiscoveryFilter);
« no previous file with comments | « device/bluetooth/bluetooth_common.h ('k') | device/bluetooth/bluetooth_discovery_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698