summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-24 22:01:00 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-24 22:01:00 +0000
commit1e13a939b177960b7048b8532205bc369501d399 (patch)
treeedd1afd10b00d768db2280e4157bc198d6445b33 /include
parentc619ad70603e5355e68e78001df154c98306e805 (diff)
char* mir_urlEncode(const char *szUrl) added
git-svn-id: http://svn.miranda-ng.org/main/trunk@4180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/delphi/m_core.inc6
-rw-r--r--include/delphi/m_idle.inc4
-rw-r--r--include/delphi/m_netlib.inc18
-rw-r--r--include/m_core.h5
-rw-r--r--include/m_netlib.h2
5 files changed, 21 insertions, 14 deletions
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
diff --git a/include/m_core.h b/include/m_core.h
index 66841e0f6a..c073cdea66 100644
--- a/include/m_core.h
+++ b/include/m_core.h
@@ -197,6 +197,11 @@ MIR_CORE_DLL(pfnExceptionFilter) GetExceptionFilter(void);
MIR_CORE_DLL(pfnExceptionFilter) SetExceptionFilter(pfnExceptionFilter pMirandaExceptFilter);
///////////////////////////////////////////////////////////////////////////////
+// http support
+
+MIR_CORE_DLL(char*) mir_urlEncode(const char *szUrl);
+
+///////////////////////////////////////////////////////////////////////////////
// icons support
extern int hLangpack;
diff --git a/include/m_netlib.h b/include/m_netlib.h
index 62b7512b69..8403adfc97 100644
--- a/include/m_netlib.h
+++ b/include/m_netlib.h
@@ -384,7 +384,7 @@ typedef struct {
//wParam = 0
//lParam = (LPARAM)(const char *)pszString
//Returns a char* containing the new string. This must be freed with
-//HeapFree(GetProcessHeap(), 0, pszReturnString) when you're done with it.
+//mir_free() when you're done with it.
//Returns NULL on error.
//Errors: ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
#define MS_NETLIB_URLENCODE "Netlib/UrlEncode"