diff options
author | Robert Pösel <robyer@seznam.cz> | 2017-12-10 11:38:39 +0100 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2017-12-10 11:38:39 +0100 |
commit | f6c14ec9ec02d5eec251f20463aeb2e091978cd7 (patch) | |
tree | 945886dfadf0bb30ebffe165345619183072bfc5 /protocols/FacebookRM/src/json.h | |
parent | 42f6d47af11bb7af26cbd9a45b1d2d293f9fae4f (diff) |
Wip - Fix loading group chats, unread messages, etc.
Diffstat (limited to 'protocols/FacebookRM/src/json.h')
-rw-r--r-- | protocols/FacebookRM/src/json.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/json.h b/protocols/FacebookRM/src/json.h index d62666a66d..27dbbf1710 100644 --- a/protocols/FacebookRM/src/json.h +++ b/protocols/FacebookRM/src/json.h @@ -47,3 +47,63 @@ public: this->proto = proto;
}
};
+
+struct PARAM
+{
+ LPCSTR szName;
+ __forceinline PARAM(LPCSTR _name) : szName(_name)
+ {}
+};
+
+struct NULL_PARAM : public PARAM
+{
+ __forceinline NULL_PARAM(LPCSTR _name) : PARAM(_name)
+ {}
+};
+
+struct JSON_PARAM : public PARAM
+{
+ JSONNode node;
+ __forceinline JSON_PARAM(LPCSTR _name, JSONNode _node) :
+ PARAM(_name), node(_node)
+ {}
+};
+
+struct BOOL_PARAM : public PARAM
+{
+ bool bValue;
+ __forceinline BOOL_PARAM(LPCSTR _name, bool _value) :
+ PARAM(_name), bValue(_value)
+ {}
+};
+
+struct INT_PARAM : public PARAM
+{
+ int iValue;
+ __forceinline INT_PARAM(LPCSTR _name, int _value) :
+ PARAM(_name), iValue(_value)
+ {}
+};
+
+struct CHAR_PARAM : public PARAM
+{
+ LPCSTR szValue;
+ __forceinline CHAR_PARAM(LPCSTR _name, LPCSTR _value) :
+ PARAM(_name), szValue(_value)
+ {}
+};
+
+struct WCHAR_PARAM : public PARAM
+{
+ LPCWSTR wszValue;
+ __forceinline WCHAR_PARAM(LPCSTR _name, LPCWSTR _value) :
+ PARAM(_name), wszValue(_value)
+ {}
+};
+
+JSONNode& operator<<(JSONNode &json, const NULL_PARAM ¶m);
+JSONNode& operator<<(JSONNode &json, const JSON_PARAM ¶m);
+JSONNode& operator<<(JSONNode &json, const INT_PARAM ¶m);
+JSONNode& operator<<(JSONNode &json, const BOOL_PARAM ¶m);
+JSONNode& operator<<(JSONNode &json, const CHAR_PARAM ¶m);
+JSONNode& operator<<(JSONNode &json, const WCHAR_PARAM ¶m);
|