spiegel-keyman/linux/keyman-system-service/src/KeymanSystemService.h
Eberhard Beilharz ab25157364
feat(linux): Refactor to benefit from C++ RAII
Also apply changes from code review comments.
2023-05-22 19:51:45 +02:00

33 lines
688 B
C++

#ifndef __KEYMANSYSTEMSERVICE_H__
#define __KEYMANSYSTEMSERVICE_H__
#include <list>
#include <systemd/sd-bus.h>
#include "KeyboardDevice.h"
using namespace std;
class KeymanSystemService {
private:
std::list<KeyboardDevice *>* kbd_devices = NULL;
sd_bus_slot *slot = NULL;
sd_bus *bus = NULL;
bool failed = false;
void GetKbdDevices();
public:
KeymanSystemService();
~KeymanSystemService();
bool
Failed() {
return failed;
}
int Loop();
void SetCapsLockIndicatorOnDevices(uint32_t state);
uint32_t GetCapsLockIndicatorOnDevices();
};
#endif // __KEYMANSYSTEMSERVICE_H__