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

Side by Side Diff: device/bluetooth/bluetooth_low_energy_device_mac.mm

Issue 2854733002: bluetooth: macOS: BluetoothLowEnergyDeviceMac::IsConnectable() not implemented (Closed)
Patch Set: Removing #if defined(OS_MACOSX) from this patch, crrev.com/2863643003 Created 3 years, 7 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
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_device_mac.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_low_energy_device_mac.h" 5 #include "device/bluetooth/bluetooth_low_energy_device_mac.h"
6 6
7 #import <CoreFoundation/CoreFoundation.h> 7 #import <CoreFoundation/CoreFoundation.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 bool BluetoothLowEnergyDeviceMac::IsConnected() const { 94 bool BluetoothLowEnergyDeviceMac::IsConnected() const {
95 return IsGattConnected(); 95 return IsGattConnected();
96 } 96 }
97 97
98 bool BluetoothLowEnergyDeviceMac::IsGattConnected() const { 98 bool BluetoothLowEnergyDeviceMac::IsGattConnected() const {
99 return ([peripheral_ state] == CBPeripheralStateConnected); 99 return ([peripheral_ state] == CBPeripheralStateConnected);
100 } 100 }
101 101
102 bool BluetoothLowEnergyDeviceMac::IsConnectable() const { 102 bool BluetoothLowEnergyDeviceMac::IsConnectable() const {
103 return connectable_; 103 // Only available for Chrome OS.
104 NOTIMPLEMENTED();
105 return false;
104 } 106 }
105 107
106 bool BluetoothLowEnergyDeviceMac::IsConnecting() const { 108 bool BluetoothLowEnergyDeviceMac::IsConnecting() const {
107 return ([peripheral_ state] == CBPeripheralStateConnecting); 109 return ([peripheral_ state] == CBPeripheralStateConnecting);
108 } 110 }
109 111
110 bool BluetoothLowEnergyDeviceMac::ExpectingPinCode() const { 112 bool BluetoothLowEnergyDeviceMac::ExpectingPinCode() const {
111 return false; 113 return false;
112 } 114 }
113 115
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 std::ostream& operator<<(std::ostream& out, 468 std::ostream& operator<<(std::ostream& out,
467 const BluetoothLowEnergyDeviceMac& device) { 469 const BluetoothLowEnergyDeviceMac& device) {
468 // TODO(crbug.com/703878): Should use 470 // TODO(crbug.com/703878): Should use
469 // BluetoothLowEnergyDeviceMac::GetNameForDisplay() instead. 471 // BluetoothLowEnergyDeviceMac::GetNameForDisplay() instead.
470 base::Optional<std::string> name = device.GetName(); 472 base::Optional<std::string> name = device.GetName();
471 const char* name_cstr = name ? name->c_str() : ""; 473 const char* name_cstr = name ? name->c_str() : "";
472 return out << "<BluetoothLowEnergyDeviceMac " << device.GetAddress() << "/" 474 return out << "<BluetoothLowEnergyDeviceMac " << device.GetAddress() << "/"
473 << &device << ", \"" << name_cstr << "\">"; 475 << &device << ", \"" << name_cstr << "\">";
474 } 476 }
475 } // namespace device 477 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_device_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698