// #ifndef LL_LLMESSAGELOG_H #define LL_LLMESSAGELOG_H #include "stdtypes.h" #include "llhost.h" #include #include class LLMessageSystem; class LLMessageLogEntry { public: enum EType { TEMPLATE, HTTP_REQUEST, HTTP_RESPONSE }; LLMessageLogEntry(EType type, LLHost from_host, LLHost to_host, U8* data, S32 data_size); LLMessageLogEntry(EType type, LLHost from_host, LLHost to_host, std::vector data, S32 data_size); ~LLMessageLogEntry(); EType mType; LLHost mFromHost; LLHost mToHost; S32 mDataSize; std::vector mData; }; class LLMessageLog { public: static void setMaxSize(U32 size); static void setCallback(void (*callback)(LLMessageLogEntry)); static void log(LLHost from_host, LLHost to_host, U8* data, S32 data_size); static std::deque getDeque(); private: static U32 sMaxSize; static void (*sCallback)(LLMessageLogEntry); static std::deque sDeque; }; #endif //