From 68d2c9566660c706ec13564ec7bc029cd85a6752 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 7 Feb 2019 14:14:38 +0300 Subject: MSN was last plugin that used that crap with HTTP Gateways --- include/delphi/m_netlib.inc | 23 ++++------------------- include/m_netlib.h | 13 ------------- 2 files changed, 4 insertions(+), 32 deletions(-) (limited to 'include') diff --git a/include/delphi/m_netlib.inc b/include/delphi/m_netlib.inc index 1ab6c9fa8b..32bb3dc4ac 100644 --- a/include/delphi/m_netlib.inc +++ b/include/delphi/m_netlib.inc @@ -65,7 +65,6 @@ const NLOCF_V2 = $0004; NLOCF_UDP = $0008; // this connection is UDP NLOCF_SSL = $0010; // this connection is SSL - NLOCF_HTTPGATEWAY = $0020; // this connection is HTTP Gateway // for TNETLIBHTTPPROXYINFO.flags @@ -174,26 +173,12 @@ const {$ENDIF} type - { This function pointer is to the CRT realloc() used by Miranda -- it allows reallocation of memory passed - to us (not that we could EVER share the same CRT) but to allow DLLs in general to reallocate memory } - TNetlibRealloc = function(Mem: pointer; size_t: int): pointer; cdecl; - TNetlibHTTPGatewayInitProc = function(hConn: THANDLE; nloc: PNETLIBOPENCONNECTION; nlhr: PNETLIBHTTPREQUEST): int; cdecl; - TNetlibHTTPGatewayBeginProc = function(hConn: THANDLE; nloc: PNETLIBOPENCONNECTION): int; cdecl; - TNetlibHTTPGatewayWrapSendProc = function(hConn: THANDLE; buf: PByte; len: int; flags: int; pfnNetLibSend: TMIRANDASERVICE): int; cdecl; - TNetlibHTTPGatewayUnwrapRecvProc = function(nlhr: PNETLIBHTTPREQUEST; buf: PByte; len: int; outBufLen: pInt; NetlibRealloc: TNetlibRealloc): PByte; cdecl; - PNETLIBUSER = ^TNETLIBUSER; TNETLIBUSER = record - szSettingsModule: PAnsiChar; // used for DB settings and log, 'NL' stuff - szDescriptiveName: TChar; // shows a descriptive name for which different proxy settings can be defined - flags: dword; // see NUF_* constants above - szHttpGatewayHello :PAnsiChar; - szHttpGatewayUserAgent:PAnsiChar; // can be NULL(0) to send no User-Agent: also used by HTTPS proxies - pfnHttpGatewayInit :TNetlibHTTPGatewayInitProc; - pfnHttpGatewayBegin :TNetlibHTTPGatewayBeginProc; // can be NULL(0) if no begin is required - pfnHttpGatewayWrapSend :TNetlibHTTPGatewayWrapSendProc; // can be NULL(0) if no wrapping is required - pfnHttpGatewayUnwrapRecv:TNetlibHTTPGatewayUnwrapRecvProc; // can be NULL(0) " " - minIncomingPorts: int; // only if NUF_INCOMING, will be used for validation of user input + szSettingsModule: PAnsiChar; // used for DB settings and log, 'NL' stuff + szDescriptiveName: TChar; // shows a descriptive name for which different proxy settings can be defined + flags: dword; // see NUF_* constants above + minIncomingPorts: int; // only if NUF_INCOMING, will be used for validation of user input end; PNETLIBUSERSETTINGS = ^TNETLIBUSERSETTINGS; diff --git a/include/m_netlib.h b/include/m_netlib.h index 1abf60a770..925d6a1656 100644 --- a/include/m_netlib.h +++ b/include/m_netlib.h @@ -54,25 +54,13 @@ struct NETLIBOPENCONNECTION; // The default settings for registered users that don't have any settings stored // in the database are the same as those displayed by the page // of the netlib options page. -// See notes below this function for the behaviour of HTTP gateways // Errors: ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY, ERROR_DUP_NAME -typedef int (*NETLIBHTTPGATEWAYINITPROC)(HNETLIBCONN hConn, NETLIBOPENCONNECTION *nloc, NETLIBHTTPREQUEST *nlhr); -typedef int (*NETLIBHTTPGATEWAYBEGINPROC)(HNETLIBCONN hConn, NETLIBOPENCONNECTION *nloc); -typedef int (*NETLIBHTTPGATEWAYWRAPSENDPROC)(HNETLIBCONN hConn, PBYTE buf, int len, int flags); -typedef PBYTE (*NETLIBHTTPGATEWAYUNWRAPRECVPROC)(NETLIBHTTPREQUEST *nlhr, PBYTE buf, int len, int *outBufLen, void *(*NetlibRealloc)(void*, size_t)); - struct NETLIBUSER { char *szSettingsModule; // used for db settings and log MAllStrings szDescriptiveName; // used in options dialog, already translated DWORD flags; - char *szHttpGatewayHello; - char *szHttpGatewayUserAgent; // can be NULL to send no user-agent, also used by HTTPS proxies - NETLIBHTTPGATEWAYINITPROC pfnHttpGatewayInit; - NETLIBHTTPGATEWAYBEGINPROC pfnHttpGatewayBegin; // can be NULL if no beginning required - NETLIBHTTPGATEWAYWRAPSENDPROC pfnHttpGatewayWrapSend; // can be NULL if no wrapping required - NETLIBHTTPGATEWAYUNWRAPRECVPROC pfnHttpGatewayUnwrapRecv; // can be NULL if no wrapping required int minIncomingPorts; // only if NUF_INCOMING. Will be used for validation of user input. }; @@ -330,7 +318,6 @@ EXTERN_C MIR_APP_DLL(HNETLIBBIND) Netlib_BindPort(HNETLIBUSER nlu, NETLIBBIND *n #define NLOCF_V2 0x0004 // this connection understands the newer structure, newer cbSize isnt enough #define NLOCF_UDP 0x0008 // this connection is UDP #define NLOCF_SSL 0x0010 // this connection is SSL -#define NLOCF_HTTPGATEWAY 0x0020 // this connection is HTTP Gateway struct NETLIBOPENCONNECTION { -- cgit v1.2.3