From fbf164f781503ee2e538156bc701a957e3dea713 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 9 Jan 2024 13:52:26 +0300 Subject: Netlib_DownloadFile - chunk gatherer which writes down data directly to a file, without storing anything in memory --- include/m_netlib.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/m_netlib.h b/include/m_netlib.h index afc4493c7b..bd8aea61c5 100644 --- a/include/m_netlib.h +++ b/include/m_netlib.h @@ -501,8 +501,6 @@ public: } }; -EXTERN_C MIR_APP_DLL(bool) Netlib_FreeHttpRequest(MHttpResponse *); - ///////////////////////////////////////////////////////////////////////////////////////// // Free the memory used by a MHttpRequest structure // @@ -565,6 +563,15 @@ __forceinline MHttpRequest* operator<<(MHttpRequest &req, const WCHAR_PARAM &par EXTERN_C MIR_APP_DLL(MHttpResponse *) Netlib_HttpTransaction(HNETLIBUSER hNlu, MHttpRequest *pRequest); +typedef void(__cdecl *pfnDownloadCallback)(void *); + +EXTERN_C MIR_APP_DLL(MHttpResponse *) Netlib_DownloadFile( + HNETLIBUSER hNlu, + MHttpRequest *pRequest, + const MFilePath &wszFileName, + pfnDownloadCallback pCallback = nullptr, + void *pCallbackInfo = nullptr); + ///////////////////////////////////////////////////////////////////////////////////////// // Send data over a connection // -- cgit v1.2.3