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

Commit 0a892892 authored by Chris Manton's avatar Chris Manton
Browse files

Add API tACL_CONN::is_{disconnect/role_switch}_pending

Towards encapsulated code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I0420630f45bb16719e669c9f75f929ba46c88c2e
parent ecabc2d2
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -253,6 +253,14 @@ struct sACL_CONN {
#define BTM_SEC_DISC_PENDING 2   /* Disconnect is pending */
  uint8_t rs_disc_pending = BTM_SEC_RS_NOT_PENDING;

 public:
  bool is_disconnect_pending() const {
    return rs_disc_pending == BTM_SEC_DISC_PENDING;
  }
  bool is_role_switch_pending() const {
    return rs_disc_pending == BTM_SEC_RS_PENDING;
  }

 private:
  uint8_t switch_role_state_;