add force* slots

This commit is contained in:
arcan1s
2014-08-24 13:08:13 +04:00
parent e21b2201ab
commit 999914926a
7 changed files with 65 additions and 0 deletions

View File

@ -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

View File

@ -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
*/