summaryrefslogtreecommitdiff
path: root/include/delphi
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-11 10:41:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-11 10:41:37 +0000
commit94dcc72f13094157f344f284aec4edf0c0f5faa1 (patch)
tree74c078daadd4abe5aea9e9e0a73b4dd7c4a7fde1 /include/delphi
parent42ff2169dbddd25d06404623dba2fff222d17c73 (diff)
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
Diffstat (limited to 'include/delphi')
-rw-r--r--include/delphi/m_core.inc17
1 files changed, 17 insertions, 0 deletions
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