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