wifi: Add the various iface object implementation
This CL adds the implementation classes for the various iface HIDL
interfaces defined. These classes implement the
|getName| & |getType| methods in the Iface HIDL interface.
Integration of these objects with WifiChip class is implemented in the
next CL.
Bug: 31943042
Test: Compiles
Change-Id: I219afd6441e15c76cf7c61f7bcd2b3568dba2b98
diff --git a/wifi/1.0/default/wifi_chip.h b/wifi/1.0/default/wifi_chip.h
index ef2137b..84e5470 100644
--- a/wifi/1.0/default/wifi_chip.h
+++ b/wifi/1.0/default/wifi_chip.h
@@ -38,7 +38,19 @@
class WifiChip : public IWifiChip {
public:
WifiChip(ChipId chip_id, const std::weak_ptr<WifiLegacyHal> legacy_hal);
- // Invalidate this instance once the HAL is stopped.
+ // 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
+ // reference will continue to be directed to the server.
+ //
+ // However Wifi HAL needs to control the lifetime of these objects. So, add
+ // a public |invalidate| method to |WifiChip| and it's child objects. This
+ // will be used to mark an object invalid when either:
+ // a) Wifi HAL is stopped, or
+ // b) Wifi Chip is reconfigured.
+ //
+ // All HIDL method implementations should check if the object is still marked
+ // valid before processing them.
void invalidate();
// HIDL methods exposed.