From f6c14ec9ec02d5eec251f20463aeb2e091978cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 10 Dec 2017 11:38:39 +0100 Subject: Wip - Fix loading group chats, unread messages, etc. --- protocols/FacebookRM/src/json.cpp | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'protocols/FacebookRM/src/json.cpp') diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index 0495cdaaeb..aabf0823f1 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -1462,3 +1462,43 @@ int facebook_json_parser::parse_messages_count(std::string *data, int *messagesC return EXIT_SUCCESS; } + +///////////////////////////////////////////////////////////////////////////////////////// + +JSONNode& operator<<(JSONNode &json, const NULL_PARAM ¶m) +{ + json.push_back(JSONNode(param.szName, nullptr)); + return json; +} + +JSONNode& operator<<(JSONNode &json, const JSON_PARAM ¶m) +{ + json.push_back(JSONNode(param.szName, param.node)); + return json; +} + +JSONNode& operator<<(JSONNode &json, const INT_PARAM ¶m) +{ + json.push_back(JSONNode(param.szName, param.iValue)); + return json; +} + +JSONNode& operator<<(JSONNode &json, const BOOL_PARAM ¶m) +{ + json.push_back(JSONNode(param.szName, param.bValue)); + return json; +} + +JSONNode& operator<<(JSONNode &json, const CHAR_PARAM ¶m) +{ + json.push_back(JSONNode(param.szName, param.szValue)); + return json; +} + +JSONNode& operator<<(JSONNode &json, const WCHAR_PARAM ¶m) +{ + json.push_back(JSONNode(param.szName, ptrA(mir_utf8encodeW(param.wszValue)).get())); + return json; +} + +///////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file -- cgit v1.2.3