diff options
Diffstat (limited to '')
-rwxr-xr-x | linden/indra/llmessage/llsdmessagereader.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/linden/indra/llmessage/llsdmessagereader.h b/linden/indra/llmessage/llsdmessagereader.h new file mode 100755 index 0000000..5785194 --- /dev/null +++ b/linden/indra/llmessage/llsdmessagereader.h | |||
@@ -0,0 +1,79 @@ | |||
1 | #ifndef LL_LLSDMESSAGEREADER_H | ||
2 | #define LL_LLSDMESSAGEREADER_H | ||
3 | |||
4 | #include "llmessagereader.h" | ||
5 | #include "llsd.h" | ||
6 | |||
7 | #include <map> | ||
8 | |||
9 | class LLMessageTemplate; | ||
10 | class LLMsgData; | ||
11 | |||
12 | class LLSDMessageReader : public LLMessageReader | ||
13 | { | ||
14 | public: | ||
15 | |||
16 | LLSDMessageReader(); | ||
17 | virtual ~LLSDMessageReader(); | ||
18 | |||
19 | /** All get* methods expect pointers to canonical strings. */ | ||
20 | virtual void getBinaryData(const char *block, const char *var, | ||
21 | void *datap, S32 size, S32 blocknum = 0, | ||
22 | S32 max_size = S32_MAX); | ||
23 | virtual void getBOOL(const char *block, const char *var, BOOL &data, | ||
24 | S32 blocknum = 0); | ||
25 | virtual void getS8(const char *block, const char *var, S8 &data, | ||
26 | S32 blocknum = 0); | ||
27 | virtual void getU8(const char *block, const char *var, U8 &data, | ||
28 | S32 blocknum = 0); | ||
29 | virtual void getS16(const char *block, const char *var, S16 &data, | ||
30 | S32 blocknum = 0); | ||
31 | virtual void getU16(const char *block, const char *var, U16 &data, | ||
32 | S32 blocknum = 0); | ||
33 | virtual void getS32(const char *block, const char *var, S32 &data, | ||
34 | S32 blocknum = 0); | ||
35 | virtual void getF32(const char *block, const char *var, F32 &data, | ||
36 | S32 blocknum = 0); | ||
37 | virtual void getU32(const char *block, const char *var, U32 &data, | ||
38 | S32 blocknum = 0); | ||
39 | virtual void getU64(const char *block, const char *var, U64 &data, | ||
40 | S32 blocknum = 0); | ||
41 | virtual void getF64(const char *block, const char *var, F64 &data, | ||
42 | S32 blocknum = 0); | ||
43 | virtual void getVector3(const char *block, const char *var, | ||
44 | LLVector3 &vec, S32 blocknum = 0); | ||
45 | virtual void getVector4(const char *block, const char *var, | ||
46 | LLVector4 &vec, S32 blocknum = 0); | ||
47 | virtual void getVector3d(const char *block, const char *var, | ||
48 | LLVector3d &vec, S32 blocknum = 0); | ||
49 | virtual void getQuat(const char *block, const char *var, LLQuaternion &q, | ||
50 | S32 blocknum = 0); | ||
51 | virtual void getUUID(const char *block, const char *var, LLUUID &uuid, | ||
52 | S32 blocknum = 0); | ||
53 | virtual void getIPAddr(const char *block, const char *var, U32 &ip, | ||
54 | S32 blocknum = 0); | ||
55 | virtual void getIPPort(const char *block, const char *var, U16 &port, | ||
56 | S32 blocknum = 0); | ||
57 | virtual void getString(const char *block, const char *var, | ||
58 | S32 buffer_size, char *buffer, S32 blocknum = 0); | ||
59 | |||
60 | virtual S32 getNumberOfBlocks(const char *blockname); | ||
61 | virtual S32 getSize(const char *blockname, const char *varname); | ||
62 | virtual S32 getSize(const char *blockname, S32 blocknum, | ||
63 | const char *varname); | ||
64 | |||
65 | virtual void clearMessage(); | ||
66 | |||
67 | virtual const char* getMessageName() const; | ||
68 | virtual S32 getMessageSize() const; | ||
69 | |||
70 | virtual void copyToBuilder(LLMessageBuilder&) const; | ||
71 | |||
72 | void setMessage(const std::string& name, const LLSD& msg); | ||
73 | |||
74 | private: | ||
75 | std::string mMessageName; | ||
76 | LLSD mMessage; | ||
77 | }; | ||
78 | |||
79 | #endif // LL_LLSDMESSAGEREADER_H | ||