Add System.h/System.cpp -> to be adapted later

This commit is contained in:
2024-04-26 13:05:19 +02:00
parent 9ca394db46
commit 05b68f21c2
2 changed files with 702 additions and 0 deletions

55
common/include/System.h Normal file
View File

@@ -0,0 +1,55 @@
#ifndef SYSTEM_H
#define SYSTEM_H
#include <QObject>
class System : public QObject
{
Q_OBJECT
private:
explicit System(QObject *parent = 0);
static QString errorMsg;
public:
static bool checkForSDCard();
static bool umountSDCard();
static bool checkForUSBStick();
static QString getUSBMountPath();
static QString getUSBDeviceName();
static bool umountUSBStick();
static bool test_mount(const QString& dev, const QString &mountpoint);
static bool test_dir(const QString& dir);
static quint32 getFreeDiskSpace(const QString& dev);
static quint32 getFreeDiskSpaceSDCard();
static bool isSDCardWritable();
static quint32 getFreeDiskSpaceUSBStick();
static bool isUSBStickWritable();
static quint8 createLogFileBackup(const QString & targzfile, const QString &filelistfile = "");
static QString getSDCardMountPath();
static QString getSDCardDeviceName();
static QString getUniqueDeviceId();
static QString getErrorMessage();
static QString readStringFromFile(const QString & filename);
static int readIntFromFile(const QString & filename);
static QString getPTU4SerialNumber();
static QString getPTU4MACAddress();
};
#endif // SYSTEM_H