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-05-27 07:10:38 +00:00
|
|
|
public:
|
2020-01-23 16:17:29 +00:00
|
|
|
Rfkill(enum rfkill_type rfkill_type);
|
|
|
|
~Rfkill() = default;
|
|
|
|
void waitForEvent();
|
2020-02-23 22:09:05 +00:00
|
|
|
bool getState() const;
|
2020-01-23 16:17:29 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
enum rfkill_type rfkill_type_;
|
2020-05-27 07:10:38 +00:00
|
|
|
int state_ = 0;
|
2020-01-23 16:17:29 +00:00
|
|
|
};
|
2020-01-21 16:04:54 +00:00
|
|
|
|
|
|
|
} // namespace waybar::util
|