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

Commit 5183a91b authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Add names for all shim modules am: e4121031

Change-Id: Iae4d73e3280a0e1373625553d9c9ca43dd9c8ab6
parents 0c01b1e2 e4121031
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@

#include <functional>
#include <memory>
#include <string>

#include "hci/address.h"
#include "hci/hci_packets.h"
@@ -29,6 +30,10 @@
namespace bluetooth {
namespace shim {

namespace {
constexpr char kModuleName[] = "shim::Advertising";
}  // namespace

struct Advertising::impl {
  impl(hci::LeAdvertisingManager* module, os::Handler* handler);
  ~impl();
@@ -121,5 +126,9 @@ void Advertising::Stop() {
  pimpl_.reset();
}

std::string Advertising::ToString() const {
  return kModuleName;
}

}  // namespace shim
}  // namespace bluetooth
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ class Advertising : public bluetooth::Module, public bluetooth::shim::IAdvertisi
  void ListDependencies(ModuleList* list) override;  // Module
  void Start() override;                             // Module
  void Stop() override;                              // Module
  std::string ToString() const override;             // Module

 private:
  struct impl;
+9 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#define LOG_TAG "bt_gd_shim"

#include <memory>
#include <string>

#include "common/bidi_queue.h"
#include "hci/address.h"
@@ -30,6 +31,10 @@
namespace bluetooth {
namespace shim {

namespace {
constexpr char kModuleName[] = "shim::Connectability";
}  // namespace

const ModuleFactory Connectability::Factory = ModuleFactory([]() { return new Connectability(); });

struct Connectability::impl {
@@ -65,5 +70,9 @@ void Connectability::Stop() {
  pimpl_.reset();
}

std::string Connectability::ToString() const {
  return kModuleName;
}

}  // namespace shim
}  // namespace bluetooth
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#pragma once

#include <memory>
#include <string>

#include "module.h"
#include "shim/iconnectability.h"
@@ -38,6 +39,7 @@ class Connectability : public bluetooth::Module, public bluetooth::shim::IConnec
  void ListDependencies(ModuleList* list) override;  // Module
  void Start() override;                             // Module
  void Stop() override;                              // Module
  std::string ToString() const override;             // Module

 private:
  struct impl;
+10 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#define LOG_TAG "bt_gd_shim"

#include <memory>
#include <string>

#include "common/bidi_queue.h"
#include "hci/address.h"
@@ -29,7 +30,9 @@
namespace bluetooth {
namespace shim {

const ModuleFactory Controller::Factory = ModuleFactory([]() { return new Controller(); });
namespace {
constexpr char kModuleName[] = "shim::Controller";
}  // namespace

struct Controller::impl {
  impl(hci::Controller* hci_controller) : hci_controller_(hci_controller) {}
@@ -37,6 +40,8 @@ struct Controller::impl {
  hci::Controller* hci_controller_{nullptr};
};

const ModuleFactory Controller::Factory = ModuleFactory([]() { return new Controller(); });

bool Controller::IsCommandSupported(int op_code) const {
  return pimpl_->hci_controller_->IsSupported((bluetooth::hci::OpCode)op_code);
}
@@ -109,5 +114,9 @@ void Controller::Stop() {
  pimpl_.reset();
}

std::string Controller::ToString() const {
  return kModuleName;
}

}  // namespace shim
}  // namespace bluetooth
Loading