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

Unified Diff: device/bluetooth/bluetooth_device_mac.h

Issue 13416005: Bluetooth: clean up BluetoothDevice (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More win visible fixes Created 7 years, 9 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_device_chromeos.cc ('k') | device/bluetooth/bluetooth_device_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device_mac.h
diff --git a/device/bluetooth/bluetooth_device_mac.h b/device/bluetooth/bluetooth_device_mac.h
index a3e42d861fbf7fa4cb6887f4f79e611aaa8d103b..653c246c309992adec4606efd13ae55cd048aaa1 100644
--- a/device/bluetooth/bluetooth_device_mac.h
+++ b/device/bluetooth/bluetooth_device_mac.h
@@ -24,8 +24,12 @@ class BluetoothDeviceMac : public BluetoothDevice {
virtual ~BluetoothDeviceMac();
// BluetoothDevice override
+ virtual std::string GetAddress() const OVERRIDE;
virtual bool IsPaired() const OVERRIDE;
- virtual const ServiceList& GetServices() const OVERRIDE;
+ virtual bool IsConnected() const OVERRIDE;
+ virtual bool IsConnectable() const OVERRIDE;
+ virtual bool IsConnecting() const OVERRIDE;
+ virtual ServiceList GetServices() const OVERRIDE;
virtual void GetServiceRecords(
const ServiceRecordsCallback& callback,
const ErrorCallback& error_callback) OVERRIDE;
@@ -59,6 +63,11 @@ class BluetoothDeviceMac : public BluetoothDevice {
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE;
+ protected:
+ // BluetoothDevice override
+ virtual uint32 GetBluetoothClass() const OVERRIDE;
+ virtual std::string GetDeviceName() const OVERRIDE;
+
private:
friend class BluetoothAdapterMac;
@@ -69,6 +78,24 @@ class BluetoothDeviceMac : public BluetoothDevice {
return device_fingerprint_;
}
+ // The Bluetooth class of the device, a bitmask that may be decoded using
+ // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm
+ uint32 bluetooth_class_;
+
+ // The name of the device, as supplied by the remote device.
+ std::string name_;
+
+ // The Bluetooth address of the device.
+ std::string address_;
+
+ // Tracked device state, updated by the adapter managing the lifecyle of
+ // the device.
+ bool paired_;
+ bool connected_;
+
+ // The services (identified by UUIDs) that this device provides.
+ ServiceList service_uuids_;
+
// Used to compare the devices.
const uint32 device_fingerprint_;
ServiceRecordList service_record_list_;
« no previous file with comments | « device/bluetooth/bluetooth_device_chromeos.cc ('k') | device/bluetooth/bluetooth_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698