From 1e13a939b177960b7048b8532205bc369501d399 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 24 Mar 2013 22:01:00 +0000 Subject: char* mir_urlEncode(const char *szUrl) added git-svn-id: http://svn.miranda-ng.org/main/trunk@4180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_core.inc | 6 ++++++ include/delphi/m_idle.inc | 4 +--- include/delphi/m_netlib.inc | 18 ++++++++---------- 3 files changed, 15 insertions(+), 13 deletions(-) (limited to 'include/delphi') diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc index 7221ec7c59..417aa4b7b5 100644 --- a/include/delphi/m_core.inc +++ b/include/delphi/m_core.inc @@ -236,6 +236,12 @@ function CallContactService(hContact:THANDLE;const name:PAnsiChar;wParam:WPARAM; function CallProtoService(const szModule:PAnsiChar;const szService:PAnsiChar;wParam:WPARAM;lParam:LPARAM):uint_ptr; cdecl; external CoreDLL name 'CallProtoService'; +/////////////////////////////////////////////////////////////////////////////// +// http + +// returned result must be freed using mir_free() +function mir_urlEncode(url:pAnsiChar); pAnsiChar; stdcall; + external CoreDLL name 'mir_urlEncode'; /////////////////////////////////////////////////////////////////////////////// // exceptions diff --git a/include/delphi/m_idle.inc b/include/delphi/m_idle.inc index bda2caea84..f3646fbc40 100644 --- a/include/delphi/m_idle.inc +++ b/include/delphi/m_idle.inc @@ -48,8 +48,6 @@ const } ME_IDLE_CHANGED:PAnsiChar = 'Miranda/Idle/Changed'; - MIRANDA_IDLE_INFO_SIZE_1 = 20; - type PMIRANDA_IDLE_INFO = ^TMIRANDA_IDLE_INFO; TMIRANDA_IDLE_INFO = record @@ -60,7 +58,7 @@ type aaLock : int; // the status shouldn't be unset if its set idleType : int; idlesoundsoff: int; - end; + end; { wParam; 0 lParam: address of MIRANDA_IDLE_INFO diff --git a/include/delphi/m_netlib.inc b/include/delphi/m_netlib.inc index 1d6615ec7c..69df8f5793 100644 --- a/include/delphi/m_netlib.inc +++ b/include/delphi/m_netlib.inc @@ -356,7 +356,7 @@ const { Assign a Netlib user handle a set of dynamic HTTP headers to be used with all - HTTP connections that enable the HTTP-use-sticky headers flag. + HTTP connections that enable the HTTP-use-sticky headers flag. The headers persist until cleared with lParam=NULL. All memory should be allocated by the caller using malloc() from MS_SYSTEM_GET_MMI @@ -501,9 +501,7 @@ const lParam : Pointer to a null terminated string Affects: URL-encodes a string for x-www-form-urlencoded (and other uses) -- see notes Returns: A pointer to a null terminated string, NULL(0) on failure - Notes : The returned string must be freed after it's no longer needed, - to do this Miranda's process heap must be used (under the WINAPI), e.g. - HeapFree(GetProcessHeap(), 0, the_returned_string) + Notes : The returned string must be freed after it's no longer needed using mir_free Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY } MS_NETLIB_URLENCODE:PAnsiChar = 'Netlib/UrlEncode'; @@ -556,12 +554,12 @@ const MS_NETLIB_STARINGTOADDRESS:PAnsiChar = 'Netlib/StringToAddress'; { - Converts numerical representation of IP in SOCKADDR_INET into string representation with IP and port + Converts numerical representation of IP in SOCKADDR_INET into string representation with IP and port IPv4 will be supplied in formats address:port or address IPv6 will be supplied in formats [address]:port or [address] wParam=(WPARAM)(int) 0 - lParam - (SOCKADDR_INET*); 1 - lParam - (unsigned) in host byte order lParam=(LPARAM)(SOCKADDR_INET*) or (unsigned) numeric IP address structure - Returns pointer to the string or NULL if not successful + Returns pointer to the string or NULL if not successful } MS_NETLIB_ADDRESSTOSTRING:PAnsiChar = 'Netlib/AddressToString'; @@ -580,7 +578,7 @@ const IPv6 will be supplied in formats [address]:port or [address] wParam=(WPARAM)(HANDLE)hConnection lParam=(LPARAM)(NETLIBCONNINFO*) pointer to the connection information structure to fill - Returns 0 if successful + Returns 0 if successful } MS_NETLIB_GETCONNECTIONINFO:PAnsiChar = 'Netlib/GetConnectionInfo'; @@ -594,7 +592,7 @@ const { Get connection Information wParam=(WPARAM)IP filter 1 - return global only IPv6 address, 0 all IPs - Returns (INT_PTR)(NETLIBIPLIST*) numeric IP address address array + Returns (INT_PTR)(NETLIBIPLIST*) numeric IP address address array the last element of the array is all 0s, 0 if not successful } MS_NETLIB_GETMYIP:PAnsiChar = 'Netlib/GetMyIP'; @@ -755,7 +753,7 @@ const Shutdown connection wParam=(WPARAM)(HANDLE)hConnection lParam=(LPARAM)0 - Returns 0 + Returns 0 } MS_NETLIB_SHUTDOWN:PAnsiChar = 'Netlib/Shutdown'; @@ -827,7 +825,7 @@ const MS_NETLIB_SETPOLLINGTIMEOUT:PAnsiChar = 'Netlib/SetPollingTimeout'; { - Makes connection SSL + Makes connection SSL wParam=(WPARAM)(HANDLE)hConn lParam=0 Returns 0 on failure 1 on success -- cgit v1.2.3