diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-06-01 17:57:31 +0200 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-06-01 17:57:31 +0200 |
commit | 2fa751f6d98995e73db4d0edd0d22b9560281644 (patch) | |
tree | cc5ed9575493d38d19db783324d329d2e43fe94d /src/include | |
parent | f4e4a76f3ca70f0bad636e324c43d3da993df854 (diff) | |
download | abrt-2fa751f6d98995e73db4d0edd0d22b9560281644.tar.gz abrt-2fa751f6d98995e73db4d0edd0d22b9560281644.tar.xz abrt-2fa751f6d98995e73db4d0edd0d22b9560281644.zip |
wizard: hook selection checkboxes to reporters.
Checkboxes are controlled by the following elements in .xml:
<requires-items> ITEM1,ITEM2 </requires-items>
<exclude-items-by-default> ITEM1,ITEM2 </exclude-items-by-default>
<exclude-items-always> ITEM1,ITEM2 </exclude-items-always>
<exclude-binary-items> yes / no </exclude-binary-items>
<include-items-by-default> ITEM1,ITEM2 </include-items-by-default>
exclude-items-by-default and exclude-items-always can be "*"
meaning "all". include-items-by-default specifies which items
are included (checked) is exclude-items-by-default is "*".
Else, all are checked by default.
the set of iters NOT included is passed in $EXCLUDE_FROM_REPORT
variable. bugzilla, kerneloops, mailx, print and rhtsupport
are made aware of this variable.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/report/event_config.h | 13 | ||||
-rw-r--r-- | src/include/report/problem_data.h | 9 |
2 files changed, 17 insertions, 5 deletions
diff --git a/src/include/report/event_config.h b/src/include/report/event_config.h index 2e2783de..8ab9477d 100644 --- a/src/include/report/event_config.h +++ b/src/include/report/event_config.h @@ -66,12 +66,17 @@ void free_event_option(event_option_t *p); //structure to hold the option data typedef struct { - char *screen_name; //ui friendly name of the event: "Bugzilla" "RedHat Support Upload" - //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" + char *screen_name; //ui friendly name of the event: "Bugzilla" "RedHat Support Upload" char *description; // "Report to..."/"Save to file". Should be one sentence, not long char *long_descr; // Long(er) explanation, if needed - char *creates_elements; + + char *ec_creates_items; + char *ec_requires_items; + char *ec_exclude_items_by_default; + char *ec_include_items_by_default; + char *ec_exclude_items_always; + bool ec_exclude_binary_items; + GList *options; } event_config_t; diff --git a/src/include/report/problem_data.h b/src/include/report/problem_data.h index f7178077..31ef7d25 100644 --- a/src/include/report/problem_data.h +++ b/src/include/report/problem_data.h @@ -40,6 +40,11 @@ enum { struct problem_item { char *content; unsigned flags; + /* Used by UI for presenting "item allowed/not allowed" checkboxes: */ + int selected_by_user; /* 0 "don't know", -1 "no", 1 "yes" */ + int allowed_by_reporter; /* 0 "no", 1 "yes" */ + int default_by_reporter; /* 0 "no", 1 "yes" */ + int required_by_reporter; /* 0 "no", 1 "yes" */ }; typedef struct problem_item problem_item; @@ -80,8 +85,10 @@ const char *get_problem_item_content_or_die(problem_data_t *problem_data, const /* Conversions between in-memory and on-disk formats */ -void load_problem_data_from_dump_dir(problem_data_t *problem_data, struct dump_dir *dd); +void load_problem_data_from_dump_dir(problem_data_t *problem_data, struct dump_dir *dd, char **excluding); problem_data_t *create_problem_data_from_dump_dir(struct dump_dir *dd); +/* Helper for typical operation in reporters: */ +problem_data_t *create_problem_data_for_reporting(const char *dump_dir_name); struct dump_dir *create_dump_dir_from_problem_data(problem_data_t *problem_data, const char *base_dir_name); |