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

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: refactor to create BluetoothOutOfBandClient 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 e61768a080df197169927746c113f33e6d0366ec..b08751b1f39c63396c0ea1296fa5fe730e7bf394 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,10 @@ class BluetoothAdapter : private BluetoothManagerClient::Observer,
// is called, in the success case the callback is simply not called.
typedef base::Callback<void()> ErrorCallback;
+ // The ResultCallback is used for methods that return a boolean value
+ // indicating success (true) or failure (false).
+ typedef base::Callback<void(bool result)> ResultCallback;
keybuk 2012/06/08 20:06:39 This isn't the style of these classes - they use s
bryeung 2012/06/14 15:31:07 Done.
+
// 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_; }
@@ -131,6 +136,19 @@ 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 BluetoothOutOfBandClient::DataCallback& callback) const;
+
+ // Sets the Out Of Band pairing data for the device at |address| to |data|.
+ void SetOutOfBandPairingData(const std::string& address,
+ const chromeos::BluetoothOutOfBandPairingData& data,
+ const chromeos::BluetoothOutOfBandClient::SuccessCallback& callback);
keybuk 2012/06/08 20:06:39 Should this not be on BluetoothDevice if it takes
bryeung 2012/06/14 15:31:08 Done.
+
+ // Clears the Out Of Band pairing data for the device at |address|.
+ virtual void ClearOutOfBandPairingData(const std::string& address,
+ const chromeos::BluetoothOutOfBandClient::SuccessCallback& callback);
keybuk 2012/06/08 20:06:39 Likewise maybe this should be on BluetoothDevice?
bryeung 2012/06/14 15:31:08 Done.
+
// 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.

Powered by Google App Engine
This is Rietveld 408576698