X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace.hpp;h=f134438e20dd7690ed61c9b40d4e773b7ee0ea39;hb=14b78f815fa02ffda48f8a6599d6af45868266ff;hp=c87fc946c9e5e8e647473f2352179ccbfdd34669;hpb=91343f5cfc53e18d5a59eecef3a0c3726fb0c04e;p=apitrace diff --git a/retrace.hpp b/retrace.hpp index c87fc94..f134438 100644 --- a/retrace.hpp +++ b/retrace.hpp @@ -28,6 +28,9 @@ #include +#include "trace_model.hpp" + + namespace retrace { @@ -73,6 +76,30 @@ public: }; +/** + * Output verbosity when retracing files. + */ +extern int verbosity; + + +void retrace_call(Trace::Call &call); + +void ignore(Trace::Call &call); +void retrace_unknown(Trace::Call &call); + + +typedef void (*Callback)(Trace::Call &call); + +struct Entry { + const char *name; + Callback callback; +}; + +#define RETRACE_DISPATCH_ENTRY(name) {#name, &retrace_##name} +#define RETRACE_IGNORE_ENTRY(name) {#name, &retrace_ignore} + +void dispatch(Trace::Call &call, const Entry *entries, unsigned num_entries); + } /* namespace retrace */ #endif /* _RETRACE_HPP_ */