| 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_DEVICE_CHROMEOS_H | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 public: | 39 public: |
| 40 // BluetoothDevice override | 40 // BluetoothDevice override |
| 41 uint32 GetBluetoothClass() const override; | 41 uint32 GetBluetoothClass() const override; |
| 42 std::string GetAddress() const override; | 42 std::string GetAddress() const override; |
| 43 VendorIDSource GetVendorIDSource() const override; | 43 VendorIDSource GetVendorIDSource() const override; |
| 44 uint16 GetVendorID() const override; | 44 uint16 GetVendorID() const override; |
| 45 uint16 GetProductID() const override; | 45 uint16 GetProductID() const override; |
| 46 uint16 GetDeviceID() const override; | 46 uint16 GetDeviceID() const override; |
| 47 bool IsPaired() const override; | 47 bool IsPaired() const override; |
| 48 bool IsConnected() const override; | 48 bool IsConnected() const override; |
| 49 bool IsGattConnected() const override; |
| 49 bool IsConnectable() const override; | 50 bool IsConnectable() const override; |
| 50 bool IsConnecting() const override; | 51 bool IsConnecting() const override; |
| 51 UUIDList GetUUIDs() const override; | 52 UUIDList GetUUIDs() const override; |
| 52 int16 GetInquiryRSSI() const override; | 53 int16 GetInquiryRSSI() const override; |
| 53 int16 GetInquiryTxPower() const override; | 54 int16 GetInquiryTxPower() const override; |
| 54 bool ExpectingPinCode() const override; | 55 bool ExpectingPinCode() const override; |
| 55 bool ExpectingPasskey() const override; | 56 bool ExpectingPasskey() const override; |
| 56 bool ExpectingConfirmation() const override; | 57 bool ExpectingConfirmation() const override; |
| 57 void GetConnectionInfo( | 58 void GetConnectionInfo( |
| 58 const ConnectionInfoCallback& callback) override; | 59 const ConnectionInfoCallback& callback) override; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 95 |
| 95 // Returns the object path of the device. | 96 // Returns the object path of the device. |
| 96 const dbus::ObjectPath& object_path() const { return object_path_; } | 97 const dbus::ObjectPath& object_path() const { return object_path_; } |
| 97 | 98 |
| 98 // Returns the adapter which owns this device instance. | 99 // Returns the adapter which owns this device instance. |
| 99 BluetoothAdapterChromeOS* adapter() const; | 100 BluetoothAdapterChromeOS* adapter() const; |
| 100 | 101 |
| 101 protected: | 102 protected: |
| 102 // BluetoothDevice override | 103 // BluetoothDevice override |
| 103 std::string GetDeviceName() const override; | 104 std::string GetDeviceName() const override; |
| 105 void CreateGattConnectionImpl() override; |
| 106 void DisconnectGatt() override; |
| 104 | 107 |
| 105 private: | 108 private: |
| 106 friend class BluetoothAdapterChromeOS; | 109 friend class BluetoothAdapterChromeOS; |
| 107 | 110 |
| 108 BluetoothDeviceChromeOS( | 111 BluetoothDeviceChromeOS( |
| 109 BluetoothAdapterChromeOS* adapter, | 112 BluetoothAdapterChromeOS* adapter, |
| 110 const dbus::ObjectPath& object_path, | 113 const dbus::ObjectPath& object_path, |
| 111 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, | 114 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, |
| 112 scoped_refptr<device::BluetoothSocketThread> socket_thread); | 115 scoped_refptr<device::BluetoothSocketThread> socket_thread); |
| 113 ~BluetoothDeviceChromeOS() override; | 116 ~BluetoothDeviceChromeOS() override; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // Note: This should remain the last member so it'll be destroyed and | 198 // Note: This should remain the last member so it'll be destroyed and |
| 196 // invalidate its weak pointers before any other members are destroyed. | 199 // invalidate its weak pointers before any other members are destroyed. |
| 197 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; | 200 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; |
| 198 | 201 |
| 199 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); | 202 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); |
| 200 }; | 203 }; |
| 201 | 204 |
| 202 } // namespace chromeos | 205 } // namespace chromeos |
| 203 | 206 |
| 204 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H | 207 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H |
| OLD | NEW |