mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-13 13:55:51 +00:00
add calls
create interface dbus interface
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user