2018-07-22 13:04:13 +00:00
|
|
|
|
2020-12-16 10:59:23 +00:00
|
|
|
#ifndef RZTASK_H
|
|
|
|
#define RZTASK_H
|
2018-07-22 13:04:13 +00:00
|
|
|
|
2019-02-22 16:50:45 +00:00
|
|
|
#include "core/Cutter.h"
|
2018-07-22 13:04:13 +00:00
|
|
|
|
2020-12-16 09:51:53 +00:00
|
|
|
class RizinTask: public QObject
|
2018-07-22 13:04:13 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private:
|
2020-10-28 12:28:04 +00:00
|
|
|
RzCoreTask *task;
|
2018-07-22 13:04:13 +00:00
|
|
|
|
2020-12-16 09:51:53 +00:00
|
|
|
static void taskFinishedCallback(const char *, void *user);
|
2018-07-22 13:04:13 +00:00
|
|
|
void taskFinished();
|
|
|
|
|
|
|
|
public:
|
2020-12-16 09:51:53 +00:00
|
|
|
using Ptr = QSharedPointer<RizinTask>;
|
2019-11-20 08:50:07 +00:00
|
|
|
|
2020-12-16 09:51:53 +00:00
|
|
|
explicit RizinTask(const QString &cmd, bool transient = true);
|
|
|
|
~RizinTask();
|
2018-07-22 13:04:13 +00:00
|
|
|
|
|
|
|
void startTask();
|
|
|
|
void breakTask();
|
|
|
|
void joinTask();
|
|
|
|
|
|
|
|
QString getResult();
|
2019-08-28 17:01:12 +00:00
|
|
|
QJsonDocument getResultJson();
|
2018-07-22 13:04:13 +00:00
|
|
|
const char *getResultRaw();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void finished();
|
|
|
|
};
|
|
|
|
|
2020-12-16 10:59:23 +00:00
|
|
|
#endif // RZTASK_H
|