4 #include "trace_api.hpp"
5 #include "apitracecall.h"
15 /* internal class used by the retracer to run
17 class RetraceProcess : public QObject
21 RetraceProcess(QObject *parent=0);
24 QProcess *process() const;
26 QString fileName() const;
27 void setFileName(const QString &name);
29 void setAPI(trace::API api);
31 bool isBenchmarking() const;
32 void setBenchmarking(bool bench);
34 bool isDoubleBuffered() const;
35 void setDoubleBuffered(bool db);
37 void setCaptureAtCallNumber(qlonglong num);
38 qlonglong captureAtCallNumber() const;
40 bool captureState() const;
41 void setCaptureState(bool enable);
48 void finished(const QString &output);
49 void error(const QString &msg);
50 void foundState(ApiTraceState *state);
51 void retraceErrors(const QList<ApiTraceError> &errors);
54 void replayFinished(int exitCode, QProcess::ExitStatus exitStatus);
55 void replayError(QProcess::ProcessError err);
61 bool m_doubleBuffered;
63 qlonglong m_captureCall;
66 QJson::Parser *m_jsonParser;
69 class Retracer : public QThread
73 Retracer(QObject *parent=0);
75 QString fileName() const;
76 void setFileName(const QString &name);
78 void setAPI(trace::API api);
80 bool isBenchmarking() const;
81 void setBenchmarking(bool bench);
83 bool isDoubleBuffered() const;
84 void setDoubleBuffered(bool db);
86 void setCaptureAtCallNumber(qlonglong num);
87 qlonglong captureAtCallNumber() const;
89 bool captureState() const;
90 void setCaptureState(bool enable);
93 void finished(const QString &output);
94 void foundState(ApiTraceState *state);
95 void error(const QString &msg);
96 void retraceErrors(const QList<ApiTraceError> &errors);
107 bool m_doubleBuffered;
109 qlonglong m_captureCall;
111 QProcessEnvironment m_processEnvironment;