X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace.hpp;h=f134438e20dd7690ed61c9b40d4e773b7ee0ea39;hb=1e0fc67981e101495c2e236efb37cb5db83af400;hp=916cf3823c2b920df2a8d3888a3e346fc9ce1c73;hpb=32871ed473727ee7628bda7cad6a9e4130d0374a;p=apitrace diff --git a/retrace.hpp b/retrace.hpp index 916cf38..f134438 100644 --- a/retrace.hpp +++ b/retrace.hpp @@ -82,8 +82,23 @@ public: extern int verbosity; -bool retrace_call(Trace::Call &call); +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 */