blob: 76af62b2dc9634ae81a96c6610c95643f8f9b9e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#ifndef COMMLAYERSERVER_H_
#define COMMLAYERSERVER_H_
#include <vector>
#include <map>
#include <string>
#include <sstream>
#include <iostream>
#include "Observer.h"
#include "CrashTypes.h"
class CCommLayerServer {
protected:
CObserver *m_pObserver;
public:
CCommLayerServer();
virtual ~CCommLayerServer();
/* observer */
void Attach(CObserver *pObs);
void Detach(CObserver *pObs);
void Notify(const std::string& pMessage);
virtual vector_crash_infos_t GetCrashInfos(const std::string& pSender) = 0;
virtual report_status_t Report(const map_crash_report_t& pReport, const std::string& pSender) = 0;
virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pSender) = 0;
/* just stubs to be called when not implemented in specific comm layer */
virtual void Crash(const std::string& arg1) {}
virtual void AnalyzeComplete(const map_crash_report_t& arg1) {}
virtual void Error(const std::string& arg1) {}
virtual void Update(const std::string& pDest, const std::string& pMessage) {};
virtual void Warning(const std::string& pMessage) {};
virtual void JobDone(const std::string &pDest, uint64_t pJobID) {};
};
#endif //COMMLAYERSERVER_H_
|