Commit f5d7fa32 authored by danakj's avatar danakj Committed by Commit Bot

Convert Callbacks to OnceCallbacks for BluetookAgentServiceProvider.

This will allow us to convert more Callbacks in the bluetooth component
over to OnceCallbacks, which will let us convert Callbacks in content
eventually.

R=reillyg@chromium.org

Bug: 953861
Change-Id: I21555216157c1d56249c6ec93c910ce19a68f8a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1572368Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652222}
parent cd9b5ac2
......@@ -774,18 +774,18 @@ void BluetoothAdapterBlueZ::Released() {
}
void BluetoothAdapterBlueZ::RequestPinCode(const dbus::ObjectPath& device_path,
const PinCodeCallback& callback) {
PinCodeCallback callback) {
DCHECK(IsPresent());
DCHECK(agent_.get());
BLUETOOTH_LOG(EVENT) << device_path.value() << ": RequestPinCode";
BluetoothPairingBlueZ* pairing = GetPairing(device_path);
if (!pairing) {
callback.Run(REJECTED, "");
std::move(callback).Run(REJECTED, "");
return;
}
pairing->RequestPinCode(callback);
pairing->RequestPinCode(std::move(callback));
}
void BluetoothAdapterBlueZ::DisplayPinCode(const dbus::ObjectPath& device_path,
......@@ -803,18 +803,18 @@ void BluetoothAdapterBlueZ::DisplayPinCode(const dbus::ObjectPath& device_path,
}
void BluetoothAdapterBlueZ::RequestPasskey(const dbus::ObjectPath& device_path,
const PasskeyCallback& callback) {
PasskeyCallback callback) {
DCHECK(IsPresent());
DCHECK(agent_.get());
BLUETOOTH_LOG(EVENT) << device_path.value() << ": RequestPasskey";
BluetoothPairingBlueZ* pairing = GetPairing(device_path);
if (!pairing) {
callback.Run(REJECTED, 0);
std::move(callback).Run(REJECTED, 0);
return;
}
pairing->RequestPasskey(callback);
pairing->RequestPasskey(std::move(callback));
}
void BluetoothAdapterBlueZ::DisplayPasskey(const dbus::ObjectPath& device_path,
......@@ -838,7 +838,7 @@ void BluetoothAdapterBlueZ::DisplayPasskey(const dbus::ObjectPath& device_path,
void BluetoothAdapterBlueZ::RequestConfirmation(
const dbus::ObjectPath& device_path,
uint32_t passkey,
const ConfirmationCallback& callback) {
ConfirmationCallback callback) {
DCHECK(IsPresent());
DCHECK(agent_.get());
BLUETOOTH_LOG(EVENT) << device_path.value()
......@@ -846,40 +846,40 @@ void BluetoothAdapterBlueZ::RequestConfirmation(
BluetoothPairingBlueZ* pairing = GetPairing(device_path);
if (!pairing) {
callback.Run(REJECTED);
std::move(callback).Run(REJECTED);
return;
}
pairing->RequestConfirmation(passkey, callback);
pairing->RequestConfirmation(passkey, std::move(callback));
}
void BluetoothAdapterBlueZ::RequestAuthorization(
const dbus::ObjectPath& device_path,
const ConfirmationCallback& callback) {
ConfirmationCallback callback) {
DCHECK(IsPresent());
DCHECK(agent_.get());
BLUETOOTH_LOG(EVENT) << device_path.value() << ": RequestAuthorization";
BluetoothPairingBlueZ* pairing = GetPairing(device_path);
if (!pairing) {
callback.Run(REJECTED);
std::move(callback).Run(REJECTED);
return;
}
pairing->RequestAuthorization(callback);
pairing->RequestAuthorization(std::move(callback));
}
void BluetoothAdapterBlueZ::AuthorizeService(
const dbus::ObjectPath& device_path,
const std::string& uuid,
const ConfirmationCallback& callback) {
ConfirmationCallback callback) {
DCHECK(IsPresent());
DCHECK(agent_.get());
BLUETOOTH_LOG(EVENT) << device_path.value() << ": AuthorizeService: " << uuid;
BluetoothDeviceBlueZ* device_bluez = GetDeviceWithPath(device_path);
if (!device_bluez) {
callback.Run(CANCELLED);
std::move(callback).Run(CANCELLED);
return;
}
......@@ -888,7 +888,7 @@ void BluetoothAdapterBlueZ::AuthorizeService(
// our "Set('Trusted', true)" method call is still pending in the Bluetooth
// daemon because it's busy handling the incoming connection.
if (device_bluez->IsPaired()) {
callback.Run(SUCCESS);
std::move(callback).Run(SUCCESS);
return;
}
......@@ -896,7 +896,7 @@ void BluetoothAdapterBlueZ::AuthorizeService(
// whether this is acceptable long-term.
BLUETOOTH_LOG(ERROR) << "Rejecting service connection from unpaired device "
<< device_bluez->GetAddress() << " for UUID " << uuid;
callback.Run(REJECTED);
std::move(callback).Run(REJECTED);
}
void BluetoothAdapterBlueZ::Cancel() {
......
......@@ -287,22 +287,22 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterBlueZ
// bluez::BluetoothAgentServiceProvider::Delegate override.
void Released() override;
void RequestPinCode(const dbus::ObjectPath& device_path,
const PinCodeCallback& callback) override;
PinCodeCallback callback) override;
void DisplayPinCode(const dbus::ObjectPath& device_path,
const std::string& pincode) override;
void RequestPasskey(const dbus::ObjectPath& device_path,
const PasskeyCallback& callback) override;
PasskeyCallback callback) override;
void DisplayPasskey(const dbus::ObjectPath& device_path,
uint32_t passkey,
uint16_t entered) override;
void RequestConfirmation(const dbus::ObjectPath& device_path,
uint32_t passkey,
const ConfirmationCallback& callback) override;
ConfirmationCallback callback) override;
void RequestAuthorization(const dbus::ObjectPath& device_path,
const ConfirmationCallback& callback) override;
ConfirmationCallback callback) override;
void AuthorizeService(const dbus::ObjectPath& device_path,
const std::string& uuid,
const ConfirmationCallback& callback) override;
ConfirmationCallback callback) override;
void Cancel() override;
// Called by dbus:: on completion of the D-Bus method call to register the
......
......@@ -53,32 +53,31 @@ BluetoothPairingBlueZ::~BluetoothPairingBlueZ() {
}
if (!pincode_callback_.is_null()) {
pincode_callback_.Run(
bluez::BluetoothAgentServiceProvider::Delegate::CANCELLED, "");
std::move(pincode_callback_)
.Run(bluez::BluetoothAgentServiceProvider::Delegate::CANCELLED, "");
}
if (!passkey_callback_.is_null()) {
passkey_callback_.Run(
bluez::BluetoothAgentServiceProvider::Delegate::CANCELLED, 0);
std::move(passkey_callback_)
.Run(bluez::BluetoothAgentServiceProvider::Delegate::CANCELLED, 0);
}
if (!confirmation_callback_.is_null()) {
confirmation_callback_.Run(
bluez::BluetoothAgentServiceProvider::Delegate::CANCELLED);
std::move(confirmation_callback_)
.Run(bluez::BluetoothAgentServiceProvider::Delegate::CANCELLED);
}
pairing_delegate_ = NULL;
}
void BluetoothPairingBlueZ::RequestPinCode(
const bluez::BluetoothAgentServiceProvider::Delegate::PinCodeCallback&
callback) {
bluez::BluetoothAgentServiceProvider::Delegate::PinCodeCallback callback) {
UMA_HISTOGRAM_ENUMERATION("Bluetooth.PairingMethod",
UMA_PAIRING_METHOD_REQUEST_PINCODE,
UMA_PAIRING_METHOD_COUNT);
ResetCallbacks();
pincode_callback_ = callback;
pincode_callback_ = std::move(callback);
pairing_delegate_used_ = true;
pairing_delegate_->RequestPinCode(device_);
}
......@@ -91,9 +90,8 @@ void BluetoothPairingBlueZ::SetPinCode(const std::string& pincode) {
if (pincode_callback_.is_null())
return;
pincode_callback_.Run(bluez::BluetoothAgentServiceProvider::Delegate::SUCCESS,
pincode);
pincode_callback_.Reset();
std::move(pincode_callback_)
.Run(bluez::BluetoothAgentServiceProvider::Delegate::SUCCESS, pincode);
// If this is not an outgoing connection to the device, clean up the pairing
// context since the pairing is done. The outgoing connection case is cleaned
......@@ -119,14 +117,13 @@ void BluetoothPairingBlueZ::DisplayPinCode(const std::string& pincode) {
}
void BluetoothPairingBlueZ::RequestPasskey(
const bluez::BluetoothAgentServiceProvider::Delegate::PasskeyCallback&
callback) {
bluez::BluetoothAgentServiceProvider::Delegate::PasskeyCallback callback) {
UMA_HISTOGRAM_ENUMERATION("Bluetooth.PairingMethod",
UMA_PAIRING_METHOD_REQUEST_PASSKEY,
UMA_PAIRING_METHOD_COUNT);
ResetCallbacks();
passkey_callback_ = callback;
passkey_callback_ = std::move(callback);
pairing_delegate_used_ = true;
pairing_delegate_->RequestPasskey(device_);
}
......@@ -139,9 +136,8 @@ void BluetoothPairingBlueZ::SetPasskey(uint32_t passkey) {
if (passkey_callback_.is_null())
return;
passkey_callback_.Run(bluez::BluetoothAgentServiceProvider::Delegate::SUCCESS,
passkey);
passkey_callback_.Reset();
std::move(passkey_callback_)
.Run(bluez::BluetoothAgentServiceProvider::Delegate::SUCCESS, passkey);
// If this is not an outgoing connection to the device, clean up the pairing
// context since the pairing is done. The outgoing connection case is cleaned
......@@ -173,26 +169,26 @@ void BluetoothPairingBlueZ::KeysEntered(uint16_t entered) {
void BluetoothPairingBlueZ::RequestConfirmation(
uint32_t passkey,
const bluez::BluetoothAgentServiceProvider::Delegate::ConfirmationCallback&
bluez::BluetoothAgentServiceProvider::Delegate::ConfirmationCallback
callback) {
UMA_HISTOGRAM_ENUMERATION("Bluetooth.PairingMethod",
UMA_PAIRING_METHOD_CONFIRM_PASSKEY,
UMA_PAIRING_METHOD_COUNT);
ResetCallbacks();
confirmation_callback_ = callback;
confirmation_callback_ = std::move(callback);
pairing_delegate_used_ = true;
pairing_delegate_->ConfirmPasskey(device_, passkey);
}
void BluetoothPairingBlueZ::RequestAuthorization(
const bluez::BluetoothAgentServiceProvider::Delegate::ConfirmationCallback&
bluez::BluetoothAgentServiceProvider::Delegate::ConfirmationCallback
callback) {
UMA_HISTOGRAM_ENUMERATION("Bluetooth.PairingMethod", UMA_PAIRING_METHOD_NONE,
UMA_PAIRING_METHOD_COUNT);
ResetCallbacks();
confirmation_callback_ = callback;
confirmation_callback_ = std::move(callback);
pairing_delegate_used_ = true;
pairing_delegate_->AuthorizePairing(device_);
}
......@@ -205,9 +201,8 @@ void BluetoothPairingBlueZ::ConfirmPairing() {
if (confirmation_callback_.is_null())
return;
confirmation_callback_.Run(
bluez::BluetoothAgentServiceProvider::Delegate::SUCCESS);
confirmation_callback_.Reset();
std::move(confirmation_callback_)
.Run(bluez::BluetoothAgentServiceProvider::Delegate::SUCCESS);
// If this is not an outgoing connection to the device, clean up the pairing
// context since the pairing is done. The outgoing connection case is cleaned
......@@ -243,20 +238,17 @@ bool BluetoothPairingBlueZ::RunPairingCallbacks(
bool callback_run = false;
if (!pincode_callback_.is_null()) {
pincode_callback_.Run(status, "");
pincode_callback_.Reset();
std::move(pincode_callback_).Run(status, "");
callback_run = true;
}
if (!passkey_callback_.is_null()) {
passkey_callback_.Run(status, 0);
passkey_callback_.Reset();
std::move(passkey_callback_).Run(status, 0);
callback_run = true;
}
if (!confirmation_callback_.is_null()) {
confirmation_callback_.Run(status);
confirmation_callback_.Reset();
std::move(confirmation_callback_).Run(status);
callback_run = true;
}
......
......@@ -39,8 +39,7 @@ class BluetoothPairingBlueZ {
// calls on this object are translated into the appropriate response to
// |callback|.
void RequestPinCode(
const bluez::BluetoothAgentServiceProvider::Delegate::PinCodeCallback&
callback);
bluez::BluetoothAgentServiceProvider::Delegate::PinCodeCallback callback);
// Indicates whether the device is currently pairing and expecting a
// PIN Code to be returned.
......@@ -61,8 +60,7 @@ class BluetoothPairingBlueZ {
// calls on this object are translated into the appropriate response to
// |callback|.
void RequestPasskey(
const bluez::BluetoothAgentServiceProvider::Delegate::PasskeyCallback&
callback);
bluez::BluetoothAgentServiceProvider::Delegate::PasskeyCallback callback);
// Sends the Passkey |passkey| to the remote device during pairing.
//
......@@ -84,16 +82,18 @@ class BluetoothPairingBlueZ {
// from the current pairing delegate. The ConfirmPairing(), RejectPairing()
// and CancelPairing() method calls on this object are translated into the
// appropriate response to |callback|.
void RequestConfirmation(uint32_t passkey,
const bluez::BluetoothAgentServiceProvider::
Delegate::ConfirmationCallback& callback);
void RequestConfirmation(
uint32_t passkey,
bluez::BluetoothAgentServiceProvider::Delegate::ConfirmationCallback
callback);
// Requests authorization that the current device be allowed to pair with
// this device from the current pairing delegate. The ConfirmPairing(),
// RejectPairing() and CancelPairing() method calls on this object are
// translated into the appropriate response to |callback|.
void RequestAuthorization(const bluez::BluetoothAgentServiceProvider::
Delegate::ConfirmationCallback& callback);
void RequestAuthorization(
bluez::BluetoothAgentServiceProvider::Delegate::ConfirmationCallback
callback);
// Confirms to the remote device during pairing that a passkey provided by
// the ConfirmPasskey() delegate call is displayed on both devices.
......
......@@ -147,11 +147,11 @@ class BluetoothAgentServiceProviderImpl : public BluetoothAgentServiceProvider {
return;
}
Delegate::PinCodeCallback callback = base::Bind(
Delegate::PinCodeCallback callback = base::BindOnce(
&BluetoothAgentServiceProviderImpl::OnPinCode,
weak_ptr_factory_.GetWeakPtr(), method_call, response_sender);
delegate_->RequestPinCode(device_path, callback);
delegate_->RequestPinCode(device_path, std::move(callback));
}
// Called by dbus:: when the Bluetooth daemon requires that the user
......@@ -191,11 +191,11 @@ class BluetoothAgentServiceProviderImpl : public BluetoothAgentServiceProvider {
return;
}
Delegate::PasskeyCallback callback = base::Bind(
Delegate::PasskeyCallback callback = base::BindOnce(
&BluetoothAgentServiceProviderImpl::OnPasskey,
weak_ptr_factory_.GetWeakPtr(), method_call, response_sender);
delegate_->RequestPasskey(device_path, callback);
delegate_->RequestPasskey(device_path, std::move(callback));
}
// Called by dbus:: when the Bluetooth daemon requires that the user
......@@ -240,11 +240,11 @@ class BluetoothAgentServiceProviderImpl : public BluetoothAgentServiceProvider {
return;
}
Delegate::ConfirmationCallback callback = base::Bind(
Delegate::ConfirmationCallback callback = base::BindOnce(
&BluetoothAgentServiceProviderImpl::OnConfirmation,
weak_ptr_factory_.GetWeakPtr(), method_call, response_sender);
delegate_->RequestConfirmation(device_path, passkey, callback);
delegate_->RequestConfirmation(device_path, passkey, std::move(callback));
}
// Called by dbus:: when the Bluetooth daemon requires that the user
......@@ -263,11 +263,11 @@ class BluetoothAgentServiceProviderImpl : public BluetoothAgentServiceProvider {
return;
}
Delegate::ConfirmationCallback callback = base::Bind(
Delegate::ConfirmationCallback callback = base::BindOnce(
&BluetoothAgentServiceProviderImpl::OnConfirmation,
weak_ptr_factory_.GetWeakPtr(), method_call, response_sender);
delegate_->RequestAuthorization(device_path, callback);
delegate_->RequestAuthorization(device_path, std::move(callback));
}
// Called by dbus:: when the Bluetooth daemon requires that the user
......@@ -287,11 +287,11 @@ class BluetoothAgentServiceProviderImpl : public BluetoothAgentServiceProvider {
return;
}
Delegate::ConfirmationCallback callback = base::Bind(
Delegate::ConfirmationCallback callback = base::BindOnce(
&BluetoothAgentServiceProviderImpl::OnConfirmation,
weak_ptr_factory_.GetWeakPtr(), method_call, response_sender);
delegate_->AuthorizeService(device_path, uuid, callback);
delegate_->AuthorizeService(device_path, uuid, std::move(callback));
}
// Called by dbus:: when the request failed before a reply was returned
......
......@@ -46,18 +46,19 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAgentServiceProvider {
// The PinCodeCallback is used for the RequestPinCode() method, it should
// be called with two arguments, the |status| of the request (success,
// rejected or cancelled) and the |pincode| requested.
typedef base::Callback<void(Status, const std::string&)> PinCodeCallback;
using PinCodeCallback =
base::OnceCallback<void(Status, const std::string&)>;
// The PasskeyCallback is used for the RequestPasskey() method, it should
// be called with two arguments, the |status| of the request (success,
// rejected or cancelled) and the |passkey| requested, a numeric in the
// range 0-999999,
typedef base::Callback<void(Status, uint32_t)> PasskeyCallback;
using PasskeyCallback = base::OnceCallback<void(Status, uint32_t)>;
// The ConfirmationCallback is used for methods which request confirmation
// or authorization, it should be called with one argument, the |status|
// of the request (success, rejected or cancelled).
typedef base::Callback<void(Status)> ConfirmationCallback;
using ConfirmationCallback = base::OnceCallback<void(Status)>;
// This method will be called when the agent is unregistered from the
// Bluetooth daemon, generally at the end of a pairing request. It may be
......@@ -74,7 +75,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAgentServiceProvider {
// PIN Codes are generally required for Bluetooth 2.0 and earlier devices
// for which there is no automatic pairing or special handling.
virtual void RequestPinCode(const dbus::ObjectPath& device_path,
const PinCodeCallback& callback) = 0;
PinCodeCallback callback) = 0;
// This method will be called when the Bluetooth daemon requires that the
// user enter the PIN code |pincode| into the device with object path
......@@ -98,7 +99,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAgentServiceProvider {
// which cannot provide input or display on their own, and don't accept
// passkey-less pairing.
virtual void RequestPasskey(const dbus::ObjectPath& device_path,
const PasskeyCallback& callback) = 0;
PasskeyCallback callback) = 0;
// This method will be called when the Bluetooth daemon requires that the
// user enter the Passkey |passkey| into the device with object path
......@@ -130,7 +131,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAgentServiceProvider {
// digits.
virtual void RequestConfirmation(const dbus::ObjectPath& device_path,
uint32_t passkey,
const ConfirmationCallback& callback) = 0;
ConfirmationCallback callback) = 0;
// This method will be called when the Bluetooth daemon requires
// authorization of an incoming pairing attempt from the device with object
......@@ -140,7 +141,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAgentServiceProvider {
// The agent should confirm the incoming pairing with the user and call
// |callback| to provide their response (success, rejected or cancelled).
virtual void RequestAuthorization(const dbus::ObjectPath& device_path,
const ConfirmationCallback& callback) = 0;
ConfirmationCallback callback) = 0;
// This method will be called when the Bluetooth daemon requires that the
// user confirm that the device with object path |object_path| is
......@@ -149,7 +150,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAgentServiceProvider {
// (success, rejected or cancelled).
virtual void AuthorizeService(const dbus::ObjectPath& device_path,
const std::string& uuid,
const ConfirmationCallback& callback) = 0;
ConfirmationCallback callback) = 0;
// This method will be called by the Bluetooth daemon to indicate that
// the request failed before a reply was returned from the device.
......
......@@ -37,10 +37,10 @@ void FakeBluetoothAgentServiceProvider::Release() {
void FakeBluetoothAgentServiceProvider::RequestPinCode(
const dbus::ObjectPath& device_path,
const Delegate::PinCodeCallback& callback) {
Delegate::PinCodeCallback callback) {
VLOG(1) << object_path_.value() << ": RequestPinCode for "
<< device_path.value();
delegate_->RequestPinCode(device_path, callback);
delegate_->RequestPinCode(device_path, std::move(callback));
}
void FakeBluetoothAgentServiceProvider::DisplayPinCode(
......@@ -53,10 +53,10 @@ void FakeBluetoothAgentServiceProvider::DisplayPinCode(
void FakeBluetoothAgentServiceProvider::RequestPasskey(
const dbus::ObjectPath& device_path,
const Delegate::PasskeyCallback& callback) {
Delegate::PasskeyCallback callback) {
VLOG(1) << object_path_.value() << ": RequestPasskey for "
<< device_path.value();
delegate_->RequestPasskey(device_path, callback);
delegate_->RequestPasskey(device_path, std::move(callback));
}
void FakeBluetoothAgentServiceProvider::DisplayPasskey(
......@@ -71,27 +71,27 @@ void FakeBluetoothAgentServiceProvider::DisplayPasskey(
void FakeBluetoothAgentServiceProvider::RequestConfirmation(
const dbus::ObjectPath& device_path,
uint32_t passkey,
const Delegate::ConfirmationCallback& callback) {
Delegate::ConfirmationCallback callback) {
VLOG(1) << object_path_.value() << ": RequestConfirmation " << passkey
<< " for " << device_path.value();
delegate_->RequestConfirmation(device_path, passkey, callback);
delegate_->RequestConfirmation(device_path, passkey, std::move(callback));
}
void FakeBluetoothAgentServiceProvider::RequestAuthorization(
const dbus::ObjectPath& device_path,
const Delegate::ConfirmationCallback& callback) {
Delegate::ConfirmationCallback callback) {
VLOG(1) << object_path_.value() << ": RequestAuthorization for "
<< device_path.value();
delegate_->RequestAuthorization(device_path, callback);
delegate_->RequestAuthorization(device_path, std::move(callback));
}
void FakeBluetoothAgentServiceProvider::AuthorizeService(
const dbus::ObjectPath& device_path,
const std::string& uuid,
const Delegate::ConfirmationCallback& callback) {
Delegate::ConfirmationCallback callback) {
VLOG(1) << object_path_.value() << ": AuthorizeService " << uuid << " for "
<< device_path.value();
delegate_->AuthorizeService(device_path, uuid, callback);
delegate_->AuthorizeService(device_path, uuid, std::move(callback));
}
void FakeBluetoothAgentServiceProvider::Cancel() {
......
......@@ -33,24 +33,22 @@ class DEVICE_BLUETOOTH_EXPORT FakeBluetoothAgentServiceProvider
// method on the object passed on construction.
virtual void Release();
virtual void RequestPinCode(const dbus::ObjectPath& device_path,
const Delegate::PinCodeCallback& callback);
Delegate::PinCodeCallback callback);
virtual void DisplayPinCode(const dbus::ObjectPath& device_path,
const std::string& pincode);
virtual void RequestPasskey(const dbus::ObjectPath& device_path,
const Delegate::PasskeyCallback& callback);
Delegate::PasskeyCallback callback);
virtual void DisplayPasskey(const dbus::ObjectPath& device_path,
uint32_t passkey,
int16_t entered);
virtual void RequestConfirmation(
const dbus::ObjectPath& device_path,
uint32_t passkey,
const Delegate::ConfirmationCallback& callback);
virtual void RequestAuthorization(
const dbus::ObjectPath& device_path,
const Delegate::ConfirmationCallback& callback);
virtual void RequestConfirmation(const dbus::ObjectPath& device_path,
uint32_t passkey,
Delegate::ConfirmationCallback callback);
virtual void RequestAuthorization(const dbus::ObjectPath& device_path,
Delegate::ConfirmationCallback callback);
virtual void AuthorizeService(const dbus::ObjectPath& device_path,
const std::string& uuid,
const Delegate::ConfirmationCallback& callback);
Delegate::ConfirmationCallback callback);
virtual void Cancel();
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment