OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_adapter_mac.h" | 5 #include "device/bluetooth/bluetooth_adapter_mac.h" |
6 | 6 |
7 #import <IOBluetooth/objc/IOBluetoothDevice.h> | 7 #import <IOBluetooth/objc/IOBluetoothDevice.h> |
8 #import <IOBluetooth/objc/IOBluetoothHostController.h> | 8 #import <IOBluetooth/objc/IOBluetoothHostController.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 } | 200 } |
201 | 201 |
202 void BluetoothAdapterMac::RegisterAdvertisement( | 202 void BluetoothAdapterMac::RegisterAdvertisement( |
203 std::unique_ptr<BluetoothAdvertisement::Data> advertisement_data, | 203 std::unique_ptr<BluetoothAdvertisement::Data> advertisement_data, |
204 const CreateAdvertisementCallback& callback, | 204 const CreateAdvertisementCallback& callback, |
205 const CreateAdvertisementErrorCallback& error_callback) { | 205 const CreateAdvertisementErrorCallback& error_callback) { |
206 NOTIMPLEMENTED(); | 206 NOTIMPLEMENTED(); |
207 error_callback.Run(BluetoothAdvertisement::ERROR_UNSUPPORTED_PLATFORM); | 207 error_callback.Run(BluetoothAdvertisement::ERROR_UNSUPPORTED_PLATFORM); |
208 } | 208 } |
209 | 209 |
| 210 BluetoothLocalGattService* BluetoothAdapterMac::GetGattService( |
| 211 const std::string& identifier) const { |
| 212 return nullptr; |
| 213 } |
| 214 |
210 void BluetoothAdapterMac::ClassicDeviceFound(IOBluetoothDevice* device) { | 215 void BluetoothAdapterMac::ClassicDeviceFound(IOBluetoothDevice* device) { |
211 ClassicDeviceAdded(device); | 216 ClassicDeviceAdded(device); |
212 } | 217 } |
213 | 218 |
214 void BluetoothAdapterMac::ClassicDiscoveryStopped(bool unexpected) { | 219 void BluetoothAdapterMac::ClassicDiscoveryStopped(bool unexpected) { |
215 if (unexpected) { | 220 if (unexpected) { |
216 DVLOG(1) << "Discovery stopped unexpectedly"; | 221 DVLOG(1) << "Discovery stopped unexpectedly"; |
217 num_discovery_sessions_ = 0; | 222 num_discovery_sessions_ = 0; |
218 MarkDiscoverySessionsAsInactive(); | 223 MarkDiscoverySessionsAsInactive(); |
219 } | 224 } |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 std::string device_address = | 616 std::string device_address = |
612 BluetoothLowEnergyDeviceMac::GetPeripheralHashAddress(peripheral); | 617 BluetoothLowEnergyDeviceMac::GetPeripheralHashAddress(peripheral); |
613 DevicesMap::const_iterator iter = devices_.find(device_address); | 618 DevicesMap::const_iterator iter = devices_.find(device_address); |
614 if (iter == devices_.end()) { | 619 if (iter == devices_.end()) { |
615 return nil; | 620 return nil; |
616 } | 621 } |
617 return static_cast<BluetoothLowEnergyDeviceMac*>(iter->second); | 622 return static_cast<BluetoothLowEnergyDeviceMac*>(iter->second); |
618 } | 623 } |
619 | 624 |
620 } // namespace device | 625 } // namespace device |
OLD | NEW |