diff options
| -rw-r--r-- | include/delphi/FreeImage.pas (renamed from plugins/Pascal_Headers/FreeImage.pas) | 0 | ||||
| -rw-r--r-- | include/delphi/README.txt | 92 | ||||
| -rw-r--r-- | include/delphi/interfaces.inc (renamed from plugins/Pascal_Headers/interfaces.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_acc.inc (renamed from plugins/Pascal_Headers/m_acc.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_addcontact.inc | 43 | ||||
| -rw-r--r-- | include/delphi/m_api.pas | 302 | ||||
| -rw-r--r-- | include/delphi/m_avatars.inc (renamed from plugins/Pascal_Headers/m_avatars.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_awaymsg.inc | 34 | ||||
| -rw-r--r-- | include/delphi/m_button.inc (renamed from plugins/Pascal_Headers/m_button.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_chat.inc (renamed from plugins/Pascal_Headers/m_chat.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_clc.inc | 524 | ||||
| -rw-r--r-- | include/delphi/m_clist.inc | 1308 | ||||
| -rw-r--r-- | include/delphi/m_clistint.inc (renamed from plugins/Pascal_Headers/m_clistint.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_clui.inc | 404 | ||||
| -rw-r--r-- | include/delphi/m_cluiframes.inc (renamed from plugins/Pascal_Headers/m_cluiframes.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_contacts.inc | 124 | ||||
| -rw-r--r-- | include/delphi/m_core.inc (renamed from plugins/Pascal_Headers/m_core.inc) | 16 | ||||
| -rw-r--r-- | include/delphi/m_crypto.inc (renamed from plugins/Pascal_Headers/m_crypto.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_database.inc | 1244 | ||||
| -rw-r--r-- | include/delphi/m_dbeditor.inc (renamed from plugins/Pascal_Headers/m_dbeditor.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_descbutton.inc (renamed from plugins/Pascal_Headers/m_descbutton.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_email.inc | 24 | ||||
| -rw-r--r-- | include/delphi/m_errors.inc (renamed from plugins/Pascal_Headers/m_errors.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_extraicons.inc (renamed from plugins/Pascal_Headers/m_extraicons.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_file.inc | 79 | ||||
| -rw-r--r-- | include/delphi/m_findadd.inc | 22 | ||||
| -rw-r--r-- | include/delphi/m_fingerprint.inc (renamed from plugins/Pascal_Headers/m_fingerprint.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_fontservice.inc (renamed from plugins/Pascal_Headers/m_fontservice.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_genmenu.inc (renamed from plugins/Pascal_Headers/m_genmenu.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_globaldefs.pas | 97 | ||||
| -rw-r--r-- | include/delphi/m_help.inc (renamed from plugins/Pascal_Headers/m_help.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_helpers.inc | 1091 | ||||
| -rw-r--r-- | include/delphi/m_history.inc | 20 | ||||
| -rw-r--r-- | include/delphi/m_hotkeys.inc (renamed from plugins/Pascal_Headers/m_hotkeys.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_icolib.inc (renamed from plugins/Pascal_Headers/m_icolib.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_iconheader.inc (renamed from plugins/Pascal_Headers/m_iconheader.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_icq.inc | 510 | ||||
| -rw-r--r-- | include/delphi/m_idle.inc (renamed from plugins/Pascal_Headers/m_idle.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_ignore.inc | 87 | ||||
| -rw-r--r-- | include/delphi/m_imgsrvc.inc (renamed from plugins/Pascal_Headers/m_imgsrvc.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_json.inc (renamed from plugins/Pascal_Headers/m_json.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_langpack.inc | 139 | ||||
| -rw-r--r-- | include/delphi/m_message.inc | 235 | ||||
| -rw-r--r-- | include/delphi/m_metacontacts.inc (renamed from plugins/Pascal_Headers/m_metacontacts.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_modernopt.inc (renamed from plugins/Pascal_Headers/m_modernopt.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_msg_buttonsbar.inc (renamed from plugins/Pascal_Headers/m_msg_buttonsbar.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_netlib.inc | 1555 | ||||
| -rw-r--r-- | include/delphi/m_newawaysys.inc (renamed from plugins/Pascal_Headers/m_newawaysys.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_options.inc | 212 | ||||
| -rw-r--r-- | include/delphi/m_plugins.inc | 62 | ||||
| -rw-r--r-- | include/delphi/m_popup.inc | 644 | ||||
| -rw-r--r-- | include/delphi/m_proto_listeningto.inc (renamed from plugins/Pascal_Headers/m_proto_listeningto.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_protocols.inc | 574 | ||||
| -rw-r--r-- | include/delphi/m_protoint.inc (renamed from plugins/Pascal_Headers/m_protoint.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_protomod.inc | 168 | ||||
| -rw-r--r-- | include/delphi/m_protosvc.inc | 1639 | ||||
| -rw-r--r-- | include/delphi/m_skin.inc | 238 | ||||
| -rw-r--r-- | include/delphi/m_smileyadd.inc (renamed from plugins/Pascal_Headers/m_smileyadd.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_ssl.inc (renamed from plugins/Pascal_Headers/m_ssl.inc) | 3 | ||||
| -rw-r--r-- | include/delphi/m_system.inc | 364 | ||||
| -rw-r--r-- | include/delphi/m_tabsrmm.inc (renamed from plugins/Pascal_Headers/m_tabsrmm.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_timezones.inc (renamed from plugins/Pascal_Headers/m_timezones.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_tipper.inc (renamed from plugins/Pascal_Headers/m_tipper.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_toolbar.inc (renamed from plugins/Pascal_Headers/m_toolbar.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_toptoolbar.inc (renamed from plugins/Pascal_Headers/m_toptoolbar.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_updater.inc (renamed from plugins/Pascal_Headers/m_updater.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_url.inc | 23 | ||||
| -rw-r--r-- | include/delphi/m_userinfo.inc | 108 | ||||
| -rw-r--r-- | include/delphi/m_userinfoex.inc (renamed from plugins/Pascal_Headers/m_userinfoex.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_utils.inc | 646 | ||||
| -rw-r--r-- | include/delphi/m_variables.inc (renamed from plugins/Pascal_Headers/m_variables.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/m_xml.inc (renamed from plugins/Pascal_Headers/m_xml.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/newpluginapi.inc | 94 | ||||
| -rw-r--r-- | include/delphi/reserve/imgdecoder.pas (renamed from plugins/Pascal_Headers/reserve/imgdecoder.pas) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_DataAsMessage.inc (renamed from plugins/Pascal_Headers/reserve/helpers/m_DataAsMessage.inc) | 2 | ||||
| -rw-r--r-- | include/delphi/reserve/m_actman.inc | 158 | ||||
| -rw-r--r-- | include/delphi/reserve/m_anismiley.inc (renamed from plugins/Pascal_Headers/reserve/m_anismiley.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_assocmgr.inc (renamed from plugins/Pascal_Headers/reserve/m_assocmgr.inc) | 52 | ||||
| -rw-r--r-- | include/delphi/reserve/m_autoreplacer.inc (renamed from plugins/Pascal_Headers/reserve/m_autoreplacer.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_changekeyboardlayout.inc (renamed from plugins/Pascal_Headers/reserve/m_changekeyboardlayout.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_contactdir.inc (renamed from plugins/Pascal_Headers/reserve/helpers/m_contactdir.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_contactsex.inc (renamed from plugins/Pascal_Headers/reserve/m_contactsex.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_db3xsa.inc (renamed from plugins/Pascal_Headers/reserve/m_db3xsa.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_ersatz.inc (renamed from plugins/Pascal_Headers/reserve/m_ersatz.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_flags.inc (renamed from plugins/Pascal_Headers/reserve/m_flags.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_flash.inc (renamed from plugins/Pascal_Headers/reserve/m_flash.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_folders.inc (renamed from plugins/Pascal_Headers/reserve/helpers/m_folders.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_fortunemsg.inc (renamed from plugins/Pascal_Headers/reserve/m_fortunemsg.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_fuse.inc (renamed from plugins/Pascal_Headers/reserve/m_fuse.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_help(plugin).inc (renamed from plugins/Pascal_Headers/reserve/m_help(plugin).inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_historyevents.inc (renamed from plugins/Pascal_Headers/m_historyevents.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_historypp.inc (renamed from plugins/Pascal_Headers/reserve/m_historypp.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_historystats.inc (renamed from plugins/Pascal_Headers/reserve/m_historystats.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_httpserver.inc (renamed from plugins/Pascal_Headers/reserve/m_httpserver.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_ieview.inc (renamed from plugins/Pascal_Headers/reserve/m_ieview.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_ircscript.inc (renamed from plugins/Pascal_Headers/reserve/m_ircscript.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_kbdnotify.inc (renamed from plugins/Pascal_Headers/reserve/m_kbdnotify.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_keybindings.inc (renamed from plugins/Pascal_Headers/reserve/m_keybindings.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_langman.inc (renamed from plugins/Pascal_Headers/reserve/m_langman.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_listeningto.inc (renamed from plugins/Pascal_Headers/reserve/m_listeningto.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_magneticWindows.inc (renamed from plugins/Pascal_Headers/reserve/helpers/m_magneticWindows.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_mathmodule.inc (renamed from plugins/Pascal_Headers/reserve/m_mathmodule.inc) | 4 | ||||
| -rw-r--r-- | include/delphi/reserve/m_motd.inc (renamed from plugins/Pascal_Headers/reserve/m_motd.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_music.inc | 419 | ||||
| -rw-r--r-- | include/delphi/reserve/m_mydetails.inc (renamed from plugins/Pascal_Headers/reserve/m_mydetails.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_nickhistory.inc (renamed from plugins/Pascal_Headers/reserve/m_nickhistory.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_notify.inc (renamed from plugins/Pascal_Headers/reserve/helpers/m_notify.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_nudge.inc (renamed from plugins/Pascal_Headers/reserve/m_nudge.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_png.inc (renamed from plugins/Pascal_Headers/reserve/m_png.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_quickcontacts.inc (renamed from plugins/Pascal_Headers/reserve/m_quickcontacts.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_radio.inc | 126 | ||||
| -rw-r--r-- | include/delphi/reserve/m_rssnews.inc (renamed from plugins/Pascal_Headers/reserve/m_rssnews.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_sessions.inc (renamed from plugins/Pascal_Headers/reserve/m_sessions.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_shutdown.inc | 179 | ||||
| -rw-r--r-- | include/delphi/reserve/m_simpleaway.inc (renamed from plugins/Pascal_Headers/reserve/m_simpleaway.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_smh.inc (renamed from plugins/Pascal_Headers/reserve/m_smh.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_smr.inc (renamed from plugins/Pascal_Headers/reserve/m_smr.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_snapping_windows.inc (renamed from plugins/Pascal_Headers/reserve/helpers/m_snapping_windows.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_spamfilter.inc (renamed from plugins/Pascal_Headers/reserve/m_spamfilter.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_speak.inc (renamed from plugins/Pascal_Headers/reserve/m_speak.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_spellchecker.inc (renamed from plugins/Pascal_Headers/reserve/m_spellchecker.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_statusplugins.inc (renamed from plugins/Pascal_Headers/reserve/helpers/m_statusplugins.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_trigger.inc (renamed from plugins/Pascal_Headers/reserve/helpers/m_trigger.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_versioninfo.inc (renamed from plugins/Pascal_Headers/reserve/m_versioninfo.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_voice.inc (renamed from plugins/Pascal_Headers/reserve/m_voice.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_voiceservice.inc (renamed from plugins/Pascal_Headers/reserve/m_voiceservice.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_w7ui.inc | 84 | ||||
| -rw-r--r-- | include/delphi/reserve/m_weather.inc | 163 | ||||
| -rw-r--r-- | include/delphi/reserve/m_webcam.inc (renamed from plugins/Pascal_Headers/reserve/helpers/m_webcam.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_yamn.inc (renamed from plugins/Pascal_Headers/reserve/m_yamn.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/reserve/m_yapp.inc (renamed from plugins/Pascal_Headers/reserve/m_yapp.inc) | 0 | ||||
| -rw-r--r-- | include/delphi/statusmodes.inc | 54 | ||||
| -rw-r--r-- | include/delphi/testdll.dpr | 125 | ||||
| -rw-r--r-- | plugins/AutoShutdown/common.h | 1 | ||||
| -rw-r--r-- | plugins/ExternalAPI/m_mwclc.h | 44 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_addcontact.inc | 49 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_api.pas | 289 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_awaymsg.inc | 46 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_clc.inc | 306 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_clist.inc | 703 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_clui.inc | 243 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_contacts.inc | 112 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_database.inc | 688 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_email.inc | 37 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_file.inc | 71 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_findadd.inc | 36 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_helpers.inc | 484 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_history.inc | 35 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_icq.inc | 381 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_ignore.inc | 73 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_langpack.inc | 115 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_message.inc | 202 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_netlib.inc | 916 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_options.inc | 131 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_plugins.inc | 46 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_popup.inc | 484 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_protocols.inc | 426 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_protomod.inc | 117 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_protosvc.inc | 981 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_skin.inc | 178 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_system.inc | 216 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_url.inc | 36 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_userinfo.inc | 78 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/m_utils.inc | 387 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/statusmodes.inc | 52 | ||||
| -rw-r--r-- | plugins/Pascal_Headers/testdll.dpr | 79 | 
166 files changed, 8362 insertions, 13771 deletions
diff --git a/plugins/Pascal_Headers/FreeImage.pas b/include/delphi/FreeImage.pas index 1ff26db701..1ff26db701 100644 --- a/plugins/Pascal_Headers/FreeImage.pas +++ b/include/delphi/FreeImage.pas diff --git a/include/delphi/README.txt b/include/delphi/README.txt deleted file mode 100644 index 4c0ab5f0cf..0000000000 --- a/include/delphi/README.txt +++ /dev/null @@ -1,92 +0,0 @@ - 
 - - Miranda Module API for Borland Delphi, FreePascal -
 -
 - These include files allow you to write modules to extend Miranda 
 - Older versions of these files 
 - limited support for FPC, versions & compilers are :
 -
 - Borland Delphi 2.0 thru 6.0
 - FreePascal 1.0.4, 1.0.6 
 -
 - You can now create modules for Miranda (v0.1.2.2) and use
 - new stuff like Netlib! though you can still write for
 - the current stable release (v0.1.2.1) but you'll have to
 - be aware of version dependant things.
 -
 - Worry not though, every service/event is marked with a version
 - code if it's not present in older Miranda versions.
 -
 - Be warned, this is a brand new porting though it has borrowed
 - from older ports (see CVS, oh this is viewCVS? mmm, cheese.) 
 - Things are presented in a more Delphi esque than a C esque manner
 - so if you feel confused refer to the C header.
 -
 - A word of warning, don't try to compile /delphiplugins examples
 - with these include files and expect it to work,
 -
 -
 - Include files use the {$include } syntax and will never work
 - as units.
 -
 - -- FPC support? --
 -
 - FPC is now properly supported, but you may need to use -SD -S2
 - command line switches (for Delphi, BP7 mode) remember to use -Fi
 - and -Fu to give the path to these files or use {$UNITPATH} and {$INCLUDEPATH}
 -
 - These include files don't any FPC stuff like macros
 - and inlined functions.
 -
 - -- Things to be aware of --
 -
 - This version is not yet directly supported, if you want to learn
 - the API look at the CVS tree for documentation on plugins, as well
 - as guidelines and examples of the general structure of Miranda.
 -
 - This is my cop out for now, I'll try to write a more general 'guide' later
 - on.
 -
 - -
 -
 - Miranda uses a manifest to allow COMCTRL v6 to be loaded on XP,
 - This causes problems with image lists with Delphi (there are work arounds)
 - see borland.com for the article.
 -
 - You may want to refuse to load on XP or try to use Miranda's API to work with
 - imagelists and load images from resource as bitmaps (ugh)
 -
 - - lstrcat, lstrcpy
 -
 - I've used the Windows API calls to these C functions over Delphi's RTL
 - because SysUtils.pas just adds a bloat.
 -
 - - *If* you use SysUtils.pas
 -
 - Delphi loads OLE for variant support, it maybe advisable to unload
 - the DLL as soon as you start, this maybe a problem though, since Miranda
 - also uses OLE for extended image support, it doesn't however keep
 - it loaded all the time.
 -
 - There should be no problem in just decrementing the reference count
 - to the DLL and it'll unload if you were the only reference.
 -
 - if however you're using variants in your code, blergh.
 -
 - -- How you get it to work --
 -
 - see testdll.dpr, it won't do much but it'll show a pretty description in the
 - options dialog (oh impressive!)
 -
 - To bring in new files, just use {$include that_file_you_want.inc}
 - If other include files are needed by the include file you bring in, 
 - it'll try to include it itself.
 -
 - Of course you need to add the path to where the .inc files are to the project's
 - search path, or if you compile via the command line, use -U and -I 
 - -U is needed because m_globaldefs.pas is a unit.
 -
 - Each header file is marked with "UNITDEP" which will tell you which units
 - it requires.
 -
 - All files that require the PLUGINLINK structure require m_globaldefs.pas
 - (this is all the C header files that use such macros!)
 diff --git a/plugins/Pascal_Headers/interfaces.inc b/include/delphi/interfaces.inc index fd40e34582..fd40e34582 100644 --- a/plugins/Pascal_Headers/interfaces.inc +++ b/include/delphi/interfaces.inc diff --git a/plugins/Pascal_Headers/m_acc.inc b/include/delphi/m_acc.inc index cb82eec23c..cb82eec23c 100644 --- a/plugins/Pascal_Headers/m_acc.inc +++ b/include/delphi/m_acc.inc diff --git a/include/delphi/m_addcontact.inc b/include/delphi/m_addcontact.inc index 6bf08e8208..ce74841d7e 100644 --- a/include/delphi/m_addcontact.inc +++ b/include/delphi/m_addcontact.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,36 +18,32 @@ 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_ADDCONTACT}
  {$DEFINE M_ADDCONTACT}
  const
 -
 -    HANDLE_SEARCHRESULT	= 0;
 -    HANDLE_EVENT		= 1;
 -    HANDLE_CONTACT		= 2;
 +  HANDLE_SEARCHRESULT = 0;
 +  HANDLE_EVENT        = 1;
 +  HANDLE_CONTACT      = 2;
  type
 -
 -    PADDCONTACTSTRUCT = ^TADDCONTACTSTRUCT;
 -	TADDCONTACTSTRUCT = record
 -        handleType: Integer;
 -        handle: THandle;    // HDBEVENT, HCONTACT, SearchResult
 -        szProto: PChar;     // used by search result only
 -        psr: Pointer;       // @PROTOSEARCHRESULT
 -	end;
 +  PADDCONTACTSTRUCT = ^TADDCONTACTSTRUCT;
 +  TADDCONTACTSTRUCT = record
 +    handleType: Int;
 +    handle    : THandle;   // HDBEVENT, HCONTACT, SearchResult
 +    szProto   : PAnsiChar; // used by search result only
 +    psr       : Pointer;   // @PROTOSEARCHRESULT
 +  end;
  const
 -
 -    {
 -        wParam : (HWND) Parent window of the dialog that will be presented
 -        lParam : Pointer to an initialised TADDCONTACTSTRUCT
 -        Affect : Open's the add contact dialog
 -        Version: 0.1.2.2+
 -    }
 -    MS_ADDCONTACT_SHOW  = 'AddContact/Show';
 +  {
 +    wParam : (HWND) Parent window of the dialog that will be presented
 +    lParam : Pointer to an initialised TADDCONTACTSTRUCT
 +    Affect : Open's the add contact dialog
 +    Version: 0.1.2.2+
 +  }
 +  MS_ADDCONTACT_SHOW:PAnsiChar = 'AddContact/Show';
  {$ENDIF}
 diff --git a/include/delphi/m_api.pas b/include/delphi/m_api.pas index 412d33e517..b818a41cc8 100644 --- a/include/delphi/m_api.pas +++ b/include/delphi/m_api.pas @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,57 +18,272 @@ 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.
 -
 -*)
 -
 -{$IFDEF FPC}
 -    {$PACKRECORDS C}
 -    {$MODE Delphi}
 +}
 +{$A+,H+}
 +{$IFNDEF VER130} // skip for delphi 5
 +  {$IFDEF WIN32}{$A4}{$ENDIF}
 +  {$IFDEF WIN64}{$A8}{$ENDIF}
  {$ENDIF}
 -
  unit m_api;
  interface
  uses
 +  Windows;//, FreeImage;
 +
 +// often used
 +const
 +  strCList:PAnsiChar = 'CList';
 +const
 +  WM_USER  = $0400; // from Messages
 +  NM_FIRST = 0;     // from CommCtrl
 +
 +// RichEdit definitions
 +type
 +  PCHARRANGE = ^TCHARRANGE;
 +  TCHARRANGE = record
 +    cpMin:integer;
 +    cpMax:integer;
 +  end;
 +  CHARRANGE = TCHARRANGE;
 +
 +// C translations
 +type
 +{$IFNDEF FPC}
 +  {$IFDEF WIN32}
 +  // delphi 64 must have these types anyway
 +  int_ptr   = integer;
 +  uint_ptr  = cardinal;
 +  
 +  {$ENDIF}
 +  long      = longint;
 +  plong     = ^long;
 +  DWORD_PTR = ULONG_PTR;
 +  size_t    = ULONG_PTR;
 +{$ENDIF}
 +  pint_ptr  = ^int_ptr;
 +  puint_ptr = ^uint_ptr;
 +  time_t    = ulong;
 +  int       = integer;
 +//  uint     = Cardinal;
 +//  pint     = ^int;
 +//  WPARAM   = Integer;
 +//  LPARAM   = Integer;
 +  TLPARAM   = LPARAM;
 +  TWPARAM   = WPARAM;
 +
 +// My definitions
 +  TWNDPROC = function (Dialog:HWnd; hMessage:uint; wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
 +
 +type
 +  PTChar = ^TChar;
 +  TChar = record
 +    case boolean of
 +      false: (a:PAnsiChar); // ANSI or UTF8
 +      true:  (w:PWideChar); // Unicode
 +  end;
 +
 +const
 +  hLangpack:THANDLE = 0;
 +
 +{$include m_core.inc}
 +{$include m_system.inc}
 +
 +{-- start newpluginapi --}
 +const
 +  UNICODE_AWARE = 1;
 -    m_globaldefs, windows;
 -
 -    {$include m_plugins.inc}
 -    {$include m_system.inc}
 -    {$include m_database.inc}
 -    {$include m_findadd.inc}
 -    {$include m_awaymsg.inc}
 -    {$include m_email.inc}
 -    {$include m_history.inc}
 -    {$include m_message.inc}
 -    {$include m_url.inc}
 -    {$include newpluginapi.inc}
 -    {$include m_clui.inc}
 -    {$include m_ignore.inc}
 -    {$include m_skin.inc}
 -    {$include m_file.inc}
 -    {$include m_netlib.inc}
 -    {$include m_langpack.inc}
 -    {$include m_clist.inc}
 -    {$include m_clc.inc}
 -    {$include m_userinfo.inc}
 -    {$include m_protosvc.inc}
 -    {$include m_options.inc}
 -    {$include m_icq.inc}
 -    {$include m_protocols.inc}
 -    {$include m_protomod.inc}
 -    {$include m_utils.inc}
 -    {$include m_addcontact.inc}
 -    {$include statusmodes.inc}
 -	{$include m_contacts.inc}
 -    {$define M_API_UNIT}
 -    {$include m_helpers.inc}
 +// The UUID structure below is used to for plugin UUID's and module type definitions
 +type
 +  PMUUID = ^TMUUID;
 +  MUUID  = System.TGUID;
 +  TMUUID = MUUID;
 +{
 +  MUUID = record
 +    a:cardinal;
 +    b:word;
 +    c:word;
 +    d:array [0..7] of byte;
 +  end;
 +}
 +
 +{$include interfaces.inc}
 +
 +type
 +  PPLUGININFOEX = ^TPLUGININFOEX;
 +  TPLUGININFOEX = record
 +    cbSize     :int;
 +    shortName  :PAnsiChar;
 +    version    :DWORD;
 +    description:PAnsiChar;
 +    author     :PAnsiChar;
 +    authorEmail:PAnsiChar;
 +    copyright  :PAnsiChar;
 +    homepage   :PAnsiChar;
 +    flags      :Byte;  // right now the only flag, UNICODE_AWARE, is recognized here
 +    uuid       :MUUID; // plugin's unique identifier
 +  end;
 +
 +//----- Fork enchancement -----
 +{
 +  Miranda/System/LoadModule event
 +  called when a plugin is being loaded dynamically
 +  wParam=PLUGININFOEX*
 +  //lParam=HINSTANCE of the loaded plugin
 +}
 +const
 +  ME_SYSTEM_MODULELOAD:pAnsiChar = 'Miranda/System/LoadModule';
 +
 +{
 +  Miranda/System/UnloadModule event
 +  called when a plugin is being unloaded dynamically
 +  wParam=PLUGININFOEX*
 +  lParam=HINSTANCE of the loaded plugin
 +}
 +  ME_SYSTEM_MODULEUNLOAD:pAnsiChar = 'Miranda/System/UnloadModule';
 +
 +  { Database plugin stuff  }
 +
 +  // grokHeader() error codes
 +const
 +   EGROKPRF_NOERROR   = 0;
 +   EGROKPRF_CANTREAD  = 1; // can't open the profile for reading
 +   EGROKPRF_UNKHEADER = 2; // header not supported, not a supported profile
 +   EGROKPRF_VERNEWER  = 3; // header correct, version in profile newer than reader/writer
 +   EGROKPRF_DAMAGED   = 4; // header/version fine, other internal data missing, damaged.
 +// makeDatabase() error codes
 +   EMKPRF_CREATEFAILED = 1; // for some reason CreateFile() didnt like something
 +
 +type
 +  PDATABASELINK = ^TDATABASELINK;
 +  TDATABASELINK = record
 +    cbSize : int;
 +    {
 +      returns what the driver can do given the flag
 +    }
 +    getCapability : function (flag:int):int; cdecl;
 +    {
 +       buf: pointer to a string buffer
 +       cch: length of buffer
 +       shortName: if true, the driver should return a short but descriptive name, e.g. "3.xx profile"
 +       Affect: The database plugin must return a "friendly name" into buf and not exceed cch bytes,
 +         e.g. "Database driver for 3.xx profiles"
 +       Returns: 0 on success, non zero on failure
 +    }
 +    getFriendlyName : function (buf:PAnsiChar; cch:size_t; shortName:int):int; cdecl;
 +    {
 +      profile: pointer to a string which contains full path + name
 +      Affect: The database plugin should create the profile, the filepath will not exist at
 +        the time of this call, profile will be C:\..\<name>.dat
 +      Note: Do not prompt the user in anyway about this operation.
 +      Note: Do not initialise internal data structures at this point!
 +      Returns: 0 on success, non zero on failure - error contains extended error information, see EMKPRF_
 +    }
 +    makeDatabase : function (profile:PAnsiChar; error:Pint):int; cdecl;
 +    {
 +      profile: [in] a null terminated string to file path of selected profile
 +      error: [in/out] pointer to an int to set with error if any
 +      Affect: Ask the database plugin if it supports the given profile, if it does it will
 +        return 0, if it doesnt return 1, with the error set in error -- EGROKPRF_  can be valid error
 +        condition, most common error would be [EGROKPRF_UNKHEADER]
 +      Note: Just because 1 is returned, doesnt mean the profile is not supported, the profile might be damaged
 +        etc.
 +      Returns: 0 on success, non zero on failure
 +    }
 +    grokHeader : function (profile:PAnsiChar; error:Pint):int; cdecl;
 +    {
 +      Affect: Tell the database to create all services/hooks that a 3.xx legecy database might support into link
 +      Returns: 0 on success, nonzero on failure
 +    }
 +    Load : function (profile:PAnsiChar):int; cdecl;
 +    {
 +      Affect: The database plugin should shutdown, unloading things from the core and freeing internal structures
 +      Returns: 0 on success, nonzero on failure
 +      Note: Unload() might be called even if Load() was never called, wasLoaded is set to 1 if Load() was ever called.
 +    }
 +    Unload : function (wasLoaded:int):int; cdecl;
 +  end;
 +
 +{-- end newpluginapi --}
 +
 +var
 +  { has to be returned via MirandaPluginInfo and has to be statically allocated,
 +  this means only one module can return info, you shouldn't be merging them anyway! }
 +  PLUGININFO: TPLUGININFOEX;
 +
 +  {$include m_plugins.inc}
 +  {$include m_database.inc}
 +  {$include m_findadd.inc}
 +  {$include m_awaymsg.inc}
 +  {$include m_email.inc}
 +  {$include m_history.inc}
 +  {$include m_message.inc}
 +  {$include m_tabsrmm.inc}
 +  {$include m_url.inc}
 +  {$include m_clui.inc}
 +  {$include m_idle.inc}
 +  {$include m_ignore.inc}
 +  {$include m_skin.inc}
 +  {$include m_file.inc}
 +  {$include m_netlib.inc}
 +  {$include m_langpack.inc}
 +  {$include m_clist.inc}
 +  {$include m_clc.inc}
 +  {$include m_userinfo.inc}
 +  {$include m_protosvc.inc}
 +  {$include m_options.inc}
 +  {$include m_ssl.inc}
 +  {$include m_icq.inc}
 +  {$include m_protoint.inc}
 +  {$include m_protocols.inc}
 +  {$include m_protomod.inc}
 +  {$include m_utils.inc}
 +  {$include m_addcontact.inc}
 +  {$include statusmodes.inc}
 +  {$include m_contacts.inc}
 +  {$include m_genmenu.inc}
 +  {$include m_icolib.inc}
 +  {$include m_fontservice.inc}
 +  {$include m_chat.inc}
 +  {$include m_fingerprint.inc}
 +  {$include m_updater.inc}
 +  {$include m_variables.inc}
 +  {$include m_cluiframes.inc}
 +  {$include m_popup.inc}
 +  {$include m_avatars.inc}
 +  {$include m_smileyadd.inc}
 +  {$include m_tipper.inc}
 +  {$include m_button.inc}
 +  {$include m_dbeditor.inc}
 +  {$include m_userinfoex.inc}
 +  {$include m_imgsrvc.inc}
 +  {$include m_hotkeys.inc}
 +  {$include m_acc.inc}
 +  {$include m_xml.inc}
 +  {$include m_modernopt.inc}
 +  {$include m_descbutton.inc}
 +  {$include m_iconheader.inc}
 +  {$include m_extraicons.inc}
 +  {$include m_errors.inc}
 +  {$include m_help.inc}
 +  {$include m_proto_listeningto.inc}
 +  {$include m_toptoolbar.inc}
 +  {$include m_toolbar.inc}
 +  {$include m_msg_buttonsbar.inc}
 +  {$include m_json.inc}
 +{$define M_API_UNIT}
 +  {$include m_helpers.inc}
 +  {$include m_clistint.inc}
 +  {$include m_metacontacts.inc}
 +  {$include m_timezones.inc}
 +  {$include m_crypto.inc}
 +
 +  {$include m_newawaysys.inc}
  implementation
 -    {$undef M_API_UNIT}
 -    {$include m_helpers.inc}
 +{$undef M_API_UNIT}
 +  {$include m_helpers.inc}
 +  {$include m_clistint.inc}
  end.
 -
 diff --git a/plugins/Pascal_Headers/m_avatars.inc b/include/delphi/m_avatars.inc index ae445ac175..ae445ac175 100644 --- a/plugins/Pascal_Headers/m_avatars.inc +++ b/include/delphi/m_avatars.inc diff --git a/include/delphi/m_awaymsg.inc b/include/delphi/m_awaymsg.inc index 44be914423..f5c083f795 100644 --- a/include/delphi/m_awaymsg.inc +++ b/include/delphi/m_awaymsg.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,22 +18,29 @@ 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_AWAYMSG}
  {$DEFINE M_AWAYMSG}
  const
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affect : Show the away/na/etc message for a contact
 -        Returns: 0 on success, non zero on failure, see notes
 -        notes  : returns without waiting for the message to be shown.
 -        version: v0.1.0.1+
 -    }
 -    MS_AWAYMSG_SHOWAWAYMSG          = 'SRAway/GetMessage';
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affect : Show the away/na/etc message for a contact
 +    Returns: 0 on success, non zero on failure, see notes
 +    notes  : returns without waiting for the message to be shown.
 +    version: v0.1.0.1+
 +  }
 +  MS_AWAYMSG_SHOWAWAYMSG:PAnsiChar = 'SRAway/GetMessage';
 +
 +  {
 +    returns: the default status message for a status
 +    wParam=status
 +    lParam=szProto
 +    notes: returns status msg. Remember to free the return value
 +  }
 +  MS_AWAYMSG_GETSTATUSMSG :PAnsiChar = 'SRAway/GetStatusMessage';
 +  MS_AWAYMSG_GETSTATUSMSGW:PAnsiChar = 'SRAway/GetStatusMessageW';
  {$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_button.inc b/include/delphi/m_button.inc index 7a8860a7ce..7a8860a7ce 100644 --- a/plugins/Pascal_Headers/m_button.inc +++ b/include/delphi/m_button.inc diff --git a/plugins/Pascal_Headers/m_chat.inc b/include/delphi/m_chat.inc index 050b4a706a..050b4a706a 100644 --- a/plugins/Pascal_Headers/m_chat.inc +++ b/include/delphi/m_chat.inc diff --git a/include/delphi/m_clc.inc b/include/delphi/m_clc.inc index 743d8370aa..5c00e6ab22 100644 --- a/include/delphi/m_clc.inc +++ b/include/delphi/m_clc.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,266 +18,289 @@ 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_CLC}
  {$DEFINE M_CLC}
  const
 -
 -    CLISTCONTROL_CLASS          = 'CListControl';
 -
 -    // styles
 -
 -    CLS_MANUALUPDATE            = $0001; // todo
 -    CLS_SHOWHIDDEN              = $0002;
 -    CLS_HIDEOFFLINE             = $0004; // hides all offline users
 -    CLS_CHECKBOXES              = $0008;
 -    CLS_MULTICOLUMN	            = $0010; // not true multi-column, just for ignore/vis options
 -    CLS_HIDEEMPTYGROUPS         = $0020; // note: this flag will be spontaneously removed if the 'new subgroup' menu item is clicked, for obvious reasons
 -    CLS_USEGROUPS               = $0040;
 -    CLS_NOHIDEOFFLINE           = $0080; // overrides CLS_HIDEOFFLINE and the per-group hideoffline setting
 -    CLS_GREYALTERNATE           = $0100; // make every other line slightly grey
 -    CLS_GROUPCHECKBOXES         = $0200; // put checkboxes on groups too (managed by CLC)
 -
 -    CLS_EX_DISABLEDRAGDROP      = $00000001;
 -    CLS_EX_EDITLABELS           = $00000002;
 -    CLS_EX_SHOWSELALWAYS        = $00000004;
 -    CLS_EX_TRACKSELECT          = $00000008;
 -    CLS_EX_SHOWGROUPCOUNTS      = $00000010;
 -    CLS_EX_DIVIDERONOFF         = $00000020;
 -    CLS_EX_HIDECOUNTSWHENEMPTY  = $00000040;
 -    CLS_EX_NOTRANSLUCENTSEL     = $00000080;
 -    CLS_EX_LINEWITHGROUPS       = $00000100;
 -    CLS_EX_QUICKSEARCHVISONLY   = $00000200;
 -    CLS_EX_SORTGROUPSALPHA      = $00000400;
 -    CLS_EX_NOSMOOTHSCROLLING    = $00000800;
 -
 -    CLM_FIRST                   = $1000; // this is the same as LVM_FIRST
 -    CLM_LAST                    = $1100;
 +  CLISTCONTROL_CLASS = 'CListControl';
 +
 +  // styles
 +
 +  CLS_MANUALUPDATE    = $0001; // todo
 +  CLS_SHOWHIDDEN      = $0002;
 +  CLS_HIDEOFFLINE     = $0004; // hides all offline users
 +  CLS_CHECKBOXES      = $0008;
 +  CLS_MULTICOLUMN     = $0010; // not true multi-column, just for ignore/vis options
 +  CLS_HIDEEMPTYGROUPS = $0020; // note: this flag will be spontaneously removed if the 'new subgroup' menu item is clicked, for obvious reasons
 +  CLS_USEGROUPS       = $0040;
 +  CLS_NOHIDEOFFLINE   = $0080; // overrides CLS_HIDEOFFLINE and the per-group hideoffline setting
 +  CLS_GREYALTERNATE   = $0100; // make every other line slightly grey
 +  CLS_GROUPCHECKBOXES = $0200; // put checkboxes on groups too (managed by CLC)
 +  CLS_CONTACTLIST     = $0400; // this control will be the main contact list (v. 0.3.4.3+ 2004/11/02)
 +
 +  CLS_EX_DISABLEDRAGDROP     = $00000001;
 +  CLS_EX_EDITLABELS          = $00000002;
 +  CLS_EX_SHOWSELALWAYS       = $00000004;
 +  CLS_EX_TRACKSELECT         = $00000008;
 +  CLS_EX_SHOWGROUPCOUNTS     = $00000010;
 +  CLS_EX_DIVIDERONOFF        = $00000020;
 +  CLS_EX_HIDECOUNTSWHENEMPTY = $00000040;
 +  CLS_EX_NOTRANSLUCENTSEL    = $00000080;
 +  CLS_EX_LINEWITHGROUPS      = $00000100;
 +  CLS_EX_QUICKSEARCHVISONLY  = $00000200;
 +  CLS_EX_SORTGROUPSALPHA     = $00000400;
 +  CLS_EX_NOSMOOTHSCROLLING   = $00000800;
 +
 +  CLM_FIRST = $1000; // this is the same as LVM_FIRST
 +  CLM_LAST  = $1100;
  // messages, compare with equivalent TVM_* in the WINAPI
 -    CLM_ADDCONTACT              = (CLM_FIRST+0);    // wParam=hContact
 -    CLM_ADDGROUP                = (CLM_FIRST+1);    // wParam=hGroup
 -    CLM_AUTOREBUILD             = (CLM_FIRST+2);
 -    CLM_DELETEITEM              = (CLM_FIRST+3);    // wParam=hItem
 -    CLM_EDITLABEL               = (CLM_FIRST+4);    // wParam=hItem
 -    CLM_ENDEDITLABELNOW         = (CLM_FIRST+5);    // wParam=cancel, 0 to save
 -    CLM_ENSUREVISIBLE           = (CLM_FIRST+6);    // wParam=hItem, lParam=partialOk
 -
 -    CLE_TOGGLE                  = -1;
 -    CLE_COLLAPSE                = 0;
 -    CLE_EXPAND                  = 1;
 -    CLE_INVALID                 = $FFFF;
 -
 -    CLM_EXPAND                  = (CLM_FIRST+7);    // wParam=hItem, lParam=CLE_
 -    CLM_FINDCONTACT             = (CLM_FIRST+8);    // wParam=hContact, returns an hItem
 -    CLM_FINDGROUP               = (CLM_FIRST+9);    // wParam=hGroup, returns an hItem
 -    CLM_GETBKCOLOR              = (CLM_FIRST+10);   // returns a COLORREF
 -    CLM_GETCHECKMARK            = (CLM_FIRST+11);   // wParam=hItem, returns 1 or 0
 -    CLM_GETCOUNT                = (CLM_FIRST+12);   // returns the total number of items
 -
 -    CLM_GETEDITCONTROL          = (CLM_FIRST+13);   // returns the HWND, or NULL
 -    CLM_GETEXPAND               = (CLM_FIRST+14);   // wParam=hItem, returns a CLE_, CLE_INVALID if not a group
 -    CLM_GETEXTRACOLUMNS         = (CLM_FIRST+15);   // returns number of extra columns
 -    CLM_GETEXTRAIMAGE           = (CLM_FIRST+16);   // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),0), returns iImage or $FF
 -    CLM_GETEXTRAIMAGELIST       = (CLM_FIRST+17);   // returns HIMAGELIST
 -    CLM_GETFONT                 = (CLM_FIRST+18);   // wParam=fontId, see clm_setfont. returns hFont.
 -    CLM_GETINDENT               = (CLM_FIRST+19);   // wParam=new group indent
 -    CLM_GETISEARCHSTRING        = (CLM_FIRST+20);   // lParam=(char*)pszStr, max 120 bytes, returns number of chars in string
 -    CLM_GETITEMTEXT             = (CLM_FIRST+21);   // wParam=hItem, lParam=(char*)pszStr, max 120 bytes
 -    CLM_GETSCROLLTIME           = (CLM_FIRST+22);   // returns time in ms
 -    CLM_GETSELECTION            = (CLM_FIRST+23);   // returns hItem
 -
 -    CLCHT_ABOVE                 = $0001;            // above client area
 -    CLCHT_BELOW                 = $0002;            // below client area
 -    CLCHT_TOLEFT                = $0004;            // left of client area
 -    CLCHT_TORIGHT               = $0008;            // right of client area
 -    CLCHT_NOWHERE               = $0010;            // in client area, not on an item
 -    CLCHT_ONITEMICON            = $0020;
 -    CLCHT_ONITEMCHECK           = $0040;
 -    CLCHT_ONITEMLABEL           = $0080;
 -    CLCHT_ONITEMINDENT          = $0100;            // to the left of an item icon
 -    CLCHT_ONITEMEXTRA           = $0200;            // on an extra icon, HIBYTE(HIWORD()) says which
 -    CLCHT_ONITEM                = $03E0;
 -    CLCHT_INLEFTMARGIN          = $0400;
 -    CLCHT_BELOWITEMS            = $0800;            // in client area but below last item
 -
 -    CLM_HITTEST                 = (CLM_FIRST+25);   // lParam=MAKELPARAM(x,y) (relative to control), wParam=(PDWORD)&hitTest (see encoding of HitTest() in clc.h, can be NULL) returns hItem or NULL
 -    CLM_SELECTITEM              = (CLM_FIRST+26);   // wParam=hItem
 -
 -    CLB_TOPLEFT                 = 0;
 -    CLB_STRETCHV                = 1;
 -    CLB_STRETCHH                = 2;	            // and tile vertically
 -    CLB_STRETCH                 = 3;
 -
 -    CLBM_TYPE                   = $00FF;
 -    CLBF_TILEH                  = $1000;
 -    CLBF_TILEV                  = $2000;
 -    CLBF_PROPORTIONAL           = $4000;
 -    CLBF_SCROLL                 = $8000;
 -
 -    CLM_SETBKBITMAP             = (CLM_FIRST+27);   // wParam=mode, lParam=hBitmap (don't delete it), NULL for none
 -    CLM_SETBKCOLOR              = (CLM_FIRST+28);   // wParam=a COLORREF, default is GetSysColor(COLOR_3DFACE)
 -    CLM_SETCHECKMARK            = (CLM_FIRST+29);   // wParam=hItem, lParam=1 or 0
 -    CLM_SETEXTRACOLUMNS         = (CLM_FIRST+30);   // wParam=number of extra columns (zero to MAXEXTRACOLUMNS from clc.h, currently 16)
 -    CLM_SETEXTRAIMAGE           = (CLM_FIRST+31);   // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),iImage). iImage=$FF is a blank
 -    CLM_SETEXTRAIMAGELIST       = (CLM_FIRST+32);   // lParam=HIMAGELIST
 -
 -    FONTID_CONTACTS             = 0;
 -    FONTID_INVIS                = 1;
 -    FONTID_OFFLINE              = 2;
 -    FONTID_NOTONLIST            = 3;
 -    FONTID_GROUPS               = 4;
 -    FONTID_GROUPCOUNTS          = 5;
 -    FONTID_DIVIDERS             = 6;
 -    FONTID_OFFINVIS             = 7;
 -    FONTID_MAX                  = 7;
 -
 -    CLM_SETFONT                 = (CLM_FIRST+33);   // wParam=hFont, lParam=MAKELPARAM(fRedraw,fontId)
 -    CLM_SETINDENT               = (CLM_FIRST+34);   // wParam=new indent, default is 3 pixels
 -    CLM_SETITEMTEXT             = (CLM_FIRST+35);   // wParam=hItem, lParam=(char*)pszNewText
 -    CLM_SETSCROLLTIME           = (CLM_FIRST+36);   // wParam=time in ms, default 200
 -    CLM_SETHIDEEMPTYGROUPS      = (CLM_FIRST+38);   // wParam=TRUE/FALSE
 -
 -    GREYF_UNFOCUS               = $80000000;
 -    MODEF_OFFLINE               = $40000000;
 -
 -    // and use the PF2_ #defines from m_protosvc.inc
 -    CLM_SETGREYOUTFLAGS         = (CLM_FIRST+39);   // wParam=new flags
 -    CLM_GETHIDEOFFLINEROOT      = (CLM_FIRST+40);   // returns TRUE/FALSE
 -    CLM_SETHIDEOFFLINEROOT      = (CLM_FIRST+41);   // wParam=TRUE/FALSE
 -    CLM_SETUSEGROUPS            = (CLM_FIRST+42);   // wParam=TRUE/FALSE
 -    CLM_SETOFFLINEMODES         = (CLM_FIRST+43);   // for 'hide offline', wParam=PF2_ flags and MODEF_OFFLINE
 -    CLM_GETEXSTYLE              = (CLM_FIRST+44);   // returns CLS_EX_ flags
 -    CLM_SETEXSTYLE              = (CLM_FIRST+45);   // wParam=CLS_EX_ flags
 -    CLM_GETLEFTMARGIN           = (CLM_FIRST+46);   // returns count of pixels
 -    CLM_SETLEFTMARGIN           = (CLM_FIRST+47);   // wParam=pixels
 -        	// the order of info items is never changed, so make sure you add them in the
 -        	// order you want them to remain
 -    CLM_ADDINFOITEM             = (CLM_FIRST+48);   // lParam=&TCLCINFOITEM, returns hItem
 -    CLM_GETITEMTYPE             = (CLM_FIRST+49);	// wParam=hItem, returns a CLCIT_
 -    CLM_GETNEXTITEM             = (CLM_FIRST+50);   // wParam=flag, lParam=hItem, returns an hItem
 -    CLM_GETTEXTCOLOR            = (CLM_FIRST+51);   // wParam=FONTID_, returns COLORREF
 -    CLM_SETTEXTCOLOR            = (CLM_FIRST+52);   // wParam=FONTID_, lParam=COLORREF
 -
 -    CLCIIF_BELOWGROUPS          = 1;                // put it between groups and contacts, default is at top
 -    CLCIIF_BELOWCONTACTS        = 2;                // put it at the bottom
 -    CLCIIF_CHECKBOX             = $40;              // give this item a check box
 -    CLCIIF_GROUPFONT            = $80;              // draw the item using FONTID_GROUPS
 -
 -    CLCIT_INVALID               = -1;
 -    CLCIT_GROUP                 = 0;
 -    CLCIT_CONTACT               = 1;
 -    CLCIT_DIVIDER               = 2;
 -    CLCIT_INFO                  = 3;
 -
 -    CLGN_ROOT                   = 0;
 -    CLGN_CHILD                  = 1;
 -    CLGN_PARENT                 = 2;
 -    CLGN_NEXT                   = 3;
 -    CLGN_PREVIOUS               = 4;
 -    CLGN_NEXTCONTACT            = 5;
 -    CLGN_PREVIOUSCONTACT        = 6;
 -    CLGN_NEXTGROUP              = 7;
 -    CLGN_PREVIOUSGROUP          = 8;
 -
 -    CLNF_ISGROUP                = 1;
 -    CLNF_ISINFO                 = 2;
 -
 -    CLN_FIRST                   = (0-100);
 -    CLN_EXPANDED                = (CLN_FIRST-0);    // hItem=hGroup, action=CLE_*
 -    CLN_LISTREBUILT             = (CLN_FIRST-1);
 -    CLN_ITEMCHECKED             = (CLN_FIRST-2);    // todo	// hItem,action,flags valid
 -    CLN_DRAGGING                = (CLN_FIRST-3);	// hItem,pt,flags valid. only sent when cursor outside window, return nonzero if processed
 -    CLN_DROPPED                 = (CLN_FIRST-4);    // hItem,pt,flags valid. only sent when cursor outside window, return nonzero if processed
 -    CLN_LISTSIZECHANGE          = (CLN_FIRST-5);    // pt.y valid. the vertical height of the visible items in the list has changed.
 -    CLN_OPTIONSCHANGED          = (CLN_FIRST-6);	// nothing valid. If you set some extended options they have been overwritten and should be re-set
 -    CLN_DRAGSTOP                = (CLN_FIRST-7);	// hItem,flags valid. sent when cursor goes back in to the window having been outside, return nonzero if processed
 -    CLN_NEWCONTACT              = (CLN_FIRST-8);    // hItem,flags valid. sent when a new contact is added without a full list rebuild
 -    CLN_CONTACTMOVED            = (CLN_FIRST-9);    // hItem,flags valid. sent when contact is moved without a full list rebuild
 -    CLN_CHECKCHANGED            = (CLN_FIRST-10);   // hItem,flags valid. sent when any check mark is changed, but only for one change if there are many
 +  CLM_ADDCONTACT      = (CLM_FIRST+0); // wParam=hContact
 +  CLM_ADDGROUP        = (CLM_FIRST+1); // wParam=hGroup
 +  CLM_AUTOREBUILD     = (CLM_FIRST+2);
 +  CLM_DELETEITEM      = (CLM_FIRST+3); // wParam=hItem
 +  CLM_EDITLABEL       = (CLM_FIRST+4); // wParam=hItem
 +  CLM_ENDEDITLABELNOW = (CLM_FIRST+5); // wParam=cancel, 0 to save
 +  CLM_ENSUREVISIBLE   = (CLM_FIRST+6); // wParam=hItem, lParam=partialOk
 +
 +  CLE_TOGGLE   = -1;
 +  CLE_COLLAPSE = 0;
 +  CLE_EXPAND   = 1;
 +  CLE_INVALID  = $FFFF;
 +
 +  CLM_EXPAND            = (CLM_FIRST+7);  // wParam=hItem, lParam=CLE_
 +  CLM_FINDCONTACT       = (CLM_FIRST+8);  // wParam=hContact, returns an hItem
 +  CLM_FINDGROUP         = (CLM_FIRST+9);  // wParam=hGroup, returns an hItem
 +  CLM_GETBKCOLOR        = (CLM_FIRST+10); // returns a COLORREF
 +  CLM_GETCHECKMARK      = (CLM_FIRST+11); // wParam=hItem, returns 1 or 0
 +  CLM_GETCOUNT          = (CLM_FIRST+12); // returns the total number of items
 +
 +  CLM_GETEDITCONTROL    = (CLM_FIRST+13); // returns the HWND, or NULL
 +  CLM_GETEXPAND         = (CLM_FIRST+14); // wParam=hItem, returns a CLE_, CLE_INVALID if not a group
 +  CLM_GETEXTRACOLUMNS   = (CLM_FIRST+15); // returns number of extra columns
 +  CLM_GETEXTRAIMAGE     = (CLM_FIRST+16); // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),0), returns iImage or $FF
 +  CLM_GETEXTRAIMAGELIST = (CLM_FIRST+17); // returns HIMAGELIST
 +  CLM_GETFONT           = (CLM_FIRST+18); // wParam=fontId, see clm_setfont. returns hFont.
 +  CLM_GETINDENT         = (CLM_FIRST+19); // wParam=new group indent
 +  CLM_GETISEARCHSTRING  = (CLM_FIRST+20); // lParam=(AnsiChar*)pszStr, max 120 bytes, returns number of chars in string
 +  CLM_GETITEMTEXT       = (CLM_FIRST+21); // wParam=hItem, lParam=(TChar*)pszStr, max 120 bytes
 +  CLM_GETSCROLLTIME     = (CLM_FIRST+22); // returns time in ms
 +  CLM_GETSELECTION      = (CLM_FIRST+23); // returns hItem
 +
 +  CLCHT_ABOVE        = $0001; // above client area
 +  CLCHT_BELOW        = $0002; // below client area
 +  CLCHT_TOLEFT       = $0004; // left of client area
 +  CLCHT_TORIGHT      = $0008; // right of client area
 +  CLCHT_NOWHERE      = $0010; // in client area, not on an item
 +  CLCHT_ONITEMICON   = $0020;
 +  CLCHT_ONITEMCHECK  = $0040;
 +  CLCHT_ONITEMLABEL  = $0080;
 +  CLCHT_ONITEMINDENT = $0100; // to the left of an item icon
 +  CLCHT_ONITEMEXTRA  = $0200; // on an extra icon, HIBYTE(HIWORD()) says which
 +  CLCHT_ONITEM       = $03E0;
 +  CLCHT_INLEFTMARGIN = $0400;
 +  CLCHT_BELOWITEMS   = $0800; // in client area but below last item
 +
 +  CLM_HITTEST    = (CLM_FIRST+25); // lParam=MAKELPARAM(x,y) (relative to control), wParam=(PDWORD)&hitTest (see encoding of HitTest() in clc.h, can be NULL) returns hItem or NULL
 +  CLM_SELECTITEM = (CLM_FIRST+26); // wParam=hItem
 +
 +  CLB_TOPLEFT  = 0;
 +  CLB_STRETCHV = 1;
 +  CLB_STRETCHH = 2; // and tile vertically
 +  CLB_STRETCH  = 3;
 +
 +  CLBM_TYPE         = $00FF;
 +  CLBF_TILEH        = $1000;
 +  CLBF_TILEV        = $2000;
 +  CLBF_PROPORTIONAL = $4000;
 +  CLBF_SCROLL       = $8000;
 +
 +  CLM_SETBKBITMAP       = (CLM_FIRST+27); // wParam=mode, lParam=hBitmap (don't delete it), NULL for none
 +  CLM_SETBKCOLOR        = (CLM_FIRST+28); // wParam=a COLORREF, default is GetSysColor(COLOR_3DFACE)
 +  CLM_SETCHECKMARK      = (CLM_FIRST+29); // wParam=hItem, lParam=1 or 0
 +  CLM_SETEXTRACOLUMNS   = (CLM_FIRST+30); // wParam=number of extra columns (zero to MAXEXTRACOLUMNS from clc.h, currently 16)
 +  CLM_SETEXTRAIMAGE     = (CLM_FIRST+31); // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),iImage). iImage=$FF is a blank
 +  CLM_SETEXTRAIMAGELIST = (CLM_FIRST+32); // lParam=HIMAGELIST, wParam=WideImageList
 +
 +  FONTID_CONTACTS      = 0;
 +  FONTID_INVIS         = 1;
 +  FONTID_OFFLINE       = 2;
 +  FONTID_NOTONLIST     = 3;
 +  FONTID_GROUPS        = 4;
 +  FONTID_GROUPCOUNTS   = 5;
 +  FONTID_DIVIDERS      = 6;
 +  FONTID_OFFINVIS      = 7;
 +  FONTID_STATUSMSG     = 8;
 +  FONTID_GROUPSCLOSED  = 9;
 +  FONTID_CONTACTSHOVER = 10;
 +  FONTID_MAX           = 18;
 +
 +  CLM_SETFONT            = (CLM_FIRST+33); // wParam=hFont, lParam=MAKELPARAM(fRedraw,fontId)
 +  CLM_SETINDENT          = (CLM_FIRST+34); // wParam=new indent, default is 3 pixels
 +  CLM_SETITEMTEXT        = (CLM_FIRST+35); // wParam=hItem, lParam=(AnsiChar*)pszNewText
 +  CLM_SETSCROLLTIME      = (CLM_FIRST+36); // wParam=time in ms, default 200
 +  CLM_SETHIDEEMPTYGROUPS = (CLM_FIRST+38); // wParam=TRUE/FALSE
 +
 +  GREYF_UNFOCUS = $80000000;
 +  MODEF_OFFLINE = $40000000;
 +
 +  // and use the PF2_ #defines from m_protosvc.inc
 +  CLM_SETGREYOUTFLAGS    = (CLM_FIRST+39); // wParam=new flags
 +  CLM_GETHIDEOFFLINEROOT = (CLM_FIRST+40); // returns TRUE/FALSE
 +  CLM_SETHIDEOFFLINEROOT = (CLM_FIRST+41); // wParam=TRUE/FALSE
 +  CLM_SETUSEGROUPS       = (CLM_FIRST+42); // wParam=TRUE/FALSE
 +  CLM_SETOFFLINEMODES    = (CLM_FIRST+43); // for 'hide offline', wParam=PF2_ flags and MODEF_OFFLINE
 +  CLM_GETEXSTYLE         = (CLM_FIRST+44); // returns CLS_EX_ flags
 +  CLM_SETEXSTYLE         = (CLM_FIRST+45); // wParam=CLS_EX_ flags
 +  CLM_GETLEFTMARGIN      = (CLM_FIRST+46); // returns count of pixels
 +  CLM_SETLEFTMARGIN      = (CLM_FIRST+47); // wParam=pixels
 +
 +// the order of info items is never changed, so make sure you add them in the
 +// order you want them to remain
 +                                                                                      
 +const
 +  CLM_ADDINFOITEMA = (CLM_FIRST+48); // lParam=&TCLCINFOITEM, returns hItem
 +  CLM_GETITEMTYPE  = (CLM_FIRST+49); // wParam=hItem, returns a CLCIT_
 +  CLM_GETNEXTITEM  = (CLM_FIRST+50); // wParam=flag, lParam=hItem, returns an hItem
 +  CLM_GETTEXTCOLOR = (CLM_FIRST+51); // wParam=FONTID_, returns COLORREF
 +  CLM_SETTEXTCOLOR = (CLM_FIRST+52); // wParam=FONTID_, lParam=COLORREF
 +
 +  CLM_ADDINFOITEMW = (CLM_FIRST+53); // lParam=&TCLCINFOITEM, returns hItem
 +  CLM_ADDINFOITEM = CLM_ADDINFOITEMW;
 +
 +//DO NOT USE IT EXTERNALLY CAN BE NOT SUPPORTED BY CLIST
 +  CLM_SETWIDEEXTRAIMAGE     = CLM_FIRST+60; // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),iImage). iImage=0xFFFF is a blank
 +  CLM_GETWIDEEXTRAIMAGE     = CLM_FIRST+61; // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),0), returns iImage or 0xFF
 +  CLM_GETWIDEEXTRAIMAGELIST = CLM_FIRST+62; // returns HWIDEIMAGELIST
 +
 +  CLCIIF_BELOWGROUPS   = 1;   // put it between groups and contacts, default is at top
 +  CLCIIF_BELOWCONTACTS = 2;   // put it at the bottom
 +  CLCIIF_CHECKBOX      = $40; // give this item a check box
 +  CLCIIF_GROUPFONT     = $80; // draw the item using FONTID_GROUPS
 +
 +  CLCIT_INVALID = -1;
 +  CLCIT_GROUP   = 0;
 +  CLCIT_CONTACT = 1;
 +  CLCIT_DIVIDER = 2;
 +  CLCIT_INFO    = 3;
 +
 +  CLGN_ROOT            = 0;
 +  CLGN_CHILD           = 1;
 +  CLGN_PARENT          = 2;
 +  CLGN_NEXT            = 3;
 +  CLGN_PREVIOUS        = 4;
 +  CLGN_NEXTCONTACT     = 5;
 +  CLGN_PREVIOUSCONTACT = 6;
 +  CLGN_NEXTGROUP       = 7;
 +  CLGN_PREVIOUSGROUP   = 8;
 +
 +  CLNF_ISGROUP = 1;
 +  CLNF_ISINFO  = 2;
 +
 +  CLN_FIRST          = (0-100);
 +  CLN_EXPANDED       = (CLN_FIRST-0);  // hItem=hGroup, action=CLE_*
 +  CLN_LISTREBUILT    = (CLN_FIRST-1);
 +  CLN_ITEMCHECKED    = (CLN_FIRST-2);  // todo  // hItem,action,flags valid
 +  CLN_DRAGGING       = (CLN_FIRST-3);  // hItem,pt,flags valid. only sent when cursor outside window, return nonzero if processed
 +  CLN_DROPPED        = (CLN_FIRST-4);  // hItem,pt,flags valid. only sent when cursor outside window, return nonzero if processed
 +  CLN_LISTSIZECHANGE = (CLN_FIRST-5);  // pt.y valid. the vertical height of the visible items in the list has changed.
 +  CLN_OPTIONSCHANGED = (CLN_FIRST-6);  // nothing valid. If you set some extended options they have been overwritten and should be re-set
 +  CLN_DRAGSTOP       = (CLN_FIRST-7);  // hItem,flags valid. sent when cursor goes back in to the window having been outside, return nonzero if processed
 +  CLN_NEWCONTACT     = (CLN_FIRST-8);  // hItem,flags valid. sent when a new contact is added without a full list rebuild
 +  CLN_CONTACTMOVED   = (CLN_FIRST-9);  // hItem,flags valid. sent when contact is moved without a full list rebuild
 +  CLN_CHECKCHANGED   = (CLN_FIRST-10); // hItem,flags valid. sent when any check mark is changed, but only for one change if there are many
  type
 -
 -    PCLCINFOITEM = ^TCLCINFOITEM;
 -    TCLCINFOITEM = record
 -        cbSize: int;
 -        pszText: PChar;
 -        hParentGroup: THandle;
 -        flags: DWORD;
 -        hIcon: THandle; // todo
 -    end;
 -
 -    PNMCLISTCONTROL = ^TNMCLISTCONTROL;
 -    TNMCLISTCONTROL = record
 -        hdr: TNMHDR;        // depends on Windows.pas
 -        hItem: THandle;
 -        action: int;
 -        iColumn: int;       // -1 if not on an extra column
 -        flags: DWORD;
 -        pt: TPoint;         // depends on Windows.pas
 -    end;
 -
 -    PCLCINFOTIP = ^TCLCINFOTIP;
 -    TCLCINFOTIP = record
 -        cbSize: int;
 -        isTreeFocused: int; // so the plugin can provide an option
 -        isGroup: int;       // 0 if it's contact, 1 if it's a group
 -        hItem: THandle;     // handle to group or contact
 -        ptCursor: TPoint;
 -        rcItem: TRect;
 -    end;
 +  PCLCINFOITEM = ^TCLCINFOITEM;
 +  TCLCINFOITEM = record
 +    cbSize      : int;
 +    pszText     : TChar;
 +    hParentGroup: THandle;
 +    flags       : DWORD;
 +    hIcon       : HICON; // todo
 +  end;
 +
 +  PNMCLISTCONTROL = ^TNMCLISTCONTROL;
 +  TNMCLISTCONTROL = record
 +    hdr    : TNMHDR;        // depends on Windows.pas
 +    hItem  : THandle;
 +    action : int;
 +    iColumn: int;       // -1 if not on an extra column
 +    flags  : DWORD;
 +    pt     : TPoint;         // depends on Windows.pas
 +  end;
 +
 +  PCLCINFOTIP = ^TCLCINFOTIP;
 +  TCLCINFOTIP = record
 +    cbSize       : int;
 +    isTreeFocused: int;     // so the plugin can provide an option
 +    isGroup      : int;     // 0 if it's contact, 1 if it's a group
 +    hItem        : THANDLE; // handle to group or contact
 +    ptCursor     : TPOINT;
 +    rcItem       : TRECT;
 +  end;
 +
 +  PCLCEXTRAINFOTIP = ^TCLCEXTRAINFOTIP;
 +  TCLCEXTRAINFOTIP = record
 +    cbSize       : int;
 +    isTreeFocused: int;     // so the plugin can provide an option
 +    hItem        : THANDLE; // handle to group or contact
 +    ptCursor     : TPOINT;
 +    rcItem       : TRECT;
 +    extraIndex   : int;
 +    hwnd         : HWND;
 +  end;
  const
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a TCLCINFOTIP structure
 -        Affect : An InfoTip for an item should be shown now, see notes
 -        Returns: [non zero] if you process this, because it makes no sense
 -                 for more than one module to process this.
 -        Notes  : It's upto the module where to put the InfoTip, Normally
 -                 it's a few pixels below and to the right of the cursor.
 -                 -
 -                 This event is called after the mouse ehas been stationary over
 -                 a contact for (by default) 200ms
 -    }
 -    ME_CLC_SHOWINFOTIP              = 'CLC/ShowInfoTip';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to an initialised TCLCINFOTIP
 -        Affect : It's time to destroy an infotip, see notes
 -        Notes  : Only cbSize, isGroup, hItem are set
 -        notes  : This is sent when the mouse moves off a contact when ME_CLC_SHOWINFOTIP
 -                 has previously been called.
 -                 -
 -                 If you don't want this behaviour, you should have grabbed the mouse
 -                 capture yourself --
 -    }
 -    ME_CLC_HIDEINFOTIP              = 'CLC/HideInfoTip';
 -
 -    {
 -        wParam : new_time
 -        lParam : 0
 -        Affect : Set a new hover time before the info tip hooks are called, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : The value of this setting is applid to all current CLC windows
 -                 and saved to b applied to all future windows, it is persistent.
 -                 -
 -                 Time is in milliseconds, default is 750ms
 -    }
 -    MS_CLC_SETINFOTIPHOVERTIME      = 'CLC/SetInfoTipHoverTime';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : get the hover time before the infotip hooks are called
 -        returns: the hover time in MS
 -    }
 -    MS_CLC_GETINFOTIPHOVERTIME      = 'CLC/GetInfoTipHoverTime';
 +  {
 +    wParam : 0
 +    lParam : Pointer to a TCLCINFOTIP structure
 +    Affect : An InfoTip for an item should be shown now, see notes
 +    Returns: [non zero] if you process this, because it makes no sense
 +             for more than one module to process this.
 +    Notes  : It's upto the module where to put the InfoTip, Normally
 +             it's a few pixels below and to the right of the cursor.
 +             -
 +             This event is called after the mouse ehas been stationary over
 +             a contact for (by default) 200ms
 +  }
 +  ME_CLC_SHOWINFOTIP     :PAnsiChar = 'CLC/ShowInfoTip';
 +  ME_CLC_SHOWEXTRAINFOTIP:PAnsiChar = 'CLC/ShowExtraInfoTip';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to an initialised TCLCINFOTIP
 +    Affect : It's time to destroy an infotip, see notes
 +    Notes  : Only cbSize, isGroup, hItem are set
 +    notes  : This is sent when the mouse moves off a contact when ME_CLC_SHOWINFOTIP
 +             has previously been called.
 +             -
 +             If you don't want this behaviour, you should have grabbed the mouse
 +             capture yourself --
 +  }
 +  ME_CLC_HIDEINFOTIP:PAnsiChar = 'CLC/HideInfoTip';
 +
 +  {
 +    wParam : new_time
 +    lParam : 0
 +    Affect : Set a new hover time before the info tip hooks are called, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : The value of this setting is applid to all current CLC windows
 +             and saved to b applied to all future windows, it is persistent.
 +             -
 +             Time is in milliseconds, default is 750ms
 +  }
 +  MS_CLC_SETINFOTIPHOVERTIME:PAnsiChar = 'CLC/SetInfoTipHoverTime';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : get the hover time before the infotip hooks are called
 +    returns: the hover time in MS
 +  }
 +  MS_CLC_GETINFOTIPHOVERTIME:PAnsiChar = 'CLC/GetInfoTipHoverTime';
  {$ENDIF}
\ No newline at end of file diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc index 20a3fb0e29..24e4062172 100644 --- a/include/delphi/m_clist.inc +++ b/include/delphi/m_clist.inc @@ -1,641 +1,703 @@ -(*
 -
 -Miranda IM: the free IM client for Microsoft* Windows*
 +{$IFNDEF M_CLIST}
 +{$DEFINE M_CLIST}
 -Copyright 2000-2003 Miranda ICQ/IM project,
 -all portions of this codebase are copyrighted to the people
 -listed in contributors.txt.
 +{$ifndef STATUSMODES}
 +    {$include statusmodes.inc}
 +{$endif}
 -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.
 +type
 +  HGENMENU = THANDLE;
 -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.
 +const
 +  {
 +    wParam : new_status
 +    lParam : 0
 +    Affect : Sent when the user acks to change their status, see notes
 +    Notes  : Also sent due to a MS_CLIST_SETSTATUSMODE
 +  }
 +  ME_CLIST_STATUSMODECHANGE:PAnsiChar = 'CList/StatusModeChange';
 +
 +  {
 +    wParam : new_status
 +    lParam : 0
 +    Affect : Force a change of status mode, see statusmodes.inc
 +  }
 +  MS_CLIST_SETSTATUSMODE:PAnsiChar = 'CList/SetStatusMode';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : Get the current status mode, see notes
 +    Notes  : This is the status, as set by the user, not any protocol specific status
 +             all protocol modules will attempt to conform to this setting at ALL times.
 +  }
 +  MS_CLIST_GETSTATUSMODE:PAnsiChar = 'CList/GetStatusMode';
 +
 +  GSMDF_PREFIXONLINE = 1; // prefix "Online :" for online submodes, e.g. 'away'
 +  GSMDF_UNICODE      = 2; // will return TCHAR* instead of AnsiChar*
 +  GSMDF_UNTRANSLATED = 4;
 +
 +  {
 +    wParam : status_mode
 +    lParam : flags
 +    Affect : Get a textual description of the given status mode
 +    Returns: pointer to a static buffer of the description of the given status mode
 +             or NULL(0) if the mode was unknown.
 +    Version: v0.1.0.1+
 +  }
 +  MS_CLIST_GETSTATUSMODEDESCRIPTION:PAnsiChar = 'CList/GetStatusModeDescription';
 -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.
 +type
 +// WARNING: do not use Translate(TS) for p(t)szName or p(t)szPopupName as they
 +// are translated by the core, which may lead to double translation.
 +// Use LPGEN instead which are just dummy wrappers/markers for "lpgen.pl".
 +  PCLISTMENUITEM = ^TCLISTMENUITEM;
 +  TCLISTMENUITEM = record
 +    cbSize         : int;     // size in bytes of this structure
 +    szName         : TChar;   // [TRANSLATED-BY-CORE] text of the menu item
 +    flags          : DWORD;
 +    position       : int;     // approx position on the menu, lower numbers go nearer the top
 +    hIcon          : THandle; // icon to put by the item, if this was *not* loaded from
 +                              // a resource, you can delete it straight after the call
 +    //icolibItem:HANDLE;  if CMIF_ICONFROMICOLIB used
 +    pszService     : PAnsiChar;   // name of the service to call when the service is clicked
 +    szPopupName    : TChar;   // [TRANSLATED-BY-CORE] name of the popup menu that this item is on, if this
 +                              // is NULL the iteem is on the root of the menu
 +		// or hParentMenu:HGENMENU - valid if CMIF_ROOTHANDLE is set. NULL or (HGENMENU)-1 means the root menu
 +    popupPosition  : int;     // position of the popup menu on the root menu, ignored
 +                              // if pszPopupName is NULL(0) or if the popup menu already exists
 +    hotKey         : DWORD;   // keyboard accelerator, same as lParam of WM_HOTKEY, 0 for none
 +    pszContactOwner: PAnsiChar;   // contact menus only, the protocol module that owns
 +                              // the contacts to which this to which this menu item
 +                              // applies, NULL(0) if it applies to all contacts.
 +                              // if it applies to multiple but not all protocols
 +                              // add multiple menu items or use ME_CLIST_PREBUILDCONTACTMENU
 +    hLangpack      : int;     // plugin's hLangpack (added automatically)
 +  end;
 -*)
 +const
 +  HGENMENU_ROOT = HGENMENU(-1);
 -{$IFNDEF M_CLIST}
 -{$DEFINE M_CLIST}
 +const
 +  CMIF_GRAYED     = 1;
 +  CMIF_CHECKED    = 2;
 +  CMIF_HIDDEN     = 4;   // only works on contact menus
 +  CMIF_NOTOFFLINE = 8;   // item won't appear for contacts that are offline
 +  CMIF_NOTONLINE  = 16;  //          "      online
 +  CMIF_NOTONLIST  = 32;  // item won't appear on standard contacts
 +  CMIF_NOTOFFLIST = 64;  // item won't appear on contacts that have the 'NotOnList' setting
 +  CMIF_ROOTHANDLE = 384; // means that hParentMenu member is set (since 0.8#26)
 +  CMIF_UNICODE    = 512; // will return TCHAR* instead of AnsiChar*
 +  CMIF_KEEPUNTRANSLATED = 1024; // don't translate a menu item
 +  CMIF_ICONFROMICOLIB   = 2048; // use icolibName instead of hIcon
 +
 +  CMIF_DEFAULT = 4096; // this menu item is the default one
 +
 +// for compatibility. since 0.8.0 they both mean nothing
 +  CMIF_ROOTPOPUP  = 128; // root item for new popup (save return id for childs)
 +  CMIF_CHILDPOPUP = 256; // child for rootpopup menu
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to a initalised TCLISTMENUITEM structure
 +    Affect : Add a new menu item to the main menu, see notes
 +    Returns: A handle to the new MENU item or NULL(0) on failure
 +    Notes  : The given TCLISTMENUITEM.pszService in is called when the item
 +             get clicked with :
 +             -
 +             wParam = 0, lParam = hwndContactList
 +  }
 +  MS_CLIST_ADDMAINMENUITEM:PAnsiChar = 'CList/AddMainMenuItem';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to a initalised TCLISTMENUITEM structure
 +    Affect : Add a new item to the user contact menus, see notes
 +    Notes  : exactly the same as MS_CLIST_ADDMAINMENUITEM except when an item
 +             is selected, the service gets called with wParam=hContact,
 +             pszContactOwner is obeyed.
 +             -
 +             Popup menus are not supported, pszPopupName and popupPosition
 +             are ignored. If CTRL is held down when right clicking the menu
 +             position numbers will be displayed in brackets after the menu item
 +             text, this only works in debug builds!
 +  }
 +  MS_CLIST_ADDCONTACTMENUITEM:PAnsiChar = 'CList/AddContactMenuItem';
 +  MS_CLIST_ADDSTATUSMENUITEM :PAnsiChar = 'CList/AddStatusMenuItem';
 +//adds a protocol menu item        v0.9+
 +  MS_CLIST_ADDPROTOMENUITEM  :PAnsiChar = 'CList/AddProtoMenuItem';
 +
 +  CMIM_NAME   = $80000000;
 +  CMIM_FLAGS  = $40000000;
 +  CMIM_ICON   = $20000000;
 +  CMIM_HOTKEY = $10000000;
 +  CMIM_ALL    = $F0000000;
 +
 +  {
 +    wParam : HMENUITEM
 +    lParam : Pointer to a initalised TCLISTMENUITEM
 +    Affect : Modify an existing menu item, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : hMenuItem will have been returned by MS_CLIST_ADD[MAIN]MENUITEM
 +             TCLISTMENUITEM.flags should contain CMIM_* constants (see above)
 +             to mark which fields should be updated, if it's not present, they
 +             can't be updated -- if flags do not exist for a field it can not
 +             be updated.
 +    Version: v0.1.0.1+
 +  }
 +  MS_CLIST_MODIFYMENUITEM:PAnsiChar = 'CList/ModifyMenuItem';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affect : the context menu for a contact is about to be built, see notes
 +    Notes  : modules should use this to change menu items that are specific
 +             to the contact that has them
 +    Version: v0.1.0.1+
 +  }
 +  ME_CLIST_PREBUILDCONTACTMENU:PAnsiChar = 'CList/PreBuildContactMenu';
 -{$ifndef STATUSMODES}
 -    {$include statusmodes.inc}
 -{$endif}
 +type
 +  PCLISTDOUBLECLICKACTION = ^TCLISTDOUBLECLICKACTION;
 +  TCLISTDOUBLECLICKACTION = record
 +    cbSize         : int;
 +    pszContactOwner: PAnsiChar; // name of the protocol owning the contact or NULL(0) for all
 +    flags          : DWORD;     // CMIF_NOT flags above
 +    pszService     : PAnsiChar; // service to call on double click, is called with wParam=hContact, lParam=0
 +  end;
  const
 +  {
 +    wParam : 0
 +    lParam : Pointer to a initalised TCLISTDOUBLECLICKACTION structure
 +    Affect : Sets the service to call when a contact is double-clicked, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : in case of conflicts, the first module to have registered
 +             will get the double click, no others will, this service
 +             will return success even for duplicates
 +             -
 +             This service was dropped from development during 0.3.0.0, it is no
 +             longer supported, see ME_CLIST_DOUBLECLICKED
 +    Version: 0.1.2.2+, 0.2.0+ ONLY (not 3.0a)
 +  }
 +  MS_CLIST_SETDOUBLECLICKACTION:PAnsiChar = 'CList/SetDoubleClickAction';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : <none>
 +    Affect : Register with this event to be notified of a double click on the CList
 +             against a HCONTACT, you will not be notified if there is a pending CList event
 +             that the double click clears, (i.e. flashing icon is presented to be clicked)
 +    Version: 0.3.0.0
 +  }
 +  ME_CLIST_DOUBLECLICKED:PAnsiChar = 'CList/DoubleClicked';
 +
 +  GCDNF_NOMYHANDLE = 1; // will never return the user's custom name
 +  GCDNF_UNICODE    = 2; // will return TCHAR* instead of AnsiChar*
 +  GCDNF_NOCACHE    = 4; // will not use the cache
 +  {
 +    wParam : HCONTACT
 +    lParam : flags
 +    Affect : Gets the string that the contact list will use to represent a contact
 +    Returns: Always a pointer
 +    Notes  : Returns a pointer to the name, will always succeed, even if it needs
 +             to return "(Unknown Contact)"
 +             -
 +             this pointer is a statically allocated buffer which will
 +             be overwritten on every call to this service, callers should make
 +             sure that they copy the information before they call it again
 +    Version: v0.1.2.0+, 0.2.0+ ONLY (0.3a supports the contacts module)
 +  }
 +  MS_CLIST_GETCONTACTDISPLAYNAME:PAnsiChar = 'CList/GetContactDisplayName';
 +
 +  {
 +    Invalidates the display name cache
 +    wParam=(WPARAM)(HANDLE)hContact
 +    lParam=not used
 +  }
 +  MS_CLIST_INVALIDATEDISPLAYNAME:PAnsiChar = 'CList/InvalidateDiplayName';
 -    // for MS_CLIST_GETSTATUSMODEDESCRIPTION
 -
 -    GSMDF_PREFIXONLINE                  = 1;  // prefix "Online :" for online submodes, e.g. 'away'
 -
 -    // for MS_CLIST_ADDMAINMENUITEM
 -
 -    CMIF_GRAYED                         = 1;
 -    CMIF_CHECKED                        = 2;
 -    CMIF_HIDDEN                         = 4;  // only works on contact menus
 -    CMIF_NOTOFFLINE                     = 8;  // item won't appear for contacts that are offline
 -    CMIF_NOTONLINE                      = 16; //          "      online
 -    CMIF_NOTONLIST                      = 32;  // item won't appear on standard contacts
 -    CMIF_NOTOFFLIST                     = 64;  // item won't appear on contacts that have the 'NotOnList' setting
 -
 -    // for MS_CLIST_MODIFYMENUITEM
 -
 -    CMIM_NAME                           = $80000000;
 -    CMIM_FLAGS	                        = $40000000;
 -    CMIM_ICON                           = $20000000;
 -    CMIM_HOTKEY                         = $10000000;
 -    CMIM_ALL                            = $F0000000;
 -
 -    // for MS_CLIST_GETCONTACTDISPLAYNAME
 -
 -    // will never return the user's custom name, even if that's the one to be displayed
 -    GCDNF_NOMYHANDLE                    = 1;
 -
 -    // for MS_CLIST_ADDEVENT
 -
 -    //flashes the icon even if the user is occupied, and puts the event
 -    // at the top of the queue
 -    CLEF_URGENT                         = 1;
 -    { icon will not flash forever, only a few times, e.g. online alert }
 -    CLEF_ONLYAFEW                       = 2;
 -
 -    // for MS_CLIST_GETICONSIMAGELIST
 -
 -    IMAGE_GROUPOPEN                     = 11;
 -    IMAGE_GROUPSHUT                     = 12;
 -
 -    // for MS_CLIST_MENUPROCESSCOMMAND
 -
 -    MPCF_CONTACTMENU                    = 1; // test commands from a contact menu
 -    MPCF_MAINMENU                       = 2; // test commands from the main menu
 -
 -    // for MS_CLIST_GROUPGETNAME/2
 -
 -    GROUPF_EXPANDED                     = $04;
 -    GROUPF_HIDEOFFLINE                  = $08;
 -
 -    //
 -
 -    SETTING_TOOLWINDOW_DEFAULT          = 1;
 -    SETTING_SHOWMAINMENU_DEFAULT        = 1;
 -    SETTING_SHOWCAPTION_DEFAULT         = 1;
 -    SETTING_CLIENTDRAG_DEFAULT          = 0;
 -    SETTING_ONTOP_DEFAULT               = 1;
 -    SETTING_MIN2TRAY_DEFAULT            = 1;
 -    SETTING_TRAY1CLICK_DEFAULT          = 0;
 -    SETTING_HIDEOFFLINE_DEFAULT         = 0;
 -    SETTING_HIDEEMPTYGROUPS_DEFAULT     = 0;
 -    SETTING_USEGROUPS_DEFAULT           = 1;
 -    SETTING_SORTBYSTATUS_DEFAULT        = 0;
 -    SETTING_TRANSPARENT_DEFAULT         = 0;
 -    SETTING_ALPHA_DEFAULT               = 200;
 -    SETTING_AUTOALPHA_DEFAULT           = 150;
 -    SETTING_CONFIRMDELETE_DEFAULT       = 1;
 -    SETTING_AUTOHIDE_DEFAULT            = 0;
 -    SETTING_HIDETIME_DEFAULT            = 30;
 -    SETTING_CYCLETIME_DEFAULT           = 4;
 -    SETTING_ALWAYSSTATUS_DEFAULT        = 0;
 -    SETTING_ALWAYSMULTI_DEFAULT         = 0;
 -    SETTING_TRAYICON_SINGLE             = 0;
 -    SETTING_TRAYICON_CYCLE              = 1;
 -    SETTING_TRAYICON_MULTI              = 2;
 -    SETTING_TRAYICON_DEFAULT            = SETTING_TRAYICON_SINGLE;
 -    SETTING_STATE_HIDDEN                = 0;
 -    SETTING_STATE_MINIMIZED             = 1;
 -    SETTING_STATE_NORMAL                = 2;
 +type
 +  PCLISTEVENT = ^TCLISTEVENT;
 +  TCLISTEVENT = record
 +    cbSize    : int;     // size in bytes
 +    hContact  : THANDLE; // handle to the contact to put the icon by
 +    hIcon     : HICON;   // icon to flash!
 +    flags     : DWORD;
 +    hDBEvent  : THANDLE; // caller defined, but should be unique for hContact
 +                         // or pszProtocol:PAnsiChar
 +    lParam    : LPARAM;
 +    pszService: PAnsiChar;   // name of service to call on activation
 +    szTooltip : TChar;   // short description of the event to display as a tooltip on the systray
 +  end;
 +const
 +  CLEF_URGENT         = 1; // flashes the icon even if the user is occupied, and puts
 +                           // the event at the top of the queue
 +  CLEF_ONLYAFEW       = 2; // icon will not flash forever, only a few times,
 +                           // e.g. online alert
 +  CLEF_UNICODE        = 4; // set pszTooltip as unicode
 +  CLEF_PROTOCOLGLOBAL = 8; // set event globally for protocol, hContact has to
 +                           // be NULL, lpszProtocol the protocol ID name to be set
 +  {
 +    wParam : 0
 +    lParam : Pointer to a TCLISTEVENT
 +    Affect : Add's an event to the list
 +    Notes  : The service will flash TCLISTEVENT.hIcon, next to the
 +             contact, TCLISTEVENT.hContact
 +             -
 +             pszService is called is called wParam=hwndContactList,
 +             lParam=pointer to a TCLISTEVENT.
 +             -
 +             the TCLISTEVENT data is invalidated after this service returns
 +             so copy anything from it if required.
 +             -
 +             TCLISTEVENT.pszService will also be called if the user
 +             double clicks on the icon, at which point it will be removed
 +             from the contact lists queue automatically.
 +             -
 +             TCLISTEVENT.hContact and TCLISTEVENT.hDBEvent should be unique.
 +  }
 +  MS_CLIST_ADDEVENT:PAnsiChar = 'CList/AddEvent';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : HDBEVENT
 +    Affect : Remove an event from the contact list queue
 +    Returns: 0 on success, [non zero] on failure
 +  }
 +  MS_CLIST_REMOVEEVENT:PAnsiChar = 'Clist/RemoveEvent';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : iEvent
 +    Affect : Get the details of an event in the queue, see notes
 +    Returns: A CLISTEVENT* or NULL(0) on failure
 +    Notes  : Returns the iEvent'1st/2nd/3rd/nth elemented queried,
 +             e.g. iEvent=0 will get the event that will be returned if the
 +             user double clicks on that HCONTACT
 +             -
 +             Use HCONTACT=NULL, iEvent=0 for example to get the event
 +             the user will get if they double click on the tray.
 +    Version: v0.1.2.1+
 +  }
 +  MS_CLIST_GETEVENT:PAnsiChar = 'CList/GetEvent';
 +
 +  {
 +    wParam : ControlID
 +    lParam : Pointer to MEASUREITEMSTRUCT struct
 +    Affect : Process a WM_MEASUREITEM message for user context menus, see notes
 +    Notes  : just because wParam, lParam is defined here, only pass them
 +             opaquely to this service, as is.
 +             -
 +             This is just to draw icons, if it is not called, the icons
 +             will not be drawn
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_MENUMEASUREITEM:PAnsiChar = 'CList/MenuMeasureItem';
 +
 +  {
 +    wParam :
 +    lParam :
 +    Affect : Process a WM_DRAWITEM message for user context menus,
 +             wParam, lParam should be passed from such message handler.
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_MENUDRAWITEM:PAnsiChar = 'CList/MenuDrawItem';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affect : Built the context menu for a specific contact
 +    Returns: A HMENU handle identifying the menu, this should be DestroyMenu()ed
 +             when done.
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_MENUBUILDCONTACT:PAnsiChar = 'CList/MenuBuildContact';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : Get the image list handle with all the useful icons in it
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_GETICONSIMAGELIST:PAnsiChar = 'CList/GetIconsImageList';
 +  IMAGE_GROUPOPEN = 11;
 +  IMAGE_GROUPSHUT = 12;
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affect : Get the icon that should be associated with a contact
 +    Returns: an index into the contact list imagelist, if the icon
 +             is a flashing icon, this service won't return information about it
 +             see below
 +    Version: v0.1.2.0+
 +  }
 +  MS_CLIST_GETCONTACTICON:PAnsiChar = 'CList/GetContactIcon';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : ICON_ID
 +    Affect : The icon of a contact in the contact list has changed,
 +             ICON_ID is an index to what image has changed
 +    Version: v0.1.2.1+
 +  }
 +  ME_CLIST_CONTACTICONCHANGED:PAnsiChar = 'CList/ContactIconChanged';
 +
 +//******************************* CLUI only *********************************
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : Get the handle to Miranda's main menu
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_MENUGETMAIN:PAnsiChar = 'CList/MenuGetMain';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : Get a handle to Miranda's status menu
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_MENUGETSTATUS:PAnsiChar = 'CList/MenuGetStatus';
 +
 +  CLISTMENUIDMIN = $4000; // reserved range for clist menu ids
 +  CLISTMENUIDMAX = $7FFF;
 +  {
 +    NOTE:  v0.7.0.26+
 +    Due to it is generic practice to handle menu command via WM_COMMAND
 +    window message handle and practice to process it via calling service
 +    in form: CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam),
 +             MPCF_CONTACTMENU),(LPARAM) hContact))
 +    to ensure that WM_COMMAND was realy from clist menu not from other menu
 +    it is reserved range of menu ids from CLISTMENUIDMIN to CLISTMENUIDMAX
 +    the menu items with ids outside from such range will not be processed by service.
 +    Moreover if you process WM_COMMAND youself and your window contains self menu 
 +    please be sure that you will not call service for non-clist menu items.
 +    The simplest way is to ensure that your menus are not use item ids from such range.
 +    Otherwise, you HAVE TO distinguish WM_COMMAND from clist menus and from your
 +    internal menu and  DO NOT call MS_CLIST_MENUPROCESSCOMMAND for non clist menus. 
 +  }
 +  MPCF_CONTACTMENU = 1; // test commands from a contact menu
 +  MPCF_MAINMENU    = 2; // test commands from the main menu
 +  {
 +    wParam : MAKEWPARAM(LOWORD(wParam of WM_COMMAND),flags)
 +    lParam : HCONTACT
 +    Affect : Process a menu selection from a menu, see notes
 +    Returns: True if it processed the command, False otherwise
 +    notes  : hContact is the currently selected contact, it is not used
 +             if this is a main menu command, if this is NULL then the command
 +             is a contact menu one, the command is ignored
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_MENUPROCESSCOMMAND:PAnsiChar = 'CList/MenuProcessCommand';
 +
 +  {
 +    wParam : virtual key code
 +    lParam : MPCF_* flags
 +    Affect : Process a menu hotkey, see notes
 +    Returns: True if it processed the command, False otherwise
 +    Notes  : this should be called in WM_KEYDOWN
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_MENUPROCESSHOTKEY:PAnsiChar = 'CList/MenuProcessHotkey';
 +
 +  {
 +    wParam : Pointer to a MSG structurer
 +    lParam : Pointer to an LRESULT
 +    Affect : Process all the messages required for docking, see notes
 +    Returns: True if the message should NOT be processed anymore, False otherwise
 +    Notes  : only msg.hwnd, msg.message, msg.wParam and msg.lParam are used
 +             your WndProc should return the lResult if AND only IF, TRUE is returned
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_DOCKINGPROCESSMESSAGE:PAnsiChar = 'CList/DockingProcessMessage';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : Determines wheter the contact list docked
 +    Returns: pnon zero] if the contact list is docked, or 0 if it's not
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_DOCKINGISDOCKED:PAnsiChar = 'CList/DockingIsDocked';
 +
 +  {
 +    wParam : Pointer to a TMSG
 +    lParam : Pointer to an LRESULT
 +    Affect : Process all the messages required for the tray icon, see notes
 +    Returns: TRUE if the message should not be processed anymore, False otherwise
 +    Notes  : Only msg.hwnd, msg.message, msg.wparam and msg.lParam are used
 +             your WndProc should return LRESULT if and ONLY if TRUE is returned
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_TRAYICONPROCESSMESSAGE:PAnsiChar = 'CList/TrayIconProcessMessage';
 +
 +  {
 +    wParam : Pointer to TMSG
 +    lParam : Pointer to an LRESULT
 +    Affect : Process all the messages required for hotkeys, see notes
 +    Returns: True if the message should not be processed anymore or False otherwise
 +    Notes  : only msg.hwnd, msg.message, msg.wParam, msg.lParam are used
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_HOTKEYSPROCESSMESSAGE:PAnsiChar = 'CList/HotkeysProcessMessage';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : Toggles the show/hide status of the contact list
 +    Returns: 0 on success, [non zero] on failure
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_SHOWHIDE:PAnsiChar = 'CList/ShowHide';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : temporarily disable the autohide feature, see notes
 +    Notes  : this service will restart the auto hide timer, so if you need
 +             to keep the window visible you'll have to bee getting user input
 +             or calling this service each time
 +    Version: v0.1.2.1+
 +  }
 +  MS_CLIST_PAUSEAUTOHIDE:PAnsiChar = 'CList/PauseAutoHide';
 +
 +{
 +  sent when the group get modified (created, renamed or deleted)
 +  or contact is moving from group to group 
 +  wParam=hContact - NULL if operation on group 
 +  lParam=pointer to CLISTGROUPCHANGE
 +}
  type
 +  CLISTGROUPCHANGE = record
 +    cbSize    :int;   //size in bytes of this structure
 +    pszOldName:TChar; //old group name
 +    pszNewName:TChar; //new group name
 +  end;
 +const
 +  ME_CLIST_GROUPCHANGE:PAnsiChar = 'CList/GroupChange';
 +
 +  {
 +    wParam : HPARENTGROUP
 +    lParam : 0 or Pointer to new group name
 +    Affect : Create a new group and calls CLUI to display it, see notes
 +    Returns: A handle to the new group.
 +    Notes  : If HPARENTGROUP is NULL(0) it will create a group at the root.
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_GROUPCREATE:PAnsiChar = 'CList/GroupCreate';
 +
 +  {
 +    wParam : HGROUP
 +    lParam : 0
 +    Affect : Delete a group and call CLUI to display the change
 +    Returns: 0 on success, [non zero] on failure
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_GROUPDELETE:PAnsiChar = 'CList/GroupDelete';
 +
 +  {
 +    wParam : HGROUP
 +    lParam : newState
 +    Affect : Change the expanded state flag for a group internally, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : if newState is non zero then the group is expanded, 0 it's collapsed
 +             CLUI IS *NOT* called when the change is made.
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_GROUPSETEXPANDED:PAnsiChar = 'CList/GroupSetExpanded';
 +
 +  {
 +    wParam : HGROUP
 +    lParam : MAKELPARAM(flags, flagsMask)
 +    Affect : Change the flag for a group, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : only if flags given in flagsmask are altered,
 +             CLUI is called on change to GROUPF_HIDEOFFLINE
 +    Version: v0.1.2.1+
 +  }
 +  MS_CLIST_GROUPSETFLAGS:PAnsiChar = 'CList/GroupSetFlags';
 +
 +  {
 +    wParam : HGROUP
 +    lParam : Pointer to a integer to be filled with expanded state
 +    Affect : get the name of a group, see notes
 +    Returns: a static buffer pointing to the name of the group
 +             returns NULL(0) if HGROUP is invalid.
 +    Notes  : the returned buffer is only valid til the next call
 +             to this service, lParam can be NULL(0) if you don't
 +             want to know if the group is expanded
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_GROUPGETNAME:PAnsiChar = 'CList/GroupGetName';
 +
 +  {
 +    wParam : HGROUP
 +    lParam : Pointer to flags
 +    Affect : Get the name of the group, see notes
 +    Returns: A static buffer pointing to the name of the group
 +             returns NULL(0) if HGROUP is invalid
 +    Note   : this buffer is only valid til the next call to this service
 +             flags can be NULL(0), otherwise it'll return GROUPF_* constants
 +    Version: v0.1.2.1+
 +  }
 +  MS_CLIST_GROUPGETNAME2:PAnsiChar = 'CList/GroupGetName2';
 +
 +  GROUPF_EXPANDED    = $04;
 +  GROUPF_HIDEOFFLINE = $08;
 +  {
 +    wParam : HGROUP
 +    lParam : HBEFOREGROUP
 +    Affect : Move a group directly before another group
 +    Returns: the new handle of the group on success, NULL(0) on failure
 +    Notes  : the order is represented by the order in which MS_CLUI_GROUPADDED
 +             is called, however UI's are free to ignore this order and sort
 +             if they wish.
 +    Version: v0.1.2.1+
 +  }
 +  MS_CLIST_GROUPMOVEBEFORE:PAnsiChar = 'CList/GroupMoveBefore';
 +
 +  {
 +    wParam : HGROUP
 +    lParam : Pointer to a null terminated string containing the new name
 +    Affect : Rename a group internally, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : this will fail if the group name is a duplicate of an existing
 +             a name, CLUI is not called when this change is made.
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_GROUPRENAME:PAnsiChar = 'CList/GroupRename';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : Build a menu of the group tree, see notes
 +    Returns: Handle to the menu, NULL(0) on failure
 +    Notes  : NULL be returned if the user doesn't have any groups
 +             the dwItemData of every menu item is the handle to that group.
 +             Menu item ID's are assigned starting at 100 in no particular order
 +    Version: v0.1.2.1+
 +  }
 +  MS_CLIST_GROUPBUILDMENU:PAnsiChar = 'CList/GroupBuildMenu';
 +
 +  {
 +    wParam : newValue
 +    lParam : 0
 +    Affect : Changes the 'hide offline contacts' flag and calls CLUI, see notes
 +    Returns: 0 success, [non zero] on failure
 +    Notes  : newValue is 0 to show all contacts, 1 to show only online contacts
 +             -1 to toggle the value
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_SETHIDEOFFLINE:PAnsiChar = 'CList/SetHideOffline';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affect : Do the message processing associated with the double clicking a contact
 +    Returns: 0 on success, [non zero] on failure
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_CONTACTDOUBLECLICKED:PAnsiChar = 'CList/ContactDoubleClicked';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : Pointer to an array of PAnsiChar's containing files/dirs
 +    Affect : Do the processing when some files are droppeed on a contact, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : the array is terminated when a NULL(0) entry is found
 +    Version: v0.1.2.1+
 +  }
 +  MS_CLIST_CONTACTFILESDROPPED:PAnsiChar = 'CList/ContactFilesDropped';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : HGROUP
 +    Affect : Change the group a contact belongs to, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : use hGroup=NULL(0) to remove any group association with the contact
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_CONTACTCHANGEGROUP:PAnsiChar = 'CList/ContactChangeGroup';
 +
 +  {
 +    wParam : HCONTACT_1
 +    lParam : HCONTACT_2
 +    Affect : Determine the ordering of two given contacts
 +    Returns: 0 if hContact1 is the same as hContact2
 +             1 if hContact1 should be displayed before hContact2
 +            -1 if hContact1 should be displayed after hCotnact2
 +    Version: v0.1.1.0+
 +  }
 +  MS_CLIST_CONTACTSCOMPARE:PAnsiChar = 'CList/ContactsCompare';
 +
 +  {
 +    wParam=0 (not used)
 +    lParam=(LPARAM) &MIRANDASYSTRAYNOTIFY
 +
 +    Affects: Show a message in a ballon tip against a protocol icon (if installed)
 +    Returns: 0 on success, non zero on failure
 +    Notes  : This service will not be created on systems that haven't got the Windows
 +         support for ballontips, also note that it's upto Windows if it shows your
 +         message and it keeps check of delays (don't be stupid about showing messages)
 +
 +    Version: 0.3.1a
 +  }
 +  NIIF_INFO           = $00000001;
 +  NIIF_WARNING        = $00000002;
 +  NIIF_ERROR          = $00000003;
 +  NIIF_ICON_MASK      = $0000000F;
 +  NIIF_NOSOUND        = $00000010;
 +  NIIF_INTERN_UNICODE = $00000100;
 -    PCLISTMENUITEM = ^TCLISTMENUITEM;
 -    TCLISTMENUITEM = record
 -        cbSize: int;        // size in bytes of this structure
 -        pszName: PChar;     // text of the menu item
 -        flags: DWORD;
 -        position: int;      // approx position on the menu, lower numbers go nearer the top
 -        hIcon: THandle;     // icon to put by the item, if this was *not* loaded from
 -                            // a resource, you can delete it straight after the call
 -        pszService: PChar;  // name of the service to call when the service is clicked
 -        pszPopupName: PChar;// name of the popup menu that this item is on, if this
 -                            // is NULL the iteem is on the root of the menu
 -        popupPosition: int; // position of the popup menu on the root menu, ignored
 -                            // if pszPopupName is NULL(0) or if the popup menu already exists
 -        hotKey: DWORD;      // keyboard accelerator, same as lParam of WM_HOTKEY, 0 for none
 -        pszContactOwner: PChar; // contact menus only, the protocol module that owns
 -                                // the contacts to which this to which this menu item
 -                                // applies, NULL(0) if it applies to all contacts.
 -                                // if it applies to multiple but not all protocols
 -                                // add multiple menu items or use ME_CLIST_PREBUILDCONTACTMENU
 -    end;
 -
 -    PCLISTDOUBLECLICKACTION = ^TCLISTDOUBLECLICKACTION;
 -    TCLISTDOUBLECLICKACTION = record
 -        cbSize: int;
 -        pszContactOwner: PChar;     // name of the protocol owning the contact or NULL(0) for all
 -        flags: DWORD;               // CMIF_NOT flags above
 -        pszService: PChar;          // service to call on double click, is called with wParam=hContact, lParam=0
 -    end;
 -
 -    PCLISTEVENT = ^TCLISTEVENT;
 -    TCLISTEVENT = record
 -        cbSize: int;                // size in bytes
 -        hContact: THandle;          // handle to the contact to put the icon by
 -        hIcon: THandle;             // icon to flash!
 -        flags: DWORD;
 -        hDBEvent: THandle;          // caller defined, but should be unique for hContact
 -        lParam: LPARAM;
 -        pszService: PChar;          // name of service to call on activation
 -        pszTooltip: PChar;          // short description of the event to display as a tooltip on the systray
 -    end;
 +type
 +  PMIRANDASYSTRAYNOTIFY = ^TMIRANDASYSTRAYNOTIFY;
 +  TMIRANDASYSTRAYNOTIFY = record
 +    cbSize     :int;       // sizeof(MIRANDASYSTRAY)
 +    szProto    :PAnsiChar; // protocol to show under (may have no effect)
 +    szInfoTitle:TChar;     // only 64chars of it will be used, TCHAR if NIIF_INTERN_UNICODE is specified
 +    szInfo     :TChar;     // only 256chars of it will be used, TCHAR if NIIF_INTERN_UNICODE is specified
 +    dwInfoFlags:dword;     // see NIIF_* stuff
 +    uTimeout   :uint;      // how long to show the tip for
 +  end;
  const
 +  MS_CLIST_SYSTRAY_NOTIFY:PAnsiChar = 'Miranda/Systray/Notify';
 -    {
 -        wParam : new_status
 -        lParam : 0
 -        Affect : Sent when the user acks to change their status, see notes
 -        Notes  : Also sent due to a MS_CLIST_SETSTATUSMODE
 -    }
 -    ME_CLIST_STATUSMODECHANGE           = 'CList/StatusModeChange';
 -
 -    {
 -        wParam : new_status
 -        lParam : 0
 -        Affect : Force a change of status mode, see statusmodes.inc
 -    }
 -    MS_CLIST_SETSTATUSMODE			    = 'CList/SetStatusMode';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : Get the current status mode, see notes
 -        Notes  : This is the status, as set by the user, not any protocol specific status
 -                 all protocol modules will attempt to conform to this setting at ALL times.
 -    }
 -    MS_CLIST_GETSTATUSMODE			    = 'CList/GetStatusMode';
 -
 -    {
 -        wParam : status_mode
 -        lParam : flags
 -        Affect : Get a textual description of the given status mode
 -        Returns: pointer to a static buffer of the description of the given status mode
 -                 or NULL(0) if the mode was unknown.
 -        Version: v0.1.0.1+
 -    }
 -    MS_CLIST_GETSTATUSMODEDESCRIPTION   = 'CList/GetStatusModeDescription';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a initalised TCLISTMENUITEM structure
 -        Affect : Add a new menu item to the main menu, see notes
 -        Returns: A handle to the new MENU item or NULL(0) on failure
 -        Notes  : The given TCLISTMENUITEM.pszService in is called when the item
 -                 get clicked with :
 -                 -
 -                 wParam = 0, lParam = hwndContactList
 -    }
 -    MS_CLIST_ADDMAINMENUITEM            = 'CList/AddMainMenuItem';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a initalised TCLISTMENUITEM structure
 -        Affect : Add a new item to the user contact menus, see notes
 -        Notes  : exactly the same as MS_CLIST_ADDMAINMENUITEM except when an item
 -                 is selected, the service gets called with wParam=hContact,
 -                 pszContactOwner is obeyed.
 -                 -
 -                 Popup menus are not supported, pszPopupName and popupPosition
 -                 are ignored. If CTRL is held down when right clicking the menu
 -                 position numbers will be displayed in brackets afterr the menu item
 -                 text, this only works in debug builds!
 -    }
 -    MS_CLIST_ADDCONTACTMENUITEM         = 'CList/AddContactMenuItem';
 -
 -    {
 -        wParam : HMENUITEM
 -        lParam : Pointer to a initalised TCLISTMENUITEM
 -        Affect : Modify an existing menu item, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : hMenuItem will have been returned by MS_CLIST_ADD[MAIN]MENUITEM
 -                 TCLISTMENUITEM.flags should contain CMIM_* constants (see above)
 -                 to mark which fields should be updated, if it's not present, they
 -                 can't be updated -- if flags do not exist for a field it can not
 -                 be updated.
 -        Version: v0.1.0.1+
 -    }
 -    MS_CLIST_MODIFYMENUITEM             = 'CList/ModifyMenuItem';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affect : the context menu for a contact is about to be built, see notes
 -        Notes  : modules should use this to change menu items that are specific
 -                 to the contact that has them
 -        Version: v0.1.0.1+
 -    }
 -    ME_CLIST_PREBUILDCONTACTMENU        = 'CList/PreBuildContactMenu';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a initalised TCLISTDOUBLECLICKACTION structure
 -        Affect : Sets the service to call when a contact is double-clicked, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : in case of conflicts, the first module to have registered
 -                 will get the double click, no others will, this service
 -                 will return success even for duplicates
 -                 -
 -                 This service was dropped from development during 0.3.0.0, it is no
 -                 longer supported, see ME_CLIST_DOUBLECLICKED
 -        Version: 0.1.2.2+, 0.2.0+ ONLY (not 3.0a)
 -    }
 -    MS_CLIST_SETDOUBLECLICKACTION       = 'CList/SetDoubleClickAction';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : <none>
 -        Affect : Register with this event to be notified of a double click on the CList
 -                 against a HCONTACT, you will not be notified if there is a pending CList event
 -                 that the double click clears, (i.e. flashing icon is presented to be clicked)
 -        Version: 0.3.0.0
 -    }
 -    ME_CLIST_DOUBLECLICKED              = 'CList/DoubleClicked';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : flags
 -        Affect : Gets the string that the contact list will use to represent a contact
 -        Returns: Always a pointer
 -        Notes  : Returns a pointer to the name, will always succeed, even if it needs
 -                 to return "(Unknown Contact)"
 -                 -
 -                 this pointer is a statically allocated buffer which will
 -                 be overwritten on every call to this service, callers should make
 -                 sure that they copy the information before they call it again
 -        Version: v0.1.2.0+, 0.2.0+ ONLY (0.3a supports the contacts module)
 -    }
 -    MS_CLIST_GETCONTACTDISPLAYNAME      = 'CList/GetContactDisplayName';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a TCLISTEVENT
 -        Affect : Add's an event to the list
 -        Notes  : The service will flash TCLISTEVENT.hIcon, next to the
 -                 contact, TCLISTEVENT.hContact
 -                 -
 -                 pszService is called is called wParam=hwndContactList,
 -                 lParam=pointer to a TCLISTEVENT.
 -                 -
 -                 the TCLISTEVENT data is invalidated after this service returns
 -                 so copy anything from it if required.
 -                 -
 -                 TCLISTEVENT.pszService will also be called if the user
 -                 double clicks on the icon, at which point it will be removed
 -                 from the contact lists queue automatically.
 -                 -
 -                 TCLISTEVENT.hContact and TCLISTEVENT.hDBEvent should be unique.
 -    }
 -    MS_CLIST_ADDEVENT                   = 'CList/AddEvent';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : HDBEVENT
 -        Affect : Remove an event from the contact list queue
 -        Returns: 0 on success, [non zero] on failure
 -    }
 -    MS_CLIST_REMOVEEVENT                = 'Clist/RemoveEvent';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : iEvent
 -        Affect : Get the details of an event in the queue, see notes
 -        Returns: A CLISTEVENT* or NULL(0) on failure
 -        Notes  : Returns the iEvent'1st/2nd/3rd/nth elemented queried,
 -                 e.g. iEvent=0 will get the event that will be returned if the
 -                 user double clicks on that HCONTACT
 -                 -
 -                 Use HCONTACT=NULL, iEvent=0 for example to get the event
 -                 the user will get if they double click on the tray.
 -        Version: v0.1.2.1+
 -    }
 -    MS_CLIST_GETEVENT                   = 'CList/GetEvent';
 -
 -    {
 -        wParam : ControlID
 -        lParam : Pointer to MEASUREITEMSTRUCT struct
 -        Affect : Process a WM_MEASUREITEM message for user context menus, see notes
 -        Notes  : just because wParam, lParam is defined here, only pass them
 -                 opaquely to this service, as is.
 -                 -
 -                 This is just to draw icons, if it is not called, the icons
 -                 will not be drawn
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_MENUMEASUREITEM            = 'CList/MenuMeasureItem';
 -
 -    {
 -        wParam :
 -        lParam :
 -        Affect : Process a WM_DRAWITEM message for user context menus,
 -                 wParam, lParam should be passed from such message handler.
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_MENUDRAWITEM               = 'CList/MenuDrawItem';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affect : Built the context menu for a specific contact
 -        Returns: A HMENU handle identifying the menu, thhis should be DestroyMenu()ed
 -                 when done.
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_MENUBUILDCONTACT           = 'CList/MenuBuildContact';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : Get the image list handle with all the useful icons in it
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_GETICONSIMAGELIST          = 'CList/GetIconsImageList';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affect : Get the icon that should be associated with a contact
 -        Returns: an index into the contact list imagelist, if the icon
 -                 is a flashing icon, this service won't return information about it
 -                 see below
 -        Version: v0.1.2.0+
 -    }
 -    MS_CLIST_GETCONTACTICON             = 'CList/GetContactIcon';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : ICON_ID
 -        Affect : The icon of a contact in the contact list has changed,
 -                 ICON_ID is an index to what image has changed
 -        Version: v0.1.2.1+
 -    }
 -    ME_CLIST_CONTACTICONCHANGED         = 'CList/ContactIconChanged';
 -
 -    // ideally only used by a CLIST UI module
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : Get the handle to Miranda's main menu
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_MENUGETMAIN                = 'CList/MenuGetMain';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : Get a handle to Miranda's status menu
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_MENUGETSTATUS              = 'CList/MenuGetStatus';
 -
 -    {
 -        wParam : MAKEWPARAM(LOWORD(wParam of WM_COMMAND),flags)
 -        lParam : HCONTACT
 -        Affect : Process a mennu selection from a menu, see notes
 -        Returns: True if it processed the command, False otherwise
 -        notes  : hContact is the currently selected contact, it is not used
 -                 if this is a main menu command, if this is NULL then the command
 -                 is a contact menu one, the command is ignored
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_MENUPROCESSCOMMAND         = 'CList/MenuProcessCommand';
 -
 -    {
 -        wParam : virtual key code
 -        lParam : MPCF_* flags
 -        Affect : Process a menu hotkey, see notes
 -        Returns: True if it processed the command, False otherwise
 -        Notes  : this should be called in WM_KEYDOWN
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_MENUPROCESSHOTKEY          = 'CList/MenuProcessHotkey';
 -
 -    {
 -        wParam : Pointer to a MSG structurer
 -        lParam : Pointer to an LRESULT
 -        Affect : Process all the messages required for docking, see notes
 -        Returns: True if the message should NOT be processed anymore, False otherwise
 -        Notes  : only msg.hwnd, msg.message, msg.wParam and msg.lParam are used
 -                 your WndProc should return the lResult if AND only IF, TRUE is returned
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_DOCKINGPROCESSMESSAGE      = 'CList/DockingProcessMessage';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : Determines wheter the contact list docked
 -        Returns: pnon zero] if the contact list is docked, or 0 if it's not
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_DOCKINGISDOCKED            = 'CList/DockingIsDocked';
 -
 -    {
 -        wParam : Pointer to a TMSG
 -        lParam : Pointer to an LRESULT
 -        Affect : Process all the messages required for the tray icon, see notes
 -        Returns: TRUE if the message should not be processed anymore, False otherwise
 -        Notes  : Only msg.hwnd, msg.message, msg.wparam and msg.lParam are used
 -                 your WndProc should return LRESULT if and ONLY if TRUE is returned
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_TRAYICONPROCESSMESSAGE     = 'CList/TrayIconProcessMessage';
 -
 -    {
 -        wParam : Pointer to TMSG
 -        lParam : Pointer to an LRESULT
 -        Affect : Process all the messages required for hotkeys, see notes
 -        Returns: True if the message should not be processed anymore or False otherwise
 -        Notes  : only msg.hwnd, msg.message, msg.wParam, msg.lParam are used
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_HOTKEYSPROCESSMESSAGE      = 'CList/HotkeysProcessMessage';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : Toggles the show/hide status of the contact list
 -        Returns: 0 on success, [non zero] on failure
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_SHOWHIDE                   = 'CList/ShowHide';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : temporarily disable the autohide feature, see notes
 -        Notes  : this service will restart the auto hide timer, so if you need
 -                 to keep the window visible you'll have to bee getting user input
 -                 or calling this service each time
 -        Version: v0.1.2.1+
 -    }
 -    MS_CLIST_PAUSEAUTOHIDE              = 'CList/PauseAutoHide';
 -
 -    {
 -        wParam : HPARENTGROUP
 -        lParam : 0
 -        Affect : Create a new group and calls CLUI to display it, see notes
 -        Returns: A handle to the new group.
 -        Notes  : If HPARENTGROUP is NULL(0) it will create a group at the root.
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_GROUPCREATE                = 'CList/GroupCreate';
 -
 -    {
 -        wParam : HGROUP
 -        lParam : 0
 -        Affect : Delete a group and call CLUI to display the change
 -        Returns: 0 on success, [non zero] on failure
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_GROUPDELETE                = 'CList/GroupDelete';
 -
 -    {
 -        wParam : HGROUP
 -        lParam : newState
 -        Affect : Change the expanded state flag for a group internally, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : if newState is non zero then the group is expanded, 0 it's collapsed
 -                 CLUI IS *NOT* called when the change is made.
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_GROUPSETEXPANDED           = 'CList/GroupSetExpanded';
 -
 -    {
 -        wParam : HGROUP
 -        lParam : MAKELPARAM(flags, flagsMask)
 -        Affect : Change the flag for a group, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : only if flags given in flagsmask are altered,
 -                 CLUI is called on change to GROUPF_HIDEOFFLINE
 -        Version: v0.1.2.1+
 -    }
 -    MS_CLIST_GROUPSETFLAGS              = 'CList/GroupSetFlags';
 -
 -    {
 -        wParam : HGROUP
 -        lParam : Pointer to a integer to be filled with expanded state
 -        Affect : get the name of a group, see notes
 -        Returns: a static buffer pointing to the name of the group
 -                 returns NULL(0) if HGROUP is invalid.
 -        Notes  : the returned buffer is only valid til the next call
 -                 to this service, lParam can be NULL(0) if you don't
 -                 want to know if the group is expanded
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_GROUPGETNAME               = 'CList/GroupGetName';
 -
 -    {
 -        wParam : HGROUP
 -        lParam : Pointer to flags
 -        Affect : Get the name of the group, see notes
 -        Returns: A static buffer pointing to the name of the group
 -                 returns NULL(0) if HGROUP is invalid
 -        Note   : this buffer is only valid til the next call to this service
 -                 flags can be NULL(0), otherwise it'll return GROUPF_* constants
 -        Version: v0.1.2.1+
 -    }
 -    MS_CLIST_GROUPGETNAME2              = 'CList/GroupGetName2';
 -
 -    {
 -        wParam : HGROUP
 -        lParam : HBEFOREGROUP
 -        Affect : Move a group directly before another group
 -        Returns: the new handle of the group on success, NULL(0) on failure
 -        Notes  : the order is represented by the order in which MS_CLUI_GROUPADDED
 -                 is called, however UI's are free to ignore this order and sort
 -                 if they wish.
 -        Version: v0.1.2.1+
 -    }
 -    MS_CLIST_GROUPMOVEBEFORE            = 'CList/GroupMoveBefore';
 -
 -    {
 -        wParam : HGROUP
 -        lParam : Pointer to a null terminated string containing the new name
 -        Affect : Rename a group internally, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : this will fail if the group name is a duplicate of an existing
 -                 a name, CLUI is not called when this change is made.
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_GROUPRENAME                = 'CList/GroupRename';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : Build a menu of the group tree, see notes
 -        Returns: Handle to the menu, NULL(0) on failure
 -        Notes  : NULL be returned if the user doesn't have any groups
 -                 the dwItemData of every menu item is the handle to that group.
 -                 Menu item ID's are assigned starting at 100 in no particular order
 -        Version: v0.1.2.1+
 -    }
 -    MS_CLIST_GROUPBUILDMENU             = 'CList/GroupBuildMenu';
 -
 -    {
 -        wParam : newValue
 -        lParam : 0
 -        Affect : Changes the 'hide offline contacts' flag and calls CLUI, see notes
 -        Returns: 0 success, [non zero] on failure
 -        Notes  : newValue is 0 to show all contacts, 1 to show only online contacts
 -                 -1 to toggle the value
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_SETHIDEOFFLINE             = 'CList/SetHideOffline';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affect : Do the message processing associated with the double clicking a contact
 -        Returns: 0 on success, [non zero] on failure
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_CONTACTDOUBLECLICKED       = 'CList/ContactDoubleClicked';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : Pointer to an array of pchar's containing files/dirs
 -        Affect : Do the processing when some files are droppeed on a contact, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : the array is terminated when a NULL(0) entry is found
 -        Version: v0.1.2.1+
 -    }
 -    MS_CLIST_CONTACTFILESDROPPED        = 'CList/ContactFilesDropped';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : HGROUP
 -        Affect : Change the group a contact belongs to, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : use hGroup=NULL(0) to remove any group association with the contact
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_CONTACTCHANGEGROUP         = 'CList/ContactChangeGroup';
 -
 -    {
 -        wParam : HCONTACT_1
 -        lParam : HCONTACT_2
 -        Affect : Determine the ordering of two given contacts
 -        Returns: 0 if hContact1 is the same as hContact2
 -                 1 if hContact1 should be displayed before hContact2
 -                -1 if hContact1 should be displayed after hCotnact2
 -        Version: v0.1.1.0+
 -    }
 -    MS_CLIST_CONTACTSCOMPARE            = 'CList/ContactsCompare';
 +const
 +  SETTING_TOOLWINDOW_DEFAULT      = 1;
 +  SETTING_SHOWMAINMENU_DEFAULT    = 1;
 +  SETTING_SHOWCAPTION_DEFAULT     = 1;
 +  SETTING_CLIENTDRAG_DEFAULT      = 0;
 +  SETTING_ONTOP_DEFAULT           = 1;
 +  SETTING_MIN2TRAY_DEFAULT        = 1;
 +  SETTING_TRAY1CLICK_DEFAULT      = 0;
 +  SETTING_HIDEOFFLINE_DEFAULT     = 0;
 +  SETTING_HIDEEMPTYGROUPS_DEFAULT = 0;
 +  SETTING_USEGROUPS_DEFAULT       = 1;
 +  SETTING_SORTBYSTATUS_DEFAULT    = 0;
 +  SETTING_SORTBYPROTO_DEFAULT     = 0;
 +  SETTING_TRANSPARENT_DEFAULT     = 0;
 +  SETTING_ALPHA_DEFAULT           = 200;
 +  SETTING_AUTOALPHA_DEFAULT       = 150;
 +  SETTING_CONFIRMDELETE_DEFAULT   = 1;
 +  SETTING_AUTOHIDE_DEFAULT        = 0;
 +  SETTING_HIDETIME_DEFAULT        = 30;
 +  SETTING_CYCLETIME_DEFAULT       = 4;
 +  SETTING_ALWAYSSTATUS_DEFAULT    = 0;
 +  SETTING_ALWAYSMULTI_DEFAULT     = 0;
 +
 +  SETTING_TRAYICON_SINGLE         = 0;
 +  SETTING_TRAYICON_CYCLE          = 1;
 +  SETTING_TRAYICON_MULTI          = 2;
 +  SETTING_TRAYICON_DEFAULT        = SETTING_TRAYICON_SINGLE;
 +
 +  SETTING_STATE_HIDDEN            = 0;
 +  SETTING_STATE_MINIMIZED         = 1;
 +  SETTING_STATE_NORMAL            = 2;
 +  SETTING_BRINGTOFRONT_DEFAULT    = 0;
  {$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_clistint.inc b/include/delphi/m_clistint.inc index 7a0dd226e3..7a0dd226e3 100644 --- a/plugins/Pascal_Headers/m_clistint.inc +++ b/include/delphi/m_clistint.inc diff --git a/include/delphi/m_clui.inc b/include/delphi/m_clui.inc index c62b40e458..1edd114e53 100644 --- a/include/delphi/m_clui.inc +++ b/include/delphi/m_clui.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,197 +18,226 @@ 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_CLUI}
  {$DEFINE M_CLUI}
 -    {<</
 -        this header was created for use for v0.1.1.0, most of it's UI related
 -        stuff and you probably don't need to call it, see m_clist.inc instead.
 -        -- There are some functions that were implemented in v0.1.2.0 though
 -    />>}
 +{<</
 +    this header was created for use for v0.1.1.0, most of it's UI related
 +    stuff and you probably don't need to call it, see m_clist.inc instead.
 +    -- There are some functions that were implemented in v0.1.2.0 though
 +/>>}
  const
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affects: Returns a window handle for the contact list window, see notes
 -        Returns: ""
 -        Notes  : This call has a very specific purpose internally Miranda
 -                 and shouldn't be used gratuitously, in almost all cases
 -                 there's another call to do whatever it is that you're
 -                 trying to do.
 -    }
 -    MS_CLUI_GETHWND                     = 'CLUI/GetHwnd';
 -
 -    {
 -        wParam : new status
 -        lParam : null terminated string to a protocol ID
 -        Affects: Change the protocol specific status indicators, see notes!
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : protocol modules don't want to call this, they want
 -                 clist/protocolstatuschanged instead
 -    }
 -    MS_CLUI_PROTOCOLSTATUSCHANGED       = 'CLUI/ProtocolStatusChanged';
 -
 -    {
 -        wParam : Handle to a group
 -        lParam : 1 or 0
 -        Affect : A new group was created, add it to the list, see notes
 -        Notes  : lParam is set to 1 or 0 if the user just created
 -                 the group or not.
 -                 -
 -                 this is also called when the contact list is being rebuilt,
 -                 new groups are always created with the name 'New group'
 -    }
 -    MS_CLUI_GROUPADDED                  = 'CLUI/GroupCreated';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : ICON_ID
 -        Affect : Change the icon for a contact, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : ICON_ID is an offset in the imagelist, see clist/geticonsimagelist
 -    }
 -    MS_CLUI_CONTACTSETICON              = 'CLUI/ContactSetIcon';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affect : Remove a contact from the list, see notes
 -        Returns: 0 on success, [non zereo] on failure
 -        Notes  : this contact is NOT actually being deleted, since if
 -                 a contact goes offline while 'hide offline' option is sset,
 -                 this service will be called then ALSO
 -    }
 -    MS_CLUI_CONTACTDELETED              = 'CLUI/ContactDeleted';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : ICON_ID
 -        Affect : Add a contact to the list, see note
 -        returns: 0 on success, [non zero] on failure
 -        Notes  : the caller processes the 'hide offline' setting, so the callee
 -                 should not do further processing based on the value of this setting
 -                 -
 -                 WARNING: this will be called to re-add a contact when they come
 -                 online if 'hide offline' is on, but it cannot determine if
 -                 the contact is already on the list, so you may get requests to
 -                 add a contact when it is already on the list, which you should ignore.
 -                 -
 -                 You'll also get this whenever an event is added for a contact,
 -                 since if the contact was offline, it needs to be shown to
 -                 display the mesage, even if 'hide offlines' is on.
 -                 -
 -                 you should not resort the list on this call, a seperate resort
 -                 request will be sent.
 -                 -
 -                 ICON_ID is an offset in the image list, see clist/geticonsimagelist
 -
 -    }
 -    MS_CLUI_CONTACTADDED                = 'CLUI/ContactAdded';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affect : Reename a contact in the lists, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : You should not re-sort the list on this call, a separate resort
 -                 request will be sent, you can get the new name from clist/getcontactdisplayname
 -    }
 -    MS_CLUI_CONTACTRENAMED              = 'CLUI/ContactRenamed';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : Start a rebuild of the contact list, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : this is the cue to clear the existing content of the list
 -                 expect to get a series of :
 -
 -                 clui/groupadded
 -                 clui/contactadded
 -                 clui/resortlist
 -    }
 -    MS_CLUI_LISTBEGINREBUILD            = 'CLUI/ListBeginRebuild';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : End a rebuild of the contact list, see notes
 -        Returns: 0 on success, [non zero] on error
 -        Notes  : if you dissplayed an hourglass in beginbuild, set it back
 -                 here, you do not need to explicitly sort the list
 -    }
 -    MS_CLUI_LISTENDREBUILD              = 'CLUI/ListEndRebuild';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : Sort the contact list now, see notes
 -        Returns: 0 success, [non zero] on failure
 -        Notes  : Sorts are buffered so you won't get this message lots of times
 -                 if the lists needs to be resorted many times rapidly
 -    }
 -    MS_CLUI_SORTLIST                    = 'CLUI/SortList';
 -
 -    {
 -        wParam : CLUICAPS_*
 -        lParam : 0
 -        Affect : Gets a load of capabilites for the loaded CLUI, see notes
 -        Returns: the requested value, 0 of wParam is unknown --
 -                 if this service is not implemented it is assumed all return
 -                 values will be 0.
 -        Version: v0.1.2.1+
 -    }
 -
 -    { can only provide this flag to return the following set of caps, the strings
 -    show the database setting/type to store the list option, changing the value
 -    does not reflect what the change is, i.e. ontop can only be affected with
 -    a call to SetWindowPos() }
 -    CLUICAPS_FLAGS1         = 0;
 -    { empty groups aren't shown, 'CList/HideEmptyGroups' (byte) [changes make the list reload] }
 -    CLUIF_HIDEEMPTYGROUPS   = 1;
 -    { groups can be disabled, lists can be merged into one seamlessly, (byte) 'CList/UseGroups' }
 -    CLUIF_DISABLEGROUPS     = 2;
 -    { list can be displayed 'on top' of all other windows, 4 (byte) 'CList/OnTop'  }
 -    CLUIF_HASONTOPOPTION    = 4;
 -    { can disappear after a while of inactive use,
 -    (byte) 'CList/AutoHide' (word) 'CList/HideTime' }
 -    CLUIF_HASAUTOHIDEOPTION = 8;
 -
 -    MS_CLUI_GETCAPS                     = 'CLUI/GetCaps';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : MAKELPARAM(screenX, screenY)
 -        Affect : A contact is being dragged outside the main window
 -        Return : return [non zero] to show the drag cursor as "accepting" the drag
 -                 or zero to show the circle/slash 'not allowed'
 -        Version: v0.1.2.0+
 -    }
 -    ME_CLUI_CONTACTDRAGGING             = 'CLUI/ContactDragging';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : MAKELPARAM(screenX, screenY)
 -        Affect : a contact has just been dropped outside the main window, see notes
 -        Notes  : return non zero to stop other hooks processing this event.
 -        Version: v0.1.2.0+
 -    }
 -    ME_CLUI_CONTACTDROPPED              = 'CLUI/ContactDropped';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affect : A contact that *was* being dragged outside the main window
 -                 has gone back to the main window
 -        Return : always return 0
 -        Version: v0.1.2.1+
 -    }
 -    ME_CLUI_CONTACTDRAGSTOP             = 'CLUI/ContactDragStop';
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affects: Returns a window handle for the contact list window, see notes
 +    Returns: ""
 +    Notes  : This call has a very specific purpose internally Miranda
 +             and shouldn't be used gratuitously, in almost all cases
 +             there's another call to do whatever it is that you're
 +             trying to do.
 +  }
 +  MS_CLUI_GETHWND:PAnsiChar = 'CLUI/GetHwnd';
 +
 +  //get ContactTree hwnd
 +  MS_CLUI_GETHWNDTREE:PAnsiChar = 'CLUI/GetHwndTree';
 +
 +  {
 +    wParam : new status
 +    lParam : null terminated string to a protocol ID
 +    Affects: Change the protocol specific status indicators, see notes!
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : protocol modules don't want to call this, they want
 +             clist/protocolstatuschanged instead
 +  }
 +  MS_CLUI_PROTOCOLSTATUSCHANGED:PAnsiChar = 'CLUI/ProtocolStatusChanged';
 +
 +  {
 +    wParam : Handle to a group
 +    lParam : 1 or 0
 +    Affect : A new group was created, add it to the list, see notes
 +    Notes  : lParam is set to 1 or 0 if the user just created
 +             the group or not.
 +             -
 +             this is also called when the contact list is being rebuilt,
 +             new groups are always created with the name 'New group'
 +  }
 +  MS_CLUI_GROUPADDED:PAnsiChar = 'CLUI/GroupCreated';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : ICON_ID
 +    Affect : Change the icon for a contact, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : ICON_ID is an offset in the imagelist, see clist/geticonsimagelist
 +  }
 +  MS_CLUI_CONTACTSETICON:PAnsiChar = 'CLUI/ContactSetIcon';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affect : Remove a contact from the list, see notes
 +    Returns: 0 on success, [non zereo] on failure
 +    Notes  : this contact is NOT actually being deleted, since if
 +             a contact goes offline while 'hide offline' option is sset,
 +             this service will be called then ALSO
 +  }
 +  MS_CLUI_CONTACTDELETED:PAnsiChar = 'CLUI/ContactDeleted';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : ICON_ID
 +    Affect : Add a contact to the list, see note
 +    returns: 0 on success, [non zero] on failure
 +    Notes  : the caller processes the 'hide offline' setting, so the callee
 +             should not do further processing based on the value of this setting
 +             -
 +             WARNING: this will be called to re-add a contact when they come
 +             online if 'hide offline' is on, but it cannot determine if
 +             the contact is already on the list, so you may get requests to
 +             add a contact when it is already on the list, which you should ignore.
 +             -
 +             You'll also get this whenever an event is added for a contact,
 +             since if the contact was offline, it needs to be shown to
 +             display the mesage, even if 'hide offlines' is on.
 +             -
 +             you should not resort the list on this call, a seperate resort
 +             request will be sent.
 +             -
 +             ICON_ID is an offset in the image list, see clist/geticonsimagelist
 +
 +  }
 +  MS_CLUI_CONTACTADDED:PAnsiChar = 'CLUI/ContactAdded';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affect : Reename a contact in the lists, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : You should not re-sort the list on this call, a separate resort
 +             request will be sent, you can get the new name from clist/getcontactdisplayname
 +  }
 +  MS_CLUI_CONTACTRENAMED:PAnsiChar = 'CLUI/ContactRenamed';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : Start a rebuild of the contact list, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : this is the cue to clear the existing content of the list
 +             expect to get a series of :
 +
 +             clui/groupadded
 +             clui/contactadded
 +             clui/resortlist
 +  }
 +  MS_CLUI_LISTBEGINREBUILD:PAnsiChar = 'CLUI/ListBeginRebuild';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : End a rebuild of the contact list, see notes
 +    Returns: 0 on success, [non zero] on error
 +    Notes  : if you dissplayed an hourglass in beginbuild, set it back
 +             here, you do not need to explicitly sort the list
 +  }
 +  MS_CLUI_LISTENDREBUILD:PAnsiChar = 'CLUI/ListEndRebuild';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : Sort the contact list now, see notes
 +    Returns: 0 success, [non zero] on failure
 +    Notes  : Sorts are buffered so you won't get this message lots of times
 +             if the lists needs to be resorted many times rapidly
 +  }
 +  MS_CLUI_SORTLIST:PAnsiChar = 'CLUI/SortList';
 +
 +  {
 +    wParam : CLUICAPS_*
 +    lParam : 0
 +    Affect : Gets a load of capabilites for the loaded CLUI, see notes
 +    Returns: the requested value, 0 of wParam is unknown --
 +             if this service is not implemented it is assumed all return
 +             values will be 0.
 +    Version: v0.1.2.1+
 +  }
 +{
 +  CLUIF2_PLUGININFO       = 1; // returns pointer to plugininfo
 +  CLUIF2_CLISTTYPE        = 2; // the genaration of list in chronologic
 +                               // modern layered return 0x07 (assuming classic,
 +                               // mw, meta, nicer1, modern1, nicer++, modernLayered)
 +                               // +0x0100 for unicode
 +  CLUIF2_EXTRACOLUMNCOUNT = 3; // return max number of extra icon available to
 +                               // be set in main window
 +  CLUIF2_USEREXTRASTART   = 4; // return index of first 'advanced' image except
 +                               // Adv1 and Adv2
 +}
 +  // can only provide this flag to return the following set of caps, the strings
 +  // show the database setting/type to store the list option, changing the value
 +  // does not reflect what the change is, i.e. ontop can only be affected with
 +  // a call to SetWindowPos()
 +  CLUICAPS_FLAGS1         = 0;
 +  // empty groups aren't shown, 'CList/HideEmptyGroups' (byte) [changes make the list reload]
 +  CLUIF_HIDEEMPTYGROUPS   = 1;
 +  // groups can be disabled, lists can be merged into one seamlessly, (byte) 'CList/UseGroups'
 +  CLUIF_DISABLEGROUPS     = 2;
 +  // list can be displayed 'on top' of all other windows, 4 (byte) 'CList/OnTop'
 +  CLUIF_HASONTOPOPTION    = 4;
 +  // can disappear after a while of inactive use,
 +  // (byte) 'CList/AutoHide' (word) 'CList/HideTime'
 +  CLUIF_HASAUTOHIDEOPTION = 8;
 +
 +  CLUICAPS_FLAGS2 = 1; // Returns info about extra icons
 +                       // HIWORD is the first extra icon number, LOWORD is the extra icons count
 +
 +//LPARAMS for CLUICAPS_FLAGS1 
 +  CLUIF2_PLUGININFO = 1; //returns pointer to plugininfo
 +  CLUIF2_CLISTTYPE  = 2; // the genaration of list in chronologic 
 +// modern layered return 0x07
 +// (assuming classic, mw, meta, nicer1, modern1, nicer++, modernLayered)
 +// +0x0100 for unicode
 +  CLUIF2_EXTRACOLUMNCOUNT = 3; // return max number of extra icon available to be set in main window
 +  CLUIF2_USEREXTRASTART   = 4; // return index of first 'advanced' image except Adv1 and Adv2
 +
 +  MS_CLUI_GETCAPS:PAnsiChar = 'CLUI/GetCaps';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : MAKELPARAM(screenX, screenY)
 +    Affect : A contact is being dragged outside the main window
 +    Return : return [non zero] to show the drag cursor as "accepting" the drag
 +             or zero to show the circle/slash 'not allowed'
 +    Version: v0.1.2.0+
 +  }
 +  ME_CLUI_CONTACTDRAGGING:PAnsiChar = 'CLUI/ContactDragging';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : MAKELPARAM(screenX, screenY)
 +    Affect : a contact has just been dropped outside the main window, see notes
 +    Notes  : return non zero to stop other hooks processing this event.
 +    Version: v0.1.2.0+
 +  }
 +  ME_CLUI_CONTACTDROPPED:PAnsiChar = 'CLUI/ContactDropped';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affect : A contact that *was* being dragged outside the main window
 +             has gone back to the main window
 +    Return : always return 0
 +    Version: v0.1.2.1+
 +  }
 +  ME_CLUI_CONTACTDRAGSTOP:PAnsiChar = 'CLUI/ContactDragStop';
 +
 +// return TRUE if Clist Module Support Metacontacts
 +  ME_CLUI_METASUPPORT:PAnsiChar = 'CLUI/MetaContactSupport';
 +
 +// return pointer to PLUGININFO structure
 +//  MS_CLIST_GETCLISTCAPS = 'CList/GetCaps';
  {$ENDIF}
\ No newline at end of file diff --git a/plugins/Pascal_Headers/m_cluiframes.inc b/include/delphi/m_cluiframes.inc index 29178a66da..29178a66da 100644 --- a/plugins/Pascal_Headers/m_cluiframes.inc +++ b/include/delphi/m_cluiframes.inc diff --git a/include/delphi/m_contacts.inc b/include/delphi/m_contacts.inc index 4ea0d936c3..cef88c4b38 100644 --- a/include/delphi/m_contacts.inc +++ b/include/delphi/m_contacts.inc @@ -1,4 +1,4 @@ -(*
 +{
  Miranda IM
  This program is free software; you can redistribute it and/or
 @@ -14,71 +14,99 @@ 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_CONTACTS}
 +{$DEFINE M_CONTACTS}
  type
 -
 -    PCONTACTINFO = ^TCONTACTINFO;
 -	TCONTACTINFO = record
 -		cbSize: int;
 -		dwFlag: Byte;
 -		hContact: THandle;
 -		szProto: PChar;
 -		type_: Byte;
 -		retval: record (* in C this is a nameless union *)
 -			case longint of
 -            0: (bVal: Byte);
 -            1: (wVal: WORD);
 -            2: (dVal: DWORD);
 -            3: (pszVal: PChar);
 -            4: (cchVal: Word);
 -			end;
 -	end;
 +  PCONTACTINFO = ^TCONTACTINFO;
 +  TCONTACTINFO = record
 +    cbSize  : int;
 +    dwFlag  : Byte;
 +    hContact: THandle;
 +    szProto : PAnsiChar;
 +    _type   : Byte;
 +    retval: record // in C this is a nameless union
 +      case longint of
 +        0: (bVal  : Byte);
 +        1: (wVal  : WORD);
 +        2: (dVal  : DWORD);
 +        3: (szVal : TChar);
 +        4: (cchVal: Word);
 +      end;
 +  end;
  const
  // CNF_* Types of information you can retreive by setting the dwFlag in CONTACTINFO
 -	CNF_FIRSTNAME	= 1;  // returns first name (string)
 -	CNF_LASTNAME	= 2;  // returns last name (string)
 -	CNF_NICK		= 3;  // returns nick name (string)
 -	CNF_CUSTOMNICK	= 4;  // returns custom nick name, clist name (string)
 -	CNF_EMAIL		= 5;  // returns email (string)
 -	CNF_CITY		= 6;  // returns city (string)
 -	CNF_STATE		= 7;  // returns state (string)
 -	CNF_COUNTRY		= 8;  // returns country (string)
 -	CNF_PHONE		= 9;  // returns phone (string)
 -	CNF_HOMEPAGE	= 10; // returns homepage (string)
 -	CNF_ABOUT		= 11; // returns about info (string)
 -	CNF_GENDER		= 12; // returns gender (byte,'M','F' character)
 -	CNF_AGE			= 13; // returns age (byte, 0==unspecified)
 -	CNF_FIRSTLAST	= 14; // returns first name + last name (string)
 -	CNF_UNIQUEID	= 15; // returns uniqueid, protocol username (must check type for type of return)
 +  CNF_FIRSTNAME  = 1;  // returns first name (string)
 +  CNF_LASTNAME   = 2;  // returns last name (string)
 +  CNF_NICK       = 3;  // returns nick name (string)
 +  CNF_CUSTOMNICK = 4;  // returns custom nick name, clist name (string)
 +  CNF_EMAIL      = 5;  // returns email (string)
 +  CNF_CITY       = 6;  // returns city (string)
 +  CNF_STATE      = 7;  // returns state (string)
 +  CNF_COUNTRY    = 8;  // returns country (string)
 +  CNF_PHONE      = 9;  // returns phone (string)
 +  CNF_HOMEPAGE   = 10; // returns homepage (string)
 +  CNF_ABOUT      = 11; // returns about info (string)
 +  CNF_GENDER     = 12; // returns gender (byte,'M','F' character)
 +  CNF_AGE        = 13; // returns age (byte, 0==unspecified)
 +  CNF_FIRSTLAST  = 14; // returns first name + last name (string)
 +  CNF_UNIQUEID   = 15; // returns uniqueid, protocol username (must check type for type of return)
 +  CNF_FAX        = 18; // returns fax (string)
 +  CNF_CELLULAR   = 19; // returns cellular (string)
 +  CNF_TIMEZONE   = 20; // returns timezone (string)
 +  CNF_MYNOTES    = 21; // returns user specified notes (string)
 +  CNF_BIRTHDAY   = 22; // returns birthday day of month (byte)
 +  CNF_BIRTHMONTH = 23; // returns birthday month (byte)
 +  CNF_BIRTHYEAR  = 24; // returns birthday year (word)
 +  CNF_STREET     = 25; // returns street (string)
 +  CNF_ZIP        = 26; // returns zip code (string)
 +  CNF_LANGUAGE1  = 27; // returns language1 (string)
 +  CNF_LANGUAGE2  = 28; // returns language2 (string)
 +  CNF_LANGUAGE3  = 29; // returns language3 (string)
 +  CNF_CONAME     = 30; // returns company name (string)
 +  CNF_CODEPT     = 31; // returns company department (string)
 +  CNF_COPOSITION = 32; // returns company position (string)
 +  CNF_COSTREET   = 33; // returns company street (string)
 +  CNF_COCITY     = 34; // returns company city (string)
 +  CNF_COSTATE    = 35; // returns company state (string)
 +  CNF_COZIP      = 36; // returns company zip code (string)
 +  CNF_COCOUNTRY  = 37; // returns company country (string)
 +  CNF_COHOMEPAGE = 38; // returns company homepage (string)
 +  CNF_DISPLAYUID = 39; // returns uniqueid to display in interface (must check type for type of return)
  // Special types
  // Return the custom name using the name order setting
  // IMPORTANT: When using CNF_DISPLAY you MUST free the string returned
  // You must **NOT** do this from your version of free() you have to use Miranda's free()
  // you can get a function pointer to Miranda's free() via MS_SYSTEM_GET_MMI, see m_system.h
 -	CNF_DISPLAY		= 16;
 +  CNF_DISPLAY = 16;
  // Same as CNF_DISPLAY except the custom handle is not used
  // IMPORTANT: When using CNF_DISPLAYNC you MUST free the string returned
  // You must **NOT** do this from your version of free() you have to use Miranda's free()
  // you can get a function pointer to Miranda's free() via MS_SYSTEM_GET_MMI, see m_system.h
 -	CNF_DISPLAYNC	= 17;
 +  CNF_DISPLAYNC = 17;
 +
 +// Add this flag if you want to get the Unicode info
 +  CNF_UNICODE = $80;
  // If MS_CONTACT_GETCONTACTINFO returns 0 (valid), then one of the following
  // types is setting telling you what type of info you received
 -	CNFT_BYTE		= 1;
 -	CNFT_WORD		= 2;
 -	CNFT_DWORD		= 3;
 -	CNFT_ASCIIZ		= 4;
 +  CNFT_BYTE   = 1;
 +  CNFT_WORD   = 2;
 +  CNFT_DWORD  = 3;
 +  CNFT_ASCIIZ = 4;
 +
 +  {
 +    wParam : not used
 +    lParam : Pointer to an initialised TCONTACTINFO structure
 +    affects: Get contact information
 +    returns: Zero on success, non zero on failure.
 +    notes  : If successful, the type is set and the result is put into the associated member of TCONTACTINFO
 +  }
 +  MS_CONTACT_GETCONTACTINFO:PAnsiChar = 'Miranda/Contact/GetContactInfo';
 -	{
 -		wParam : not used
 -		lParam : Pointer to an initialised TCONTACTINFO structure
 -		affects: Get contact information
 -		returns: Zero on success, non zero on failure.
 -		notes  : If successful, the type is set and the result is put into the associated member of TCONTACTINFO
 -	}
 -	MS_CONTACT_GETCONTACTINFO	= 'Miranda/Contact/GetContactInfo';
 +{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_core.inc b/include/delphi/m_core.inc index bbf0bcba56..9445241e66 100644 --- a/plugins/Pascal_Headers/m_core.inc +++ b/include/delphi/m_core.inc @@ -239,14 +239,14 @@ function SetExceptionFilter(pMirandaExceptFilter:pfnExceptionFilter):pfnExceptio  const
    LANG_UNICODE = $1000;
 -procedure LangPackDropUnusedItems(); stdcall;
 -                                  external CoreDLL name 'LangPackDropUnusedItems';
 -function LangPackGetDefaultCodePage():int; stdcall;
 -                                  external CoreDLL name 'LangPackGetDefaultCodePage';
 -function LangPackGetDefaultLocale():int; stdcall;
 -                                  external CoreDLL name 'LangPackGetDefaultLocale';
 -function LangPackPcharToTchar(const pszStr:pAnsiChar):pWideChar; stdcall;
 -                              external CoreDLL name 'LangPackPcharToTchar';
 +procedure Langpack_SortDuplicates(); stdcall;
 +                                  external CoreDLL name 'Langpack_SortDuplicates';
 +function Langpack_GetDefaultCodePage():int; stdcall;
 +                                  external CoreDLL name 'Langpack_GetDefaultCodePage';
 +function Langpack_GetDefaultLocale():int; stdcall;
 +                                  external CoreDLL name 'Langpack_GetDefaultLocale';
 +function Langpack_PcharToTchar(const pszStr:pAnsiChar):pWideChar; stdcall;
 +                              external CoreDLL name 'Langpack_PcharToTchar';
  function LoadLangPackModule():int; stdcall;
                              external CoreDLL name 'LoadLangPackModule';
 diff --git a/plugins/Pascal_Headers/m_crypto.inc b/include/delphi/m_crypto.inc index 81c35fabe9..81c35fabe9 100644 --- a/plugins/Pascal_Headers/m_crypto.inc +++ b/include/delphi/m_crypto.inc diff --git a/include/delphi/m_database.inc b/include/delphi/m_database.inc index 678977979c..5ce91df2b3 100644 --- a/include/delphi/m_database.inc +++ b/include/delphi/m_database.inc @@ -1,181 +1,124 @@ -(*
 -
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_DATABASE}
  {$DEFINE M_DATABASE}
  const
 -
 -    DBVT_DELETED            = 0;        // setting got deleted, no values are valid
 -    DBVT_BYTE               = 1;        // bVal, cVal are valid
 -    DBVT_WORD               = 2;        // wVal, sVal are valid
 -    DBVT_DWORD              = 4;        // dVal, lVal are valid
 -    DBVT_ASCIIZ             = 255;      // pszVal is valid
 -    DBVT_BLOB               = 254;      // cpbVal and pbVal are valid
 -    DBVTF_VARIABLELENGTH    = $80;      // ?
 -
 -type
 -
 -    HCONTACT                = Integer;
 -    HDBEVENT                = Integer;
 -
 -    PDBVARIANT = ^TDBVARIANT;
 -    TDBVARIANT = record
 -        type_: Byte;
 -        case LongInt of
 -        0: (bVal: Byte);
 -        1: (cVal: Char);
 -        2: (wVal: Word);
 -        3: (sVal: SmallInt);
 -        4: (dVal: LongInt);
 -        5: (lVal: Integer);
 -        6: (
 -            pszVal: PChar;
 -            cchVal: Word;
 -        );
 -        7: (
 -            cpbVal: Word;
 -            pbVal: PByte;
 -        );
 -    end;
 -
 -const
 -
 -    {
 -        wParam : size of the buffer to be filled
 -        lParam : pointer to the buffer to be filled
 -        affect : Get's the name of the current profile being used by the database
 -                 module -- this is the same as the filename of the profile without
 -                 the .ext
 -        return : 0 on success, non zero on failure
 -    }
 -    MS_DB_GETPROFILENAME            = 'DB/GetProfileName';
 -
 -    {
 -        wParam : size of buffer pointed to by lParam
 -        lParam : pointer to a buffer to be filled
 -        affect : Fill a buffer with the current profile path being used, this does not include the trailing backslash.
 -        return : 0 on success, non zero on failure
 -        version: 0.3a only
 -    }
 -    MS_DB_GETPROFILEPATH            = 'DB/GetProfilePath';
 +  {
 +    wParam : size of the buffer to be filled
 +    lParam : pointer to the buffer to be filled
 +    affect : Get's the name of the current profile being used by the database
 +             module -- this is the same as the filename of the profile without
 +             the .ext
 +    return : 0 on success, non zero on failure
 +  }
 +  MS_DB_GETPROFILENAME :PAnsiChar = 'DB/GetProfileName';
 +  MS_DB_GETPROFILENAMEW:PAnsiChar = 'DB/GetProfileNameW';
 +
 +  {
 +    wParam : size of buffer pointed to by lParam
 +    lParam : pointer to a buffer to be filled
 +    affect : Get the path of the base folder where Miranda will store all individual profiles
 +             The returned path does NOT include a trailing backslash.
 +             Essentially this is what has been set in mirandaboot.ini as ProfileDir.
 +             For more options to retrieve profile paths check MS_UTILS_REPLACEVARS
 +    return : 0 on success, non zero on failure
 +    version: 0.3a only
 +  }
 +  MS_DB_GETPROFILEPATH :PAnsiChar = 'DB/GetProfilePath';
 +  MS_DB_GETPROFILEPATHW:PAnsiChar = 'DB/GetProfilePathW';
  type
 -
 -    PDBCONTACTGETSETTING = ^TDBCONTACTGETSETTING;
 -    TDBCONTACTGETSETTING = record
 -        { name of the module that wrote the setting to get }
 -        szModule: PChar;
 -        { the name of the setting to get }
 -        szSetting: PChar;
 -        { pointer to DBVARIANT to receive the value -- must be allocated for GETSETTINGSTATIC
 -        calls thou }
 -        pValue: PDBVARIANT;
 -    end;
 -
 -    PDBCONTACTWRITESETTING = ^TDBCONTACTWRITESETTING;
 -    TDBCONTACTWRITESETTING = record
 -        { module sig to write this setting under }
 -        szModule: PChar;
 -        { setting name to write }
 -        szSetting: PChar;
 -        { variant containing value to set }
 -        value: TDBVARIANT;
 -    end;
 +  PDBCONTACTGETSETTING = ^TDBCONTACTGETSETTING;
 +  TDBCONTACTGETSETTING = record
 +    szModule : PAnsiChar;  // name of the module that wrote the setting to get
 +    szSetting: PAnsiChar;  // the name of the setting to get
 +    pValue   : PDBVARIANT; // pointer to DBVARIANT to receive the value
 +  end;
 +
 +  PDBCONTACTWRITESETTING = ^TDBCONTACTWRITESETTING;
 +  TDBCONTACTWRITESETTING = record
 +    szModule : PAnsiChar;  // module sig to write this setting under
 +    szSetting: PAnsiChar;  // setting name to write
 +    value    : TDBVARIANT; // variant containing value to set
 +  end;
  const
 -
 -    {
 -        wParam : Handle of a contact to get the setting for (see notes)
 -        lParam : pointer to a TDBCONTACTGETSETTING structure to be filled with setting
 -                 this structure also has to be initalised (see notes)
 -        affect : Queries the database module for a setting from a contact.
 -        returns: 0 on success, non zero on failure (contact not found, setting doesn't exist)
 -        notes  : TDBCONTACTGETSETTING must be filled with the module name that created
 -                 /wrote the setting you want to get (e.g. your module name)
 -                 and the actual setting to read with TDBCONTACTGETSETTING.szModule and
 -                 TDBCONTACTGETSETTING.szSetting -- TDBCONTACTGETSETTING.pValue is
 -                 a pointer to a TDBVARIANT with the returned setting, this maybe nil
 -                 and MUST be freed after you're done with it with FreeVariant()
 -
 -                 There are helper functions for reading/writing/deleting common types to and
 -                 from the database -- see DBGetContactSetting<type>
 -
 -                 the contact handle (hContact) can be returned by FindContact/AddContact
 -    }
 -    MS_DB_CONTACT_GETSETTING        = 'DB/Contact/GetSetting';
 -
 -    {
 -        wParam : Handle for a contact to query a setting for
 -        lParam : Pointer to a TDBCONTACTGETSETTING structure
 -        affects: This service is almost the same as the one above, but it does
 -                 not return a dynamic copy (with malloc()) -- the caller
 -                 must do this for datatypes which require it, e.g. a string.
 -
 -                 This means the TDBCONTACTGETSETTING.pValue *has* to exist and be
 -                 allocated by the caller (doesn't have to be allocated from the heap)
 -                 the DBVARIANT structure has to be initalised with the type wanted
 -                 and enough buffer space around to return the info, do not
 -                 expect this service to be as fast as the one above.
 -
 -        returns: 0 on success, non zero on failure.
 -    }
 -    MS_DB_CONTACT_GETSETTINGSTATIC  = 'DB/Contact/GetSettingStatic';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a TDBVARIANT structure
 -        affect : Free's the passed DBVARIANT's dynamic memory (if any) see notes
 -        returns: 0 on success, non zero on failure
 -        notes  : use the helper function FreeVariant()
 -    }
 -    MS_DB_CONTACT_FREEVARIANT       = 'DB/Contact/FreeVariant';
 -
 -    {
 -        wParam : Handle to contact to write setting for
 -        lParam : Pointer to TDBCONTACTWRITESETTING which must be initalised
 -        affects: writes a setting under a contact -- TDBCONTACTWRITESETTING structure
 -                 must contain the module name writing -- the setting name, and the value
 -                 to write (which is NOT a pointer) .szModule, .szSetting, .Value, see notes
 -        returns: 0 on success, non zero on failure
 -        notes  : this service triggers 'DB/Contact/SettingChanged' before it returns
 -                 as always, there is a helper function to use this service.
 -    }
 -    MS_DB_CONTACT_WRITESETTING      = 'DB/Contact/WriteSetting';
 -
 -    {
 -        wParam : hContact under which the setting should be deleted
 -        lParam : Pointer to a TDBCONTACTGETSETTING structure
 -        affects: Deletes the given setting for a contact, the TDBCONTACTGETSETTING.pValue
 -                 field is ignored -- only .szModule and .szSetting are needed, see notes
 -        returns: 0 on success, non zero on failure
 -        notes  : triggers 'DB/Contact/SettingChanged' BEFORE it deletes the given
 -                 setting, when the service returns the TDBVARIANT structure .type_ is set
 -                 to 0 and no fields are valid, there is a helper function for this
 -                 service, see below.
 -    }
 -    MS_DB_CONTACT_DELETESETTING     = 'DB/Contact/DeleteSetting';
 +  {
 +    wParam : Handle of a contact to get the setting for (see notes)
 +    lParam : pointer to a TDBCONTACTGETSETTING structure to be filled with setting
 +             this structure also has to be initalised (see notes)
 +    affect : Queries the database module for a setting from a contact.
 +    returns: 0 on success, non zero on failure (contact not found, setting doesn't exist)
 +    notes  : TDBCONTACTGETSETTING must be filled with the module name that created
 +             /wrote the setting you want to get (e.g. your module name)
 +             and the actual setting to read with TDBCONTACTGETSETTING.szModule and
 +             TDBCONTACTGETSETTING.szSetting -- TDBCONTACTGETSETTING.pValue is
 +             a pointer to a TDBVARIANT with the returned setting, this maybe nil
 +             and MUST be freed after you're done with it with FreeVariant()
 +
 +             There are helper functions for reading/writing/deleting common types to and
 +             from the database -- see DBGetContactSetting<type>
 +
 +             the contact handle (hContact) can be returned by FindContact/AddContact
 +  }
 +  MS_DB_CONTACT_GETSETTING:PAnsiChar = 'DB/Contact/GetSetting';
 +
 +  {
 +    DB/Contact/GetSettingString service  0.4.3+
 +    Same as DB/Contact/GetSetting, but also gets the required string type
 +    inside the dbcgs->type parameter
 +  }
 +  MS_DB_CONTACT_GETSETTING_STR:PAnsiChar = 'DB/Contact/GetSettingStr';
 +
 +  {
 +    wParam : Handle for a contact to query a setting for
 +    lParam : Pointer to a TDBCONTACTGETSETTING structure
 +    affects: This service is almost the same as the one above, but it does
 +             not return a dynamic copy (with malloc()) -- the caller
 +             must do this for datatypes which require it, e.g. a string.
 +
 +             This means the TDBCONTACTGETSETTING.pValue *has* to exist and be
 +             allocated by the caller (doesn't have to be allocated from the heap)
 +             the DBVARIANT structure has to be initalised with the type wanted
 +             and enough buffer space around to return the info, do not
 +             expect this service to be as fast as the one above.
 +
 +    returns: 0 on success, non zero on failure.
 +  }
 +  MS_DB_CONTACT_GETSETTINGSTATIC:PAnsiChar = 'DB/Contact/GetSettingStatic';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to a TDBVARIANT structure
 +    affect : Free's the passed DBVARIANT's dynamic memory (if any) see notes
 +    returns: 0 on success, non zero on failure
 +    notes  : use the helper function FreeVariant()
 +  }
 +  MS_DB_CONTACT_FREEVARIANT:PAnsiChar = 'DB/Contact/FreeVariant';
 +
 +  {
 +    wParam : Handle to contact to write setting for
 +    lParam : Pointer to TDBCONTACTWRITESETTING which must be initalised
 +    affects: writes a setting under a contact -- TDBCONTACTWRITESETTING structure
 +             must contain the module name writing -- the setting name, and the value
 +             to write (which is NOT a pointer) .szModule, .szSetting, .Value, see notes
 +    returns: 0 on success, non zero on failure
 +    notes  : this service triggers 'DB/Contact/SettingChanged' before it returns
 +             as always, there is a helper function to use this service.
 +  }
 +  MS_DB_CONTACT_WRITESETTING:PAnsiChar = 'DB/Contact/WriteSetting';
 +
 +  {
 +    wParam : hContact under which the setting should be deleted
 +    lParam : Pointer to a TDBCONTACTGETSETTING structure
 +    affects: Deletes the given setting for a contact, the TDBCONTACTGETSETTING.pValue
 +             field is ignored -- only .szModule and .szSetting are needed, see notes
 +    returns: 0 on success, non zero on failure
 +    notes  : triggers 'DB/Contact/SettingChanged' BEFORE it deletes the given
 +             setting, when the service returns the TDBVARIANT structure .type_ is set
 +             to 0 and no fields are valid, there is a helper function for this
 +             service, see below.
 +  }
 +  MS_DB_CONTACT_DELETESETTING:PAnsiChar = 'DB/Contact/DeleteSetting';
      {
          wParam : Handle of a contact to enum settings for
 @@ -198,457 +141,548 @@ const      }
  type
 +  TDBSETTINGENUMPROC = function(const szSetting: PAnsiChar; lParam: LPARAM): int; cdecl;
 -    TDBSETTINGENUMPROC = function(const szSetting: PChar; lParam: LPARAM): int; cdecl;
 -
 -    PDBCONTACTENUMSETTINGS = ^TDBCONTACTENUMSETTINGS;
 -    TDBCONTACTENUMSETTINGS = record
 -        { function pointer to call to start the enum via MS_DB_CONTACT_ENUMSETTINGS }
 -        pfnEnumProc: TDBSETTINGENUMPROC;
 -        { passed to the above function }
 -        lParam: LPARAM;
 -        { name of the module to get settings for }
 -        szModule: PChar;
 -        { not used by us }
 -        ofsSettings: DWORD;
 -    end;
 +  PDBCONTACTENUMSETTINGS = ^TDBCONTACTENUMSETTINGS;
 +  TDBCONTACTENUMSETTINGS = record
 +    pfnEnumProc: TDBSETTINGENUMPROC; // function pointer to call to start the
 +                                     // enum via MS_DB_CONTACT_ENUMSETTINGS
 +    lParam     : LPARAM;             // passed to the above function
 +    szModule   : PAnsiChar;          // name of the module to get settings for
 +    ofsSettings: DWORD;              // not used by us
 +  end;
  const
 -
 -    MS_DB_CONTACT_ENUMSETTINGS      = 'DB/Contact/EnumSettings';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        affect : none
 -        returns: Returns the number of contacts in the database for the loaded profile
 -                 not including the profile user, see notes.
 -        notes  : the contacts in the database can be read with FindFirst/FindNext
 -    }
 -    MS_DB_CONTACT_GETCOUNT          = 'DB/Contact/GetCount';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        returns: Returns a handle to the first contact in the database,
 -                 this handle does not need to be closed, if there are no users
 -                 NULL(0) is returned.
 -    }
 -    MS_DB_CONTACT_FINDFIRST         = 'DB/Contact/FindFirst';
 -
 -    {
 -        wParam : Contact handle
 -        lParam : 0
 -        returns: Returns a handle to the next contact after the given contact in
 -                 wParam, this handle does not neeed to be closed -- may return NULL(0)
 -                 if the given contact in wParam was the last in the database, or the
 -                 given contact was invalid
 -    }
 -    MS_DB_CONTACT_FINDNEXT          = 'DB/Contact/FindNext';
 -
 -    {
 -        wParam : Handle of a contact to delete
 -        lParam : 0
 -        affect : the user by the given handle is deleted from the database, see notes
 -        returns: Returns 0 on success or nonzero if the handle was invalid
 -        notes  : this triggers DB/Contact/Deleted BEFORE it actually deletes the contact
 -                 all events are also deleted -- other modules may end up with invalid
 -                 handles because of this, which they should be prepared for.
 -    }
 -    MS_DB_CONTACT_DELETE            = 'DB/Contact/Delete';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        affects: creates a new contact in the database, they have no settings,
 -                 settings must be added with MS_DB_CONTACT_WRITESETTING or
 -                 database helper functions for writing, see notes
 -        returns: A handle to a new contact or NULL(0) on failure.
 -        notes  : triggers the ME_DB_CONTACT_ADDED event just before the service returns
 -    }
 -    MS_DB_CONTACT_ADD               = 'DB/Contact/Add';
 -
 -
 -	{ 
 -		wParam : (HANDLE) hContact
 -		lParam : 0
 -		affects: Checks the given handle within the database for valid information, for
 -			     a proper internal header.
 -		returns: Returns 1 if the contact handle is valid, 0 if it is not
 -		notes  : Due to the nature of multiple threading a contact handle can be deleted
 -				 soon after this service has returned a handle as valid, however it will never point
 -				 to another contact.
 -	}
 -	MS_DB_CONTACT_IS 				= 'DB/Contact/Is';
 -
 -
 -    {
 -        wParam : contact handle for events count is needed
 -        lParam : 0
 -        service: Gets the number of events in the chain belonging to a contact
 -                 in the databasee.
 -        returns: the numbef of events owned by hContact or -1 if hContact
 -                 is invalid, they can be found with the event/find* servicees
 -    }
 -    MS_DB_EVENT_GETCOUNT            = 'DB/Event/GetCount';
 -
 -    {
 -        wParam : contact handle to add an event for
 -        lParam : Pointer to TDBEVENTINFO initialised with data
 -        affect : Add's an event to the contact's event list, the TDBEVENTINFO
 -                 structure should be filled with the event of message -- see notes
 -        returns: a handle to a DB event (HDBEVENT), or NULL on error
 -        notes  : Triggers DB/Event/Added event just before it returns,
 -                 Events are sorted chronologically as they are entered,
 -                 so you cannot guarantee that the new hEvent is the last event in the chain,
 -                 however if a new event is added that has a timestamp less than
 -                 90 seconds *before* the event that should be after it,
 -                 it will be added afterwards, to allow for protocols that only
 -                 store times to the nearest minute, and slight delays in transports.
 -                 There are a few predefined eventTypes below for easier compatibility, but
 -                 modules are free to define their own, beginning at 2000
 -                 DBEVENTINFO.timestamp is in GMT, as returned by time()
 -    }
 -
 -    DBEF_FIRST = 1;     // internally only, do not use
 -    DBEF_SENT  = 2;     // if set, the event was sent by the user, otherwise it was received
 -    DBEF_READ  = 4;     // event has been read by the user -- only needed for history
 -
 -    EVENTTYPE_MESSAGE       = 0;
 -    EVENTTYPE_URL           = 1;
 -    EVENTTYPE_CONTACTS      = 2;     // v0.1.2.2+
 -    EVENTTYPE_ADDED         = 1000;  // v0.1.1.0+: these used to be module-
 -    EVENTTYPE_AUTHREQUEST   = 1001;  // specific codes, hence the module-
 -    EVENTTYPE_FILE          = 1002;  // specific limit has been raised to 2000
 +  MS_DB_CONTACT_ENUMSETTINGS:PAnsiChar = 'DB/Contact/EnumSettings';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    affect : none
 +    returns: Returns the number of contacts in the database for the loaded profile
 +             not including the profile user, see notes.
 +    notes  : the contacts in the database can be read with FindFirst/FindNext
 +  }
 +  MS_DB_CONTACT_GETCOUNT:PAnsiChar = 'DB/Contact/GetCount';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    returns: Returns a handle to the first contact in the database,
 +             this handle does not need to be closed, if there are no users
 +             NULL(0) is returned.
 +  }
 +  MS_DB_CONTACT_FINDFIRST:PAnsiChar = 'DB/Contact/FindFirst';
 +
 +  {
 +    wParam : Contact handle
 +    lParam : 0
 +    returns: Returns a handle to the next contact after the given contact in
 +             wParam, this handle does not neeed to be closed -- may return NULL(0)
 +             if the given contact in wParam was the last in the database, or the
 +             given contact was invalid
 +  }
 +  MS_DB_CONTACT_FINDNEXT:PAnsiChar = 'DB/Contact/FindNext';
 +
 +  {
 +    wParam : Handle of a contact to delete
 +    lParam : 0
 +    affect : the user by the given handle is deleted from the database, see notes
 +    returns: Returns 0 on success or nonzero if the handle was invalid
 +    notes  : this triggers DB/Contact/Deleted BEFORE it actually deletes the contact
 +             all events are also deleted -- other modules may end up with invalid
 +             handles because of this, which they should be prepared for.
 +  }
 +  MS_DB_CONTACT_DELETE:PAnsiChar = 'DB/Contact/Delete';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    affects: creates a new contact in the database, they have no settings,
 +             settings must be added with MS_DB_CONTACT_WRITESETTING or
 +             database helper functions for writing, see notes
 +    returns: A handle to a new contact or NULL(0) on failure.
 +    notes  : triggers the ME_DB_CONTACT_ADDED event just before the service returns
 +  }
 +  MS_DB_CONTACT_ADD:PAnsiChar = 'DB/Contact/Add';
 +
 +
 +  {
 +    wParam : (HANDLE) hContact
 +    lParam : 0
 +    affects: Checks the given handle within the database for valid information, for
 +           a proper internal header.
 +    returns: Returns 1 if the contact handle is valid, 0 if it is not
 +    notes  : Due to the nature of multiple threading a contact handle can be deleted
 +         soon after this service has returned a handle as valid, however it will never point
 +         to another contact.
 +  }
 +  MS_DB_CONTACT_IS:PAnsiChar = 'DB/Contact/Is';
 +
 +//************************** Event *********************************
 +
 +{ DB/EventType/Register service (0.7+)
 +Registers the specified database event type, with module, id & description.
 +When someone needs to retrieve an event's text, a service named Module/GetEventText<id>
 +will be called. For example, for module named 'foo' and event id 2000 a service
 +foo/GetEventText2000 should be defined to process this request. That handler should 
 +decode a blob and return the event text in the required format, its prototype is identical
 +to a call of MS_DB_EVENT_GETTEXT (see below)
 +  wParam=0
 +  lParam=(LPARAM)(DBEVENTTYPEDESCR*)
 +Always returns 0.
 +}
  type
 -
 -    PDBEVENTINFO = ^TDBEVENTINFO;
 -    TDBEVENTINFO = record
 -        { size of the structure }
 -        cbSize: int;
 -        { module that 'owns' this event and controls the data format }
 -        szModule: PChar;
 -        { timestamp in UNIX time }
 -        timestamp: DWORD;
 -        { the DBEF_* flags above }
 -        flags: DWORD;
 -        { event type, such as message, can be module defined }
 -        eventType: WORD;
 -        { size in bytes of pBlob^ }
 -        cbBlob: DWORD;
 -        { pointer to buffer containing the module defined event data }
 -        pBlob: PByte;
 -    end;
 +  PDBEVENTTYPEDESCR = ^TDBEVENTTYPEDESCR;
 +  TDBEVENTTYPEDESCR = record
 +    cbSize     :int;      // structure size in bytes
 +    module     :PAnsiChar;    // event module name
 +    eventType  :int;      // event id, unique for this module
 +    descr      :PAnsiChar;    // event type description (i.e. "File Transfer")
 +    textService:PAnsiChar;    // service name for MS_DB_EVENT_GETTEXT (0.8+, default Module+'/GetEventText'+EvtID)
 +    iconService:PAnsiChar;    // service name for MS_DB_EVENT_GETICON (0.8+, default Module+'/GetEventIcon'+EvtID)
 +    eventIcon  :THANDLE;  // icolib handle to eventicon (0.8+, default 'eventicon_'+Module+EvtID)
 +    flags      :DWORD;    // flags, combination of the DETF_*
 +  end;
  const
 +// constants for default event behaviour
 +  DETF_HISTORY   = 1; // show event in history
 +  DETF_MSGWINDOW = 2; // show event in message window
 +  DETF_NONOTIFY  = 4; // block event notify (e.g. Popups)
 -    MS_DB_EVENT_ADD                 = 'DB/Event/Add';
 -
 -
 -
 -    {
 -        wParam : Handle to the contact
 -        lParam : HDBEVENT handle to delete
 -        affects: Removes a single event from the database for the given contact
 -        returns: 0 on success, nonzero on failure
 -        notes  : Triggers DB/Event/Deleted just before the event *is* deleted
 -    }
 -    MS_DB_EVENT_DELETE              = 'DB/Event/Delete';
 -
 -    {
 -        wParam : Handle to DB event
 -        lParam : 0
 -        returns: Returns the space in bytes requried to store the blob in HDBEVENT
 -                 given by HDBEVENT(wParam) -- or -1 on error
 -    }
 -    MS_DB_EVENT_GETBLOBSIZE         = 'DB/Event/GetBlobSize';
 -
 -    {
 -        wParam : Handle to a DB event
 -        lParam : Pointer to a TDBEVENTINFO structure which must be initialised
 -        affects: Returns all the information about an DB event handle to a TDBEVENTINFO
 -                 structure which must be initalised, DBEI.cbSize, DBEI.pBlob and DBEI.cbSize
 -                 before calling this service, the size can be assertained with
 -                 GetBlobSize() service, see notes
 -        returns: Returns 0 on success, non zero on failure
 -        notes  : The correct value dbe.cbBlob can be got using db/event/getblobsize
 -                 If successful, all the fields of dbe are filled. dbe.cbBlob is set to the
 -                 actual number of bytes retrieved and put in dbe.pBlob
 -                 If dbe.cbBlob is too small, dbe.pBlob is filled up to the size of dbe.cbBlob
 -                 and then dbe.cbBlob is set to the required size of data to go in dbe.pBlob
 -                 On return, dbe.szModule is a pointer to the database module's
 -                 own internal list of modules. Look but don't touch.
 -    }
 -    MS_DB_EVENT_GET                 = 'DB/Event/Get';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : HDBEVENT
 -        affect : Changes the flag for an event to mark it as read
 -        Returns: Returns the entire flag DWORD for the event after the change, or -1
 -                 if HDBEVENT is invalid, see notes
 -        notes  : This iss one of the database write operations that does not trigger
 -                 an event, modules should not save flagss states for any length of time.
 -    }
 -    MS_DB_EVENT_MARKREAD            = 'DB/Event/MarkRead';
 -
 -    {
 -        wParam : HDBEVENT
 -        lParam : 0
 -        Affect : Returns a handle to a contact that owns the HDBEVENT,
 -                 see notes
 -        Returns: Returns a handle if successful or HDBEEVENT(-1) on failure
 -        notes  : This service is very slow, only use wheen you have no other choice
 -                 at all.
 -    }
 -    MS_DB_EVENT_GETCONTACT          = 'DB/Event/GetContact';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affect : Retrieves a handlee to the first event in the chain
 -                 for a HCONTACT
 -        returns: Returns a handle, or NULL(0) if HCONTACT is invalid or has
 -                 no events, events in a chain are sorted chronologically automatically
 -    }
 -    MS_DB_EVENT_FINDFIRST           = 'DB/Event/FindFirst';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affect : Retrieves a handle to the first unreead event in a chain for a HCONTACT
 -                 see notes
 -        Returns: Returns a HDBEVENT handle or NULL(0) if the HCONTACT is invalid
 -                 or all it's events have beeen read.
 -        Notes  : Events in a chain are sorted chronologically automatically,
 -                 but this does not necessarily mean that all events after
 -                 the first unread are unread too.
 -                 They should be checked individually with event/findnext and event/get
 -                 This service is designed for startup, reloading all the events that remained
 -                 unread from last time
 -    }
 -    MS_DB_EVENT_FINDFIRSTUNREAD     = 'DB/Event/FindFirstUnread';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0;
 -        Affects: Retrieves a handle to the lasts event in the chain for a HCONTACT
 -        Returns: Returns a handle or NULL(0) if HCONTACT is invalid or has no events
 -    }
 -    MS_DB_EVENT_FINDLAST            = 'DB/Event/FindLast';
 -
 -    {
 -        wParam : HDBEVENT
 -        lParam : 0
 -        Affects: Retrieves a handle to the next event in a chain after HDBEVENT
 -        Returns: A handle to the next DB event or NULL(0) if HDBEVENT is invalid
 -                 or the last event in the chain.
 -    }
 -    MS_DB_EVENT_FINDNEXT            = 'DB/Event/FindNext';
 -
 -    {
 -        wParam : HDBEVENT
 -        lParam : 0
 -        Affects: Retrieves a handle to the previous event in a chain before HDBEVENT
 -        Returns: A handle to the previous HDBEVENT or NULL(0) if HDBEVENT is invalid
 -                 or is the first event in the chain
 -    }
 -    MS_DB_EVENT_FINDPREV            = 'DB/Event/FindPrev';
 -
 -
 -
 -    {
 -        wParam : size in bytes of string buffer (including null term)
 -        lParam : pointer to string buffer
 -        Affect : Scrambles the string buffer in place using a strange encryption algorithm,
 -                 see notes
 -        Returns: Always returns 0
 -        notes  : this service may be changed at a later date such that it increasess
 -                 the length of the string
 -    }
 -    MS_DB_CRYPT_ENCODESTRING        = 'DB/Crypt/EncodeString';
 -
 -    {
 -        wParam : size in bytes of string buffer, including null term
 -        lParam : pointer to string buffer
 -        Affect : Descrambles pszString in-place using the strange encryption algorithm,
 -                 see notes.
 -        Return : Always returns 0
 -        notes  : Reverses the operation done by MS_DB_CRYPT_ENCODINGSTRING
 -    }
 -    MS_DB_CRYPT_DECODESTRING        = 'DB/Crypt/DecodeString';
 -
 -
 -
 -    {
 -        wParam : timestamp (DWORD)
 -        lParam : 0
 -        Affect : Converts a GMT timestap into local time
 -        Returns: Returns the converted value, see notes
 -        Notes  : Timestamps have a zereo at midnight 1/1/1970 GMT, this service
 -                 converts such a value to be based at midnight 1/1/1970 local time.
 -                 This service does not use a simple conversion based on the current offset
 -                 between GMT and local. Rather, it figures out whether daylight savings time
 -                 would have been in place at the time of the stamp and gives the local time as
 -                 it would have been at the time and date the stamp contains.
 -    }
 -    MS_DB_TIME_TIMESTAMPTOLOCAL     = 'DB/Time/TimestampToLocal';
 +const
 +  DBEVENTTYPEDESCR_SIZE    = sizeof(TDBEVENTTYPEDESCR);
 +  {$IFNDEF WIN64}
 +  DBEVENTTYPEDESCR_SIZE_V1 = $10;
 +  {$ELSE}
 +  DBEVENTTYPEDESCR_SIZE_V1 = DBEVENTTYPEDESCR_SIZE;
 +  {$ENDIF}
 -    {
 -        wParam : timestamp (DWORD)
 -        lParam : pointer to initalised DBTIMETOSTRING structure
 -        Affect : Converts a GMT timestamp to a customisable local time string
 -                 see notes
 -        Returns: Always returns 0
 -        notes  : The string is formatted according to thhe current user's locale
 -                 language and preference --
 -
 -                 .szFormat can have the following special chars :
 -                    t       time without seconds, e.g. hh:mm
 -                    s       time with seconds, e.g. hh:mm:ss
 -                    m       time without minutes e.g. hh
 -                    d       short date, e.g. dd/mm/yyyy
 -                    D       long date, e.g. d mmmm yyyy
 -
 -                 all other characters are copied as is.
 -    }
 +const
 +  MS_DB_EVENT_REGISTERTYPE:PAnsiChar = 'DB/EventType/Register';
 +
 +  { DB/EventType/Get service (0.7+)
 +  Retrieves the previously registered database event type, by module & id.
 +    wParam=(WPARAM)(AnsiChar*)szModule
 +    lParam=(LPARAM)(int)eventType
 +  Returns DBEVENTTYPEDESCR* or NULL, if an event isn't found.
 +  }
 +  MS_DB_EVENT_GETTYPE:PAnsiChar = 'DB/EventType/Get';
 +
 +  {
 +    wParam : contact handle for events count is needed
 +    lParam : 0
 +    service: Gets the number of events in the chain belonging to a contact
 +             in the databasee.
 +    returns: the numbef of events owned by hContact or -1 if hContact
 +             is invalid, they can be found with the event/find* servicees
 +  }
 +  MS_DB_EVENT_GETCOUNT:PAnsiChar = 'DB/Event/GetCount';
 +
 +  {
 +    wParam : contact handle to add an event for
 +    lParam : Pointer to TDBEVENTINFO initialised with data
 +    affect : Add's an event to the contact's event list, the TDBEVENTINFO
 +             structure should be filled with the event of message -- see notes
 +    returns: a handle to a DB event (HDBEVENT), or NULL on error
 +    notes  : Triggers DB/Event/Added event just before it returns,
 +             Events are sorted chronologically as they are entered,
 +             so you cannot guarantee that the new hEvent is the last event in the chain,
 +             however if a new event is added that has a timestamp less than
 +             90 seconds *before* the event that should be after it,
 +             it will be added afterwards, to allow for protocols that only
 +             store times to the nearest minute, and slight delays in transports.
 +             There are a few predefined eventTypes below for easier compatibility, but
 +             modules are free to define their own, beginning at 2000
 +             DBEVENTINFO.timestamp is in GMT, as returned by time()
 +  }
 +
 +  DBEF_FIRST =  1; // internally only, do not use
 +  DBEF_SENT  =  2; // if set, the event was sent by the user, otherwise it was received
 +  DBEF_READ  =  4; // event has been read by the user -- only needed for history
 +  DBEF_RTL   =  8; // event contains the right-to-left aligned text
 +  DBEF_UTF   = 16; // event contains a text in utf-8
 +
 +  EVENTTYPE_MESSAGE     = 0;
 +  EVENTTYPE_URL         = 1;
 +  EVENTTYPE_CONTACTS    = 2;     // v0.1.2.2+
 +  EVENTTYPE_ADDED       = 1000;  // v0.1.1.0+: these used to be module-
 +  EVENTTYPE_AUTHREQUEST = 1001;  // specific codes, hence the module-
 +  EVENTTYPE_FILE        = 1002;  // specific limit has been raised to 2000
  type
 -
 -    PDBTIMETOSTRING = ^TDBTIMETOSTRING;
 -    TDBTIMETOSTRING = record
 -        { format string, see above }
 -        szFormat: PChar;
 -        { pointer to dest buffer to store the result }
 -        szDest: PChar;
 -        { size of the buffer }
 -        cbDest: int;
 -    end;
 +  PDBEVENTINFO = ^TDBEVENTINFO;
 +  TDBEVENTINFO = record
 +    cbSize   : int;  // size of the structure
 +    szModule : PAnsiChar; // module that 'owns' this event and controls the data format
 +    timestamp: DWORD; // timestamp in UNIX time
 +    flags    : DWORD; // the DBEF_* flags above
 +    eventType: WORD;  // event type, such as message, can be module defined
 +    cbBlob   : DWORD; // size in bytes of pBlob^
 +    pBlob    : PByte; // pointer to buffer containing the module defined event data
 +  end;
  const
 +  MS_DB_EVENT_ADD:PAnsiChar = 'DB/Event/Add';
 +
 +  {
 +    wParam : Handle to the contact
 +    lParam : HDBEVENT handle to delete
 +    affects: Removes a single event from the database for the given contact
 +    returns: 0 on success, nonzero on failure
 +    notes  : Triggers DB/Event/Deleted just before the event *is* deleted
 +  }
 +  MS_DB_EVENT_DELETE:PAnsiChar = 'DB/Event/Delete';
 +
 +  {
 +    wParam : Handle to DB event
 +    lParam : 0
 +    returns: Returns the space in bytes requried to store the blob in HDBEVENT
 +             given by HDBEVENT(wParam) -- or -1 on error
 +  }
 +  MS_DB_EVENT_GETBLOBSIZE:PAnsiChar = 'DB/Event/GetBlobSize';
 +
 +  {
 +    wParam : Handle to a DB event
 +    lParam : Pointer to a TDBEVENTINFO structure which must be initialised
 +    affects: Returns all the information about an DB event handle to a TDBEVENTINFO
 +             structure which must be initalised, DBEI.cbSize, DBEI.pBlob and DBEI.cbSize
 +             before calling this service, the size can be assertained with
 +             GetBlobSize() service, see notes
 +    returns: Returns 0 on success, non zero on failure
 +    notes  : The correct value dbe.cbBlob can be got using db/event/getblobsize
 +             If successful, all the fields of dbe are filled. dbe.cbBlob is set to the
 +             actual number of bytes retrieved and put in dbe.pBlob
 +             If dbe.cbBlob is too small, dbe.pBlob is filled up to the size of dbe.cbBlob
 +             and then dbe.cbBlob is set to the required size of data to go in dbe.pBlob
 +             On return, dbe.szModule is a pointer to the database module's
 +             own internal list of modules. Look but don't touch.
 +  }
 +  MS_DB_EVENT_GET:PAnsiChar = 'DB/Event/Get';
 +
 +  { DB/Event/GetText (0.7.0+)
 +    Retrieves the event's text
 +      wParam=0
 +      lParam=pointer to TDBEVENTGETTEXT
 +    dbe should be the valid database event read via MS_DB_EVENT_GET
 +    Only events of type EVENTTYPE_MESSAGE are supported.
 +    Function returns a pointer to a string in the required format.
 +    This string should be freed by a call of mir_free
 +  }
 +type
 +  TDBEVENTGETTEXT = record
 +    dbei:PDBEVENTINFO;
 +    datatype:int; // DBVT_ASCIIZ, DBVT_WCHAR (DBVT_TCHAR)
 +    codepage:int;
 +  end;
 +const  
 +  MS_DB_EVENT_GETTEXT:PAnsiChar = 'DB/Event/GetText';
 +
 +  { DB/Event/GetIcon (0.7.0.1+)
 +    wParam : flags - use LR_SHARED for shared HICON
 +    lParam : dbei - pointer to DBEVENTINFO
 +    affect : Retrieves the event's icon
 +    Returns: HICON (use DestroyIcon to release resources if not LR_SHARED)
 +    notes  : dbei should be a valid database event read via MS_DB_EVENT_GET
 +             A plugin can register the standard event icon in IcoLib named
 +             'eventicon_'+Module+EvtID,like eventicon_ICQ2001. Otherwise, to declare an icon
 +             with the non-standard name, you can declare the special service,
 +             Module/GetEventIcon<id>, which will retrieve the custom icon handle (HICON). This
 +             service function has the same parameters MS_DB_EVENT_GETICON does.
 +  }
 +  MS_DB_EVENT_GETICON:PAnsiChar = 'DB/Event/GetIcon';
 +
 +{ DB/Event/GetString (0.9.0+)
 +  Converts the event's string to TCHAR* depending on the event's format
 +  wParam=(LPARAM)(DBEVENTINFO*)dbei
 +  lParam=(WPARAM)(char*)str - string to be converted
 +  returns TCHAR* - the converted string
 +  Caller must free the result using mir_free
 +}
 +
 +  MS_DB_EVENT_GETSTRINGT:PAnsiChar = 'DB/Event/GetStringT';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : HDBEVENT
 +    affect : Changes the flag for an event to mark it as read
 +    Returns: Returns the entire flag DWORD for the event after the change, or -1
 +             if HDBEVENT is invalid, see notes
 +    notes  : This iss one of the database write operations that does not trigger
 +             an event, modules should not save flagss states for any length of time.
 +  }
 +  MS_DB_EVENT_MARKREAD:PAnsiChar = 'DB/Event/MarkRead';
 +
 +  {
 +    wParam : HDBEVENT
 +    lParam : 0
 +    Affect : Returns a handle to a contact that owns the HDBEVENT,
 +             see notes
 +    Returns: Returns a handle if successful or HDBEEVENT(-1) on failure
 +    notes  : This service is very slow, only use wheen you have no other choice
 +             at all.
 +  }
 +  MS_DB_EVENT_GETCONTACT:PAnsiChar = 'DB/Event/GetContact';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affect : Retrieves a handlee to the first event in the chain
 +             for a HCONTACT
 +    returns: Returns a handle, or NULL(0) if HCONTACT is invalid or has
 +             no events, events in a chain are sorted chronologically automatically
 +  }
 +  MS_DB_EVENT_FINDFIRST:PAnsiChar = 'DB/Event/FindFirst';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affect : Retrieves a handle to the first unreead event in a chain for a HCONTACT
 +             see notes
 +    Returns: Returns a HDBEVENT handle or NULL(0) if the HCONTACT is invalid
 +             or all it's events have beeen read.
 +    Notes  : Events in a chain are sorted chronologically automatically,
 +             but this does not necessarily mean that all events after
 +             the first unread are unread too.
 +             They should be checked individually with event/findnext and event/get
 +             This service is designed for startup, reloading all the events that remained
 +             unread from last time
 +  }
 +  MS_DB_EVENT_FINDFIRSTUNREAD:PAnsiChar = 'DB/Event/FindFirstUnread';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : 0;
 +    Affects: Retrieves a handle to the lasts event in the chain for a HCONTACT
 +    Returns: Returns a handle or NULL(0) if HCONTACT is invalid or has no events
 +  }
 +  MS_DB_EVENT_FINDLAST:PAnsiChar = 'DB/Event/FindLast';
 +
 +  {
 +    wParam : HDBEVENT
 +    lParam : 0
 +    Affects: Retrieves a handle to the next event in a chain after HDBEVENT
 +    Returns: A handle to the next DB event or NULL(0) if HDBEVENT is invalid
 +             or the last event in the chain.
 +  }
 +  MS_DB_EVENT_FINDNEXT:PAnsiChar = 'DB/Event/FindNext';
 +
 +  {
 +    wParam : HDBEVENT
 +    lParam : 0
 +    Affects: Retrieves a handle to the previous event in a chain before HDBEVENT
 +    Returns: A handle to the previous HDBEVENT or NULL(0) if HDBEVENT is invalid
 +             or is the first event in the chain
 +  }
 +  MS_DB_EVENT_FINDPREV:PAnsiChar = 'DB/Event/FindPrev';
 +
 +//************************** Encryption ****************************
 +
 +  {
 +    wParam : size in bytes of string buffer (including null term)
 +    lParam : pointer to string buffer
 +    Affect : Scrambles the string buffer in place using a strange encryption algorithm,
 +             see notes
 +    Returns: Always returns 0
 +    notes  : this service may be changed at a later date such that it increasess
 +             the length of the string
 +  }
 +  MS_DB_CRYPT_ENCODESTRING:PAnsiChar = 'DB/Crypt/EncodeString';
 +
 +  {
 +    wParam : size in bytes of string buffer, including null term
 +    lParam : pointer to string buffer
 +    Affect : Descrambles pszString in-place using the strange encryption algorithm,
 +             see notes.
 +    Return : Always returns 0
 +    notes  : Reverses the operation done by MS_DB_CRYPT_ENCODINGSTRING
 +  }
 +  MS_DB_CRYPT_DECODESTRING:PAnsiChar = 'DB/Crypt/DecodeString';
 +
 +//**************************** Time ********************************
 +
 +  {
 +    wParam : timestamp (DWORD)
 +    lParam : 0
 +    Affect : Converts a GMT timestap into local time
 +    Returns: Returns the converted value, see notes
 +    Notes  : Timestamps have a zereo at midnight 1/1/1970 GMT, this service
 +             converts such a value to be based at midnight 1/1/1970 local time.
 +             This service does not use a simple conversion based on the current offset
 +             between GMT and local. Rather, it figures out whether daylight savings time
 +             would have been in place at the time of the stamp and gives the local time as
 +             it would have been at the time and date the stamp contains.
 +  }
 +  MS_DB_TIME_TIMESTAMPTOLOCAL:PAnsiChar = 'DB/Time/TimestampToLocal';
 +
 +  {
 +    wParam : timestamp (DWORD)
 +    lParam : pointer to initalised DBTIMETOSTRING structure
 +    Affect : Converts a GMT timestamp to a customisable local time string
 +             see notes
 +    Returns: Always returns 0
 +    notes  : The string is formatted according to thhe current user's locale
 +             language and preference.
 +
 +   szFormat can have the following special chars :
 +      t  time without seconds, e.g. hh:mm
 +      s  time with seconds, e.g. hh:mm:ss
 +      m  time without minutes e.g. hh
 +      d  short date, e.g. dd/mm/yyyy
 +      D  long date, e.g. d mmmm yyyy
 +      I  ISO 8061 Time yyyy-mm-ddThh:mm:ssZ
 +
 +   all other characters are copied as is.
 +  }
 -    MS_DB_TIME_TIMESTAMPTOSTRING    = 'DB/Time/TimestampToString';
 -
 -
 -
 -    {
 -        wParam : newSetting (BOOLEAN)
 -        lParam : 0
 -        Affect : Miranda's database is normally protected against corruption by
 -                 aggressively flushing data to the disk on writes, if you're doing
 -                 alot of writes e.g. an import plugin, it can sometimes be desirable
 -                 to switch this feature off to speed up the process, if you do switch
 -                 it off, you must remember that crashes are far more likely to be
 -                 catastrophic, so switch it back on at the earliest possible opportunity.
 -                 if you're doing a lot of setting writes, the flush is already delayed
 -                 so you need not use this service for that purpose, see notes.
 -        Returns: Always returns 0 (successful)
 -        notes  : This is set to true initally
 -    }
 -    MS_DB_SETSAFETYMODE             = 'DB/SetSafetyMode';
 +type
 +  PDBTIMETOSTRING = ^TDBTIMETOSTRING;
 +  TDBTIMETOSTRING = record
 +    szFormat: TChar; // format string, see above
 +    szDest  : TChar; // pointer to dest buffer to store the result
 +    cbDest  : int;   // size of the buffer
 +  end;
 -    {
 -        wParam : (caller defined data) will be passed to lParam of the call back
 -        lParam : function pointer to TDBMODULEENUMPROC
 -        Affects: Enumerates the names of all modules that have stored or
 -                 requested information from the database,
 -                 the modules are returned in no real order --
 -                 Writing to the database while module names are being enumerated will cause
 -                 unpredictable results in the enumeration, but the write will work.
 -
 -                 the enumeration will stop if the callback returns a non zero value.
 -
 -        Returns: the last return value from the enumeration call back.
 -        Notes  : This service is only useful for debugging or EnumSettings
 -        version: The service registered to enumerate all modules that have touched
 -                 the database module uses wParam as the lParam cookie value and the lParam
 -                 value given here is the function pointer -- this is not safe
 -                 to use before v0.1.2.1 because I don't know if this was done in v0.1.2.1-
 -
 -                 prior to v0.1.2.1 you can not pass a value to the enumeration because
 -                 of a bug -- which is fixed, but hey :) -- [sam]
 -    }
 +const
 +  MS_DB_TIME_TIMESTAMPTOSTRING :PAnsiChar = 'DB/Time/TimestampToString';
 +  MS_DB_TIME_TIMESTAMPTOSTRINGT:PAnsiChar = 'DB/Time/TimestampToStringT';
 +
 +//*************************** Random *******************************
 +
 +  {
 +    wParam : newSetting (BOOLEAN)
 +    lParam : 0
 +    Affect : Miranda's database is normally protected against corruption by
 +             aggressively flushing data to the disk on writes, if you're doing
 +             alot of writes e.g. an import plugin, it can sometimes be desirable
 +             to switch this feature off to speed up the process, if you do switch
 +             it off, you must remember that crashes are far more likely to be
 +             catastrophic, so switch it back on at the earliest possible opportunity.
 +             if you're doing a lot of setting writes, the flush is already delayed
 +             so you need not use this service for that purpose, see notes.
 +    Returns: Always returns 0 (successful)
 +    notes  : This is set to true initally
 +  }
 +  MS_DB_SETSAFETYMODE:PAnsiChar = 'DB/SetSafetyMode';
 +
 +//*************************** Modules ******************************
 +  
 +  {
 +    wParam : (caller defined data) will be passed to lParam of the call back
 +    lParam : function pointer to TDBMODULEENUMPROC
 +    Affects: Enumerates the names of all modules that have stored or
 +             requested information from the database,
 +             the modules are returned in no real order --
 +             Writing to the database while module names are being enumerated will cause
 +             unpredictable results in the enumeration, but the write will work.
 +
 +             the enumeration will stop if the callback returns a non zero value.
 +
 +    Returns: the last return value from the enumeration call back.
 +    Notes  : This service is only useful for debugging or EnumSettings
 +    version: The service registered to enumerate all modules that have touched
 +             the database module uses wParam as the lParam cookie value and the lParam
 +             value given here is the function pointer -- this is not safe
 +             to use before v0.1.2.1 because I don't know if this was done in v0.1.2.1-
 +
 +             prior to v0.1.2.1 you can not pass a value to the enumeration because
 +             of a bug -- which is fixed, but hey :) -- [sam]
 +  }
  type
 -    TDBMODULEENUMPROC = function(const szModule: PChar; ofsModuleName: DWORD; lParam: LPARAM): int; cdecl;
 +  TDBMODULEENUMPROC = function(const szModule: PAnsiChar; ofsModuleName: DWORD; lParam: LPARAM): int; cdecl;
  const
 -    MS_DB_MODULES_ENUM              = 'DB/Modules/Enum';
 -
 -
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : HDBCONTACT
 -        Affect : Called when a new event has been added to the event chain
 -                 for a contact, HCONTACT contains the contact who added the event,
 -                 HDBCONTACT a handle to what was added.
 -                 see notes
 -        notes  : since events are sorted chronologically, you can not guarantee
 -                 that HDBEVEnT is in any particular position in the chain.
 -
 -    }
 -    ME_DB_EVENT_ADDED               = 'DB/Event/Added';
 -                 
 -	{
 -		wParam :  HANDLE (hContact)
 -		lParam :  @DBEVENTINFO
 -		Affects:  Hook is fired before any DBEVENTS are created within the database for
 -				  a contact (or a user, if hContact is NULL(0)) - It allows a module to
 -				  query/change DBEVENTINFO before it is created, see notes.
 -		Returns:  Hook should return 1 to stop event being added (will stop other hooks seeing the event too)
 -				  Or 0 to continue processing (passing the data on as well)
 -		Notes  :  This hook is fired for all event types, and the BLOBS that the eventypes mark
 -				  Maybe changed, therefore be careful about using BLOB formats.
 -				  Because the memory pointing within the DBEVENTINFO CAN NOT BE OWNED or free()'d
 -				  it is recommended that the hook only be used to stop events.
 -		Version: 0.3.3a+ (2003/12/03)
 -	}
 -	ME_DB_EVENT_FILTER_ADD 			= 'DB/Event/FilterAdd';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : HDBEVENT
 -        Affect : Called when an event is about to be deleted from the event chain
 -                 for a contact, see notes
 -        notes  : Returning non zero from your hook will NOT stop the deletion,
 -                 but it will as usual stop other hooks being called
 -    }
 -    ME_DB_EVENT_DELETED             = 'DB/Event/Deleted';
 -
 -
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affect : Called when a new contact has been added to the database,
 -                 HCONTACT contains a handle to the new contact.
 -    }
 -    ME_DB_CONTACT_ADDED             = 'DB/Contact/Added';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affect : Called when a contact is about to be deleted
 -        Returns: Returning nonzero from your hook will not stop the deletion
 -                 but it will stop the other hooks from being called
 -    }
 -    ME_DB_CONTACT_DELETED           = 'DB/Contact/Deleted';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : Pointer to a TDBCONTACTWRITESETTING
 -        Affect : Calleed when a contact has one of it's settings changed
 -                 hContact is a valid handle to the contact that has changed,
 -                 see notes.
 -        notes  : this event will be triggered many times rapidly when alot of values
 -                 are set.
 -                 Modules that hook this should be aware of this fact and quickly
 -                 return if they are not interested in the value that has changed.
 -                 Careful not to get into infinite loops with this event,
 -
 -                 The TDBCONTACTWRITESETTING pointer is the same one as the
 -                 original service all, so don't change any of it's fields
 -    }
 -    ME_DB_CONTACT_SETTINGCHANGED    = 'DB/Contact/SettingChanged';
 +  MS_DB_MODULES_ENUM:PAnsiChar = 'DB/Modules/Enum';
 +
 +{ DB/Module/Delete  0.8.0+
 +
 +  Removes all settings for the specified module.
 +  wParam=0 (unused)
 +  lParam=(LPARAM)(AnsiChar*)szModuleName - the module name to be deleted
 +}
 +  MS_DB_MODULE_DELETE:PAnsiChar = 'DB/Module/Delete';
 +
 +//************************** EVENTS ********************************
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : HDBCONTACT
 +    Affect : Called when a new event has been added to the event chain
 +             for a contact, HCONTACT contains the contact who added the event,
 +             HDBCONTACT a handle to what was added.
 +             see notes
 +    notes  : since events are sorted chronologically, you can not guarantee
 +             that HDBEVEnT is in any particular position in the chain.
 +
 +  }
 +  ME_DB_EVENT_ADDED:PAnsiChar = 'DB/Event/Added';
 +
 +  {
 +    wParam :  HANDLE (hContact)
 +    lParam :  @DBEVENTINFO
 +    Affects:  Hook is fired before any DBEVENTS are created within the database for
 +          a contact (or a user, if hContact is NULL(0)) - It allows a module to
 +          query/change DBEVENTINFO before it is created, see notes.
 +    Returns:  Hook should return 1 to stop event being added (will stop other hooks seeing the event too)
 +          Or 0 to continue processing (passing the data on as well)
 +    Notes  :  This hook is fired for all event types, and the BLOBS that the eventypes mark
 +          Maybe changed, therefore be careful about using BLOB formats.
 +          Because the memory pointing within the DBEVENTINFO CAN NOT BE OWNED or free()'d
 +          it is recommended that the hook only be used to stop events.
 +    Version: 0.3.3a+ (2003/12/03)
 +  }
 +  ME_DB_EVENT_FILTER_ADD:PAnsiChar = 'DB/Event/FilterAdd';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : HDBEVENT
 +    Affect : Called when an event is about to be deleted from the event chain
 +             for a contact, see notes
 +    notes  : Returning non zero from your hook will NOT stop the deletion,
 +             but it will as usual stop other hooks being called
 +  }
 +  ME_DB_EVENT_DELETED:PAnsiChar = 'DB/Event/Deleted';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affect : Called when a new contact has been added to the database,
 +             HCONTACT contains a handle to the new contact.
 +  }
 +  ME_DB_CONTACT_ADDED:PAnsiChar = 'DB/Contact/Added';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affect : Called when a contact is about to be deleted
 +    Returns: Returning nonzero from your hook will not stop the deletion
 +             but it will stop the other hooks from being called
 +  }
 +  ME_DB_CONTACT_DELETED:PAnsiChar = 'DB/Contact/Deleted';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : Pointer to a TDBCONTACTWRITESETTING
 +    Affect : Calleed when a contact has one of it's settings changed
 +             hContact is a valid handle to the contact that has changed,
 +             see notes.
 +    notes  : this event will be triggered many times rapidly when alot of values
 +             are set.
 +             Modules that hook this should be aware of this fact and quickly
 +             return if they are not interested in the value that has changed.
 +             Careful not to get into infinite loops with this event,
 +
 +             The TDBCONTACTWRITESETTING pointer is the same one as the
 +             original service all, so don't change any of it's fields
 +  }
 +  ME_DB_CONTACT_SETTINGCHANGED:PAnsiChar = 'DB/Contact/SettingChanged';
 +
 +  { DB/Contact/SetSettingResident service (0.6+)
 +    Disables a setting saving to the database.
 +    wParam=(WPARAM)(BOOL)bIsResident
 +    lParam=(LPARAM)(AnsiChar*)pszSettingName
 +  }
 +  MS_DB_SETSETTINGRESIDENT:PAnsiChar = 'DB/SetSettingResident';
  {$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_dbeditor.inc b/include/delphi/m_dbeditor.inc index 60530a1e61..60530a1e61 100644 --- a/plugins/Pascal_Headers/m_dbeditor.inc +++ b/include/delphi/m_dbeditor.inc diff --git a/plugins/Pascal_Headers/m_descbutton.inc b/include/delphi/m_descbutton.inc index 5a91b82e28..5a91b82e28 100644 --- a/plugins/Pascal_Headers/m_descbutton.inc +++ b/include/delphi/m_descbutton.inc diff --git a/include/delphi/m_email.inc b/include/delphi/m_email.inc index 71859ed208..38c0b49392 100644 --- a/include/delphi/m_email.inc +++ b/include/delphi/m_email.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,21 +18,20 @@ 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_EMAIL}
  {$DEFINE M_EMAIL}
  const
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affects: Send an e-mail to the specified contact, see notes
 -        Returns: Returns 0 on success or nonzero on failure
 -        Notes  : If an error occurs the service displays a message box
 -                 with the error text -- use this service to alter this
 -    }
 -    MS_EMAIL_SENDEMAIL      = 'SREMail/SendCommand';
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affects: Send an e-mail to the specified contact, see notes
 +    Returns: Returns 0 on success or nonzero on failure
 +    Notes  : If an error occurs the service displays a message box
 +             with the error text -- use this service to alter this
 +  }
 +  MS_EMAIL_SENDEMAIL:PAnsiChar = 'SREMail/SendCommand';
  {$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_errors.inc b/include/delphi/m_errors.inc index af9579ebe2..af9579ebe2 100644 --- a/plugins/Pascal_Headers/m_errors.inc +++ b/include/delphi/m_errors.inc diff --git a/plugins/Pascal_Headers/m_extraicons.inc b/include/delphi/m_extraicons.inc index b6c1a028df..b6c1a028df 100644 --- a/plugins/Pascal_Headers/m_extraicons.inc +++ b/include/delphi/m_extraicons.inc diff --git a/include/delphi/m_file.inc b/include/delphi/m_file.inc index e1e388fcdc..224aa41d8f 100644 --- a/include/delphi/m_file.inc +++ b/include/delphi/m_file.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,48 +18,54 @@ 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_FILE}
  {$DEFINE M_FILE}
  const
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affects: Brings up the send file dialog for a contact, see notes
 +    Returns: 0 on success [non zero] on failure
 +    Notes  : Returns immediately without waiting for the send
 +  }
 +  MS_FILE_SENDFILE:PAnsiChar = 'SRFile/SendCommand';
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affects: Brings up the send file dialog for a contact, see notes
 -        Returns: 0 on success [non zero] on failure
 -        Notes  : Returns immediately without waiting for the send
 -    }
 -    MS_FILE_SENDFILE            = 'SRFile/SendCommand';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : pointer to an array of PChar's the first nil item
 -                 terminates the list -- see notes
 -        Affects: Brings up the send file dialog with specifieed files already chosen
 -                 the user is not prevented from editing the list --
 -        Returns: 0 on success [non zero] on failure -- returns immediately without
 -                  waiting for the send to finish
 -        Notes  : both directories and files can be given
 -        Version: v0.1.2.1+
 -    }
 -    MS_FILE_SENDSPECIFICFILES       = 'SRFile/SendSpecificFiles';
 +  {
 +    wParam : HCONTACT
 +    lParam : pointer to an array of PAnsiChar's the first nil item
 +             terminates the list -- see notes
 +    Affects: Brings up the send file dialog with specifieed files already chosen
 +             the user is not prevented from editing the list --
 +    Returns: 0 on success [non zero] on failure -- returns immediately without
 +              waiting for the send to finish
 +    Notes  : both directories and files can be given
 +    Version: v0.1.2.1+
 +  }
 +  MS_FILE_SENDSPECIFICFILES:PAnsiChar = 'SRFile/SendSpecificFiles';
 -    {
 -        wParam : HCONTACT
 -        lParam : Pointer to a buffer
 -        Affects: returns the received files folder for a contact, the buffer
 -                 should be at least MAX_PATH long (defined with WinAPI),
 -                 the returned path may not exist -- see notes
 -        Returns: Returns 0 on success [non zero] on failure
 -        notes  : If HCONTACT is NULL(0) the path returned is the path
 -                 without the postfix contact name.
 -        Version: v0.1.2.2+
 -    }
 -    MS_FILE_GETRECEIVEDFILESFOLDER  = 'SRFile/GetReceivedFilesFolder';
 +{
 +  v0.9.0+
 +  wParam=(WPARAM)(HANDLE)hContact
 +  lParam=(LPARAM)(const TCHAR**)ppFiles
 +  returns 0 on success or nonzero on failure
 +  returns immediately, without waiting for the send
 +}
 +  MS_FILE_SENDSPECIFICFILEST:PAnsiChar = 'SRFile/SendSpecificFilesT';
 +  {
 +    wParam : HCONTACT
 +    lParam : Pointer to a buffer
 +    Affects: returns the received files folder for a contact, the buffer
 +             should be at least MAX_PATH long (defined with WinAPI),
 +             the returned path may not exist -- see notes
 +    Returns: Returns 0 on success [non zero] on failure
 +    notes  : If HCONTACT is NULL(0) the path returned is the path
 +             without the postfix contact name.
 +    Version: v0.1.2.2+
 +  }
 +  MS_FILE_GETRECEIVEDFILESFOLDER:PAnsiChar = 'SRFile/GetReceivedFilesFolder';
  {$ENDIF}
 diff --git a/include/delphi/m_findadd.inc b/include/delphi/m_findadd.inc index 9952a787c8..8adde75d80 100644 --- a/include/delphi/m_findadd.inc +++ b/include/delphi/m_findadd.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,20 +18,19 @@ 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_FINDADD}
  {$DEFINE M_FINDADD}
  const
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affects: Openss the find/add users dialog box, or gives it focus if it's
 -                 already open.
 -        Returns: Always returns 0
 -    }
 -    MS_FINDADDFINDADD       = 'FindAdd/FindAddCommand';
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affects: Opens the find/add users dialog box, or gives it focus if it's
 +             already open.
 +    Returns: Always returns 0
 +  }
 +  MS_FINDADDFINDADD:PAnsiChar = 'FindAdd/FindAddCommand';
  {$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_fingerprint.inc b/include/delphi/m_fingerprint.inc index 73622ac6ac..73622ac6ac 100644 --- a/plugins/Pascal_Headers/m_fingerprint.inc +++ b/include/delphi/m_fingerprint.inc diff --git a/plugins/Pascal_Headers/m_fontservice.inc b/include/delphi/m_fontservice.inc index f13173ac03..f13173ac03 100644 --- a/plugins/Pascal_Headers/m_fontservice.inc +++ b/include/delphi/m_fontservice.inc diff --git a/plugins/Pascal_Headers/m_genmenu.inc b/include/delphi/m_genmenu.inc index e72e66abef..e72e66abef 100644 --- a/plugins/Pascal_Headers/m_genmenu.inc +++ b/include/delphi/m_genmenu.inc diff --git a/include/delphi/m_globaldefs.pas b/include/delphi/m_globaldefs.pas deleted file mode 100644 index 1e8270696b..0000000000 --- a/include/delphi/m_globaldefs.pas +++ /dev/null @@ -1,97 +0,0 @@ -(*
 -
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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.
 -
 -*)
 -
 -{$IFDEF FPC}
 -    {$PACKRECORDS C}
 -    {$MODE Delphi}
 -{$ENDIF}
 -
 -unit m_globaldefs;
 -
 -interface
 -
 -uses
 -
 -{$ifdef FPC}
 -    strings;
 -{$else}
 -    Windows;
 -{$endif}
 -
 -type
 -
 -    PByte                   = ^Byte;
 -    int                     = Integer;
 -    pint                    = ^int;
 -    WPARAM                  = Integer;
 -    LPARAM                  = Integer;
 -    DWORD                   = Integer;
 -    THandle                 = Integer;
 -
 -    // strcpy()
 -
 -    {$ifdef FPC}
 -        TStrCpy = function(Dst, Src: PChar): PChar;
 -    {$else}
 -        TStrCpy = function(Dst, Src: PChar): PChar; stdcall;
 -    {$endif}
 -
 -    // strcat()
 -
 -    {$ifdef FPC}
 -        TStrCat = function(Dst, Src: PChar): PChar;
 -    {$else}
 -        TStrCat = function(Dst, Src: PChar): PChar; stdcall;
 -    {$endif}
 -
 -const
 -
 -    {$ifdef FPC}
 -        strcpy: TStrCpy = strings.strcopy;
 -    {$else}
 -        strcpy: TStrCpy = lstrcpy;
 -    {$endif}
 -
 -    {$ifdef FPC}
 -        strcat: TStrCat = strings.strcat;
 -    {$else}
 -        strcat: TStrCat = lstrcat;
 -    {$endif}
 -
 -    {$include newpluginapi.inc}
 -
 -var
 -    { this is now a pointer to a record of function pointers to match the C API,
 -    and to break old code and annoy you. }
 -
 -    PLUGINLINK: PPLUGINLINK;
 -
 -    { has to be returned via MirandaPluginInfo and has to be statically allocated,
 -    this means only one module can return info, you shouldn't be merging them anyway! }
 -
 -    PLUGININFO: TPLUGININFO;
 -
 -implementation
 -
 -end.
 diff --git a/plugins/Pascal_Headers/m_help.inc b/include/delphi/m_help.inc index 9f8c684161..9f8c684161 100644 --- a/plugins/Pascal_Headers/m_help.inc +++ b/include/delphi/m_help.inc diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc index ae5b28db8f..8eb4aa804c 100644 --- a/include/delphi/m_helpers.inc +++ b/include/delphi/m_helpers.inc @@ -1,613 +1,478 @@ -(*
 -
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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.
 -
 -*)
 -
 -{$ifdef M_API_UNIT}
 -
 -    function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int;
 -    function PLUGIN_CMP_VERSION(verA: LongInt; verB: LongInt): int;
 -
 -{$else}
 -
 -    function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := (a shl 24) or (b shl 16) or (c shl 8) or d;
 -    end;
 -
 -    function PLUGIN_CMP_VERSION(verA: LongInt; verB: LongInt): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := 0;
 -        { could be used to compare for severity of age for positive values, if a<b
 -        results are minus values, 0 for equal, positive if a is newer }
 -        Inc(Result, (verA and $FF) - (verB and $FF));
 -        Inc(Result, (verA and $FF00) - (verB and $FF00));
 -        Inc(Result, (verA and $FF0000) - (verB and $FF0000));
 -        Inc(Result, (verA and $FF000000) - (verB and $FF000000));
 -    end;
 -
 -{$endif}
 -
 -{$ifdef M_SYSTEM}
 -    {$ifdef M_API_UNIT}
 -
 -    function CallService(const szService: PChar; wParam: WPARAM; lParam: LPARAM): int;
 -
 -    function HookEvent(const szHook: PChar; hook_proc: TMIRANDAHOOK): int;
 -
 -    function CreateServiceFunction(const szName: PChar; const MirandaService: TMIRANDASERVICE): int;
 -
 -    {$else}
 -
 -    function CallService(const szService: PChar; wParam: WPARAM; lParam: lParam): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := PluginLink^.CallService(szService, wParam, lParam);
 -    end;
 -
 -    function HookEvent(const szHook: PChar; hook_proc: TMIRANDAHOOK): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := PluginLink^.HookEvent(szHook, @hook_proc);
 -    end;
 -
 -    function CreateServiceFunction(const szName: PChar; const MirandaService: TMIRANDASERVICE): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := PluginLink^.CreateServiceFunction(szName, @MirandaService);
 -    end;
 -
 -    {$endif}
 -
 -{$endif}
 -
 -{$ifdef M_DATABASE}
 -
 -    {$ifdef M_API_UNIT}
 -
 -    function DBGetContactSettingByte(hContact: THandle;
 -        const szModule: PChar; const szSetting: PChar; errorValue: Integer): Integer;
 -
 -    function DBGetContactSettingWord(hContact: THandle;
 -        const szModule: PChar; const szSetting: PChar; errorValue: Integer): Integer;
 -
 -    function DBGetContactSettingDword(hContact: THandle;
 -        const szModule: PChar; const szSetting: PChar; errorValue: Integer): Integer;
 -
 -    function DBGetContactSetting(hContact: THandle;
 -        const szModule: PChar; const szSetting: PChar; dbv: PDBVARIANT): Integer;
 -
 -    function DBFreeVariant(dbv: PDBVARIANT): Integer;
 -
 -    function DBDeleteContactSetting(hContact: THandle; const szModule: PChar; const szSetting: PChar): Integer;
 -
 -    function DBWriteContactSettingByte(hContact: THandle; const szModule: PChar; const szSetting: PChar; val: Byte): Integer;
 -
 -    function DBWriteContactSettingWord(hContact: THandle; const szModule: PChar; const szSetting: PChar; val: Word): Integer;
 -
 -    function DBWriteContactSettingDWord(hContact: THandle; const szModule: PChar; const szSetting: PChar; val: LongInt): Integer;
 -
 -    function DBWriteContactSettingString(hContact: THandle; const szModule: PChar; const szSetting: PChar; const val: PChar): Integer;
 -
 -    {$else}
 -
 -    function DBGetContactSettingByte(hContact: THandle;
 -        const szModule: PChar; const szSetting: PChar; errorValue: Integer): Integer;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        dbv: TDBVARIANT;
 -        cgs: TDBCONTACTGETSETTING;
 -    begin
 -
 -        cgs.szModule := szModule;
 -        cgs.szSetting := szSetting;
 -        cgs.pValue := @dbv;
 -
 -        If PluginLink^.CallService(MS_DB_CONTACT_GETSETTING, hContact, lParam(@cgs)) <> 0 then
 -            Result := ErrorValue
 -        else
 -            Result := dbv.bVal;
 -    end;
 -
 -    function DBGetContactSettingWord(hContact: THandle;
 -        const szModule: PChar; const szSetting: PChar; errorValue: Integer): Integer;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        dbv: TDBVARIANT;
 -        cgs: TDBCONTACTGETSETTING;
 -    begin
 -        cgs.szModule := szModule;
 -        cgs.szSetting := szSetting;
 -        cgs.pValue := @dbv;
 -        If PluginLink^.CallService(MS_DB_CONTACT_GETSETTING, hContact, lParam(@cgs)) <> 0 then
 -            Result := ErrorValue
 -        else
 -            Result := dbv.wVal;
 -    end;
 -
 -    function DBGetContactSettingDword(hContact: THandle;
 -        const szModule: PChar; const szSetting: PChar; errorValue: Integer): Integer;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        dbv: TDBVARIANT;
 -        cgs: TDBCONTACTGETSETTING;
 -    begin
 -        cgs.szModule := szModule;
 -        cgs.szSetting := szSetting;
 -        cgs.pValue := @dbv;
 -        If PluginLink^.CallService(MS_DB_CONTACT_GETSETTING, hContact, lParam(@cgs)) <> 0 then
 -            Result := ErrorValue
 -        else
 -            Result := dbv.dVal;
 -    end;
 -
 -    function DBGetContactSetting(hContact: THandle;
 -        const szModule: PChar; const szSetting: PChar; dbv: PDBVARIANT): Integer;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        cgs: TDBCONTACTGETSETTING;
 -    begin
 -        cgs.szModule := szModule;
 -        cgs.szSetting := szSetting;
 -        cgs.pValue := dbv;
 -        Result := PluginLink^.CallService(MS_DB_CONTACT_GETSETTING, hContact, lParam(@cgs));
 -    end;
 -
 -    function DBFreeVariant(dbv: PDBVARIANT): Integer;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := PluginLink^.CallService(MS_DB_CONTACT_FREEVARIANT, 0, lParam(dbv));
 -    end;
 -
 -    function DBDeleteContactSetting(hContact: THandle; const szModule: PChar; const szSetting: PChar): Integer;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        cgs: TDBCONTACTGETSETTING;
 -    begin
 -        cgs.szModule := szModule;
 -        cgs.szSetting := szSetting;
 -        Result := PluginLink^.CallService(MS_DB_CONTACT_DELETESETTING, hContact, lParam(@cgs));
 -    end;
 -
 -    function DBWriteContactSettingByte(hContact: THandle; const szModule: PChar; const szSetting: PChar; val: Byte): Integer;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        cws: TDBCONTACTWRITESETTING;
 -    begin
 -        cws.szModule := szModule;
 -        cws.szSetting := szSetting;
 -        cws.value.type_ := DBVT_BYTE;
 -        cws.value.bVal := Val;
 -        Result := PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING, hContact, lParam(@cws));
 -    end;
 -
 -    function DBWriteContactSettingWord(hContact: THandle; const szModule: PChar; const szSetting: PChar; val: Word): Integer;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        cws: TDBCONTACTWRITESETTING;
 -    begin
 -        cws.szModule := szModule;
 -        cws.szSetting := szSetting;
 -        cws.value.type_ := DBVT_WORD;
 -        cws.value.wVal := Val;
 -        Result := PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING, hContact, lParam(@cws));
 -    end;
 -
 -    function DBWriteContactSettingDWord(hContact: THandle; const szModule: PChar; const szSetting: PChar; val: LongInt): Integer;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        cws: TDBCONTACTWRITESETTING;
 -    begin
 -        cws.szModule := szModule;
 -        cws.szSetting := szSetting;
 -        cws.value.type_ := DBVT_DWORD;
 -        cws.value.dVal := Val;
 -        Result := PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING, hContact, lParam(@cws));
 -    end;
 -
 -    function DBWriteContactSettingString(hContact: THandle; const szModule: PChar; const szSetting: PChar; const val: PChar): Integer;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        cws: TDBCONTACTWRITESETTING;
 -    begin
 -        cws.szModule := szModule;
 -        cws.szSetting := szSetting;
 -        cws.value.type_ := DBVT_ASCIIZ;
 -        cws.value.pszVal := Val;
 -        Result := PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING, hContact, lParam(@cws));
 -    end;
 -
 -    {$endif}
 -
 -{$endif}
 -
 -{$ifdef M_NETLIB}
 -
 -    {$ifdef M_API_UNIT}
 -
 -    function Netlib_CloseHandle(Handle: THandle): int;
 -
 -    function Netlib_GetBase64DecodedBufferSize(const cchEncoded: int): int;
 -
 -    function Netlib_GetBase64EncodedBufferSize(const cbDecoded: int): int;
 -
 -    function Netlib_Send(hConn: THandle; const buf: PChar; len: int; flags: int): int;
 -
 -    function Netlib_Recv(hConn: THandle; const buf: PChar; len: int; flags: int): int;
 -
 -    procedure Netlib_Log(hNetLib: THandle; const sz: PChar);
 -
 -    {$else}
 -
 -    function Netlib_CloseHandle(Handle: THandle): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := PluginLink^.CallService(MS_NETLIB_CLOSEHANDLE, Handle, 0);
 -    end;
 -
 -    function Netlib_GetBase64DecodedBufferSize(const cchEncoded: int): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := (cchEncoded shr 2) * 3;
 -    end;
 -
 -    function Netlib_GetBase64EncodedBufferSize(const cbDecoded: int): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := (cbDecoded  * 4+11) div 12*4+1;
 -    end;
 -
 -    function Netlib_Send(hConn: THandle; const buf: PChar; len: int; flags: int): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        nlb: TNETLIBBUFFER;
 -    begin
 -        nlb.buf := buf;
 -        nlb.len := len;
 -        nlb.flags := flags;
 -        Result := PluginLink^.CallService(MS_NETLIB_SEND, wParam(hConn), lParam(@nlb));
 -    end;
 -
 -    function Netlib_Recv(hConn: THandle; const buf: PChar; len: int; flags: int): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        nlb: TNETLIBBUFFER;
 -    begin
 -        nlb.buf := buf;
 -        nlb.len := len;
 -        nlb.flags := flags;
 -        Result := PluginLink^.CallService(MS_NETLIB_RECV, wParam(hConn), lParam(@nlb));
 -    end;
 -
 -    procedure Netlib_Log(hNetLib: THandle; const sz: PChar);
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        PluginLink^.CallService(MS_NETLIB_LOG, hNetLib, lParam(sz));
 -    end;
 -
 -    {$endif}
 -
 -{$endif}
 -
 -{$ifdef M_UTILS}
 -
 -    {$ifdef M_API_UNIT}
 -
 -	function WindowList_Add(hList: THandle; hWnd: HWND; hContact: THandle): int;
 -
 - 	function WindowList_Remove(hList: THandle; hWnd: THandle): int;
 -
 -	function WindowList_Find(hList: THandle; hContact: THandle): int;
 -
 -    function WindowList_Broadcast(hList: THandle; message: int; wParam: WPARAM; lParam: LPARAM): int;
 -
 -    function Utils_SaveWindowPosition(hWnd: THandle; hContact: THandle; const szModule, szNamePrefix: PChar): int;
 -
 -	function Utils_RestoreWindowPosition(hWnd: THandle; hContact: THandle; Flags: int; const szModule, szNamePrefix: PChar): int;
 -
 -    {$else}
 -
 -    function WindowList_Add(hList: THandle; hWnd: hWnd; hContact: THandle): int;
 -    var
 -        wle: TWINDOWLISTENTRY;
 -    begin
 -        wle.hList    := hList;
 -        wle.hWnd     := hWnd;
 -        wle.hContact := hContact;
 -        Result := PluginLink^.CallService(MS_UTILS_ADDTOWINDOWLIST, 0, lParam(@wle));
 -    end;
 -
 -    function WindowList_Remove(hList: THandle; hWnd: THandle): int;
 -    begin
 -        Result := PluginLink^.CallService(MS_UTILS_REMOVEFROMWINDOWLIST, hList, hWnd);
 -    end;
 -
 -    function WindowList_Find(hList: THandle; hContact: THandle): int;
 -    begin
 -        Result := PluginLink^.CallService(MS_UTILS_FINDWINDOWINLIST, hList, hContact);
 -    end;
 -
 -    function WindowList_Broadcast(hList: THandle; message: int; wParam: WPARAM; lParam: LPARAM): int;
 -    var
 -        msg: TMSG;
 -    begin
 -        msg.message := message;
 -        msg.wParam  := wParam;
 -        msg.lParam  := lParam;
 -        Result := PluginLink^.CallService(MS_UTILS_BROADCASTTOWINDOWLIST, hList, Integer(@Msg));
 -    end;
 -
 -    function Utils_SaveWindowPosition(hWnd: THandle; hContact: THandle; const szModule, szNamePrefix: PChar): int;
 -    var
 -        swp: TSAVEWINDOWPOS;
 -    begin
 -        swp.hWnd := hWnd;
 -        swp.hContact := hContact;
 -        swp.szModule := szModule;
 -        swp.szNamePrefix := szNamePrefix;
 -        Result := PluginLink^.CallService(MS_UTILS_SAVEWINDOWPOSITION, 0, lParam(@swp));
 -    end;
 -
 -    function Utils_RestoreWindowPosition(hWnd: THandle; hContact: THandle; Flags: int; const szModule, szNamePrefix: PChar): int;
 -    var
 -        swp: TSAVEWINDOWPOS;
 -    begin
 -        swp.hWnd         := hWnd;
 -        swp.hContact     := hContact;
 -        swp.szModule     := szModule;
 -        swp.szNamePrefix := szNamePrefix;
 -        Result := PluginLink^.CallService(MS_UTILS_RESTOREWINDOWPOSITION, Flags, lParam(@swp));
 -    end;
 -
 -    {$endif}
 -
 -{$endif}
 -
 -{$ifdef M_LANGPACK}
 -
 -    {$ifdef M_API_UNIT}
 -
 -	function Translate(sz: PChar): PChar;
 -
 -	function TranslateString(sz: string): string;
 -
 -	function TranslateDialogDefault(hwndDlg: THandle): int;
 -
 -    {$else}
 -
 -    function Translate(sz: PChar): PChar;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        { the return value maybe NULL(0) -- it's upto the caller to know if the allocated
 -        string has to be removed from the DLL heap, this has little to do with Miranda,
 -        but if a dynamic string is passed and a return string is used -- the dynamic
 -        string is lost -- be careful, lazy? use TranslateString (note it's slower) }
 -        Result := PChar(PluginLink^.CallService(MS_LANGPACK_TRANSLATESTRING, 0, lParam(sz)));
 -    end;
 -
 -    function TranslateString(sz: string): string;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -         Result := string(PChar( PluginLink^.CallService(MS_LANGPACK_TRANSLATESTRING, 0, lParam(sz))));
 -    end;
 -
 -    function TranslateDialogDefault(hwndDlg: THandle): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        lptd: TLANGPACKTRANSLATEDIALOG;
 -    begin
 -        lptd.cbSize := sizeof(lptd);
 -        lptd.flags := 0;
 -        lptd.hwndDlg := hwndDlg;
 -        lptd.ignoreControls := nil;
 -        Result := PluginLink^.CallService(MS_LANGPACK_TRANSLATEDIALOG, 0, lParam(@lptd));
 -    end;
 -
 -    {$endif}
 -
 -{$endif}
 -
 -{$ifdef M_PROTOCOLS}
 -    {$ifdef M_API_UNIT}
 -
 -        function CallContactService(hContact: THandle; const szProtoService: PChar; wParam: WPARAM; lParam: LPARAM): int;
 -
 -        function CallProtoService(const szModule, szService: PChar; wParam: WPARAM; lParam: LPARAM): int;
 -
 -    {$else}
 -
 -        function CallContactService(hContact: THandle; const szProtoService: PChar; wParam: WPARAM; lParam: LPARAM): int;
 -        {$ifdef FPC}
 -        inline;
 -        {$endif}
 -        var
 -            css: TCCSDATA;
 -        begin
 -            css.hContact := hContact;
 -            css.szProtoService := szProtoService;
 -            css.wParam := wParam;
 -            css.lParam := lParam;
 -            Result := PluginLink^.CallService(MS_PROTO_CALLCONTACTSERVICE, 0, Integer(@css));
 -        end;
 -
 -        function CallProtoService(const szModule, szService: PChar; wParam: WPARAM; lParam: LPARAM): int;
 -        {$ifdef FPC}
 -        inline;
 -        {$endif}
 -        var
 -            szStr: array[0..MAXMODULELABELLENGTH] of Char;
 -        begin
 -            strcpy(szStr, szModule);
 -            strcat(szStr, szService);
 -            Result := PluginLink^.CallService(szStr, wParam, lParam);
 -        end;
 -
 -    {$endif}
 -{$endif}
 -
 -{$ifdef M_PROTOMOD}
 -    {$ifdef M_API_UNIT}
 -
 -    function ProtoBroadcastAck(const szModule: PChar; hContact: THandle; type_: int; result_: int; hProcess: THandle; lParam: LPARAM): int;
 -
 -    function CreateProtoServiceFunction(const szModule, szService: PChar; serviceProc: TMIRANDASERVICE): int;
 -
 -    {$else}
 -
 -    function ProtoBroadcastAck(const szModule: PChar; hContact: THandle; type_: int; result_: int; hProcess: THandle; lParam: LPARAM): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        ack: TACKDATA;
 -    begin
 -        ack.cbSize   := sizeof(TACKDATA);
 -        ack.szModule := szModule;
 -        ack.hContact := hContact;
 -        ack.type_    := type_;
 -        ack.result_  := result_;
 -        ack.hProcess := hProcess;
 -        ack.lParam   := lParam;
 -        Result := PluginLink^.CallService(MS_PROTO_BROADCASTACK, 0, Integer(@ack));
 -    end;
 -
 -    function CreateProtoServiceFunction(const szModule, szService: PChar; serviceProc: TMIRANDASERVICE): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        szStr: array[0..MAXMODULELABELLENGTH] of Char;
 -    begin
 -        strcpy(szStr, szModule);
 -        strcat(szStr, szService);
 -        Result := PluginLink^.CreateServiceFunction(szStr, @serviceProc);
 -    end;
 -
 -    {$endif}
 -
 -{$endif}
 -
 -{$ifdef M_SKIN}
 -
 -    {$ifdef M_API_UNIT}
 -
 -    function LoadSkinnedIcon(id: int): THandle;
 -
 -    function LoadSkinnedProtoIcon(const szProto: PChar; status: int): THandle;
 -
 -    function SkinAddNewSound(const name, description, defaultFile: PChar): int;
 -
 -    function SkinPlaySound (const name: PChar): int;
 -
 -    {$else}
 -
 -    function LoadSkinnedIcon(id: int): THandle;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := PluginLink^.CallService(MS_SKIN_LOADICON, id, 0);
 -    end;
 -
 -    function LoadSkinnedProtoIcon(const szProto: PChar; status: int): THandle;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := PluginLink^.CallService(MS_SKIN_LOADPROTOICON, wParam(szProto), status);
 -    end;
 -
 -    function SkinAddNewSound(const name, description, defaultFile: PChar): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        ssd: TSKINSOUNDDESC;
 -    begin
 -        ssd.cbSize := sizeof(ssd);
 -        ssd.pszName := name;
 -        ssd.pszDescription := description;
 -        ssd.pszDefaultFile := defaultFile;
 -        Result := PluginLink^.CallService(MS_SKIN_ADDNEWSOUND, 0, lParam(@ssd));
 -    end;
 -
 -    function SkinPlaySound (const name: PChar): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := PluginLink^.CallService(MS_SKIN_PLAYSOUND, 0, lParam(name));
 -    end;
 -
 -    {$endif}
 -
 -{$endif}
 +{$IFDEF M_API_UNIT}
 +
 +function ProtoServiceExists(const proto,service: PAnsiChar): int;
 +
 +function CreateVersionString(version:dword;buf:PAnsiChar):PAnsiChar;
 +function CreateVersionStringPlugin(pluginInfo:PPluginInfoEx;buf:PAnsiChar):PAnsiChar;
 +function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int;
 +function PLUGIN_CMP_VERSION(verA: LongInt; verB: LongInt): int;
 +
 +function mir_forkthread(aFunc:pThreadFunc; arg:pointer):THANDLE; {inline}
 +function mir_forkthreadex(aFunc:pThreadFuncEx; arg:pointer; stackSize:int; pThreadID:puint_ptr):THANDLE; {inline}
 +function mir_forkthreadowner(aFunc:pThreadFuncOwner; owner:pointer; arg:pointer; pThreadID:puint_ptr):THANDLE; {inline}
 +
 +function Netlib_CloseHandle(Handle: THandle): int;
 +function Netlib_GetBase64DecodedBufferSize(const cchEncoded: int): int;
 +function Netlib_GetBase64EncodedBufferSize(const cbDecoded: int): int;
 +function Netlib_Send(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr;
 +function Netlib_Recv(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr;
 +procedure Netlib_Log(hNetLib: THandle; const sz: PAnsiChar);
 +
 +function WindowList_Add(hList: THandle; hWnd: HWND; hContact: THandle): int_ptr;
 +function WindowList_Remove(hList: THandle; hWnd: THandle): int_ptr;
 +function WindowList_Find(hList: THandle; hContact: THandle): int_ptr;
 +function WindowList_Broadcast(hList: THandle; message: int; wParam: WPARAM; lParam: LPARAM): int_ptr;
 +function Utils_SaveWindowPosition(hWnd: THandle; hContact: THandle; const szModule, szNamePrefix: PAnsiChar): int_ptr;
 +function Utils_RestoreWindowPosition(hWnd: THandle; hContact: THandle; Flags: int; const szModule, szNamePrefix: PAnsiChar): int_ptr;
 +
 +function mir_hashstr(const key:pAnsiChar):uint; {inline;}
 +function mir_hashstrW(const key:pWideChar):uint; {inline;}
 +function lrtrim(str:pAnsiChar):pAnsiChar; {inline}
 +function lrtrimp(str:pAnsiChar):pAnsiChar; {inline}
 +function mir_utf8decodeA(const src:pAnsiChar):pAnsiChar; {inline}
 +
 +function Translate(sz: PAnsiChar): PAnsiChar;
 +function Translatew(sz: PWideChar): PWideChar;
 +function TranslateString(const sz: AnsiString): AnsiString;
 +function TranslateWideString(const sz:WideString):WideString;
 +function TranslateUnicodeString(sz: String): String;{$ifdef FPC}inline;{$endif}
 +procedure TranslateDialogDefault(hwndDlg: THandle);
 +procedure TranslateMenu(hMenu: HMENU);
 +function Langpack_Register:int_ptr;
 +
 +function ProtoBroadcastAck(const szModule: PAnsiChar; hContact: THandle; type_: int; result_: int; hProcess: THandle; lParam: LPARAM): int_ptr;
 +function CreateProtoServiceFunction(const szModule, szService: PAnsiChar; serviceProc: TMIRANDASERVICE): int_ptr;
 +
 +function LoadSkinnedIcon(id: int): THandle;
 +function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle;
 +function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr;
 +function SkinPlaySound (const name: PAnsiChar): int_ptr;
 +
 +function Menu_AddContextFrameMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +function Menu_AddMainMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +function Menu_AddContactMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +function Menu_AddStatusMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +function Menu_AddProtoMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +function Menu_AddSubGroupMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +function Menu_AddGroupMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +function Menu_AddTrayMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +
 +function UserInfo_AddPage(wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr;
 +function Options_AddPage(wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr;
 +function Hotkey_Register(hk:PHOTKEYDESC):int_ptr;
 +function Skin_AddIcon(si:PSKINICONDESC):THANDLE;
 +
 +procedure FontRegister(pFontID:pFontID);
 +procedure FontRegisterW(pFontID:pFontIDW);
 +
 +procedure ColourRegister(pColorID:pColourID);
 +procedure ColourRegisterW(pColorID:pColourIDW);
 +
 +procedure EffectRegister(pEffectID:pEffectID);
 +procedure EffectRegisterW(pEffectID:pEffectIDW);
 +
 +{$ELSE}
 +
 +function ProtoServiceExists(const proto,service: PAnsiChar): int;
 +var
 +  buf:array [0..127] of AnsiChar;
 +begin
 +  if (proto=nil) or (service=nil) then
 +  begin
 +    result:=0;
 +    exit;
 +  end;
 +  lStrCpyA(@buf,proto);
 +  lStrCatA(@buf,service);
 +  result:=ServiceExists(@buf);
 +end;
 +
 +
 +function CreateVersionString(version:dword;buf:PAnsiChar):PAnsiChar;
 +var
 +  vers:array [0..3] of integer;
 +begin
 +  vers[0]:=(version shr 24) and $FF;
 +  vers[1]:=(version shr 16) and $FF;
 +  vers[2]:=(version shr  8) and $FF;
 +  vers[3]:=version and $FF;
 +  wvsprintfa(buf,'%d.%d.%d.%d',@vers);
 +  result:=buf;
 +end;
 +
 +function CreateVersionStringPlugin(pluginInfo:PPluginInfoEx;buf:PAnsiChar):PAnsiChar;
 +begin
 +  result:=CreateVersionString(pluginInfo^.version,buf);
 +end;
 +
 +function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int;
 +begin
 +  Result := (a shl 24) or (b shl 16) or (c shl 8) or d;
 +end;
 +
 +function PLUGIN_CMP_VERSION(verA: LongInt; verB: LongInt): int;
 +begin
 +  Result := 0;
 +  { could be used to compare for severity of age for positive values, if a<b
 +  results are minus values, 0 for equal, positive if a is newer }
 +  Inc(Result, (verA and $FF      ) - (verB and $FF));
 +  Inc(Result, (verA and $FF00    ) - (verB and $FF00));
 +  Inc(Result, (verA and $FF0000  ) - (verB and $FF0000));
 +  Inc(Result, (verA and $FF000000) - (verB and $FF000000));
 +end;
 +
 +
 +function mir_forkthread(aFunc:pThreadFunc; arg:pointer):THANDLE; {inline}
 +begin
 +	result:=forkthread(aFunc, 0, arg);
 +end;
 +function mir_forkthreadex(aFunc:pThreadFuncEx; arg:pointer; stackSize:int; pThreadID:puint_ptr):THANDLE; {inline}
 +begin
 +	result:=forkthreadex(nil, stackSize, aFunc, nil, arg, pThreadID);
 +end;
 +function mir_forkthreadowner(aFunc:pThreadFuncOwner; owner:pointer; arg:pointer; pThreadID:puint_ptr):THANDLE; {inline}
 +begin
 +	result:=forkthreadex(nil, 0, pThreadFuncEx(aFunc), owner, arg, pThreadID);
 +end;
 +
 +
 +function Netlib_CloseHandle(Handle: THandle): int;
 +begin
 +  Result := CallService(MS_NETLIB_CLOSEHANDLE, Handle, 0);
 +end;
 +
 +function Netlib_GetBase64DecodedBufferSize(const cchEncoded: int): int;
 +begin
 +  Result := (cchEncoded shr 2) * 3;
 +end;
 +
 +function Netlib_GetBase64EncodedBufferSize(const cbDecoded: int): int;
 +begin
 +  Result := (cbDecoded * 4+11) div 12*4+1;
 +end;
 +
 +function Netlib_Send(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr;
 +var
 +  nlb: TNETLIBBUFFER;
 +begin
 +  nlb.buf   := buf;
 +  nlb.len   := len;
 +  nlb.flags := flags;
 +  Result := CallService(MS_NETLIB_SEND, wParam(hConn), lParam(@nlb));
 +end;
 +
 +function Netlib_Recv(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr;
 +var
 +  nlb: TNETLIBBUFFER;
 +begin
 +  nlb.buf   := buf;
 +  nlb.len   := len;
 +  nlb.flags := flags;
 +  Result := CallService(MS_NETLIB_RECV, wParam(hConn), lParam(@nlb));
 +end;
 +
 +procedure Netlib_Log(hNetLib: THandle; const sz: PAnsiChar);
 +begin
 +  CallService(MS_NETLIB_LOG, hNetLib, lParam(sz));
 +end;
 +
 +
 +function WindowList_Add(hList: THandle; hWnd: hWnd; hContact: THandle): int_ptr;
 +var
 +  wle: TWINDOWLISTENTRY;
 +begin
 +  wle.hList    := hList;
 +  wle.hWnd     := hWnd;
 +  wle.hContact := hContact;
 +  Result := CallService(MS_UTILS_ADDTOWINDOWLIST, 0, lParam(@wle));
 +end;
 +
 +function WindowList_Remove(hList: THandle; hWnd: THandle): int_ptr;
 +begin
 +  Result := CallService(MS_UTILS_REMOVEFROMWINDOWLIST, hList, hWnd);
 +end;
 +
 +function WindowList_Find(hList: THandle; hContact: THandle): int_ptr;
 +begin
 +  Result := CallService(MS_UTILS_FINDWINDOWINLIST, hList, hContact);
 +end;
 +
 +function WindowList_Broadcast(hList: THandle; message: int; wParam: WPARAM; lParam: LPARAM): int_ptr;
 +var
 +  msg: TMSG;
 +begin
 +  msg.message := message;
 +  msg.wParam  := wParam;
 +  msg.lParam  := lParam;
 +  Result := CallService(MS_UTILS_BROADCASTTOWINDOWLIST, hList, tLparam(@Msg));
 +end;
 +
 +function Utils_SaveWindowPosition(hWnd: THandle; hContact: THandle; const szModule, szNamePrefix: PAnsiChar): int_ptr;
 +var
 +  swp: TSAVEWINDOWPOS;
 +begin
 +  swp.hWnd     := hWnd;
 +  swp.hContact := hContact;
 +  swp.szModule := szModule;
 +  swp.szNamePrefix := szNamePrefix;
 +  Result := CallService(MS_UTILS_SAVEWINDOWPOSITION, 0, lParam(@swp));
 +end;
 +
 +function Utils_RestoreWindowPosition(hWnd: THandle; hContact: THandle; Flags: int; const szModule, szNamePrefix: PAnsiChar): int_ptr;
 +var
 +  swp: TSAVEWINDOWPOS;
 +begin
 +  swp.hWnd         := hWnd;
 +  swp.hContact     := hContact;
 +  swp.szModule     := szModule;
 +  swp.szNamePrefix := szNamePrefix;
 +  Result := CallService(MS_UTILS_RESTOREWINDOWPOSITION, Flags, lParam(@swp));
 +end;
 +
 +
 +function mir_hashstr(const key:pAnsiChar):uint; {inline;}
 +var
 +  len:int;
 +begin
 +  if key=NIL then
 +    result:=0
 +  else
 +  begin
 +    len:=lstrlena(key);
 +    result:=mir_hash(key, len);
 +  end;
 +end;
 +
 +function mir_hashstrW(const key:pWideChar):uint; {inline;}
 +var
 +  len:int;
 +begin
 +  if key=NIL then
 +    result:=0
 +  else
 +  begin
 +    len:=lstrlenw(key);
 +    result:=mir_hash(key, len*SizeOF(WideChar));
 +  end;
 +end;
 +
 +function lrtrim(str:pAnsiChar):pAnsiChar; {inline}
 +begin
 +  result:=ltrim(rtrim(str));
 +end;
 +function lrtrimp(str:pAnsiChar):pAnsiChar; {inline}
 +begin
 +  result:=ltrimp(rtrim(str));
 +end;
 +
 +function mir_utf8decodeA(const src:pAnsiChar):pAnsiChar; {inline}
 +type
 + ppWideChar = ^pWidechar;
 +var
 +  tmp:pAnsiChar;
 +begin
 +  tmp:=mir_strdup(src);
 +  mir_utf8decode(tmp,ppWideChar(nil)^);
 +  result:=tmp;
 +end;
 +
 +
 +function TranslateW(sz: PWideChar): PWideChar;
 +begin
 +  result:=TranslateW_LP(sz, hLangpack);
 +end;
 +
 +function Translate(sz: PAnsiChar): PAnsiChar;
 +begin
 +  result:=TranslateA_LP(sz, hLangpack);
 +end;
 +
 +function TranslateString(const sz:AnsiString):AnsiString;
 +begin
 +  Result:=AnsiString(PAnsiChar(
 +    CallService(MS_LANGPACK_TRANSLATESTRING,hLangpack,lparam(@sz))));
 +end;
 +
 +function TranslateWideString(const sz:WideString):WideString;
 +begin
 +  Result:=WideString(PWideChar(
 +    CallService(MS_LANGPACK_TRANSLATESTRING, LANG_UNICODE, lParam(sz))));
 +end;
 +
 +function TranslateUnicodeString(sz: String): String;{$ifdef FPC}inline;{$endif}
 +begin
 +  Result := String(PChar(CallService(MS_LANGPACK_TRANSLATESTRING, LANG_UNICODE, lParam(sz))));
 +end;
 +
 +procedure TranslateDialogDefault(hwndDlg: THandle);
 +begin
 +  TranslateDialog_LP(hwndDlg,hLangpack);
 +end;
 +
 +procedure TranslateMenu(hMenu: HMENU);
 +begin
 +  TranslateMenu_LP(hMenu,hLangpack);
 +end;
 +
 +function Langpack_Register:int_ptr;
 +begin
 +  result:=CallService(MS_LANGPACK_REGISTER,WPARAM(@hLangpack),LPARAM(@PluginInfo));
 +end;
 +
 +
 +function ProtoBroadcastAck(const szModule: PAnsiChar; hContact: THandle; type_: int; result_: int; hProcess: THandle; lParam: LPARAM): int_ptr;
 +var
 +  ack: TACKDATA;
 +begin
 +  ack.cbSize   := sizeof(TACKDATA);
 +  ack.szModule := szModule;
 +  ack.hContact := hContact;
 +  ack._type    := type_;
 +  ack._result  := result_;
 +  ack.hProcess := hProcess;
 +  ack.lParam   := lParam;
 +  Result := CallService(MS_PROTO_BROADCASTACK, 0, tlParam(@ack));
 +end;
 +
 +function CreateProtoServiceFunction(const szModule, szService: PAnsiChar; serviceProc: TMIRANDASERVICE): int_ptr;
 +var
 +  szStr: array[0..MAXMODULELABELLENGTH*2] of AnsiChar;
 +begin
 +  if (szModule=nil) or (szService=nil) then
 +  begin
 +    result:=0;
 +    exit;
 +  end;
 +  lstrcpya(szStr, szModule);
 +  lstrcata(szStr, szService);
 +  Result := CreateServiceFunction(szStr, @serviceProc);
 +end;
 +
 +
 +function LoadSkinnedIcon(id: int): THandle;
 +begin
 +  Result := CallService(MS_SKIN_LOADICON, id, 0);
 +end;
 +
 +function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle;
 +begin
 +  Result := CallService(MS_SKIN_LOADPROTOICON, wParam(szProto), status);
 +end;
 +
 +function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr;
 +var
 +  ssd: TSKINSOUNDDESCEX;
 +begin
 +  FillChar(ssd,SizeOf(ssd),0);
 +  ssd.cbSize         := sizeof(ssd);
 +  ssd.pszName        := name;
 +  ssd.pszDescription.a := description;
 +  ssd.pszDefaultFile.a := defaultFile;
 +  Result := CallService(MS_SKIN_ADDNEWSOUND, hLangpack, lParam(@ssd));
 +end;
 +
 +function SkinPlaySound (const name: PAnsiChar): int_ptr;
 +begin
 +  Result := CallService(MS_SKIN_PLAYSOUND, 0, lParam(name));
 +end;
 +
 +
 +function Menu_AddContextFrameMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +begin
 +  mi^.hLangpack:=hLangpack;
 +  result:=CallService(MS_CLIST_ADDCONTEXTFRAMEMENUITEM, 0,LPARAM(mi));
 +end;
 +
 +function Menu_AddMainMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +begin
 +  mi^.hLangpack:=hLangpack;
 +  result:=CallService(MS_CLIST_ADDMAINMENUITEM, 0,LPARAM(mi));
 +end;
 +
 +function Menu_AddContactMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +begin
 +  mi^.hLangpack:=hLangpack;
 +  result:=CallService(MS_CLIST_ADDCONTACTMENUITEM, 0,LPARAM(mi));
 +end;
 +
 +function Menu_AddStatusMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +begin
 +  mi^.hLangpack:=hLangpack;
 +  result:=CallService(MS_CLIST_ADDSTATUSMENUITEM, 0,LPARAM(mi));
 +end;
 +
 +function Menu_AddProtoMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +begin
 +  mi^.hLangpack:=hLangpack;
 +  result:=CallService(MS_CLIST_ADDPROTOMENUITEM, 0,LPARAM(mi));
 +end;
 +
 +function Menu_AddSubGroupMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +begin
 +  mi^.hLangpack:=hLangpack;
 +  result:=CallService(MS_CLIST_ADDSUBGROUPMENUITEM, 0,LPARAM(mi));
 +end;
 +
 +function Menu_AddGroupMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +begin
 +  mi^.hLangpack:=hLangpack;
 +  result:=CallService(MS_CLIST_ADDGROUPMENUITEM, 0,LPARAM(mi));
 +end;
 +
 +function Menu_AddTrayMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 +begin
 +  mi^.hLangpack:=hLangpack;
 +  result:=CallService(MS_CLIST_ADDTRAYMENUITEM, 0,LPARAM(mi));
 +end;
 +
 +
 +function UserInfo_AddPage(wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr;
 +begin
 +  odp^.hLangpack:=hLangpack;
 +	result:=CallService(MS_USERINFO_ADDPAGE, wParam, LPARAM(odp));
 +end;
 +
 +function Options_AddPage(wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr;
 +begin
 +  odp^.hLangpack:=hLangpack;
 +	result:=CallService(MS_OPT_ADDPAGE, wParam, LPARAM(odp));
 +end;
 +
 +function Hotkey_Register(hk:PHOTKEYDESC):int_ptr;
 +begin
 +	result:=CallService(MS_HOTKEY_REGISTER, hLangpack, LPARAM(hk));
 +end;
 +
 +function Skin_AddIcon(si:PSKINICONDESC):THANDLE;
 +begin
 +  result:=CallService(MS_SKIN2_ADDICON, hLangpack, LPARAM(si));
 +end;
 +
 +procedure FontRegister(pFontID:pFontID);
 +begin
 +	CallService('Font/Register', WPARAM(pFontID), hLangpack);
 +end;
 +procedure FontRegisterW(pFontID:pFontIDW);
 +begin
 +	CallService('Font/RegisterW', WPARAM(pFontID), hLangpack);
 +end;
 +
 +procedure ColourRegister(pColorID:pColourID);
 +begin
 +	CallService('Colour/Register', WPARAM(pColorID), hLangpack);
 +end;
 +procedure ColourRegisterW(pColorID:pColourIDW);
 +begin
 +	CallService('Colour/RegisterW', WPARAM(pColorID), hLangpack);
 +end;
 +
 +procedure EffectRegister(pEffectID:pEffectID);
 +begin
 +	CallService('Effect/Register', WPARAM(pEffectID), hLangpack);
 +end;
 +procedure EffectRegisterW(pEffectID:pEffectIDW);
 +begin
 +	CallService('Effect/RegisterW', WPARAM(pEffectID), hLangpack);
 +end;
 +
 +{$ENDIF}
 diff --git a/include/delphi/m_history.inc b/include/delphi/m_history.inc index af019ee255..006528de95 100644 --- a/include/delphi/m_history.inc +++ b/include/delphi/m_history.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,19 +18,18 @@ 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_HISTORY}
  {$DEFINE M_HISTORY}
  const
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affects: Show's the history dialog box for a contact, see notes
 -        Notes  : HCONTACT can be NULL(0) to show system messages
 -    }
 -    MS_HISTORY_SHOWCONTACTHISTORY       = 'History/ShowContactHistory';
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affects: Show's the history dialog box for a contact, see notes
 +    Notes  : HCONTACT can be NULL(0) to show system messages
 +  }
 +  MS_HISTORY_SHOWCONTACTHISTORY:PAnsiChar = 'History/ShowContactHistory';
  {$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_hotkeys.inc b/include/delphi/m_hotkeys.inc index e0bda35da1..e0bda35da1 100644 --- a/plugins/Pascal_Headers/m_hotkeys.inc +++ b/include/delphi/m_hotkeys.inc diff --git a/plugins/Pascal_Headers/m_icolib.inc b/include/delphi/m_icolib.inc index 3c358c3f49..3c358c3f49 100644 --- a/plugins/Pascal_Headers/m_icolib.inc +++ b/include/delphi/m_icolib.inc diff --git a/plugins/Pascal_Headers/m_iconheader.inc b/include/delphi/m_iconheader.inc index 1d99c41630..1d99c41630 100644 --- a/plugins/Pascal_Headers/m_iconheader.inc +++ b/include/delphi/m_iconheader.inc diff --git a/include/delphi/m_icq.inc b/include/delphi/m_icq.inc index a498513f01..6932ff6e8a 100644 --- a/include/delphi/m_icq.inc +++ b/include/delphi/m_icq.inc @@ -1,191 +1,381 @@ -(*
 +{ ---------------------------------------------------------------------------
 +                ICQ plugin for Miranda Instant Messenger
 +                ________________________________________
 -Miranda IM: the free IM client for Microsoft* Windows*
 + Copyright c 2000-2001 Richard Hughes, Roland Rabien, Tristan Van de Vreede
 + Copyright c 2001-2002 Jon Keating, Richard Hughes
 + Copyright c 2002-2004 Martin –berg, Sam Kothari, Robert Rainwater
 + Copyright c 2004-2009 Joe Kucera
 -Copyright 2000-2003 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 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.
 -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.
 -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.
 + -----------------------------------------------------------------------------
 -*)
 +// File name      : $URL: https://svn.sourceforge.net/svnroot/miranda/trunk/miranda/include/m_icq.h $
 +// Revision       : $Revision: 9376 $
 +// Last change on : $Date: 2009-04-09 23:55:33 +0400 (‘', 09 øõ‘? 2009) $
 +// Last change by : $Author: jokusoftware $
 +
 + DESCRIPTION:
 +
 +  Describe me here please...
 +
 + -----------------------------------------------------------------------------
 + Note: In v0.3 the part before "/Servicename" is dynamic. It will be the name of the protocol.
 + Example: If the plugin was loaded from ICQ.dll, the service name is "ICQ/Servicename", and if
 + the dll was Icq2.dll, the service name will be "Icq2/Servicename". This behaviour is temporary
 + until proper multiaccounts are implemented.
 +}
  {$IFNDEF M_ICQ}
  {$DEFINE M_ICQ}
 +// extended search result structure, used for all searches
 +type
 +  PICQSEARCHRESULT = ^TICQSEARCHRESULT;
 +  TICQSEARCHRESULT = record
 +    hdr : TPROTOSEARCHRESULT;
 +    uin : DWORD;
 +    auth: BYTE;
 +{
 +    // not presents in new version
 +    uid          :PAnsiChar;
 +    nick         :PAnsiChar; // utf-8
 +    firstName    :PAnsiChar;
 +    lastName     :PAnsiChar;
 +}
 +    gender       :byte;
 +    age          :byte;
 +    country      :dword;
 +    maritalStatus:byte;
 +  end;
 +(*
 +{
 +  start a search of all ICQ users by e-mail
 +  wParam=0
 +  lParam=(LPARAM)(const AnsiChar* )email
 +  returns a handle to the search on success, NULL on failure
 +  Results are returned using the same scheme documented in PSS_BASICSEARCH
 +  **DEPRECATED** in favour of PS_SEARCHBYEMAIL
 +}
 +const
 +   MS_ICQ_SEARCHBYEMAIL = '/SearchByEmail';
 +{
 +  start a search of all ICQ users by details
 +  wParam=0
 +  lParam=(LPARAM)(ICQDETAILSSEARCH* )&ids
 +  returns a handle to the search on success, NULL on failure
 +  Results are returned using the same scheme documented in PSS_BASICSEARCH
 +  **DEPRECATED** in favour of PS_SEARCHBYNAME
 +}
 +type
 +  PICQDETAILSSEARCH = ^TICQDETAILSSEARCH;
 +  TICQDETAILSSEARCH = record
 +    nick      : PAnsiChar;
 +    firstName : PAnsiChar;
 +    lastName  : PAnsiChar;
 +  end;
  const
 +   MS_ICQ_SEARCHBYDETAILS = '/SearchByDetails';
 +*)
 +{
 +  Request authorization
 +  wParam=(WPARAM)hContact
 +}
 +const
 +   MS_REQ_AUTH = '/ReqAuth';
 +{
 +  Grant authorization
 +  wParam=(WPARAM)hContact;
 +}
 +   MS_GRANT_AUTH = '/GrantAuth';
 +{
 +  Revoke authorization
 +  wParam=(WPARAM)hContact
 +}
 +   MS_REVOKE_AUTH = '/RevokeAuth';
 -    // extra database event type
 -    ICQEVENTTYPE_WEBPAGER       = 2003;
 +{
 +  Open ICQ profile
 +  wParam=(WPARAM)hContact
 +}
 +   MS_OPEN_PROFILE = '/OpenProfile';
 -    // extra flags for PSS_MESSAGE
 -    PIMF_ROUTE_DEFAULT          = 0;
 -    PIMF_ROUTE_DIRECT           = $10000;
 -    PIMF_ROUTE_THRUSERVER       = $20000;
 -    PIMF_ROUTE_BESTWAY          = $30000;
 -    PIMF_ROUTE_MASK             = $30000;
 +{
 +  Add contact to server-list
 +  wParam=(WPARAM)hContact
 +}
 +   MS_ICQ_ADDSERVCONTACT  = '/AddServerContact';
 +{
 +  Display XStatus detail (internal use only)
 +  wParam=(WPARAM)hContact;
 +}
 +   MS_XSTATUS_SHOWDETAILS = '/ShowXStatusDetails';
 +{Send an SMS via the ICQ network
 +wParam=(WPARAM)(const AnsiChar*)szPhoneNumber
 +lParam=(LPARAM)(const AnsiChar*)szMessage
 +Returns a HANDLE to the send on success, or NULL on failure
 +szPhoneNumber should be the full number with international code and preceeded
 +  by a +
 -    // for SMS
 +When the server acks the send, an ack will be broadcast:
 + type=ICQACKTYPE_SMS, result=ACKRESULT_SENTREQUEST, lParam=(LPARAM)(AnsiChar*)szInfo
 +At this point the message is queued to be delivered. szInfo contains the raw
 +XML data of the ack. Here's what I got when I tried:
 +"<sms_response><source>airbornww.com</source><deliverable>Yes</deliverable><network>BT Cellnet, United Kingdom</network><message_id>[my uin]-1-1955988055-[destination phone#, without +]</message_id><messages_left>0</messages_left></sms_response>\r\n"
 +Now the hProcess has been deleted. The only way to track which receipt
 +corresponds with which response is to parse the <message_id> field.
 +At a (possibly much) later time the SMS will have been delivered. An ack will
 +be broadcast:
 + type=ICQACKTYPE_SMS, result=ACKRESULT_SUCCESS, hProcess=NULL, lParam=(LPARAM)(AnsiChar*)szInfo
 +Note that the result will always be success even if the send failed, just to
 +save needing to have an attempt at an XML parser in the ICQ module.
 +Here's the szInfo for a success:
 +"<sms_delivery_receipt><message_id>[my uin]-1--1461632229-[dest phone#, without +]</message_id><destination>[dest phone#, without +]</destination><delivered>Yes</delivered><text>[first 20 bytes of message]</text><submition_time>Tue, 30 Oct 2001 22:35:16 GMT</submition_time><delivery_time>Tue, 30 Oct 2001 22:34:00 GMT</delivery_time></sms_delivery_receipt>"
 +And here's a failure:
 +"<sms_delivery_receipt><message_id>[my uin]-1-1955988055-[destination phone#, without leading +]</message_id><destination>[destination phone#, without leading +]</destination><delivered>No</delivered><submition_time>Tue, 23 Oct 2001 23:17:02 GMT</submition_time><error_code>999999</error_code><error><id>15</id><params><param>0</param><param>Multiple message submittion failed</param></params></error></sms_delivery_receipt>"
 +SMSes received from phones come through this same ack, again to avoid having
 +an XML parser in the protocol module. Here's one I got:
 +"<sms_message><source>MTN</source><destination_UIN>[UIN of recipient, ie this account]</destination_UIN><sender>[sending phone number, without +]</sender><senders_network>[contains one space, because I sent from ICQ]</senders_network><text>[body of the message]</text><time>Fri, 16 Nov 2001 03:12:33 GMT</time></sms_message>"
 +}
 +  ICQACKTYPE_SMS   = 1001;
 +  ICQEVENTTYPE_SMS = 2001;     {database event type }
 +  MS_ICQ_SENDSMS = '/SendSMS';
 -    ICQACKTYPE_SMS              = 1001;
 -    ICQEVENTTYPE_SMS            = 2001;	  // database event type
 +{
 +  e-mail express
 +  db event added to NULL contact
 +  blob format is:
 +  ASCIIZ    text, usually of the form "Subject: %s\r\n%s"
 +  ASCIIZ    from name
 +  ASCIIZ    from e-mail
 +}
 +  ICQEVENTTYPE_EMAILEXPRESS = 2002; // database event type
 +{
 +  www pager
 +  db event added to NULL contact
 +  blob format is:
 +  ASCIIZ    text, usually "Sender IP: xxx.xxx.xxx.xxx\r\n%s"
 +  ASCIIZ    from name
 +  ASCIIZ    from e-mail
 +}
 +  ICQEVENTTYPE_WEBPAGER = 2003; // database event type
 +{
 +  missed message notification
 +  db event added to contact's history
 +  blob format is:
 +  WORD      error code
 +}
 +  ICQEVENTTYPE_MISSEDMESSAGE = 2004; //database event type
 +{
 +  for server-side lists, used internally only
 +  hProcess=dwSequence
 +  lParam=server's error code, 0 for success
 +}
 +  ICQACKTYPE_SERVERCLIST = 1003;
 +{
 +  for rate warning distribution (mainly upload dlg)
 +  hProcess=Rate class ID
 +  lParam=server's status code
 +}
 +  ICQACKTYPE_RATEWARNING = 1004;
 +{
 +  received Xtraz Notify response
 +  hProcess=dwSequence
 +  lParam=contents of RES node
 +}
 +  ICQACKTYPE_XTRAZNOTIFY_RESPONSE = 1005;
 +{
 +  received Custom Status details response
 +  hProcess=dwSequence
 +  lParam=0
 +}
 +  ICQACKTYPE_XSTATUS_RESPONSE = 1006;
 -    // for e-mail express
 +//Update user details on server
 +//Permited operation types:
 +  CIXT_BASIC      = $0001;
 +  CIXT_MORE       = $0002;
 +  CIXT_WORK       = $0004;
 +  CIXT_CONTACT    = $0008;
 +  CIXT_LOCATION   = $0010;
 +  CIXT_BACKGROUND = $0020;
 +  CIXT_EDUCATION  = $0040;
 +  CIXT_EXTRA      = $0080;
 +  CIXT_FULL       = $00FF;
 -    {
 -        BLOB:
 -        text: ASCIIZ        usually in the form "Subject: %s\r\n%s"
 -        from-name: ASCIIZ
 -        from-e-mail: ASCIIZ
 -    }
 +//wParam=operationType
 +  PS_CHANGEINFOEX = '/ChangeInfoEx';
 -    ICQEVENTTYPE_EMAILEXPRESS   = 2002;
 +{
 +  Change nickname in White pages
 +  lParam=(LPARAM)(const AnsiChar*)szNewNickName
 +}
 +  PS_SET_NICKNAME = '/SetNickname';
 -    // for server side lists, used internally only
 +{
 +  Set password for current session
 +  lParam=(LPARAM)(const AnsiChar*)szPassword
 +}
 +  PS_ICQ_SETPASSWORD = '/SetPassword';
 -    // hProcess=dwSequence, lParam=server's error code, 0 for success
 -    ICQACKTYPE_SERVERCLIST      = 1003;
 +{
 +  miranda/icqoscar/statusmsgreq event
 +  called when our status message is requested
 +  wParam=(BYTE)msgType
 +  lParam=(DWORD)uin
 +  msgType is one of the ICQ_MSGTYPE_GET###MSG constants in icq_constants.h
 +  uin is the UIN of the contact requesting our status message
 +}
 +  ME_ICQ_STATUSMSGREQ = '/StatusMsgReq';
 -{$ifndef m_protosvc}
 -    {$include m_protosvc.inc}
 -{$endif}
 +{
 +  set owner avatar
 +  wParam=0
 +  lParam=(const AnsiChar *)Avatar file name
 +  return=0 for sucess
 +}
 +  PS_ICQ_SETMYAVATAR = '/SetMyAvatar';
 +
 +{
 +  get current owner avatar
 +  wParam=(AnsiChar *)Buffer to file name
 +  lParam=(int)Buffer size
 +  return=0 for sucess
 +}
 +  PS_ICQ_GETMYAVATAR = '/GetMyAvatar';
 +
 +{
 +  get size limit for avatar image
 +  wParam=(int *)max width of avatar - will be set
 +  lParam=(int *)max height of avatar - will be set
 +  return=0 for sucess
 +}
 +  PS_ICQ_GETMYAVATARMAXSIZE = '/GetMyAvatarMaxSize';
 +
 +{
 +  check if image format supported for avatars
 +  wParam = 0
 +  lParam = PA_FORMAT_*   // avatar format
 +  return = 1 (supported) or 0 (not supported)
 +}
 +  PS_ICQ_ISAVATARFORMATSUPPORTED = '/IsAvatarFormatSupported';
 +
 +{ Custom Status helper API *
 + - to set custom status message & title use PS_ICQ_GETCUSTOMSTATUS to obtain
 +   DB settings and write values to them (UTF-8 strings best).
 + - use PS_ICQ_GETCUSTOMSTATUSEX and PS_ICQ_SETCUSTOMSTATUSEX for controling Custom Status
 + - custom messages for each user supported - ME_ICQ_STATUSMSGREQ with type MTYPE_SCRIPT_NOTIFY
 +}
 +
 +  CSSF_MASK_STATUS    = $0001; // status member valid for set/get
 +  CSSF_MASK_NAME      = $0002; // pszName member valid for set/get
 +  CSSF_MASK_MESSAGE   = $0004; // pszMessage member valid for set/get
 +  CSSF_DISABLE_MENU   = $0020; // disable default custom status menu, wParam = bEnable
 +  CSSF_DISABLE_UI     = $0040; // disable default custom status UI, wParam = bEnable
 +  CSSF_DEFAULT_NAME   = $0080; // only with CSSF_MASK_NAME and get API to get default custom status name (wParam = status)
 +  CSSF_STATUSES_COUNT = $0100; // returns number of custom statuses in wParam, only get API
 +  CSSF_STR_SIZES      = $0200; // returns sizes of custom status name & message (wParam & lParam members) in chars
 +  CSSF_UNICODE        = $1000; // strings are in UCS-2
  type
 +  PICQ_CUSTOM_STATUS = ^TICQ_CUSTOM_STATUS;
 +  TICQ_CUSTOM_STATUS = record
 +    cbSize   :int;     // size of the structure
 +    flags    :int;     // combination of CSSF_*
 +    status   :^int;    // custom status id
 +    szName   :TChar;   // buffer for custom status name
 +    szMessage:TChar;   // buffer for custom status message
 +    wParam   :^WPARAM; // extra params, see flags
 +    lParam   :^LPARAM;
 +  end;
 -    PICQSEARCHRESULT = ^TICQSEARCHRESULT;
 -    TICQSEARCHRESULT = record
 -        hdr: TPROTOSEARCHRESULT;
 -        uin: DWORD;
 -        auth: Byte;
 -    end;
 +const
 +{
 +  Sets owner current custom status
 +  wParam = (int)N   // custom status id (1-29)
 +  lParam = 0
 +  return = N (id of status set) or 0 (failed - probably bad params)
 +}
 +  PS_ICQ_SETCUSTOMSTATUS = '/SetXStatus';
 -    PICQDETAILSSEARCH = ^TICQDETAILSSEARCH;
 -    TICQDETAILSSEARCH = record
 -        nick: PChar;
 -        firstName: PChar;
 -        lastNamee: PChar;
 -    end;
 +{
 +   Sets owner current custom status
 +   wParam = 0                          // reserved
 +   lParam = (ICQ_CUSTOM_STATUS*)pData  // contains what to set and new values
 +   return = 0 (for success)
 +}
 +  PS_ICQ_SETCUSTOMSTATUSEX = '/SetXStatusEx';
 +
 +{
 + Retrieves custom status details for specified hContact
 + wParam = (HANDLE)hContact
 + lParam = (ICQ_CUSTOM_STATUS*)pData  // receives details (members must be prepared)
 + return = 0 (for success)
 +}
 +  PS_ICQ_GETCUSTOMSTATUSEX = '/GetXStatusEx';
  const
 +  LR_BIGICON = $40;
 +{
 +  Retrieves specified custom status icon
 +  wParam = (int)N  // custom status id (1-32), 0 = my current custom status
 +  lParam = flags   // use LR_SHARED for shared HICON, LR_BIGICON for 32x32 icon
 +  return = HICON   // custom status icon (use DestroyIcon to release resources)
 +}
 +  PS_ICQ_GETCUSTOMSTATUSICON = '/GetXStatusIcon';
 -    {
 -        wParam : 0
 -        lParam : null terminated string containing e-mail to search
 -        affects: Start a search for all ICQ users by e-mail -- see notes
 -        returns: Returnss a handle to the search on success, NULL(0) on failure
 -        notes  : uses the same scheme as PSS_BASICSEARCH,
 -                 *DEPRECATED* in favour of PS_SEARCHBYEMAIL
 -    }
 -    MS_ICQ_SEARCHBYEMAIL        = 'ICQ/SearchByEmail';
 -
 -    {
 -        wParam : 0
 -        lParam : POinter to a TICQDETAILSSEARCH structure
 -        Affect : Start a search of all ICQ users by details, see notes
 -        Returns: A handle to the search on success, NULL(0) on failure
 -        Notes  : Results are returned in the same scheme as in PSS_BASICSEARCH,
 -                 Not recommended, use PS_SEARCHBYNAME
 -    }
 -    MS_ICQ_SEARCHBYDETAILS      = 'ICQ/SearchByDetails';
 -
 -    {
 -        wParam : Pointer to a null terminated string containing phone number
 -        lParam : Pointer to a null terminated string containing the message
 -        Affect : Send an SMS via the ICQ network, See notes
 -        Returns: Handle to the send on success, NULL(0) on failure
 -        Notes  : the phone number should be the full number with internation code
 -                 and prefixed by + e.g. +44<numba>
 -    }
 -    MS_ICQ_SENDSMS              = 'ICQ/SendSMS';
 -
 -    {
 -        wParam : level
 -        lParam : null terminated string containing logging message
 -        Affect : a logging message was sent from ICQLib
 -    }
 -    ME_ICQ_LOG                  = 'ICQ/Log';
 +{
 +  Get Custom status DB field names & current owner custom status
 +  wParam = (AnsiChar**)szDBTitle // will receive title DB setting name (do not free)
 +  lParam = (AnsiChar**)szDBMsg   // will receive message DB setting name
 +  Return = N  // current custom status id if successful, 0 otherwise
 +}
 +  PS_ICQ_GETCUSTOMSTATUS = '/GetXStatus';
 -{$ENDIF}
 +{
 +  Request Custom status details (messages) for specified contact
 +  wParam = hContact  // request custom status details for this contact
 +  lParam = 0
 +  return = (int)dwSequence   // if successful it is sequence for ICQACKTYPE_XSTATUS_RESPONSE
 +  0 failed to request (e.g. auto-request enabled)
 +  -1 delayed (rate control) - sequence unknown
 +}
 +  PS_ICQ_REQUESTCUSTOMSTATUS = '/RequestXStatusDetails';
 +
 +{
 +  Called when contact changes custom status and extra icon is set to clist_mw
 +  wParam = hContact    // contact changing status
 +  lParam = hIcon       // HANDLE to clist extra icon set as custom status
 +}
 +  ME_ICQ_CUSTOMSTATUS_EXTRAICON_CHANGED = '/XStatusExtraIconChanged';
 -    {$ifdef __}
 -//Changing user info:
 -//See documentation of PS_CHANGEINFO
 -//The changing user info stuff built into the protocol is purposely extremely
 -//thin, to the extent that your data is passed as-is to the server without
 -//verification. Don't mess up.
 -//Everything is byte-aligned
 -//WORD:  2 bytes, little-endian (that's x86 order)
 -//DWORD: 4 bytes, little-endian
 -//LNTS:  a WORD containing the length of the string, followed by the string
 -//       itself. No zero terminator.
 -#define ICQCHANGEINFO_MAIN     0xEA03
 -/* pInfoData points to:
 -    WORD    datalen
 -    LNTS    nick
 -    LNTS    first
 -    LNTS    last
 -    LNTS    email
 -    LNTS    city
 -    LNTS    state
 -    LNTS    phone
 -    LNTS    fax
 -    LNTS    street
 -    LNTS    cellular (if SMS-able string contains an ending ' SMS')
 -    LNTS    zip
 -    WORD    country
 -    BYTE    gmt
 -    BYTE    unknown, usually 0
 -*/
 -#define ICQCHANGEINFO_MORE     0xFD03
 -/* pInfoData points to:
 -    WORD    datalen
 -    BYTE    age
 -    BYTE    0
 -    BYTE    sex
 -    LNTS    homepage
 -    WORD    birth-year
 -    BYTE    birth-month
 -    BYTE    birth-day
 -    BYTE    lang1
 -    BYTE    lang2
 -    BYTE    lang3
 -*/
 -#define ICQCHANGEINFO_ABOUT	   0x0604
 -/* pInfoData points to:
 -    WORD    datalen
 -	LNTS    about
 -*/
 -#define ICQCHANGEINFO_WORK	   0xF303
 -/* pInfoData points to:
 -    WORD    datalen
 -    LNTS    city
 -    LNTS    state
 -    DWORD   0
 -    LNTS    street
 -    LNTS    zip
 -    WORD    country
 -    LNTS    company-name
 -    LNTS    company-dept
 -    LNTS    company-position
 -    WORD    0
 -    LNTS    company-web
 -*/
 -#define ICQCHANGEINFO_PASSWORD 0x2E04
 -/* pInfoData points to:
 -    WORD    datalen
 -	LNTS    newpassword
 -*/
 -    {$endif}
 +{
 +  Called when a contact changes its custom status 
 +  wParam = hContact
 +  lParam = 0
 +}
 +  ME_ICQ_CUSTOMSTATUS_CHANGED = '/XStatusChanged';
 +{
 +  Called from contact list in order to get index of custom status icon in list
 +  wParam = hContact
 +  lParam = 0
 +  return = (int) index of extra contact icon shifted <<16 
 +  (the low word will be normal status icon, the high will be xStatus Icon)
 +}
 +  PS_ICQ_GETADVANCEDSTATUSICON = '/GetAdvancedStatusIcon';
 +
 +{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_idle.inc b/include/delphi/m_idle.inc index bda2caea84..bda2caea84 100644 --- a/plugins/Pascal_Headers/m_idle.inc +++ b/include/delphi/m_idle.inc diff --git a/include/delphi/m_ignore.inc b/include/delphi/m_ignore.inc index 4dd83c4cee..9880e9bf33 100644 --- a/include/delphi/m_ignore.inc +++ b/include/delphi/m_ignore.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,56 +18,56 @@ 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_IGNORE}
  {$DEFINE M_IGNORE}
 -    { this module only provides UI and storage for blocking only, protocol modules
 -      are responsible for implementing the block }
 +// this module only provides UI and storage for blocking only, protocol modules
 +//  are responsible for implementing the block
  const
 +  IGNOREEVENT_ALL           = LPARAM(-1);
 +  IGNOREEVENT_MESSAGE       = 1;
 +  IGNOREEVENT_URL           = 2;
 +  IGNOREEVENT_FILE          = 3;
 +  IGNOREEVENT_USERONLINE    = 4;
 +  IGNOREEVENT_AUTHORIZATION = 5;
 +  IGNOREEVENT_YOUWEREADDED  = 6; // 0.3.3a+
 +  IGNOREEVENT_TYPINGNOTIFY  = 7; // 0.7+
 -    IGNOREEVENT_ALL         = LPARAM(-1);
 -    IGNOREEVENT_MESSAGE     = 1;
 -    IGNOREEVENT_URL         = 2;
 -    IGNOREEVENT_FILE        = 3;
 -    IGNOREEVENT_USERONLINE  = 4;
 -    IGNOREEVENT_AUTHORIZATION=5;
 -    IGNOREEVENT_YOUWEREADDED=6; // 0.3.3a+      
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : IGNOREEVENT_*
 -        Affects: Determines if a message type to a contact should be ignored, see notes
 -        Returns: 0 if the message type MUST be shown [non zero] if it MUST be ignored
 -        Notes  : HCONTACT can be NULL(0) to see what to do with a contact
 -                 that isn't on the list (or is unknown in some way)
 -                 don't use the IGNOREEVENT_ALL type!
 -        Version: v0.1.0.1+
 -    }
 -    MS_IGNORE_ISIGNORED     = 'Ignore/IsIgnored';
 +  {
 +    wParam : HCONTACT
 +    lParam : IGNOREEVENT_*
 +    Affects: Determines if a message type to a contact should be ignored, see notes
 +    Returns: 0 if the message type MUST be shown [non zero] if it MUST be ignored
 +    Notes  : HCONTACT can be NULL(0) to see what to do with a contact
 +             that isn't on the list (or is unknown in some way)
 +             don't use the IGNOREEVENT_ALL type!
 +    Version: v0.1.0.1+
 +  }
 +  MS_IGNORE_ISIGNORED:PAnsiChar = 'Ignore/IsIgnored';
 -    {
 -        wParam : HCONTACT
 -        lParam : IGNOREEVENT_* constant
 -        Affects: Ignore future messages from a contact, see notes
 -        Returns: 0 on success, [nonzero] on failure
 -        Notes  : wParam: NULL(0) can be used to see if an unknown contact should be ignored
 -                 or not - you can't SET unknown contact's ignore types, this is to stop
 -                 a plugin allowing certain functions (I guess)
 -        Version: v0.1.0.1+
 -    }
 -    MS_IGNORE_IGNORE        = 'Ignore/Ignore';
 +  {
 +    wParam : HCONTACT
 +    lParam : IGNOREEVENT_* constant
 +    Affects: Ignore future messages from a contact, see notes
 +    Returns: 0 on success, [nonzero] on failure
 +    Notes  : wParam: NULL(0) can be used to see if an unknown contact should be
 +             ignored or not - you can't SET unknown contact's ignore types, this
 +             is to stop a plugin allowing certain functions (I guess)
 +    Version: v0.1.0.1+
 +  }
 +  MS_IGNORE_IGNORE:PAnsiChar = 'Ignore/Ignore';
 -    {
 -        wParam : HCONTACT
 -        lParam : IGNOREEVENT_*
 -        Affects: Receive future messages from a contact -- of the given type, see notes
 -        Returns: 0 on success, non zero on failure
 -        Notes  : Use NULL(0) for HCONTACT to retrieve the setting for an unknown contact
 -        Version: v0.1.0.1+
 -    }
 -    MS_IGNORE_UNIGNORE      = 'Ignore/Unignore';
 +  {
 +    wParam : HCONTACT
 +    lParam : IGNOREEVENT_*
 +    Affects: Receive future messages from a contact -- of the given type, see notes
 +    Returns: 0 on success, non zero on failure
 +    Notes  : Use NULL(0) for HCONTACT to retrieve the setting for an unknown contact
 +    Version: v0.1.0.1+
 +  }
 +  MS_IGNORE_UNIGNORE:PAnsiChar = 'Ignore/Unignore';
  {$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_imgsrvc.inc b/include/delphi/m_imgsrvc.inc index 9a73b50359..9a73b50359 100644 --- a/plugins/Pascal_Headers/m_imgsrvc.inc +++ b/include/delphi/m_imgsrvc.inc diff --git a/plugins/Pascal_Headers/m_json.inc b/include/delphi/m_json.inc index b18b396814..b18b396814 100644 --- a/plugins/Pascal_Headers/m_json.inc +++ b/include/delphi/m_json.inc diff --git a/include/delphi/m_langpack.inc b/include/delphi/m_langpack.inc index 2c1f99478c..0db455c5b7 100644 --- a/include/delphi/m_langpack.inc +++ b/include/delphi/m_langpack.inc @@ -1,9 +1,8 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
 -Copyright 2000-2003 Miranda ICQ/IM project,
 -all portions of this codebase are copyrighted to the people
 +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
 @@ -19,64 +18,98 @@ 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_LANGPACK}
  {$DEFINE M_LANGPACK}
  const
 -    {
 -        wParam : 0
 -        lParam : pointer to a null terminated string
 -        Affects: Returns a pointer to a localised string, if there is no known
 -                 translation it will return lParam, the return value does *not*
 -                 have to be freed in anyway (if successful) -- see notes
 -        Returns: a pointer to a null terminated string
 -        Notes  : No check is done to see if Miranda has the required version
 -        Version: v0.1.1.0+
 -    }
 -    MS_LANGPACK_TRANSLATESTRING         = 'LangPack/TranslateString';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a LANGPACKTRANSLATEDIALOG initialised structure, see notes
 -        Affects: Translates a dialog into the user's local language
 -        Returns: 0 on successs [non zero] on failure
 -        Notes  : this service only knows about the following window classes/elements:
 -                 Window titles, STATIC, EDIT, Hyperlink, BUTTON.
 -        Version: v0.1.1.0+
 -    }
 -
 +{
 + translates a single string into the user's local language    v0.1.1.0+
 + wParam=LANG_* flags
 + lParam=(LPARAM)(const AnsiChar*)szEnglish
 + returns a pointer to the localised string. If there is no known translation
 + it will return szEnglish. The return value does not need to be freed in any way
 + Note that the Translate() macro as defined below will crash plugins that are
 + loaded into Miranda 0.1.0.1 and earlier. If anyone's actually using one of
 + these versions, I pity them.
 +}
 +  MS_LANGPACK_TRANSLATESTRING:PAnsiChar = 'LangPack/TranslateString';
 +(*
 +{
 + translates a dialog into the user's local language    v0.1.1.0+
 + wParam=0
 + lParam=(LPARAM)(LANGPACKTRANSLATEDIALOG* )&lptd
 + returns 0 on success, nonzero on failure
 + This service only knows about the following controls:
 + Window titles, STATIC, EDIT, Hyperlink, BUTTON
 +}
  type
 -
 -    PLANGPACKTRANSLATEDIALOG = ^TLANGPACKTRANSLATEDIALOG;
 -    TLANGPACKTRANSLATEDIALOG = record
 -        cbSize: int;
 -        flags: DWORD;
 -        hwndDlg: THandle;
 -        ignoreControls: ^Integer;       // pointer to an array of integers? mebbe?
 -    end;
 +  IntArray = array [0..1000] of integer;
 +  PLANGPACKTRANSLATEDIALOG = ^TLANGPACKTRANSLATEDIALOG;
 +  TLANGPACKTRANSLATEDIALOG = record
 +    cbSize        :int;
 +    flags         :DWORD;
 +    hwndDlg       :HWND;
 +    ignoreControls:^IntArray; // zero-terminated list of control IDs *not* to translate
 +  end;
  const
 +  LPTDF_NOIGNOREEDIT = 1; // translate all edit controls. By default
 +                          // non-read-only edit controls are not translated
 +  LPTDF_NOTITLE      = 2; //do not translate the title of the dialog
 -    { translate all edit controls, by default non-read-only edit controls are not }
 -    LPTDF_NOIGNOREEDIT = 1;
 -    { don't translate the title of the dialog }
 -    LPTDF_NOTITLE      = 2;
 -
 -    MS_LANGPACK_TRANSLATEDIALOG         = 'LangPack/TranslateDialog';
 -
 -    {
 -        wParam : HMENU handle (WinAPI handle to a menu)
 -        lParam : 0
 -        Affects: Translates a menu into the user's local language -- see notes
 -        Returns: 0 on success [non zero] on failure
 -        Notes  : This doesn't work with owner draw menus that store their
 -                 captions in a structure known by the owner -- something to be aware of ;)
 -        version: v0.1.1.0+
 -    }
 -    MS_LANGPACK_TRANSLATEMENU           = 'LangPack/TranslateMenu';
 +const
 + MS_LANGPACK_TRANSLATEDIALOG:PAnsiChar = 'LangPack/TranslateDialog';
 +*)
 +{
 + translates a menu into the user's local language    v0.1.1.0+
 + wParam=(WPARAM)(HMENU)hMenu
 + lParam=0
 + returns 0 on success, nonzero on failure
 +}
 +  MS_LANGPACK_TRANSLATEMENU:PAnsiChar = 'LangPack/TranslateMenu';
 +
 +{
 + returns the codepage used in the language pack     v0.4.3.0+
 + wParam=0
 + lParam=0
 + returns the codepage stated in the langpack, or CP_ACP if no langpack is present
 +}
 +  MS_LANGPACK_GETCODEPAGE:PAnsiChar = 'LangPack/GetCodePage';
 +
 +{
 +  returns the locale id associated with the language pack    v0.4.3.0+
 +  wParam=0
 +  lParam=0
 +  returns the Windows locale id stated in the langpack, or LOCALE_USER_DEFAULT if no langpack is present
 +}
 +  MS_LANGPACK_GETLOCALE:PAnsiChar = 'LangPack/GetLocale';
 +
 +{
 +  returns the strdup/wcsdup of lparam according to the langpack  v0.4.3.0+
 +  wParam=0
 +  lParam=(LPARAM)(AnsiChar*)source string
 +  returns a string converted from AnsiChar* to TCHAR* using the langpack codepage. 
 +  This string should be freed using mir_free() then
 +}
 +  MS_LANGPACK_PCHARTOTCHAR:PAnsiChar = 'LangPack/PcharToTchar';
 +
 +{
 +  initializes the plugin-specific translation context  v0.10.0+
 +  wParam=pointer to the langpack handle
 +  lParam=PLUGININFOEX* of the caller plugin
 +  always returns 0
 +}
 +  MS_LANGPACK_REGISTER:PAnsiChar = 'LangPack/Register';
 +
 +{
 +  reloads langpack
 +  wParam=0 (ignored)
 +  lParam=(LPARAM)(TCHAR*)langpack file name or NULL to reload the current one
 +  always returns 0
 +}
 +  MS_LANGPACK_RELOAD:PAnsiChar = 'LangPack/Reload';
  {$ENDIF}
 diff --git a/include/delphi/m_message.inc b/include/delphi/m_message.inc index dec113bb53..5e25657de8 100644 --- a/include/delphi/m_message.inc +++ b/include/delphi/m_message.inc @@ -1,57 +1,202 @@ -(*
 +{  
 +  Miranda IM: the free IM client for Microsoft  Windows 
 +  
 +  Copyright 2000-2003 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_MESSAGE}
 +{$DEFINE M_MESSAGE}
 +const
 +  {brings up the send message dialog for a contact
 +   wParam=(WPARAM)(HANDLE)hContact
 +   lParam=(LPARAM)(AnsiChar*)szText
 +   returns 0 on success or nonzero on failure
 +   returns immediately, just after the dialog is shown
 +   szText is the text to put in the edit box of the window (but not send)
 +   szText=NULL will not use any text
 +   szText!=NULL is only supported on v0.1.2.0+
 +   NB: Current versions of the convers plugin use the name
 +   "SRMsg/LaunchMessageWindow" instead. For compatibility you should call
 +   both names and the correct one will work. }
 +   MS_MSG_SENDMESSAGE :PAnsiChar = 'SRMsg/SendCommand';
 +   MS_MSG_SENDMESSAGEW:PAnsiChar = 'SRMsg/SendCommandW';
 -Miranda IM: the free IM client for Microsoft* Windows*
 +   ME_MSG_WINDOWEVENT:PAnsiChar = 'MessageAPI/WindowEvent';
 -Copyright 2000-2003 Miranda ICQ/IM project,
 -all portions of this codebase are copyrighted to the people
 -listed in contributors.txt.
 +   MS_MSG_CONVERS:PAnsiChar = 'SRMsg/LaunchMessageWindow';
 -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.
 +  {wparam=0 }
 +  {lparam=(WPARAM)(MessageWindowEventData*)hWindowEvent; }
 +  {Event types }
 +  MSG_WINDOW_EVT_OPENING = 1; // window is about to be opened
 +  MSG_WINDOW_EVT_OPEN    = 2; // window has been opened
 +  MSG_WINDOW_EVT_CLOSING = 3; // window is about to be closed
 +  MSG_WINDOW_EVT_CLOSE   = 4; // window has been closed
 +  MSG_WINDOW_EVT_CUSTOM  = 5; // custom event for message plugins to use
 +                              // (custom uFlags may be used)
 +  MSG_WINDOW_UFLAG_MSG_FROM = $00000001;
 +  MSG_WINDOW_UFLAG_MSG_TO   = $00000002;
 +  MSG_WINDOW_UFLAG_MSG_BOTH = $00000004;
 -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.
 +type
 +  PMessageWindowEventData = ^TMessageWindowEventData;
 +  TMessageWindowEventData = record
 +    cbSize    : int;
 +    hContact  : THANDLE;
 +    hwndWindow: HWND;    // top level window for the contact
 +    szModule  : PAnsiChar;   // used to get plugin type (which means you could use
 +                         // local if needed)
 +    uType     : uint;   // see event types above
 +    uFlags    : uint;   // used to indicate message direction for all event
 +                         // types except custom
 +    local     : pointer; // used to store pointer to custom data
 +    hwndInput : HWND;    // input area window for the contact (or NULL if there is none)
 +    hwndLog   : HWND;    // log area window for the contact (or NULL if there is none)
 +  end;
 -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.
 +const
 +  MS_MSG_GETWINDOWAPI:PAnsiChar = 'MessageAPI/WindowAPI';
 +  { wparam=0
 +    lparam=0
 +    Returns a dword with the current message api version
 +    Current version is 0,0,0,4
 +  }
 -*)
 +  MS_MSG_GETWINDOWCLASS:PAnsiChar = 'MessageAPI/WindowClass';
 +  { wparam=(AnsiChar*)szBuf
 +    lparam=(int)cbSize size of buffer
 +    Sets the window class name in wParam (ex. "SRMM" for srmm.dll)
 +  }
 -{$IFNDEF M_MESSAGE}
 -{$DEFINE M_MESSAGE}
 +type
 +  PMessageWindowInputData = ^TMessageWindowInputData;
 +  TMessageWindowInputData = record
 +    cbSize  : int;
 +    hContact: THANDLE;
 +    uFlags  : int; // see uflags above
 +  end;
  const
 +  MSG_WINDOW_STATE_EXISTS  = $00000001; // Window exists should always be true
 +                                        // if hwndWindow exists
 +  MSG_WINDOW_STATE_VISIBLE = $00000002;
 +  MSG_WINDOW_STATE_FOCUS   = $00000004;
 +  MSG_WINDOW_STATE_ICONIC  = $00000008;
 +
 +type
 +  PMessageWindowOutputData = ^TMessageWindowOutputData;
 +  TMessageWindowOutputData = record
 +    cbSize    : int;
 +    hContact  : THANDLE;
 +    uFlags    : int;     // should be same as input data unless 0, then it
 +                         // will be the actual type
 +    hwndWindow: HWND;    // top level window for the contact or NULL if no window exists
 +    uState    : int;     // see window states
 +    local     : pointer; // used to store pointer to custom data
 +  end;
 +  PMessageWindowData = PMessageWindowOutputData;
 +  TMessageWindowData = TMessageWindowOutputData;
 +
 +const
 +  MS_MSG_GETWINDOWDATA:PAnsiChar = 'MessageAPI/GetWindowData';
 +{ wparam=(MessageWindowInputData*)
 +  lparam=(MessageWindowOutputData*)
 +  returns 0 on success and returns non-zero (1) on error or if no window data
 +  exists for that hcontact
 +}
 +
 +  ME_MSG_WINDOWPOPUP:PAnsiChar = 'MessageAPI/WindowPopupRequested';
 +{ wParam = 0
 + lParam = (MessageWindowPopupData *)&MessageWindowPopupData;
 + Fired to allow plugins to add itens to the msg window popup menu
 + Always fired twice: once with MSG_WINDOWPOPUP_SHOWING and once with MSG_WINDOWPOPUP_SELECTED.
 + This is done to allow cleaning of resources.
 +}
 +  MSG_WINDOWPOPUP_SHOWING  = 1;
 +  MSG_WINDOWPOPUP_SELECTED = 2;
 +
 +  MSG_WINDOWPOPUP_INPUT = 1;
 +  MSG_WINDOWPOPUP_LOG   = 2;
 +
 +type
 +  MessageWindowPopupData = record
 +    cbSize   :int;
 +    uType    :uint;    // see popup types above
 +    uFlags   :uint;    // used to indicate in which window the popup was requested
 +    hContact :THANDLE;
 +    hwnd     :HWND;    // window where the popup was requested
 +    hMenu    :HMENU;   // The handle to the menu
 +    pt       :TPOINT;  // The point, in screen coords
 +    selection:int;     // The menu control id or 0 if no one was selected
 +  end;
 +
 +// status icons - HICONs will be automatically destroyed when removed or when miranda exits
 +const
 +  MBF_DISABLED = 1;
 +  MBF_HIDDEN   = 2;
 +
 +type
 +  StatusIconData = record
 +    cbSize       :int;
 +    szModule     :PAnsiChar; // used in combo with the dwId below to create a unique identifier
 +    dwId         :DWORD;
 +    hIcon,
 +    hIconDisabled:HICON;     // hIconDisabled is optional - if null, will use hIcon in the disabled state
 +    flags        :int;       // one of MBF_* above
 +    szTooltip    :PAnsiChar;
 +  end;
 +
 +const
 +  MBCF_RIGHTBUTTON = 1; // if this flag is specified, the click was a right button -
 +                        // otherwize it was a left click
 +
 +type
 +  StatusIconClickData = record
 +    cbSize       :int;
 +    clickLocation:TPOINT;    // click location, in screen coordinates
 +    szModule     :PAnsiChar;
 +    dwId         :DWORD;
 +    flags        :int;       // one of MBCF_* above
 +  end;
 +
 +const
 +  MS_MSG_ADDICON:PAnsiChar = 'MessageAPI/AddIcon';
 +// lParam = (StatusIconData *)&StatusIconData
 +
 +  MS_MSG_REMOVEICON:PAnsiChar = 'MessageAPI/RemoveIcon';
 +{
 + lParam = (StatusIconData *)&StatusIconData
 + only szModule and szId are used
 +}
 -    {
 -        wParam : HCONTACT
 -        lParam : Pointer to a null terminated string
 -        Affects: brings up the send message dialog for a contact, see notes
 -        Returns: 0 on success, non zero on failure
 -        Notes  : returns immediately, just after the send dialog is shown,
 -                 the lParam is entered into the editbox of the window,
 -                 but it's not sent.
 -        Version: v0.1.2.0+ only supports a string, prior NULL(0) is expected
 -                 this service was defined as 'SRMsg/LaunchMessageWindow'
 -                 use both if compatibility use both, the correct one will work,
 -                 but don't rely on the message to be displayed
 -
 -    }
 -    MS_MSG_SENDMESSAGE          = 'SRMsg/SendCommand';
 -    MS_MSG_SENDMESSAGE_OLD      = 'SRMsg/LaunchMessageWindow';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a null termed string
 -        Affects: displays the send message dialog with the 'multiple' option open
 -                 and no contacts selected
 -        Returns: Returns 0 on success, nonzero on failure
 -        Version: only present after v0.1.2.1+
 -    }
 -    MS_MSG_FORWARDMESSAGE       = 'SRMsg/ForwardMessage';
 +  MS_MSG_MODIFYICON:PAnsiChar = 'MessageAPI/ModifyIcon';
 +{
 + wParam = (HANDLE)hContact
 + lParam = (StatusIconData *)&StatusIconData
 + if hContact is null, icon is modified for all contacts
 + otherwise, only the flags field is valid
 + if either hIcon, hIconDisabled or szTooltip is null, they will not be modified
 +}
 +  ME_MSG_ICONPRESSED:PAnsiChar = 'MessageAPI/IconPressed';
 +{
 + wParam = (HANDLE)hContact;
 + lParam = (StatusIconClickData *)&StatusIconClickData;
 + catch to show a popup menu, etc.
 +}
  {$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_metacontacts.inc b/include/delphi/m_metacontacts.inc index 5ff5cf9855..5ff5cf9855 100644 --- a/plugins/Pascal_Headers/m_metacontacts.inc +++ b/include/delphi/m_metacontacts.inc diff --git a/plugins/Pascal_Headers/m_modernopt.inc b/include/delphi/m_modernopt.inc index cbb981b95b..cbb981b95b 100644 --- a/plugins/Pascal_Headers/m_modernopt.inc +++ b/include/delphi/m_modernopt.inc diff --git a/plugins/Pascal_Headers/m_msg_buttonsbar.inc b/include/delphi/m_msg_buttonsbar.inc index 223c48e331..223c48e331 100644 --- a/plugins/Pascal_Headers/m_msg_buttonsbar.inc +++ b/include/delphi/m_msg_buttonsbar.inc diff --git a/include/delphi/m_netlib.inc b/include/delphi/m_netlib.inc index 8c5f37ef9c..1d6615ec7c 100644 --- a/include/delphi/m_netlib.inc +++ b/include/delphi/m_netlib.inc @@ -1,27 +1,3 @@ -(*
 -
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_NETLIB}
  {$DEFINE M_NETLIB}
 @@ -48,666 +24,893 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  /<<}
 -    {$ifndef M_SYSTEM}
 -        {$include m_system.inc}
 -    {$endif}
 +const
 +  // for TNETLIBUSER.flags
 +  NUF_INCOMING      = $01; // bind incoming ports
 +  NUF_OUTGOING      = $02; // makes outgoing plain connections
 +  NUF_HTTPGATEWAY   = $04; // can use HTTP gateway for plain sockets.
 +                           // ???HttpGateway* are valid, enables the HTTP
 +                           // proxy option, displayed in options
 +  NUF_NOOPTIONS     = $08; // don't show this as an entry for custom settings to
 +                           // be defined for, TNETLIB.szDescriptiveName is ignored
 +  NUF_HTTPCONNS     = $10; // some connections are made for HTTP communication,
 +                           // enables the HTTP proxy option, displayed in options
 +  NUF_NOHTTPSOPTION = $20; // Disables the HTTPS proxy option in options, Use
 +                           // this if all communication is HTTP
 +  NUF_UNICODE       = $40; // if set ptszDescriptiveName points to Unicode, otherwise ANSI
 +
 +  // for TNETLIBUSERSETTINGS.proxyType
 +
 +  { SOCKS4 -- No DNS or multi addressing mode (proxy side) -- optional username can
 +  be given, no password }
 +  PROXYTYPE_SOCKS4 = 1;
 +  { SOCKS5 -- DNS names can be given as addresses to connect to, optional
 +  plain text username/password scheme (which may cause failure due to denied access)
 +  IP address maybe returned for DNS addresses -- thus server side DNS }
 +  PROXYTYPE_SOCKS5 = 2;
 +  PROXYTYPE_HTTP   = 3;
 +  PROXYTYPE_HTTPS  = 4;
 +  PROXYTYPE_IE     = 5;
 +
 +  // for TNETLIBOPENCONNECTION.flags
 +
 +  { this connection will be useed for HTTP communications,
 +  if configured for an HTTP(S) proxy the connection is opened as if there
 +  was no proxy }
 +  NLOCF_HTTP          = $0001;
 +  { this connection should send the sticky headers associated with NetLib
 +   user apart of any HTTP request}
 +  NLOCF_STICKYHEADERS = $0002;
 +  { this connection understands the newer structure, newer cbSize isnt enough}
 +  NLOCF_V2            = $0004;
 +  NLOCF_UDP           = $0008; // this connection is UDP
 +  NLOCF_SSL           = $0010; // this connection is SSL
 +  NLOCF_HTTPGATEWAY   = $0020; // this connection is HTTP Gateway
 +
 +  // for TNETLIBHTTPPROXYINFO.flags
 +
 +  NLHPIF_USEGETSEQUENCE      = $0001; // append sequence numbers to GET requests
 +  NLHPIF_USEPOSTSEQUENCE     = $0002; // append sequence numbers to POST requests
 +  NLHPIF_GETPOSTSAMESEQUENCE = $0004; // GET and POST use the same sequence
 +  NLHPIF_HTTP11              = $0008;  // HTTP 1.1 proxy
 +
 +  // for TNETLIBHTTPREQUEST.flags, .requestType
 +
 +  { used by MS_NETLIB_RECVHTTPHEADERS returned structure }
 +
 +  REQUEST_RESPONSE = 0;
 +  REQUEST_GET      = 1;
 +  REQUEST_POST     = 2;
 +  REQUEST_CONNECT  = 3;
 +  REQUEST_HEAD     = 4; // new in 0.5.1
 +  REQUEST_PUT      = 5;
 +  REQUEST_DELETE   = 6;
 +
 +  NLHRF_GENERATEHOST    = $00000001; // auto generate a 'host' header from .szUrl
 +  NLHRF_REMOVEHOST      = $00000002; // remove any host and/or protocol portion
 +                                     // of szUrl before sending it
 +  NLHRF_SMARTREMOVEHOST = $00000004; // removes host and/or protocol from szUrl
 +                                     // unless the connection was opened through
 +                                     // an HTTP or HTTPS proxy.
 +  NLHRF_SMARTAUTHHEADER = $00000008; // if the connection was opened through an
 +                                     // HTTP or HTTPS proxy then send a
 +                                     // Proxy-Authorization header if required.
 +  NLHRF_HTTP11          = $00000010; // use HTTP 1.1
 +  NLHRF_PERSISTENT      = $00000020; // preserve connection on exit, open connection provided
 +                                     // in the nlc field of the reply it should be supplied in
 +                                     // nlc field of request for reuse or closed if not needed
 +  NLHRF_SSL             = $00000040; // use ssl connection
 +  NLHRF_NOPROXY         = $00000080; // do not use proxy server
 +  NLHRF_REDIRECT        = $00000100; // handle HTTP redirect requests (response 30x), the
 +                                     // resulting url provided in szUrl of the response
 +  NLHRF_NODUMP          = $00010000; // never dump this to the log
 +  NLHRF_NODUMPHEADERS   = $00020000; // don't dump http headers (only useful for
 +                                     // POSTs and MS_NETLIB_HTTPTRANSACTION
 +  NLHRF_DUMPPROXY       = $00040000; // this transaction is a proxy communication.
 +                                     // For dump filtering only.
 +  NLHRF_DUMPASTEXT      = $00080000; // dump posted and reply data as text.
 +                                     // Headers are always dumped as text.
 +  NLHRF_NODUMPSEND      = $00100000; // do not dump sent message.
 +
 +  // for TNETLIBBUFFER.flags
 +
 +  MSG_NOHTTPGATEWAYWRAP = $010000; // don't wrap outgoing packet using
 +                                   // TNETLIBUSER.pfnHttpGatewayWrapSend
 +  MSG_NODUMP            = $020000; // don't dump this packet to the log
 +  MSG_DUMPPROXY         = $040000; // this is proxy communication, for dump
 +                                   // filtering only
 +  MSG_DUMPASTEXT        = $080000; // don't dump as hex, it's text
 +  MSG_RAW               = $100000; // send as raw, bybpass HTTP proxy stuff
 +  MSG_DUMPSSL           = $200000; // this is SSL traffic. For dump filtering only.
 +
 +
 +// all record types structures are declared in their own block because the C
 +// header file used forward declaration (to get typed parameters for certain
 +// function pointers). This sort of define-type-pointer-before-type can only be
 +// done in the same type block in D2 (don't know about later versions)
 +
 +  FD_SETSIZE = 65;
 +
 +type
 +  twaitcallback = function(timeout:dword):integer; cdecl;
 +
 +  PNETLIBOPENCONNECTION = ^TNETLIBOPENCONNECTION;
 +  TNETLIBOPENCONNECTION = record
 +    cbSize : int;
 +    szHost : PAnsiChar; // can be an IP in string form
 +    wPort  : Word;
 +    flags  : DWORD; // see NLOCF_* flags
 +    timeout: uint;
 +    // optional, called in the context of the thread that issued the attempt,
 +    // if it returns 0 the connection attempt is stopped, the remaining
 +    // timeout value can also be adjusted
 +    waitcallback:twaitcallback;
 +  end;
  const
 +  {$IFNDEF WIN64}
 +  NETLIBOPENCONNECTION_V1_SIZE = 16;
 +  {$ELSE}
 +  NETLIBOPENCONNECTION_V1_SIZE = SIZEOF(TNETLIBOPENCONNECTION);
 +  {$ENDIF}
 +  // old sizeof() is 14 bytes, but there is padding of 2 bytes
 -    // for TNETLIBUSER.flags
 -
 -    { bind incoming ports }
 -    NUF_INCOMING        = $01;
 -    { makes outgoing plain connections }
 -    NUF_OUTGOING        = $02;
 -    { can use HTTP gateway for plain sockets. ???HttpGateway* are valid,
 -    enables the HTTP proxy option, displayed in options }
 -    NUF_HTTPGATEWAY     = $04;
 -    { don't show this as an entry for custom settings to be defined for,
 -    TNETLIB.szDescriptiveName is ignored }
 -    NUF_NOOPTIONS       = $08;
 -    { some connections are made for HTTP communication,
 -    enables the HTTP proxy option, displayed in options }
 -    NUF_HTTPCONNS       = $10;
 -    { Disables the HTTPS proxy option in options, Use this if all communication
 -    is HTTP }
 -    NUF_NOHTTPSOPTION   = $20;
 -
 -    // for TNETLIBUSERSETTINGS.proxyType
 -
 -    { SOCKS4 -- No DNS or multi addressing mode (proxy side) -- optional username can
 -    be given, no password }
 -    PROXYTYPE_SOCKS4    = 1;
 -    { SOCKS5 -- DNS names can be given as addresses to connect to, optional
 -    plain text username/password scheme (which may cause failure due to denied access)
 -    IP address maybe returned for DNS addresses -- thus server side DNS }
 -    PROXYTYPE_SOCKS5    = 2;
 -    PROXYTYPE_HTTP      = 3;
 -    PROXYTYPE_HTTPS     = 4;
 -
 -    // for TNETLIBOPENCONNECTION.flags
 -
 -    { this connection will be useed for HTTP communications,
 -    if configured for an HTTP(S) proxy the connection is opened as if there
 -    was no proxy }
 -
 -    NLOCF_HTTP          = $0001;
 -
 -    // for TNETLIBHTTPPROXYINFO.flags
 -
 -    { append sequence numbers to GET requests }
 -    NLHPIF_USEGETSEQUENCE           = $0001;
 -    { append sequence numbers to POST requests }
 -    NLHPIF_USEPOSTSEQUENCE          = $0002;
 -    { GET and POST use the same sequence }
 -    NLHPIF_GETPOSTSAMESEQUENCE      = $0004;
 -
 -    // for TNETLIBHTTPREQUEST.flags, .requestType
 -
 -    { used by MS_NETLIB_RECVHTTPHEADERS returned structure }
 -
 -    REQUEST_RESPONSE        = 0;
 -    REQUEST_GET             = 1;
 -    REQUEST_POST            = 2;
 -    REQUEST_CONNECT         = 3;
 -
 -    { auto generate a 'host' header from .szUrl }
 -    NLHRF_GENERATEHOST      = $00000001;
 -    { remove any host and/or protocol portion of szUrl before sending it }
 -    NLHRF_REMOVEHOST        = $00000002;
 -    { removes host and/or protocol from szUrl unless the connection was
 -    opened through an HTTP or HTTPS proxy. }
 -    NLHRF_SMARTREMOVEHOST   = $00000004;
 -    { if the connection was opened through an HTTP or HTTPS proxy then
 -    send a Proxy-Authorization header if required. }
 -    NLHRF_SMARTAUTHHEADER   = $00000008;
 -    { never dump this to the log }
 -    NLHRF_NODUMP            = $00010000;
 -    { don't dump http headers (only useful for POSTs and MS_NETLIB_HTTPTRANSACTION }
 -    NLHRF_NODUMPHEADERS     = $00020000;
 -    { this transaction is a proxy communication. For dump filtering only. }
 -    NLHRF_DUMPPROXY         = $00040000;
 -    { dump posted and reply data as text. Headers are always dumped as text. }
 -    NLHRF_DUMPASTEXT        = $00080000;
 -
 -    // for TNETLIBBUFFER.flags
 -
 -    { don't wrap outgoing packet using TNETLIBUSER.pfnHttpGatewayWrapSend }
 -    MSG_NOHTTPGATEWAYWRAP   = $010000;
 -    { don't dump this packet to the log }
 -    MSG_NODUMP              = $020000;
 -    { this iss proxy communication, for dump filtering only }
 -    MSG_DUMPPROXY           = $040000;
 -    { don't dump as hex, it's text }
 -    MSG_DUMPASTEXT          = $080000;
 -    { send as raw, bybpass HTTP proxy stuff }
 -    MSG_RAW                 = $100000;
 -
 -
 -    // all record types structures are declared in their own block because the C header
 -    // file used forward declaration (to get typed parameters for certain function pointers)
 -    // This sort of define-type-pointer-before-type can only be done in the same type block
 -    // in D2 (don't know about later versions)
 +type
 +  PNETLIBHTTPHEADER = ^TNETLIBHTTPHEADER;
 +  TNETLIBHTTPHEADER = record
 +    szName : PAnsiChar;
 +    szValue: PAnsiChar;
 +  end;
 +  ANETLIBHTTPHEADER = array [0..1000] of TNETLIBHTTPHEADER;
 +
 +  PNETLIBHTTPREQUEST    = ^TNETLIBHTTPREQUEST;
 +
 +  TNETLIBHTTPREQUEST = record
 +    cbSize       :int;
 +    requestType  :int;                // REQUEST_* constant
 +    flags        :DWORD;
 +    szUrl        :PAnsiChar;
 +    { doesn't contain Content-Length, it'll be added automatically }
 +    headers      :^ANETLIBHTTPHEADER; // pointer to an array of em?
 +    headersCount :int;                // yes they do
 +    pData        :PAnsiChar;          // data to be sent on POST request
 +    dataLength   :int;                // must be 0 for REQUEST_GET/REQUEST_CONNECT
 +    resultCode   :int;
 +    szResultDescr:PAnsiChar;
 +    nlc          :THANDLE;
 +    timeout      :int;                // Mirver 9.0+
 +  end;
 +
 +const
 +  {$IFNDEF WIN64}
 +  NETLIBHTTPREQUEST_V1_SIZE = 44;
 +  {$ELSE}
 +  NETLIBHTTPREQUEST_V1_SIZE = SIZEOF(TNETLIBHTTPREQUEST);
 +  {$ENDIF}
 +
 +type
 +  { This function pointer is to the CRT realloc() used by Miranda -- it allows reallocation of memory passed
 +  to us (not that we could EVER share the same CRT) but to allow DLLs in general to reallocate memory }
 +  TNetlibRealloc = function(Mem: Pointer; size_t: int): Pointer; cdecl;
 +  TNetlibHTTPGatewayInitProc  = function(hConn: THandle; nloc: PNETLIBOPENCONNECTION; nlhr: PNETLIBHTTPREQUEST): int; cdecl;
 +  TNetlibHTTPGatewayBeginProc = function(hConn: THandle; nloc: PNETLIBOPENCONNECTION): int; cdecl;
 +  TNetlibHTTPGatewayWrapSendProc = function(hConn: THandle; buf: PByte; len: int; flags: int; pfnNetLibSend: TMIRANDASERVICE): int; cdecl;
 +  TNetlibHTTPGatewayUnwrapRecvProc = function(nlhr: PNETLIBHTTPREQUEST; buf: PByte; len: int; outBufLen: pInt; NetlibRealloc: TNetlibRealloc): PByte; cdecl;
 +
 +  PNETLIBUSER = ^TNETLIBUSER;
 +  TNETLIBUSER = record
 +    cbSize: int;
 +    szSettingsModule: PAnsiChar;  // used for DB settings and log, 'NL' stuff
 +    szDescriptiveName: TChar; // shows a descriptive name for which different proxy settings can be defined
 +    flags: DWORD;             // see NUF_* constants above
 +    szHttpGatewayHello    :PAnsiChar;
 +    szHttpGatewayUserAgent:PAnsiChar; // can be NULL(0) to send no User-Agent: also used by HTTPS proxies
 +    pfnHttpGatewayInit      :TNetlibHTTPGatewayInitProc;
 +    pfnHttpGatewayBegin     :TNetlibHTTPGatewayBeginProc; // can be NULL(0) if no begin is required
 +    pfnHttpGatewayWrapSend  :TNetlibHTTPGatewayWrapSendProc; // can be NULL(0) if no wrapping is required
 +    pfnHttpGatewayUnwrapRecv:TNetlibHTTPGatewayUnwrapRecvProc; // can be NULL(0) "      "
 +    minIncomingPorts: int; // only if NUF_INCOMING, will be used for validation of user input
 +  end;
 +
 +  PNETLIBUSERSETTINGS = ^TNETLIBUSERSETTINGS;
 +  TNETLIBUSERSETTINGS = record
 +    cbSize              :int;   // filled before calling
 +    useProxy            :int;   // 1 or 0
 +    proxyType           :int;   // PROXYTYPE_* constant, see above
 +    szProxyServer       :PAnsiChar; // can be NULL(0)
 +    wProxyPort          :int;   // in host byte order
 +    useProxyAuth        :int;   // 1 or 0, always 0 for SOCKS4 (doesn't have auth)
 +    szProxyAuthUser     :PAnsiChar; // can be NULL(0), always used by SOCKS4
 +    szProxyAuthPassword :PAnsiChar; // can be NULL(0)
 +    useProxyAuthNtlm    :int;   // 1 or 0, only used by HTTP, HTTPS
 +    dnsThroughProxy     :int;   // 1 or 0
 +    specifyIncomingPorts:int;   // 1 or 0
 +    szIncomingPorts     :PAnsiChar; // can be NULL(0), form '1024-1050,1060-1070,2000'
 +    specifyOutgoingPorts:int;   // 0.3.3a+
 +    szOutgoingPorts     :PAnsiChar; // 0.3.3a+
 +    enableUPnP          :int;   // 0.6.1+ only for NUF_INCOMING
 +    validateSSL         :int;
 +  end;
 +
 +  TNetlibNewConnectionProc    = procedure(hNewConnection:THandle; dwRemoveIP:DWORD); cdecl;
 +  TNetlibNewConnectionProc_V2 = procedure(hNewConnection:THandle; dwRemoveIP:DWORD; pExtra:pointer); cdecl;
 +
 +  PNETLIBBINDOLD = ^TNETLIBBINDOLD;
 +  TNETLIBBINDOLD = record
 +    cbSize: int;
 +    pfnNewConnection:TNetlibNewConnectionProc; // function to call when there's
 +                                               // a new connection, dwRemoteIP is
 +                                               // in host byte order -- the handle
 +                                               // is to the new connection
 +    dwInternalIP: DWORD;                       // set on return, host byte order
 +    wPort: WORD;                               // set on return, host byte order
 +  end;
 +
 +  PNETLIBBIND = ^TNETLIBBIND;
 +  TNETLIBBIND = record
 +    cbSize:int;
 +    // new code should use V2
 +    pfnNewConnection:TNETLIBNEWCONNECTIONPROC;
 +    // or pfnNewConnectionV2:NETLIBNEWCONNECTIONPROC_V2;
 +    //function to call when there's a new connection. Params are: the
 +    //new connection, IP of remote machine (host byte order)
 +    dwInternalIP:DWORD;    //set on return, host byte order
 +    wPort       :WORD;     //set on return, host byte order
 +    pExtra      :^pointer; //argument is sent to callback, added during 0.3.4+
 +    dwExternalIP:DWORD;    //set on return, host byte order
 +    wExPort     :word;     //set on return, host byte order
 +  end;
 +
 +const
 +  {$IFNDEF WIN64}
 +  NETLIBBIND_SIZEOF_V1 = 16; // sizeof(NETLIBBIND) prior to 0.3.4+ (2004/08/05)
 +  NETLIBBIND_SIZEOF_V2 = 20; // sizeof(NETLIBBIND) prior to 0.6+ (2006/07/03)
 +  {$ELSE}
 +  NETLIBBIND_SIZEOF_V1 = SizeOF(TNETLIBBIND);
 +  NETLIBBIND_SIZEOF_V2 = SizeOF(TNETLIBBIND);
 +  {$ENDIF}
  type
 +  PNETLIBHTTPPROXYINFO = ^TNETLIBHTTPPROXYINFO;
 +  TNETLIBHTTPPROXYINFO = record
 +    cbSize           : int;
 +    flags            : DWORD; // see NLHPIF_* above
 +    szHttpPostUrl    : PAnsiChar;
 +    szHttpGetUrl     : PAnsiChar;
 +    firstGetSequence : int;
 +    firstPostSequence: int;
 +    combinePackets   : int; // MIRANDA_VER >= 0x0900
 +  end;
 +
 +  PNETLIBBASE64 = ^TNETLIBBASE64;
 +  TNETLIBBASE64 = record
 +    pszEncoded: PAnsiChar;
 +    cchEncoded: int;
 +    pbDecoded : PByte;
 +    cbDecoded : int;
 +  end;
 -    { forward typed pointers to records }
 -
 -    PNETLIBOPENCONNECTION       = ^TNETLIBOPENCONNECTION;
 -    PNETLIBHTTPREQUEST          = ^TNETLIBHTTPREQUEST;
 -
 -    { This function pointer is to the CRT realloc() used by Miranda -- it allows reallocation of memory passed
 -    to us (not that we could EVER share the same CRT) but to allow DLLs in general to reallocate memory }
 -    TNetlibRealloc = function(Mem: Pointer; size_t: int): Pointer; cdecl;
 -    TNetlibHTTPGatewayInitProc  = function(hConn: THandle; nloc: PNETLIBOPENCONNECTION; nlhr: PNETLIBHTTPREQUEST): int; cdecl;
 -    TNetlibHTTPGatewayBeginProc = function(hConn: THandle; nloc: PNETLIBOPENCONNECTION): int; cdecl;
 -    TNetlibHTTPGatewayWrapSendProc = function(hConn: THandle; buf: PByte; len: int; flags: int; pfnNetLibSend: TMIRANDASERVICE): int; cdecl;
 -    TNetlibHTTPGatewayUnwrapRecvProc = function(nlhr: PNETLIBHTTPREQUEST; buf: PByte; len: int; outBufLen: pInt; NetlibRealloc: TNetlibRealloc): PByte; cdecl;
 -
 -    PNETLIBUSER = ^TNETLIBUSER;
 -    TNETLIBUSER = record
 -        cbSize: int;
 -        { used for DB settings and log, 'NL' stuff }
 -        szSettingsModule: PChar;
 -        { shows a descriptive name for which different proxy settings can be defined }
 -        szDescriptiveName: PChar;
 -        { see NUF_* constants above }
 -        flags: DWORD;
 -        szHttpGatewayHello: PChar;
 -        { can be NULL(0) to send no User-Agent: also used by HTTPS proxies }
 -        szHttpGatewayUserAgent: PChar;
 -        pfnHttpGatewayInit: TNetlibHTTPGatewayInitProc;
 -        { can be NULL(0) if no begin is required }
 -        pfnHttpGatewayBegin: TNetlibHTTPGatewayBeginProc;
 -        { can be NULL(0) if no wrapping is required }
 -        pfnHttpGatewayWrapSend: TNetlibHTTPGatewayWrapSendProc;
 -        { can be NULL(0) "      " }
 -        pfnHttpGatewayUnwrapRecv: TNetlibHTTPGatewayUnwrapRecvProc;
 -        { only if NUF_INCOMING, will be used for validation of user input }
 -        minIncomingPorts: int;
 -    end;
 -
 -    PNETLIBUSERSETTINGS = ^TNETLIBUSERSETTINGS;
 -    TNETLIBUSERSETTINGS = record
 -        { filled before calling }
 -        cbSize: int;
 -        { 1 or 0 }
 -        useProxy: int;
 -        { PROXYTYPE_* constant, see above }
 -        proxyType: int;
 -        { can be NULL(0) }
 -        szProxyServer: PChar;
 -        { in host byte order }
 -        wProxyPort: int;
 -        { 1 or 0, always 0 for SOCKS4 (doesn't have auth) }
 -        useProxyAuth: int;
 -        { can be NULL(0), always used by SOCKS4 }
 -        szProxyAuthUser: PChar;
 -        { can be NULL(0) }
 -        szProxyAuthPassword: PChar;
 -        { 1 or 0, only used by HTTP, HTTPS }
 -        useProxyAuthNtlm: int;
 -        { 1 or 0 }
 -        dnsThroughProxy: int;
 -        { 1 or 0 }
 -        specifyIncomingPorts: int;
 -        { can be NULL(0), form '1024-1050,1060-1070,2000' }
 -        szIncomingPorts: PChar;
 -    end;
 -
 -    TNetlibNewConnectionProc = procedure(hNewConnection: THandle; dwRemoveIP: DWORD); cdecl;
 -
 -    PNETLIBBIND = ^TNETLIBBIND;
 -    TNETLIBBIND = record
 -        cbSize: int;
 -        { function to call when there's a new connection, dwRemoteIP is in host byte
 -        order -- the handle is to the new connection }
 -        pfnNewConnection: TNetlibNewConnectionProc;
 -        { set on return, host byte order }
 -        dwInternalIP: DWORD;
 -        { set on return, host byte order }
 -        wPort: WORD;
 -    end;
 -
 -    { Pointered type is above }
 -    TNETLIBOPENCONNECTION = record
 -        cbSize: int;
 -        szHost: PChar;      // can be an IP in string form
 -        wPort: Word;
 -        flags: DWORD;       // see NLOCF_* flags
 -    end;
 -
 -    PNETLIBHTTPPROXYINFO = ^TNETLIBHTTPPROXYINFO;
 -    TNETLIBHTTPPROXYINFO = record
 -        cbSize: int;
 -        { see NLHPIF_* above }
 -        flags: DWORD;
 -        szHttpPostUrl: PChar;
 -        szHttpGetUrl: PChar;
 -        firstGetSequence: int;
 -        firstPostSequence: int;
 -    end;
 -
 -    PNETLIBBASE64 = ^TNETLIBBASE64;
 -    TNETLIBBASE64 = record
 -        pszEncoded: PChar;
 -        cchEncoded: int;
 -        pbDecoded: PByte;
 -        cbDecoded: int;
 -    end;
 -
 -    PNETLIBHTTPHEADER = ^TNETLIBHTTPHEADER;
 -    TNETLIBHTTPHEADER = record
 -        szName: PChar;
 -        szValue: PChar;
 -    end;
 -
 -    { PNETLIBHTTPREQUEST = ^TNETLIBHTTPREQUEST, defined above because this is
 -    forward referenced from there }
 -    TNETLIBHTTPREQUEST = record
 -        cbSize: int;
 -        requestType: int;               // REQUEST_* constant
 -        flags: DWORD;
 -        szUrl: PChar;
 -        { doesn't contain Content-Length, it'll be added automatically }
 -        headers: PNETLIBHTTPHEADER;     // pointer to an array of em?
 -        headersCount: int;              // yes they do
 -        pData: PChar;                   // data to be sent on POST request
 -        dataLength: int;                // must be 0 for REQUEST_GET/REQUEST_CONNECT
 -        resultCode: int;
 -        szResultDescr: PChar;
 -    end;
 -
 -    PNETLIBBUFFER = ^TNETLIBBUFFER;
 -    TNETLIBBUFFER = record
 -        buf: PChar;
 -        len: int;
 -        { see MSG_* constants above }
 -        flags: int;
 -    end;
 -
 -    PNETLIBSELECT = ^TNETLIBSELECT;
 -    TNETLIBSELECT = record
 -        cbSize: int;
 -        dwTimeout: DWORD; // in milliseconds, INFINITE is acceptable
 -        hReadConns: array[0..64+1] of THandle;
 -        hWriteConns: array[0..64+1] of THandle;
 -        hExceptConns: array[0..64+1] of THandle;
 -    end;
 -
 -    PNETLIBPACKETRECVER = ^TNETLIBPACKETRECVER;
 -    TNETLIBPACKETRECVER = record
 -        cbSize: int;
 -        { infinite is allowed -- initialise before use }
 -        dwTimeout: DWORD;
 -        { this many bytes are removed from the start of the buffer,
 -        set to 0 on return -- initialise before use }
 -        bytesUsed: int;
 -        { equal the returnd value by service, unless the return value is 0 (connection closed) }
 -        bytesAvailable: int;
 -        { same as the parameter given to MS_NETLIB_CREATEPACKETRECVER: wParam }
 -        bufferSize: int;
 -        { contains the read data }
 -        buffer: PByte;
 -    end;
 +type
 +  PNETLIBBUFFER = ^TNETLIBBUFFER;
 +  TNETLIBBUFFER = record
 +    buf  : PAnsiChar;
 +    len  : int;
 +    flags: int; // see MSG_* constants above
 +  end;
 +
 +  PNETLIBSELECT = ^TNETLIBSELECT;
 +  TNETLIBSELECT = record
 +    cbSize      : int;
 +    dwTimeout   : DWORD; // in milliseconds, INFINITE is acceptable
 +    hReadConns  : array [0..FD_SETSIZE] of THandle;
 +    hWriteConns : array [0..FD_SETSIZE] of THandle;
 +    hExceptConns: array [0..FD_SETSIZE] of THandle;
 +  end;
 +
 +  PNETLIBSELECTEX = ^TNETLIBSELECTEX;
 +  TNETLIBSELECTEX = record
 +    cbSize      : int;
 +    dwTimeout   : DWORD; // in milliseconds, INFINITE is acceptable
 +    hReadConns  : array [0..FD_SETSIZE] of THandle;
 +    hWriteConns : array [0..FD_SETSIZE] of THandle;
 +    hExceptConns: array [0..FD_SETSIZE] of THandle;
 +    // Added in v0.3.3+
 +    hReadStatus  : array [0..FD_SETSIZE] of BOOL; // out, [in, expected to be FALSE]
 +    hWriteStatus : array [0..FD_SETSIZE] of BOOL; // out, [in, expected to be FALSE]
 +    hExceptStatus: array [0..FD_SETSIZE] of BOOL; // out, [in, expected to be FALSE]
 +  end;
 +
 +  PNETLIBPACKETRECVER = ^TNETLIBPACKETRECVER;
 +  TNETLIBPACKETRECVER = record
 +    cbSize        : int;
 +    dwTimeout     : DWORD; // infinite is allowed -- initialise before use
 +    bytesUsed     : int;   // this many bytes are removed from the start of the
 +                           // buffer, set to 0 on return -- initialise before use
 +    bytesAvailable: int;   // equal the returnd value by service, unless the
 +                           // return value is 0 (connection closed)
 +    bufferSize    : int;   // same as the parameter given to
 +                           // MS_NETLIB_CREATEPACKETRECVER: wParam
 +    buffer        : PByte; // contains the read data
 +  end;
  const
 +  {
 +    wParam : 0
 +    lParam : Pointer to an initalised TNETLIBUSER structure
 +    Affects: Initialises the netlib for a set of connections, see notes
 +    Returns: Returns a handle for future netlib calls, NULL on failure.
 +    Notes  : Netlib is loaded AFTER all plugins, thus a call to this service
 +             in Load() will fail, hook ME_SYSTEM_MODULESLOADED and call it
 +             from there.
 +             -
 +             Netlib will save settings under .szSettings module, all settings
 +             (being?) begin with 'NL'.
 +             -
 +             Defacto settings are the same as <All connections> combobox entry option
 +             as seen in Miranda->Options->Network
 +    Version: v0.1.2.2+
 +    Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY, ERROR_DUP_NAME
 +  }
 +  MS_NETLIB_REGISTERUSER:PAnsiChar = 'Netlib/RegisterUser';
 +
 +{
 +  Assign a Netlib user handle a set of dynamic HTTP headers to be used with all
 +
 +  HTTP connections that enable the HTTP-use-sticky headers flag. 
 +  The headers persist until cleared with lParam=NULL.
 +
 +  All memory should be allocated by the caller using malloc() from MS_SYSTEM_GET_MMI
 +  Once it has passed to Netlib, Netlib is the owner of it, the caller should not refer to the memory
 +  In any way after this point.
 +
 +  wParam=(WPARAM)hNetLibUser
 +  lParam=(LPARAM)(AnsiChar*)szHeaders
 +
 +  NOTE: The szHeaders parameter should be a NULL terminated string following the HTTP header syntax.
 +  This string will be injected verbatim, thus the user should be aware of setting strings that are not
 +  headers. This service is NOT THREAD SAFE, only a single thread is expected to set the headers and a single
 +  thread reading the pointer internally, stopping race conditions and mutual exclusion don't happen.
 +
 +  Version 0.3.2a+ (2003/10/27)
 +}
 +  MS_NETLIB_SETSTICKYHEADERS:PAnsiChar = 'Netlib/SetStickyHeaders';
 +
 +  {
 +    wParam : HANDLE
 +    lParam : Pointer to a initalised TNETLIBUSERSETTINGS structure
 +    Affects: Gets the user configured settings for a Netlib user, see notes
 +    Returns: [non zero] on SUCCESS, NULL(0) on failure
 +    Notes  : .cbSize must be filled with sizeof() before calling --
 +             the returned null terminated strings (in the structure) are valid
 +             as long as HANDLE remains open or proxy options are changed
 +             again, do not rely on them being around forever.
 +    Version: v0.1.2.2+
 +    Errors : ERROR_INVALID_PARAMETER
 +  }
 +  MS_NETLIB_GETUSERSETTINGS:PAnsiChar = 'Netlib/GetUserSettings';
 +
 +  {
 +    wParam : HANDLE
 +    lParam : Pointer to a initalised NETLIBUSERSETTINGS structure
 +    Affect : Changes the configurable settings for a Netlib user -- see notes
 +    Returns: [non zero] on success, NULL(0) on failure
 +    Notes  : This service is only really useful for people that specify NUF_NOOPTIONS
 +             when registering and want to create their own options.
 +             Settings will be stored even if the option to enable it, is it not enabled,
 +             e.g. useProxyAuth is 0, szProxyAuthPassword will still be saved
 +    Errors : ERROR_INVALID_PARAMETER
 +  }
 +  MS_NETLIB_SETUSERSETTINGS:PAnsiChar = 'Netlib/SetUserSettings';
 +
 +  {
 +    wParam : HANDLE / SOCKET
 +    lParam : 0
 +    Affects: Closes a handle, see notes
 +    Returns: Returns [non zero] on success, NULL(0) on failure
 +    Notes  : All netlib handles should be closed once they're finished with,
 +             If a SOCKET type is passed instead of netlib handle type, it is closed
 +    Errors : ERROR_INVALID_PARAMETER
 +  }
 +  MS_NETLIB_CLOSEHANDLE:PAnsiChar = 'Netlib/CloseHandle';
 +
 +  {
 +    wParam : HANDLE
 +    lParam : Pointer to a initialised TNETLIBBIND
 +    Affects: Open a port and wait for connections on it -- see notes
 +    Returns: Returns a handle on success, NULL(0) on failure
 +    Notes  : this function does the equivalent of socket(), bind(), getsockname(),
 +             listen(), accept() -- internally this function creates a new thread
 +             which waits around in accept() for new connections.
 +             When one is received, TNETLIBBIND.pfnNewConnection is called,
 +             from the context of the NEW thread and then it
 +             returns to waiting for connections.
 +             -
 +             Close the returned handle to end the thread and close the port.
 +             -
 +    Errors : ERROR_INVALID_PARAMETER, any returned by socket(), bind(), listen()
 +             getsockname()
 +  }
 +  MS_NETLIB_BINDPORT:PAnsiChar = 'Netlib/BindPort';
 +
 +  {
 +    wParam : HANDLE
 +    lParam : Pointer to an initalised TNETLIBOPENCONNECTION structure
 +    Affects: Opens a connection -- see notes
 +    Returns: Returns a Handle to a new connection on success, NULL(0) on failure
 +    Notes  : internally this service is the equivalent of socket(), gethostbyname(),
 +             connect()
 +             -
 +             If NLOCF_HTTP is set and HANDLE is configured for HTTP(S) proxy
 +             then this function will connect() to that proxy server ONLY,
 +             without performing any initialisation conversation.
 +             -
 +             If HANDLE is configured for an HTTP proxy and does not support
 +             HTTP gateways and you try to open a connection without NLOCF_HTTP
 +             then this service will first attempt to open an HTTPS connection,
 +             if that fails, it will try a direct connection, if *that* fails
 +             then it will return failure with the error
 +             from connect() during the connection attempt
 +    Errors : ERROR_INVALID_PARAMETER, any returned by socket(), gethostbyname(),
 +             connect(), MS_NETLIB_SEND, MS_NETLIB_RECV, select()
 +             -
 +             ERROR_TIMEOUT (during proxy communication)
 +             ERROR_BAD_FORMAT (very invalid proxy reply)
 +             ERROR_ACCESS_DENIED (by proxy)
 +             ERROR_CONNECTION_UNAVAIL (socks proxy can't connect to identd)
 +             ERROR_INVALID_ACCESS (proxy refused identd auth)
 +             ERROR_INVALID_DATA (proxy returned invalid code)
 +             ERROR_INVALID_ID_AUTHORITY (proxy requires use of auth method that's not supported)
 +             ERROR_GEN_FAILURE (socks5/https general failure)
 +             ERROR_CALL_NOT_IMPLEMENTED (socks5 command not supported)
 +             ERROR_INVALID_ADDRESS (socks5 address type not supported)
 +             -
 +             HTTP: anything from TNETLIBUSER.pfnHttpGatewayInit, TNETLIBUSER.pfnHttpGatewayBegin,
 +                   MS_NETLIB_SENDHTTPREQUEST or MS_NETLIB_RECVHTTPHEADERS
 +  }
 +  MS_NETLIB_OPENCONNECTION:PAnsiChar = 'Netlib/OpenConnection';
 +
 +  {
 +    wParam : HANDLE
 +    lParam : Pointer to an initialised NETLIBHTTPPROXYINFO structure
 +    Affects: Sets the required information for an HTTP proxy connection -- see notes
 +    Returns: [non zero] on success, NULL(0) on failure
 +    Notes  : This service is designed to be called from
 +             within TNETLIBUSER.pfnHttpGatewayInit (see notes in C header under
 +             MS_NETLIB_REGISTERUSER)
 +    Errors : ERROR_INVALID_PARAMETER
 +  }
 +  MS_NETLIB_SETHTTPPROXYINFO:PAnsiChar = 'Netlib/SetHttpProxyInfo';
 +
 +  {
 +    wParam : HANDLE
 +    lParam : 0
 +    Affects: Get's the SOCKET associated with a handle -- see notes
 +    Returns: the SOCKET on success, INVALID_SOCKET on failure
 +    Notes  : The Netlib handle passed to this service should only be passed
 +             if they were returned with MS_NETLIB_OPENCONNECTION or MS_NETLIB_BINDPORT
 +             -
 +             Be careful how you use this socket because you might be connected via an
 +             HTTP proxy, in which case calling send/recv() will break things
 +             -
 +    Errors : ERROR_INVALID_PARAMETER
 +  }
 +  MS_NETLIB_GETSOCKET:PAnsiChar = 'Netlib/GetSocket';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to a null terminated string
 +    Affects: URL-encodes a string for x-www-form-urlencoded (and other uses) -- see notes
 +    Returns: A pointer to a null terminated string, NULL(0) on failure
 +    Notes  : The returned string must be freed after it's no longer needed,
 +             to do this Miranda's process heap must be used (under the WINAPI), e.g.
 +             HeapFree(GetProcessHeap(), 0, the_returned_string)
 +    Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
 +  }
 +  MS_NETLIB_URLENCODE:PAnsiChar = 'Netlib/UrlEncode';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to a TNETLIBBASE64 initialised structure
 +    Affects: Decodes a Base64 null terminated string, see notes
 +    Returns: [non zero] on success, NULL(0) on failure
 +    Notes  : TNETLIBBASE64.pszEncoded and cchEncoded must contain a pointer to
 +             a buffer to use as input, and it's length, the length
 +             should not include space taken for null termination --
 +             -
 +             Output is placed in ..pbDecoded and ..cbDecoded for buffer and
 +             length of buffer -- the maxiumum output for a given input can
 +             be worked out with Netlib_GetBase64DecodedBufferSize() function
 +             see below.
 +             -
 +             For more information on Base64 see rfc-1421.
 +    Errors : ERROR_INVALID_PARAMETER, ERROR_INVALID_DATA, ERROR_BUFFER_OVERFLOW
 +  }
 +  MS_NETLIB_BASE64DECODE:PAnsiChar = 'Netlib/Base64Decode';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to an initialised TNETLIBBASE64 structure
 +    Affect : Base64 encode a string, see notes
 +    Returns: [non zero] on success, NULL(0) on failure
 +    Notes  : TNETLIBBASE64.pbDecode and TNETLIBBASE64.cbDecoded contain
 +             the input buffer and it's length --
 +             TNETLIBBASE64.pszEncoded and TNETLIBBASE64.cchEncoded contain the
 +             buffer in which to put the output and it's length.
 +             -
 +             The maximum output size for a given input can be worked
 +             out with the function Netlib_GetBase64EncodedBufferSize() below
 +             .pszEncoded is null terminated, on return TNETLIBBASE64.cchEncoded
 +             is set to the actual length excluding 0.
 +    Errors : ERROR_INVALID_PARAMETER, ERROR_BUFFER_OVERFLOW
 +  }
 +  MS_NETLIB_BASE64ENCODE:PAnsiChar = 'Netlib/Base64Encode';
 +
 +{
 +  Converts string representation of IP and port into numerical SOCKADDR_INET
 +  IPv4 could supplied in formats address:port or address
 +  IPv6 could supplied in formats [address]:port or [address]
 +  wParam=(WPARAM)(char*) string to convert
 +  lParam=(LPARAM)(SOCKADDR_INET*) numeric IP address structure
 +  Returns 0 on success
 +}
 +  MS_NETLIB_STARINGTOADDRESS:PAnsiChar = 'Netlib/StringToAddress';
 +
 +{
 +  Converts numerical representation of IP in SOCKADDR_INET into string representation with IP and port 
 +  IPv4 will be supplied in formats address:port or address
 +  IPv6 will be supplied in formats [address]:port or [address]
 +  wParam=(WPARAM)(int) 0 - lParam - (SOCKADDR_INET*); 1 - lParam - (unsigned) in host byte order
 +  lParam=(LPARAM)(SOCKADDR_INET*) or (unsigned) numeric IP address structure
 +  Returns pointer to the string or NULL if not successful 
 +}
 +  MS_NETLIB_ADDRESSTOSTRING:PAnsiChar = 'Netlib/AddressToString';
 -    {
 -        wParam : 0
 -        lParam : Pointer to an initalised TNETLIBUSER structure
 -        Affects: Initialises the netlib for a set of connections, see notes
 -        Returns: Returns a handle for future netlib calls, NULL on failure.
 -        Notes  : Netlib is loaded AFTER all plugins, thus a call to this service
 -                 in Load() will fail, hook ME_SYSTEM_MODULESLOADED and call it
 -                 from there.
 -                 -
 -                 Netlib will save settings under .szSettings module, all settings
 -                 (being?) begin with 'NL'.
 -                 -
 -                 Defacto settings are the same as <All connections> combobox entry option
 -                 as seen in Miranda->Options->Network
 -        Version: v0.1.2.2+
 -        Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY, ERROR_DUP_NAME
 -    }
 -    MS_NETLIB_REGISTERUSER          = 'Netlib/RegisterUser';
 -
 -    {
 -        wParam : HANDLE
 -        lParam : Pointer to a initalised TNETLIBUSERSETTINGS structure
 -        Affects: Gets the user configured settings for a Netlib user, see notes
 -        Returns: [non zero] on SUCCESS, NULL(0) on failure
 -        Notes  : .cbSize must be filled with sizeof() before calling --
 -                 the returned null terminated strings (in the structure) are valid
 -                 as long as HANDLE remains open or proxy options are changed
 -                 again, do not rely on them being around forever.
 -        Version: v0.1.2.2+
 -        Errors : ERROR_INVALID_PARAMETER
 -    }
 -    MS_NETLIB_GETUSERSETTINGS      = 'Netlib/GetUserSettings';
 -
 -    {
 -        wParam : HANDLE
 -        lParam : Pointer to a initalised NETLIBUSERSETTINGS structure
 -        Affect : Changes the configurable settings for a Netlib user -- see notes
 -        Returns: [non zero] on success, NULL(0) on failure
 -        Notes  : This service is only really useful for people that specify NUF_NOOPTIONS
 -                 when registering and want to create their own options.
 -                 Settings will be stored even if the option to enable it, is it not enabled,
 -                 e.g. useProxyAuth is 0, szProxyAuthPassword will still be saved
 -        Errors : ERROR_INVALID_PARAMETER
 -    }
 -    MS_NETLIB_SETUSERSETTINGS       = 'Netlib/SetUserSettings';
 -
 -    {
 -        wParam : HANDLE / SOCKET
 -        lParam : 0
 -        Affects: Closes a handle, see notes
 -        Returns: Returns [non zero] on success, NULL(0) on failure
 -        Notes  : All netlib handles should be closed once they're finished with,
 -                 If a SOCKET type is passed instead of netlib handle type, it is closed
 -        Errors : ERROR_INVALID_PARAMETER
 -    }
 -    MS_NETLIB_CLOSEHANDLE           = 'Netlib/CloseHandle';
 -
 -    {
 -        wParam : HANDLE
 -        lParam : Pointer to a initialised TNETLIBBIND
 -        Affects: Open a port and wait for connections on it -- see notes
 -        Returns: Returns a handle on success, NULL(0) on failure
 -        Notes  : this function does the equivalent of socket(), bind(), getsockname(),
 -                 listen(), accept() -- internally this function creates a new thread
 -                 which waits around in accept() for new connections.
 -                 When one is received, TNETLIBBIND.pfnNewConnection is called,
 -                 from the context of the NEW thread and then it
 -                 returns to waiting for connections.
 -                 -
 -                 Close the returned handle to end the thread and close the port.
 -                 -
 -        Errors : ERROR_INVALID_PARAMETER, any returned by socket(), bind(), listen()
 -                 getsockname()
 -    }
 -    MS_NETLIB_BINDPORT              = 'Netlib/BindPort';
 -
 -    {
 -        wParam : HANDLE
 -        lParam : Pointer to an initalised TNETLIBOPENCONNECTION structure
 -        Affects: Opens a connection -- see notes
 -        Returns: Returns a Handle to a new connection on success, NULL(0) on failure
 -        Notes  : internally this service is the equivalent of socket(), gethostbyname(),
 -                 connect()
 -                 -
 -                 If NLOCF_HTTP is set and HANDLE is configured for HTTP(S) proxy
 -                 then this function will connect() to that proxy server ONLY,
 -                 without performing any initialisation conversation.
 -                 -
 -                 If HANDLE is configured for an HTTP proxy and does not support
 -                 HTTP gateways and you try to open a connection without NLOCF_HTTP
 -                 then this service will first attempt to open an HTTPS connection,
 -                 if that fails, it will try a direct connection, if *that* fails
 -                 then it will return failure with the error
 -                 from connect() during the connection attempt
 -        Errors : ERROR_INVALID_PARAMETER, any returned by socket(), gethostbyname(),
 -                 connect(), MS_NETLIB_SEND, MS_NETLIB_RECV, select()
 -                 -
 -                 ERROR_TIMEOUT (during proxy communication)
 -                 ERROR_BAD_FORMAT (very invalid proxy reply)
 -                 ERROR_ACCESS_DENIED (by proxy)
 -                 ERROR_CONNECTION_UNAVAIL (socks proxy can't connect to identd)
 -                 ERROR_INVALID_ACCESS (proxy refused identd auth)
 -                 ERROR_INVALID_DATA (proxy returned invalid code)
 -                 ERROR_INVALID_ID_AUTHORITY (proxy requires use of auth method that's not supported)
 -                 ERROR_GEN_FAILURE (socks5/https general failure)
 -                 ERROR_CALL_NOT_IMPLEMENTED (socks5 command not supported)
 -                 ERROR_INVALID_ADDRESS (socks5 address type not supported)
 -                 -
 -                 HTTP: anything from TNETLIBUSER.pfnHttpGatewayInit, TNETLIBUSER.pfnHttpGatewayBegin,
 -                       MS_NETLIB_SENDHTTPREQUEST or MS_NETLIB_RECVHTTPHEADERS
 -    }
 -    MS_NETLIB_OPENCONNECTION	    = 'Netlib/OpenConnection';
 -
 -    {
 -        wParam : HANDLE
 -        lParam : Pointer to an initialised NETLIBHTTPPROXYINFO structure
 -        Affects: Sets the required information for an HTTP proxy connection -- see notes
 -        Returns: [non zero] on success, NULL(0) on failure
 -        Notes  : This service is designed to be called from
 -                 within TNETLIBUSER.pfnHttpGatewayInit (see notes in C header under
 -                 MS_NETLIB_REGISTERUSER)
 -        Errors : ERROR_INVALID_PARAMETER
 -    }
 -    MS_NETLIB_SETHTTPPROXYINFO      = 'Netlib/SetHttpProxyInfo';
 -
 -    {
 -        wParam : HANDLE
 -        lParam : 0
 -        Affects: Get's the SOCKET associated with a handle -- see notes
 -        Returns: the SOCKET on success, INVALID_SOCKET on failure
 -        Notes  : The Netlib handle passed to this service should only be passed
 -                 if they were returned with MS_NETLIB_OPENCONNECTION or MS_NETLIB_BINDPORT
 -                 -
 -                 Be careful how you use this socket because you might be connected via an
 -                 HTTP proxy, in which case calling send/recv() will break things
 -                 -
 -        Errors : ERROR_INVALID_PARAMETER
 -    }
 -    MS_NETLIB_GETSOCKET             = 'Netlib/GetSocket';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a null terminated string
 -        Affects: URL-encodes a string for x-www-form-urlencoded (and other uses) -- see notes
 -        Returns: A pointer to a null terminated string, NULL(0) on failure
 -        Notes  : The returned string must be freed after it's no longer needed,
 -                 to do this Miranda's process heap must be used (under the WINAPI), e.g.
 -                 HeapFree(GetProcessHeap(), 0, the_returned_string)
 -        Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
 -    }
 -    MS_NETLIB_URLENCODE             = 'Netlib/UrlEncode';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a TNETLIBBASE64 initialised structure
 -        Affects: Decodes a Base64 null terminated string, see notes
 -        Returns: [non zero] on success, NULL(0) on failure
 -        Notes  : TNETLIBBASE64.pszEncoded and cchEncoded must contain a pointer to
 -                 a buffer to use as input, and it's length, the length
 -                 should not include space taken for null termination --
 -                 -
 -                 Output is placed in ..pbDecoded and ..cbDecoded for buffer and
 -                 length of buffer -- the maxiumum output for a given input can
 -                 be worked out with Netlib_GetBase64DecodedBufferSize() function
 -                 see below.
 -                 -
 -                 For more information on Base64 see rfc-1421.
 -        Errors : ERROR_INVALID_PARAMETER, ERROR_INVALID_DATA, ERROR_BUFFER_OVERFLOW
 -    }
 -    MS_NETLIB_BASE64DECODE          = 'Netlib/Base64Decode';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to an initialised TNETLIBBASE64 structure
 -        Affect : Base64 encode a string, see notes
 -        Returns: [non zero] on success, NULL(0) on failure
 -        Notes  : TNETLIBBASE64.pbDecode and TNETLIBBASE64.cbDecoded contain
 -                 the input buffer and it's length --
 -                 TNETLIBBASE64.pszEncoded and TNETLIBBASE64.cchEncoded contain the
 -                 buffer in which to put the output and it's length.
 -                 -
 -                 The maximum output size for a given input can be worked
 -                 out with the function Netlib_GetBase64EncodedBufferSize() below
 -                 .pszEncoded is null terminated, on return TNETLIBBASE64.cchEncoded
 -                 is set to the actual length excluding 0.
 -        Errors : ERROR_INVALID_PARAMETER, ERROR_BUFFER_OVERFLOW
 -    }
 -    MS_NETLIB_BASE64ENCODE          = 'Netlib/Base64Encode';
 -
 -    {
 -        wParam : HANDLE
 -        lParam : Pointer to a initialised TNETLIBHTTPREQUEST structure
 -        Affect : Send an HTTP request over a connection, see notes
 -        Returns: The number of bytes on success, SOCKET_ERROR on failure
 -        Notes  : HANDLE must of been returned by MS_NETLIB_OPENCONNECTION,,
 -                 If you use NLHRF_SMARTAUTHHEADER and NTLM auth is in use then
 -                 full NTLM auth transcation occurs, comprising sending the
 -                 domain, getting the challenge, sending the response.
 -                 NETLIBHTTPREQUEST.resultCode and NETLIBHTTPREQUEST.szResultDescr are
 -                 ignored by this service.
 -        Errors : ERROR_INVALID_PARAMETER, MS_NETLIB_SEND (return codes)
 -    }
 -    MS_NETLIB_SENDHTTPREQUEST       = 'Netlib/SendHttpRequest';
 -
 -    {
 -        wParam : HANDLE
 -        lParam : 0
 -        Affect : Receive HTTP headers, see notes
 -        Returns: A pointer to a TNETLIBHTTPREQUEST structure on success, NULL(0) on failure
 -        Notes  : The returned pointer must be freed after it's done with
 -                 use MS_NETLIB_FREEHTTPREQUESTSTRUCT.
 -                 -
 -                 HANDLE must be returned by MS_NETLIB_OPENCONNECTION
 -                 -
 -                 Return^.pData=NIL and Return^.dataLength=0 always
 -                 -
 -                 The returned data should be retrieved using MS_NETLIB_RECV once
 -                 the headers have been parsed.
 -                 If headers haven't finished within 60 seconds the function returns
 -                 NULL(0) and ERROR_TIMEOUT
 -        Errors : ERROR_INVALID_PARAMETER, any MS_NETLIB_RECV or select()
 -                 ERROR_HANDLE_EOF (connection closed bfore headers complete)
 -                 ERROR_TIMEOUT (headers still not complete after 60 seconds)
 -                 ERROR_BAD_FORMAT (invalid character or line ending in headers, or first line is blank)
 -                 ERROR_BUFFER_OVERFLOW (each header line must be less than 4096 chars long)
 -                 ERROR_INVALID_DATA (first header line is malformed ("http/[01].[0-9] [0-9]+ .*", or no colon in subsequent line)
 -
 -    }
 -    MS_NETLIB_RECVHTTPHEADERS       = 'Netlib/RecvHttpHeaders';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer returned by MS_NETLIB_RECVHTTPHEADERS to free
 -        Affect : Free the memory used by a TNETLIBHTTPREQUEST structure, see notes
 -        Returns: [non zero] on success, NULL(0) on failure
 -        Notes  : This service should only be used with memory pointers returned
 -                 by either MS_NETLIB_RECVHTTPHEADERS or MS_NETLIB_HTTPTRANSACTION!.
 -        Errors : ERROR_INVALID_PARAMETER
 -
 -    }
 -    MS_NETLIB_FREEHTTPREQUESTSTRUCT = 'Netlib/FreeHttpRequestStruct';
 -
 -    {
 -        wParam : HANDLE
 -        lParam : Pointer to a TNETLIBHTTPREQUEST structure
 -        Affect : Carry out an entire HTTP transaction, see notes
 -        Returns: another pointer to a TNETLIBHTTPREQUEST structure or NULL(0)
 -                 on failure
 -        Notes  : The returned pointer must be freed at some point
 -                 with MS_NETLIB_FREEHTTPREQUESTSTRUCT,
 -                 -
 -                 TNETLIBHTTPREQUEST.szUrl should have a full HTTP URL, if it
 -                 does not start with http://, that will be assumed, but do not
 -                 take this assumption to stay assumed (heh..) in the future
 -                 -
 -                 this service equivalent of open(), sendhttp(), getheaders()
 -                 netlib_recv(), netlib_closehandle()
 -                 -
 -                 TNETLIBHTTPREQUEST.headers will be added to with the following
 -                 headers if they're not already present :
 -                 "Host" (even if it is requested in .flags)
 -                 "User-Agent" (in form : 'Miranda/d.d.d.d <(status of release)>')
 -                 "Content-Length" (for POSTs only, set to TNETLIBHTTPREQUEST.dataLength)
 -
 -                 If you don't want to send any of these headers --
 -                 set TNETLIBHTTPREQUEST.headers to NULL(0)
 -                 -
 -                 In the returned pointer, pData[dataLen] is always 0 for 'safety'
 -                 also : headers, headersCount, pData, dataLength, resultCode and
 -                        szResultDescr are all valid
 -                 -
 -                 Also take care not to assume that a returned pointer means that
 -                 at the HTTP level it all worked out -- refer to the resultCode for
 -                 2xx before doing anything else
 -                 -
 -        Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
 -                 Errors returned by the aforementioned internally used functions
 -    }
 -    MS_NETLIB_HTTPTRANSACTION       = 'Netlib/HttpTransaction';
 -
 -    {
 -        wParam : HANDLE
 -        lParam : Pointer to an initialised TNETLIBBUFFER structure
 -        Affect : Send data over an open connection see notes
 -        Returns: The number of bytes sent on success, SOCKET_ERROR on failure
 -        Notes  : see Netlib_Send() helper function
 -        Errors : ERROR_INVALID_PARAMETER,
 -                 anything from socket(), connect()
 -                 send(), TNETLIBUSER.pfnHttpGatewayWrapSend(),
 -                 (HTTP proxy): ERROR_GEN_FAILURE (http result code wasn't 2xx)
 -                 MS_NETLIB_SENDHTTPREQUEST, MS_NETLIB_RECVHTTPHEADERS
 -    }
 -    MS_NETLIB_SEND	                = 'Netlib/Send';
 -
 -    {
 -        wParam : HANDLE
 -        lParam : Pointer to an initialised TNETLIBBUFFER structure
 -        Affect : Receive data over a connection, see notes
 -        Returns: The number of bytes read on success, SOCKET_ERROR on failure
 -        Notes  :
 -                 This service uses some of the same flags as MS_NETLIB_SEND :
 -                 MSG_PEEK,
 -                 MSG_NODUMP,
 -                 MSG_DUMPPROXY,
 -                 MSG_NOHTTPGATEWAYWRAP,
 -                 MSG_DUMPASTEXT,
 -                 MSG_RAW
 -                 -
 -                 On using MSG_NOHTTPGATEWAYWRAP: Because packets through an HTTP proxy are
 -                 batched and cached and stuff, using this flag is not a guarantee that it
 -                 will be obeyed, and if it is it may even be propogated to future calls
 -                 even if you don't specify it then. Because of this, the flag should be
 -                 considered an all-or-nothing thing: either use it for the entire duration
 -                 of a connection, or not at all.
 -        Errors : ERROR_INVALID_PARAMETER, anything from recv()
 -                 (HTTP proxy):
 -                 ERROR_GEN_FAILURE (http result code wasn't 2xx)
 -                 ERROR_INVALID_DATA (no Content-Length header in reply)
 -                 ERROR_NOT_ENOUGH_MEMORY (Content-Length very large)
 -                 ERROR_HANDLE_EOF (connection closed before Content-Length bytes recved)
 -                                   anything from select(),
 -                 MS_NETLIB_RECVHTTPHEADERS, nlu.pfnHttpGatewayUnwrapRecv, socket(),
 -                 connect(), MS_NETLIB_SENDHTTPREQUEST
 -
 -    }
 -    MS_NETLIB_RECV	                = 'Netlib/Recv';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to an initialised TNETLIBSELECT structure
 -        Affect : Determine the status of one or more connections, see notes
 -        Returns: The numbe of ready connections, SOCKET_ERROR on failure
 -        Notes  : All handles passed to this service must have been returned
 -                 either by MS_NETLIB_OPENCONNECTION or MS_NETLIB_BINDPORT,
 -                 the last handle in each list must be followed by either NULL
 -                 or INVALID_HANDLE_VALUE.
 -        Errors : ERROR_INVALID_HANDLE, ERROR_INVALID_DATA, anything from select()
 -    }
 -    MS_NETLIB_SELECT	            = 'Netlib/Select';
 -
 -    {
 -        wParam : HANDLE
 -        lParam : maxPacketSize
 -        Affect : Create a packet receiver, see notes
 -        Returns: A handle on success, NULL(0) on failure
 -        Notes  : The packet receiver implements the common situation where
 -                 you have a variable length of packets coming thru over a connection
 -                 and you want them split up in order to handle them.
 -                 -
 -                 The major limiation is, that the buffer is created in memory,
 -                 so you can't have arbitrarily large packets
 -        Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
 -    }
 -    MS_NETLIB_CREATEPACKETRECVER    = 'Netlib/CreatePacketRecver';
 -
 -    {
 -        wParam : Handle returned by MS_NETLIB_CREATEPACKETRECVER
 -        lParam : Pointer to an initialised TNETLIBPACKETRECVER
 -        Returns: The total number of bytes available in the buffer, NULL(0)
 -                 if the connection was closed or SOCKET_ERROR.
 -                 -
 -                 If TNETLIBPACKETRECVER.bytesUsed is set to zero and the
 -                 buffer is already full up to the maxPacketSize, it is assumed
 -                 that a too large packet has been received, All data in
 -                 the buffer is discarded and receiving has started anew.
 -                 -
 -                 This will probably cause alignment problem so if you think
 -                 that tis iss likely to happen, then you should deal with it
 -                 yourself.
 -                 -
 -                 Closing the packet receiver will not close the associated
 -                 connection but will discard any bytes still in the buffer,
 -                 so if you intend to carry on reading from that connection,
 -                 make sure you have processed the buffer first.
 -                 -
 -                 This service is equivalent of memmove() to remove
 -                 the first bytesUsed from the buffer, select(), if dwTimeOut
 -                 is not INFINITE, then MS_NETLIB_RECV
 -        Errors : ERROR_INVALID_PARAMETER, ERROR_TIMEOUT, anything from select(),
 -                 MS_NETLIB_RECV
 -    }
 -    MS_NETLIB_GETMOREPACKETS        = 'Netlib/GetMorePackets';
 -
 -    {
 -        wParam : HANDLE
 -        lParam : Pointer to null terminated string to uh, log.
 -        Affect : Add a message to the log (if it's running) see notes
 -        Returns: non zeror on success, NULL(0) on failure
 -        Notes  : Don't include \r\n or #13#10 it's not needed,
 -                 -
 -                 Doesn't support formatting like the given C code for
 -                 Netlib_Logf, just use FmtStr() and then call this service
 -                 if you want that.
 -        Errors : ERROR_INVALID_PARAMETER
 -    }
 -    MS_NETLIB_LOG                   = 'Netlib/Log';
 +type
 +  TNETLIBCONNINFO = record
 +	  cbSize:int;
 +	  szIpPort:array [0..63] of AnsiChar;
 +	  dwIpv4:uint;
 +	  wPort:word;
 +  end;
 +
 +const
 +{
 +  Get connection Information
 +  IPv4 will be supplied in formats address:port or address
 +  IPv6 will be supplied in formats [address]:port or [address]
 +  wParam=(WPARAM)(HANDLE)hConnection
 +  lParam=(LPARAM)(NETLIBCONNINFO*) pointer to the connection information structure to fill
 +  Returns 0 if successful  
 +}
 +  MS_NETLIB_GETCONNECTIONINFO:PAnsiChar = 'Netlib/GetConnectionInfo';
 +
 +type
 +  TNETLIBIPLIST = record
 +	  cbNum:uint;
 +	  szIp:array[0..0,0..63] of AnsiChar;
 +  end;
 +
 +const
 +{
 +  Get connection Information
 +  wParam=(WPARAM)IP filter 1 - return global only IPv6 address, 0 all IPs
 +  Returns (INT_PTR)(NETLIBIPLIST*) numeric IP address address array 
 +  the last element of the array is all 0s, 0 if not successful
 +}
 +  MS_NETLIB_GETMYIP:PAnsiChar = 'Netlib/GetMyIP';
 +
 +  {
 +    wParam : HANDLE
 +    lParam : Pointer to a initialised TNETLIBHTTPREQUEST structure
 +    Affect : Send an HTTP request over a connection, see notes
 +    Returns: The number of bytes on success, SOCKET_ERROR on failure
 +    Notes  : HANDLE must of been returned by MS_NETLIB_OPENCONNECTION,,
 +             If you use NLHRF_SMARTAUTHHEADER and NTLM auth is in use then
 +             full NTLM auth transcation occurs, comprising sending the
 +             domain, getting the challenge, sending the response.
 +             NETLIBHTTPREQUEST.resultCode and NETLIBHTTPREQUEST.szResultDescr are
 +             ignored by this service.
 +    Errors : ERROR_INVALID_PARAMETER, MS_NETLIB_SEND (return codes)
 +  }
 +  MS_NETLIB_SENDHTTPREQUEST:PAnsiChar = 'Netlib/SendHttpRequest';
 +
 +  {
 +    wParam : HANDLE
 +    lParam : 0
 +    Affect : Receive HTTP headers, see notes
 +    Returns: A pointer to a TNETLIBHTTPREQUEST structure on success, NULL(0) on failure
 +    Notes  : The returned pointer must be freed after it's done with
 +             use MS_NETLIB_FREEHTTPREQUESTSTRUCT.
 +             -
 +             HANDLE must be returned by MS_NETLIB_OPENCONNECTION
 +             -
 +             Return^.pData=NIL and Return^.dataLength=0 always
 +             -
 +             The returned data should be retrieved using MS_NETLIB_RECV once
 +             the headers have been parsed.
 +             If headers haven't finished within 60 seconds the function returns
 +             NULL(0) and ERROR_TIMEOUT
 +    Errors : ERROR_INVALID_PARAMETER, any MS_NETLIB_RECV or select()
 +             ERROR_HANDLE_EOF (connection closed bfore headers complete)
 +             ERROR_TIMEOUT (headers still not complete after 60 seconds)
 +             ERROR_BAD_FORMAT (invalid character or line ending in headers, or first line is blank)
 +             ERROR_BUFFER_OVERFLOW (each header line must be less than 4096 chars long)
 +             ERROR_INVALID_DATA (first header line is malformed ("http/[01].[0-9] [0-9]+ .*", or no colon in subsequent line)
 +
 +  }
 +  MS_NETLIB_RECVHTTPHEADERS:PAnsiChar = 'Netlib/RecvHttpHeaders';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer returned by MS_NETLIB_RECVHTTPHEADERS to free
 +    Affect : Free the memory used by a TNETLIBHTTPREQUEST structure, see notes
 +    Returns: [non zero] on success, NULL(0) on failure
 +    Notes  : This service should only be used with memory pointers returned
 +             by either MS_NETLIB_RECVHTTPHEADERS or MS_NETLIB_HTTPTRANSACTION!.
 +    Errors : ERROR_INVALID_PARAMETER
 +
 +  }
 +  MS_NETLIB_FREEHTTPREQUESTSTRUCT:PAnsiChar = 'Netlib/FreeHttpRequestStruct';
 +
 +  {
 +    wParam : HANDLE
 +    lParam : Pointer to a TNETLIBHTTPREQUEST structure
 +    Affect : Carry out an entire HTTP transaction, see notes
 +    Returns: another pointer to a TNETLIBHTTPREQUEST structure or NULL(0)
 +             on failure
 +    Notes  : The returned pointer must be freed at some point
 +             with MS_NETLIB_FREEHTTPREQUESTSTRUCT,
 +             -
 +             TNETLIBHTTPREQUEST.szUrl should have a full HTTP URL, if it
 +             does not start with http://, that will be assumed, but do not
 +             take this assumption to stay assumed (heh..) in the future
 +             -
 +             this service equivalent of open(), sendhttp(), getheaders()
 +             netlib_recv(), netlib_closehandle()
 +             -
 +             TNETLIBHTTPREQUEST.headers will be added to with the following
 +             headers if they're not already present :
 +             "Host" (even if it is requested in .flags)
 +             "User-Agent" (in form : 'Miranda/d.d.d.d <(status of release)>')
 +             "Content-Length" (for POSTs only, set to TNETLIBHTTPREQUEST.dataLength)
 +
 +             If you don't want to send any of these headers --
 +             set TNETLIBHTTPREQUEST.headers to NULL(0)
 +             -
 +             In the returned pointer, pData[dataLen] is always 0 for 'safety'
 +             also : headers, headersCount, pData, dataLength, resultCode and
 +                    szResultDescr are all valid
 +             -
 +             Also take care not to assume that a returned pointer means that
 +             at the HTTP level it all worked out -- refer to the resultCode for
 +             2xx before doing anything else
 +             -
 +    Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
 +             Errors returned by the aforementioned internally used functions
 +  }
 +  MS_NETLIB_HTTPTRANSACTION:PAnsiChar = 'Netlib/HttpTransaction';
 +
 +  {
 +    wParam : HANDLE
 +    lParam : Pointer to an initialised TNETLIBBUFFER structure
 +    Affect : Send data over an open connection see notes
 +    Returns: The number of bytes sent on success, SOCKET_ERROR on failure
 +    Notes  : see Netlib_Send() helper function
 +    Errors : ERROR_INVALID_PARAMETER,
 +             anything from socket(), connect()
 +             send(), TNETLIBUSER.pfnHttpGatewayWrapSend(),
 +             (HTTP proxy): ERROR_GEN_FAILURE (http result code wasn't 2xx)
 +             MS_NETLIB_SENDHTTPREQUEST, MS_NETLIB_RECVHTTPHEADERS
 +  }
 +  MS_NETLIB_SEND:PAnsiChar = 'Netlib/Send';
 +
 +  {
 +    wParam : HANDLE
 +    lParam : Pointer to an initialised TNETLIBBUFFER structure
 +    Affect : Receive data over a connection, see notes
 +    Returns: The number of bytes read on success, SOCKET_ERROR on failure
 +    Notes  :
 +             This service uses some of the same flags as MS_NETLIB_SEND :
 +             MSG_PEEK,
 +             MSG_NODUMP,
 +             MSG_DUMPPROXY,
 +             MSG_NOHTTPGATEWAYWRAP,
 +             MSG_DUMPASTEXT,
 +             MSG_RAW
 +             -
 +             On using MSG_NOHTTPGATEWAYWRAP: Because packets through an HTTP proxy are
 +             batched and cached and stuff, using this flag is not a guarantee that it
 +             will be obeyed, and if it is it may even be propogated to future calls
 +             even if you don't specify it then. Because of this, the flag should be
 +             considered an all-or-nothing thing: either use it for the entire duration
 +             of a connection, or not at all.
 +    Errors : ERROR_INVALID_PARAMETER, anything from recv()
 +             (HTTP proxy):
 +             ERROR_GEN_FAILURE (http result code wasn't 2xx)
 +             ERROR_INVALID_DATA (no Content-Length header in reply)
 +             ERROR_NOT_ENOUGH_MEMORY (Content-Length very large)
 +             ERROR_HANDLE_EOF (connection closed before Content-Length bytes recved)
 +                               anything from select(),
 +             MS_NETLIB_RECVHTTPHEADERS, nlu.pfnHttpGatewayUnwrapRecv, socket(),
 +             connect(), MS_NETLIB_SENDHTTPREQUEST
 +
 +  }
 +  MS_NETLIB_RECV:PAnsiChar = 'Netlib/Recv';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to an initialised TNETLIBSELECT structure
 +    Affect : Determine the status of one or more connections, see notes
 +    Returns: The numbe of ready connections, SOCKET_ERROR on failure
 +    Notes  : All handles passed to this service must have been returned
 +             either by MS_NETLIB_OPENCONNECTION or MS_NETLIB_BINDPORT,
 +             the last handle in each list must be followed by either NULL
 +             or INVALID_HANDLE_VALUE.
 +    Errors : ERROR_INVALID_HANDLE, ERROR_INVALID_DATA, anything from select()
 +  }
 +  MS_NETLIB_SELECT  :PAnsiChar = 'Netlib/Select';
 +  MS_NETLIB_SELECTEX:PAnsiChar = 'Netlib/SelectEx'; // added in v0.3.3
 +
 +{
 +  Shutdown connection
 +  wParam=(WPARAM)(HANDLE)hConnection
 +  lParam=(LPARAM)0
 +  Returns 0 
 +}
 +  MS_NETLIB_SHUTDOWN:PAnsiChar = 'Netlib/Shutdown';
 +
 +  {
 +    wParam : HANDLE
 +    lParam : maxPacketSize
 +    Affect : Create a packet receiver, see notes
 +    Returns: A handle on success, NULL(0) on failure
 +    Notes  : The packet receiver implements the common situation where
 +             you have a variable length of packets coming thru over a connection
 +             and you want them split up in order to handle them.
 +             -
 +             The major limiation is, that the buffer is created in memory,
 +             so you can't have arbitrarily large packets
 +    Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
 +  }
 +  MS_NETLIB_CREATEPACKETRECVER:PAnsiChar = 'Netlib/CreatePacketRecver';
 +
 +  {
 +    wParam : Handle returned by MS_NETLIB_CREATEPACKETRECVER
 +    lParam : Pointer to an initialised TNETLIBPACKETRECVER
 +    Returns: The total number of bytes available in the buffer, NULL(0)
 +             if the connection was closed or SOCKET_ERROR.
 +             -
 +             If TNETLIBPACKETRECVER.bytesUsed is set to zero and the
 +             buffer is already full up to the maxPacketSize, it is assumed
 +             that a too large packet has been received, All data in
 +             the buffer is discarded and receiving has started anew.
 +             -
 +             This will probably cause alignment problem so if you think
 +             that tis iss likely to happen, then you should deal with it
 +             yourself.
 +             -
 +             Closing the packet receiver will not close the associated
 +             connection but will discard any bytes still in the buffer,
 +             so if you intend to carry on reading from that connection,
 +             make sure you have processed the buffer first.
 +             -
 +             This service is equivalent of memmove() to remove
 +             the first bytesUsed from the buffer, select(), if dwTimeOut
 +             is not INFINITE, then MS_NETLIB_RECV
 +    Errors : ERROR_INVALID_PARAMETER, ERROR_TIMEOUT, anything from select(),
 +             MS_NETLIB_RECV
 +  }
 +  MS_NETLIB_GETMOREPACKETS:PAnsiChar = 'Netlib/GetMorePackets';
 +
 +  {
 +    wParam : HANDLE
 +    lParam : Pointer to null terminated string to uh, log.
 +    Affect : Add a message to the log (if it's running) see notes
 +    Returns: non zeror on success, NULL(0) on failure
 +    Notes  : Don't include \r\n or #13#10 it's not needed,
 +             -
 +             Doesn't support formatting like the given C code for
 +             Netlib_Logf, just use FmtStr() and then call this service
 +             if you want that.
 +    Errors : ERROR_INVALID_PARAMETER
 +  }
 +  MS_NETLIB_LOG:PAnsiChar = 'Netlib/Log';
 +  MS_NETLIB_LOGW:PAnsiChar = 'Netlib/LogW';
 +
 +  {
 +    Sets a gateway polling timeout interval
 +    wParam=(WPARAM)(HANDLE)hConn
 +    lParam=(LPARAM)timeout
 +    Returns previous timeout value
 +    Errors: -1
 +  }
 +  MS_NETLIB_SETPOLLINGTIMEOUT:PAnsiChar = 'Netlib/SetPollingTimeout';
 +
 +{
 +  Makes connection SSL 
 +  wParam=(WPARAM)(HANDLE)hConn
 +  lParam=0
 +  Returns 0 on failure 1 on success
 +}
 +  MS_NETLIB_STARTSSL:PAnsiChar = 'Netlib/StartSsl';
 +
 +type
 +  NETLIBSSL = record
 +    cbSize:int;
 +    host  :PAnsiChar; // Expected host name
 +    flags :int;       // Reserved
 +  end;
 +
 +  const
 +/////////////////////////////////////////////////////////////////////////////////////////
 +// Security providers (0.6+)
 +
 +  NNR_UNICODE = 1;
 +// Inits a required security provider. Right now only NTLM is supported
 +// Returns HANDLE = NULL on error or non-null value on success
 +// Known providers: Basic, NTLM, Negotiate, Kerberos, GSSAPI - (Kerberos SASL)
 +  MS_NETLIB_INITSECURITYPROVIDER:PAnsiChar = 'Netlib/InitSecurityProvider';
 +
 +type
 +  NETLIBNTLMINIT2 = record
 +    cbSize        :size_t;
 +    szProviderName:TChar;
 +    szPrincipal   :TChar;
 +    flags         :uint;
 +  end;
 +
 +const
 +  MS_NETLIB_INITSECURITYPROVIDER2:PAnsiChar = 'Netlib/InitSecurityProvider2';
 +
 +// Destroys a security provider's handle, provided by Netlib_InitSecurityProvider.
 +// Right now only NTLM is supported
 +  MS_NETLIB_DESTROYSECURITYPROVIDER:PAnsiChar = 'Netlib/DestroySecurityProvider';
 +
 +// Returns the NTLM response string. The result value should be freed using mir_free
 +  MS_NETLIB_NTLMCREATERESPONSE:PAnsiChar = 'Netlib/NtlmCreateResponse';
 +
 +type
 +  NETLIBNTLMREQUEST = record
 +    szChallenge:PAnsiChar;
 +    userName   :PAnsiChar;
 +    password   :PAnsiChar;
 +//    complete   :int; // not present in last versions
 +  end;
 +
 +type
 +  NETLIBNTLMREQUEST2 = record
 +    cbSize     :size_t;
 +    szChallenge:PAnsiChar;
 +    szUserName :TChar;
 +    szPassword :TChar;
 +    complete   :uint;
 +    flags      :uint;
 +  end;
 +
 +const
 +  MS_NETLIB_NTLMCREATERESPONSE2 = 'Netlib/NtlmCreateResponse2';
 +
 +/////////////////////////////////////////////////////////////////////////////////////////
 +// Netlib hooks (0.8+)
 +
 +// WARNING: these hooks are being called in the context of the calling thread, without switching
 +// to the first thread, like all another events do. The hook procedure should be ready for the
 +// multithreaded mode
 +//
 +// Parameters:
 +//    wParam: NETLIBNOTIFY* - points to the data being sent/received
 +//    lParam: NETLIBUSER*   - points to the protocol definition
 +
 +type
 +  NETLIBNOTIFY = record
 +    nlb   :PNETLIBBUFFER; // pointer to the request buffer
 +    result:int;           // amount of bytes really sent/received
 +  end;
 +  TNETLIBNOTIFY = NETLIBNOTIFY;
 +
 +const
 +  ME_NETLIB_FASTRECV :PAnsiChar = 'Netlib/OnRecv';  // being called on every receive
 +  ME_NETLIB_FASTSEND :PAnsiChar = 'Netlib/OnSend';  // being called on every send
 +  ME_NETLIB_FASTDUMP :PAnsiChar = 'Netlib/OnDump';  // being called on every dump
  {$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_newawaysys.inc b/include/delphi/m_newawaysys.inc index 1a12135d0b..1a12135d0b 100644 --- a/plugins/Pascal_Headers/m_newawaysys.inc +++ b/include/delphi/m_newawaysys.inc diff --git a/include/delphi/m_options.inc b/include/delphi/m_options.inc index 23d891a81c..e4440cd2e4 100644 --- a/include/delphi/m_options.inc +++ b/include/delphi/m_options.inc @@ -1,109 +1,131 @@ -(*
 -
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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.
 +{
 +  Miranda IM: the free IM client for Microsoft  Windows
 +
 +  Copyright 2000-2003 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_OPTIONS}
 +{$DEFINE M_OPTIONS}
 -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.
 +const
 +  { Opt/Initialise
 +    The user opened the options dialog. Modules should do whatever initialisation
 +    they need and call opt/addpage one or more times if they want pages displayed
 +    in the options dialog
 +    wParam=addInfo
 +    lParam=0
 +    addInfo should be passed straight to the wParam of opt/addpage
 +  }
 +  ME_OPT_INITIALISE:PAnsiChar = 'Opt/Initialise';
 +
 +  { Opt/AddPage
 +    Must only be called during an opt/initialise hook
 +    Adds a page to the options dialog
 +    wParam=addInfo
 +    lParam=(LPARAM)(OPTIONSDIALOGPAGE )odp
 +    addInfo must have come straight from the wParam of opt/initialise
 +    Pages in the options dialog operate just like pages in property sheets. See the
 +    Microsoft documentation for details on how they operate.
 +    Strings in the structure can be released as soon as the service returns, but
 +    icons must be kept around. This is not a problem if you're loading them from a
 +    resource.
 +    Prior to v0.1.2.1 the options dialog would resize to fit the largest page, but
 +    since then it is fixed in size. The largest page that fits neatly is 314x240
 +    DLUs.
 +  }
 -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.
 +type
 +  POPTIONSDIALOGPAGE = ^TOPTIONSDIALOGPAGE;
 +  TOPTIONSDIALOGPAGE = record
 +    cbSize                :int;
 +    position              :int;     // a position number, lower numbers are topmost
 +    szTitle               :TChar;   // [TRANSLATED-BY-CORE]
 +    pfnDlgProc            :pointer;
 +    pszTemplate           :PAnsiChar;
 +    hInstance             :THANDLE;
 +    hIcon                 :HICON;   // v0.1.0.1+
 +    szGroup               :TChar;   // v0.1.0.1+ [TRANSLATED-BY-CORE]
 +    groupPosition         :int;     // v0.1.0.1+
 +    hGroupIcon            :HICON;   // v0.1.0.1+
 +    flags                 :dword;   // v0.1.2.1+
 +    nIDBottomSimpleControl:int;     // v0.1.2.1+
 +      // if in simple mode the dlg will be cut off after this control,
 +      // 0 to disable
 +    nIDRightSimpleControl :int;     // v0.1.2.1+
 +      // if in simple mode the dlg will be cut off after this control,
 +      // 0 to disable
 +    expertOnlyControls    :^uint;
 +    nExpertOnlyControls   :int;     // v0.1.2.1+
 +      // these controls will be hidden in simple mode. Array must remain valid
 +      // for duration of dlg.
 +    szTab                 :TChar;   // v0.6.0.0+ [TRANSLATED-BY-CORE]
 +    dwInitParam           :LPARAM;  // v0.8.0.0+ a value to pass to lParam of WM_INITDIALOG message
 +    hLangpack             :int;
 +  end;
 -*)
 +const
 +  {$IFNDEF WIN64}
 +  OPTIONPAGE_OLD_SIZE  = 40;
 +  OPTIONPAGE_OLD_SIZE2 = 60;
 +  OPTIONPAGE_OLD_SIZE3 = 64;
 +  {$ELSE}
 +  OPTIONPAGE_OLD_SIZE  = SIZEOF(TOPTIONSDIALOGPAGE);
 +  OPTIONPAGE_OLD_SIZE2 = SIZEOF(TOPTIONSDIALOGPAGE);
 +  OPTIONPAGE_OLD_SIZE3 = SIZEOF(TOPTIONSDIALOGPAGE);
 +  {$ENDIF}
 -{$IFNDEF M_OPTIONS}
 -{$DEFINE M_OPTIONS}
 +const
 +  ODPF_SIMPLEONLY    =  1; // page is only shown when in simple mode
 +  ODPF_EXPERTONLY    =  2; //          "                 expert mode
 +  ODPF_BOLDGROUPS    =  4; // give group box titles a bold font
 +  ODPF_UNICODE       =  8; // string fields in OPTIONSDIALOGPAGE are WCHAR*
 +  ODPF_USERINFOTAB   = 16; // options page is tabbed
 +  ODPF_DONTTRANSLATE = 32; // do not translate option page title
  const
 +  PSN_EXPERTCHANGED = 2;    //sent to pages via WM_NOTIFY when the expert checkbox is clicked. lParam=new state
 -    {
 -        wParam : addinfo
 -        lParam : 0
 -        Affects: The user opened the options dialog, see notes
 -        Notes  : Modules should do whatever initalisation they need and call
 -                 MS_OPT_ADDPAGE with the wParam -- MS_OPT_ADDPAGE
 -                 can be called one or more times
 -                 if more than one page wants to be displayed.
 -    }
 -    ME_OPT_INITIALISE           = 'Opt/Initialise';
 -
 -    {
 -        wParam : wParam from ME_OPT_INITIALISE
 -        lParam : Pointer to an initialised TOPTIONSDIALOGPAGE
 -        Affects: Adds a page to the options dialog, see notes
 -        Notes  : Strings in the structure can be released as soon as the
 -                 service returns -- but icons must be kept around, this iss
 -                 not a problem if you're loading theem from a resource.
 -                 -
 -                 This service should only be called within the ME_OPT_INITIALISE
 -                 event hook.
 -                 -
 -                 Pages in the options dialog operate just like pages in property
 -                 sheets, See the WinAPI documentation for details on how they operate.
 -        Version: Prior to v0.1.2.1 the options dialog would resize
 -                 to fit the largest page, but since then it's a fixed size
 -                 The largest page that fits neatly is 314x240 DLU's
 -                 -
 -                 Some of OPTIONSDIALOGPAGE's fields are version dependant.
 -    }
 -    MS_OPT_ADDPAGE                  = 'Opt/AddPage';
 -
 -    { defacto size }
 -
 -    OPTIONSDIALOGPAGE_V0100_SIZE    = $18;
 -    OPTIONSDIALOGPAGE_V0120_SIZE    = $28;
 -
 -    { page is only shown when in 'simple' mode }
 -    ODPF_SIMPLEONLY                 = 1;
 -    { page is only shown when in 'expert' mode }
 -    ODPF_EXPERTONLY                 = 2;
 -    { give group box titles a bold font }
 -    ODPF_BOLDGROUPS                 = 4;
 +  PSM_ISEXPERT      = WM_USER+101;   //returns true/false
 +  PSM_GETBOLDFONT   = WM_USER+102;   //returns HFONT used for group box titles
 -type
 +  MS_OPT_ADDPAGE:PAnsiChar = 'Opt/AddPage';
 -    POPTIONSDIALOGPAGE = ^TOPTIONSDIALOGPAGE;
 -    TOPTIONSDIALOGPAGE = record
 -        cbSize: int;
 -        position: int;                  // position number, lower numbers are top most
 -        pszTitle: PChar;
 -        pfnDlgProc: Pointer;            // DLGPROC prototype
 -        pszTemplate: PChar;
 -        hInstance: THandle;
 -        hIcon: THandle;                 // v0.1.0.1+
 -        pszGroup: PChar;                // v0.1.0.1+
 -        groupPosition: int;             // v0.1.0.1+
 -        hGroupIcon: THandle;            // v0.1.0.1+
 -        flags: DWORD;                   // v0.1.2.1+
 -        { if in simple mode the dialog will be cut off AFTER this control ID, 0
 -        for disable }
 -        nIDBottomSimpleControl: int;    // v0.1.2.1+
 -        { if in simple mode the dialog will cut off AFTER this control ID, 0 to disable }
 -        nIDRightSimpleControl: int;     // v0.1.2.1+
 -        { these controls will be hidden in simple mode, pointer to an array of ID's
 -        must remain valid for the duration of the dialog }
 -        expertOnlyControls: ^int;
 -        nExpertOnlyControls: int;       // v0.1.2.1+
 -    end;
 +  { Opens the options dialog, optionally at the specified page    v0.1.2.1+
 +    wParam=0
 +    lParam=(LPARAM)(OPENOPTIONSDIALOG*)&ood;
 +    Returns 0 on success, nonzero on failure
 +    The behaviour if the options dialog is already open is that it will just be
 +    activated, the page won't be changed. This may change in the future. }
 +type
 +  POPENOPTIONSDIALOG = ^TOPENOPTIONSDIALOG;
 +  TOPENOPTIONSDIALOG = record
 +    cbSize  :int;
 +    pszGroup:PAnsiChar;  // set to NULL if it's a root item
 +    pszPage :PAnsiChar;  // set to NULL to just open the options at no specific page
 +    pszTab  :PAnsiChar;  // set to NULL to just open the options at no specific tab
 +  end;
  const
 +  MS_OPT_OPENOPTIONS:PAnsiChar = 'Opt/OpenOptions';
 +
 +//Opens the options dialog, with only specified page    v0.8.0.x+
 +  MS_OPT_OPENOPTIONSPAGE = 'Opt/OpenOptionsPage';
 -    { sent to pages via WM_NOTIFY when the expert checkbox is clicked, lParam = new state }
 -    PSN_EXPERTCHANGED               = 2;
 -    { returns true/false }
 -    PSM_ISEXPERT                    = ($0400 + 101);
 -    { returns HFONT used for group box titles }
 -    PSM_GETBOLDFONT                 = ($0400 + 102);
 +  SETTING_SHOWEXPERT_DEFAULT = 1;
  {$ENDIF}
 diff --git a/include/delphi/m_plugins.inc b/include/delphi/m_plugins.inc index 689b7a39e7..bb88804666 100644 --- a/include/delphi/m_plugins.inc +++ b/include/delphi/m_plugins.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,52 +18,29 @@ 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_PLUGINS}
  {$DEFINE M_PLUGINS}
 +{
 +  Undocumented: Do NOT use.
 +  Version: 0.3.4.1+ (2004/10/04)
 +}
  const
 +  DBPE_DONE = 1;
 +  DBPE_CONT = 0;
 +  DBPE_HALT = -1;
 +type
 +  PPLUGIN_DB_ENUM = ^TPLUGIN_DB_ENUM;
 +  TPLUGIN_DB_ENUM = record
 +    cbSize : int;
 +// 0 = continue, 1 = found, -1 = stop now
 +    pfnEnumCallback : function (pluginname:PAnsiChar; link:pointer; lParam:LPARAM):int;cdecl;
 +    lParam : LPARAM;
 +  end;
 -    DEFMOD_PROTOCOLICQ      = 1;        // removed from v0.3.0.0 alpha
 -    DEFMOD_PROTOCOLMSN		= 2;        // removed from v0.1.2.0+
 -    DEFMOD_UIFINDADD		= 3;
 -    DEFMOD_UIUSERINFO		= 4;
 -    DEFMOD_SRMESSAGE		= 5;
 -    DEFMOD_SRURL			= 6;
 -    DEFMOD_SREMAIL			= 7;
 -    DEFMOD_SRAUTH			= 8;
 -    DEFMOD_SRFILE			= 9;
 -    DEFMOD_UIHELP			= 10;
 -    DEFMOD_UIHISTORY		= 11;
 -    DEFMOD_RNDCHECKUPD		= 12;
 -    DEFMOD_RNDICQIMPORT		= 13;	    // not built in to v0.1.0.1+
 -    DEFMOD_RNDAUTOAWAY		= 14;
 -    DEFMOD_RNDUSERONLINE	= 15;
 -    DEFMOD_RNDCRYPT         = 16;       // v0.1.0.1-v0.1.2.0
 -    DEFMOD_SRAWAY           = 17;	    // v0.1.0.1+
 -    DEFMOD_RNDIGNORE        = 18;	    // v0.1.0.1+
 -    DEFMOD_UIVISIBILITY     = 19;       // v0.1.1.0+, options page only
 -    DEFMOD_UICLUI           = 20;       // v0.1.1.0+
 -    DEFMOD_UIPLUGINOPTS     = 21;	    // v0.1.2.1+
 -    DEFMOD_PROTOCOLNETLIB   = 22;	    // v0.1.2.2+
 -
 -    DEFMOD_HIGHEST          = 22;
 -
 -
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : Gets an array of modules that the plugins report they want to replace
 -        Returns: Returns a pointer to an array of ints, with elements 1 or 0,
 -                 indexed by the DEFMOD_* constants, 1 is to mark that the default
 -                 module shouldn't be loaded, see notes
 -        Notes  : this is primarily for use by the core's module initialiser,
 -                 but could also be used by modules that are doing
 -                 naughty things that are very feature-dependent.
 -    }
 -    MS_PLUGINS_GETDISABLEDEFAULTARRAY = 'Plugins/GetDisableDefaultArray';
 +const
 +  MS_PLUGINS_ENUMDBPLUGINS:PAnsiChar = 'Plugins/DbEnumerate';
  {$ENDIF}
 diff --git a/include/delphi/m_popup.inc b/include/delphi/m_popup.inc index f8d2ea9df9..57a25e88a7 100644 --- a/include/delphi/m_popup.inc +++ b/include/delphi/m_popup.inc @@ -1,222 +1,484 @@ -(*
 +{
  ===============================================================================
                                  PopUp plugin
  Plugin Name: PopUp
 -Plugin author: hrk, Luca Santarelli, hrk@users.sourceforge.net
 -This file has been created by egodust, Sam, egodust@users.sourceforge.net
 +Plugin authors: Luca Santarelli aka hrk (hrk@users.sourceforge.net)
 +                Victor Pavlychko (nullbie@gmail.com)
  ===============================================================================
 +The purpose of this plugin is to give developers a common "platform/interface"
 +to show PopUps. It is born from the source code of NewStatusNotify, another
 +plugin I've made.
 -The purpose of this plugin is to give developers a common "platform/interface" to show PopUps. It is born from the source code of NewStatusNotify, another plugin I've made.
 -
 -Remember that users *must* have this plugin enabled, or they won't get any popup. Write this in the requirements, do whatever you wish ;-)... but tell them!
 +Remember that users *must* have this plugin enabled, or they won't get any
 +popup. Write this in the requirements, do whatever you wish ;-)... but tell
 +them!
  ===============================================================================
 +}
 --- To use this file you need Windows.pas, m_globaldefs.pas (get it from the CVS under the 'inc' module)
 --- To include this in the source, use {$include m_popup.h}
 +{$IFNDEF M_POPUP}
 +{$DEFINE M_POPUP}
 -*)
 +{
 +NOTE! Since Popup 1.0.1.2 there is a main meun group called "PopUps" where I
 +have put a "Enable/Disable" item. You can add your own "enable/disable" items
 +by adding these lines before you call MS_CLIST_ADDMAINMENUITEM:
 +mi.pszPopUpName = Translate("PopUps");
 +mi.position = 0; //You don't need it and it's better if you put it to zero.
 +}
 +
 +const POPUP_VERSION = $02010003;
 +
 +const
 +  MAX_CONTACTNAME = 2048;
 +  MAX_SECONDLINE  = 2048;
 +  MAX_ACTIONTITLE = 64;
 +
 +//  POPUP_USE_SKINNED_BG = $FFFFFFFF;
 +
 +// Popup Action flags
 +  PAF_ENABLED = $01; // Actions is enabled. You may store one global
 +                     // action set and toggle some items depending on
 +                     // popup you are requesting
 +
 +type
 +  PPOPUPACTION = ^TPOPUPACTION;
 +  TPOPUPACTION = record
 +    cbSize  :int;    // sizeof(POPUPACTION)
 +    lchIcon :HICON;  // Action Icon
 +    // Action title text. Please use module name as prefix
 +    // (e.g. "Popup Plus/Dismiss Popup") and don't translate
 +    lpzTitle:array [0..MAX_ACTIONTITLE-1] of AnsiChar;
 +    flags   :DWORD;  // set of PAF_* flags
 +    wParam  :WPARAM; // wParam for UM_POPUPACTION message
 +    lParam  :LPARAM; // lParam for UM_POPUPACTION message
 +  end;
 +
 +type
 +  // for info on what this stuff is, see m_popup.h
 +  PPOPUPDATA = ^TPOPUPDATA;
 +  TPOPUPDATA = record
 +    lchContact      : THANDLE;  // Handle to the contact, can be NULL (main contact).
 +    lchIcon         : HICON;    // Handle to a icon to be shown. Cannot be NULL.
 +// This is the contact name or the first line in the plugin. Cannot be NULL.
 +    lpszContactName : array [0..MAX_CONTACTNAME-1] of AnsiChar;
 +// This is the second line text. Users can choose to hide it. Cannot be NULL.
 +    lpszText        : array [0..MAX_SECONDLINE-1] of AnsiChar;
 +    colorBack       : COLORREF; // COLORREF to be used for the background.
 +                                // Can be NULL, default will be used.
 +    colorText       : COLORREF; // COLORREF to be used for the text.
 +                                // Can be NULL, default will be used.
 +    PluginWindowProc: pointer;  // Read below. Can be NULL; default will be used.
 +    PluginData      : Pointer;  // Read below. Can be NULL.
 +  end;
 +
 +type
 +  PPOPUPDATAEX = ^TPOPUPDATAEX;
 +  TPOPUPDATAEX = record
 +    lchContact      : THANDLE;
 +    lchIcon         : HICON;
 +    lpszContactName : array [0..MAX_CONTACTNAME-1] of AnsiChar;
 +    lpszText        : array [0..MAX_SECONDLINE -1] of AnsiChar;
 +    colorBack       : COLORREF;
 +    colorText       : COLORREF;
 +    PluginWindowProc: pointer;
 +    PluginData      : Pointer;
 +    iSeconds        : int;      // Custom delay time in seconds.
 +                                // -1 means "forever", 0 means = 'default time".
 +{ Data prior $02010003 version
 +    lpzClass        : PAnsiChar;    // PopUp class. Used with skinning. See PopUp/AddClass for details
 +    skinBack        : COLORREF; // Background color for colorizable skins
 +    cZero: array [0..15-SizeOf(PAnsiChar)-SizeOf(COLORREF)] of byte;
 +}
 +  // you *MUST* pass APT_NEWDATA flag for services to take care of this data
 +    hReserved       : THANDLE;  // Reserved. Must be NULL
 +    actionCount     : int;      // Amount of passed actions
 +    lpActions       : PPOPUPACTION; // Popup Actions
 +    icbSize         : int;      // struct size for future
 +  end;
 +
 +type
 +  PPOPUPDATAW = ^TPOPUPDATAW;
 +  TPOPUPDATAW = record
 +    lchContact      : THANDLE;
 +    lchIcon         : HICON;
 +    lpwzContactName : array [0..MAX_CONTACTNAME-1] of WideChar;
 +    lpwzText        : array [0..MAX_SECONDLINE -1] of WideChar;
 +    colorBack       : COLORREF;
 +    colorText       : COLORREF;
 +    PluginWindowProc: Pointer;  // must be a window procedure using stdcall
 +    PluginData      : Pointer;
 +    iSeconds        : int;      // Custom delay time in seconds.
 +                                //  -1 means = 'forever", 0 means = 'default time".
 +{ Data prior $02010003 version
 +    cZero: array [0..15] of AnsiChar; //16 unused bytes which may come useful in the future.
 +}
 +  // you *MUST* pass APT_NEWDATA flag for services to take care of this data
 +    hReserved       : THANDLE;  // Reserved. Must be NULL
 +    actionCount     : int;      // Amount of passed actions
 +    lpActions       : PPOPUPACTION; // Popup Actions
 +    icbSize         : int;      // struct size for future
 +  end;
 +
 +{
 +  When you call MS_POPUP_ADDPOPUP, my plugin will check if the given POPUPDATA
 +structure is filled with acceptable values. If not, the data will be rejected
 +and no popup will be shown.
 +
 +- lpzText should be given, because it's really bad if a user chooses to have the
 +second line displayed and it's empty :-) Just write it and let the user choose
 +if it will be displayed or not.
 +
 +- PluginWindowProc is a WNDPROC address you have to give me. Why? What? Where?
 +Calm down 8) My plugin will take care of the creation of the popup, of the
 +destruction of the popup, of the come into view and the hiding of the popup.
 +Transparency, animations... all this stuff.
 +  My plugin will not (as example) open the MessageWindow when you left click on
 +a popup. Why? Because I don't know if your popup desires to open the
 +MessageWindow :)))) This means that you need to make a WNDPROC which takes care
 +of the WM_messages you need.
 +  For example, WM_COMMAND or WM_CONTEXTMENU or WM_LMOUSEUP or whatever.
 +  At the end of your WNDPROC remember to "return DefWindowProc(hwnd, msg,
 +wParam, lParam);" When you process a message that needs a return value (an
 +example could be WM_CTLCOLORSTATIC, but you don't need to catch it 'cause it's
 +my plugin's job), simply return the nedeed value. :)
 +The default WNDPROC does nothing.
 -{$ifndef M_POPUP_H}
 -{$define M_POPUP_H}
 +- PluginData is a pointer to a void, which means a pointer to anything. You can
 +make your own structure to store the data you need (example: a status
 +information, a date, your name, whatever) and give me a pointer to that struct.
 +You will need to destroy that structure and free the memory when the PopUp is
 +going to be destroyed. You'll know this when you receive a UM_FREEPLUGINDATA.
 +The name tells it all: free your own plugin data.
 -{$ifdef FPC}
 -    {$PACKRECORDS C}
 -    {$MODE Delphi}
 -{$endif}
 +Appendix A: Messages my plugin will handle and your WNDPROC will never see.
 +WM_CREATE, WM_DESTROY, WM_TIMER, WM_ERASEBKGND
 +WM_CTLCOLOR* [whatever it may be: WM_CTLCOLORDLG, WM_CTLCOLORSTATIC...]
 +WM_PAINT, WM_PRINT, WM_PRINTCLIENT
 +}
  const
 +{
 +  Creates, adds and shows a popup, given a (valid) POPUPDATA structure pointer.
 +  wParam = (WPARAM)(*POPUPDATA)PopUpDataAddress
 +  lParam = 0
 +  Returns: > 0 on success, 0 if creation went bad, -1 if the PopUpData contained unacceptable values.
 +  NOTE: it returns -1 if the PopUpData was not valid, if there were already too many popups, if the module was disabled.
 +  Otherwise, it can return anything else...
 +
 +Popup Plus 2.0.4.0+
 +You may pass additional creation flags via lParam:
 +  APF_RETURN_HWND ....... function returns handle to newly created popup window (however this calls are a bit slower)
 +  APF_CUSTOM_POPUP ...... new popup is created in hidden state and doesn't obey to popup queue rules.
 +              you may control it via UM_* messages and custom window procedure
 +  APF_NO_HISTORY ........ do not log this popup in popup history (useful for previews)
 +  APF_NO_POPUP .......... do not show popup. this is useful if you want popup yo be stored in history only
 +  APF_NEWDATA ........... use new version of POPUPDATAEX/POPUPDATAW structs
 +}
 +  APF_RETURN_HWND  = 1;
 +  APF_CUSTOM_POPUP = 2;
 +  APF_NO_HISTORY   = 4;
 +  APF_NO_POPUP     = 8;
 +  APF_NEWDATA      = $10;
 +
 +  MS_POPUP_ADDPOPUP  :PAnsiChar = 'PopUp/AddPopUp';
 +  MS_POPUP_ADDPOPUPW :PAnsiChar = 'PopUp/AddPopUpW';
 +  MS_POPUP_ADDPOPUPEX:PAnsiChar = 'PopUp/AddPopUpEx';
 +
 +{
 +  Returns the handle to the contact associated to the specified PopUpWindow.
 +  You will probably need to know this handle inside your WNDPROC. Exampole: you want to open the MessageWindow. :-)
 +  Call MS_POPUP_GETCONTACT on the hWnd you were given in the WNDPROC.
 +  wParam = (WPARAM)(HWND)hPopUpWindow
 +  lParam = 0;
 +  Returns: the HANDLE of the contact. Can return NULL, meaning it's the main contact. -1 means failure.
 +}
 +  MS_POPUP_GETCONTACT:PAnsiChar = 'PopUp/GetContact';
 +
 +{
 +  wParam = hPopUpWindow
 +  lParam = PluginDataAddress;
 +  Returns: the address of the PLUGINDATA structure. Can return NULL, meaning nothing was given. -1 means failure.
 +  IMPORTANT NOTE: it doesn't seem to work if you do:
 +  CallService(..., (LPARAM)aPointerToAStruct);
 +  and then use that struct.
 +  Do this, instead:
 +  aPointerToStruct = CallService(..., (LPARAM)aPointerToAStruct);
 +  and it will work. Just look at the example I've written above (PopUpDlgProc).
 +}
 +  MS_POPUP_GETPLUGINDATA:PAnsiChar = 'PopUp/GetPluginData';
 +
 +{
 +  wParam = 0
 +  lParam = 0
 +  Returns: 0 if the user has chosen not to have the second line, 1 if he choose to have the second line.
 +}
 +  MS_POPUP_ISSECONDLINESHOWN:PAnsiChar = 'PopUp/IsSecondLineShown';
 +
 +{
 +  Requests an action or an answer from PopUp module.
 +  wParam = (WPARAM)wpQuery
 +  returns 0 on success, -1 on error, 1 on stupid calls ;-)
 +}
 +  PUQS_ENABLEPOPUPS  = 1; // returns 0 if state was changed, 1 if state wasn't changed
 +  PUQS_DISABLEPOPUPS = 2; // " "
 +  PUQS_GETSTATUS     = 3; // Returns 1 if popups are enabled, 0 if popups are disabled.
 +
 +  MS_POPUP_QUERY:PAnsiChar = 'PopUp/Query';
 +
 +{
 +  UM_FREEPLUGINDATA
 +  wParam = lParam = 0. Process this message if you have allocated your own memory. (i.e.: POPUPDATA.PluginData != NULL)
 +}
 +  UM_FREEPLUGINDATA  = (WM_USER + $200);
 +
 +{
 +  UM_DESTROYPOPUP
 +  wParam = lParam = 0. Send this message when you want to destroy the popup, or use the function below.
 +}
 +  UM_DESTROYPOPUP = (WM_USER + $201);
 +
 +{
 +  UM_INITPOPUP
 +  wParam = (WPARAM)(HWND)hPopUpWindow (but this is useless, since I'll directly send it to your hPopUpWindow
 +  lParam = 0.
 +  This message is sent to the PopUp when its creation has been finished, so POPUPDATA (and thus your PluginData) is reachable.
 +  Catch it if you needed to catch WM_CREATE or WM_INITDIALOG, which you'll never ever get in your entire popup-life.
 +  Return value: if you process this message, return 0. If you don't process it, return 0. Do whatever you like ;-)
 +}
 +  UM_INITPOPUP = (WM_USER + $202);
 +
 +{
 +  wParam = hPopUpWindow
 +  lParam = lpzNewText
 +  returns: > 0 for success, -1 for failure, 0 if the failure is due to second line not being shown. (but you could call PUIsSecondLineShown() before changing the text...)
 +  Changes the text displayed in the second line of the popup.
 +}
 +  MS_POPUP_CHANGETEXT :PAnsiChar = 'PopUp/Changetext';
 +  MS_POPUP_CHANGETEXTW:PAnsiChar = 'PopUp/ChangetextW';
 +
 +{
 +  wParam = (WPARAM)(HWND)hPopUpWindow
 +  lParam = (LPARAM)(POPUPDATAEX*)newData
 +  Changes the entire popup
 +}
 +  MS_POPUP_CHANGE :PAnsiChar = 'PopUp/Change';
 +  MS_POPUP_CHANGEW:PAnsiChar = 'PopUp/ChangeW';
 +
 +{
 + UM_CHANGEPOPUP
 +  This message is triggered by Change/ChangeText services. You also may post it directly :)
 +
 +  wParam = Modification type
 +  lParam = value of type defined by wParam
 +}
 +
 +  CPT_TEXT   = 1; // lParam = (AnsiChar *)text
 +  CPT_TEXTW  = 2; // lParam = (WCHAR *)text
 +  CPT_TITLE  = 3; // lParam = (AnsiChar *)title
 +  CPT_TITLEW = 4; // lParam = (WCHAR *)title
 +  CPT_DATA   = 5; // lParam = (POPUPDATA *)data
 +  CPT_DATAEX = 6; // lParam = (POPUPDATAEX *)data
 +  CPT_DATAW  = 7; // lParam = (POPUPDATAW *)data
 +  CPT_DATA2  = 8; // lParam = (POPUPDATA2 *)data
 +
 +  UM_CHANGEPOPUP = WM_USER + $0203;
 +
 +{ UM_POPUPACTION
 +  Popup Action notification
 +
 +  wParam and lParam are specified bu plugin.
 +  wParam = 0 is used buy popup plus internally!
 +}
 -    MAX_CONTACTNAME = 2048;
 -    MAX_SECONDLINE  = 2048;
 +  UM_POPUPACTION = WM_USER + $0204;
 -    SM_WARNING      = $01;      //Triangle icon.
 -    SM_NOTIFY       = $02;      //Exclamation mark icon.
 +{ UM_POPUPMODIFYACTIONICON
 +  Modify Popup Action Icon
 +
 +  wParam = (WPARAM)(LPPOPUPACTIONID)&actionId
 +  lParam = (LPARAM)(HICON)hIcon
 +}
  type
 +  PPOPUPACTIONID = ^TPOPUPACTIONID;
 +  TPOPUPACTIONID = record
 +    wParam:WPARAM;
 +    lParam:LPARAM;
 +  end;
 +
 +const
 +   UM_POPUPMODIFYACTIONICON = WM_USER + $0205;
 +
 +const
 +  SM_WARNING      = $01; //Triangle icon.
 +  SM_NOTIFY       = $02; //Exclamation mark icon.
 +  SM_ERROR        = $03; //Cross icon.
 +{
 +  This is mainly for developers.
 +  Shows a warning message in a PopUp. It's useful if you need a = 'MessageBox" like function,
 +  but you don't want a modal window (which will interfere with a DialogProcedure. MessageBox
 +  steals focus and control, this one not.
 +  wParam = lpzMessage
 +  lParam = SM_* flag
 +  Returns: 0 if the popup was shown, -1 in case of failure.
 +}
 +  MS_POPUP_SHOWMESSAGE :PAnsiChar = 'PopUp/ShowMessage';
 +  MS_POPUP_SHOWMESSAGEW:PAnsiChar = 'PopUp/ShowMessageW';
 -    // for info on what this stuff is, see m_popup.h
 +{ PopUp/RegisterActions
 +Registers your action in popup action list
 -    PPOPUPDATA = ^TPOPUPDATA;
 -    TPOPUPDATA = record
 -        lchContact: HCONTACT;
 -        lchIcon: THandle;
 -        lpszContactName: array[0..MAX_CONTACTNAME-1] of Char;
 -        lpszText: array[0..MAX_SECONDLINE-1] of Char;
 -        colorBack: COLORREF;
 -        colorForeText: COLORREF;
 -        PluginWindowProc: Pointer;      // must be a window procedure using stdcall
 -        PluginData: Pointer;
 -    end;
 +wParam = (WPARAM)(LPPOPUPACTION)actions
 +lParam = (LPARAM)actionCount
 +
 +Returns: 0 if the popup was shown, -1 in case of failure.
 +}
 +  MS_POPUP_REGISTERACTIONS:PAnsiChar = 'PopUp/RegisterActions';
 +
 +//------------- Class API ----------------//
  type
 +  TPOPUPCLASS = record
 +    cbSize          :int;
 +    flags           :int;
 +    pszName         :pAnsiChar;
 +    szDescription   :TChar;
 +    hIcon           :HICON;
 +    colorBack       :TCOLORREF;
 +    colorText       :TCOLORREF;
 +    PluginWindowProc:pointer;
 +    iSeconds        :int;
 +  end;
 +  POPUPCLASS = TPOPUPCLASS;
 +
 +const
 +  PCF_UNICODE = $0001;
 -    // for info on what this stuff is, see m_popup.h
 -
 -    PPOPUPDATAEX = ^TPOPUPDATAEX;
 -    TPOPUPDATAEX = record
 -        lchContact: HCONTACT;
 -        lchIcon: THandle;
 -        lpszContactName: array[0..MAX_CONTACTNAME-1] of Char;
 -        lpszText: array[0..MAX_SECONDLINE-1] of Char;
 -        colorBack: COLORREF;
 -        colorForeText: COLORREF;
 -        PluginWindowProc: Pointer;      // must be a window procedure using stdcall
 -        PluginData: Pointer;
 -        iSeconds: int;      //Custom delay time in seconds. -1 means "forever", 0 means "default time".
 -        cZero: array[0..15] of Char;      //16 unused bytes which may come useful in the future.
 -    end;
 +// wParam = 0
 +// lParam = (POPUPCLASS *)&pc
 +  MS_POPUP_REGISTERCLASS = 'PopUp/RegisterClass';
 +
 +type
 +  TPOPUPDATACLASS = record
 +	  cbSize      :int;
 +  	pszClassName:pAnsiChar;
 +		szTitle     :TChar;
 +		szText      :TChar;
 +	  PluginData  :pointer;
 +	  hContact    :THANDLE;
 +  end;
 +  POPUPDATACLASS = TPOPUPDATACLASS;
  const
 +// wParam = 0
 +// lParam = (POPUPDATACLASS *)&pdc
 +  MS_POPUP_ADDPOPUPCLASS = 'PopUp/AddPopupClass';
 -(*
 -    Creates, adds and shows a popup, given a (valid) POPUPDATA structure pointer.
 -    wParam = (WPARAM)(*POPUPDATA)PopUpDataAddress
 -    lParam = 0
 -    Returns: > 0 on success, 0 if creation went bad, -1 if the PopUpData contained unacceptable values.
 -    NOTE: it returns -1 if the PopUpData was not valid, if there were already too many popups, if the module was disabled.
 -    Otherwise, it can return anything else...
 -*)
 +(* OLD
 +{
 +  Each skinned popup (e.g. with colorBack == POPUP_USE_SKINNED_BG) should have
 +  class set. Then you can choose separate skin for each class (for example, you
 +  can create separate class for your plugin and use it for all ypu popups. User
 +  would became able to choose skin for your popups independently from others)
 -    MS_POPUP_ADDPOPUP = 'PopUp/AddPopUp';
 +  You have to register popup class before using it. To do so call
 +  "PopUp/AddClass" with lParam = (LPARAM)(const AnsiChar * )popUpClassName.
 -(*
 -    The same, but with a POPUPDATAEX structure pointer.
 -    wParam = (WPARAM)(*POPUPDATAEX)PopUpDataExAddress
 -    lParam = 0
 -*)
 +  All class names are translated (via Translate()) before being added to list.
 +  You should use english names for them.
 -    MS_POPUP_ADDPOPUPEX = 'PopUp/AddPopUpEx';
 -
 -(*
 -    Returns the handle to the contact associated to the specified PopUpWindow.
 -    You will probably need to know this handle inside your WNDPROC. Exampole: you want to open the MessageWindow. :-)
 -    Call MS_POPUP_GETCONTACT on the hWnd you were given in the WNDPROC.
 -    wParam = (WPARAM)(HWND)hPopUpWindow
 -    lParam = 0;
 -    Returns: the HANDLE of the contact. Can return NULL, meaning it's the main contact. -1 means failure.
 -*)  
 -
 -    MS_POPUP_GETCONTACT = 'PopUp/GetContact';
 -    
 -(*
 -    wParam = hPopUpWindow
 -    lParam = PluginDataAddress;
 -    Returns: the address of the PLUGINDATA structure. Can return NULL, meaning nothing was given. -1 means failure.
 -    IMPORTANT NOTE: it doesn't seem to work if you do:
 -    CallService(..., (LPARAM)aPointerToAStruct);
 -    and then use that struct.
 -    Do this, instead:
 -    aPointerToStruct = CallService(..., (LPARAM)aPointerToAStruct);
 -    and it will work. Just look at the example I've written above (PopUpDlgProc).
 -*)
 -    MS_POPUP_GETPLUGINDATA = 'PopUp/GetPluginData';
 -    
 -(*
 -    wParam = 0
 -    lParam = 0
 -    Returns: 0 if the user has chosen not to have the second line, 1 if he choose to have the second line.
 -*)
 -    MS_POPUP_ISSECONDLINESHOWN = 'PopUp/IsSecondLineShown';
 -    
 -(*
 -    UM_FREEPLUGINDATA
 -    wParam = lParam = 0. Process this message if you have allocated your own memory. (i.e.: POPUPDATA.PluginData != NULL)
 -*)
 -    UM_FREEPLUGINDATA        = ((*WM_USER*)$400 + $200);
 -    
 -(*
 -    UM_DESTROYPOPUP
 -    wParam = lParam = 0. Send this message when you want to destroy the popup, or use the function below.
 -*)
 -    UM_DESTROYPOPUP          = ((*WM_USER*)$400 + $201);
 -
 -(*
 -    UM_INITPOPUP
 -    wParam = (WPARAM)(HWND)hPopUpWindow (but this is useless, since I'll directly send it to your hPopUpWindow
 -    lParam = 0.
 -    This message is sent to the PopUp when its creation has been finished, so POPUPDATA (and thus your PluginData) is reachable.
 -    Catch it if you needed to catch WM_CREATE or WM_INITDIALOG, which you'll never ever get in your entire popup-life.
 -    Return value: if you process this message, return 0. If you don't process it, return 0. Do whatever you like ;-)
 -*)
 -    UM_INITPOPUP            = ($400(*WM_USER*) + $202);
 +  There are three predefined classes and one for backward compatability.
 -(*
 -    wParam = hPopUpWindow
 -    lParam = lpzNewText
 -    returns: > 0 for success, -1 for failure, 0 if the failure is due to second line not being shown. (but you could call PUIsSecondLineShown() before changing the text...)
 -    Changes the text displayed in the second line of the popup.
 -*)
 -    MS_POPUP_CHANGETEXT         = 'PopUp/Changetext';
 +  Note that you can add clases after popup wal loaded, e.g. you shoul intercept
 +  ME_SYSTEM_MODULESLOADED event
 +}
 +  MS_POPUP_ADDCLASS = 'PopUp/AddClass';
 +
 +  POPUP_CLASS_DEFAULT = 'Default';
 +  POPUP_CLASS_WARNING = 'Warning';
 +  POPUP_CLASS_NOTIFY  = 'Notify';
 +  POPUP_CLASS_OLDAPI  = 'PopUp 1.0.1.x compatability'; // for internal purposes
 +
 +const
 +  NFOPT_POPUP2_BACKCOLOR    = 'Popup2/BackColor';
 +  NFOPT_POPUP2_TEXTCOLOR    = 'Popup2/TextColor';
 +  NFOPT_POPUP2_TIMEOUT      = 'Popup2/Timeout';
 +  NFOPT_POPUP2_LCLICKSVC    = 'Popup2/LClickSvc';
 +  NFOPT_POPUP2_LCLICKCOOKIE = 'Popup2/LClickCookie';
 +  NFOPT_POPUP2_RCLICKSVC    = 'Popup2/RClickSvc';
 +  NFOPT_POPUP2_RCLICKCOOKIE = 'Popup2/RClickCookie';
 +  NFOPT_POPUP2_STATUSMODE   = 'Popup2/StatusMode';
 +  NFOPT_POPUP2_PLUGINDATA   = 'Popup2/PluginData';
 +  NFOPT_POPUP2_WNDPROC      = 'Popup2/WndProc';
 +
 +  NFOPT_POPUP2_BACKCOLOR_S  = 'Popup2/BackColor/Save';
 +  NFOPT_POPUP2_TEXTCOLOR_S  = 'Popup2/TextColor/Save';
 +  NFOPT_POPUP2_TIMEOUT_S    = 'Popup2/Timeout/Save';
 -(*
 -    This is mainly for developers.
 -    Shows a warning message in a PopUp. It's useful if you need a "MessageBox" like function, but you don't want a modal window (which will interfere with a DialogProcedure. MessageBox steals focus and control, this one not.
 -    wParam = lpzMessage
 -    lParam = 0;  Returns: 0 if the popup was shown, -1 in case of failure.
 +  MS_POPUP2_SHOW   = 'Popup2/Show';
 +  MS_POPUP2_UPDATE = 'Popup2/Update';
 +  MS_POPUP2_REMOVE = 'Popup2/Remove';
  *)
 -    MS_POPUP_SHOWMESSAGE        = 'PopUp/ShowMessage';
 -    
 -
 -    (* helper functions, will be inlined on FPC if you have the swithces enabled *)
 -    
 -    function PUAddPopup(ppdp: PPOPUPDATA): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := CallService(MS_POPUP_ADDPOPUP, WPARAM(ppdp), 0);
 -    end;
 -    
 -    function PUGetContact(hPopUpWindow: THandle): THandle;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := CallService(MS_POPUP_GETCONTACT, WPARAM(hPopUpWindow), 0);
 -    end;
 -
 -    function PUGetPluginData(hPopUpWindow: THandle): Pointer;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    var
 -        dummy: pointer;
 -    begin
 -        dummy := nil;
 -        Int(Result) := CallService(MS_POPUP_GETPLUGINDATA, WPARAM(hPopUpWindow), LPARAM(dummy));
 -    end;
 -
 -    function PUIsSecondLineShown: BOOL;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Int(Result) := CallService(MS_POPUP_ISSECONDLINESHOWN, 0, 0);
 -    end;
 -
 -    function PUDeletePopUp(hWndPopUp: THandle): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := SendMessage(hWndPopUp, UM_DESTROYPOPUP, 0, 0);
 -    end;
 -    
 -    function PUChangeText(hWndPopUp: THandle; lpzNewText: PChar): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := CallService(MS_POPUP_CHANGETEXT, WPARAM(hWndPopUp), LPARAM(lpzNewText));
 -    end;
 -    
 -    function PUShowMessage(lpzText: PChar; kind: Byte): int;
 -    {$ifdef FPC}
 -    inline;
 -    {$endif}
 -    begin
 -        Result := CallService(MS_POPUP_SHOWMESSAGE, WPARAM(lpzText), LPARAM(kind));
 -    end;
 -
 -{$endif}
 +///////////////////////////////////////////////////////////////
 +// Few notes about new popup api
 +// ------------------------------
 +// When you call any ADD service, Popup Plus creates local
 +// copy of POPUPDATA2 to store the data. Each time you call
 +// CHANGE service this data is updated. You can use the
 +// MS_POPUP_GETDATA2 service to retrieve Popups's copy of
 +// this data, however you MUST NOT chahge that.
 +
 +// unicode or ansi mode
 +const
 +  PU2_ANSI         = 00;
 +  PU2_UNICODE      = 01;
 +  PU2_CUSTOM_POPUP = 02;
 +
 +type
 +  PPOPUPDATA2 = ^TPOPUPDATA2;
 +  TPOPUPDATA2 = record
 +  // general
 +    cbSize:int;
 +    flags:dword;
 +
 +  // miranda bindings
 +    lchContact:THANDLE;
 +    lchEvent  :THANDLE;
 +
 +  // style
 +    colorBack:TCOLORREF;
 +    colorText:TCOLORREF;
 +    lchIcon:HICON;
 +    hbmAvatar:HBITMAP;
 +    pzTitle:TCHAR;
 +    pzText:TCHAR;
 +    lpzSkin:PAnsiChar;
 +
 +  // time and timeout
 +    iSeconds:int;
 +    dwTimestamp:dword;
 +
 +  // plugin bindings
 +    PluginWindowProc:TWNDPROC;
 +    PluginData:pointer;
 +
 +  // popup actions
 +    actionCount:int;
 +    lpActions:PPOPUPACTION; // Ansi or unicode
 +    lchNotification:THANDLE;
 +  end;
 +
 +const
 +// Creates new popup
 +//    wParam = (WPARAM)(LPPOPUPDATA2)&ppd2
 +//    lParam = (LPARAM)(combination of APF_* flags)
 +//    returns: window handle (if requested) of NULL on success, -1 on failure.
 +  MS_POPUP_ADDPOPUP2:PAnsiChar = 'Popup/AddPopup2';
 +
 +// Update an popup
 +//    wParam = (WPARAM)(HWND)hwndPopup
 +//    lParam = (LPARAM)(LPPOPUPDATA2)&ppd2
 +//    returns: zero on success, -1 on failure.
 +  MS_POPUP_CHANGEPOPUP2:PAnsiChar = 'Popup/ChangePopup2';
 +{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_proto_listeningto.inc b/include/delphi/m_proto_listeningto.inc index 6a48aed325..6a48aed325 100644 --- a/plugins/Pascal_Headers/m_proto_listeningto.inc +++ b/include/delphi/m_proto_listeningto.inc diff --git a/include/delphi/m_protocols.inc b/include/delphi/m_protocols.inc index f198d40a8b..426268744c 100644 --- a/include/delphi/m_protocols.inc +++ b/include/delphi/m_protocols.inc @@ -1,180 +1,426 @@ -(*
 +{
 +  Miranda IM: the free IM client for Microsoft  Windows
 -Miranda IM: the free IM client for Microsoft* Windows*
 +  Copyright 2000-2003 Miranda ICQ/IM project,
 +  all portions of this codebase are copyrighted to the people
 +  listed in contributors.txt.
 -Copyright 2000-2003 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 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.
 -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.
 +}
 +// this module was created in v0.1.1.0
 +{$IFNDEF M_PROTOCOLS}
 +{$DEFINE M_PROTOCOLS}
 -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.
 +{$include statusmodes.inc}
 -*)
 +//send a general request through the protocol chain for a contact
 +//wParam=0
 +//lParam=(LPARAM)(CCSDATA*)&ccs
 +//returns the value as documented in the PS_ definition (m_protosvc.h)
 +type
 +  PCCSDATA = ^TCCSDATA;
 +  TCCSDATA = record
 +    hContact      : THANDLE;
 +    szProtoService: PAnsiChar;      // a PS_* constant
 +    wParam        : WPARAM;
 +    lParam        : LPARAM;
 +  end;
 -{$IFNDEF M_PROTOCOLS}
 -{$DEFINE M_PROTOCOLS}
 +const
 +  MS_PROTO_CALLCONTACTSERVICE:PAnsiChar = 'Proto/CallContactService';
 +
 +//a general network 'ack'
 +//wParam=0
 +//lParam=(LPARAM)(ACKDATA*)&ack
 +//Note that just because definitions are here doesn't mean they will be sent.
 +//Read the documentation for the function you are calling to see what replies
 +//you will receive.
 +type
 +  PACKDATA = ^TACKDATA;
 +  TACKDATA = record
 +    cbSize  : int;
 +    szModule: PAnsiChar;   // the name of the protocol module which initiated this ack
 +    hContact: THANDLE;
 +    _type   : int;     // an ACKTYPE_* constant
 +    _result : int;     // an ACKRESULT_* constant
 +    hProcess: THANDLE; // caller defined seq, I mean process code
 +    lParam  : LPARAM;  // caller defined data
 +  end;
 +
 +const
 +  ACKTYPE_MESSAGE   = 0;
 +  ACKTYPE_URL       = 1;
 +  ACKTYPE_FILE      = 2;
 +  ACKTYPE_CHAT      = 3;
 +  ACKTYPE_AWAYMSG   = 4;
 +  ACKTYPE_AUTHREQ   = 5;
 +  ACKTYPE_ADDED     = 6;
 +  ACKTYPE_GETINFO   = 7;
 +  ACKTYPE_SETINFO   = 8;
 +  ACKTYPE_LOGIN     = 9;
 +  ACKTYPE_SEARCH    = 10;
 +  ACKTYPE_NEWUSER   = 11;
 +  ACKTYPE_STATUS    = 12;
 +  ACKTYPE_CONTACTS  = 13; // send/recv of contacts
 +  ACKTYPE_AVATAR    = 14; // send/recv of avatars from a protocol
 +  ACKTYPE_EMAIL     = 15; // notify if the unread emails changed
 +
 +  ACKRESULT_SUCCESS = 0;
 +  ACKRESULT_FAILED  = 1;
 +
 +// 'in progress' result codes:
 +  ACKRESULT_CONNECTING   = 100;
 +  ACKRESULT_CONNECTED    = 101;
 +  ACKRESULT_INITIALISING = 102;
 +  ACKRESULT_SENTREQUEST  = 103; // waiting for reply...
 +  ACKRESULT_DATA         = 104; // blob of file data sent/recved, or search result
 +  ACKRESULT_NEXTFILE     = 105; // file transfer went to next file
 +  ACKRESULT_FILERESUME   = 106; // a file is about to be received, see PS_FILERESUME
 +  ACKRESULT_DENIED       = 107; // a file send has been denied
 +  ACKRESULT_STATUS       = 108; // an ack or a series of acks to do with a task
 +                                // have a status change
 +  ACKRESULT_LISTENING    = 109; // waiting for connection
 +  ACKRESULT_CONNECTPROXY = 110; // connecting to file proxy
 +  ACKRESULT_SEARCHRESULT = 111; // result of extended search
 +const
 +  ME_PROTO_ACK:PAnsiChar = 'Proto/Ack';
 +
 +{ v0.3.2+: When result is ACKRESULT_FAILED or ACKRESULT_DENIED, lParam can point to }
 +{ a human readable string with an explanation. For example: "The message was too }
 +{ long to be delivered". If no error message is specified, lParam must be NULL. }
 +{ Right now only explanations from ACKTYPE_MESSAGE is shown. }
 +{when type==ACKTYPE_FILE && (result==ACKRESULT_DATA || result==ACKRESULT_FILERESUME), }
 +{lParam points to this }
 +const
 +  PFTS_RECEIVING = 0;
 +  PFTS_SENDING   = 1;
 +  PFTS_UNICODE   = 2;
 +  PFTS_UTF       = 4;
 +{
 +type
 +  PFNAMECHAR = ^FNAMECHAR;
 +//#if MIRANDA_VER >= 0x0900
 +  FNAMECHAR = TCHAR;
 +//#else
 +//  FNAMECHAR = AnsiChar;
 +//#endif
 +  TFNAMECHAR = FNAMECHAR;
 +}
 +type
 +  // especially for Miranda 9.0+
 +  PPROTOFILETRANSFERSTATUS = ^TPROTOFILETRANSFERSTATUS;
 +  TPROTOFILETRANSFERSTATUS = record
 +    cbSize             : size_t;
 +    hContact           : THANDLE;
 +    flags              : dword;     // one of PFTS_* constants
 +    files              : ^TCHAR;
 +    totalFiles         : int;
 +    currentFileNumber  : int;
 +    totalBytes         : uint64;
 +    totalProgress      : uint64;
 +    workingDir         : TCHAR;
 +    currentFile        : TCHAR;
 +    currentFileSize    : uint64;
 +    currentFileProgress: uint64;
 +    currentFileTime    : uint64;   // as seconds since 1970
 +  end;
 +
 +{ Enumerate the currently running protocols
 +  wParam=(WPARAM)(int*)&numberOfProtocols
 +  lParam=(LPARAM)(PROTOCOLDESCRIPTOR***)&ppProtocolDescriptors
 +  Returns 0 on success, nonzero on failure
 +  Neither wParam nor lParam may be NULL
 +  The list returned by this service is the protocol modules currently installed
 +  and running. It is not the complete list of all protocols that have ever been
 +  installed.
 +  IMPORTANT NOTE #1: the list returned is not static, it may be changed in the
 +  program's lifetime. Do not use this list in the global context, copy protocols
 +  names otherwise.
 +  IMPORTANT NOTE #2: in version 0.8 this service is mapped to the MS_PROTO_ENUMACCOUNTS
 +  service to provide the compatibility with old plugins (first three members of 
 +  PROTOACCOUNT are equal to the old PROTOCOLDESCRIPTOR format). If you declare the
 +  MIRANDA_VER macro with value greater or equal to 0x800, use MS_PROTO_ENUMPROTOS
 +  service instead to obtain the list of running protocols instead of accounts.
 +  Note that a protocol module need not be an interface to an Internet server,
 +  they can be encryption and loads of other things, too.
 +  And yes, before you ask, that is triple indirection. Deal with it.
 +  Access members using ppProtocolDescriptors[index]->element }
 +type
 +  pfnInitProto = function(const szModuleName:PAnsiChar;const szUserName:TCHAR):PPROTO_INTERFACE; cdecl;
 +
 +// deallocates an account instance
 +  pfnUninitProto = function(pin:PPROTO_INTERFACE):int; cdecl;
 +
 +// removes an account from the database
 +  pfnDestroyProto = function(pin:PPROTO_INTERFACE):int; cdecl;
 +
 +type
 +  PPROTOCOLDESCRIPTOR = ^TPROTOCOLDESCRIPTOR;
 +  TPROTOCOLDESCRIPTOR = record
 +    cbSize : size_t;
 +    szName : PAnsiChar; // unique name of the module
 +    _type  : int;   // module type, see PROTOTYPE_ constants
 +  // 0.8.0+ additions
 +    fnInit   :pfnInitProto;    // initializes an empty account
 +    fnUninit :pfnUninitProto;  // deallocates an account instance
 +    fnDestroy:pfnDestroyProto; // removes an account
 +  end;
 +
 +const
 +  PROTOCOLDESCRIPTOR_V3_SIZE = SizeOf(int_ptr)+SizeOf(PAnsiChar)+SizeOf(size_t);
 +
 +{ v0.3.3+:
 +  For recv, it will go from lower to higher, so in this case:
 +  check ignore, decrypt (encryption), translate
 +  For send, it will go translate, encrypt, ignore(??), send
 +  The DB will store higher numbers here, LOWER in the protocol chain, and lower numbers
 +  here HIGHER in the protocol chain }
 +const
 +  PROTOTYPE_IGNORE      = 50;    // added during v0.3.3
 +  PROTOTYPE_PROTOCOL    = 1000;
 +  PROTOTYPE_ENCRYPTION  = 2000;
 +  PROTOTYPE_FILTER      = 3000;
 +  PROTOTYPE_TRANSLATION = 4000;
 +  PROTOTYPE_OTHER       = 10000; // avoid using this if at all possible
 +  PROTOTYPE_DISPROTO    = 20000;
 +
 +{ determines if a protocol module is loaded or not
 +  wParam=0
 +  lParam=(LPARAM)(const AnsiChar*)szName
 +  Returns a pointer to the PROTOCOLDESCRIPTOR if the protocol is loaded, or
 +  NULL if it isn't.
 +}
 +  MS_PROTO_ISPROTOCOLLOADED:PAnsiChar = 'Proto/IsProtocolLoaded';
 +
 +{ gets the network-level protocol associated with a contact
 +  wParam=(WPARAM)(HANDLE)hContact
 +  lParam=0
 +  Returns a AnsiChar* pointing to the asciiz name of the protocol or NULL if the
 +  contact has no protocol. There is no need to free() it or anything.
 +  This is the name of the module that actually accesses the network for that
 +  contact. }
 +  MS_PROTO_GETCONTACTBASEPROTO = 'Proto/GetContactBaseProto';
 +
 +{ determines whether the specified contact has the given protocol in its chain
 +  wParam=(WPARAM)(HANDLE)hContact
 +  lParam=(LPARAM)(const AnsiChar*)szName
 +  Returns -1 if it is base protocol, positive number if it is filter and 0 if it doesn't }
 +  MS_PROTO_ISPROTOONCONTACT:PAnsiChar = 'Proto/IsProtoOnContact';
 +
 +const
 +  PROTOTYPE_SELFTYPING_OFF = 0;
 +  PROTOTYPE_SELFTYPING_ON  = 1;
 +{ This service is for notifying protocols that the user is typing a message v0.3.3+
 +  in a message dialog.
 +  This is typically sent by a message dialog when a user in the clist is typing.
 +  wParam=(WPARAM)(HANDLE)hContact
 +  lParam=(LPARAM)(int)typing state
 +  NOTE: Only protocols should generally call this service }
 +  MS_PROTO_SELFISTYPING:PAnsiChar = 'Proto/SelfIsTyping';
  const
 +  PROTOTYPE_CONTACTTYPING_OFF      = 0;
 +  PROTOTYPE_CONTACTTYPING_INFINITE = $7FFFFFFF;
 +{ This service is for notifying message dialogs/other plugins of a user typing. v0.3.3+
 +  This is typically sent by a protocol when a user in the clist is typing.
 +  wParam=(WPARAM)(HANDLE)hContact
 +  lParam=(LPARAM)(int)time (secs)
 +  NOTE: The time in seconds is used to tell a message dialog (or other plugin)
 +  how long to display its notification.  If time is 0, then notification
 +  of typing ends.
 +  NOTE: Only protocols should generally call this service }
 +  MS_PROTO_CONTACTISTYPING:PAnsiChar = 'Proto/ContactIsTyping';
 +
 +{ This hook notifies when a user is typing.  If a message dialog supports sending v0.3.3+
 +  typing notifications it should hook this event and fire the
 +  ProtoService PSS_USERISTYPING to the contacts protocol *after* verifying
 +  that the hContact is not NULL and the the user wishes to send notifications
 +  to this user (checked visibility, individual typing blocking, etc).
 +  wParam=(WPARAM)(HANDLE)hContact
 +  lParam=(LPARAM)(int)typing state }
 +  ME_PROTO_CONTACTISTYPING:PAnsiChar = 'Proto/ContactIsTypingEvent';
 -    ACKTYPE_MESSAGE             = 0;
 -    ACKTYPE_URL                 = 1;
 -    ACKTYPE_FILE                = 2;
 -    ACKTYPE_CHAT                = 3;
 -    ACKTYPE_AWAYMSG             = 4;
 -    ACKTYPE_AUTHREQ             = 5;
 -    ACKTYPE_ADDED               = 6;
 -    ACKTYPE_GETINFO             = 7;
 -    ACKTYPE_SETINFO             = 8;
 -    ACKTYPE_LOGIN               = 9;
 -    ACKTYPE_SEARCH              = 10;
 -    ACKTYPE_NEWUSER             = 11;
 -    ACKTYPE_STATUS              = 12;
 -    ACKTYPE_CONTACTS            = 13;   //send/recv of contacts
 -
 -    ACKRESULT_SUCCESS           = 0;
 -    ACKRESULT_FAILED            = 1;
 -    //'in progress' result codes:
 -    ACKRESULT_CONNECTING        = 100;
 -    ACKRESULT_CONNECTED         = 101;
 -    ACKRESULT_INITIALISING      = 102;
 -    ACKRESULT_SENTREQUEST       = 103;  // waiting for reply...
 -    ACKRESULT_DATA              = 104;  // blob of file data sent/recved, or search result
 -    ACKRESULT_NEXTFILE          = 105;  // file transfer went to next file
 -    ACKRESULT_FILERESUME        = 106;  // a file is about to be received, see PS_FILERESUME
 -    ACKRESULT_DENIED            = 107;  // a file send has been denied (0.3a + only)
 -
 -    // for PROTOCOLDESCRIPTOR.type
 -
 -    PROTOTYPE_PROTOCOL          = 1000;
 -    PROTOTYPE_ENCRYPTION        = 2000;
 -    PROTOTYPE_FILTER            = 3000;
 -    PROTOTYPE_TRANSLATION       = 4000;
 -    PROTOTYPE_OTHER             = 10000;//avoid using this if at all possible
 +// -------------- accounts support --------------------- 0.8.0+ 
  type
 +  PPROTOACCOUNT = ^TPROTOACCOUNT;
 +  TPROTOACCOUNT = record
 +    cbSize          :int;              // sizeof this structure
 +    szModuleName    :PAnsiChar;        // unique physical account name (matches database module name)
 +    _type           :int;              // always equal to PROTOTYPE_PROTOCOL
 +    tszAccountName  :TChar;            // user-defined account name
 +    szProtoName     :PAnsiChar;        // physical protocol name
 +    bIsEnabled      :int;              // is account enabled?
 +    bIsVisible      :int;              // is account visible?
 +    iOrder          :int;              // account order in various menus & lists
 +    bOldProto       :bool;             // old-styled account (one instance per dll)
 +    ppro            :PPROTO_INTERFACE; // pointer to the underlying object
 -    PCCSDATA = ^TCCSDATA;
 -    TCCSDATA = record
 -        hContact: THandle;
 -        szProtoService: PChar;      // a PS_* constant
 -        wParam: WPARAM;
 -        lParam: LPARAM;
 -    end;
 -
 -    PACKDATA = ^TACKDATA;
 -    TACKDATA = record
 -        cbSize: int;
 -        szModule: PChar;        // the name of the protocol module which initiated this ack
 -        hContact: THandle;
 -        type_: int;             // an ACKTYPE_* constant
 -        result_: int;           // an ACKRESULT_* constant
 -        hProcess: THandle;      // caller defined seq, I mean process code
 -        lParam: LPARAM;         // caller defined data
 -    end;
 -
 -    // when type=ACKTYPE_FILE and (result=ACKRESULT_DATA or result=ACKRESULT_FILERESUME)
 -
 -    PPROTOFILETRANSFERSTATUS = ^TPROTOFILETRANSFERSTATUS;
 -    TPROTOFILETRANSFERSTATUS = record
 -        cbSize: int;
 -        hContact: THandle;
 -        sending: int;               // true if sending, false if receiving
 -        files: PChar;               // pointer to an array of pchar's
 -        totalFiles: int;
 -        currentFileNumber: int;
 -        totalBytes: LongInt;
 -        totalProgress: LongInt;
 -        workingDir: PChar;
 -        currentFile: PChar;
 -        currentFileSize: LongInt;
 -        currentFileProgress: LongInt;
 -        currentFileTime: LongInt;   // UNIX time
 -    end;
 -
 -    // for registering a protocol, enumeration
 -
 -    PPROTOCOLDESCRIPTOR = ^TPROTOCOLDESCRIPTOR;
 -    TPROTOCOLDESCRIPTOR = record
 -        cbSize: int;
 -        szName: PChar;  // unique name of module
 -        type_: int;     // a PROTOTYPE_* constant
 -    end;
 +    hwndAccMgrUI    :HWND;
 +    bAccMgrUIChanged:Bool;
 +	  bDynDisabled    :Bool;             // dynamic disable flag, is never written to db
 +  end;
 +  tagACCOUNT = TPROTOACCOUNT;
  const
 +//account enumeration service
 +//wParam=(WPARAM)(int)piNumAccounts
 +//lParam=(LPARAM)(PROTOACCOUNT**)paAccounts
 +  MS_PROTO_ENUMACCOUNTS:PAnsiChar = 'Proto/EnumAccounts';
 +
 +  MS_PROTO_ENUMPROTOS   :PAnsiChar = 'Proto/EnumProtos';   // MIRANDA_VER >= $800
 +  MS_PROTO_ENUMPROTOCOLS:PAnsiChar = 'Proto/EnumProtocols';// MIRANDA_VER < $800
 +
 +(*
 +__inline int ProtoEnumAccounts( int* accNumber, PROTOACCOUNT*** accArray )
 +{  return CallService( MS_PROTO_ENUMACCOUNTS, ( WPARAM )accNumber, (LPARAM)accArray );
 +}
 +*)
 +//retrieves an account's interface by its physical name (database module)
 +//wParam=0
 +//lParam=(LPARAM)(AnsiChar*)szAccountName
 +//return value = PROTOACCOUNT* or NULL
 +  MS_PROTO_GETACCOUNT:PAnsiChar = 'Proto/GetAccount';
 +(*
 +__inline PROTOACCOUNT* ProtoGetAccount( const AnsiChar* accName )
 +{  return (PROTOACCOUNT* )CallService( MS_PROTO_GETACCOUNT, 0, (LPARAM)accName );
 +}
 +*)
 +
 +//this event is fired when the accounts list gets changed
 +//wParam = event type (1 - added, 2 - changed, 3 - deleted, 5 - enabled/disabled)
 +//lParam = (LPARAM)(PROTOACCOUNT*) - account being changed
 +
 +  PRAC_ADDED    = 1;
 +  PRAC_CHANGED  = 2;
 +  PRAC_REMOVED  = 3;
 +  PRAC_UPGRADED = 4;
 +  PRAC_CHECKED  = 5;
 +//  PRAC_CONVERT  = 6;
 +
 +  ME_PROTO_ACCLISTCHANGED:PAnsiChar = 'Proto/AccListChanged';
 +{
 +
 +  displays the Account Manager
 +  wParam=0
 +  lParam=0
 +}
 +  MS_PROTO_SHOWACCMGR:PAnsiChar = 'Protos/ShowAccountManager';
 +
 +{
 +  determines if an account is enabled or not
 +  wParam = 0
 +  lParam = PPROTOACCOUNT
 +  Returns 1 if an account is valid and enabled, 0 otherwise
 +}
 +  MS_PROTO_ISACCOUNTENABLED:PAnsiChar = 'Proto/IsAccountEnabled';
 +
 +{
 +  determines if an account is locked or not
 +  wParam = 0
 +  lParam = PAnsiChar szAccountName
 +  Returns 1 if an account is locked and not supposed to change status, 0 otherwise
 +}
 +  MS_PROTO_ISACCOUNTLOCKED:PAnsiChar = 'Proto/IsAccountLocked';
 +
 +{
 +  gets the account associated with a contact
 +  wParam=(WPARAM)(HANDLE)hContact
 +  lParam=0
 +  Returns a pAnsiChar pointing to the asciiz name of the protocol or NULL if the
 +  contact has no protocol. There is no need to mir_free() it or anything.
 +  This is the name of the module that actually accesses the network for that contact.
 +}
 +  MS_PROTO_GETCONTACTBASEACCOUNT:PAnsiChar = 'Proto/GetContactBaseAccount';
 +
 +// -------------- avatar support ---------------------
 +{
 +  First a protocol must report it supports PF4_AVATARS via PS_GETCAPS, secondly
 +  it will return the following acks for certain events, the protocol must use
 +  ProtoBroadcastAck(), listeners must hook ME_PROTO_ACK, note that lParam = ACKDATA
 +}
 +{
 +  The following ACKs MUST be sent in order of .result via ProtoBroadcastAck()
 +
 +  .szModule = protocol module
 +  .hContact = contact the avatar is for, or 0 if its for the user
 +  .type = ACKTYPE_AVATAR
 +  .result = ACKRESULT_CONNECTING, ACKRESULT_CONNECTED, ACKRESULT_SENTREQUEST, ACKRESULT_DATA
 +  .hProcess = protocol specific
 +  .lParam = 0
 +
 +  Once the transfer is complete the following ACKs MUST be sent by the protocol
 +
 +  .result = ACKRESULT_SUCCESS or ACKRESULT_FAILED
 +  .hProcess = (HANDLE) &PROTO_AVATAR_INFORMATION
 +  .lParam = 0;
 +
 +  Anytime before or during the ack or series of acks ACKRESULT_STATUS maybe sent, this might
 +  be sent a long while before anything else happens (or after anything happening) For avatars
 +  it allows callers to identify status information to do with the avatar, including the time
 +  before background transport has been created, so that you know an avatar will be exchanged
 +  sometime in the future.
 +
 +  When ACKRESULT_STATUS, hProcess is the result code - the value of this is protocol dependent,
 +  See protocol documentation to do with avatars for what codes are defined and what they mean.
 +}
 +const
 +  PA_FORMAT_UNKNOWN = 0; // the protocol can not determine much about the "bitmap"
 +  PA_FORMAT_PNG     = 1; // the image is PNG
 +  PA_FORMAT_JPEG    = 2;
 +  PA_FORMAT_ICON    = 3;
 +  PA_FORMAT_BMP     = 4;
 +  PA_FORMAT_GIF     = 5;
 +  PA_FORMAT_SWF     = 6;
 +  PA_FORMAT_XML     = 7;
 +
 +type
 +  PPROTO_AVATAR_INFORMATIONW = ^TPROTO_AVATAR_INFORMATIONW;
 +  TPROTO_AVATAR_INFORMATIONW = record
 +    cbSize  : int;     // sizeof()
 +    hContact: THANDLE; // this might have to be set by the caller too
 +    format  : int;     // PA_FORMAT_*
 +    // full path to filename which contains the avatar
 +    filename: array[0..(MAX_PATH)-1] of WideChar;
 +  end;
 +
 +  PPROTO_AVATAR_INFORMATION = ^TPROTO_AVATAR_INFORMATION;
 +  TPROTO_AVATAR_INFORMATION = record
 +    cbSize  : int;     // sizeof()
 +    hContact: THANDLE; // this might have to be set by the caller too
 +    format  : int;     // PA_FORMAT_*
 +    // full path to filename which contains the avatar
 +    filename: array[0..(MAX_PATH)-1] of AnsiChar;
 +  end;
 +
 +const
 +  GAIF_FORCE    = 1; // force an update of the avatar if there is none
 +
 +  GAIR_SUCCESS  = 0; // information about the avatar has been returned
 +  GAIR_WAITFOR  = 1; // you must hook ME_PROTO_ACK and wait for replies about avatar status
 +  GAIR_NOAVATAR = 2; // sorry, this contact has no avatars
 +
 +{
 + wParam : GAIF_
 + lParam : (LPARAM) &PROTO_AVATAR_INFORMATION
 + Affect : Make a request to the protocol to return information about a hContact's avatar (or main user)
 +      it can return information, tell you there is none, or if forced start requesting an avatar.
 + Note:
 + Version: 0.3.4+ (2004/09/13)
 +}
 +  PS_GETAVATARINFO  = '/GetAvatarInformation';
 +  PS_GETAVATARINFOW = '/GetAvatarInformationW';
 -    {
 -        wParam : 0
 -        lParam : Pointer to an initalised CSSDATA structure
 -        Affect : Send a general request thru the protocol chain for a contact
 -        Return : the return value documented in the PS_* def (m_protosvc.inc)
 -    }
 -    MS_PROTO_CALLCONTACTSERVICE         = 'Proto/CallContactService';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to an initalised TACKDATA structure
 -        Affect : a general 'ack', see notes
 -        Notes  : Just because defs are here doesn't mean they will be sent
 -                 read the docs for the function you are calling to see what
 -                 replies you will get.
 -    }
 -    ME_PROTO_ACK                        = 'Proto/Ack';
 -
 -    {
 -        wParam : pointer to an int to store number of protocols
 -        lParam : Pointer to an an array of PPROTOCOLDESCRIPTOR pointers
 -        Affect : Enumerate the currently running protocols, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : Neither wParam/lParam maybe NULL(0), the list returned by
 -                 this service is the protocol modules currently installed
 -                 and running, it is not a complete list of protocols that have
 -                 ever been installed.
 -                 -
 -                 A protocol module does not have to be a protocol running thru
 -                 the internet, it can be a vast number of things
 -    }
 -    MS_PROTO_ENUMPROTOCOLS              = 'Proto/EnumProtocols';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to null terminated string containing protocol name
 -        Affect : Determines if a protocol is running or not.
 -        Returns: A pointer to the PPROTOCOLDESCRIPTOR if the protocol is loaded
 -                 or NULL(0) if it isn't
 -    }
 -    MS_PROTO_ISPROTOCOLLOADED           = 'Proto/IsProtocolLoaded';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : Pointer to a null terminated string containing a name
 -        Affect : Determine whether the given contact has the given protocol
 -                 in it's chain.
 -        Returns : 0 if the protocol isn't in the chain, [non zero] if it is
 -    }
 -    MS_PROTO_ISPROTOONCONTACT           = 'Proto/IsProtoOnContact';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affect : Gets the network-level protocol associated with a contact
 -        Returns: a PChar pointing to the ASCIIZ name of the protocol or NULL(0)
 -                 if the contact has no protocol, There's no need to dispsose
 -                 the returned string.
 -                 -
 -                 This is the name of the module that actually accesses the network
 -                 for that contact.
 -    }
 -    MS_PROTO_GETCONTACTBASEPROTO        = 'Proto/GetContactBaseProto';
 -
 -{$ENDIF}
\ No newline at end of file +{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_protoint.inc b/include/delphi/m_protoint.inc index 01a711ca9c..01a711ca9c 100644 --- a/plugins/Pascal_Headers/m_protoint.inc +++ b/include/delphi/m_protoint.inc diff --git a/include/delphi/m_protomod.inc b/include/delphi/m_protomod.inc index 3b790d42b7..deb4958358 100644 --- a/include/delphi/m_protomod.inc +++ b/include/delphi/m_protomod.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,87 +18,100 @@ 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_PROTOMOD}
  {$DEFINE M_PROTOMOD}
 -    {$ifndef M_PROTOCOLS}
 -        {$include m_protocols.inc}
 -    {$endif}
 + {$IFNDEF M_PROTOCOLS}
 +     {$INCLUDE m_protocols.inc}
 + {$ENDIF}
  const
 +  {
 +    wParam : 0
 +    lParam : Pointer to a initalised TPROTOCOLDESCRIPTOR structure
 +    Affect : Register a protocol module, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : This service MUST be called from your module's Load() function
 +             TPROTOCOLDESCRIPTOR.type can be a value other than PROTOTYPE_*
 +             which are used to provide a more precise positioning information
 +             for the contact protocol lists.
 +             -
 +             Relative values to the constants can be given, but this MUST NOT
 +             be done for PROTOTYPE_PROTOCOL.
 +  }
 +  MS_PROTO_REGISTERMODULE:PAnsiChar = 'Proto/RegisterModule';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : protocol_name_string
 +    Affect : Add the given protocol module to the chain for a contact, see notes
 +    Returns: 0 success, [non zero] on failure
 +    Notes  : The module is added to the correct positioning according to it's
 +             registered type.
 +  }
 +  MS_PROTO_ADDTOCONTACT:PAnsiChar = 'Proto/AddToContact';
 +
 +  {
 +    wParam : HCONTACT
 +    lParam : protocol_name_string
 +    Affect : Remove the given protocol name from the chain for the given contact
 +    Returns: 0 on success, [non zero] on failure
 +  }
 +  MS_PROTO_REMOVEFROMCONTACT:PAnsiChar = 'Proto/RemoveFromContact';
 +
 + { see m_globaldefs.pas for CreateProtoServiceFunction }
 +
 +  {
 +    wParam : wParam [arg]
 +    lParam : lParam [arg]
 +    Affect : Call the next service in the chain for the send operation, see notes
 +    Return : Return value should be returned by CallService(MS_PROTO_CHAINSEND,wParam,lParam)
 +    Notes  : wParam MUST remain untouched, lParam is a pointer to a CSSDATA structure
 +             and can be modified or copid if needed.
 +             wParam and lParam should be the values passed to your service,
 +             typically your service should return ASAP.
 +  }
 +  MS_PROTO_CHAINSEND:PAnsiChar = 'Proto/ChainSend';
 +
 +  {
 +    wParam : wParam [arg]
 +    lParam : lParam [arg]
 +    Affect : Call the next service in the chain in this receive operation, see notes
 +    Return : Return value should be returned by CallService(MS_PROTO_CHAINRECV,wParam,lParam)
 +    Notes  : wParam MUST remain untouched, lParam is a pointer to a CSSDATA structure
 +             and can be modified or copied if needed.
 +             wParam and lParam should be the values passed to your service,
 +             typically your service should return ASAP.
 +             -
 +             MS_PROTO_CHAINRECV is thread safe since 0.1.2.0 -- calls
 +             are translated to the main thread and passed from there.
 +  }
 +  MS_PROTO_CHAINRECV:PAnsiChar = 'Proto/ChainRecv';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to an initalised ACKDATA
 +    Affect : Broadcast a ME_PROTO_ACK event, see notes
 +    Returns: The return value of the NotifyEventHooks() call
 +    Notes  : ME_PROTO_ACK is completely thread safe since 01.2.0
 +             see notes in core/modules.h under NotifyEventHooks()
 +  }
 +  MS_PROTO_BROADCASTACK:PAnsiChar = 'Proto/BroadcastAck';
 +
 +// -- Added during 0.3.4 (2004/09/27) development! -----
 +{
 +  wParam: (HANDLE)hContact
 +  lParam: 0
 +  Affect: Given a hContact, return the protocol that is registered for it, or NULL if no such protocol exists,
 +      the returned string does not have to be freed and is valid even for multiple threads.
 +  Note:  Prior to 2004/09/28 this service WAS NOT THREAD SAFE and was slower
 +  Note:  Prior to 2004/09/28 this service would return NULL for a hContact if the protocol module
 +      associated with the hContact was not currently loaded, no such check is performed now.
 +  Version: 0.3.4 (2004/09/28)
 +}
 +const
 +  MS_PROTODIR_PROTOFROMCONTACT = MS_PROTO_GETCONTACTBASEPROTO;
 -    {
 -        wParam : 0
 -        lParam : Pointer to a initalised TPROTOCOLDESCRIPTOR structure
 -        Affect : Register a protocol module, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : This service MUST be called from your module's Load() function
 -                 TPROTOCOLDESCRIPTOR.type can be a value other than PROTOTYPE_*
 -                 which are used to provide a more precise positioning information
 -                 for the contact protocol lists.
 -                 -
 -                 Relative values to the constants can be given, but this MUST NOT
 -                 be done for PROTOTYPE_PROTOCOL.
 -    }
 -    MS_PROTO_REGISTERMODULE             = 'Proto/RegisterModule';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : protocol_name_string
 -        Affect : Add the given protocol module to the chain for a contact, see notes
 -        Returns: 0 success, [non zero] on failure
 -        Notes  : The module is added to the correct positioning according to it's
 -                 registered type.
 -    }
 -    MS_PROTO_ADDTOCONTACT               = 'Proto/AddToContact';
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : protocol_name_string
 -        Affect : Remove the given protocol name from the chain for the given contact
 -        Returns: 0 on success, [non zero] on failure
 -    }
 -    MS_PROTO_REMOVEFROMCONTACT          = 'Proto/RemoveFromContact';
 -
 -    { see m_globaldefs.pas for CreateProtoServiceFunction }
 -
 -    {
 -        wParam : wParam [arg]
 -        lParam : lParam [arg]
 -        Affect : Call the next service in the chain for the send operation, see notes
 -        Return : Return value should be returned by CallService(MS_PROTO_CHAINSEND,wParam,lParam)
 -        Notes  : wParam MUST remain untouched, lParam is a pointer to a CSSDATA structure
 -                 and can be modified or copid if needed.
 -                 wParam and lParam should be the values passed to your service,
 -                 typically your service should return ASAP.
 -    }
 -    MS_PROTO_CHAINSEND                  = 'Proto/ChainSend';
 -
 -    {
 -        wParam : wParam [arg]
 -        lParam : lParam [arg]
 -        Affect : Call the next service in the chain in this receive operation, see notes
 -        Return : Return value should be returned by CallService(MS_PROTO_CHAINRECV,wParam,lParam)
 -        Notes  : wParam MUST remain untouched, lParam is a pointer to a CSSDATA structure
 -                 and can be modified or copied if needed.
 -                 wParam and lParam should be the values passed to your service,
 -                 typically your service should return ASAP.
 -                 -
 -                 MS_PROTO_CHAINRECV is thread safe since 0.1.2.0 -- calls
 -                 are translated to the main thread and passed from there.
 -    }
 -    MS_PROTO_CHAINRECV                  = 'Proto/ChainRecv';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to an initalised ACKDATA
 -        Affect : Broadcast a ME_PROTO_ACK event, see notes
 -        Returns: The return value of the NotifyEventHooks() call
 -        Notes  : ME_PROTO_ACK is completely thread safe since 01.2.0
 -                 see notes in core/modules.h under NotifyEventHooks()
 -    }
 -    MS_PROTO_BROADCASTACK               = 'Proto/BroadcastAck';
  {$ENDIF}
 diff --git a/include/delphi/m_protosvc.inc b/include/delphi/m_protosvc.inc index e546d5775b..2076dbc8bc 100644 --- a/include/delphi/m_protosvc.inc +++ b/include/delphi/m_protosvc.inc @@ -1,8 +1,7 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
 -Copyright 2000-2003 Miranda ICQ/IM project,
 +Copyright 2000-2009 Miranda ICQ/IM project,
  all portions of this codebase are copyrighted to the people
  listed in contributors.txt.
 @@ -19,12 +18,30 @@ 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_PROTOSVC}
  {$DEFINE M_PROTOSVC}
 +{ *****  Unicode Services note   ********
 +******************************************
 +
 +Only new style protocols (Miranda 0.9+) with m_iVersion set to 2 or higher
 +support Unicode services documented below, all other support only ANSI. 
 +
 +For all other that do not support Unicode services, Miranda core will 
 +convert Unicode to ANSI and call the appropriate service.
 +}
 +
 +type
 +//  PFNAMECHAR = ^FNAMECHAR;
 +//#if MIRANDA_VER >= 0x0900
 +  FNAMECHAR = TCHAR;
 +//#else
 +//  FNAMECHAR = AnsiChar;
 +//#endif
 +  TFNAMECHAR = FNAMECHAR;
 +
  {<</
      none of these services should be used on there own (i.e. using CallService(), etc)
      hence the PS_ prefix, instead use the services exposed in m_protocols.inc
 @@ -45,716 +62,920 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  />>}
  const
 +  PFLAGNUM_1        = $1;
 +  PF1_IMSEND        = $00000001; // supports IM sending
 +  PF1_IMRECV        = $00000002; // supports IM receiving
 +  PF1_IM            = (PF1_IMSEND or PF1_IMRECV);
 +  PF1_URLSEND       = $00000004; // supports separate URL sending
 +  PF1_URLRECV       = $00000008; // supports separate URL receiving
 +  PF1_URL           = (PF1_URLSEND or PF1_URLRECV);
 +  PF1_FILESEND      = $00000010; // supports file sending
 +  PF1_FILERECV      = $00000020; // supports file receiving
 +  PF1_FILE          = (PF1_FILESEND or PF1_FILERECV);
 +  PF1_MODEMSGSEND   = $00000040; // supports broadcasting away messages
 +  PF1_MODEMSGRECV   = $00000080; // supports reading others' away messages
 +  PF1_MODEMSG       = (PF1_MODEMSGSEND or PF1_MODEMSGRECV);
 +  PF1_SERVERCLIST   = $00000100; // contact lists are stored on the server, not locally. See notes below
 +  PF1_AUTHREQ       = $00000200; // will get authorisation requests for some or all contacts
 +  PF1_ADDED         = $00000400; // will get 'you were added' notifications
 +  PF1_VISLIST       = $00000800; // has an invisible list
 +  PF1_INVISLIST     = $00001000; // has a visible list for when in invisible mode
 +  PF1_INDIVSTATUS   = $00002000; // supports setting different status modes to each contact
 +  PF1_EXTENSIBLE    = $00004000; // the protocol is extensible and supports plugin-defined messages
 +  PF1_PEER2PEER     = $00008000; // supports direct (not server mediated) communication between clients
 +  PF1_NEWUSER       = $00010000; // supports creation of new user IDs
 +  PF1_CHAT          = $00020000; // has a realtime chat capability
 +  PF1_INDIVMODEMSG  = $00040000; // supports replying to a mode message request with different text depending on the contact requesting
 +  PF1_BASICSEARCH   = $00080000; // supports a basic user searching facility
 +  PF1_EXTSEARCH     = $00100000; // supports one or more protocol-specific extended search schemes
 +  PF1_CANRENAMEFILE = $00200000; // supports renaming of incoming files as they are transferred
 +  PF1_FILERESUME    = $00400000; // can resume broken file transfers, see PS_FILERESUME below
 +  PF1_ADDSEARCHRES  = $00800000; // can add search results to the contact list
 +  PF1_CONTACTSEND   = $01000000; // can send contacts to other users
 +  PF1_CONTACTRECV   = $02000000; // can receive contacts from other users
 +  PF1_CONTACT       = (PF1_CONTACTSEND or PF1_CONTACTRECV);
 +  PF1_CHANGEINFO    = $04000000; // can change our user information stored on server
 +  PF1_SEARCHBYEMAIL = $08000000; // supports a search by e-mail feature
 +  PF1_USERIDISEMAIL = $10000000; // set if the uniquely identifying field of the network is the e-mail address
 +  PF1_SEARCHBYNAME  = $20000000; // supports searching by nick/first/last names
 +  PF1_EXTSEARCHUI   = $40000000; // has a dialog box to allow searching all the possible fields
 +  PF1_NUMERICUSERID = $80000000; // the unique user IDs for this protocol are numeric
 +
 +  PFLAGNUM_2     = 2;          // the status modes that the protocol supports
 +  PF2_ONLINE     = $00000001; // an unadorned online mode
 +  PF2_INVISIBLE  = $00000002;
 +  PF2_SHORTAWAY  = $00000004; // Away on ICQ, BRB on MSN
 +  PF2_LONGAWAY   = $00000008; // NA on ICQ, Away on MSN
 +  PF2_LIGHTDND   = $00000010; // Occupied on ICQ, Busy on MSN
 +  PF2_HEAVYDND   = $00000020; // DND on ICQ
 +  PF2_FREECHAT   = $00000040;
 +  PF2_OUTTOLUNCH = $00000080;
 +  PF2_ONTHEPHONE = $00000100;
 +  PF2_IDLE       = $00000200; //added during 0.3.4 (2004/09/13)
 +
 +  PFLAGNUM_3 = 3; //the status modes that the protocol supports
 +                  //away-style messages for. Uses the PF2_ flags.
 +
 +  PFLAGNUM_4           = 4;         // v0.3+: flag asking a protocol plugin how auths are handled
 +  PF4_FORCEAUTH        = $00000001; // protocol has to send auth's for things to work
 +  PF4_FORCEADDED       = $00000002; // protocol has to tell people that they were added (otherwise things don't work)
 +  PF4_NOCUSTOMAUTH     = $00000004; // protocol can't send a custom message while asking others for auth
 +  PF4_SUPPORTTYPING    = $00000008; // protocol supports user is typing messages v0.3.3+
 +  PF4_SUPPORTIDLE      = $00000010; // protocol understands idle, added during v0.3.4+ (2004/09/13)
 +  PF4_AVATARS          = $00000020; // protocol has avatar support, added during v0.3.4 (2004/09/13)
 +  PF4_OFFLINEFILES     = $00000040; // protocols supports sending files to offline users (v0.5.2)
 +  PF4_IMSENDUTF        = $00000080; // protocol is able to process messages in utf-8 (v.0.7.0+)
 +  PF4_IMSENDOFFLINE    = $00000100; // protocol supports sending offline messages (v0.8.0+)
 +  PF4_INFOSETTINGSVC   = $00000200; // protocol supports user info translation services (v0.8.0+)
 +  PF4_NOAUTHDENYREASON = $00000400; // protocol doesn't support authorization deny reason (v0.9.0+)
 +
 +  PFLAG_UNIQUEIDTEXT         = 100; // returns a static buffer of text describing the unique field by which this protocol identifies users (already translated), or NULL
 +  PFLAG_MAXCONTACTSPERPACKET = 200; // v0.1.2.2+: returns the maximum number of contacts which can be sent in a single PSS_CONTACTS. lParam=(LPARAM)hContact.
 +  PFLAG_UNIQUEIDSETTING      = 300; // v0.3+: returns the DB setting name (e.g. szProto=ICQ, szSetting=UIN) that has the ID which makes this user unique on that system (0.3a ONLY), the string is statically allocated so no need to free()
 +  PFLAG_MAXLENOFMESSAGE      = 400; // v0.3.2+: return the maximum length of an instant message, lParam=(LPARAM)hContact
 +  {
 +    A protocol might not support this cap, it allows a protocol to say that PFLAGNUM_2 is for
 +    statuses contacts supports, and that PFLAGNUM_5 is for statuses a protocol can SET TO ITSELF,
 +    if this is not replied to, then PFLAGNUM_2 is alone in telling you which statuses a protocol
 +    can set to and what statuses a contact can set to as well.
 +
 +    E.g. A protocol might report 'wireless' users but a login of the protocol from Miranda can
 +    not set itself to 'wireless' so PFLAGNUM_2 would return PF2_ONTHEPHONE and PFLAGNUM_5 would
 +    return PF2_ONTHEPHONE as well, this means "I will get contacts who are on the phone but you can
 +    not set on the phone" and so on.
 +
 +    Do note that the reply here is a NEGATION of bitflags reported for PFLAGNUM_2, e.g. returning
 +    PF2_ONTHEPHONE for PFLAGNUM_2 and returning the same for PFLAGNUM_5 says that you DO NOT SUPPORT
 +    PF2_ONTHEPHONE for the user to PS_SETSTATUS to, but you will expect other contacts to have
 +    that status, e.g. you can get onthephone for users but can't go online with onthephone.
 +
 +    The same PF2_  status flags are used in the reply.
 +
 +    Added during 0.3.4 (2004/09/14)
 +  }
 +
 +  PFLAGNUM_5 = 5;
 +
 +  // for PS_SETSTATUS
 +
 +  LOGINERR_WRONGPASSWORD = 1;
 +  LOGINERR_NONETWORK     = 2;
 +  LOGINERR_PROXYFAILURE  = 3;
 +  LOGINERR_BADUSERID     = 4;
 +  LOGINERR_NOSERVER      = 5;
 +  LOGINERR_TIMEOUT       = 6;
 +  LOGINERR_WRONGPROTOCOL = 7;
 +  LOGINERR_OTHERLOCATION = 8;
 +
 +  // flag for PS_ADDTOLIST
 +
 +  PALF_TEMPORARY = 1; // add the contact temporarily and invisibly, just to get user info or something
 +
 +  // flags for PS_GETINFO
 +
 +  SGIF_MINIMAL = 1; // get only the most basic information. This should
 +                    // contain at least a Nick and e-mail.
 +  SGIF_ONOPEN  = 2; // set when the User Info form is being opened
 +
 +  // for PSR_MESSAGE
 +
 +  PREF_CREATEREAD = 1; // create the database event with the 'read' flag set
 +  PREF_UNICODE    = 2;
 +  PREF_RTL        = 4; // 0.5+ addition: support for right-to-left messages
 +  PREF_UTF        = 8; // message is in utf-8 (0.7.0+)
 +
 +  // for PS_FILERESUME
 +
 +  FILERESUME_OVERWRITE = 1;
 +  FILERESUME_RESUME    = 2;
 +  FILERESUME_RENAME    = 3;
 +  FILERESUME_SKIP      = 4;
 -    PFLAGNUM_1          = $1;
 -    PF1_IMSEND          = $00000001; // supports IM sending
 -    PF1_IMRECV          = $00000002; // supports IM receiving
 -    PF1_IM              = (PF1_IMSEND or PF1_IMRECV);
 -    PF1_URLSEND         = $00000004; // supports separate URL sending
 -    PF1_URLRECV         = $00000008; // supports separate URL receiving
 -    PF1_URL             = (PF1_URLSEND or PF1_URLRECV);
 -    PF1_FILESEND        = $00000010; // supports file sending
 -    PF1_FILERECV        = $00000020; // supports file receiving
 -    PF1_FILE            = (PF1_FILESEND or PF1_FILERECV);
 -    PF1_MODEMSGSEND     = $00000040; // supports broadcasting away messages
 -    PF1_MODEMSGRECV     = $00000080; // supports reading others' away messages
 -    PF1_MODEMSG         = (PF1_MODEMSGSEND or PF1_MODEMSGRECV);
 -    PF1_SERVERCLIST     = $00000100; // contact lists are stored on the server, not locally. See notes below
 -    PF1_AUTHREQ         = $00000200; // will get authorisation requests for some or all contacts
 -    PF1_ADDED           = $00000400; // will get 'you were added' notifications
 -    PF1_VISLIST         = $00000800; // has an invisible list
 -    PF1_INVISLIST       = $00001000; // has a visible list for when in invisible mode	
 -    PF1_INDIVSTATUS     = $00002000; // supports setting different status modes to each contact
 -    PF1_EXTENSIBLE      = $00004000; // the protocol is extensible and supports plugin-defined messages
 -    PF1_PEER2PEER       = $00008000; // supports direct (not server mediated) communication between clients
 -    PF1_NEWUSER         = $00010000; // supports creation of new user IDs
 -    PF1_CHAT            = $00020000; // has a realtime chat capability
 -    PF1_INDIVMODEMSG    = $00040000; // supports replying to a mode message request with different text depending on the contact requesting
 -    PF1_BASICSEARCH     = $00080000; // supports a basic user searching facility
 -    PF1_EXTSEARCH       = $00100000; // supports one or more protocol-specific extended search schemes
 -    PF1_CANRENAMEFILE   = $00200000; // supports renaming of incoming files as they are transferred
 -    PF1_FILERESUME      = $00400000; // can resume broken file transfers, see PS_FILERESUME below
 -    PF1_ADDSEARCHRES    = $00800000; // can add search results to the contact list
 -    PF1_CONTACTSEND     = $01000000; // can send contacts to other users
 -    PF1_CONTACTRECV     = $02000000; // can receive contacts from other users
 -    PF1_CONTACT         = (PF1_CONTACTSEND or PF1_CONTACTRECV);
 -    PF1_CHANGEINFO      = $04000000; // can change our user information stored on server
 -    PF1_SEARCHBYEMAIL   = $08000000; // supports a search by e-mail feature
 -    PF1_USERIDISEMAIL   = $10000000; // set if the uniquely identifying field of the network is the e-mail address
 -    PF1_SEARCHBYNAME    = $20000000; // supports searching by nick/first/last names
 -    PF1_EXTSEARCHUI     = $40000000; // has a dialog box to allow searching all the possible fields
 -    PF1_NUMERICUSERID   = $80000000; // the unique user IDs for this protocol are numeric
 -
 -    PFLAGNUM_2          = 2;		 // the status modes that the protocol supports
 -    PF2_ONLINE          = $00000001; // an unadorned online mode
 -    PF2_INVISIBLE       = $00000002;
 -    PF2_SHORTAWAY       = $00000004; // Away on ICQ, BRB on MSN
 -    PF2_LONGAWAY        = $00000008; // NA on ICQ, Away on MSN
 -    PF2_LIGHTDND        = $00000010; // Occupied on ICQ, Busy on MSN
 -    PF2_HEAVYDND        = $00000020; // DND on ICQ
 -    PF2_FREECHAT        = $00000040;
 -    PF2_OUTTOLUNCH      = $00000080;
 -    PF2_ONTHEPHONE      = $00000100;
 -
 -    PFLAGNUM_3          = 3;         //the status modes that the protocol supports
 -                                     //away-style messages for. Uses the PF2_ flags.
 -    PFLAG_UNIQUEIDTEXT  = 100;       //returns a static buffer of text describing the unique field by which this protocol identifies users (already translated), or NULL
 -
 -    PFLAG_MAXCONTACTSPERPACKET = 200; //v0.1.2.2+: returns the maximum number of contacts which can be sent in a single PSS_CONTACTS.
 -
 -    PFLAGNUM_4	        = 4;         // v0.3+: flag asking a protocol plugin how auths are handled
 -    PF4_FORCEAUTH	    = $00000001; // protocol has to send auth's for things to work
 -    PF4_FORCEADDED	    = $00000002; // protocol has to tell people that they were added (otherwise things don't work)
 -    PF4_NOCUSTOMAUTH    = $00000004; // protocol can't send a custom message while asking others for auth
 -	PF4_SUPPORTTYPING   = $00000008; // protocol supports user is typing messages v0.3.3+
 -	PF4_SUPPORTIDLE     = $00000010; // protocol understands idle, added during v0.3.4+ (2004/09/13)
 -	PF4_AVATARS		    = $00000020; // protocol has avatar support, added during v0.3.4 (2004/09/13)
 -	PF4_OFFLINEFILES    = $00000040; // protocols supports sending files to offline users (v0.5.2)
 -	PF4_IMSENDUTF       = $00000080; // protocol is able to process messages in utf-8 (v.0.7.0+)
 -	PF4_IMSENDOFFLINE   = $00000100; // protocol supports sending offline messages (v0.8.0+)
 -	PF4_INFOSETTINGSVC  = $00000200; // protocol supports user info translation services (v0.8.0+)
 -
 -    PFLAG_UNIQUEIDSETTING      = 300; // v0.3+: returns the DB setting name (e.g. szProto=ICQ, szSetting=UIN) that has the ID which makes this user unique on that system (0.3a ONLY), the string is statically allocated so no need to free()
 -
 -    // for PS_SETSTATUS
 -
 -    LOGINERR_WRONGPASSWORD = 1;
 -    LOGINERR_NONETWORK     = 2;
 -    LOGINERR_PROXYFAILURE  = 3;
 -    LOGINERR_BADUSERID     = 4;
 -    LOGINERR_NOSERVER      = 5;
 -    LOGINERR_TIMEOUT       = 6;
 -    LOGINERR_WRONGPROTOCOL = 7;
 -
 -    // flag for PS_ADDTOLIST
 -
 -    PALF_TEMPORARY      = 1;        // add the contact temporarily and invisibly, just to get user info or something
 -
 -    // flags for PS_GETINFO
 -
 -    SGIF_MINIMAL        = 1;        // get only the most basic information. This should
 -                                    // contain at least a Nick and e-mail.
 -
 -    // for PSR_MESSAGE
 -
 -    PREF_CREATEREAD     = 1;        // create the database event with the 'read' flag set
 -
 -    // for PS_FILERESUME
 -
 -    FILERESUME_OVERWRITE= 1;
 -    FILERESUME_RESUME   = 2;
 -    FILERESUME_RENAME   = 3;
 -    FILERESUME_SKIP     = 4;
 +const
 +  PSR_UNICODE = 1;
  type
 +  PPROTOSEARCHRESULT = ^TPROTOSEARCHRESULT;
 +  TPROTOSEARCHRESULT = record
 +    cbSize   : int;
 +    nick     : TFNAMECHAR;
 +    firstName: TFNAMECHAR;
 +    lastName : TFNAMECHAR;
 +    email    : TFNAMECHAR;
 +    id       : TFNAMECHAR;
 +    flags    : int;
 +    reserved : array [0..(8*SizeOf(THANDLE) div SizeOf(dword))-1] of Byte;
 +    // Protocols may extend this structure with extra members at will and supply
 +    // a larger cbSize to reflect the new information, but they must not change
 +    // any elements above this comment
 +    // The 'reserved' field is part of the basic structure, not space to
 +    // overwrite with protocol-specific information.
 +    // If modules do this, they should take steps to ensure that information
 +    // they put there will be retained by anyone trying to save this structure.
 +  end;
 +
 +  PPROTOSEARCHBYNAME = ^TPROTOSEARCHBYNAME;
 +  TPROTOSEARCHBYNAME = record
 +    pszNick     : TChar;
 +    pszFirstName: TChar;
 +    pszLastName : TChar;
 +  end;
 +
 +  PPROTORECVEVENT = ^TPROTORECVEVENT;
 +  TPROTORECVEVENT = record
 +    flags    : DWORD;
 +    timestamp: DWORD;
 +    szMessage: TChar;
 +    lParam   : LPARAM;
 +  end;
 +
 +  PPROTORECVFILE = ^TPROTORECVFILE;
 +  TPROTORECVFILE = record
 +    flags        : DWORD;
 +    timestamp    : DWORD;   // unix time
 +    szDescription: PAnsiChar;
 +    pFiles       : ^PAnsiChar;     // pointer to an array of PAnsiChar's
 +    lParam       : LPARAM;
 +  end;
 +
 +  //File(s) have been received (0.9.x)
 +  PPROTORECVFILET = ^TPROTORECVFILET;
 +  TPROTORECVFILET = record
 +    flags        : DWORD;
 +    timestamp    : DWORD;   // unix time
 +    szDescription: TChar;
 +    FileCount    : int;
 +    pFiles       : ^TChar;     // pointer to an array of PAnsiChar's
 +    lParam       : LPARAM;
 +  end;
 +
 +  PPROTOFILERESUME = ^TPROTOFILERESUME;
 +  TPROTOFILERESUME = record
 +    action    : int;        // FILERESUME_* flag
 +    szFilename: TFNAMECHAR; // full path, only valid if action=FILERESUME_RENAME
 +  end;
 -    PPROTOSEARCHRESULT = ^TPROTOSEARCHRESULT;
 -    TPROTOSEARCHRESULT = record
 -        cbSize: int;
 -        nick: PChar;
 -        firstName: PChar;
 -        lastName: PChar;
 -        email: PChar;
 -        reserved: array [0..15] of Byte;
 -    	// Protocols may extend this structure with extra members at will and supply
 -    	// a larger cbSize to reflect the new information, but they must not change
 -    	// any elements above this comment
 -    	// The 'reserved' field is part of the basic structure, not space to
 -    	// overwrite with protocol-specific information.
 -    	// If modules do this, they should take steps to ensure that information
 -    	// they put there will be retained by anyone trying to save this structure.
 -    end;
 -
 -    PPROTOSEARCHBYNAME = ^TPROTOSEARCHBYNAME;
 -    TPROTOSEARCHBYNAME = record
 -        pszNick: PChar;
 -        pszFirstName: PChar;
 -        pszLastName: PChar;
 -    end;
 -
 -    PPROTORECVEVENT = ^TPROTORECVEVENT;
 -    TPROTORECVEVENT = record
 -        flags: DWORD;
 -        timestamp: DWORD;
 -        szMessage: PChar;
 -        lParam: LPARAM;
 -    end;
 -
 -    PPROTORECVFILE = ^TPROTORECVFILE;
 -    TPROTORECVFILE = record
 -        flags: DWORD;
 -        timestamp: DWORD;   // unix time
 -        szDescription: PChar;
 -        pFiles: PChar;     // pointer to an array of pchar's
 -        lParam: LPARAM;
 -    end;
 -
 -    PPROTOFILERESUME = ^TPROTOFILERESUME;
 -    TPROTOFILERESUME = record
 -        action: int;    // FILERESUME_* flag
 -        szFilename: PChar; // full path, only valid if action=FILERESUME_RENAME
 -    end;
 +const
 +  {
 +    wParam : PFLAGNUM_* (see above)
 +    lParam : 0
 +    Affects: Returns a bitfield for settings corresponding to flag number, see notes
 +    Returns: a bitfield of supported features -- or 0 if flag_num is not supported
 +    Notes  : this checks what sort of things are actively supported by a protocol
 +             module
 +  }
 +  PS_GETCAPS = '/GetCaps';
 +
 +  {
 +    wParam : cchName
 +    lParam : Pointer to a buffer to fill with human-readable name
 +    Affect : Get a human-readable name for the protocol, see notes
 +    Result : 0 on success, [non zero] on failure
 +    Notes  : Should be translated before being returned, cchName
 +             has the size of the buffer, example strings: "ICQ", "AIM"
 +  }
 +  PS_GETNAME = '/GetName';
 +
 +  {
 +    wParam : whichIcon
 +    lParam : 0
 +    Affect : Loads one of the protocol-sspecific icons
 +    Returns: the HICON or NULL on failure, the returned icon
 +             must be DestroyIcon()ed, the UI should overlay
 +             the online icon with further UI-specified icon to
 +             repressent the exact status mode.
 +  }
 +  PLI_PROTOCOL = $1;     // An icon representing the protocol (eg the multicoloured flower for ICQ)
 +  PLI_ONLINE   = $2;     // Online state icon for that protocol (eg green flower for ICQ)
 +  PLI_OFFLINE  = $3;     // Offline state icon for that protocol (eg red flower for ICQ)
 +
 +  PLIF_LARGE        = $0;     // Or with one of the above to get the large (32x32 by default) icon
 +  PLIF_SMALL        = $10000; // Or with one of the above to get the small (16x16 by default) icon
 +  PLIF_ICOLIB       = $20000; // the returned HICON is managed by IcoLib, DO NOT DestroyIcon() it
 +  PLIF_ICOLIBHANDLE = $40000; // the function will return IcoLib handle not HICON
 +
 +  PS_LOADICON = '/LoadIcon';
 +
 +  {
 +    wParam : status_mode
 +    lParam : Pointer to a null terminated string containing message
 +    Affect : Sets the status mode specific message for the user, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : This service is not available unless PF1_MODEMSGSEND is set,
 +             and PF1_INDIVMODEMSG is *not* set.
 +             If PF1_INDIVMODEMSG is set, then see PSS_AWAYMSSG for details
 +             of operations of away messages.
 +             -
 +             Protocol modules smust support lParam=NULL, it may eithere mean
 +             to use an empty message or (preferably) not to reply at all to
 +             any requests.
 +  }
 +  PS_SETAWAYMSG  = '/SetAwayMsg';
 +  PS_SETAWAYMSGW = '/SetAwayMsgW';
 +
 +  {
 +    wParam : newMode from statusmodes.inc
 +    lParam : 0
 +    Affect : Change the protocol's status mode, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : Will send an ack with :
 +             type=ACKTYPE_SUCCESS, result=ACKRESULT_SUCCESS, hProcess=previousMode, lParam=newMode
 +             -
 +             when the change completes. This ack is sent for all changes, not
 +             just ones caused by calling this function.
 +             -
 +             NewMode can be ID_STATUS_CONNECTING<=newMode<ID_STATUS_CONNECTING+
 +             MAX_CONNECT_RETRIES to signify that it's connecting and it's the nth retry.
 +             -
 +             Protocols are initially always in offline mode, if a protocol
 +             doesn't support a specific status mode, it should pick the closest
 +             ones that it does support, and change to that.
 +
 +             If a protocol has to switch from offline mode to online (or a substate
 +             of online, like away) then it should report any errors in the
 +             form of an additional ack :
 +
 +             type=ACKTYPE_LOGIN, result=ACKRESULT_FAILURE, hProcess=NULL, lParam=LOGINERR_*
 +
 +             SetStatus() is called when a protocol module is first loaded
 +             with newMode=ID_STATUS_ONLINE.
 +             -
 +             Protocols can define their own LOGINERR_* starting at $1000, see
 +             LOGINERR_* above
 +  }
 +  PS_SETSTATUS = '/SetStatus';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : Get the status mode that a protocol is currently in, see notes
 +    Returns: The current status mode
 +    Notes  : Only protocol modules need to implement this, non network level
 +             protocol modules do not need to (but if you register as a protocol
 +             you need to, Miranda will GPF otherwise)
 +  }
 +  PS_GETSTATUS = '/GetStatus';
 +
 +  {
 +    wParam : HDBEVENT
 +    lParam : 0
 +    Affect : allow 'somebody' to add the user to their contact list, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : Auth request come in the form of an event added to the database
 +             for the NULL(0) user, the form is:
 +             -
 +             protocolSpecific: DWORD;
 +             nick, firstname, lastName, e-mail, requestReason: ASCIIZ;
 +             -
 +             HDBEVENT musts be the handle of such an event, one or more
 +             fields may be empty if the protocol doesn't support them
 +  }
 +  PS_AUTHALLOW = '/Authorize';
 +
 +  {
 +    wParam : HDBEVENT
 +    lParam : TChar - Reason
 +    Affect : Deny an authorisation request
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : Protocol modules must be able to cope with lParam=NULL(0)
 +  }
 +  PS_AUTHDENY  = '/AuthDeny';
 +  PS_AUTHDENYW = '/AuthDenyW';
 +
 +  {
 +    Send a "You were added" event
 +    wParam=lParam=0
 +    Returns 0 on success, nonzero on failure
 +  }
 +  PSS_ADDED = '/YouWereAdded';
 +
 +{ Create account manager UI form
 +  wParam=0
 +  lParam=(LPARAM)(HWND)hwndAccMgr
 +  Returns handle on newly created form.
 +  Size for best fit is 186x134 DLUs, please avoid groupboxes
 +  paddind and advanced options. This should provide minimal setup
 +  for initial connect.
 +}
 +  PS_CREATEACCMGRUI = '/CreateAccMgrUI';
 +  {
 +    wParam : 0
 +    lParam : Pointer to a null terminated string containing an ID to search for
 +    Affect : Send a basic search request, see notes
 +    Returns: A handle to the search request or NULL(0) on failure
 +    Notes  : All protocols identify users uniquely by a single field
 +             this service will search by that field.
 +             -
 +             All search replies (even protocol-spec extended searches)
 +             are replied by a series of ack's,-
 +             -
 +             Result acks are a series of:
 +             type=ACKTYPE_SEARCH, result=ACKRESULT_DATA, lParam=Pointer to a TPROTOSEARCHRESULT structure
 +             -
 +             ending ack:
 +             type=ACKTYPE_SEARCH, result=ACKRESULT_SUCCESS, lParam=0
 +             -
 +             The pointers in the structure are not guaranteed to be
 +             valid after the ack is complete.
 +             -
 +             The structure to reply with search results can be extended
 +             per protocol basis (see below)
 +
 +  }
 +  PS_BASICSEARCH  = '/BasicSearch';
 +  PS_BASICSEARCHW = '/BasicSearchW';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to a NULL terminated string containing the e-mail to search for
 +    Affect : Search for user(s) by e-mail address, see notes
 +    Returns: A HANDLE to the search, or NULL(0) on failure
 +    Notes  : Results are returned as for PS_BASICSEARCH, this service
 +             is only available if the PF1_USERIDISEMAIL flag is set for caps --
 +             -
 +             This service with the above service should be mapped to the same
 +             function if the aforementioned flag is set.
 +    Version: v0.1.2.1+
 +  }
 +  PS_SEARCHBYEMAIL  = '/SearchByEmail';
 +  PS_SEARCHBYEMAILW = '/SearchByEmailW';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to a TPROTOSEARCHBYNAME structure
 +    Affect : Search for users by name, see notes
 +    Returns: Handle to the search, NULL(0) on failure
 +    Notes  : this service is only available, if PF1_SEARCHBYNAME capability is set.
 +             Results are returned in the same manner as PS_BASICSEEARCH
 +    Version: v0.1.2.1+
 +  }
 +  PS_SEARCHBYNAME  = '/SearchByName';
 +  PS_SEARCHBYNAMEW = '/SearchByNameW';
 +
 +  {
 +    wParam : 0
 +    lParam : Handle to window owner
 +    Affect : Create the advanced search dialog box, see notes
 +    Returns: A window handle, or NULL(0) on failure
 +    Notes  : this service is only available if PF1_EXTSEARCHUI capability is
 +             set, advanced search is very protocol-spec'd so it is left to
 +             the protocol itself to supply a dialog containing the options,
 +             this dialog should not have a titlebar and contain only search
 +             fields. the rest of the UI is supplied by Miranda.
 +             -
 +             The dialog should be created with CreateDialog() or it's kin
 +             and still be hidden when this function returns,
 +             -
 +             The dialog will be destroyed when the find/add dialog is closed
 +    Version: v0.1.2.1+
 +  }
 +  PS_CREATEADVSEARCHUI = '/CreateAdvSearchUI';
 +
 +  {
 +    wParam : 0
 +    lParam : Handle to advanced search window handle
 +    Affect : Search using the advanced search dialog, see notes
 +    Returns: A handle or NULL(0) on failure
 +    Notes  : Results are returned in the same manner as PS_BASICSEARCH,
 +             this service is only available if PF1_EXTSEARCHUI capability is set
 +    Version: v0.1.2.1+
 +  }
 +  PS_SEARCHBYADVANCED = '/SearchByAdvanced';
 +type
 +  CUSTOMSEARCHRESULTS = record
 +    nSize      :size_t;
 +    nFieldCount:int;
 +    szFields   :^TCHAR;
 +    psr        :TPROTOSEARCHRESULT;
 +  end;
 +
 +  {
 +    wParam : flags
 +    lParam : Pointer to a TPROTOSEARCHRESULT structure
 +    Affect : Adds a search result to the contact list, see notes
 +    Returns: A handle to the new contact (HCONTACT) or NULL(0) on failure
 +    Notes  : The pointer MUST be a result returned by a search function
 +             since there maybe extra protocol-spec data required by the protocol.
 +             -
 +             the protocol module should not allow duplicate contains to be added,
 +             but if such a request *is* received it should return a HCONTACT
 +             to the original user,
 +             -
 +             If flags is PALF_TEMPORARY set, the contact should be added
 +             temorarily and invisiblely, just to get the user info (??)
 +             -
 +  }
  const
 +  PS_ADDTOLIST = '/AddToList';
 +
 +  {
 +    wParam : MAKEWPARAM(flags, iContact)
 +    lParam : HDBEVENT
 +    Affects: Add a contact to the contact list given an auth/added/contacts events, see notes
 +    Returns: A HCONTACT or NULL(0) on failure
 +    Notes  : HDBEVENT must be either EVENTTYPE_AUTHREQ or EVENTTYPE_ADDED
 +             flags are the same as PS_ADDTOLIST,
 +             -
 +             iContacts is only used for contacts vents, it is 0-based index
 +             of the contacts in the event to add, there's no way to add two or more
 +             contacts at once, you should just call this as many times as needed.
 +  }
 +  PS_ADDTOLISTBYEVENT = '/AddToListByEvent';
 +
 +  {
 +    wParam : InfoType
 +    lParam : Pointer to InfoData
 +    Affect : Changes user details as stored on the server, see notes
 +    Returns: A Handle to the change request or NULL(0) on failure
 +    Notes  : the details stored on the server are very protocol spec'd
 +             so this service just supplies an outline for protocols to use.
 +             See protocol-specific documentation for what infoTypes are available
 +             and what InfoData should be for each infoTypes.
 +             -
 +             Sends an ack type=ACKTYPE_SETINFO, result=ACKRESULT_SUCCESS/FAILURE, lParam=0
 +             -
 +             This description just leaves me cold.
 +    Version: v0.1.2.0+
 +  }
 +  PS_CHANGEINFO = '/ChangeInfo';
 +
 +  {
 +    wParam : HFILETRANSFER
 +    lParam : Pointer to a initalised TPROTOFILERESUME
 +    Affect : Informs the protocol of the user's chosen resume behaviour, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : If the protocol supports file resume (caps: PF1_FILERESUME) then before
 +             each file receive begins it will broadcast an ack with :
 +
 +             type=ACKTYPE_FILE, result=ACKRESULT_RESUME, hProcess=hFileTransfer,
 +             lParam = TPROTOFILETRANSFERSTATUS.
 +
 +             If the UI processes this ack it must return a [non zero] valuee from it's
 +             hook, it all the hooks complete without returning [non zero] then the
 +             protocol will assume that no resume UI was available and will continue
 +             to receive the file with a default behaviour (default: overwrite)
 +             -
 +             If a hook does return [non zero] then that UI MUST call this service,
 +             PS_FILERESUME at some point.
 +             When the protocol module receives this call it will proceed wit the
 +             file recieve usingg the given information.
 +             -
 +             Having sasid that, PS_FILERESUME MUST be called, it is also
 +             acceptable to completely abort the transfer instead, i.e. the file
 +             exists locally and the user doesn't want to overwrite or resume or
 +             reget.
 +    Version: v0.1.2.2+
 +  }
 +  PS_FILERESUME  = '/FileResume';
 +  PS_FILERESUMEW = '/FileResumeW';
 +
 +{
 +  Asks a protocol to join the chatroom from contact  v0.8.0+
 +  wParam=(WPARAM)(HANDLE)hContact
 +  lParam=(LPARAM)0
 +  Returns 0 on success, nonzero on failure
 +}
 +  PS_JOINCHAT = '/JoinChat';
 +
 +{
 +  Asks a protocol to leave the chatroom from contact  v0.8.0+
 +  wParam=(WPARAM)(HANDLE)hContact
 +  lParam=(LPARAM)0
 +  Returns 0 on success, nonzero on failure
 +}
 +  PS_LEAVECHAT = '/LeaveChat';
 +
 +{
 +  Asks a protocol to read contact information and translate them (for a lookup fields)  v0.8.0+
 +  wParam=(WPARAM)(HANDLE)hContact
 +  lParam=(LPARAM)(DBCONTACTGETSETTING*)&dbcgs
 +  The flag PF4_INFOSETTINGSVC indicates that a protocol supports this. Basically it should
 +  do the same as MS_DB_CONTACT_GETSETTING_STR, except that for a lookup settings (e.g. Language)
 +  it returns string instead of an ID stored in the database.
 +  Caller is responsible for free()ing dbcgs.pValue->pszVal and pbVal if they are
 +  returned. You must **NOT** do this from your version of free() you have to use Miranda's free()
 +  you can get a function pointer to Miranda's free() via MS_SYSTEM_GET_MMI, see m_system.h
 +  Returns 0 on success or nonzero if the setting name was not found or hContact
 +  was invalid
 +}
 +  PS_GETINFOSETTING = '/GetInfoSetting';
 +
 +{
 + Asks protocol for the status message for a status
 + wParam=(WORD) 0 for current status or a status id
 + lParam=SGMA_xxx
 + 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
 +}
 +  SGMA_UNICODE = 1;        // return Unicode status
 +
 +  PS_GETMYAWAYMSG = '/GetMyAwayMsg';
 +
 +{
 +  Set nickname for the user
 +  wParam=(WPARAM)SMNN_xxx
 +  lParam=(LPARAM)(char *) The new nickname for the user
 +  return=0 for success
 +}
 +  SMNN_UNICODE = 1;        // return Unicode status
 +
 +  PS_SETMYNICKNAME = '/SetNickname';
 +
 +{
 +  Get the max allowed length for the user nickname
 +  Optional, default value is 1024
 +  wParam=(WPARAM)0
 +  lParam=(LPARAM)0
 +  return= <=0 for error, >0 the max length of the nick
 +}
 +  PS_GETMYNICKNAMEMAXLENGTH = '/GetMyNicknameMaxLength';
 +
 +// WAYD = What are you doing
 +  WAYD_UNICODE = 1;        // return Unicode texts
 +
 +{
 +  Get the WAYD message for the user
 +  wParam=(WPARAM)WAYD_xxx
 +  lParam=(LPARAM)0
 +  Returns the text or NULL if there is none. Remember to mir_free the return value.
 +}
 +  PS_GETMYWAYD = '/GetMyWAYD';
 +
 +{
 +  Sets the WAYD message for the user
 +  wParam=(WPARAM)WAYD_xxx
 +  lParam=(LPARAM)(WCHAR * or char *)The message
 +  Returns 0 on success, nonzero on failure
 +}
 +  PS_SETMYWAYD = '/SetMyWAYD';
 +
 +{
 +  Get the max allowed length that a WAYD message can have
 +  Optional, default value is 1024
 +  wParam=(WPARAM)0
 +  lParam=(LPARAM)0
 +  Returns the max length
 +}
 +  PS_GETMYWAYDMAXLENGTH = '/GetMyWAYDMaxLength';
 +
 +// these should be called with CallContactService()
 -    {
 -        wParam : PFLAGNUM_* (see above)
 -        lParam : 0
 -        Affects: Returns a bitfield for settings corresponding to flag number, see notes
 -        Returns: a bitfield of supported features -- or 0 if flag_num is not supported
 -        Notes  : this checks what sort of things are actively supported by a protocol
 -                 module
 -    }
 -    PS_GETCAPS          = '/GetCaps';
 -
 -    {
 -        wParam : cchName
 -        lParam : Pointer to a buffer to fill with human-readable name
 -        Affect : Get a human-readable name for the protocol, see notes
 -        Result : 0 on success, [non zero] on failure
 -        Notes  : Should be translated before being returned, cchName
 -                 has the size of the buffer, example strings: "ICQ", "AIM"
 -    }
 -    PS_GETNAME          = '/GetName';
 -
 -    {
 -        wParam : whichIcon
 -        lParam : 0
 -        Affect : Loads one of the protocol-sspecific icons
 -        Returns: the HICON or NULL on failure, the returned icon
 -                 must be DestroyIcon()ed, the UI should overlay
 -                 the online icon with further UI-specified icon to
 -                 repressent the exact status mode.
 -    }
 -    PLI_PROTOCOL        = $1;     // An icon representing the protocol (eg the multicoloured flower for ICQ)
 -    PLI_ONLINE          = $2;     // Online state icon for that protocol (eg green flower for ICQ)
 -    PLI_OFFLINE         = $3;     // Offline state icon for that protocol (eg red flower for ICQ)
 -    PLIF_LARGE          = $0;     // Or with one of the above to get the large (32x32 by default) icon
 -    PLIF_SMALL          = $10000; // Or with one of the above to get the small (16x16 by default) icon
 -
 -    PS_LOADICON         = '/LoadIcon';
 -
 -    {
 -        wParam : status_mode
 -        lParam : Pointer to a null terminated string containing message
 -        Affect : Sets the status mode specific message for the user, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : This service is not available unless PF1_MODEMSGSEND is set,
 -                 and PF1_INDIVMODEMSG is *not* set.
 -                 If PF1_INDIVMODEMSG is set, then see PSS_AWAYMSSG for details
 -                 of operations of away messages.
 -                 -
 -                 Protocol modules smust support lParam=NULL, it may eithere mean
 -                 to use an empty message or (preferably) not to reply at all to
 -                 any requests.
 -    }
 -    PS_SETAWAYMSG       = '/SetAwayMsg';
 -
 -    {
 -        wParam : newMode from statusmodes.inc
 -        lParam : 0
 -        Affect : Change the protocol's status mode, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : Will send an ack with :
 -                 type=ACKTYPE_SUCCESS, result=ACKRESULT_SUCCESS, hProcess=previousMode, lParam=newMode
 -                 -
 -                 when the change completes. This ack is sent for all changes, not
 -                 just ones caused by calling this function.
 -                 -
 -                 NewMode can be ID_STATUS_CONNECTING<=newMode<ID_STATUS_CONNECTING+
 -                 MAX_CONNECT_RETRIES to signify that it's connecting and it's the nth retry.
 -                 -
 -                 Protocols are initially always in offline mode, if a protocol
 -                 doesn't support a specific status mode, it should pick the closest
 -                 ones that it does support, and change to that.
 -
 -                 If a protocol has to switch from offline mode to online (or a substate
 -                 of online, like away) then it should report any errors in the
 -                 form of an additional ack :
 -
 -                 type=ACKTYPE_LOGIN, result=ACKRESULT_FAILURE, hProcess=NULL, lParam=LOGINERR_*
 -
 -                 SetStatus() is called when a protocol module is first loaded
 -                 with newMode=ID_STATUS_ONLINE.
 -                 -
 -                 Protocols can define their own LOGINERR_* starting at $1000, see
 -                 LOGINERR_* above
 -    }
 -    PS_SETSTATUS        = '/SetStatus';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : Get the status mode that a protocol is currently in, see notes
 -        Returns: The current status mode
 -        Notes  : Only protocol modules need to implement this, non network level
 -                 protocol modules do not need to (but if you register as a protocol
 -                 you need to, Miranda will GPF otherwise)
 -    }
 -    PS_GETSTATUS        = '/GetStatus';
 -
 -    {
 -        wParam : HDBEVENT
 -        lParam : 0
 -        Affect : allow 'somebody' to add the user to their contact list, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : Auth request come in the form of an event added to the database
 -                 for the NULL(0) user, the form is:
 -                 -
 -                 protocolSpecific: DWORD;
 -                 nick, firstname, lastName, e-mail, requestReason: ASCIIZ;
 -                 -
 -                 HDBEVENT musts be the handle of such an event, one or more
 -                 fields may be empty if the protocol doesn't support them
 -    }
 -    PS_AUTHALLOW        = '/Authorize';
 -
 -    {
 -        wParam : HDBEVENT
 -        lParam : Pointer to a null terminated string containing the reason, see notes
 -        Affect : Deny an authorisation request
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : Protocol modules must be able to cope with lParam=NULL(0)
 -    }
 -    PS_AUTHDENY         = '/AuthDeny';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a null terminated string containing an ID to search for
 -        Affect : Send a basic search request, see notes
 -        Returns: A handle to the search request or NULL(0) on failure
 -        Notes  : All protocols identify users uniquely by a single field
 -                 this service will search by that field.
 -                 -
 -                 All search replies (even protocol-spec extended searches)
 -                 are replied by a series of ack's,-
 -                 -
 -                 Result acks are a series of:
 -                 type=ACKTYPE_SEARCH, result=ACKRESULT_DATA, lParam=Pointer to a TPROTOSEARCHRESULT structure
 -                 -
 -                 ending ack:
 -                 type=ACKTYPE_SEARCH, result=ACKRESULT_SUCCESS, lParam=0
 -                 -
 -                 The pointers in the structure are not guaranteed to be
 -                 valid after the ack is complete.
 -                 -
 -                 The structure to reply with search results can be extended
 -                 per protocol basis (see below)
 -
 -    }
 -    PS_BASICSEARCH      = '/BasicSearch';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a NULL terminated string containing the e-mail to search for
 -        Affect : Search for user(s) by e-mail address, see notes
 -        Returns: A HANDLE to the search, or NULL(0) on failure
 -        Notes  : Results are returned as for PS_BASICSEARCH, this service
 -                 is only available if the PF1_USERIDISEMAIL flag is set for caps --
 -                 -
 -                 This service with the above service should be mapped to the same
 -                 function if the aforementioned flag is set.
 -        Version: v0.1.2.1+
 -    }
 -    PS_SEARCHBYEMAIL    = '/SearchByEmail';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a TPROTOSEARCHBYNAME structure
 -        Affect : Search for users by name, see notes
 -        Returns: Handle to the search, NULL(0) on failure
 -        Notes  : this service is only available, if PF1_SEARCHBYNAME capability is set.
 -                 Results are returned in the same manner as PS_BASICSEEARCH
 -        Version: v0.1.2.1+
 -    }
 -    PS_SEARCHBYNAME     = '/SearchByName';
 -
 -    {
 -        wParam : 0
 -        lParam : Handle to window owner
 -        Affect : Create the advanced search dialog box, see notes
 -        Returns: A window handle, or NULL(0) on failure
 -        Notes  : this service is only available if PF1_EXTSEARCHUI capability is
 -                 set, advanced search is very protocol-spec'd so it is left to
 -                 the protocol itself to supply a dialog containing the options,
 -                 this dialog should not have a titlebar and contain only search
 -                 fields. the rest of the UI is supplied by Miranda.
 -                 -
 -                 The dialog should be created with CreateDialog() or it's kin
 -                 and still be hidden when this function returns,
 -                 -
 -                 The dialog will be destroyed when the find/add dialog is closed
 -        Version: v0.1.2.1+
 -    }
 -    PS_CREATEADVSEARCHUI= '/CreateAdvSearchUI';
 -
 -    {
 -        wParam : 0
 -        lParam : Handle to advanced search window handle
 -        Affect : Search using the advanced search dialog, see notes
 -        Returns: A handle or NULL(0) on failure
 -        Notes  : Results are returned in the same manner as PS_BASICSEARCH,
 -                 this service is only available if PF1_EXTSEARCHUI capability is set
 -        Version: v0.1.2.1+
 -    }
 -    PS_SEARCHBYADVANCED = '/SearchByAdvanced';
 -
 -    {
 -        wParam : flags
 -        lParam : Pointer to a TPROTOSEARCHRESULT structure
 -        Affect : Adds a search result to the contact list, see notes
 -        Returns: A handle to the new contact (HCONTACT) or NULL(0) on failure
 -        Notes  : The pointer MUST be a result returned by a search function
 -                 since there maybe extra protocol-spec data required by the protocol.
 -                 -
 -                 the protocol module should not allow duplicate contains to be added,
 -                 but if such a request *is* received it should return a HCONTACT
 -                 to the original user,
 -                 -
 -                 If flags is PALF_TEMPORARY set, the contact should be added
 -                 temorarily and invisiblely, just to get the user info (??)
 -                 -
 -    }
 -    PS_ADDTOLIST        = '/AddToList';
 -
 -    {
 -        wParam : MAKEWPARAM(flags, iContact)
 -        lParam : HDBEVENT
 -        Affects: Add a contact to the contact list given an auth/added/contacts events, see notes
 -        Returns: A HCONTACT or NULL(0) on failure
 -        Notes  : HDBEVENT must be either EVENTTYPE_AUTHREQ or EVENTTYPE_ADDED
 -                 flags are the same as PS_ADDTOLIST,
 -                 -
 -                 iContacts is only used for contacts vents, it is 0-based index
 -                 of the contacts in the event to add, there's no way to add two or more
 -                 contacts at once, you should just call this as many times as needed.
 -    }
 -    PS_ADDTOLISTBYEVENT = '/AddToListByEvent';
 -
 -    {
 -        wParam : InfoType
 -        lParam : Pointer to InfoData
 -        Affect : Changes user details as stored on the server, see notes
 -        Returns: A Handle to the change request or NULL(0) on failure
 -        Notes  : the details stored on the server are very protocol spec'd
 -                 so this service just supplies an outline for protocols to use.
 -                 See protocol-specific documentation for what infoTypes are available
 -                 and what InfoData should be for each infoTypes.
 -                 -
 -                 Sends an ack type=ACKTYPE_SETINFO, result=ACKRESULT_SUCCESS/FAILURE, lParam=0
 -                 -
 -                 This description just leaves me cold.
 -        Version: v0.1.2.0+
 -    }
 -    PS_CHANGEINFO       = '/ChangeInfo';
 -
 -    {
 -        wParam : HFILETRANSFER
 -        lParam : Pointer to a initalised TPROTOFILERESUME
 -        Affect : Informs the protocol of the user's chosen resume behaviour, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : If the protocol supports file resume (caps: PF1_FILERESUME) then before
 -                 each file receive begins it will broadcast an ack with :
 -
 -                 type=ACKTYPE_FILE, result=ACKRESULT_RESUME, hProcess=hFileTransfer,
 -                 lParam = TPROTOFILETRANSFERSTATUS.
 -
 -                 If the UI processes this ack it must return a [non zero] valuee from it's
 -                 hook, it all the hooks complete without returning [non zero] then the
 -                 protocol will assume that no resume UI was available and will continue
 -                 to receive the file with a default behaviour (default: overwrite)
 -                 -
 -                 If a hook does return [non zero] then that UI MUST call this service,
 -                 PS_FILERESUME at some point.
 -                 When the protocol module receives this call it will proceed wit the
 -                 file recieve usingg the given information.
 -                 -
 -                 Having sasid that, PS_FILERESUME MUST be called, it is also
 -                 acceptable to completely abort the transfer instead, i.e. the file
 -                 exists locally and the user doesn't want to overwrite or resume or
 -                 reget.
 -        Version: v0.1.2.2+
 -    }
 -    PS_FILERESUME       = '/FileResume';
 -
 -    // these should be called with CallContactService()
 -
 -    {<</
 -        !IMPORTANT!
 -        wParam, lParam data expected declarations should be treated with
 -        one level of indirection, where it says (CCSDATA: Yes)
 -        should be :
 -
 -        What you *actually* get in the service:
 -
 -        wParam = 0
 -        lParam = pCCSDATA
 -
 -        CCSDATA contains the ..wParam, ..lParam, hContact data declared with each service,
 -        so the wParam, lParam passed does not contain the data itself, but lParam
 -        contains a pointer to a structure which contains the data.
 -
 -    />>}
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : flags
 -        Param : 0
 -
 -        Affect : Updates a contact's details from the server, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  :
 -
 -                 flags which may have SGIF_MINIMAL set to only get
 -                 "basic" information, such as nickname, email address.
 -
 -                 PCCSDATA(lParam)^.hContact has the HCONTACT handle to get user
 -                 information for.
 -
 -                 Will update all the information in the database and then
 -                 send acks with :
 -
 -                 type=ACKTYPE_GETINFO, result=ACKRESULT_SUCCESS, hProcess=nReplies, lParam=thisReply
 -                 -
 -                 Since some protocol do not allow the module to tell when it has
 -                 got all the information so it can send a final ack, one
 -                 ack will be sent after each chunk of data has been received,
 -                 -
 -                 nReplies contains the number of distinct acks
 -                 that will be sent to get all the information, 'thisReply'
 -                 is the zero based index of this ack.
 -                 When thisReply=0 the minimal information has just been received,
 -                 all other numbering is arbitrary.
 -
 -    }
 -    PSS_GETINFO         = '/GetInfo';
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : flags
 -        lParam : Pointer to a null terminated string
 -        Affect : Send an instant message
 -        Returns: an hProcess corresponding to an ACK which will be sent after
 -                 the hProcess.
 -        Notes:  type=ACKTYPE_MESSAGE, result=ACKRESULT_SUCCESS/FAILURE, lParam = 0
 -                 -
 -                 here's the deal, you must return a 'seq' from this service
 -                 which you have to ack when the message actually get's sent,
 -                 or send a fake ack sometime soon if you can't find out if the message
 -                 was successfully received with the protocol that you're using.
 -                 -
 -                 this event is NOT added to the database automatically.
 -    }
 -    PSS_MESSAGE         = '/SendMsg';
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : flags
 -        lParam : null terminated string to the URL, see notes
 -        Affect : Send a URL message, see notes
 -        Returns: A hProcess which will be ack'd later
 -        Notes  : lParam may contain TWO strings, the first for URL, the second for
 -                 description, in the format :
 -                 <url>#0<desc>#0 or <url>#0#0
 -                 Will send an ack for hProcess when the URL actually gets sent
 -                 type=ACKTYPE_URL, result=ACKRESULT_SUCCESS/FAILURE, lParam=0
 -                 -
 -                 protocol modules are free to define flags starting at $10000
 -                 -
 -                 The event will *not* be added to the database automatically
 -    }
 -    PSS_URL             = '/SendUrl';
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : MAKEWPARAM(flags)
 -        lParam : Pointer to hContactsList
 -        Affect : Send a set of contacts, see notes
 -        Returns: A hProcess which will be ack, NULL(0) on failure
 -        Notes  : hContactsList is an array of nContacts handles to contacts,
 -                 if this array includes one or more contains that can not be transferred
 -                 using this protocol the function will fail.
 -                 -
 -                 Will send an ack when the contacts actually get sent:
 -
 -                 type=ACKTYPE_CONTACTS, result=ACKRESULT_SUCCESS/FAILURE, lParam=0
 -                 -
 -                 No flags have ben defined yet,
 -                 -
 -                 The event will *not* be added to the database automatically
 -    }
 -    PSS_CONTACTS        = '/SendContacts';
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : 0
 -        lParam : 0
 -        Affect : Send a request to retrieve HCONTACT's mode message, see notes
 -        Returns: a hProcess which will be ack'd later, NULL(0) on failure
 -        Notes  : the reply will come in a form of an ack :
 -
 -                 type=ACKTYPE_AWAYMSG, result=ACKRESULT_SUCCESS/FAILURE,
 -                 lParam=pointer to a null terminated string the containing message
 -    }
 -    PSS_GETAWAYMSG      = '/GetAwayMsg';
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : hProcess
 -        lParam : pointer to a buffer to fill with away message to reply with
 -        Affect : Sends an away message reply to a user, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : This service must only be called is caps has PF1_MODEMSGSEND set
 -                 as well as PF1_INDIVMODEMSG otherwise PS_SETAWAYMESSAGE should
 -                 be used.
 -                 -
 -                 Reply will be sent in the form of an ack :
 -
 -                 type=ACKTYPE_AWAYMSG, result=ACKRESULT_SENTREQUEST, lParam=0
 -    }
 -    PSS_AWAYMSG         = '/SendAwayMsg';
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : status_mode
 -        lParam : Pointer to a TPROTORECVEVENT structure
 -        Affect : An away message reply has been received
 -    }
 -    PSR_AWAYMSG         = '/RecvAwayMsg';
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : status_mode
 -        lParam : 0
 -        Affect : Set the status mode the user will appear in to a user, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : If status_mode = 0 then revert to normal state for the user,
 -                 ID_STATUS_ONLINE is possible if PF1_VISLIST
 -                 ID_STATUS_ONLINE is possible if PF1_INDIVSTATUS
 -    }
 -    PSS_SETAPPARENTMODE = '/SetApparentMode';
 -
 -    // only valid if caps support IM xfers
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : HTRANSFER
 -        lParam : null terminated string containing the path
 -        Affect : Allow a file transfer to begin, see notes
 -        Returns: A handle to the transfer to be used from now on.
 -        Notes  : If the path does not point to a directory then:
 -                 if a single file is being transfered and the protocol supports
 -                 file renaming (PF1_CANRENAMEFILE) then the file is given
 -                 this name, othewise the file is removed and file(s) are placed
 -                 into the resulting directory.
 -                 -
 -                 File transfers are marked by a EVENTTYPE_FILE added to the database.
 -                 The format is :
 -                 hTransfer: DWORD
 -                 filename(s), description: ASCIIZ
 -    }
 -    PSS_FILEALLOW       = '/FileAllow';
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : HTRANSFER
 -        lparam : Pointer to a buffer to be filled with reason
 -        Affect : Refuses a file transfer request
 -        Returns: 0 on success, [non zero] on failure
 -    }
 -    PSS_FILEDENY        = '/FileDeny';
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : HTRANSFER
 -        lParam : 0
 -        Affect : Cancel an in-progress file transfer
 -        Returns: 0 on success, [non zero] on failure
 -    }
 -    PSS_FILECANCEL      = '/FileCancel';
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : null terminated string containing description
 -        lParam : pointer to an array of pchar's containing file paths/directories
 -        Affect : Start a file(s) send, see notes
 -        Returns: A HTRANSFER handle on success, NULL(0) on failur
 -        Notes  : All notifications are done thru acks :
 -                 -
 -                 type=ACKTYPE_FILE, if result=ACKRESULT_FAILED then
 -                 lParam=null terminated string containing reason
 -    }
 -    PSS_FILE            = '/SendFile';
 -
 -    // Receiving Services
 -    {>>/
 -        Receiving Services:
 -        Before a message is sent to /RecvMessage it goes through a MS_PROTO_CHAINRECV
 -        which allows any other module to change data (for decryption, etc),
 -        this then reaches /RecvMessage.
 -
 -        This does not have to be the same structure/memory contained within that
 -        structure that started the chain call.
 -
 -        /RecvMessage adds the event to the database, any other modules who
 -        are interested in what message the user will see should hook at this point.
 -    />>}
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : 0
 -        lParam : Pointer to a TPROTORECVEVENT
 -        Affect : An instant message has beeen received, see notes
 -        Returns: 0
 -        Notes  : lParam^.lParam^.szMessage has the message, see structure above
 -                 stored as DB event EVENTTYPE_MESSAGE, blob contains message
 -                 string without null termination.
 -    }
 -    PSR_MESSAGE         = '/RecvMessage';
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : 0
 -        lParam : Pointer to a TPROTORECVEVENT, see notes
 -        Affect : A URL has been received
 -        Notes  : szMessage is encoded the same as PSS_URL
 -                 -
 -                 Stored in the database : EVENTTYPE_URL, blob contains message
 -                 without null termination
 -    }
 -    PSR_URL             = '/RecvUrl';
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : 0
 -        lParam : Pointer to a TPROTORECVEVENT
 -        Affect : Contacts have been received, see notes
 -        Notes  : pre.szMessage is actually a PROTOSEARCHRESULT list
 -                 pre.lParam is the number of contains in that list.
 -                 -
 -                 PS_ADDTOLIST can be used to add contacts to the list
 -                 -
 -                 repeat [
 -                    ASCIIZ userNick
 -                    ASCIIZ userId
 -                 ]
 -                 userNick should be a human-readable description of the user. It need not
 -                 be the nick, or even confined to displaying just one type of
 -                 information.
 -                 userId should be a machine-readable representation of the unique
 -                 protocol identifying field of the user. Because of the need to be
 -                 zero-terminated, binary data should be converted to text.
 -                 Use PS_ADDTOLISTBYEVENT to add the contacts from one of these to the list.
 -    }
 -    PSR_CONTACTS        = '/RecvContacts';
 -
 -    {
 -        CCSDATA: Yes
 -        wParam : 0
 -        lParam : Pointer to a TPROTORECVFILE
 -        Affect : File(s) have been received
 -    }
 -    PSR_FILE            = '/RecvFile';
 +{<</
 +    !IMPORTANT!
 +    wParam, lParam data expected declarations should be treated with
 +    one level of indirection, where it says (CCSDATA: Yes)
 +    should be :
 -{$ENDIF}
 +    What you *actually* get in the service:
 +
 +    wParam = 0
 +    lParam = pCCSDATA
 +
 +    CCSDATA contains the ..wParam, ..lParam, hContact data declared with each service,
 +    so the wParam, lParam passed does not contain the data itself, but lParam
 +    contains a pointer to a structure which contains the data.
 +
 +/>>}
 +
 +  {
 +    CCSDATA: Yes
 +    wParam : flags
 +    Param : 0
 +
 +    Affect : Updates a contact's details from the server, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  :
 +
 +             flags which may have SGIF_MINIMAL set to only get
 +             "basic" information, such as nickname, email address.
 +
 +             PCCSDATA(lParam)^.hContact has the HCONTACT handle to get user
 +             information for.
 +
 +             Will update all the information in the database and then
 +             send acks with :
 +
 +             type=ACKTYPE_GETINFO, result=ACKRESULT_SUCCESS, hProcess=nReplies, lParam=thisReply
 +             -
 +             Since some protocol do not allow the module to tell when it has
 +             got all the information so it can send a final ack, one
 +             ack will be sent after each chunk of data has been received,
 +             -
 +             nReplies contains the number of distinct acks
 +             that will be sent to get all the information, 'thisReply'
 +             is the zero based index of this ack.
 +             When thisReply=0 the minimal information has just been received,
 +             all other numbering is arbitrary.
 +
 +  }
 +  PSS_GETINFO = '/GetInfo';
 +
 +  {
 +    CCSDATA: Yes
 +    wParam : flags
 +    lParam : Pointer to a null terminated string
 +    Affect : Send an instant message
 +    Returns: an hProcess corresponding to an ACK which will be sent after
 +             the hProcess.
 +    Notes:  type=ACKTYPE_MESSAGE, result=ACKRESULT_SUCCESS/FAILURE,
 +             lParam=ansi error message or NIL
 +             -
 +             here's the deal, you must return a 'seq' from this service
 +             which you have to ack when the message actually get's sent,
 +             or send a fake ack sometime soon if you can't find out if the message
 +             was successfully received with the protocol that you're using.
 +             -
 +             this event is NOT added to the database automatically.
 +  }
 +  PSS_MESSAGE  = '/SendMsg';
 +//  PSS_MESSAGEW = '/SendMsgW';
 +
 +  {
 +    CCSDATA: Yes
 +    wParam : flags
 +    lParam : null terminated string to the URL, see notes
 +    Affect : Send a URL message, see notes
 +    Returns: A hProcess which will be ack'd later
 +    Notes  : lParam may contain TWO strings, the first for URL, the second for
 +             description, in the format :
 +             <url>#0<desc>#0 or <url>#0#0
 +             Will send an ack for hProcess when the URL actually gets sent
 +             type=ACKTYPE_URL, result=ACKRESULT_SUCCESS/FAILURE,
 +             lParam=ansi error message or NIL
 +             -
 +             protocol modules are free to define flags starting at $10000
 +             -
 +             The event will *not* be added to the database automatically
 +  }
 +  PSS_URL = '/SendUrl';
 +
 +  {
 +    CCSDATA: Yes
 +    wParam : MAKEWPARAM(flags)
 +    lParam : Pointer to hContactsList
 +    Affect : Send a set of contacts, see notes
 +    Returns: A hProcess which will be ack, NULL(0) on failure
 +    Notes  : hContactsList is an array of nContacts handles to contacts,
 +             if this array includes one or more contains that can not be transferred
 +             using this protocol the function will fail.
 +             -
 +             Will send an ack when the contacts actually get sent:
 +
 +             type=ACKTYPE_CONTACTS, result=ACKRESULT_SUCCESS/FAILURE,
 +             lParam=ansi error message or NIL
 +             -
 +             No flags have ben defined yet,
 +             -
 +             The event will *not* be added to the database automatically
 +  }
 +  PSS_CONTACTS = '/SendContacts';
 +
 +  {
 +    CCSDATA: Yes
 +    wParam : 0
 +    lParam : 0
 +    Affect : Send a request to retrieve HCONTACT's mode message, see notes
 +    Returns: a hProcess which will be ack'd later, NULL(0) on failure
 +    Notes  : the reply will come in a form of an ack :
 +
 +             type=ACKTYPE_AWAYMSG, result=ACKRESULT_SUCCESS/FAILURE,
 +             lParam=pointer to a null terminated string the containing message
 +  }
 +  PSS_GETAWAYMSG = '/GetAwayMsg';
 +
 +  {
 +    CCSDATA: Yes
 +    wParam : hProcess
 +    lParam : pointer to a buffer to fill with away message to reply with
 +    Affect : Sends an away message reply to a user, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : This service must only be called is caps has PF1_MODEMSGSEND set
 +             as well as PF1_INDIVMODEMSG otherwise PS_SETAWAYMESSAGE should
 +             be used.
 +             -
 +             Reply will be sent in the form of an ack :
 +
 +             type=ACKTYPE_AWAYMSG, result=ACKRESULT_SENTREQUEST, lParam=0
 +  }
 +  PSS_AWAYMSG = '/SendAwayMsg';
 +
 +  {
 +    CCSDATA: Yes
 +    wParam : status_mode
 +    lParam : 0
 +    Affect : Set the status mode the user will appear in to a user, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : If status_mode = 0 then revert to normal state for the user,
 +             ID_STATUS_ONLINE is possible if PF1_VISLIST
 +             ID_STATUS_ONLINE is possible if PF1_INDIVSTATUS
 +  }
 +  PSS_SETAPPARENTMODE = '/SetApparentMode';
 +
 +  // only valid if caps support IM xfers
 +  {
 +    CCSDATA: Yes
 +    wParam : HTRANSFER
 +    lParam : null terminated string containing the path
 +    Affect : Allow a file transfer to begin, see notes
 +    Returns: A handle to the transfer to be used from now on.
 +    Notes  : If the path does not point to a directory then:
 +             if a single file is being transfered and the protocol supports
 +             file renaming (PF1_CANRENAMEFILE) then the file is given
 +             this name, othewise the file is removed and file(s) are placed
 +             into the resulting directory.
 +             -
 +             File transfers are marked by a EVENTTYPE_FILE added to the database.
 +             The format is :
 +             hTransfer: DWORD
 +             filename(s), description: ASCIIZ
 +  }
 +  PSS_FILEALLOW  = '/FileAllow';
 +  PSS_FILEALLOWW = '/FileAllowW';
 +
 +  {
 +    CCSDATA: Yes
 +    wParam : HTRANSFER
 +    lparam : Pointer to a buffer to be filled with reason
 +    Affect : Refuses a file transfer request
 +    Returns: 0 on success, [non zero] on failure
 +  }
 +  PSS_FILEDENY  = '/FileDeny';
 +  PSS_FILEDENYW = '/FileDenyW';
 +
 +  {
 +    CCSDATA: Yes
 +    wParam : HTRANSFER
 +    lParam : 0
 +    Affect : Cancel an in-progress file transfer
 +    Returns: 0 on success, [non zero] on failure
 +  }
 +  PSS_FILECANCEL = '/FileCancel';
 +
 +  {
 +    CCSDATA: Yes
 +    wParam : null terminated string containing description
 +    lParam : pointer to an array of PAnsiChar's containing file paths/directories
 +    Affect : Start a file(s) send, see notes
 +    Returns: A HTRANSFER handle on success, NULL(0) on failur
 +    Notes  : All notifications are done thru acks :
 +             -
 +             type=ACKTYPE_FILE, if result=ACKRESULT_FAILED then
 +             lParam=null terminated string containing reason
 +  }
 +  PSS_FILE  = '/SendFile';
 +  PSS_FILEW = '/SendFileW';
 +
 +  {
 +    Send an auth request
 +    wParam=0
 +    lParam=TChar szMessage
 +    Returns 0 on success, nonzero on failure
 +  }
 +  PSS_AUTHREQUEST  = '/AuthRequest';
 +  PSS_AUTHREQUESTW = '/AuthRequestW';
 +
 +  {
 +    Send "User is Typing" (user is typing a message to the user) v0.3.3+
 +    wParam=(WPARAM)(HANDLE)hContact
 +    lParam=(LPARAM)(int)typing type - see PROTOTYPE_SELFTYPING_X defines in m_protocols.h
 +  }
 +  PSS_USERISTYPING = '/UserIsTyping';
 +
 +// Receiving Services
 +{>>/
 +  Receiving Services:
 +  Before a message is sent to /RecvMessage it goes through a MS_PROTO_CHAINRECV
 +  which allows any other module to change data (for decryption, etc),
 +  this then reaches /RecvMessage.
 +
 +  This does not have to be the same structure/memory contained within that
 +  structure that started the chain call.
 +
 +  /RecvMessage adds the event to the database, any other modules who
 +  are interested in what message the user will see should hook at this point.
 +/>>}
 +  {
 +    CCSDATA: Yes
 +    wParam : 0
 +    lParam : Pointer to a TPROTORECVEVENT
 +    Affect : An instant message has beeen received, see notes
 +    Returns: 0 - success, other failure
 +    // handle to the newly added event, or NULL on failure
 +    Notes  : lParam^.lParam^.szMessage has the message, see structure above
 +             stored as DB event EVENTTYPE_MESSAGE, blob contains message
 +             string without null termination.
 +  }
 +  PSR_MESSAGE  = '/RecvMessage';
 +//  PSR_MESSAGEW = '/RecvMessageW';
 +
 +  MS_PROTO_RECVMSG = 'Proto/RecvMessage';
 +  {
 +    CCSDATA: Yes
 +    wParam : 0
 +    lParam : Pointer to a TPROTORECVEVENT, see notes
 +    Affect : A URL has been received
 +    Notes  : szMessage is encoded the same as PSS_URL
 +             -
 +             Stored in the database : EVENTTYPE_URL, blob contains message
 +             without null termination
 +  }
 +  PSR_URL = '/RecvUrl';
 +
 +  {
 +    CCSDATA: Yes
 +    wParam : 0
 +    lParam : Pointer to a TPROTORECVEVENT
 +    Affect : Contacts have been received, see notes
 +    Notes  : pre.szMessage is actually a PROTOSEARCHRESULT list
 +             pre.lParam is the number of contains in that list.
 +             pre.flags can contain PREF_UTF defining the strings as utf-8 encoded (0.7.0+)
 +             -
 +             PS_ADDTOLIST can be used to add contacts to the list
 +             -
 +             repeat [
 +                ASCIIZ userNick
 +                ASCIIZ userId
 +             ]
 +             userNick should be a human-readable description of the user. It need not
 +             be the nick, or even confined to displaying just one type of
 +             information. The dbe.flags can contain DBEF_UTF defining userNick as
 +             utf-8 encoded. 
 +             userId should be a machine-readable representation of the unique
 +             protocol identifying field of the user. Because of the need to be
 +             zero-terminated, binary data should be converted to text.
 +             Use PS_ADDTOLISTBYEVENT to add the contacts from one of these to the list.
 +  }
 +  PSR_CONTACTS = '/RecvContacts';
 +
 +  {
 +    CCSDATA: Yes
 +    wParam : 0
 +    lParam : Pointer to a TPROTORECVFILE
 +    Affect : File(s) have been received
 +  }
 +  PSR_FILE = '/RecvFile';
 +
 +  MS_PROTO_RECVFILE :pAnsiChar = 'Proto/RecvFile';
 +  MS_PROTO_RECVFILET:pAnsiChar = 'Proto/RecvFileT';
 +
 +  {
 +    CCSDATA: Yes
 +    wParam : status_mode
 +    lParam : Pointer to a TPROTORECVEVENT structure
 +    Affect : An away message reply has been received
 +  }
 +  PSR_AWAYMSG = '/RecvAwayMsg';
 +
 +  {
 +    An authorization request has been received
 +    wParam=0
 +    lParam=(LPARAM)(PROTORECVEVENT*)&pre
 +    pre.szMessage is same format as blob
 +    pre.lParam is the size of the blob
 +  }
 +  PSR_AUTH = '/RecvAuth';
 +
 +{$ENDIF}
 diff --git a/include/delphi/m_skin.inc b/include/delphi/m_skin.inc index dabbd00960..3aa3503ea3 100644 --- a/include/delphi/m_skin.inc +++ b/include/delphi/m_skin.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,102 +18,161 @@ 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_SKIN}
  {$DEFINE M_SKIN}
  const
 +  // event icons
 +  SKINICON_EVENT_MESSAGE = 100;
 +  SKINICON_EVENT_URL     = 101;
 +  SKINICON_EVENT_FILE    = 102;
 +
 +  // other icons
 +  SKINICON_OTHER_MIRANDA       = 200;
 +  SKINICON_OTHER_EXIT          = 201;
 +  SKINICON_OTHER_SHOWHIDE      = 202;
 +  SKINICON_OTHER_GROUPOPEN     = 203; // v0.1.1.0+
 +  SKINICON_OTHER_USERONLINE    = 204; // v0.1.0.1+
 +  SKINICON_OTHER_GROUPSHUT     = 205; // v0.1.1.0+
 +  SKINICON_OTHER_CONNECTING    = 206; // v0.1.0.1+
 +  SKINICON_OTHER_ADDCONTACT    = 207; // v0.7.0.2+
 +  SKINICON_OTHER_USERDETAILS   = 208; // v0.7.0.2+
 +  SKINICON_OTHER_HISTORY       = 209; // v0.7.0.2+
 +  SKINICON_OTHER_DOWNARROW     = 210; // v0.7.0.2+
 +  SKINICON_OTHER_FINDUSER      = 211; // v0.7.0.2+
 +  SKINICON_OTHER_OPTIONS       = 212; // v0.7.0.2+
 +  SKINICON_OTHER_SENDEMAIL     = 213; // v0.7.0.2+
 +  SKINICON_OTHER_DELETE        = 214; // v0.7.0.2+
 +  SKINICON_OTHER_RENAME        = 215; // v0.7.0.2+
 +  SKINICON_OTHER_SMS           = 216; // v0.7.0.2+
 +  SKINICON_OTHER_SEARCHALL     = 217; // v0.7.0.2+
 +  SKINICON_OTHER_TICK          = 218; // v0.7.0.2+
 +  SKINICON_OTHER_NOTICK        = 219; // v0.7.0.2+
 +  SKINICON_OTHER_HELP          = 220; // v0.7.0.2+
 +  SKINICON_OTHER_MIRANDAWEB    = 221; // v0.7.0.2+
 +  SKINICON_OTHER_TYPING        = 222; // v0.7.0.2+
 +  SKINICON_OTHER_SMALLDOT      = 223; // v0.7.0.2+
 +  SKINICON_OTHER_FILLEDBLOB    = 224; // v0.7.0.2+
 +  SKINICON_OTHER_EMPTYBLOB     = 225; // v0.7.0.2+
 +  SKINICON_OTHER_UNICODE       = 226; // v0.7.0.19+
 +  SKINICON_OTHER_ANSI          = 227; // v0.7.0.19+
 +  SKINICON_OTHER_LOADED        = 228; // v0.7.0.19+
 +  SKINICON_OTHER_NOTLOADED     = 229; // v0.7.0.19+
 +  SKINICON_OTHER_UNDO          = 230; // v0.8.0.4+
 +  SKINICON_OTHER_WINDOW        = 231; // v0.8.0.4+
 +  SKINICON_OTHER_WINDOWS       = 232; // v0.8.0.4+
 +  SKINICON_OTHER_ACCMGR        = 233; // v0.8.0.4+
 +  SKINICON_OTHER_MAINMENU      = 234; // v0.8.0.12+
 +  SKINICON_OTHER_STATUS        = 235; // v0.8.0.12+
 +  SKINICON_CHAT_JOIN           = 236; // v0.8.0.27+
 +  SKINICON_CHAT_LEAVE          = 237; // v0.8.0.27+
 +  SKINICON_OTHER_STATUS_LOCKED = 238; // v0.8.0.28+
 +  SKINICON_OTHER_GROUP         = 239; // v0.8.0.29+
 +  SKINICON_OTHER_ON            = 240; // v0.9.0.9+
 +  SKINICON_OTHER_OFF           = 241; // v0.9.0.9+
 +  SKINICON_OTHER_LOADEDGRAY    = 242; // v0.10.3.1+
 +  SKINICON_OTHER_NOTLOADEDGRAY = 243; // v0.10.3.1+
 +{
 +  SKINICON_EVENT_MESSAGE_BIG     = 300;
 +  SKINICON_EVENT_URL_BIG         = 301;
 +  SKINICON_EVENT_FILE_BIG        = 302;
 +  SKINICON_OTHER_MIRANDA_BIG     = 303;
 +  SKINICON_OTHER_ADDCONTACT_BIG  = 304;
 +  SKINICON_OTHER_USERDETAILS_BIG = 305;
 +  SKINICON_OTHER_HISTORY_BIG     = 306;
 +  SKINICON_OTHER_FINDUSER_BIG    = 307;
 +  SKINICON_OTHER_OPTIONS_BIG     = 308;
 +  SKINICON_OTHER_ACCMGR_BIG      = 309;
 +}
 +  // menu icons are owned by the module that uses them so are not and should
 +  // not be skinnable. Except exit and show/hide
 +
 +  // status mode icons. NOTE: These are deprecated in favour of LoadSkinnedProtoIcon()
 +  SKINICON_STATUS_OFFLINE    = 0;
 +  SKINICON_STATUS_ONLINE     = 1;
 +  SKINICON_STATUS_AWAY       = 2;
 +  SKINICON_STATUS_NA         = 3;
 +  SKINICON_STATUS_OCCUPIED   = 4;
 +  SKINICON_STATUS_DND        = 5;
 +  SKINICON_STATUS_FREE4CHAT  = 6;
 +  SKINICON_STATUS_INVISIBLE  = 7;
 +  SKINICON_STATUS_ONTHEPHONE = 8;
 +  SKINICON_STATUS_OUTTOLUNCH = 9;
 -    // event icons
 -
 -    SKINICON_EVENT_MESSAGE		= 100;
 -    SKINICON_EVENT_URL			= 101;
 -    SKINICON_EVENT_FILE			= 102;
 -
 -    // other icons
 -    SKINICON_OTHER_MIRANDA		= 200;
 -    SKINICON_OTHER_EXIT			= 201;
 -    SKINICON_OTHER_SHOWHIDE		= 202;
 -    SKINICON_OTHER_GROUPOPEN    = 203; // v0.1.1.0+
 -    SKINICON_OTHER_GROUPSHUT    = 205; // v0.1.1.0+
 -    SKINICON_OTHER_USERONLINE   = 204; // v0.1.0.1+
 -
 -    // menu icons are owned by the module that uses them so are not and should not
 -    // be skinnable. Except exit and show/hide
 -
 -    // status mode icons. NOTE: These are deprecated in favour of LoadSkinnedProtoIcon()
 -    SKINICON_STATUS_OFFLINE	    = 0;
 -    SKINICON_STATUS_ONLINE		= 1;
 -    SKINICON_STATUS_AWAY		= 2;
 -    SKINICON_STATUS_NA			= 3;
 -    SKINICON_STATUS_OCCUPIED	= 4;
 -    SKINICON_STATUS_DND			= 5;
 -    SKINICON_STATUS_FREE4CHAT	= 6;
 -    SKINICON_STATUS_INVISIBLE	= 7;
 -    SKINICON_STATUS_ONTHEPHONE	= 8;
 -    SKINICON_STATUS_OUTTOLUNCH	= 9;
 -
 +const
 +  SSDF_UNICODE  = $0001;
  type
 -
 -    PSKINSOUNDDESC = ^TSKINSOUNDDESC;
 -    TSKINSOUNDDESC = record
 -        cbSize: int;
 -        { name to refer to sound when playing and in DB }
 -        pszName: PChar;
 -        { description to use for it in options dialog }
 -        pszDescription: PChar;
 -        { the default sound file to use, WITHOUT path }
 -        pszDefaultFile: PChar;
 -    end;
 +  PSKINSOUNDDESCEX = ^TSKINSOUNDDESCEX;
 +  TSKINSOUNDDESCEX = record
 +    cbSize        : int;
 +    pszName       : PAnsiChar; // name to refer to sound when playing and in DB
 +    pszDescription: TChar; // [TRANSLATED-BY-CORE] description to use for it in options dialog
 +    pszDefaultFile: TChar; // the default sound file to use, WITHOUT path
 +    pszSection    : TChar; // [TRANSLATED-BY-CORE] section name used to group sounds (NULL is acceptable)
 +    dwFlags       : dword; // if Miranda ver >=9.0
 +  end;
  const
 -
 -    {
 -        wParam : ICON_ID
 -        lParam : 0
 -        Affect : Load an icon from the user's custom skin lib, or from the exe
 -                 if there isn't one loaded, see notes
 -        Return : HICON for the new icon, do *not* DestroyIcon() the return value
 -                 returns NULL(0) if ICON_ID is invalid, but always success for a valid
 -                 ID.
 -    }
 -    MS_SKIN_LOADICON            = 'Skin/Icons/Load';
 -
 -    {
 -        wParam : null terminated string containing the protocol name
 -        lParam : status_wanted
 -        Affect : Load an icon representing the status_wanted for a particular protocol, see notes
 -        Returns: an HICON for the new icon, do NOT DestroyIcon() the return value
 -                 returns NULL(0) on failure.
 -        Notes  : If wParam is NULL(0) the service will load the user's selected
 -                 'all protocols' status icon
 -    }
 -    MS_SKIN_LOADPROTOICON       = 'Skin/Icons/LoadProto';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a initialised SKINSOUNDDESC
 -        Affect : Add a new sound so it has a default and can be changed in the options dialog
 -        Returns: 0 on success, [non zero] on failure
 -    }
 -    MS_SKIN_ADDNEWSOUND         = 'Skin/Sounds/AddNew';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a null terminated string containing the name of the sound to play
 -        Affect : play a named sound event, play name should of been added
 -                 with MS_SKIN_ADDNEWSOUND,  see notes
 -        Notes  : function will not fail, it will play the Windows
 -    }
 -    MS_SKIN_PLAYSOUND           = 'Skin/Sounds/Play';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : Sent when the icons DLL has been changed in the options dialog
 -                 and everyone should remake their image lists.
 -    }
 -    ME_SKIN_ICONSCHANGED        = 'Skin/IconsChanged';
 +  {
 +    wParam : ICON_ID or handle
 +    lParam : 0 if ICON_ID, else 1
 +    Affect : Load an icon from the user's custom skin lib, or from the exe
 +             if there isn't one loaded, see notes
 +    Return : HICON for the new icon, do *not* DestroyIcon() the return value
 +             returns NULL(0) if ICON_ID is invalid, but always success for a
 +             valid ID.
 +  }
 +  MS_SKIN_LOADICON:PAnsiChar = 'Skin/Icons/Load';
 +
 +  {
 +    wParam : null terminated string containing the protocol name
 +    lParam : status_wanted
 +    Affect : Load an icon representing the status_wanted for a particular protocol, see notes
 +    Returns: an HICON for the new icon, do NOT DestroyIcon() the return value
 +             returns NULL(0) on failure.
 +    Notes  : If wParam is NULL(0) the service will load the user's selected
 +             'all protocols' status icon
 +  }
 +  MS_SKIN_LOADPROTOICON   :PAnsiChar = 'Skin/Icons/LoadProto';
 +  MS_SKIN_LOADPROTOICONBIG:PAnsiChar = 'Skin/Icons/LoadProtoBig';
 +
 +  {
 +    wParam : hLangpack
 +    lParam : Pointer to a initialised SKINSOUNDDESC
 +    Affect : Add a new sound so it has a default and can be changed in the
 +             options dialog
 +    Returns: 0 on success, [non zero] on failure
 +  }
 +  MS_SKIN_ADDNEWSOUND:PAnsiChar = 'Skin/Sounds/AddNew';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to a null terminated string containing the name of the
 +             sound to play
 +    Affect : play a named sound event, play name should of been added
 +             with MS_SKIN_ADDNEWSOUND,  see notes
 +    Notes  : function will not fail, it will play the Windows
 +  }
 +  MS_SKIN_PLAYSOUND:PAnsiChar = 'Skin/Sounds/Play';
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : Sent when the icons DLL has been changed in the options dialog
 +             and everyone should remake their image lists.
 +  }
 +  ME_SKIN_ICONSCHANGED:PAnsiChar = 'Skin/IconsChanged';
 +
 +  {
 +    wParam: 0 when playing sound (1 when sound is being previewed)
 +    lParam: (AnsiChar*) pszSoundFile
 +    Affect: This hook is fired when the sound module needs to play a sound
 +    Note  : This event has default processing, if no one HookEvent()'s this
 +        event then it will use the default hook code, which uses PlaySound()
 +    Version: 0.3.4a (2004/09/15)
 +  }
 +  ME_SKIN_PLAYINGSOUND:PAnsiChar = 'Skin/Sounds/Playing';
  {$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_smileyadd.inc b/include/delphi/m_smileyadd.inc index ca53073871..ca53073871 100644 --- a/plugins/Pascal_Headers/m_smileyadd.inc +++ b/include/delphi/m_smileyadd.inc diff --git a/plugins/Pascal_Headers/m_ssl.inc b/include/delphi/m_ssl.inc index 6589989dfb..04bc65651a 100644 --- a/plugins/Pascal_Headers/m_ssl.inc +++ b/include/delphi/m_ssl.inc @@ -25,11 +25,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  type
    HSSL = THANDLE;
 +  TSOCKET = uint_ptr; // from Winsock.pas
  type
    SSL_API = record
  	  cbSize:int;
 -    connect  : function(s:dword{TSOCKET}; const host:PAnsiChar; verify:int):HSSL; cdecl;
 +    connect  : function(s:TSOCKET; const host:PAnsiChar; verify:int):HSSL; cdecl;
      pending  : function(ssl:HSSL):BOOL; cdecl;
      read     : function(ssl:HSSL; buf:pAnsiChar; num:int; peek:int):int; cdecl;
      write    : function(ssl:HSSL; const buf:pAnsiChar; num:int):int; cdecl;
 diff --git a/include/delphi/m_system.inc b/include/delphi/m_system.inc index dff5909c86..8347495e03 100644 --- a/include/delphi/m_system.inc +++ b/include/delphi/m_system.inc @@ -1,170 +1,216 @@ -(*
 -
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 Miranda ICQ/IM project,
 -all portions of this codebase are copyrighted to the people
 -listed in contributors.txt.
 +{
 +  Miranda IM: the free IM client for Microsoft  Windows
 +
 +  Copyright 2000-2003 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_SYSTEM}
 +{$DEFINE M_SYSTEM}
 -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.
 +{$IFNDEF MIRANDANAME}
 +{$DEFINE MIRANDANAME}
 +const
 +  MIRANDANAME = 'Miranda IM';
 +{$ENDIF}
 +{$IFNDEF MIRANDACLASS}
 +{$DEFINE MIRANDACLASS}
 +const
 +  MIRANDACLASS = 'Miranda';
 +{$ENDIF}
 -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.
 +// set the default compatibility lever for Miranda 0.4.x
 +{$IFNDEF MIRANDA_VER}
 +{$DEFINE MIRANDA_VER}
 +const
 +  MIRANDA_VER = $0400;
 +{$ENDIF}
 -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.
 +  { miranda/system/modulesloaded
 +    called after all modules have been successfully initialised
 +    wParam=lParam=0
 +    used to resolve double-dependencies in the module load order
 +  }
 +const
 +  ME_SYSTEM_MODULESLOADED:PAnsiChar = 'Miranda/System/ModulesLoaded';
 +
 +  { miranda/system/shutdown event
 +    called just before the application terminates
 +    the database is still guaranteed to be running during this hook.
 +    wParam=lParam=0
 +  }
 +  ME_SYSTEM_SHUTDOWN:PAnsiChar = 'Miranda/System/Shutdown';
 +
 +  { restarts miranda ( 0.8+ )
 +    wParam=lParam=0
 +  }
 +  MS_SYSTEM_RESTART:PAnsiChar = 'Miranda/System/Restart';
 +
 +  { miranda/system/oktoexit event
 +    called before the app goes into shutdown routine to make sure everyone is
 +    happy to exit
 +    wParam=lParam=0
 +    return nonzero to stop the exit cycle
 +  }
 +  ME_SYSTEM_OKTOEXIT:PAnsiChar = 'Miranda/System/OkToExitEvent';
 +
 +  { miranda/system/oktoexit service
 +    Check if everyone is happy to exit
 +    wParam=lParam=0
 +    if everyone acknowleges OK to exit then returns true, otherwise false
 +  }
 +  MS_SYSTEM_OKTOEXIT:PAnsiChar = 'Miranda/System/OkToExit';
 +
 +  { gets the version number of Miranda encoded as a DWORD v0.1.0.1+
 +    wParam=lParam=0
 +    returns the version number, encoded as one version per byte, therefore
 +    version 1.2.3.10 is 0x0102030a
 +  }
 +  MS_SYSTEM_GETVERSION:PAnsiChar = 'Miranda/System/GetVersion';
 +
 +  { gets the version of Miranda encoded as text   v0.1.0.1+
 +    wParam=cch
 +    lParam=(LPARAM)(AnsiChar*)pszVersion
 +    cch is the size of the buffer pointed to by pszVersion, in bytes
 +    may return a build qualifier, such as "0.1.0.1 alpha"
 +    returns 0 on success, nonzero on failure
 +  }
 +  MS_SYSTEM_GETVERSIONTEXT:PAnsiChar = 'Miranda/System/GetVersionText';
 +
 +  { Adds a HANDLE to the list to be checked in the main message loop v0.1.2.0+
 +    wParam=(WPARAM)(HANDLE)hObject
 +    lParam=(LPARAM)(const AnsiChar*)pszService
 +    returns 0 on success or nonzero on failure
 +    Causes pszService to be CallService()d (wParam=hObject,lParam=0) from the
 +    main thread whenever hObject is signalled.
 +    The Miranda message loop has a MsgWaitForMultipleObjects() call in it to
 +    implement this feature. See the documentation for that function for
 +    information on what objects are supported.
 +    There is a limit of MAXIMUM_WAIT_OBJECTS minus one (MWO is defined in winnt.h
 +    to be 64) on the number of handles MSFMO() can process. This service will
 +    return nonzero if that many handles are already being waited on.
 +    As of writing, the following parts of Miranda are thread-safe, so can be
 +    called from any thread:
 +    All of modules.h except NotifyEventHooks()
 +    Read-only parts of m_database.h (since the write parts will call hooks)
 +    All of m_langpack.h
 +    for all other routines your mileage may vary, but I would strongly recommend
 +    that you call them from the main thread, or ask about it on plugin-dev if you
 +    think it really ought to work.
 +    Update during 0.1.2.0 development, 16/10/01:
 +    NotifyEventHooks() now translates all calls into the context of the main
 +    thread, which means that all of m_database.h is now completely safe.
 +    Update during 0.1.2.2 development, 17/4/02:
 +    The main thread's message loop now also deals with asynchronous procedure
 +    calls. Loop up QueueUserAPC() for a neater way to accomplish a lot of the
 +    things that used to require ms_system_waitonhandle.
 +    Miranda is compiled with the multithreaded runtime - don't forget to do the
 +    same with your plugin.
 +  }
 +  MS_SYSTEM_WAITONHANDLE:PAnsiChar = 'Miranda/System/WaitOnHandle';
 +
 +  {Removes a HANDLE from the wait list   v0.1.2.0+ }
 +  {wParam=(WPARAM)(HANDLE)hObject }
 +  {lParam=0 }
 +  {returns 0 on success or nonzero on failure. }
 +  MS_SYSTEM_REMOVEWAIT:PAnsiChar = 'Miranda/System/RemoveWait';
 +
 +  {
 +    wParam=0
 +    lParam=0
 +
 +    This hook is fired just before the thread unwind stack is used,
 +    it allows MT plugins to shutdown threads if they have any special
 +    processing to do, etc.
 +  }
 +  ME_SYSTEM_PRESHUTDOWN:PAnsiChar = 'Miranda/System/PShutdown';
 +
 +  {
 +    wParam=0
 +    lParam=0
 +
 +    Returns TRUE when Miranda has got WM_QUIT and is in the process
 +    of shutting down
 +  }
 +  MS_SYSTEM_TERMINATED:PAnsiChar = 'Miranda/SysTerm';
 +
 +  {
 +    wParam : 0
 +    lParam : (address) void (__cdecl  callback) (void)
 +    Affect : Setup a function pointer to be called after main loop iterations, it allows for
 +           idle processing, See notes
 +    Returns: 1 on success, 0 on failure
 +
 +    Notes  : This service will only allow one function to be registered, if one is registered, 0 will be returned
 +           Remember that this uses __cdecl.
 +    Version: Added during 0.3.4+
 +  }
 +  MS_SYSTEM_SETIDLECALLBACK:PAnsiChar = 'Miranda/SetIdleCallback';
 +
 +  {
 +    wParam : 0
 +    lParam : &tick
 +    Affect : return the last window tick where a monitored event was seen, currently WM_CHAR/WM_MOUSEMOVE
 +    Returns: Always returns 0
 +    Version: Added during 0.3.4+ (2004/09/12)
 +  }
 +  MS_SYSTEM_GETIDLE:PAnsiChar = 'Miranda/GetIdle';
 +
 +  {
 +    wParam: cchMax (max length of buffer)
 +    lParam: pointer to buffer to fill
 +    Affect: Returns the build timestamp of the core, as a string of YYYYMMDDhhmmss, this service might
 +      not exist and therefore the build is before 2004-09-30
 +    Returns: zero on success, non zero on failure
 +    Version: 0.3.4a+ (2004/09/30)
 +    DEFUNCT: This service was removed on 0.3.4.3+ (2004/11/19) use APILEVEL
 +  }
 +  MS_SYSTEM_GETBUILDSTRING:PAnsiChar = 'Miranda/GetBuildString';
 +
 +  {
 +    Missing service catcher
 +    Is being called when one calls the non-existent service.
 +    All parameters are stored in the special structure
 +
 +    The event handler takes 0 as wParam and TMissingServiceParams* as lParam.
 +
 +    0.4.3+ addition (2006/03/27)
 +  }
 +type
 +  PTMissingServiceParams = ^TMissingServiceParams;
 +  TMissingServiceParams = record
 +    name :PAnsiChar;
 +    wParam:WPARAM;
 +    lParam:LPARAM;
 +  end;
 -*)
 -{$IFNDEF M_SYSTEM}
 -{$DEFINE M_SYSTEM}
 +const
 +  ME_SYSTEM_MISSINGSERVICE:PAnsiChar = 'System/MissingService';
 -type
 +{ Unhandled exceptions filter
 +Is being called inside any thread launched via mir_forkthread, including the main thread.
 +If a plugin's author executes a large piece of code inside __try/__except, he should
 +obtain this filter and call it inside the __except section
 -    TMM_INTERFACE = record
 -        cbSize: int;
 -        _malloc: function(cbSize: Integer): Pointer; cdecl;
 -        _realloc: function (pb: Pointer; cbSize: Integer): Pointer; cdecl;
 -        _free: procedure(pb: Pointer); cdecl;
 -    end;
 +0.8.0+ addition (2008/07/20)
 +}
  const
 +  MS_SYSTEM_GETEXCEPTFILTER:PAnsiChar = 'System/GetExceptFilter';
 -    MIRANDANAME                 = 'Miranda';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        affect : called after all modules have been successfully initialised
 -                 used to resolve double-dependencies in the module load order, see notes
 -        return : 0
 -        notes  : Can be used to call services, etc that have not yet loaded
 -                 when your module has.
 -    }
 -    ME_SYSTEM_MODULESLOADED     = 'Miranda/System/ModulesLoaded';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        affect : called just before Miranda terminates, the database is still running
 -                 during this hook
 -        return : 0
 -    }
 -    ME_SYSTEM_SHUTDOWN          = 'Miranda/System/Shutdown';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        affect : called before Miranda actually shuts down -- everyone has to agree
 -                 or it is not shut down.
 -        return : non zero to stop the shutdown
 -    }
 -    ME_SYSTEM_OKTOEXIT          = 'Miranda/System/OkToExitEvent';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        affect : service which sends everyone the ME_SYSTEM_OKTOEXIT event
 -        return : true if everyone is okay to exit, otherwise false
 -    }
 -    MS_SYSTEM_OKTOEXIT          = 'Miranda/System/OkToExit';
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        return : returns the version number -- each byte set with version index,
 -                 e.g. 1.2.3.4 $01020304
 -    }
 -    MS_SYSTEM_GETVERSION        = 'Miranda/System/GetVersion';
 -
 -    {
 -        wParam : size in bytes of the buffer to be filled
 -        lParam : pointer to the buffer to be filled
 -        affect : returns Miranda's version as text with build type such as '1.2.3.4 alpha'
 -        return : 0 on success -- non zero on failure
 -    }
 -    MS_SYSTEM_GETVERSIONTEXT    = 'Miranda/System/GetVersionText';
 -
 -    {
 -        wParam : Handle of a wait object to be used
 -        lParam : pointer to service name
 -        affect : causes the service name to be called whenever the wait object
 -                 is signalled with CallService(Service, wParam=hWaitObjeect, lParam=0)
 -        return : 0 on success, non zero on failure, will always fail if
 -                 more than 64 event objects are already being waited on because
 -                 of the limit imposed by Windows.
 -        version: implemented after v0.1.2.0+
 -        other  : QueueUserAPC() can be used instead of this service to wait
 -                 for notifications, BUT *only* after v0.1.2.2+ since that deals
 -                 with APC's
 -    }
 -    MS_SYSTEM_WAITONHANDLE      = 'Miranda/System/WaitOnHandle';
 -
 -    {
 -        wParam : hWaitObject to be removed
 -        lParam : 0
 -        affect : removes the wait object from the list, see above.
 -        returns: 0 on success, nonzero on failure
 -        version: implemented after v0.1.2.0+
 -    }
 -    MS_SYSTEM_REMOVEWAIT        = 'Miranda/System/RemoveWait';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to an initialised TMM_INTERFACE
 -        affect : Get function pointers to, malloc(), free() and realloc() used by Miranda
 -        note   : this should only be used carefully, make sure .cbSize is initialised with sizeof(TMM_INTERFACE)
 -        version: 0.1.2.2+
 -    }
 -    MS_SYSTEM_GET_MMI           = 'Miranda/System/GetMMI';
 -
 -    {
 -        wParam=0
 -        lParam=0
 -
 -        Add a thread to the unwind wait stack that Miranda will poll on
 -        when it is tearing down modules.
 -
 -        This must be called in the context of the thread that is to be pushed
 -        i.e. there are no args, it works out what thread is being called
 -        and gets itself a handle to the calling thread.
 -    }
 -    MS_SYSTEM_THREAD_PUSH	   = 'Miranda/Thread/Push';
 -
 -    {
 -        wParam=0
 -        lParam=0
 -
 -        Remove a thread from the unwind wait stack -- it is expected
 -        that the call be made in the context of the thread to be removed.
 -
 -        Miranda will begin to tear down modules and plugins if/when the
 -        last thread from the unwind stack is removed.
 -    }
 -    MS_SYSTEM_THREAD_POP	   = 'Miranda/Thread/Pop';
 -
 -    {
 -        wParam=0
 -        lParam=0
 -
 -        This hook is fired just before the thread unwind stack is used,
 -        it allows MT plugins to shutdown threads if they have any special
 -        processing to do, etc.
 -    }
 -    ME_SYSTEM_PRESHUTDOWN	   = 'Miranda/System/PShutdown';
 -
 -    {
 -        wParam=0
 -        lParam=0
 -
 -        Returns TRUE when Miranda has got WM_QUIT and is in the process
 -        of shutting down
 -    }
 -    MS_SYSTEM_TERMINATED	   = 'Miranda/SysTerm';
  {$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_tabsrmm.inc b/include/delphi/m_tabsrmm.inc index cdf42942e2..cdf42942e2 100644 --- a/plugins/Pascal_Headers/m_tabsrmm.inc +++ b/include/delphi/m_tabsrmm.inc diff --git a/plugins/Pascal_Headers/m_timezones.inc b/include/delphi/m_timezones.inc index 61bcb69a2b..61bcb69a2b 100644 --- a/plugins/Pascal_Headers/m_timezones.inc +++ b/include/delphi/m_timezones.inc diff --git a/plugins/Pascal_Headers/m_tipper.inc b/include/delphi/m_tipper.inc index d9fea8208d..d9fea8208d 100644 --- a/plugins/Pascal_Headers/m_tipper.inc +++ b/include/delphi/m_tipper.inc diff --git a/plugins/Pascal_Headers/m_toolbar.inc b/include/delphi/m_toolbar.inc index 75d291b073..75d291b073 100644 --- a/plugins/Pascal_Headers/m_toolbar.inc +++ b/include/delphi/m_toolbar.inc diff --git a/plugins/Pascal_Headers/m_toptoolbar.inc b/include/delphi/m_toptoolbar.inc index d990c458e8..d990c458e8 100644 --- a/plugins/Pascal_Headers/m_toptoolbar.inc +++ b/include/delphi/m_toptoolbar.inc diff --git a/plugins/Pascal_Headers/m_updater.inc b/include/delphi/m_updater.inc index ff000f71bf..ff000f71bf 100644 --- a/plugins/Pascal_Headers/m_updater.inc +++ b/include/delphi/m_updater.inc diff --git a/include/delphi/m_url.inc b/include/delphi/m_url.inc index c991d2a68c..a1a43458ba 100644 --- a/include/delphi/m_url.inc +++ b/include/delphi/m_url.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,21 +18,19 @@ 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_URL}
  {$DEFINE M_URL}
  const
 -
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affects: bring up the send URL dialogbox for a user
 -        Returns: 0 on success, nonzero on failure, see notes
 -        Notes  : service returns before the URL is sent.
 -    }
 -    MS_URL_SENDURL      = 'SRUrl/SendCommand';
 +  {
 +    wParam : HCONTACT
 +    lParam : 0
 +    Affects: bring up the send URL dialogbox for a user
 +    Returns: 0 on success, nonzero on failure, see notes
 +    Notes  : service returns before the URL is sent.
 +  }
 +  MS_URL_SENDURL:PAnsiChar = 'SRUrl/SendCommand';
  {$ENDIF}
 diff --git a/include/delphi/m_userinfo.inc b/include/delphi/m_userinfo.inc index 4ea8a90563..d92f16f955 100644 --- a/include/delphi/m_userinfo.inc +++ b/include/delphi/m_userinfo.inc @@ -1,9 +1,8 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
 -Copyright 2000-2003 Miranda ICQ/IM project,
 -all portions of this codebase are copyrighted to the people
 +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
 @@ -19,66 +18,61 @@ 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_USERINFO}
  {$DEFINE M_USERINFO}
 -const
 +{$include m_options.inc}
 -    {
 -        wParam : HCONTACT
 -        lParam : 0
 -        Affects: Show the user details dialog box for a contact, see notes
 -        Notes  : I think this can be used to display "My User Details"... if NULL(0) is used
 -    }
 -    MS_USERINFO_SHOWDIALOG          = 'UserInfo/ShowDialog';
 -
 -    {
 -        wParam : 0
 -        lParam : HCONTACT
 -        Affects: The details dialog box was opened for a contact maybe NULL(0)
 -                 showing the user details -- see notes
 -        Notes  : The module should do whatever initialisation they need and
 -                 call MS_USERINFO_ADDPAGE one or more times if they want
 -                 pages displayed in the options dialog -- wParam should be passed
 -                 straight as the wParam of MS_USERINFO_ADDPAGE.
 -                 -
 -                 The builtin userinfo module is not loaded til after all plugins
 -                 have loaded -- therefore a HookEvent() for this event will fail,
 -                 use ME_SYSTEM_MODULESLOADED event to know when everything has
 -                 loaded and it's okay to hook this event.
 -        Version: v0.1.2.0+
 -    }
 -    ME_USERINFO_INITIALISE          = 'UserInfo/Initialise';
 +const
 +{
 +  show the User Details dialog box
 +  wParam=(WPARAM)(HANDLE)hContact
 +  lParam=0
 +}
 +  MS_USERINFO_SHOWDIALOG:PAnsiChar = 'UserInfo/ShowDialog';
 -    {
 -        wParam : wParam from ME_USERINFO_INITIALISE
 -        lParam : pointer to an initialised OPTIONSDIALOGPAGE (see m_options.inc)
 -        Affects: Adds a page to the details dialog, see notes
 -        Notes  : this service should only be called within the ME_USERINFO_INITIALISE
 -                 event -- when the pages get (WM_INITDIALOG lParam=HCONTACT) strings
 -                 in the passed dialog structure can be freed soon as the service returns
 -                 icons must be kept around (not a problem if you're loading from resource).
 -                 -
 -                 The group elements within the OPTIONSDIALOGPAGE are ignored,
 -                 details dialog page should be 222x132 DLU's -- the details dialog
 -                 box currently has no cancel button, pages will be sent PSN_INFOCHANGED
 -                 thru WM_NOTIFY (idFrom=0) when a protocol ACK is broadcast for
 -                 the correct contact with the type ACKTYPE_GETINFO.
 -                 -
 -                 PSN_INFOCHANGED will also be sent just after the page is created
 -                 to help you out.
 -                 -
 -                 All PSN_* WM_NOTIFY messages have PSHNOTIFY.lParam=(LPARAM)hContact
 -        Version: v0.1.2.0+
 -    }
 +{ UserInfo/Initialise      v0.1.2.0+
 + The user opened a details dialog. Modules should do whatever initialisation
 + they need and call userinfo/addpage one or more times if they want pages
 + displayed in the options dialog
 + wParam=addInfo
 + lParam=(LPARAM)hContact
 + addInfo should be passed straight to the wParam of userinfo/addpage
 + NB: The built-in userinfo module is loaded after all plugins, so calling
 + HookEvent() in your plugin's Load() function will fail if you specify this
 + hook. Look up core/m_system.h:me_system_modulesloaded.
 +}
 +  ME_USERINFO_INITIALISE:PAnsiChar = 'UserInfo/Initialise';
 -    PSN_INFOCHANGED                 = 1;
 -    { force-send a PSN_INFOCHANGED to all pages }
 -    PSM_FORCECHANGED                = ($0400 + 100);
 +{ UserInfo/AddPage        v0.1.2.0+
 + Must only be called during an userinfo/initialise hook
 + Adds a page to the details dialog
 + wParam=addInfo
 + lParam=(LPARAM)(OPTIONSDIALOGPAGE*)odp
 + addInfo must have come straight from the wParam of userinfo/initialise
 + Pages in the details dialog operate just like pages in property sheets. See the
 + Microsoft documentation for info on how they operate.
 + When the pages receive WM_INITDIALOG, lParam=(LPARAM)hContact
 + Strings in the structure can be released as soon as the service returns, but
 + icons must be kept around. This is not a problem if you're loading them from a
 + resource
 + The 3 'group' elements in the structure are ignored, and will always be ignored
 + Unlike the options dialog, the details dialog does not resize to fit its
 + largest page. Details dialog pages should be 222x132 dlus.
 + The details dialog (currently) has no Cancel button. I'm waiting to see if it's
 + sensible to have one.
 + Pages will be sent PSN_INFOCHANGED through WM_NOTIFY (idFrom=0) when a protocol
 + ack is broadcast for the correct contact and with type=ACKTYPE_GETINFO.
 + To help you out, PSN_INFOCHANGED will also be sent to each page just after it's
 + created.
 + All PSN_ WM_NOTIFY messages have PSHNOTIFY.lParam=(LPARAM)hContact
 +}
 +  PSN_INFOCHANGED  = 1;
 +  PSN_PARAMCHANGED = 2;
 -    MS_USERINFO_ADDPAGE             = 'UserInfo/AddPage';
 +  PSM_FORCECHANGED = (WM_USER+100);   //force-send a PSN_INFOCHANGED to all pages
 +  MS_USERINFO_ADDPAGE:PAnsiChar = 'UserInfo/AddPage';
  {$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_userinfoex.inc b/include/delphi/m_userinfoex.inc index b4aff7e7e8..b4aff7e7e8 100644 --- a/plugins/Pascal_Headers/m_userinfoex.inc +++ b/include/delphi/m_userinfoex.inc diff --git a/include/delphi/m_utils.inc b/include/delphi/m_utils.inc index b0cabfff44..eac9de22bb 100644 --- a/include/delphi/m_utils.inc +++ b/include/delphi/m_utils.inc @@ -1,279 +1,387 @@ -(*
 -
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_UTILS}
  {$DEFINE M_UTILS}
  const
 +  RD_ANCHORX_CUSTOM = 0; // function did everything required to the x axis, do no more processing
 +  RD_ANCHORX_LEFT   = 0; // move the control to keep it constant distance from the left edge of the dialog
 +  RD_ANCHORX_RIGHT  = 1; // move the control to keep it constant distance from the right edge of the dialog
 +  RD_ANCHORX_WIDTH  = 2; // size the control to keep it constant distance from both edges of the dialog
 +  RD_ANCHORX_CENTRE = 4; // move the control to keep it constant distance from the centre of the dialog
 +  RD_ANCHORY_CUSTOM = 0;
 +  RD_ANCHORY_TOP    = 0;
 +  RD_ANCHORY_BOTTOM = 8;
 +  RD_ANCHORY_HEIGHT = 16;
 +  RD_ANCHORY_CENTRE = 32;
 +
 +  // for MS_UTILS_RESTOREWINDOWPOSITION
 +  RWPF_NOSIZE     = 1; // don't use stored size info: leave dialog same size
 +  RWPF_NOMOVE     = 2; // don't use stored position
 +  RWPF_NOACTIVATE = 4; // show but don't activate v0.3.3.0+
 +  RWPF_HIDDEN     = 8; // make it hidden v0.9.0.9+
 +
 +  // for WNDCLASS_COLOURPICKER
 +  CPM_SETCOLOUR        = $1000;// lParam=new colour
 +  CPM_GETCOLOUR        = $1001;// returns colour
 +  CPM_SETDEFAULTCOLOUR = $1002;// lParam=default, used as first custom colour
 +  CPM_GETDEFAULTCOLOUR = $1003;// returns colour
 +  CPN_COLOURCHANGED    = 1;  // sent through WM_COMMAND
 +
 +  //  Colour picker control, see CPM_* and CPN_* constants above
 +  WNDCLASS_COLOURPICKER = 'ColourPicker';
 +
 +  // hyperlink messages
 +  {
 +    Use this in a SendMessage to set the color of the url when control is enabled
 +    wParam=DWORD color
 +    lParam=not used
 +  }
 +  HLK_SETENABLECOLOUR = WM_USER+101; // added in 0.3.1
 +
 +  {
 +    Use this in a SendMessage to set the color of the url when control is disabled
 +    wParam=DWORD color
 +    lParam=not used
 +  }
 +  HLK_SETDISABLECOLOUR = WM_USER+102; // added in 0.3.1
 -    RD_ANCHORX_CUSTOM           = 0;	// function did everything required to the x axis, do no more processing
 -    RD_ANCHORX_LEFT             = 0;	// move the control to keep it constant distance from the left edge of the dialog
 -    RD_ANCHORX_RIGHT            = 1;	// move the control to keep it constant distance from the right edge of the dialog
 -    RD_ANCHORX_WIDTH            = 2;	// size the control to keep it constant distance from both edges of the dialog
 -    RD_ANCHORX_CENTRE           = 4;	// move the control to keep it constant distance from the centre of the dialog
 -    RD_ANCHORY_CUSTOM           = 0;
 -    RD_ANCHORY_TOP              = 0;
 -    RD_ANCHORY_BOTTOM           = 8;
 -    RD_ANCHORY_HEIGHT           = 16;
 -    RD_ANCHORY_CENTRE           = 32;
 -
 -    // for MS_UTILS_RESTOREWINDOWPOSITION
 -
 -    RWPF_NOSIZE                 = 1;    // don't use stored size info: leave dialog same size
 -    RWPF_NOMOVE                 = 2;    // don't use stored position
 -
 -    // for WNDCLASS_COLOURPICKER
 -
 -    CPM_SETCOLOUR               = $1000;// lParam=new colour
 -    CPM_GETCOLOUR               = $1001;// returns colour
 -    CPM_SETDEFAULTCOLOUR        = $1002;// lParam=default, used as first custom colour
 -    CPM_GETDEFAULTCOLOUR        = $1003;// returns colour
 -    CPN_COLOURCHANGED           = 1;	// sent through WM_COMMAND
 +type
 +  PUTILRESIZECONTROL = ^TUTILRESIZECONTROL;
 +  TUTILRESIZECONTROL = record
 +    cbSize         : int;
 +    wId            : int;   // control ID
 +    rcItem         : TRECT; // original control rectangle, relative to dialog
 +                            // modify in-placee to specify the new position
 +    dlgOriginalSize: TSize; // size of dialog client area in template
 +    dlgNewSize     : TSize; // current size of dialog client area
 +  end;
 +
 +  TDIALOGRESIZERPROC = function(hwndDlg: THANDLE; lParam: LPARAM; urc: PUTILRESIZECONTROL): int; cdecl;
 +
 +  PUTILRESIZEDIALOG = ^TUTILRESIZEDIALOG;
 +  TUTILRESIZEDIALOG = record
 +    cbSize    : int;
 +    hwndDlg   : HWND;
 +    hInstance : HINST;
 +    lpTemplate: PAnsiChar;
 +    lParam    : LPARAM;
 +    pfnResizer: TDIALOGRESIZERPROC;
 +  end;
 +
 +  PCountryListEntry = ^TCountryListEntry;
 +  TCountryListEntry = record
 +    id    : int;
 +    szName: PAnsiChar;
 +  end;
 +
 +  PWINDOWLISTENTRY = ^TWINDOWLISTENTRY;
 +  TWINDOWLISTENTRY = record
 +    hList   : THANDLE;
 +    hWnd    : HWND;
 +    hContact: THANDLE;
 +  end;
 +
 +  PSAVEWINDOWPOS = ^TSAVEWINDOWPOS;
 +  TSAVEWINDOWPOS = record
 +    hWnd        : HWND;
 +    hContact    : THANDLE;
 +    szModule    : PAnsiChar;        // module name eto store the settings in
 +    szNamePrefix: PAnsiChar;        // text to prefix on 'x', 'width', etc
 +  end;
 +const
 +  OUF_NEWWINDOW = 1;
 +  OUF_UNICODE   = 2;
 +  {
 +    wParam : OUF_* flag
 +    lParam : Pointer to a null terminated string containing Url
 +    Affect : Open a URL in the user's default web browser, see notes
 +    Returns: 0 on success, [non zero on failure]
 +    Notes  : bOpenInWindow should be zero to open the URL in the browoser window
 +             the user last used, or nonzero to open in a new browser window,
 +             if there's no browser running, it will be started to show the URL
 +    Version: v0.1.0.1+
 +  }
 +  MS_UTILS_OPENURL:PAnsiChar = 'Utils/OpenURL';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to an initalised TUTILRESIZEDIALOG structure
 +    Affect : Resize a dialog by calling a custom routine to move each control, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : Does not support DIALOGTEMPLATEEX dialogboxes, and will return
 +             failure if you try to resize one.-
 +             the dialog iteself should have been resized prior to calling this
 +             service, .pfnResizer is called once for each control in the dialog
 +             .pfnResizer should return a combination of one RD_ANCHORx_ and one RD_ANCHORy constant
 +    Version: v0.1.0.1+
 +  }
 +  MS_UTILS_RESIZEDIALOG:PAnsiChar = 'Utils/ResizeDialog';
 +
 +  {
 +    wParam : countryID
 +    lParam : 0
 +    Affect : Get the name of a country given it's number, e.g. 44 = UK
 +    Returns: Returns a pointer to a string containing the country name on success
 +             NULL(0) on failure
 +    Version: v0.1.2.0+
 +  }
 +  MS_UTILS_GETCOUNTRYBYNUMBER:PAnsiChar = 'Utils/GetCountryByNumber';
 +
 +  {
 +    wParam : Pointer to an int to be filled with count  -- !TODO! test.
 +    lParam : Pointer to an PCountryListEntry, see notes
 +    Affect : Get the full list of country IDs, see notes
 +    Returns: 0 always
 +    Notes  : the list is sorted alphabetically by name, on the assumption
 +             it's quicker to search numbers that are out of outer, than strings
 +             that are out of order. a NULL(0) entry terminates
 +             -
 +             Neither wParam or lParam can be NULL(0)
 +             -
 +             lParam is filled with the first entry, it can be accessed as a pointer,
 +             to get the next entry, increment the pointer by sizeof(Pointer) NOT
 +             sizeof(TCountryList), only increment the pointer as many times as
 +             given by iCount.
 +             -
 +             this data can NOT be copied if an array of TCountryListEntry's is passed
 +             so don't try it.
 +    Version: v0.1.2.0+
 +  }
 +  MS_UTILS_GETCOUNTRYLIST:PAnsiChar = 'Utils/GetCountryList';
 +
 +  // see WindowList_* functions below
 +
 +  {
 +    wParam : 0
 +    lParam : 0
 +    Affect : Allocate a window list
 +    Returns: A handle to the new window list
 +    Version: v0.1.0.1+
 +  }
 +  MS_UTILS_ALLOCWINDOWLIST:PAnsiChar = 'Utils/AllocWindowList';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to an initalised TWINDOWLISTENTRY structure
 +    Affect : Add a window to a given window list handle
 +    Returns: 0 on success, [non zero] on failure
 +    Version: v0.1.0.1+
 +  }
 +  MS_UTILS_ADDTOWINDOWLIST:PAnsiChar = 'Utils/AddToWindowList';
 +
 +  {
 +    wParam : Handle to window list to remove from
 +    lParam : Window handle to remove
 +    Affect : Remove a window from the specified window list
 +    Returns: 0 on success, [non zero] on failure
 +    Version: v0.1.0.1+
 +  }
 +  MS_UTILS_REMOVEFROMWINDOWLIST:PAnsiChar = 'Utils/RemoveFromWindowList';
 +
 +  {
 +    wParam : Handle to the window list to look in
 +    lParam : Handle to a HCONTACT to find in the window list
 +    Affect : Find a window handle given the hContact
 +    Returns: The found window handle or NULL(0) on failure
 +    Version: v0.1.0.1+
 +  }
 +  MS_UTILS_FINDWINDOWINLIST:PAnsiChar = 'Utils/FindWindowInList';
 +
 +  {
 +    wParam : Handle to window list
 +    lParam : Pointer to TMSG (initalised with what to broadcast)
 +    Affect : Broadcast a message to all windows in a list, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : only TMSG.Message, .wParam, .lParam are used
 +    Version: v0.1.0.1+
 +  }
 +  MS_UTILS_BROADCASTTOWINDOWLIST:PAnsiChar = 'Utils/BroadcastToWindowList';
 +
 +  {
 +  Version: 0.3.0.0+
 +  Inline helper: WindowList_BroadcastAsync
 +  wParam : Handle to window list
 +  lParam : Pointer to TMSG (initalised with what to broadcast)
 +  Affect : Broadcast a message to all windows in the given list using PostMessage()
 +  Returns: 0 on success, nonzero on failure, this service does not fail,
 +           even if PostMessage() fails for whatever reason
 +  }
 +  MS_UTILS_BROADCASTTOWINDOWLIST_ASYNC:PAnsiChar = 'Utils/BroadcastToWindowListAsync';
 +
 +  {
 +    There aren't any services here, there's no need for them, the control class
 +    will obey the SS_LEFT (0), SS_CENTER (1), SS_RIGHT(2) styles
 +    the control will send STN_CLICKED via WM_COMMAND when the link itself is clicked
 +    -
 +    These are defined by STATIC controls and STN_CLICKED is sent to standard
 +    STATIC classes when they're clicked -- look at WINAPI docs for more info
 +  }
 +  WNDCLASS_HYPERLINK = 'Hyperlink';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to a initialised TSAVEWINDOWPOS structure
 +    Affect :
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  :
 +    Version: v0.1.1.0+
 +  }
 +  MS_UTILS_SAVEWINDOWPOSITION:PAnsiChar = 'Utils/SaveWindowPos';
 +
 +  {
 +    wParam : see RWPF_* flags
 +    lParam : Pointer to a initalised TSAVEWINDOWPOS
 +    Affect : Restores the position of a window from the database, see notes
 +    Returns: 0 on success, [non zero] on failure
 +    Notes  : If no position info was found, the service will return 1.
 +             The NoSize version won't use stored information size, the window
 +             is left the same size
 +             -
 +             See Utils_RestoreWindowPosition() Helper function, this function is
 +             a bit different from the C function (which can be inlined too! dammit)
 +             that there's only one function and not three (which just passed different flags)
 +    Version: v0.1.1.0+
 +  }
 +  MS_UTILS_RESTOREWINDOWPOSITION:PAnsiChar = 'Utils/RestoreWindowPos';
 +
 +{
 +    wParam : pointer to RECT
 +    lParam : 0
 +    Affect : Moves a RECT inside screen if it is outside.It works with multiple monitors (v0.9.0.4+)
 +    Returns: <0 on error, 0 if not changed the rect, 1 if changed the rect
 +}
 +  MS_UTILS_ASSERTINSIDESCREEN:pAnsiChar = 'Utils/AssertInsideScreen';
 +
 +  {
 +    wParam : 0
 +    lParam : Pointer to a null terminated string containing filename
 +    Affect : Loads a bitmap (or other graphic type, see Notes
 +    Returns: HBITMAP on success, NULL(0) on failure
 +    Notes  : This function also supports JPEG, GIF (and maybe PNG too)
 +             For speed, if the file extention is .bmp or .rle it will use LoadImage()
 +             and not load OLE for the extra image support
 +             -
 +             Remember to delete the returned handle with DeleteObject (see GDI documentation for WINAPI)
 +    Version: v0.1.2.1+
 +  }
 +  MS_UTILS_LOADBITMAP :PAnsiChar = 'Utils/LoadBitmap';
 +  MS_UTILS_LOADBITMAPW:PAnsiChar = 'Utils/LoadBitmapW';
 +
 +  {
 +      wParam : byte length of buffer (not to be confused with byte range)
 +      lParam : Pointer to buffer
 +      Affect : Get the filter strings for use in the open file dialog, see notes
 +      Returns: 0 on success [non zero] on failure
 +      Notes  : See the WINAPI under OPENFILENAME.lpStrFiler for formatting,
 +               an 'All bitmaps' item is alway first, and 'All files' is always last
 +               -
 +               The returned string is always formatted
 +               -
 +               To build this filter, the filter string consists of
 +               filter followed by a descriptive text
 +               followed by more filters and their descriptive texts -- end with double NULL(0)
 +               e.g. *.bmp' #0 'All bitmaps' #0 '*.*' #0 'All Files' #0 #0
 +  }
 +  MS_UTILS_GETBITMAPFILTERSTRINGS :PAnsiChar = 'Utils/GetBitmapFilterStrings';
 +  MS_UTILS_GETBITMAPFILTERSTRINGSW:PAnsiChar = 'Utils/GetBitmapFilterStringsW';
 +
 +  {
 +    wParam : pszPath
 +    lParam : pszNewPath
 +    Affect : Saves a path to a relative path (from the miranda directory)
 +             Only saves as a relative path if the file is in the miranda
 +             directory (or sub directory)
 +    Notes  : pszPath is the path to convert and pszNewPath is the buffer that
 +             the new path is copied too. pszNewPath MUST be of the size MAX_PATH.
 +    Returns: numbers of chars copied.
 +  }
 +  MS_UTILS_PATHTORELATIVE :PAnsiChar = 'Utils/PathToRelative';
 +//Unicode versions (0.6.2+)
 +  MS_UTILS_PATHTORELATIVEW:PAnsiChar = 'Utils/PathToRelativeW';
 +
 +  {
 +    Affect : Saves a path to a absolute path (from the miranda directory)
 +    wParam : pszPath
 +    lParam : pszNewPath
 +    Notes  : pszPath is the path to convert and pszNewPath is the buffer that
 +             the new path is copied too. pszNewPath MUST be of the size MAX_PATH.
 +    Returns: numbers of chars copied.
 +  }
 +  MS_UTILS_PATHTOABSOLUTE :PAnsiChar = 'Utils/PathToAbsolute';
 +//Unicode versions (0.6.2+)
 +  MS_UTILS_PATHTOABSOLUTEW:PAnsiChar = 'Utils/PathToAbsoluteW';
 +
 +{
 +  Creates a directory tree (even more than one directories levels are missing) 0.7.0+
 +  wParam=0 (unused)
 +  lParam=pszPath - directory to be created
 +  Returns 0 on success error code otherwise
 +  Unicode version is available since 0.7.0
 +}
 +  MS_UTILS_CREATEDIRTREE :PAnsiChar = 'Utils/CreateDirTree';
 +  MS_UTILS_CREATEDIRTREEW:PAnsiChar = 'Utils/CreateDirTreeW';
 +
 +{
 +   Generates Random number of any length
 +  wParam=size - length of the random number to generate
 +  lParam=(LPARAM)(char*)pszArray - pointer to array to fill with random number
 +  Always returns 0
 +}
 +  MS_UTILS_GETRANDOM:PAnsiChar = 'Utils/GetRandom';
 +
 +//Replace variables in text
 +//wParam=(char*/TCHAR*/WCHAR*)string (depends on RVF_UNICODE/RVF_TCHAR flag)
 +//lParam=(REPLACEVARSDATA *) data about variables, item with key=0 terminates the list
 +//returns new string, use mir_free to destroy
  type
 +  PREPLACEVARSARRAY = ^TREPLACEVARSARRAY;
 +  TREPLACEVARSARRAY = record
 +    szKey  :TCHAR;
 +    szValue:TCHAR;
 +  end;
 -    PUTILRESIZECONTROL = ^TUTILRESIZECONTROL;
 -    TUTILRESIZECONTROL = record
 -        cbSize: int;
 -        wId: int;               // control ID
 -        rcItem: TRect;          // original control rectangle, relative to dialog
 -                                // modify in-placee to specify the new position
 -        dlgOriginalSize: TSize; // size of dialog client area in template
 -        dlgNewSize: TSize;      // current size of dialog client area
 -    end;
 -
 -    TDIALOGRESIZERPROC = function(hwndDlg: THandle; lParam: LPARAM; urc: PUTILRESIZECONTROL): int; cdecl;
 -
 -    PUTILRESIZEDIALOG = ^TUTILRESIZEDIALOG;
 -    TUTILRESIZEDIALOG = record
 -        cbSize: int;
 -        hwndDlg: THandle;
 -        hInstance: THandle;
 -        lpTemplate: PChar;
 -        lParam: LPARAM;
 -        pfnResizer: TDIALOGRESIZERPROC;
 -    end;
 -
 -    PCountryListEntry = ^TCountryListEntry;
 -    TCountryListEntry = record
 -        id: int;
 -        szName: PChar;
 -    end;
 -
 -    PWINDOWLISTENTRY = ^TWINDOWLISTENTRY;
 -    TWINDOWLISTENTRY = record
 -        hList: THandle;
 -        hWnd: THandle;
 -        hContact: THandle;
 -    end;
 -
 -    PSAVEWINDOWPOS = ^TSAVEWINDOWPOS;
 -    TSAVEWINDOWPOS = record
 -        hWnd: THandle;
 -        hContact: THandle;
 -        szModule: PChar;            // module name eto store the settings in
 -        szNamePrefix: PChar;        // text to prefix on 'x', 'width', etc
 -    end;
 +type
 +  TREPLACEVARSDATA = record
 +    cbSize   :int;
 +    dwFlags  :dword;
 +    hContact :THANDLE;
 +    variables:PREPLACEVARSARRAY;
 +  end;
  const
 -
 -    {
 -        wParam : bOpenInNewWindow
 -        lParam : Pointer to a null terminated string containing Url
 -        Affect : Open a URRL in the user's default web browser, see notes
 -        Returns: 0 on success, [non zero on failure]
 -        Notes  : bOpenInWindow should be zero to open the URL in the browoser window
 -                 the user last used, or nonzero to open in a new browser window,
 -                 if there's no browser running, it will be started to show the URL
 -        Version: v0.1.0.1+
 -    }
 -    MS_UTILS_OPENURL                = 'Utils/OpenURL';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to an initalised TUTILRESIZEDIALOG structure
 -        Affect : Resize a dialog by calling a custom routine to move each control, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : Does not support DIALOGTEMPLATEEX dialogboxes, and will return
 -                 failure if you try to resize one.-
 -                 the dialog iteself should have been resized prior to calling this
 -                 service, .pfnResizer is called once for each control in the dialog
 -                 .pfnResizer should return a combination of one RD_ANCHORx_ and one RD_ANCHORy constant
 -        Version: v0.1.0.1+
 -    }
 -    MS_UTILS_RESIZEDIALOG	        = 'Utils/ResizeDialog';
 -
 -    {
 -        wParam : countryID
 -        lParam : 0
 -        Affect : Get the name of a country given it's number, e.g. 44 = UK
 -        Returns: Returns a pointer to a string containing the country name on success
 -                 NULL(0) on failure
 -        Version: v0.1.2.0+
 -    }
 -    MS_UTILS_GETCOUNTRYBYNUMBER     = 'Utils/GetCountryByNumber';
 -
 -    {
 -        wParam : Pointer to an int to be filled with count  -- !TODO! test.
 -        lParam : Pointer to an PCountryListEntry, see notes
 -        Affect : Get the full list of country IDs, see notes
 -        Returns: 0 always
 -        Notes  : the list is sorted alphabetically by name, on the assumption
 -                 it's quicker to search numbers that are out of outer, than strings
 -                 that are out of order. a NULL(0) entry terminates
 -                 -
 -                 Neither wParam or lParam can be NULL(0)
 -                 -
 -                 lParam is filled with the first entry, it can be accessed as a pointer,
 -                 to get the next entry, increment the pointer by sizeof(Pointer) NOT
 -                 sizeof(TCountryList), only increment the pointer as many times as
 -                 given by iCount.
 -                 -
 -                 this data can NOT be copied if an array of TCountryListEntry's is passed
 -                 so don't try it.
 -        Version: v0.1.2.0+
 -    }
 -    MS_UTILS_GETCOUNTRYLIST         = 'Utils/GetCountryList';
 -
 -    // see WindowList_* functions below
 -
 -    {
 -        wParam : 0
 -        lParam : 0
 -        Affect : Allocate a window list
 -        Returns: A handle to the new window list
 -        Version: v0.1.0.1+
 -    }
 -    MS_UTILS_ALLOCWINDOWLIST        = 'Utils/AllocWindowList';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to an initalised TWINDOWLISTENTRY structure
 -        Affect : Add a window to a given window list handle
 -        Returns: 0 on success, [non zero] on failure
 -        Version: v0.1.0.1+
 -    }
 -    MS_UTILS_ADDTOWINDOWLIST        = 'Utils/AddToWindowList';
 -
 -    {
 -        wParam : Handle to window list to remove from
 -        lParam : Window handle to remove
 -        Affect : Remove a window from the specified window list
 -        Returns: 0 on success, [non zero] on failure
 -        Version: v0.1.0.1+
 -    }
 -    MS_UTILS_REMOVEFROMWINDOWLIST   = 'Utils/RemoveFromWindowList';
 -
 -    {
 -        wParam : Handle to the window list to look in
 -        lParam : Handle to a HCONTACT to find in the window list
 -        Affect : Find a window handle given the hContact
 -        Returns: The found window handle or NULL(0) on failure
 -        Version: v0.1.0.1+
 -    }
 -    MS_UTILS_FINDWINDOWINLIST       = 'Utils/FindWindowInList';
 -
 -    {
 -        wParam : Handle to window list
 -        lParam : Pointer to TMSG (initalised with what to broadcast)
 -        Affect : Broadcast a message to all windows in a list, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : only TMSG.Message, .wParam, .lParam are used
 -        Version: v0.1.0.1+
 -    }
 -    MS_UTILS_BROADCASTTOWINDOWLIST  = 'Utils/BroadcastToWindowList';
 -
 -    {
 -        There aren't any services here, there's no need for them, the control class
 -        will obey the SS_LEFT (0), SS_CENTER (1), SS_RIGHT(2) styles
 -        the control will send STN_CLICKED via WM_COMMAND when the link itself is clicked
 -        -
 -        These are defined by STATIC controls and STN_CLICKED is sent to standard
 -        STATIC classes when they're clicked -- look at WINAPI docs for more info
 -    }
 -    WNDCLASS_HYPERLINK              = 'Hyperlink';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a initialised TSAVEWINDOWPOS structure
 -        Affect :
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  :
 -        Version: v0.1.1.0+
 -    }
 -    MS_UTILS_SAVEWINDOWPOSITION     = 'Utils/SaveWindowPos';
 -
 -    {
 -        wParam : see RWPF_* flags
 -        lParam : Pointer to a initalised TSAVEWINDOWPOS
 -        Affect : Restores the position of a window from the database, see notes
 -        Returns: 0 on success, [non zero] on failure
 -        Notes  : If no position info was found, the service will return 1.
 -                 The NoSize version won't use stored information size, the window
 -                 is left the same size
 -                 -
 -                 See Utils_RestoreWindowPosition() Helper function, this function is
 -                 a bit different from the C function (which can be inlined too! dammit)
 -                 that there's only one function and not three (which just passed different flags)
 -        Version: v0.1.1.0+
 -    }
 -    MS_UTILS_RESTOREWINDOWPOSITION  = 'Utils/RestoreWindowPos';
 -
 -    {
 -        Colour picker control, see CPM_* and CPN_* constants above
 -    }
 -    WNDCLASS_COLOURPICKER           = 'ColourPicker';
 -
 -    {
 -        wParam : 0
 -        lParam : Pointer to a null terminated string containing filename
 -        Affect : Loads a bitmap (or other graphic type, see Notes
 -        Returns: HBITMAP on success, NULL(0) on failure
 -        Notes  : This function also supports JPEG, GIF (and maybe PNG too)
 -                 For speed, if the file extention is .bmp or .rle it will use LoadImage()
 -                 and not load OLE for the extra image support
 -                 -
 -                 Remember to delete the returned handle with DeleteObject (see GDI documentation for WINAPI)
 -        Version: v0.1.2.1+
 -    }
 -    MS_UTILS_LOADBITMAP             = 'Utils/LoadBitmap';
 -
 -    {
 -        wParam : byte length of buffer (not to be confused with byte range)
 -        lParam : Pointer to buffer
 -        Affect : Get the filter strings for use in the open file dialog, see notes
 -        Returns: 0 on success [non zero] on failure
 -        Notes  : See the WINAPI under OPENFILENAME.lpStrFiler for formatting,
 -                 an 'All bitmaps' item is alway first, and 'All files' is always last
 -                 -
 -                 The returned string is always formatted
 -                 -
 -                 To build this filter, the filter string consists of
 -                 filter followed by a descriptive text
 -                 followed by more filters and their descriptive texts -- end with double NULL(0)
 -                 e.g. *.bmp' #0 'All bitmaps' #0 '*.*' #0 'All Files' #0 #0
 -    }
 -    MS_UTILS_GETBITMAPFILTERSTRINGS = 'Utils/GetBitmapFilterStrings';
 -
 -{$endif}
 +  RVF_UNICODE = 1;
 +
 +  MS_UTILS_REPLACEVARS:PAnsiChar = 'Utils/ReplaceVars';
 +
 +{
 +  variables known by the core:
 +  ----------------------------
 +  %miranda_profile%     -> same as MS_DB_GETPROFILEPATH, base folder for all profiles
 +  %miranda_userdata%    -> the active profile folder (home of the .dat file and all
 +                           profile data)
 +  %miranda_path%        -> home path of the miranda installation (installation path
 +                           of miranda32/64.exe
 +  %miranda_profilename% -> Name of the profile in use. Essentially, the name of the
 +                           .dat file without file name extension. Also: the folder name
 +                           relative to %miranda_profile% where all profile data is stored.
 +  %miranda_logpath%     -> base folder for log files. This is \Logs relative to the
 +                           current profile folder.
 +  %miranda_avatarcache% -> base folder for all protocol avatars. internal use only.
 +
 +  the following variables operate on contacts. REPLACEVARSDATA::hContact must be
 +  supplied by the caller.
 +
 +  %nick%                -> a contact nick name.
 +  %proto%               -> internal protocol name for a given contact. NOT the user-
 +                           defined account name.
 +  %userid%              -> Unique ID for a given contact (UIN, JID etc.)
 +
 +  the following variables are system variables - unrelated to miranda profiles.
 +
 +  %appdata%             -> same as %APPDATA% environment variable.
 +  %destkop%             -> location of the desktop folder in a user's profile.
 +  %mydocuments%         -> location of the "My Documents" shell folder.
 +}
 +
 +
 +{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_variables.inc b/include/delphi/m_variables.inc index a4c1bda0c9..a4c1bda0c9 100644 --- a/plugins/Pascal_Headers/m_variables.inc +++ b/include/delphi/m_variables.inc diff --git a/plugins/Pascal_Headers/m_xml.inc b/include/delphi/m_xml.inc index a085193eaf..a085193eaf 100644 --- a/plugins/Pascal_Headers/m_xml.inc +++ b/include/delphi/m_xml.inc diff --git a/include/delphi/newpluginapi.inc b/include/delphi/newpluginapi.inc deleted file mode 100644 index 687a3dbe2d..0000000000 --- a/include/delphi/newpluginapi.inc +++ /dev/null @@ -1,94 +0,0 @@ -(*
 -
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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 NEWPLUGINAPI}
 -{$DEFINE NEWPLUGINAPI}
 -
 -const
 -
 -    MAXMODULELABELLENGTH = 64;
 -
 -type
 -
 -    PPLUGININFO = ^TPLUGININFO;
 -    TPLUGININFO = record
 -        cbSize: int;
 -        shortName: PChar;
 -        version: DWORD;
 -        description: PChar;
 -        author: PChar;
 -        authorEmail: PChar;
 -        copyright: PChar;
 -        homepage: PChar;
 -        isTransient: Byte;              // leave zero for now
 -        { one of the DEFMOD_* consts in m_plugin or zero, if non zero, this will
 -        suppress loading of the specified builtin module }
 -        replacesDefaultModule: int;
 -    end;
 -
 -    { modules.h is never defined -- no check needed }
 -
 -    TMIRANDAHOOK = function(wParam: WPARAM; lParam: LPARAM): int; cdecl;
 -    TMIRANDASERVICE = function(wParam: WPARAM; lParam: LPARAM): int; cdecl;
 -
 -    //see modules.h tor what all this stuff is
 -
 -    TCreateHookableEvent = function(const char: PChar): THandle; cdecl;
 -    TDestroyHookableEvent = function(Handle: THandle): int; cdecl;
 -    TNotifyEventHooks = function(Handle: THandle; wParam: WPARAM; lParam: LPARAM): int; cdecl;
 -    THookEvent  = function(const char: PChar; MIRANDAHOOK: TMIRANDAHOOK): THandle; cdecl;
 -    THookEventMessage = function(const char: PChar; Wnd: THandle; wMsg: Integer): THandle; cdecl;
 -    TUnhookEvent = function(Handle: THandle): int; cdecl;
 -    TCreateServiceFunction = function(const char: PChar; MIRANDASERVICE: TMIRANDASERVICE): THandle; cdecl;
 -    TCreateTransientServiceFunction = function(const char: PChar; MIRANDASERVICE: TMIRANDASERVICE): THandle; cdecl;
 -    TDestroyServiceFunction = function(Handle: THandle): int; cdecl;
 -    TCallService = function(const char: PChar; wParam: WPARAM; lParam: LPARAM): int; cdecl;
 -    TServiceExists = function(const char: PChar): int; cdecl;
 -
 -    PPLUGINLINK = ^TPLUGINLINK;
 -    TPLUGINLINK = record
 -        CreateHookableEvent: TCreateHookableEvent;
 -        DestroyHookableEvent: TDestroyHookableEvent;
 -        NotifyEventHooks: TNotifyEventHooks;
 -        HookEvent: THookEvent;
 -        HookEventMessage: THookEventMessage;
 -        UnhookEvent: TUnhookEvent;
 -        CreateServiceFunction: TCreateServiceFunction;
 -        CreateTransientServiceFunction: TCreateTransientServiceFunction;
 -        DestroyServiceFunction: TDestroyServiceFunction;
 -        CallService: TCallService;
 -        ServiceExists: TServiceExists;      // v0.1.0.1+
 -    end;
 -
 -    { any module must export the below functions to be valid plugin
 -    the export names MUST be 'MirandaPluginInfo' 'Load' 'Unload' }
 -
 -    TMirandaPluginInfo      = function(mirandaVersion: DWORD): PPLUGININFO; cdecl;
 -    TLoad                   = function(link: PPLUGINLINK): int; cdecl;
 -    TUnload                 = function: int; cdecl;
 -
 -const
 -
 -    CALLSERVICE_NOTFOUND        = $80000000;
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/reserve/imgdecoder.pas b/include/delphi/reserve/imgdecoder.pas index eea6ec2610..eea6ec2610 100644 --- a/plugins/Pascal_Headers/reserve/imgdecoder.pas +++ b/include/delphi/reserve/imgdecoder.pas diff --git a/plugins/Pascal_Headers/reserve/helpers/m_DataAsMessage.inc b/include/delphi/reserve/m_DataAsMessage.inc index b7a60ca080..71bfcc059d 100644 --- a/plugins/Pascal_Headers/reserve/helpers/m_DataAsMessage.inc +++ b/include/delphi/reserve/m_DataAsMessage.inc @@ -39,7 +39,7 @@ const    DAM_SR_UNKNOWN         = 7; // unknown error
  // Return values for DAM_SENDRESULTPROC
 -   DAM_SRA_RETRY = 1;
 +  DAM_SRA_RETRY = 1;
  type
  // hContact, szDataType and SessionID fields correspond to the fields of the
 diff --git a/include/delphi/reserve/m_actman.inc b/include/delphi/reserve/m_actman.inc new file mode 100644 index 0000000000..53344e2990 --- /dev/null +++ b/include/delphi/reserve/m_actman.inc @@ -0,0 +1,158 @@ +{$IFNDEF M_ACTMAN}
 +{$DEFINE M_ACTMAN}
 +
 +// defined in interfaces.inc
 +//const MIID_ACTMANAGER:MUUID='{9584DA04-FB4F-40c1-9325-E4F9CAAFCB5D}';
 +
 +const
 +  AutoStartName:PWideChar = '#Autostart';
 +const
 +  DBBranch = 'ActMan';
 +const
 +  ACCF_DISABLED = $10000000;  // action disabled
 +  ACCF_EXPORT   = $08000000;  // action to export
 +  ACCF_VOLATILE = $04000000;  // don't save in DB
 +  ACCF_IMPORTED = ACCF_EXPORT;
 +  ACCF_FLAGS    = ACCF_DISABLED or ACCF_EXPORT or ACCF_IMPORTED or ACCF_VOLATILE;
 +  ACCF_OVERLOAD = $01000000;  // imported action overwrite old
 +
 +  ACCF_ID       = $02000000;  // for MS_ACT_SELECT, lParam is ID (else name)
 +  ACCF_CLEAR    = $01000000;  // clear other flags, else - set
 +type
 +  pChain = ^tChain;
 +  tChain = record
 +    descr:pWideChar;
 +    id   :dword;
 +    flags:dword; // ACCF_* flags
 +    order:dword;
 +  end;
 +
 +const
 +  {
 +    wParam - 0
 +    lParam - address of destination list variable (address of pointer to tChain)
 +             if lParam=0, return just count of elements
 +    Return - count of elements
 +    Notes: first 4 bytes = size of TChain structure (to add new fields in future)
 +  }
 +  MS_ACT_GETLIST:PAnsiChar = 'Actions/GetList';
 +  {
 +    wParam - 0
 +    lParam - list address (pointer to data returned by MS_ACT_GETLIST)
 +  }
 +  MS_ACT_FREELIST:PAnsiChar = 'Actions/FreeList';
 +  {
 +    wParam - id: dword
 +    lParam - parameter
 +  }
 +  MS_ACT_RUNBYID  :PAnsiChar = 'Actions/RunById';
 +  {
 +    wParam - unicode action name
 +    lParam - parameter
 +  }
 +  MS_ACT_RUNBYNAME:PAnsiChar = 'Actions/RunByName';
 +
 +{ Starts action with 2 parameters
 +  wParam: 0
 +  lParam: pointer to TAct_Param
 +}
 +  MS_ACT_RUNPARAMS:PAnsiChar = 'Actions/RunWithParams';
 +const
 +  ACTP_BYNAME = 1;
 +  ACTP_WAIT   = 2;
 +type
 +  pAct_Param = ^tAct_Param;
 +  tAct_Param = record
 +    flags :dword; // ACTP_*
 +    Id    :uint_ptr; // Id or name
 +    wParam:WPARAM;
 +    lParam:LPARAM;
 +  end;
 +
 +const
 +  ACTM_NEW    = $00000001;
 +  ACTM_DELETE = $00000002;
 +  ACTM_RELOAD = $00000004;
 +  ACTM_RENAME = $00000008;
 +  ACTM_SORT   = $00000010;
 +  ACTM_ACT    = $10000000; // do not check, internal
 +  ACTM_ACTS   = $20000000; // do not check, internal
 +  ACTM_LOADED = $80000000;
 +
 +  {
 +    Event: action group list was changed: some was added or deleted
 +    wParam - set of ACTM_* flags
 +    lParam - 0
 +  }
 +  ME_ACT_CHANGED:PAnsiChar = 'Actions/Changed';
 +
 +  ACIO_EXPORT   = $00000001; // export, else - import
 +  ACIO_APPEND   = $00000002; // append file on export
 +  ACIO_ASKEXIST = $00000004; // ask, if action exists on import
 +  ACIO_SELECTED = $00000008; // export selected actions only
 +
 +  {
 +    wParam - ACIO_* flags
 +    lParam - Unicode file name
 +    Return - true, if totally succesful 
 +  }
 +  MS_ACT_INOUT:PAnsiChar = 'Actions/ImpExp';
 +
 +  {
 +    Event: Export actions
 +    wParam - ACIO_* flags
 +    lParam - unicode filename
 +  }
 +  ME_ACT_INOUT:PAnsiChar = 'Actions/InOut';
 +
 +  {
 +    Select/unselect specified action
 +    wParam - set of ACCF_* consts
 +    lParam - unicode action name / number
 +    Return - -1 if unsuccesful
 +  }
 +  MS_ACT_SELECT:PAnsiChar = 'Actions/Select';
 +
 +  {
 +    Event: Action started/finished
 +    wParam - Action status: 0 - started, 1 - finished
 +    lParam - action id
 +  }
 +  ME_ACT_ACTION:PAnsiChar = 'Actions/Action';
 +
 +//----- Scheduling part services -----
 +
 +const
 +  {
 +    Enable or disable tasks
 +    wParam - 1/0 (enable/disable)
 +    lParam - unicode task name
 +    Note - works for all tasks with same started name
 +  }
 +  MS_ACT_TASKENABLE:PAnsiChar = 'Actions/TaskEnable';
 +
 +  {
 +    Delete task
 +    wParam - 0
 +    lParam - unicode task name
 +    Note - works for all tasks with same started name
 +  }
 +  MS_ACT_TASKDELETE:PAnsiChar = 'Actions/TaskDelete';
 +
 +  {
 +    Set task repeat count
 +    wParam - repeat count
 +    lParam - unicode task name
 +    Return - old repeat count value
 +    Note - works for all tasks with same started name
 +  }
 +  MS_ACT_TASKCOUNT:PAnsiChar = 'Actions/TaskCount';
 +
 +  {
 +    Event for task start
 +    wParam - counter of call (from 0 to repeat count)
 +    lParam - unicode task name
 +  }
 +  ME_ACT_BELL:PAnsiChar = 'Actions/Bell';
 +
 +{$ENDIF}
 diff --git a/plugins/Pascal_Headers/reserve/m_anismiley.inc b/include/delphi/reserve/m_anismiley.inc index 4fcf598208..4fcf598208 100644 --- a/plugins/Pascal_Headers/reserve/m_anismiley.inc +++ b/include/delphi/reserve/m_anismiley.inc diff --git a/plugins/Pascal_Headers/reserve/m_assocmgr.inc b/include/delphi/reserve/m_assocmgr.inc index a429c9b43b..83b835a17a 100644 --- a/plugins/Pascal_Headers/reserve/m_assocmgr.inc +++ b/include/delphi/reserve/m_assocmgr.inc @@ -45,29 +45,29 @@ Returns 0 on success, nonzero otherwise.  type
    PFILETYPEDESC = ^TFILETYPEDESC;
    TFILETYPEDESC = record
 -    cbSize: Integer;         // size of this structure, in bytes
 +    cbSize: Integer;        // size of this structure, in bytes
 -    pszDescription: PAnsiChar;   // description for options dialog and in registry.
 -                             // please Translate().
 +    szDescription: TChar; // description for options dialog and in registry.
 +                            // please Translate().
 -    hInstance: HINST;        // instance where the icon resource is located
 +    hInstance: HINST;       // instance where the icon resource is located
 -    nIconResID: UINT;        // resource id of an icon to use for the file type.
 -                             // this icon should contain icons of all sizes and color depths
 -                             // needed by Windows.
 -                             // set this to 0 to use the generic 'miranda file' icon
 -                             // provided by assocmgr.
 +    nIconResID: UINT;       // resource id of an icon to use for the file type.
 +                            // this icon should contain icons of all sizes and color depths
 +                            // needed by Windows.
 +                            // set this to 0 to use the generic 'miranda file' icon
 +                            // provided by assocmgr.
 -    pszService: PAnsiChar;   // service to call when a file is opened
 -                             // this service will be called with lParam set to
 -                             // the file name being opened including path.
 -                             // it can be assumed that the provided file name 
 -                             // is always the long path name.
 -                             // return zero on suceess, nonzero on error.
 -                             // Note: set this to nil to pass the file name as
 -                             // commandline argument to miranda32.exe (db file).
 +    pszService: PAnsiChar;  // service to call when a file is opened
 +                            // this service will be called with lParam set to
 +                            // the file name being opened including path.
 +                            // it can be assumed that the provided file name 
 +                            // is always the long path name.
 +                            // return zero on suceess, nonzero on error.
 +                            // Note: set this to nil to pass the file name as
 +                            // commandline argument to miranda32.exe (db file).
 -    flags: DWORD;            // see FTDF_* flags below
 +    flags: DWORD;           // see FTDF_* flags below
      pszFileExt: PAnsiChar;  // file extension, e.g. ".ext"
                              // first character must be a dot, assumed to be all lower case.
 @@ -76,7 +76,7 @@ type      pszMimeType: PAnsiChar; // MIME type of the file, e.g. "application/x-icq"
                              // may only consist of ascii characters.
 -    pszVerbDesc: PAnsiChar;     // description for the open verb e.g. "&Install".
 +    szVerbDesc: TChar;      // description for the open verb e.g. "&Install".
                              // set this to nil to use the default description "Open".
                              // include an ampersand (&) character for a mnemonic key.
                              // please Translate().
 @@ -102,6 +102,10 @@ const                                  // as a text file using e.g Notepad.
                                  // only has an effect on Windows XP and higher.
 + FTDF_ISSHORTCUT       = $0010; // file type behaves as shortcut, this means a
 +                                // small overlay arrow is applied and the extension is never shown
 +
 +
  { Remove a file type   v0.1.0.0+
  Remove a file type registered previously using
  MS_ASSOCMGR_ADDNEWFILETYPE.
 @@ -128,7 +132,7 @@ type    TURLTYPEDESC = record
      cbSize: Integer;           // size of this structure, in bytes
 -    pszDescription: PAnsiChar;     // description for options dialog and in registry.
 +    pszDescription: TChar;     // description for options dialog and in registry.
                                 // please Translate().
      hInstance: HINST;          // instance where the icon resource is located
 @@ -152,11 +156,11 @@ type    end;
  const
 -  UTDF_UNICODE         = $0001;  // pszDescription in struct is Unicode.
 -                                 // the specified service is called with Unicode parameters.
 +  UTDF_UNICODE         = $0001; // pszDescription in struct is Unicode.
 +                                // the specified service is called with Unicode parameters.
 -  UTDF_DEFAULTDISABLED = $0002;  // url type is not registered by default, it needs to be
 -                                 // enabled explicitly on the options page.
 +  UTDF_DEFAULTDISABLED = $0002; // url type is not registered by default, it needs to be
 +                                // enabled explicitly on the options page.
  { Remove an url protocol type   v0.1.0.0+
  Remove an url registered previously using
 diff --git a/plugins/Pascal_Headers/reserve/m_autoreplacer.inc b/include/delphi/reserve/m_autoreplacer.inc index bc1d528463..bc1d528463 100644 --- a/plugins/Pascal_Headers/reserve/m_autoreplacer.inc +++ b/include/delphi/reserve/m_autoreplacer.inc diff --git a/plugins/Pascal_Headers/reserve/m_changekeyboardlayout.inc b/include/delphi/reserve/m_changekeyboardlayout.inc index b1df7628c1..b1df7628c1 100644 --- a/plugins/Pascal_Headers/reserve/m_changekeyboardlayout.inc +++ b/include/delphi/reserve/m_changekeyboardlayout.inc diff --git a/plugins/Pascal_Headers/reserve/helpers/m_contactdir.inc b/include/delphi/reserve/m_contactdir.inc index 1b21717753..1b21717753 100644 --- a/plugins/Pascal_Headers/reserve/helpers/m_contactdir.inc +++ b/include/delphi/reserve/m_contactdir.inc diff --git a/plugins/Pascal_Headers/reserve/m_contactsex.inc b/include/delphi/reserve/m_contactsex.inc index 6250720a4e..6250720a4e 100644 --- a/plugins/Pascal_Headers/reserve/m_contactsex.inc +++ b/include/delphi/reserve/m_contactsex.inc diff --git a/plugins/Pascal_Headers/reserve/m_db3xsa.inc b/include/delphi/reserve/m_db3xsa.inc index 77ac666967..77ac666967 100644 --- a/plugins/Pascal_Headers/reserve/m_db3xsa.inc +++ b/include/delphi/reserve/m_db3xsa.inc diff --git a/plugins/Pascal_Headers/reserve/m_ersatz.inc b/include/delphi/reserve/m_ersatz.inc index 49f5b3170f..49f5b3170f 100644 --- a/plugins/Pascal_Headers/reserve/m_ersatz.inc +++ b/include/delphi/reserve/m_ersatz.inc diff --git a/plugins/Pascal_Headers/reserve/m_flags.inc b/include/delphi/reserve/m_flags.inc index f9f97ec1ff..f9f97ec1ff 100644 --- a/plugins/Pascal_Headers/reserve/m_flags.inc +++ b/include/delphi/reserve/m_flags.inc diff --git a/plugins/Pascal_Headers/reserve/m_flash.inc b/include/delphi/reserve/m_flash.inc index 8d99547e6a..8d99547e6a 100644 --- a/plugins/Pascal_Headers/reserve/m_flash.inc +++ b/include/delphi/reserve/m_flash.inc diff --git a/plugins/Pascal_Headers/reserve/helpers/m_folders.inc b/include/delphi/reserve/m_folders.inc index 3cb3cbc294..3cb3cbc294 100644 --- a/plugins/Pascal_Headers/reserve/helpers/m_folders.inc +++ b/include/delphi/reserve/m_folders.inc diff --git a/plugins/Pascal_Headers/reserve/m_fortunemsg.inc b/include/delphi/reserve/m_fortunemsg.inc index a13a8c3980..a13a8c3980 100644 --- a/plugins/Pascal_Headers/reserve/m_fortunemsg.inc +++ b/include/delphi/reserve/m_fortunemsg.inc diff --git a/plugins/Pascal_Headers/reserve/m_fuse.inc b/include/delphi/reserve/m_fuse.inc index 82b002b5db..82b002b5db 100644 --- a/plugins/Pascal_Headers/reserve/m_fuse.inc +++ b/include/delphi/reserve/m_fuse.inc diff --git a/plugins/Pascal_Headers/reserve/m_help(plugin).inc b/include/delphi/reserve/m_help(plugin).inc index 0eb63615d9..0eb63615d9 100644 --- a/plugins/Pascal_Headers/reserve/m_help(plugin).inc +++ b/include/delphi/reserve/m_help(plugin).inc diff --git a/plugins/Pascal_Headers/m_historyevents.inc b/include/delphi/reserve/m_historyevents.inc index ae582f0eef..ae582f0eef 100644 --- a/plugins/Pascal_Headers/m_historyevents.inc +++ b/include/delphi/reserve/m_historyevents.inc diff --git a/plugins/Pascal_Headers/reserve/m_historypp.inc b/include/delphi/reserve/m_historypp.inc index a0ff7e82d7..a0ff7e82d7 100644 --- a/plugins/Pascal_Headers/reserve/m_historypp.inc +++ b/include/delphi/reserve/m_historypp.inc diff --git a/plugins/Pascal_Headers/reserve/m_historystats.inc b/include/delphi/reserve/m_historystats.inc index 03955de447..03955de447 100644 --- a/plugins/Pascal_Headers/reserve/m_historystats.inc +++ b/include/delphi/reserve/m_historystats.inc diff --git a/plugins/Pascal_Headers/reserve/m_httpserver.inc b/include/delphi/reserve/m_httpserver.inc index 1e0f0895e3..1e0f0895e3 100644 --- a/plugins/Pascal_Headers/reserve/m_httpserver.inc +++ b/include/delphi/reserve/m_httpserver.inc diff --git a/plugins/Pascal_Headers/reserve/m_ieview.inc b/include/delphi/reserve/m_ieview.inc index 2881ef5c8c..2881ef5c8c 100644 --- a/plugins/Pascal_Headers/reserve/m_ieview.inc +++ b/include/delphi/reserve/m_ieview.inc diff --git a/plugins/Pascal_Headers/reserve/m_ircscript.inc b/include/delphi/reserve/m_ircscript.inc index 0157443e30..0157443e30 100644 --- a/plugins/Pascal_Headers/reserve/m_ircscript.inc +++ b/include/delphi/reserve/m_ircscript.inc diff --git a/plugins/Pascal_Headers/reserve/m_kbdnotify.inc b/include/delphi/reserve/m_kbdnotify.inc index b6967ecead..b6967ecead 100644 --- a/plugins/Pascal_Headers/reserve/m_kbdnotify.inc +++ b/include/delphi/reserve/m_kbdnotify.inc diff --git a/plugins/Pascal_Headers/reserve/m_keybindings.inc b/include/delphi/reserve/m_keybindings.inc index e0c31c31e5..e0c31c31e5 100644 --- a/plugins/Pascal_Headers/reserve/m_keybindings.inc +++ b/include/delphi/reserve/m_keybindings.inc diff --git a/plugins/Pascal_Headers/reserve/m_langman.inc b/include/delphi/reserve/m_langman.inc index 4f0079719d..4f0079719d 100644 --- a/plugins/Pascal_Headers/reserve/m_langman.inc +++ b/include/delphi/reserve/m_langman.inc diff --git a/plugins/Pascal_Headers/reserve/m_listeningto.inc b/include/delphi/reserve/m_listeningto.inc index 4bb60c4a45..4bb60c4a45 100644 --- a/plugins/Pascal_Headers/reserve/m_listeningto.inc +++ b/include/delphi/reserve/m_listeningto.inc diff --git a/plugins/Pascal_Headers/reserve/helpers/m_magneticWindows.inc b/include/delphi/reserve/m_magneticWindows.inc index 885760f629..885760f629 100644 --- a/plugins/Pascal_Headers/reserve/helpers/m_magneticWindows.inc +++ b/include/delphi/reserve/m_magneticWindows.inc diff --git a/plugins/Pascal_Headers/reserve/m_mathmodule.inc b/include/delphi/reserve/m_mathmodule.inc index a871fa1045..a4d10edfa6 100644 --- a/plugins/Pascal_Headers/reserve/m_mathmodule.inc +++ b/include/delphi/reserve/m_mathmodule.inc @@ -35,8 +35,8 @@ const    { handle of richedit. }
    { NULL: replace all. }
  type
 -  PTMathRicheditInfo = ^TTMathRicheditInfo;
 -  TTMathRicheditInfo = record
 +  PMathRicheditInfo = ^TMathRicheditInfo;
 +  TMathRicheditInfo = record
      hwndRichEditControl : HWND;
      sel                 : PCHARRANGE;
      disableredraw       : int;
 diff --git a/plugins/Pascal_Headers/reserve/m_motd.inc b/include/delphi/reserve/m_motd.inc index 3b986bf02e..3b986bf02e 100644 --- a/plugins/Pascal_Headers/reserve/m_motd.inc +++ b/include/delphi/reserve/m_motd.inc diff --git a/include/delphi/reserve/m_music.inc b/include/delphi/reserve/m_music.inc new file mode 100644 index 0000000000..aba0bd27f6 --- /dev/null +++ b/include/delphi/reserve/m_music.inc @@ -0,0 +1,419 @@ +{$IFNDEF M_MUSIC}
 +{$DEFINE M_MUSIC}
 +
 +// defined in interfaces.inc
 +//const MIID_WATRACK:MUUID='{FC6C81F4-837E-4430-9601-A0AA43177AE3}';
 +
 +type
 +  pSongInfoA = ^tSongInfoA;
 +  tSongInfoA = record
 +    artist   :PAnsiChar;
 +    title    :PAnsiChar;
 +    album    :PAnsiChar;
 +    genre    :PAnsiChar;
 +    comment  :PAnsiChar;
 +    year     :PAnsiChar;
 +    mfile    :PAnsiChar; // media file
 +    kbps     :dword;
 +    khz      :dword;
 +    channels :dword;
 +    track    :dword;
 +    total    :dword;     // music length
 +    time     :dword;     // elapsed time
 +    wndtext  :PAnsiChar; // window title
 +    player   :PAnsiChar; // player name
 +    plyver   :dword;     // player version
 +    icon     :THANDLE;   // player icon
 +    fsize    :dword;     // media file size
 +    vbr      :dword;
 +    status   :integer;   // WAT_MES_* const
 +    plwnd    :HWND;      // player window
 +    // video  part
 +    codec    :dword;
 +    width    :dword;
 +    height   :dword;
 +    fps      :dword;
 +    date     :int64;
 +    txtver   :PAnsiChar;
 +    lyric    :PAnsiChar;
 +    cover    :PAnsiChar;
 +    volume   :dword;
 +    url      :PAnsiChar; // player homepage
 +    winampwnd:HWND;
 +  end;
 +type
 +  pSongInfo=^tSongInfo;
 +  tSongInfo = record
 +    artist   :pWideChar;
 +    title    :pWideChar;
 +    album    :pWideChar;
 +    genre    :pWideChar;
 +    comment  :pWideChar;
 +    year     :pWideChar;
 +    mfile    :pWideChar; // media file
 +    kbps     :dword;
 +    khz      :dword;
 +    channels :dword;
 +    track    :dword;
 +    total    :dword;     // music length
 +    time     :dword;     // elapsed time
 +    wndtext  :pWideChar; // window title
 +    player   :pWideChar; // player name
 +    plyver   :dword;     // player version
 +    icon     :THANDLE;   // player icon
 +    fsize    :dword;     // media file size
 +    vbr      :dword;
 +    status   :integer;   // WAT_MES_* const
 +    plwnd    :HWND;      // player window
 +    // video  part
 +    codec    :dword;
 +    width    :dword;
 +    height   :dword;
 +    fps      :dword;
 +    date     :int64;
 +    txtver   :pWideChar;
 +    lyric    :pWideChar;
 +    cover    :pWideChar; // cover path
 +    volume   :dword;
 +    url      :PWideChar; // player homepage
 +    winampwnd:HWND;
 +  end;
 +  pSongInfoW = pSongInfo;
 +  tSongInfoW = tSongInfo;
 +
 +const
 +  // result codes
 +  WAT_RES_UNKNOWN   = -2;
 +  WAT_RES_NOTFOUND  = -1;
 +  WAT_RES_ERROR     = WAT_RES_NOTFOUND;
 +  WAT_RES_OK        = 0;
 +  WAT_RES_ENABLED   = WAT_RES_OK;
 +  WAT_RES_DISABLED  = 1;
 +  // internal
 +  WAT_RES_NEWFILE   = 3;
 +  WAT_RES_NEWPLAYER = 4;
 +
 +// result for MS_WAT_GETMUSICINFO service
 +const
 +  WAT_PLS_NORMAL   = WAT_RES_OK;
 +  WAT_PLS_NOMUSIC  = WAT_RES_DISABLED;
 +  WAT_PLS_NOTFOUND = WAT_RES_NOTFOUND;
 +
 +const
 +  WAT_INF_UNICODE = 0;
 +  WAT_INF_ANSI    = 1;
 +  WAT_INF_UTF8    = 2;
 +  WAT_INF_CHANGES = $100;
 +
 +const
 +  MS_WAT_INSERT:PAnsiChar = 'WATrack/Insert';
 +  MS_WAT_EXPORT:PAnsiChar = 'WATrack/Export';
 +
 +const
 +{
 +  wParam : WAT_INF_* constant
 +  lParam : pointer to pSongInfo (Unicode) or pSongInfoA (ANSI/UTF8)
 +  Affects: Fill structure by currently played music info
 +  returns: WAT_PLS_* constant
 +  note: pointer will be point to global SongInfo structure of plugin
 +  warning: Non-Unicode data filled only by request
 +  if lParam=0 only internal SongInfo structure will be filled
 +  Example:
 +    var p:pSongInfo;
 +    CallService(MS_WAT_GETMUSICINFO,0,dword(@p));
 +}
 +  MS_WAT_GETMUSICINFO:PAnsiChar = 'WATrack/GetMusicInfo';
 +{
 +  wParam:0
 +  lParam : pointer to pSongInfo (Unicode)
 +  Affects: Fill structure by info from file named in SongInfo.mfile
 +  returns: 0, if success
 +  note: fields, which values can't be obtained, leaves old values.
 +    you must free given strings by miranda mir_free
 +}
 +  MS_WAT_GETFILEINFO:PAnsiChar = 'WATrack/GetFileInfo';
 +
 +{
 +  wParam: encoding (WAT_INF_* consts, 0 = WAT_INF_UNICODE)
 +  lParam: codepage (0 = ANSI)
 +  Returns Global unicode SongInfo pointer or tranlated to Ansi/UTF8 structure
 +}
 +  MS_WAT_RETURNGLOBAL:PAnsiChar = 'WATrack/GetMainStructure';
 +
 +//!! DON'T CHANGE THESE VALUES!
 +const
 +  WAT_CTRL_FIRST = 1;
 +
 +  WAT_CTRL_PREV  = 1;
 +  WAT_CTRL_PLAY  = 2;
 +  WAT_CTRL_PAUSE = 3;
 +  WAT_CTRL_STOP  = 4;
 +  WAT_CTRL_NEXT  = 5;
 +  WAT_CTRL_VOLDN = 6;
 +  WAT_CTRL_VOLUP = 7;
 +  WAT_CTRL_SEEK  = 8; // lParam is new position (sec)
 +
 +  WAT_CTRL_LAST  = 8;
 +
 +{
 +  wParam: button code (WAT_CTRL_* const)
 +  lParam: 0, or value (see WAT_CTRL_* const comments)
 +  Affects: emulate player button pressing
 +  returns: 0 if unsuccesful
 +}
 +  MS_WAT_PRESSBUTTON:PAnsiChar = 'WATrack/PressButton';
 +
 +{
 +  Get user's Music Info
 +}
 +  MS_WAT_GETCONTACTINFO:PAnsiChar = 'WATrack/GetContactInfo';
 +
 +// ------------ Plugin/player status ------------
 +
 +{
 +  wParam: 1  - switch off plugin
 +          0  - switch on plugin
 +          -1 - switch plugin status
 +          2  - get plugin version
 +          other - get plugin status
 +  lParam: 0
 +  Affects: Switch plugin status to enabled or disabled
 +  returns: version, old plugin status, 0, if was enabled
 +}
 +  MS_WAT_PLUGINSTATUS:PAnsiChar = 'WATrack/PluginStatus';
 +
 +  ME_WAT_MODULELOADED:PAnsiChar = 'WATrack/ModuleLoaded';
 +
 +const
 +  WAT_EVENT_PLAYERSTATUS = 1; // WAT_PLS_* in loword, WAT_MES_* in hiword
 +  WAT_EVENT_NEWTRACK     = 2; // SongInfo ptr
 +  WAT_EVENT_PLUGINSTATUS = 3; // 0-enabled; 1-dis.temporary; 2-dis.permanent
 +  WAT_EVENT_NEWPLAYER    = 4; //
 +  WAT_EVENT_NEWTEMPLATE  = 5; // TM_* constant
 +
 +{
 +  Plugin or player status changed:
 +  wParam: type of event (see above)
 +  lParam: value
 +}
 +  ME_WAT_NEWSTATUS:PAnsiChar = 'WATrack/NewStatus';
 +
 +// ---------- Popup module ------------
 +
 +{
 +  wParam: not used
 +  lParam: not used
 +  Affects: Show popup or Info window with current music information
 +  note: Only Info window will be showed if Popup plugin disabled
 +}
 +  MS_WAT_SHOWMUSICINFO:PAnsiChar = 'WATrack/ShowMusicInfo';
 +
 +// --------- Statistic (report) module -------------
 +
 +{
 +  wParam: pointer to log file name or NIL
 +  lParam: pointer to report file name or NIL
 +  Affects: Create report from log and run it (if option is set)
 +  returns: 0 if unsuccesful
 +  note: if wParam or lParam is a NIL then file names from options are used
 +}
 +  MS_WAT_MAKEREPORT :PAnsiChar = 'WATrack/MakeReport';
 +//  MS_WAT_MAKEREPORTW:PAnsiChar = 'WATrack/MakeReportW';
 +
 +{
 +  wParam, lParam - not used
 +  Affects: pack statistic file
 +}
 +  MS_WAT_PACKLOG:PAnsiChar = 'WATrack/PackLog';
 +
 +{
 +  wParam: not used
 +  lParam: pointer to SongInfo
 +}
 +  MS_WAT_ADDTOLOG:PAnsiChar = 'WATrack/AddToLog';
 +
 +// ----------- Formats and players -----------
 +
 +// media file status
 +
 +const
 +  WAT_MES_STOPPED = 0;
 +  WAT_MES_PLAYING = 1;
 +  WAT_MES_PAUSED  = 2;
 +  WAT_MES_UNKNOWN = -1;
 +
 +const
 +  WAT_ACT_REGISTER   = 1;
 +  WAT_ACT_UNREGISTER = 2;
 +  WAT_ACT_DISABLE    = 3;
 +  WAT_ACT_ENABLE     = 4;
 +  WAT_ACT_GETSTATUS  = 5; // not found/enabled/disabled
 +  WAT_ACT_SETACTIVE  = 6;
 +  WAT_ACT_REPLACE    = $10000; // can be combined with WAT_REGISTERFORMAT
 +
 +const
 +  // flags
 +  WAT_OPT_DISABLED    = $00000001; // [formats,players,options] registered but disabled
 +  WAT_OPT_ONLYONE     = $00000002; // [formats,players] code can't be overwriten
 +  WAT_OPT_PLAYERINFO  = $00000004; // [players] song info from player
 +  WAT_OPT_WINAMPAPI   = $00000008; // [players] Winamp API support
 +  WAT_OPT_CHECKTIME   = $00000010; // [options] check file time for changes
 +  WAT_OPT_VIDEO       = $00000020; // [formats,options] format is video
 +  WAT_OPT_LAST        = $00000040; // (internal-Winamp Clone) put to the end of queue
 +  WAT_OPT_FIRST       = $00000080; // (internal)
 +  WAT_OPT_TEMPLATE    = $00000100; // (internal)
 +  WAT_OPT_IMPLANTANT  = $00000200; // [options] use process implantation
 +  WAT_OPT_HASURL      = $00000400; // [players] URL field present
 +  WAT_OPT_CHANGES     = $00000800; // (internal) obtain only chaged values
 +                                   // (volume, status, window text, elapsed time)
 +  WAT_OPT_APPCOMMAND  = $00001000; // [options] Special (multimedia) key support
 +  WAT_OPT_CHECKALL    = $00002000; // [options] Check all players
 +  WAT_OPT_KEEPOLD     = $00004000; // [options] Keep Old opened file
 +  WAT_OPT_MULTITHREAD = $00008000; // [options] Use multithread scan
 +  WAT_OPT_SINGLEINST  = $00010000; // [players] Single player instance
 +  WAT_OPT_PLAYERDATA  = $00020000; // (internal) to obtain player data
 +  WAT_OPT_CONTAINER   = $00040000; // [formats] format is container (need to check full)
 +
 +type
 +  tReadFormatProc = function(var Info:tSongInfo):boolean; cdecl;
 +  pMusicFormat = ^tMusicFormat;
 +  tMusicFormat = record
 +    proc :tReadFormatProc;
 +    ext  :array [0..7] of AnsiChar;
 +    flags:cardinal;
 +  end;
 +
 +const
 +{
 +  wParam: action
 +  lParam: pointer to tMusicFormat if wParam = WAT_ACT_REGISTER,
 +          else - pointer to extension string (ANSI)
 +  returns: see result codes
 +}
 +  MS_WAT_FORMAT:PAnsiChar = 'WATrack/Format';
 +
 +{
 +  wParam: pointer to SongInfo structure (plwind field must be initialized)
 +  lParam: flags
 +  Affects: trying to fill SongInfo using Winamp API
 +}
 +  MS_WAT_WINAMPINFO:PAnsiChar = 'WATrack/WinampInfo';
 +
 +{
 +  wParam: window
 +  lParam: LoWord - command; HiWord - value
 +}
 +  MS_WAT_WINAMPCOMMAND:PAnsiChar = 'WATrack/WinampCommand';
 +
 +type
 +  tInitProc    = function():integer;cdecl;
 +  tDeInitProc  = function():integer;cdecl;
 +  tStatusProc  = function(wnd:HWND):integer;cdecl;
 +  tNameProc    = function(wnd:HWND;flags:integer):pWideChar;cdecl;
 +  tCheckProc   = function(wnd:HWND;flags:integer):HWND;cdecl;
 +  tInfoProc    = function(var SongInfo:tSongInfo;flags:integer):integer;cdecl;
 +  tCommandProc = function(wnd:HWND;command:integer;value:integer):integer;cdecl;
 +
 +  pPlayerCell = ^tPlayerCell;
 +  tPlayerCell = record
 +    Desc     :PAnsiChar; // Short player name
 +    flags    :cardinal;
 +    Icon     :HICON;     // can be 0. for registration only
 +    Init     :pointer;   // tInitProc;    can be NIL. initialize any data
 +    DeInit   :pointer;   // tDeInitProc;  can be NIL. finalize player processing
 +    Check    :pointer;   // tCheckProc;   check player
 +    GetStatus:pointer;   // tStatusProc;  can be NIL. get player status
 +    GetName  :pointer;   // tNameProc;    can be NIL. get media filename
 +    GetInfo  :pointer;   // tInfoProc;    can be NIL. get info from player
 +    Command  :pointer;   // tCommandProc; can be NIL. send command to player
 +    URL      :PAnsiChar; // only if WAT_OPT_HASURL flag present
 +    Notes    :PWideChar; // any tips, notes etc for this player
 +  end;
 +
 +const
 +{
 +  wParam: action
 +  lParam: pointer to tPlayerCell if wParam = WAT_ACT_REGISTER,
 +          else - pointer to player description string (ANSI)
 +  returns: player window handle or value>0 if found
 +  note: If you use GetName or GetInfo field, please, do not return empty
 +        filename even when mediafile is remote!
 +}
 +  MS_WAT_PLAYER:PAnsiChar = 'WATrack/Player';
 +
 +// --------- MyShows.ru ---------
 +
 +{
 +  Toggle MyShows scrobbling status
 +  wParam,lParam=0
 +  Returns: previous state
 +}
 +const
 +  MS_WAT_MYSHOWS:pAnsiChar = 'WATrack/MyShows';
 +
 +
 +const
 +  MS_WAT_MYSHOWSINFO:pAnsiChar = 'WATrack/MyShowsInfo';
 +
 +// --------- Last FM  ---------
 +
 +{
 +  Toggle LastFM scrobbling status
 +  wParam,lParam=0
 +  Returns: previous state
 +}
 +const
 +  MS_WAT_LASTFM:pAnsiChar = 'WATrack/LastFM';
 +
 +{
 +  Get Info based on currently played song
 +  wParam: pLastFMInfo
 +  lParam: int language (first 2 bytes - 2-letters language code)
 +}
 +type
 +  pLastFMInfo = ^tLastFMInfo;
 +  tLastFMInfo = record
 +    request:cardinal;   // 0 - artist, 1 - album, 2 - track
 +    artist :pWideChar; // artist
 +    album  :pWideChar; // album or similar artists for Artist info request
 +    title  :pWideChar; // track title 
 +    tags   :pWideChar; // tags
 +    info   :pWideChar; // artist bio or wiki article
 +    image  :pAnsiChar; // photo/cover link
 +    similar:pWideChar;
 +    release:pWideChar;
 +    trknum :cardinal;
 +  end;
 +const
 +  MS_WAT_LASTFMINFO:pAnsiChar = 'WATrack/LastFMInfo';
 +
 +// --------- Templates ----------
 +
 +const
 +{
 +  wParam: 0 (standard Info) or pSongInfo
 +  lParam: Unicode template
 +  returns: New Unicode (replaced) string
 +}
 +  MS_WAT_REPLACETEXT:PAnsiChar = 'WATrack/ReplaceText';
 +
 +{
 +  event types for History
 +  Blob structure for EVENTTYPE_WAT_ANSWER:
 +   Uniciode artist#0title#0album#0answer
 +}
 +const
 +  EVENTTYPE_WAT_REQUEST = 9601;
 +  EVENTTYPE_WAT_ANSWER  = 9602;
 +  EVENTTYPE_WAT_ERROR   = 9603;
 +  EVENTTYPE_WAT_MESSAGE = 9604;
 +
 +const
 +{
 +  wParam: 0 or parent window
 +  lParam: 0
 +  note:   Shows Macro help window with edit aliases ability
 +}
 +  MS_WAT_MACROHELP:pAnsiChar = 'WATrack/MacroHelp';
 +
 +{$ENDIF M_MUSIC}
 diff --git a/plugins/Pascal_Headers/reserve/m_mydetails.inc b/include/delphi/reserve/m_mydetails.inc index c908849a7b..c908849a7b 100644 --- a/plugins/Pascal_Headers/reserve/m_mydetails.inc +++ b/include/delphi/reserve/m_mydetails.inc diff --git a/plugins/Pascal_Headers/reserve/m_nickhistory.inc b/include/delphi/reserve/m_nickhistory.inc index 240fc73b29..240fc73b29 100644 --- a/plugins/Pascal_Headers/reserve/m_nickhistory.inc +++ b/include/delphi/reserve/m_nickhistory.inc diff --git a/plugins/Pascal_Headers/reserve/helpers/m_notify.inc b/include/delphi/reserve/m_notify.inc index 572adc029e..572adc029e 100644 --- a/plugins/Pascal_Headers/reserve/helpers/m_notify.inc +++ b/include/delphi/reserve/m_notify.inc diff --git a/plugins/Pascal_Headers/reserve/m_nudge.inc b/include/delphi/reserve/m_nudge.inc index 6ec9faf64f..6ec9faf64f 100644 --- a/plugins/Pascal_Headers/reserve/m_nudge.inc +++ b/include/delphi/reserve/m_nudge.inc diff --git a/plugins/Pascal_Headers/reserve/m_png.inc b/include/delphi/reserve/m_png.inc index 04129f81e8..04129f81e8 100644 --- a/plugins/Pascal_Headers/reserve/m_png.inc +++ b/include/delphi/reserve/m_png.inc diff --git a/plugins/Pascal_Headers/reserve/m_quickcontacts.inc b/include/delphi/reserve/m_quickcontacts.inc index d82d23f5e7..d82d23f5e7 100644 --- a/plugins/Pascal_Headers/reserve/m_quickcontacts.inc +++ b/include/delphi/reserve/m_quickcontacts.inc diff --git a/include/delphi/reserve/m_radio.inc b/include/delphi/reserve/m_radio.inc new file mode 100644 index 0000000000..0d8775723f --- /dev/null +++ b/include/delphi/reserve/m_radio.inc @@ -0,0 +1,126 @@ +{$IFNDEF M_RADIO}
 +{$DEFINE M_RADIO}
 +{command codes}
 +
 +// defined in interfaces.inc
 +//const MIID_MRADIO:MUUID='{EEBC474C-B0AD-470F-99A8-9DD9210CE233}';
 +
 +const
 +  MRC_STOP   = 0;
 +  MRC_PLAY   = 1; // lParam is radio contact handle
 +  MRC_PAUSE  = 2;
 +  MRC_PREV   = 3;
 +  MRC_NEXT   = 4;
 +  MRC_STATUS = 5; // lParam is RD_STATUS_* value (RD_STATUS_GET only now)
 +  MRC_SEEK   = 6; // lParam is value in sec; -1 mean obtain current position
 +  MRC_RECORD = 7; // lParam is 0 - switch; 1 - on; 2 - off
 +  MRC_MUTE   = 8;
 +
 +const
 +  // Plugin status (result of RD_STATUS_GET)
 +  RD_STATUS_NOSTATION  = 0;   // no active station found
 +  RD_STATUS_PLAYING    = 1;   // media is playing
 +  RD_STATUS_PAUSED     = 2;   // media is paused
 +  RD_STATUS_STOPPED    = 3;   // media is stopped (only for playlists)
 +  RD_STATUS_CONNECT    = 4;   // plugin try to connect to the station
 +  RD_STATUS_ABORT      = 5;   // plugin want to abort while try to connect
 +  // next is for events only
 +  RD_STATUS_POSITION   = 107; // position was changed
 +  RD_STATUS_MUTED      = 108; // Mute/Unmute command was sent
 +  RD_STATUS_RECORD     = 109; // "Record" action called
 +  RD_STATUS_NEWTRACK   = 110; // new track/station
 +  RD_STATUS_NEWTAG     = 111; // tag data changed
 +  RD_STATUS_NEWSTATION = 112; // new station (contact)
 +  // next command is for users
 +  RD_STATUS_GET        = 6;   // to get current status
 +
 +const
 +{
 +  Open radio Options, if Main Options window not opened
 +  wParam: 0
 +  lParam: 0
 +}
 +  MS_RADIO_SETTINGS:PAnsiChar = 'mRadio/Settings';
 +{
 +  Switch 'record' mode
 +  wParam: not used
 +  lParam: 0 - switch mode; else - get record status
 +  Return: Current status: 1 - record is ON, 0 - OFF
 +}
 +  MS_RADIO_RECORD:PAnsiChar = 'mRadio/REC';
 +
 +{
 +  Set current radio volume
 +  wParam: volume (0-100)
 +  lParam: must be 0
 +  Return: previous value
 +}
 +  MS_RADIO_SETVOL:PAnsiChar = 'mRadio/SetVol';
 +
 +{
 +  Get current radio volume
 +  wParam: 0
 +  lParam: 0
 +  Return: volime value (negative if muted)
 +}
 +  MS_RADIO_GETVOL:PAnsiChar = 'mRadio/GetVol';
 +
 +{
 +  wParam,lParam = 0
 +}
 +  MS_RADIO_MUTE:PAnsiChar = 'mRadio/Mute';
 +
 +{
 +  Send command to mRadio
 +  wParam: command (see MRC_* constant)
 +  lParam: value (usually 0)
 +  Return: return value (now for status only)
 +}
 +  MS_RADIO_COMMAND:PAnsiChar = 'mRadio/Command';
 +
 +{
 +  Starting or stopping radio station
 +  wParam: Radio contact handle (lParam=0) or Station name
 +  lParam: 0 - wParam is handle, 1 - ANSI, else - unicode
 +}
 +  MS_RADIO_PLAYSTOP:PAnsiChar = 'mRadio/PlayStop';
 +
 +{
 +  wParam: station handle (0 - all)
 +  lParam: nil (through dialog, radio.ini by default) or ansi string with filename
 +  Return: exported stations amount
 +}
 +  MS_RADIO_EXPORT:PAnsiChar = 'mRadio/Export';
 +
 +{
 +  wParam: group to import radio or 0
 +  lParam: nil (through dialog, radio.ini by default) or ansi string with filename
 +  Return: imported stations amount
 +}
 +  MS_RADIO_IMPORT:PAnsiChar = 'mRadio/Import';
 +
 +{
 +  wParam: RD_STATUS_* constants
 +  lParam: argument
 +    RD_STATUS_NEWSTATION - contact handle
 +    RD_STATUS_NEWTRACK   - URL (unicode)
 +    RD_STATUS_PAUSED     - 1 - pause, 0 - continued
 +    RD_STATUS_RECORD     -,0 - off,   1 - on
 +}
 +  ME_RADIO_STATUS:PAnsiChar = 'mRadio/Status';
 +
 +{
 +  wParam: 0 - switch; 1 - switch on; -1 - switch off
 +  lParam: 0
 +  Return: last state (0 - was off, 1 - was on)
 +}
 +  MS_RADIO_EQONOFF:PAnsiChar = 'mRadio/EqOnOff';
 +
 +{
 +  wParam: 0 
 +  lParam: 0
 +  Return: 0, if cancelled, 101 - "mute", 102 - "play/pause", 103 - "stop" or station handle
 +}
 +  MS_RADIO_TRAYMENU:PAnsiChar = 'mRadio/MakeTrayMenu';
 +
 +{$ENDIF}
 diff --git a/plugins/Pascal_Headers/reserve/m_rssnews.inc b/include/delphi/reserve/m_rssnews.inc index cfe4fef5b3..cfe4fef5b3 100644 --- a/plugins/Pascal_Headers/reserve/m_rssnews.inc +++ b/include/delphi/reserve/m_rssnews.inc diff --git a/plugins/Pascal_Headers/reserve/m_sessions.inc b/include/delphi/reserve/m_sessions.inc index 0cc18a0d33..0cc18a0d33 100644 --- a/plugins/Pascal_Headers/reserve/m_sessions.inc +++ b/include/delphi/reserve/m_sessions.inc diff --git a/include/delphi/reserve/m_shutdown.inc b/include/delphi/reserve/m_shutdown.inc new file mode 100644 index 0000000000..2f99ec3def --- /dev/null +++ b/include/delphi/reserve/m_shutdown.inc @@ -0,0 +1,179 @@ +{
 +
 +'AutoShutdown'-Plugin for
 +Miranda IM: the free IM client for Microsoft* Windows*
 +
 +Copyright (C) 2004-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 (Shutdown-License.txt); if not, write to the Free Software
 +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 +}
 +
 +{$IFNDEF M_SHUTDOWN}
 +{$DEFINE M_SHUTDOWN}
 +
 +const
 +  MIID_SHUTDOWN:TGUID = '{142982A8-88CF-4C65-8721-6DE27D5CE7B5}';
 +
 +//******************************************************************/
 +//************************* SERVICES *******************************/
 +//******************************************************************/
 +
 +{ Show settings dialog   v1.3.0.0+
 +Shows the dialog by which the shutdown watcher can be started.
 +If the dialog is already opened this brings it to foreground.
 + wParam=lParam=0
 +Returns 0 on success, nonzero otherwise.
 +}
 +  MS_AUTOSHUTDOWN_SHOWSETTINGSDIALOG:pAnsiChar = 'AutoShutdown/ShowSettingsDialog';
 +
 +{ Initiate shutdown process   v1.3.0.0+
 +Initiates the shutdown process for a given shutdown type.
 +If another shutdown process is already pending it will return error.
 +Associated events: ME_AUTOSHUTDOWN_OKTOSHUTDOWN, ME_AUTOSHUTDOWN_SHUTDOWN
 + wParam=shutdownType
 + lParam=(LPARAM)(BOOL)fShowConfirmDlg (whether to show the warning dialog or not)
 +Returns 0 on success, nonzero otherwise.
 +}
 +  MS_AUTOSHUTDOWN_SHUTDOWN:pAnsiChar = 'AutoShutdown/Shutdown';
 +
 +//* shutdown types */
 +  SDSDT_CLOSEMIRANDA        = 1;  // close miranda process 
 +  SDSDT_SETMIRANDAOFFLINE   = 2;  // set all protocols to offline
 +  SDSDT_LOGOFF              = 3;  // logoff from Windows
 +  SDSDT_REBOOT              = 4;  // reboot computer
 +  SDSDT_SHUTDOWN            = 5;  // shutdown Windows and power off
 +  SDSDT_STANDBY             = 6;  // standby mode
 +  SDSDT_HIBERNATE           = 7;  // hibernate mode
 +  SDSDT_LOCKWORKSTATION     = 8;  // lock the workstation
 +  SDSDT_CLOSERASCONNECTIONS = 9;  // close all dialup connections
 +  SDSDT_MAX                 = 9;
 +
 +{ Get shutdown type description   v1.4.0.0+
 +Gets a textual description of the given shutdown type.
 + wParam=shutdownType
 + lParam=flags (see GSTDF_* below)
 +Returns a static buffer of the description of the given shutdown type.
 +It does not need to be freed in any way.
 +The returned text is already translated.
 +Returns a pointer to a string on success, NULL on error.
 +}
 +  MS_AUTOSHUTDOWN_GETTYPEDESCRIPTION:pAnsiChar = 'AutoShutdown/GetTypeDescription';
 +
 +  GSTDF_LONGDESC     = $0001;  // returns a long description
 +  GSTDF_UNICODE      = $0002;  // returns a Unicode string
 +  GSTDF_UNTRANSLATED = $0004;  // returns an untranslated string
 +
 +{ Check if shutdown type is enabled   v1.4.0.0+
 +Tests if a specific shutdown type is activated and its use is possible
 +on the system. For example hibernate and stand-by modes are not available on 
 +older versions of Windows (needs Windows ME/2000+).
 +Shutdown might also be prohibited by security restrictions.
 +This services checks it all.
 +However, there is no need to call this before calling MS_AUTOSHUTDOWN_SHUTDOWN.
 +MS_AUTOSHUTDOWN_SHUTDOWN will fail if the given shutdown type is not enabled.
 + wParam=shutdownType
 + lParam=0
 +Returns TRUE if the given shutdown type is enabled, FALSE otherwise.
 +}
 +  MS_AUTOSHUTDOWN_ISTYPEENABLED:pAnsiChar = 'AutoShutdown/IsTypeEnabled';
 +
 +{ Start shutdown watcher   v1.4.0.0+
 +Starts the watcher using the last settings specified on the dialog
 +shown by MS_AUTOSHUTDOWN_SHOWSETTINGSDIALOG.
 +Call MS_AUTOSHUTDOWN_SHOWSETTINGSDIALOG instead to offer
 +options about what watcher to use.
 +Associated event: ME_AUTOSHUTDOWN_WATCHERCHANGED
 + wParam=lParam=0
 +Returns 0 on success, nonzero otherwise.
 +}
 +  MS_AUTOSHUTDOWN_STARTWATCHER:pAnsiChar = 'AutoShutdown/StartWatcher';
 +
 +{ Stop shutdown watcher   v1.4.0.0+
 +Stops the currently running watcher.
 +If the watcher is not running, it returns error.
 +Associated event: ME_AUTOSHUTDOWN_WATCHERCHANGED
 + wParam=lParam=0
 +Returns 0 on success, nonzero otherwise.
 +}
 +  MS_AUTOSHUTDOWN_STOPWATCHER:pAnsiChar = 'AutoShutdown/StopWatcher';
 +
 +{ Check if watcher is running   v1.4.0.0+
 +Checks if the watcher is currently active or not.
 + wParam=lParam=0
 +Returns TRUE if the watcher is enabled, FALSE otherwise.
 +}/
 +  MS_AUTOSHUTDOWN_ISWATCHERENABLED:pAnsiChar = 'AutoShutdown/IsWatcherEnabled';
 +
 +//******************************************************************/
 +//************************** EVENTS ********************************/
 +//******************************************************************/
 +
 +{ Disallow shutdown process (event)   v1.3.0.0+
 +Gets fired when MS_AUTOSHUTDOWN_SHUTDOWN is called.
 +Parmeters are the same as specified at the call to MS_AUTOSHUTDOWN_SHUTDOWN.
 + wParam=shutdownType
 + lParam=(LPARAM)(BOOL)fShowConfirmDlg
 +Return 0 to allow shutdown, 1 to disallow.
 +}
 +  ME_AUTOSHUTDOWN_OKTOSHUTDOWN:pAnsiChar = 'AutoShutdown/OkToShutdown';
 +
 +{ Shutdown process started (event)   v1.3.0.1+
 +Gets fired when ME_AUTOSHUTDOWN_OKTOSHUTDOWN was confirmed.
 +Parmeters are the same as specified at the call
 +to MS_AUTOSHUTDOWN_SHUTDOWN.
 + wParam=shutdownType
 + lParam=(LPARAM)(BOOL)fShowConfirmDlg
 +Unused, return always 0 here.
 +}
 +  ME_AUTOSHUTDOWN_SHUTDOWN:pAnsiChar = 'AutoShutdown/ShutdownEvent';
 +
 +{ Watcher changed (event)   v1.3.0.0+
 +Fired when MS_AUTOSHUTDOWN_STARTWATCHER or MS_AUTOSHUTDOWN_STOPWATCHER
 +is called.
 + wParam=(WPARAM)(BOOL)fIsStarted (whether whe watcher is running now)
 + lParam=0
 +Unused, return always 0 here.
 +}
 +  ME_AUTOSHUTDOWN_WATCHERCHANGED:pAnsiChar = 'AutoShutdown/Watcher/Changed';
 +
 +
 +  SETTING_REMEMBERONRESTART_DEFAULT   = 0;  // SDROR_RUNNING
 +  SETTING_SHOWCONFIRMDLG_DEFAULT      = 1;
 +  SETTING_CONFIRMDLGCOUNTDOWN_DEFAULT = 30; // seconds
 +  SETTING_WEATHERSHUTDOWN_DEFAULT     = 0;
 +  SETTING_HDDOVERHEATSHUTDOWN_DEFAULT = 1;
 +  SETTING_SMARTOFFLINECHECK_DEFAULT   = 1;
 +
 +  SETTING_SHUTDOWNTYPE_DEFAULT        = SDSDT_SHUTDOWN;
 +  SETTING_WATCHERFLAGS_DEFAULT        = (SDWTF_SPECIFICTIME|SDWTF_ST_COUNTDOWN);
 +  SETTING_COUNTDOWN_DEFAULT           = 30;
 +  SETTING_COUNTDOWNUNIT_DEFAULT       = 60; // x times countdown seconds
 +  SETTING_TIMESTAMP_DEFAULT           = SETTING_COUNTDOWN_DEFAULT*SETTING_COUNTDOWNUNIT_DEFAULT;
 +  SETTING_CPUUSAGETHRESHOLD_DEFAULT   = 90; // percent
 +
 +  SDWTF_SPECIFICTIME = $0001;
 +  SDWTF_ST_TIME      = $0002;
 +  SDWTF_ST_COUNTDOWN = $0004;
 +  SDWTF_ST_MASK      = $0006; // bitmask for SDWTF_ST_* bits
 +  SDWTF_MESSAGE      = $0008;
 +  SDWTF_FILETRANSFER = $0010;
 +  SDWTF_IDLE         = $0020;
 +  SDWTF_STATUS       = $0040;
 +  SDWTF_CPUUSAGE     = $0080;
 +  SDWTF_MASK         = $00FF; // bitmask for all SDWTF_* bits
 +
 +  SDROR_RUNNING = 3;
 +
 +{$ENDIF}
 diff --git a/plugins/Pascal_Headers/reserve/m_simpleaway.inc b/include/delphi/reserve/m_simpleaway.inc index 16bf2328fb..16bf2328fb 100644 --- a/plugins/Pascal_Headers/reserve/m_simpleaway.inc +++ b/include/delphi/reserve/m_simpleaway.inc diff --git a/plugins/Pascal_Headers/reserve/m_smh.inc b/include/delphi/reserve/m_smh.inc index 134b2075e8..134b2075e8 100644 --- a/plugins/Pascal_Headers/reserve/m_smh.inc +++ b/include/delphi/reserve/m_smh.inc diff --git a/plugins/Pascal_Headers/reserve/m_smr.inc b/include/delphi/reserve/m_smr.inc index d8feacfc6a..d8feacfc6a 100644 --- a/plugins/Pascal_Headers/reserve/m_smr.inc +++ b/include/delphi/reserve/m_smr.inc diff --git a/plugins/Pascal_Headers/reserve/helpers/m_snapping_windows.inc b/include/delphi/reserve/m_snapping_windows.inc index e3c513482a..e3c513482a 100644 --- a/plugins/Pascal_Headers/reserve/helpers/m_snapping_windows.inc +++ b/include/delphi/reserve/m_snapping_windows.inc diff --git a/plugins/Pascal_Headers/reserve/m_spamfilter.inc b/include/delphi/reserve/m_spamfilter.inc index 1e15f7fec4..1e15f7fec4 100644 --- a/plugins/Pascal_Headers/reserve/m_spamfilter.inc +++ b/include/delphi/reserve/m_spamfilter.inc diff --git a/plugins/Pascal_Headers/reserve/m_speak.inc b/include/delphi/reserve/m_speak.inc index d8a9a4bfbe..d8a9a4bfbe 100644 --- a/plugins/Pascal_Headers/reserve/m_speak.inc +++ b/include/delphi/reserve/m_speak.inc diff --git a/plugins/Pascal_Headers/reserve/m_spellchecker.inc b/include/delphi/reserve/m_spellchecker.inc index cd636e1754..cd636e1754 100644 --- a/plugins/Pascal_Headers/reserve/m_spellchecker.inc +++ b/include/delphi/reserve/m_spellchecker.inc diff --git a/plugins/Pascal_Headers/reserve/helpers/m_statusplugins.inc b/include/delphi/reserve/m_statusplugins.inc index a638dd1f24..a638dd1f24 100644 --- a/plugins/Pascal_Headers/reserve/helpers/m_statusplugins.inc +++ b/include/delphi/reserve/m_statusplugins.inc diff --git a/plugins/Pascal_Headers/reserve/helpers/m_trigger.inc b/include/delphi/reserve/m_trigger.inc index 7f40d161e2..7f40d161e2 100644 --- a/plugins/Pascal_Headers/reserve/helpers/m_trigger.inc +++ b/include/delphi/reserve/m_trigger.inc diff --git a/plugins/Pascal_Headers/reserve/m_versioninfo.inc b/include/delphi/reserve/m_versioninfo.inc index 2257845432..2257845432 100644 --- a/plugins/Pascal_Headers/reserve/m_versioninfo.inc +++ b/include/delphi/reserve/m_versioninfo.inc diff --git a/plugins/Pascal_Headers/reserve/m_voice.inc b/include/delphi/reserve/m_voice.inc index 41213d5f10..41213d5f10 100644 --- a/plugins/Pascal_Headers/reserve/m_voice.inc +++ b/include/delphi/reserve/m_voice.inc diff --git a/plugins/Pascal_Headers/reserve/m_voiceservice.inc b/include/delphi/reserve/m_voiceservice.inc index 331212397b..331212397b 100644 --- a/plugins/Pascal_Headers/reserve/m_voiceservice.inc +++ b/include/delphi/reserve/m_voiceservice.inc diff --git a/include/delphi/reserve/m_w7ui.inc b/include/delphi/reserve/m_w7ui.inc new file mode 100644 index 0000000000..3841319ac7 --- /dev/null +++ b/include/delphi/reserve/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/include/delphi/reserve/m_weather.inc b/include/delphi/reserve/m_weather.inc new file mode 100644 index 0000000000..7a89288b39 --- /dev/null +++ b/include/delphi/reserve/m_weather.inc @@ -0,0 +1,163 @@ +{
 +Weather Protocol plugin for Miranda IM
 +Copyright (C) 2005-2009 Boris Krasnovskiy All Rights Reserved
 +Copyright (C) 2002-2005 Calvin Che
 +
 +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; version 2
 +of the License.
 +
 +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, see <http://www.gnu.org/licenses/>.
 +}
 +
 +{$IFNDEF M_WEATHER}
 +{$DEFINE M_WEATHER}
 +
 +// {6B612A34-DCF2-4e32-85CF-B6FD006B745E}
 +const MIID_WEATHER:TGUID = '{6B612A34-DCF2-4E32-85CF-B6FD006B745E}';
 +
 +//============  CONSTANTS  ============
 +const
 +// name
 +  WEATHERPROTONAME  = 'Weather';
 +  WEATHERPROTOTEXT  = 'Weather';
 +  DEFCURRENTWEATHER = 'WeatherCondition';
 +  WEATHERCONDITION  = 'Current';
 +
 +// weather conditions
 +   SUNNY   = ID_STATUS_ONLINE;
 +   NA      = ID_STATUS_OFFLINE;
 +   PCLOUDY = ID_STATUS_AWAY;
 +   CLOUDY  = ID_STATUS_NA;
 +   RAIN	   = ID_STATUS_OCCUPIED;
 +   RSHOWER = ID_STATUS_DND;
 +   SNOW    = ID_STATUS_FREECHAT;
 +   LIGHT   = ID_STATUS_INVISIBLE;
 +   THUNDER = ID_STATUS_INVISIBLE;
 +   SSHOWER = ID_STATUS_ONTHEPHONE;
 +   FOG     = ID_STATUS_OUTTOLUNCH;
 +   UNAVAIL = ID_STATUS_IDLE;
 +
 +
 +//============  WEATHER CONDITION STRUCT  ============
 +
 +// weather conditions  (added in v0.1.2.0)
 +type
 +  PWEATHERINFO = ^TWEATHERINFO;
 +  TWEATHERINFO = record
 +    hContact:THANDLE;
 +    id      :array [0..127] of WideChar;
 +    city    :array [0..127] of WideChar;
 +    update  :array [0.. 63] of WideChar;
 +    cond    :array [0..127] of WideChar;
 +    temp    :array [0.. 15] of WideChar;
 +    low     :array [0.. 15] of WideChar;
 +    high    :array [0.. 15] of WideChar;
 +    feel    :array [0.. 15] of WideChar;
 +    wind    :array [0.. 15] of WideChar;
 +    winddir :array [0.. 63] of WideChar;
 +    dewpoint:array [0.. 15] of WideChar;
 +    pressure:array [0.. 15] of WideChar;
 +    humid   :array [0.. 15] of WideChar;
 +    vis     :array [0.. 15] of WideChar;
 +    sunrise :array [0.. 31] of WideChar;
 +    sunset  :array [0.. 31] of WideChar;
 +// are the other ones that important!?
 +    status:word;
 +  end;
 +
 +
 +const
 +// ===============  WEATHER SERVICES  ================
 +
 +// Enable or disable weather protocol.
 +// WPARAM = FALSE to toggle, TRUE to use the LPARAM
 +// LPARAM = TRUE to enable, FALSE to disable
 +  MS_WEATHER_ENABLED:pAnsiChar = 'Weather/EnableDisable';
 +
 +// Update all weather info
 +// WPARAM = LPARAM = NULL
 +  MS_WEATHER_UPDATEALL:pAnsiChar = 'Weather/UpdateAll';
 +
 +// Update all weather info + erase the old ones
 +// WPARAM = LPARAM = NULL
 +  MS_WEATHER_REFRESHALL:pAnsiChar = 'Weather/RefreshAll';
 +
 +// Below are the service functions for weather contacts
 +// The plugin does NOT verify that they are used in weather contact,
 +// so bad call on these function may cause crashes.
 +
 +// Update a single station
 +// WPARAM = (HANDLE)hContact
 +// LPARAM = NULL
 +  MS_WEATHER_UPDATE:pAnsiChar = 'Weather/Update';
 +
 +// Update a single station + delete old settings
 +// WPARAM = (HANDLE)hContact
 +// LPARAM = NULL
 +  MS_WEATHER_REFRESH:pAnsiChar = 'Weather/Refresh';
 +
 +// View the brief info of a contact
 +// WPARAM = (HANDLE)hContact
 +// LPARAM = NULL
 +  MS_WEATHER_BRIEF:pAnsiChar = 'Weather/Brief';
 +
 +// Use default browser to open the complete forecast on web
 +// WPARAM = (HANDLE)hContact
 +// LPARAM = NULL
 +  MS_WEATHER_COMPLETE:pAnsiChar = 'Weather/CompleteForecast';
 +
 +// Use default browser to open the weather map defined for the contact
 +// WPARAM = (HANDLE)hContact
 +// LPARAM = NULL
 +  MS_WEATHER_MAP:pAnsiChar = 'Weather/Map';
 +
 +// Open the external log of the weather contact
 +// WPARAM = (HANDLE)hContact
 +// LPARAM = NULL
 +  MS_WEATHER_LOG:pAnsiChar = 'Weather/Log';
 +
 +// Edit weather contact setting
 +// WPARAM = (HANDLE)hContact
 +// LPARAM = NULL
 +  MS_WEATHER_EDIT:pAnsiChar = 'Weather/Edit';
 +
 +// parse the string to turn it to weather display
 +// WPARAM = (WEATHERINFO*)hContact
 +// LPARAM = (char*)display_str
 +  MS_WEATHER_GETDISPLAY:pAnsiChar = 'Weather/GetDisplay';
 +
 +// ===============  WEATHER EVENTS  ================
 +
 +{
 +HANDLE hContact = (HANDLE)wParam;
 +BOOL Condition_Changed = (BOOL)lParam;
 +
 +hContact is the handle of updated contact
 +If the weather condition is differ from the last update (either temperature/condition,
 +or the last update time, depend what the user choose in the options), then
 +Condition_Changed is true; otherwise is false.
 +}
 +  ME_WEATHER_UPDATED:pAnsiChar = 'Miranda/Weather/Updated';
 +
 +{
 +Shows a warning message for Weather PopUp.
 +wParam = (char*) lpzMessage
 +lParam = Type
 +Type can either be SM_WARNING, SM_NOTIFY, or SM_WEATHERALERT
 +
 +This event is used to avoid the error popup to occurs within a thread, so the "Use
 +multiply thread" fuction don't have to be enabled for weather popups to work.
 +}
 +  SM_WEATHERALERT = 16;
 +  ME_WEATHER_ERROR:pAnsiChar = 'Miranda/Weather/Error';
 +
 +
 +{$ENDIF}
 diff --git a/plugins/Pascal_Headers/reserve/helpers/m_webcam.inc b/include/delphi/reserve/m_webcam.inc index 592e28a479..592e28a479 100644 --- a/plugins/Pascal_Headers/reserve/helpers/m_webcam.inc +++ b/include/delphi/reserve/m_webcam.inc diff --git a/plugins/Pascal_Headers/reserve/m_yamn.inc b/include/delphi/reserve/m_yamn.inc index a44debb669..a44debb669 100644 --- a/plugins/Pascal_Headers/reserve/m_yamn.inc +++ b/include/delphi/reserve/m_yamn.inc diff --git a/plugins/Pascal_Headers/reserve/m_yapp.inc b/include/delphi/reserve/m_yapp.inc index 772c5cca81..772c5cca81 100644 --- a/plugins/Pascal_Headers/reserve/m_yapp.inc +++ b/include/delphi/reserve/m_yapp.inc diff --git a/include/delphi/statusmodes.inc b/include/delphi/statusmodes.inc index 57facc8338..e555c80a4b 100644 --- a/include/delphi/statusmodes.inc +++ b/include/delphi/statusmodes.inc @@ -1,5 +1,4 @@ -(*
 -
 +{
  Miranda IM: the free IM client for Microsoft* Windows*
  Copyright 2000-2003 Miranda ICQ/IM project,
 @@ -19,36 +18,35 @@ 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 STATUSMODES}
  {$DEFINE STATUSMODES}
  const
 -
 -    // add 1 to the ID_STATUS_CONNECTING to mark retries (v0.1.0.1+)
 -    // e.g. ID_STATUS_CONNECTING+2 is the third connection attempt, or the second retry
 -
 -    ID_STATUS_CONNECTING        = 1;
 -
 -    // max retries is just a marker, so that the clist knows what
 -    // numbers represent retries, it should set any kind of limit on the number
 -    // of retries you can and/or should do
 -
 -    MAX_CONNECT_RETRIES         = 10000;
 -
 -    // and the modes!
 -
 -    ID_STATUS_OFFLINE           = 40071;
 -    ID_STATUS_ONLINE            = 40072;
 -    ID_STATUS_AWAY              = 40073;
 -    ID_STATUS_DND               = 40074;
 -    ID_STATUS_NA                = 40075;
 -    ID_STATUS_OCCUPIED          = 40076;
 -    ID_STATUS_FREECHAT          = 40077;
 -    ID_STATUS_INVISIBLE         = 40078;
 -    ID_STATUS_ONTHEPHONE        = 40079;
 -    ID_STATUS_OUTTOLUNCH        = 40080;
 +  // add 1 to the ID_STATUS_CONNECTING to mark retries (v0.1.0.1+)
 +  // e.g. ID_STATUS_CONNECTING+2 is the third connection attempt, or the second retry
 +  ID_STATUS_CONNECTING = 1;
 +
 +  // max retries is just a marker, so that the clist knows what
 +  // numbers represent retries, it should set any kind of limit on the number
 +  // of retries you can and/or should do
 +  MAX_CONNECT_RETRIES = 10000;
 +
 +  // and the modes!
 +
 +  ID_STATUS_OFFLINE    = 40071;
 +  ID_STATUS_ONLINE     = 40072;
 +  ID_STATUS_AWAY       = 40073;
 +  ID_STATUS_DND        = 40074;
 +  ID_STATUS_NA         = 40075;
 +  ID_STATUS_OCCUPIED   = 40076;
 +  ID_STATUS_FREECHAT   = 40077;
 +  ID_STATUS_INVISIBLE  = 40078;
 +  ID_STATUS_ONTHEPHONE = 40079;
 +  ID_STATUS_OUTTOLUNCH = 40080;
 +  ID_STATUS_IDLE       = 40081; // do not use as a status
 +
 +  MAX_STATUS_COUNT = (ID_STATUS_OUTTOLUNCH-ID_STATUS_OFFLINE+1);
  {$ENDIF}
 diff --git a/include/delphi/testdll.dpr b/include/delphi/testdll.dpr index 478212d82c..f30da207ec 100644 --- a/include/delphi/testdll.dpr +++ b/include/delphi/testdll.dpr @@ -1,60 +1,79 @@  library testdll;
  uses
 +  m_api, Windows;
 -    m_globaldefs, m_api, Windows;
 -
 -    {$include m_helpers.inc}
 -
 -    function MirandaPluginInfo(mirandaVersion: DWORD): PPLUGININFO; cdecl;
 -    begin
 -        Result := @PLUGININFO;
 -        PLUGININFO.cbSize := sizeof(TPLUGININFO);
 -        PLUGININFO.shortName := 'Plugin Template';
 -        PLUGININFO.version := PLUGIN_MAKE_VERSION(0,0,0,1);
 -        PLUGININFO.description := 'The long description of your plugin, to go in the plugin options dialog';
 -        PLUGININFO.author := 'J. Random Hacker';
 -        PLUGININFO.authorEmail := 'noreply@sourceforge.net';
 -        PLUGININFO.copyright := '(c) 2003 J. Random Hacker';
 -        PLUGININFO.homepage := 'http://miranda-icq.sourceforge.net/';
 -        PLUGININFO.isTransient := 0;
 -        PLUGININFO.replacesDefaultModule := 0;
 -    end;
 -
 -    function PluginMenuCommand(wParam: WPARAM; lParam: LPARAM): Integer; cdecl;
 -    begin
 -        Result := 0;
 -        // this is called by Miranda, thus has to use the cdecl calling convention
 -        // all services and hooks need this.
 -        MessageBox(0, 'Just groovy, baby!', 'Plugin-o-rama', MB_OK);
 -    end;
 -
 -    function Load(link: PPLUGINLINK): int; cdecl;
 -    var
 -        mi: TCListMenuItem;
 -    begin
 -        // this line is VERY VERY important, if it's not present, expect crashes.
 -        PLUGINLINK := Pointer(link);
 -        pluginLink^.CreateServiceFunction('TestPlug/MenuCommand', @PluginMenuCommand);
 -        FillChar(mi, sizeof(mi), 0);
 -        mi.cbSize := sizeof(mi);
 -        mi.position := $7FFFFFFF;
 -        mi.flags := 0;
 -        mi.hIcon := LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
 -        mi.pszName := '&Test Plugin...';
 -        mi.pszService := 'TestPlug/MenuCommand';
 -        pluginLink^.CallService(MS_CLIST_ADDMAINMENUITEM, 0, lParam(@mi));
 -        Result := 0;
 -    end;
 -
 -    function Unload: int; cdecl;
 -    begin
 -        Result := 0;
 -    end;
 -
 -    exports
 -
 -        MirandaPluginInfo, Load, Unload;
 +var
 +  PluginInterfaces:array [0..1] of MUUID;
 +
 +function MirandaPluginInfoEx(mirandaVersion:DWORD):PPLUGININFOEX; cdecl;
 +begin
 +  result:=@PluginInfo;
 +  PluginInfo.cbSize     :=SizeOf(TPLUGININFOEX);
 +  PluginInfo.shortName  :='Plugin Template';
 +  PluginInfo.version    :=$00000001;
 +  PluginInfo.description:='The long description of your plugin, to go in the plugin options dialog';
 +  PluginInfo.author     :='J. Random Hacker';
 +  PluginInfo.authorEmail:='noreply@sourceforge.net';
 +  PluginInfo.copyright  :='(c) 2003 J. Random Hacker';
 +  PluginInfo.homepage   :='http://miranda-icq.sourceforge.net/';
 +  PluginInfo.flags      :=UNICODE_AWARE;
 +  PluginInfo.replacesDefaultModule:=0;
 +  PluginInfo.uuid       :=MIID_TESTPLUGIN;//'{08B86253-EC6E-4d09-B7A9-64ACDF0627B8}';
 +end;
 +
 +function PluginMenuCommand(wParam: WPARAM; lParam: LPARAM):int_ptr; cdecl;
 +begin
 +  Result:=0;
 +  // this is called by Miranda, thus has to use the cdecl calling convention
 +  // all services and hooks need this.
 +  MessageBox(0, 'Just groovy, baby!', 'Plugin-o-rama', MB_OK);
 +end;
 +
 +var
 +  onloadhook:THANDLE;
 +
 +function OnModulesLoaded(wParam:WPARAM;lParam:LPARAM):int;cdecl;
 +var
 +  mi:TCListMenuItem;
 +begin
 +  Result:=0;
 +  UnhookEvent(onloadhook);
 +
 +  CreateServiceFunction('TestPlug/MenuCommand', @PluginMenuCommand);
 +  FillChar(mi,SizeOf(mi),0);
 +  mi.cbSize    :=SizeOf(mi);
 +  mi.position  :=$7FFFFFFF;
 +  mi.flags     :=0;
 +  mi.hIcon     :=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
 +  mi.szName.a  :='&Test Plugin...';
 +  mi.pszService:='TestPlug/MenuCommand';
 +  Menu_AddMainMenuItem(@mi)
 +end;
 +
 +function Load():int; cdecl;
 +begin
 +  Langpack_register;
 +  onloadhook:=HookEvent(ME_SYSTEM_MODULESLOADED,@OnModulesLoaded);
 +
 +  Result:=0;
 +end;
 +
 +function Unload:int; cdecl;
 +begin
 +  Result:=0;
 +end;
 +
 +function MirandaPluginInterfaces:PMUUID; cdecl;
 +begin
 +  PluginInterfaces[0]:=MIID_TESTPLUGIN;
 +  PluginInterfaces[1]:=MIID_LAST;
 +  result:=@PluginInterfaces;
 +end;
 +
 +exports
 +  Load, Unload,
 +  MirandaPluginInterfaces,MirandaPluginInfoEx;
  begin
  end.
 diff --git a/plugins/AutoShutdown/common.h b/plugins/AutoShutdown/common.h index e0a82ad782..d0ee925bdc 100644 --- a/plugins/AutoShutdown/common.h +++ b/plugins/AutoShutdown/common.h @@ -70,7 +70,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  #include <m_hddinfo.h>
  #include <m_toptoolbar.h>
  #include <m_trigger.h>
 -#include <m_mwclc.h>
  #include <m_autoreplacer.h>
  #include <m_magneticwindows.h>
  #include <m_snappingwindows.h>
 diff --git a/plugins/ExternalAPI/m_mwclc.h b/plugins/ExternalAPI/m_mwclc.h deleted file mode 100644 index e72ce29904..0000000000 --- a/plugins/ExternalAPI/m_mwclc.h +++ /dev/null @@ -1,44 +0,0 @@ -/*
 -
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_MWCLC_
 -#define _M_MWCLC_
 -
 -//add a new hotkey so it has a default and can be changed in the options dialog
 -//wParam=0
 -//lParam=(LPARAM)(SKINHOTKEYDESC*)ssd;
 -//returns 0 on success, nonzero otherwise
 -typedef struct {
 -	int cbSize;
 -	const char *pszName;		   //name to refer to sound when playing and in db
 -	const char *pszDescription;	   //description for options dialog
 -//    const char *pszDefaultFile;    //default sound file to use
 -    const char *pszSection;        //section name used to group sounds (NULL is acceptable)
 -	const char *pszService;        //Service to call when HotKey Pressed
 -
 -	int DefHotKey; //default hot key for action
 -} SKINHOTKEYDESCEX;
 -
 -#define MS_SKIN_ADDHOTKEY      "Skin/HotKeys/AddNew"
 -#define MS_SKIN_PLAYHOTKEY		"Skin/HotKeys/Run"
 -
 -#endif
\ No newline at end of file diff --git a/plugins/Pascal_Headers/m_addcontact.inc b/plugins/Pascal_Headers/m_addcontact.inc deleted file mode 100644 index ce74841d7e..0000000000 --- a/plugins/Pascal_Headers/m_addcontact.inc +++ /dev/null @@ -1,49 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_ADDCONTACT}
 -{$DEFINE M_ADDCONTACT}
 -
 -const
 -  HANDLE_SEARCHRESULT = 0;
 -  HANDLE_EVENT        = 1;
 -  HANDLE_CONTACT      = 2;
 -
 -type
 -  PADDCONTACTSTRUCT = ^TADDCONTACTSTRUCT;
 -  TADDCONTACTSTRUCT = record
 -    handleType: Int;
 -    handle    : THandle;   // HDBEVENT, HCONTACT, SearchResult
 -    szProto   : PAnsiChar; // used by search result only
 -    psr       : Pointer;   // @PROTOSEARCHRESULT
 -  end;
 -
 -const
 -  {
 -    wParam : (HWND) Parent window of the dialog that will be presented
 -    lParam : Pointer to an initialised TADDCONTACTSTRUCT
 -    Affect : Open's the add contact dialog
 -    Version: 0.1.2.2+
 -  }
 -  MS_ADDCONTACT_SHOW:PAnsiChar = 'AddContact/Show';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_api.pas b/plugins/Pascal_Headers/m_api.pas deleted file mode 100644 index 33e27b3158..0000000000 --- a/plugins/Pascal_Headers/m_api.pas +++ /dev/null @@ -1,289 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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.
 -}
 -{$A+,H+}
 -{$IFNDEF VER130} // skip for delphi 5
 -  {$IFDEF WIN32}{$A4}{$ENDIF}
 -  {$IFDEF WIN64}{$A8}{$ENDIF}
 -{$ENDIF}
 -unit m_api;
 -
 -interface
 -
 -uses
 -  Windows;//, FreeImage;
 -
 -// often used
 -const
 -  strCList:PAnsiChar = 'CList';
 -const
 -  WM_USER  = $0400; // from Messages
 -  NM_FIRST = 0;     // from CommCtrl
 -
 -// RichEdit definitions
 -type
 -  PCHARRANGE = ^TCHARRANGE;
 -  TCHARRANGE = record
 -    cpMin:integer;
 -    cpMax:integer;
 -  end;
 -
 -// C translations
 -type
 -{$IFNDEF FPC}
 -  {$IFDEF WIN32}
 -  // delphi 64 must have these types anyway
 -  int_ptr   = integer;
 -  uint_ptr  = cardinal;
 -  
 -  {$ENDIF}
 -  long      = longint;
 -  plong     = ^long;
 -  DWORD_PTR = ULONG_PTR;
 -  size_t    = ULONG_PTR;
 -{$ENDIF}
 -  pint_ptr  = ^int_ptr;
 -  puint_ptr = ^uint_ptr;
 -  time_t    = ulong;
 -  int       = integer;
 -//  uint     = Cardinal;
 -//  pint     = ^int;
 -//  WPARAM   = Integer;
 -//  LPARAM   = Integer;
 -  TLPARAM   = LPARAM;
 -  TWPARAM   = WPARAM;
 -
 -// My definitions
 -  TWNDPROC = function (Dialog:HWnd; hMessage:uint; wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
 -
 -type
 -  PTChar = ^TChar;
 -  TChar = record
 -    case boolean of
 -      false: (a:PAnsiChar); // ANSI or UTF8
 -      true:  (w:PWideChar); // Unicode
 -  end;
 -
 -const
 -  hLangpack:THANDLE = 0;
 -
 -{$include m_core.inc}
 -{$include m_system.inc}
 -
 -{-- start newpluginapi --}
 -const
 -  UNICODE_AWARE = 1;
 -
 -// The UUID structure below is used to for plugin UUID's and module type definitions
 -type
 -  PMUUID = ^TMUUID;
 -  MUUID  = System.TGUID;
 -  TMUUID = MUUID;
 -{
 -  MUUID = record
 -    a:cardinal;
 -    b:word;
 -    c:word;
 -    d:array [0..7] of byte;
 -  end;
 -}
 -
 -{$include interfaces.inc}
 -
 -type
 -  PPLUGININFOEX = ^TPLUGININFOEX;
 -  TPLUGININFOEX = record
 -    cbSize     :int;
 -    shortName  :PAnsiChar;
 -    version    :DWORD;
 -    description:PAnsiChar;
 -    author     :PAnsiChar;
 -    authorEmail:PAnsiChar;
 -    copyright  :PAnsiChar;
 -    homepage   :PAnsiChar;
 -    flags      :Byte;  // right now the only flag, UNICODE_AWARE, is recognized here
 -    uuid       :MUUID; // plugin's unique identifier
 -  end;
 -
 -//----- Fork enchancement -----
 -{
 -  Miranda/System/LoadModule event
 -  called when a plugin is being loaded dynamically
 -  wParam=PLUGININFOEX*
 -  //lParam=HINSTANCE of the loaded plugin
 -}
 -const
 -  ME_SYSTEM_MODULELOAD:pAnsiChar = 'Miranda/System/LoadModule';
 -
 -{
 -  Miranda/System/UnloadModule event
 -  called when a plugin is being unloaded dynamically
 -  wParam=PLUGININFOEX*
 -  lParam=HINSTANCE of the loaded plugin
 -}
 -  ME_SYSTEM_MODULEUNLOAD:pAnsiChar = 'Miranda/System/UnloadModule';
 -
 -  { Database plugin stuff  }
 -
 -  // grokHeader() error codes
 -const
 -   EGROKPRF_NOERROR   = 0;
 -   EGROKPRF_CANTREAD  = 1; // can't open the profile for reading
 -   EGROKPRF_UNKHEADER = 2; // header not supported, not a supported profile
 -   EGROKPRF_VERNEWER  = 3; // header correct, version in profile newer than reader/writer
 -   EGROKPRF_DAMAGED   = 4; // header/version fine, other internal data missing, damaged.
 -// makeDatabase() error codes
 -   EMKPRF_CREATEFAILED = 1; // for some reason CreateFile() didnt like something
 -
 -type
 -  PDATABASELINK = ^TDATABASELINK;
 -  TDATABASELINK = record
 -    cbSize : int;
 -    {
 -      returns what the driver can do given the flag
 -    }
 -    getCapability : function (flag:int):int; cdecl;
 -    {
 -       buf: pointer to a string buffer
 -       cch: length of buffer
 -       shortName: if true, the driver should return a short but descriptive name, e.g. "3.xx profile"
 -       Affect: The database plugin must return a "friendly name" into buf and not exceed cch bytes,
 -         e.g. "Database driver for 3.xx profiles"
 -       Returns: 0 on success, non zero on failure
 -    }
 -    getFriendlyName : function (buf:PAnsiChar; cch:size_t; shortName:int):int; cdecl;
 -    {
 -      profile: pointer to a string which contains full path + name
 -      Affect: The database plugin should create the profile, the filepath will not exist at
 -        the time of this call, profile will be C:\..\<name>.dat
 -      Note: Do not prompt the user in anyway about this operation.
 -      Note: Do not initialise internal data structures at this point!
 -      Returns: 0 on success, non zero on failure - error contains extended error information, see EMKPRF_
 -    }
 -    makeDatabase : function (profile:PAnsiChar; error:Pint):int; cdecl;
 -    {
 -      profile: [in] a null terminated string to file path of selected profile
 -      error: [in/out] pointer to an int to set with error if any
 -      Affect: Ask the database plugin if it supports the given profile, if it does it will
 -        return 0, if it doesnt return 1, with the error set in error -- EGROKPRF_  can be valid error
 -        condition, most common error would be [EGROKPRF_UNKHEADER]
 -      Note: Just because 1 is returned, doesnt mean the profile is not supported, the profile might be damaged
 -        etc.
 -      Returns: 0 on success, non zero on failure
 -    }
 -    grokHeader : function (profile:PAnsiChar; error:Pint):int; cdecl;
 -    {
 -      Affect: Tell the database to create all services/hooks that a 3.xx legecy database might support into link
 -      Returns: 0 on success, nonzero on failure
 -    }
 -    Load : function (profile:PAnsiChar):int; cdecl;
 -    {
 -      Affect: The database plugin should shutdown, unloading things from the core and freeing internal structures
 -      Returns: 0 on success, nonzero on failure
 -      Note: Unload() might be called even if Load() was never called, wasLoaded is set to 1 if Load() was ever called.
 -    }
 -    Unload : function (wasLoaded:int):int; cdecl;
 -  end;
 -
 -{-- end newpluginapi --}
 -
 -var
 -  { has to be returned via MirandaPluginInfo and has to be statically allocated,
 -  this means only one module can return info, you shouldn't be merging them anyway! }
 -  PLUGININFO: TPLUGININFOEX;
 -
 -  {$include m_plugins.inc}
 -  {$include m_database.inc}
 -  {$include m_findadd.inc}
 -  {$include m_awaymsg.inc}
 -  {$include m_email.inc}
 -  {$include m_history.inc}
 -  {$include m_message.inc}
 -  {$include m_tabsrmm.inc}
 -  {$include m_url.inc}
 -  {$include m_clui.inc}
 -  {$include m_idle.inc}
 -  {$include m_ignore.inc}
 -  {$include m_skin.inc}
 -  {$include m_file.inc}
 -  {$include m_netlib.inc}
 -  {$include m_langpack.inc}
 -  {$include m_clist.inc}
 -  {$include m_clc.inc}
 -  {$include m_userinfo.inc}
 -  {$include m_protosvc.inc}
 -  {$include m_options.inc}
 -  {$include m_ssl.inc}
 -  {$include m_icq.inc}
 -  {$include m_protoint.inc}
 -  {$include m_protocols.inc}
 -  {$include m_protomod.inc}
 -  {$include m_utils.inc}
 -  {$include m_addcontact.inc}
 -  {$include statusmodes.inc}
 -  {$include m_contacts.inc}
 -  {$include m_genmenu.inc}
 -  {$include m_icolib.inc}
 -  {$include m_fontservice.inc}
 -  {$include m_chat.inc}
 -  {$include m_fingerprint.inc}
 -  {$include m_updater.inc}
 -  {$include m_variables.inc}
 -  {$include m_cluiframes.inc}
 -  {$include m_popup.inc}
 -  {$include m_avatars.inc}
 -  {$include m_smileyadd.inc}
 -  {$include m_tipper.inc}
 -  {$include m_button.inc}
 -  {$include m_dbeditor.inc}
 -  {$include m_userinfoex.inc}
 -  {$include m_imgsrvc.inc}
 -  {$include m_hotkeys.inc}
 -  {$include m_acc.inc}
 -  {$include m_xml.inc}
 -  {$include m_historyevents.inc}
 -  {$include m_modernopt.inc}
 -  {$include m_descbutton.inc}
 -  {$include m_iconheader.inc}
 -  {$include m_extraicons.inc}
 -  {$include m_errors.inc}
 -  {$include m_help.inc}
 -  {$include m_proto_listeningto.inc}
 -  {$include m_toptoolbar.inc}
 -  {$include m_toolbar.inc}
 -  {$include m_msg_buttonsbar.inc}
 -  {$include m_json.inc}
 -{$define M_API_UNIT}
 -  {$include m_helpers.inc}
 -  {$include m_clistint.inc}
 -  {$include m_metacontacts.inc}
 -  {$include m_timezones.inc}
 -  {$include m_crypto.inc}
 -
 -  {$include m_newawaysys.inc}
 -
 -implementation
 -
 -{$undef M_API_UNIT}
 -  {$include m_helpers.inc}
 -  {$include m_clistint.inc}
 -
 -end.
 diff --git a/plugins/Pascal_Headers/m_awaymsg.inc b/plugins/Pascal_Headers/m_awaymsg.inc deleted file mode 100644 index f5c083f795..0000000000 --- a/plugins/Pascal_Headers/m_awaymsg.inc +++ /dev/null @@ -1,46 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_AWAYMSG}
 -{$DEFINE M_AWAYMSG}
 -
 -const
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affect : Show the away/na/etc message for a contact
 -    Returns: 0 on success, non zero on failure, see notes
 -    notes  : returns without waiting for the message to be shown.
 -    version: v0.1.0.1+
 -  }
 -  MS_AWAYMSG_SHOWAWAYMSG:PAnsiChar = 'SRAway/GetMessage';
 -
 -  {
 -    returns: the default status message for a status
 -    wParam=status
 -    lParam=szProto
 -    notes: returns status msg. Remember to free the return value
 -  }
 -  MS_AWAYMSG_GETSTATUSMSG :PAnsiChar = 'SRAway/GetStatusMessage';
 -  MS_AWAYMSG_GETSTATUSMSGW:PAnsiChar = 'SRAway/GetStatusMessageW';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_clc.inc b/plugins/Pascal_Headers/m_clc.inc deleted file mode 100644 index 5c00e6ab22..0000000000 --- a/plugins/Pascal_Headers/m_clc.inc +++ /dev/null @@ -1,306 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_CLC}
 -{$DEFINE M_CLC}
 -
 -const
 -  CLISTCONTROL_CLASS = 'CListControl';
 -
 -  // styles
 -
 -  CLS_MANUALUPDATE    = $0001; // todo
 -  CLS_SHOWHIDDEN      = $0002;
 -  CLS_HIDEOFFLINE     = $0004; // hides all offline users
 -  CLS_CHECKBOXES      = $0008;
 -  CLS_MULTICOLUMN     = $0010; // not true multi-column, just for ignore/vis options
 -  CLS_HIDEEMPTYGROUPS = $0020; // note: this flag will be spontaneously removed if the 'new subgroup' menu item is clicked, for obvious reasons
 -  CLS_USEGROUPS       = $0040;
 -  CLS_NOHIDEOFFLINE   = $0080; // overrides CLS_HIDEOFFLINE and the per-group hideoffline setting
 -  CLS_GREYALTERNATE   = $0100; // make every other line slightly grey
 -  CLS_GROUPCHECKBOXES = $0200; // put checkboxes on groups too (managed by CLC)
 -  CLS_CONTACTLIST     = $0400; // this control will be the main contact list (v. 0.3.4.3+ 2004/11/02)
 -
 -  CLS_EX_DISABLEDRAGDROP     = $00000001;
 -  CLS_EX_EDITLABELS          = $00000002;
 -  CLS_EX_SHOWSELALWAYS       = $00000004;
 -  CLS_EX_TRACKSELECT         = $00000008;
 -  CLS_EX_SHOWGROUPCOUNTS     = $00000010;
 -  CLS_EX_DIVIDERONOFF        = $00000020;
 -  CLS_EX_HIDECOUNTSWHENEMPTY = $00000040;
 -  CLS_EX_NOTRANSLUCENTSEL    = $00000080;
 -  CLS_EX_LINEWITHGROUPS      = $00000100;
 -  CLS_EX_QUICKSEARCHVISONLY  = $00000200;
 -  CLS_EX_SORTGROUPSALPHA     = $00000400;
 -  CLS_EX_NOSMOOTHSCROLLING   = $00000800;
 -
 -  CLM_FIRST = $1000; // this is the same as LVM_FIRST
 -  CLM_LAST  = $1100;
 -
 -// messages, compare with equivalent TVM_* in the WINAPI
 -
 -  CLM_ADDCONTACT      = (CLM_FIRST+0); // wParam=hContact
 -  CLM_ADDGROUP        = (CLM_FIRST+1); // wParam=hGroup
 -  CLM_AUTOREBUILD     = (CLM_FIRST+2);
 -  CLM_DELETEITEM      = (CLM_FIRST+3); // wParam=hItem
 -  CLM_EDITLABEL       = (CLM_FIRST+4); // wParam=hItem
 -  CLM_ENDEDITLABELNOW = (CLM_FIRST+5); // wParam=cancel, 0 to save
 -  CLM_ENSUREVISIBLE   = (CLM_FIRST+6); // wParam=hItem, lParam=partialOk
 -
 -  CLE_TOGGLE   = -1;
 -  CLE_COLLAPSE = 0;
 -  CLE_EXPAND   = 1;
 -  CLE_INVALID  = $FFFF;
 -
 -  CLM_EXPAND            = (CLM_FIRST+7);  // wParam=hItem, lParam=CLE_
 -  CLM_FINDCONTACT       = (CLM_FIRST+8);  // wParam=hContact, returns an hItem
 -  CLM_FINDGROUP         = (CLM_FIRST+9);  // wParam=hGroup, returns an hItem
 -  CLM_GETBKCOLOR        = (CLM_FIRST+10); // returns a COLORREF
 -  CLM_GETCHECKMARK      = (CLM_FIRST+11); // wParam=hItem, returns 1 or 0
 -  CLM_GETCOUNT          = (CLM_FIRST+12); // returns the total number of items
 -
 -  CLM_GETEDITCONTROL    = (CLM_FIRST+13); // returns the HWND, or NULL
 -  CLM_GETEXPAND         = (CLM_FIRST+14); // wParam=hItem, returns a CLE_, CLE_INVALID if not a group
 -  CLM_GETEXTRACOLUMNS   = (CLM_FIRST+15); // returns number of extra columns
 -  CLM_GETEXTRAIMAGE     = (CLM_FIRST+16); // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),0), returns iImage or $FF
 -  CLM_GETEXTRAIMAGELIST = (CLM_FIRST+17); // returns HIMAGELIST
 -  CLM_GETFONT           = (CLM_FIRST+18); // wParam=fontId, see clm_setfont. returns hFont.
 -  CLM_GETINDENT         = (CLM_FIRST+19); // wParam=new group indent
 -  CLM_GETISEARCHSTRING  = (CLM_FIRST+20); // lParam=(AnsiChar*)pszStr, max 120 bytes, returns number of chars in string
 -  CLM_GETITEMTEXT       = (CLM_FIRST+21); // wParam=hItem, lParam=(TChar*)pszStr, max 120 bytes
 -  CLM_GETSCROLLTIME     = (CLM_FIRST+22); // returns time in ms
 -  CLM_GETSELECTION      = (CLM_FIRST+23); // returns hItem
 -
 -  CLCHT_ABOVE        = $0001; // above client area
 -  CLCHT_BELOW        = $0002; // below client area
 -  CLCHT_TOLEFT       = $0004; // left of client area
 -  CLCHT_TORIGHT      = $0008; // right of client area
 -  CLCHT_NOWHERE      = $0010; // in client area, not on an item
 -  CLCHT_ONITEMICON   = $0020;
 -  CLCHT_ONITEMCHECK  = $0040;
 -  CLCHT_ONITEMLABEL  = $0080;
 -  CLCHT_ONITEMINDENT = $0100; // to the left of an item icon
 -  CLCHT_ONITEMEXTRA  = $0200; // on an extra icon, HIBYTE(HIWORD()) says which
 -  CLCHT_ONITEM       = $03E0;
 -  CLCHT_INLEFTMARGIN = $0400;
 -  CLCHT_BELOWITEMS   = $0800; // in client area but below last item
 -
 -  CLM_HITTEST    = (CLM_FIRST+25); // lParam=MAKELPARAM(x,y) (relative to control), wParam=(PDWORD)&hitTest (see encoding of HitTest() in clc.h, can be NULL) returns hItem or NULL
 -  CLM_SELECTITEM = (CLM_FIRST+26); // wParam=hItem
 -
 -  CLB_TOPLEFT  = 0;
 -  CLB_STRETCHV = 1;
 -  CLB_STRETCHH = 2; // and tile vertically
 -  CLB_STRETCH  = 3;
 -
 -  CLBM_TYPE         = $00FF;
 -  CLBF_TILEH        = $1000;
 -  CLBF_TILEV        = $2000;
 -  CLBF_PROPORTIONAL = $4000;
 -  CLBF_SCROLL       = $8000;
 -
 -  CLM_SETBKBITMAP       = (CLM_FIRST+27); // wParam=mode, lParam=hBitmap (don't delete it), NULL for none
 -  CLM_SETBKCOLOR        = (CLM_FIRST+28); // wParam=a COLORREF, default is GetSysColor(COLOR_3DFACE)
 -  CLM_SETCHECKMARK      = (CLM_FIRST+29); // wParam=hItem, lParam=1 or 0
 -  CLM_SETEXTRACOLUMNS   = (CLM_FIRST+30); // wParam=number of extra columns (zero to MAXEXTRACOLUMNS from clc.h, currently 16)
 -  CLM_SETEXTRAIMAGE     = (CLM_FIRST+31); // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),iImage). iImage=$FF is a blank
 -  CLM_SETEXTRAIMAGELIST = (CLM_FIRST+32); // lParam=HIMAGELIST, wParam=WideImageList
 -
 -  FONTID_CONTACTS      = 0;
 -  FONTID_INVIS         = 1;
 -  FONTID_OFFLINE       = 2;
 -  FONTID_NOTONLIST     = 3;
 -  FONTID_GROUPS        = 4;
 -  FONTID_GROUPCOUNTS   = 5;
 -  FONTID_DIVIDERS      = 6;
 -  FONTID_OFFINVIS      = 7;
 -  FONTID_STATUSMSG     = 8;
 -  FONTID_GROUPSCLOSED  = 9;
 -  FONTID_CONTACTSHOVER = 10;
 -  FONTID_MAX           = 18;
 -
 -  CLM_SETFONT            = (CLM_FIRST+33); // wParam=hFont, lParam=MAKELPARAM(fRedraw,fontId)
 -  CLM_SETINDENT          = (CLM_FIRST+34); // wParam=new indent, default is 3 pixels
 -  CLM_SETITEMTEXT        = (CLM_FIRST+35); // wParam=hItem, lParam=(AnsiChar*)pszNewText
 -  CLM_SETSCROLLTIME      = (CLM_FIRST+36); // wParam=time in ms, default 200
 -  CLM_SETHIDEEMPTYGROUPS = (CLM_FIRST+38); // wParam=TRUE/FALSE
 -
 -  GREYF_UNFOCUS = $80000000;
 -  MODEF_OFFLINE = $40000000;
 -
 -  // and use the PF2_ #defines from m_protosvc.inc
 -  CLM_SETGREYOUTFLAGS    = (CLM_FIRST+39); // wParam=new flags
 -  CLM_GETHIDEOFFLINEROOT = (CLM_FIRST+40); // returns TRUE/FALSE
 -  CLM_SETHIDEOFFLINEROOT = (CLM_FIRST+41); // wParam=TRUE/FALSE
 -  CLM_SETUSEGROUPS       = (CLM_FIRST+42); // wParam=TRUE/FALSE
 -  CLM_SETOFFLINEMODES    = (CLM_FIRST+43); // for 'hide offline', wParam=PF2_ flags and MODEF_OFFLINE
 -  CLM_GETEXSTYLE         = (CLM_FIRST+44); // returns CLS_EX_ flags
 -  CLM_SETEXSTYLE         = (CLM_FIRST+45); // wParam=CLS_EX_ flags
 -  CLM_GETLEFTMARGIN      = (CLM_FIRST+46); // returns count of pixels
 -  CLM_SETLEFTMARGIN      = (CLM_FIRST+47); // wParam=pixels
 -
 -// the order of info items is never changed, so make sure you add them in the
 -// order you want them to remain
 -                                                                                      
 -const
 -  CLM_ADDINFOITEMA = (CLM_FIRST+48); // lParam=&TCLCINFOITEM, returns hItem
 -  CLM_GETITEMTYPE  = (CLM_FIRST+49); // wParam=hItem, returns a CLCIT_
 -  CLM_GETNEXTITEM  = (CLM_FIRST+50); // wParam=flag, lParam=hItem, returns an hItem
 -  CLM_GETTEXTCOLOR = (CLM_FIRST+51); // wParam=FONTID_, returns COLORREF
 -  CLM_SETTEXTCOLOR = (CLM_FIRST+52); // wParam=FONTID_, lParam=COLORREF
 -
 -  CLM_ADDINFOITEMW = (CLM_FIRST+53); // lParam=&TCLCINFOITEM, returns hItem
 -  CLM_ADDINFOITEM = CLM_ADDINFOITEMW;
 -
 -//DO NOT USE IT EXTERNALLY CAN BE NOT SUPPORTED BY CLIST
 -  CLM_SETWIDEEXTRAIMAGE     = CLM_FIRST+60; // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),iImage). iImage=0xFFFF is a blank
 -  CLM_GETWIDEEXTRAIMAGE     = CLM_FIRST+61; // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),0), returns iImage or 0xFF
 -  CLM_GETWIDEEXTRAIMAGELIST = CLM_FIRST+62; // returns HWIDEIMAGELIST
 -
 -  CLCIIF_BELOWGROUPS   = 1;   // put it between groups and contacts, default is at top
 -  CLCIIF_BELOWCONTACTS = 2;   // put it at the bottom
 -  CLCIIF_CHECKBOX      = $40; // give this item a check box
 -  CLCIIF_GROUPFONT     = $80; // draw the item using FONTID_GROUPS
 -
 -  CLCIT_INVALID = -1;
 -  CLCIT_GROUP   = 0;
 -  CLCIT_CONTACT = 1;
 -  CLCIT_DIVIDER = 2;
 -  CLCIT_INFO    = 3;
 -
 -  CLGN_ROOT            = 0;
 -  CLGN_CHILD           = 1;
 -  CLGN_PARENT          = 2;
 -  CLGN_NEXT            = 3;
 -  CLGN_PREVIOUS        = 4;
 -  CLGN_NEXTCONTACT     = 5;
 -  CLGN_PREVIOUSCONTACT = 6;
 -  CLGN_NEXTGROUP       = 7;
 -  CLGN_PREVIOUSGROUP   = 8;
 -
 -  CLNF_ISGROUP = 1;
 -  CLNF_ISINFO  = 2;
 -
 -  CLN_FIRST          = (0-100);
 -  CLN_EXPANDED       = (CLN_FIRST-0);  // hItem=hGroup, action=CLE_*
 -  CLN_LISTREBUILT    = (CLN_FIRST-1);
 -  CLN_ITEMCHECKED    = (CLN_FIRST-2);  // todo  // hItem,action,flags valid
 -  CLN_DRAGGING       = (CLN_FIRST-3);  // hItem,pt,flags valid. only sent when cursor outside window, return nonzero if processed
 -  CLN_DROPPED        = (CLN_FIRST-4);  // hItem,pt,flags valid. only sent when cursor outside window, return nonzero if processed
 -  CLN_LISTSIZECHANGE = (CLN_FIRST-5);  // pt.y valid. the vertical height of the visible items in the list has changed.
 -  CLN_OPTIONSCHANGED = (CLN_FIRST-6);  // nothing valid. If you set some extended options they have been overwritten and should be re-set
 -  CLN_DRAGSTOP       = (CLN_FIRST-7);  // hItem,flags valid. sent when cursor goes back in to the window having been outside, return nonzero if processed
 -  CLN_NEWCONTACT     = (CLN_FIRST-8);  // hItem,flags valid. sent when a new contact is added without a full list rebuild
 -  CLN_CONTACTMOVED   = (CLN_FIRST-9);  // hItem,flags valid. sent when contact is moved without a full list rebuild
 -  CLN_CHECKCHANGED   = (CLN_FIRST-10); // hItem,flags valid. sent when any check mark is changed, but only for one change if there are many
 -
 -type
 -  PCLCINFOITEM = ^TCLCINFOITEM;
 -  TCLCINFOITEM = record
 -    cbSize      : int;
 -    pszText     : TChar;
 -    hParentGroup: THandle;
 -    flags       : DWORD;
 -    hIcon       : HICON; // todo
 -  end;
 -
 -  PNMCLISTCONTROL = ^TNMCLISTCONTROL;
 -  TNMCLISTCONTROL = record
 -    hdr    : TNMHDR;        // depends on Windows.pas
 -    hItem  : THandle;
 -    action : int;
 -    iColumn: int;       // -1 if not on an extra column
 -    flags  : DWORD;
 -    pt     : TPoint;         // depends on Windows.pas
 -  end;
 -
 -  PCLCINFOTIP = ^TCLCINFOTIP;
 -  TCLCINFOTIP = record
 -    cbSize       : int;
 -    isTreeFocused: int;     // so the plugin can provide an option
 -    isGroup      : int;     // 0 if it's contact, 1 if it's a group
 -    hItem        : THANDLE; // handle to group or contact
 -    ptCursor     : TPOINT;
 -    rcItem       : TRECT;
 -  end;
 -
 -  PCLCEXTRAINFOTIP = ^TCLCEXTRAINFOTIP;
 -  TCLCEXTRAINFOTIP = record
 -    cbSize       : int;
 -    isTreeFocused: int;     // so the plugin can provide an option
 -    hItem        : THANDLE; // handle to group or contact
 -    ptCursor     : TPOINT;
 -    rcItem       : TRECT;
 -    extraIndex   : int;
 -    hwnd         : HWND;
 -  end;
 -
 -const
 -  {
 -    wParam : 0
 -    lParam : Pointer to a TCLCINFOTIP structure
 -    Affect : An InfoTip for an item should be shown now, see notes
 -    Returns: [non zero] if you process this, because it makes no sense
 -             for more than one module to process this.
 -    Notes  : It's upto the module where to put the InfoTip, Normally
 -             it's a few pixels below and to the right of the cursor.
 -             -
 -             This event is called after the mouse ehas been stationary over
 -             a contact for (by default) 200ms
 -  }
 -  ME_CLC_SHOWINFOTIP     :PAnsiChar = 'CLC/ShowInfoTip';
 -  ME_CLC_SHOWEXTRAINFOTIP:PAnsiChar = 'CLC/ShowExtraInfoTip';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to an initialised TCLCINFOTIP
 -    Affect : It's time to destroy an infotip, see notes
 -    Notes  : Only cbSize, isGroup, hItem are set
 -    notes  : This is sent when the mouse moves off a contact when ME_CLC_SHOWINFOTIP
 -             has previously been called.
 -             -
 -             If you don't want this behaviour, you should have grabbed the mouse
 -             capture yourself --
 -  }
 -  ME_CLC_HIDEINFOTIP:PAnsiChar = 'CLC/HideInfoTip';
 -
 -  {
 -    wParam : new_time
 -    lParam : 0
 -    Affect : Set a new hover time before the info tip hooks are called, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : The value of this setting is applid to all current CLC windows
 -             and saved to b applied to all future windows, it is persistent.
 -             -
 -             Time is in milliseconds, default is 750ms
 -  }
 -  MS_CLC_SETINFOTIPHOVERTIME:PAnsiChar = 'CLC/SetInfoTipHoverTime';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : get the hover time before the infotip hooks are called
 -    returns: the hover time in MS
 -  }
 -  MS_CLC_GETINFOTIPHOVERTIME:PAnsiChar = 'CLC/GetInfoTipHoverTime';
 -
 -{$ENDIF}
\ No newline at end of file diff --git a/plugins/Pascal_Headers/m_clist.inc b/plugins/Pascal_Headers/m_clist.inc deleted file mode 100644 index 24e4062172..0000000000 --- a/plugins/Pascal_Headers/m_clist.inc +++ /dev/null @@ -1,703 +0,0 @@ -{$IFNDEF M_CLIST}
 -{$DEFINE M_CLIST}
 -
 -{$ifndef STATUSMODES}
 -    {$include statusmodes.inc}
 -{$endif}
 -
 -type
 -  HGENMENU = THANDLE;
 -
 -const
 -  {
 -    wParam : new_status
 -    lParam : 0
 -    Affect : Sent when the user acks to change their status, see notes
 -    Notes  : Also sent due to a MS_CLIST_SETSTATUSMODE
 -  }
 -  ME_CLIST_STATUSMODECHANGE:PAnsiChar = 'CList/StatusModeChange';
 -
 -  {
 -    wParam : new_status
 -    lParam : 0
 -    Affect : Force a change of status mode, see statusmodes.inc
 -  }
 -  MS_CLIST_SETSTATUSMODE:PAnsiChar = 'CList/SetStatusMode';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : Get the current status mode, see notes
 -    Notes  : This is the status, as set by the user, not any protocol specific status
 -             all protocol modules will attempt to conform to this setting at ALL times.
 -  }
 -  MS_CLIST_GETSTATUSMODE:PAnsiChar = 'CList/GetStatusMode';
 -
 -  GSMDF_PREFIXONLINE = 1; // prefix "Online :" for online submodes, e.g. 'away'
 -  GSMDF_UNICODE      = 2; // will return TCHAR* instead of AnsiChar*
 -  GSMDF_UNTRANSLATED = 4;
 -
 -  {
 -    wParam : status_mode
 -    lParam : flags
 -    Affect : Get a textual description of the given status mode
 -    Returns: pointer to a static buffer of the description of the given status mode
 -             or NULL(0) if the mode was unknown.
 -    Version: v0.1.0.1+
 -  }
 -  MS_CLIST_GETSTATUSMODEDESCRIPTION:PAnsiChar = 'CList/GetStatusModeDescription';
 -
 -type
 -// WARNING: do not use Translate(TS) for p(t)szName or p(t)szPopupName as they
 -// are translated by the core, which may lead to double translation.
 -// Use LPGEN instead which are just dummy wrappers/markers for "lpgen.pl".
 -  PCLISTMENUITEM = ^TCLISTMENUITEM;
 -  TCLISTMENUITEM = record
 -    cbSize         : int;     // size in bytes of this structure
 -    szName         : TChar;   // [TRANSLATED-BY-CORE] text of the menu item
 -    flags          : DWORD;
 -    position       : int;     // approx position on the menu, lower numbers go nearer the top
 -    hIcon          : THandle; // icon to put by the item, if this was *not* loaded from
 -                              // a resource, you can delete it straight after the call
 -    //icolibItem:HANDLE;  if CMIF_ICONFROMICOLIB used
 -    pszService     : PAnsiChar;   // name of the service to call when the service is clicked
 -    szPopupName    : TChar;   // [TRANSLATED-BY-CORE] name of the popup menu that this item is on, if this
 -                              // is NULL the iteem is on the root of the menu
 -		// or hParentMenu:HGENMENU - valid if CMIF_ROOTHANDLE is set. NULL or (HGENMENU)-1 means the root menu
 -    popupPosition  : int;     // position of the popup menu on the root menu, ignored
 -                              // if pszPopupName is NULL(0) or if the popup menu already exists
 -    hotKey         : DWORD;   // keyboard accelerator, same as lParam of WM_HOTKEY, 0 for none
 -    pszContactOwner: PAnsiChar;   // contact menus only, the protocol module that owns
 -                              // the contacts to which this to which this menu item
 -                              // applies, NULL(0) if it applies to all contacts.
 -                              // if it applies to multiple but not all protocols
 -                              // add multiple menu items or use ME_CLIST_PREBUILDCONTACTMENU
 -    hLangpack      : int;     // plugin's hLangpack (added automatically)
 -  end;
 -
 -const
 -  HGENMENU_ROOT = HGENMENU(-1);
 -
 -const
 -  CMIF_GRAYED     = 1;
 -  CMIF_CHECKED    = 2;
 -  CMIF_HIDDEN     = 4;   // only works on contact menus
 -  CMIF_NOTOFFLINE = 8;   // item won't appear for contacts that are offline
 -  CMIF_NOTONLINE  = 16;  //          "      online
 -  CMIF_NOTONLIST  = 32;  // item won't appear on standard contacts
 -  CMIF_NOTOFFLIST = 64;  // item won't appear on contacts that have the 'NotOnList' setting
 -  CMIF_ROOTHANDLE = 384; // means that hParentMenu member is set (since 0.8#26)
 -  CMIF_UNICODE    = 512; // will return TCHAR* instead of AnsiChar*
 -  CMIF_KEEPUNTRANSLATED = 1024; // don't translate a menu item
 -  CMIF_ICONFROMICOLIB   = 2048; // use icolibName instead of hIcon
 -
 -  CMIF_DEFAULT = 4096; // this menu item is the default one
 -
 -// for compatibility. since 0.8.0 they both mean nothing
 -  CMIF_ROOTPOPUP  = 128; // root item for new popup (save return id for childs)
 -  CMIF_CHILDPOPUP = 256; // child for rootpopup menu
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to a initalised TCLISTMENUITEM structure
 -    Affect : Add a new menu item to the main menu, see notes
 -    Returns: A handle to the new MENU item or NULL(0) on failure
 -    Notes  : The given TCLISTMENUITEM.pszService in is called when the item
 -             get clicked with :
 -             -
 -             wParam = 0, lParam = hwndContactList
 -  }
 -  MS_CLIST_ADDMAINMENUITEM:PAnsiChar = 'CList/AddMainMenuItem';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to a initalised TCLISTMENUITEM structure
 -    Affect : Add a new item to the user contact menus, see notes
 -    Notes  : exactly the same as MS_CLIST_ADDMAINMENUITEM except when an item
 -             is selected, the service gets called with wParam=hContact,
 -             pszContactOwner is obeyed.
 -             -
 -             Popup menus are not supported, pszPopupName and popupPosition
 -             are ignored. If CTRL is held down when right clicking the menu
 -             position numbers will be displayed in brackets after the menu item
 -             text, this only works in debug builds!
 -  }
 -  MS_CLIST_ADDCONTACTMENUITEM:PAnsiChar = 'CList/AddContactMenuItem';
 -  MS_CLIST_ADDSTATUSMENUITEM :PAnsiChar = 'CList/AddStatusMenuItem';
 -//adds a protocol menu item        v0.9+
 -  MS_CLIST_ADDPROTOMENUITEM  :PAnsiChar = 'CList/AddProtoMenuItem';
 -
 -  CMIM_NAME   = $80000000;
 -  CMIM_FLAGS  = $40000000;
 -  CMIM_ICON   = $20000000;
 -  CMIM_HOTKEY = $10000000;
 -  CMIM_ALL    = $F0000000;
 -
 -  {
 -    wParam : HMENUITEM
 -    lParam : Pointer to a initalised TCLISTMENUITEM
 -    Affect : Modify an existing menu item, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : hMenuItem will have been returned by MS_CLIST_ADD[MAIN]MENUITEM
 -             TCLISTMENUITEM.flags should contain CMIM_* constants (see above)
 -             to mark which fields should be updated, if it's not present, they
 -             can't be updated -- if flags do not exist for a field it can not
 -             be updated.
 -    Version: v0.1.0.1+
 -  }
 -  MS_CLIST_MODIFYMENUITEM:PAnsiChar = 'CList/ModifyMenuItem';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affect : the context menu for a contact is about to be built, see notes
 -    Notes  : modules should use this to change menu items that are specific
 -             to the contact that has them
 -    Version: v0.1.0.1+
 -  }
 -  ME_CLIST_PREBUILDCONTACTMENU:PAnsiChar = 'CList/PreBuildContactMenu';
 -
 -type
 -  PCLISTDOUBLECLICKACTION = ^TCLISTDOUBLECLICKACTION;
 -  TCLISTDOUBLECLICKACTION = record
 -    cbSize         : int;
 -    pszContactOwner: PAnsiChar; // name of the protocol owning the contact or NULL(0) for all
 -    flags          : DWORD;     // CMIF_NOT flags above
 -    pszService     : PAnsiChar; // service to call on double click, is called with wParam=hContact, lParam=0
 -  end;
 -
 -const
 -  {
 -    wParam : 0
 -    lParam : Pointer to a initalised TCLISTDOUBLECLICKACTION structure
 -    Affect : Sets the service to call when a contact is double-clicked, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : in case of conflicts, the first module to have registered
 -             will get the double click, no others will, this service
 -             will return success even for duplicates
 -             -
 -             This service was dropped from development during 0.3.0.0, it is no
 -             longer supported, see ME_CLIST_DOUBLECLICKED
 -    Version: 0.1.2.2+, 0.2.0+ ONLY (not 3.0a)
 -  }
 -  MS_CLIST_SETDOUBLECLICKACTION:PAnsiChar = 'CList/SetDoubleClickAction';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : <none>
 -    Affect : Register with this event to be notified of a double click on the CList
 -             against a HCONTACT, you will not be notified if there is a pending CList event
 -             that the double click clears, (i.e. flashing icon is presented to be clicked)
 -    Version: 0.3.0.0
 -  }
 -  ME_CLIST_DOUBLECLICKED:PAnsiChar = 'CList/DoubleClicked';
 -
 -  GCDNF_NOMYHANDLE = 1; // will never return the user's custom name
 -  GCDNF_UNICODE    = 2; // will return TCHAR* instead of AnsiChar*
 -  GCDNF_NOCACHE    = 4; // will not use the cache
 -  {
 -    wParam : HCONTACT
 -    lParam : flags
 -    Affect : Gets the string that the contact list will use to represent a contact
 -    Returns: Always a pointer
 -    Notes  : Returns a pointer to the name, will always succeed, even if it needs
 -             to return "(Unknown Contact)"
 -             -
 -             this pointer is a statically allocated buffer which will
 -             be overwritten on every call to this service, callers should make
 -             sure that they copy the information before they call it again
 -    Version: v0.1.2.0+, 0.2.0+ ONLY (0.3a supports the contacts module)
 -  }
 -  MS_CLIST_GETCONTACTDISPLAYNAME:PAnsiChar = 'CList/GetContactDisplayName';
 -
 -  {
 -    Invalidates the display name cache
 -    wParam=(WPARAM)(HANDLE)hContact
 -    lParam=not used
 -  }
 -  MS_CLIST_INVALIDATEDISPLAYNAME:PAnsiChar = 'CList/InvalidateDiplayName';
 -
 -type
 -  PCLISTEVENT = ^TCLISTEVENT;
 -  TCLISTEVENT = record
 -    cbSize    : int;     // size in bytes
 -    hContact  : THANDLE; // handle to the contact to put the icon by
 -    hIcon     : HICON;   // icon to flash!
 -    flags     : DWORD;
 -    hDBEvent  : THANDLE; // caller defined, but should be unique for hContact
 -                         // or pszProtocol:PAnsiChar
 -    lParam    : LPARAM;
 -    pszService: PAnsiChar;   // name of service to call on activation
 -    szTooltip : TChar;   // short description of the event to display as a tooltip on the systray
 -  end;
 -
 -const
 -  CLEF_URGENT         = 1; // flashes the icon even if the user is occupied, and puts
 -                           // the event at the top of the queue
 -  CLEF_ONLYAFEW       = 2; // icon will not flash forever, only a few times,
 -                           // e.g. online alert
 -  CLEF_UNICODE        = 4; // set pszTooltip as unicode
 -  CLEF_PROTOCOLGLOBAL = 8; // set event globally for protocol, hContact has to
 -                           // be NULL, lpszProtocol the protocol ID name to be set
 -  {
 -    wParam : 0
 -    lParam : Pointer to a TCLISTEVENT
 -    Affect : Add's an event to the list
 -    Notes  : The service will flash TCLISTEVENT.hIcon, next to the
 -             contact, TCLISTEVENT.hContact
 -             -
 -             pszService is called is called wParam=hwndContactList,
 -             lParam=pointer to a TCLISTEVENT.
 -             -
 -             the TCLISTEVENT data is invalidated after this service returns
 -             so copy anything from it if required.
 -             -
 -             TCLISTEVENT.pszService will also be called if the user
 -             double clicks on the icon, at which point it will be removed
 -             from the contact lists queue automatically.
 -             -
 -             TCLISTEVENT.hContact and TCLISTEVENT.hDBEvent should be unique.
 -  }
 -  MS_CLIST_ADDEVENT:PAnsiChar = 'CList/AddEvent';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : HDBEVENT
 -    Affect : Remove an event from the contact list queue
 -    Returns: 0 on success, [non zero] on failure
 -  }
 -  MS_CLIST_REMOVEEVENT:PAnsiChar = 'Clist/RemoveEvent';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : iEvent
 -    Affect : Get the details of an event in the queue, see notes
 -    Returns: A CLISTEVENT* or NULL(0) on failure
 -    Notes  : Returns the iEvent'1st/2nd/3rd/nth elemented queried,
 -             e.g. iEvent=0 will get the event that will be returned if the
 -             user double clicks on that HCONTACT
 -             -
 -             Use HCONTACT=NULL, iEvent=0 for example to get the event
 -             the user will get if they double click on the tray.
 -    Version: v0.1.2.1+
 -  }
 -  MS_CLIST_GETEVENT:PAnsiChar = 'CList/GetEvent';
 -
 -  {
 -    wParam : ControlID
 -    lParam : Pointer to MEASUREITEMSTRUCT struct
 -    Affect : Process a WM_MEASUREITEM message for user context menus, see notes
 -    Notes  : just because wParam, lParam is defined here, only pass them
 -             opaquely to this service, as is.
 -             -
 -             This is just to draw icons, if it is not called, the icons
 -             will not be drawn
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_MENUMEASUREITEM:PAnsiChar = 'CList/MenuMeasureItem';
 -
 -  {
 -    wParam :
 -    lParam :
 -    Affect : Process a WM_DRAWITEM message for user context menus,
 -             wParam, lParam should be passed from such message handler.
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_MENUDRAWITEM:PAnsiChar = 'CList/MenuDrawItem';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affect : Built the context menu for a specific contact
 -    Returns: A HMENU handle identifying the menu, this should be DestroyMenu()ed
 -             when done.
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_MENUBUILDCONTACT:PAnsiChar = 'CList/MenuBuildContact';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : Get the image list handle with all the useful icons in it
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_GETICONSIMAGELIST:PAnsiChar = 'CList/GetIconsImageList';
 -  IMAGE_GROUPOPEN = 11;
 -  IMAGE_GROUPSHUT = 12;
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affect : Get the icon that should be associated with a contact
 -    Returns: an index into the contact list imagelist, if the icon
 -             is a flashing icon, this service won't return information about it
 -             see below
 -    Version: v0.1.2.0+
 -  }
 -  MS_CLIST_GETCONTACTICON:PAnsiChar = 'CList/GetContactIcon';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : ICON_ID
 -    Affect : The icon of a contact in the contact list has changed,
 -             ICON_ID is an index to what image has changed
 -    Version: v0.1.2.1+
 -  }
 -  ME_CLIST_CONTACTICONCHANGED:PAnsiChar = 'CList/ContactIconChanged';
 -
 -//******************************* CLUI only *********************************
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : Get the handle to Miranda's main menu
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_MENUGETMAIN:PAnsiChar = 'CList/MenuGetMain';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : Get a handle to Miranda's status menu
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_MENUGETSTATUS:PAnsiChar = 'CList/MenuGetStatus';
 -
 -  CLISTMENUIDMIN = $4000; // reserved range for clist menu ids
 -  CLISTMENUIDMAX = $7FFF;
 -  {
 -    NOTE:  v0.7.0.26+
 -    Due to it is generic practice to handle menu command via WM_COMMAND
 -    window message handle and practice to process it via calling service
 -    in form: CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam),
 -             MPCF_CONTACTMENU),(LPARAM) hContact))
 -    to ensure that WM_COMMAND was realy from clist menu not from other menu
 -    it is reserved range of menu ids from CLISTMENUIDMIN to CLISTMENUIDMAX
 -    the menu items with ids outside from such range will not be processed by service.
 -    Moreover if you process WM_COMMAND youself and your window contains self menu 
 -    please be sure that you will not call service for non-clist menu items.
 -    The simplest way is to ensure that your menus are not use item ids from such range.
 -    Otherwise, you HAVE TO distinguish WM_COMMAND from clist menus and from your
 -    internal menu and  DO NOT call MS_CLIST_MENUPROCESSCOMMAND for non clist menus. 
 -  }
 -  MPCF_CONTACTMENU = 1; // test commands from a contact menu
 -  MPCF_MAINMENU    = 2; // test commands from the main menu
 -  {
 -    wParam : MAKEWPARAM(LOWORD(wParam of WM_COMMAND),flags)
 -    lParam : HCONTACT
 -    Affect : Process a menu selection from a menu, see notes
 -    Returns: True if it processed the command, False otherwise
 -    notes  : hContact is the currently selected contact, it is not used
 -             if this is a main menu command, if this is NULL then the command
 -             is a contact menu one, the command is ignored
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_MENUPROCESSCOMMAND:PAnsiChar = 'CList/MenuProcessCommand';
 -
 -  {
 -    wParam : virtual key code
 -    lParam : MPCF_* flags
 -    Affect : Process a menu hotkey, see notes
 -    Returns: True if it processed the command, False otherwise
 -    Notes  : this should be called in WM_KEYDOWN
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_MENUPROCESSHOTKEY:PAnsiChar = 'CList/MenuProcessHotkey';
 -
 -  {
 -    wParam : Pointer to a MSG structurer
 -    lParam : Pointer to an LRESULT
 -    Affect : Process all the messages required for docking, see notes
 -    Returns: True if the message should NOT be processed anymore, False otherwise
 -    Notes  : only msg.hwnd, msg.message, msg.wParam and msg.lParam are used
 -             your WndProc should return the lResult if AND only IF, TRUE is returned
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_DOCKINGPROCESSMESSAGE:PAnsiChar = 'CList/DockingProcessMessage';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : Determines wheter the contact list docked
 -    Returns: pnon zero] if the contact list is docked, or 0 if it's not
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_DOCKINGISDOCKED:PAnsiChar = 'CList/DockingIsDocked';
 -
 -  {
 -    wParam : Pointer to a TMSG
 -    lParam : Pointer to an LRESULT
 -    Affect : Process all the messages required for the tray icon, see notes
 -    Returns: TRUE if the message should not be processed anymore, False otherwise
 -    Notes  : Only msg.hwnd, msg.message, msg.wparam and msg.lParam are used
 -             your WndProc should return LRESULT if and ONLY if TRUE is returned
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_TRAYICONPROCESSMESSAGE:PAnsiChar = 'CList/TrayIconProcessMessage';
 -
 -  {
 -    wParam : Pointer to TMSG
 -    lParam : Pointer to an LRESULT
 -    Affect : Process all the messages required for hotkeys, see notes
 -    Returns: True if the message should not be processed anymore or False otherwise
 -    Notes  : only msg.hwnd, msg.message, msg.wParam, msg.lParam are used
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_HOTKEYSPROCESSMESSAGE:PAnsiChar = 'CList/HotkeysProcessMessage';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : Toggles the show/hide status of the contact list
 -    Returns: 0 on success, [non zero] on failure
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_SHOWHIDE:PAnsiChar = 'CList/ShowHide';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : temporarily disable the autohide feature, see notes
 -    Notes  : this service will restart the auto hide timer, so if you need
 -             to keep the window visible you'll have to bee getting user input
 -             or calling this service each time
 -    Version: v0.1.2.1+
 -  }
 -  MS_CLIST_PAUSEAUTOHIDE:PAnsiChar = 'CList/PauseAutoHide';
 -
 -{
 -  sent when the group get modified (created, renamed or deleted)
 -  or contact is moving from group to group 
 -  wParam=hContact - NULL if operation on group 
 -  lParam=pointer to CLISTGROUPCHANGE
 -}
 -type
 -  CLISTGROUPCHANGE = record
 -    cbSize    :int;   //size in bytes of this structure
 -    pszOldName:TChar; //old group name
 -    pszNewName:TChar; //new group name
 -  end;
 -const
 -  ME_CLIST_GROUPCHANGE:PAnsiChar = 'CList/GroupChange';
 -
 -  {
 -    wParam : HPARENTGROUP
 -    lParam : 0 or Pointer to new group name
 -    Affect : Create a new group and calls CLUI to display it, see notes
 -    Returns: A handle to the new group.
 -    Notes  : If HPARENTGROUP is NULL(0) it will create a group at the root.
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_GROUPCREATE:PAnsiChar = 'CList/GroupCreate';
 -
 -  {
 -    wParam : HGROUP
 -    lParam : 0
 -    Affect : Delete a group and call CLUI to display the change
 -    Returns: 0 on success, [non zero] on failure
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_GROUPDELETE:PAnsiChar = 'CList/GroupDelete';
 -
 -  {
 -    wParam : HGROUP
 -    lParam : newState
 -    Affect : Change the expanded state flag for a group internally, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : if newState is non zero then the group is expanded, 0 it's collapsed
 -             CLUI IS *NOT* called when the change is made.
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_GROUPSETEXPANDED:PAnsiChar = 'CList/GroupSetExpanded';
 -
 -  {
 -    wParam : HGROUP
 -    lParam : MAKELPARAM(flags, flagsMask)
 -    Affect : Change the flag for a group, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : only if flags given in flagsmask are altered,
 -             CLUI is called on change to GROUPF_HIDEOFFLINE
 -    Version: v0.1.2.1+
 -  }
 -  MS_CLIST_GROUPSETFLAGS:PAnsiChar = 'CList/GroupSetFlags';
 -
 -  {
 -    wParam : HGROUP
 -    lParam : Pointer to a integer to be filled with expanded state
 -    Affect : get the name of a group, see notes
 -    Returns: a static buffer pointing to the name of the group
 -             returns NULL(0) if HGROUP is invalid.
 -    Notes  : the returned buffer is only valid til the next call
 -             to this service, lParam can be NULL(0) if you don't
 -             want to know if the group is expanded
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_GROUPGETNAME:PAnsiChar = 'CList/GroupGetName';
 -
 -  {
 -    wParam : HGROUP
 -    lParam : Pointer to flags
 -    Affect : Get the name of the group, see notes
 -    Returns: A static buffer pointing to the name of the group
 -             returns NULL(0) if HGROUP is invalid
 -    Note   : this buffer is only valid til the next call to this service
 -             flags can be NULL(0), otherwise it'll return GROUPF_* constants
 -    Version: v0.1.2.1+
 -  }
 -  MS_CLIST_GROUPGETNAME2:PAnsiChar = 'CList/GroupGetName2';
 -
 -  GROUPF_EXPANDED    = $04;
 -  GROUPF_HIDEOFFLINE = $08;
 -  {
 -    wParam : HGROUP
 -    lParam : HBEFOREGROUP
 -    Affect : Move a group directly before another group
 -    Returns: the new handle of the group on success, NULL(0) on failure
 -    Notes  : the order is represented by the order in which MS_CLUI_GROUPADDED
 -             is called, however UI's are free to ignore this order and sort
 -             if they wish.
 -    Version: v0.1.2.1+
 -  }
 -  MS_CLIST_GROUPMOVEBEFORE:PAnsiChar = 'CList/GroupMoveBefore';
 -
 -  {
 -    wParam : HGROUP
 -    lParam : Pointer to a null terminated string containing the new name
 -    Affect : Rename a group internally, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : this will fail if the group name is a duplicate of an existing
 -             a name, CLUI is not called when this change is made.
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_GROUPRENAME:PAnsiChar = 'CList/GroupRename';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : Build a menu of the group tree, see notes
 -    Returns: Handle to the menu, NULL(0) on failure
 -    Notes  : NULL be returned if the user doesn't have any groups
 -             the dwItemData of every menu item is the handle to that group.
 -             Menu item ID's are assigned starting at 100 in no particular order
 -    Version: v0.1.2.1+
 -  }
 -  MS_CLIST_GROUPBUILDMENU:PAnsiChar = 'CList/GroupBuildMenu';
 -
 -  {
 -    wParam : newValue
 -    lParam : 0
 -    Affect : Changes the 'hide offline contacts' flag and calls CLUI, see notes
 -    Returns: 0 success, [non zero] on failure
 -    Notes  : newValue is 0 to show all contacts, 1 to show only online contacts
 -             -1 to toggle the value
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_SETHIDEOFFLINE:PAnsiChar = 'CList/SetHideOffline';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affect : Do the message processing associated with the double clicking a contact
 -    Returns: 0 on success, [non zero] on failure
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_CONTACTDOUBLECLICKED:PAnsiChar = 'CList/ContactDoubleClicked';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : Pointer to an array of PAnsiChar's containing files/dirs
 -    Affect : Do the processing when some files are droppeed on a contact, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : the array is terminated when a NULL(0) entry is found
 -    Version: v0.1.2.1+
 -  }
 -  MS_CLIST_CONTACTFILESDROPPED:PAnsiChar = 'CList/ContactFilesDropped';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : HGROUP
 -    Affect : Change the group a contact belongs to, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : use hGroup=NULL(0) to remove any group association with the contact
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_CONTACTCHANGEGROUP:PAnsiChar = 'CList/ContactChangeGroup';
 -
 -  {
 -    wParam : HCONTACT_1
 -    lParam : HCONTACT_2
 -    Affect : Determine the ordering of two given contacts
 -    Returns: 0 if hContact1 is the same as hContact2
 -             1 if hContact1 should be displayed before hContact2
 -            -1 if hContact1 should be displayed after hCotnact2
 -    Version: v0.1.1.0+
 -  }
 -  MS_CLIST_CONTACTSCOMPARE:PAnsiChar = 'CList/ContactsCompare';
 -
 -  {
 -    wParam=0 (not used)
 -    lParam=(LPARAM) &MIRANDASYSTRAYNOTIFY
 -
 -    Affects: Show a message in a ballon tip against a protocol icon (if installed)
 -    Returns: 0 on success, non zero on failure
 -    Notes  : This service will not be created on systems that haven't got the Windows
 -         support for ballontips, also note that it's upto Windows if it shows your
 -         message and it keeps check of delays (don't be stupid about showing messages)
 -
 -    Version: 0.3.1a
 -  }
 -  NIIF_INFO           = $00000001;
 -  NIIF_WARNING        = $00000002;
 -  NIIF_ERROR          = $00000003;
 -  NIIF_ICON_MASK      = $0000000F;
 -  NIIF_NOSOUND        = $00000010;
 -  NIIF_INTERN_UNICODE = $00000100;
 -
 -type
 -  PMIRANDASYSTRAYNOTIFY = ^TMIRANDASYSTRAYNOTIFY;
 -  TMIRANDASYSTRAYNOTIFY = record
 -    cbSize     :int;       // sizeof(MIRANDASYSTRAY)
 -    szProto    :PAnsiChar; // protocol to show under (may have no effect)
 -    szInfoTitle:TChar;     // only 64chars of it will be used, TCHAR if NIIF_INTERN_UNICODE is specified
 -    szInfo     :TChar;     // only 256chars of it will be used, TCHAR if NIIF_INTERN_UNICODE is specified
 -    dwInfoFlags:dword;     // see NIIF_* stuff
 -    uTimeout   :uint;      // how long to show the tip for
 -  end;
 -
 -const
 -  MS_CLIST_SYSTRAY_NOTIFY:PAnsiChar = 'Miranda/Systray/Notify';
 -
 -const
 -  SETTING_TOOLWINDOW_DEFAULT      = 1;
 -  SETTING_SHOWMAINMENU_DEFAULT    = 1;
 -  SETTING_SHOWCAPTION_DEFAULT     = 1;
 -  SETTING_CLIENTDRAG_DEFAULT      = 0;
 -  SETTING_ONTOP_DEFAULT           = 1;
 -  SETTING_MIN2TRAY_DEFAULT        = 1;
 -  SETTING_TRAY1CLICK_DEFAULT      = 0;
 -  SETTING_HIDEOFFLINE_DEFAULT     = 0;
 -  SETTING_HIDEEMPTYGROUPS_DEFAULT = 0;
 -  SETTING_USEGROUPS_DEFAULT       = 1;
 -  SETTING_SORTBYSTATUS_DEFAULT    = 0;
 -  SETTING_SORTBYPROTO_DEFAULT     = 0;
 -  SETTING_TRANSPARENT_DEFAULT     = 0;
 -  SETTING_ALPHA_DEFAULT           = 200;
 -  SETTING_AUTOALPHA_DEFAULT       = 150;
 -  SETTING_CONFIRMDELETE_DEFAULT   = 1;
 -  SETTING_AUTOHIDE_DEFAULT        = 0;
 -  SETTING_HIDETIME_DEFAULT        = 30;
 -  SETTING_CYCLETIME_DEFAULT       = 4;
 -  SETTING_ALWAYSSTATUS_DEFAULT    = 0;
 -  SETTING_ALWAYSMULTI_DEFAULT     = 0;
 -
 -  SETTING_TRAYICON_SINGLE         = 0;
 -  SETTING_TRAYICON_CYCLE          = 1;
 -  SETTING_TRAYICON_MULTI          = 2;
 -  SETTING_TRAYICON_DEFAULT        = SETTING_TRAYICON_SINGLE;
 -
 -  SETTING_STATE_HIDDEN            = 0;
 -  SETTING_STATE_MINIMIZED         = 1;
 -  SETTING_STATE_NORMAL            = 2;
 -  SETTING_BRINGTOFRONT_DEFAULT    = 0;
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_clui.inc b/plugins/Pascal_Headers/m_clui.inc deleted file mode 100644 index 1edd114e53..0000000000 --- a/plugins/Pascal_Headers/m_clui.inc +++ /dev/null @@ -1,243 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_CLUI}
 -{$DEFINE M_CLUI}
 -
 -{<</
 -    this header was created for use for v0.1.1.0, most of it's UI related
 -    stuff and you probably don't need to call it, see m_clist.inc instead.
 -    -- There are some functions that were implemented in v0.1.2.0 though
 -/>>}
 -
 -const
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affects: Returns a window handle for the contact list window, see notes
 -    Returns: ""
 -    Notes  : This call has a very specific purpose internally Miranda
 -             and shouldn't be used gratuitously, in almost all cases
 -             there's another call to do whatever it is that you're
 -             trying to do.
 -  }
 -  MS_CLUI_GETHWND:PAnsiChar = 'CLUI/GetHwnd';
 -
 -  //get ContactTree hwnd
 -  MS_CLUI_GETHWNDTREE:PAnsiChar = 'CLUI/GetHwndTree';
 -
 -  {
 -    wParam : new status
 -    lParam : null terminated string to a protocol ID
 -    Affects: Change the protocol specific status indicators, see notes!
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : protocol modules don't want to call this, they want
 -             clist/protocolstatuschanged instead
 -  }
 -  MS_CLUI_PROTOCOLSTATUSCHANGED:PAnsiChar = 'CLUI/ProtocolStatusChanged';
 -
 -  {
 -    wParam : Handle to a group
 -    lParam : 1 or 0
 -    Affect : A new group was created, add it to the list, see notes
 -    Notes  : lParam is set to 1 or 0 if the user just created
 -             the group or not.
 -             -
 -             this is also called when the contact list is being rebuilt,
 -             new groups are always created with the name 'New group'
 -  }
 -  MS_CLUI_GROUPADDED:PAnsiChar = 'CLUI/GroupCreated';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : ICON_ID
 -    Affect : Change the icon for a contact, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : ICON_ID is an offset in the imagelist, see clist/geticonsimagelist
 -  }
 -  MS_CLUI_CONTACTSETICON:PAnsiChar = 'CLUI/ContactSetIcon';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affect : Remove a contact from the list, see notes
 -    Returns: 0 on success, [non zereo] on failure
 -    Notes  : this contact is NOT actually being deleted, since if
 -             a contact goes offline while 'hide offline' option is sset,
 -             this service will be called then ALSO
 -  }
 -  MS_CLUI_CONTACTDELETED:PAnsiChar = 'CLUI/ContactDeleted';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : ICON_ID
 -    Affect : Add a contact to the list, see note
 -    returns: 0 on success, [non zero] on failure
 -    Notes  : the caller processes the 'hide offline' setting, so the callee
 -             should not do further processing based on the value of this setting
 -             -
 -             WARNING: this will be called to re-add a contact when they come
 -             online if 'hide offline' is on, but it cannot determine if
 -             the contact is already on the list, so you may get requests to
 -             add a contact when it is already on the list, which you should ignore.
 -             -
 -             You'll also get this whenever an event is added for a contact,
 -             since if the contact was offline, it needs to be shown to
 -             display the mesage, even if 'hide offlines' is on.
 -             -
 -             you should not resort the list on this call, a seperate resort
 -             request will be sent.
 -             -
 -             ICON_ID is an offset in the image list, see clist/geticonsimagelist
 -
 -  }
 -  MS_CLUI_CONTACTADDED:PAnsiChar = 'CLUI/ContactAdded';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affect : Reename a contact in the lists, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : You should not re-sort the list on this call, a separate resort
 -             request will be sent, you can get the new name from clist/getcontactdisplayname
 -  }
 -  MS_CLUI_CONTACTRENAMED:PAnsiChar = 'CLUI/ContactRenamed';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : Start a rebuild of the contact list, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : this is the cue to clear the existing content of the list
 -             expect to get a series of :
 -
 -             clui/groupadded
 -             clui/contactadded
 -             clui/resortlist
 -  }
 -  MS_CLUI_LISTBEGINREBUILD:PAnsiChar = 'CLUI/ListBeginRebuild';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : End a rebuild of the contact list, see notes
 -    Returns: 0 on success, [non zero] on error
 -    Notes  : if you dissplayed an hourglass in beginbuild, set it back
 -             here, you do not need to explicitly sort the list
 -  }
 -  MS_CLUI_LISTENDREBUILD:PAnsiChar = 'CLUI/ListEndRebuild';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : Sort the contact list now, see notes
 -    Returns: 0 success, [non zero] on failure
 -    Notes  : Sorts are buffered so you won't get this message lots of times
 -             if the lists needs to be resorted many times rapidly
 -  }
 -  MS_CLUI_SORTLIST:PAnsiChar = 'CLUI/SortList';
 -
 -  {
 -    wParam : CLUICAPS_*
 -    lParam : 0
 -    Affect : Gets a load of capabilites for the loaded CLUI, see notes
 -    Returns: the requested value, 0 of wParam is unknown --
 -             if this service is not implemented it is assumed all return
 -             values will be 0.
 -    Version: v0.1.2.1+
 -  }
 -{
 -  CLUIF2_PLUGININFO       = 1; // returns pointer to plugininfo
 -  CLUIF2_CLISTTYPE        = 2; // the genaration of list in chronologic
 -                               // modern layered return 0x07 (assuming classic,
 -                               // mw, meta, nicer1, modern1, nicer++, modernLayered)
 -                               // +0x0100 for unicode
 -  CLUIF2_EXTRACOLUMNCOUNT = 3; // return max number of extra icon available to
 -                               // be set in main window
 -  CLUIF2_USEREXTRASTART   = 4; // return index of first 'advanced' image except
 -                               // Adv1 and Adv2
 -}
 -  // can only provide this flag to return the following set of caps, the strings
 -  // show the database setting/type to store the list option, changing the value
 -  // does not reflect what the change is, i.e. ontop can only be affected with
 -  // a call to SetWindowPos()
 -  CLUICAPS_FLAGS1         = 0;
 -  // empty groups aren't shown, 'CList/HideEmptyGroups' (byte) [changes make the list reload]
 -  CLUIF_HIDEEMPTYGROUPS   = 1;
 -  // groups can be disabled, lists can be merged into one seamlessly, (byte) 'CList/UseGroups'
 -  CLUIF_DISABLEGROUPS     = 2;
 -  // list can be displayed 'on top' of all other windows, 4 (byte) 'CList/OnTop'
 -  CLUIF_HASONTOPOPTION    = 4;
 -  // can disappear after a while of inactive use,
 -  // (byte) 'CList/AutoHide' (word) 'CList/HideTime'
 -  CLUIF_HASAUTOHIDEOPTION = 8;
 -
 -  CLUICAPS_FLAGS2 = 1; // Returns info about extra icons
 -                       // HIWORD is the first extra icon number, LOWORD is the extra icons count
 -
 -//LPARAMS for CLUICAPS_FLAGS1 
 -  CLUIF2_PLUGININFO = 1; //returns pointer to plugininfo
 -  CLUIF2_CLISTTYPE  = 2; // the genaration of list in chronologic 
 -// modern layered return 0x07
 -// (assuming classic, mw, meta, nicer1, modern1, nicer++, modernLayered)
 -// +0x0100 for unicode
 -  CLUIF2_EXTRACOLUMNCOUNT = 3; // return max number of extra icon available to be set in main window
 -  CLUIF2_USEREXTRASTART   = 4; // return index of first 'advanced' image except Adv1 and Adv2
 -
 -  MS_CLUI_GETCAPS:PAnsiChar = 'CLUI/GetCaps';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : MAKELPARAM(screenX, screenY)
 -    Affect : A contact is being dragged outside the main window
 -    Return : return [non zero] to show the drag cursor as "accepting" the drag
 -             or zero to show the circle/slash 'not allowed'
 -    Version: v0.1.2.0+
 -  }
 -  ME_CLUI_CONTACTDRAGGING:PAnsiChar = 'CLUI/ContactDragging';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : MAKELPARAM(screenX, screenY)
 -    Affect : a contact has just been dropped outside the main window, see notes
 -    Notes  : return non zero to stop other hooks processing this event.
 -    Version: v0.1.2.0+
 -  }
 -  ME_CLUI_CONTACTDROPPED:PAnsiChar = 'CLUI/ContactDropped';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affect : A contact that *was* being dragged outside the main window
 -             has gone back to the main window
 -    Return : always return 0
 -    Version: v0.1.2.1+
 -  }
 -  ME_CLUI_CONTACTDRAGSTOP:PAnsiChar = 'CLUI/ContactDragStop';
 -
 -// return TRUE if Clist Module Support Metacontacts
 -  ME_CLUI_METASUPPORT:PAnsiChar = 'CLUI/MetaContactSupport';
 -
 -// return pointer to PLUGININFO structure
 -//  MS_CLIST_GETCLISTCAPS = 'CList/GetCaps';
 -
 -{$ENDIF}
\ No newline at end of file diff --git a/plugins/Pascal_Headers/m_contacts.inc b/plugins/Pascal_Headers/m_contacts.inc deleted file mode 100644 index cef88c4b38..0000000000 --- a/plugins/Pascal_Headers/m_contacts.inc +++ /dev/null @@ -1,112 +0,0 @@ -{
 -Miranda IM
 -
 -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_CONTACTS}
 -{$DEFINE M_CONTACTS}
 -type
 -  PCONTACTINFO = ^TCONTACTINFO;
 -  TCONTACTINFO = record
 -    cbSize  : int;
 -    dwFlag  : Byte;
 -    hContact: THandle;
 -    szProto : PAnsiChar;
 -    _type   : Byte;
 -    retval: record // in C this is a nameless union
 -      case longint of
 -        0: (bVal  : Byte);
 -        1: (wVal  : WORD);
 -        2: (dVal  : DWORD);
 -        3: (szVal : TChar);
 -        4: (cchVal: Word);
 -      end;
 -  end;
 -
 -const
 -
 -// CNF_* Types of information you can retreive by setting the dwFlag in CONTACTINFO
 -
 -  CNF_FIRSTNAME  = 1;  // returns first name (string)
 -  CNF_LASTNAME   = 2;  // returns last name (string)
 -  CNF_NICK       = 3;  // returns nick name (string)
 -  CNF_CUSTOMNICK = 4;  // returns custom nick name, clist name (string)
 -  CNF_EMAIL      = 5;  // returns email (string)
 -  CNF_CITY       = 6;  // returns city (string)
 -  CNF_STATE      = 7;  // returns state (string)
 -  CNF_COUNTRY    = 8;  // returns country (string)
 -  CNF_PHONE      = 9;  // returns phone (string)
 -  CNF_HOMEPAGE   = 10; // returns homepage (string)
 -  CNF_ABOUT      = 11; // returns about info (string)
 -  CNF_GENDER     = 12; // returns gender (byte,'M','F' character)
 -  CNF_AGE        = 13; // returns age (byte, 0==unspecified)
 -  CNF_FIRSTLAST  = 14; // returns first name + last name (string)
 -  CNF_UNIQUEID   = 15; // returns uniqueid, protocol username (must check type for type of return)
 -  CNF_FAX        = 18; // returns fax (string)
 -  CNF_CELLULAR   = 19; // returns cellular (string)
 -  CNF_TIMEZONE   = 20; // returns timezone (string)
 -  CNF_MYNOTES    = 21; // returns user specified notes (string)
 -  CNF_BIRTHDAY   = 22; // returns birthday day of month (byte)
 -  CNF_BIRTHMONTH = 23; // returns birthday month (byte)
 -  CNF_BIRTHYEAR  = 24; // returns birthday year (word)
 -  CNF_STREET     = 25; // returns street (string)
 -  CNF_ZIP        = 26; // returns zip code (string)
 -  CNF_LANGUAGE1  = 27; // returns language1 (string)
 -  CNF_LANGUAGE2  = 28; // returns language2 (string)
 -  CNF_LANGUAGE3  = 29; // returns language3 (string)
 -  CNF_CONAME     = 30; // returns company name (string)
 -  CNF_CODEPT     = 31; // returns company department (string)
 -  CNF_COPOSITION = 32; // returns company position (string)
 -  CNF_COSTREET   = 33; // returns company street (string)
 -  CNF_COCITY     = 34; // returns company city (string)
 -  CNF_COSTATE    = 35; // returns company state (string)
 -  CNF_COZIP      = 36; // returns company zip code (string)
 -  CNF_COCOUNTRY  = 37; // returns company country (string)
 -  CNF_COHOMEPAGE = 38; // returns company homepage (string)
 -  CNF_DISPLAYUID = 39; // returns uniqueid to display in interface (must check type for type of return)
 -
 -// Special types
 -// Return the custom name using the name order setting
 -// IMPORTANT: When using CNF_DISPLAY you MUST free the string returned
 -// You must **NOT** do this from your version of free() you have to use Miranda's free()
 -// you can get a function pointer to Miranda's free() via MS_SYSTEM_GET_MMI, see m_system.h
 -  CNF_DISPLAY = 16;
 -// Same as CNF_DISPLAY except the custom handle is not used
 -// IMPORTANT: When using CNF_DISPLAYNC you MUST free the string returned
 -// You must **NOT** do this from your version of free() you have to use Miranda's free()
 -// you can get a function pointer to Miranda's free() via MS_SYSTEM_GET_MMI, see m_system.h
 -  CNF_DISPLAYNC = 17;
 -
 -// Add this flag if you want to get the Unicode info
 -  CNF_UNICODE = $80;
 -
 -// If MS_CONTACT_GETCONTACTINFO returns 0 (valid), then one of the following
 -// types is setting telling you what type of info you received
 -  CNFT_BYTE   = 1;
 -  CNFT_WORD   = 2;
 -  CNFT_DWORD  = 3;
 -  CNFT_ASCIIZ = 4;
 -
 -  {
 -    wParam : not used
 -    lParam : Pointer to an initialised TCONTACTINFO structure
 -    affects: Get contact information
 -    returns: Zero on success, non zero on failure.
 -    notes  : If successful, the type is set and the result is put into the associated member of TCONTACTINFO
 -  }
 -  MS_CONTACT_GETCONTACTINFO:PAnsiChar = 'Miranda/Contact/GetContactInfo';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_database.inc b/plugins/Pascal_Headers/m_database.inc deleted file mode 100644 index 5ce91df2b3..0000000000 --- a/plugins/Pascal_Headers/m_database.inc +++ /dev/null @@ -1,688 +0,0 @@ -{$IFNDEF M_DATABASE}
 -{$DEFINE M_DATABASE}
 -
 -const
 -  {
 -    wParam : size of the buffer to be filled
 -    lParam : pointer to the buffer to be filled
 -    affect : Get's the name of the current profile being used by the database
 -             module -- this is the same as the filename of the profile without
 -             the .ext
 -    return : 0 on success, non zero on failure
 -  }
 -  MS_DB_GETPROFILENAME :PAnsiChar = 'DB/GetProfileName';
 -  MS_DB_GETPROFILENAMEW:PAnsiChar = 'DB/GetProfileNameW';
 -
 -  {
 -    wParam : size of buffer pointed to by lParam
 -    lParam : pointer to a buffer to be filled
 -    affect : Get the path of the base folder where Miranda will store all individual profiles
 -             The returned path does NOT include a trailing backslash.
 -             Essentially this is what has been set in mirandaboot.ini as ProfileDir.
 -             For more options to retrieve profile paths check MS_UTILS_REPLACEVARS
 -    return : 0 on success, non zero on failure
 -    version: 0.3a only
 -  }
 -  MS_DB_GETPROFILEPATH :PAnsiChar = 'DB/GetProfilePath';
 -  MS_DB_GETPROFILEPATHW:PAnsiChar = 'DB/GetProfilePathW';
 -
 -type
 -  PDBCONTACTGETSETTING = ^TDBCONTACTGETSETTING;
 -  TDBCONTACTGETSETTING = record
 -    szModule : PAnsiChar;  // name of the module that wrote the setting to get
 -    szSetting: PAnsiChar;  // the name of the setting to get
 -    pValue   : PDBVARIANT; // pointer to DBVARIANT to receive the value
 -  end;
 -
 -  PDBCONTACTWRITESETTING = ^TDBCONTACTWRITESETTING;
 -  TDBCONTACTWRITESETTING = record
 -    szModule : PAnsiChar;  // module sig to write this setting under
 -    szSetting: PAnsiChar;  // setting name to write
 -    value    : TDBVARIANT; // variant containing value to set
 -  end;
 -
 -const
 -  {
 -    wParam : Handle of a contact to get the setting for (see notes)
 -    lParam : pointer to a TDBCONTACTGETSETTING structure to be filled with setting
 -             this structure also has to be initalised (see notes)
 -    affect : Queries the database module for a setting from a contact.
 -    returns: 0 on success, non zero on failure (contact not found, setting doesn't exist)
 -    notes  : TDBCONTACTGETSETTING must be filled with the module name that created
 -             /wrote the setting you want to get (e.g. your module name)
 -             and the actual setting to read with TDBCONTACTGETSETTING.szModule and
 -             TDBCONTACTGETSETTING.szSetting -- TDBCONTACTGETSETTING.pValue is
 -             a pointer to a TDBVARIANT with the returned setting, this maybe nil
 -             and MUST be freed after you're done with it with FreeVariant()
 -
 -             There are helper functions for reading/writing/deleting common types to and
 -             from the database -- see DBGetContactSetting<type>
 -
 -             the contact handle (hContact) can be returned by FindContact/AddContact
 -  }
 -  MS_DB_CONTACT_GETSETTING:PAnsiChar = 'DB/Contact/GetSetting';
 -
 -  {
 -    DB/Contact/GetSettingString service  0.4.3+
 -    Same as DB/Contact/GetSetting, but also gets the required string type
 -    inside the dbcgs->type parameter
 -  }
 -  MS_DB_CONTACT_GETSETTING_STR:PAnsiChar = 'DB/Contact/GetSettingStr';
 -
 -  {
 -    wParam : Handle for a contact to query a setting for
 -    lParam : Pointer to a TDBCONTACTGETSETTING structure
 -    affects: This service is almost the same as the one above, but it does
 -             not return a dynamic copy (with malloc()) -- the caller
 -             must do this for datatypes which require it, e.g. a string.
 -
 -             This means the TDBCONTACTGETSETTING.pValue *has* to exist and be
 -             allocated by the caller (doesn't have to be allocated from the heap)
 -             the DBVARIANT structure has to be initalised with the type wanted
 -             and enough buffer space around to return the info, do not
 -             expect this service to be as fast as the one above.
 -
 -    returns: 0 on success, non zero on failure.
 -  }
 -  MS_DB_CONTACT_GETSETTINGSTATIC:PAnsiChar = 'DB/Contact/GetSettingStatic';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to a TDBVARIANT structure
 -    affect : Free's the passed DBVARIANT's dynamic memory (if any) see notes
 -    returns: 0 on success, non zero on failure
 -    notes  : use the helper function FreeVariant()
 -  }
 -  MS_DB_CONTACT_FREEVARIANT:PAnsiChar = 'DB/Contact/FreeVariant';
 -
 -  {
 -    wParam : Handle to contact to write setting for
 -    lParam : Pointer to TDBCONTACTWRITESETTING which must be initalised
 -    affects: writes a setting under a contact -- TDBCONTACTWRITESETTING structure
 -             must contain the module name writing -- the setting name, and the value
 -             to write (which is NOT a pointer) .szModule, .szSetting, .Value, see notes
 -    returns: 0 on success, non zero on failure
 -    notes  : this service triggers 'DB/Contact/SettingChanged' before it returns
 -             as always, there is a helper function to use this service.
 -  }
 -  MS_DB_CONTACT_WRITESETTING:PAnsiChar = 'DB/Contact/WriteSetting';
 -
 -  {
 -    wParam : hContact under which the setting should be deleted
 -    lParam : Pointer to a TDBCONTACTGETSETTING structure
 -    affects: Deletes the given setting for a contact, the TDBCONTACTGETSETTING.pValue
 -             field is ignored -- only .szModule and .szSetting are needed, see notes
 -    returns: 0 on success, non zero on failure
 -    notes  : triggers 'DB/Contact/SettingChanged' BEFORE it deletes the given
 -             setting, when the service returns the TDBVARIANT structure .type_ is set
 -             to 0 and no fields are valid, there is a helper function for this
 -             service, see below.
 -  }
 -  MS_DB_CONTACT_DELETESETTING:PAnsiChar = 'DB/Contact/DeleteSetting';
 -
 -    {
 -        wParam : Handle of a contact to enum settings for
 -        lParam : Pointer to a TDBCONTACTENUMSETTINGS structure, must be initalised
 -        affect : Enumerates all settings for a given contact under a module,
 -                 TDBCONTACTENUMSETTINGS must be filled with the function pointer to call
 -                 the TDBCONTACTENUMSETTINGS.lParam value to pass to it each time,
 -                 as well as the .szModule under which the contact is valid
 -        returns: returns the value of the last call to the enum function, or -1
 -                 if no settings could be enumerated
 -        notes  : the szSetting argument passed to the enumeration function is only
 -                 valid for the duration of that enumeration call,
 -                 it must be allocated dynamically if it is required after that call frame
 -                 has returned.
 -                 Also, deleting settings as they are enumerated has unpredictable results!
 -                 but writing a new value for a setting is okay.
 -                 it is unclear how you stop the enumeration once it is started, maybe
 -                 possible to return -1 to stop it.
 -        vesion : only valid for 0.1.0.1+
 -    }
 -
 -type
 -  TDBSETTINGENUMPROC = function(const szSetting: PAnsiChar; lParam: LPARAM): int; cdecl;
 -
 -  PDBCONTACTENUMSETTINGS = ^TDBCONTACTENUMSETTINGS;
 -  TDBCONTACTENUMSETTINGS = record
 -    pfnEnumProc: TDBSETTINGENUMPROC; // function pointer to call to start the
 -                                     // enum via MS_DB_CONTACT_ENUMSETTINGS
 -    lParam     : LPARAM;             // passed to the above function
 -    szModule   : PAnsiChar;          // name of the module to get settings for
 -    ofsSettings: DWORD;              // not used by us
 -  end;
 -
 -const
 -  MS_DB_CONTACT_ENUMSETTINGS:PAnsiChar = 'DB/Contact/EnumSettings';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    affect : none
 -    returns: Returns the number of contacts in the database for the loaded profile
 -             not including the profile user, see notes.
 -    notes  : the contacts in the database can be read with FindFirst/FindNext
 -  }
 -  MS_DB_CONTACT_GETCOUNT:PAnsiChar = 'DB/Contact/GetCount';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    returns: Returns a handle to the first contact in the database,
 -             this handle does not need to be closed, if there are no users
 -             NULL(0) is returned.
 -  }
 -  MS_DB_CONTACT_FINDFIRST:PAnsiChar = 'DB/Contact/FindFirst';
 -
 -  {
 -    wParam : Contact handle
 -    lParam : 0
 -    returns: Returns a handle to the next contact after the given contact in
 -             wParam, this handle does not neeed to be closed -- may return NULL(0)
 -             if the given contact in wParam was the last in the database, or the
 -             given contact was invalid
 -  }
 -  MS_DB_CONTACT_FINDNEXT:PAnsiChar = 'DB/Contact/FindNext';
 -
 -  {
 -    wParam : Handle of a contact to delete
 -    lParam : 0
 -    affect : the user by the given handle is deleted from the database, see notes
 -    returns: Returns 0 on success or nonzero if the handle was invalid
 -    notes  : this triggers DB/Contact/Deleted BEFORE it actually deletes the contact
 -             all events are also deleted -- other modules may end up with invalid
 -             handles because of this, which they should be prepared for.
 -  }
 -  MS_DB_CONTACT_DELETE:PAnsiChar = 'DB/Contact/Delete';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    affects: creates a new contact in the database, they have no settings,
 -             settings must be added with MS_DB_CONTACT_WRITESETTING or
 -             database helper functions for writing, see notes
 -    returns: A handle to a new contact or NULL(0) on failure.
 -    notes  : triggers the ME_DB_CONTACT_ADDED event just before the service returns
 -  }
 -  MS_DB_CONTACT_ADD:PAnsiChar = 'DB/Contact/Add';
 -
 -
 -  {
 -    wParam : (HANDLE) hContact
 -    lParam : 0
 -    affects: Checks the given handle within the database for valid information, for
 -           a proper internal header.
 -    returns: Returns 1 if the contact handle is valid, 0 if it is not
 -    notes  : Due to the nature of multiple threading a contact handle can be deleted
 -         soon after this service has returned a handle as valid, however it will never point
 -         to another contact.
 -  }
 -  MS_DB_CONTACT_IS:PAnsiChar = 'DB/Contact/Is';
 -
 -//************************** Event *********************************
 -
 -{ DB/EventType/Register service (0.7+)
 -Registers the specified database event type, with module, id & description.
 -When someone needs to retrieve an event's text, a service named Module/GetEventText<id>
 -will be called. For example, for module named 'foo' and event id 2000 a service
 -foo/GetEventText2000 should be defined to process this request. That handler should 
 -decode a blob and return the event text in the required format, its prototype is identical
 -to a call of MS_DB_EVENT_GETTEXT (see below)
 -  wParam=0
 -  lParam=(LPARAM)(DBEVENTTYPEDESCR*)
 -Always returns 0.
 -}
 -
 -type
 -  PDBEVENTTYPEDESCR = ^TDBEVENTTYPEDESCR;
 -  TDBEVENTTYPEDESCR = record
 -    cbSize     :int;      // structure size in bytes
 -    module     :PAnsiChar;    // event module name
 -    eventType  :int;      // event id, unique for this module
 -    descr      :PAnsiChar;    // event type description (i.e. "File Transfer")
 -    textService:PAnsiChar;    // service name for MS_DB_EVENT_GETTEXT (0.8+, default Module+'/GetEventText'+EvtID)
 -    iconService:PAnsiChar;    // service name for MS_DB_EVENT_GETICON (0.8+, default Module+'/GetEventIcon'+EvtID)
 -    eventIcon  :THANDLE;  // icolib handle to eventicon (0.8+, default 'eventicon_'+Module+EvtID)
 -    flags      :DWORD;    // flags, combination of the DETF_*
 -  end;
 -
 -const
 -// constants for default event behaviour
 -  DETF_HISTORY   = 1; // show event in history
 -  DETF_MSGWINDOW = 2; // show event in message window
 -  DETF_NONOTIFY  = 4; // block event notify (e.g. Popups)
 -
 -const
 -  DBEVENTTYPEDESCR_SIZE    = sizeof(TDBEVENTTYPEDESCR);
 -  {$IFNDEF WIN64}
 -  DBEVENTTYPEDESCR_SIZE_V1 = $10;
 -  {$ELSE}
 -  DBEVENTTYPEDESCR_SIZE_V1 = DBEVENTTYPEDESCR_SIZE;
 -  {$ENDIF}
 -
 -const
 -  MS_DB_EVENT_REGISTERTYPE:PAnsiChar = 'DB/EventType/Register';
 -
 -  { DB/EventType/Get service (0.7+)
 -  Retrieves the previously registered database event type, by module & id.
 -    wParam=(WPARAM)(AnsiChar*)szModule
 -    lParam=(LPARAM)(int)eventType
 -  Returns DBEVENTTYPEDESCR* or NULL, if an event isn't found.
 -  }
 -  MS_DB_EVENT_GETTYPE:PAnsiChar = 'DB/EventType/Get';
 -
 -  {
 -    wParam : contact handle for events count is needed
 -    lParam : 0
 -    service: Gets the number of events in the chain belonging to a contact
 -             in the databasee.
 -    returns: the numbef of events owned by hContact or -1 if hContact
 -             is invalid, they can be found with the event/find* servicees
 -  }
 -  MS_DB_EVENT_GETCOUNT:PAnsiChar = 'DB/Event/GetCount';
 -
 -  {
 -    wParam : contact handle to add an event for
 -    lParam : Pointer to TDBEVENTINFO initialised with data
 -    affect : Add's an event to the contact's event list, the TDBEVENTINFO
 -             structure should be filled with the event of message -- see notes
 -    returns: a handle to a DB event (HDBEVENT), or NULL on error
 -    notes  : Triggers DB/Event/Added event just before it returns,
 -             Events are sorted chronologically as they are entered,
 -             so you cannot guarantee that the new hEvent is the last event in the chain,
 -             however if a new event is added that has a timestamp less than
 -             90 seconds *before* the event that should be after it,
 -             it will be added afterwards, to allow for protocols that only
 -             store times to the nearest minute, and slight delays in transports.
 -             There are a few predefined eventTypes below for easier compatibility, but
 -             modules are free to define their own, beginning at 2000
 -             DBEVENTINFO.timestamp is in GMT, as returned by time()
 -  }
 -
 -  DBEF_FIRST =  1; // internally only, do not use
 -  DBEF_SENT  =  2; // if set, the event was sent by the user, otherwise it was received
 -  DBEF_READ  =  4; // event has been read by the user -- only needed for history
 -  DBEF_RTL   =  8; // event contains the right-to-left aligned text
 -  DBEF_UTF   = 16; // event contains a text in utf-8
 -
 -  EVENTTYPE_MESSAGE     = 0;
 -  EVENTTYPE_URL         = 1;
 -  EVENTTYPE_CONTACTS    = 2;     // v0.1.2.2+
 -  EVENTTYPE_ADDED       = 1000;  // v0.1.1.0+: these used to be module-
 -  EVENTTYPE_AUTHREQUEST = 1001;  // specific codes, hence the module-
 -  EVENTTYPE_FILE        = 1002;  // specific limit has been raised to 2000
 -
 -type
 -  PDBEVENTINFO = ^TDBEVENTINFO;
 -  TDBEVENTINFO = record
 -    cbSize   : int;  // size of the structure
 -    szModule : PAnsiChar; // module that 'owns' this event and controls the data format
 -    timestamp: DWORD; // timestamp in UNIX time
 -    flags    : DWORD; // the DBEF_* flags above
 -    eventType: WORD;  // event type, such as message, can be module defined
 -    cbBlob   : DWORD; // size in bytes of pBlob^
 -    pBlob    : PByte; // pointer to buffer containing the module defined event data
 -  end;
 -
 -const
 -  MS_DB_EVENT_ADD:PAnsiChar = 'DB/Event/Add';
 -
 -  {
 -    wParam : Handle to the contact
 -    lParam : HDBEVENT handle to delete
 -    affects: Removes a single event from the database for the given contact
 -    returns: 0 on success, nonzero on failure
 -    notes  : Triggers DB/Event/Deleted just before the event *is* deleted
 -  }
 -  MS_DB_EVENT_DELETE:PAnsiChar = 'DB/Event/Delete';
 -
 -  {
 -    wParam : Handle to DB event
 -    lParam : 0
 -    returns: Returns the space in bytes requried to store the blob in HDBEVENT
 -             given by HDBEVENT(wParam) -- or -1 on error
 -  }
 -  MS_DB_EVENT_GETBLOBSIZE:PAnsiChar = 'DB/Event/GetBlobSize';
 -
 -  {
 -    wParam : Handle to a DB event
 -    lParam : Pointer to a TDBEVENTINFO structure which must be initialised
 -    affects: Returns all the information about an DB event handle to a TDBEVENTINFO
 -             structure which must be initalised, DBEI.cbSize, DBEI.pBlob and DBEI.cbSize
 -             before calling this service, the size can be assertained with
 -             GetBlobSize() service, see notes
 -    returns: Returns 0 on success, non zero on failure
 -    notes  : The correct value dbe.cbBlob can be got using db/event/getblobsize
 -             If successful, all the fields of dbe are filled. dbe.cbBlob is set to the
 -             actual number of bytes retrieved and put in dbe.pBlob
 -             If dbe.cbBlob is too small, dbe.pBlob is filled up to the size of dbe.cbBlob
 -             and then dbe.cbBlob is set to the required size of data to go in dbe.pBlob
 -             On return, dbe.szModule is a pointer to the database module's
 -             own internal list of modules. Look but don't touch.
 -  }
 -  MS_DB_EVENT_GET:PAnsiChar = 'DB/Event/Get';
 -
 -  { DB/Event/GetText (0.7.0+)
 -    Retrieves the event's text
 -      wParam=0
 -      lParam=pointer to TDBEVENTGETTEXT
 -    dbe should be the valid database event read via MS_DB_EVENT_GET
 -    Only events of type EVENTTYPE_MESSAGE are supported.
 -    Function returns a pointer to a string in the required format.
 -    This string should be freed by a call of mir_free
 -  }
 -type
 -  TDBEVENTGETTEXT = record
 -    dbei:PDBEVENTINFO;
 -    datatype:int; // DBVT_ASCIIZ, DBVT_WCHAR (DBVT_TCHAR)
 -    codepage:int;
 -  end;
 -const  
 -  MS_DB_EVENT_GETTEXT:PAnsiChar = 'DB/Event/GetText';
 -
 -  { DB/Event/GetIcon (0.7.0.1+)
 -    wParam : flags - use LR_SHARED for shared HICON
 -    lParam : dbei - pointer to DBEVENTINFO
 -    affect : Retrieves the event's icon
 -    Returns: HICON (use DestroyIcon to release resources if not LR_SHARED)
 -    notes  : dbei should be a valid database event read via MS_DB_EVENT_GET
 -             A plugin can register the standard event icon in IcoLib named
 -             'eventicon_'+Module+EvtID,like eventicon_ICQ2001. Otherwise, to declare an icon
 -             with the non-standard name, you can declare the special service,
 -             Module/GetEventIcon<id>, which will retrieve the custom icon handle (HICON). This
 -             service function has the same parameters MS_DB_EVENT_GETICON does.
 -  }
 -  MS_DB_EVENT_GETICON:PAnsiChar = 'DB/Event/GetIcon';
 -
 -{ DB/Event/GetString (0.9.0+)
 -  Converts the event's string to TCHAR* depending on the event's format
 -  wParam=(LPARAM)(DBEVENTINFO*)dbei
 -  lParam=(WPARAM)(char*)str - string to be converted
 -  returns TCHAR* - the converted string
 -  Caller must free the result using mir_free
 -}
 -
 -  MS_DB_EVENT_GETSTRINGT:PAnsiChar = 'DB/Event/GetStringT';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : HDBEVENT
 -    affect : Changes the flag for an event to mark it as read
 -    Returns: Returns the entire flag DWORD for the event after the change, or -1
 -             if HDBEVENT is invalid, see notes
 -    notes  : This iss one of the database write operations that does not trigger
 -             an event, modules should not save flagss states for any length of time.
 -  }
 -  MS_DB_EVENT_MARKREAD:PAnsiChar = 'DB/Event/MarkRead';
 -
 -  {
 -    wParam : HDBEVENT
 -    lParam : 0
 -    Affect : Returns a handle to a contact that owns the HDBEVENT,
 -             see notes
 -    Returns: Returns a handle if successful or HDBEEVENT(-1) on failure
 -    notes  : This service is very slow, only use wheen you have no other choice
 -             at all.
 -  }
 -  MS_DB_EVENT_GETCONTACT:PAnsiChar = 'DB/Event/GetContact';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affect : Retrieves a handlee to the first event in the chain
 -             for a HCONTACT
 -    returns: Returns a handle, or NULL(0) if HCONTACT is invalid or has
 -             no events, events in a chain are sorted chronologically automatically
 -  }
 -  MS_DB_EVENT_FINDFIRST:PAnsiChar = 'DB/Event/FindFirst';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affect : Retrieves a handle to the first unreead event in a chain for a HCONTACT
 -             see notes
 -    Returns: Returns a HDBEVENT handle or NULL(0) if the HCONTACT is invalid
 -             or all it's events have beeen read.
 -    Notes  : Events in a chain are sorted chronologically automatically,
 -             but this does not necessarily mean that all events after
 -             the first unread are unread too.
 -             They should be checked individually with event/findnext and event/get
 -             This service is designed for startup, reloading all the events that remained
 -             unread from last time
 -  }
 -  MS_DB_EVENT_FINDFIRSTUNREAD:PAnsiChar = 'DB/Event/FindFirstUnread';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : 0;
 -    Affects: Retrieves a handle to the lasts event in the chain for a HCONTACT
 -    Returns: Returns a handle or NULL(0) if HCONTACT is invalid or has no events
 -  }
 -  MS_DB_EVENT_FINDLAST:PAnsiChar = 'DB/Event/FindLast';
 -
 -  {
 -    wParam : HDBEVENT
 -    lParam : 0
 -    Affects: Retrieves a handle to the next event in a chain after HDBEVENT
 -    Returns: A handle to the next DB event or NULL(0) if HDBEVENT is invalid
 -             or the last event in the chain.
 -  }
 -  MS_DB_EVENT_FINDNEXT:PAnsiChar = 'DB/Event/FindNext';
 -
 -  {
 -    wParam : HDBEVENT
 -    lParam : 0
 -    Affects: Retrieves a handle to the previous event in a chain before HDBEVENT
 -    Returns: A handle to the previous HDBEVENT or NULL(0) if HDBEVENT is invalid
 -             or is the first event in the chain
 -  }
 -  MS_DB_EVENT_FINDPREV:PAnsiChar = 'DB/Event/FindPrev';
 -
 -//************************** Encryption ****************************
 -
 -  {
 -    wParam : size in bytes of string buffer (including null term)
 -    lParam : pointer to string buffer
 -    Affect : Scrambles the string buffer in place using a strange encryption algorithm,
 -             see notes
 -    Returns: Always returns 0
 -    notes  : this service may be changed at a later date such that it increasess
 -             the length of the string
 -  }
 -  MS_DB_CRYPT_ENCODESTRING:PAnsiChar = 'DB/Crypt/EncodeString';
 -
 -  {
 -    wParam : size in bytes of string buffer, including null term
 -    lParam : pointer to string buffer
 -    Affect : Descrambles pszString in-place using the strange encryption algorithm,
 -             see notes.
 -    Return : Always returns 0
 -    notes  : Reverses the operation done by MS_DB_CRYPT_ENCODINGSTRING
 -  }
 -  MS_DB_CRYPT_DECODESTRING:PAnsiChar = 'DB/Crypt/DecodeString';
 -
 -//**************************** Time ********************************
 -
 -  {
 -    wParam : timestamp (DWORD)
 -    lParam : 0
 -    Affect : Converts a GMT timestap into local time
 -    Returns: Returns the converted value, see notes
 -    Notes  : Timestamps have a zereo at midnight 1/1/1970 GMT, this service
 -             converts such a value to be based at midnight 1/1/1970 local time.
 -             This service does not use a simple conversion based on the current offset
 -             between GMT and local. Rather, it figures out whether daylight savings time
 -             would have been in place at the time of the stamp and gives the local time as
 -             it would have been at the time and date the stamp contains.
 -  }
 -  MS_DB_TIME_TIMESTAMPTOLOCAL:PAnsiChar = 'DB/Time/TimestampToLocal';
 -
 -  {
 -    wParam : timestamp (DWORD)
 -    lParam : pointer to initalised DBTIMETOSTRING structure
 -    Affect : Converts a GMT timestamp to a customisable local time string
 -             see notes
 -    Returns: Always returns 0
 -    notes  : The string is formatted according to thhe current user's locale
 -             language and preference.
 -
 -   szFormat can have the following special chars :
 -      t  time without seconds, e.g. hh:mm
 -      s  time with seconds, e.g. hh:mm:ss
 -      m  time without minutes e.g. hh
 -      d  short date, e.g. dd/mm/yyyy
 -      D  long date, e.g. d mmmm yyyy
 -      I  ISO 8061 Time yyyy-mm-ddThh:mm:ssZ
 -
 -   all other characters are copied as is.
 -  }
 -
 -type
 -  PDBTIMETOSTRING = ^TDBTIMETOSTRING;
 -  TDBTIMETOSTRING = record
 -    szFormat: TChar; // format string, see above
 -    szDest  : TChar; // pointer to dest buffer to store the result
 -    cbDest  : int;   // size of the buffer
 -  end;
 -
 -const
 -  MS_DB_TIME_TIMESTAMPTOSTRING :PAnsiChar = 'DB/Time/TimestampToString';
 -  MS_DB_TIME_TIMESTAMPTOSTRINGT:PAnsiChar = 'DB/Time/TimestampToStringT';
 -
 -//*************************** Random *******************************
 -
 -  {
 -    wParam : newSetting (BOOLEAN)
 -    lParam : 0
 -    Affect : Miranda's database is normally protected against corruption by
 -             aggressively flushing data to the disk on writes, if you're doing
 -             alot of writes e.g. an import plugin, it can sometimes be desirable
 -             to switch this feature off to speed up the process, if you do switch
 -             it off, you must remember that crashes are far more likely to be
 -             catastrophic, so switch it back on at the earliest possible opportunity.
 -             if you're doing a lot of setting writes, the flush is already delayed
 -             so you need not use this service for that purpose, see notes.
 -    Returns: Always returns 0 (successful)
 -    notes  : This is set to true initally
 -  }
 -  MS_DB_SETSAFETYMODE:PAnsiChar = 'DB/SetSafetyMode';
 -
 -//*************************** Modules ******************************
 -  
 -  {
 -    wParam : (caller defined data) will be passed to lParam of the call back
 -    lParam : function pointer to TDBMODULEENUMPROC
 -    Affects: Enumerates the names of all modules that have stored or
 -             requested information from the database,
 -             the modules are returned in no real order --
 -             Writing to the database while module names are being enumerated will cause
 -             unpredictable results in the enumeration, but the write will work.
 -
 -             the enumeration will stop if the callback returns a non zero value.
 -
 -    Returns: the last return value from the enumeration call back.
 -    Notes  : This service is only useful for debugging or EnumSettings
 -    version: The service registered to enumerate all modules that have touched
 -             the database module uses wParam as the lParam cookie value and the lParam
 -             value given here is the function pointer -- this is not safe
 -             to use before v0.1.2.1 because I don't know if this was done in v0.1.2.1-
 -
 -             prior to v0.1.2.1 you can not pass a value to the enumeration because
 -             of a bug -- which is fixed, but hey :) -- [sam]
 -  }
 -type
 -  TDBMODULEENUMPROC = function(const szModule: PAnsiChar; ofsModuleName: DWORD; lParam: LPARAM): int; cdecl;
 -const
 -  MS_DB_MODULES_ENUM:PAnsiChar = 'DB/Modules/Enum';
 -
 -{ DB/Module/Delete  0.8.0+
 -
 -  Removes all settings for the specified module.
 -  wParam=0 (unused)
 -  lParam=(LPARAM)(AnsiChar*)szModuleName - the module name to be deleted
 -}
 -  MS_DB_MODULE_DELETE:PAnsiChar = 'DB/Module/Delete';
 -
 -//************************** EVENTS ********************************
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : HDBCONTACT
 -    Affect : Called when a new event has been added to the event chain
 -             for a contact, HCONTACT contains the contact who added the event,
 -             HDBCONTACT a handle to what was added.
 -             see notes
 -    notes  : since events are sorted chronologically, you can not guarantee
 -             that HDBEVEnT is in any particular position in the chain.
 -
 -  }
 -  ME_DB_EVENT_ADDED:PAnsiChar = 'DB/Event/Added';
 -
 -  {
 -    wParam :  HANDLE (hContact)
 -    lParam :  @DBEVENTINFO
 -    Affects:  Hook is fired before any DBEVENTS are created within the database for
 -          a contact (or a user, if hContact is NULL(0)) - It allows a module to
 -          query/change DBEVENTINFO before it is created, see notes.
 -    Returns:  Hook should return 1 to stop event being added (will stop other hooks seeing the event too)
 -          Or 0 to continue processing (passing the data on as well)
 -    Notes  :  This hook is fired for all event types, and the BLOBS that the eventypes mark
 -          Maybe changed, therefore be careful about using BLOB formats.
 -          Because the memory pointing within the DBEVENTINFO CAN NOT BE OWNED or free()'d
 -          it is recommended that the hook only be used to stop events.
 -    Version: 0.3.3a+ (2003/12/03)
 -  }
 -  ME_DB_EVENT_FILTER_ADD:PAnsiChar = 'DB/Event/FilterAdd';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : HDBEVENT
 -    Affect : Called when an event is about to be deleted from the event chain
 -             for a contact, see notes
 -    notes  : Returning non zero from your hook will NOT stop the deletion,
 -             but it will as usual stop other hooks being called
 -  }
 -  ME_DB_EVENT_DELETED:PAnsiChar = 'DB/Event/Deleted';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affect : Called when a new contact has been added to the database,
 -             HCONTACT contains a handle to the new contact.
 -  }
 -  ME_DB_CONTACT_ADDED:PAnsiChar = 'DB/Contact/Added';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affect : Called when a contact is about to be deleted
 -    Returns: Returning nonzero from your hook will not stop the deletion
 -             but it will stop the other hooks from being called
 -  }
 -  ME_DB_CONTACT_DELETED:PAnsiChar = 'DB/Contact/Deleted';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : Pointer to a TDBCONTACTWRITESETTING
 -    Affect : Calleed when a contact has one of it's settings changed
 -             hContact is a valid handle to the contact that has changed,
 -             see notes.
 -    notes  : this event will be triggered many times rapidly when alot of values
 -             are set.
 -             Modules that hook this should be aware of this fact and quickly
 -             return if they are not interested in the value that has changed.
 -             Careful not to get into infinite loops with this event,
 -
 -             The TDBCONTACTWRITESETTING pointer is the same one as the
 -             original service all, so don't change any of it's fields
 -  }
 -  ME_DB_CONTACT_SETTINGCHANGED:PAnsiChar = 'DB/Contact/SettingChanged';
 -
 -  { DB/Contact/SetSettingResident service (0.6+)
 -    Disables a setting saving to the database.
 -    wParam=(WPARAM)(BOOL)bIsResident
 -    lParam=(LPARAM)(AnsiChar*)pszSettingName
 -  }
 -  MS_DB_SETSETTINGRESIDENT:PAnsiChar = 'DB/SetSettingResident';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_email.inc b/plugins/Pascal_Headers/m_email.inc deleted file mode 100644 index 38c0b49392..0000000000 --- a/plugins/Pascal_Headers/m_email.inc +++ /dev/null @@ -1,37 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_EMAIL}
 -{$DEFINE M_EMAIL}
 -
 -const
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affects: Send an e-mail to the specified contact, see notes
 -    Returns: Returns 0 on success or nonzero on failure
 -    Notes  : If an error occurs the service displays a message box
 -             with the error text -- use this service to alter this
 -  }
 -  MS_EMAIL_SENDEMAIL:PAnsiChar = 'SREMail/SendCommand';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_file.inc b/plugins/Pascal_Headers/m_file.inc deleted file mode 100644 index 224aa41d8f..0000000000 --- a/plugins/Pascal_Headers/m_file.inc +++ /dev/null @@ -1,71 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_FILE}
 -{$DEFINE M_FILE}
 -
 -const
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affects: Brings up the send file dialog for a contact, see notes
 -    Returns: 0 on success [non zero] on failure
 -    Notes  : Returns immediately without waiting for the send
 -  }
 -  MS_FILE_SENDFILE:PAnsiChar = 'SRFile/SendCommand';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : pointer to an array of PAnsiChar's the first nil item
 -             terminates the list -- see notes
 -    Affects: Brings up the send file dialog with specifieed files already chosen
 -             the user is not prevented from editing the list --
 -    Returns: 0 on success [non zero] on failure -- returns immediately without
 -              waiting for the send to finish
 -    Notes  : both directories and files can be given
 -    Version: v0.1.2.1+
 -  }
 -  MS_FILE_SENDSPECIFICFILES:PAnsiChar = 'SRFile/SendSpecificFiles';
 -
 -{
 -  v0.9.0+
 -  wParam=(WPARAM)(HANDLE)hContact
 -  lParam=(LPARAM)(const TCHAR**)ppFiles
 -  returns 0 on success or nonzero on failure
 -  returns immediately, without waiting for the send
 -}
 -  MS_FILE_SENDSPECIFICFILEST:PAnsiChar = 'SRFile/SendSpecificFilesT';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : Pointer to a buffer
 -    Affects: returns the received files folder for a contact, the buffer
 -             should be at least MAX_PATH long (defined with WinAPI),
 -             the returned path may not exist -- see notes
 -    Returns: Returns 0 on success [non zero] on failure
 -    notes  : If HCONTACT is NULL(0) the path returned is the path
 -             without the postfix contact name.
 -    Version: v0.1.2.2+
 -  }
 -  MS_FILE_GETRECEIVEDFILESFOLDER:PAnsiChar = 'SRFile/GetReceivedFilesFolder';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_findadd.inc b/plugins/Pascal_Headers/m_findadd.inc deleted file mode 100644 index 8adde75d80..0000000000 --- a/plugins/Pascal_Headers/m_findadd.inc +++ /dev/null @@ -1,36 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_FINDADD}
 -{$DEFINE M_FINDADD}
 -
 -const
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affects: Opens the find/add users dialog box, or gives it focus if it's
 -             already open.
 -    Returns: Always returns 0
 -  }
 -  MS_FINDADDFINDADD:PAnsiChar = 'FindAdd/FindAddCommand';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_helpers.inc b/plugins/Pascal_Headers/m_helpers.inc deleted file mode 100644 index 34351ec63d..0000000000 --- a/plugins/Pascal_Headers/m_helpers.inc +++ /dev/null @@ -1,484 +0,0 @@ -{$IFDEF M_API_UNIT}
 -
 -function ProtoServiceExists(const proto,service: PAnsiChar): int;
 -
 -function CreateVersionString(version:dword;buf:PAnsiChar):PAnsiChar;
 -function CreateVersionStringPlugin(pluginInfo:PPluginInfoEx;buf:PAnsiChar):PAnsiChar;
 -function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int;
 -function PLUGIN_CMP_VERSION(verA: LongInt; verB: LongInt): int;
 -
 -function mir_forkthread(aFunc:pThreadFunc; arg:pointer):THANDLE; {inline}
 -function mir_forkthreadex(aFunc:pThreadFuncEx; arg:pointer; stackSize:int; pThreadID:puint_ptr):THANDLE; {inline}
 -function mir_forkthreadowner(aFunc:pThreadFuncOwner; owner:pointer; arg:pointer; pThreadID:puint_ptr):THANDLE; {inline}
 -
 -function Netlib_CloseHandle(Handle: THandle): int;
 -function Netlib_GetBase64DecodedBufferSize(const cchEncoded: int): int;
 -function Netlib_GetBase64EncodedBufferSize(const cbDecoded: int): int;
 -function Netlib_Send(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr;
 -function Netlib_Recv(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr;
 -procedure Netlib_Log(hNetLib: THandle; const sz: PAnsiChar);
 -
 -function WindowList_Add(hList: THandle; hWnd: HWND; hContact: THandle): int_ptr;
 -function WindowList_Remove(hList: THandle; hWnd: THandle): int_ptr;
 -function WindowList_Find(hList: THandle; hContact: THandle): int_ptr;
 -function WindowList_Broadcast(hList: THandle; message: int; wParam: WPARAM; lParam: LPARAM): int_ptr;
 -function Utils_SaveWindowPosition(hWnd: THandle; hContact: THandle; const szModule, szNamePrefix: PAnsiChar): int_ptr;
 -function Utils_RestoreWindowPosition(hWnd: THandle; hContact: THandle; Flags: int; const szModule, szNamePrefix: PAnsiChar): int_ptr;
 -
 -function mir_hashstr(const key:pAnsiChar):uint; {inline;}
 -function mir_hashstrW(const key:pWideChar):uint; {inline;}
 -function lrtrim(str:pAnsiChar):pAnsiChar; {inline}
 -function lrtrimp(str:pAnsiChar):pAnsiChar; {inline}
 -function mir_utf8decodeA(const src:pAnsiChar):pAnsiChar; {inline}
 -
 -function Translate(sz: PAnsiChar): PAnsiChar;
 -function Translatew(sz: PWideChar): PWideChar;
 -function TranslateString(const sz: AnsiString): AnsiString;
 -function TranslateWideString(const sz:WideString):WideString;
 -function TranslateUnicodeString(sz: String): String;{$ifdef FPC}inline;{$endif}
 -procedure TranslateDialogDefault(hwndDlg: THandle);
 -procedure TranslateMenu(hMenu: HMENU);
 -function Langpack_PCharToTChar(astr:PAnsiChar):int_ptr;
 -function Langpack_Register:int_ptr;
 -
 -function ProtoBroadcastAck(const szModule: PAnsiChar; hContact: THandle; type_: int; result_: int; hProcess: THandle; lParam: LPARAM): int_ptr;
 -function CreateProtoServiceFunction(const szModule, szService: PAnsiChar; serviceProc: TMIRANDASERVICE): int_ptr;
 -
 -function LoadSkinnedIcon(id: int): THandle;
 -function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle;
 -function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr;
 -function SkinPlaySound (const name: PAnsiChar): int_ptr;
 -
 -function Menu_AddContextFrameMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -function Menu_AddMainMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -function Menu_AddContactMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -function Menu_AddStatusMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -function Menu_AddProtoMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -function Menu_AddSubGroupMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -function Menu_AddGroupMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -function Menu_AddTrayMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -
 -function UserInfo_AddPage(wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr;
 -function Options_AddPage(wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr;
 -function Hotkey_Register(hk:PHOTKEYDESC):int_ptr;
 -function Skin_AddIcon(si:PSKINICONDESC):THANDLE;
 -
 -procedure FontRegister(pFontID:pFontID);
 -procedure FontRegisterW(pFontID:pFontIDW);
 -
 -procedure ColourRegister(pColorID:pColourID);
 -procedure ColourRegisterW(pColorID:pColourIDW);
 -
 -procedure EffectRegister(pEffectID:pEffectID);
 -procedure EffectRegisterW(pEffectID:pEffectIDW);
 -
 -{$ELSE}
 -
 -function ProtoServiceExists(const proto,service: PAnsiChar): int;
 -var
 -  buf:array [0..127] of AnsiChar;
 -begin
 -  if (proto=nil) or (service=nil) then
 -  begin
 -    result:=0;
 -    exit;
 -  end;
 -  lStrCpyA(@buf,proto);
 -  lStrCatA(@buf,service);
 -  result:=ServiceExists(@buf);
 -end;
 -
 -
 -function CreateVersionString(version:dword;buf:PAnsiChar):PAnsiChar;
 -var
 -  vers:array [0..3] of integer;
 -begin
 -  vers[0]:=(version shr 24) and $FF;
 -  vers[1]:=(version shr 16) and $FF;
 -  vers[2]:=(version shr  8) and $FF;
 -  vers[3]:=version and $FF;
 -  wvsprintfa(buf,'%d.%d.%d.%d',@vers);
 -  result:=buf;
 -end;
 -
 -function CreateVersionStringPlugin(pluginInfo:PPluginInfoEx;buf:PAnsiChar):PAnsiChar;
 -begin
 -  result:=CreateVersionString(pluginInfo^.version,buf);
 -end;
 -
 -function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int;
 -begin
 -  Result := (a shl 24) or (b shl 16) or (c shl 8) or d;
 -end;
 -
 -function PLUGIN_CMP_VERSION(verA: LongInt; verB: LongInt): int;
 -begin
 -  Result := 0;
 -  { could be used to compare for severity of age for positive values, if a<b
 -  results are minus values, 0 for equal, positive if a is newer }
 -  Inc(Result, (verA and $FF      ) - (verB and $FF));
 -  Inc(Result, (verA and $FF00    ) - (verB and $FF00));
 -  Inc(Result, (verA and $FF0000  ) - (verB and $FF0000));
 -  Inc(Result, (verA and $FF000000) - (verB and $FF000000));
 -end;
 -
 -
 -function mir_forkthread(aFunc:pThreadFunc; arg:pointer):THANDLE; {inline}
 -begin
 -	result:=forkthread(aFunc, 0, arg);
 -end;
 -function mir_forkthreadex(aFunc:pThreadFuncEx; arg:pointer; stackSize:int; pThreadID:puint_ptr):THANDLE; {inline}
 -begin
 -	result:=forkthreadex(nil, stackSize, aFunc, nil, arg, pThreadID);
 -end;
 -function mir_forkthreadowner(aFunc:pThreadFuncOwner; owner:pointer; arg:pointer; pThreadID:puint_ptr):THANDLE; {inline}
 -begin
 -	result:=forkthreadex(nil, 0, pThreadFuncEx(aFunc), owner, arg, pThreadID);
 -end;
 -
 -
 -function Netlib_CloseHandle(Handle: THandle): int;
 -begin
 -  Result := CallService(MS_NETLIB_CLOSEHANDLE, Handle, 0);
 -end;
 -
 -function Netlib_GetBase64DecodedBufferSize(const cchEncoded: int): int;
 -begin
 -  Result := (cchEncoded shr 2) * 3;
 -end;
 -
 -function Netlib_GetBase64EncodedBufferSize(const cbDecoded: int): int;
 -begin
 -  Result := (cbDecoded * 4+11) div 12*4+1;
 -end;
 -
 -function Netlib_Send(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr;
 -var
 -  nlb: TNETLIBBUFFER;
 -begin
 -  nlb.buf   := buf;
 -  nlb.len   := len;
 -  nlb.flags := flags;
 -  Result := CallService(MS_NETLIB_SEND, wParam(hConn), lParam(@nlb));
 -end;
 -
 -function Netlib_Recv(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr;
 -var
 -  nlb: TNETLIBBUFFER;
 -begin
 -  nlb.buf   := buf;
 -  nlb.len   := len;
 -  nlb.flags := flags;
 -  Result := CallService(MS_NETLIB_RECV, wParam(hConn), lParam(@nlb));
 -end;
 -
 -procedure Netlib_Log(hNetLib: THandle; const sz: PAnsiChar);
 -begin
 -  CallService(MS_NETLIB_LOG, hNetLib, lParam(sz));
 -end;
 -
 -
 -function WindowList_Add(hList: THandle; hWnd: hWnd; hContact: THandle): int_ptr;
 -var
 -  wle: TWINDOWLISTENTRY;
 -begin
 -  wle.hList    := hList;
 -  wle.hWnd     := hWnd;
 -  wle.hContact := hContact;
 -  Result := CallService(MS_UTILS_ADDTOWINDOWLIST, 0, lParam(@wle));
 -end;
 -
 -function WindowList_Remove(hList: THandle; hWnd: THandle): int_ptr;
 -begin
 -  Result := CallService(MS_UTILS_REMOVEFROMWINDOWLIST, hList, hWnd);
 -end;
 -
 -function WindowList_Find(hList: THandle; hContact: THandle): int_ptr;
 -begin
 -  Result := CallService(MS_UTILS_FINDWINDOWINLIST, hList, hContact);
 -end;
 -
 -function WindowList_Broadcast(hList: THandle; message: int; wParam: WPARAM; lParam: LPARAM): int_ptr;
 -var
 -  msg: TMSG;
 -begin
 -  msg.message := message;
 -  msg.wParam  := wParam;
 -  msg.lParam  := lParam;
 -  Result := CallService(MS_UTILS_BROADCASTTOWINDOWLIST, hList, tLparam(@Msg));
 -end;
 -
 -function Utils_SaveWindowPosition(hWnd: THandle; hContact: THandle; const szModule, szNamePrefix: PAnsiChar): int_ptr;
 -var
 -  swp: TSAVEWINDOWPOS;
 -begin
 -  swp.hWnd     := hWnd;
 -  swp.hContact := hContact;
 -  swp.szModule := szModule;
 -  swp.szNamePrefix := szNamePrefix;
 -  Result := CallService(MS_UTILS_SAVEWINDOWPOSITION, 0, lParam(@swp));
 -end;
 -
 -function Utils_RestoreWindowPosition(hWnd: THandle; hContact: THandle; Flags: int; const szModule, szNamePrefix: PAnsiChar): int_ptr;
 -var
 -  swp: TSAVEWINDOWPOS;
 -begin
 -  swp.hWnd         := hWnd;
 -  swp.hContact     := hContact;
 -  swp.szModule     := szModule;
 -  swp.szNamePrefix := szNamePrefix;
 -  Result := CallService(MS_UTILS_RESTOREWINDOWPOSITION, Flags, lParam(@swp));
 -end;
 -
 -
 -function mir_hashstr(const key:pAnsiChar):uint; {inline;}
 -var
 -  len:int;
 -begin
 -  if key=NIL then
 -    result:=0
 -  else
 -  begin
 -    len:=lstrlena(key);
 -    result:=mir_hash(key, len);
 -  end;
 -end;
 -
 -function mir_hashstrW(const key:pWideChar):uint; {inline;}
 -var
 -  len:int;
 -begin
 -  if key=NIL then
 -    result:=0
 -  else
 -  begin
 -    len:=lstrlenw(key);
 -    result:=mir_hash(key, len*SizeOF(WideChar));
 -  end;
 -end;
 -
 -function lrtrim(str:pAnsiChar):pAnsiChar; {inline}
 -begin
 -  result:=ltrim(rtrim(str));
 -end;
 -function lrtrimp(str:pAnsiChar):pAnsiChar; {inline}
 -begin
 -  result:=ltrimp(rtrim(str));
 -end;
 -
 -function mir_utf8decodeA(const src:pAnsiChar):pAnsiChar; {inline}
 -type
 - ppWideChar = ^pWidechar;
 -var
 -  tmp:pAnsiChar;
 -begin
 -  tmp:=mir_strdup(src);
 -  mir_utf8decode(tmp,ppWideChar(nil)^);
 -  result:=tmp;
 -end;
 -
 -
 -function TranslateW(sz: PWideChar): PWideChar;
 -begin
 -  result:=TranslateW_LP(sz, hLangpack);
 -end;
 -
 -function Translate(sz: PAnsiChar): PAnsiChar;
 -begin
 -  result:=TranslateA_LP(sz, hLangpack);
 -end;
 -
 -function TranslateString(const sz:AnsiString):AnsiString;
 -begin
 -  Result:=AnsiString(PAnsiChar(
 -    CallService(MS_LANGPACK_TRANSLATESTRING,hLangpack,lparam(@sz))));
 -end;
 -
 -function TranslateWideString(const sz:WideString):WideString;
 -begin
 -  Result:=WideString(PWideChar(
 -    CallService(MS_LANGPACK_TRANSLATESTRING, LANG_UNICODE, lParam(sz))));
 -end;
 -
 -function TranslateUnicodeString(sz: String): String;{$ifdef FPC}inline;{$endif}
 -begin
 -  Result := String(PChar(CallService(MS_LANGPACK_TRANSLATESTRING, LANG_UNICODE, lParam(sz))));
 -end;
 -
 -procedure TranslateDialogDefault(hwndDlg: THandle);
 -begin
 -  TranslateDialog_LP(hwndDlg,hLangpack);
 -end;
 -
 -procedure TranslateMenu(hMenu: HMENU);
 -begin
 -  TranslateMenu_LP(hMenu,hLangpack);
 -end;
 -
 -function Langpack_PCharToTChar(astr:PAnsiChar):int_ptr;
 -begin
 -  result:=CallService(MS_LANGPACK_PCHARTOTCHAR, hLangpack, LPARAM(astr));
 -end;
 -
 -function Langpack_Register:int_ptr;
 -begin
 -  result:=CallService(MS_LANGPACK_REGISTER,WPARAM(@hLangpack),LPARAM(@PluginInfo));
 -end;
 -
 -
 -function ProtoBroadcastAck(const szModule: PAnsiChar; hContact: THandle; type_: int; result_: int; hProcess: THandle; lParam: LPARAM): int_ptr;
 -var
 -  ack: TACKDATA;
 -begin
 -  ack.cbSize   := sizeof(TACKDATA);
 -  ack.szModule := szModule;
 -  ack.hContact := hContact;
 -  ack._type    := type_;
 -  ack._result  := result_;
 -  ack.hProcess := hProcess;
 -  ack.lParam   := lParam;
 -  Result := CallService(MS_PROTO_BROADCASTACK, 0, tlParam(@ack));
 -end;
 -
 -function CreateProtoServiceFunction(const szModule, szService: PAnsiChar; serviceProc: TMIRANDASERVICE): int_ptr;
 -var
 -  szStr: array[0..MAXMODULELABELLENGTH*2] of AnsiChar;
 -begin
 -  if (szModule=nil) or (szService=nil) then
 -  begin
 -    result:=0;
 -    exit;
 -  end;
 -  lstrcpya(szStr, szModule);
 -  lstrcata(szStr, szService);
 -  Result := CreateServiceFunction(szStr, @serviceProc);
 -end;
 -
 -
 -function LoadSkinnedIcon(id: int): THandle;
 -begin
 -  Result := CallService(MS_SKIN_LOADICON, id, 0);
 -end;
 -
 -function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle;
 -begin
 -  Result := CallService(MS_SKIN_LOADPROTOICON, wParam(szProto), status);
 -end;
 -
 -function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr;
 -var
 -  ssd: TSKINSOUNDDESCEX;
 -begin
 -  FillChar(ssd,SizeOf(ssd),0);
 -  ssd.cbSize         := sizeof(ssd);
 -  ssd.pszName        := name;
 -  ssd.pszDescription.a := description;
 -  ssd.pszDefaultFile.a := defaultFile;
 -  Result := CallService(MS_SKIN_ADDNEWSOUND, hLangpack, lParam(@ssd));
 -end;
 -
 -function SkinPlaySound (const name: PAnsiChar): int_ptr;
 -begin
 -  Result := CallService(MS_SKIN_PLAYSOUND, 0, lParam(name));
 -end;
 -
 -
 -function Menu_AddContextFrameMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -begin
 -  mi^.hLangpack:=hLangpack;
 -  result:=CallService(MS_CLIST_ADDCONTEXTFRAMEMENUITEM, 0,LPARAM(mi));
 -end;
 -
 -function Menu_AddMainMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -begin
 -  mi^.hLangpack:=hLangpack;
 -  result:=CallService(MS_CLIST_ADDMAINMENUITEM, 0,LPARAM(mi));
 -end;
 -
 -function Menu_AddContactMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -begin
 -  mi^.hLangpack:=hLangpack;
 -  result:=CallService(MS_CLIST_ADDCONTACTMENUITEM, 0,LPARAM(mi));
 -end;
 -
 -function Menu_AddStatusMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -begin
 -  mi^.hLangpack:=hLangpack;
 -  result:=CallService(MS_CLIST_ADDSTATUSMENUITEM, 0,LPARAM(mi));
 -end;
 -
 -function Menu_AddProtoMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -begin
 -  mi^.hLangpack:=hLangpack;
 -  result:=CallService(MS_CLIST_ADDPROTOMENUITEM, 0,LPARAM(mi));
 -end;
 -
 -function Menu_AddSubGroupMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -begin
 -  mi^.hLangpack:=hLangpack;
 -  result:=CallService(MS_CLIST_ADDSUBGROUPMENUITEM, 0,LPARAM(mi));
 -end;
 -
 -function Menu_AddGroupMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -begin
 -  mi^.hLangpack:=hLangpack;
 -  result:=CallService(MS_CLIST_ADDGROUPMENUITEM, 0,LPARAM(mi));
 -end;
 -
 -function Menu_AddTrayMenuItem(mi:PCLISTMENUITEM):HGENMENU;
 -begin
 -  mi^.hLangpack:=hLangpack;
 -  result:=CallService(MS_CLIST_ADDTRAYMENUITEM, 0,LPARAM(mi));
 -end;
 -
 -
 -function UserInfo_AddPage(wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr;
 -begin
 -  odp^.hLangpack:=hLangpack;
 -	result:=CallService(MS_USERINFO_ADDPAGE, wParam, LPARAM(odp));
 -end;
 -
 -function Options_AddPage(wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr;
 -begin
 -  odp^.hLangpack:=hLangpack;
 -	result:=CallService(MS_OPT_ADDPAGE, wParam, LPARAM(odp));
 -end;
 -
 -function Hotkey_Register(hk:PHOTKEYDESC):int_ptr;
 -begin
 -	result:=CallService(MS_HOTKEY_REGISTER, hLangpack, LPARAM(hk));
 -end;
 -
 -function Skin_AddIcon(si:PSKINICONDESC):THANDLE;
 -begin
 -  result:=CallService(MS_SKIN2_ADDICON, hLangpack, LPARAM(si));
 -end;
 -
 -procedure FontRegister(pFontID:pFontID);
 -begin
 -	CallService('Font/Register', WPARAM(pFontID), hLangpack);
 -end;
 -procedure FontRegisterW(pFontID:pFontIDW);
 -begin
 -	CallService('Font/RegisterW', WPARAM(pFontID), hLangpack);
 -end;
 -
 -procedure ColourRegister(pColorID:pColourID);
 -begin
 -	CallService('Colour/Register', WPARAM(pColorID), hLangpack);
 -end;
 -procedure ColourRegisterW(pColorID:pColourIDW);
 -begin
 -	CallService('Colour/RegisterW', WPARAM(pColorID), hLangpack);
 -end;
 -
 -procedure EffectRegister(pEffectID:pEffectID);
 -begin
 -	CallService('Effect/Register', WPARAM(pEffectID), hLangpack);
 -end;
 -procedure EffectRegisterW(pEffectID:pEffectIDW);
 -begin
 -	CallService('Effect/RegisterW', WPARAM(pEffectID), hLangpack);
 -end;
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_history.inc b/plugins/Pascal_Headers/m_history.inc deleted file mode 100644 index 006528de95..0000000000 --- a/plugins/Pascal_Headers/m_history.inc +++ /dev/null @@ -1,35 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_HISTORY}
 -{$DEFINE M_HISTORY}
 -
 -const
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affects: Show's the history dialog box for a contact, see notes
 -    Notes  : HCONTACT can be NULL(0) to show system messages
 -  }
 -  MS_HISTORY_SHOWCONTACTHISTORY:PAnsiChar = 'History/ShowContactHistory';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_icq.inc b/plugins/Pascal_Headers/m_icq.inc deleted file mode 100644 index 6932ff6e8a..0000000000 --- a/plugins/Pascal_Headers/m_icq.inc +++ /dev/null @@ -1,381 +0,0 @@ -{ ---------------------------------------------------------------------------
 -                ICQ plugin for Miranda Instant Messenger
 -                ________________________________________
 -
 - Copyright c 2000-2001 Richard Hughes, Roland Rabien, Tristan Van de Vreede
 - Copyright c 2001-2002 Jon Keating, Richard Hughes
 - Copyright c 2002-2004 Martin –berg, Sam Kothari, Robert Rainwater
 - Copyright c 2004-2009 Joe Kucera
 -
 - 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.
 -
 - -----------------------------------------------------------------------------
 -
 -// File name      : $URL: https://svn.sourceforge.net/svnroot/miranda/trunk/miranda/include/m_icq.h $
 -// Revision       : $Revision: 9376 $
 -// Last change on : $Date: 2009-04-09 23:55:33 +0400 (‘', 09 øõ‘? 2009) $
 -// Last change by : $Author: jokusoftware $
 -
 - DESCRIPTION:
 -
 -  Describe me here please...
 -
 - -----------------------------------------------------------------------------
 - Note: In v0.3 the part before "/Servicename" is dynamic. It will be the name of the protocol.
 - Example: If the plugin was loaded from ICQ.dll, the service name is "ICQ/Servicename", and if
 - the dll was Icq2.dll, the service name will be "Icq2/Servicename". This behaviour is temporary
 - until proper multiaccounts are implemented.
 -}
 -
 -{$IFNDEF M_ICQ}
 -{$DEFINE M_ICQ}
 -// extended search result structure, used for all searches
 -type
 -  PICQSEARCHRESULT = ^TICQSEARCHRESULT;
 -  TICQSEARCHRESULT = record
 -    hdr : TPROTOSEARCHRESULT;
 -    uin : DWORD;
 -    auth: BYTE;
 -{
 -    // not presents in new version
 -    uid          :PAnsiChar;
 -    nick         :PAnsiChar; // utf-8
 -    firstName    :PAnsiChar;
 -    lastName     :PAnsiChar;
 -}
 -    gender       :byte;
 -    age          :byte;
 -    country      :dword;
 -    maritalStatus:byte;
 -  end;
 -(*
 -{
 -  start a search of all ICQ users by e-mail
 -  wParam=0
 -  lParam=(LPARAM)(const AnsiChar* )email
 -  returns a handle to the search on success, NULL on failure
 -  Results are returned using the same scheme documented in PSS_BASICSEARCH
 -  **DEPRECATED** in favour of PS_SEARCHBYEMAIL
 -}
 -const
 -   MS_ICQ_SEARCHBYEMAIL = '/SearchByEmail';
 -{
 -  start a search of all ICQ users by details
 -  wParam=0
 -  lParam=(LPARAM)(ICQDETAILSSEARCH* )&ids
 -  returns a handle to the search on success, NULL on failure
 -  Results are returned using the same scheme documented in PSS_BASICSEARCH
 -  **DEPRECATED** in favour of PS_SEARCHBYNAME
 -}
 -type
 -  PICQDETAILSSEARCH = ^TICQDETAILSSEARCH;
 -  TICQDETAILSSEARCH = record
 -    nick      : PAnsiChar;
 -    firstName : PAnsiChar;
 -    lastName  : PAnsiChar;
 -  end;
 -
 -const
 -   MS_ICQ_SEARCHBYDETAILS = '/SearchByDetails';
 -*)
 -{
 -  Request authorization
 -  wParam=(WPARAM)hContact
 -}
 -const
 -   MS_REQ_AUTH = '/ReqAuth';
 -{
 -  Grant authorization
 -  wParam=(WPARAM)hContact;
 -}
 -   MS_GRANT_AUTH = '/GrantAuth';
 -{
 -  Revoke authorization
 -  wParam=(WPARAM)hContact
 -}
 -   MS_REVOKE_AUTH = '/RevokeAuth';
 -
 -{
 -  Open ICQ profile
 -  wParam=(WPARAM)hContact
 -}
 -   MS_OPEN_PROFILE = '/OpenProfile';
 -
 -{
 -  Add contact to server-list
 -  wParam=(WPARAM)hContact
 -}
 -   MS_ICQ_ADDSERVCONTACT  = '/AddServerContact';
 -{
 -  Display XStatus detail (internal use only)
 -  wParam=(WPARAM)hContact;
 -}
 -   MS_XSTATUS_SHOWDETAILS = '/ShowXStatusDetails';
 -{Send an SMS via the ICQ network
 -wParam=(WPARAM)(const AnsiChar*)szPhoneNumber
 -lParam=(LPARAM)(const AnsiChar*)szMessage
 -Returns a HANDLE to the send on success, or NULL on failure
 -szPhoneNumber should be the full number with international code and preceeded
 -  by a +
 -
 -When the server acks the send, an ack will be broadcast:
 - type=ICQACKTYPE_SMS, result=ACKRESULT_SENTREQUEST, lParam=(LPARAM)(AnsiChar*)szInfo
 -At this point the message is queued to be delivered. szInfo contains the raw
 -XML data of the ack. Here's what I got when I tried:
 -"<sms_response><source>airbornww.com</source><deliverable>Yes</deliverable><network>BT Cellnet, United Kingdom</network><message_id>[my uin]-1-1955988055-[destination phone#, without +]</message_id><messages_left>0</messages_left></sms_response>\r\n"
 -Now the hProcess has been deleted. The only way to track which receipt
 -corresponds with which response is to parse the <message_id> field.
 -At a (possibly much) later time the SMS will have been delivered. An ack will
 -be broadcast:
 - type=ICQACKTYPE_SMS, result=ACKRESULT_SUCCESS, hProcess=NULL, lParam=(LPARAM)(AnsiChar*)szInfo
 -Note that the result will always be success even if the send failed, just to
 -save needing to have an attempt at an XML parser in the ICQ module.
 -Here's the szInfo for a success:
 -"<sms_delivery_receipt><message_id>[my uin]-1--1461632229-[dest phone#, without +]</message_id><destination>[dest phone#, without +]</destination><delivered>Yes</delivered><text>[first 20 bytes of message]</text><submition_time>Tue, 30 Oct 2001 22:35:16 GMT</submition_time><delivery_time>Tue, 30 Oct 2001 22:34:00 GMT</delivery_time></sms_delivery_receipt>"
 -And here's a failure:
 -"<sms_delivery_receipt><message_id>[my uin]-1-1955988055-[destination phone#, without leading +]</message_id><destination>[destination phone#, without leading +]</destination><delivered>No</delivered><submition_time>Tue, 23 Oct 2001 23:17:02 GMT</submition_time><error_code>999999</error_code><error><id>15</id><params><param>0</param><param>Multiple message submittion failed</param></params></error></sms_delivery_receipt>"
 -SMSes received from phones come through this same ack, again to avoid having
 -an XML parser in the protocol module. Here's one I got:
 -"<sms_message><source>MTN</source><destination_UIN>[UIN of recipient, ie this account]</destination_UIN><sender>[sending phone number, without +]</sender><senders_network>[contains one space, because I sent from ICQ]</senders_network><text>[body of the message]</text><time>Fri, 16 Nov 2001 03:12:33 GMT</time></sms_message>"
 -}
 -  ICQACKTYPE_SMS   = 1001;
 -  ICQEVENTTYPE_SMS = 2001;     {database event type }
 -  MS_ICQ_SENDSMS = '/SendSMS';
 -
 -{
 -  e-mail express
 -  db event added to NULL contact
 -  blob format is:
 -  ASCIIZ    text, usually of the form "Subject: %s\r\n%s"
 -  ASCIIZ    from name
 -  ASCIIZ    from e-mail
 -}
 -  ICQEVENTTYPE_EMAILEXPRESS = 2002; // database event type
 -{
 -  www pager
 -  db event added to NULL contact
 -  blob format is:
 -  ASCIIZ    text, usually "Sender IP: xxx.xxx.xxx.xxx\r\n%s"
 -  ASCIIZ    from name
 -  ASCIIZ    from e-mail
 -}
 -  ICQEVENTTYPE_WEBPAGER = 2003; // database event type
 -{
 -  missed message notification
 -  db event added to contact's history
 -  blob format is:
 -  WORD      error code
 -}
 -  ICQEVENTTYPE_MISSEDMESSAGE = 2004; //database event type
 -{
 -  for server-side lists, used internally only
 -  hProcess=dwSequence
 -  lParam=server's error code, 0 for success
 -}
 -  ICQACKTYPE_SERVERCLIST = 1003;
 -{
 -  for rate warning distribution (mainly upload dlg)
 -  hProcess=Rate class ID
 -  lParam=server's status code
 -}
 -  ICQACKTYPE_RATEWARNING = 1004;
 -{
 -  received Xtraz Notify response
 -  hProcess=dwSequence
 -  lParam=contents of RES node
 -}
 -  ICQACKTYPE_XTRAZNOTIFY_RESPONSE = 1005;
 -{
 -  received Custom Status details response
 -  hProcess=dwSequence
 -  lParam=0
 -}
 -  ICQACKTYPE_XSTATUS_RESPONSE = 1006;
 -
 -//Update user details on server
 -//Permited operation types:
 -  CIXT_BASIC      = $0001;
 -  CIXT_MORE       = $0002;
 -  CIXT_WORK       = $0004;
 -  CIXT_CONTACT    = $0008;
 -  CIXT_LOCATION   = $0010;
 -  CIXT_BACKGROUND = $0020;
 -  CIXT_EDUCATION  = $0040;
 -  CIXT_EXTRA      = $0080;
 -  CIXT_FULL       = $00FF;
 -
 -//wParam=operationType
 -  PS_CHANGEINFOEX = '/ChangeInfoEx';
 -
 -{
 -  Change nickname in White pages
 -  lParam=(LPARAM)(const AnsiChar*)szNewNickName
 -}
 -  PS_SET_NICKNAME = '/SetNickname';
 -
 -{
 -  Set password for current session
 -  lParam=(LPARAM)(const AnsiChar*)szPassword
 -}
 -  PS_ICQ_SETPASSWORD = '/SetPassword';
 -
 -{
 -  miranda/icqoscar/statusmsgreq event
 -  called when our status message is requested
 -  wParam=(BYTE)msgType
 -  lParam=(DWORD)uin
 -  msgType is one of the ICQ_MSGTYPE_GET###MSG constants in icq_constants.h
 -  uin is the UIN of the contact requesting our status message
 -}
 -  ME_ICQ_STATUSMSGREQ = '/StatusMsgReq';
 -
 -{
 -  set owner avatar
 -  wParam=0
 -  lParam=(const AnsiChar *)Avatar file name
 -  return=0 for sucess
 -}
 -  PS_ICQ_SETMYAVATAR = '/SetMyAvatar';
 -
 -{
 -  get current owner avatar
 -  wParam=(AnsiChar *)Buffer to file name
 -  lParam=(int)Buffer size
 -  return=0 for sucess
 -}
 -  PS_ICQ_GETMYAVATAR = '/GetMyAvatar';
 -
 -{
 -  get size limit for avatar image
 -  wParam=(int *)max width of avatar - will be set
 -  lParam=(int *)max height of avatar - will be set
 -  return=0 for sucess
 -}
 -  PS_ICQ_GETMYAVATARMAXSIZE = '/GetMyAvatarMaxSize';
 -
 -{
 -  check if image format supported for avatars
 -  wParam = 0
 -  lParam = PA_FORMAT_*   // avatar format
 -  return = 1 (supported) or 0 (not supported)
 -}
 -  PS_ICQ_ISAVATARFORMATSUPPORTED = '/IsAvatarFormatSupported';
 -
 -{ Custom Status helper API *
 - - to set custom status message & title use PS_ICQ_GETCUSTOMSTATUS to obtain
 -   DB settings and write values to them (UTF-8 strings best).
 - - use PS_ICQ_GETCUSTOMSTATUSEX and PS_ICQ_SETCUSTOMSTATUSEX for controling Custom Status
 - - custom messages for each user supported - ME_ICQ_STATUSMSGREQ with type MTYPE_SCRIPT_NOTIFY
 -}
 -
 -  CSSF_MASK_STATUS    = $0001; // status member valid for set/get
 -  CSSF_MASK_NAME      = $0002; // pszName member valid for set/get
 -  CSSF_MASK_MESSAGE   = $0004; // pszMessage member valid for set/get
 -  CSSF_DISABLE_MENU   = $0020; // disable default custom status menu, wParam = bEnable
 -  CSSF_DISABLE_UI     = $0040; // disable default custom status UI, wParam = bEnable
 -  CSSF_DEFAULT_NAME   = $0080; // only with CSSF_MASK_NAME and get API to get default custom status name (wParam = status)
 -  CSSF_STATUSES_COUNT = $0100; // returns number of custom statuses in wParam, only get API
 -  CSSF_STR_SIZES      = $0200; // returns sizes of custom status name & message (wParam & lParam members) in chars
 -  CSSF_UNICODE        = $1000; // strings are in UCS-2
 -
 -type
 -  PICQ_CUSTOM_STATUS = ^TICQ_CUSTOM_STATUS;
 -  TICQ_CUSTOM_STATUS = record
 -    cbSize   :int;     // size of the structure
 -    flags    :int;     // combination of CSSF_*
 -    status   :^int;    // custom status id
 -    szName   :TChar;   // buffer for custom status name
 -    szMessage:TChar;   // buffer for custom status message
 -    wParam   :^WPARAM; // extra params, see flags
 -    lParam   :^LPARAM;
 -  end;
 -
 -const
 -{
 -  Sets owner current custom status
 -  wParam = (int)N   // custom status id (1-29)
 -  lParam = 0
 -  return = N (id of status set) or 0 (failed - probably bad params)
 -}
 -  PS_ICQ_SETCUSTOMSTATUS = '/SetXStatus';
 -
 -{
 -   Sets owner current custom status
 -   wParam = 0                          // reserved
 -   lParam = (ICQ_CUSTOM_STATUS*)pData  // contains what to set and new values
 -   return = 0 (for success)
 -}
 -  PS_ICQ_SETCUSTOMSTATUSEX = '/SetXStatusEx';
 -
 -{
 - Retrieves custom status details for specified hContact
 - wParam = (HANDLE)hContact
 - lParam = (ICQ_CUSTOM_STATUS*)pData  // receives details (members must be prepared)
 - return = 0 (for success)
 -}
 -  PS_ICQ_GETCUSTOMSTATUSEX = '/GetXStatusEx';
 -
 -const
 -  LR_BIGICON = $40;
 -{
 -  Retrieves specified custom status icon
 -  wParam = (int)N  // custom status id (1-32), 0 = my current custom status
 -  lParam = flags   // use LR_SHARED for shared HICON, LR_BIGICON for 32x32 icon
 -  return = HICON   // custom status icon (use DestroyIcon to release resources)
 -}
 -  PS_ICQ_GETCUSTOMSTATUSICON = '/GetXStatusIcon';
 -
 -{
 -  Get Custom status DB field names & current owner custom status
 -  wParam = (AnsiChar**)szDBTitle // will receive title DB setting name (do not free)
 -  lParam = (AnsiChar**)szDBMsg   // will receive message DB setting name
 -  Return = N  // current custom status id if successful, 0 otherwise
 -}
 -  PS_ICQ_GETCUSTOMSTATUS = '/GetXStatus';
 -
 -{
 -  Request Custom status details (messages) for specified contact
 -  wParam = hContact  // request custom status details for this contact
 -  lParam = 0
 -  return = (int)dwSequence   // if successful it is sequence for ICQACKTYPE_XSTATUS_RESPONSE
 -  0 failed to request (e.g. auto-request enabled)
 -  -1 delayed (rate control) - sequence unknown
 -}
 -  PS_ICQ_REQUESTCUSTOMSTATUS = '/RequestXStatusDetails';
 -
 -{
 -  Called when contact changes custom status and extra icon is set to clist_mw
 -  wParam = hContact    // contact changing status
 -  lParam = hIcon       // HANDLE to clist extra icon set as custom status
 -}
 -  ME_ICQ_CUSTOMSTATUS_EXTRAICON_CHANGED = '/XStatusExtraIconChanged';
 -
 -{
 -  Called when a contact changes its custom status 
 -  wParam = hContact
 -  lParam = 0
 -}
 -  ME_ICQ_CUSTOMSTATUS_CHANGED = '/XStatusChanged';
 -
 -{
 -  Called from contact list in order to get index of custom status icon in list
 -  wParam = hContact
 -  lParam = 0
 -  return = (int) index of extra contact icon shifted <<16 
 -  (the low word will be normal status icon, the high will be xStatus Icon)
 -}
 -  PS_ICQ_GETADVANCEDSTATUSICON = '/GetAdvancedStatusIcon';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_ignore.inc b/plugins/Pascal_Headers/m_ignore.inc deleted file mode 100644 index 9880e9bf33..0000000000 --- a/plugins/Pascal_Headers/m_ignore.inc +++ /dev/null @@ -1,73 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_IGNORE}
 -{$DEFINE M_IGNORE}
 -
 -// this module only provides UI and storage for blocking only, protocol modules
 -//  are responsible for implementing the block
 -
 -const
 -  IGNOREEVENT_ALL           = LPARAM(-1);
 -  IGNOREEVENT_MESSAGE       = 1;
 -  IGNOREEVENT_URL           = 2;
 -  IGNOREEVENT_FILE          = 3;
 -  IGNOREEVENT_USERONLINE    = 4;
 -  IGNOREEVENT_AUTHORIZATION = 5;
 -  IGNOREEVENT_YOUWEREADDED  = 6; // 0.3.3a+
 -  IGNOREEVENT_TYPINGNOTIFY  = 7; // 0.7+
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : IGNOREEVENT_*
 -    Affects: Determines if a message type to a contact should be ignored, see notes
 -    Returns: 0 if the message type MUST be shown [non zero] if it MUST be ignored
 -    Notes  : HCONTACT can be NULL(0) to see what to do with a contact
 -             that isn't on the list (or is unknown in some way)
 -             don't use the IGNOREEVENT_ALL type!
 -    Version: v0.1.0.1+
 -  }
 -  MS_IGNORE_ISIGNORED:PAnsiChar = 'Ignore/IsIgnored';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : IGNOREEVENT_* constant
 -    Affects: Ignore future messages from a contact, see notes
 -    Returns: 0 on success, [nonzero] on failure
 -    Notes  : wParam: NULL(0) can be used to see if an unknown contact should be
 -             ignored or not - you can't SET unknown contact's ignore types, this
 -             is to stop a plugin allowing certain functions (I guess)
 -    Version: v0.1.0.1+
 -  }
 -  MS_IGNORE_IGNORE:PAnsiChar = 'Ignore/Ignore';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : IGNOREEVENT_*
 -    Affects: Receive future messages from a contact -- of the given type, see notes
 -    Returns: 0 on success, non zero on failure
 -    Notes  : Use NULL(0) for HCONTACT to retrieve the setting for an unknown contact
 -    Version: v0.1.0.1+
 -  }
 -  MS_IGNORE_UNIGNORE:PAnsiChar = 'Ignore/Unignore';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_langpack.inc b/plugins/Pascal_Headers/m_langpack.inc deleted file mode 100644 index 0db455c5b7..0000000000 --- a/plugins/Pascal_Headers/m_langpack.inc +++ /dev/null @@ -1,115 +0,0 @@ -{
 -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_LANGPACK}
 -{$DEFINE M_LANGPACK}
 -
 -const
 -
 -{
 - translates a single string into the user's local language    v0.1.1.0+
 - wParam=LANG_* flags
 - lParam=(LPARAM)(const AnsiChar*)szEnglish
 - returns a pointer to the localised string. If there is no known translation
 - it will return szEnglish. The return value does not need to be freed in any way
 - Note that the Translate() macro as defined below will crash plugins that are
 - loaded into Miranda 0.1.0.1 and earlier. If anyone's actually using one of
 - these versions, I pity them.
 -}
 -  MS_LANGPACK_TRANSLATESTRING:PAnsiChar = 'LangPack/TranslateString';
 -(*
 -{
 - translates a dialog into the user's local language    v0.1.1.0+
 - wParam=0
 - lParam=(LPARAM)(LANGPACKTRANSLATEDIALOG* )&lptd
 - returns 0 on success, nonzero on failure
 - This service only knows about the following controls:
 - Window titles, STATIC, EDIT, Hyperlink, BUTTON
 -}
 -type
 -  IntArray = array [0..1000] of integer;
 -  PLANGPACKTRANSLATEDIALOG = ^TLANGPACKTRANSLATEDIALOG;
 -  TLANGPACKTRANSLATEDIALOG = record
 -    cbSize        :int;
 -    flags         :DWORD;
 -    hwndDlg       :HWND;
 -    ignoreControls:^IntArray; // zero-terminated list of control IDs *not* to translate
 -  end;
 -
 -const
 -  LPTDF_NOIGNOREEDIT = 1; // translate all edit controls. By default
 -                          // non-read-only edit controls are not translated
 -  LPTDF_NOTITLE      = 2; //do not translate the title of the dialog
 -
 -const
 - MS_LANGPACK_TRANSLATEDIALOG:PAnsiChar = 'LangPack/TranslateDialog';
 -*)
 -{
 - translates a menu into the user's local language    v0.1.1.0+
 - wParam=(WPARAM)(HMENU)hMenu
 - lParam=0
 - returns 0 on success, nonzero on failure
 -}
 -  MS_LANGPACK_TRANSLATEMENU:PAnsiChar = 'LangPack/TranslateMenu';
 -
 -{
 - returns the codepage used in the language pack     v0.4.3.0+
 - wParam=0
 - lParam=0
 - returns the codepage stated in the langpack, or CP_ACP if no langpack is present
 -}
 -  MS_LANGPACK_GETCODEPAGE:PAnsiChar = 'LangPack/GetCodePage';
 -
 -{
 -  returns the locale id associated with the language pack    v0.4.3.0+
 -  wParam=0
 -  lParam=0
 -  returns the Windows locale id stated in the langpack, or LOCALE_USER_DEFAULT if no langpack is present
 -}
 -  MS_LANGPACK_GETLOCALE:PAnsiChar = 'LangPack/GetLocale';
 -
 -{
 -  returns the strdup/wcsdup of lparam according to the langpack  v0.4.3.0+
 -  wParam=0
 -  lParam=(LPARAM)(AnsiChar*)source string
 -  returns a string converted from AnsiChar* to TCHAR* using the langpack codepage. 
 -  This string should be freed using mir_free() then
 -}
 -  MS_LANGPACK_PCHARTOTCHAR:PAnsiChar = 'LangPack/PcharToTchar';
 -
 -{
 -  initializes the plugin-specific translation context  v0.10.0+
 -  wParam=pointer to the langpack handle
 -  lParam=PLUGININFOEX* of the caller plugin
 -  always returns 0
 -}
 -  MS_LANGPACK_REGISTER:PAnsiChar = 'LangPack/Register';
 -
 -{
 -  reloads langpack
 -  wParam=0 (ignored)
 -  lParam=(LPARAM)(TCHAR*)langpack file name or NULL to reload the current one
 -  always returns 0
 -}
 -  MS_LANGPACK_RELOAD:PAnsiChar = 'LangPack/Reload';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_message.inc b/plugins/Pascal_Headers/m_message.inc deleted file mode 100644 index 5e25657de8..0000000000 --- a/plugins/Pascal_Headers/m_message.inc +++ /dev/null @@ -1,202 +0,0 @@ -{  
 -  Miranda IM: the free IM client for Microsoft  Windows 
 -  
 -  Copyright 2000-2003 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_MESSAGE}
 -{$DEFINE M_MESSAGE}
 -const
 -  {brings up the send message dialog for a contact
 -   wParam=(WPARAM)(HANDLE)hContact
 -   lParam=(LPARAM)(AnsiChar*)szText
 -   returns 0 on success or nonzero on failure
 -   returns immediately, just after the dialog is shown
 -   szText is the text to put in the edit box of the window (but not send)
 -   szText=NULL will not use any text
 -   szText!=NULL is only supported on v0.1.2.0+
 -   NB: Current versions of the convers plugin use the name
 -   "SRMsg/LaunchMessageWindow" instead. For compatibility you should call
 -   both names and the correct one will work. }
 -   MS_MSG_SENDMESSAGE :PAnsiChar = 'SRMsg/SendCommand';
 -   MS_MSG_SENDMESSAGEW:PAnsiChar = 'SRMsg/SendCommandW';
 -
 -   ME_MSG_WINDOWEVENT:PAnsiChar = 'MessageAPI/WindowEvent';
 -
 -   MS_MSG_CONVERS:PAnsiChar = 'SRMsg/LaunchMessageWindow';
 -
 -  {wparam=0 }
 -  {lparam=(WPARAM)(MessageWindowEventData*)hWindowEvent; }
 -  {Event types }
 -  MSG_WINDOW_EVT_OPENING = 1; // window is about to be opened
 -  MSG_WINDOW_EVT_OPEN    = 2; // window has been opened
 -  MSG_WINDOW_EVT_CLOSING = 3; // window is about to be closed
 -  MSG_WINDOW_EVT_CLOSE   = 4; // window has been closed
 -  MSG_WINDOW_EVT_CUSTOM  = 5; // custom event for message plugins to use
 -                              // (custom uFlags may be used)
 -  MSG_WINDOW_UFLAG_MSG_FROM = $00000001;
 -  MSG_WINDOW_UFLAG_MSG_TO   = $00000002;
 -  MSG_WINDOW_UFLAG_MSG_BOTH = $00000004;
 -
 -type
 -  PMessageWindowEventData = ^TMessageWindowEventData;
 -  TMessageWindowEventData = record
 -    cbSize    : int;
 -    hContact  : THANDLE;
 -    hwndWindow: HWND;    // top level window for the contact
 -    szModule  : PAnsiChar;   // used to get plugin type (which means you could use
 -                         // local if needed)
 -    uType     : uint;   // see event types above
 -    uFlags    : uint;   // used to indicate message direction for all event
 -                         // types except custom
 -    local     : pointer; // used to store pointer to custom data
 -    hwndInput : HWND;    // input area window for the contact (or NULL if there is none)
 -    hwndLog   : HWND;    // log area window for the contact (or NULL if there is none)
 -  end;
 -
 -const
 -  MS_MSG_GETWINDOWAPI:PAnsiChar = 'MessageAPI/WindowAPI';
 -  { wparam=0
 -    lparam=0
 -    Returns a dword with the current message api version
 -    Current version is 0,0,0,4
 -  }
 -
 -  MS_MSG_GETWINDOWCLASS:PAnsiChar = 'MessageAPI/WindowClass';
 -  { wparam=(AnsiChar*)szBuf
 -    lparam=(int)cbSize size of buffer
 -    Sets the window class name in wParam (ex. "SRMM" for srmm.dll)
 -  }
 -
 -type
 -  PMessageWindowInputData = ^TMessageWindowInputData;
 -  TMessageWindowInputData = record
 -    cbSize  : int;
 -    hContact: THANDLE;
 -    uFlags  : int; // see uflags above
 -  end;
 -
 -const
 -  MSG_WINDOW_STATE_EXISTS  = $00000001; // Window exists should always be true
 -                                        // if hwndWindow exists
 -  MSG_WINDOW_STATE_VISIBLE = $00000002;
 -  MSG_WINDOW_STATE_FOCUS   = $00000004;
 -  MSG_WINDOW_STATE_ICONIC  = $00000008;
 -
 -type
 -  PMessageWindowOutputData = ^TMessageWindowOutputData;
 -  TMessageWindowOutputData = record
 -    cbSize    : int;
 -    hContact  : THANDLE;
 -    uFlags    : int;     // should be same as input data unless 0, then it
 -                         // will be the actual type
 -    hwndWindow: HWND;    // top level window for the contact or NULL if no window exists
 -    uState    : int;     // see window states
 -    local     : pointer; // used to store pointer to custom data
 -  end;
 -  PMessageWindowData = PMessageWindowOutputData;
 -  TMessageWindowData = TMessageWindowOutputData;
 -
 -const
 -  MS_MSG_GETWINDOWDATA:PAnsiChar = 'MessageAPI/GetWindowData';
 -{ wparam=(MessageWindowInputData*)
 -  lparam=(MessageWindowOutputData*)
 -  returns 0 on success and returns non-zero (1) on error or if no window data
 -  exists for that hcontact
 -}
 -
 -  ME_MSG_WINDOWPOPUP:PAnsiChar = 'MessageAPI/WindowPopupRequested';
 -{ wParam = 0
 - lParam = (MessageWindowPopupData *)&MessageWindowPopupData;
 - Fired to allow plugins to add itens to the msg window popup menu
 - Always fired twice: once with MSG_WINDOWPOPUP_SHOWING and once with MSG_WINDOWPOPUP_SELECTED.
 - This is done to allow cleaning of resources.
 -}
 -  MSG_WINDOWPOPUP_SHOWING  = 1;
 -  MSG_WINDOWPOPUP_SELECTED = 2;
 -
 -  MSG_WINDOWPOPUP_INPUT = 1;
 -  MSG_WINDOWPOPUP_LOG   = 2;
 -
 -type
 -  MessageWindowPopupData = record
 -    cbSize   :int;
 -    uType    :uint;    // see popup types above
 -    uFlags   :uint;    // used to indicate in which window the popup was requested
 -    hContact :THANDLE;
 -    hwnd     :HWND;    // window where the popup was requested
 -    hMenu    :HMENU;   // The handle to the menu
 -    pt       :TPOINT;  // The point, in screen coords
 -    selection:int;     // The menu control id or 0 if no one was selected
 -  end;
 -
 -// status icons - HICONs will be automatically destroyed when removed or when miranda exits
 -const
 -  MBF_DISABLED = 1;
 -  MBF_HIDDEN   = 2;
 -
 -type
 -  StatusIconData = record
 -    cbSize       :int;
 -    szModule     :PAnsiChar; // used in combo with the dwId below to create a unique identifier
 -    dwId         :DWORD;
 -    hIcon,
 -    hIconDisabled:HICON;     // hIconDisabled is optional - if null, will use hIcon in the disabled state
 -    flags        :int;       // one of MBF_* above
 -    szTooltip    :PAnsiChar;
 -  end;
 -
 -const
 -  MBCF_RIGHTBUTTON = 1; // if this flag is specified, the click was a right button -
 -                        // otherwize it was a left click
 -
 -type
 -  StatusIconClickData = record
 -    cbSize       :int;
 -    clickLocation:TPOINT;    // click location, in screen coordinates
 -    szModule     :PAnsiChar;
 -    dwId         :DWORD;
 -    flags        :int;       // one of MBCF_* above
 -  end;
 -
 -const
 -  MS_MSG_ADDICON:PAnsiChar = 'MessageAPI/AddIcon';
 -// lParam = (StatusIconData *)&StatusIconData
 -
 -  MS_MSG_REMOVEICON:PAnsiChar = 'MessageAPI/RemoveIcon';
 -{
 - lParam = (StatusIconData *)&StatusIconData
 - only szModule and szId are used
 -}
 -
 -  MS_MSG_MODIFYICON:PAnsiChar = 'MessageAPI/ModifyIcon';
 -{
 - wParam = (HANDLE)hContact
 - lParam = (StatusIconData *)&StatusIconData
 - if hContact is null, icon is modified for all contacts
 - otherwise, only the flags field is valid
 - if either hIcon, hIconDisabled or szTooltip is null, they will not be modified
 -}
 -
 -  ME_MSG_ICONPRESSED:PAnsiChar = 'MessageAPI/IconPressed';
 -{
 - wParam = (HANDLE)hContact;
 - lParam = (StatusIconClickData *)&StatusIconClickData;
 - catch to show a popup menu, etc.
 -}
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_netlib.inc b/plugins/Pascal_Headers/m_netlib.inc deleted file mode 100644 index 1d6615ec7c..0000000000 --- a/plugins/Pascal_Headers/m_netlib.inc +++ /dev/null @@ -1,916 +0,0 @@ -{$IFNDEF M_NETLIB}
 -{$DEFINE M_NETLIB}
 -
 -{>>/
 -
 -    NetLib :
 -
 -    Instead of you writing all the code for working with sockets and supporting
 -    app level protocols such as SOCKS5, it's all done for you.
 -
 -    NetLib takes care of all that and you can even register a special abstract
 -    nexus, e.g. ICQ direct, the user can configure all this from the options dialog
 -    and you don't have to bother with any of it.
 -
 -    NetLib wraps up any Winsock calls but you can still get the socket handle
 -    from your netlib handle and do stuff.
 -
 -    It gives all modules an abstract way of dealing with transport -- mainly sockets
 -    and proxies, Now the but..
 -
 -    It's new (mmmm) thus unsupported by any older version of Miranda, and if you
 -    want to be lazy and not write any "wrapper" mini netlib then you'll have
 -    the kudos of "only works with nightly build version of Miranda" :)
 -
 -/<<}
 -
 -const
 -  // for TNETLIBUSER.flags
 -  NUF_INCOMING      = $01; // bind incoming ports
 -  NUF_OUTGOING      = $02; // makes outgoing plain connections
 -  NUF_HTTPGATEWAY   = $04; // can use HTTP gateway for plain sockets.
 -                           // ???HttpGateway* are valid, enables the HTTP
 -                           // proxy option, displayed in options
 -  NUF_NOOPTIONS     = $08; // don't show this as an entry for custom settings to
 -                           // be defined for, TNETLIB.szDescriptiveName is ignored
 -  NUF_HTTPCONNS     = $10; // some connections are made for HTTP communication,
 -                           // enables the HTTP proxy option, displayed in options
 -  NUF_NOHTTPSOPTION = $20; // Disables the HTTPS proxy option in options, Use
 -                           // this if all communication is HTTP
 -  NUF_UNICODE       = $40; // if set ptszDescriptiveName points to Unicode, otherwise ANSI
 -
 -  // for TNETLIBUSERSETTINGS.proxyType
 -
 -  { SOCKS4 -- No DNS or multi addressing mode (proxy side) -- optional username can
 -  be given, no password }
 -  PROXYTYPE_SOCKS4 = 1;
 -  { SOCKS5 -- DNS names can be given as addresses to connect to, optional
 -  plain text username/password scheme (which may cause failure due to denied access)
 -  IP address maybe returned for DNS addresses -- thus server side DNS }
 -  PROXYTYPE_SOCKS5 = 2;
 -  PROXYTYPE_HTTP   = 3;
 -  PROXYTYPE_HTTPS  = 4;
 -  PROXYTYPE_IE     = 5;
 -
 -  // for TNETLIBOPENCONNECTION.flags
 -
 -  { this connection will be useed for HTTP communications,
 -  if configured for an HTTP(S) proxy the connection is opened as if there
 -  was no proxy }
 -  NLOCF_HTTP          = $0001;
 -  { this connection should send the sticky headers associated with NetLib
 -   user apart of any HTTP request}
 -  NLOCF_STICKYHEADERS = $0002;
 -  { this connection understands the newer structure, newer cbSize isnt enough}
 -  NLOCF_V2            = $0004;
 -  NLOCF_UDP           = $0008; // this connection is UDP
 -  NLOCF_SSL           = $0010; // this connection is SSL
 -  NLOCF_HTTPGATEWAY   = $0020; // this connection is HTTP Gateway
 -
 -  // for TNETLIBHTTPPROXYINFO.flags
 -
 -  NLHPIF_USEGETSEQUENCE      = $0001; // append sequence numbers to GET requests
 -  NLHPIF_USEPOSTSEQUENCE     = $0002; // append sequence numbers to POST requests
 -  NLHPIF_GETPOSTSAMESEQUENCE = $0004; // GET and POST use the same sequence
 -  NLHPIF_HTTP11              = $0008;  // HTTP 1.1 proxy
 -
 -  // for TNETLIBHTTPREQUEST.flags, .requestType
 -
 -  { used by MS_NETLIB_RECVHTTPHEADERS returned structure }
 -
 -  REQUEST_RESPONSE = 0;
 -  REQUEST_GET      = 1;
 -  REQUEST_POST     = 2;
 -  REQUEST_CONNECT  = 3;
 -  REQUEST_HEAD     = 4; // new in 0.5.1
 -  REQUEST_PUT      = 5;
 -  REQUEST_DELETE   = 6;
 -
 -  NLHRF_GENERATEHOST    = $00000001; // auto generate a 'host' header from .szUrl
 -  NLHRF_REMOVEHOST      = $00000002; // remove any host and/or protocol portion
 -                                     // of szUrl before sending it
 -  NLHRF_SMARTREMOVEHOST = $00000004; // removes host and/or protocol from szUrl
 -                                     // unless the connection was opened through
 -                                     // an HTTP or HTTPS proxy.
 -  NLHRF_SMARTAUTHHEADER = $00000008; // if the connection was opened through an
 -                                     // HTTP or HTTPS proxy then send a
 -                                     // Proxy-Authorization header if required.
 -  NLHRF_HTTP11          = $00000010; // use HTTP 1.1
 -  NLHRF_PERSISTENT      = $00000020; // preserve connection on exit, open connection provided
 -                                     // in the nlc field of the reply it should be supplied in
 -                                     // nlc field of request for reuse or closed if not needed
 -  NLHRF_SSL             = $00000040; // use ssl connection
 -  NLHRF_NOPROXY         = $00000080; // do not use proxy server
 -  NLHRF_REDIRECT        = $00000100; // handle HTTP redirect requests (response 30x), the
 -                                     // resulting url provided in szUrl of the response
 -  NLHRF_NODUMP          = $00010000; // never dump this to the log
 -  NLHRF_NODUMPHEADERS   = $00020000; // don't dump http headers (only useful for
 -                                     // POSTs and MS_NETLIB_HTTPTRANSACTION
 -  NLHRF_DUMPPROXY       = $00040000; // this transaction is a proxy communication.
 -                                     // For dump filtering only.
 -  NLHRF_DUMPASTEXT      = $00080000; // dump posted and reply data as text.
 -                                     // Headers are always dumped as text.
 -  NLHRF_NODUMPSEND      = $00100000; // do not dump sent message.
 -
 -  // for TNETLIBBUFFER.flags
 -
 -  MSG_NOHTTPGATEWAYWRAP = $010000; // don't wrap outgoing packet using
 -                                   // TNETLIBUSER.pfnHttpGatewayWrapSend
 -  MSG_NODUMP            = $020000; // don't dump this packet to the log
 -  MSG_DUMPPROXY         = $040000; // this is proxy communication, for dump
 -                                   // filtering only
 -  MSG_DUMPASTEXT        = $080000; // don't dump as hex, it's text
 -  MSG_RAW               = $100000; // send as raw, bybpass HTTP proxy stuff
 -  MSG_DUMPSSL           = $200000; // this is SSL traffic. For dump filtering only.
 -
 -
 -// all record types structures are declared in their own block because the C
 -// header file used forward declaration (to get typed parameters for certain
 -// function pointers). This sort of define-type-pointer-before-type can only be
 -// done in the same type block in D2 (don't know about later versions)
 -
 -  FD_SETSIZE = 65;
 -
 -type
 -  twaitcallback = function(timeout:dword):integer; cdecl;
 -
 -  PNETLIBOPENCONNECTION = ^TNETLIBOPENCONNECTION;
 -  TNETLIBOPENCONNECTION = record
 -    cbSize : int;
 -    szHost : PAnsiChar; // can be an IP in string form
 -    wPort  : Word;
 -    flags  : DWORD; // see NLOCF_* flags
 -    timeout: uint;
 -    // optional, called in the context of the thread that issued the attempt,
 -    // if it returns 0 the connection attempt is stopped, the remaining
 -    // timeout value can also be adjusted
 -    waitcallback:twaitcallback;
 -  end;
 -
 -const
 -  {$IFNDEF WIN64}
 -  NETLIBOPENCONNECTION_V1_SIZE = 16;
 -  {$ELSE}
 -  NETLIBOPENCONNECTION_V1_SIZE = SIZEOF(TNETLIBOPENCONNECTION);
 -  {$ENDIF}
 -  // old sizeof() is 14 bytes, but there is padding of 2 bytes
 -
 -type
 -  PNETLIBHTTPHEADER = ^TNETLIBHTTPHEADER;
 -  TNETLIBHTTPHEADER = record
 -    szName : PAnsiChar;
 -    szValue: PAnsiChar;
 -  end;
 -  ANETLIBHTTPHEADER = array [0..1000] of TNETLIBHTTPHEADER;
 -
 -  PNETLIBHTTPREQUEST    = ^TNETLIBHTTPREQUEST;
 -
 -  TNETLIBHTTPREQUEST = record
 -    cbSize       :int;
 -    requestType  :int;                // REQUEST_* constant
 -    flags        :DWORD;
 -    szUrl        :PAnsiChar;
 -    { doesn't contain Content-Length, it'll be added automatically }
 -    headers      :^ANETLIBHTTPHEADER; // pointer to an array of em?
 -    headersCount :int;                // yes they do
 -    pData        :PAnsiChar;          // data to be sent on POST request
 -    dataLength   :int;                // must be 0 for REQUEST_GET/REQUEST_CONNECT
 -    resultCode   :int;
 -    szResultDescr:PAnsiChar;
 -    nlc          :THANDLE;
 -    timeout      :int;                // Mirver 9.0+
 -  end;
 -
 -const
 -  {$IFNDEF WIN64}
 -  NETLIBHTTPREQUEST_V1_SIZE = 44;
 -  {$ELSE}
 -  NETLIBHTTPREQUEST_V1_SIZE = SIZEOF(TNETLIBHTTPREQUEST);
 -  {$ENDIF}
 -
 -type
 -  { This function pointer is to the CRT realloc() used by Miranda -- it allows reallocation of memory passed
 -  to us (not that we could EVER share the same CRT) but to allow DLLs in general to reallocate memory }
 -  TNetlibRealloc = function(Mem: Pointer; size_t: int): Pointer; cdecl;
 -  TNetlibHTTPGatewayInitProc  = function(hConn: THandle; nloc: PNETLIBOPENCONNECTION; nlhr: PNETLIBHTTPREQUEST): int; cdecl;
 -  TNetlibHTTPGatewayBeginProc = function(hConn: THandle; nloc: PNETLIBOPENCONNECTION): int; cdecl;
 -  TNetlibHTTPGatewayWrapSendProc = function(hConn: THandle; buf: PByte; len: int; flags: int; pfnNetLibSend: TMIRANDASERVICE): int; cdecl;
 -  TNetlibHTTPGatewayUnwrapRecvProc = function(nlhr: PNETLIBHTTPREQUEST; buf: PByte; len: int; outBufLen: pInt; NetlibRealloc: TNetlibRealloc): PByte; cdecl;
 -
 -  PNETLIBUSER = ^TNETLIBUSER;
 -  TNETLIBUSER = record
 -    cbSize: int;
 -    szSettingsModule: PAnsiChar;  // used for DB settings and log, 'NL' stuff
 -    szDescriptiveName: TChar; // shows a descriptive name for which different proxy settings can be defined
 -    flags: DWORD;             // see NUF_* constants above
 -    szHttpGatewayHello    :PAnsiChar;
 -    szHttpGatewayUserAgent:PAnsiChar; // can be NULL(0) to send no User-Agent: also used by HTTPS proxies
 -    pfnHttpGatewayInit      :TNetlibHTTPGatewayInitProc;
 -    pfnHttpGatewayBegin     :TNetlibHTTPGatewayBeginProc; // can be NULL(0) if no begin is required
 -    pfnHttpGatewayWrapSend  :TNetlibHTTPGatewayWrapSendProc; // can be NULL(0) if no wrapping is required
 -    pfnHttpGatewayUnwrapRecv:TNetlibHTTPGatewayUnwrapRecvProc; // can be NULL(0) "      "
 -    minIncomingPorts: int; // only if NUF_INCOMING, will be used for validation of user input
 -  end;
 -
 -  PNETLIBUSERSETTINGS = ^TNETLIBUSERSETTINGS;
 -  TNETLIBUSERSETTINGS = record
 -    cbSize              :int;   // filled before calling
 -    useProxy            :int;   // 1 or 0
 -    proxyType           :int;   // PROXYTYPE_* constant, see above
 -    szProxyServer       :PAnsiChar; // can be NULL(0)
 -    wProxyPort          :int;   // in host byte order
 -    useProxyAuth        :int;   // 1 or 0, always 0 for SOCKS4 (doesn't have auth)
 -    szProxyAuthUser     :PAnsiChar; // can be NULL(0), always used by SOCKS4
 -    szProxyAuthPassword :PAnsiChar; // can be NULL(0)
 -    useProxyAuthNtlm    :int;   // 1 or 0, only used by HTTP, HTTPS
 -    dnsThroughProxy     :int;   // 1 or 0
 -    specifyIncomingPorts:int;   // 1 or 0
 -    szIncomingPorts     :PAnsiChar; // can be NULL(0), form '1024-1050,1060-1070,2000'
 -    specifyOutgoingPorts:int;   // 0.3.3a+
 -    szOutgoingPorts     :PAnsiChar; // 0.3.3a+
 -    enableUPnP          :int;   // 0.6.1+ only for NUF_INCOMING
 -    validateSSL         :int;
 -  end;
 -
 -  TNetlibNewConnectionProc    = procedure(hNewConnection:THandle; dwRemoveIP:DWORD); cdecl;
 -  TNetlibNewConnectionProc_V2 = procedure(hNewConnection:THandle; dwRemoveIP:DWORD; pExtra:pointer); cdecl;
 -
 -  PNETLIBBINDOLD = ^TNETLIBBINDOLD;
 -  TNETLIBBINDOLD = record
 -    cbSize: int;
 -    pfnNewConnection:TNetlibNewConnectionProc; // function to call when there's
 -                                               // a new connection, dwRemoteIP is
 -                                               // in host byte order -- the handle
 -                                               // is to the new connection
 -    dwInternalIP: DWORD;                       // set on return, host byte order
 -    wPort: WORD;                               // set on return, host byte order
 -  end;
 -
 -  PNETLIBBIND = ^TNETLIBBIND;
 -  TNETLIBBIND = record
 -    cbSize:int;
 -    // new code should use V2
 -    pfnNewConnection:TNETLIBNEWCONNECTIONPROC;
 -    // or pfnNewConnectionV2:NETLIBNEWCONNECTIONPROC_V2;
 -    //function to call when there's a new connection. Params are: the
 -    //new connection, IP of remote machine (host byte order)
 -    dwInternalIP:DWORD;    //set on return, host byte order
 -    wPort       :WORD;     //set on return, host byte order
 -    pExtra      :^pointer; //argument is sent to callback, added during 0.3.4+
 -    dwExternalIP:DWORD;    //set on return, host byte order
 -    wExPort     :word;     //set on return, host byte order
 -  end;
 -
 -const
 -  {$IFNDEF WIN64}
 -  NETLIBBIND_SIZEOF_V1 = 16; // sizeof(NETLIBBIND) prior to 0.3.4+ (2004/08/05)
 -  NETLIBBIND_SIZEOF_V2 = 20; // sizeof(NETLIBBIND) prior to 0.6+ (2006/07/03)
 -  {$ELSE}
 -  NETLIBBIND_SIZEOF_V1 = SizeOF(TNETLIBBIND);
 -  NETLIBBIND_SIZEOF_V2 = SizeOF(TNETLIBBIND);
 -  {$ENDIF}
 -
 -type
 -  PNETLIBHTTPPROXYINFO = ^TNETLIBHTTPPROXYINFO;
 -  TNETLIBHTTPPROXYINFO = record
 -    cbSize           : int;
 -    flags            : DWORD; // see NLHPIF_* above
 -    szHttpPostUrl    : PAnsiChar;
 -    szHttpGetUrl     : PAnsiChar;
 -    firstGetSequence : int;
 -    firstPostSequence: int;
 -    combinePackets   : int; // MIRANDA_VER >= 0x0900
 -  end;
 -
 -  PNETLIBBASE64 = ^TNETLIBBASE64;
 -  TNETLIBBASE64 = record
 -    pszEncoded: PAnsiChar;
 -    cchEncoded: int;
 -    pbDecoded : PByte;
 -    cbDecoded : int;
 -  end;
 -
 -type
 -  PNETLIBBUFFER = ^TNETLIBBUFFER;
 -  TNETLIBBUFFER = record
 -    buf  : PAnsiChar;
 -    len  : int;
 -    flags: int; // see MSG_* constants above
 -  end;
 -
 -  PNETLIBSELECT = ^TNETLIBSELECT;
 -  TNETLIBSELECT = record
 -    cbSize      : int;
 -    dwTimeout   : DWORD; // in milliseconds, INFINITE is acceptable
 -    hReadConns  : array [0..FD_SETSIZE] of THandle;
 -    hWriteConns : array [0..FD_SETSIZE] of THandle;
 -    hExceptConns: array [0..FD_SETSIZE] of THandle;
 -  end;
 -
 -  PNETLIBSELECTEX = ^TNETLIBSELECTEX;
 -  TNETLIBSELECTEX = record
 -    cbSize      : int;
 -    dwTimeout   : DWORD; // in milliseconds, INFINITE is acceptable
 -    hReadConns  : array [0..FD_SETSIZE] of THandle;
 -    hWriteConns : array [0..FD_SETSIZE] of THandle;
 -    hExceptConns: array [0..FD_SETSIZE] of THandle;
 -    // Added in v0.3.3+
 -    hReadStatus  : array [0..FD_SETSIZE] of BOOL; // out, [in, expected to be FALSE]
 -    hWriteStatus : array [0..FD_SETSIZE] of BOOL; // out, [in, expected to be FALSE]
 -    hExceptStatus: array [0..FD_SETSIZE] of BOOL; // out, [in, expected to be FALSE]
 -  end;
 -
 -  PNETLIBPACKETRECVER = ^TNETLIBPACKETRECVER;
 -  TNETLIBPACKETRECVER = record
 -    cbSize        : int;
 -    dwTimeout     : DWORD; // infinite is allowed -- initialise before use
 -    bytesUsed     : int;   // this many bytes are removed from the start of the
 -                           // buffer, set to 0 on return -- initialise before use
 -    bytesAvailable: int;   // equal the returnd value by service, unless the
 -                           // return value is 0 (connection closed)
 -    bufferSize    : int;   // same as the parameter given to
 -                           // MS_NETLIB_CREATEPACKETRECVER: wParam
 -    buffer        : PByte; // contains the read data
 -  end;
 -
 -const
 -  {
 -    wParam : 0
 -    lParam : Pointer to an initalised TNETLIBUSER structure
 -    Affects: Initialises the netlib for a set of connections, see notes
 -    Returns: Returns a handle for future netlib calls, NULL on failure.
 -    Notes  : Netlib is loaded AFTER all plugins, thus a call to this service
 -             in Load() will fail, hook ME_SYSTEM_MODULESLOADED and call it
 -             from there.
 -             -
 -             Netlib will save settings under .szSettings module, all settings
 -             (being?) begin with 'NL'.
 -             -
 -             Defacto settings are the same as <All connections> combobox entry option
 -             as seen in Miranda->Options->Network
 -    Version: v0.1.2.2+
 -    Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY, ERROR_DUP_NAME
 -  }
 -  MS_NETLIB_REGISTERUSER:PAnsiChar = 'Netlib/RegisterUser';
 -
 -{
 -  Assign a Netlib user handle a set of dynamic HTTP headers to be used with all
 -
 -  HTTP connections that enable the HTTP-use-sticky headers flag. 
 -  The headers persist until cleared with lParam=NULL.
 -
 -  All memory should be allocated by the caller using malloc() from MS_SYSTEM_GET_MMI
 -  Once it has passed to Netlib, Netlib is the owner of it, the caller should not refer to the memory
 -  In any way after this point.
 -
 -  wParam=(WPARAM)hNetLibUser
 -  lParam=(LPARAM)(AnsiChar*)szHeaders
 -
 -  NOTE: The szHeaders parameter should be a NULL terminated string following the HTTP header syntax.
 -  This string will be injected verbatim, thus the user should be aware of setting strings that are not
 -  headers. This service is NOT THREAD SAFE, only a single thread is expected to set the headers and a single
 -  thread reading the pointer internally, stopping race conditions and mutual exclusion don't happen.
 -
 -  Version 0.3.2a+ (2003/10/27)
 -}
 -  MS_NETLIB_SETSTICKYHEADERS:PAnsiChar = 'Netlib/SetStickyHeaders';
 -
 -  {
 -    wParam : HANDLE
 -    lParam : Pointer to a initalised TNETLIBUSERSETTINGS structure
 -    Affects: Gets the user configured settings for a Netlib user, see notes
 -    Returns: [non zero] on SUCCESS, NULL(0) on failure
 -    Notes  : .cbSize must be filled with sizeof() before calling --
 -             the returned null terminated strings (in the structure) are valid
 -             as long as HANDLE remains open or proxy options are changed
 -             again, do not rely on them being around forever.
 -    Version: v0.1.2.2+
 -    Errors : ERROR_INVALID_PARAMETER
 -  }
 -  MS_NETLIB_GETUSERSETTINGS:PAnsiChar = 'Netlib/GetUserSettings';
 -
 -  {
 -    wParam : HANDLE
 -    lParam : Pointer to a initalised NETLIBUSERSETTINGS structure
 -    Affect : Changes the configurable settings for a Netlib user -- see notes
 -    Returns: [non zero] on success, NULL(0) on failure
 -    Notes  : This service is only really useful for people that specify NUF_NOOPTIONS
 -             when registering and want to create their own options.
 -             Settings will be stored even if the option to enable it, is it not enabled,
 -             e.g. useProxyAuth is 0, szProxyAuthPassword will still be saved
 -    Errors : ERROR_INVALID_PARAMETER
 -  }
 -  MS_NETLIB_SETUSERSETTINGS:PAnsiChar = 'Netlib/SetUserSettings';
 -
 -  {
 -    wParam : HANDLE / SOCKET
 -    lParam : 0
 -    Affects: Closes a handle, see notes
 -    Returns: Returns [non zero] on success, NULL(0) on failure
 -    Notes  : All netlib handles should be closed once they're finished with,
 -             If a SOCKET type is passed instead of netlib handle type, it is closed
 -    Errors : ERROR_INVALID_PARAMETER
 -  }
 -  MS_NETLIB_CLOSEHANDLE:PAnsiChar = 'Netlib/CloseHandle';
 -
 -  {
 -    wParam : HANDLE
 -    lParam : Pointer to a initialised TNETLIBBIND
 -    Affects: Open a port and wait for connections on it -- see notes
 -    Returns: Returns a handle on success, NULL(0) on failure
 -    Notes  : this function does the equivalent of socket(), bind(), getsockname(),
 -             listen(), accept() -- internally this function creates a new thread
 -             which waits around in accept() for new connections.
 -             When one is received, TNETLIBBIND.pfnNewConnection is called,
 -             from the context of the NEW thread and then it
 -             returns to waiting for connections.
 -             -
 -             Close the returned handle to end the thread and close the port.
 -             -
 -    Errors : ERROR_INVALID_PARAMETER, any returned by socket(), bind(), listen()
 -             getsockname()
 -  }
 -  MS_NETLIB_BINDPORT:PAnsiChar = 'Netlib/BindPort';
 -
 -  {
 -    wParam : HANDLE
 -    lParam : Pointer to an initalised TNETLIBOPENCONNECTION structure
 -    Affects: Opens a connection -- see notes
 -    Returns: Returns a Handle to a new connection on success, NULL(0) on failure
 -    Notes  : internally this service is the equivalent of socket(), gethostbyname(),
 -             connect()
 -             -
 -             If NLOCF_HTTP is set and HANDLE is configured for HTTP(S) proxy
 -             then this function will connect() to that proxy server ONLY,
 -             without performing any initialisation conversation.
 -             -
 -             If HANDLE is configured for an HTTP proxy and does not support
 -             HTTP gateways and you try to open a connection without NLOCF_HTTP
 -             then this service will first attempt to open an HTTPS connection,
 -             if that fails, it will try a direct connection, if *that* fails
 -             then it will return failure with the error
 -             from connect() during the connection attempt
 -    Errors : ERROR_INVALID_PARAMETER, any returned by socket(), gethostbyname(),
 -             connect(), MS_NETLIB_SEND, MS_NETLIB_RECV, select()
 -             -
 -             ERROR_TIMEOUT (during proxy communication)
 -             ERROR_BAD_FORMAT (very invalid proxy reply)
 -             ERROR_ACCESS_DENIED (by proxy)
 -             ERROR_CONNECTION_UNAVAIL (socks proxy can't connect to identd)
 -             ERROR_INVALID_ACCESS (proxy refused identd auth)
 -             ERROR_INVALID_DATA (proxy returned invalid code)
 -             ERROR_INVALID_ID_AUTHORITY (proxy requires use of auth method that's not supported)
 -             ERROR_GEN_FAILURE (socks5/https general failure)
 -             ERROR_CALL_NOT_IMPLEMENTED (socks5 command not supported)
 -             ERROR_INVALID_ADDRESS (socks5 address type not supported)
 -             -
 -             HTTP: anything from TNETLIBUSER.pfnHttpGatewayInit, TNETLIBUSER.pfnHttpGatewayBegin,
 -                   MS_NETLIB_SENDHTTPREQUEST or MS_NETLIB_RECVHTTPHEADERS
 -  }
 -  MS_NETLIB_OPENCONNECTION:PAnsiChar = 'Netlib/OpenConnection';
 -
 -  {
 -    wParam : HANDLE
 -    lParam : Pointer to an initialised NETLIBHTTPPROXYINFO structure
 -    Affects: Sets the required information for an HTTP proxy connection -- see notes
 -    Returns: [non zero] on success, NULL(0) on failure
 -    Notes  : This service is designed to be called from
 -             within TNETLIBUSER.pfnHttpGatewayInit (see notes in C header under
 -             MS_NETLIB_REGISTERUSER)
 -    Errors : ERROR_INVALID_PARAMETER
 -  }
 -  MS_NETLIB_SETHTTPPROXYINFO:PAnsiChar = 'Netlib/SetHttpProxyInfo';
 -
 -  {
 -    wParam : HANDLE
 -    lParam : 0
 -    Affects: Get's the SOCKET associated with a handle -- see notes
 -    Returns: the SOCKET on success, INVALID_SOCKET on failure
 -    Notes  : The Netlib handle passed to this service should only be passed
 -             if they were returned with MS_NETLIB_OPENCONNECTION or MS_NETLIB_BINDPORT
 -             -
 -             Be careful how you use this socket because you might be connected via an
 -             HTTP proxy, in which case calling send/recv() will break things
 -             -
 -    Errors : ERROR_INVALID_PARAMETER
 -  }
 -  MS_NETLIB_GETSOCKET:PAnsiChar = 'Netlib/GetSocket';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to a null terminated string
 -    Affects: URL-encodes a string for x-www-form-urlencoded (and other uses) -- see notes
 -    Returns: A pointer to a null terminated string, NULL(0) on failure
 -    Notes  : The returned string must be freed after it's no longer needed,
 -             to do this Miranda's process heap must be used (under the WINAPI), e.g.
 -             HeapFree(GetProcessHeap(), 0, the_returned_string)
 -    Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
 -  }
 -  MS_NETLIB_URLENCODE:PAnsiChar = 'Netlib/UrlEncode';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to a TNETLIBBASE64 initialised structure
 -    Affects: Decodes a Base64 null terminated string, see notes
 -    Returns: [non zero] on success, NULL(0) on failure
 -    Notes  : TNETLIBBASE64.pszEncoded and cchEncoded must contain a pointer to
 -             a buffer to use as input, and it's length, the length
 -             should not include space taken for null termination --
 -             -
 -             Output is placed in ..pbDecoded and ..cbDecoded for buffer and
 -             length of buffer -- the maxiumum output for a given input can
 -             be worked out with Netlib_GetBase64DecodedBufferSize() function
 -             see below.
 -             -
 -             For more information on Base64 see rfc-1421.
 -    Errors : ERROR_INVALID_PARAMETER, ERROR_INVALID_DATA, ERROR_BUFFER_OVERFLOW
 -  }
 -  MS_NETLIB_BASE64DECODE:PAnsiChar = 'Netlib/Base64Decode';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to an initialised TNETLIBBASE64 structure
 -    Affect : Base64 encode a string, see notes
 -    Returns: [non zero] on success, NULL(0) on failure
 -    Notes  : TNETLIBBASE64.pbDecode and TNETLIBBASE64.cbDecoded contain
 -             the input buffer and it's length --
 -             TNETLIBBASE64.pszEncoded and TNETLIBBASE64.cchEncoded contain the
 -             buffer in which to put the output and it's length.
 -             -
 -             The maximum output size for a given input can be worked
 -             out with the function Netlib_GetBase64EncodedBufferSize() below
 -             .pszEncoded is null terminated, on return TNETLIBBASE64.cchEncoded
 -             is set to the actual length excluding 0.
 -    Errors : ERROR_INVALID_PARAMETER, ERROR_BUFFER_OVERFLOW
 -  }
 -  MS_NETLIB_BASE64ENCODE:PAnsiChar = 'Netlib/Base64Encode';
 -
 -{
 -  Converts string representation of IP and port into numerical SOCKADDR_INET
 -  IPv4 could supplied in formats address:port or address
 -  IPv6 could supplied in formats [address]:port or [address]
 -  wParam=(WPARAM)(char*) string to convert
 -  lParam=(LPARAM)(SOCKADDR_INET*) numeric IP address structure
 -  Returns 0 on success
 -}
 -  MS_NETLIB_STARINGTOADDRESS:PAnsiChar = 'Netlib/StringToAddress';
 -
 -{
 -  Converts numerical representation of IP in SOCKADDR_INET into string representation with IP and port 
 -  IPv4 will be supplied in formats address:port or address
 -  IPv6 will be supplied in formats [address]:port or [address]
 -  wParam=(WPARAM)(int) 0 - lParam - (SOCKADDR_INET*); 1 - lParam - (unsigned) in host byte order
 -  lParam=(LPARAM)(SOCKADDR_INET*) or (unsigned) numeric IP address structure
 -  Returns pointer to the string or NULL if not successful 
 -}
 -  MS_NETLIB_ADDRESSTOSTRING:PAnsiChar = 'Netlib/AddressToString';
 -
 -type
 -  TNETLIBCONNINFO = record
 -	  cbSize:int;
 -	  szIpPort:array [0..63] of AnsiChar;
 -	  dwIpv4:uint;
 -	  wPort:word;
 -  end;
 -
 -const
 -{
 -  Get connection Information
 -  IPv4 will be supplied in formats address:port or address
 -  IPv6 will be supplied in formats [address]:port or [address]
 -  wParam=(WPARAM)(HANDLE)hConnection
 -  lParam=(LPARAM)(NETLIBCONNINFO*) pointer to the connection information structure to fill
 -  Returns 0 if successful  
 -}
 -  MS_NETLIB_GETCONNECTIONINFO:PAnsiChar = 'Netlib/GetConnectionInfo';
 -
 -type
 -  TNETLIBIPLIST = record
 -	  cbNum:uint;
 -	  szIp:array[0..0,0..63] of AnsiChar;
 -  end;
 -
 -const
 -{
 -  Get connection Information
 -  wParam=(WPARAM)IP filter 1 - return global only IPv6 address, 0 all IPs
 -  Returns (INT_PTR)(NETLIBIPLIST*) numeric IP address address array 
 -  the last element of the array is all 0s, 0 if not successful
 -}
 -  MS_NETLIB_GETMYIP:PAnsiChar = 'Netlib/GetMyIP';
 -
 -  {
 -    wParam : HANDLE
 -    lParam : Pointer to a initialised TNETLIBHTTPREQUEST structure
 -    Affect : Send an HTTP request over a connection, see notes
 -    Returns: The number of bytes on success, SOCKET_ERROR on failure
 -    Notes  : HANDLE must of been returned by MS_NETLIB_OPENCONNECTION,,
 -             If you use NLHRF_SMARTAUTHHEADER and NTLM auth is in use then
 -             full NTLM auth transcation occurs, comprising sending the
 -             domain, getting the challenge, sending the response.
 -             NETLIBHTTPREQUEST.resultCode and NETLIBHTTPREQUEST.szResultDescr are
 -             ignored by this service.
 -    Errors : ERROR_INVALID_PARAMETER, MS_NETLIB_SEND (return codes)
 -  }
 -  MS_NETLIB_SENDHTTPREQUEST:PAnsiChar = 'Netlib/SendHttpRequest';
 -
 -  {
 -    wParam : HANDLE
 -    lParam : 0
 -    Affect : Receive HTTP headers, see notes
 -    Returns: A pointer to a TNETLIBHTTPREQUEST structure on success, NULL(0) on failure
 -    Notes  : The returned pointer must be freed after it's done with
 -             use MS_NETLIB_FREEHTTPREQUESTSTRUCT.
 -             -
 -             HANDLE must be returned by MS_NETLIB_OPENCONNECTION
 -             -
 -             Return^.pData=NIL and Return^.dataLength=0 always
 -             -
 -             The returned data should be retrieved using MS_NETLIB_RECV once
 -             the headers have been parsed.
 -             If headers haven't finished within 60 seconds the function returns
 -             NULL(0) and ERROR_TIMEOUT
 -    Errors : ERROR_INVALID_PARAMETER, any MS_NETLIB_RECV or select()
 -             ERROR_HANDLE_EOF (connection closed bfore headers complete)
 -             ERROR_TIMEOUT (headers still not complete after 60 seconds)
 -             ERROR_BAD_FORMAT (invalid character or line ending in headers, or first line is blank)
 -             ERROR_BUFFER_OVERFLOW (each header line must be less than 4096 chars long)
 -             ERROR_INVALID_DATA (first header line is malformed ("http/[01].[0-9] [0-9]+ .*", or no colon in subsequent line)
 -
 -  }
 -  MS_NETLIB_RECVHTTPHEADERS:PAnsiChar = 'Netlib/RecvHttpHeaders';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer returned by MS_NETLIB_RECVHTTPHEADERS to free
 -    Affect : Free the memory used by a TNETLIBHTTPREQUEST structure, see notes
 -    Returns: [non zero] on success, NULL(0) on failure
 -    Notes  : This service should only be used with memory pointers returned
 -             by either MS_NETLIB_RECVHTTPHEADERS or MS_NETLIB_HTTPTRANSACTION!.
 -    Errors : ERROR_INVALID_PARAMETER
 -
 -  }
 -  MS_NETLIB_FREEHTTPREQUESTSTRUCT:PAnsiChar = 'Netlib/FreeHttpRequestStruct';
 -
 -  {
 -    wParam : HANDLE
 -    lParam : Pointer to a TNETLIBHTTPREQUEST structure
 -    Affect : Carry out an entire HTTP transaction, see notes
 -    Returns: another pointer to a TNETLIBHTTPREQUEST structure or NULL(0)
 -             on failure
 -    Notes  : The returned pointer must be freed at some point
 -             with MS_NETLIB_FREEHTTPREQUESTSTRUCT,
 -             -
 -             TNETLIBHTTPREQUEST.szUrl should have a full HTTP URL, if it
 -             does not start with http://, that will be assumed, but do not
 -             take this assumption to stay assumed (heh..) in the future
 -             -
 -             this service equivalent of open(), sendhttp(), getheaders()
 -             netlib_recv(), netlib_closehandle()
 -             -
 -             TNETLIBHTTPREQUEST.headers will be added to with the following
 -             headers if they're not already present :
 -             "Host" (even if it is requested in .flags)
 -             "User-Agent" (in form : 'Miranda/d.d.d.d <(status of release)>')
 -             "Content-Length" (for POSTs only, set to TNETLIBHTTPREQUEST.dataLength)
 -
 -             If you don't want to send any of these headers --
 -             set TNETLIBHTTPREQUEST.headers to NULL(0)
 -             -
 -             In the returned pointer, pData[dataLen] is always 0 for 'safety'
 -             also : headers, headersCount, pData, dataLength, resultCode and
 -                    szResultDescr are all valid
 -             -
 -             Also take care not to assume that a returned pointer means that
 -             at the HTTP level it all worked out -- refer to the resultCode for
 -             2xx before doing anything else
 -             -
 -    Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
 -             Errors returned by the aforementioned internally used functions
 -  }
 -  MS_NETLIB_HTTPTRANSACTION:PAnsiChar = 'Netlib/HttpTransaction';
 -
 -  {
 -    wParam : HANDLE
 -    lParam : Pointer to an initialised TNETLIBBUFFER structure
 -    Affect : Send data over an open connection see notes
 -    Returns: The number of bytes sent on success, SOCKET_ERROR on failure
 -    Notes  : see Netlib_Send() helper function
 -    Errors : ERROR_INVALID_PARAMETER,
 -             anything from socket(), connect()
 -             send(), TNETLIBUSER.pfnHttpGatewayWrapSend(),
 -             (HTTP proxy): ERROR_GEN_FAILURE (http result code wasn't 2xx)
 -             MS_NETLIB_SENDHTTPREQUEST, MS_NETLIB_RECVHTTPHEADERS
 -  }
 -  MS_NETLIB_SEND:PAnsiChar = 'Netlib/Send';
 -
 -  {
 -    wParam : HANDLE
 -    lParam : Pointer to an initialised TNETLIBBUFFER structure
 -    Affect : Receive data over a connection, see notes
 -    Returns: The number of bytes read on success, SOCKET_ERROR on failure
 -    Notes  :
 -             This service uses some of the same flags as MS_NETLIB_SEND :
 -             MSG_PEEK,
 -             MSG_NODUMP,
 -             MSG_DUMPPROXY,
 -             MSG_NOHTTPGATEWAYWRAP,
 -             MSG_DUMPASTEXT,
 -             MSG_RAW
 -             -
 -             On using MSG_NOHTTPGATEWAYWRAP: Because packets through an HTTP proxy are
 -             batched and cached and stuff, using this flag is not a guarantee that it
 -             will be obeyed, and if it is it may even be propogated to future calls
 -             even if you don't specify it then. Because of this, the flag should be
 -             considered an all-or-nothing thing: either use it for the entire duration
 -             of a connection, or not at all.
 -    Errors : ERROR_INVALID_PARAMETER, anything from recv()
 -             (HTTP proxy):
 -             ERROR_GEN_FAILURE (http result code wasn't 2xx)
 -             ERROR_INVALID_DATA (no Content-Length header in reply)
 -             ERROR_NOT_ENOUGH_MEMORY (Content-Length very large)
 -             ERROR_HANDLE_EOF (connection closed before Content-Length bytes recved)
 -                               anything from select(),
 -             MS_NETLIB_RECVHTTPHEADERS, nlu.pfnHttpGatewayUnwrapRecv, socket(),
 -             connect(), MS_NETLIB_SENDHTTPREQUEST
 -
 -  }
 -  MS_NETLIB_RECV:PAnsiChar = 'Netlib/Recv';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to an initialised TNETLIBSELECT structure
 -    Affect : Determine the status of one or more connections, see notes
 -    Returns: The numbe of ready connections, SOCKET_ERROR on failure
 -    Notes  : All handles passed to this service must have been returned
 -             either by MS_NETLIB_OPENCONNECTION or MS_NETLIB_BINDPORT,
 -             the last handle in each list must be followed by either NULL
 -             or INVALID_HANDLE_VALUE.
 -    Errors : ERROR_INVALID_HANDLE, ERROR_INVALID_DATA, anything from select()
 -  }
 -  MS_NETLIB_SELECT  :PAnsiChar = 'Netlib/Select';
 -  MS_NETLIB_SELECTEX:PAnsiChar = 'Netlib/SelectEx'; // added in v0.3.3
 -
 -{
 -  Shutdown connection
 -  wParam=(WPARAM)(HANDLE)hConnection
 -  lParam=(LPARAM)0
 -  Returns 0 
 -}
 -  MS_NETLIB_SHUTDOWN:PAnsiChar = 'Netlib/Shutdown';
 -
 -  {
 -    wParam : HANDLE
 -    lParam : maxPacketSize
 -    Affect : Create a packet receiver, see notes
 -    Returns: A handle on success, NULL(0) on failure
 -    Notes  : The packet receiver implements the common situation where
 -             you have a variable length of packets coming thru over a connection
 -             and you want them split up in order to handle them.
 -             -
 -             The major limiation is, that the buffer is created in memory,
 -             so you can't have arbitrarily large packets
 -    Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
 -  }
 -  MS_NETLIB_CREATEPACKETRECVER:PAnsiChar = 'Netlib/CreatePacketRecver';
 -
 -  {
 -    wParam : Handle returned by MS_NETLIB_CREATEPACKETRECVER
 -    lParam : Pointer to an initialised TNETLIBPACKETRECVER
 -    Returns: The total number of bytes available in the buffer, NULL(0)
 -             if the connection was closed or SOCKET_ERROR.
 -             -
 -             If TNETLIBPACKETRECVER.bytesUsed is set to zero and the
 -             buffer is already full up to the maxPacketSize, it is assumed
 -             that a too large packet has been received, All data in
 -             the buffer is discarded and receiving has started anew.
 -             -
 -             This will probably cause alignment problem so if you think
 -             that tis iss likely to happen, then you should deal with it
 -             yourself.
 -             -
 -             Closing the packet receiver will not close the associated
 -             connection but will discard any bytes still in the buffer,
 -             so if you intend to carry on reading from that connection,
 -             make sure you have processed the buffer first.
 -             -
 -             This service is equivalent of memmove() to remove
 -             the first bytesUsed from the buffer, select(), if dwTimeOut
 -             is not INFINITE, then MS_NETLIB_RECV
 -    Errors : ERROR_INVALID_PARAMETER, ERROR_TIMEOUT, anything from select(),
 -             MS_NETLIB_RECV
 -  }
 -  MS_NETLIB_GETMOREPACKETS:PAnsiChar = 'Netlib/GetMorePackets';
 -
 -  {
 -    wParam : HANDLE
 -    lParam : Pointer to null terminated string to uh, log.
 -    Affect : Add a message to the log (if it's running) see notes
 -    Returns: non zeror on success, NULL(0) on failure
 -    Notes  : Don't include \r\n or #13#10 it's not needed,
 -             -
 -             Doesn't support formatting like the given C code for
 -             Netlib_Logf, just use FmtStr() and then call this service
 -             if you want that.
 -    Errors : ERROR_INVALID_PARAMETER
 -  }
 -  MS_NETLIB_LOG:PAnsiChar = 'Netlib/Log';
 -  MS_NETLIB_LOGW:PAnsiChar = 'Netlib/LogW';
 -
 -  {
 -    Sets a gateway polling timeout interval
 -    wParam=(WPARAM)(HANDLE)hConn
 -    lParam=(LPARAM)timeout
 -    Returns previous timeout value
 -    Errors: -1
 -  }
 -  MS_NETLIB_SETPOLLINGTIMEOUT:PAnsiChar = 'Netlib/SetPollingTimeout';
 -
 -{
 -  Makes connection SSL 
 -  wParam=(WPARAM)(HANDLE)hConn
 -  lParam=0
 -  Returns 0 on failure 1 on success
 -}
 -  MS_NETLIB_STARTSSL:PAnsiChar = 'Netlib/StartSsl';
 -
 -type
 -  NETLIBSSL = record
 -    cbSize:int;
 -    host  :PAnsiChar; // Expected host name
 -    flags :int;       // Reserved
 -  end;
 -
 -  const
 -/////////////////////////////////////////////////////////////////////////////////////////
 -// Security providers (0.6+)
 -
 -  NNR_UNICODE = 1;
 -// Inits a required security provider. Right now only NTLM is supported
 -// Returns HANDLE = NULL on error or non-null value on success
 -// Known providers: Basic, NTLM, Negotiate, Kerberos, GSSAPI - (Kerberos SASL)
 -  MS_NETLIB_INITSECURITYPROVIDER:PAnsiChar = 'Netlib/InitSecurityProvider';
 -
 -type
 -  NETLIBNTLMINIT2 = record
 -    cbSize        :size_t;
 -    szProviderName:TChar;
 -    szPrincipal   :TChar;
 -    flags         :uint;
 -  end;
 -
 -const
 -  MS_NETLIB_INITSECURITYPROVIDER2:PAnsiChar = 'Netlib/InitSecurityProvider2';
 -
 -// Destroys a security provider's handle, provided by Netlib_InitSecurityProvider.
 -// Right now only NTLM is supported
 -  MS_NETLIB_DESTROYSECURITYPROVIDER:PAnsiChar = 'Netlib/DestroySecurityProvider';
 -
 -// Returns the NTLM response string. The result value should be freed using mir_free
 -  MS_NETLIB_NTLMCREATERESPONSE:PAnsiChar = 'Netlib/NtlmCreateResponse';
 -
 -type
 -  NETLIBNTLMREQUEST = record
 -    szChallenge:PAnsiChar;
 -    userName   :PAnsiChar;
 -    password   :PAnsiChar;
 -//    complete   :int; // not present in last versions
 -  end;
 -
 -type
 -  NETLIBNTLMREQUEST2 = record
 -    cbSize     :size_t;
 -    szChallenge:PAnsiChar;
 -    szUserName :TChar;
 -    szPassword :TChar;
 -    complete   :uint;
 -    flags      :uint;
 -  end;
 -
 -const
 -  MS_NETLIB_NTLMCREATERESPONSE2 = 'Netlib/NtlmCreateResponse2';
 -
 -/////////////////////////////////////////////////////////////////////////////////////////
 -// Netlib hooks (0.8+)
 -
 -// WARNING: these hooks are being called in the context of the calling thread, without switching
 -// to the first thread, like all another events do. The hook procedure should be ready for the
 -// multithreaded mode
 -//
 -// Parameters:
 -//    wParam: NETLIBNOTIFY* - points to the data being sent/received
 -//    lParam: NETLIBUSER*   - points to the protocol definition
 -
 -type
 -  NETLIBNOTIFY = record
 -    nlb   :PNETLIBBUFFER; // pointer to the request buffer
 -    result:int;           // amount of bytes really sent/received
 -  end;
 -  TNETLIBNOTIFY = NETLIBNOTIFY;
 -
 -const
 -  ME_NETLIB_FASTRECV :PAnsiChar = 'Netlib/OnRecv';  // being called on every receive
 -  ME_NETLIB_FASTSEND :PAnsiChar = 'Netlib/OnSend';  // being called on every send
 -  ME_NETLIB_FASTDUMP :PAnsiChar = 'Netlib/OnDump';  // being called on every dump
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_options.inc b/plugins/Pascal_Headers/m_options.inc deleted file mode 100644 index e4440cd2e4..0000000000 --- a/plugins/Pascal_Headers/m_options.inc +++ /dev/null @@ -1,131 +0,0 @@ -{
 -  Miranda IM: the free IM client for Microsoft  Windows
 -
 -  Copyright 2000-2003 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_OPTIONS}
 -{$DEFINE M_OPTIONS}
 -
 -const
 -  { Opt/Initialise
 -    The user opened the options dialog. Modules should do whatever initialisation
 -    they need and call opt/addpage one or more times if they want pages displayed
 -    in the options dialog
 -    wParam=addInfo
 -    lParam=0
 -    addInfo should be passed straight to the wParam of opt/addpage
 -  }
 -  ME_OPT_INITIALISE:PAnsiChar = 'Opt/Initialise';
 -
 -  { Opt/AddPage
 -    Must only be called during an opt/initialise hook
 -    Adds a page to the options dialog
 -    wParam=addInfo
 -    lParam=(LPARAM)(OPTIONSDIALOGPAGE )odp
 -    addInfo must have come straight from the wParam of opt/initialise
 -    Pages in the options dialog operate just like pages in property sheets. See the
 -    Microsoft documentation for details on how they operate.
 -    Strings in the structure can be released as soon as the service returns, but
 -    icons must be kept around. This is not a problem if you're loading them from a
 -    resource.
 -    Prior to v0.1.2.1 the options dialog would resize to fit the largest page, but
 -    since then it is fixed in size. The largest page that fits neatly is 314x240
 -    DLUs.
 -  }
 -
 -type
 -  POPTIONSDIALOGPAGE = ^TOPTIONSDIALOGPAGE;
 -  TOPTIONSDIALOGPAGE = record
 -    cbSize                :int;
 -    position              :int;     // a position number, lower numbers are topmost
 -    szTitle               :TChar;   // [TRANSLATED-BY-CORE]
 -    pfnDlgProc            :pointer;
 -    pszTemplate           :PAnsiChar;
 -    hInstance             :THANDLE;
 -    hIcon                 :HICON;   // v0.1.0.1+
 -    szGroup               :TChar;   // v0.1.0.1+ [TRANSLATED-BY-CORE]
 -    groupPosition         :int;     // v0.1.0.1+
 -    hGroupIcon            :HICON;   // v0.1.0.1+
 -    flags                 :dword;   // v0.1.2.1+
 -    nIDBottomSimpleControl:int;     // v0.1.2.1+
 -      // if in simple mode the dlg will be cut off after this control,
 -      // 0 to disable
 -    nIDRightSimpleControl :int;     // v0.1.2.1+
 -      // if in simple mode the dlg will be cut off after this control,
 -      // 0 to disable
 -    expertOnlyControls    :^uint;
 -    nExpertOnlyControls   :int;     // v0.1.2.1+
 -      // these controls will be hidden in simple mode. Array must remain valid
 -      // for duration of dlg.
 -    szTab                 :TChar;   // v0.6.0.0+ [TRANSLATED-BY-CORE]
 -    dwInitParam           :LPARAM;  // v0.8.0.0+ a value to pass to lParam of WM_INITDIALOG message
 -    hLangpack             :int;
 -  end;
 -
 -const
 -  {$IFNDEF WIN64}
 -  OPTIONPAGE_OLD_SIZE  = 40;
 -  OPTIONPAGE_OLD_SIZE2 = 60;
 -  OPTIONPAGE_OLD_SIZE3 = 64;
 -  {$ELSE}
 -  OPTIONPAGE_OLD_SIZE  = SIZEOF(TOPTIONSDIALOGPAGE);
 -  OPTIONPAGE_OLD_SIZE2 = SIZEOF(TOPTIONSDIALOGPAGE);
 -  OPTIONPAGE_OLD_SIZE3 = SIZEOF(TOPTIONSDIALOGPAGE);
 -  {$ENDIF}
 -
 -const
 -  ODPF_SIMPLEONLY    =  1; // page is only shown when in simple mode
 -  ODPF_EXPERTONLY    =  2; //          "                 expert mode
 -  ODPF_BOLDGROUPS    =  4; // give group box titles a bold font
 -  ODPF_UNICODE       =  8; // string fields in OPTIONSDIALOGPAGE are WCHAR*
 -  ODPF_USERINFOTAB   = 16; // options page is tabbed
 -  ODPF_DONTTRANSLATE = 32; // do not translate option page title
 -
 -const
 -  PSN_EXPERTCHANGED = 2;    //sent to pages via WM_NOTIFY when the expert checkbox is clicked. lParam=new state
 -
 -  PSM_ISEXPERT      = WM_USER+101;   //returns true/false
 -  PSM_GETBOLDFONT   = WM_USER+102;   //returns HFONT used for group box titles
 -
 -  MS_OPT_ADDPAGE:PAnsiChar = 'Opt/AddPage';
 -
 -  { Opens the options dialog, optionally at the specified page    v0.1.2.1+
 -    wParam=0
 -    lParam=(LPARAM)(OPENOPTIONSDIALOG*)&ood;
 -    Returns 0 on success, nonzero on failure
 -    The behaviour if the options dialog is already open is that it will just be
 -    activated, the page won't be changed. This may change in the future. }
 -type
 -  POPENOPTIONSDIALOG = ^TOPENOPTIONSDIALOG;
 -  TOPENOPTIONSDIALOG = record
 -    cbSize  :int;
 -    pszGroup:PAnsiChar;  // set to NULL if it's a root item
 -    pszPage :PAnsiChar;  // set to NULL to just open the options at no specific page
 -    pszTab  :PAnsiChar;  // set to NULL to just open the options at no specific tab
 -  end;
 -
 -const
 -  MS_OPT_OPENOPTIONS:PAnsiChar = 'Opt/OpenOptions';
 -
 -//Opens the options dialog, with only specified page    v0.8.0.x+
 -  MS_OPT_OPENOPTIONSPAGE = 'Opt/OpenOptionsPage';
 -
 -  SETTING_SHOWEXPERT_DEFAULT = 1;
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_plugins.inc b/plugins/Pascal_Headers/m_plugins.inc deleted file mode 100644 index bb88804666..0000000000 --- a/plugins/Pascal_Headers/m_plugins.inc +++ /dev/null @@ -1,46 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_PLUGINS}
 -{$DEFINE M_PLUGINS}
 -
 -{
 -  Undocumented: Do NOT use.
 -  Version: 0.3.4.1+ (2004/10/04)
 -}
 -const
 -  DBPE_DONE = 1;
 -  DBPE_CONT = 0;
 -  DBPE_HALT = -1;
 -type
 -  PPLUGIN_DB_ENUM = ^TPLUGIN_DB_ENUM;
 -  TPLUGIN_DB_ENUM = record
 -    cbSize : int;
 -// 0 = continue, 1 = found, -1 = stop now
 -    pfnEnumCallback : function (pluginname:PAnsiChar; link:pointer; lParam:LPARAM):int;cdecl;
 -    lParam : LPARAM;
 -  end;
 -
 -const
 -  MS_PLUGINS_ENUMDBPLUGINS:PAnsiChar = 'Plugins/DbEnumerate';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_popup.inc b/plugins/Pascal_Headers/m_popup.inc deleted file mode 100644 index 57a25e88a7..0000000000 --- a/plugins/Pascal_Headers/m_popup.inc +++ /dev/null @@ -1,484 +0,0 @@ -{
 -===============================================================================
 -                                PopUp plugin
 -Plugin Name: PopUp
 -Plugin authors: Luca Santarelli aka hrk (hrk@users.sourceforge.net)
 -                Victor Pavlychko (nullbie@gmail.com)
 -===============================================================================
 -The purpose of this plugin is to give developers a common "platform/interface"
 -to show PopUps. It is born from the source code of NewStatusNotify, another
 -plugin I've made.
 -
 -Remember that users *must* have this plugin enabled, or they won't get any
 -popup. Write this in the requirements, do whatever you wish ;-)... but tell
 -them!
 -===============================================================================
 -}
 -
 -{$IFNDEF M_POPUP}
 -{$DEFINE M_POPUP}
 -
 -{
 -NOTE! Since Popup 1.0.1.2 there is a main meun group called "PopUps" where I
 -have put a "Enable/Disable" item. You can add your own "enable/disable" items
 -by adding these lines before you call MS_CLIST_ADDMAINMENUITEM:
 -mi.pszPopUpName = Translate("PopUps");
 -mi.position = 0; //You don't need it and it's better if you put it to zero.
 -}
 -
 -const POPUP_VERSION = $02010003;
 -
 -const
 -  MAX_CONTACTNAME = 2048;
 -  MAX_SECONDLINE  = 2048;
 -  MAX_ACTIONTITLE = 64;
 -
 -//  POPUP_USE_SKINNED_BG = $FFFFFFFF;
 -
 -// Popup Action flags
 -  PAF_ENABLED = $01; // Actions is enabled. You may store one global
 -                     // action set and toggle some items depending on
 -                     // popup you are requesting
 -
 -type
 -  PPOPUPACTION = ^TPOPUPACTION;
 -  TPOPUPACTION = record
 -    cbSize  :int;    // sizeof(POPUPACTION)
 -    lchIcon :HICON;  // Action Icon
 -    // Action title text. Please use module name as prefix
 -    // (e.g. "Popup Plus/Dismiss Popup") and don't translate
 -    lpzTitle:array [0..MAX_ACTIONTITLE-1] of AnsiChar;
 -    flags   :DWORD;  // set of PAF_* flags
 -    wParam  :WPARAM; // wParam for UM_POPUPACTION message
 -    lParam  :LPARAM; // lParam for UM_POPUPACTION message
 -  end;
 -
 -type
 -  // for info on what this stuff is, see m_popup.h
 -  PPOPUPDATA = ^TPOPUPDATA;
 -  TPOPUPDATA = record
 -    lchContact      : THANDLE;  // Handle to the contact, can be NULL (main contact).
 -    lchIcon         : HICON;    // Handle to a icon to be shown. Cannot be NULL.
 -// This is the contact name or the first line in the plugin. Cannot be NULL.
 -    lpszContactName : array [0..MAX_CONTACTNAME-1] of AnsiChar;
 -// This is the second line text. Users can choose to hide it. Cannot be NULL.
 -    lpszText        : array [0..MAX_SECONDLINE-1] of AnsiChar;
 -    colorBack       : COLORREF; // COLORREF to be used for the background.
 -                                // Can be NULL, default will be used.
 -    colorText       : COLORREF; // COLORREF to be used for the text.
 -                                // Can be NULL, default will be used.
 -    PluginWindowProc: pointer;  // Read below. Can be NULL; default will be used.
 -    PluginData      : Pointer;  // Read below. Can be NULL.
 -  end;
 -
 -type
 -  PPOPUPDATAEX = ^TPOPUPDATAEX;
 -  TPOPUPDATAEX = record
 -    lchContact      : THANDLE;
 -    lchIcon         : HICON;
 -    lpszContactName : array [0..MAX_CONTACTNAME-1] of AnsiChar;
 -    lpszText        : array [0..MAX_SECONDLINE -1] of AnsiChar;
 -    colorBack       : COLORREF;
 -    colorText       : COLORREF;
 -    PluginWindowProc: pointer;
 -    PluginData      : Pointer;
 -    iSeconds        : int;      // Custom delay time in seconds.
 -                                // -1 means "forever", 0 means = 'default time".
 -{ Data prior $02010003 version
 -    lpzClass        : PAnsiChar;    // PopUp class. Used with skinning. See PopUp/AddClass for details
 -    skinBack        : COLORREF; // Background color for colorizable skins
 -    cZero: array [0..15-SizeOf(PAnsiChar)-SizeOf(COLORREF)] of byte;
 -}
 -  // you *MUST* pass APT_NEWDATA flag for services to take care of this data
 -    hReserved       : THANDLE;  // Reserved. Must be NULL
 -    actionCount     : int;      // Amount of passed actions
 -    lpActions       : PPOPUPACTION; // Popup Actions
 -    icbSize         : int;      // struct size for future
 -  end;
 -
 -type
 -  PPOPUPDATAW = ^TPOPUPDATAW;
 -  TPOPUPDATAW = record
 -    lchContact      : THANDLE;
 -    lchIcon         : HICON;
 -    lpwzContactName : array [0..MAX_CONTACTNAME-1] of WideChar;
 -    lpwzText        : array [0..MAX_SECONDLINE -1] of WideChar;
 -    colorBack       : COLORREF;
 -    colorText       : COLORREF;
 -    PluginWindowProc: Pointer;  // must be a window procedure using stdcall
 -    PluginData      : Pointer;
 -    iSeconds        : int;      // Custom delay time in seconds.
 -                                //  -1 means = 'forever", 0 means = 'default time".
 -{ Data prior $02010003 version
 -    cZero: array [0..15] of AnsiChar; //16 unused bytes which may come useful in the future.
 -}
 -  // you *MUST* pass APT_NEWDATA flag for services to take care of this data
 -    hReserved       : THANDLE;  // Reserved. Must be NULL
 -    actionCount     : int;      // Amount of passed actions
 -    lpActions       : PPOPUPACTION; // Popup Actions
 -    icbSize         : int;      // struct size for future
 -  end;
 -
 -{
 -  When you call MS_POPUP_ADDPOPUP, my plugin will check if the given POPUPDATA
 -structure is filled with acceptable values. If not, the data will be rejected
 -and no popup will be shown.
 -
 -- lpzText should be given, because it's really bad if a user chooses to have the
 -second line displayed and it's empty :-) Just write it and let the user choose
 -if it will be displayed or not.
 -
 -- PluginWindowProc is a WNDPROC address you have to give me. Why? What? Where?
 -Calm down 8) My plugin will take care of the creation of the popup, of the
 -destruction of the popup, of the come into view and the hiding of the popup.
 -Transparency, animations... all this stuff.
 -  My plugin will not (as example) open the MessageWindow when you left click on
 -a popup. Why? Because I don't know if your popup desires to open the
 -MessageWindow :)))) This means that you need to make a WNDPROC which takes care
 -of the WM_messages you need.
 -  For example, WM_COMMAND or WM_CONTEXTMENU or WM_LMOUSEUP or whatever.
 -  At the end of your WNDPROC remember to "return DefWindowProc(hwnd, msg,
 -wParam, lParam);" When you process a message that needs a return value (an
 -example could be WM_CTLCOLORSTATIC, but you don't need to catch it 'cause it's
 -my plugin's job), simply return the nedeed value. :)
 -The default WNDPROC does nothing.
 -
 -- PluginData is a pointer to a void, which means a pointer to anything. You can
 -make your own structure to store the data you need (example: a status
 -information, a date, your name, whatever) and give me a pointer to that struct.
 -You will need to destroy that structure and free the memory when the PopUp is
 -going to be destroyed. You'll know this when you receive a UM_FREEPLUGINDATA.
 -The name tells it all: free your own plugin data.
 -
 -Appendix A: Messages my plugin will handle and your WNDPROC will never see.
 -WM_CREATE, WM_DESTROY, WM_TIMER, WM_ERASEBKGND
 -WM_CTLCOLOR* [whatever it may be: WM_CTLCOLORDLG, WM_CTLCOLORSTATIC...]
 -WM_PAINT, WM_PRINT, WM_PRINTCLIENT
 -}
 -
 -const
 -{
 -  Creates, adds and shows a popup, given a (valid) POPUPDATA structure pointer.
 -  wParam = (WPARAM)(*POPUPDATA)PopUpDataAddress
 -  lParam = 0
 -  Returns: > 0 on success, 0 if creation went bad, -1 if the PopUpData contained unacceptable values.
 -  NOTE: it returns -1 if the PopUpData was not valid, if there were already too many popups, if the module was disabled.
 -  Otherwise, it can return anything else...
 -
 -Popup Plus 2.0.4.0+
 -You may pass additional creation flags via lParam:
 -  APF_RETURN_HWND ....... function returns handle to newly created popup window (however this calls are a bit slower)
 -  APF_CUSTOM_POPUP ...... new popup is created in hidden state and doesn't obey to popup queue rules.
 -              you may control it via UM_* messages and custom window procedure
 -  APF_NO_HISTORY ........ do not log this popup in popup history (useful for previews)
 -  APF_NO_POPUP .......... do not show popup. this is useful if you want popup yo be stored in history only
 -  APF_NEWDATA ........... use new version of POPUPDATAEX/POPUPDATAW structs
 -}
 -  APF_RETURN_HWND  = 1;
 -  APF_CUSTOM_POPUP = 2;
 -  APF_NO_HISTORY   = 4;
 -  APF_NO_POPUP     = 8;
 -  APF_NEWDATA      = $10;
 -
 -  MS_POPUP_ADDPOPUP  :PAnsiChar = 'PopUp/AddPopUp';
 -  MS_POPUP_ADDPOPUPW :PAnsiChar = 'PopUp/AddPopUpW';
 -  MS_POPUP_ADDPOPUPEX:PAnsiChar = 'PopUp/AddPopUpEx';
 -
 -{
 -  Returns the handle to the contact associated to the specified PopUpWindow.
 -  You will probably need to know this handle inside your WNDPROC. Exampole: you want to open the MessageWindow. :-)
 -  Call MS_POPUP_GETCONTACT on the hWnd you were given in the WNDPROC.
 -  wParam = (WPARAM)(HWND)hPopUpWindow
 -  lParam = 0;
 -  Returns: the HANDLE of the contact. Can return NULL, meaning it's the main contact. -1 means failure.
 -}
 -  MS_POPUP_GETCONTACT:PAnsiChar = 'PopUp/GetContact';
 -
 -{
 -  wParam = hPopUpWindow
 -  lParam = PluginDataAddress;
 -  Returns: the address of the PLUGINDATA structure. Can return NULL, meaning nothing was given. -1 means failure.
 -  IMPORTANT NOTE: it doesn't seem to work if you do:
 -  CallService(..., (LPARAM)aPointerToAStruct);
 -  and then use that struct.
 -  Do this, instead:
 -  aPointerToStruct = CallService(..., (LPARAM)aPointerToAStruct);
 -  and it will work. Just look at the example I've written above (PopUpDlgProc).
 -}
 -  MS_POPUP_GETPLUGINDATA:PAnsiChar = 'PopUp/GetPluginData';
 -
 -{
 -  wParam = 0
 -  lParam = 0
 -  Returns: 0 if the user has chosen not to have the second line, 1 if he choose to have the second line.
 -}
 -  MS_POPUP_ISSECONDLINESHOWN:PAnsiChar = 'PopUp/IsSecondLineShown';
 -
 -{
 -  Requests an action or an answer from PopUp module.
 -  wParam = (WPARAM)wpQuery
 -  returns 0 on success, -1 on error, 1 on stupid calls ;-)
 -}
 -  PUQS_ENABLEPOPUPS  = 1; // returns 0 if state was changed, 1 if state wasn't changed
 -  PUQS_DISABLEPOPUPS = 2; // " "
 -  PUQS_GETSTATUS     = 3; // Returns 1 if popups are enabled, 0 if popups are disabled.
 -
 -  MS_POPUP_QUERY:PAnsiChar = 'PopUp/Query';
 -
 -{
 -  UM_FREEPLUGINDATA
 -  wParam = lParam = 0. Process this message if you have allocated your own memory. (i.e.: POPUPDATA.PluginData != NULL)
 -}
 -  UM_FREEPLUGINDATA  = (WM_USER + $200);
 -
 -{
 -  UM_DESTROYPOPUP
 -  wParam = lParam = 0. Send this message when you want to destroy the popup, or use the function below.
 -}
 -  UM_DESTROYPOPUP = (WM_USER + $201);
 -
 -{
 -  UM_INITPOPUP
 -  wParam = (WPARAM)(HWND)hPopUpWindow (but this is useless, since I'll directly send it to your hPopUpWindow
 -  lParam = 0.
 -  This message is sent to the PopUp when its creation has been finished, so POPUPDATA (and thus your PluginData) is reachable.
 -  Catch it if you needed to catch WM_CREATE or WM_INITDIALOG, which you'll never ever get in your entire popup-life.
 -  Return value: if you process this message, return 0. If you don't process it, return 0. Do whatever you like ;-)
 -}
 -  UM_INITPOPUP = (WM_USER + $202);
 -
 -{
 -  wParam = hPopUpWindow
 -  lParam = lpzNewText
 -  returns: > 0 for success, -1 for failure, 0 if the failure is due to second line not being shown. (but you could call PUIsSecondLineShown() before changing the text...)
 -  Changes the text displayed in the second line of the popup.
 -}
 -  MS_POPUP_CHANGETEXT :PAnsiChar = 'PopUp/Changetext';
 -  MS_POPUP_CHANGETEXTW:PAnsiChar = 'PopUp/ChangetextW';
 -
 -{
 -  wParam = (WPARAM)(HWND)hPopUpWindow
 -  lParam = (LPARAM)(POPUPDATAEX*)newData
 -  Changes the entire popup
 -}
 -  MS_POPUP_CHANGE :PAnsiChar = 'PopUp/Change';
 -  MS_POPUP_CHANGEW:PAnsiChar = 'PopUp/ChangeW';
 -
 -{
 - UM_CHANGEPOPUP
 -  This message is triggered by Change/ChangeText services. You also may post it directly :)
 -
 -  wParam = Modification type
 -  lParam = value of type defined by wParam
 -}
 -
 -  CPT_TEXT   = 1; // lParam = (AnsiChar *)text
 -  CPT_TEXTW  = 2; // lParam = (WCHAR *)text
 -  CPT_TITLE  = 3; // lParam = (AnsiChar *)title
 -  CPT_TITLEW = 4; // lParam = (WCHAR *)title
 -  CPT_DATA   = 5; // lParam = (POPUPDATA *)data
 -  CPT_DATAEX = 6; // lParam = (POPUPDATAEX *)data
 -  CPT_DATAW  = 7; // lParam = (POPUPDATAW *)data
 -  CPT_DATA2  = 8; // lParam = (POPUPDATA2 *)data
 -
 -  UM_CHANGEPOPUP = WM_USER + $0203;
 -
 -{ UM_POPUPACTION
 -  Popup Action notification
 -
 -  wParam and lParam are specified bu plugin.
 -  wParam = 0 is used buy popup plus internally!
 -}
 -
 -  UM_POPUPACTION = WM_USER + $0204;
 -
 -{ UM_POPUPMODIFYACTIONICON
 -  Modify Popup Action Icon
 -
 -  wParam = (WPARAM)(LPPOPUPACTIONID)&actionId
 -  lParam = (LPARAM)(HICON)hIcon
 -}
 -
 -type
 -  PPOPUPACTIONID = ^TPOPUPACTIONID;
 -  TPOPUPACTIONID = record
 -    wParam:WPARAM;
 -    lParam:LPARAM;
 -  end;
 -
 -const
 -   UM_POPUPMODIFYACTIONICON = WM_USER + $0205;
 -
 -const
 -  SM_WARNING      = $01; //Triangle icon.
 -  SM_NOTIFY       = $02; //Exclamation mark icon.
 -  SM_ERROR        = $03; //Cross icon.
 -{
 -  This is mainly for developers.
 -  Shows a warning message in a PopUp. It's useful if you need a = 'MessageBox" like function,
 -  but you don't want a modal window (which will interfere with a DialogProcedure. MessageBox
 -  steals focus and control, this one not.
 -  wParam = lpzMessage
 -  lParam = SM_* flag
 -  Returns: 0 if the popup was shown, -1 in case of failure.
 -}
 -  MS_POPUP_SHOWMESSAGE :PAnsiChar = 'PopUp/ShowMessage';
 -  MS_POPUP_SHOWMESSAGEW:PAnsiChar = 'PopUp/ShowMessageW';
 -
 -{ PopUp/RegisterActions
 -Registers your action in popup action list
 -
 -wParam = (WPARAM)(LPPOPUPACTION)actions
 -lParam = (LPARAM)actionCount
 -
 -Returns: 0 if the popup was shown, -1 in case of failure.
 -}
 -  MS_POPUP_REGISTERACTIONS:PAnsiChar = 'PopUp/RegisterActions';
 -
 -//------------- Class API ----------------//
 -
 -type
 -  TPOPUPCLASS = record
 -    cbSize          :int;
 -    flags           :int;
 -    pszName         :pAnsiChar;
 -    szDescription   :TChar;
 -    hIcon           :HICON;
 -    colorBack       :TCOLORREF;
 -    colorText       :TCOLORREF;
 -    PluginWindowProc:pointer;
 -    iSeconds        :int;
 -  end;
 -  POPUPCLASS = TPOPUPCLASS;
 -
 -const
 -  PCF_UNICODE = $0001;
 -
 -// wParam = 0
 -// lParam = (POPUPCLASS *)&pc
 -  MS_POPUP_REGISTERCLASS = 'PopUp/RegisterClass';
 -
 -type
 -  TPOPUPDATACLASS = record
 -	  cbSize      :int;
 -  	pszClassName:pAnsiChar;
 -		szTitle     :TChar;
 -		szText      :TChar;
 -	  PluginData  :pointer;
 -	  hContact    :THANDLE;
 -  end;
 -  POPUPDATACLASS = TPOPUPDATACLASS;
 -
 -const
 -// wParam = 0
 -// lParam = (POPUPDATACLASS *)&pdc
 -  MS_POPUP_ADDPOPUPCLASS = 'PopUp/AddPopupClass';
 -
 -(* OLD
 -{
 -  Each skinned popup (e.g. with colorBack == POPUP_USE_SKINNED_BG) should have
 -  class set. Then you can choose separate skin for each class (for example, you
 -  can create separate class for your plugin and use it for all ypu popups. User
 -  would became able to choose skin for your popups independently from others)
 -
 -  You have to register popup class before using it. To do so call
 -  "PopUp/AddClass" with lParam = (LPARAM)(const AnsiChar * )popUpClassName.
 -
 -  All class names are translated (via Translate()) before being added to list.
 -  You should use english names for them.
 -
 -  There are three predefined classes and one for backward compatability.
 -
 -  Note that you can add clases after popup wal loaded, e.g. you shoul intercept
 -  ME_SYSTEM_MODULESLOADED event
 -}
 -  MS_POPUP_ADDCLASS = 'PopUp/AddClass';
 -
 -  POPUP_CLASS_DEFAULT = 'Default';
 -  POPUP_CLASS_WARNING = 'Warning';
 -  POPUP_CLASS_NOTIFY  = 'Notify';
 -  POPUP_CLASS_OLDAPI  = 'PopUp 1.0.1.x compatability'; // for internal purposes
 -
 -const
 -  NFOPT_POPUP2_BACKCOLOR    = 'Popup2/BackColor';
 -  NFOPT_POPUP2_TEXTCOLOR    = 'Popup2/TextColor';
 -  NFOPT_POPUP2_TIMEOUT      = 'Popup2/Timeout';
 -  NFOPT_POPUP2_LCLICKSVC    = 'Popup2/LClickSvc';
 -  NFOPT_POPUP2_LCLICKCOOKIE = 'Popup2/LClickCookie';
 -  NFOPT_POPUP2_RCLICKSVC    = 'Popup2/RClickSvc';
 -  NFOPT_POPUP2_RCLICKCOOKIE = 'Popup2/RClickCookie';
 -  NFOPT_POPUP2_STATUSMODE   = 'Popup2/StatusMode';
 -  NFOPT_POPUP2_PLUGINDATA   = 'Popup2/PluginData';
 -  NFOPT_POPUP2_WNDPROC      = 'Popup2/WndProc';
 -
 -  NFOPT_POPUP2_BACKCOLOR_S  = 'Popup2/BackColor/Save';
 -  NFOPT_POPUP2_TEXTCOLOR_S  = 'Popup2/TextColor/Save';
 -  NFOPT_POPUP2_TIMEOUT_S    = 'Popup2/Timeout/Save';
 -
 -  MS_POPUP2_SHOW   = 'Popup2/Show';
 -  MS_POPUP2_UPDATE = 'Popup2/Update';
 -  MS_POPUP2_REMOVE = 'Popup2/Remove';
 -*)
 -///////////////////////////////////////////////////////////////
 -// Few notes about new popup api
 -// ------------------------------
 -// When you call any ADD service, Popup Plus creates local
 -// copy of POPUPDATA2 to store the data. Each time you call
 -// CHANGE service this data is updated. You can use the
 -// MS_POPUP_GETDATA2 service to retrieve Popups's copy of
 -// this data, however you MUST NOT chahge that.
 -
 -// unicode or ansi mode
 -const
 -  PU2_ANSI         = 00;
 -  PU2_UNICODE      = 01;
 -  PU2_CUSTOM_POPUP = 02;
 -
 -type
 -  PPOPUPDATA2 = ^TPOPUPDATA2;
 -  TPOPUPDATA2 = record
 -  // general
 -    cbSize:int;
 -    flags:dword;
 -
 -  // miranda bindings
 -    lchContact:THANDLE;
 -    lchEvent  :THANDLE;
 -
 -  // style
 -    colorBack:TCOLORREF;
 -    colorText:TCOLORREF;
 -    lchIcon:HICON;
 -    hbmAvatar:HBITMAP;
 -    pzTitle:TCHAR;
 -    pzText:TCHAR;
 -    lpzSkin:PAnsiChar;
 -
 -  // time and timeout
 -    iSeconds:int;
 -    dwTimestamp:dword;
 -
 -  // plugin bindings
 -    PluginWindowProc:TWNDPROC;
 -    PluginData:pointer;
 -
 -  // popup actions
 -    actionCount:int;
 -    lpActions:PPOPUPACTION; // Ansi or unicode
 -    lchNotification:THANDLE;
 -  end;
 -
 -const
 -// Creates new popup
 -//    wParam = (WPARAM)(LPPOPUPDATA2)&ppd2
 -//    lParam = (LPARAM)(combination of APF_* flags)
 -//    returns: window handle (if requested) of NULL on success, -1 on failure.
 -  MS_POPUP_ADDPOPUP2:PAnsiChar = 'Popup/AddPopup2';
 -
 -// Update an popup
 -//    wParam = (WPARAM)(HWND)hwndPopup
 -//    lParam = (LPARAM)(LPPOPUPDATA2)&ppd2
 -//    returns: zero on success, -1 on failure.
 -  MS_POPUP_CHANGEPOPUP2:PAnsiChar = 'Popup/ChangePopup2';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_protocols.inc b/plugins/Pascal_Headers/m_protocols.inc deleted file mode 100644 index 426268744c..0000000000 --- a/plugins/Pascal_Headers/m_protocols.inc +++ /dev/null @@ -1,426 +0,0 @@ -{
 -  Miranda IM: the free IM client for Microsoft  Windows
 -
 -  Copyright 2000-2003 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.
 -}
 -// this module was created in v0.1.1.0
 -{$IFNDEF M_PROTOCOLS}
 -{$DEFINE M_PROTOCOLS}
 -
 -{$include statusmodes.inc}
 -
 -//send a general request through the protocol chain for a contact
 -//wParam=0
 -//lParam=(LPARAM)(CCSDATA*)&ccs
 -//returns the value as documented in the PS_ definition (m_protosvc.h)
 -type
 -  PCCSDATA = ^TCCSDATA;
 -  TCCSDATA = record
 -    hContact      : THANDLE;
 -    szProtoService: PAnsiChar;      // a PS_* constant
 -    wParam        : WPARAM;
 -    lParam        : LPARAM;
 -  end;
 -
 -const
 -  MS_PROTO_CALLCONTACTSERVICE:PAnsiChar = 'Proto/CallContactService';
 -
 -//a general network 'ack'
 -//wParam=0
 -//lParam=(LPARAM)(ACKDATA*)&ack
 -//Note that just because definitions are here doesn't mean they will be sent.
 -//Read the documentation for the function you are calling to see what replies
 -//you will receive.
 -type
 -  PACKDATA = ^TACKDATA;
 -  TACKDATA = record
 -    cbSize  : int;
 -    szModule: PAnsiChar;   // the name of the protocol module which initiated this ack
 -    hContact: THANDLE;
 -    _type   : int;     // an ACKTYPE_* constant
 -    _result : int;     // an ACKRESULT_* constant
 -    hProcess: THANDLE; // caller defined seq, I mean process code
 -    lParam  : LPARAM;  // caller defined data
 -  end;
 -
 -const
 -  ACKTYPE_MESSAGE   = 0;
 -  ACKTYPE_URL       = 1;
 -  ACKTYPE_FILE      = 2;
 -  ACKTYPE_CHAT      = 3;
 -  ACKTYPE_AWAYMSG   = 4;
 -  ACKTYPE_AUTHREQ   = 5;
 -  ACKTYPE_ADDED     = 6;
 -  ACKTYPE_GETINFO   = 7;
 -  ACKTYPE_SETINFO   = 8;
 -  ACKTYPE_LOGIN     = 9;
 -  ACKTYPE_SEARCH    = 10;
 -  ACKTYPE_NEWUSER   = 11;
 -  ACKTYPE_STATUS    = 12;
 -  ACKTYPE_CONTACTS  = 13; // send/recv of contacts
 -  ACKTYPE_AVATAR    = 14; // send/recv of avatars from a protocol
 -  ACKTYPE_EMAIL     = 15; // notify if the unread emails changed
 -
 -  ACKRESULT_SUCCESS = 0;
 -  ACKRESULT_FAILED  = 1;
 -
 -// 'in progress' result codes:
 -  ACKRESULT_CONNECTING   = 100;
 -  ACKRESULT_CONNECTED    = 101;
 -  ACKRESULT_INITIALISING = 102;
 -  ACKRESULT_SENTREQUEST  = 103; // waiting for reply...
 -  ACKRESULT_DATA         = 104; // blob of file data sent/recved, or search result
 -  ACKRESULT_NEXTFILE     = 105; // file transfer went to next file
 -  ACKRESULT_FILERESUME   = 106; // a file is about to be received, see PS_FILERESUME
 -  ACKRESULT_DENIED       = 107; // a file send has been denied
 -  ACKRESULT_STATUS       = 108; // an ack or a series of acks to do with a task
 -                                // have a status change
 -  ACKRESULT_LISTENING    = 109; // waiting for connection
 -  ACKRESULT_CONNECTPROXY = 110; // connecting to file proxy
 -  ACKRESULT_SEARCHRESULT = 111; // result of extended search
 -const
 -  ME_PROTO_ACK:PAnsiChar = 'Proto/Ack';
 -
 -{ v0.3.2+: When result is ACKRESULT_FAILED or ACKRESULT_DENIED, lParam can point to }
 -{ a human readable string with an explanation. For example: "The message was too }
 -{ long to be delivered". If no error message is specified, lParam must be NULL. }
 -{ Right now only explanations from ACKTYPE_MESSAGE is shown. }
 -{when type==ACKTYPE_FILE && (result==ACKRESULT_DATA || result==ACKRESULT_FILERESUME), }
 -{lParam points to this }
 -const
 -  PFTS_RECEIVING = 0;
 -  PFTS_SENDING   = 1;
 -  PFTS_UNICODE   = 2;
 -  PFTS_UTF       = 4;
 -{
 -type
 -  PFNAMECHAR = ^FNAMECHAR;
 -//#if MIRANDA_VER >= 0x0900
 -  FNAMECHAR = TCHAR;
 -//#else
 -//  FNAMECHAR = AnsiChar;
 -//#endif
 -  TFNAMECHAR = FNAMECHAR;
 -}
 -type
 -  // especially for Miranda 9.0+
 -  PPROTOFILETRANSFERSTATUS = ^TPROTOFILETRANSFERSTATUS;
 -  TPROTOFILETRANSFERSTATUS = record
 -    cbSize             : size_t;
 -    hContact           : THANDLE;
 -    flags              : dword;     // one of PFTS_* constants
 -    files              : ^TCHAR;
 -    totalFiles         : int;
 -    currentFileNumber  : int;
 -    totalBytes         : uint64;
 -    totalProgress      : uint64;
 -    workingDir         : TCHAR;
 -    currentFile        : TCHAR;
 -    currentFileSize    : uint64;
 -    currentFileProgress: uint64;
 -    currentFileTime    : uint64;   // as seconds since 1970
 -  end;
 -
 -{ Enumerate the currently running protocols
 -  wParam=(WPARAM)(int*)&numberOfProtocols
 -  lParam=(LPARAM)(PROTOCOLDESCRIPTOR***)&ppProtocolDescriptors
 -  Returns 0 on success, nonzero on failure
 -  Neither wParam nor lParam may be NULL
 -  The list returned by this service is the protocol modules currently installed
 -  and running. It is not the complete list of all protocols that have ever been
 -  installed.
 -  IMPORTANT NOTE #1: the list returned is not static, it may be changed in the
 -  program's lifetime. Do not use this list in the global context, copy protocols
 -  names otherwise.
 -  IMPORTANT NOTE #2: in version 0.8 this service is mapped to the MS_PROTO_ENUMACCOUNTS
 -  service to provide the compatibility with old plugins (first three members of 
 -  PROTOACCOUNT are equal to the old PROTOCOLDESCRIPTOR format). If you declare the
 -  MIRANDA_VER macro with value greater or equal to 0x800, use MS_PROTO_ENUMPROTOS
 -  service instead to obtain the list of running protocols instead of accounts.
 -  Note that a protocol module need not be an interface to an Internet server,
 -  they can be encryption and loads of other things, too.
 -  And yes, before you ask, that is triple indirection. Deal with it.
 -  Access members using ppProtocolDescriptors[index]->element }
 -type
 -  pfnInitProto = function(const szModuleName:PAnsiChar;const szUserName:TCHAR):PPROTO_INTERFACE; cdecl;
 -
 -// deallocates an account instance
 -  pfnUninitProto = function(pin:PPROTO_INTERFACE):int; cdecl;
 -
 -// removes an account from the database
 -  pfnDestroyProto = function(pin:PPROTO_INTERFACE):int; cdecl;
 -
 -type
 -  PPROTOCOLDESCRIPTOR = ^TPROTOCOLDESCRIPTOR;
 -  TPROTOCOLDESCRIPTOR = record
 -    cbSize : size_t;
 -    szName : PAnsiChar; // unique name of the module
 -    _type  : int;   // module type, see PROTOTYPE_ constants
 -  // 0.8.0+ additions
 -    fnInit   :pfnInitProto;    // initializes an empty account
 -    fnUninit :pfnUninitProto;  // deallocates an account instance
 -    fnDestroy:pfnDestroyProto; // removes an account
 -  end;
 -
 -const
 -  PROTOCOLDESCRIPTOR_V3_SIZE = SizeOf(int_ptr)+SizeOf(PAnsiChar)+SizeOf(size_t);
 -
 -{ v0.3.3+:
 -  For recv, it will go from lower to higher, so in this case:
 -  check ignore, decrypt (encryption), translate
 -  For send, it will go translate, encrypt, ignore(??), send
 -  The DB will store higher numbers here, LOWER in the protocol chain, and lower numbers
 -  here HIGHER in the protocol chain }
 -const
 -  PROTOTYPE_IGNORE      = 50;    // added during v0.3.3
 -  PROTOTYPE_PROTOCOL    = 1000;
 -  PROTOTYPE_ENCRYPTION  = 2000;
 -  PROTOTYPE_FILTER      = 3000;
 -  PROTOTYPE_TRANSLATION = 4000;
 -  PROTOTYPE_OTHER       = 10000; // avoid using this if at all possible
 -  PROTOTYPE_DISPROTO    = 20000;
 -
 -{ determines if a protocol module is loaded or not
 -  wParam=0
 -  lParam=(LPARAM)(const AnsiChar*)szName
 -  Returns a pointer to the PROTOCOLDESCRIPTOR if the protocol is loaded, or
 -  NULL if it isn't.
 -}
 -  MS_PROTO_ISPROTOCOLLOADED:PAnsiChar = 'Proto/IsProtocolLoaded';
 -
 -{ gets the network-level protocol associated with a contact
 -  wParam=(WPARAM)(HANDLE)hContact
 -  lParam=0
 -  Returns a AnsiChar* pointing to the asciiz name of the protocol or NULL if the
 -  contact has no protocol. There is no need to free() it or anything.
 -  This is the name of the module that actually accesses the network for that
 -  contact. }
 -  MS_PROTO_GETCONTACTBASEPROTO = 'Proto/GetContactBaseProto';
 -
 -{ determines whether the specified contact has the given protocol in its chain
 -  wParam=(WPARAM)(HANDLE)hContact
 -  lParam=(LPARAM)(const AnsiChar*)szName
 -  Returns -1 if it is base protocol, positive number if it is filter and 0 if it doesn't }
 -  MS_PROTO_ISPROTOONCONTACT:PAnsiChar = 'Proto/IsProtoOnContact';
 -
 -const
 -  PROTOTYPE_SELFTYPING_OFF = 0;
 -  PROTOTYPE_SELFTYPING_ON  = 1;
 -{ This service is for notifying protocols that the user is typing a message v0.3.3+
 -  in a message dialog.
 -  This is typically sent by a message dialog when a user in the clist is typing.
 -  wParam=(WPARAM)(HANDLE)hContact
 -  lParam=(LPARAM)(int)typing state
 -  NOTE: Only protocols should generally call this service }
 -  MS_PROTO_SELFISTYPING:PAnsiChar = 'Proto/SelfIsTyping';
 -
 -const
 -  PROTOTYPE_CONTACTTYPING_OFF      = 0;
 -  PROTOTYPE_CONTACTTYPING_INFINITE = $7FFFFFFF;
 -{ This service is for notifying message dialogs/other plugins of a user typing. v0.3.3+
 -  This is typically sent by a protocol when a user in the clist is typing.
 -  wParam=(WPARAM)(HANDLE)hContact
 -  lParam=(LPARAM)(int)time (secs)
 -  NOTE: The time in seconds is used to tell a message dialog (or other plugin)
 -  how long to display its notification.  If time is 0, then notification
 -  of typing ends.
 -  NOTE: Only protocols should generally call this service }
 -  MS_PROTO_CONTACTISTYPING:PAnsiChar = 'Proto/ContactIsTyping';
 -
 -{ This hook notifies when a user is typing.  If a message dialog supports sending v0.3.3+
 -  typing notifications it should hook this event and fire the
 -  ProtoService PSS_USERISTYPING to the contacts protocol *after* verifying
 -  that the hContact is not NULL and the the user wishes to send notifications
 -  to this user (checked visibility, individual typing blocking, etc).
 -  wParam=(WPARAM)(HANDLE)hContact
 -  lParam=(LPARAM)(int)typing state }
 -  ME_PROTO_CONTACTISTYPING:PAnsiChar = 'Proto/ContactIsTypingEvent';
 -
 -// -------------- accounts support --------------------- 0.8.0+ 
 -
 -type
 -  PPROTOACCOUNT = ^TPROTOACCOUNT;
 -  TPROTOACCOUNT = record
 -    cbSize          :int;              // sizeof this structure
 -    szModuleName    :PAnsiChar;        // unique physical account name (matches database module name)
 -    _type           :int;              // always equal to PROTOTYPE_PROTOCOL
 -    tszAccountName  :TChar;            // user-defined account name
 -    szProtoName     :PAnsiChar;        // physical protocol name
 -    bIsEnabled      :int;              // is account enabled?
 -    bIsVisible      :int;              // is account visible?
 -    iOrder          :int;              // account order in various menus & lists
 -    bOldProto       :bool;             // old-styled account (one instance per dll)
 -    ppro            :PPROTO_INTERFACE; // pointer to the underlying object
 -
 -    hwndAccMgrUI    :HWND;
 -    bAccMgrUIChanged:Bool;
 -	  bDynDisabled    :Bool;             // dynamic disable flag, is never written to db
 -  end;
 -  tagACCOUNT = TPROTOACCOUNT;
 -
 -const
 -//account enumeration service
 -//wParam=(WPARAM)(int)piNumAccounts
 -//lParam=(LPARAM)(PROTOACCOUNT**)paAccounts
 -  MS_PROTO_ENUMACCOUNTS:PAnsiChar = 'Proto/EnumAccounts';
 -
 -  MS_PROTO_ENUMPROTOS   :PAnsiChar = 'Proto/EnumProtos';   // MIRANDA_VER >= $800
 -  MS_PROTO_ENUMPROTOCOLS:PAnsiChar = 'Proto/EnumProtocols';// MIRANDA_VER < $800
 -
 -(*
 -__inline int ProtoEnumAccounts( int* accNumber, PROTOACCOUNT*** accArray )
 -{  return CallService( MS_PROTO_ENUMACCOUNTS, ( WPARAM )accNumber, (LPARAM)accArray );
 -}
 -*)
 -//retrieves an account's interface by its physical name (database module)
 -//wParam=0
 -//lParam=(LPARAM)(AnsiChar*)szAccountName
 -//return value = PROTOACCOUNT* or NULL
 -  MS_PROTO_GETACCOUNT:PAnsiChar = 'Proto/GetAccount';
 -(*
 -__inline PROTOACCOUNT* ProtoGetAccount( const AnsiChar* accName )
 -{  return (PROTOACCOUNT* )CallService( MS_PROTO_GETACCOUNT, 0, (LPARAM)accName );
 -}
 -*)
 -
 -//this event is fired when the accounts list gets changed
 -//wParam = event type (1 - added, 2 - changed, 3 - deleted, 5 - enabled/disabled)
 -//lParam = (LPARAM)(PROTOACCOUNT*) - account being changed
 -
 -  PRAC_ADDED    = 1;
 -  PRAC_CHANGED  = 2;
 -  PRAC_REMOVED  = 3;
 -  PRAC_UPGRADED = 4;
 -  PRAC_CHECKED  = 5;
 -//  PRAC_CONVERT  = 6;
 -
 -  ME_PROTO_ACCLISTCHANGED:PAnsiChar = 'Proto/AccListChanged';
 -{
 -
 -  displays the Account Manager
 -  wParam=0
 -  lParam=0
 -}
 -  MS_PROTO_SHOWACCMGR:PAnsiChar = 'Protos/ShowAccountManager';
 -
 -{
 -  determines if an account is enabled or not
 -  wParam = 0
 -  lParam = PPROTOACCOUNT
 -  Returns 1 if an account is valid and enabled, 0 otherwise
 -}
 -  MS_PROTO_ISACCOUNTENABLED:PAnsiChar = 'Proto/IsAccountEnabled';
 -
 -{
 -  determines if an account is locked or not
 -  wParam = 0
 -  lParam = PAnsiChar szAccountName
 -  Returns 1 if an account is locked and not supposed to change status, 0 otherwise
 -}
 -  MS_PROTO_ISACCOUNTLOCKED:PAnsiChar = 'Proto/IsAccountLocked';
 -
 -{
 -  gets the account associated with a contact
 -  wParam=(WPARAM)(HANDLE)hContact
 -  lParam=0
 -  Returns a pAnsiChar pointing to the asciiz name of the protocol or NULL if the
 -  contact has no protocol. There is no need to mir_free() it or anything.
 -  This is the name of the module that actually accesses the network for that contact.
 -}
 -  MS_PROTO_GETCONTACTBASEACCOUNT:PAnsiChar = 'Proto/GetContactBaseAccount';
 -
 -// -------------- avatar support ---------------------
 -{
 -  First a protocol must report it supports PF4_AVATARS via PS_GETCAPS, secondly
 -  it will return the following acks for certain events, the protocol must use
 -  ProtoBroadcastAck(), listeners must hook ME_PROTO_ACK, note that lParam = ACKDATA
 -}
 -{
 -  The following ACKs MUST be sent in order of .result via ProtoBroadcastAck()
 -
 -  .szModule = protocol module
 -  .hContact = contact the avatar is for, or 0 if its for the user
 -  .type = ACKTYPE_AVATAR
 -  .result = ACKRESULT_CONNECTING, ACKRESULT_CONNECTED, ACKRESULT_SENTREQUEST, ACKRESULT_DATA
 -  .hProcess = protocol specific
 -  .lParam = 0
 -
 -  Once the transfer is complete the following ACKs MUST be sent by the protocol
 -
 -  .result = ACKRESULT_SUCCESS or ACKRESULT_FAILED
 -  .hProcess = (HANDLE) &PROTO_AVATAR_INFORMATION
 -  .lParam = 0;
 -
 -  Anytime before or during the ack or series of acks ACKRESULT_STATUS maybe sent, this might
 -  be sent a long while before anything else happens (or after anything happening) For avatars
 -  it allows callers to identify status information to do with the avatar, including the time
 -  before background transport has been created, so that you know an avatar will be exchanged
 -  sometime in the future.
 -
 -  When ACKRESULT_STATUS, hProcess is the result code - the value of this is protocol dependent,
 -  See protocol documentation to do with avatars for what codes are defined and what they mean.
 -}
 -const
 -  PA_FORMAT_UNKNOWN = 0; // the protocol can not determine much about the "bitmap"
 -  PA_FORMAT_PNG     = 1; // the image is PNG
 -  PA_FORMAT_JPEG    = 2;
 -  PA_FORMAT_ICON    = 3;
 -  PA_FORMAT_BMP     = 4;
 -  PA_FORMAT_GIF     = 5;
 -  PA_FORMAT_SWF     = 6;
 -  PA_FORMAT_XML     = 7;
 -
 -type
 -  PPROTO_AVATAR_INFORMATIONW = ^TPROTO_AVATAR_INFORMATIONW;
 -  TPROTO_AVATAR_INFORMATIONW = record
 -    cbSize  : int;     // sizeof()
 -    hContact: THANDLE; // this might have to be set by the caller too
 -    format  : int;     // PA_FORMAT_*
 -    // full path to filename which contains the avatar
 -    filename: array[0..(MAX_PATH)-1] of WideChar;
 -  end;
 -
 -  PPROTO_AVATAR_INFORMATION = ^TPROTO_AVATAR_INFORMATION;
 -  TPROTO_AVATAR_INFORMATION = record
 -    cbSize  : int;     // sizeof()
 -    hContact: THANDLE; // this might have to be set by the caller too
 -    format  : int;     // PA_FORMAT_*
 -    // full path to filename which contains the avatar
 -    filename: array[0..(MAX_PATH)-1] of AnsiChar;
 -  end;
 -
 -const
 -  GAIF_FORCE    = 1; // force an update of the avatar if there is none
 -
 -  GAIR_SUCCESS  = 0; // information about the avatar has been returned
 -  GAIR_WAITFOR  = 1; // you must hook ME_PROTO_ACK and wait for replies about avatar status
 -  GAIR_NOAVATAR = 2; // sorry, this contact has no avatars
 -
 -{
 - wParam : GAIF_
 - lParam : (LPARAM) &PROTO_AVATAR_INFORMATION
 - Affect : Make a request to the protocol to return information about a hContact's avatar (or main user)
 -      it can return information, tell you there is none, or if forced start requesting an avatar.
 - Note:
 - Version: 0.3.4+ (2004/09/13)
 -}
 -  PS_GETAVATARINFO  = '/GetAvatarInformation';
 -  PS_GETAVATARINFOW = '/GetAvatarInformationW';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_protomod.inc b/plugins/Pascal_Headers/m_protomod.inc deleted file mode 100644 index deb4958358..0000000000 --- a/plugins/Pascal_Headers/m_protomod.inc +++ /dev/null @@ -1,117 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_PROTOMOD}
 -{$DEFINE M_PROTOMOD}
 -
 - {$IFNDEF M_PROTOCOLS}
 -     {$INCLUDE m_protocols.inc}
 - {$ENDIF}
 -
 -const
 -  {
 -    wParam : 0
 -    lParam : Pointer to a initalised TPROTOCOLDESCRIPTOR structure
 -    Affect : Register a protocol module, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : This service MUST be called from your module's Load() function
 -             TPROTOCOLDESCRIPTOR.type can be a value other than PROTOTYPE_*
 -             which are used to provide a more precise positioning information
 -             for the contact protocol lists.
 -             -
 -             Relative values to the constants can be given, but this MUST NOT
 -             be done for PROTOTYPE_PROTOCOL.
 -  }
 -  MS_PROTO_REGISTERMODULE:PAnsiChar = 'Proto/RegisterModule';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : protocol_name_string
 -    Affect : Add the given protocol module to the chain for a contact, see notes
 -    Returns: 0 success, [non zero] on failure
 -    Notes  : The module is added to the correct positioning according to it's
 -             registered type.
 -  }
 -  MS_PROTO_ADDTOCONTACT:PAnsiChar = 'Proto/AddToContact';
 -
 -  {
 -    wParam : HCONTACT
 -    lParam : protocol_name_string
 -    Affect : Remove the given protocol name from the chain for the given contact
 -    Returns: 0 on success, [non zero] on failure
 -  }
 -  MS_PROTO_REMOVEFROMCONTACT:PAnsiChar = 'Proto/RemoveFromContact';
 -
 - { see m_globaldefs.pas for CreateProtoServiceFunction }
 -
 -  {
 -    wParam : wParam [arg]
 -    lParam : lParam [arg]
 -    Affect : Call the next service in the chain for the send operation, see notes
 -    Return : Return value should be returned by CallService(MS_PROTO_CHAINSEND,wParam,lParam)
 -    Notes  : wParam MUST remain untouched, lParam is a pointer to a CSSDATA structure
 -             and can be modified or copid if needed.
 -             wParam and lParam should be the values passed to your service,
 -             typically your service should return ASAP.
 -  }
 -  MS_PROTO_CHAINSEND:PAnsiChar = 'Proto/ChainSend';
 -
 -  {
 -    wParam : wParam [arg]
 -    lParam : lParam [arg]
 -    Affect : Call the next service in the chain in this receive operation, see notes
 -    Return : Return value should be returned by CallService(MS_PROTO_CHAINRECV,wParam,lParam)
 -    Notes  : wParam MUST remain untouched, lParam is a pointer to a CSSDATA structure
 -             and can be modified or copied if needed.
 -             wParam and lParam should be the values passed to your service,
 -             typically your service should return ASAP.
 -             -
 -             MS_PROTO_CHAINRECV is thread safe since 0.1.2.0 -- calls
 -             are translated to the main thread and passed from there.
 -  }
 -  MS_PROTO_CHAINRECV:PAnsiChar = 'Proto/ChainRecv';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to an initalised ACKDATA
 -    Affect : Broadcast a ME_PROTO_ACK event, see notes
 -    Returns: The return value of the NotifyEventHooks() call
 -    Notes  : ME_PROTO_ACK is completely thread safe since 01.2.0
 -             see notes in core/modules.h under NotifyEventHooks()
 -  }
 -  MS_PROTO_BROADCASTACK:PAnsiChar = 'Proto/BroadcastAck';
 -
 -// -- Added during 0.3.4 (2004/09/27) development! -----
 -{
 -  wParam: (HANDLE)hContact
 -  lParam: 0
 -  Affect: Given a hContact, return the protocol that is registered for it, or NULL if no such protocol exists,
 -      the returned string does not have to be freed and is valid even for multiple threads.
 -  Note:  Prior to 2004/09/28 this service WAS NOT THREAD SAFE and was slower
 -  Note:  Prior to 2004/09/28 this service would return NULL for a hContact if the protocol module
 -      associated with the hContact was not currently loaded, no such check is performed now.
 -  Version: 0.3.4 (2004/09/28)
 -}
 -const
 -  MS_PROTODIR_PROTOFROMCONTACT = MS_PROTO_GETCONTACTBASEPROTO;
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_protosvc.inc b/plugins/Pascal_Headers/m_protosvc.inc deleted file mode 100644 index 2076dbc8bc..0000000000 --- a/plugins/Pascal_Headers/m_protosvc.inc +++ /dev/null @@ -1,981 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2009 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_PROTOSVC}
 -{$DEFINE M_PROTOSVC}
 -
 -{ *****  Unicode Services note   ********
 -******************************************
 -
 -Only new style protocols (Miranda 0.9+) with m_iVersion set to 2 or higher
 -support Unicode services documented below, all other support only ANSI. 
 -
 -For all other that do not support Unicode services, Miranda core will 
 -convert Unicode to ANSI and call the appropriate service.
 -}
 -
 -type
 -//  PFNAMECHAR = ^FNAMECHAR;
 -//#if MIRANDA_VER >= 0x0900
 -  FNAMECHAR = TCHAR;
 -//#else
 -//  FNAMECHAR = AnsiChar;
 -//#endif
 -  TFNAMECHAR = FNAMECHAR;
 -
 -{<</
 -    none of these services should be used on there own (i.e. using CallService(), etc)
 -    hence the PS_ prefix, instead use the services exposed in m_protocols.inc
 -
 -    these should be called with CallProtoService which prefixes the protocol module
 -    name before calling.
 -    -
 -    Deleting contacts from protocols that store the contact list on the server:
 -    If a contact is deleted while the protocol is online, it is expected that the
 -    protocol will have hooked me_db_contact_deleted and take the appropriate
 -    action by itself.
 -    If a contact is deleted while the protocol is offline, the contact list will
 -    display a message to the user about the problem, and set the byte setting
 -    "CList"/"Delete" to 1. Each time such a protocol changes status from offline
 -    or connecting to online the contact list will check for contacts with this
 -    flag set and delete them at that time. Your hook for me_db_contact_deleted
 -    will pick this up and everything will be good.
 -/>>}
 -
 -const
 -  PFLAGNUM_1        = $1;
 -  PF1_IMSEND        = $00000001; // supports IM sending
 -  PF1_IMRECV        = $00000002; // supports IM receiving
 -  PF1_IM            = (PF1_IMSEND or PF1_IMRECV);
 -  PF1_URLSEND       = $00000004; // supports separate URL sending
 -  PF1_URLRECV       = $00000008; // supports separate URL receiving
 -  PF1_URL           = (PF1_URLSEND or PF1_URLRECV);
 -  PF1_FILESEND      = $00000010; // supports file sending
 -  PF1_FILERECV      = $00000020; // supports file receiving
 -  PF1_FILE          = (PF1_FILESEND or PF1_FILERECV);
 -  PF1_MODEMSGSEND   = $00000040; // supports broadcasting away messages
 -  PF1_MODEMSGRECV   = $00000080; // supports reading others' away messages
 -  PF1_MODEMSG       = (PF1_MODEMSGSEND or PF1_MODEMSGRECV);
 -  PF1_SERVERCLIST   = $00000100; // contact lists are stored on the server, not locally. See notes below
 -  PF1_AUTHREQ       = $00000200; // will get authorisation requests for some or all contacts
 -  PF1_ADDED         = $00000400; // will get 'you were added' notifications
 -  PF1_VISLIST       = $00000800; // has an invisible list
 -  PF1_INVISLIST     = $00001000; // has a visible list for when in invisible mode
 -  PF1_INDIVSTATUS   = $00002000; // supports setting different status modes to each contact
 -  PF1_EXTENSIBLE    = $00004000; // the protocol is extensible and supports plugin-defined messages
 -  PF1_PEER2PEER     = $00008000; // supports direct (not server mediated) communication between clients
 -  PF1_NEWUSER       = $00010000; // supports creation of new user IDs
 -  PF1_CHAT          = $00020000; // has a realtime chat capability
 -  PF1_INDIVMODEMSG  = $00040000; // supports replying to a mode message request with different text depending on the contact requesting
 -  PF1_BASICSEARCH   = $00080000; // supports a basic user searching facility
 -  PF1_EXTSEARCH     = $00100000; // supports one or more protocol-specific extended search schemes
 -  PF1_CANRENAMEFILE = $00200000; // supports renaming of incoming files as they are transferred
 -  PF1_FILERESUME    = $00400000; // can resume broken file transfers, see PS_FILERESUME below
 -  PF1_ADDSEARCHRES  = $00800000; // can add search results to the contact list
 -  PF1_CONTACTSEND   = $01000000; // can send contacts to other users
 -  PF1_CONTACTRECV   = $02000000; // can receive contacts from other users
 -  PF1_CONTACT       = (PF1_CONTACTSEND or PF1_CONTACTRECV);
 -  PF1_CHANGEINFO    = $04000000; // can change our user information stored on server
 -  PF1_SEARCHBYEMAIL = $08000000; // supports a search by e-mail feature
 -  PF1_USERIDISEMAIL = $10000000; // set if the uniquely identifying field of the network is the e-mail address
 -  PF1_SEARCHBYNAME  = $20000000; // supports searching by nick/first/last names
 -  PF1_EXTSEARCHUI   = $40000000; // has a dialog box to allow searching all the possible fields
 -  PF1_NUMERICUSERID = $80000000; // the unique user IDs for this protocol are numeric
 -
 -  PFLAGNUM_2     = 2;          // the status modes that the protocol supports
 -  PF2_ONLINE     = $00000001; // an unadorned online mode
 -  PF2_INVISIBLE  = $00000002;
 -  PF2_SHORTAWAY  = $00000004; // Away on ICQ, BRB on MSN
 -  PF2_LONGAWAY   = $00000008; // NA on ICQ, Away on MSN
 -  PF2_LIGHTDND   = $00000010; // Occupied on ICQ, Busy on MSN
 -  PF2_HEAVYDND   = $00000020; // DND on ICQ
 -  PF2_FREECHAT   = $00000040;
 -  PF2_OUTTOLUNCH = $00000080;
 -  PF2_ONTHEPHONE = $00000100;
 -  PF2_IDLE       = $00000200; //added during 0.3.4 (2004/09/13)
 -
 -  PFLAGNUM_3 = 3; //the status modes that the protocol supports
 -                  //away-style messages for. Uses the PF2_ flags.
 -
 -  PFLAGNUM_4           = 4;         // v0.3+: flag asking a protocol plugin how auths are handled
 -  PF4_FORCEAUTH        = $00000001; // protocol has to send auth's for things to work
 -  PF4_FORCEADDED       = $00000002; // protocol has to tell people that they were added (otherwise things don't work)
 -  PF4_NOCUSTOMAUTH     = $00000004; // protocol can't send a custom message while asking others for auth
 -  PF4_SUPPORTTYPING    = $00000008; // protocol supports user is typing messages v0.3.3+
 -  PF4_SUPPORTIDLE      = $00000010; // protocol understands idle, added during v0.3.4+ (2004/09/13)
 -  PF4_AVATARS          = $00000020; // protocol has avatar support, added during v0.3.4 (2004/09/13)
 -  PF4_OFFLINEFILES     = $00000040; // protocols supports sending files to offline users (v0.5.2)
 -  PF4_IMSENDUTF        = $00000080; // protocol is able to process messages in utf-8 (v.0.7.0+)
 -  PF4_IMSENDOFFLINE    = $00000100; // protocol supports sending offline messages (v0.8.0+)
 -  PF4_INFOSETTINGSVC   = $00000200; // protocol supports user info translation services (v0.8.0+)
 -  PF4_NOAUTHDENYREASON = $00000400; // protocol doesn't support authorization deny reason (v0.9.0+)
 -
 -  PFLAG_UNIQUEIDTEXT         = 100; // returns a static buffer of text describing the unique field by which this protocol identifies users (already translated), or NULL
 -  PFLAG_MAXCONTACTSPERPACKET = 200; // v0.1.2.2+: returns the maximum number of contacts which can be sent in a single PSS_CONTACTS. lParam=(LPARAM)hContact.
 -  PFLAG_UNIQUEIDSETTING      = 300; // v0.3+: returns the DB setting name (e.g. szProto=ICQ, szSetting=UIN) that has the ID which makes this user unique on that system (0.3a ONLY), the string is statically allocated so no need to free()
 -  PFLAG_MAXLENOFMESSAGE      = 400; // v0.3.2+: return the maximum length of an instant message, lParam=(LPARAM)hContact
 -  {
 -    A protocol might not support this cap, it allows a protocol to say that PFLAGNUM_2 is for
 -    statuses contacts supports, and that PFLAGNUM_5 is for statuses a protocol can SET TO ITSELF,
 -    if this is not replied to, then PFLAGNUM_2 is alone in telling you which statuses a protocol
 -    can set to and what statuses a contact can set to as well.
 -
 -    E.g. A protocol might report 'wireless' users but a login of the protocol from Miranda can
 -    not set itself to 'wireless' so PFLAGNUM_2 would return PF2_ONTHEPHONE and PFLAGNUM_5 would
 -    return PF2_ONTHEPHONE as well, this means "I will get contacts who are on the phone but you can
 -    not set on the phone" and so on.
 -
 -    Do note that the reply here is a NEGATION of bitflags reported for PFLAGNUM_2, e.g. returning
 -    PF2_ONTHEPHONE for PFLAGNUM_2 and returning the same for PFLAGNUM_5 says that you DO NOT SUPPORT
 -    PF2_ONTHEPHONE for the user to PS_SETSTATUS to, but you will expect other contacts to have
 -    that status, e.g. you can get onthephone for users but can't go online with onthephone.
 -
 -    The same PF2_  status flags are used in the reply.
 -
 -    Added during 0.3.4 (2004/09/14)
 -  }
 -
 -  PFLAGNUM_5 = 5;
 -
 -  // for PS_SETSTATUS
 -
 -  LOGINERR_WRONGPASSWORD = 1;
 -  LOGINERR_NONETWORK     = 2;
 -  LOGINERR_PROXYFAILURE  = 3;
 -  LOGINERR_BADUSERID     = 4;
 -  LOGINERR_NOSERVER      = 5;
 -  LOGINERR_TIMEOUT       = 6;
 -  LOGINERR_WRONGPROTOCOL = 7;
 -  LOGINERR_OTHERLOCATION = 8;
 -
 -  // flag for PS_ADDTOLIST
 -
 -  PALF_TEMPORARY = 1; // add the contact temporarily and invisibly, just to get user info or something
 -
 -  // flags for PS_GETINFO
 -
 -  SGIF_MINIMAL = 1; // get only the most basic information. This should
 -                    // contain at least a Nick and e-mail.
 -  SGIF_ONOPEN  = 2; // set when the User Info form is being opened
 -
 -  // for PSR_MESSAGE
 -
 -  PREF_CREATEREAD = 1; // create the database event with the 'read' flag set
 -  PREF_UNICODE    = 2;
 -  PREF_RTL        = 4; // 0.5+ addition: support for right-to-left messages
 -  PREF_UTF        = 8; // message is in utf-8 (0.7.0+)
 -
 -  // for PS_FILERESUME
 -
 -  FILERESUME_OVERWRITE = 1;
 -  FILERESUME_RESUME    = 2;
 -  FILERESUME_RENAME    = 3;
 -  FILERESUME_SKIP      = 4;
 -
 -const
 -  PSR_UNICODE = 1;
 -
 -type
 -  PPROTOSEARCHRESULT = ^TPROTOSEARCHRESULT;
 -  TPROTOSEARCHRESULT = record
 -    cbSize   : int;
 -    nick     : TFNAMECHAR;
 -    firstName: TFNAMECHAR;
 -    lastName : TFNAMECHAR;
 -    email    : TFNAMECHAR;
 -    id       : TFNAMECHAR;
 -    flags    : int;
 -    reserved : array [0..(8*SizeOf(THANDLE) div SizeOf(dword))-1] of Byte;
 -    // Protocols may extend this structure with extra members at will and supply
 -    // a larger cbSize to reflect the new information, but they must not change
 -    // any elements above this comment
 -    // The 'reserved' field is part of the basic structure, not space to
 -    // overwrite with protocol-specific information.
 -    // If modules do this, they should take steps to ensure that information
 -    // they put there will be retained by anyone trying to save this structure.
 -  end;
 -
 -  PPROTOSEARCHBYNAME = ^TPROTOSEARCHBYNAME;
 -  TPROTOSEARCHBYNAME = record
 -    pszNick     : TChar;
 -    pszFirstName: TChar;
 -    pszLastName : TChar;
 -  end;
 -
 -  PPROTORECVEVENT = ^TPROTORECVEVENT;
 -  TPROTORECVEVENT = record
 -    flags    : DWORD;
 -    timestamp: DWORD;
 -    szMessage: TChar;
 -    lParam   : LPARAM;
 -  end;
 -
 -  PPROTORECVFILE = ^TPROTORECVFILE;
 -  TPROTORECVFILE = record
 -    flags        : DWORD;
 -    timestamp    : DWORD;   // unix time
 -    szDescription: PAnsiChar;
 -    pFiles       : ^PAnsiChar;     // pointer to an array of PAnsiChar's
 -    lParam       : LPARAM;
 -  end;
 -
 -  //File(s) have been received (0.9.x)
 -  PPROTORECVFILET = ^TPROTORECVFILET;
 -  TPROTORECVFILET = record
 -    flags        : DWORD;
 -    timestamp    : DWORD;   // unix time
 -    szDescription: TChar;
 -    FileCount    : int;
 -    pFiles       : ^TChar;     // pointer to an array of PAnsiChar's
 -    lParam       : LPARAM;
 -  end;
 -
 -  PPROTOFILERESUME = ^TPROTOFILERESUME;
 -  TPROTOFILERESUME = record
 -    action    : int;        // FILERESUME_* flag
 -    szFilename: TFNAMECHAR; // full path, only valid if action=FILERESUME_RENAME
 -  end;
 -
 -const
 -  {
 -    wParam : PFLAGNUM_* (see above)
 -    lParam : 0
 -    Affects: Returns a bitfield for settings corresponding to flag number, see notes
 -    Returns: a bitfield of supported features -- or 0 if flag_num is not supported
 -    Notes  : this checks what sort of things are actively supported by a protocol
 -             module
 -  }
 -  PS_GETCAPS = '/GetCaps';
 -
 -  {
 -    wParam : cchName
 -    lParam : Pointer to a buffer to fill with human-readable name
 -    Affect : Get a human-readable name for the protocol, see notes
 -    Result : 0 on success, [non zero] on failure
 -    Notes  : Should be translated before being returned, cchName
 -             has the size of the buffer, example strings: "ICQ", "AIM"
 -  }
 -  PS_GETNAME = '/GetName';
 -
 -  {
 -    wParam : whichIcon
 -    lParam : 0
 -    Affect : Loads one of the protocol-sspecific icons
 -    Returns: the HICON or NULL on failure, the returned icon
 -             must be DestroyIcon()ed, the UI should overlay
 -             the online icon with further UI-specified icon to
 -             repressent the exact status mode.
 -  }
 -  PLI_PROTOCOL = $1;     // An icon representing the protocol (eg the multicoloured flower for ICQ)
 -  PLI_ONLINE   = $2;     // Online state icon for that protocol (eg green flower for ICQ)
 -  PLI_OFFLINE  = $3;     // Offline state icon for that protocol (eg red flower for ICQ)
 -
 -  PLIF_LARGE        = $0;     // Or with one of the above to get the large (32x32 by default) icon
 -  PLIF_SMALL        = $10000; // Or with one of the above to get the small (16x16 by default) icon
 -  PLIF_ICOLIB       = $20000; // the returned HICON is managed by IcoLib, DO NOT DestroyIcon() it
 -  PLIF_ICOLIBHANDLE = $40000; // the function will return IcoLib handle not HICON
 -
 -  PS_LOADICON = '/LoadIcon';
 -
 -  {
 -    wParam : status_mode
 -    lParam : Pointer to a null terminated string containing message
 -    Affect : Sets the status mode specific message for the user, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : This service is not available unless PF1_MODEMSGSEND is set,
 -             and PF1_INDIVMODEMSG is *not* set.
 -             If PF1_INDIVMODEMSG is set, then see PSS_AWAYMSSG for details
 -             of operations of away messages.
 -             -
 -             Protocol modules smust support lParam=NULL, it may eithere mean
 -             to use an empty message or (preferably) not to reply at all to
 -             any requests.
 -  }
 -  PS_SETAWAYMSG  = '/SetAwayMsg';
 -  PS_SETAWAYMSGW = '/SetAwayMsgW';
 -
 -  {
 -    wParam : newMode from statusmodes.inc
 -    lParam : 0
 -    Affect : Change the protocol's status mode, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : Will send an ack with :
 -             type=ACKTYPE_SUCCESS, result=ACKRESULT_SUCCESS, hProcess=previousMode, lParam=newMode
 -             -
 -             when the change completes. This ack is sent for all changes, not
 -             just ones caused by calling this function.
 -             -
 -             NewMode can be ID_STATUS_CONNECTING<=newMode<ID_STATUS_CONNECTING+
 -             MAX_CONNECT_RETRIES to signify that it's connecting and it's the nth retry.
 -             -
 -             Protocols are initially always in offline mode, if a protocol
 -             doesn't support a specific status mode, it should pick the closest
 -             ones that it does support, and change to that.
 -
 -             If a protocol has to switch from offline mode to online (or a substate
 -             of online, like away) then it should report any errors in the
 -             form of an additional ack :
 -
 -             type=ACKTYPE_LOGIN, result=ACKRESULT_FAILURE, hProcess=NULL, lParam=LOGINERR_*
 -
 -             SetStatus() is called when a protocol module is first loaded
 -             with newMode=ID_STATUS_ONLINE.
 -             -
 -             Protocols can define their own LOGINERR_* starting at $1000, see
 -             LOGINERR_* above
 -  }
 -  PS_SETSTATUS = '/SetStatus';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : Get the status mode that a protocol is currently in, see notes
 -    Returns: The current status mode
 -    Notes  : Only protocol modules need to implement this, non network level
 -             protocol modules do not need to (but if you register as a protocol
 -             you need to, Miranda will GPF otherwise)
 -  }
 -  PS_GETSTATUS = '/GetStatus';
 -
 -  {
 -    wParam : HDBEVENT
 -    lParam : 0
 -    Affect : allow 'somebody' to add the user to their contact list, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : Auth request come in the form of an event added to the database
 -             for the NULL(0) user, the form is:
 -             -
 -             protocolSpecific: DWORD;
 -             nick, firstname, lastName, e-mail, requestReason: ASCIIZ;
 -             -
 -             HDBEVENT musts be the handle of such an event, one or more
 -             fields may be empty if the protocol doesn't support them
 -  }
 -  PS_AUTHALLOW = '/Authorize';
 -
 -  {
 -    wParam : HDBEVENT
 -    lParam : TChar - Reason
 -    Affect : Deny an authorisation request
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : Protocol modules must be able to cope with lParam=NULL(0)
 -  }
 -  PS_AUTHDENY  = '/AuthDeny';
 -  PS_AUTHDENYW = '/AuthDenyW';
 -
 -  {
 -    Send a "You were added" event
 -    wParam=lParam=0
 -    Returns 0 on success, nonzero on failure
 -  }
 -  PSS_ADDED = '/YouWereAdded';
 -
 -{ Create account manager UI form
 -  wParam=0
 -  lParam=(LPARAM)(HWND)hwndAccMgr
 -  Returns handle on newly created form.
 -  Size for best fit is 186x134 DLUs, please avoid groupboxes
 -  paddind and advanced options. This should provide minimal setup
 -  for initial connect.
 -}
 -  PS_CREATEACCMGRUI = '/CreateAccMgrUI';
 -  {
 -    wParam : 0
 -    lParam : Pointer to a null terminated string containing an ID to search for
 -    Affect : Send a basic search request, see notes
 -    Returns: A handle to the search request or NULL(0) on failure
 -    Notes  : All protocols identify users uniquely by a single field
 -             this service will search by that field.
 -             -
 -             All search replies (even protocol-spec extended searches)
 -             are replied by a series of ack's,-
 -             -
 -             Result acks are a series of:
 -             type=ACKTYPE_SEARCH, result=ACKRESULT_DATA, lParam=Pointer to a TPROTOSEARCHRESULT structure
 -             -
 -             ending ack:
 -             type=ACKTYPE_SEARCH, result=ACKRESULT_SUCCESS, lParam=0
 -             -
 -             The pointers in the structure are not guaranteed to be
 -             valid after the ack is complete.
 -             -
 -             The structure to reply with search results can be extended
 -             per protocol basis (see below)
 -
 -  }
 -  PS_BASICSEARCH  = '/BasicSearch';
 -  PS_BASICSEARCHW = '/BasicSearchW';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to a NULL terminated string containing the e-mail to search for
 -    Affect : Search for user(s) by e-mail address, see notes
 -    Returns: A HANDLE to the search, or NULL(0) on failure
 -    Notes  : Results are returned as for PS_BASICSEARCH, this service
 -             is only available if the PF1_USERIDISEMAIL flag is set for caps --
 -             -
 -             This service with the above service should be mapped to the same
 -             function if the aforementioned flag is set.
 -    Version: v0.1.2.1+
 -  }
 -  PS_SEARCHBYEMAIL  = '/SearchByEmail';
 -  PS_SEARCHBYEMAILW = '/SearchByEmailW';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to a TPROTOSEARCHBYNAME structure
 -    Affect : Search for users by name, see notes
 -    Returns: Handle to the search, NULL(0) on failure
 -    Notes  : this service is only available, if PF1_SEARCHBYNAME capability is set.
 -             Results are returned in the same manner as PS_BASICSEEARCH
 -    Version: v0.1.2.1+
 -  }
 -  PS_SEARCHBYNAME  = '/SearchByName';
 -  PS_SEARCHBYNAMEW = '/SearchByNameW';
 -
 -  {
 -    wParam : 0
 -    lParam : Handle to window owner
 -    Affect : Create the advanced search dialog box, see notes
 -    Returns: A window handle, or NULL(0) on failure
 -    Notes  : this service is only available if PF1_EXTSEARCHUI capability is
 -             set, advanced search is very protocol-spec'd so it is left to
 -             the protocol itself to supply a dialog containing the options,
 -             this dialog should not have a titlebar and contain only search
 -             fields. the rest of the UI is supplied by Miranda.
 -             -
 -             The dialog should be created with CreateDialog() or it's kin
 -             and still be hidden when this function returns,
 -             -
 -             The dialog will be destroyed when the find/add dialog is closed
 -    Version: v0.1.2.1+
 -  }
 -  PS_CREATEADVSEARCHUI = '/CreateAdvSearchUI';
 -
 -  {
 -    wParam : 0
 -    lParam : Handle to advanced search window handle
 -    Affect : Search using the advanced search dialog, see notes
 -    Returns: A handle or NULL(0) on failure
 -    Notes  : Results are returned in the same manner as PS_BASICSEARCH,
 -             this service is only available if PF1_EXTSEARCHUI capability is set
 -    Version: v0.1.2.1+
 -  }
 -  PS_SEARCHBYADVANCED = '/SearchByAdvanced';
 -
 -type
 -  CUSTOMSEARCHRESULTS = record
 -    nSize      :size_t;
 -    nFieldCount:int;
 -    szFields   :^TCHAR;
 -    psr        :TPROTOSEARCHRESULT;
 -  end;
 -
 -  {
 -    wParam : flags
 -    lParam : Pointer to a TPROTOSEARCHRESULT structure
 -    Affect : Adds a search result to the contact list, see notes
 -    Returns: A handle to the new contact (HCONTACT) or NULL(0) on failure
 -    Notes  : The pointer MUST be a result returned by a search function
 -             since there maybe extra protocol-spec data required by the protocol.
 -             -
 -             the protocol module should not allow duplicate contains to be added,
 -             but if such a request *is* received it should return a HCONTACT
 -             to the original user,
 -             -
 -             If flags is PALF_TEMPORARY set, the contact should be added
 -             temorarily and invisiblely, just to get the user info (??)
 -             -
 -  }
 -const
 -  PS_ADDTOLIST = '/AddToList';
 -
 -  {
 -    wParam : MAKEWPARAM(flags, iContact)
 -    lParam : HDBEVENT
 -    Affects: Add a contact to the contact list given an auth/added/contacts events, see notes
 -    Returns: A HCONTACT or NULL(0) on failure
 -    Notes  : HDBEVENT must be either EVENTTYPE_AUTHREQ or EVENTTYPE_ADDED
 -             flags are the same as PS_ADDTOLIST,
 -             -
 -             iContacts is only used for contacts vents, it is 0-based index
 -             of the contacts in the event to add, there's no way to add two or more
 -             contacts at once, you should just call this as many times as needed.
 -  }
 -  PS_ADDTOLISTBYEVENT = '/AddToListByEvent';
 -
 -  {
 -    wParam : InfoType
 -    lParam : Pointer to InfoData
 -    Affect : Changes user details as stored on the server, see notes
 -    Returns: A Handle to the change request or NULL(0) on failure
 -    Notes  : the details stored on the server are very protocol spec'd
 -             so this service just supplies an outline for protocols to use.
 -             See protocol-specific documentation for what infoTypes are available
 -             and what InfoData should be for each infoTypes.
 -             -
 -             Sends an ack type=ACKTYPE_SETINFO, result=ACKRESULT_SUCCESS/FAILURE, lParam=0
 -             -
 -             This description just leaves me cold.
 -    Version: v0.1.2.0+
 -  }
 -  PS_CHANGEINFO = '/ChangeInfo';
 -
 -  {
 -    wParam : HFILETRANSFER
 -    lParam : Pointer to a initalised TPROTOFILERESUME
 -    Affect : Informs the protocol of the user's chosen resume behaviour, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : If the protocol supports file resume (caps: PF1_FILERESUME) then before
 -             each file receive begins it will broadcast an ack with :
 -
 -             type=ACKTYPE_FILE, result=ACKRESULT_RESUME, hProcess=hFileTransfer,
 -             lParam = TPROTOFILETRANSFERSTATUS.
 -
 -             If the UI processes this ack it must return a [non zero] valuee from it's
 -             hook, it all the hooks complete without returning [non zero] then the
 -             protocol will assume that no resume UI was available and will continue
 -             to receive the file with a default behaviour (default: overwrite)
 -             -
 -             If a hook does return [non zero] then that UI MUST call this service,
 -             PS_FILERESUME at some point.
 -             When the protocol module receives this call it will proceed wit the
 -             file recieve usingg the given information.
 -             -
 -             Having sasid that, PS_FILERESUME MUST be called, it is also
 -             acceptable to completely abort the transfer instead, i.e. the file
 -             exists locally and the user doesn't want to overwrite or resume or
 -             reget.
 -    Version: v0.1.2.2+
 -  }
 -  PS_FILERESUME  = '/FileResume';
 -  PS_FILERESUMEW = '/FileResumeW';
 -
 -{
 -  Asks a protocol to join the chatroom from contact  v0.8.0+
 -  wParam=(WPARAM)(HANDLE)hContact
 -  lParam=(LPARAM)0
 -  Returns 0 on success, nonzero on failure
 -}
 -  PS_JOINCHAT = '/JoinChat';
 -
 -{
 -  Asks a protocol to leave the chatroom from contact  v0.8.0+
 -  wParam=(WPARAM)(HANDLE)hContact
 -  lParam=(LPARAM)0
 -  Returns 0 on success, nonzero on failure
 -}
 -  PS_LEAVECHAT = '/LeaveChat';
 -
 -{
 -  Asks a protocol to read contact information and translate them (for a lookup fields)  v0.8.0+
 -  wParam=(WPARAM)(HANDLE)hContact
 -  lParam=(LPARAM)(DBCONTACTGETSETTING*)&dbcgs
 -  The flag PF4_INFOSETTINGSVC indicates that a protocol supports this. Basically it should
 -  do the same as MS_DB_CONTACT_GETSETTING_STR, except that for a lookup settings (e.g. Language)
 -  it returns string instead of an ID stored in the database.
 -  Caller is responsible for free()ing dbcgs.pValue->pszVal and pbVal if they are
 -  returned. You must **NOT** do this from your version of free() you have to use Miranda's free()
 -  you can get a function pointer to Miranda's free() via MS_SYSTEM_GET_MMI, see m_system.h
 -  Returns 0 on success or nonzero if the setting name was not found or hContact
 -  was invalid
 -}
 -  PS_GETINFOSETTING = '/GetInfoSetting';
 -
 -{
 - Asks protocol for the status message for a status
 - wParam=(WORD) 0 for current status or a status id
 - lParam=SGMA_xxx
 - 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
 -}
 -  SGMA_UNICODE = 1;        // return Unicode status
 -
 -  PS_GETMYAWAYMSG = '/GetMyAwayMsg';
 -
 -{
 -  Set nickname for the user
 -  wParam=(WPARAM)SMNN_xxx
 -  lParam=(LPARAM)(char *) The new nickname for the user
 -  return=0 for success
 -}
 -  SMNN_UNICODE = 1;        // return Unicode status
 -
 -  PS_SETMYNICKNAME = '/SetNickname';
 -
 -{
 -  Get the max allowed length for the user nickname
 -  Optional, default value is 1024
 -  wParam=(WPARAM)0
 -  lParam=(LPARAM)0
 -  return= <=0 for error, >0 the max length of the nick
 -}
 -  PS_GETMYNICKNAMEMAXLENGTH = '/GetMyNicknameMaxLength';
 -
 -// WAYD = What are you doing
 -  WAYD_UNICODE = 1;        // return Unicode texts
 -
 -{
 -  Get the WAYD message for the user
 -  wParam=(WPARAM)WAYD_xxx
 -  lParam=(LPARAM)0
 -  Returns the text or NULL if there is none. Remember to mir_free the return value.
 -}
 -  PS_GETMYWAYD = '/GetMyWAYD';
 -
 -{
 -  Sets the WAYD message for the user
 -  wParam=(WPARAM)WAYD_xxx
 -  lParam=(LPARAM)(WCHAR * or char *)The message
 -  Returns 0 on success, nonzero on failure
 -}
 -  PS_SETMYWAYD = '/SetMyWAYD';
 -
 -{
 -  Get the max allowed length that a WAYD message can have
 -  Optional, default value is 1024
 -  wParam=(WPARAM)0
 -  lParam=(LPARAM)0
 -  Returns the max length
 -}
 -  PS_GETMYWAYDMAXLENGTH = '/GetMyWAYDMaxLength';
 -
 -// these should be called with CallContactService()
 -
 -{<</
 -    !IMPORTANT!
 -    wParam, lParam data expected declarations should be treated with
 -    one level of indirection, where it says (CCSDATA: Yes)
 -    should be :
 -
 -    What you *actually* get in the service:
 -
 -    wParam = 0
 -    lParam = pCCSDATA
 -
 -    CCSDATA contains the ..wParam, ..lParam, hContact data declared with each service,
 -    so the wParam, lParam passed does not contain the data itself, but lParam
 -    contains a pointer to a structure which contains the data.
 -
 -/>>}
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : flags
 -    Param : 0
 -
 -    Affect : Updates a contact's details from the server, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  :
 -
 -             flags which may have SGIF_MINIMAL set to only get
 -             "basic" information, such as nickname, email address.
 -
 -             PCCSDATA(lParam)^.hContact has the HCONTACT handle to get user
 -             information for.
 -
 -             Will update all the information in the database and then
 -             send acks with :
 -
 -             type=ACKTYPE_GETINFO, result=ACKRESULT_SUCCESS, hProcess=nReplies, lParam=thisReply
 -             -
 -             Since some protocol do not allow the module to tell when it has
 -             got all the information so it can send a final ack, one
 -             ack will be sent after each chunk of data has been received,
 -             -
 -             nReplies contains the number of distinct acks
 -             that will be sent to get all the information, 'thisReply'
 -             is the zero based index of this ack.
 -             When thisReply=0 the minimal information has just been received,
 -             all other numbering is arbitrary.
 -
 -  }
 -  PSS_GETINFO = '/GetInfo';
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : flags
 -    lParam : Pointer to a null terminated string
 -    Affect : Send an instant message
 -    Returns: an hProcess corresponding to an ACK which will be sent after
 -             the hProcess.
 -    Notes:  type=ACKTYPE_MESSAGE, result=ACKRESULT_SUCCESS/FAILURE,
 -             lParam=ansi error message or NIL
 -             -
 -             here's the deal, you must return a 'seq' from this service
 -             which you have to ack when the message actually get's sent,
 -             or send a fake ack sometime soon if you can't find out if the message
 -             was successfully received with the protocol that you're using.
 -             -
 -             this event is NOT added to the database automatically.
 -  }
 -  PSS_MESSAGE  = '/SendMsg';
 -//  PSS_MESSAGEW = '/SendMsgW';
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : flags
 -    lParam : null terminated string to the URL, see notes
 -    Affect : Send a URL message, see notes
 -    Returns: A hProcess which will be ack'd later
 -    Notes  : lParam may contain TWO strings, the first for URL, the second for
 -             description, in the format :
 -             <url>#0<desc>#0 or <url>#0#0
 -             Will send an ack for hProcess when the URL actually gets sent
 -             type=ACKTYPE_URL, result=ACKRESULT_SUCCESS/FAILURE,
 -             lParam=ansi error message or NIL
 -             -
 -             protocol modules are free to define flags starting at $10000
 -             -
 -             The event will *not* be added to the database automatically
 -  }
 -  PSS_URL = '/SendUrl';
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : MAKEWPARAM(flags)
 -    lParam : Pointer to hContactsList
 -    Affect : Send a set of contacts, see notes
 -    Returns: A hProcess which will be ack, NULL(0) on failure
 -    Notes  : hContactsList is an array of nContacts handles to contacts,
 -             if this array includes one or more contains that can not be transferred
 -             using this protocol the function will fail.
 -             -
 -             Will send an ack when the contacts actually get sent:
 -
 -             type=ACKTYPE_CONTACTS, result=ACKRESULT_SUCCESS/FAILURE,
 -             lParam=ansi error message or NIL
 -             -
 -             No flags have ben defined yet,
 -             -
 -             The event will *not* be added to the database automatically
 -  }
 -  PSS_CONTACTS = '/SendContacts';
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : 0
 -    lParam : 0
 -    Affect : Send a request to retrieve HCONTACT's mode message, see notes
 -    Returns: a hProcess which will be ack'd later, NULL(0) on failure
 -    Notes  : the reply will come in a form of an ack :
 -
 -             type=ACKTYPE_AWAYMSG, result=ACKRESULT_SUCCESS/FAILURE,
 -             lParam=pointer to a null terminated string the containing message
 -  }
 -  PSS_GETAWAYMSG = '/GetAwayMsg';
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : hProcess
 -    lParam : pointer to a buffer to fill with away message to reply with
 -    Affect : Sends an away message reply to a user, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : This service must only be called is caps has PF1_MODEMSGSEND set
 -             as well as PF1_INDIVMODEMSG otherwise PS_SETAWAYMESSAGE should
 -             be used.
 -             -
 -             Reply will be sent in the form of an ack :
 -
 -             type=ACKTYPE_AWAYMSG, result=ACKRESULT_SENTREQUEST, lParam=0
 -  }
 -  PSS_AWAYMSG = '/SendAwayMsg';
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : status_mode
 -    lParam : 0
 -    Affect : Set the status mode the user will appear in to a user, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : If status_mode = 0 then revert to normal state for the user,
 -             ID_STATUS_ONLINE is possible if PF1_VISLIST
 -             ID_STATUS_ONLINE is possible if PF1_INDIVSTATUS
 -  }
 -  PSS_SETAPPARENTMODE = '/SetApparentMode';
 -
 -  // only valid if caps support IM xfers
 -  {
 -    CCSDATA: Yes
 -    wParam : HTRANSFER
 -    lParam : null terminated string containing the path
 -    Affect : Allow a file transfer to begin, see notes
 -    Returns: A handle to the transfer to be used from now on.
 -    Notes  : If the path does not point to a directory then:
 -             if a single file is being transfered and the protocol supports
 -             file renaming (PF1_CANRENAMEFILE) then the file is given
 -             this name, othewise the file is removed and file(s) are placed
 -             into the resulting directory.
 -             -
 -             File transfers are marked by a EVENTTYPE_FILE added to the database.
 -             The format is :
 -             hTransfer: DWORD
 -             filename(s), description: ASCIIZ
 -  }
 -  PSS_FILEALLOW  = '/FileAllow';
 -  PSS_FILEALLOWW = '/FileAllowW';
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : HTRANSFER
 -    lparam : Pointer to a buffer to be filled with reason
 -    Affect : Refuses a file transfer request
 -    Returns: 0 on success, [non zero] on failure
 -  }
 -  PSS_FILEDENY  = '/FileDeny';
 -  PSS_FILEDENYW = '/FileDenyW';
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : HTRANSFER
 -    lParam : 0
 -    Affect : Cancel an in-progress file transfer
 -    Returns: 0 on success, [non zero] on failure
 -  }
 -  PSS_FILECANCEL = '/FileCancel';
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : null terminated string containing description
 -    lParam : pointer to an array of PAnsiChar's containing file paths/directories
 -    Affect : Start a file(s) send, see notes
 -    Returns: A HTRANSFER handle on success, NULL(0) on failur
 -    Notes  : All notifications are done thru acks :
 -             -
 -             type=ACKTYPE_FILE, if result=ACKRESULT_FAILED then
 -             lParam=null terminated string containing reason
 -  }
 -  PSS_FILE  = '/SendFile';
 -  PSS_FILEW = '/SendFileW';
 -
 -  {
 -    Send an auth request
 -    wParam=0
 -    lParam=TChar szMessage
 -    Returns 0 on success, nonzero on failure
 -  }
 -  PSS_AUTHREQUEST  = '/AuthRequest';
 -  PSS_AUTHREQUESTW = '/AuthRequestW';
 -
 -  {
 -    Send "User is Typing" (user is typing a message to the user) v0.3.3+
 -    wParam=(WPARAM)(HANDLE)hContact
 -    lParam=(LPARAM)(int)typing type - see PROTOTYPE_SELFTYPING_X defines in m_protocols.h
 -  }
 -  PSS_USERISTYPING = '/UserIsTyping';
 -
 -// Receiving Services
 -{>>/
 -  Receiving Services:
 -  Before a message is sent to /RecvMessage it goes through a MS_PROTO_CHAINRECV
 -  which allows any other module to change data (for decryption, etc),
 -  this then reaches /RecvMessage.
 -
 -  This does not have to be the same structure/memory contained within that
 -  structure that started the chain call.
 -
 -  /RecvMessage adds the event to the database, any other modules who
 -  are interested in what message the user will see should hook at this point.
 -/>>}
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : 0
 -    lParam : Pointer to a TPROTORECVEVENT
 -    Affect : An instant message has beeen received, see notes
 -    Returns: 0 - success, other failure
 -    // handle to the newly added event, or NULL on failure
 -    Notes  : lParam^.lParam^.szMessage has the message, see structure above
 -             stored as DB event EVENTTYPE_MESSAGE, blob contains message
 -             string without null termination.
 -  }
 -  PSR_MESSAGE  = '/RecvMessage';
 -//  PSR_MESSAGEW = '/RecvMessageW';
 -
 -  MS_PROTO_RECVMSG = 'Proto/RecvMessage';
 -  {
 -    CCSDATA: Yes
 -    wParam : 0
 -    lParam : Pointer to a TPROTORECVEVENT, see notes
 -    Affect : A URL has been received
 -    Notes  : szMessage is encoded the same as PSS_URL
 -             -
 -             Stored in the database : EVENTTYPE_URL, blob contains message
 -             without null termination
 -  }
 -  PSR_URL = '/RecvUrl';
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : 0
 -    lParam : Pointer to a TPROTORECVEVENT
 -    Affect : Contacts have been received, see notes
 -    Notes  : pre.szMessage is actually a PROTOSEARCHRESULT list
 -             pre.lParam is the number of contains in that list.
 -             pre.flags can contain PREF_UTF defining the strings as utf-8 encoded (0.7.0+)
 -             -
 -             PS_ADDTOLIST can be used to add contacts to the list
 -             -
 -             repeat [
 -                ASCIIZ userNick
 -                ASCIIZ userId
 -             ]
 -             userNick should be a human-readable description of the user. It need not
 -             be the nick, or even confined to displaying just one type of
 -             information. The dbe.flags can contain DBEF_UTF defining userNick as
 -             utf-8 encoded. 
 -             userId should be a machine-readable representation of the unique
 -             protocol identifying field of the user. Because of the need to be
 -             zero-terminated, binary data should be converted to text.
 -             Use PS_ADDTOLISTBYEVENT to add the contacts from one of these to the list.
 -  }
 -  PSR_CONTACTS = '/RecvContacts';
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : 0
 -    lParam : Pointer to a TPROTORECVFILE
 -    Affect : File(s) have been received
 -  }
 -  PSR_FILE = '/RecvFile';
 -
 -  MS_PROTO_RECVFILE :pAnsiChar = 'Proto/RecvFile';
 -  MS_PROTO_RECVFILET:pAnsiChar = 'Proto/RecvFileT';
 -
 -  {
 -    CCSDATA: Yes
 -    wParam : status_mode
 -    lParam : Pointer to a TPROTORECVEVENT structure
 -    Affect : An away message reply has been received
 -  }
 -  PSR_AWAYMSG = '/RecvAwayMsg';
 -
 -  {
 -    An authorization request has been received
 -    wParam=0
 -    lParam=(LPARAM)(PROTORECVEVENT*)&pre
 -    pre.szMessage is same format as blob
 -    pre.lParam is the size of the blob
 -  }
 -  PSR_AUTH = '/RecvAuth';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_skin.inc b/plugins/Pascal_Headers/m_skin.inc deleted file mode 100644 index 3aa3503ea3..0000000000 --- a/plugins/Pascal_Headers/m_skin.inc +++ /dev/null @@ -1,178 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_SKIN}
 -{$DEFINE M_SKIN}
 -
 -const
 -  // event icons
 -  SKINICON_EVENT_MESSAGE = 100;
 -  SKINICON_EVENT_URL     = 101;
 -  SKINICON_EVENT_FILE    = 102;
 -
 -  // other icons
 -  SKINICON_OTHER_MIRANDA       = 200;
 -  SKINICON_OTHER_EXIT          = 201;
 -  SKINICON_OTHER_SHOWHIDE      = 202;
 -  SKINICON_OTHER_GROUPOPEN     = 203; // v0.1.1.0+
 -  SKINICON_OTHER_USERONLINE    = 204; // v0.1.0.1+
 -  SKINICON_OTHER_GROUPSHUT     = 205; // v0.1.1.0+
 -  SKINICON_OTHER_CONNECTING    = 206; // v0.1.0.1+
 -  SKINICON_OTHER_ADDCONTACT    = 207; // v0.7.0.2+
 -  SKINICON_OTHER_USERDETAILS   = 208; // v0.7.0.2+
 -  SKINICON_OTHER_HISTORY       = 209; // v0.7.0.2+
 -  SKINICON_OTHER_DOWNARROW     = 210; // v0.7.0.2+
 -  SKINICON_OTHER_FINDUSER      = 211; // v0.7.0.2+
 -  SKINICON_OTHER_OPTIONS       = 212; // v0.7.0.2+
 -  SKINICON_OTHER_SENDEMAIL     = 213; // v0.7.0.2+
 -  SKINICON_OTHER_DELETE        = 214; // v0.7.0.2+
 -  SKINICON_OTHER_RENAME        = 215; // v0.7.0.2+
 -  SKINICON_OTHER_SMS           = 216; // v0.7.0.2+
 -  SKINICON_OTHER_SEARCHALL     = 217; // v0.7.0.2+
 -  SKINICON_OTHER_TICK          = 218; // v0.7.0.2+
 -  SKINICON_OTHER_NOTICK        = 219; // v0.7.0.2+
 -  SKINICON_OTHER_HELP          = 220; // v0.7.0.2+
 -  SKINICON_OTHER_MIRANDAWEB    = 221; // v0.7.0.2+
 -  SKINICON_OTHER_TYPING        = 222; // v0.7.0.2+
 -  SKINICON_OTHER_SMALLDOT      = 223; // v0.7.0.2+
 -  SKINICON_OTHER_FILLEDBLOB    = 224; // v0.7.0.2+
 -  SKINICON_OTHER_EMPTYBLOB     = 225; // v0.7.0.2+
 -  SKINICON_OTHER_UNICODE       = 226; // v0.7.0.19+
 -  SKINICON_OTHER_ANSI          = 227; // v0.7.0.19+
 -  SKINICON_OTHER_LOADED        = 228; // v0.7.0.19+
 -  SKINICON_OTHER_NOTLOADED     = 229; // v0.7.0.19+
 -  SKINICON_OTHER_UNDO          = 230; // v0.8.0.4+
 -  SKINICON_OTHER_WINDOW        = 231; // v0.8.0.4+
 -  SKINICON_OTHER_WINDOWS       = 232; // v0.8.0.4+
 -  SKINICON_OTHER_ACCMGR        = 233; // v0.8.0.4+
 -  SKINICON_OTHER_MAINMENU      = 234; // v0.8.0.12+
 -  SKINICON_OTHER_STATUS        = 235; // v0.8.0.12+
 -  SKINICON_CHAT_JOIN           = 236; // v0.8.0.27+
 -  SKINICON_CHAT_LEAVE          = 237; // v0.8.0.27+
 -  SKINICON_OTHER_STATUS_LOCKED = 238; // v0.8.0.28+
 -  SKINICON_OTHER_GROUP         = 239; // v0.8.0.29+
 -  SKINICON_OTHER_ON            = 240; // v0.9.0.9+
 -  SKINICON_OTHER_OFF           = 241; // v0.9.0.9+
 -  SKINICON_OTHER_LOADEDGRAY    = 242; // v0.10.3.1+
 -  SKINICON_OTHER_NOTLOADEDGRAY = 243; // v0.10.3.1+
 -{
 -  SKINICON_EVENT_MESSAGE_BIG     = 300;
 -  SKINICON_EVENT_URL_BIG         = 301;
 -  SKINICON_EVENT_FILE_BIG        = 302;
 -  SKINICON_OTHER_MIRANDA_BIG     = 303;
 -  SKINICON_OTHER_ADDCONTACT_BIG  = 304;
 -  SKINICON_OTHER_USERDETAILS_BIG = 305;
 -  SKINICON_OTHER_HISTORY_BIG     = 306;
 -  SKINICON_OTHER_FINDUSER_BIG    = 307;
 -  SKINICON_OTHER_OPTIONS_BIG     = 308;
 -  SKINICON_OTHER_ACCMGR_BIG      = 309;
 -}
 -  // menu icons are owned by the module that uses them so are not and should
 -  // not be skinnable. Except exit and show/hide
 -
 -  // status mode icons. NOTE: These are deprecated in favour of LoadSkinnedProtoIcon()
 -  SKINICON_STATUS_OFFLINE    = 0;
 -  SKINICON_STATUS_ONLINE     = 1;
 -  SKINICON_STATUS_AWAY       = 2;
 -  SKINICON_STATUS_NA         = 3;
 -  SKINICON_STATUS_OCCUPIED   = 4;
 -  SKINICON_STATUS_DND        = 5;
 -  SKINICON_STATUS_FREE4CHAT  = 6;
 -  SKINICON_STATUS_INVISIBLE  = 7;
 -  SKINICON_STATUS_ONTHEPHONE = 8;
 -  SKINICON_STATUS_OUTTOLUNCH = 9;
 -
 -const
 -  SSDF_UNICODE  = $0001;
 -type
 -  PSKINSOUNDDESCEX = ^TSKINSOUNDDESCEX;
 -  TSKINSOUNDDESCEX = record
 -    cbSize        : int;
 -    pszName       : PAnsiChar; // name to refer to sound when playing and in DB
 -    pszDescription: TChar; // [TRANSLATED-BY-CORE] description to use for it in options dialog
 -    pszDefaultFile: TChar; // the default sound file to use, WITHOUT path
 -    pszSection    : TChar; // [TRANSLATED-BY-CORE] section name used to group sounds (NULL is acceptable)
 -    dwFlags       : dword; // if Miranda ver >=9.0
 -  end;
 -
 -const
 -  {
 -    wParam : ICON_ID or handle
 -    lParam : 0 if ICON_ID, else 1
 -    Affect : Load an icon from the user's custom skin lib, or from the exe
 -             if there isn't one loaded, see notes
 -    Return : HICON for the new icon, do *not* DestroyIcon() the return value
 -             returns NULL(0) if ICON_ID is invalid, but always success for a
 -             valid ID.
 -  }
 -  MS_SKIN_LOADICON:PAnsiChar = 'Skin/Icons/Load';
 -
 -  {
 -    wParam : null terminated string containing the protocol name
 -    lParam : status_wanted
 -    Affect : Load an icon representing the status_wanted for a particular protocol, see notes
 -    Returns: an HICON for the new icon, do NOT DestroyIcon() the return value
 -             returns NULL(0) on failure.
 -    Notes  : If wParam is NULL(0) the service will load the user's selected
 -             'all protocols' status icon
 -  }
 -  MS_SKIN_LOADPROTOICON   :PAnsiChar = 'Skin/Icons/LoadProto';
 -  MS_SKIN_LOADPROTOICONBIG:PAnsiChar = 'Skin/Icons/LoadProtoBig';
 -
 -  {
 -    wParam : hLangpack
 -    lParam : Pointer to a initialised SKINSOUNDDESC
 -    Affect : Add a new sound so it has a default and can be changed in the
 -             options dialog
 -    Returns: 0 on success, [non zero] on failure
 -  }
 -  MS_SKIN_ADDNEWSOUND:PAnsiChar = 'Skin/Sounds/AddNew';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to a null terminated string containing the name of the
 -             sound to play
 -    Affect : play a named sound event, play name should of been added
 -             with MS_SKIN_ADDNEWSOUND,  see notes
 -    Notes  : function will not fail, it will play the Windows
 -  }
 -  MS_SKIN_PLAYSOUND:PAnsiChar = 'Skin/Sounds/Play';
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : Sent when the icons DLL has been changed in the options dialog
 -             and everyone should remake their image lists.
 -  }
 -  ME_SKIN_ICONSCHANGED:PAnsiChar = 'Skin/IconsChanged';
 -
 -  {
 -    wParam: 0 when playing sound (1 when sound is being previewed)
 -    lParam: (AnsiChar*) pszSoundFile
 -    Affect: This hook is fired when the sound module needs to play a sound
 -    Note  : This event has default processing, if no one HookEvent()'s this
 -        event then it will use the default hook code, which uses PlaySound()
 -    Version: 0.3.4a (2004/09/15)
 -  }
 -  ME_SKIN_PLAYINGSOUND:PAnsiChar = 'Skin/Sounds/Playing';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_system.inc b/plugins/Pascal_Headers/m_system.inc deleted file mode 100644 index 8347495e03..0000000000 --- a/plugins/Pascal_Headers/m_system.inc +++ /dev/null @@ -1,216 +0,0 @@ -{
 -  Miranda IM: the free IM client for Microsoft  Windows
 -
 -  Copyright 2000-2003 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_SYSTEM}
 -{$DEFINE M_SYSTEM}
 -
 -{$IFNDEF MIRANDANAME}
 -{$DEFINE MIRANDANAME}
 -const
 -  MIRANDANAME = 'Miranda IM';
 -{$ENDIF}
 -{$IFNDEF MIRANDACLASS}
 -{$DEFINE MIRANDACLASS}
 -const
 -  MIRANDACLASS = 'Miranda';
 -{$ENDIF}
 -
 -// set the default compatibility lever for Miranda 0.4.x
 -{$IFNDEF MIRANDA_VER}
 -{$DEFINE MIRANDA_VER}
 -const
 -  MIRANDA_VER = $0400;
 -{$ENDIF}
 -
 -  { miranda/system/modulesloaded
 -    called after all modules have been successfully initialised
 -    wParam=lParam=0
 -    used to resolve double-dependencies in the module load order
 -  }
 -const
 -  ME_SYSTEM_MODULESLOADED:PAnsiChar = 'Miranda/System/ModulesLoaded';
 -
 -  { miranda/system/shutdown event
 -    called just before the application terminates
 -    the database is still guaranteed to be running during this hook.
 -    wParam=lParam=0
 -  }
 -  ME_SYSTEM_SHUTDOWN:PAnsiChar = 'Miranda/System/Shutdown';
 -
 -  { restarts miranda ( 0.8+ )
 -    wParam=lParam=0
 -  }
 -  MS_SYSTEM_RESTART:PAnsiChar = 'Miranda/System/Restart';
 -
 -  { miranda/system/oktoexit event
 -    called before the app goes into shutdown routine to make sure everyone is
 -    happy to exit
 -    wParam=lParam=0
 -    return nonzero to stop the exit cycle
 -  }
 -  ME_SYSTEM_OKTOEXIT:PAnsiChar = 'Miranda/System/OkToExitEvent';
 -
 -  { miranda/system/oktoexit service
 -    Check if everyone is happy to exit
 -    wParam=lParam=0
 -    if everyone acknowleges OK to exit then returns true, otherwise false
 -  }
 -  MS_SYSTEM_OKTOEXIT:PAnsiChar = 'Miranda/System/OkToExit';
 -
 -  { gets the version number of Miranda encoded as a DWORD v0.1.0.1+
 -    wParam=lParam=0
 -    returns the version number, encoded as one version per byte, therefore
 -    version 1.2.3.10 is 0x0102030a
 -  }
 -  MS_SYSTEM_GETVERSION:PAnsiChar = 'Miranda/System/GetVersion';
 -
 -  { gets the version of Miranda encoded as text   v0.1.0.1+
 -    wParam=cch
 -    lParam=(LPARAM)(AnsiChar*)pszVersion
 -    cch is the size of the buffer pointed to by pszVersion, in bytes
 -    may return a build qualifier, such as "0.1.0.1 alpha"
 -    returns 0 on success, nonzero on failure
 -  }
 -  MS_SYSTEM_GETVERSIONTEXT:PAnsiChar = 'Miranda/System/GetVersionText';
 -
 -  { Adds a HANDLE to the list to be checked in the main message loop v0.1.2.0+
 -    wParam=(WPARAM)(HANDLE)hObject
 -    lParam=(LPARAM)(const AnsiChar*)pszService
 -    returns 0 on success or nonzero on failure
 -    Causes pszService to be CallService()d (wParam=hObject,lParam=0) from the
 -    main thread whenever hObject is signalled.
 -    The Miranda message loop has a MsgWaitForMultipleObjects() call in it to
 -    implement this feature. See the documentation for that function for
 -    information on what objects are supported.
 -    There is a limit of MAXIMUM_WAIT_OBJECTS minus one (MWO is defined in winnt.h
 -    to be 64) on the number of handles MSFMO() can process. This service will
 -    return nonzero if that many handles are already being waited on.
 -    As of writing, the following parts of Miranda are thread-safe, so can be
 -    called from any thread:
 -    All of modules.h except NotifyEventHooks()
 -    Read-only parts of m_database.h (since the write parts will call hooks)
 -    All of m_langpack.h
 -    for all other routines your mileage may vary, but I would strongly recommend
 -    that you call them from the main thread, or ask about it on plugin-dev if you
 -    think it really ought to work.
 -    Update during 0.1.2.0 development, 16/10/01:
 -    NotifyEventHooks() now translates all calls into the context of the main
 -    thread, which means that all of m_database.h is now completely safe.
 -    Update during 0.1.2.2 development, 17/4/02:
 -    The main thread's message loop now also deals with asynchronous procedure
 -    calls. Loop up QueueUserAPC() for a neater way to accomplish a lot of the
 -    things that used to require ms_system_waitonhandle.
 -    Miranda is compiled with the multithreaded runtime - don't forget to do the
 -    same with your plugin.
 -  }
 -  MS_SYSTEM_WAITONHANDLE:PAnsiChar = 'Miranda/System/WaitOnHandle';
 -
 -  {Removes a HANDLE from the wait list   v0.1.2.0+ }
 -  {wParam=(WPARAM)(HANDLE)hObject }
 -  {lParam=0 }
 -  {returns 0 on success or nonzero on failure. }
 -  MS_SYSTEM_REMOVEWAIT:PAnsiChar = 'Miranda/System/RemoveWait';
 -
 -  {
 -    wParam=0
 -    lParam=0
 -
 -    This hook is fired just before the thread unwind stack is used,
 -    it allows MT plugins to shutdown threads if they have any special
 -    processing to do, etc.
 -  }
 -  ME_SYSTEM_PRESHUTDOWN:PAnsiChar = 'Miranda/System/PShutdown';
 -
 -  {
 -    wParam=0
 -    lParam=0
 -
 -    Returns TRUE when Miranda has got WM_QUIT and is in the process
 -    of shutting down
 -  }
 -  MS_SYSTEM_TERMINATED:PAnsiChar = 'Miranda/SysTerm';
 -
 -  {
 -    wParam : 0
 -    lParam : (address) void (__cdecl  callback) (void)
 -    Affect : Setup a function pointer to be called after main loop iterations, it allows for
 -           idle processing, See notes
 -    Returns: 1 on success, 0 on failure
 -
 -    Notes  : This service will only allow one function to be registered, if one is registered, 0 will be returned
 -           Remember that this uses __cdecl.
 -    Version: Added during 0.3.4+
 -  }
 -  MS_SYSTEM_SETIDLECALLBACK:PAnsiChar = 'Miranda/SetIdleCallback';
 -
 -  {
 -    wParam : 0
 -    lParam : &tick
 -    Affect : return the last window tick where a monitored event was seen, currently WM_CHAR/WM_MOUSEMOVE
 -    Returns: Always returns 0
 -    Version: Added during 0.3.4+ (2004/09/12)
 -  }
 -  MS_SYSTEM_GETIDLE:PAnsiChar = 'Miranda/GetIdle';
 -
 -  {
 -    wParam: cchMax (max length of buffer)
 -    lParam: pointer to buffer to fill
 -    Affect: Returns the build timestamp of the core, as a string of YYYYMMDDhhmmss, this service might
 -      not exist and therefore the build is before 2004-09-30
 -    Returns: zero on success, non zero on failure
 -    Version: 0.3.4a+ (2004/09/30)
 -    DEFUNCT: This service was removed on 0.3.4.3+ (2004/11/19) use APILEVEL
 -  }
 -  MS_SYSTEM_GETBUILDSTRING:PAnsiChar = 'Miranda/GetBuildString';
 -
 -  {
 -    Missing service catcher
 -    Is being called when one calls the non-existent service.
 -    All parameters are stored in the special structure
 -
 -    The event handler takes 0 as wParam and TMissingServiceParams* as lParam.
 -
 -    0.4.3+ addition (2006/03/27)
 -  }
 -type
 -  PTMissingServiceParams = ^TMissingServiceParams;
 -  TMissingServiceParams = record
 -    name :PAnsiChar;
 -    wParam:WPARAM;
 -    lParam:LPARAM;
 -  end;
 -
 -const
 -  ME_SYSTEM_MISSINGSERVICE:PAnsiChar = 'System/MissingService';
 -
 -{ Unhandled exceptions filter
 -Is being called inside any thread launched via mir_forkthread, including the main thread.
 -If a plugin's author executes a large piece of code inside __try/__except, he should
 -obtain this filter and call it inside the __except section
 -
 -0.8.0+ addition (2008/07/20)
 -}
 -
 -const
 -  MS_SYSTEM_GETEXCEPTFILTER:PAnsiChar = 'System/GetExceptFilter';
 -
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_url.inc b/plugins/Pascal_Headers/m_url.inc deleted file mode 100644 index a1a43458ba..0000000000 --- a/plugins/Pascal_Headers/m_url.inc +++ /dev/null @@ -1,36 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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_URL}
 -{$DEFINE M_URL}
 -
 -const
 -  {
 -    wParam : HCONTACT
 -    lParam : 0
 -    Affects: bring up the send URL dialogbox for a user
 -    Returns: 0 on success, nonzero on failure, see notes
 -    Notes  : service returns before the URL is sent.
 -  }
 -  MS_URL_SENDURL:PAnsiChar = 'SRUrl/SendCommand';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_userinfo.inc b/plugins/Pascal_Headers/m_userinfo.inc deleted file mode 100644 index d92f16f955..0000000000 --- a/plugins/Pascal_Headers/m_userinfo.inc +++ /dev/null @@ -1,78 +0,0 @@ -{
 -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_USERINFO}
 -{$DEFINE M_USERINFO}
 -
 -{$include m_options.inc}
 -
 -const
 -{
 -  show the User Details dialog box
 -  wParam=(WPARAM)(HANDLE)hContact
 -  lParam=0
 -}
 -  MS_USERINFO_SHOWDIALOG:PAnsiChar = 'UserInfo/ShowDialog';
 -
 -{ UserInfo/Initialise      v0.1.2.0+
 - The user opened a details dialog. Modules should do whatever initialisation
 - they need and call userinfo/addpage one or more times if they want pages
 - displayed in the options dialog
 - wParam=addInfo
 - lParam=(LPARAM)hContact
 - addInfo should be passed straight to the wParam of userinfo/addpage
 - NB: The built-in userinfo module is loaded after all plugins, so calling
 - HookEvent() in your plugin's Load() function will fail if you specify this
 - hook. Look up core/m_system.h:me_system_modulesloaded.
 -}
 -  ME_USERINFO_INITIALISE:PAnsiChar = 'UserInfo/Initialise';
 -
 -{ UserInfo/AddPage        v0.1.2.0+
 - Must only be called during an userinfo/initialise hook
 - Adds a page to the details dialog
 - wParam=addInfo
 - lParam=(LPARAM)(OPTIONSDIALOGPAGE*)odp
 - addInfo must have come straight from the wParam of userinfo/initialise
 - Pages in the details dialog operate just like pages in property sheets. See the
 - Microsoft documentation for info on how they operate.
 - When the pages receive WM_INITDIALOG, lParam=(LPARAM)hContact
 - Strings in the structure can be released as soon as the service returns, but
 - icons must be kept around. This is not a problem if you're loading them from a
 - resource
 - The 3 'group' elements in the structure are ignored, and will always be ignored
 - Unlike the options dialog, the details dialog does not resize to fit its
 - largest page. Details dialog pages should be 222x132 dlus.
 - The details dialog (currently) has no Cancel button. I'm waiting to see if it's
 - sensible to have one.
 - Pages will be sent PSN_INFOCHANGED through WM_NOTIFY (idFrom=0) when a protocol
 - ack is broadcast for the correct contact and with type=ACKTYPE_GETINFO.
 - To help you out, PSN_INFOCHANGED will also be sent to each page just after it's
 - created.
 - All PSN_ WM_NOTIFY messages have PSHNOTIFY.lParam=(LPARAM)hContact
 -}
 -  PSN_INFOCHANGED  = 1;
 -  PSN_PARAMCHANGED = 2;
 -
 -  PSM_FORCECHANGED = (WM_USER+100);   //force-send a PSN_INFOCHANGED to all pages
 -  MS_USERINFO_ADDPAGE:PAnsiChar = 'UserInfo/AddPage';
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/m_utils.inc b/plugins/Pascal_Headers/m_utils.inc deleted file mode 100644 index eac9de22bb..0000000000 --- a/plugins/Pascal_Headers/m_utils.inc +++ /dev/null @@ -1,387 +0,0 @@ -{$IFNDEF M_UTILS}
 -{$DEFINE M_UTILS}
 -
 -const
 -  RD_ANCHORX_CUSTOM = 0; // function did everything required to the x axis, do no more processing
 -  RD_ANCHORX_LEFT   = 0; // move the control to keep it constant distance from the left edge of the dialog
 -  RD_ANCHORX_RIGHT  = 1; // move the control to keep it constant distance from the right edge of the dialog
 -  RD_ANCHORX_WIDTH  = 2; // size the control to keep it constant distance from both edges of the dialog
 -  RD_ANCHORX_CENTRE = 4; // move the control to keep it constant distance from the centre of the dialog
 -  RD_ANCHORY_CUSTOM = 0;
 -  RD_ANCHORY_TOP    = 0;
 -  RD_ANCHORY_BOTTOM = 8;
 -  RD_ANCHORY_HEIGHT = 16;
 -  RD_ANCHORY_CENTRE = 32;
 -
 -  // for MS_UTILS_RESTOREWINDOWPOSITION
 -  RWPF_NOSIZE     = 1; // don't use stored size info: leave dialog same size
 -  RWPF_NOMOVE     = 2; // don't use stored position
 -  RWPF_NOACTIVATE = 4; // show but don't activate v0.3.3.0+
 -  RWPF_HIDDEN     = 8; // make it hidden v0.9.0.9+
 -
 -  // for WNDCLASS_COLOURPICKER
 -  CPM_SETCOLOUR        = $1000;// lParam=new colour
 -  CPM_GETCOLOUR        = $1001;// returns colour
 -  CPM_SETDEFAULTCOLOUR = $1002;// lParam=default, used as first custom colour
 -  CPM_GETDEFAULTCOLOUR = $1003;// returns colour
 -  CPN_COLOURCHANGED    = 1;  // sent through WM_COMMAND
 -
 -  //  Colour picker control, see CPM_* and CPN_* constants above
 -  WNDCLASS_COLOURPICKER = 'ColourPicker';
 -
 -  // hyperlink messages
 -  {
 -    Use this in a SendMessage to set the color of the url when control is enabled
 -    wParam=DWORD color
 -    lParam=not used
 -  }
 -  HLK_SETENABLECOLOUR = WM_USER+101; // added in 0.3.1
 -
 -  {
 -    Use this in a SendMessage to set the color of the url when control is disabled
 -    wParam=DWORD color
 -    lParam=not used
 -  }
 -  HLK_SETDISABLECOLOUR = WM_USER+102; // added in 0.3.1
 -
 -type
 -  PUTILRESIZECONTROL = ^TUTILRESIZECONTROL;
 -  TUTILRESIZECONTROL = record
 -    cbSize         : int;
 -    wId            : int;   // control ID
 -    rcItem         : TRECT; // original control rectangle, relative to dialog
 -                            // modify in-placee to specify the new position
 -    dlgOriginalSize: TSize; // size of dialog client area in template
 -    dlgNewSize     : TSize; // current size of dialog client area
 -  end;
 -
 -  TDIALOGRESIZERPROC = function(hwndDlg: THANDLE; lParam: LPARAM; urc: PUTILRESIZECONTROL): int; cdecl;
 -
 -  PUTILRESIZEDIALOG = ^TUTILRESIZEDIALOG;
 -  TUTILRESIZEDIALOG = record
 -    cbSize    : int;
 -    hwndDlg   : HWND;
 -    hInstance : HINST;
 -    lpTemplate: PAnsiChar;
 -    lParam    : LPARAM;
 -    pfnResizer: TDIALOGRESIZERPROC;
 -  end;
 -
 -  PCountryListEntry = ^TCountryListEntry;
 -  TCountryListEntry = record
 -    id    : int;
 -    szName: PAnsiChar;
 -  end;
 -
 -  PWINDOWLISTENTRY = ^TWINDOWLISTENTRY;
 -  TWINDOWLISTENTRY = record
 -    hList   : THANDLE;
 -    hWnd    : HWND;
 -    hContact: THANDLE;
 -  end;
 -
 -  PSAVEWINDOWPOS = ^TSAVEWINDOWPOS;
 -  TSAVEWINDOWPOS = record
 -    hWnd        : HWND;
 -    hContact    : THANDLE;
 -    szModule    : PAnsiChar;        // module name eto store the settings in
 -    szNamePrefix: PAnsiChar;        // text to prefix on 'x', 'width', etc
 -  end;
 -
 -const
 -  OUF_NEWWINDOW = 1;
 -  OUF_UNICODE   = 2;
 -  {
 -    wParam : OUF_* flag
 -    lParam : Pointer to a null terminated string containing Url
 -    Affect : Open a URL in the user's default web browser, see notes
 -    Returns: 0 on success, [non zero on failure]
 -    Notes  : bOpenInWindow should be zero to open the URL in the browoser window
 -             the user last used, or nonzero to open in a new browser window,
 -             if there's no browser running, it will be started to show the URL
 -    Version: v0.1.0.1+
 -  }
 -  MS_UTILS_OPENURL:PAnsiChar = 'Utils/OpenURL';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to an initalised TUTILRESIZEDIALOG structure
 -    Affect : Resize a dialog by calling a custom routine to move each control, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : Does not support DIALOGTEMPLATEEX dialogboxes, and will return
 -             failure if you try to resize one.-
 -             the dialog iteself should have been resized prior to calling this
 -             service, .pfnResizer is called once for each control in the dialog
 -             .pfnResizer should return a combination of one RD_ANCHORx_ and one RD_ANCHORy constant
 -    Version: v0.1.0.1+
 -  }
 -  MS_UTILS_RESIZEDIALOG:PAnsiChar = 'Utils/ResizeDialog';
 -
 -  {
 -    wParam : countryID
 -    lParam : 0
 -    Affect : Get the name of a country given it's number, e.g. 44 = UK
 -    Returns: Returns a pointer to a string containing the country name on success
 -             NULL(0) on failure
 -    Version: v0.1.2.0+
 -  }
 -  MS_UTILS_GETCOUNTRYBYNUMBER:PAnsiChar = 'Utils/GetCountryByNumber';
 -
 -  {
 -    wParam : Pointer to an int to be filled with count  -- !TODO! test.
 -    lParam : Pointer to an PCountryListEntry, see notes
 -    Affect : Get the full list of country IDs, see notes
 -    Returns: 0 always
 -    Notes  : the list is sorted alphabetically by name, on the assumption
 -             it's quicker to search numbers that are out of outer, than strings
 -             that are out of order. a NULL(0) entry terminates
 -             -
 -             Neither wParam or lParam can be NULL(0)
 -             -
 -             lParam is filled with the first entry, it can be accessed as a pointer,
 -             to get the next entry, increment the pointer by sizeof(Pointer) NOT
 -             sizeof(TCountryList), only increment the pointer as many times as
 -             given by iCount.
 -             -
 -             this data can NOT be copied if an array of TCountryListEntry's is passed
 -             so don't try it.
 -    Version: v0.1.2.0+
 -  }
 -  MS_UTILS_GETCOUNTRYLIST:PAnsiChar = 'Utils/GetCountryList';
 -
 -  // see WindowList_* functions below
 -
 -  {
 -    wParam : 0
 -    lParam : 0
 -    Affect : Allocate a window list
 -    Returns: A handle to the new window list
 -    Version: v0.1.0.1+
 -  }
 -  MS_UTILS_ALLOCWINDOWLIST:PAnsiChar = 'Utils/AllocWindowList';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to an initalised TWINDOWLISTENTRY structure
 -    Affect : Add a window to a given window list handle
 -    Returns: 0 on success, [non zero] on failure
 -    Version: v0.1.0.1+
 -  }
 -  MS_UTILS_ADDTOWINDOWLIST:PAnsiChar = 'Utils/AddToWindowList';
 -
 -  {
 -    wParam : Handle to window list to remove from
 -    lParam : Window handle to remove
 -    Affect : Remove a window from the specified window list
 -    Returns: 0 on success, [non zero] on failure
 -    Version: v0.1.0.1+
 -  }
 -  MS_UTILS_REMOVEFROMWINDOWLIST:PAnsiChar = 'Utils/RemoveFromWindowList';
 -
 -  {
 -    wParam : Handle to the window list to look in
 -    lParam : Handle to a HCONTACT to find in the window list
 -    Affect : Find a window handle given the hContact
 -    Returns: The found window handle or NULL(0) on failure
 -    Version: v0.1.0.1+
 -  }
 -  MS_UTILS_FINDWINDOWINLIST:PAnsiChar = 'Utils/FindWindowInList';
 -
 -  {
 -    wParam : Handle to window list
 -    lParam : Pointer to TMSG (initalised with what to broadcast)
 -    Affect : Broadcast a message to all windows in a list, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : only TMSG.Message, .wParam, .lParam are used
 -    Version: v0.1.0.1+
 -  }
 -  MS_UTILS_BROADCASTTOWINDOWLIST:PAnsiChar = 'Utils/BroadcastToWindowList';
 -
 -  {
 -  Version: 0.3.0.0+
 -  Inline helper: WindowList_BroadcastAsync
 -  wParam : Handle to window list
 -  lParam : Pointer to TMSG (initalised with what to broadcast)
 -  Affect : Broadcast a message to all windows in the given list using PostMessage()
 -  Returns: 0 on success, nonzero on failure, this service does not fail,
 -           even if PostMessage() fails for whatever reason
 -  }
 -  MS_UTILS_BROADCASTTOWINDOWLIST_ASYNC:PAnsiChar = 'Utils/BroadcastToWindowListAsync';
 -
 -  {
 -    There aren't any services here, there's no need for them, the control class
 -    will obey the SS_LEFT (0), SS_CENTER (1), SS_RIGHT(2) styles
 -    the control will send STN_CLICKED via WM_COMMAND when the link itself is clicked
 -    -
 -    These are defined by STATIC controls and STN_CLICKED is sent to standard
 -    STATIC classes when they're clicked -- look at WINAPI docs for more info
 -  }
 -  WNDCLASS_HYPERLINK = 'Hyperlink';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to a initialised TSAVEWINDOWPOS structure
 -    Affect :
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  :
 -    Version: v0.1.1.0+
 -  }
 -  MS_UTILS_SAVEWINDOWPOSITION:PAnsiChar = 'Utils/SaveWindowPos';
 -
 -  {
 -    wParam : see RWPF_* flags
 -    lParam : Pointer to a initalised TSAVEWINDOWPOS
 -    Affect : Restores the position of a window from the database, see notes
 -    Returns: 0 on success, [non zero] on failure
 -    Notes  : If no position info was found, the service will return 1.
 -             The NoSize version won't use stored information size, the window
 -             is left the same size
 -             -
 -             See Utils_RestoreWindowPosition() Helper function, this function is
 -             a bit different from the C function (which can be inlined too! dammit)
 -             that there's only one function and not three (which just passed different flags)
 -    Version: v0.1.1.0+
 -  }
 -  MS_UTILS_RESTOREWINDOWPOSITION:PAnsiChar = 'Utils/RestoreWindowPos';
 -
 -{
 -    wParam : pointer to RECT
 -    lParam : 0
 -    Affect : Moves a RECT inside screen if it is outside.It works with multiple monitors (v0.9.0.4+)
 -    Returns: <0 on error, 0 if not changed the rect, 1 if changed the rect
 -}
 -  MS_UTILS_ASSERTINSIDESCREEN:pAnsiChar = 'Utils/AssertInsideScreen';
 -
 -  {
 -    wParam : 0
 -    lParam : Pointer to a null terminated string containing filename
 -    Affect : Loads a bitmap (or other graphic type, see Notes
 -    Returns: HBITMAP on success, NULL(0) on failure
 -    Notes  : This function also supports JPEG, GIF (and maybe PNG too)
 -             For speed, if the file extention is .bmp or .rle it will use LoadImage()
 -             and not load OLE for the extra image support
 -             -
 -             Remember to delete the returned handle with DeleteObject (see GDI documentation for WINAPI)
 -    Version: v0.1.2.1+
 -  }
 -  MS_UTILS_LOADBITMAP :PAnsiChar = 'Utils/LoadBitmap';
 -  MS_UTILS_LOADBITMAPW:PAnsiChar = 'Utils/LoadBitmapW';
 -
 -  {
 -      wParam : byte length of buffer (not to be confused with byte range)
 -      lParam : Pointer to buffer
 -      Affect : Get the filter strings for use in the open file dialog, see notes
 -      Returns: 0 on success [non zero] on failure
 -      Notes  : See the WINAPI under OPENFILENAME.lpStrFiler for formatting,
 -               an 'All bitmaps' item is alway first, and 'All files' is always last
 -               -
 -               The returned string is always formatted
 -               -
 -               To build this filter, the filter string consists of
 -               filter followed by a descriptive text
 -               followed by more filters and their descriptive texts -- end with double NULL(0)
 -               e.g. *.bmp' #0 'All bitmaps' #0 '*.*' #0 'All Files' #0 #0
 -  }
 -  MS_UTILS_GETBITMAPFILTERSTRINGS :PAnsiChar = 'Utils/GetBitmapFilterStrings';
 -  MS_UTILS_GETBITMAPFILTERSTRINGSW:PAnsiChar = 'Utils/GetBitmapFilterStringsW';
 -
 -  {
 -    wParam : pszPath
 -    lParam : pszNewPath
 -    Affect : Saves a path to a relative path (from the miranda directory)
 -             Only saves as a relative path if the file is in the miranda
 -             directory (or sub directory)
 -    Notes  : pszPath is the path to convert and pszNewPath is the buffer that
 -             the new path is copied too. pszNewPath MUST be of the size MAX_PATH.
 -    Returns: numbers of chars copied.
 -  }
 -  MS_UTILS_PATHTORELATIVE :PAnsiChar = 'Utils/PathToRelative';
 -//Unicode versions (0.6.2+)
 -  MS_UTILS_PATHTORELATIVEW:PAnsiChar = 'Utils/PathToRelativeW';
 -
 -  {
 -    Affect : Saves a path to a absolute path (from the miranda directory)
 -    wParam : pszPath
 -    lParam : pszNewPath
 -    Notes  : pszPath is the path to convert and pszNewPath is the buffer that
 -             the new path is copied too. pszNewPath MUST be of the size MAX_PATH.
 -    Returns: numbers of chars copied.
 -  }
 -  MS_UTILS_PATHTOABSOLUTE :PAnsiChar = 'Utils/PathToAbsolute';
 -//Unicode versions (0.6.2+)
 -  MS_UTILS_PATHTOABSOLUTEW:PAnsiChar = 'Utils/PathToAbsoluteW';
 -
 -{
 -  Creates a directory tree (even more than one directories levels are missing) 0.7.0+
 -  wParam=0 (unused)
 -  lParam=pszPath - directory to be created
 -  Returns 0 on success error code otherwise
 -  Unicode version is available since 0.7.0
 -}
 -  MS_UTILS_CREATEDIRTREE :PAnsiChar = 'Utils/CreateDirTree';
 -  MS_UTILS_CREATEDIRTREEW:PAnsiChar = 'Utils/CreateDirTreeW';
 -
 -{
 -   Generates Random number of any length
 -  wParam=size - length of the random number to generate
 -  lParam=(LPARAM)(char*)pszArray - pointer to array to fill with random number
 -  Always returns 0
 -}
 -  MS_UTILS_GETRANDOM:PAnsiChar = 'Utils/GetRandom';
 -
 -//Replace variables in text
 -//wParam=(char*/TCHAR*/WCHAR*)string (depends on RVF_UNICODE/RVF_TCHAR flag)
 -//lParam=(REPLACEVARSDATA *) data about variables, item with key=0 terminates the list
 -//returns new string, use mir_free to destroy
 -type
 -  PREPLACEVARSARRAY = ^TREPLACEVARSARRAY;
 -  TREPLACEVARSARRAY = record
 -    szKey  :TCHAR;
 -    szValue:TCHAR;
 -  end;
 -
 -type
 -  TREPLACEVARSDATA = record
 -    cbSize   :int;
 -    dwFlags  :dword;
 -    hContact :THANDLE;
 -    variables:PREPLACEVARSARRAY;
 -  end;
 -
 -const
 -  RVF_UNICODE = 1;
 -
 -  MS_UTILS_REPLACEVARS:PAnsiChar = 'Utils/ReplaceVars';
 -
 -{
 -  variables known by the core:
 -  ----------------------------
 -  %miranda_profile%     -> same as MS_DB_GETPROFILEPATH, base folder for all profiles
 -  %miranda_userdata%    -> the active profile folder (home of the .dat file and all
 -                           profile data)
 -  %miranda_path%        -> home path of the miranda installation (installation path
 -                           of miranda32/64.exe
 -  %miranda_profilename% -> Name of the profile in use. Essentially, the name of the
 -                           .dat file without file name extension. Also: the folder name
 -                           relative to %miranda_profile% where all profile data is stored.
 -  %miranda_logpath%     -> base folder for log files. This is \Logs relative to the
 -                           current profile folder.
 -  %miranda_avatarcache% -> base folder for all protocol avatars. internal use only.
 -
 -  the following variables operate on contacts. REPLACEVARSDATA::hContact must be
 -  supplied by the caller.
 -
 -  %nick%                -> a contact nick name.
 -  %proto%               -> internal protocol name for a given contact. NOT the user-
 -                           defined account name.
 -  %userid%              -> Unique ID for a given contact (UIN, JID etc.)
 -
 -  the following variables are system variables - unrelated to miranda profiles.
 -
 -  %appdata%             -> same as %APPDATA% environment variable.
 -  %destkop%             -> location of the desktop folder in a user's profile.
 -  %mydocuments%         -> location of the "My Documents" shell folder.
 -}
 -
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/statusmodes.inc b/plugins/Pascal_Headers/statusmodes.inc deleted file mode 100644 index e555c80a4b..0000000000 --- a/plugins/Pascal_Headers/statusmodes.inc +++ /dev/null @@ -1,52 +0,0 @@ -{
 -Miranda IM: the free IM client for Microsoft* Windows*
 -
 -Copyright 2000-2003 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 STATUSMODES}
 -{$DEFINE STATUSMODES}
 -
 -const
 -  // add 1 to the ID_STATUS_CONNECTING to mark retries (v0.1.0.1+)
 -  // e.g. ID_STATUS_CONNECTING+2 is the third connection attempt, or the second retry
 -  ID_STATUS_CONNECTING = 1;
 -
 -  // max retries is just a marker, so that the clist knows what
 -  // numbers represent retries, it should set any kind of limit on the number
 -  // of retries you can and/or should do
 -  MAX_CONNECT_RETRIES = 10000;
 -
 -  // and the modes!
 -
 -  ID_STATUS_OFFLINE    = 40071;
 -  ID_STATUS_ONLINE     = 40072;
 -  ID_STATUS_AWAY       = 40073;
 -  ID_STATUS_DND        = 40074;
 -  ID_STATUS_NA         = 40075;
 -  ID_STATUS_OCCUPIED   = 40076;
 -  ID_STATUS_FREECHAT   = 40077;
 -  ID_STATUS_INVISIBLE  = 40078;
 -  ID_STATUS_ONTHEPHONE = 40079;
 -  ID_STATUS_OUTTOLUNCH = 40080;
 -  ID_STATUS_IDLE       = 40081; // do not use as a status
 -
 -  MAX_STATUS_COUNT = (ID_STATUS_OUTTOLUNCH-ID_STATUS_OFFLINE+1);
 -
 -{$ENDIF}
 diff --git a/plugins/Pascal_Headers/testdll.dpr b/plugins/Pascal_Headers/testdll.dpr deleted file mode 100644 index f30da207ec..0000000000 --- a/plugins/Pascal_Headers/testdll.dpr +++ /dev/null @@ -1,79 +0,0 @@ -library testdll;
 -
 -uses
 -  m_api, Windows;
 -
 -var
 -  PluginInterfaces:array [0..1] of MUUID;
 -
 -function MirandaPluginInfoEx(mirandaVersion:DWORD):PPLUGININFOEX; cdecl;
 -begin
 -  result:=@PluginInfo;
 -  PluginInfo.cbSize     :=SizeOf(TPLUGININFOEX);
 -  PluginInfo.shortName  :='Plugin Template';
 -  PluginInfo.version    :=$00000001;
 -  PluginInfo.description:='The long description of your plugin, to go in the plugin options dialog';
 -  PluginInfo.author     :='J. Random Hacker';
 -  PluginInfo.authorEmail:='noreply@sourceforge.net';
 -  PluginInfo.copyright  :='(c) 2003 J. Random Hacker';
 -  PluginInfo.homepage   :='http://miranda-icq.sourceforge.net/';
 -  PluginInfo.flags      :=UNICODE_AWARE;
 -  PluginInfo.replacesDefaultModule:=0;
 -  PluginInfo.uuid       :=MIID_TESTPLUGIN;//'{08B86253-EC6E-4d09-B7A9-64ACDF0627B8}';
 -end;
 -
 -function PluginMenuCommand(wParam: WPARAM; lParam: LPARAM):int_ptr; cdecl;
 -begin
 -  Result:=0;
 -  // this is called by Miranda, thus has to use the cdecl calling convention
 -  // all services and hooks need this.
 -  MessageBox(0, 'Just groovy, baby!', 'Plugin-o-rama', MB_OK);
 -end;
 -
 -var
 -  onloadhook:THANDLE;
 -
 -function OnModulesLoaded(wParam:WPARAM;lParam:LPARAM):int;cdecl;
 -var
 -  mi:TCListMenuItem;
 -begin
 -  Result:=0;
 -  UnhookEvent(onloadhook);
 -
 -  CreateServiceFunction('TestPlug/MenuCommand', @PluginMenuCommand);
 -  FillChar(mi,SizeOf(mi),0);
 -  mi.cbSize    :=SizeOf(mi);
 -  mi.position  :=$7FFFFFFF;
 -  mi.flags     :=0;
 -  mi.hIcon     :=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
 -  mi.szName.a  :='&Test Plugin...';
 -  mi.pszService:='TestPlug/MenuCommand';
 -  Menu_AddMainMenuItem(@mi)
 -end;
 -
 -function Load():int; cdecl;
 -begin
 -  Langpack_register;
 -  onloadhook:=HookEvent(ME_SYSTEM_MODULESLOADED,@OnModulesLoaded);
 -
 -  Result:=0;
 -end;
 -
 -function Unload:int; cdecl;
 -begin
 -  Result:=0;
 -end;
 -
 -function MirandaPluginInterfaces:PMUUID; cdecl;
 -begin
 -  PluginInterfaces[0]:=MIID_TESTPLUGIN;
 -  PluginInterfaces[1]:=MIID_LAST;
 -  result:=@PluginInterfaces;
 -end;
 -
 -exports
 -  Load, Unload,
 -  MirandaPluginInterfaces,MirandaPluginInfoEx;
 -
 -begin
 -end.
  | 
