Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Unified Diff: chrome/browser/chromeos/bluetooth/bluetooth_adapter.h

Issue 10546010: Implement support for the OOB Pairing APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698