summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-01-09 13:52:26 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-01-09 13:52:26 +0300
commitfbf164f781503ee2e538156bc701a957e3dea713 (patch)
tree94d4199299b6b36f6a276c05ef6124f540277c9c /include
parent110fdc1157d94f5d787a21c60163681767fdd6c4 (diff)
Netlib_DownloadFile - chunk gatherer which writes down data directly to a file, without storing anything in memory
Diffstat (limited to 'include')
-rw-r--r--include/m_netlib.h11
1 files changed, 9 insertions, 2 deletions
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
//