#ifndef __KEYMANSYSTEMSERVICE_H__ #define __KEYMANSYSTEMSERVICE_H__ #include "config.h" #include #if DBUS_IMPLEMENTATION == SYSTEMD #include #else #include #endif #include "OrderedOutputDevice.h" #include "KeyboardDevice.h" using namespace std; class KeymanSystemService { private: std::list* kbd_devices = nullptr; OrderedOutputDevice *kbd_ordered_output = nullptr; sd_bus *bus = nullptr; bool failed = false; void GetKbdDevices(); void CreateOrderedOutputDeviceIfNecessary(); public: KeymanSystemService(); ~KeymanSystemService(); void Initialize(); bool Failed() { return failed; } int Loop(); void SetCapsLockIndicatorOnDevices(uint32_t state); uint32_t GetCapsLockIndicatorOnDevices(); void CallOrderedOutputSentinel(); }; #endif // __KEYMANSYSTEMSERVICE_H__