diff options
| author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-05-20 11:21:42 +0200 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-05-20 11:21:42 +0200 |
| commit | 2a8110532889efb58370d11cf3db0a059f554b82 (patch) | |
| tree | eb40de22b9d0f5b61500f7a089a5a2903008bc59 /lib/CommLayer/CommLayerServerSocket.h | |
| parent | 40d3a846c8fb7dcbc03cf2dfcd911baf0b64987b (diff) | |
| parent | 6e99c8f26bba17cc3b6d4f49a720997d6ff0e5d6 (diff) | |
| download | abrt-2a8110532889efb58370d11cf3db0a059f554b82.tar.gz abrt-2a8110532889efb58370d11cf3db0a059f554b82.tar.xz abrt-2a8110532889efb58370d11cf3db0a059f554b82.zip | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/CommLayer/CommLayerServerSocket.h')
| -rw-r--r-- | lib/CommLayer/CommLayerServerSocket.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/lib/CommLayer/CommLayerServerSocket.h b/lib/CommLayer/CommLayerServerSocket.h index d5604f1..e816ada 100644 --- a/lib/CommLayer/CommLayerServerSocket.h +++ b/lib/CommLayer/CommLayerServerSocket.h @@ -1,10 +1,40 @@ #include "CommLayerServer.h" +#include <glib.h> -class CCommLayerServerSocket -: public CCommLayerServer +#define SOCKET_PATH "/tmp/abrt.socket" + +#define MESSAGE_DELETE_DEBUG_DUMP "(DELETE_DEBUG_DUMP)" +#define MESSAGE_GET_CRASH_INFOS "(GET_CRASH_INFOS)" +#define MESSAGE_REPORT "(REPORT)" +#define MESSAGE_CREATE_REPORT "(CREATE_REPORT)" + +class CCommLayerServerSocket : public CCommLayerServer { private: + typedef std::map<int, GIOChannel*> map_clinet_channels_t; + + int m_nSocket; + GIOChannel* m_pGSocket; + map_clinet_channels_t m_mapClientChannels; + + void Send(const std::string& pData, GIOChannel *pDestination); + + static gboolean server_socket_cb(GIOChannel *source, GIOCondition condition, gpointer data); + static gboolean client_socket_cb(GIOChannel *source, GIOCondition condition, gpointer data); + + std::string GetSenderUID(int pSenderSocket); + void ProcessMessage(const std::string& pMessage, GIOChannel *pSource); + public: CCommLayerServerSocket(); - ~CCommLayerServerSocket(); + virtual ~CCommLayerServerSocket(); + + virtual vector_crash_infos_t GetCrashInfos(const std::string &pDBusSender); + virtual map_crash_report_t CreateReport(const std::string &pUUID,const std::string &pDBusSender); + virtual bool Report(map_crash_report_t pReport); + virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pDBusSender); + + virtual void Crash(const std::string& arg1); + virtual void AnalyzeComplete(map_crash_report_t arg1); + virtual void Error(const std::string& arg1); }; |
