Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c06204f2 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Make ISecurityManagerListener into abstract class am: e82ca001 am: e4c19c9c

am: bd5676cb

Change-Id: Ifda364476ef7d6caefd7cae8565d33cb8ed2b6dd
parents 3b8b538a bd5676cb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -21,6 +21,9 @@

using namespace bluetooth::security;

// Definition of Pure Virtual Destructor
ISecurityManagerListener::~ISecurityManagerListener() {}

void SecurityManager::Init() {
  security_handler_->Post(
      common::BindOnce(&internal::SecurityManagerImpl::Init, common::Unretained(security_manager_impl_)));
+4 −4
Original line number Diff line number Diff line
@@ -34,28 +34,28 @@ namespace security {
class ISecurityManagerListener {
 public:
  ISecurityManagerListener(os::Handler* handler) : handler_(handler) {}
  virtual ~ISecurityManagerListener() = default;
  virtual ~ISecurityManagerListener() = 0;

  /**
   * Called when a device is successfully bonded.
   *
   * @param device pointer to the bonded device
   */
  virtual void OnDeviceBonded(std::shared_ptr<bluetooth::hci::Device> device);
  virtual void OnDeviceBonded(std::shared_ptr<bluetooth::hci::Device> device) = 0;

  /**
   * Called when a device is successfully un-bonded.
   *
   * @param device pointer to the device that is no longer bonded
   */
  virtual void OnDeviceUnbonded(std::shared_ptr<bluetooth::hci::Device> device);
  virtual void OnDeviceUnbonded(std::shared_ptr<bluetooth::hci::Device> device) = 0;

  /**
   * Called as a result of a failure during the bonding process.
   *
   * @param device pointer to the device that is no longer bonded
   */
  virtual void OnDeviceBondFailed(std::shared_ptr<bluetooth::hci::Device> device);
  virtual void OnDeviceBondFailed(std::shared_ptr<bluetooth::hci::Device> device) = 0;

  bool operator==(const ISecurityManagerListener& rhs) const {
    return &*this == &rhs;