From 7c53c3c262dd67bbe9bcac3971621face2455f82 Mon Sep 17 00:00:00 2001 From: Alexey Kulakov Date: Sun, 2 Feb 2014 09:39:36 +0000 Subject: Miranda API update mRadio:refactoring git-svn-id: http://svn.miranda-ng.org/main/trunk@8000 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_core.inc | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'include/delphi/m_core.inc') diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc index 75e903d3d0..b02b09e61d 100644 --- a/include/delphi/m_core.inc +++ b/include/delphi/m_core.inc @@ -422,6 +422,7 @@ function CallContactService(hContact:THANDLE;const name:PAnsiChar;wParam:WPARAM; function CallProtoService(const szModule:PAnsiChar;const szService:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl; external CoreDLL name 'CallProtoService'; + /////////////////////////////////////////////////////////////////////////////// // http @@ -685,6 +686,22 @@ procedure ProtoConstructor(pThis:pointer{PPROTO_INTERFACE}; const pszModuleName: procedure ProtoDestructor(pThis:pointer{PPROTO_INTERFACE}); stdcall; external CoreDLL name 'ProtoDestructor'; +{!! +typedef void (__cdecl PROTO_INTERFACE::*ProtoThreadFunc)(void*); +procedure ProtoForkThread(PROTO_INTERFACE *pThis, ProtoThreadFunc, void *param); +function ProtoForkThreadEx(PROTO_INTERFACE *pThis, ProtoThreadFunc, void *param, UINT* threadID):THANDLE; + +typedef int (__cdecl PROTO_INTERFACE::*ProtoEventFunc)(WPARAM, LPARAM); +procedure ProtoHookEvent(PROTO_INTERFACE *pThis, const char* szName, ProtoEventFunc pFunc); +function ProtoCreateHookableEvent(PROTO_INTERFACE *pThis, const char* szService):THANDLE; + +typedef INT_PTR (__cdecl PROTO_INTERFACE::*ProtoServiceFunc)(WPARAM, LPARAM); +procedure ProtoCreateService(PROTO_INTERFACE *pThis, const char* szService, ProtoServiceFunc); + +typedef INT_PTR (__cdecl PROTO_INTERFACE::*ProtoServiceFuncParam)(WPARAM, LPARAM, LPARAM); +procedure ProtoCreateServiceParam(PROTO_INTERFACE *pThis, const char* szService, ProtoServiceFuncParam, LPARAM); +} + procedure ProtoLogA(pThis:pointer{PPROTO_INTERFACE}; szFormat :pAnsiChar; args:va_list); stdcall; external CoreDLL name 'ProtoLogA'; procedure ProtoLogW(pThis:pointer{PPROTO_INTERFACE}; wszFormat:pWideChar; args:va_list); stdcall; @@ -707,6 +724,7 @@ function ProtoGetAvatarFileFormat(const szFileName:PWideChar):int; stdcall; function ProtoGetBufferFormat(const buf:PByte; var ext:PWideChar):int; stdcall; external CoreDLL name 'ProtoGetBufferFormat'; + /////////////////////////////////////////////////////////////////////////////// // sha1 functions @@ -737,12 +755,13 @@ procedure mir_hmac_sha1(hashout:SHA1Hash; const key:pbyte; keyLen:size_t; const dataIn:pbyte; dataLen:size_t); stdcall; external CoreDLL name 'mir_hmac_sha1'; + /////////////////////////////////////////////////////////////////////////////// // strings function mir_base64_decode(str:pAnsiChar; var resultSize:int):pByte; stdcall; external CoreDLL name 'mir_base64_decode'; -function mir_base64_encode(data:PByte; dataSize:int):pAnsiChar; stdcall; +function mir_base64_encode(str:pByte; dataSize:int):pAnsiChar; stdcall; external CoreDLL name 'mir_base64_encode'; function mir_base64_encodebuf(data:PByte; dataSize:int; output:pAnsiChar; outputLen:int):pAnsiChar; stdcall; external CoreDLL name 'mir_base64_encodebuf'; @@ -757,6 +776,7 @@ function ltrim(str:pAnsiChar):pAnsiChar; stdcall; external CoreDLL name 'ltrim'; function ltrimw(str:pWideChar):pWideChar; stdcall; external CoreDLL name 'ltrimw'; + // returns pointer to the trimmed portion of string function ltrimp(str:pAnsiChar):pAnsiChar; stdcall; external CoreDLL name 'ltrimp'; @@ -784,6 +804,7 @@ function bin2hex(data:pointer; dataLen:size_t; pDest:pAnsiChar):pAnsiChar; stdca function bin2hexW(data:pointer; dataLen:size_t; pDest:pWideChar):pWideChar; stdcall; external CoreDLL name 'bin2hexW'; + /////////////////////////////////////////////////////////////////////////////// // text conversion functions -- cgit v1.2.3