| OLD | NEW |
| 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ |
| 7 | 7 |
| 8 #if defined(OS_IOS) | 8 #if defined(OS_IOS) |
| 9 #import <CoreBluetooth/CoreBluetooth.h> | 9 #import <CoreBluetooth/CoreBluetooth.h> |
| 10 #else // !defined(OS_IOS) | 10 #else // !defined(OS_IOS) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 // BluetoothDevice overrides. | 44 // BluetoothDevice overrides. |
| 45 std::string GetIdentifier() const override; | 45 std::string GetIdentifier() const override; |
| 46 uint32_t GetBluetoothClass() const override; | 46 uint32_t GetBluetoothClass() const override; |
| 47 std::string GetAddress() const override; | 47 std::string GetAddress() const override; |
| 48 BluetoothDevice::VendorIDSource GetVendorIDSource() const override; | 48 BluetoothDevice::VendorIDSource GetVendorIDSource() const override; |
| 49 uint16_t GetVendorID() const override; | 49 uint16_t GetVendorID() const override; |
| 50 uint16_t GetProductID() const override; | 50 uint16_t GetProductID() const override; |
| 51 uint16_t GetDeviceID() const override; | 51 uint16_t GetDeviceID() const override; |
| 52 uint16_t GetAppearance() const override; | 52 uint16_t GetAppearance() const override; |
| 53 base::Optional<std::string> GetName() const override; |
| 53 bool IsPaired() const override; | 54 bool IsPaired() const override; |
| 54 bool IsConnected() const override; | 55 bool IsConnected() const override; |
| 55 bool IsGattConnected() const override; | 56 bool IsGattConnected() const override; |
| 56 bool IsConnectable() const override; | 57 bool IsConnectable() const override; |
| 57 bool IsConnecting() const override; | 58 bool IsConnecting() const override; |
| 58 BluetoothDevice::UUIDList GetUUIDs() const override; | 59 BluetoothDevice::UUIDList GetUUIDs() const override; |
| 59 int16_t GetInquiryRSSI() const override; | 60 int16_t GetInquiryRSSI() const override; |
| 60 int16_t GetInquiryTxPower() const override; | 61 int16_t GetInquiryTxPower() const override; |
| 61 bool ExpectingPinCode() const override; | 62 bool ExpectingPinCode() const override; |
| 62 bool ExpectingPasskey() const override; | 63 bool ExpectingPasskey() const override; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 78 const BluetoothUUID& uuid, | 79 const BluetoothUUID& uuid, |
| 79 const ConnectToServiceCallback& callback, | 80 const ConnectToServiceCallback& callback, |
| 80 const ConnectToServiceErrorCallback& error_callback) override; | 81 const ConnectToServiceErrorCallback& error_callback) override; |
| 81 void ConnectToServiceInsecurely( | 82 void ConnectToServiceInsecurely( |
| 82 const device::BluetoothUUID& uuid, | 83 const device::BluetoothUUID& uuid, |
| 83 const ConnectToServiceCallback& callback, | 84 const ConnectToServiceCallback& callback, |
| 84 const ConnectToServiceErrorCallback& error_callback) override; | 85 const ConnectToServiceErrorCallback& error_callback) override; |
| 85 | 86 |
| 86 protected: | 87 protected: |
| 87 // BluetoothDevice override. | 88 // BluetoothDevice override. |
| 88 std::string GetDeviceName() const override; | |
| 89 void CreateGattConnectionImpl() override; | 89 void CreateGattConnectionImpl() override; |
| 90 void DisconnectGatt() override; | 90 void DisconnectGatt() override; |
| 91 | 91 |
| 92 // Methods used by BluetoothLowEnergyPeripheralBridge. | 92 // Methods used by BluetoothLowEnergyPeripheralBridge. |
| 93 void DidDiscoverPrimaryServices(NSError* error); | 93 void DidDiscoverPrimaryServices(NSError* error); |
| 94 void DidModifyServices(NSArray* invalidatedServices); | 94 void DidModifyServices(NSArray* invalidatedServices); |
| 95 void DidDiscoverCharacteristics(CBService* cb_service, NSError* error); | 95 void DidDiscoverCharacteristics(CBService* cb_service, NSError* error); |
| 96 void DidUpdateValue(CBCharacteristic* characteristic, NSError* error); | 96 void DidUpdateValue(CBCharacteristic* characteristic, NSError* error); |
| 97 void DidWriteValue(CBCharacteristic* characteristic, NSError* error); | 97 void DidWriteValue(CBCharacteristic* characteristic, NSError* error); |
| 98 void DidUpdateNotificationState(CBCharacteristic* characteristic, | 98 void DidUpdateNotificationState(CBCharacteristic* characteristic, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 // The services (identified by UUIDs) that this device provides. | 153 // The services (identified by UUIDs) that this device provides. |
| 154 std::set<BluetoothUUID> advertised_uuids_; | 154 std::set<BluetoothUUID> advertised_uuids_; |
| 155 | 155 |
| 156 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac); | 156 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac); |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 } // namespace device | 159 } // namespace device |
| 160 | 160 |
| 161 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ | 161 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ |
| OLD | NEW |