diff --git a/src/logid/CMakeLists.txt b/src/logid/CMakeLists.txt index 4aed930..8d2c461 100644 --- a/src/logid/CMakeLists.txt +++ b/src/logid/CMakeLists.txt @@ -11,7 +11,7 @@ find_package(PkgConfig REQUIRED) add_executable(logid logid.cpp util.cpp - DeviceMonitor.cpp + DeviceManager.cpp Device.cpp Receiver.cpp backend/Error.cpp diff --git a/src/logid/DeviceMonitor.cpp b/src/logid/DeviceManager.cpp similarity index 95% rename from src/logid/DeviceMonitor.cpp rename to src/logid/DeviceManager.cpp index 0f9beb4..c975c1e 100644 --- a/src/logid/DeviceMonitor.cpp +++ b/src/logid/DeviceManager.cpp @@ -1,7 +1,7 @@ #include #include -#include "DeviceMonitor.h" +#include "DeviceManager.h" #include "Receiver.h" #include "util.h" #include "backend/hidpp10/Error.h" @@ -12,7 +12,7 @@ using namespace logid; using namespace logid::backend; -void DeviceMonitor::addDevice(std::string path) +void DeviceManager::addDevice(std::string path) { bool defaultExists = true; bool isReceiver = false; @@ -59,7 +59,7 @@ void DeviceMonitor::addDevice(std::string path) } } -void DeviceMonitor::removeDevice(std::string path) +void DeviceManager::removeDevice(std::string path) { auto receiver = _receivers.find(path); diff --git a/src/logid/DeviceMonitor.h b/src/logid/DeviceManager.h similarity index 77% rename from src/logid/DeviceMonitor.h rename to src/logid/DeviceManager.h index dfd7650..e4134bc 100644 --- a/src/logid/DeviceMonitor.h +++ b/src/logid/DeviceManager.h @@ -13,10 +13,10 @@ namespace logid { - class DeviceMonitor : public backend::raw::DeviceMonitor + class DeviceManager : public backend::raw::DeviceMonitor { public: - DeviceMonitor() = default; + DeviceManager() = default; protected: void addDevice(std::string path) override; void removeDevice(std::string path) override; @@ -26,7 +26,7 @@ namespace logid std::map> _receivers; }; - extern DeviceMonitor* finder; + extern DeviceManager* finder; } #endif //LOGID_DEVICEFINDER_H \ No newline at end of file diff --git a/src/logid/logid.cpp b/src/logid/logid.cpp index 562341f..8313965 100644 --- a/src/logid/logid.cpp +++ b/src/logid/logid.cpp @@ -4,7 +4,7 @@ #include #include "util.h" -#include "DeviceMonitor.h" +#include "DeviceManager.h" #include "logid.h" #define evdev_name "logid" @@ -21,7 +21,7 @@ std::string config_file = DEFAULT_CONFIG_FILE; LogLevel logid::global_verbosity = INFO; // Configuration* logid::global_config; -DeviceMonitor* logid::finder; +DeviceManager* logid::finder; bool logid::kill_logid = false; std::mutex logid::finder_reloading; @@ -166,7 +166,7 @@ int main(int argc, char** argv) */ // Scan devices, create listeners, handlers, etc. - finder = new DeviceMonitor(); + finder = new DeviceManager(); while(!kill_logid) {