mainloop: add helper methods for sensor removal
Add a helper method that will remove from dbus sensors that are marked
for removal and another helper method that will attempt to add sensors
marked for removal back.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Iecb96045cc63d93f2896af9f6a8c2672ca8fcbb2
diff --git a/mainloop.hpp b/mainloop.hpp
index 4f7293d..a50020d 100644
--- a/mainloop.hpp
+++ b/mainloop.hpp
@@ -66,6 +66,14 @@
*/
void shutdown() noexcept;
+ /** @brief Remove sensors slated for removal.
+ */
+ void removeSensors();
+
+ /** @brief Attempt to add sensors back that had been removed.
+ */
+ void addDroppedSensors();
+
private:
using mapped_type =
std::tuple<SensorSet::mapped_type, std::string, ObjectInfo>;