netctlgui  1.2.0
Qt library which interacts with netctl
 All Classes Files Functions
wpasupinteract.h
Go to the documentation of this file.
1 /***************************************************************************
2  * This file is part of netctl-gui *
3  * *
4  * netctl-gui is free software: you can redistribute it and/or *
5  * modify it under the terms of the GNU General Public License as *
6  * published by the Free Software Foundation, either version 3 of the *
7  * License, or (at your option) any later version. *
8  * *
9  * netctl-gui is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License *
15  * along with netctl-gui. If not, see http://www.gnu.org/licenses/ *
16  ***************************************************************************/
26 #ifndef WPASUPINTERACT_H
27 #define WPASUPINTERACT_H
28 
29 #include <QDir>
30 #include <QMap>
31 #include <QObject>
32 
33 
34 class Netctl;
35 class NetctlProfile;
36 
40 class WpaSup : public QObject
41 {
42  Q_OBJECT
43 
44 public:
57  explicit WpaSup(const bool debugCmd = false,
58  const QMap<QString, QString> settings = QMap<QString, QString>());
62  ~WpaSup();
63  // general information
69  QString existentProfile(const QString essid);
76  bool isProfileActive(const QString essid);
83  bool isProfileExists(const QString essid);
84 
85 public slots:
86  // functions
95  QList<QStringList> scanWifi();
101  bool startWpaSupplicant();
107  bool stopWpaSupplicant();
108 
109 private:
113  Netctl *netctlCommand;
117  NetctlProfile *netctlProfile;
121  bool debug;
125  QString ctrlDir;
129  QString ctrlGroup;
133  QString pidFile;
137  QString sudoCommand;
141  QString wpaCliPath;
145  QString wpaDrivers;
149  QString wpaSupPath;
150  // functions
156  QString getWpaCliOutput(const QString commandLine);
163  bool wpaCliCall(const QString commandLine);
164 };
165 
166 
167 #endif /* WPASUPINTERACT_H */
bool isProfileExists(const QString essid)
method which checks profile existence by ESSID
bool stopWpaSupplicant()
method which send TERMINATE signal to wpa_supplicant
QList< QStringList > scanWifi()
method which scans WiFi networks
WpaSup(const bool debugCmd=false, const QMap< QString, QString > settings=QMap< QString, QString >())
WpaSup class constructor.
The NetctlProfile class interacts with netctl profiles.
Definition: netctlprofile.h:37
bool isProfileActive(const QString essid)
method which checks profile status by ESSID
The Netctl class interacts with netctl.
Definition: netctlinteract.h:39
~WpaSup()
WpaSup class destructor.
QString existentProfile(const QString essid)
method which gets profile name by ESSID
bool startWpaSupplicant()
method which calls wpa_supplicant
The WpaSup class interacts with wpa_supplicant.
Definition: wpasupinteract.h:40