From 94dcc72f13094157f344f284aec4edf0c0f5faa1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 11 Aug 2013 10:41:37 +0000 Subject: ProtoGetAvatarFormat, ProtoGetAvatarFileFormat, ProtoGetBufferFormat, ProtoGetAvatarExtension - standard helpers for protocol avatars' processing instead of the zoo that existed previously git-svn-id: http://svn.miranda-ng.org/main/trunk@5645 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_core.inc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/delphi') diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc index 94ac1a7089..0bfd0aec8f 100644 --- a/include/delphi/m_core.inc +++ b/include/delphi/m_core.inc @@ -534,6 +534,23 @@ function ProtoCallService(const szModule, szName:PAnsiChar; wParam:WPARAM; lPara function ProtoServiceExists(const szModule, szName:PAnsiChar):int; stdcall; external CoreDLL name 'ProtoServiceExists'; +// returns image extension by a PA_* constant or empty string for PA_FORMAT_UNKNOWN +function ProtoGetAvatarExtension(format:int):PWideChar; stdcall; + external CoreDLL name 'ProtoGetAvatarExtension'; + +// detects image format by extension +function ProtoGetAvatarFormat(const szFileName:PWideChar):int; stdcall; + external CoreDLL name 'ProtoGetAvatarFormat'; + +// detects image format by its contents +function ProtoGetAvatarFileFormat(const szFileName:PWideChar):int; stdcall; + external CoreDLL name 'ProtoGetAvatarFileFormat'; + +// returns the image format and extension by the first bytes of picture +// ptszExtension might be NULL +function ProtoGetBufferFormat(const buf:PByte; var ext:PWideChar):int; stdcall; + external CoreDLL name 'ProtoGetBufferFormat'; + /////////////////////////////////////////////////////////////////////////////// // sha1 functions type -- cgit v1.2.3