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 {
|
|
|
|
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;
|
|
|
|
};
|
2020-01-21 16:04:54 +00:00
|
|
|
|
|
|
|
} // namespace waybar::util
|