You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
2.9 KiB

#ifndef CONNECTIONSETTINGSENGINE_H
#define CONNECTIONSETTINGSENGINE_H
#include "qvarianthelper.h"
#include <NetworkManagerQt/Connection>
#include <NetworkManagerQt/ConnectionSettings>
#include <NetworkManagerQt/Settings>
#include <NetworkManagerQt/Manager>
#include <NetworkManagerQt/Setting>
#include <NetworkManagerQt/Security8021xSetting>
#include <NetworkManagerQt/WiredSetting>
#include <NetworkManagerQt/WirelessSetting>
#include <NetworkManagerQt/Utils>
#include <NetworkManagerQt/Ipv4Setting>
#include <NetworkManagerQt/Ipv6Setting>
#include <QString>
#include <QVariant>
#include <QHash>
#include <QList>
#include <QProcess>
#include <QDBusPendingReply>
#include <QDBusPendingCallWatcher>
class ConnectionSettingsEngine
{
public:
enum MeteredMode {
MeteredAutomatic,
MeteredYes,
MeteredNo
};
enum Ipv4Method {
Ipv4Automatic,
Ipv4AutomaticAddressOnly,
Ipv4LinkLocal,
Ipv4Manual,
Ipv4Shared,
Ipv4Disabled
};
enum LinkSpeed {
SpeedUnknown,
Speed10Mbps,
Speed100Mbps,
Speed1Gbps,
Speed2_5Gbps,
Speed5Gbps,
Speed10Gbps,
Speed40Gbps,
Speed100Gbps
};
enum LinkNegotiation {
NegotiationIgnore,
NegotiationAutomatic,
NegotiationManual
};
enum DuplexMode {
DuplexUnknown,
DuplexHalf,
DuplexFull
};
enum Security802_1xAuthMode {
Security802_1xAuthMd5,
Security802_1xAuthTls,
Security802_1xAuthPwd,
Security802_1xAuthFast,
Security802_1xAuthTtls,
Security802_1xAuthPeap
};
enum Security802_1xPasswordStoreMode {
Security802_1xPasswordStoreForAllUsers,
Security802_1xPasswordStoreForOneUser,
Security802_1xPasswordStoreNotSaved
};
enum Security802_1xFastProvisioningMode {
Security802_1xFastProvisioningOff,
Security802_1xFastProvisioningAnonymous,
Security802_1xFastProvisioningAuthenticated,
Security802_1xFastProvisioningBoth
};
enum Security802_1xAuthMethod {
Security802_1xAuthMethodUnknown,
Security802_1xAuthMethodPap,
Security802_1xAuthMethodChap,
Security802_1xAuthMethodMschap,
Security802_1xAuthMethodMschapv2,
Security802_1xAuthMethodGtc,
Security802_1xAuthMethodMd5
};
enum Security802_1xPeapVersion {
Security802_1xPeapVersionUnknown,
Security802_1xPeapVersionZero,
Security802_1xPeapVersionOne
};
ConnectionSettingsEngine();
static QVariantMap readConnectionSettings(QString connUuidStr);
static void modifyConnectionSettings(QString connUuidStr, QVariantMap settings);
private slots:
static void saveReplyFinished();
private:
static QString userName();
static QString targetConnUuidStr;
static bool wipeClonedMacAddress;
};
#endif // CONNECTIONSETTINGSENGINE_H