diff options
author | Karel Klic <kklic@redhat.com> | 2010-03-18 11:18:19 +0100 |
---|---|---|
committer | Karel Klic <kklic@redhat.com> | 2010-03-18 11:18:19 +0100 |
commit | e2d79ab74c2bfa798a3ec9772eb57bc4bcc7a7b8 (patch) | |
tree | 05e4aeede1499a548d02304f1d68276e21630612 /src/CLI/dbus.cpp | |
parent | f916f9dc8938cd59fa8a119f245e6e61d1adf496 (diff) | |
download | abrt-e2d79ab74c2bfa798a3ec9772eb57bc4bcc7a7b8.tar.gz abrt-e2d79ab74c2bfa798a3ec9772eb57bc4bcc7a7b8.tar.xz abrt-e2d79ab74c2bfa798a3ec9772eb57bc4bcc7a7b8.zip |
Allow user to select which reporter he wants to use to report a crash using CLI.
The daemon skips reporters which are not in the list of reporters provided via Report() dbus call.
Reviewed by: Jiri Moskovcak <jmoskovc@redhat.com>
Reviewed by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/CLI/dbus.cpp')
-rw-r--r-- | src/CLI/dbus.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/CLI/dbus.cpp b/src/CLI/dbus.cpp index 600d8556..9dd5bff7 100644 --- a/src/CLI/dbus.cpp +++ b/src/CLI/dbus.cpp @@ -160,6 +160,7 @@ map_crash_data_t call_CreateReport(const char* crash_id) } report_status_t call_Report(const map_crash_data_t& report, + const vector_string_t& reporters, const map_map_string_t &plugins) { DBusMessage* msg = new_call_msg(__func__ + 5); @@ -169,8 +170,7 @@ report_status_t call_Report(const map_crash_data_t& report, /* parameter #1: report data */ store_val(&out_iter, report); /* parameter #2: reporters to use */ - vector_string_t reporters; - store_val(&out_iter, reporters); /* unused by daemon so far */ + store_val(&out_iter, reporters); /* parameter #3 (opt): plugin config */ if (!plugins.empty()) store_val(&out_iter, plugins); @@ -248,6 +248,22 @@ map_plugin_settings_t call_GetPluginSettings(const char *name) return argout; } +map_map_string_t call_GetSettings() +{ + DBusMessage *msg = new_call_msg(__func__ + 5); + DBusMessage *reply = send_get_reply_and_unref(msg); + + DBusMessageIter in_iter; + dbus_message_iter_init(reply, &in_iter); + map_map_string_t argout; + int r = load_val(&in_iter, argout); + if (r != ABRT_DBUS_LAST_FIELD) /* more values present, or bad type */ + error_msg_and_die("dbus call %s: return type mismatch", __func__ + 5); + + dbus_message_unref(reply); + return argout; +} + void handle_dbus_err(bool error_flag, DBusError *err) { if (dbus_error_is_set(err)) |