diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-07 14:14:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-07 14:14:38 +0300 |
commit | 68d2c9566660c706ec13564ec7bc029cd85a6752 (patch) | |
tree | 74bc27454fe01ba358b9e4ff7a8962affb4cbb21 /include | |
parent | 7d0d9f0db74fbd4750a9c19bd69f4cba368db40e (diff) |
MSN was last plugin that used that crap with HTTP Gateways
Diffstat (limited to 'include')
-rw-r--r-- | include/delphi/m_netlib.inc | 23 | ||||
-rw-r--r-- | include/m_netlib.h | 13 |
2 files changed, 4 insertions, 32 deletions
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 <All connections> 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
{
|