OSDN Git Service

Explicitly name stack/acl::tACL_CONN
authorChris Manton <cmanton@google.com>
Fri, 26 Feb 2021 23:12:03 +0000 (15:12 -0800)
committerChris Manton <cmanton@google.com>
Tue, 2 Mar 2021 16:53:11 +0000 (08:53 -0800)
Bug: 163134718
Test: cert
Tag: #refactor

Change-Id: Id7b934e9676e356d5f5580398c0268b42f557778

stack/acl/acl.cc
stack/acl/acl.h

index 465a03e..d0377fd 100644 (file)
 
 #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));
index e2e142f..ed20b61 100644 (file)
@@ -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;