The Netctl class interacts with netctl.
More...
The Netctl class interacts with netctl.
Netctl::Netctl |
( |
const bool |
debugCmd = false , |
|
|
const QMap< QString, QString > |
settings = QMap< QString, QString >() |
|
) |
| |
|
explicit |
Netctl class constructor.
- Parameters
-
debugCmd | show debug messages |
settings | default settings. Needed keys are FORCE_SUDO (force to use sudo), IFACE_DIR (path to directory with interfaces), PREFERED_IFACE (prefered interface for WiFi), NETCTL_PATH (path to netctl command), NETCTLAUTO_PATH (path to netctl-auto command), NETCTLAUTO_SERVICE (netctl-auto service name), PROFILE_DIR (path to directory which contains profiles), SUDO_PATH (path to sudo command), SYSTEMCTL_PATH (path to systemctl command) |
bool Netctl::autoDisableAllProfiles |
( |
| ) |
|
|
slot |
method which sets all profiles disabled (netctl-auto)
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
bool Netctl::autoEnableAllProfiles |
( |
| ) |
|
|
slot |
method which sets all profiles enabled (netctl-auto)
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
bool Netctl::autoEnableProfile |
( |
const QString |
profile | ) |
|
|
slot |
method which sets profile disabled or enabled (netctl-auto)
- Parameters
-
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
bool Netctl::autoEnableService |
( |
| ) |
|
|
slot |
method which sets netctl-auto service enabled or disabled
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
QString Netctl::autoGetActiveProfile |
( |
| ) |
|
method which returns active profile name from netctl-auto
- Returns
- profile name or ""
bool Netctl::autoIsProfileActive |
( |
const QString |
profile | ) |
|
method which checks if profile is active (netctl-auto)
- Parameters
-
- Returns
- false if profile is inactive
-
true if profile is active
bool Netctl::autoIsProfileEnabled |
( |
const QString |
profile | ) |
|
method which checks if profile is enabled (netctl-auto)
- Parameters
-
- Returns
- false if profile is disabled
-
true if profile is enabled
bool Netctl::autoRestartService |
( |
| ) |
|
|
slot |
method which restarted netctl-auto service
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
bool Netctl::autoStartProfile |
( |
const QString |
profile | ) |
|
|
slot |
method which switchs to profile (netctl-auto)
- Parameters
-
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
bool Netctl::autoStartService |
( |
| ) |
|
|
slot |
method which starts or stops netctl-auto service
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
bool Netctl::enableProfile |
( |
const QString |
profile | ) |
|
|
slot |
method which sets profile disabled or enabled
- Parameters
-
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
bool Netctl::forceStartProfile |
( |
const QString |
profile | ) |
|
|
slot |
method which force starts profile
- Parameters
-
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
bool Netctl::forceStopProfile |
( |
const QString |
profile | ) |
|
|
slot |
method which force stops profile
- Parameters
-
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
QStringList Netctl::getActiveProfile |
( |
| ) |
|
method which returns active profile name
- Returns
- profile name or ""
Q_DECL_DEPRECATED QString Netctl::getProfileDescription |
( |
const QString |
profile | ) |
|
method which gets description from profile
- Parameters
-
- Returns
- profile description or ""
method which returns profile informations from netctl
- Returns
- list of profiles
method which returns profile informations from netctl-auto
- Returns
- list of profiles from netctl-auto
QString Netctl::getProfileStatus |
( |
const QString |
profile | ) |
|
method which gets profile status
- Parameters
-
- Returns
- profile status. It may be "active (enabled)", "active (static)", "inactive (enabled)", "inactive (static)"
static QMap<QString, QString> Netctl::getRecommendedConfiguration |
( |
| ) |
|
|
static |
method which check system configuration and return recommended values to keys
- Returns
- recommended parametrs
QStringList Netctl::getWirelessInterfaceList |
( |
| ) |
|
method which gets wireless interface list from PREFERED_IFACE and IFACE_DIR
- Returns
- interface list. If PREFERED_IFACE is not empty it will be first element
bool Netctl::isNetctlAutoEnabled |
( |
| ) |
|
method which checks netctl-auto autoload status
- Returns
- false if netctl-auto is disabled
-
true if netctl-auto is enabled
bool Netctl::isNetctlAutoRunning |
( |
| ) |
|
method which checks netctl-auto status
- Returns
- false if netctl-auto is inactive
-
true if netctl-auto is active
bool Netctl::isProfileActive |
( |
const QString |
profile | ) |
|
method which checks if profile is active
- Parameters
-
- Returns
- false if profile is inactive
-
true if profile is active
bool Netctl::isProfileEnabled |
( |
const QString |
profile | ) |
|
method which checks if profile is enabled
- Parameters
-
- Returns
- false if profile is disabled
-
true if profile is enabled
bool Netctl::reenableProfile |
( |
const QString |
profile | ) |
|
|
slot |
method which reenables profile
- Parameters
-
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
bool Netctl::restartProfile |
( |
const QString |
profile | ) |
|
|
slot |
method which restarts profile
- Parameters
-
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
bool Netctl::startProfile |
( |
const QString |
profile | ) |
|
|
slot |
method which starts or stops profile
- Parameters
-
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
bool Netctl::stopAllProfiles |
( |
| ) |
|
|
slot |
method which stops all profiles
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
bool Netctl::switchToProfile |
( |
const QString |
profile | ) |
|
|
slot |
method which starts another profile
- Parameters
-
- Returns
- false if components are not found or command exit code is not equal to 0
-
true if the method was completed without errors
The documentation for this class was generated from the following file: