ueventd: Break devices.cpp into discrete classes
devices.cpp handles too many things for creating one class. This
change breaks it up into various files and classes.
* Parsing is moved to ueventd_parser.cpp
* Reading from the uevent socket and Cold booting is moved to a
UeventListener class, in uevent_listener.cpp
* Firmware handling is moved to firmware_handler.cpp
* The remaining contents form a DeviceHandler class within devices.cpp
Bug: 33785894
Test: boot bullhead x40, observe no major differences in /dev and /sys
Test: boot sailfish x40, observe no major differences in /dev and /sys
Test: init unit tests
Change-Id: I846a2e5995fbb344c7a8e349065c18a934fa6aba
diff --git a/init/init_parser.h b/init/init_parser.h
index bd8a178..722ebb2 100644
--- a/init/init_parser.h
+++ b/init/init_parser.h
@@ -66,9 +66,9 @@
// be written.
using LineCallback = std::function<bool(std::vector<std::string>&&, std::string*)>;
+ // TODO: init is the only user of this as a singleton; remove it.
static Parser& GetInstance();
- // Exposed for testing
Parser();
bool ParseConfig(const std::string& path);