libreport
2.1.3
A tool to inform users about various problems on the running system
|
00001 /* 00002 Copyright (C) 2011 ABRT team. 00003 Copyright (C) 2011 RedHat inc. 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License along 00016 with this program; if not, write to the Free Software Foundation, Inc., 00017 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 */ 00019 #ifndef LIBREPORT_REPORT_H_ 00020 #define LIBREPORT_REPORT_H_ 00021 00022 #include "problem_data.h" 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 enum { 00029 LIBREPORT_NOWAIT = 0, 00030 LIBREPORT_WAIT = (1 << 0), /* wait for report to finish */ 00031 LIBREPORT_GETPID = (1 << 1), /* return pid of child. Use with LIBREPORT_NOWAIT. */ 00032 /* Note: without LIBREPORT_GETPID, child will be detached */ 00033 /* (reparented to init) */ 00034 LIBREPORT_RELOAD_DATA = (1 << 5), /* reload problem data after run (needs WAIT) */ 00035 LIBREPORT_DEL_DIR = (1 << 6), /* delete directory after reporting (passes --delete to child) */ 00036 LIBREPORT_RUN_CLI = (1 << 7), /* run 'cli' instead of 'gui' */ 00037 LIBREPORT_RUN_NEWT = (1 << 8), /* run 'report-newt' */ 00038 }; 00039 00040 int report_problem_in_dir(const char *dirname, int flags); 00041 00042 /* Reports a problem stored in problem_data_t. 00043 * It's first saved to /tmp and then processed as a dump dir. 00044 */ 00045 int report_problem_in_memory(problem_data_t *pd, int flags); 00046 00047 /* Simple wrapper for trivial uses */ 00048 int report_problem(problem_data_t *pd); 00049 00050 #ifdef __cplusplus 00051 } 00052 #endif 00053 00054 #endif