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

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: rebase 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 726e85c48f556e32cc00dd7a2397c0fcaa3c98f5..8e4dd93ea37b406d9671e946e36cf6e1c8618691 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_; }
@@ -132,8 +138,13 @@ class BluetoothAdapter : private BluetoothManagerClient::Observer,
// Returns a pointer to the device with the given address |address| or
// NULL if no such device is known.
- BluetoothDevice* GetDevice(const std::string& address);
- const BluetoothDevice* GetDevice(const std::string& address) const;
+ virtual BluetoothDevice* GetDevice(const std::string& address);
+ virtual 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
@@ -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
« no previous file with comments | « no previous file | chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698