mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 23:47:21 +00:00
add force* slots
This commit is contained in:
parent
e21b2201ab
commit
999914926a
2
.gitignore
vendored
2
.gitignore
vendored
@ -25,3 +25,5 @@ usr/
|
||||
# translations
|
||||
*.qm
|
||||
|
||||
# temporary bckps
|
||||
*~
|
||||
|
@ -36,6 +36,7 @@ Ver.1.3.0
|
||||
+ add slot stopAllProfiles()
|
||||
+ add slot reenableProfile()
|
||||
+ add slots getRecommendedConfiguration()
|
||||
+ add slots forceStartProfile() and forceStopProfile()
|
||||
+ add double quotes to profile names
|
||||
+ add tests
|
||||
* rewrite to use [tasks](https://github.com/mhogomchungu/tasks) (see #7)
|
||||
|
@ -112,6 +112,16 @@ 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 forceStart(QString profile)</td>
|
||||
<td>force starts the profile. Returns <code>true</code> if action has been performed successfully</td>
|
||||
<td>yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bool forceStop(QString profile)</td>
|
||||
<td>force stops 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>
|
||||
|
@ -186,6 +186,18 @@ bool ControlAdaptor::Enable(const QString profile)
|
||||
}
|
||||
|
||||
|
||||
bool ControlAdaptor::forceStart(const QString profile)
|
||||
{
|
||||
return netctlCommand->forceStartProfile(profile);
|
||||
}
|
||||
|
||||
|
||||
bool ControlAdaptor::forceStop(const QString profile)
|
||||
{
|
||||
return netctlCommand->forceStopProfile(profile);
|
||||
}
|
||||
|
||||
|
||||
bool ControlAdaptor::Reenable(const QString profile)
|
||||
{
|
||||
return netctlCommand->reenableProfile(profile);
|
||||
|
@ -57,6 +57,8 @@ public slots:
|
||||
bool autoServiceRestart();
|
||||
bool autoServiceStart();
|
||||
bool Enable(const QString profile);
|
||||
bool forceStart(const QString profile);
|
||||
bool forceStop(const QString profile);
|
||||
bool Reenable(const QString profile);
|
||||
bool Restart(const QString profile);
|
||||
bool Start(const QString profile);
|
||||
|
@ -176,6 +176,20 @@ public slots:
|
||||
* @return true if the method was completed without errors
|
||||
*/
|
||||
bool enableProfile(const QString profile);
|
||||
/**
|
||||
* @brief method which force starts profile
|
||||
* @param profile profile name
|
||||
* @return false if components are not found or command exit code is not equal to 0
|
||||
* @return true if the method was completed without errors
|
||||
*/
|
||||
bool forceStartProfile(const QString profile);
|
||||
/**
|
||||
* @brief method which force stops profile
|
||||
* @param profile profile name
|
||||
* @return false if components are not found or command exit code is not equal to 0
|
||||
* @return true if the method was completed without errors
|
||||
*/
|
||||
bool forceStopProfile(const QString profile);
|
||||
/**
|
||||
* @brief method which reenables profile
|
||||
* @param profile profile name
|
||||
|
@ -542,6 +542,30 @@ bool Netctl::enableProfile(const QString profile)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn forceStartProfile
|
||||
*/
|
||||
bool Netctl::forceStartProfile(const QString profile)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
|
||||
|
||||
return cmdCall(true, netctlCommand, QString("start"), profile);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn forceStopProfile
|
||||
*/
|
||||
bool Netctl::forceStopProfile(const QString profile)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
|
||||
|
||||
return cmdCall(true, netctlCommand, QString("stop"), profile);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn reenableProfile
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user