diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-04 13:38:02 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-04 13:38:02 +0300 |
commit | 94667140aeb3886d22e4c1301423fe99aaf3fba4 (patch) | |
tree | 88bc46dfa6a3dba117905f7994b5e5f6ae09fa2a /include | |
parent | e63471b9885d040b9e6db3255432f6cea36144e9 (diff) |
Netlib: pascal code is completely isolated from C++ core using helpers
Diffstat (limited to 'include')
-rw-r--r-- | include/delphi/m_netlib.inc | 8 | ||||
-rw-r--r-- | include/m_netlib.h | 4 |
2 files changed, 9 insertions, 3 deletions
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);
}
|