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

Commit e82ca001 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Make ISecurityManagerListener into abstract class

Bug: 143169747
Bug: 142341141
Change-Id: I67ef0d20c6cbd0289cce30389a0bd505e5fc1552
parent 16509bb4
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;