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

Commit 052bfbe4 authored by Chris Manton's avatar Chris Manton
Browse files

gd::hci::acl_manager whitespace format

Bug: 314828950
Test: atest bluetooth_test_gd_unit
Flag: EXEMPT, whitespace change only

Change-Id: I3b3a1c0559ae8fc7e423edbb5f105acf7880965d
parent d43e85cf
Loading
Loading
Loading
Loading
+135 −122
Original line number Diff line number Diff line
@@ -33,18 +33,17 @@
#include "os/handler.h"

namespace bluetooth {

namespace security {
class SecurityModule;
}
}  // namespace security
namespace shim {
namespace legacy {
class Acl;
}
}  // namespace legacy

class Btm;
bool L2CA_SetAclPriority(uint16_t, bool);
}
}  // namespace shim

namespace hci {

@@ -60,20 +59,25 @@ public:
  AclManager(const AclManager&) = delete;
  AclManager& operator=(const AclManager&) = delete;

 // NOTE: It is necessary to forward declare a default destructor that overrides the base class one, because
 // "struct impl" is forwarded declared in .cc and compiler needs a concrete definition of "struct impl" when
 // compiling AclManager's destructor. Hence we need to forward declare the destructor for AclManager to delay
 // compiling AclManager's destructor until it starts linking the .cc file.
  // NOTE: It is necessary to forward declare a default destructor that
  // overrides the base class one, because "struct impl" is forwarded declared
  // in .cc and compiler needs a concrete definition of "struct impl" when
  // compiling AclManager's destructor. Hence we need to forward declare the
  // destructor for AclManager to delay compiling AclManager's destructor until
  // it starts linking the .cc file.
  ~AclManager();

  // Should register only once when user module starts.
  // Generates OnConnectSuccess when an incoming connection is established.
  virtual void RegisterCallbacks(acl_manager::ConnectionCallbacks* callbacks, os::Handler* handler);
 virtual void UnregisterCallbacks(acl_manager::ConnectionCallbacks* callbacks, std::promise<void> promise);
  virtual void UnregisterCallbacks(
      acl_manager::ConnectionCallbacks* callbacks, std::promise<void> promise);

  // Should register only once when user module starts.
 virtual void RegisterLeCallbacks(acl_manager::LeConnectionCallbacks* callbacks, os::Handler* handler);
 virtual void UnregisterLeCallbacks(acl_manager::LeConnectionCallbacks* callbacks, std::promise<void> promise);
  virtual void RegisterLeCallbacks(
      acl_manager::LeConnectionCallbacks* callbacks, os::Handler* handler);
  virtual void UnregisterLeCallbacks(
      acl_manager::LeConnectionCallbacks* callbacks, std::promise<void> promise);
  void RegisterLeAcceptlistCallbacks(acl_manager::LeAcceptlistCallbacks* callbacks);
  void UnregisterLeAcceptlistCallbacks(
      acl_manager::LeAcceptlistCallbacks* callbacks, std::promise<void> promise);
@@ -88,7 +92,11 @@ public:
  virtual void SetLeSuggestedDefaultDataParameters(uint16_t octets, uint16_t time);

  virtual void LeSetDefaultSubrate(
     uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout);
      uint16_t subrate_min,
      uint16_t subrate_max,
      uint16_t max_latency,
      uint16_t cont_num,
      uint16_t sup_tout);

  virtual void SetPrivacyPolicyForInitiatorAddress(
      LeAddressManager::AddressPolicy address_policy,
@@ -104,8 +112,9 @@ public:
      std::chrono::milliseconds minimum_rotation_time,
      std::chrono::milliseconds maximum_rotation_time);

 // Generates OnConnectFail with error code "terminated by local host 0x16" if cancelled, or OnConnectSuccess if not
 // successfully cancelled and already connected
  // Generates OnConnectFail with error code "terminated by local host 0x16" if
  // cancelled, or OnConnectSuccess if not successfully cancelled and already
  // connected
  virtual void CancelConnect(Address address);
  virtual void RemoveFromBackgroundList(AddressWithType address_with_type);
  virtual void IsOnBackgroundList(AddressWithType address_with_type, std::promise<bool> promise);
@@ -134,7 +143,8 @@ public:
      hci::AddressWithType adv_address,
      bool is_discoverable);

 // In order to avoid circular dependency use setter rather than module dependency.
  // In order to avoid circular dependency use setter rather than module
  // dependency.
  virtual void SetSecurityModule(security::SecurityModule* security_module);

  virtual LeAddressManager* GetLeAddressManager();
@@ -155,14 +165,17 @@ protected:

  std::string ToString() const override;

 DumpsysDataFinisher GetDumpsysData(flatbuffers::FlatBufferBuilder* builder) const override;  // Module
  DumpsysDataFinisher GetDumpsysData(
      flatbuffers::FlatBufferBuilder* builder) const override;  // Module

 private:
  virtual uint16_t HACK_GetHandle(const Address address);
  virtual uint16_t HACK_GetLeHandle(const Address address);

 // Hack for the shim to get non-acl disconnect callback. Shim needs to post to their handler!
 virtual void HACK_SetNonAclDisconnectCallback(std::function<void(uint16_t /* handle */, uint8_t /* reason */)>);
  // Hack for the shim to get non-acl disconnect callback. Shim needs to post to
  // their handler!
  virtual void HACK_SetNonAclDisconnectCallback(
      std::function<void(uint16_t /* handle */, uint8_t /* reason */)>);

  virtual void HACK_SetAclTxPriority(uint8_t handle, bool high_priority);