cutter/src/common/RizinTask.h

36 lines
582 B
C
Raw Normal View History

2018-07-22 13:04:13 +00:00
#ifndef R2TASK_H
#define R2TASK_H
#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>;
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();
QJsonDocument getResultJson();
2018-07-22 13:04:13 +00:00
const char *getResultRaw();
signals:
void finished();
};
#endif // R2TASK_H