From 75d2a56b6420fd65f596b8ee18b02e121147ea4e Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Mon, 7 Mar 2011 17:09:43 +0100 Subject: renamed some files, no code changes --- src/include/Makefile.am | 2 +- src/include/abrtlib.h | 2 +- src/include/report/event_config.h | 51 +++++++++++++++++++++++++++++++++++ src/include/report/event_xml_parser.h | 43 ----------------------------- 4 files changed, 53 insertions(+), 45 deletions(-) create mode 100644 src/include/report/event_config.h delete mode 100644 src/include/report/event_xml_parser.h (limited to 'src/include') diff --git a/src/include/Makefile.am b/src/include/Makefile.am index e21b043b..e6f0387b 100644 --- a/src/include/Makefile.am +++ b/src/include/Makefile.am @@ -3,7 +3,7 @@ libreport_include_HEADERS = \ report/crash_data.h \ report/dump_dir.h \ report/run_event.h \ - report/event_xml_parser.h + report/event_config.h libabrt_includedir = $(includedir)/abrt libabrt_include_HEADERS = \ diff --git a/src/include/abrtlib.h b/src/include/abrtlib.h index 6122f467..435c4def 100644 --- a/src/include/abrtlib.h +++ b/src/include/abrtlib.h @@ -82,7 +82,7 @@ int vdprintf(int d, const char *format, va_list ap); #include "abrt_types.h" #include "dump_dir.h" #include "run_event.h" -#include "event_xml_parser.h" +#include "event_config.h" #ifdef __cplusplus diff --git a/src/include/report/event_config.h b/src/include/report/event_config.h new file mode 100644 index 00000000..ee0cf7ab --- /dev/null +++ b/src/include/report/event_config.h @@ -0,0 +1,51 @@ +#include + +typedef enum +{ + OPTION_TYPE_TEXT, + OPTION_TYPE_BOOL, + OPTION_TYPE_PASSWORD, + OPTION_TYPE_NUMBER, + OPTION_TYPE_INVALID, +} option_type_t; + +/* + * struct to hold information about config options + * it's supposed to hold information about: + * type -> which designates the widget used to display it and we can do some test based on the type + * label + * allowed value(s) -> regexp? + * name -> env variable name + * value -> value retrieved from the gui, so when we want to set the env + * evn variables, we can just traverse the list of the options + * and set the env variables according to name:value in this structure + */ +typedef struct +{ + char *name; //name of the value which should be used for env variable + char *value; + char *label; + option_type_t type; + char *description; //can be used as tooltip in gtk app + char *allowed_value; + int required; +} event_option_t; + +//structure to hold the option data +typedef struct +{ + char *name; //name of the event "Bugzilla" "RedHat Support Uploader" + char *title; //window title - not used right now, maybe the "name" is enough? + char *action;//action description to show in gui like: Upload report to the Red Hat bugzilla" + GList *options; +} event_config_t; + +void load_event_description_from_file(event_config_t *event_config, const char* filename); + +// (Re)loads data from /etc/abrt/events/*.{conf,xml} +void load_event_config_data(void); +/* Frees all loaded data */ +void free_event_config_data(void); +event_config_t *get_event_config(const char *name); + +extern GList *g_event_config_list; // for iterating through entire list of all loaded configs \ No newline at end of file diff --git a/src/include/report/event_xml_parser.h b/src/include/report/event_xml_parser.h deleted file mode 100644 index 8e55b1b0..00000000 --- a/src/include/report/event_xml_parser.h +++ /dev/null @@ -1,43 +0,0 @@ -#include - -typedef enum -{ - OPTION_TYPE_TEXT, - OPTION_TYPE_BOOL, - OPTION_TYPE_PASSWORD, - OPTION_TYPE_NUMBER, - OPTION_TYPE_INVALID, -} option_type_t; - -/* - * struct to hold information about config options - * it's supposed to hold information about: - * type -> which designates the widget used to display it and we can do some test based on the type - * label - * allowed value(s) -> regexp? - * name -> env variable name - * value -> value retrieved from the gui, so when we want to set the env - * evn variables, we can just traverse the list of the options - * and set the env variables according to name:value in this structure - */ -typedef struct -{ - char *name; //name of the value which should be used for env variable - char *value; - char *label; - option_type_t type; - char *description; //can be used as tooltip in gtk app - char *allowed_value; - int required; -} event_option_t; - -//structure to hold the option data -typedef struct -{ - char *name; //name of the event "Bugzilla" "RedHat Support Uploader" - char *title; //window title - not used right now, maybe the "name" is enough? - char *action;//action description to show in gui like: Upload report to the Red Hat bugzilla" - GList *options; -} event_config_t; - -void load_event_description_from_file(event_config_t *event_config, const char* filename); \ No newline at end of file -- cgit