aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmessage/llmessagebuilder.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:54 -0500
committerJacek Antonelli2008-08-15 23:44:54 -0500
commitb2afb8800bb033a04bb3ecdf0363068d56648ef1 (patch)
tree3568129b5bbddb47cd39d622b4137a8fbff4abaf /linden/indra/llmessage/llmessagebuilder.h
parentSecond Life viewer sources 1.14.0.1 (diff)
downloadmeta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.zip
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.gz
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.bz2
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.xz
Second Life viewer sources 1.15.0.2
Diffstat (limited to 'linden/indra/llmessage/llmessagebuilder.h')
-rw-r--r--linden/indra/llmessage/llmessagebuilder.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/linden/indra/llmessage/llmessagebuilder.h b/linden/indra/llmessage/llmessagebuilder.h
new file mode 100644
index 0000000..7ae09c5
--- /dev/null
+++ b/linden/indra/llmessage/llmessagebuilder.h
@@ -0,0 +1,70 @@
1#ifndef LL_LLMESSAGEBUILDER_H
2#define LL_LLMESSAGEBUILDER_H
3
4#include <string>
5
6#include "stdtypes.h"
7
8class LLMsgData;
9class LLQuaternion;
10class LLSD;
11class LLUUID;
12class LLVector3;
13class LLVector3d;
14class LLVector4;
15
16class LLMessageBuilder
17{
18public:
19
20 //CLASS_LOG_TYPE(LLMessageBuilder);
21
22 virtual ~LLMessageBuilder();
23 virtual void newMessage(const char *name) = 0;
24
25 virtual void nextBlock(const char* blockname) = 0;
26 virtual BOOL removeLastBlock() = 0; // TODO: babbage: remove this horror
27
28 /** All add* methods expect pointers to canonical strings. */
29 virtual void addBinaryData(const char *varname, const void *data,
30 S32 size) = 0;
31 virtual void addBOOL(const char* varname, BOOL b) = 0;
32 virtual void addS8(const char *varname, S8 s) = 0;
33 virtual void addU8(const char *varname, U8 u) = 0;
34 virtual void addS16(const char *varname, S16 i) = 0;
35 virtual void addU16(const char *varname, U16 i) = 0;
36 virtual void addF32(const char *varname, F32 f) = 0;
37 virtual void addS32(const char *varname, S32 s) = 0;
38 virtual void addU32(const char *varname, U32 u) = 0;
39 virtual void addU64(const char *varname, U64 lu) = 0;
40 virtual void addF64(const char *varname, F64 d) = 0;
41 virtual void addVector3(const char *varname, const LLVector3& vec) = 0;
42 virtual void addVector4(const char *varname, const LLVector4& vec) = 0;
43 virtual void addVector3d(const char *varname, const LLVector3d& vec) = 0;
44 virtual void addQuat(const char *varname, const LLQuaternion& quat) = 0;
45 virtual void addUUID(const char *varname, const LLUUID& uuid) = 0;
46 virtual void addIPAddr(const char *varname, const U32 ip) = 0;
47 virtual void addIPPort(const char *varname, const U16 port) = 0;
48 virtual void addString(const char* varname, const char* s) = 0;
49 virtual void addString(const char* varname, const std::string& s) = 0;
50
51 virtual BOOL isMessageFull(const char* blockname) const = 0;
52 virtual void compressMessage(U8*& buf_ptr, U32& buffer_length) = 0;
53 virtual S32 getMessageSize() = 0;
54
55 virtual BOOL isBuilt() const = 0;
56 virtual BOOL isClear() const = 0;
57 virtual U32 buildMessage(U8* buffer, U32 buffer_size) = 0;
58 /**< Return built message size */
59 virtual void clearMessage() = 0;
60
61 // TODO: babbage: remove this horror
62 virtual void setBuilt(BOOL b) = 0;
63
64 virtual const char* getMessageName() const = 0;
65
66 virtual void copyFromMessageData(const LLMsgData& data) = 0;
67 virtual void copyFromLLSD(const LLSD& data) = 0;
68};
69
70#endif // LL_LLMESSAGEBUILDER_H