Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef DEVICE_BLUETOOTH_LE_DEVICE_H_ | |
| 6 #define DEVICE_BLUETOOTH_LE_DEVICE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/macros.h" | |
|
ortuno
2016/10/10 00:11:20
Include: base/memory/ref_counted.h for scoped_refp
mbrunson
2016/10/10 19:21:28
Done.
| |
| 11 #include "device/bluetooth/bluetooth_adapter.h" | |
| 12 #include "device/bluetooth/bluetooth_device.h" | |
| 13 #include "device/bluetooth/public/interfaces/le_device.mojom.h" | |
| 14 | |
| 15 namespace bluetooth { | |
| 16 | |
| 17 // Implementation of Mojo LEDevice located in | |
| 18 // device/bluetooth/public/interfaces/le_device.mojom. | |
| 19 // It handles requests for Bluetooth low energy device capabilities | |
| 20 // and service and uses the platform abstraction of device/bluetooth. | |
|
ortuno
2016/10/10 00:11:20
It handles requests to interact with a Bluetooth D
mbrunson
2016/10/10 19:21:28
Done.
| |
| 21 class LEDevice : public mojom::LEDevice { | |
| 22 public: | |
| 23 LEDevice(const std::string& address, | |
| 24 const scoped_refptr<device::BluetoothAdapter>& adapter); | |
|
ortuno
2016/10/10 00:11:20
Don't take a const&, rather take just a scoped_ref
mbrunson
2016/10/10 19:21:28
Done.
| |
| 25 ~LEDevice() override; | |
| 26 | |
| 27 // Creates a mojom::LEDeviceInfo using info from the given |device|. | |
| 28 static mojom::LEDeviceInfoPtr ConstructLEDeviceInfoStruct( | |
| 29 const device::BluetoothDevice* device); | |
| 30 | |
| 31 // mojom::LEDevice overrides: | |
| 32 void GetInfo(const GetInfoCallback& callback) override; | |
| 33 | |
| 34 private: | |
| 35 std::string address_; | |
| 36 scoped_refptr<device::BluetoothAdapter> adapter_; | |
|
ortuno
2016/10/10 00:11:20
Comments please.
mbrunson
2016/10/10 19:21:28
Done.
| |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(LEDevice); | |
| 39 }; | |
| 40 | |
| 41 } // namespace bluetooth | |
| 42 | |
| 43 #endif // DEVICE_BLUETOOTH_LE_DEVICE_H_ | |
| OLD | NEW |