19 lines
677 B
C++
19 lines
677 B
C++
#pragma once
|
|
#include <QObject>
|
|
#include <QString>
|
|
|
|
class NetworkManager : public QObject {
|
|
Q_OBJECT
|
|
public:
|
|
explicit NetworkManager(QObject *parent = nullptr);
|
|
QString readCurrentMac(const QString &interfacesPath);
|
|
bool backupFile(const QString &interfacesPath, QString *err);
|
|
bool ensureRootPermission(QString *err);
|
|
bool applyMacLocal(const QString &interfacesPath,
|
|
const QString &referencePathOrEmpty,
|
|
const QString &newMac,
|
|
QString *err);
|
|
private:
|
|
QString readReferencePrefixFromFile(const QString &referencePath, QString *err);
|
|
QString defaultReferencePrefix() const;
|
|
}; |