mirror of https://github.com/wh201906/Proxmark3GUI
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
811 B
C++
41 lines
811 B
C++
#ifndef UTIL_H
|
|
#define UTIL_H
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <QDebug>
|
|
#include <QThread>
|
|
#include <QApplication>
|
|
#include <QTime>
|
|
#include <QTimer>
|
|
|
|
class Util : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
enum ClientType
|
|
{
|
|
OFFICIAL,
|
|
ICEMAN,
|
|
};
|
|
explicit Util(Util::ClientType clientType, QObject *parent = nullptr);
|
|
|
|
void execCMD(QString cmd);
|
|
QString execCMDWithOutput(QString cmd, unsigned long timeout = 2000);
|
|
void delay(unsigned int msec);
|
|
ClientType getClientType();
|
|
public slots:
|
|
void processOutput(QString output);
|
|
|
|
private:
|
|
bool isRequiringOutput;
|
|
QString* requiredOutput;
|
|
QTime timeStamp;
|
|
signals:
|
|
void refreshOutput(const QString& output);
|
|
void write(QString data);
|
|
ClientType clientType;
|
|
};
|
|
|
|
#endif // UTIL_H
|