diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-04 19:02:28 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-04 19:02:28 +0200 |
commit | e16dc4d89049b94d270f46a1b6de194863a7a583 (patch) | |
tree | 31c24f17cbfe922c7306c66ae46651a5e2acb073 | |
parent | 9bb2241670b97ab78a4dd93700b704c6a9cf1a91 (diff) | |
download | abrt-e16dc4d89049b94d270f46a1b6de194863a7a583.tar.gz abrt-e16dc4d89049b94d270f46a1b6de194863a7a583.tar.xz abrt-e16dc4d89049b94d270f46a1b6de194863a7a583.zip |
typedef cleanup. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | inc/CrashTypes.h | 4 | ||||
-rw-r--r-- | inc/abrt_types.h | 8 | ||||
-rw-r--r-- | lib/Plugins/RunApp.cpp | 4 | ||||
-rw-r--r-- | lib/Plugins/RunApp.h | 3 | ||||
-rw-r--r-- | src/Applet/CCApplet.h | 2 | ||||
-rw-r--r-- | src/Daemon/Daemon.cpp | 39 | ||||
-rw-r--r-- | src/Daemon/Daemon.h | 2 | ||||
-rw-r--r-- | src/Daemon/MiddleWare.cpp | 2 | ||||
-rw-r--r-- | src/Daemon/RPM.h | 2 | ||||
-rw-r--r-- | src/Daemon/Settings.cpp | 22 | ||||
-rw-r--r-- | src/Daemon/Settings.h | 8 |
11 files changed, 48 insertions, 48 deletions
diff --git a/inc/CrashTypes.h b/inc/CrashTypes.h index e5001f69..5149fb53 100644 --- a/inc/CrashTypes.h +++ b/inc/CrashTypes.h @@ -39,11 +39,11 @@ // currently, vector always has exactly 3 elements -> <type, editable, content> // <key, data> -typedef std::map<std::string, vector_strings_t> map_crash_data_t; +typedef map_vector_string_t map_crash_data_t; typedef map_crash_data_t map_crash_info_t; -typedef std::vector<map_crash_info_t> vector_crash_infos_t; typedef map_crash_data_t map_crash_report_t; +typedef std::vector<map_crash_info_t> vector_crash_infos_t; inline void add_crash_data_to_crash_info(map_crash_info_t& pCrashInfo, const std::string& pItem, diff --git a/inc/abrt_types.h b/inc/abrt_types.h index 3ac31bc6..1fbb701a 100644 --- a/inc/abrt_types.h +++ b/inc/abrt_types.h @@ -25,17 +25,19 @@ #include <vector> #include <string> -typedef std::vector<std::string> vector_strings_t; -typedef std::set<std::string> set_strings_t; +typedef std::vector<std::string> vector_string_t; +typedef std::set<std::string> set_string_t; typedef std::pair<std::string, std::string> pair_string_string_t; typedef std::map<std::string, std::string> map_string_t; typedef std::vector<pair_string_string_t> vector_pair_string_string_t; typedef std::vector<map_string_t> vector_map_string_t; +typedef std::map<std::string, map_string_t> map_map_string_t; +typedef std::map<std::string, vector_string_t> map_vector_string_t; typedef std::map<std::string, vector_pair_string_string_t> map_vector_pair_string_string_t; /* Report() method return type */ -typedef std::map<std::string, vector_strings_t> report_status_t; +typedef map_vector_string_t report_status_t; /* Holds result of .conf file section parsing: map["name"] = "value" */ typedef map_string_t map_plugin_settings_t; diff --git a/lib/Plugins/RunApp.cpp b/lib/Plugins/RunApp.cpp index a1c31f6a..4bc53181 100644 --- a/lib/Plugins/RunApp.cpp +++ b/lib/Plugins/RunApp.cpp @@ -29,7 +29,7 @@ #define COMMAND 0 #define FILENAME 1 -void CActionRunApp::ParseArgs(const std::string& psArgs, vector_args_t& pArgs) +void CActionRunApp::ParseArgs(const std::string& psArgs, vector_string_t& pArgs) { unsigned int ii; bool is_quote = false; @@ -64,7 +64,7 @@ void CActionRunApp::Run(const std::string& pActionDir, char line[1024]; std::string output = ""; - vector_args_t args; + vector_string_t args; ParseArgs(pArgs, args); diff --git a/lib/Plugins/RunApp.h b/lib/Plugins/RunApp.h index bec42f4d..23315f1d 100644 --- a/lib/Plugins/RunApp.h +++ b/lib/Plugins/RunApp.h @@ -29,8 +29,7 @@ class CActionRunApp : public CAction { private: - typedef std::vector<std::string> vector_args_t; - void ParseArgs(const std::string& psArgs, vector_args_t& pArgs); + void ParseArgs(const std::string& psArgs, vector_string_t& pArgs); public: virtual void Run(const std::string& pActionDir, diff --git a/src/Applet/CCApplet.h b/src/Applet/CCApplet.h index 74c8cc52..dccd70b7 100644 --- a/src/Applet/CCApplet.h +++ b/src/Applet/CCApplet.h @@ -43,7 +43,7 @@ class CApplet GObject *m_pAboutDialog; NotifyNotification *m_pNotification; - std::map<int, std::string > m_mapEvents; + std::map<int, std::string> m_mapEvents; DaemonWatcher *m_pDaemonWatcher; bool m_bDaemonRunning; DBus::Connection *m_pSessionDBus; diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index 5809cb20..5b8039d7 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -23,26 +23,24 @@ #include <pthread.h> #include <iostream> #include <string> -#include "abrtlib.h" -#include "ABRTException.h" -#include "RPM.h" -#include "CrashWatcher.h" -#include "Daemon.h" - #if HAVE_CONFIG_H #include <config.h> #endif - #if HAVE_LOCALE_H #include <locale.h> #endif - #if ENABLE_NLS #include <libintl.h> #define _(S) gettext(S) #else #define _(S) (S) #endif +#include "abrtlib.h" +#include "ABRTException.h" +#include "RPM.h" +#include "CrashWatcher.h" +#include "Daemon.h" + /* Daemon initializes, then sits in glib main loop, waiting for events. * Events can be: @@ -51,17 +49,18 @@ * - signal: we got SIGTERM or SIGINT * * DBus methods we have: - * - GetCrashInfos(): returns a vector_crash_infos_t (vector_map_vector_strings_t) + * - GetCrashInfos(): returns a vector_crash_infos_t (vector_map_vector_string_t) * of crashes for given uid - * v[N]["???"][N] = "???" - * - CreateReport(str): starts creating a report for given /var/cache/abrt/STR. + * v[N]["executable"/"uid"/"kernel"/"backtrace"][N] = "contents" + * - CreateReport(DIR): starts creating a report for given /var/cache/abrt/DIR. * Returns job id (uint64) - * - Report(map_crash_report_t (map_vector_strings_t)): ??? - * Returns report_status_t (map_vector_strings_t) + * - Report(map_crash_report_t (map_vector_string_t)): + * "Please report this crash": calls Report() of all registered reporter plugins + * Returns report_status_t (map_vector_string_t) - the status of each call * - DeleteDebugDump(DIR): delete /var/cache/abrt/DIR. Returns bool - * - GetJobResult(job_id): returns map_crash_report_t (map_vector_strings_t) + * - GetJobResult(job_id): returns map_crash_report_t (map_vector_string_t) * - GetPluginsInfo(): returns vector_map_string_t - * - GetPluginSettings(PluginName): returns map_plugin_settings_t (map_map_string_t) + * - GetPluginSettings(PluginName): returns map_plugin_settings_t (map_string_t) * - SetPluginSettings(PluginName, map_plugin_settings_t): returns void * - RegisterPlugin(PluginName): returns void * - UnRegisterPlugin(PluginName): returns void @@ -191,19 +190,19 @@ static gboolean cron_activation_reshedule_cb(gpointer data) static void SetUpMW() { - set_strings_t::iterator it_k = g_settings_setOpenGPGPublicKeys.begin(); + set_string_t::iterator it_k = g_settings_setOpenGPGPublicKeys.begin(); for (; it_k != g_settings_setOpenGPGPublicKeys.end(); it_k++) { log("Loading GPG key '%s'", it_k->c_str()); g_RPM.LoadOpenGPGPublicKey(it_k->c_str()); } - set_strings_t::iterator it_b = g_settings_mapBlackList.begin(); + set_string_t::iterator it_b = g_settings_mapBlackList.begin(); for (; it_b != g_settings_mapBlackList.end(); it_b++) { g_setBlackList.insert(*it_b); } log("Registering plugins"); - set_strings_t::iterator it_p = g_settings_setEnabledPlugins.begin(); + set_string_t::iterator it_p = g_settings_setEnabledPlugins.begin(); for (; it_p != g_settings_setEnabledPlugins.end(); it_p++) { g_pPluginManager->RegisterPlugin(*it_p); @@ -328,7 +327,7 @@ static void FindNewDumps(const char* pPath) log("Scanning for unsaved entries"); struct stat stats; DIR *dp; - std::vector<std::string> dirs; + vector_string_t dirs; // get potential unsaved debugdumps dp = opendir(pPath); if (dp == NULL) @@ -352,7 +351,7 @@ static void FindNewDumps(const char* pPath) } closedir(dp); - std::vector<std::string>::iterator itt = dirs.begin(); + vector_string_t::iterator itt = dirs.begin(); for (; itt != dirs.end(); ++itt) { map_crash_info_t crashinfo; diff --git a/src/Daemon/Daemon.h b/src/Daemon/Daemon.h index 084ccd94..3802745d 100644 --- a/src/Daemon/Daemon.h +++ b/src/Daemon/Daemon.h @@ -50,7 +50,7 @@ extern CRPM g_RPM; /** * A set of blacklisted packages. */ -extern set_strings_t g_setBlackList; +extern set_string_t g_setBlackList; /* Map <UID, <UUID, result>> to cache the results from CreateReport_t() */ extern std::map<const std::string, std::map<int, map_crash_report_t> > g_pending_jobs; diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index 6400414b..05e91fdd 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -43,7 +43,7 @@ CRPM g_RPM; /** * A set of blacklisted packages. */ -set_strings_t g_setBlackList; +set_string_t g_setBlackList; /** diff --git a/src/Daemon/RPM.h b/src/Daemon/RPM.h index 55e37125..57f9a97b 100644 --- a/src/Daemon/RPM.h +++ b/src/Daemon/RPM.h @@ -42,7 +42,7 @@ class CRPM /** * A set, which contains finger prints. */ - set_strings_t m_setFingerprints; + set_string_t m_setFingerprints; public: /** diff --git a/src/Daemon/Settings.cpp b/src/Daemon/Settings.cpp index d06daf55..086c18a8 100644 --- a/src/Daemon/Settings.cpp +++ b/src/Daemon/Settings.cpp @@ -34,9 +34,9 @@ static map_string_t s_mapSectionCron; /* one line: "OpenGPGCheck = value" */ bool g_settings_bOpenGPGCheck = false; /* one line: "OpenGPGPublicKeys = value1,value2" */ -set_strings_t g_settings_setOpenGPGPublicKeys; -set_strings_t g_settings_mapBlackList; -set_strings_t g_settings_setEnabledPlugins; +set_string_t g_settings_setOpenGPGPublicKeys; +set_string_t g_settings_mapBlackList; +set_string_t g_settings_setEnabledPlugins; std::string g_settings_sDatabase; unsigned int g_settings_nMaxCrashReportsSize = 1000; /* one line: "ActionsAndReporters = aa_first,bb_first(bb_second),cc_first" */ @@ -53,11 +53,11 @@ map_cron_t g_settings_mapCron; * Loading */ -static set_strings_t ParseList(const std::string& pList) +static set_string_t ParseList(const std::string& pList) { unsigned int ii; std::string item = ""; - set_strings_t set; + set_string_t set; for (ii = 0; ii < pList.size(); ii++) { if (pList[ii] == ',') @@ -175,12 +175,12 @@ static void ParseCron() } } -static set_strings_t ParseKey(const std::string& Key) +static set_string_t ParseKey(const std::string& Key) { unsigned int ii; std::string item = ""; std::string key = ""; - set_strings_t set; + set_string_t set; bool is_quote = false; for (ii = 0; ii < Key.size(); ii++) { @@ -222,9 +222,9 @@ static void ParseAnalyzerActionsAndReporters() map_string_t::iterator it = s_mapSectionAnalyzerActionsAndReporters.begin(); for (; it != s_mapSectionAnalyzerActionsAndReporters.end(); it++) { - set_strings_t keys = ParseKey(it->first); + set_string_t keys = ParseKey(it->first); vector_pair_string_string_t actionsAndReporters = ParseListWithArgs(it->second); - set_strings_t::iterator it_keys = keys.begin(); + set_string_t::iterator it_keys = keys.begin(); for (; it_keys != keys.end(); it_keys++) { g_settings_mapAnalyzerActionsAndReporters[*it_keys] = actionsAndReporters; @@ -342,12 +342,12 @@ map_abrt_settings_t GetSettings() * Saving */ -static void SaveSetString(const char* pKey, const set_strings_t& pSet, FILE* pFOut) +static void SaveSetString(const char* pKey, const set_string_t& pSet, FILE* pFOut) { fprintf(pFOut, "%s =", pKey); const char* fmt = " %s"; - set_strings_t::const_iterator it_set = pSet.begin(); + set_string_t::const_iterator it_set = pSet.begin(); for (; it_set != pSet.end(); it_set++) { fprintf(pFOut, fmt, it_set->c_str()); diff --git a/src/Daemon/Settings.h b/src/Daemon/Settings.h index 397a28c9..0ce19fc4 100644 --- a/src/Daemon/Settings.h +++ b/src/Daemon/Settings.h @@ -5,11 +5,11 @@ typedef map_vector_pair_string_string_t map_analyzer_actions_and_reporters_t; typedef map_vector_pair_string_string_t map_cron_t; -typedef std::map<std::string, std::map<std::string, std::string> > map_abrt_settings_t; +typedef map_map_string_t map_abrt_settings_t; -extern set_strings_t g_settings_setOpenGPGPublicKeys; -extern set_strings_t g_settings_mapBlackList; -extern set_strings_t g_settings_setEnabledPlugins; +extern set_string_t g_settings_setOpenGPGPublicKeys; +extern set_string_t g_settings_mapBlackList; +extern set_string_t g_settings_setEnabledPlugins; extern unsigned int g_settings_nMaxCrashReportsSize; extern bool g_settings_bOpenGPGCheck; extern std::string g_settings_sDatabase; |