From 128381fc93e56cefb2b02b973a2ef3380594c91f Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 24 May 2011 19:48:13 +0200 Subject: include/report/report.h: change API from having more functions to having more flags Now we have three functions instead of four: int report_problem_in_dir(const char *dirname, int flags); int report_problem_in_memory(problem_data_t *pd, int flags); int report_problem(problem_data_t *pd); (third one is a trivial wrapper around report_problem_in_memory), and two new flags LIBREPORT_ANALYZE and LIBREPORT_RELOAD_DATA. Signed-off-by: Denys Vlasenko --- src/include/report/report.h | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'src/include') diff --git a/src/include/report/report.h b/src/include/report/report.h index e441875b..269866b2 100644 --- a/src/include/report/report.h +++ b/src/include/report/report.h @@ -22,28 +22,21 @@ #include "problem_data.h" enum { - LIBREPORT_NOWAIT = 0, - LIBREPORT_WAIT = (1 << 0), /* wait for report to finish and reload the problem data */ + LIBREPORT_NOWAIT = 0, + LIBREPORT_WAIT = (1 << 0), /* wait for report to finish and reload the problem data */ + LIBREPORT_ANALYZE = (1 << 1), /* run analyzers? */ + /* ("run reporters" is always on, has no flag (for now?)) */ + LIBREPORT_RELOAD_DATA = (1 << 3), /* reload problem data after run (needs WAIT) */ }; +int report_problem_in_dir(const char *dirname, int flags); -/* analyzes AND reports a problem saved on disk - * - takes user through all the steps in reporting wizard +/* Reports a problem stored in problem_data_t. + * It's first saved to /tmp and then processed as a dump dir. */ -int analyze_and_report_dir(const char* dirname, int flags); +int report_problem_in_memory(problem_data_t *pd, int flags); -/* analyzes AND reports a problem stored in problem_data_t - * it's first saved to /tmp and then processed as a dump_dir - * - takes user through all the steps in reporting wizard - */ -int analyze_and_report(problem_data_t *pd, int flags); - -/* reports a problem saved on disk - * - shows only reporter selector and progress -*/ -int report_dir(const char* dirname); - -/* to report a problem stored in memory */ -int report(problem_data_t *pd); +/* Simple wrapper for trivial uses */ +int report_problem(problem_data_t *pd); #endif /* REPORT_H_ */ -- cgit