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

Commit 6cedc97e authored by Roshan Pius's avatar Roshan Pius
Browse files

wifi: Move legacy hal types to a new namespace (2/2)

Changes in HIDL interface obejcts to use the new namespace for legacy
HAL.

Bug: 32242225
Test: Compiles
Change-Id: I7d0e9cee8656bd779a24d9eaede415317dceaf9b
parent 955542e9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ namespace implementation {
using hidl_return_util::validateAndCall;

Wifi::Wifi()
    : legacy_hal_(new WifiLegacyHal()), run_state_(RunState::STOPPED) {}
    : legacy_hal_(new legacy_hal::WifiLegacyHal()),
      run_state_(RunState::STOPPED) {}

bool Wifi::isValid() {
  // This object is always valid.
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ class Wifi : public IWifi {

  // Instance is created in this root level |IWifi| HIDL interface object
  // and shared with all the child HIDL interface objects.
  std::shared_ptr<WifiLegacyHal> legacy_hal_;
  std::shared_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
  RunState run_state_;
  std::vector<sp<IWifiEventCallback>> event_callbacks_;
  sp<WifiChip> chip_;
+3 −2
Original line number Diff line number Diff line
@@ -27,8 +27,9 @@ namespace V1_0 {
namespace implementation {
using hidl_return_util::validateAndCall;

WifiApIface::WifiApIface(const std::string& ifname,
                         const std::weak_ptr<WifiLegacyHal> legacy_hal)
WifiApIface::WifiApIface(
    const std::string& ifname,
    const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal)
    : ifname_(ifname), legacy_hal_(legacy_hal), is_valid_(true) {}

void WifiApIface::invalidate() {
+2 −2
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ namespace implementation {
class WifiApIface : public IWifiApIface {
 public:
  WifiApIface(const std::string& ifname,
              const std::weak_ptr<WifiLegacyHal> legacy_hal);
              const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal);
  // Refer to |WifiChip::invalidate()|.
  void invalidate();
  bool isValid();
@@ -49,7 +49,7 @@ class WifiApIface : public IWifiApIface {
  std::pair<WifiStatus, IfaceType> getTypeInternal();

  std::string ifname_;
  std::weak_ptr<WifiLegacyHal> legacy_hal_;
  std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
  bool is_valid_;

  DISALLOW_COPY_AND_ASSIGN(WifiApIface);
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ namespace implementation {
using hidl_return_util::validateAndCall;

WifiChip::WifiChip(ChipId chip_id,
                   const std::weak_ptr<WifiLegacyHal> legacy_hal)
                   const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal)
    : chip_id_(chip_id), legacy_hal_(legacy_hal), is_valid_(true) {}

void WifiChip::invalidate() {
Loading