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

Side by Side Diff: device/bluetooth/bluetooth_device.cc

Issue 2421713002: arc: bluetooth: Expose missing advertise data. (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/bluetooth/bluetooth_device.h" 5 #include "device/bluetooth/bluetooth_device.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 const std::vector<uint8_t>* BluetoothDevice::GetServiceDataForUUID( 306 const std::vector<uint8_t>* BluetoothDevice::GetServiceDataForUUID(
307 const BluetoothUUID& uuid) const { 307 const BluetoothUUID& uuid) const {
308 auto it = service_data_.find(uuid); 308 auto it = service_data_.find(uuid);
309 if (it != service_data_.end()) { 309 if (it != service_data_.end()) {
310 return &it->second; 310 return &it->second;
311 } 311 }
312 return nullptr; 312 return nullptr;
313 } 313 }
314 314
315 std::unordered_map<uint16_t, std::vector<uint8_t>>
316 BluetoothDevice::GetManufacturerData() const {
317 return std::unordered_map<uint16_t, std::vector<uint8_t>>();
318 }
319
315 base::Optional<int8_t> BluetoothDevice::GetInquiryRSSI() const { 320 base::Optional<int8_t> BluetoothDevice::GetInquiryRSSI() const {
316 return inquiry_rssi_; 321 return inquiry_rssi_;
317 } 322 }
318 323
319 base::Optional<int8_t> BluetoothDevice::GetInquiryTxPower() const { 324 base::Optional<int8_t> BluetoothDevice::GetInquiryTxPower() const {
320 return inquiry_tx_power_; 325 return inquiry_tx_power_;
321 } 326 }
322 327
328 base::Optional<uint8_t> BluetoothDevice::GetFlags() const {
329 return base::nullopt;
330 }
331
323 void BluetoothDevice::CreateGattConnection( 332 void BluetoothDevice::CreateGattConnection(
324 const GattConnectionCallback& callback, 333 const GattConnectionCallback& callback,
325 const ConnectErrorCallback& error_callback) { 334 const ConnectErrorCallback& error_callback) {
326 create_gatt_connection_success_callbacks_.push_back(callback); 335 create_gatt_connection_success_callbacks_.push_back(callback);
327 create_gatt_connection_error_callbacks_.push_back(error_callback); 336 create_gatt_connection_error_callbacks_.push_back(error_callback);
328 337
329 if (IsGattConnected()) 338 if (IsGattConnected())
330 return DidConnectGatt(); 339 return DidConnectGatt();
331 340
332 CreateGattConnectionImpl(); 341 CreateGattConnectionImpl();
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 if (power < INT8_MIN) { 497 if (power < INT8_MIN) {
489 return INT8_MIN; 498 return INT8_MIN;
490 } 499 }
491 if (power > INT8_MAX) { 500 if (power > INT8_MAX) {
492 return INT8_MAX; 501 return INT8_MAX;
493 } 502 }
494 return static_cast<int8_t>(power); 503 return static_cast<int8_t>(power);
495 } 504 }
496 505
497 } // namespace device 506 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698