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

Unified Diff: chrome/browser/chromeos/bluetooth/bluetooth_device.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
Index: chrome/browser/chromeos/bluetooth/bluetooth_device.h
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_device.h b/chrome/browser/chromeos/bluetooth/bluetooth_device.h
index 7b6001ebfc620f47f56ffd2c2b41c1115c69cad5..2c3a24080f127bed1a6651677b30d8740606d6dc 100644
--- a/chrome/browser/chromeos/bluetooth/bluetooth_device.h
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_device.h
@@ -16,6 +16,7 @@
#include "base/string16.h"
#include "chromeos/dbus/bluetooth_agent_service_provider.h"
#include "chromeos/dbus/bluetooth_device_client.h"
+#include "chromeos/dbus/bluetooth_out_of_band_client.h"
#include "dbus/object_path.h"
namespace chromeos {
@@ -204,6 +205,10 @@ class BluetoothDevice : private BluetoothDeviceClient::Observer,
// is called, in the success case the callback is simply not called.
typedef base::Callback<void()> ErrorCallback;
+ // The VoidResultCallback is used for methods that do not return any data, to
+ // indicate that the action requested is complete.
+ typedef base::Callback<void()> VoidResultCallback;
+
// Initiates a connection to the device, pairing first if necessary.
//
// Method calls will be made on the supplied object |pairing_delegate|
@@ -273,6 +278,19 @@ class BluetoothDevice : private BluetoothDeviceClient::Observer,
void ConnectToService(const std::string& service_uuid,
const SocketCallback& callback);
+ // Sets the Out Of Band pairing data for this device to |data|. Exactly one
+ // of |callback| or |error_callback| will be run.
+ virtual void SetOutOfBandPairingData(
+ const chromeos::BluetoothOutOfBandPairingData& data,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback);
+
+ // Clears the Out Of Band pairing data for this device. Exactly one of
+ // |callback| or |error_callback| will be run.
+ virtual void ClearOutOfBandPairingData(
+ const base::Closure& callback,
+ const ErrorCallback& error_callback);
+
private:
friend class BluetoothAdapter;
friend class MockBluetoothDevice;
@@ -388,6 +406,12 @@ class BluetoothDevice : private BluetoothDeviceClient::Observer,
const BluetoothDeviceClient::ServiceMap& service_map,
bool success);
+ // Called by BlueoothDeviceClient in response to the AddRemoteData and
+ // RemoveRemoteData method calls.
+ void OnRemoteDataCallback(const base::Closure& callback,
+ const ErrorCallback& error_callback,
+ bool success);
+
// BluetoothDeviceClient::Observer override.
//
// Called when the device with object path |object_path| is about
« no previous file with comments | « chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc ('k') | chrome/browser/chromeos/bluetooth/bluetooth_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698