X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=cli%2Fcli.hpp;h=c35cb3ac9eb6144cea3eb898dc4db092eae97007;hb=940cdb8b143455fe2fc002ffd50f5e2ffcaf1260;hp=8e43277422f1a8883897ec3680288f2844411ad2;hpb=5cc28b0393274f17682c000c114c3f6ffa280e68;p=apitrace diff --git a/cli/cli.hpp b/cli/cli.hpp index 8e43277..c35cb3a 100644 --- a/cli/cli.hpp +++ b/cli/cli.hpp @@ -28,15 +28,27 @@ #ifndef _APITRACE_CLI_HPP_ #define _APITRACE_CLI_HPP_ -#define APITRACE_DUMP_SYNOPSIS "Dump given trace(s) to standard output." -void -apitrace_dump_usage(const char *argv0); +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; -void -usage(void); + typedef int (*Function) (int argc, char *argv[]); + Function function; +}; + +extern const Command diff_command; +extern const Command diff_state_command; +extern const Command diff_images_command; +extern const Command dump_command; +extern const Command dump_images_command; +extern const Command pickle_command; +extern const Command repack_command; +extern const Command retrace_command; +extern const Command trace_command; +extern const Command trim_command; #endif /* _APITRACE_CLI_HPP_ */