#include #include #include #include #include #include #include #include #include #include #include "util.h" #include "Device.h" #include "Actions.h" #include "Configuration.h" #include "EvdevDevice.h" #include "DeviceFinder.h" #define evdev_name "logid" LogLevel global_verbosity = DEBUG; Configuration* global_config; EvdevDevice* global_evdev; DeviceFinder* finder; int main(int argc, char** argv) { // Read config try { global_config = new Configuration("logid.cfg"); } catch (std::exception &e) { return EXIT_FAILURE; } //Create an evdev device called 'logid' try { global_evdev = new EvdevDevice(evdev_name); } catch(std::system_error& e) { log_printf(ERROR, "Could not create evdev device: %s", e.what()); return EXIT_FAILURE; } // Scan devices, create listeners, handlers, etc. finder = new DeviceFinder(); finder->run(); return EXIT_SUCCESS; }