]> git.cworth.org Git - apitrace/blobdiff - cli/cli.hpp
Add new "apitrace diff-state" command
[apitrace] / cli / cli.hpp
index 1bdc689b392f142858b4875d948312125e678801..edada5141b4e617c10a96bf65d54d4c5577097bd 100644 (file)
 #ifndef _APITRACE_CLI_HPP_
 #define _APITRACE_CLI_HPP_
 
-#define APITRACE_DUMP_SYNOPSIS "Dump given trace(s) to standard output."
 
-void
-apitrace_dump_usage(void);
+struct Command {
+    const char *name;
+    const char *synopsis;
 
-int
-apitrace_dump_command(int argc, char *argv[], int first_command_arg);
+    typedef void (*Usage) (void);
+    Usage usage;
+
+    typedef int (*Function) (int argc, char *argv[]);
+    Function function;
+};
+
+extern const Command diff_command;
+extern const Command diff_state_command;
+extern const Command dump_command;
+extern const Command trace_command;
 
 #endif /* _APITRACE_CLI_HPP_ */