add calls

create interface dbus interface
This commit is contained in:
arcan1s
2015-03-13 08:22:02 +03:00
parent 26afd90df9
commit ef2694d7a7
11 changed files with 311 additions and 118 deletions

View File

@ -145,6 +145,13 @@ public:
* @return InterfaceAnswer::Error if an error occurs
*/
InterfaceAnswer startProfile(const QString profile);
/**
* @brief method which stops all profiles
* @remark netctl only
* @return InterfaceAnswer::True if there are no errors
* @return InterfaceAnswer::Error if an error occurs
*/
InterfaceAnswer stopAllProfiles();
/**
* @brief method which switchs to selected profile and returns its status
* @remark both netctl and netctl-auto

View File

@ -225,6 +225,24 @@ InterfaceAnswer NetctlInterface::startProfile(const QString profile)
}
/**
* @fn stopAllProfiles
*/
InterfaceAnswer NetctlInterface::stopAllProfiles()
{
if (debug) qDebug() << PDEBUG;
if (netctlCommand == nullptr) {
if (debug) qDebug() << PDEBUG << ":" << "Could not find library";
return InterfaceAnswer::Error;
}
if (netctlCommand->stopAllProfiles())
return InterfaceAnswer::True;
else
return InterfaceAnswer::Error;
}
/**
* @fn switchToProfile
*/