summaryrefslogtreecommitdiffstats
path: root/device/bluetooth/bluetooth_device_win.h
diff options
context:
space:
mode:
authorkeybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-20 19:11:57 +0000
committerkeybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-20 19:11:57 +0000
commit9bf562c43f1890642d1d58b4acbfed43deb0805c (patch)
tree9a498473aec292c1b1e24bcb23ffaa7923b1c159 /device/bluetooth/bluetooth_device_win.h
parent6e6a46c54e75acc9d3fdf8837f4e483e2a35da02 (diff)
downloadchromium_src-9bf562c43f1890642d1d58b4acbfed43deb0805c.zip
chromium_src-9bf562c43f1890642d1d58b4acbfed43deb0805c.tar.gz
chromium_src-9bf562c43f1890642d1d58b4acbfed43deb0805c.tar.bz2
Bluetooth: replace "profiles" with "uuids"
The set of UUIDs for a given device will, in future, consist of not just the traditional Profiles found via SDP but also GATT Services found via primary service discovery as well as profile, protocol and service class UUIDs advertised in EIR data (classic) or AD (Low Energy). It therefore makes sense to just refer to these as "uuids" everywhere, especially since the specific UUID identifies exactly what is meant to the application developer. Since EIR and AD are passively received, rather than actively fetched, make this a property of a device rather than a polled function Specific changes to the C++ API: - Renamed BluetoothDevice::GetServices() to GetUUIDs() - Removed BluetoothDevice::GetServiceRecords() - Removed BluetoothDevice::ProvicesServiceWithName() - Removed BluetoothDevice::ProvidesServiceWithUUID() Specific changes to the JavaScript API: - Manifest entry changed from "profiles" to "uuids". - New "uuids" array added to Device object. - Removed chrome.bluetooth.getProfiles() and getServices(). BUG=339217 TEST=Updated tests included TBR=mkearney@chromium.org Review URL: https://codereview.chromium.org/196383033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258368 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/bluetooth/bluetooth_device_win.h')
-rw-r--r--device/bluetooth/bluetooth_device_win.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/device/bluetooth/bluetooth_device_win.h b/device/bluetooth/bluetooth_device_win.h
index 274364b..80c8206 100644
--- a/device/bluetooth/bluetooth_device_win.h
+++ b/device/bluetooth/bluetooth_device_win.h
@@ -34,13 +34,7 @@ class BluetoothDeviceWin : public BluetoothDevice {
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;
- virtual void ProvidesServiceWithName(
- const std::string& name,
- const ProvidesServiceCallback& callback) OVERRIDE;
+ virtual UUIDList GetUUIDs() const OVERRIDE;
virtual bool ExpectingPinCode() const OVERRIDE;
virtual bool ExpectingPasskey() const OVERRIDE;
virtual bool ExpectingConfirmation() const OVERRIDE;
@@ -72,7 +66,10 @@ class BluetoothDeviceWin : public BluetoothDevice {
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE;
- const BluetoothServiceRecord* GetServiceRecord(const std::string& uuid) const;
+ // Used by BluetoothProfileWin to retrieve the service record for the given
+ // |uuid|.
+ const BluetoothServiceRecord* GetServiceRecord(
+ const std::string& uuid) const;
protected:
// BluetoothDevice override
@@ -105,7 +102,10 @@ class BluetoothDeviceWin : public BluetoothDevice {
bool visible_;
// The services (identified by UUIDs) that this device provides.
- ServiceList service_uuids_;
+ UUIDList uuids_;
+
+ // The service records retrieved from SDP.
+ typedef ScopedVector<BluetoothServiceRecord> ServiceRecordList;
ServiceRecordList service_record_list_;
DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin);