summaryrefslogtreecommitdiff
path: root/protocols/Icq10/src/http.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Icq10/src/http.h')
-rw-r--r--protocols/Icq10/src/http.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/protocols/Icq10/src/http.h b/protocols/Icq10/src/http.h
index 3c5285e2ad..574ed55130 100644
--- a/protocols/Icq10/src/http.h
+++ b/protocols/Icq10/src/http.h
@@ -1,10 +1,31 @@
class CIcqProto;
+enum IcqConnection
+{
+ CONN_NONE = -1, CONN_MAIN = 0, CONN_FETCH = 1, CONN_LAST = 2
+};
+
struct AsyncHttpRequest : public MTHttpRequest<CIcqProto>
{
- bool m_bMainSite = true;
+ IcqConnection m_conn;
GUID m_reqId;
- AsyncHttpRequest(int type, const char *szUrl, MTHttpRequestHandler pFunc = nullptr);
+ AsyncHttpRequest(IcqConnection, int type, const char *szUrl, MTHttpRequestHandler pFunc = nullptr);
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+class JsonReply
+{
+ JSONNode *m_root = nullptr;
+ int m_errorCode = 0;
+ JSONNode* m_data = nullptr;
+
+public:
+ JsonReply(NETLIBHTTPREQUEST*);
+ ~JsonReply();
+
+ __forceinline JSONNode& data() const { return *m_data; }
+ __forceinline int error() const { return m_errorCode; }
};