diff options
Diffstat (limited to 'include/m_netlib.h')
-rw-r--r-- | include/m_netlib.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/m_netlib.h b/include/m_netlib.h index c23d0fddc1..6c504e2702 100644 --- a/include/m_netlib.h +++ b/include/m_netlib.h @@ -550,6 +550,35 @@ public: Netlib_FreeHttpRequest(_p);
}
};
+
+struct MIR_APP_EXPORT MHttpRequest : public NETLIBHTTPREQUEST, public MZeroedObject
+{
+ MHttpRequest();
+ ~MHttpRequest();
+
+ CMStringA m_szUrl;
+ CMStringA m_szParam;
+ void *pUserInfo;
+
+ void AddHeader(const char *szName, const char *szValue);
+};
+
+template <class T>
+class MTHttpRequest : public MHttpRequest
+{
+public:
+ __inline MTHttpRequest()
+ {}
+
+ typedef void (T::*MTHttpRequestHandler)(NETLIBHTTPREQUEST*, struct AsyncHttpRequest*);
+ MTHttpRequestHandler m_pFunc = nullptr;
+};
+
+MIR_APP_DLL(MHttpRequest*) operator<<(MHttpRequest*, const INT_PARAM&);
+MIR_APP_DLL(MHttpRequest*) operator<<(MHttpRequest*, const INT64_PARAM&);
+MIR_APP_DLL(MHttpRequest*) operator<<(MHttpRequest*, const CHAR_PARAM&);
+MIR_APP_DLL(MHttpRequest*) operator<<(MHttpRequest*, const WCHAR_PARAM&);
+
#endif
/////////////////////////////////////////////////////////////////////////////////////////
|