2018-07-04 15:13:16 +00:00
|
|
|
/*
|
|
|
|
* \brief RFKILL interface
|
|
|
|
* \author Josef Soentgen
|
|
|
|
* \date 2018-07-11
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Genode Labs GmbH
|
|
|
|
*
|
|
|
|
* This file is distributed under the terms of the GNU General Public License
|
|
|
|
* version 2.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _WIFI__RFKILL_H_
|
|
|
|
#define _WIFI__RFKILL_H_
|
|
|
|
|
2023-05-19 10:03:51 +00:00
|
|
|
#include <util/interface.h>
|
2018-07-04 15:13:16 +00:00
|
|
|
|
|
|
|
namespace Wifi {
|
|
|
|
|
2023-05-19 10:03:51 +00:00
|
|
|
/*
|
|
|
|
* FD used to poll RFKILL state from the supplicant.
|
|
|
|
*/
|
2018-07-04 15:13:16 +00:00
|
|
|
enum { RFKILL_FD = 42, };
|
|
|
|
|
2023-05-19 10:03:51 +00:00
|
|
|
struct Rfkill_notification_handler : Genode::Interface
|
|
|
|
{
|
|
|
|
virtual void rfkill_notify() = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
void rfkill_establish_handler(Rfkill_notification_handler &);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Query current RFKILL state
|
|
|
|
*/
|
|
|
|
bool rfkill_blocked();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set RFKILL state from the frontend
|
|
|
|
*
|
|
|
|
* May be only called from an EP context.
|
|
|
|
*/
|
|
|
|
void set_rfkill(bool);
|
|
|
|
|
|
|
|
} /* namespace Wifi */
|
2018-07-04 15:13:16 +00:00
|
|
|
|
|
|
|
#endif /* _WIFI__RFKILL_H_ */
|