bluetooth module handles rfkill events instantly

This commit is contained in:
Marc
2020-01-23 17:17:29 +01:00
parent d85f0e1060
commit e3bf6b968c
6 changed files with 97 additions and 17 deletions

View File

@ -2,8 +2,20 @@
#include <linux/rfkill.h>
namespace waybar::util::rfkill {
namespace waybar::util {
bool isDisabled(enum rfkill_type rfkill_type);
class Rfkill {
public:
Rfkill(enum rfkill_type rfkill_type);
~Rfkill() = default;
bool isDisabled() const;
void waitForEvent();
int getState();
private:
enum rfkill_type rfkill_type_;
int state_ = 0;
int prev_state_ = 0;
};
} // namespace waybar::util