trikRuntime
|
Allows communication with wpa_supplicant daemon. More...
#include <wpaSupplicantCommunicator.h>
Public Member Functions | |
WpaSupplicantCommunicator (const QString &interfaceFile, const QString &daemonFile, QObject *parent=nullptr) | |
Constructor. More... | |
~WpaSupplicantCommunicator () | |
Destructor. More... | |
int | fileDescriptor () |
Handle of a file. More... | |
int | attach () |
Attach communicator to wpa_supplicant to be able to receive network events. More... | |
int | detach () |
Detach communicator from wpa_supplicant. More... | |
int | request (const QString &command, QString &reply) |
Send a request to wpa_supplicant. More... | |
bool | isPending () |
Returns true if there are unread incoming messages from wpa_supplicant. More... | |
int | receive (QString &message) |
Receive next incoming message from wpa_supplicant. More... | |
Allows communication with wpa_supplicant daemon.
WpaSupplicantCommunicator::WpaSupplicantCommunicator | ( | const QString & | interfaceFile, |
const QString & | daemonFile, | ||
QObject * | parent = nullptr |
||
) |
Constructor.
interfaceFile | - file that is used by this library to communicate with wpa_supplicant. |
daemonFile | - file that wpa_supplicant uses to communicate with clients, something like /run/wpa_supplicant/wlan0. |
parent | - parent QObject. |
WpaSupplicantCommunicator::~WpaSupplicantCommunicator | ( | ) |
Destructor.
int WpaSupplicantCommunicator::attach | ( | ) |
Attach communicator to wpa_supplicant to be able to receive network events.
int WpaSupplicantCommunicator::detach | ( | ) |
Detach communicator from wpa_supplicant.
int WpaSupplicantCommunicator::fileDescriptor | ( | ) |
Handle of a file.
bool WpaSupplicantCommunicator::isPending | ( | ) |
Returns true if there are unread incoming messages from wpa_supplicant.
int WpaSupplicantCommunicator::receive | ( | QString & | message | ) |
Receive next incoming message from wpa_supplicant.
int WpaSupplicantCommunicator::request | ( | const QString & | command, |
QString & | reply | ||
) |
Send a request to wpa_supplicant.
command | - command to wpa_supplicant. List of available commands is here: http://hostap.epitest.fi/wpa_supplicant/devel/ctrl_iface_page.html |
reply | - reply from wpa_supplicant. |