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

Commit 3a796541 authored by Zach Johnson's avatar Zach Johnson
Browse files

Format gd/shim with new clang-format

find shim -regex '.*\.\(cc\|h\|tpp\)' -exec clang-format -style=file -i {} \;

Test: cert/run --host
Bug: 156858180
Tag: #gd-refactor
Change-Id: I6c2493df5f3a9d66cbdcb503f991792bb1904884
parent 79a91a18
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
 */
#define LOG_TAG "bt_gd_shim"

#include "shim/dumpsys.h"

#include <algorithm>
#include <functional>
#include <future>
@@ -26,7 +28,6 @@
#include "module.h"
#include "os/handler.h"
#include "os/log.h"
#include "shim/dumpsys.h"

namespace bluetooth {
namespace shim {
@@ -85,8 +86,10 @@ void Dumpsys::impl::DumpWithArgs(int fd, const char** args, std::promise<void> p
    // TODO(cmanton) Create typical Dumper
  }

  std::for_each(dumpsys_functions_.begin(), dumpsys_functions_.end(),
                [fd](std::pair<const void*, DumpsysFunction> element) { element.second(fd); });
  std::for_each(
      dumpsys_functions_.begin(), dumpsys_functions_.end(), [fd](std::pair<const void*, DumpsysFunction> element) {
        element.second(fd);
      });
  promise.set_value();
}

+171 −90

File changed.

Preview size limit exceeded, changes collapsed.

+11 −4
Original line number Diff line number Diff line
@@ -37,11 +37,18 @@ using CreateConnectionPromise = std::promise<uint16_t>;

class L2cap : public bluetooth::Module {
 public:
  void RegisterService(uint16_t psm, bool use_ertm, uint16_t mtu, ConnectionCompleteCallback on_complete,
  void RegisterService(
      uint16_t psm,
      bool use_ertm,
      uint16_t mtu,
      ConnectionCompleteCallback on_complete,
      RegisterServicePromise register_promise);
  void UnregisterService(uint16_t psm, UnregisterServicePromise unregister_promise);

  void CreateConnection(uint16_t psm, const std::string address_string, ConnectionCompleteCallback on_complete,
  void CreateConnection(
      uint16_t psm,
      const std::string address_string,
      ConnectionCompleteCallback on_complete,
      CreateConnectionPromise create_promise);
  void CloseConnection(uint16_t cid);

+95 −48

File changed.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#define LOG_TAG "bt_gd_shim"

#include "shim/stack.h"

#include "att/att_module.h"
#include "hal/hci_hal.h"
#include "hci/acl_manager.h"