| 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_CLASSIC_DEVICE_MAC_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_CLASSIC_DEVICE_MAC_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_CLASSIC_DEVICE_MAC_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_CLASSIC_DEVICE_MAC_H_ |
| 7 | 7 |
| 8 #import <IOBluetooth/IOBluetooth.h> | 8 #import <IOBluetooth/IOBluetooth.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 const ConnectToServiceCallback& callback, | 66 const ConnectToServiceCallback& callback, |
| 67 const ConnectToServiceErrorCallback& error_callback) override; | 67 const ConnectToServiceErrorCallback& error_callback) override; |
| 68 void ConnectToServiceInsecurely( | 68 void ConnectToServiceInsecurely( |
| 69 const BluetoothUUID& uuid, | 69 const BluetoothUUID& uuid, |
| 70 const ConnectToServiceCallback& callback, | 70 const ConnectToServiceCallback& callback, |
| 71 const ConnectToServiceErrorCallback& error_callback) override; | 71 const ConnectToServiceErrorCallback& error_callback) override; |
| 72 void CreateGattConnection( | 72 void CreateGattConnection( |
| 73 const GattConnectionCallback& callback, | 73 const GattConnectionCallback& callback, |
| 74 const ConnectErrorCallback& error_callback) override; | 74 const ConnectErrorCallback& error_callback) override; |
| 75 | 75 |
| 76 base::Time GetLastUpdateTime() const; | 76 base::Time GetLastUpdateTime() const override; |
| 77 | 77 |
| 78 // Returns the Bluetooth address for the |device|. The returned address has a | 78 // Returns the Bluetooth address for the |device|. The returned address has a |
| 79 // normalized format (see below). | 79 // normalized format (see below). |
| 80 static std::string GetDeviceAddress(IOBluetoothDevice* device); | 80 static std::string GetDeviceAddress(IOBluetoothDevice* device); |
| 81 | 81 |
| 82 protected: | 82 protected: |
| 83 // BluetoothDevice override | 83 // BluetoothDevice override |
| 84 void CreateGattConnectionImpl() override; | 84 void CreateGattConnectionImpl() override; |
| 85 void DisconnectGatt() override; | 85 void DisconnectGatt() override; |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 friend class BluetoothAdapterMac; | 88 friend class BluetoothAdapterMac; |
| 89 | 89 |
| 90 // Implementation to read the host's transmit power level of type | 90 // Implementation to read the host's transmit power level of type |
| 91 // |power_level_type|. | 91 // |power_level_type|. |
| 92 int GetHostTransmitPower( | 92 int GetHostTransmitPower( |
| 93 BluetoothHCITransmitPowerLevelType power_level_type) const; | 93 BluetoothHCITransmitPowerLevelType power_level_type) const; |
| 94 | 94 |
| 95 base::scoped_nsobject<IOBluetoothDevice> device_; | 95 base::scoped_nsobject<IOBluetoothDevice> device_; |
| 96 | 96 |
| 97 DISALLOW_COPY_AND_ASSIGN(BluetoothClassicDeviceMac); | 97 DISALLOW_COPY_AND_ASSIGN(BluetoothClassicDeviceMac); |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace device | 100 } // namespace device |
| 101 | 101 |
| 102 #endif // DEVICE_BLUETOOTH_BLUETOOTH_CLASSIC_DEVICE_MAC_H_ | 102 #endif // DEVICE_BLUETOOTH_BLUETOOTH_CLASSIC_DEVICE_MAC_H_ |
| OLD | NEW |