From 94667140aeb3886d22e4c1301423fe99aaf3fba4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 4 Jan 2024 13:38:02 +0300 Subject: Netlib: pascal code is completely isolated from C++ core using helpers --- include/delphi/m_netlib.inc | 8 ++++++-- include/m_netlib.h | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/delphi/m_netlib.inc b/include/delphi/m_netlib.inc index 253c836a4d..d5c553817e 100644 --- a/include/delphi/m_netlib.inc +++ b/include/delphi/m_netlib.inc @@ -200,7 +200,7 @@ function Netlib_CloseHandle(pHandle:THANDLE) : int; stdcall; external AppDll; } -function Netlib_FreeHttpRequest(param:PNETLIBHTTPREQUEST) : bytebool; stdcall; external AppDll; +function Netlib_FreeHttpRequest(param:THANDLE) : bytebool; stdcall; external AppDll; { wParam : HANDLE @@ -239,7 +239,11 @@ function Netlib_FreeHttpRequest(param:PNETLIBHTTPREQUEST) : bytebool; stdcall; e Errors returned by the aforementioned internally used functions } -function Netlib_HttpTransaction(nlu:THANDLE; param:PNETLIBHTTPREQUEST) : PNETLIBHTTPREQUEST; stdcall; external AppDll; +function Netlib_HttpTransaction(nlu:THANDLE; param:PNETLIBHTTPREQUEST) : THANDLE; stdcall; external AppDll; + +function Netlib_HttpResult(http:THANDLE) : int; stdcall; external AppDll; +function Netlib_HttpBuffer(http:THANDLE; var cbLen:int) : PAnsiChar; stdcall; external AppDll; +function Netlib_HttpCookies(http:THANDLE) : PAnsiChar; stdcall; external AppDll; { Affect : Send data over an open connection see notes diff --git a/include/m_netlib.h b/include/m_netlib.h index 149b025f8e..0f8cdc2015 100644 --- a/include/m_netlib.h +++ b/include/m_netlib.h @@ -434,7 +434,7 @@ EXTERN_C MIR_APP_DLL(char*) Netlib_GetHeader(const NETLIBHTTPREQUEST *pRec, cons #define NLHRF_DUMPASTEXT 0x00080000 // dump posted and reply data as text. Headers are always dumped as text. #define NLHRF_NODUMPSEND 0x00100000 // do not dump sent message. -struct NETLIBHTTPREQUEST +struct MIR_APP_EXPORT NETLIBHTTPREQUEST { int requestType; // a REQUEST_ uint32_t flags; @@ -448,6 +448,8 @@ struct NETLIBHTTPREQUEST HNETLIBCONN nlc; int timeout; + CMStringA GetCookies() const; + __forceinline const char *operator[](const char *pszName) { return Netlib_GetHeader(this, pszName); } -- cgit v1.2.3