summaryrefslogtreecommitdiffstats
path: root/lib/CommLayer
diff options
context:
space:
mode:
authorZdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com>2009-04-01 12:57:06 +0200
committerZdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com>2009-04-01 12:57:06 +0200
commit99a0819d935bbdfb34226e54ff50ed78b1fc6da0 (patch)
tree60106dfbcff10b425793520ae02a60f159f4a71c /lib/CommLayer
parentb3adc1a23a16b5d7a7d341d748bd3e618e5d225f (diff)
downloadabrt-99a0819d935bbdfb34226e54ff50ed78b1fc6da0.tar.gz
abrt-99a0819d935bbdfb34226e54ff50ed78b1fc6da0.tar.xz
abrt-99a0819d935bbdfb34226e54ff50ed78b1fc6da0.zip
rewritten CDebugDump and CrashTypes
Diffstat (limited to 'lib/CommLayer')
-rw-r--r--lib/CommLayer/CommLayerServerDBus.cpp15
-rw-r--r--lib/CommLayer/CommLayerServerDBus.h6
-rw-r--r--lib/CommLayer/DBusCommon.h3
-rw-r--r--lib/CommLayer/DBusServerProxy.h12
4 files changed, 18 insertions, 18 deletions
diff --git a/lib/CommLayer/CommLayerServerDBus.cpp b/lib/CommLayer/CommLayerServerDBus.cpp
index 81afd09..a5eb437 100644
--- a/lib/CommLayer/CommLayerServerDBus.cpp
+++ b/lib/CommLayer/CommLayerServerDBus.cpp
@@ -17,7 +17,7 @@ CCommLayerServerDBus::CCommLayerServerDBus(CMiddleWare *pMW)
{
std::cerr << "CCommLayerDBus init.." << std::endl;
m_pConn->request_name(CC_DBUS_NAME);
-
+
}
CCommLayerServerDBus::~CCommLayerServerDBus()
@@ -58,17 +58,17 @@ dbus_vector_map_crash_infos_t CCommLayerServerDBus::GetCrashInfosMap(const std::
return retval;
}
-dbus_map_report_info_t CCommLayerServerDBus::CreateReport(const std::string &pUUID,const std::string &pDBusSender)
+dbus_vector_crash_report_info_t CCommLayerServerDBus::CreateReport(const std::string &pUUID,const std::string &pDBusSender)
{
- dbus_map_report_info_t retval;
+ dbus_vector_crash_report_info_t retval;
unsigned long unix_uid = m_pConn->sender_unix_uid(pDBusSender.c_str());
//std::cerr << pUUID << ":" << unix_uid << std::endl;
crash_report_t crashReport;
std::cerr << "Creating report" << std::endl;
try
{
- m_pMW->CreateReport(pUUID,to_string(unix_uid), crashReport);
- retval = crashReport.GetMap();
+ m_pMW->CreateCrashReport(pUUID,to_string(unix_uid), crashReport);
+ retval = crash_report_to_vector_strings(crashReport);
//send out the message about completed analyze
CDBusServer_adaptor::AnalyzeComplete(retval);
}
@@ -80,9 +80,9 @@ dbus_map_report_info_t CCommLayerServerDBus::CreateReport(const std::string &pUU
return retval;
}
-bool CCommLayerServerDBus::Report(dbus_map_report_info_t pReport)
+bool CCommLayerServerDBus::Report(dbus_vector_crash_report_info_t pReport)
{
- crash_report_t crashReport;
+ crash_report_t crashReport = vector_strings_to_crash_report(pReport);
//#define FIELD(X) crashReport.m_s##X = pReport[#X];
//crashReport.m_sUUID = pReport["UUID"];
//ALL_CRASH_REPORT_FIELDS;
@@ -90,7 +90,6 @@ bool CCommLayerServerDBus::Report(dbus_map_report_info_t pReport)
//for (dbus_map_report_info_t::iterator it = pReport.begin(); it!=pReport.end(); ++it) {
// std::cerr << it->second << std::endl;
//}
- crashReport.SetFromMap(pReport);
try
{
m_pMW->Report(crashReport);
diff --git a/lib/CommLayer/CommLayerServerDBus.h b/lib/CommLayer/CommLayerServerDBus.h
index 05ca0a4..9bd29c7 100644
--- a/lib/CommLayer/CommLayerServerDBus.h
+++ b/lib/CommLayer/CommLayerServerDBus.h
@@ -17,11 +17,11 @@ class CCommLayerServerDBus
public:
CCommLayerServerDBus(CMiddleWare *m_pMW);
~CCommLayerServerDBus();
-
+
virtual dbus_vector_crash_infos_t GetCrashInfos(const std::string &pUID);
virtual dbus_vector_map_crash_infos_t GetCrashInfosMap(const std::string &pDBusSender);
- virtual dbus_map_report_info_t CreateReport(const std::string &pUUID,const std::string &pDBusSender);
- virtual bool Report(dbus_map_report_info_t pReport);
+ virtual dbus_vector_crash_report_info_t CreateReport(const std::string &pUUID,const std::string &pDBusSender);
+ virtual bool Report(dbus_vector_crash_report_info_t pReport);
virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pDBusSender);
};
diff --git a/lib/CommLayer/DBusCommon.h b/lib/CommLayer/DBusCommon.h
index 7582541..acd508d 100644
--- a/lib/CommLayer/DBusCommon.h
+++ b/lib/CommLayer/DBusCommon.h
@@ -24,4 +24,5 @@
//typedef std::vector<crash_info_t> vector_crash_infos_t;
typedef std::vector< std::vector<std::string> > dbus_vector_crash_infos_t;
typedef std::vector< std::map<std::string, std::string> > dbus_vector_map_crash_infos_t;
-typedef std::map<std::string, std::string> dbus_map_report_info_t;
+//typedef std::map<std::string, std::string> dbus_map_report_info_t;
+typedef std::vector<std::string> dbus_vector_crash_report_info_t;
diff --git a/lib/CommLayer/DBusServerProxy.h b/lib/CommLayer/DBusServerProxy.h
index da6af72..f1c011a 100644
--- a/lib/CommLayer/DBusServerProxy.h
+++ b/lib/CommLayer/DBusServerProxy.h
@@ -90,8 +90,8 @@ public:
*/
virtual dbus_vector_crash_infos_t GetCrashInfos(const std::string &pUID) = 0;
virtual dbus_vector_map_crash_infos_t GetCrashInfosMap(const std::string &pDBusSender) = 0;
- virtual dbus_map_report_info_t CreateReport(const std::string &pUUID,const std::string &pDBusSender) = 0;
- virtual bool Report(dbus_map_report_info_t pReport) = 0;
+ virtual dbus_vector_crash_report_info_t CreateReport(const std::string &pUUID,const std::string &pDBusSender) = 0;
+ virtual bool Report(dbus_vector_crash_report_info_t pReport) = 0;
virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pDBusSender) = 0;
public:
@@ -106,14 +106,14 @@ public:
emit_signal(sig);
}
/* Notify the clients that creating a report has finished */
- void AnalyzeComplete(dbus_map_report_info_t arg1)
+ void AnalyzeComplete(dbus_vector_crash_report_info_t arg1)
{
::DBus::SignalMessage sig("AnalyzeComplete");
::DBus::MessageIter wi = sig.writer();
wi << arg1;
emit_signal(sig);
}
-
+
void Error(const std::string& arg1)
{
::DBus::SignalMessage sig("Error");
@@ -143,7 +143,7 @@ private:
DBus::MessageIter ri = call.reader();
std::string argin1; ri >> argin1;
- dbus_map_report_info_t argout1 = CreateReport(argin1,call.sender());
+ dbus_vector_crash_report_info_t argout1 = CreateReport(argin1,call.sender());
DBus::ReturnMessage reply(call);
DBus::MessageIter wi = reply.writer();
wi << argout1;
@@ -166,7 +166,7 @@ private:
{
DBus::MessageIter ri = call.reader();
- dbus_map_report_info_t argin1; ri >> argin1;
+ dbus_vector_crash_report_info_t argin1; ri >> argin1;
bool argout1 = Report(argin1);
DBus::ReturnMessage reply(call);
DBus::MessageIter wi = reply.writer();