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

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

Make ISecurityManagerListener into abstract class

am: e82ca001

Change-Id: Ib0a20666cc5d64381a0cca964680588f3645d845
parents 8d69f7f5 e82ca001
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;