Index: chrome/browser/chromeos/bluetooth/bluetooth_adapter.h |
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.h b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.h |
index 599a22133c394e9ccc4855a9658d84c636561b18..826e6c0d5fac5722ecf190ba9cef674c381c03b2 100644 |
--- a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.h |
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.h |
@@ -16,6 +16,7 @@ |
#include "chromeos/dbus/bluetooth_adapter_client.h" |
#include "chromeos/dbus/bluetooth_device_client.h" |
#include "chromeos/dbus/bluetooth_manager_client.h" |
+#include "chromeos/dbus/bluetooth_out_of_band_client.h" |
#include "dbus/object_path.h" |
namespace chromeos { |
@@ -91,6 +92,11 @@ class BluetoothAdapter : private BluetoothManagerClient::Observer, |
// is called, in the success case the callback is simply not called. |
typedef base::Callback<void()> ErrorCallback; |
+ // The BluetoothOutOfBandPairingDataCallback is used to return |
+ // BluetoothOutOfBandPairingData to the caller. |
+ typedef base::Callback<void(const BluetoothOutOfBandPairingData& data)> |
+ BluetoothOutOfBandPairingDataCallback; |
+ |
// The address of this adapter. The address format is "XX:XX:XX:XX:XX:XX", |
// where each XX is a hexadecimal number. |
const std::string& address() const { return address_; } |
@@ -135,6 +141,11 @@ class BluetoothAdapter : private BluetoothManagerClient::Observer, |
BluetoothDevice* GetDevice(const std::string& address); |
const BluetoothDevice* GetDevice(const std::string& address) const; |
+ // Requests the local Out Of Band pairing data. |
+ virtual void ReadLocalOutOfBandPairingData( |
+ const BluetoothOutOfBandPairingDataCallback& callback, |
+ const ErrorCallback& error_callback); |
+ |
// Creates the instance for the default adapter, whichever that may |
// be at the time. Use IsPresent() and the AdapterPresentChanged() observer |
// method to determine whether an adapter is actually available or not. |
@@ -214,6 +225,12 @@ class BluetoothAdapter : private BluetoothManagerClient::Observer, |
// changed signal, and directly using values obtained from properties. |
void DiscoveringChanged(bool discovering); |
+ // Called by dbus:: in response to the ReadLocalData method call. |
+ void OnReadLocalData(const BluetoothOutOfBandPairingDataCallback& callback, |
+ const ErrorCallback& error_callback, |
+ const BluetoothOutOfBandPairingData& data, |
+ bool success); |
+ |
// BluetoothAdapterClient::Observer override. |
// |
// Called when the adapter with object path |adapter_path| has a |