diff options
Diffstat (limited to 'plugins/!Deprecated/ExternalAPI/delphi')
26 files changed, 3228 insertions, 0 deletions
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/imgdecoder.pas b/plugins/!Deprecated/ExternalAPI/delphi/imgdecoder.pas new file mode 100644 index 0000000000..eea6ec2610 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/imgdecoder.pas @@ -0,0 +1,114 @@ +unit ImgDecoder;
+
+interface
+uses Windows;
+
+function IsImgDecoderAvailable:boolean;
+function ImgNewDecoder(var pDecoder:pointer):dword;
+function ImgDeleteDecoder(pDecoder:pointer):dword;
+function ImgNewDIBFromFile(pDecoder:pointer;Filename:PAnsiChar;var pImg:pointer):dword;
+function ImgDeleteDIBSection(pImg:pointer):dword;
+function ImgGetHandle(pImg:pointer;var pBitmap:HBITMAP;var ppDIBBits:pointer):dword;
+
+implementation
+
+const
+ hModule:THANDLE=0;
+type
+ tImgNewDecoder =function(var pDecoder:pointer):dword; stdcall;
+ tImgDeleteDecoder =function(pDecoder:pointer):dword; stdcall;
+ tImgNewDIBFromFile =function(pDecoder:pointer;Filename:PAnsiChar;var pImg):dword; stdcall;
+ tImgDeleteDIBSection=function(pImg:pointer):dword; stdcall;
+ tImgGetHandle =function(pImg:pointer;var pBitmap:HBITMAP;var ppDIBBits:pointer):dword; stdcall;
+
+const
+ pImgNewDecoder :tImgNewDecoder = nil;
+ pImgDeleteDecoder :tImgDeleteDecoder = nil;
+ pImgNewDIBFromFile :tImgNewDIBFromFile = nil;
+ pImgDeleteDIBSection:tImgDeleteDIBSection = nil;
+ pImgGetHandle :tImgGetHandle = nil;
+
+function IsImgDecoderAvailable:boolean;
+begin
+ result:=hModule<>0;
+end;
+
+function ImgNewDecoder(var pDecoder:pointer):dword;
+begin
+ if @pImgNewDecoder<>nil then
+ result:=pImgNewDecoder(pDecoder)
+ else
+ result:=0;
+end;
+
+function ImgDeleteDecoder(pDecoder:pointer):dword;
+begin
+ if @pImgDeleteDecoder<>nil then
+ result:=pImgDeleteDecoder(pDecoder)
+ else
+ result:=0;
+end;
+
+function ImgNewDIBFromFile(pDecoder:pointer;Filename:PAnsiChar;var pImg:pointer):dword;
+begin
+ if @pImgNewDecoder<>nil then
+ result:=pImgNewDIBFromFile(pDecoder,Filename,pImg)
+ else
+ result:=0;
+end;
+
+function ImgDeleteDIBSection(pImg:pointer):dword;
+begin
+ if @pImgNewDecoder<>nil then
+ result:=pImgDeleteDIBSection(pImg)
+ else
+ result:=0;
+end;
+
+function ImgGetHandle(pImg:pointer;var pBitmap:HBITMAP;var ppDIBBits:pointer):dword;
+begin
+ if @pImgGetHandle<>nil then
+ result:=pImgGetHandle(pImg,pBitmap,ppDIBBits)
+ else
+ result:=0;
+end;
+
+initialization
+ hModule:=LoadLibrary('imgdecoder.dll');
+ if hModule=0 then
+ hModule:=LoadLibrary('plugins\imgdecoder.dll');
+
+ if hModule<>0 then
+ begin
+ pImgNewDecoder :=GetProcAddress(hModule, 'ImgNewDecoder');
+ pImgDeleteDecoder :=GetProcAddress(hModule, 'ImgDeleteDecoder');
+ pImgNewDIBFromFile :=GetProcAddress(hModule, 'ImgNewDIBFromFile');
+ pImgDeleteDIBSection:=GetProcAddress(hModule, 'ImgDeleteDIBSection');
+ pImgGetHandle :=GetProcAddress(hModule, 'ImgGetHandle');
+ end;
+
+finalization
+ if hModule<>0 then
+ FreeLibrary(hModule);
+end.
+{ Sample of using
+
+var
+ pDecoder:pointer;
+ pImg:pointer;
+ bitmap:HBITMAP;
+ pBits:pointer;
+begin
+ if IsImgDecoderAvailable then
+ begin
+ ImgNewDecoder(pDecoder);
+ if ImgNewDIBFromFile(pDecoder,PAnsiChar(ParamStr(1)),pImg)<>0 then
+ begin
+ ImgGetHandle(pImg,bitmap,pBits);
+// action
+ ImgDeleteDIBSection(pImg);
+ end;
+ ImgDeleteDecoder(pDecoder);
+ end;
+end.
+}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_DataAsMessage.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_DataAsMessage.inc new file mode 100644 index 0000000000..71bfcc059d --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_DataAsMessage.inc @@ -0,0 +1,155 @@ +{
+ DataAsMessage plugin for Miranda IM
+ Copyright (c) 2006 Chervov Dmitry
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+}
+
+{$IFNDEF M_DATAASMESSAGE}
+{$DEFINE M_DATAASMESSAGE}
+
+const
+// DAM_SENDRESULTINFO::iResult values
+ DAM_SR_SUCCESS = 0;
+ DAM_SR_TIMEOUT = 1; // timeout period expired; this value is returned
+ // also if the contact went offline for a time
+ // longer than a timeout period
+ DAM_SR_NOTSUPPORTED = 2; // means this szDataType is not supported by the
+ // remote side
+ DAM_SR_NODAM = 3; // means there is no DataAsMessage plugin on the
+ // remote side; keep in mind that this error may
+ // also appear accidentally because of a bad
+ // connectivity during the handshake (if there
+ // was a timeout when waiting for a response)
+ DAM_SR_CANCELLEDLOCAL = 4; // cancelled from the local(sending) side
+ DAM_SR_CANCELLEDREMOTE = 5; // cancelled from the remote(receiving) side
+ DAM_SR_BADCRC = 6; // bad CRC; we can't do anything with this error. presumably, it will happen rarely, and the most probable cause is the protocol that filters some of characters in our messages OR it may be a bug in DataAsMessage plugin (hopefully not ;) ).
+ DAM_SR_UNKNOWN = 7; // unknown error
+
+// Return values for DAM_SENDRESULTPROC
+ DAM_SRA_RETRY = 1;
+
+type
+// hContact, szDataType and SessionID fields correspond to the fields of the
+// DAM_SENDDATAINFO structure
+ PDAM_SENDRESULTINFO = ^TDAM_SENDRESULTINFO;
+ TDAM_SENDRESULTINFO = record
+ cbSize :int; // sizeof(DAM_SENDRESULTINFO)
+ hContact :THANDLE;
+ szDataType:PAnsiChar;
+ SessionID :dword;
+ iResult :int; // transmission result code
+ end;
+
+type
+ TDAM_SENDRESULTPROC = function(sri:PDAM_SENDRESULTINFO):int; cdecl;
+// this procedure receives the result of the transmission. it's called when the
+// session closes (either the data was sent successfully or there was an error)
+// you can return DAM_SRA_RETRY when iResult is DAM_SR_TIMEOUT if you want to
+// retry sending
+
+const
+// DAM_SENDDATAINFO::Flags constants
+ DAM_SDF_DONTPACK = 1; // don't pack the data (by default all the data is packed)
+ DAM_SDF_NOTIMEOUT = 2; // don't generate a timeout error ever, keep trying to
+ // send the data. If the contact is offline, the data
+ // is saved in the memory until the contact goes online.
+ // Loss of the data occurs only if the sender's miranda
+ // closes (this may change in future to allow fully
+ // functional offline sending that will guarantee the
+ // data to be sent in any case, but of course the
+ // sending starts only when the both contacts are
+ // online). other errors than the timeout error can be
+ // still generated though.
+
+type
+ TDAM_SENDDATAINFO = record
+ cbSize :int; // sizeof(DAM_SENDDATAINFO)
+ hContact :THANDLE;
+ szDataType:PAnsiChar; // zero-terminated string, containing data type,
+ // preferably in format "YourPluginName" or
+ // "YourPluginName/Something" (make sure this string
+ // won't coincide by an accident with someone else's
+ // string!). you can identify your data by this ID later
+ nDataLen :int; // keep in mind that if the length is too big (more than
+ // about 8 KB), it's more preferable to split your data
+ // into several chunks, as you won't be able to "pick
+ // up" your data at the other end until all the data is
+ // transferred
+ cData :PAnsiChar;
+ Flags :int; // combination of the DAM_SDF_ constants
+ SendAfterSessionID:dword; // may be NULL; otherwise it's guaranteed that the
+ // sending starts only after successful completion
+ // of SendAfterSessionID session
+ SendResultProc:TDAM_SENDRESULTPROC; // pointer to a procedure that receives
+ // the result; can be NULL
+ SessionID :dword; // OUT; receives the session ID
+ end;
+
+const
+// MS_DAM_SENDDATA return values
+ DAM_SDA_NOERROR = 0;
+ DAM_SDA_NOTSUPPORTED = -1; // contact's protocol doesn't support sending/
+ // receiving messages
+ DAM_SDA_TOOMANYSESSIONS = -2; // too many sessions
+
+// MS_DAM_SENDDATA
+// sends the data
+// wParam = (WPARAM)(DAM_SENDDATAINFO*)sdi;
+// lParam = 0
+// Returns 0 (DAM_SDA_NOERROR) and fills SessionID if the session was queued for sending successfully; returns one of the DAM_SDA_ values on failure
+ MS_DAM_SENDDATA = 'DataAsMessage/SendData';
+
+function DAMSendData(hContact:THANDLE; szDataType:PAnsiChar; nDataLen:int;
+ cData:PAnsiChar; Flags:int; SendAfterSessionID:dword;
+ SendResultProc:TDAM_SENDRESULTPROC;pSessionID:pdword):int;
+var
+ sdi:TDAM_SENDDATAINFO;
+begin
+ FillChar(sdi,SizeOf(sdi),0);
+ sdi.cbSize :=SizeOf(sdi);
+ sdi.hContact :=hContact;
+ sdi.szDataType:=szDataType;
+ sdi.nDataLen :=nDataLen;
+ sdi.cData :=cData;
+ sdi.Flags :=Flags;
+ sdi.SendAfterSessionID:=SendAfterSessionID;
+ sdi.SendResultProc :=SendResultProc;
+ Result:=CallService(MS_DAM_SENDDATA,dword(@sdi),0);
+ if pSessionID<>nil then
+ pSessionID^:=sdi.SessionID;
+end;
+
+type
+ TDAM_RECVDATAINFO = record
+ cbSize :int; // sizeof(DAM_RECVDATAINFO)
+ hContact :THANDLE;
+ szDataType:PAnsiChar;
+ nDataLen :int;
+ cData :PAnsiChar;
+ end;
+
+const
+// ME_DAM_RECVDATA
+// hook up to this event to check for incoming data
+// make sure rdi->szDataType is yours before doing anything!
+// The important thing here is that your plugin will receive TWO ME_DAM_RECVDATA notifications on every single MS_DAM_SENDDATA call from a remote side:
+// The first notification arrives when the remote side starts to transmit the data. In this case DAM_RECVDATAINFO::cData = NULL (and DAM_RECVDATAINFO::nDataLen = -1) as we didn't receive any data yet. Return 1 to indicate that your plugin recognized the DAM_RECVDATAINFO::szDataType, otherwise return 0. If there are no any plugin that recognized the data, DAM cancels the transfer and there won't be any second notification for it.
+// The second notification is when the data is transmitted successfully. nDataLen contains the usual data size and cData points to the data buffer. cData is guaranteed to be valid only during the ME_DAM_RECVDATA call. You must copy the data to your own plugin's memory if you need it later. again, return 1 to indicate that your plugin recognized the data, otherwise return 0
+// wParam = (WPARAM)(DAM_RECVDATAINFO*)rdi;
+// lParam = 0
+ ME_DAM_RECVDATA = 'DataAsMessage/RecvData';
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_anismiley.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_anismiley.inc new file mode 100644 index 0000000000..f16005fe51 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_anismiley.inc @@ -0,0 +1,116 @@ +{$IFNDEF M_ANISMILEY}
+{$DEFINE M_ANISMILEY}
+
+const
+ IASF_UNICODE = 1;
+
+type
+ TINSERTANISMILEY = record
+ cbSize :size_t;
+ hWnd :HWND;
+ szFilename :TChar;
+ dwBackColor:COLORREF;
+ nHeight :int;
+ dwFlags :dword;
+ end;
+ tagINSERTANISMILEY = TINSERTANISMILEY;
+
+const
+ MS_INSERTANISMILEY :PAnsiChar = 'mAnimator/InsertSmiley';
+(*
+ function InsertAnimatedSmiley(wnd:HWND;filename:TChar;Back:TCOLORREF;height:int):bool;
+ const
+ bServiceExists:int=-1
+ var
+ ias:TINSERTANISMILEY;
+ begin
+ if bServiceExists=-1 then
+ bServiceExists:=ServiceExists(MS_INSERTANISMILEY);
+ if bServiceExists=0 then
+ result:=false
+ else
+ begin
+ ias.cbSize :=SizeOf(TINSERTANISMILEY);
+ ias.hWnd :=wnd;
+ ias.tcsFilename:=Filename.w;
+ ias.dwFlags :=IASF_UNICODE;
+ ias.nHeight :=Height;
+ ias.dwBackColor:=Back;
+ result:=CallService(MS_INSERTANISMILEY,WPARAM(@ias),0)<>0;
+ end;
+ end;
+
+ bool InsertAnimatedSmiley(HWND _hwnd, TCHAR * _szFilename, COLORREF _dwBack, int _nHeight)
+ {
+ static int bServiceExists=-1;
+ ias={0};
+ if (bServiceExists==-1)
+ bServiceExists=ServiceExists(MS_INSERTANISMILEY);
+ if (!bServiceExists) return FALSE;
+ ias.cbSize=sizeof(INSERTANISMILEY);
+ ias.hWnd=_hwnd;
+ ias.tcsFilename=_szFilename;
+ ias.dwFlags=IASF_TCHAR;
+ ias.nHeight=_nHeight;
+ ias.dwBackColor=_dwBack;
+ return (bool) CallService(MS_INSERTANISMILEY,(WPARAM)&ias, 0);
+ };
+*)
+
+
+{
+ NM_FIREVIEWCHANGE is WM_NOTIFY Message for notify parent of host window about smiley are going to be repaint
+
+ The proposed action is next: Owner of RichEdit windows received NM_FIREVIEWCHANGE through WM_NOTIFY
+ twice first time before painting|invalidating (FVCN_PREFIRE) and second time - after (FVCN_POSTFIRE).
+ The Owner window may change any values of received FVCNDATA_NMHDR structure in order to raise needed action.
+ For example it may substitute FVCA_INVALIDATE to FVCA_CUSTOMDRAW event to force painting on self offscreen context.
+
+ It can be:
+ FVCA_CUSTOMDRAW - in this case you need to provide valid HDC to draw on and valid RECT of smiley
+ FVCA_INVALIDATE - to invalidate specified rect of window
+ FVCA_NONE - skip any action. But be aware - animation will be stopped till next repainting of smiley.
+ FVCA_SENDVIEWCHANGE - to notify richedit ole about object changed. Be aware Richedit will fully reconstruct itself
+
+ Another point is moment of received smiley rect - it is only valid if FVCA_DRAW is initially set,
+ and it is PROBABLY valid if FVCA_INVALIDATE is set. And it most probably invalid in case of FVCA_SENDVIEWCHANGE.
+ The smiley position is relative last full paint HDC. Usually it is relative to top-left corner of host
+ richedit (NOT it client area) in windows coordinates.
+}
+
+const
+// Type of Event one of
+ FVCN_PREFIRE = 1;
+ FVCN_POSTFIRE = 2;
+
+// Action of event are going to be done
+ FVCA_NONE = 0;
+ FVCA_DRAW = 1; // do not modify hdc in case of _DRAW, Use _CUSTOMDRAW
+ FVCA_CUSTOMDRAW = 2;
+ FVCA_INVALIDATE = 3;
+ FVCA_SENDVIEWCHANGE = 4;
+ FVCA_SKIPDRAW = 5;
+
+// Extended NMHDR structure for WM_NOTIFY
+type
+ TFVCNDATA_NMHDR = record
+ //NMHDR structure
+ hwndFrom :HWND; // Window of smiley host
+ idFrom :uint_ptr; // ignored
+ code :uint; // NM_FIREVIEWCHANGE
+
+ cbSize :size_t;
+ bEvent :byte; // FVCN_ value - pre- or post- painting
+ bAction :byte; // FVCA_ keys
+ hDC :HDC; // Canvas to draw on
+ rcRect :TRECT; // Valid/should be in case of FVCA_DRAW
+ clrBackground:TCOLORREF; // color to fill background if fTransparent is not set
+ fTransparent :bool; // if need to fill back color
+ lParam :LPARAM; // used by host window PreFire and PostFire event
+ end;
+
+const
+// Code of WM_NOTIFY message (code)
+ NM_FIREVIEWCHANGE = NM_FIRST+1;
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_autoreplacer.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_autoreplacer.inc new file mode 100644 index 0000000000..bc1d528463 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_autoreplacer.inc @@ -0,0 +1,39 @@ +{
+ AutoReplacer plugin
+ by Angelo Luiz Tartari
+}
+
+{$IFNDEF M_AUTOREPLACER}
+{$DEFINE M_AUTOREPLACER}
+
+const
+
+{
+ Adds a window handle to AutoReplacer.
+ This handle must belong to any window based on a editbox (editbox, richtext, TMemo, TEdit, TMaskEdit, etc.).
+ After adding a handle, AutoReplacer will automatically work on this window.
+ wParam = 0
+ lParam = (LPARAM)(HWND)hwnd
+ Returns: 0 on success, -1 if hwnd is invalid, 1 on error.
+}
+ MS_AUTOREPLACER_ADDWINHANDLE = 'AutoReplacer/AddWinHandle';
+
+{
+ Removes a window handle from AutoReplacer's list.
+ wParam = 0
+ lParam = (LPARAM)(HWND)hwnd
+ Returns: 0 on success, -1 if hwnd is invalid, 1 if hwnd wasn't found.
+}
+ MS_AUTOREPLACER_REMWINHANDLE = 'AutoReplacer/RemWinHandle';
+
+ function autoreplacer_AddWinHandle(hwnd: HWND): integer;
+ begin
+ Result := CallService(MS_AUTOREPLACER_ADDWINHANDLE, 0, LPARAM(hwnd));
+ end;
+
+ function autoreplacer_RemWinHandle(hwnd: HWND): integer;
+ begin
+ Result := CallService(MS_AUTOREPLACER_REMWINHANDLE, 0, LPARAM(hwnd));
+ end;
+
+{$ENDIF}
\ No newline at end of file diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_contactdir.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_contactdir.inc new file mode 100644 index 0000000000..1b21717753 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_contactdir.inc @@ -0,0 +1,164 @@ +{
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2005 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_CONTACTDIR}
+{$DEFINE M_CONTACTDIR}
+
+{ Contactdir module was created on 2005/05/17, 0.4.0.1
+
+ -- How you use this module as a protocol --
+
+ On Load() Register your protocol with the setting name that stores unique IDs, example:
+
+ if ( ContactDir_SupportExists() ) g_Atom=ContactDir_Register("ICQ", "UIN");
+
+ This will register your protocol and walk the database looking for all contacts on PROTOCOL_NAME which have
+ a "UIN" setting and store it in memory (converting to a string as needed) You of course have to
+ provide fallback if the services don't exist, it's an idea to keep existing code for that.
+
+ -
+
+ When you add a new contact via MS_DB_CONTACT_ADD, you must register it with your protocol atom too, via
+ ContactDir_AddContact(atom, "UIN #", hContact) and when it is deleted ContactDir_RemoveContact(atom, "UIN #")
+
+ -
+
+ To find a contact, use ContactDir_Lookup(atom, "ICQ #") which will return the hContact.
+}
+
+type
+ PCONTACTDIRECTORYDESCRIPTOR = ^TCONTACTDIRECTORYDESCRIPTOR;
+ TCONTACTDIRECTORYDESCRIPTOR = record
+ cbSize :int;
+ szProto :PAnsiChar;
+ szSetting:PAnsiChar;
+ atom :THANDLE; // out arg
+ end;
+
+{
+ wParam: 0
+ lParam: (LPARAM) &CONTACTDIRECTORYDESCRIPTOR;
+ Affect: Register a given protocol and it's setting name which contains the unique key entry. e.g. ("ICQ", "UIN")
+ and return a HANDLE for use with other lookup services.
+ Returns: 0 on success, non zero on failure -- a returned handle is in .atom
+ Note: The directory will convert dword values into string representations but will not do this for bytes or words
+ used as IDs -- the protocol has to convert the IDs itself (:
+ Note: See ContactDir_Register() for a quicker way.
+ *** WARNING ***: This service does not expect the given module name to have registered as a protocol module, it
+ completely bypasses this information.
+ Version: 0.4.0.1 (2005/05/17+)
+}
+const
+ MS_CONTACTDIR_REGISTER = 'ContactDir/Register';
+
+type
+ PCONTACTDIRECTORYLOOKUP = ^TCONTACTDIRECTORYLOOKUP;
+ TCONTACTDIRECTORYLOOKUP = record
+ cbSize :int;
+ atom :THANDLE; // Atom handle from MS_CONTACTDIR_REGISTER
+ szID :PAnsiChar; // in: value you wish to find (makes its own copy if needed)
+ hContact:THANDLE; // out: hContact associated with szID, if any.
+ end;
+
+{
+ wParam: 0
+ lParam: (LPARAM) &CONTACTDIRECTORYLOOKUP;
+ Affect: Given an atom and string ID, will find the associated DB hContact value
+ Returns: 0 on success, non zero on failure
+ Version: 0.4.0.1 (2005/05/17+)
+ Note: ContactDir_Lookup() helper macro might be of use.
+}
+const
+ MS_CONTACTDIR_LOOKUP = 'ContactDir/Lookup';
+
+{
+ wParam: 0
+ lParam: (LPARAM)&CONTACTDIRECTORYLOOKUP;
+ Affect: Add a contact to a protocol atom association.
+ Returns: 0 on success, non zero on failure
+ Version: 0.4.0.1 (2005/05/17+)
+ Note: You must call this when you create a contact with MS_DB_CONTACT_ADD, see ContactDir_AddContact()
+}
+ MS_CONTACTDIR_ADDCONTACT = 'ContactDir/AddContact';
+
+{
+ wParam: 0
+ lParam: (LPARAM)&CONTACTDIRECTORYLOOKUP;
+ Affect: Remove a contact to a protocol atom association.
+ Returns: 0 on success, non zero on failure
+ Version: 0.4.0.1 (2005/05/17+)
+ Note: see ContactDir_RemoveContact()
+}
+ MS_CONTACTDIR_REMOVECONTACT = 'ContactDir/RemoveContact';
+
+(*
+/* -- Helper functions -- */
+
+static int ContactDir_SupportExists(void)
+{
+ return ServiceExists(MS_CONTACTDIR_REGISTER);
+}
+
+// Only take as valid if ContactDir_SupportExists() returns true.
+static HANDLE ContactDir_Register(AnsiChar * szProto, AnsiChar * szSetting)
+{
+ CONTACTDIRECTORYDESCRIPTOR cd;
+ cd.cbSize=sizeof(CONTACTDIRECTORYDESCRIPTOR);
+ cd.szProto=szProto;
+ cd.szSetting=szSetting;
+ cd.atom=NULL;
+ CallService(MS_CONTACTDIR_REGISTER, 0, (LPARAM)&cd);
+ return cd.atom;
+}
+
+static __inline HANDLE ContactDir_Lookup(HANDLE atom, AnsiChar * szID)
+{
+ CONTACTDIRECTORYLOOKUP f;
+ f.cbSize=sizeof(f);
+ f.atom=atom;
+ f.szID=szID;
+ f.hContact=NULL;
+ CallService(MS_CONTACTDIR_LOOKUP, 0, (LPARAM)&f);
+ return f.hContact;
+}
+
+static __inline void ContactDir_AddContact(HANDLE atom, AnsiChar * szID, HANDLE hContact)
+{
+ CONTACTDIRECTORYLOOKUP c = {0};
+ c.cbSize=sizeof(CONTACTDIRECTORYLOOKUP);
+ c.atom=atom;
+ c.szID=szID;
+ c.hContact=hContact;
+ CallService(MS_CONTACTDIR_ADDCONTACT, 0, (LPARAM)&c);
+}
+
+static __inline void ContactDir_RemoveContact(HANDLE atom, AnsiChar * szID)
+{
+ CONTACTDIRECTORYLOOKUP c = {0};
+ c.cbSize=sizeof(CONTACTDIRECTORYLOOKUP);
+ c.atom=atom;
+ c.szID=szID;
+ c.hContact=NULL;
+ CallService(MS_CONTACTDIR_REMOVECONTACT, 0, (LPARAM)&c);
+}
+*)
+{$ENDIF}
\ No newline at end of file diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_db3xsa.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_db3xsa.inc new file mode 100644 index 0000000000..77ac666967 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_db3xsa.inc @@ -0,0 +1,84 @@ +{
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2007 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_DB3XSA}
+{$DEFINE M_DB3XSA}
+
+const
+{ DB/SetPassword v0.5.1.3+
+ This service is used to set, change or clear the password used for encrypting the profile.
+ It opens the password change dialog.
+ wParam=0
+ lParam=0
+}
+ MS_DB_SETPASSWORD = 'DB/SetPassword';
+
+{ DB/Backup v0.5.1.3+
+ This service will make a backup of your current profile. Backups are named
+ <ProfileName> xx.bak where xx is the number of backups. The larger the number, the
+ older the backup.
+ wParam=0
+ lParam=0
+}
+ MS_DB_BACKUP = 'DB/Backup';
+
+{ DB/Backup v0.5.1.3+
+ This service is the trigger action service and does the same as the service above.
+ Only difference is wParam carries flags from trigger plugin.
+ wParam=flags
+ lParam=0
+}
+ MS_DB_BACKUPTRIGGER = 'DB/BackupTriggerAct';
+
+{ DB/GetProfilePath(W) v0.5.1.5+
+ Gets the path of the profile currently being used by the database module. This
+ path does not include the last '\'. It is appended with the profile's name if
+ ProfileSubDir=yes is set in the mirandaboot.ini.
+ wParam=(WPARAM)(int)cbName
+ lParam=(LPARAM)(AnsiChar*)pszName
+ pszName is a pointer to the buffer that receives the path of the profile
+ cbName is the size in bytes of the pszName buffer
+ Returns 0 on success or nonzero otherwise
+}
+ MS_DB_GETPROFILEPATHW = 'DB/GetProfilePathW';
+
+
+{ DB/GetProfilePathBasic(W) v0.5.1.5+
+ Gets the path of the profile currently being used by the database module. This
+ path does not include the last '\'. This is never appended with the profile's name.
+ wParam=(WPARAM)(int)cbName
+ lParam=(LPARAM)(AnsiChar*)pszName
+ pszName is a pointer to the buffer that receives the path of the profile
+ cbName is the size in bytes of the pszName buffer
+ Returns 0 on success or nonzero otherwise
+}
+ MS_DB_GETPROFILEPATH_BASIC = 'DB/GetProfilePathBasic';
+ MS_DB_GETPROFILEPATH_BASICW = 'DB/GetProfilePathBasicW';
+
+ MIRANDAPATH = '%MIRANDAPATH%';
+ MIRANDAPATHW = '%MIRANDAPATH%';
+ PROFILEPATH = '%PROFILEPATH%';
+ PROFILEPATHW = '%PROFILEPATH%';
+ PROFILENAME = '%PROFILENAME%';
+ PROFILENAMEW = '%PROFILENAME%';
+
+{$ENDIF}
\ No newline at end of file diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_ersatz.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_ersatz.inc new file mode 100644 index 0000000000..553194eee2 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_ersatz.inc @@ -0,0 +1,41 @@ +{
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2006 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_ERSATZ}
+{$DEFINE M_ERSATZ}
+
+const
+// Returns the status message for a status
+// wParam=(word) 0 for current status or a status
+// lParam=0
+// Returns status msg or NULL if there is none. The protocol have to handle only the current
+// status. Handling messages for other statuses is optional.
+// Remember to mir_free the return value
+ PS_GETMYAWAYMSG = '/GetMyAwayMsg';
+
+// Created if ersatz is installed
+// wParam=0
+// lParam=0
+// returns always 1
+ MS_ERSATZ_ENABLED = 'ERSATZ/Enabled';
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_fuse.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_fuse.inc new file mode 100644 index 0000000000..82b002b5db --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_fuse.inc @@ -0,0 +1,28 @@ +{$IFNDEF M_FUSE}
+{$DEFINE M_FUSE}
+
+const
+ FUSE_INIT = 0; // core started, Param=**FUSE_LINK
+ FUSE_DEINIT = 1; // core stopped
+ FUSE_DEFMOD = 3; // LoadDefaultModules() return code, Param=*int
+ FUSE_DEATH = 4; // DestroyingModularEngine() just got called
+
+type
+ PFUSE_LINK = ^TFUSE_LINK;
+ TFUSE_LINK = record
+ cbSize : longint;
+ CreateHookableEvent : function (para1:PAnsiChar):THANDLE;cdecl;
+ DestroyHookableEvent : function (para1:THANDLE):longint;cdecl;
+ NotifyEventHooks : function (para1:THANDLE; para2:WPARAM; para3:LPARAM):longint;cdecl;
+ HookEvent : function (para1:PAnsiChar; para2:TMIRANDAHOOK):THANDLE;cdecl;
+ HookEventMessage : function (para1:PAnsiChar; para2:HWND; para3:dword):THANDLE;cdecl;
+ UnhookEvent : function (para1:THANDLE):longint;cdecl;
+ CreateServiceFunction : function (para1:PAnsiChar; para2:TMIRANDASERVICE):THANDLE;cdecl;
+ CreateTransientServiceFunction : function (para1:PAnsiChar; para2:TMIRANDASERVICE):THANDLE;cdecl;
+ DestroyServiceFunction : function (para1:THANDLE):longint;cdecl;
+ CallService : function (para1:PAnsiChar; para2:WPARAM; para3:LPARAM):longint;cdecl;
+ ServiceExists : function (para1:PAnsiChar):longint;cdecl; {v0.1.0.1+ }
+ CallServiceSync : function (para1:PAnsiChar; para2:WPARAM; para3:LPARAM):longint;cdecl; {v0.1.2.2+ }
+ end;
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_help(plugin).inc b/plugins/!Deprecated/ExternalAPI/delphi/m_help(plugin).inc new file mode 100644 index 0000000000..0eb63615d9 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_help(plugin).inc @@ -0,0 +1,76 @@ +{
+Miranda IM Help Plugin
+Copyright (C) 2002 Richard Hughes, 2005-2007 H. Herkenrath
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program (Help-License.txt); if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_HELP}
+{$DEFINE M_HELP}
+
+const
+
+{
+ Help Plugin 0.2.1.2
+ All services in here except MS_HELP_SHOWLANGDIALOG should be thread-safe,
+ you can call them from any thread
+}
+
+{ interface id }
+ MIID_HELP: TGUID = '{302660C5-1BF6-4054-A79F-77B1965D6F48}';
+
+{ Enable/disable the help context menu for a specific control. v0.2.0.0+
+Note: You normally do not need to call this, read below.
+You can can use this to deactivate the appearance of the help context menu
+being shown when the user right clicks on an control.
+You can use this service to disable the context menu.
+
+You do *not* need to use this service when you would like to show
+a context menu by yourself, just handle WM_CONTEXTMENU correctly instead.
+You need to return TRUE in your DlgProc or 0 in your WndProc, indicating 'message handled'.
+
+The context menu is disabled by default on the following controls (looks silly on multi-component controls):
+ListView, TreeView, Statusbar, Toolbar, CLC
+AutoTips are disabled by default for controls stating DLGC_WANTALLKEYS or DLGC_HASSETSEL at
+WM_GETDLGCODE (autotips are annoying on edits).
+ wParam : (HWND)hwndCtl
+ lParam : flags (see below)
+Returns 0 on success or nonzero on failure
+}
+ MS_HELP_SETCONTEXTSTATE = 'Help/SetContextState';
+ HCSF_CONTEXTMENU = $01; // show help context menu for this control
+ HCSF_AUTOTIP = $02; // show automatic help tip on hover for this control
+ // only works for non-editable
+
+{ Show a help tooltip for a specific control or dialog. v0.2.0.0+
+You can call this if you would like to show help at a specific time.
+ wParam : (HWND)hwndCtl
+ lParam : 0
+Returns 0 on success or nonzero on failure.
+The service fails when the help tooltip cannot be instantiated.
+}
+ MS_HELP_SHOWHELP = 'Help/ShowHelp';
+
+{ Show the download language dialog. v0.2.1.0+
+ wParam : 0
+ lParam : 0
+The dialog can't have a parent due to it's asynchronous nature.
+If the language window is already opened it will be
+brought to front instead (returns success).
+Returns 0 on success, nonzero otherwise.
+}
+ MS_HELP_SHOWLANGDIALOG = 'Help/ShowLangDialog';
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_historyevents.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_historyevents.inc new file mode 100644 index 0000000000..ae582f0eef --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_historyevents.inc @@ -0,0 +1,201 @@ +{
+Copyright (C) 2006 Ricardo Pescuma Domenecci
+
+This is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this file; see the file license.txt. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+}
+
+
+{$IFNDEF M_HISTORYEVENTS}
+{$DEFINE M_HISTORYEVENTS}
+
+const
+ HISTORYEVENTS_FORMAT_CHAR = 1;
+ HISTORYEVENTS_FORMAT_WCHAR = 2;
+ HISTORYEVENTS_FORMAT_RICH_TEXT = 4;
+ HISTORYEVENTS_FORMAT_HTML = 8;
+
+const
+ HISTORYEVENTS_FLAG_DEFAULT = 1 shl 0; // Is a miranda core event type
+ HISTORYEVENTS_FLAG_SHOW_IM_SRMM = 1 shl 1; // If this event has to be shown in srmm dialog
+ HISTORYEVENTS_FLAG_USE_SENT_FLAG = 1 shl 2; // Means that it can be a sent or received and uses DBEF_SENT to mark that
+ HISTORYEVENTS_FLAG_EXPECT_CONTACT_NAME_BEFORE = 1 shl 3; // Means that who is drawing this should draw the contact name before the text
+ HISTORYEVENTS_FLAG_ONLY_LOG_IF_SRMM_OPEN = 1 shl 4; // If this event will be logged only if the message window is open
+ HISTORYEVENTS_FLAG_FLASH_MSG_WINDOW = 1 shl 5; // If this event will trigger the openning/flashing of the message window
+
+ HISTORYEVENTS_REGISTERED_IN_ICOLIB = 9 shl 16; // If the icon is a name already registered in icolib
+
+ HISTORYEVENTS_FLAG_KEEP_ONE_YEAR = 1 shl 8; // By default store in db for 1 year
+ HISTORYEVENTS_FLAG_KEEP_SIX_MONTHS = 2 shl 8; // By default store in db for 6 months
+ HISTORYEVENTS_FLAG_KEEP_ONE_MONTH = 3 shl 8; // By default store in db for 1 month
+ HISTORYEVENTS_FLAG_KEEP_ONE_WEEK = 4 shl 8; // By default store in db for 1 week
+ HISTORYEVENTS_FLAG_KEEP_ONE_DAY = 5 shl 8; // By default store in db for 1 day
+ HISTORYEVENTS_FLAG_KEEP_FOR_SRMM = 6 shl 8; // By default store in db only enought for message log
+ HISTORYEVENTS_FLAG_KEEP_MAX_TEN = 7 shl 8; // By default store in db max 10 entries
+ HISTORYEVENTS_FLAG_KEEP_MAX_HUNDRED = 8 shl 8; // By default store in db for 100 entries
+ HISTORYEVENTS_FLAG_KEEP_DONT = 9 shl 8; // By default don't store in db (aka ignore it)
+
+
+// This function must be implemented by subscribers. It must return a pointer or NULL
+// to say it can't handle the text
+type
+ fGetHistoryEventText = function(hContact:THANDLE; hDbEvent:THANDLE;
+ dbe:PDBEVENTINFO; format:int):pointer; cdecl;
+
+type
+ HISTORY_EVENT_HANDLER = record
+ cbSize :int;
+ module :PAnsiChar;
+ name :PAnsiChar; // Internal event name
+ description:PAnsiChar; // Will be translated. When retrieving it is already translated
+ eventType :word; // The event type it can handle
+ defaultIcon:HICON; // PAnsiChar= icon name if HISTORYEVENTS_REGISTERED_IN_ICOLIB is set.
+ // Always use this one when retrieving
+ supports :int; // What kind of return is supported - or of HISTORYEVENTS_FORMAT_*
+ flags :int; // or of HISTORYEVENTS_FLAG_*
+ pfGetHistoryEventText:fGetHistoryEventText; // NULL to use default get text (similar to message, without extra format)
+
+ // Aditional data if wants to use add to history services
+ templates:^PAnsiChar; // Each entry is: "Name\nDefault\n%var%\tDescription\n%var%\tDescription\n%var%\tDescription"
+ numTemplates:int;
+ end;
+const
+{
+ Get the number of registered events
+
+ wParam: ignored
+ lParam: ignored
+ Return: The number of events registered with the plugin
+}
+ MS_HISTORYEVENTS_GET_COUNT:PAnsiChar = 'HistoryEvents/GetCount';
+
+{
+ Get an event by number or by type.
+ To retrieve by number, pass -1 as type. To retrieve by type, pass -1 as number.
+
+ wParam: (int) event number
+ lParam: (int) event type
+ Return: (const HISTORY_EVENT_HANDLER *) if the event exists, NULL otherwise. Don't change the
+ returned strunc: it is a pointer to the internall struct.
+}
+ MS_HISTORYEVENTS_GET_EVENT:PAnsiChar = 'HistoryEvents/GetEvent';
+
+{
+ Register a plugin that can handle an event type. This must be called during the call to the
+ Load function of the plugin. In ModulesLoaded callback all plugins have to be already
+ registered, so srmm and history modules can query then.
+
+ wParam: HISTORY_EVENT_HANDLER *
+ lParam: ignored
+ Return: 0 for success
+}
+ MS_HISTORYEVENTS_REGISTER:PAnsiChar = 'HistoryEvents/Register';
+
+
+type
+ HISTORY_EVENT_PARAM = record
+ cbSize :int;
+ hDbEvent:THANDLE;
+ dbe :PDBEVENTINFO; // Optional
+ format :int; // one of HISTORYEVENTS_FORMAT_*
+ end;
+
+const
+{
+ Check if an event can be handled by any subscribers
+
+ wParam: WORD - event type
+ lParam: ignored
+ Return: BOOL
+}
+ MS_HISTORYEVENTS_CAN_HANDLE:PAnsiChar = 'HistoryEvents/CanHandle';
+
+{
+ Get the icon for a history event type
+
+ wParam: WORD - event type
+ lParam: ignored
+ Return: HICON - after use free with MS_HISTORYEVENTS_RELEASE_ICON
+}
+ MS_HISTORYEVENTS_GET_ICON:PAnsiChar = 'HistoryEvents/GetIcon';
+
+{
+ Get the flags for a history event type
+
+ wParam: WORD - event type
+ lParam: ignored
+ Return: int - or of HISTORYEVENTS_FLAG_* or -1 if error
+}
+ MS_HISTORYEVENTS_GET_FLAGS:PAnsiChar = 'HistoryEvents/GetFlags';
+
+{
+ Release the icon for a history event type. This is really just a forward to icolib
+
+ wParam: HICON
+ lParam: ignored
+}
+ MS_HISTORYEVENTS_RELEASE_ICON:PAnsiChar = 'Skin2/Icons/ReleaseIcon';
+
+{
+ Get the text for a history event type
+
+ wParam: HISTORY_EVENT_PARAM *
+ lParam: ignored
+ Return: char * or wchar * depending on sent flags. Free with mir_free or MS_HISTORYEVENTS_RELEASE_TEXT
+}
+ MS_HISTORYEVENTS_GET_TEXT:PAnsiChar = 'HistoryEvents/GetText';
+
+{
+ Release the text for a history event type. Internally is just a call to mir_free
+
+ wParam: char * or wchar *
+ lParam: ignored
+}
+ MS_HISTORYEVENTS_RELEASE_TEXT:PAnsiChar = 'HistoryEvents/ReleaseText';
+
+
+type
+ HISTORY_EVENT_ADD = record
+ cbSize :int;
+ hContact :THANDLE;
+ eventType :word;
+ templateNum :int;
+ variables :^PTCHAR; // TCHAR **variables
+ numVariables :int;
+ additionalData :pbyte;
+ additionalDataSize:int;
+ flags :int; // Flags for the event type
+ end;
+
+const
+{
+ Add an registered event to the history. This is a helper service
+
+ wParam: HISTORY_EVENT_ADD
+ lParam: ignored
+ Return: HANDLE to the db event
+}
+ MS_HISTORYEVENTS_ADD_TO_HISTORY:PAnsiChar = 'HistoryEvents/AddToHistory';
+
+{
+ Check if a template is enabled
+
+ wParam: event type
+ lParam: template num
+ Return: TRUE or FALSE
+}
+ MS_HISTORYEVENTS_IS_ENABLED_TEMPLATE:PAnsiChar = 'HistoryEvents/IsEnabledTemplate';
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_ircscript.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_ircscript.inc new file mode 100644 index 0000000000..0157443e30 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_ircscript.inc @@ -0,0 +1,125 @@ +{
+ This file is a description of the interface between the Miranda Scripting
+ Plugin (MSP) and IRC. It is mainly an internal draft.
+
+ The MSP is a powerful PHP based scripting engine
+ which can automate many tasks in Miranda IM. With the implementation of
+ this interface IRC can also benefit from the advantages MSP brings. The
+ interface has been constructed by the respective authors of IRC and MSP.
+
+ The idea is that MSP and IRC should communicate via the interface outlined herein,
+ but MSP should "package" the data in attractive functions that can be easily
+ used by eager scripters.
+
+ Note that m_chat.h should be #included as the events defined therein is used in this interface
+
+ The IRC plugin communicates with MSP mainly through 8 (2 x 4) services which are
+ illustrated by the following matrix (MSP has 4 services and IRC 4 services):
+
+ --------------------------------------------------
+ | | |
+ | Incoming raw data | Data going |
+ | from server | to GUI |
+ | (before processing) | (after processing) |
+ | | |
+ --------------------------------------------------
+ | | |
+ | Outgoing raw data | Data going |
+ | to server | from GUI |
+ | (after processing) | (before processing) |
+ | | |
+ --------------------------------------------------
+
+ (processing refers to the IRC plugin reacting to different commands)
+}
+
+{$IFNDEF M_IRCSCRIPT}
+{$DEFINE M_IRCSCRIPT}
+
+//------------------------- HANDLING RAW MESSAGES ------------------------
+{
+ The two leftmost boxes are related to data sent to and from the server in RAW form.
+ (a typical RAW message looks like this: ":nick!user@host COMMAND PARAMETERS")
+
+ It is very useful for scripters to be able to manipulate and add RAW streams of data.
+
+ The below structure is used when RAW data is generated and IRC must trigger an
+ event in MSP so the scripts can do their magic.
+
+ If the data is modified make sure to use MS_SYSTEM_GET_MMI and then mmi_realloc() to
+ allocate from the same heap. Do not free the data.
+
+ wParam= Module name
+ lParam= (LPARAM)(AnsiChar *)pszRaw
+ returns nonzero if the message should be dropped
+}
+
+{
+ NOTE! IRC will implement two services which also uses the same parameters:
+
+ "<Module Name>/InsertRawIn" //used for inserting a "fake" incoming RAW event
+ "<Module Name>/InsertRawOut" //used for inserting a "fake" outgoing RAW event
+}
+
+const
+ MS_MBOT_IRC_RAW_IN = 'MBot/IrcRawIn';
+ MS_MBOT_IRC_RAW_OUT = 'MBot/IrcRawOut';
+
+//------------------------- HANDLING GUI MESSAGES 1 ------------------------
+{
+ The top rightmost box is related to data sent to the gui
+ (currently chat.dll) in the form of GCEVENT's. (see m_chat.h)
+
+ While maybe not as useful to the scripter, it can be useful to be able to
+ "tap into" messages to the GUI from the IRC plugin.
+
+ If the data is modified make sure to realloc() or similar.
+
+ wParam= (WPARAM) (WPARAM_GUI_IN) &wgi
+ lParam= (LPARAM)(GCEVENT *)&gce // see m_chat.h
+ returns nonzero if the message should be dropped
+}
+
+{
+ NOTE! IRC will implement a service which also uses the same parameters:
+
+ "<Module Name>/InsertGuiIn" //used for inserting a "fake" event to the GUI
+}
+type
+ PWPARAM_GUI_IN = ^WPARAM_GUI_IN;
+ WPARAM_GUI_IN = record
+ pszModule:PAnsiChar;
+ wParam:WPARAM;
+ end;
+ PMBOT_GUI_WPARAM_IN_STRUCT = PWPARAM_GUI_IN;
+ TMBOT_GUI_WPARAM_IN_STRUCT = WPARAM_GUI_IN;
+
+const
+ MS_MBOT_IRC_GUI_IN = 'MBot/IrcGuiIn';
+
+//------------------------- HANDLING GUI MESSAGES 2 ------------------------
+{
+ The bottom rightmost box is related to data sent from the gui
+ (currently chat.dll) in the form of GCHOOKS's. Originally this is carried out in a hook,
+ but for MSP this is done via a service instead.
+
+ It can be useful for scripters to simulate user actions, like entering text, closing the window etc
+
+ If the data is modified make sure to realloc() or similar.
+
+ wParam= Module name
+ lParam= (LPARAM)(GCHOOK *)gch // see m_chat.h
+ returns nonzero if the message should be dropped
+}
+
+{
+ NOTE! IRC will implement a service which also uses the same parameters:
+
+ "<Module Name>/InsertGuiOut" //used for inserting a "fake" outgoing event to the GUI
+}
+
+ MS_MBOT_IRC_GUI_OUT = 'MBot/IrcGuiOut';
+
+ MS_MBOT_REGISTERIRC = 'MBot/RegisterIRCModule';
+
+{$ENDIF}
\ No newline at end of file diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_keybindings.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_keybindings.inc new file mode 100644 index 0000000000..e0c31c31e5 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_keybindings.inc @@ -0,0 +1,58 @@ +{
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2007 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_KEYBINDINGS}
+
+const
+ KB_CTRL_FLAG = $10000;
+ KB_SHIFT_FLAG = $20000;
+ KB_ALT_FLAG = $40000;
+
+ KBDF_UNICODE = 1;
+
+type
+ TKEYBINDINGDESC = record
+ cbSize :int; //size of the structure
+ szSection :TChar; // section name used to display key bindings in the tree view [TRANSLATED-BY-CORE]
+ pszActionName :TChar; // action name used to display key bindings in the tree view [TRANSLATED-BY-CORE]
+ pszActionGroup:PAnsiChar; // action group name used to group unique shortcuts, shortcuts cannot be duplicated within a group
+ key :array [0..4] of dword; // virtual key + KB_* flags, up to 5 different shortcuts may be defined for each action
+ flags :dword; // flags (KBDF_*)
+ action :int; // id of the action
+ end;
+
+{Registers action with default key bindings assigned to it.
+ wParam = (WPARAM) 0; not used
+ lParam = (LPARAM) (KEYBINDINGDESC*)
+ return: 0 on success, error code otherwise
+}
+ MS_KEYBINDINGS_REGISTER :PAnsiChar = 'KeyBindings/Register';
+
+{Gets action assigned to the given key
+ key[0] and pszActionGroup in KEYBINDINGDESC should be set before calling this service
+ wParam = (WPARAM) 0; not used
+ lParam = (LPARAM) (KEYBINDINGDESC*)
+ return: 0 if action assigned to the given key was found, 1 otherwise
+}
+ MS_KEYBINDINGS_GET :PAnsiChar = 'KeyBindings/Get';
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_langman.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_langman.inc new file mode 100644 index 0000000000..4f0079719d --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_langman.inc @@ -0,0 +1,46 @@ +{
+'Language Pack Manager'-Plugin for
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2005-2007 H. Herkenrath
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program (LangMan-License.txt); if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_LANGMAN}
+{$DEFINE M_LANGMAN}
+
+const
+
+{
+ Language Pack Manager v1.0.2.1
+ If you have any question or extension whishes please let me know:
+ hrathh at users.sourceforge.net
+}
+
+{ interface id }
+ MIID_LANGMAN: TGUID = '{D80370D5-4B1E-46a8-ACA4-1FAAD79B7D1E}';
+
+{ Show the download language dialog. v1.0.1.2+
+ wParam : 0
+ lParam : 0
+The dialog can't have a parent due to it's asynchronous nature.
+If the language window is already opened it will be
+brought to front instead (returns success).
+Returns 0 on success, nonzero otherwise.
+}
+ MS_LANGMAN_SHOWLANGDIALOG = 'LangMan/ShowLangDialog';
+
+{$ENDIF} // M_LANGMAN
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_mathmodule.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_mathmodule.inc new file mode 100644 index 0000000000..a4d10edfa6 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_mathmodule.inc @@ -0,0 +1,199 @@ +{$IFNDEF M_MATHMODULE}
+{$DEFINE M_MATHMODULE}
+ {--------------------------------------------------- }
+ {
+ 2
+ x + 2 Pi
+ + R
+ Sin(wt)
+
+ Math-Module
+
+ Miranda Plugin by Stephan Kassemeyer
+ MathModule API - (c) Stephan Kassemeyer
+ 8 May, 2004
+ }
+ { --------- }
+ {
+ Miranda Service-functions defined by MathModule
+ call with the
+ int ( CallService)(const AnsiChar servicename,WPARAM,LPARAM)
+ that you get from miranda when Miranda calls the
+ Load(PLUGINLINK link)
+ of your PlugIn-dll
+ the CallService function then is:
+ link->CallServiceSync(Servicename,wparam,lparam)
+ }
+ { --------- }
+
+const
+ MATH_RTF_REPLACE_FORMULAE = 'Math/RtfReplaceFormulae';
+ { replace all formulas in a RichEdit with bitmaps. }
+ { wParam = 0 }
+ { lParam = *TMathRichedit Info }
+ { return: TRUE if replacement succeeded, FALSE if not (disable by user?). }
+ { handle of richedit. }
+ { NULL: replace all. }
+type
+ PMathRicheditInfo = ^TMathRicheditInfo;
+ TMathRicheditInfo = record
+ hwndRichEditControl : HWND;
+ sel : PCHARRANGE;
+ disableredraw : int;
+ end;
+ { WARNING: !!! }
+ { Strange things happen if you use this function twice on the same CHARRANGE: }
+ { if Math-startDelimiter == Math-endDelimiter, there is the following problem: }
+ { it might be that someone forgot an endDelimiter, this results in a lonesome startdelimiter. }
+ { if you try to MATH_REPLACE_FORMULAE the second time, startDelimiters and endDelimiters are mixed up. }
+ { The same problem occours if we have empty formulae, because two succeding delimiters are }
+ { replaced with a single delimiter. }
+
+const
+ MATH_GET_STARTDELIMITER = 'Math/GetStartDelimiter';
+ { returns the delimiter that marks the beginning of a formula }
+ { wparam=0 }
+ { lparam=0 }
+ { result=*AnsiChar Delimiter }
+ { !!! the result-buffer must be deleted with MTH_FREE_MATH_BUFFER }
+
+ MATH_GETENDDELIMITER = 'Math/GetEndDelimiter';
+ { returns the delimiter that marks the end of a formula }
+ { wparam=0 }
+ { lparam=0 }
+ { result=*AnsiChar Delimiter }
+ { !!! the result-buffer must be deleted with MTH_FREE_MATH_BUFFER }
+
+ MTH_FREE_MATH_BUFFER = 'Math/FreeRTFBitmapText';
+ { deletes any buffer that MathModule has created. }
+ { wparam=0 }
+ { lparam=(*AnsiChar) buffer }
+ { result=0 }
+
+ MATH_SETBKGCOLOR = 'Math/SetBackGroundColor';
+ { changes the background color of the next formula to be rendered. }
+ { wparam=0 }
+ { lparam=(COLORREF) color }
+ { result=0 }
+
+ MATH_SET_PARAMS = 'Math/SetParams';
+ { sets a parameter (only integer values) encoded in wparam }
+ { wparam=paramcode }
+ { lparam=parametervalue }
+ { paramcodes: }
+const
+ MATH_PARAM_BKGCOLOR = 0; // (COLORREF) std-rgb-color or TRANSPARENT_Color
+ MATH_PARAM_FONTCOLOR = 1; // (COLORREF) std-rgb-color
+ RESIZE_HWND = 2; // (HWND) preview window resizes RESIZE_HWND when
+ // it is being resized.
+ ToolboxEdit_HWND = 3; // (HWND) If this hwnd (of an edit-box) is set,
+ // MathModule can insert Formula-elements from
+ // the Math-Toolbox.
+// you can make the BKGCOLOR Transparent (default) by using this color:
+ TRANSPARENT_Color = $FFFFFFFF-1; // this is default
+
+const
+ MTH_GETBITMAP = 'Math/GetBitmap';
+ {returns Bitmap that represents the formula given in lparam (string-pointer) }
+ {this formula has NO Delimiters. }
+ {wparam=0 }
+ {lparam=(*AnsiChar)Formula }
+ {result=(HBITMAP) bitmap }
+ {!!! the bitmap must be deleted with DeleteObject(hobject) }
+ {example: }
+ {HBITMAP Bmp=(HBITMAP)CallService(MTH_GETBITMAP,0, (LPARAM)formula); }
+
+ MTH_GET_RTF_BITMAPTEXT = 'Math/GetRTFBitmapText';
+ { returns rich-text stream that includes bitmaps from text given in lparam }
+ { text included between MATH_GET_STARTDELIMITER and MATH_GETENDDELIMITER }
+ { hereby is replaced with a rtf-bitmap-stream that represents the corresponding formula }
+ { wparam=0 }
+ { lparam=*AnsiChar text }
+ { result=*AnsiChar rtfstream }
+ { !!! the result-buffer must be deleted with MTH_FREE_RTF_BITMAPTEXT }
+
+ MTH_FREE_RTF_BITMAPTEXT = 'Math/FreeRTFBitmapText';
+ { deletes the buffer that MTH_GET_RTF_BITMAPTEXT has created. }
+ { wparam=0 }
+ { lparam=(*AnsiChar) buffer }
+ { result=0 }
+
+ { ************************************************************** }
+ { The following is still SRMM - specific. }
+ { I plan to modify it, so that other PlugIns can take advantage of e.g. preview-window.... }
+const
+ MTH_SHOW = 'Math/Show';
+ { shows the preview-window }
+ { wparam=0 }
+ { lparam=0 }
+ { result=0 }
+
+ MTH_HIDE = 'Math/Hide';
+ { hides the preview-window }
+ { wparam=0 }
+ { lparam=0 }
+ { result=0 }
+
+ MTH_RESIZE = 'Math/Resize';
+ { sets the size of the preview-window }
+ { wparam=0 }
+ { lparam=(*TMathWindowInfo) }
+ { result=0 }
+type
+ PTMathWindowInfo = ^TTMathWindowInfo;
+ TTMathWindowInfo = record
+ top : int;
+ left : int;
+ right : int;
+ bottom: int;
+ end;
+
+const
+ MTH_SETFORMULA = 'Math/SetFormula';
+ { sets the text that the preview-window should parse to display formulas found inside }
+ { wparam=0 }
+ { lparam=(*AnsiChar) text }
+ { result=0 }
+
+ MTH_Set_ToolboxEditHwnd = 'Math/SetTBhwnd';
+ { If this hwnd (of an edit-box) is set, MathModule can insert Formula-elements from the Math-Toolbox. }
+ { wparam=0 }
+ { lparam=handle }
+ {übergibt fenster-Handle des aktuellen Message-Dialogs }
+
+ MTH_Set_Srmm_HWND = 'Math/SetSrmmHWND';
+ { If MathModule knows the handle of a SRMM-based window, following features exist: }
+ { - preview window resizes Math-Srmm when it is being resized. }
+ { wparam=0 }
+ { lparam=handle }
+ { result=0 }
+ { todo: umbenennen in MTH_Set_ResizeWindowHandle, zusaetzlich MTH_Set_ToolboxEditHandle erstellen, dann keine SRMM-Abhaengigkeit mehr. }
+ { damit ResizeWindows selbst entscheiden koennen, was sie tun, kann man auch ein miranda-event "MTH_preview_resized" einrichten. }
+
+ MTH_GET_PREVIEW_HEIGHT = 'Math/getPreviewHeight';
+ { returns the height of the whole preview-window (including system-menu-bar) }
+ { consider this when maximizing a window to that preview-window is hooked on top or bottom }
+ { it returns the height no matter whether preview-window is visible or not }
+ { wparam=0 }
+ { lparam=0 }
+ { result=(int) height }
+
+ MTH_GET_PREVIEW_SHOWN = 'Math/getPreviewShown';
+ { returns 1 if preview window is visible }
+ { returns 0 if preview window is invisible }
+ { result=(int) shown }
+
+ MTH_SUBSTITUTE_DELIMITER = 'Math/SubstituteDelimiter';
+ { replaces Substitute given lparam-structure with internal Math-Delimiter }
+ { wparam=0 }
+ { lparam=(TMathSubstInfo) substInfo }
+ { result=0 }
+
+type
+ PTMathSubstInfo = ^TTMathSubstInfo;
+ TTMathSubstInfo = record
+ EditHandle : HWND;
+ Substitute : PAnsiChar;
+ end;
+{--------------------------------------------------- }
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_motd.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_motd.inc new file mode 100644 index 0000000000..3b986bf02e --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_motd.inc @@ -0,0 +1,75 @@ +{
+Copyright (C) 2005 Ricardo Pescuma Domenecci
+
+This is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this file; see the file license.txt. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_MOTD}
+{$DEFINE M_MOTD}
+
+//=== SERVICES ===
+
+{
+MOTD/GetMessage service
+Get a MOTD
+
+wparam = (MOTDMessage*)lpMOTDMessage
+lparam = 0
+returns: 0 on success, -1 on failure. On success, lpMOTDMessage is filled with the MOTD
+}
+type
+ PMOTDMessage = ^TMOTDMessage;
+ TMOTDMessage = record
+ cbSize :int; // sizeof(MOTDMessage)
+ pszMessage :PAnsiChar; // Buffer to store message
+ cbMessageSize:dword; // Size of message buffer (including '\0')
+ pszAuthor :PAnsiChar; // Buffer to store author
+ cbAuthorSize :dword; // Size of author buffer (including '\0')
+ end;
+const
+ MS_MOTD_GETMESSAGE = 'MOTD/GetMessage';
+
+{
+MOTD/AddMessage service
+Add a message to the MOTD list
+
+wparam = (MOTDMessage*)lpMOTDMessage
+lparam = 0
+returns: 0 on success, -1 on failure
+}
+ MS_MOTD_ADDMESSAGE = 'MOTD/AddMessage';
+
+{
+MOTD/ShowMessage service
+Show a popup with a MOTD
+
+wparam = 0
+lparam = 0
+returns: 0
+}
+ MS_MOTD_SHOWMESSAGE ='MOTD/ShowMessage';
+
+{
+MOTD/ShowAddMessage service
+Show a dialog to add a MOTD
+
+wparam = 0
+lparam = 0
+returns: 0
+}
+ MS_MOTD_SHOWADDMESSAGE = 'MOTD/ShowAddMessage';
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_nickhistory.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_nickhistory.inc new file mode 100644 index 0000000000..240fc73b29 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_nickhistory.inc @@ -0,0 +1,50 @@ +{
+Copyright (C) 2006 Ricardo Pescuma Domenecci
+
+This is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this file; see the file license.txt. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_NICKHISTORY}
+{$DEFINE M_NICKHISTORY}
+
+const
+ EVENTTYPE_NICKNAME_CHANGE = 9001;
+
+{
+Return TRUE is Nick History is enabled for this contact
+
+wParam: hContact
+lParam: ignored
+}
+ MS_NICKHISTORY_ENABLED = 'NickHistory/Enabled';
+
+{
+Enable Nick History for a contact
+
+wParam: hContact
+lParam: ignored
+}
+ MS_NICKHISTORY_ENABLE = 'NickHistory/Enable';
+
+{
+Disable Nick History for a contact
+
+wParam: hContact
+lParam: ignored
+}
+ MS_NICKHISTORY_DISABLE = 'NickHistory/Disable';
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_simpleaway.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_simpleaway.inc new file mode 100644 index 0000000000..16bf2328fb --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_simpleaway.inc @@ -0,0 +1,26 @@ +{$IFNDEF M_SIMPLEAWAY}
+{$DEFINE M_SIMPLEAWAY}
+
+const
+// lParam = (AnsiChar *)status message
+// wParam = new status, from statusmodes.h
+ MS_SA_SETSTATUSMODE = 'SimpleAway/SetStatusMode';
+ MS_AWAYSYS_SETSTATUSMODE = MS_SA_SETSTATUSMODE //for compatibility with some plugins
+
+//Internal use only
+ MS_SA_TTCHANGESTATUSMSG = 'SimpleAway/TTChangeStatusMessage';
+
+//wParam=new status, from statusmodes.h
+//lParam=protocol name, NULL if for all protocols (added in v0.3.1alpha)
+ MS_SA_CHANGESTATUSMSG = 'SimpleAway/ChangeStatusMessage'
+
+// wParam = 0
+// lParam = 0
+// allways returns 1
+ MS_SA_ISSARUNNING = 'SimpleAway/IsSARunning';
+
+// wParam = 0
+// lParam = 0
+ MS_SA_COPYAWAYMSG = 'SimpleAway/CopyAwayMsg';
+
+{$ENDIF}
\ No newline at end of file diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_smh.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_smh.inc new file mode 100644 index 0000000000..134b2075e8 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_smh.inc @@ -0,0 +1,50 @@ +{
+Copyright (C) 2006 Ricardo Pescuma Domenecci
+
+This is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this file; see the file license.txt. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_SMH}
+{$DEFINE M_SMH}
+
+const
+ EVENTTYPE_STATUSMESSAGE_CHANGE = 9002;
+
+{
+Return TRUE is Status Message History is enabled for this contact
+
+wParam: hContact
+lParam: ignored
+}
+ MS_SMH_ENABLED = 'SMH/Enabled';
+
+{
+Enable Status Message History for a contact
+
+wParam: hContact
+lParam: ignored
+}
+ MS_SMH_ENABLE = 'SMH/Enable';
+
+{
+Disable Status Message History for a contact
+
+wParam: hContact
+lParam: ignored
+}
+ MS_SMH_DISABLE = 'SMH/Disable';
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_smr.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_smr.inc new file mode 100644 index 0000000000..d8feacfc6a --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_smr.inc @@ -0,0 +1,59 @@ +{
+Copyright (C) 2005 Ricardo Pescuma Domenecci
+
+This is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this file; see the file license.txt. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_SMR}
+{$DEFINE M_SMR}
+
+const
+{
+Return TRUE is smr is enabled for this protocol
+If is enabled, status message is kept under CList\StatusMsg db key in user data
+
+wParam: protocol name
+lParam: ignored
+}
+ MS_SMR_ENABLED_FOR_PROTOCOL = 'SMR/MsgRetrievalEnabledForProtocol';
+
+{
+Return TRUE is smr is enabled for this contact and its protocol (smr can be
+disabled per user, if protocol is enabled)
+If is enabled, status message is kept under CList\StatusMsg db key in user data
+
+wParam: hContact
+lParam: ignored
+}
+ MS_SMR_ENABLED_FOR_CONTACT = 'SMR/MsgRetrievalEnabledForUser';
+
+{
+Enable status message retrieval for a contact
+
+wParam: hContact
+lParam: ignored
+}
+ MS_SMR_ENABLE_CONTACT = 'SMR/EnableContactMsgRetrieval';
+
+{
+Disable status message retrieval for a contact
+
+wParam: hContact
+lParam: ignored
+}
+ MS_SMR_DISABLE_CONTACT = 'SMR/DisableContactMsgRetrieval';
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_snapping_windows.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_snapping_windows.inc new file mode 100644 index 0000000000..e3c513482a --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_snapping_windows.inc @@ -0,0 +1,35 @@ +{$IFNDEF SNAPPING_WINDOWS}
+{$DEFINE SNAPPING_WINDOWS}
+
+type
+ PSnapWindowProc = ^TSnapWindowProc;
+ TSnapWindowProc = record
+ hWnd : THWND;
+ m_szMoveOffset : TSIZE;
+ wParam : WPARAM;
+ lParam : LPARAM;
+ Reserved1 : int;
+ Reserved2 : int;
+ Reserved3 : int;
+ end;
+
+const
+ MS_SNAPWINDOWPROC = 'Utils/SnapWindowProc';
+
+function CallSnappingWindowProc(hwnd:hwnd; nMessage:int;
+ wParam:WPARAM;lParam:LPARAM):int;// cdecl;
+const
+ SnapInfo:TSnapWindowProc=();
+begin
+ result:=0;
+ if (nMessage=WM_MOVING) or (nMessage=WM_NCLBUTTONDOWN) or
+ (nMessage=WM_SYSCOMMAND) or (nMessage=WM_SIZING) then
+ begin
+ SnapInfo.hWnd := hwnd;
+ SnapInfo.wParam := wParam;
+ SnapInfo.lParam := lParam;
+ CallService(MS_SNAPWINDOWPROC,WPARAM(@SnapInfo),nMessage);
+ if nMessage=WM_SIZING then result:=1;
+ end;
+end;
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_spamfilter.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_spamfilter.inc new file mode 100644 index 0000000000..54c4729a81 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_spamfilter.inc @@ -0,0 +1,751 @@ +{
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright © 2003-2004 Heiko Herkenrath
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_SPAMFILTER}
+{$DEFINE M_SPAMFILTER}
+
+const
+// Spam Filter Version: 2.5.2.1
+// See "spamcheck.c" in the sources for an example on how to use the spam checking services.
+
+// The functionality and the API of Spam Filter is quite complex
+// and not easy to describe or explain.
+// If you have any question or extension whishes please send me an e-mail:
+// hrathh at users.sourceforge.net
+
+// Notes:
+// * All services are fully thread-safe, you can call everything from any thread
+// (If there are problems with it it is a bug :-) )
+// * Unicode parameters can also be passed to the ANSI version of the plugin
+// and the other way round. The strings get converted as they are needed
+// using automatic two-way translation.
+// Unicode support was added in v2.5.0.0.
+
+// -------------------------------------------
+// -- Getting handles ------------------------
+// -------------------------------------------
+
+ MS_SPAMFILTER_GETHANDLE = 'SpamFilter/GetHandle';
+
+// Description:
+// -------------
+// Gets a specified icon/window handle.
+
+// Parameters:
+// -------------
+// wParam = (uint)uHandleType (see below);
+// lParam = 0
+
+// Possible values for wParam:
+ SFHT_HWND_PLUGIN_OPTIONS = 2; // HWND of the "Spam Filter" options dialog (if it is loaded; else NULL)
+ SFHT_HICON_SPAM = 3; // HICON of the spam icon (small): needs to be destroyed! (DestroyIcon())
+ // Added in v2.0.2.0:
+ SFHT_HICON_SPAM_LARGE = 4; // HICON of the spam icon (large): needs to be destroyed! (DestroyIcon())
+ SFHT_HICON_SPAM_LAYER = 5; // HICON of the spam layer icon (small): needs to be destroyed! (DestroyIcon())
+ // Icons are taken directly from resources, not skinned by user
+ // Added in v2.0.3.0:
+ SFHT_HWND_ADVERTISMENT_FILTER = 6; // HWND of the "Advertisment Filter" settings dialog (if it is opened; else NULL)
+ SFHT_HWND_ROBOT_FILTER = 7; // HWND of the "Robot Filter" settings dialog (if it is opened; else NULL)
+ SFHT_HWND_DISLIKEDMESSAGES_FILTER = 8; // HWND of the "Disliked Messages Filter" settings dialog (if it is opened; else NULL)
+ // Added in v2.5.0.0:
+ SFHT_HWND_SPAMDEFINITIONS_INFO = 9; // HWND of the "Spam Definitions" info dialog (if it is opened; else NULL)
+ SFHT_HWND_SPAMMERS_INFO = 10; // HWND of the Spammers info dialog (if it is opened; else NULL)
+
+ SFHT_BOOL_IS_UNICODE = 100; // No handle, returns TRUE if Spam Filter is installed as Unicode version, FALSE otherwise
+ // (You probably never need to call this since Spam Filter performs automatic two-way translation
+ // when a service is called)
+
+// Note: Icons are taken directly from resources, they are not skinned by user.
+
+
+// Return Values:
+// --------------
+// Returns the specified handle value: HINSTANCE, HWND, ICON
+//
+// Note:
+// If a handle is not available (or if it was removed) the function will
+// return NULL.
+// When you are using this service you need to check always for the
+// NULL return value.
+
+// -------------------------------------------
+// -- Activating/Deactivating the filters ----
+// -------------------------------------------
+
+ MS_SPAMFILTER_CHANGEFILTERACTIVATION = 'SpamFilter/ChangeFilterActivation';
+
+// Description:
+// -------------
+// Provides the possibility to enable or disable the spam filters.
+// Also updates the checkboxes in the spam filter options if the option dialog is opened.
+
+// Parameters:
+// -------------
+// wParam = (uint)uFilterType (For possible values see below)
+// lParam = (bool)bNewState (new activation state of filter)
+
+// Possible filter type values (uFilterType):
+ SFT_ADVERTISMENT_FILTER = 1;
+ SFT_DISLIKEDMESSAGES_FILTER = 2;
+ SFT_ROBOT_FILTER = 3;
+
+// Return Values:
+// --------------
+// Returns 0 on success, nonzero on error.
+
+
+// -------------------------------------------
+// -- Showing configure dialogs --------------
+// -------------------------------------------
+
+ MS_SPAMFILTER_SHOWFILTERDIALOG = 'SpamFilter/ShowFilterDialog';
+
+// Description:
+// -------------
+// Shows the configure dialog of the specified filter.
+
+// Parameters:
+// -------------
+// wParam = (HWND)hwndParent (Can be NULL)
+// lParam = (uint)uFilterType (For possible values see above)
+// -> since 2.0.2.0: If this is zero then the options dialog will be opened pointing to the Spam Filter options.
+// Note:
+// If hwndParent is not NULL the function will not return
+// until the configure dialog is closed.
+// If hwndParent is NULL the Miranda window will be used as parent
+
+// Since 2.0.2.0:
+ SFTEX_OPTIONS_PAGE = 0;
+
+// Since 2.5.0.0:
+// Combine the following flag with the lParam/uFilterType parameter
+// to show the corresponding Spam Definitions info dialog instead
+// of the settings dialog:
+ SFTEXF_SPAMDEFINITIONS_INFO = $2000;
+// Note: SFTEXF_SPAMDEFINITIONS_INFO can't be combined with SFT_ROBOT_FILTER
+
+// Combine the following flag with the lParam/uFilterType of 0 parameter
+// to show the Spammers dialog instead of the settings dialog:
+ SFTEXF_SPAMMERS_INFO = $4000;
+// Note: SFTEXF_SPAMMERS_INFO can't be combined with SFT_*
+
+
+
+// Return Values:
+// --------------
+// Returns 0 on success, nonzero on error.
+
+// Since v2.0.3.0:
+// If the specified settings window is already opened it will be
+// brought to front (reactivated) instead (returns success though).
+// This might be changed however in the future.
+
+// Changed behaviour in v2.0.3.0:
+// If hwndParent was not set then the function returned the handle to the new window.
+// Now the function returns 0 to indicate success instead.
+
+
+// -------------------------------------------
+// -- Adding message types -------------------
+// -------------------------------------------
+
+ MS_SPAMFILTER_REGISTERMESSAGETYPE = 'SpamFilter/MessageTypes/Register';
+
+// Description:
+// -------------
+// Adds a new message type which can be checked for spam.
+// Associated event: ME_SPAMFILTER_PREREGISTERMESSAGETYPE
+
+// Parameters:
+// -------------
+// wParam = 0
+// lParam = (MESSAGETYPEDESC*)mtd (see below)
+
+// Return Values:
+// --------------
+// Returns 0 on success, nonzero on error.
+
+
+// Already registered message types are:
+// (With pszSection set to the installed network protocol names, e.g. "ICQ")
+ SFMT_AUTHREQUEST = 'Auth';
+ SFMT_ADDED = 'Added'; // since v2.1.0.0
+ SFMT_MESSAGE = 'Msg';
+ SFMT_URL = 'URL';
+ SFMT_FILE = 'File';
+ SFMT_CONTACTS = 'Contacts';
+
+
+// MESSAGETYPEDESC structure:
+type
+ PMESSAGETYPEDESC = ^TMESSAGETYPEDESC;
+ TMESSAGETYPEDESC = record
+ cbSize :integer; // Set to sizeof(MESSAGETYPEDESC)
+ pszSection :PAnsiChar; // Section of message name for database
+ // e.g. protocol name (Can not be NULL)
+ SectionDescription:TChar; // Readable name of section e.g. protocol name (can be NULL)
+ // Ignored if section existed previously
+ hSectionIcon :THANDLE; // Icon to show for section e.g. protocol icon (can be NULL)
+ // Ignored if section existed previously
+ pszName :PAnsiChar; // Name to refer to message type when spam
+ // checking and in db (Can not be NULL)
+ Description :TChar; // Description for options dialog (can be NULL)
+ hIcon :THANDLE; // EITHER: icon handle representing the message
+ // type OR: one of mirandas skin constants with
+ // a negative sign, e.g (HICON)-SKINICON_EVENT_MESSAGE,
+ // same as for LoadSkinnedIcon() -> can be 0
+ // and can also be a normal icon handle (HICON)
+ bDefaultStatus :bool; // Whether checking for this type should be
+ // activated or not by default
+ dwFlags :dword; // Flags for the message type (for possible flags see below)
+ iSectionPosition :integer; // Approx position number for the section in the
+ // options list, lower numbers are nearer to the
+ // top (Can be 0 to be sorted alphabetically)
+ // Ignored if section existed previously (or
+ // if pszSection is NULL) Added in v2.1.1.0
+ iPosition :integer; // Approx position number for the item in the
+ // options list, lower numbers are nearer to the
+ // top (Can be 0 to be sorted alphabetically)
+ // Added in v2.1.1.0
+ end;
+
+const
+
+// Possible MESSAGETYPEDESC flags:
+ MTDF_DEFAULTDISABLED = $00000001; // Is disabled by default
+ MTDF_HIDDEN = $00000002; // Does not get shown on the options page
+// Since v2.5.0.0
+ MTDF_UNICODE = $00000004; // pszSectionDescription and pszDescription are Unicode strings
+
+
+// -------------------------------------------
+// -- Modify new added message type (Event) --
+// -------------------------------------------
+
+ ME_SPAMFILTER_PREREGISTERMESSAGETYPE = 'SpamFilter/MessageTypes/PreRegister';
+
+// Description:
+// -------------
+// Gets fired before a new message type is added to be checked for spam.
+//
+// This is meant for asking other plugins if the specified default data is ok.
+// Other plugins (especially protocols) can disable a message type if either sending spam
+// is not possible for those protocols or if spam checking would cause unwanted side-effects.
+
+// Warning: Most elements of the MESSAGETYPEDESC structure can also be NULL.
+// However, the structure was checked for errors before this events gets called.
+
+// Parameters:
+// -----------------
+// wParam = 0 (same wParam as used for MS_SPAMFILTER_REGISTERMESSAGETYPE)
+// lParam = (MESSAGETYPEDESC*)mtd (see above, contents can be modified)
+
+// Return Values:
+// -----------------
+// Returning 0 on this event will accept the message type to be added.
+// Returning 1 will prevent the the message type to be added.
+
+// Note: Works as it does now since v2.1.1.0
+
+
+// -------------------------------------------
+// -- Uninstalling a message type ------------
+// -------------------------------------------
+
+ MS_SPAMFILTER_REMOVEMESSAGETYPE = 'SpamFilter/RemoveMessageType';
+
+// Description:
+// -------------
+// Uninstalls a specifed message type. It removes the database setting related to the given message type.
+// Should only be used for uninstalling purposes (e.g in uninstall function of PluginUninstaller)
+
+// Parameters:
+// -------------
+// wParam = (AnsiChar*)pszMsgTypeName (Message type name; You need to use MS_SPAMFILTER_REGISTERMESSAGETYPE before)
+// lParam = (AnsiChar*)pszMsgTypeSection (The section of the message type string; You need to use MS_SPAMFILTER_REGISTERMESSAGETYPE before)
+
+// Return Values:
+// --------------
+// Returns 0 on success, nonzero on error..
+
+
+// -------------------------------------------
+// -- Message type activation ----------------
+// -------------------------------------------
+
+ MS_SPAMFILTER_ISMESSAGETYPEACTIVATED = 'SpamFilter/MessageTypes/IsActivated';
+
+// Description:
+// -------------
+// Returns if a specified message type is activated or not.
+
+// Parameters:
+// -------------
+// wParam = (AnsiChar*)pszMsgTypeName (Message type name; You need to use MS_SPAMFILTER_REGISTERMESSAGETYPE before)
+// lParam = (AnsiChar*)pszMsgTypeSection (The section of the message type string; You need to use MS_SPAMFILTER_REGISTERMESSAGETYPE before)
+
+// Return Values:
+// --------------
+// Returns TRUE if the message type is activated and FALSE otherwise.
+
+
+// -------------------------------------------
+// -- Reset AutoIgnore counters --------------
+// -------------------------------------------
+
+ MS_SPAMFILTER_RESETAUTOIGNORE = 'SpamFilter/AutoIgnore/Reset';
+
+// Description:
+// -------------
+// Resets the list in which the total number of spam sent by
+// each user is kept.
+// The list is necessary to determine when a particular user reached the
+// allowed spam messages limit.
+
+// Parameters:
+// -------------
+// wParam = (bool)bOnlyCount (if TRUE the service will only return the user count without doing reset)
+// lParam = 0
+
+// Return Values:
+// --------------
+// Returns 0 on success, nonzero on error.
+
+
+// -----------------------------------------
+// -- Spam Checking ------------------------
+// -----------------------------------------
+
+ MS_SPAMFILTER_ADVERTISMENTCHECK = 'SpamFilter/AdvertismentCheck';
+ MS_SPAMFILTER_DISLIKEDMESSAGESCHECK = 'SpamFilter/DislikedMessagesCheck';
+ MS_SPAMFILTER_ROBOTCHECK = 'SpamFilter/RobotCheck';
+
+// Description:
+// -------------
+// These services provide the possibility to check a specified text for contained spam.
+// The function checks for everything that is activated in the plugin's options.
+
+// Note: These functions work as they do now since v2.1.0.0
+
+// Parameters:
+// -------------
+// wParam = (SPAMCHECKDATA*)scd
+// lParam = 0
+
+// SPAMCHECKDATA structure:
+type
+ PSPAMCHECKDATA = ^TSPAMCHECKDATA;
+ TSPAMCHECKDATA = record
+ cbSize :integer; // sizeof(SPAMCHECKDATA)
+ pszMsgTypeSection:PAnsiChar; // The section of the message type string: You need
+ // to use MS_SPAMFILTER_REGISTERMESSAGETYPE before
+ pszMsgTypeName :PAnsiChar; // Description of the message: You need to use
+ // MS_SPAMFILTER_REGISTERMESSAGETYPE before
+ MsgText :TChar; // Pointer to the text of a message which is
+ // checked for spam. Can be NULL.
+ dwFlags :dword; // Flags for the spam checking. (For more details see below.)
+ case LongInt of
+ 0: (hContact: TMCONTACT); // Handle to the sending contact (use pszUserName
+ // instead if no hContact is available)
+ 1: (UserName: TChar); // Name of the user, e.g. nick (set SCDF_NO_CONTACT
+ // in the flags to use this parameter) -> should
+ // be as unique as possible
+ end;
+
+const
+// Possible flags in the SPAMCHECKDATA structure:
+ SCDF_NO_NOTIFY = $00000001; // Don't show a popup, play sound or log to file if the message is spam.
+ SCDF_NO_CANCEL = $00000002; // Do check even if user pressed control key to avoid the spam check manually
+ SCDF_NO_AUTOIGNORE = $00000004; // Do not use the AutoIgnore feature for this check
+ SCDF_NO_CONTACT = $00000008; // Use pszUserName instead of hContact of union
+// Since v2.5.0.0:
+ SCDF_UNICODE = $00000010; // Specify this flag if associated message text and/or user name is Unicode
+
+
+// Return Values:
+// --------------
+// Possible return flags:
+ SFF_MARKREAD = $00000010; // Flag
+ SFF_DELETE = $00000020; // Flag
+ SFF_IGNORE = $00000040; // Flag
+ SFF_SENDMSG_NOTIFY = $00000100; // Flag, Only MS_SPAMFILTER_DISLIKEDMESSAGESCHECK
+ SFF_SENDMSG_INSTRUCTION = $00000200; // Flag, Only MS_SPAMFILTER_ROBOTCHECK
+ SFF_SENDMSG_CONFIRMATION = $00000400; // Flag, Only MS_SPAMFILTER_ROBOTCHECK
+ SFF_TESTPASSED = $00000080; // Flag, Only MS_SPAMFILTER_ROBOTCHECK
+ SFF_ISSPAM = $00000002; // Flag
+ SFF_ISNORMAL = $00000001; // Flag
+// Since 2.5.2.0:
+ SFF_HIDE = $00001000; // Flag, Only MS_SPAMFILTER_ROBOTCHECK
+
+// -------------------------------------------
+// -- Getting additional Check Info ----------
+// -------------------------------------------
+
+ MS_SPAMFILTER_GETSPAMCHECKINFO = 'SpamFilter/GetSpamCheckInfo';
+
+// Description:
+// -------------
+// Gets data needed for the processing of spam mesages.
+
+// Parameters:
+// -------------
+// wParam = (dword)dwDataType (For possible values see below)
+// lParam = depends on wParam (see below)
+
+// Possible values for lParam:
+
+// TRUE/FALSE: if the specified filter is enabled
+ SFSCI_ACTIVATION_FILTER = 1; // lParam = uFilterType (For possible values see above)
+
+// Strings: Get the message texts specified by the user
+// ANSI
+ SFSCI_MSGTEXT_NOTIFYA = 2; // lParam = (SPAMCHECKDATA*)scd, scd->hContact (or scd->pszUserName) and scd->pszMsgText (and scd->cbSize) should be filled in.
+ SFSCI_MSGTEXT_INSTRUCTIONA = 3; // lParam: see SFSCI_MSGTEXT_NOTIFYA
+ SFSCI_MSGTEXT_CONFIRMATIONA = 4; // lParam: see SFSCI_MSGTEXT_NOTIFYA
+
+// Unicode (since v2.5.0.0)
+ SFSCI_MSGTEXT_NOTIFYW = 6; // lParam = (SPAMCHECKDATA*)scd, scd->hContact (or scd->pwszUserName) and scd->pwszMsgText (and scd->cbSize) should be filled in.
+ SFSCI_MSGTEXT_INSTRUCTIONW = 7; // lParam: see SFSCI_MSGTEXT_NOTIFYW
+ SFSCI_MSGTEXT_CONFIRMATIONW = 8; // lParam: see SFSCI_MSGTEXT_NOTIFYW
+
+// TRUE/FALSE: if the above message text should be added to history.
+ SFSCI_ADD_TO_HISTORY = 5; // lParam = SFSCI_MSGTEXT_NOTIFY(A/W), SFSCI_MSGTEXT_INSTRUCTION(A/W) or SFSCI_MSGTEXT_CONFIRMATION(A/W)
+
+// Since 2.5.2.0:
+// Counts of milliseconds to delay the above message texts sending.
+ SFSCI_DELAY_TIME_REPLY = 9; // lParam=0
+
+
+// Return Values:
+// --------------
+// SFSCI_ACTIVATION_FILTER -> (bool)TRUE/FALSE
+// SFSCI_DELAY_TIME_REPLY -> (bool)TRUE/FALSE
+
+// SFSCI_MSGTEXT_NOTIFYA -> (AnsiChar*) free with miranda_sys_free() of "m_system.h", (all %vars% in the text are already resolved)
+// SFSCI_MSGTEXT_INSTRUCTIONA -> see SFSCI_MSGTEXT_NOTIFYA
+// SFSCI_MSGTEXT_CONFIRMATIONA -> see SFSCI_MSGTEXT_NOTIFYA
+
+// SFSCI_MSGTEXT_NOTIFYW -> (WCHAR*) free with miranda_sys_free() of "m_system.h", (all %vars% in the text are already resolved)
+// SFSCI_MSGTEXT_INSTRUCTIONW -> see SFSCI_MSGTEXT_NOTIFYW
+// SFSCI_MSGTEXT_CONFIRMATIONW -> see SFSCI_MSGTEXT_NOTIFYW
+
+// SFSCI_ADD_TO_HISTORY -> (bool)TRUE/FALSE
+
+// returns NULL on error
+
+
+// -------------------------------------------
+// -- Confirm spam check (Event) -------------
+// -------------------------------------------
+
+ ME_SPAMFILTER_OKTOSPAMCHECK = 'SpamFilter/OkToSpamCheck';
+
+// Description:
+// -------------
+// Gets fired before the spam check for a message starts.
+
+// Parameters:
+// -----------------
+// wParam = (SPAMCHECKDATA*)scd (Pointer to SPAMCHECKDATA struct)
+// lParam = (uint)uFilterType (For possible values see above)
+
+// Return Values:
+// -----------------
+// Returning 0 on this event will accept spam checking for the message,
+// Returning 1 will prevent the spam check.
+
+
+// -------------------------------------------
+// -- Confirm spam detection (Event) ---------
+// -------------------------------------------
+
+ ME_SPAMFILTER_OKTOSPAMDETECTION = 'SpamFilter/OkToSpamDetection';
+
+// Description:
+// -------------
+// Gets fired after a spam message is detected.
+
+// Parameters:
+// -----------------
+// wParam = (SPAMCHECKDATA*)scd (Pointer to SPAMCHECKDATA struct)
+// lParam = (uint)uFilterType (For possible values see above)
+
+// Return Values:
+// -----------------
+// Returning 0 on this event will accept the spam detection
+// Returning 1 cause the message not to be seen as spam.
+
+// Note: If you only would like to get the final result hook
+// ME_SPAMFILTER_SPAMRECEIVED instead
+
+
+// -------------------------------------------
+// -- Spam message received (Event) ----------
+// -------------------------------------------
+
+ ME_SPAMFILTER_SPAMRECEIVED = 'SpamFilter/SpamReceived';
+
+// Description:
+// -------------
+// Gets fired when a message if recognized as spam.
+
+// Parameters:
+// -----------------
+// wParam = (SPAMCHECKDATA*)scd (Pointer to SPAMCHECKDATA struct)
+// lParam = (uint)uFilterType (For possible values see above)
+
+// Return Values:
+// -----------------
+// The return value should be 0.
+
+
+// -------------------------------------------
+// -- Spam Filter loaded (Event) -------------
+// -------------------------------------------
+
+ ME_SPAMFILTER_MODULELOADED = 'SpamFilter/ModuleLoaded';
+
+// Description:
+// -------------
+// Gets fired when a all parts of the "Spam Filter" were loaded and available
+// to other plugins.
+// Past this event all functionality of the plugin is fully available.
+// The event works quite similar as ME_SYSTEM_MODULESLOADED.
+// You can use ME_SYSTEM_MODULESLOADED in most cases instead. Please do so!
+
+// Parameters:
+// -----------------
+// wParam = 0
+// lParam = 0
+
+// Return Values:
+// -----------------
+// The return value should be 0.
+
+
+
+// -------------------------------------------
+// -- Helper: Duplicate SPAMCHECKDATA --------
+// -------------------------------------------
+
+ MS_SPAMFILTER_COPYSPAMCHECKDATA = 'SpamFilter/SpamCheckData/Copy';
+
+// Description:
+// -------------
+// Copys all contents of a SPAMCHECKDATA struct (especially strings) to another one
+// using Miranda's Memory Manager Interface (see m_system.h).
+// Use MS_SPAMFILTER_FREESPAMCHECKDATA to free the result when no longer needed.
+
+// Available since 2.5.2.0.
+
+// Parameters:
+// -------------
+// wParam = (SPAMCHECKDATA*)pscdTo
+// lParam = (SPAMCHECKDATA*)pscdFrom
+
+// Return Values:
+// --------------
+// Returns 0 on success, nonzero on error.
+
+
+
+// -------------------------------------------
+// -- Helper: Free SPAMCHECKDATA -------------
+// -------------------------------------------
+
+ MS_SPAMFILTER_FREESPAMCHECKDATA = 'SpamFilter/SpamCheckData/Free';
+
+// Description:
+// -------------
+// Frees the memory allocated by MS_SPAMFILTER_COPYSPAMCHECKDATA.
+// using Miranda's Memory Manager Interface (see m_system.h).
+
+// Available since 2.5.2.0.
+
+// Parameters:
+// -------------
+// wParam = (SPAMCHECKDATA*)pscd
+// lParam = 0
+
+// Return Values:
+// --------------
+// Returns 0 on success, nonzero on failure.
+
+
+
+// -------------------------------------------
+// -- Showing error messages -----------------
+// -------------------------------------------
+
+ MS_SPAMFILTER_SHOWERROR = 'SpamFilter/ShowError';
+
+// Description:
+// -------------
+// Shows a Miranda try balloon tip, popup or message box
+// with the specified error message.
+
+// Parameters:
+// -------------
+// wParam = (uint)uErrorType (For possible values see below)
+// lParam = 0
+
+// Possible values for wParam:
+ SFSE_CRITICAL_ERROR = 1; // Unspecified critical error occured related to spam checking.
+ // Only use this for situations that may never ever occur.
+ // Please do avoid this if possible.
+
+ SFSE_SEND_FAILED = 2; // Show this error when a sending of SFSCI_MSGTEXT_NOTIFY,
+ // SFSCI_MSGTEXT_INSTRUCTION, or SFSCI_MSGTEXT_CONFIRMATION failed
+
+// Return Values:
+// --------------
+// Returns 0 on success, nonzero on error.
+
+
+
+// -------------------------------------------
+// -- Set contact as spammer (Contact) -------
+// -------------------------------------------
+
+ MS_SPAMFILTER_CONTACT_SETASSPAMMER = 'SpamFilter/Contact/SetAsSpammer';
+
+// Description:
+// -------------
+// This service adds a specified user to the spammer list (fully ignored).
+
+// Note: works same as MS_SPAMFILTER_CONTACT_SHOWSETASSPAMMERDIALOG
+// but does not prompt the user.
+
+// Available since v2.5.0.0
+
+// Parameters:
+// -------------
+// wParam = (HANDLE)hContact (Handle to a contact in database. Can't be NULL.)
+// lParam = (dword)dwFlags (flags about what should be done, see below)
+
+// Available Flags:
+ SCASF_NO_NOTIFY = $00000001; // Prevents logging and playing of sounds
+ SCASF_USE_ROBOT_SOUND = $00000002; // play robot sound instead of advertisment sound (only if SCASF_NO_NOTIFY is not set)
+ SCASF_NO_REMOVE_HISTORY = $00000004; // history is marked read instead of fully removed
+ SCASF_NO_DENY_AUTHREQUESTS = $00000008; // do not deny pending auth requests
+
+// Return Values:
+// --------------
+// Returns 0 on success, nonzero on error.
+
+
+// -------------------------------------------
+// -- Show mark spammer dialog (Contact) -----
+// -------------------------------------------
+
+ MS_SPAMFILTER_CONTACT_SHOWSETASSPAMMERDIALOG = 'SpamFilter/Contact/ShowSetAsSpammerDialog';
+
+// Description:
+// -------------
+// This service adds a specified user to the spammer list.
+// Before it shows a dialog to let the user confirm the action.
+// For use for example as action for a button on the message dialog.
+
+// Note: This service performs the same tasks as MS_SPAMFILTER_SETCONTACTASSPAMMER
+// to execute the action the user chooses.
+
+// Available since v2.5.0.0
+
+// Parameters:
+// -------------
+// wParam = (HANDLE)hContact (Handle to a contact in database. Can't be NULL.)
+// lParam = (HWND)hwndParent (Handle to the parent window. Can be NULL.)
+
+// Return Values:
+// --------------
+// Returns FALSE if user clicked cancel on the dialog.
+// TRUE if the contact was handled as spammer.
+
+
+// Changed in v2.5.0.0:
+// The service MS_SPAMFILTER_SETSPAMMANUALLY has been deprecated.
+// New plugins should use MS_SPAMFILTER_CONTACT_SHOWSETASSPAMMERDIALOG instead.
+ MS_SPAMFILTER_SETSPAMMANUALLY = 'SpamFilter/SetSpamManually';
+
+
+// -------------------------------------------
+// -- Test if contact is spammer (Contact) ---
+// -------------------------------------------
+
+ MS_SPAMFILTER_CONTACT_ISSPAMMER = 'SpamFilter/Contact/IsSpammer';
+
+// Description:
+// -------------
+// This service tests if a specified contact is on the spammer list (fully ignored).
+
+// Available since v2.5.0.0
+
+// Parameters:
+// -------------
+// wParam = (HANDLE)hContact (Handle to a contact in database. Can't be NULL.)
+// lParam = 0
+
+// Return Values:
+// --------------
+// Returns TRUE when the contact is on the spammer list, FALSE otherwise.
+
+
+// -------------------------------------------
+// -- Unmarks a contact as spammer (Contact) -
+// -------------------------------------------
+
+ MS_SPAMFILTER_CONTACT_UNSETSPAMMER = 'SpamFilter/Contact/UnSetSpammer';
+
+// Description:
+// -------------
+// This service restores a spammer to be again a normal contact (unignored).
+
+// Available since v2.5.0.0
+
+// Parameters:
+// -------------
+// wParam = (HANDLE)hContact (Handle to a contact in database. Can't be NULL.)
+// lParam = 0
+
+// Return Values:
+// --------------
+// Returns 0 on success, nonzero on error.
+
+
+// -------------------------------------------
+// -- Spammer state changed (Event) ----------
+// -------------------------------------------
+
+ ME_SPAMFILTER_CONTACT_SPAMMERSTATECHANGED = 'SpamFilter/Contact/SpammerStateChanged';
+
+// Description:
+// -------------
+// Gets fired when a a contact gets marked as spammer or unmarked.
+
+// Parameters:
+// -----------------
+// wParam = (HANDLE)hContact
+// lParam = (bool)bIsSpammer (new state)
+
+// Return Values:
+// -----------------
+// The return value should be 0.
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_speak.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_speak.inc new file mode 100644 index 0000000000..7badc4e0a4 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_speak.inc @@ -0,0 +1,267 @@ +{
+Copyright (C) 2007 Ricardo Pescuma Domenecci
+
+This is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this file; see the file license.txt. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_SPEAK}
+{$DEFINE M_SPEAK}
+
+(*
+There is 2 ways of using the speak plugin:
+
+1. Older and simple way: just call
+ Speak_Say(hContact, _T("text to speak"))
+and the text will be spoken using contact settings. If hContact is NULL, it will use
+system settings.
+Previous versions only had an ascii version, so if you want to support then you need
+to call
+ Speak_SayA(hContact, "text to speak")
+
+
+2. Integrating with meSpeak GUI: for that you have first to register a speak type and
+then call the speak functions. In both case you have 2 options:
+
+2.1 Sending the full text: meSpeak GUI will only allow to enable/disable the type.
+To register call (in modules loaded):
+ Speak_Register("PluginName (DB key)", "name", "Prety name for GUI", "icon_xyz")
+And to speak call:
+ Speak_SayEx("name", hContact, _T("text to speak"))
+
+2.2 Using templates: you will not pass the text, but some variables. meSpeak handles
+the GUI to allow the user to create the text for those variables. These functions
+end with WT (with templates).
+To register call (in modules loaded):
+ AnsiChar *templates[] = { "Name\nDefault\n%var1%\tDescription 1\n%var2%\tDescription2\n%var3%\tDescription 3" };
+ Speak_RegisterWT("PluginName (DB key)", "name", "Prety name for GUI", "icon_xyz",
+ templates, 1);
+And to speak call:
+ TCHAR *variables[] = { _T("var1"), _T("Value 1"), _T("var2"), _T("Value 2"), _T("var3"), _T("Value 3") };
+ Speak_SayExWT("name", hContact, 0, variables, 3);
+*)
+
+const
+ MIID_SPEAK = '{1EF72725-6A83-483B-AA50-8953E359EEAD}';
+
+ {*
+ Speak a text
+
+ wParam: (HANDLE) hContact
+ lParam: (AnsiChar *) text
+ return: 0 on success
+ *}
+ MS_SPEAK_SAY_A = 'Speak/Say';
+
+ {*
+ Speak a unicode text
+
+ wParam: (HANDLE) hContact
+ lParam: (WCHAR *) text
+ return: 0 on success
+ *}
+ MS_SPEAK_SAY_W = 'Speak/SayW';
+
+type
+ PSPEAK_TYPE = ^TSPEAK_TYPE;
+ TSPEAK_TYPE = record
+ cbSize: integer;
+ module: PAnsiChar;
+ name: PAnsiChar; // Internal type name
+ description: PAnsiChar; // Will be translated
+ icon: PAnsiChar; // Name off icolib icon
+ // Aditional data if wants to use add to history services
+ templates: ^PAnsiChar; // Each entry is: "Name\nDefault\n%var%\tDescription\n%var%\tDescription\n%var%\tDescription"
+ numTemplates: integer;
+ end;
+
+const
+ {*
+ Register and speak type
+
+ wParam: (SPEAK_TYPE *) type
+ lParam: 0
+ return: 0 on success
+ *}
+ MS_SPEAK_REGISTER = 'Speak/Register';
+
+const
+ SPEAK_CHAR = 1;
+ SPEAK_WCHAR = 2;
+
+type
+ PSPEAK_ITEM = ^TSPEAK_ITEM;
+ TSPEAK_ITEM = record
+ cbSize: integer;
+ _type: PAnsiChar; // Internal type name
+ hContact: TMCONTACT;
+ flags: integer; // SPEAK_*
+ templateNum: integer; // -1 to use text
+ case boolean of
+ true: (text: PAnsiChar);
+ false: (
+ variables: pointer;
+ numVariables: integer;
+ );
+ end;
+
+const
+ {*
+ Speak a text
+
+ wParam: (SPEAK_ITEM *) Item
+ lParam: 0
+ return: 0 on success
+ *}
+ MS_SPEAK_SAYEX = 'Speak/SayEx';
+
+
+{$IFDEF I_AM_A_CONSTANT_THAT_IS_NEVER_DEFINED_BUT_ALLOWS_THE_CODE_BELOW_NOT_TO_BE_COMMENTED}
+// Helper functions
+
+static int Speak_SayA(HANDLE hContact, const AnsiChar *text)
+{
+ return CallService(MS_SPEAK_SAY_A, (WPARAM) hContact, (LPARAM) text);
+}
+
+static int Speak_SayW(HANDLE hContact, const WCHAR *text)
+{
+ return CallService(MS_SPEAK_SAY_W, (WPARAM) hContact, (LPARAM) text);
+}
+
+static int Speak_Register(AnsiChar *module, AnsiChar *name, AnsiChar *description, AnsiChar *icon)
+{
+ SPEAK_TYPE type;
+
+ if (!ServiceExists(MS_SPEAK_REGISTER))
+ return -1;
+
+ type.cbSize = sizeof(type);
+ type.module = module;
+ type.name = name;
+ type.description = description;
+ type.icon = icon;
+ type.templates = NULL;
+ type.numTemplates = 0;
+
+ return CallService(MS_SPEAK_REGISTER, (WPARAM) &type, 0);
+}
+
+static int Speak_RegisterWT(const AnsiChar *module, const AnsiChar *name, const AnsiChar *description,
+ const AnsiChar *icon, AnsiChar **templates, int numTemplates)
+{
+ SPEAK_TYPE type;
+
+ if (!ServiceExists(MS_SPEAK_REGISTER))
+ return -1;
+
+ type.cbSize = sizeof(type);
+ type.module = module;
+ type.name = name;
+ type.description = description;
+ type.icon = icon;
+ type.templates = templates;
+ type.numTemplates = numTemplates;
+
+ return CallService(MS_SPEAK_REGISTER, (WPARAM) &type, 0);
+}
+
+static int Speak_SayExA(AnsiChar *type, HANDLE hContact, const AnsiChar *text)
+{
+ SPEAK_ITEM item;
+
+ if (!ServiceExists(MS_SPEAK_SAYEX))
+ // Try old service
+ return Speak_SayA(hContact, text);
+
+ item.cbSize = sizeof(item);
+ item.flags = SPEAK_CHAR;
+ item.type = type;
+ item.hContact = hContact;
+ item.templateNum = -1;
+ item.text = text;
+
+ return CallService(MS_SPEAK_SAYEX, (WPARAM) &item, 0);
+}
+
+static int Speak_SayExW(AnsiChar *type, HANDLE hContact, const WCHAR *text)
+{
+ SPEAK_ITEM item;
+
+ if (!ServiceExists(MS_SPEAK_SAYEX))
+ // Try old service
+ return Speak_SayW(hContact, text);
+
+ item.cbSize = sizeof(item);
+ item.flags = SPEAK_WCHAR;
+ item.type = type;
+ item.hContact = hContact;
+ item.templateNum = -1;
+ item.text = text;
+
+ return CallService(MS_SPEAK_SAYEX, (WPARAM) &item, 0);
+}
+
+static int Speak_SayExWTA(AnsiChar *type, HANDLE hContact, int templateNum, AnsiChar **variables, int numVariables)
+{
+ SPEAK_ITEM item;
+
+ if (!ServiceExists(MS_SPEAK_SAYEX))
+ return -1;
+
+ item.cbSize = sizeof(item);
+ item.flags = SPEAK_CHAR;
+ item.type = type;
+ item.hContact = hContact;
+ item.templateNum = templateNum;
+ item.variables = variables;
+ item.numVariables = numVariables;
+
+ return CallService(MS_SPEAK_SAYEX, (WPARAM) &item, 0);
+}
+
+static int Speak_SayExWTW(AnsiChar *type, HANDLE hContact, int templateNum, WCHAR **variables, int numVariables)
+{
+ SPEAK_ITEM item;
+
+ if (!ServiceExists(MS_SPEAK_SAYEX))
+ return -1;
+
+ item.cbSize = sizeof(item);
+ item.flags = SPEAK_WCHAR;
+ item.type = type;
+ item.hContact = hContact;
+ item.templateNum = templateNum;
+ item.variables = variables;
+ item.numVariables = numVariables;
+
+ return CallService(MS_SPEAK_SAYEX, (WPARAM) &item, 0);
+}
+
+
+#ifdef UNICODE
+# define MS_SPEAK_SAY MS_SPEAK_SAY_W
+# define Speak_Say Speak_SayW
+# define Speak_SayEx Speak_SayExW
+# define Speak_SayExWT Speak_SayExWTW
+#else
+# define MS_SPEAK_SAY MS_SPEAK_SAY_A
+# define Speak_Say Speak_SayA
+# define Speak_SayEx Speak_SayExA
+# define Speak_SayExWT Speak_SayExWTA
+#endif
+
+{$ENDIF}
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_voice.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_voice.inc new file mode 100644 index 0000000000..5e97094e34 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_voice.inc @@ -0,0 +1,156 @@ +{
+Copyright (C) 2006-2009 Ricardo Pescuma Domenecci
+
+This is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this file; see the file license.txt. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF __M_VOICE}
+{$DEFINE __M_VOICE}
+
+const
+ EVENTTYPE_VOICE_CALL = 8739;
+
+ VOICE_CAPS_VOICE = 1 shl 0; // Voice is supported for this protocol. You need to set this one.
+ VOICE_CAPS_CALL_CONTACT = 1 shl 1; // Set if a call can be made to a hContact (PS_VOICE_CALL_CONTACT_VALID is used to validate the string)
+ VOICE_CAPS_CALL_STRING = 1 shl 3; // Set if a call can be made to some string (PS_VOICE_CALL_STRING_VALID is used to validate the string)
+{
+ Request to the protocol capabilities relative to voice.
+
+ wParam: 0
+ lParam: 0
+ return: VOICE_CAPS_*
+}
+ PS_VOICE_CAPS = '/Voice/Caps';
+
+ VOICE_SECURE = $00000001;
+ VOICE_UNICODE = $80000000;
+
+ VOICE_STATE_TALKING = 0;
+ VOICE_STATE_RINGING = 1;
+ VOICE_STATE_CALLING = 2;
+ VOICE_STATE_ON_HOLD = 3;
+ VOICE_STATE_ENDED = 4;
+ VOICE_STATE_BUSY = 5;
+
+type
+ TVOICE_CALL = record
+ cbSize :int; // Struct size
+ moduleName:PAnsiChar; // The name of the protocol module (the same as VOICE_MODULE.name or the protocol szModule)
+ id :PAnsiChar; // Protocol especific ID for this call
+ flags :int; // VOICE_UNICODE to say the string is unicode or 0.
+ // VOICE_SECURE to say this is a encrypted call
+ hContact :TMCONTACT; // Contact associated with the call (can be NULL)
+ szNumber :TChar; // Number to call (can be NULL)
+ // Or the contact or the number must be != NULL
+ // If both are != NULL the call will be made to the number
+ // and will be associated with the contact
+ // This fields are only needed in first notification for a call id
+ szName :TChar; // Name of the caller. This makes sense only on incoming calls,
+ // where no contact is associated and the caller has a name and a number.
+ state :int; // VOICE_STATE_*
+ end;
+
+const
+{
+Notifies that a voice call changed state
+
+wParam: const VOICE_CALL *
+lParam: ignored
+return: 0 on success
+}
+ PE_VOICE_CALL_STATE = '/Voice/State';
+
+{
+Request to the protocol a make voice call
+
+wParam: (HANDLE) hContact
+lParam: (const TCHAR *) number
+return: 0 on success
+Or the contact or the number must be != NULL. If both are != NULL the call will be
+made to the number and will be associated with the contact.
+}
+ PS_VOICE_CALL = '/Voice/Call';
+
+{
+Service called to make the protocol answer a call or restore a hold call.
+It is an async call. If the call was answered, the PE_VOICE_CALL_STATE
+notification will be fired.
+
+wParam: (const char *) id
+lParam: ignored
+return: 0 on success
+}
+ PS_VOICE_ANSWERCALL = '/Voice/AnswerCall';
+
+{
+Service called to make the protocol answer a call. This can be called if the
+call is ringing or has started. If called any other time it should be ignored.
+It is an async call. If the call was droped, the PE_VOICE_CALL_STATE
+notification will be fired.
+
+wParam: (const char *) id
+lParam: ignored
+return: 0 on success
+}
+ PS_VOICE_DROPCALL = '/Voice/DropCall';
+
+{
+Service called to make the protocol hold a call. This means that the call should not
+be droped, but it should be muted and put in a hold, to allow other call to be answered.
+If the protocol can't hold a cal, it should be droped.
+
+This can be called if the call has started. If called any other time it should be ignored.
+It is an async call. If the call was droped, the PE_VOICE_CALL_STATE
+notification will be fired.
+
+wParam: (const char *) id
+lParam: ignored
+return: 0 on success
+}
+ PS_VOICE_HOLDCALL = '/Voice/HoldCall';
+
+{
+Send a DTMF (one digit text) to a talking call.
+
+wParam: (const char *) id
+lParam: (TCHAR) dtmf
+return: 0 on success
+}
+ PS_VOICE_SEND_DTMF = '/Voice/SendDTMF';
+
+{
+Used if protocol support VOICE_CALL_STRING. The call string is passed as
+wParam and the proto should validate it. If this service does not exist all numbers can be called.
+
+wParam: (const TCHAR *) call string
+lParam: ignored
+return: 0 if wrong, 1 if correct
+}
+ PS_VOICE_CALL_STRING_VALID = '/Voice/CallStringValid';
+
+{
+Used if protocol support VOICE_CALL_CONTACT.
+The hContact is passed as wParam and the proto should tell if this contact can be
+called. If this service does not exist all contacts can be called (or, if it is a protocol,
+all contacts from the protocol can be called).
+
+wParam: (HANDLE) hContact
+lParam: (bool) TRUE if it is a test for 'can call now?', FALSE if is a test for 'will be possible to call someday?'
+return: 0 if can't be called, 1 if can
+}
+ PS_VOICE_CALL_CONTACT_VALID = '/Voice/CallContactValid';
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_voiceservice.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_voiceservice.inc new file mode 100644 index 0000000000..ab5872d8d3 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_voiceservice.inc @@ -0,0 +1,87 @@ +{
+Copyright (C) 2007 Ricardo Pescuma Domenecci
+
+This is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this file; see the file license.txt. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_VOICESERVICE}
+{$DEFINE M_VOICESERVICE}
+
+const
+ MIID_VOICESERVICE:MUUID='{7D64437-EF2E-4F60-BB2D-3C518FE24D63};
+
+{
+This services are a mirror of the services/notifications in m_voice.h,
+with the difference that that ones are to be used by protocols, and this ones
+are to be used by plugins that can make calls to contacts in multiple protocols.
+
+To get the devices for input/output and some options, query the db directly:
+ VoiceService/EchoCancelation byte default: TRUE
+ VoiceService/MicBoost byte default: TRUE
+ VoiceService/Input TString default: windows default
+ VoiceService/Output TString default: windows default
+}
+
+type
+ TVOICE_MODULE = record
+ cbSize :int; // sizeof(VOICE_MODULE)
+ description:TChar; // The description of the voice provider. This is the name that
+ // will be shown to the user
+ name :PAnsiChar; // The internal name of the voice provider. All PS_* serivces
+ // defined in m_voide.h need to be created based in this name.
+ // For example, PS_VOICE_CALL (/Voice/Call) need to be created
+ // as <name>/Voice/Call
+ icon :PAnsiChar; // Icon to identify provider (from icolib)
+ flags :int; // or of VOICE_CAPS_*. You don't need to send VOICE_CAPS_VOICE.
+ end;
+
+{
+Register a new plugin that can make/receive voice calls (a voice provider).
+
+wParam: const VOICE_MODULE *
+lParam: ignored
+return: 0 on success
+}
+ MS_VOICESERVICE_REGISTER:PAnsiChar = 'VoiceService/Register';
+
+{
+Unregister a plugin that can make/receive voice calls (a voice provider).
+
+wParam: (const char *) Provider name
+lParam: ignored
+return: 0 on success
+}
+ MS_VOICESERVICE_UNREGISTER:PAnsiChar = 'VoiceService/Unregister';
+
+{
+Request a voice call to hContact.
+
+wParam: (HANDLE) hContact
+lParam: ignored
+return: the number of option calls for a contact. If > 0, it can be called
+}
+ MS_VOICESERVICE_CAN_CALL:PAnsiChar = 'VoiceService/CanCall';
+
+{
+Request a voice call to hContact.
+
+wParam: (HANDLE) hContact
+lParam: (char *) Voice provider or NULL to use any provider avaiable
+return: 0 on success
+}
+ MS_VOICESERVICE_CALL:PAnsiChar = 'VoiceService/Call';
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_w7ui.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_w7ui.inc new file mode 100644 index 0000000000..3841319ac7 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_w7ui.inc @@ -0,0 +1,84 @@ +{$IFNDEF M_W7UI}
+{$DEFINE M_W7UI}
+
+const
+ MIS_ICOLIB = 0;
+ MIS_GENERAL = 1;
+ MIS_PROTOCOL = 2;
+
+type
+ PMIRANDAJUMPLISTITEM = ^TMIRANDAJUMPLISTITEM;
+ TMIRANDAJUMPLISTITEM = record
+ iconSource:int;
+ iconName :pAnsiChar;
+ iconIdx :int;
+ szTitle :pWideChar;
+ szPrefix :pWideChar;
+ szArgument:pWideChar;
+ end;
+
+const
+// Force jumplist rebuild
+ MS_JUMPLIST_REBUILD:pAnsiChar = 'w7/JumpList/Rebuild';
+
+// ---
+ ME_JUMPLIST_BUILDCATEGORIES:pAnsiChar = 'w7/JumpList/BuildCategories';
+
+// lParam = (WCHAR *)category name
+ ME_JUMPLIST_BUILDITEMS:pAnsiChar = 'w7/JumpList/BuildItems';
+
+// lParam = (WCHAR *)category name
+ MS_JUMPLIST_ADDCATEGORY:pAnsiChar = 'w7/JumpList/AddCategory';
+
+// lParam = (MIRANDAJUMPLISTITEM *)item
+ MS_JUMPLIST_ADDITEM:pAnsiChar = 'w7/JumpList/AddItem';
+
+// wParam = prefix
+// lParam = argument
+ ME_JUMPLIST_PROCESS:pAnsiChar = 'w7/JumpList/Process';
+
+procedure MJumpList_AddCategory(name:pWideChar);
+begin
+ CallService(MS_JUMPLIST_ADDCATEGORY, 0, LPARAM(name));
+end;
+
+procedure MJumpList_AddItem(mir_icon:pAnsiChar; title, prefix, argument:pWideChar); overload;
+var
+ item:TMIRANDAJUMPLISTITEM;
+begin
+ item.iconSource:=MIS_ICOLIB;
+ item.iconName :=mir_icon;
+ item.iconIdx :=0;
+ item.szTitle :=title;
+ item.szPrefix :=prefix;
+ item.szArgument:=argument;
+ CallService(MS_JUMPLIST_ADDITEM, 0, LPARAM(@item));
+end;
+
+procedure MJumpList_AddItem(skinicon:int; title, prefix, argument:pWideChar); overload;
+var
+ item:TMIRANDAJUMPLISTITEM;
+begin
+ item.iconSource:=MIS_GENERAL;
+ item.iconName :=0;
+ item.iconIdx :=skinicon;
+ item.szTitle :=title;
+ item.szPrefix :=prefix;
+ item.szArgument:=argument;
+ CallService(MS_JUMPLIST_ADDITEM, 0, LPARAM(@item));
+end;
+
+procedure MJumpList_AddItem(proto:pansiChar; skinicon:int; title, prefix, argument:pWideChar); overload;
+var
+ item:TMIRANDAJUMPLISTITEM;
+begin
+ item.iconSource:=MIS_PROTOCOL;
+ item.iconName :=proto;
+ item.iconIdx :=skinicon;
+ item.szTitle :=title;
+ item.szPrefix :=prefix;
+ item.szArgument:=argument;
+ CallService(MS_JUMPLIST_ADDITEM, 0, LPARAM(@item));
+end;
+
+{$ENDIF}
diff --git a/plugins/!Deprecated/ExternalAPI/delphi/m_webcam.inc b/plugins/!Deprecated/ExternalAPI/delphi/m_webcam.inc new file mode 100644 index 0000000000..592e28a479 --- /dev/null +++ b/plugins/!Deprecated/ExternalAPI/delphi/m_webcam.inc @@ -0,0 +1,142 @@ +{
+ WebCam Video plugin by Sergei Polishchuk, SoftCab Inc
+ http://www.softcab.com
+ pserge@softcab.com
+}
+
+{$IFNDEF M_WEBCAM}
+{$DEFINE M_WEBCAM}
+
+const
+ MS_WEBCAM_OPEN = 'WebCam/Open';
+{
+ This opens webcamera
+ wParam, and lParam must be zero.
+ Returns HANDLE to web camera.
+ For Example:
+ HANDLE hWebcamera = CallService(MS_WEBCAM_OPEN, 0, 0);
+}
+
+ MS_WEBCAM_ISREADY = 'WebCam/IsReady';
+{
+ This zero if camera is ready for use, and non-zero if camera is still initializing.
+ It's useful to user this function after asynchronous opening of camera
+ wParam must be zero.
+ lParam = (LPARAM)(HANDLE)hCamera - camera handle
+ For Example:
+ HANDLE hWebcamera = CallService(MS_WEBCAM_ISREADY, 0, 0);
+}
+
+ MS_WEBCAM_CLOSE = 'WebCam/Close';
+{
+ This will close web camera.
+ wParam must be zero
+ lParam = (LPARAM)(HANDLE)hWebcamera - a handle returned by MS_WEBCAM_OPEN
+ Return value is undefined.
+ For Example:
+ CallService(MS_WEBCAM_CLOSE, 0, (LPARAM)hWebcamera);
+}
+
+ MS_WEBCAM_SHOWWND = 'WebCam/Show';
+{
+ This will show or hide web camera window
+ wParam = 1 to show window, or zero to hide one
+ lParam = (LPARAM)(HANDLE)hWebcamera - handle to camera
+ Return value is undefined.
+ For Example, this will show the window:
+ CallService(MS_WEBCAM_SHOWWND, 1, (LPARAM)hWebcamera);
+}
+
+ MS_WEBCAM_FREE = 'WebCam/Free';
+{
+ This will free WEBCAM_QUERY fields.
+ wParam = sizeof(WEBCAM_QUERY)
+ lParam = (LPARAM)(WEBCAM_QUERY*)&Query
+ Return value is undefined
+ For Example:
+ CallService(MS_WEBCAM_FREE, sizeof(Query), (LPARAM)&Query);
+}
+
+ MS_WEBCAM_QUERY = 'WebCam/Query';
+ WANT_PICTURE = pointer(-1);
+{
+ This will query web camera for data.
+ wParam = sizeof(WEBCAM_QUERY)
+ lParam = (LPARAM)(WEBCAM_QUERY*)&Query
+ Returns zero in case of success, or non-zero in case of any error
+ Before queryng camera, you need to setup some WEBCAM_QUERY structure fields.
+}
+
+(*
+WEBCAM_QUERY Query;
+memset(&Query, 0, sizeof(Query));
+Query.hCamera = hWebcamera;
+Query.Jpeg = WANT_PICTURE; // we want to get .JPG image
+Query.Bitmap = NULL; // we do not need .BMP image
+int ret = CallService(MS_WEBCAM_QUERY, sizeof(Query), (LPARAM)&Query);
+if(!ret)
+{ if(Query.Jpeg != NULL)
+ { // do something with JPG picture. For example, you may save it to .JPG file.
+ }
+ // now let's release the memory
+ CallService(MS_WEBCAM_FREE, sizeof(Query), (LPARAM)&Query);
+}
+*)
+
+ MS_WEBCAM_SCREENSHOT = 'WebCam/ScreenShot';
+{
+ This will return window screenshot
+ wParam = sizeof(WEBCAM_QUERY)
+ lParam = (LPARAM)(WEBCAM_QUERY*)&Query
+ Returns zero in case of success, or non-zero in case of any error
+ WEBCAMBUF->hCamera specifies window handle.
+ It's not required to open webcamera in order to run this service function.
+}
+
+(*
+
+WEBCAM_QUERY Query;
+memset(&Query, 0, sizeof(Query));
+Query.hCamera = (HANDLE)GetDesktopWindow(); // getting whole desktop picture.
+Query.Jpeg = WANT_PICTURE; // we want to get .JPG image
+Query.Bitmap = NULL; // we do not need .BMP image
+int ret = CallService(MS_WEBCAM_SCREENSHOT, sizeof(Query), (LPARAM)&Query);
+if(!ret)
+{ if(Query.Jpeg != NULL)
+ { // do something with JPG picture. For example, you may save it to .JPG file.
+ }
+ // now let's release the memory
+ CallService(MS_WEBCAM_FREE, sizeof(Query), (LPARAM)&Query);
+}
+
+*)
+
+ ME_WEBCAM_SNAPSHOTRECEIVED = 'WebCam/SnapshotRecv';
+{
+ This event will be fired right after receiving snapshot from remote contact.
+ wParam=(WPARAM)(HANDLE)hContact - a contact handle
+ lParam=(LPARAM)(WEBCAMBUF*)buffer - a buffer that contains JPEG image
+ IMPORTANT: you should not modify the buffer. It's read-only.
+}
+
+type
+ ptag_WEBCAMBUF = ^tag_WEBCAMBUF;
+ tag_WEBCAMBUF = record
+ Size:dword; // size of Data buffer in bytes
+ Data:array [0..0] of byte;
+ end;
+ PWEBCAMBUF = ^WEBCAMBUF;
+ WEBCAMBUF = tag_WEBCAMBUF;
+
+type
+ ptag_WEBCAM_QUERY = ^tag_WEBCAM_QUERY;
+ tag_WEBCAM_QUERY = record
+ hCamera:THANDLE; // [in] HANDLE to web camera
+ cx,cy :word; // [out] camera picture size
+ Jpeg :PWEBCAMBUF; // [in,out] points to .JPG file content in memory
+ Bitmap :PWEBCAMBUF; // [in,out] points to .BMP file content in memory
+ end;
+ PWEBCAM_QUERY = ^WEBCAM_QUERY;
+ WEBCAM_QUERY = tag_WEBCAM_QUERY;
+
+{$ENDIF}
|