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

Unified Diff: device/bluetooth/bluetooth_device.cc

Issue 2421713002: arc: bluetooth: Expose missing advertise data. (Closed)
Patch Set: fix comment Created 4 years, 2 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
Index: device/bluetooth/bluetooth_device.cc
diff --git a/device/bluetooth/bluetooth_device.cc b/device/bluetooth/bluetooth_device.cc
index ee4aca5277565d6dcb79c99e278ebf40e1c95b58..eae1e19c54bdea220482e403039c27f1370fe494 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 base::nullopt;
+}
+
void BluetoothDevice::CreateGattConnection(
const GattConnectionCallback& callback,
const ConnectErrorCallback& error_callback) {

Powered by Google App Engine
This is Rietveld 408576698