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

Unified Diff: device/bluetooth/bluetooth_device.cc

Issue 2421713002: arc: bluetooth: Expose missing advertise data. (Closed)
Patch Set: Add BlueZ unittests / more comment Created 4 years, 1 month 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.h ('k') | device/bluetooth/bluez/bluetooth_adapter_bluez.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device.cc
diff --git a/device/bluetooth/bluetooth_device.cc b/device/bluetooth/bluetooth_device.cc
index ee4aca5277565d6dcb79c99e278ebf40e1c95b58..d4e072bbc4b4b3a404de2931ea3d6bff6b4e2d18 100644
--- a/device/bluetooth/bluetooth_device.cc
+++ b/device/bluetooth/bluetooth_device.cc
@@ -312,6 +312,29 @@ const std::vector<uint8_t>* BluetoothDevice::GetServiceDataForUUID(
return nullptr;
}
+const BluetoothDevice::ManufacturerDataMap&
+BluetoothDevice::GetManufacturerData() const {
+ return manufacturer_data_;
+}
+
+BluetoothDevice::ManufacturerIDSet BluetoothDevice::GetManufacturerDataIDs()
+ const {
+ ManufacturerIDSet manufacturer_data_ids;
+ for (const auto& manufacturer_data_pair : manufacturer_data_) {
+ manufacturer_data_ids.insert(manufacturer_data_pair.first);
+ }
+ return manufacturer_data_ids;
+}
+
+const std::vector<uint8_t>* BluetoothDevice::GetManufacturerDataForID(
+ const ManufacturerId manufacturerID) const {
+ auto it = manufacturer_data_.find(manufacturerID);
+ if (it != manufacturer_data_.end()) {
+ return &it->second;
+ }
+ return nullptr;
+}
+
base::Optional<int8_t> BluetoothDevice::GetInquiryRSSI() const {
return inquiry_rssi_;
}
@@ -320,6 +343,10 @@ base::Optional<int8_t> BluetoothDevice::GetInquiryTxPower() const {
return inquiry_tx_power_;
}
+base::Optional<uint8_t> BluetoothDevice::GetAdvertisingDataFlags() const {
+ return advertising_data_flags_;
+}
+
void BluetoothDevice::CreateGattConnection(
const GattConnectionCallback& callback,
const ConnectErrorCallback& error_callback) {
« no previous file with comments | « device/bluetooth/bluetooth_device.h ('k') | device/bluetooth/bluez/bluetooth_adapter_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698