2020-01-21 16:04:54 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <linux/rfkill.h>
|
|
|
|
|
2020-01-23 16:17:29 +00:00
|
|
|
namespace waybar::util {
|
2020-01-21 16:04:54 +00:00
|
|
|
|
2020-01-23 16:17:29 +00:00
|
|
|
class Rfkill {
|
2020-01-26 04:34:31 +00:00
|
|
|
public:;
|
2020-01-23 16:17:29 +00:00
|
|
|
Rfkill(enum rfkill_type rfkill_type);
|
|
|
|
~Rfkill() = default;
|
|
|
|
void waitForEvent();
|
2020-01-26 04:34:31 +00:00
|
|
|
int getState() const;
|
2020-01-23 16:17:29 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
enum rfkill_type rfkill_type_;
|
|
|
|
int state_ = 0;
|
|
|
|
int prev_state_ = 0;
|
|
|
|
};
|
2020-01-21 16:04:54 +00:00
|
|
|
|
|
|
|
} // namespace waybar::util
|