mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 15:37:23 +00:00
add new API to the helper
This commit is contained in:
parent
fea0bedef0
commit
1d34a65f38
@ -107,6 +107,11 @@ th.sub {
|
||||
<td>enables or disables the profile. Returns <code>true</code> if action has been performed successfully</td>
|
||||
<td>yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bool Reenable(QString profile)</td>
|
||||
<td>reenables the profile. Returns <code>true</code> if action has been performed successfully</td>
|
||||
<td>yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bool Restart(QString profile)</td>
|
||||
<td>restarts the profile. Returns <code>true</code> if action has been performed successfully</td>
|
||||
@ -117,6 +122,11 @@ th.sub {
|
||||
<td>starts or stops the profile. Returns <code>true</code> if action has been performed successfully</td>
|
||||
<td>yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bool StopAll()</td>
|
||||
<td>stops all active profiles. Returns <code>true</code> if action has been performed successfully</td>
|
||||
<td>yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bool SwitchTo(QString profile)</td>
|
||||
<td>switchs to the profile. Returns <code>true</code> if action has been performed successfully</td>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<ul>
|
||||
<li>Netctl control module</li>
|
||||
<ul>
|
||||
<li><code>netctl start|stop|restart|switch-to|enable|disable <profile></code>. They are commands which provide a general control to netctl.</li>
|
||||
<li><code>netctl stop-all|start|stop|restart|switch-to|enable|disable|reenable <profile></code>. They are commands which provide a general control to netctl.</li>
|
||||
<li><code>systemctl start|restart|enable <netctl-auto@service></code>. They are commands which provide ability to control netctl-auto systemd service.</li>
|
||||
</ul>
|
||||
<li>Netctl profiles module</li>
|
||||
|
@ -161,6 +161,12 @@ bool ControlAdaptor::Enable(const QString profile)
|
||||
}
|
||||
|
||||
|
||||
bool ControlAdaptor::Reenable(const QString profile)
|
||||
{
|
||||
return netctlCommand->reenableProfile(profile);
|
||||
}
|
||||
|
||||
|
||||
bool ControlAdaptor::Restart(const QString profile)
|
||||
{
|
||||
return netctlCommand->restartProfile(profile);
|
||||
@ -173,6 +179,12 @@ bool ControlAdaptor::Start(const QString profile)
|
||||
}
|
||||
|
||||
|
||||
bool ControlAdaptor::StopAll()
|
||||
{
|
||||
return netctlCommand->stopAllProfiles();
|
||||
}
|
||||
|
||||
|
||||
bool ControlAdaptor::SwitchTo(const QString profile)
|
||||
{
|
||||
return netctlCommand->switchToProfile(profile);
|
||||
|
@ -56,8 +56,10 @@ public slots:
|
||||
bool autoServiceRestart();
|
||||
bool autoServiceStart();
|
||||
bool Enable(const QString profile);
|
||||
bool Reenable(const QString profile);
|
||||
bool Restart(const QString profile);
|
||||
bool Start(const QString profile);
|
||||
bool StopAll();
|
||||
bool SwitchTo(const QString profile);
|
||||
// netctlProfile
|
||||
bool Create(const QString profile, const QStringList settingsList);
|
||||
|
@ -475,7 +475,7 @@ bool Netctl::stopAllProfiles()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
return cmdCall(true, netctlCommand, QString("restart"));
|
||||
return cmdCall(true, netctlCommand, QString("stop-all"));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user