summaryrefslogtreecommitdiffstats
path: root/device/bluetooth/bluetooth_device_win.cc
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.cc
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.cc')
-rw-r--r--device/bluetooth/bluetooth_device_win.cc26
1 files changed, 3 insertions, 23 deletions
diff --git a/device/bluetooth/bluetooth_device_win.cc b/device/bluetooth/bluetooth_device_win.cc
index 3f95efd..da016f7 100644
--- a/device/bluetooth/bluetooth_device_win.cc
+++ b/device/bluetooth/bluetooth_device_win.cc
@@ -48,7 +48,7 @@ BluetoothDeviceWin::BluetoothDeviceWin(
(*iter)->sdp_bytes.size(),
sdp_bytes_buffer);
service_record_list_.push_back(service_record);
- service_uuids_.push_back(service_record->uuid());
+ uuids_.push_back(service_record->uuid());
}
}
@@ -104,28 +104,8 @@ bool BluetoothDeviceWin::IsConnecting() const {
return false;
}
-BluetoothDevice::ServiceList BluetoothDeviceWin::GetServices() const {
- return service_uuids_;
-}
-
-void BluetoothDeviceWin::GetServiceRecords(
- const ServiceRecordsCallback& callback,
- const ErrorCallback& error_callback) {
- callback.Run(service_record_list_);
-}
-
-void BluetoothDeviceWin::ProvidesServiceWithName(
- const std::string& name,
- const ProvidesServiceCallback& callback) {
- for (ServiceRecordList::const_iterator iter = service_record_list_.begin();
- iter != service_record_list_.end();
- ++iter) {
- if ((*iter)->name() == name) {
- callback.Run(true);
- return;
- }
- }
- callback.Run(false);
+BluetoothDevice::UUIDList BluetoothDeviceWin::GetUUIDs() const {
+ return uuids_;
}
bool BluetoothDeviceWin::ExpectingPinCode() const {