X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace.hpp;h=f134438e20dd7690ed61c9b40d4e773b7ee0ea39;hb=9d50fbb84f9b3086aa8e985e32534961336563b2;hp=56fc330e74316d82f64a175c3af963c12334bb4c;hpb=45b28c4be657400452daebe585427ee5a7e232be;p=apitrace diff --git a/retrace.hpp b/retrace.hpp index 56fc330..f134438 100644 --- a/retrace.hpp +++ b/retrace.hpp @@ -84,9 +84,22 @@ 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_ */