Rename DeviceMonitor to DeviceManager

This commit is contained in:
pixl 2020-06-19 22:01:14 -04:00
parent 7f1af81910
commit f0c903d539
No known key found for this signature in database
GPG Key ID: 1866C148CD593B6E
4 changed files with 10 additions and 10 deletions

View File

@ -11,7 +11,7 @@ find_package(PkgConfig REQUIRED)
add_executable(logid add_executable(logid
logid.cpp logid.cpp
util.cpp util.cpp
DeviceMonitor.cpp DeviceManager.cpp
Device.cpp Device.cpp
Receiver.cpp Receiver.cpp
backend/Error.cpp backend/Error.cpp

View File

@ -1,7 +1,7 @@
#include <thread> #include <thread>
#include <sstream> #include <sstream>
#include "DeviceMonitor.h" #include "DeviceManager.h"
#include "Receiver.h" #include "Receiver.h"
#include "util.h" #include "util.h"
#include "backend/hidpp10/Error.h" #include "backend/hidpp10/Error.h"
@ -12,7 +12,7 @@
using namespace logid; using namespace logid;
using namespace logid::backend; using namespace logid::backend;
void DeviceMonitor::addDevice(std::string path) void DeviceManager::addDevice(std::string path)
{ {
bool defaultExists = true; bool defaultExists = true;
bool isReceiver = false; 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); auto receiver = _receivers.find(path);

View File

@ -13,10 +13,10 @@
namespace logid namespace logid
{ {
class DeviceMonitor : public backend::raw::DeviceMonitor class DeviceManager : public backend::raw::DeviceMonitor
{ {
public: public:
DeviceMonitor() = default; DeviceManager() = default;
protected: protected:
void addDevice(std::string path) override; void addDevice(std::string path) override;
void removeDevice(std::string path) override; void removeDevice(std::string path) override;
@ -26,7 +26,7 @@ namespace logid
std::map<std::string, std::shared_ptr<Receiver>> _receivers; std::map<std::string, std::shared_ptr<Receiver>> _receivers;
}; };
extern DeviceMonitor* finder; extern DeviceManager* finder;
} }
#endif //LOGID_DEVICEFINDER_H #endif //LOGID_DEVICEFINDER_H

View File

@ -4,7 +4,7 @@
#include <mutex> #include <mutex>
#include "util.h" #include "util.h"
#include "DeviceMonitor.h" #include "DeviceManager.h"
#include "logid.h" #include "logid.h"
#define evdev_name "logid" #define evdev_name "logid"
@ -21,7 +21,7 @@ std::string config_file = DEFAULT_CONFIG_FILE;
LogLevel logid::global_verbosity = INFO; LogLevel logid::global_verbosity = INFO;
// Configuration* logid::global_config; // Configuration* logid::global_config;
DeviceMonitor* logid::finder; DeviceManager* logid::finder;
bool logid::kill_logid = false; bool logid::kill_logid = false;
std::mutex logid::finder_reloading; std::mutex logid::finder_reloading;
@ -166,7 +166,7 @@ int main(int argc, char** argv)
*/ */
// Scan devices, create listeners, handlers, etc. // Scan devices, create listeners, handlers, etc.
finder = new DeviceMonitor(); finder = new DeviceManager();
while(!kill_logid) while(!kill_logid)
{ {