mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
wifi: Move legacy hal types to a new namespace (2/2) am: 6cedc97e95
am: b883f2f23b
Change-Id: I72293ac9a7f96db2434ddbd303aa4f0d552c73cb
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -42,7 +42,8 @@ namespace implementation {
|
||||
*/
|
||||
class WifiChip : public IWifiChip {
|
||||
public:
|
||||
WifiChip(ChipId chip_id, const std::weak_ptr<WifiLegacyHal> legacy_hal);
|
||||
WifiChip(ChipId chip_id,
|
||||
const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal);
|
||||
// HIDL does not provide a built-in mechanism to let the server invalidate
|
||||
// a HIDL interface object after creation. If any client process holds onto
|
||||
// a reference to the object in their context, any method calls on that
|
||||
@@ -154,7 +155,7 @@ class WifiChip : public IWifiChip {
|
||||
getDebugHostWakeReasonStatsInternal();
|
||||
|
||||
ChipId chip_id_;
|
||||
std::weak_ptr<WifiLegacyHal> legacy_hal_;
|
||||
std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
|
||||
std::vector<sp<IWifiChipEventCallback>> event_callbacks_;
|
||||
sp<WifiApIface> ap_iface_;
|
||||
sp<WifiNanIface> nan_iface_;
|
||||
|
||||
@@ -27,8 +27,9 @@ namespace V1_0 {
|
||||
namespace implementation {
|
||||
using hidl_return_util::validateAndCall;
|
||||
|
||||
WifiNanIface::WifiNanIface(const std::string& ifname,
|
||||
const std::weak_ptr<WifiLegacyHal> legacy_hal)
|
||||
WifiNanIface::WifiNanIface(
|
||||
const std::string& ifname,
|
||||
const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal)
|
||||
: ifname_(ifname), legacy_hal_(legacy_hal), is_valid_(true) {}
|
||||
|
||||
void WifiNanIface::invalidate() {
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace implementation {
|
||||
class WifiNanIface : public IWifiNanIface {
|
||||
public:
|
||||
WifiNanIface(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();
|
||||
@@ -135,7 +135,7 @@ class WifiNanIface : public IWifiNanIface {
|
||||
WifiStatus dataEndInternal(uint32_t cmd_id, const NanDataPathEndRequest& msg);
|
||||
|
||||
std::string ifname_;
|
||||
std::weak_ptr<WifiLegacyHal> legacy_hal_;
|
||||
std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
|
||||
std::vector<sp<IWifiNanIfaceEventCallback>> event_callbacks_;
|
||||
bool is_valid_;
|
||||
|
||||
|
||||
@@ -27,8 +27,9 @@ namespace V1_0 {
|
||||
namespace implementation {
|
||||
using hidl_return_util::validateAndCall;
|
||||
|
||||
WifiP2pIface::WifiP2pIface(const std::string& ifname,
|
||||
const std::weak_ptr<WifiLegacyHal> legacy_hal)
|
||||
WifiP2pIface::WifiP2pIface(
|
||||
const std::string& ifname,
|
||||
const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal)
|
||||
: ifname_(ifname), legacy_hal_(legacy_hal), is_valid_(true) {}
|
||||
|
||||
void WifiP2pIface::invalidate() {
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace implementation {
|
||||
class WifiP2pIface : public IWifiP2pIface {
|
||||
public:
|
||||
WifiP2pIface(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 WifiP2pIface : public IWifiP2pIface {
|
||||
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(WifiP2pIface);
|
||||
|
||||
@@ -29,7 +29,7 @@ using hidl_return_util::validateAndCall;
|
||||
|
||||
WifiRttController::WifiRttController(
|
||||
const sp<IWifiIface>& bound_iface,
|
||||
const std::weak_ptr<WifiLegacyHal> legacy_hal)
|
||||
const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal)
|
||||
: bound_iface_(bound_iface), legacy_hal_(legacy_hal), is_valid_(true) {}
|
||||
|
||||
void WifiRttController::invalidate() {
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace implementation {
|
||||
class WifiRttController : public IWifiRttController {
|
||||
public:
|
||||
WifiRttController(const sp<IWifiIface>& bound_iface,
|
||||
const std::weak_ptr<WifiLegacyHal> legacy_hal);
|
||||
const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal);
|
||||
// Refer to |WifiChip::invalidate()|.
|
||||
void invalidate();
|
||||
bool isValid();
|
||||
@@ -103,7 +103,7 @@ class WifiRttController : public IWifiRttController {
|
||||
WifiStatus disableResponderInternal(uint32_t cmd_id);
|
||||
|
||||
sp<IWifiIface> bound_iface_;
|
||||
std::weak_ptr<WifiLegacyHal> legacy_hal_;
|
||||
std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
|
||||
std::vector<sp<IWifiRttControllerEventCallback>> event_callbacks_;
|
||||
bool is_valid_;
|
||||
|
||||
|
||||
@@ -27,8 +27,9 @@ namespace V1_0 {
|
||||
namespace implementation {
|
||||
using hidl_return_util::validateAndCall;
|
||||
|
||||
WifiStaIface::WifiStaIface(const std::string& ifname,
|
||||
const std::weak_ptr<WifiLegacyHal> legacy_hal)
|
||||
WifiStaIface::WifiStaIface(
|
||||
const std::string& ifname,
|
||||
const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal)
|
||||
: ifname_(ifname), legacy_hal_(legacy_hal), is_valid_(true) {}
|
||||
|
||||
void WifiStaIface::invalidate() {
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace implementation {
|
||||
class WifiStaIface : public IWifiStaIface {
|
||||
public:
|
||||
WifiStaIface(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();
|
||||
@@ -107,7 +107,7 @@ class WifiStaIface : public IWifiStaIface {
|
||||
getDebugRxPacketFatesInternal();
|
||||
|
||||
std::string ifname_;
|
||||
std::weak_ptr<WifiLegacyHal> legacy_hal_;
|
||||
std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
|
||||
std::vector<sp<IWifiStaIfaceEventCallback>> event_callbacks_;
|
||||
bool is_valid_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user