blob: 5046d808bf5b77b34da900ed11e5d7423b70949c (
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
38
39
40
41
|
// <edit>
#ifndef LL_LLMESSAGELOG_H
#define LL_LLMESSAGELOG_H
#include "stdtypes.h"
#include "llhost.h"
#include <queue>
#include <string.h>
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<U8> data, S32 data_size);
~LLMessageLogEntry();
EType mType;
LLHost mFromHost;
LLHost mToHost;
S32 mDataSize;
std::vector<U8> 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<LLMessageLogEntry> getDeque();
private:
static U32 sMaxSize;
static void (*sCallback)(LLMessageLogEntry);
static std::deque<LLMessageLogEntry> sDeque;
};
#endif
// </edit>
|