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

Commit 49232e9c authored by Chris Manton's avatar Chris Manton
Browse files

Fully encapsulate tBTM_SEC_DEV_REC::is_originator

Towards encapsulated code

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

Change-Id: Ia8874c80ceedeb6e331dfbff48e3fc9ddee6cc87
parent 996e18d4
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -309,7 +309,22 @@ struct tBTM_SEC_DEV_REC {
    return sec_state == BTM_SEC_STATE_DISCONNECTING_BOTH;
  }

 private:
  bool is_originator;         /* true if device is originating connection */
  friend tBTM_STATUS BTM_SetEncryption(const RawAddress& bd_addr,
                                       tBT_TRANSPORT transport,
                                       tBTM_SEC_CALLBACK* p_callback,
                                       void* p_ref_data,
                                       tBTM_BLE_SEC_ACT sec_act);
  friend tBTM_STATUS btm_sec_l2cap_access_req_by_requirement(
      const RawAddress& bd_addr, uint16_t security_required, bool is_originator,
      tBTM_SEC_CALLBACK* p_callback, void* p_ref_data);
  friend tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr,
                                               bool is_originator,
                                               uint16_t security_required,
                                               tBTM_SEC_CALLBACK* p_callback,
                                               void* p_ref_data);

 public:
  bool IsLocallyInitiated() const { return is_originator; }