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

Commit ecaf9895 authored by Chris Manton's avatar Chris Manton
Browse files

Explicitly name stack/acl::tACL_CONN

Bug: 163134718
Test: cert
Tag: #refactor

Change-Id: Id7b934e9676e356d5f5580398c0268b42f557778
parent 5aa37124
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -16,11 +16,11 @@

#include "stack/acl/acl.h"

tBTM_PM_MODE sACL_CONN::sPolicy::Mode() const { return this->mode.mode_; }
tBTM_PM_MODE tACL_CONN::sPolicy::Mode() const { return this->mode.mode_; }

hci_role_t sACL_CONN::sPolicy::Role() const { return this->role.role_; }
hci_role_t tACL_CONN::sPolicy::Role() const { return this->role.role_; }

void sACL_CONN::Reset() {
void tACL_CONN::Reset() {
  memset(peer_le_features, 0, sizeof(peer_le_features));
  peer_le_features_valid = false;
  memset(peer_lmp_feature_pages, 0, sizeof(peer_lmp_feature_pages));
+8 −11
Original line number Diff line number Diff line
@@ -112,8 +112,6 @@ inline std::string power_mode_state_text(tBTM_PM_STATE state) {
  }
}

struct sACL_CONN;

namespace bluetooth {
namespace shim {
tBTM_STATUS BTM_SetPowerMode(uint16_t handle, const tBTM_PM_PWR_MD& new_mode);
@@ -169,7 +167,7 @@ struct tBTM_PM_MCB {
  uint16_t handle_;
};

struct sACL_CONN {
struct tACL_CONN {
  BD_FEATURES peer_le_features;
  bool peer_le_features_valid;
  BD_FEATURES peer_lmp_feature_pages[HCI_EXT_FEATURES_PAGE_MAX + 1];
@@ -330,8 +328,8 @@ struct sACL_CONN {
                                                         uint16_t handle,
                                                         tHCI_MODE hci_mode,
                                                         uint16_t interval);
      friend void sACL_CONN::Reset();
      friend tBTM_PM_MODE sACL_CONN::sPolicy::Mode() const;
      friend void tACL_CONN::Reset();
      friend tBTM_PM_MODE tACL_CONN::sPolicy::Mode() const;
    } mode;

    hci_role_t Role() const;
@@ -341,8 +339,8 @@ struct sACL_CONN {
     private:
      hci_role_t role_{HCI_ROLE_CENTRAL};
      unsigned role_switch_failed_cnt_{0};
      friend void sACL_CONN::Reset();
      friend tBTM_PM_MODE sACL_CONN::sPolicy::Role() const;
      friend void tACL_CONN::Reset();
      friend tBTM_PM_MODE tACL_CONN::sPolicy::Role() const;
    } role;

    struct {
@@ -358,18 +356,17 @@ struct sACL_CONN {
          tHCI_STATUS status, uint16_t handle,
          uint16_t maximum_transmit_latency, uint16_t maximum_receive_latency,
          uint16_t minimum_remote_timeout, uint16_t minimum_local_timeout);
      friend void sACL_CONN::Reset();
      friend void tACL_CONN::Reset();
    } sniff_subrating;

    tLINK_POLICY Settings() const { return settings_; }

   private:
    tLINK_POLICY settings_{kAllLinkPoliciesEnabled};
    friend void btm_set_link_policy(sACL_CONN* conn, tLINK_POLICY policy);
    friend void sACL_CONN::Reset();
    friend void btm_set_link_policy(tACL_CONN* conn, tLINK_POLICY policy);
    friend void tACL_CONN::Reset();
  } policy;
};
typedef sACL_CONN tACL_CONN;

struct controller_t;