mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-14 22:35:51 +00:00
update submodule
update netctl-auto update interfaces
This commit is contained in:
@ -74,18 +74,21 @@ typedef struct
|
||||
/**
|
||||
* @struct netctlInformation
|
||||
* @brief general information structure
|
||||
* @var netctlCurrent::netctlProfiles
|
||||
* @var netctlInformation::netctlProfiles
|
||||
* list of profiles
|
||||
* @var netctlCurrent::netctlAutoProfiles
|
||||
* @var netctlInformation::netctlAutoProfiles
|
||||
* list of netctl-auto profiles
|
||||
* @var netctlCurrent::netctlAuto
|
||||
* @var netctlInformation::netctlAuto
|
||||
* is netctl-auto active
|
||||
* @var netctlInformation::netctlAutoEnabled
|
||||
* is netctl-auto enabled
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
QList<netctlProfileInfo> netctlProfiles;
|
||||
QList<netctlProfileInfo> netctlAutoProfiles;
|
||||
bool netctlAuto = false;
|
||||
bool netctlAutoEnabled = false;
|
||||
} netctlInformation;
|
||||
|
||||
/**
|
||||
@ -108,15 +111,6 @@ public:
|
||||
*/
|
||||
~NetctlInterface();
|
||||
// control methods
|
||||
/**
|
||||
* @brief method which enables or disables selected profile and returns its status
|
||||
* @remark netctl-auto only
|
||||
* @param profile profile name
|
||||
* @return InterfaceAnswer::False if profile is disabled
|
||||
* @return InterfaceAnswer::True if profile is enabled
|
||||
* @return InterfaceAnswer::Error if an error occurs
|
||||
*/
|
||||
InterfaceAnswer autoEnableProfile(const QString profile);
|
||||
/**
|
||||
* @brief method which creates and copies profile
|
||||
* @remark netctl independ
|
||||
|
@ -57,23 +57,6 @@ NetctlInterface::~NetctlInterface()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn autoEnableProfile
|
||||
*/
|
||||
InterfaceAnswer NetctlInterface::autoEnableProfile(const QString profile)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (netctlCommand == nullptr) {
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Could not find library";
|
||||
return InterfaceAnswer::Error;
|
||||
}
|
||||
|
||||
netctlCommand->autoEnableProfile(profile);
|
||||
|
||||
return static_cast<InterfaceAnswer>(netctlCommand->autoIsProfileEnabled(profile));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn connectToEssid
|
||||
*/
|
||||
@ -300,6 +283,7 @@ netctlInformation NetctlInterface::information()
|
||||
|
||||
netctlInformation info;
|
||||
info.netctlAuto = netctlCommand->isNetctlAutoRunning();
|
||||
info.netctlAutoEnabled = netctlCommand->isNetctlAutoEnabled();
|
||||
info.netctlProfiles = netctlCommand->getProfileList();
|
||||
if (info.netctlAuto) info.netctlAutoProfiles = netctlCommand->getProfileListFromNetctlAuto();
|
||||
|
||||
|
Reference in New Issue
Block a user