summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/report/event_config.h2
-rw-r--r--src/lib/Makefile.am3
-rw-r--r--src/lib/event_config.c26
3 files changed, 29 insertions, 2 deletions
diff --git a/src/include/report/event_config.h b/src/include/report/event_config.h
index ee0cf7ab..3d05a2c9 100644
--- a/src/include/report/event_config.h
+++ b/src/include/report/event_config.h
@@ -48,4 +48,4 @@ void load_event_config_data(void);
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
+extern GHashTable *g_event_config_list; // for iterating through entire list of all loaded configs \ No newline at end of file
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 9e9a7324..4f800a0e 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -44,7 +44,8 @@ libreport_la_SOURCES = \
parse_release.c \
parse_options.c parse_options.h \
steal_directory.c \
- event_xml_parser.c
+ event_xml_parser.c \
+ event_config.c
libreport_la_CPPFLAGS = \
-Wall -Werror \
-I$(srcdir)/../include/report -I$(srcdir)/../include \
diff --git a/src/lib/event_config.c b/src/lib/event_config.c
new file mode 100644
index 00000000..77cbaf4b
--- /dev/null
+++ b/src/lib/event_config.c
@@ -0,0 +1,26 @@
+#include "event_config.h"
+
+GHashTable *g_event_config_list;
+
+// (Re)loads data from /etc/abrt/events/*.{conf,xml}
+void load_event_config_data(void)
+{
+ /* for each xml file call load_event_description_from_file */
+ /* for each conf file call load_even_options_value_from_file?
+ * - we don't have this
+ * - should re-use the event_config structure created when parsing xml - if exists
+ * - or should this one be called first?
+ */
+}
+/* Frees all loaded data */
+void free_event_config_data(void)
+{
+
+}
+
+event_config_t *get_event_config(const char *name)
+{
+ //could g_event_config_list be null?
+ gpointer event_config = g_hash_table_lookup(g_event_config_list, name);
+ return event_config;
+}