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

Side by Side 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: renaming header, moving TransportMask back into filter 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_FILTER_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_FILTER_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_FILTER_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_FILTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <set> 11 #include <set>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/scoped_vector.h" 14 #include "base/memory/scoped_vector.h"
15 #include "device/bluetooth/bluetooth_export.h" 15 #include "device/bluetooth/bluetooth_export.h"
16 #include "device/bluetooth/bluetooth_types.h"
16 #include "device/bluetooth/bluetooth_uuid.h" 17 #include "device/bluetooth/bluetooth_uuid.h"
17 18
18 namespace device { 19 namespace device {
19 20
20 // Used to keep a discovery filter that can be used to limit reported devices. 21 // Used to keep a discovery filter that can be used to limit reported devices.
21 class DEVICE_BLUETOOTH_EXPORT BluetoothDiscoveryFilter { 22 class DEVICE_BLUETOOTH_EXPORT BluetoothDiscoveryFilter {
22 public: 23 public:
23 // Possible transports to use for scan filter. 24 // Allowed transport types for the scan filter.
ortuno 2016/06/15 18:13:34 I don't think this comment belongs here anymore.
24 enum Transport {
25 TRANSPORT_CLASSIC = 0x01,
26 TRANSPORT_LE = 0x02,
27 TRANSPORT_DUAL = (TRANSPORT_CLASSIC | TRANSPORT_LE)
28 };
29 using TransportMask = uint8_t; 25 using TransportMask = uint8_t;
30 26
31 BluetoothDiscoveryFilter(TransportMask transport); 27 BluetoothDiscoveryFilter(TransportMask transport);
32 ~BluetoothDiscoveryFilter(); 28 ~BluetoothDiscoveryFilter();
33 29
34 // These getters return true when given field is set in filter, and copy this 30 // These getters return true when given field is set in filter, and copy this
35 // value to |out_*| parameter. If value is not set, returns false. 31 // value to |out_*| parameter. If value is not set, returns false.
36 // Thes setters assign given value to proper filter field. 32 // Thes setters assign given value to proper filter field.
37 bool GetRSSI(int16_t* out_rssi) const; 33 bool GetRSSI(int16_t* out_rssi) const;
38 void SetRSSI(int16_t rssi); 34 void SetRSSI(int16_t rssi);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 std::unique_ptr<uint16_t> pathloss_; 66 std::unique_ptr<uint16_t> pathloss_;
71 TransportMask transport_; 67 TransportMask transport_;
72 ScopedVector<device::BluetoothUUID> uuids_; 68 ScopedVector<device::BluetoothUUID> uuids_;
73 69
74 DISALLOW_COPY_AND_ASSIGN(BluetoothDiscoveryFilter); 70 DISALLOW_COPY_AND_ASSIGN(BluetoothDiscoveryFilter);
75 }; 71 };
76 72
77 } // namespace device 73 } // namespace device
78 74
79 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_FILTER_H_ 75 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_FILTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698