#include #include #include #include #include "MiddleWare.h" #include "Observer.h" //typedef std::vector vector_crash_infos_t; typedef std::vector< std::vector > dbus_vector_crash_infos_t; typedef std::vector< std::map > dbus_vector_map_crash_infos_t; typedef std::map dbus_map_report_info_t; /* just a helper function */ template< class T > std::string to_string( T x ) { std::ostringstream o; o << x; return o.str(); } class CCommLayerServer{ private: /* FIXME more observers? */ //std::vector; CObserver *m_pObserver; public: CMiddleWare *m_pMW; CCommLayerServer(CMiddleWare *pMW); ~CCommLayerServer(); /* observer */ void Attach(CObserver *pObs); void Detach(CObserver *pObs); void Notify(const std::string& pMessage); /* 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 bool DeleteDebugDump(const std::string& pUUID, const std::string& pDBusSender) = 0; */ public: /* just stubs to be called when not implemented in specific comm layer */ void Crash(const std::string& arg1) {} void AnalyzeComplete(dbus_map_report_info_t arg1) {} void Error(const std::string& arg1) {} };