libreport 2.13.1
A tool to inform users about various problems on the running system
report.h
1/*
2 Copyright (C) 2011 ABRT team.
3 Copyright (C) 2011 RedHat inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18*/
19#ifndef LIBREPORT_REPORT_H_
20#define LIBREPORT_REPORT_H_
21
22#include "problem_data.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28enum {
29 LIBREPORT_NOWAIT = 0,
30 LIBREPORT_WAIT = (1 << 0), /* wait for report to finish */
31 LIBREPORT_GETPID = (1 << 1), /* return pid of child. Use with LIBREPORT_NOWAIT. */
32 /* Note: without LIBREPORT_GETPID, child will be detached */
33 /* (reparented to init) */
34 LIBREPORT_RELOAD_DATA = (1 << 5), /* reload problem data after run (needs WAIT) */
35 LIBREPORT_DEL_DIR = (1 << 6), /* delete directory after reporting (passes --delete to child) */
36 LIBREPORT_RUN_CLI = (1 << 7), /* run 'cli' instead of 'gui' */
37 LIBREPORT_RUN_NEWT = (1 << 8), /* run 'report-newt' */
38 LIBREPORT_IGNORE_NOT_REPORTABLE = (1 << 9), /* do not terminate the
39 reporting process if the
40 not-repotrable file exits. */
41};
42
43int report_problem_in_dir(const char *dirname, int flags);
44
45/* Reports a problem stored in problem_data_t.
46 * It's first saved to a temporary directory and then processed as a dump dir.
47 */
48int report_problem_in_memory(problem_data_t *pd, int flags);
49
50/* Simple wrapper for trivial uses */
51int report_problem(problem_data_t *pd);
52
53#ifdef __cplusplus
54}
55#endif
56
57#endif