135 #ifndef LIBREPORT_PROBLEM_REPORT_H 136 #define LIBREPORT_PROBLEM_REPORT_H 146 #define PR_SEC_SUMMARY "summary" 147 #define PR_SEC_DESCRIPTION "description" 161 struct problem_report;
162 typedef struct problem_report problem_report_t;
171 typedef FILE problem_report_buffer;
176 #define problem_report_buffer_printf(buf, fmt, ...)\ 177 fprintf((buf), (fmt), ##__VA_ARGS__) 189 problem_report_buffer *problem_report_get_buffer(
const problem_report_t *
self,
190 const char *section_name);
201 const char *problem_report_get_summary(
const problem_report_t *
self);
212 const char *problem_report_get_description(
const problem_report_t *
self);
224 const char *problem_report_get_section(
const problem_report_t *
self,
225 const char *section_name);
233 GList *problem_report_get_attachments(
const problem_report_t *
self);
240 void problem_report_free(problem_report_t *
self);
246 enum problem_formatter_section_flags {
247 PFFF_REQUIRED = 1 << 0,
257 struct problem_formatter;
258 typedef struct problem_formatter problem_formatter_t;
265 problem_formatter_t *problem_formatter_new(
void);
272 void problem_formatter_free(problem_formatter_t *
self);
303 int problem_formatter_add_section(problem_formatter_t *
self,
const char *name,
int flags);
313 int problem_formatter_load_string(problem_formatter_t*
self,
const char *fmt);
323 int problem_formatter_load_file(problem_formatter_t*
self,
const char *path);
334 int problem_formatter_generate_report(
const problem_formatter_t *
self, problem_data_t *data, problem_report_t **report);
340 #endif // LIBREPORT_PROBLEM_REPORT_H