diff options
author | Zdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com> | 2009-02-04 17:07:40 +0100 |
---|---|---|
committer | Zdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com> | 2009-02-04 17:07:40 +0100 |
commit | 0b0e5a3f4327916a93ce020a266cb39dc9924362 (patch) | |
tree | 4938322fda559aaea17822c99067ea59805486ad /lib | |
parent | 657904384572cbbabe026006044cd803f87dc9b0 (diff) | |
download | abrt-0b0e5a3f4327916a93ce020a266cb39dc9924362.tar.gz abrt-0b0e5a3f4327916a93ce020a266cb39dc9924362.tar.xz abrt-0b0e5a3f4327916a93ce020a266cb39dc9924362.zip |
tabs are replaced by spaces
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MiddleWare/Database.h | 93 | ||||
-rw-r--r-- | lib/MiddleWare/Language.h | 8 | ||||
-rw-r--r-- | lib/MiddleWare/Plugin.h | 73 | ||||
-rw-r--r-- | lib/MiddleWare/Reporter.h | 6 |
4 files changed, 90 insertions, 90 deletions
diff --git a/lib/MiddleWare/Database.h b/lib/MiddleWare/Database.h index da8567ab..45d995db 100644 --- a/lib/MiddleWare/Database.h +++ b/lib/MiddleWare/Database.h @@ -36,33 +36,33 @@ * in the future we can add another TextData if we need it */ -#define DATABASE_COLUMN_UUID "UUID" +#define DATABASE_COLUMN_UUID "UUID" #define DATABASE_COLUMN_DEBUG_DUMP_PATH "DebugDumpPath" -#define DATABASE_COLUMN_ARCHITECTURE "Architecture" -#define DATABASE_COLUMN_KERNEL "Kernel" -#define DATABASE_COLUMN_EXECUTABLE "Executable" -#define DATABASE_COLUMN_PACKAGE "Package" -#define DATABASE_COLUMN_UID "UID" -#define DATABASE_COLUMN_TIME "Time" -#define DATABASE_COLUMN_COUNT "Count" -#define DATABASE_COLUMN_REPORTED "Reported" -#define DATABASE_COLUMN_BACKTRACE "BackTrace" -#define DATABASE_COLUMN_TEXTDATA1 "TextData1" +#define DATABASE_COLUMN_ARCHITECTURE "Architecture" +#define DATABASE_COLUMN_KERNEL "Kernel" +#define DATABASE_COLUMN_EXECUTABLE "Executable" +#define DATABASE_COLUMN_PACKAGE "Package" +#define DATABASE_COLUMN_UID "UID" +#define DATABASE_COLUMN_TIME "Time" +#define DATABASE_COLUMN_COUNT "Count" +#define DATABASE_COLUMN_REPORTED "Reported" +#define DATABASE_COLUMN_BACKTRACE "BackTrace" +#define DATABASE_COLUMN_TEXTDATA1 "TextData1" typedef struct SDatabaseRow { - std::string m_sUUID; - std::string m_sDebugDumpPath; - std::string m_sArchitecture; - std::string m_sKernel; - std::string m_sExecutable; - std::string m_sPackage; - std::string m_sUID; - std::string m_sTime; - std::string m_sCount; - std::string m_sReported; - std::string m_sBackTrace; - std::string m_sTextData1; + std::string m_sUUID; + std::string m_sDebugDumpPath; + std::string m_sArchitecture; + std::string m_sKernel; + std::string m_sExecutable; + std::string m_sPackage; + std::string m_sUID; + std::string m_sTime; + std::string m_sCount; + std::string m_sReported; + std::string m_sBackTrace; + std::string m_sTextData1; } database_row_t; // <column_name, <array of values in all selected rows> > @@ -70,29 +70,30 @@ typedef std::vector<database_row_t> vector_database_rows_t; class CDatabase : public CPlugin { - public: - virtual ~CDatabase() {} - - virtual void Connect() = 0; - virtual void DisConnect() = 0; - virtual void Insert(const std::string& pUUID, - const std::string& pDebugDumpPath, - const std::string& pArch, - const std::string& pKernel, - const std::string& pExecutable, - const std::string& pPackage, - const std::string& pUID, - const std::string& pTime) = 0; - - virtual void InsertBackTrace(const std::string& pUUID, - const std::string& pBackTrace) = 0; - - virtual void InsertTextData1(const std::string& pUUID, - const std::string& pData) = 0; - - virtual void Delete(const std::string& pUUID) = 0; - - const vector_database_rows_t GetUIDData(const std::string& pUID); + public: + virtual ~CDatabase() {} + + virtual void Connect() = 0; + virtual void DisConnect() = 0; + virtual void Insert(const std::string& pUUID, + const std::string& pDebugDumpPath, + const std::string& pArch, + const std::string& pKernel, + const std::string& pExecutable, + const std::string& pPackage, + const std::string& pUID, + const std::string& pTime) = 0; + + virtual void InsertBackTrace(const std::string& pUUID, + const std::string& pBackTrace) = 0; + + virtual void InsertTextData1(const std::string& pUUID, + const std::string& pData) = 0; + + virtual void Delete(const std::string& pUUID) = 0; + + virtual const vector_database_rows_t GetUIDData(const std::string& pUID) = 0; + virtual const database_row_t GetUUIDData(const std::string& pUUID) = 0; }; #endif /* DATABASE_H_ */ diff --git a/lib/MiddleWare/Language.h b/lib/MiddleWare/Language.h index 81024a53..b83434b5 100644 --- a/lib/MiddleWare/Language.h +++ b/lib/MiddleWare/Language.h @@ -27,10 +27,10 @@ class CLanguage : public CPlugin { - public: - virtual ~CLanguage() {} - virtual std::string GetUUID(void* pData) = 0; - virtual std::string GetReport(void* pData) = 0; + public: + virtual ~CLanguage() {} + virtual std::string GetLocalUUID(const std::string& pDebugDumpPath) = 0; + virtual std::string GetReport(const std::string& pDebugDumpPath) = 0; }; #endif /*LANGUAGE_H_*/ diff --git a/lib/MiddleWare/Plugin.h b/lib/MiddleWare/Plugin.h index 7b4168c4..210e94d8 100644 --- a/lib/MiddleWare/Plugin.h +++ b/lib/MiddleWare/Plugin.h @@ -25,62 +25,61 @@ #include <string> #include <map> -#include <fstream> +#include "Settings.h" #define PLUGINS_MAGIC_NUMBER 1 #define PLUGINS_CONF_EXTENSION "conf" #define PLUGINS_LIB_EXTENSIONS "so" -typedef std::map<std::string, std::string> map_settings_t; - class CPlugin { - public: - virtual ~CPlugin() {} + public: + virtual ~CPlugin() {} - virtual void Init(const map_settings_t& pSettings) = 0; - virtual void DeInit() = 0; + virtual void Init() = 0; + virtual void DeInit() = 0; + virtual void SetSettings(const map_settings_t& pSettings) = 0; }; typedef enum { LANGUAGE, REPORTER, APPLICATION, DATABASE } plugin_type_t; +const char* const plugin_type_str_t[] = {"Language", "Reporter", "Application", "Database"}; typedef struct SPluginInfo { - const plugin_type_t m_Type; - const std::string m_sName; - const std::string m_sVersion; - const std::string m_sDescription; - const std::string m_sEmail; - const std::string m_sWWW; - const int m_nMagicNumber; + const plugin_type_t m_Type; + const std::string m_sName; + const std::string m_sVersion; + const std::string m_sDescription; + const std::string m_sEmail; + const std::string m_sWWW; + const int m_nMagicNumber; } plugin_info_t; #define PLUGIN_IFACE extern "C" #define PLUGIN_INIT(plugin_class)\ - PLUGIN_IFACE CPlugin* plugin_new()\ - {\ - plugin_class* plugin = new plugin_class();\ - if (plugin == NULL)\ - {\ - throw std::string("Not enought memory");\ - }\ - return plugin;\ - }\ - - -#define PLUGIN_INFO(type, name, version,\ - description, email, www)\ - PLUGIN_IFACE const plugin_info_t plugin_info =\ - {\ - type,\ - name,\ - version,\ - description,\ - email,\ - www,\ - PLUGINS_MAGIC_NUMBER,\ - }; + PLUGIN_IFACE CPlugin* plugin_new()\ + {\ + plugin_class* plugin = new plugin_class();\ + if (plugin == NULL)\ + {\ + throw std::string("Not enought memory");\ + }\ + return plugin;\ + }\ + + +#define PLUGIN_INFO(type, name, version, description, email, www)\ + PLUGIN_IFACE const plugin_info_t plugin_info =\ + {\ + type,\ + name,\ + version,\ + description,\ + email,\ + www,\ + PLUGINS_MAGIC_NUMBER,\ + }; #endif /* PLUGIN_H_ */ diff --git a/lib/MiddleWare/Reporter.h b/lib/MiddleWare/Reporter.h index cff912bc..f1493f5b 100644 --- a/lib/MiddleWare/Reporter.h +++ b/lib/MiddleWare/Reporter.h @@ -27,9 +27,9 @@ class CReporter : public CPlugin { - public: - virtual ~CReporter() {} - virtual void Report(const std::string& pDebugDumpPath) = 0; + public: + virtual ~CReporter() {} + virtual void Report(const std::string& pDebugDumpPath) = 0; }; #endif /* REPORTER_H_ */ |