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

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

Issue 1920353002: Implement create attribute API functions for BTLE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@api_changes
Patch Set: owners Created 4 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.h ('k') | device/bluetooth/bluetooth_adapter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698