diff options
author | Karel Klic <kklic@redhat.com> | 2009-11-09 13:53:21 +0100 |
---|---|---|
committer | Karel Klic <kklic@redhat.com> | 2009-11-09 13:53:21 +0100 |
commit | 7e6c31b4bce9958453920c5893ceeb0c45c8a6f7 (patch) | |
tree | 3ffaec9836ea98285faf9f038a6a3c6301606965 /src/CLI | |
parent | 98f5de8526c51d8ba8495351837b6ef5822860ad (diff) | |
download | abrt-7e6c31b4bce9958453920c5893ceeb0c45c8a6f7.tar.gz abrt-7e6c31b4bce9958453920c5893ceeb0c45c8a6f7.tar.xz abrt-7e6c31b4bce9958453920c5893ceeb0c45c8a6f7.zip |
GetPluginsInfo implementation
Diffstat (limited to 'src/CLI')
-rw-r--r-- | src/CLI/dbus.cpp | 15 | ||||
-rw-r--r-- | src/CLI/dbus.h | 12 |
2 files changed, 26 insertions, 1 deletions
diff --git a/src/CLI/dbus.cpp b/src/CLI/dbus.cpp index 420fe703..42222d15 100644 --- a/src/CLI/dbus.cpp +++ b/src/CLI/dbus.cpp @@ -113,6 +113,21 @@ void call_DeleteDebugDump(const char* uuid) dbus_message_unref(reply); } +vector_map_string_t call_GetPluginsInfo() +{ + DBusMessage *msg = new_call_msg("GetPluginsInfo"); + DBusMessage *reply = send_get_reply_and_unref(msg); + + vector_map_string_t argout; + DBusMessageIter in_iter; + dbus_message_iter_init(reply, &in_iter); + 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 GetPluginsInfo: return type mismatch"); + dbus_message_unref(reply); + return argout; +} + void handle_dbus_err(bool error_flag, DBusError *err) { if (dbus_error_is_set(err)) diff --git a/src/CLI/dbus.h b/src/CLI/dbus.h index c6cb82a9..fdd400ae 100644 --- a/src/CLI/dbus.h +++ b/src/CLI/dbus.h @@ -24,9 +24,19 @@ extern DBusConnection* s_dbus_conn; extern vector_crash_infos_t call_GetCrashInfos(); -extern map_crash_report_t call_CreateReport(const char* uuid); +extern map_crash_report_t call_CreateReport(const char *uuid); extern void call_Report(const map_crash_report_t& report); extern void call_DeleteDebugDump(const char* uuid); + +/* Gets basic data about all installed plugins. + */ +extern vector_map_string_t call_GetPluginsInfo(); + +/* Gets default plugin settings. + * Parameter name corresponds to name obtained from call_GetPluginsInfo. + */ +extern map_plugin_settings_t call_GetPluginSettings(const char *name); + extern void handle_dbus_err(bool error_flag, DBusError *err); #endif |