| 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 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // BluetoothDevice override | 29 // BluetoothDevice override |
| 30 uint32 GetBluetoothClass() const override; | 30 uint32 GetBluetoothClass() const override; |
| 31 std::string GetAddress() const override; | 31 std::string GetAddress() const override; |
| 32 VendorIDSource GetVendorIDSource() const override; | 32 VendorIDSource GetVendorIDSource() const override; |
| 33 uint16 GetVendorID() const override; | 33 uint16 GetVendorID() const override; |
| 34 uint16 GetProductID() const override; | 34 uint16 GetProductID() const override; |
| 35 uint16 GetDeviceID() const override; | 35 uint16 GetDeviceID() const override; |
| 36 bool IsPaired() const override; | 36 bool IsPaired() const override; |
| 37 bool IsConnected() const override; | 37 bool IsConnected() const override; |
| 38 bool IsGattConnected() const override; |
| 38 bool IsConnectable() const override; | 39 bool IsConnectable() const override; |
| 39 bool IsConnecting() const override; | 40 bool IsConnecting() const override; |
| 40 UUIDList GetUUIDs() const override; | 41 UUIDList GetUUIDs() const override; |
| 41 int16 GetInquiryRSSI() const override; | 42 int16 GetInquiryRSSI() const override; |
| 42 int16 GetInquiryTxPower() const override; | 43 int16 GetInquiryTxPower() const override; |
| 43 bool ExpectingPinCode() const override; | 44 bool ExpectingPinCode() const override; |
| 44 bool ExpectingPasskey() const override; | 45 bool ExpectingPasskey() const override; |
| 45 bool ExpectingConfirmation() const override; | 46 bool ExpectingConfirmation() const override; |
| 46 void GetConnectionInfo(const ConnectionInfoCallback& callback) override; | 47 void GetConnectionInfo(const ConnectionInfoCallback& callback) override; |
| 47 void Connect(PairingDelegate* pairing_delegate, | 48 void Connect(PairingDelegate* pairing_delegate, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 70 // BluetoothDeviceMac override. | 71 // BluetoothDeviceMac override. |
| 71 NSDate* GetLastUpdateTime() const override; | 72 NSDate* GetLastUpdateTime() const override; |
| 72 | 73 |
| 73 // Returns the Bluetooth address for the |device|. The returned address has a | 74 // Returns the Bluetooth address for the |device|. The returned address has a |
| 74 // normalized format (see below). | 75 // normalized format (see below). |
| 75 static std::string GetDeviceAddress(IOBluetoothDevice* device); | 76 static std::string GetDeviceAddress(IOBluetoothDevice* device); |
| 76 | 77 |
| 77 protected: | 78 protected: |
| 78 // BluetoothDevice override | 79 // BluetoothDevice override |
| 79 std::string GetDeviceName() const override; | 80 std::string GetDeviceName() const override; |
| 81 void CreateGattConnectionImpl() override; |
| 82 void DisconnectGatt() override; |
| 80 | 83 |
| 81 private: | 84 private: |
| 82 friend class BluetoothAdapterMac; | 85 friend class BluetoothAdapterMac; |
| 83 | 86 |
| 84 // Implementation to read the host's transmit power level of type | 87 // Implementation to read the host's transmit power level of type |
| 85 // |power_level_type|. | 88 // |power_level_type|. |
| 86 int GetHostTransmitPower( | 89 int GetHostTransmitPower( |
| 87 BluetoothHCITransmitPowerLevelType power_level_type) const; | 90 BluetoothHCITransmitPowerLevelType power_level_type) const; |
| 88 | 91 |
| 89 base::scoped_nsobject<IOBluetoothDevice> device_; | 92 base::scoped_nsobject<IOBluetoothDevice> device_; |
| 90 | 93 |
| 91 DISALLOW_COPY_AND_ASSIGN(BluetoothClassicDeviceMac); | 94 DISALLOW_COPY_AND_ASSIGN(BluetoothClassicDeviceMac); |
| 92 }; | 95 }; |
| 93 | 96 |
| 94 } // namespace device | 97 } // namespace device |
| 95 | 98 |
| 96 #endif // DEVICE_BLUETOOTH_BLUETOOTH_CLASSIC_DEVICE_MAC_H_ | 99 #endif // DEVICE_BLUETOOTH_BLUETOOTH_CLASSIC_DEVICE_MAC_H_ |
| OLD | NEW |