diff options
author | Zdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com> | 2009-04-14 13:30:29 +0200 |
---|---|---|
committer | Zdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com> | 2009-04-14 13:30:29 +0200 |
commit | 17f0c06e59f608c4bcfebde0c04efdc5e3097cb3 (patch) | |
tree | 9c71e977ae5dfdbb8c1dff402632b3b854db514d /lib/Plugins/Bugzilla.h | |
parent | 68b651da3a4768071e83eb891fb370ba20489107 (diff) | |
download | abrt-17f0c06e59f608c4bcfebde0c04efdc5e3097cb3.tar.gz abrt-17f0c06e59f608c4bcfebde0c04efdc5e3097cb3.tar.xz abrt-17f0c06e59f608c4bcfebde0c04efdc5e3097cb3.zip |
added bugzilla plugin
Diffstat (limited to 'lib/Plugins/Bugzilla.h')
-rw-r--r-- | lib/Plugins/Bugzilla.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/lib/Plugins/Bugzilla.h b/lib/Plugins/Bugzilla.h new file mode 100644 index 00000000..53ce05fda --- /dev/null +++ b/lib/Plugins/Bugzilla.h @@ -0,0 +1,47 @@ +#ifndef BUGZILLA_H_ +#define BUGZILLA_H_ + +#include "Plugin.h" +#include "Reporter.h" +#include <xmlrpc-c/client.hpp> + +class CReporterBugzilla : public CReporter +{ + private: + typedef std::map<std::string, xmlrpc_c::value> map_xmlrpc_params_t; + + void Login(); + void Logout(); + bool CheckUUIDInBugzilla(const std::string& pUUID); + void NewBug(const map_crash_report_t& pCrashReport); + void CreateNewBugDescription(const map_crash_report_t& pCrashReport, + std::string& pDescription); + void GetProductAndVersion(const std::string& pRelease, + std::string& pProduct, + std::string& pVersion); + + xmlrpc_c::clientXmlTransport_curl* m_pXmlrpcTransport; + xmlrpc_c::client_xml* m_pXmlrpcClient; + xmlrpc_c::carriageParm_curl0 *m_pCarriageParm; + std::string m_sBugzillaURL; + std::string m_sLogin; + std::string m_sPassword; + + public: + CReporterBugzilla(); + virtual ~CReporterBugzilla(); + virtual void LoadSettings(const std::string& pPath); + virtual void Report(const map_crash_report_t& pCrashReport); +}; + +PLUGIN_INFO(REPORTER, + CReporterBugzilla, + "Bugzilla", + "0.0.1", + "Check if a bug isn't already reported in a bugzilla " + "and if not, report it.", + "zprikryl@redhat.com", + "https://fedorahosted.org/crash-catcher/wiki"); + + +#endif /* BUGZILLA_H_ */ |