The NetctlProfile class interacts with netctl profiles.
More...
The NetctlProfile class interacts with netctl profiles.
| NetctlProfile::NetctlProfile |
( |
const bool |
debugCmd = false, |
|
|
const QMap< QString, QString > |
settings = QMap< QString, QString >() |
|
) |
| |
|
explicit |
NetctlProfile class constructor.
- Parameters
-
| debugCmd | show debug messages |
| settings | default settings. Needed keys are PROFILE_DIR (path to directory which contains profiles), SUDO_PATH (path to sudo command) |
| NetctlProfile::~NetctlProfile |
( |
| ) |
|
| bool NetctlProfile::copyProfile |
( |
const QString |
oldPath | ) |
|
method which copies temporary profile to PROFILE_DIR
- Parameters
-
| oldPath | path to temprorary profile |
- 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 NetctlProfile::createProfile |
( |
const QString |
profile, |
|
|
const QMap< QString, QString > |
settings |
|
) |
| |
method which creates temporary profile
- Parameters
-
| profile | profile name |
| settings | profile configuration. All available keys will be printed to the profile |
- Returns
- temporary profile name
| QMap<QString, QString> NetctlProfile::getSettingsFromProfile |
( |
const QString |
profile | ) |
|
method which reads settings from profile
- Parameters
-
- Returns
- settings from profile
| QString NetctlProfile::getValueFromProfile |
( |
const QString |
profile, |
|
|
const QString |
key |
|
) |
| |
method which return value from profile by key
- Parameters
-
| profile | profile name |
| key | required key |
- Returns
- value by key
| bool NetctlProfile::removeProfile |
( |
const QString |
profile | ) |
|
method which removes 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: