Chromium Code Reviews| 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_BLUEZ_BLUETOOTH_DEVICE_BLUEZ_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_DEVICE_BLUEZ_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_DEVICE_BLUEZ_H_ | 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_DEVICE_BLUEZ_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <unordered_set> | |
| 13 #include <vector> | |
| 12 | 14 |
| 13 #include "base/macros.h" | 15 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 16 #include "base/sequenced_task_runner.h" | 18 #include "base/sequenced_task_runner.h" |
| 17 #include "dbus/object_path.h" | 19 #include "dbus/object_path.h" |
| 18 #include "device/bluetooth/bluetooth_common.h" | 20 #include "device/bluetooth/bluetooth_common.h" |
| 19 #include "device/bluetooth/bluetooth_device.h" | 21 #include "device/bluetooth/bluetooth_device.h" |
| 20 #include "device/bluetooth/bluetooth_export.h" | 22 #include "device/bluetooth/bluetooth_export.h" |
| 21 #include "device/bluetooth/bluez/bluetooth_service_record_bluez.h" | 23 #include "device/bluetooth/bluez/bluetooth_service_record_bluez.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 void Pair(device::BluetoothDevice::PairingDelegate* pairing_delegate, | 98 void Pair(device::BluetoothDevice::PairingDelegate* pairing_delegate, |
| 97 const base::Closure& callback, | 99 const base::Closure& callback, |
| 98 const ConnectErrorCallback& error_callback) override; | 100 const ConnectErrorCallback& error_callback) override; |
| 99 | 101 |
| 100 // Returns the complete list of service records discovered for on this | 102 // Returns the complete list of service records discovered for on this |
| 101 // device via SDP. If called before discovery is complete, it may return | 103 // device via SDP. If called before discovery is complete, it may return |
| 102 // an incomplete list and/or stale cached records. | 104 // an incomplete list and/or stale cached records. |
| 103 void GetServiceRecords(const GetServiceRecordsCallback& callback, | 105 void GetServiceRecords(const GetServiceRecordsCallback& callback, |
| 104 const GetServiceRecordsErrorCallback& error_callback); | 106 const GetServiceRecordsErrorCallback& error_callback); |
| 105 | 107 |
| 108 // Called by BluetoothAdapterBlueZ to update BluetoothDevice->service_data_ | |
| 109 // when receive DevicePropertyChanged event from dbus. | |
| 110 void UpdateServiceData(); | |
|
ortuno
2016/10/05 06:27:10
nit: [...] when we receive a DevicePropertyChanged
puthik_chromium
2016/10/06 01:49:56
Done.
| |
| 111 | |
| 106 // Creates a pairing object with the given delegate |pairing_delegate| and | 112 // Creates a pairing object with the given delegate |pairing_delegate| and |
| 107 // establishes it as the pairing context for this device. All pairing-related | 113 // establishes it as the pairing context for this device. All pairing-related |
| 108 // method calls will be forwarded to this object until it is released. | 114 // method calls will be forwarded to this object until it is released. |
| 109 BluetoothPairingBlueZ* BeginPairing( | 115 BluetoothPairingBlueZ* BeginPairing( |
| 110 BluetoothDevice::PairingDelegate* pairing_delegate); | 116 BluetoothDevice::PairingDelegate* pairing_delegate); |
| 111 | 117 |
| 112 // Releases the current pairing object, any pairing-related method calls will | 118 // Releases the current pairing object, any pairing-related method calls will |
| 113 // be ignored. | 119 // be ignored. |
| 114 void EndPairing(); | 120 void EndPairing(); |
| 115 | 121 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 245 // Note: This should remain the last member so it'll be destroyed and | 251 // Note: This should remain the last member so it'll be destroyed and |
| 246 // invalidate its weak pointers before any other members are destroyed. | 252 // invalidate its weak pointers before any other members are destroyed. |
| 247 base::WeakPtrFactory<BluetoothDeviceBlueZ> weak_ptr_factory_; | 253 base::WeakPtrFactory<BluetoothDeviceBlueZ> weak_ptr_factory_; |
| 248 | 254 |
| 249 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceBlueZ); | 255 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceBlueZ); |
| 250 }; | 256 }; |
| 251 | 257 |
| 252 } // namespace bluez | 258 } // namespace bluez |
| 253 | 259 |
| 254 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_DEVICE_BLUEZ_H_ | 260 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_DEVICE_BLUEZ_H_ |
| OLD | NEW |