Index: device/bluetooth/device.h |
diff --git a/device/bluetooth/device.h b/device/bluetooth/device.h |
index c82439e6c283ecb6e851e466061bedf060a18420..fbfbb3e850440380a07a0bad94b130af3ce23b59 100644 |
--- a/device/bluetooth/device.h |
+++ b/device/bluetooth/device.h |
@@ -11,6 +11,8 @@ |
#include "base/memory/ref_counted.h" |
#include "device/bluetooth/bluetooth_adapter.h" |
#include "device/bluetooth/bluetooth_device.h" |
+#include "device/bluetooth/bluetooth_gatt_connection.h" |
+#include "device/bluetooth/bluetooth_remote_gatt_service.h" |
#include "device/bluetooth/public/interfaces/device.mojom.h" |
namespace bluetooth { |
@@ -21,8 +23,8 @@ namespace bluetooth { |
// Uses the platform abstraction of device/bluetooth. |
class Device : public mojom::Device { |
public: |
- Device(const std::string& address, |
- scoped_refptr<device::BluetoothAdapter> adapter); |
+ Device(scoped_refptr<device::BluetoothAdapter> adapter, |
+ std::unique_ptr<device::BluetoothGattConnection> connection); |
~Device() override; |
// Creates a mojom::DeviceInfo using info from the given |device|. |
@@ -31,14 +33,18 @@ class Device : public mojom::Device { |
// mojom::Device overrides: |
void GetInfo(const GetInfoCallback& callback) override; |
+ void GetServices(const GetServicesCallback& callback) override; |
private: |
- // The address of the Bluetooth device. |
- std::string address_; |
+ mojom::ServiceInfoPtr ConstructServiceInfoStruct( |
+ const device::BluetoothRemoteGattService* service); |
// The current BluetoothAdapter. |
scoped_refptr<device::BluetoothAdapter> adapter_; |
+ // The GATT connection to this device. |
+ std::unique_ptr<device::BluetoothGattConnection> connection_; |
+ |
DISALLOW_COPY_AND_ASSIGN(Device); |
}; |