summaryrefslogtreecommitdiff
path: root/YAMN
diff options
context:
space:
mode:
Diffstat (limited to 'YAMN')
-rw-r--r--YAMN/include/m_icolib.h75
-rw-r--r--YAMN/include/m_kbdnotify.h64
-rw-r--r--YAMN/include/m_uninstaller.h700
-rw-r--r--YAMN/m_account.h239
-rw-r--r--YAMN/m_filterplugin.h139
-rw-r--r--YAMN/m_messages.h41
-rw-r--r--YAMN/m_protoplugin.h389
-rw-r--r--YAMN/m_synchro.h160
-rw-r--r--YAMN/m_yamn.h154
9 files changed, 0 insertions, 1961 deletions
diff --git a/YAMN/include/m_icolib.h b/YAMN/include/m_icolib.h
deleted file mode 100644
index a31abe2..0000000
--- a/YAMN/include/m_icolib.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// ---------------------------------------------------------------------------80
-// Icons Library Manager plugin for Miranda Instant Messenger
-// __________________________________________________________
-//
-// Copyright © 2005 Denis Stanishevskiy // StDenis
-// Copyright © 2006 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.
-//
-// -----------------------------------------------------------------------------
-
-#define SKINICONDESC_SIZE sizeof(SKINICONDESC)
-#define SKINICONDESC_SIZE_V1 0x18
-#define SKINICONDESC_SIZE_V2 0x1C
-#define SKINICONDESC_SIZE_V3 0x24
-
-typedef struct {
- int cbSize;
- union {
- char *pszSection; // section name used to group icons
- TCHAR *ptszSection;
- wchar_t *pwszSection;
- };
- union {
- char *pszDescription; // description for options dialog
- TCHAR *ptszDescription;
- wchar_t *pwszDescription;
- };
- char *pszName; // name to refer to icon when playing and in db
- char *pszDefaultFile; // default icon file to use
- int iDefaultIndex; // index of icon in default file
- HICON hDefaultIcon; // handle to default icon
- int cx,cy; // dimensions of icon
- int flags;
-} SKINICONDESC;
-
-#define SIDF_UNICODE 0x100 // Section and Description are in UCS-2
-
-#if defined(_UNICODE)
- #define SIDF_TCHAR SIDF_UNICODE
-#else
- #define SIDF_TCHAR 0
-#endif
-
-//
-// Add a icon into options UI
-//
-// wParam = (WPARAM)0
-// lParam = (LPARAM)(SKINICONDESC*)sid;
-//
-#define MS_SKIN2_ADDICON "Skin2/Icons/AddIcon"
-
-//
-// Retrieve HICON with name specified in lParam
-// Returned HICON SHOULDN'T be destroyed, it is managed by IcoLib
-//
-
-#define MS_SKIN2_GETICON "Skin2/Icons/GetIcon"
-
-//
-// Icons change notification
-//
-#define ME_SKIN2_ICONSCHANGED "Skin2/IconsChanged"
diff --git a/YAMN/include/m_kbdnotify.h b/YAMN/include/m_kbdnotify.h
deleted file mode 100644
index 256c009..0000000
--- a/YAMN/include/m_kbdnotify.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-
-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 _KBDNOTIFY_
-#define _KBDNOTIFY_
-
-//Enables all notifications (for use by BossKey)
-//wParam=0
-//lParam=0
-//returns 0
-#define MS_KBDNOTIFY_ENABLE "KeyboardNotify/Enable"
-
-
-//Disables all notifications (for use by BossKey)
-//wParam=0
-//lParam=0
-//returns 0
-#define MS_KBDNOTIFY_DISABLE "KeyboardNotify/Disable"
-
-
-//Makes the flashing begin
-//wParam=(unsigned int)eventCount
-//lParam=(char *)szFlashingSequence or NULL if you want the plugin to use current settings
-//returns 0
-#define MS_KBDNOTIFY_STARTBLINK "KeyboardNotify/StartBlinking"
-
-
-//Receives the number of events that were opened (usuful for the 'until events opened' setting)
-//wParam=(unsigned int)eventCount
-//lParam=0
-//returns 0
-#define MS_KBDNOTIFY_EVENTSOPENED "KeyboardNotify/EventsWereOpened"
-
-
-//Informs if the flashing is active
-//wParam=0
-//lParam=0
-//returns 0 if the flashing is inactive or a pointer to the string representing the sequence being used
-#define MS_KBDNOTIFY_FLASHINGACTIVE "KeyboardNotify/IsFlashingActive"
-
-
-//Normalizes the flashing sequence informed
-//wParam=0
-//lParam=(char *)szFlashingSequence <- it is rewritten
-//returns a pointer to the string representing the sequence normalized (which is in fact lParam)
-#define MS_KBDNOTIFY_NORMALSEQUENCE "KeyboardNotify/NormalizeSequence"
-
-
-#endif
diff --git a/YAMN/include/m_uninstaller.h b/YAMN/include/m_uninstaller.h
deleted file mode 100644
index e26f55c..0000000
--- a/YAMN/include/m_uninstaller.h
+++ /dev/null
@@ -1,700 +0,0 @@
-/*
-
- PluginUninstaller 1.1.2.1 for Miranda IM 0.3.3a and +
- ------------------------------------------------------------------------
- Developers - C/C++ Header File
-
- Plugin Info: ----------------------------
- | Version: 1.1.2.1
- | Filename: uninstaller.dll
- | Author: H. Herkenrath (hrathh@users.sourceforge.net)
- | Description: Extends the plugin options and offers the possibility
- | to directly remove plugins and delete all associated
- | settings and files.
-
- Contents: -------------------------------
- | > General Info:
- | - Uninstall Example/Template
- | - Changing displayed icon
- | - Changing displayed docs
- | - Message boxes on uninstall
- | - Service Accesibility
- | - Including this file
- |
- | > Structs:
- | - Uninstall Params (PLUGINUNINSTALLPARAMS)
- |
- | > Helpers:
- | - Macro: Run service while uninstalling (PUICallService)
- | - Function: Remove some files in directory (PUIRemoveFilesInDirectory)
- |
- | > Events:
- | - Allow to uninstall a plugin (ME_PLUGINUNINSTALLER_OKTOUNINSTALL)
- | - Plugin gets uninstalled (ME_PLUGINUNINSTALLER_UNINSTALL)
- |
- | > Services:
- | - Remove database module (MS_PLUGINUNINSTALLER_REMOVEDBMODULE)
- | - Remove a setting globally (MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY)
- | - Remove skinned sound (MS_PLUGINUNINSTALLER_REMOVESKINSOUND)
- | - Uninstall a plugin (MS_PLUGINUNISTALLER_UNISTALLPLUGIN)
- | - Getting handles (MS_PLUGINUNINSTALLER_GETHANDLE)
- |
-
-
- This file is only thought for plugin developers.
- If you only want to use "PluginUninstaller" and don't want to develop a plugin
- or something with it you don't need this file.
-
- If there are any problems or bugs with or in this file or something else
- please mail me. My e-mail address is: hrathh@users.sourceforge.net
- For more documentation you can use this address, too. :-)
-
- If you have any whishes on some plugin uninstalling for your
- plugin you can mail me, too. :-)
-
-*/
-#ifndef M_UNINSTALLER_H
-#define M_UNINSTALLER_H
-
-#ifndef CallService
- #pragma message("Mistake Alert!: "m_uninstaller.h" needs to be included after "newpluginapi.h"!\n The following errors are resulting of this mistake.\n")
-#endif
-
-
-// | General Info
-// -----------------------------
-
-// Uninstall Example/Template
-// ---------------------------
-// Making your plugin uninstallable is very easy.
-// Just add the following "Uninstall" function near the "Unload" function
-// in your plugin.
-// A template plugin is available in the source code package.
-
-// Old:
-// int __declspec(dllexport) Uninstall(BOOL bIsMirandaRunning, BOOL bDoDeleteSettings, char* pszPluginPath);
-
-// New:
-//int __declspec(dllexport) UninstallEx(PLUGINUNINSTALLPARAMS* ppup)
-//{
- // Available Variables:
- // -----------------------------
- // ppup->bIsMirandaRunning:
- // Contains if Miranda is running
- // (Currently this is always TRUE).
-
- // ppup->bDoDeleteSettings:
- // Contains if the users selected
- // that he wants all settings be deleted.
-
- // ppup->pszPluginsPath:
- // Contains the plugins directory name.
-
-
- // Notes:
- // -----------------------------
-
- // Run before "Unload" function:
- // -> IMPORTANT: Be careful not to write to the database or to files in "Unload" again!!!
- // -> Perhaps create a global BOOL variable which is set to TRUE when your plugin gets uninstalled
- // or check of a database setting "IsInstalled" in Unload() or sth. like that
-
- // All Miranda is still loaded
-
- // Here you can do:
- // - Delete settings group in database
- // - Delete registry items
- // - Delete ini-files and other settings files
- // - Delete other files
-
- // Your plugin dll gets automatically deleted
-
- // Services to remove are offered:
- // MS_PLUGINUNINSTALLER_REMOVEDBMODULE
- // MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY
- // MS_PLUGINUNINSTALLER_REMOVESKINSOUND
-
-
- // Getting other useful paths:
- // -----------------------------
-
- // System directory:
-
- //char szSysPath[MAX_PATH];
- //GetSystemDirectory(szSysPath, MAX_PATH);
-
-
- // Windows directory:
-
- //char szWinPath[MAX_PATH];
- //GetWindowsDirectory(szWinPath, MAX_PATH);
-
-
- // Other directories:
-
- // char szPath[MAX_PATH];
- // SHGetSpecialFolderPath(NULL, szPath, CSIDL_* , FALSE);
-
- // Some available dirs:
- // CSIDL_APPDATA CSIDL_SENDTO CSIDL_FAVORITES
- // CSIDL_STARTUP CSIDL_PROFILE CSIDL_DESKTOPDIRECTORY
-
-
- // Delete Files
- //const char* apszFiles[] = {"MyPlugin_Readme.txt", "MyPlugin_License.txt", "MyPlugin_Developer.txt", "MyPlugin_Translation.txt"};
- //PUIRemoveFilesInPath(ppup->pszPluginsPath, apszFiles);
-
- // Delete Settings
- //if(ppup->bDoDeleteSettings == TRUE)
- //{
- //if (ppup->bIsMirandaRunning == TRUE) // Check if it is possible to access services
- //{
- // Remove plugin's module
- //PUIRemoveDbModule("MyPlugin");
-
- // Remove plugin's sounds
- //PUIRemoveSkinSound("MySoundSetting1");
- //PUIRemoveSkinSound("MySoundSetting2");
- //}
- //}
-
- // Remember:
- // Do not forget to remove your (eventually) created registry items here, too.
-
-
- // The plugin's dll file gets deleted after returning.
-
- // Remember:
- // If your DLL file is additionally in use by another application (eg. Windows)
- // you need to free the DLL *here* completely. Otherwise it can't be deleted.
-
-// return 0;
-//}
-
-
-
-// Changing displayed icon
-// ---------------------------
-// The icon that gets displayed on the options page is always the "first"
-// icon in your DLL file.
-// An icon in your DLL file is the first icon when it has the lowest recource ID.
-// If you would like to have an other icon shown in the options please change your
-// icon resource IDs so that the icon you would like to have has the lowest one.
-// For example if you use MS Visual C++, open "resource.h" and change the resource define
-// of your prefered icon to the lowest icon number.
-
-
-// Changing displayed docs
-// ---------------------------
-// The items "License" and "More Information" on the plugin details page
-// are created when the a license and/or a readme file for the plugin exists.
-// The files get detected automatically and need a special name
-// so that they get detected.
-// The text files need to be either placed in the "Plugins" directory or
-// in the "Docs" directory. Whereof the last one is the better one :-)
-//
-// For the license file the following file name formatings are possible:
-// PluginName-License.txt (I personally think that this is the best naming solution... :-) )
-// PluginName_License.txt,
-//
-// For the readme file the following ones are possible:
-// PluginName-Readme.txt (Again...I like this one :-D ),
-// PluginName_Readme.txt,
-
-// Message boxes on uninstall
-// ---------------------------
-// If you would like to ask the user for something to remove/uninstall
-// please hook the event ME_PLUGINUNINSTALLER_UNINSTALL and show your
-// message box there. Save the action the user chose in a
-// global BOOL variable and do the chosen action in "UninstallEx".
-// You can get the plugins options window handle with MS_PLUGINUNINSTALLER_GETHANDLE.
-
-
-// Service Accessibility
-// ---------------------------
-// Remember that you only can use these functions after the event ME_SYSTEM_MODULESLOADED
-// or later because "PluginUninstaller" needs to be loaded first.
-// Normally you only use them in your "UninstallEx" function.
-//
-// IMPORTANT!:
-// Please make sure that you always use the macro PUICallService
-// in the "UninstallEx" function instead of the CallService function.
-
-
-// Including this file
-// ---------------------------
-// To use some of the uninstalling functionality you have to include this file
-// into your project.
-//
-// IMPORTANT!:
-// Please make sure that you include the file "newpluginapi.h" before this one.
-// If this isn't the case there may some compile errors come up.
-
- // -> Example:
- // If your plugin is in the directory "Plugins/MyPlugin/" and
- // this include file is in the directory "Plugins/PluginUninstaller"
- // you can use the following:
-
- //#include "../PluginUninstaller/m_uninstaller.h"
-
- // If your plugin is in an directory that is different to that one just
- // change the include path to the one you want.
-
-
-
-
-
-// | Structs
-// -----------------------------
-
-// ---------------------------------------------
-// -- Struct: Uninstall Params -----------------
-// ---------------------------------------------
-
-// Struct: PLUGINUNINSTALLPARAMS
-// (Gets passed to "UninstallEx" function)
-
-typedef int (*HELPERPROC)(const char*, WPARAM, LPARAM); // Used internally (for pHelperProcAddress)
-
-typedef struct {
- BOOL bIsMirandaRunning; // Is TRUE when Miranda is loaded and services are available (Please use PUICallService instead of CallService)
- BOOL bDoDeleteSettings; // Is TRUE when user wants to delete settings (If this is FALSE, please only delete your files)
- char* pszPluginsPath; // Contains the plugin directory path
- char* pszDocsPath; // Contains the document directory for plugins documentation (Added in version 1.1.1.0)
- char* pszIconsPath; // Contains the icon directory for icon dlls (Added in version 1.1.2.0)
- HELPERPROC pHelperProcAddress; // Used internally (Contains proc address for PUICallService)
-} PLUGINUNINSTALLPARAMS;
-
-
-
-
-
-// | Helper
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Macro: Run service while uninstalling ----
-// ---------------------------------------------
-
-// Macro: PUICallService
-
-#define PUICallService(service, wParam, lParam) (ppup->pHelperProcAddress) (service, wParam, lParam);
-
-// Description:
-// -------------
-// This service provides the possibility to call a Miranda
-// service in the "UninstallEx" function.
-// Important!: Use this macro always instead of "CallService",
-// because else a crash occurs when the plugin was decativated
-// and gets uninstalled
-
-// Parameters:
-// -------------
-// Same parameters as CallService of Miranda Core.
-
-// Return Values:
-// --------------
-// Return values are the same as the CallService function of Miranda Core.
-// Additionaly returns CALLSERVICE_NOTFOUND if Miranda is not loaded
-// which means the services are not accessable.
-
-
- // Example:
- // ----------------------------------
-
- //if ( (bIsMirandaRunning == TRUE) && (bDoDeleteSettings == TRUE) )
- //{
- // Remove plugin's module
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)"MyPlugin", 0);
- //}
-
-
-
-
-// ---------------------------------------------
-// -- Function: Remove some files in directory -
-// ---------------------------------------------
-
-// Function: PUIRemoveFilesInDirectory
-
-static BOOL __inline PUIRemoveFilesInDirectory(char* pszPath, const char* apszFiles[]);
-
-// Description:
-// -------------
-// This helper provides the possibility to easily
-// remove specified files in a specified directory.
-
-// Note: The last version of this helper (PUIRemoveFilesInPath)
-// did not work correctly.
-// Please do now always append a NULL slot to the end of your array.
-
-// Parameters:
-// -------------
-// char* pszPath = Path to the files in array
-// const LPCSTR apszFiles[] = NULL-terminated array of files to be deleted.
-
-// Return Values:
-// --------------
-// Returns TRUE if the files could be deleted.
-// FALSE if the files could not be deleted or did not exist.
-
-
-static BOOL __inline PUIRemoveFilesInDirectory(char* pszPath, const char* apszFiles[])
-{
- char szFile[MAX_PATH];
- BOOL bReturn = FALSE;
- int iFile = 0;
-
- while (apszFiles[iFile] != NULL)
- {
- strncpy(szFile, pszPath, sizeof(szFile));
- strncat(szFile, apszFiles[iFile], sizeof(szFile)-strlen(szFile));
-
- if ((BOOL)DeleteFile(szFile) == TRUE) bReturn = TRUE;
- iFile++;
- }
-
- return bReturn;
-}
-
- // Example:
- // ----------------------------------
-
- //const char* apszFiles[] = {"File1.txt", "File2.txt", "File3.txt", NULL};
- //PUIRemoveFilesInDirectory(ppup->pszPluginsPath, apszFiles);
-
-
-
-
-// | Events
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Event: Allow to uninstall a plugin -------
-// ---------------------------------------------
-
-// Event: ME_PLUGINUNINSTALLER_OKTOUNINSTALL
-
-#define ME_PLUGINUNINSTALLER_OKTOUNINSTALL "PluginUninstaller/OkToUninstall"
-
-// Submitted Values:
-// -----------------
-// wParam = pszPluginName (String containing the translated plugin name)
-// lParam = pszPluginFile (String containing the plugin dll file name in lower case)
-
-// Return Values:
-// -----------------
-// Returning 1 on this event causes the "Remove Plugin" button to be disabled.
-
-
-
-// ---------------------------------------------
-// -- Event: Plugin gets uninstalled -----------
-// ---------------------------------------------
-
-// Event: ME_PLUGINUNINSTALLER_UNINSTALL
-
-#define ME_PLUGINUNINSTALLER_UNINSTALL "PluginUninstaller/Uninstall"
-
-// Submitted Values:
-// -----------------
-// wParam = pszPluginName (String containing the translated plugin name)
-// lParam = pszPluginFile (String containing the plugin dll file name in lower case)
-
-// Return Values:
-// -----------------
-// Returning 1 on this event causes the uninstall process to be canceled.
-
-// Notice:
-// Hook this event if you would like to ask the user for something to remove/uninstall
-// and show your message box on this event. Save the action the user chose in a
-// global BOOL variable and do the chosen action in "UninstallEx".
-// You can get the plugins options window handle with MS_PLUGINUNINSTALLER_GETHANDLE.
-
-// Other plugins can use this event to be noticed that another plugin isn't installed anylonger.
-
-
-
-
-// | Services
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Service: Remove database module ----------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVEDBMODULE
-
-#define MS_PLUGINUNINSTALLER_REMOVEDBMODULE "PluginUninstaller/RemoveDbModule"
-
-// Description:
-// -------------
-// This service provides the possibility to delete all database modules
-// associated to your plugin.
-// The specified database module will be removed in all contacts
-// including the NULL contact.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszModule // Pointer to a string containd module name. Can't be NULL
-// lParam = (const char*)apszIgnoreSettings // NULL terminated array of strings. Can be 0 if no settings should be ignored.
- // See example 3 for more details
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the module was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveDbModule(pszModule) PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)pszModule, 0);
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveDbModule("MyPlugin");
-
-
- // Example 2:
- // ----------------------------------
-
- //char szModule[] = "MyModule";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szModule, 0);
-
-
- // Example 3:
- // ----------------------------------
-
- // This deletes all settings in the specified module exept
- // the specified settings: "Setting1",..."Setting4"
-
- // char szModule[] = "MyModule";
- // const char* apszIgnoreSettings[] = {"Setting1", "Setting2", "Setting3", "Setting4", NULL};
- // PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szModule, (LPARAM)&apszIgnoreSettings);
-
-
-
-// ---------------------------------------------
-// -- Service: Remove a setting globally -------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY
-
-#define MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY "PluginUninstaller/RemoveDbSettingGlobally"
-
-// Description:
-// -------------
-// This service provides the possibility to delete a specific
-// setting in database in all contacts including the NULL contact.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszModule
-// lParam = (char*)pszSetting
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the setting was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveDbSettingGlobally(pszModule, pszSetting) PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY, (WPARAM)pszModule, (LPARAM)pszSetting);
-
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveDbSettingGlobally("MyPlugin", "MySetting");
-
-
- // Example 2:
- // ----------------------------------
-
- //szModule[] = "MyPlugin";
- //szSetting[] = "MySetting";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY, (WPARAM)szModule, (LPARAM)szSetting);
-
-
-
-
-
-
-// ---------------------------------------------
-// -- Service: Remove skinned sound ------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVESKINSOUND
-
-#define MS_PLUGINUNINSTALLER_REMOVESKINSOUND "PluginUninstaller/RemoveSkinSound"
-
-// Description:
-// -------------
-// This service provides the possibility to delete all your sound settings
-// associated to your plugin.
-// The specified sound will be be removed.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszSoundSetting
-// lParam = 0
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the sound was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveSkinSound(pszSoundSetting) PUICallService(MS_PLUGINUNINSTALLER_REMOVESKINSOUND, (WPARAM)pszSoundSetting, 0);
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveSkinSound("MySoundSetting");
-
-
- // Example 2:
- // ----------------------------------
-
- //szSoundModule[] = "MySoundSetting";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szSoundSetting, 0);
-
-
-
-
-
-// ---------------------------------------------
-// -- Service: Uninstall a plugin --------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN
-
-#define MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN "PluginUninstaller/UninstallPlugin"
-
-// Description:
-// -------------
-// This service marks a plugin to be uninstalled at next restart of Miranda IM.
-// It uses the default value for "Delete all settings".
-// You can use this service for example when you want that your sub-plugin gets
-// also removed when your main-plugin is uninstalled.
-// Note: This service is not needed for the normal uninstalling functionality.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszPluginName // do not translate this!
-// lParam = (char*)pszPluginFile // without path, only file name!
-
-// Return Values:
-// --------------
-// Returns always 0.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-int __inline PUIUninstallPlugin(char* pszPluginName, char* pszPluginFile)
-{
- return CallService(MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN, (WPARAM)pszPluginName, (LPARAM)pszPluginFile);
-}
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIUninstallPlugin("PluginName", "plugin.dll");
-
-
- // Example 2:
- // ----------------------------------
-
- // hInst => Handle of a specific (your?) plugin
- // char szPluginName[] = "YourPluginName";
-
- //char* pFileName;
- //char szPath[MAX_PATH];
-
- //GetModuleFileName(hInst, szPath, sizeof(szPath));
- //pFileName = strrchr(szPath, '\\');
- //pFileName = pFileName+1; // Pointer arithmetic
-
- //CallService(MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN, (WPARAM)szPluginName, (LPARAM)pFileName);
-
-
-
-
-// ---------------------------------------------
-// -- Service: Getting handles -----------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_GETHANDLE
-
-#define MS_PLUGINUNINSTALLER_GETHANDLE "PluginUninstaller/GetHandle"
-
-// Description:
-// -------------
-// This service gets a specified window/instance handle.
-
-// Note: This service must not be used in "UninstallEx" function.
-// It is mainly thought for being used in ME_PLUGINUNINSTALLER_UNINSTALL event
-// to give out a MessageBox or something like that.
-
-// Parameters:
-// -------------
-// wParam = UINT uHandleType;
-// lParam = 0
-
-// Possible values for wParam:
-#define PUIHT_HINST_PLUGIN_INSTANCE 0 // HINSTANCE of the PluginUninstaller plugin
-#define PUIHT_HWND_PLUGIN_OPTIONS 1 // HWND of the plugin options dialog (if it is loaded; else NULL)
-
-// Return Values:
-// --------------
-// Returns the specified handle value.
-// If no handle type is specified it returns NULL.
-// The handle doesn't need to be destroyed.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-HANDLE __inline PUIGetHandle(UINT uHandleType)
-{
- return (HANDLE)CallService(MS_PLUGINUNINSTALLER_GETHANDLE, uHandleType, 0);
-}
-
-#endif
-
-
- // Example
- // ----------------------------------
-
- //HWND hwndDlg;
- //hwndDlg = (HWND)PUIGetHandle(PUIHT_HWND_PLUGIN_OPTIONS);
-
-
-
-
-
-#endif // M_UNINSTALLER_H
diff --git a/YAMN/m_account.h b/YAMN/m_account.h
deleted file mode 100644
index 2baadd2..0000000
--- a/YAMN/m_account.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * This file defines all needed parameters for one account.
- * Other plugin can use this (so YAMN does not check it and another plugin can inform YAMN about new mail e.g.),
- * this can be usefull for plugins like Yahoo or MSN (Hotmail notify)
- *
- * (c) majvan 2002-2004
- */
-
-#ifndef __ACCOUNT_H
-#define __ACCOUNT_H
-
-#include <windows.h>
-#include <tchar.h>
-#include "m_synchro.h" //include synchronizing objects. If you want to write protocol plugin, which works with YAMN accounts, it must use YAMN synchronizing objects
-
-//
-//================================== OTHER DEFINITIONS ========================================
-//
-
-enum
-{
-// Error codes returned from functions (services) working with account book files
- EACC_SYSTEM=1, //use GetLastError() to retrieve detailed information about error
- EACC_ALLOC, //problem with memory allocation
- EACC_FILECOMPATIBILITY, //file is corrupted
- EACC_ENDOFFILE, //unexpected end of file occured
- EACC_FILEVERSION, //file should be YAMN book format, but newer version that expected
- EACC_FILESIZE, //file has wrong size
-};
-
-enum
-{
-// Status of account
-// used in messages WM_YAMN_CHANGESTATUS
-// used also in function GetStatus and SetStatus
- ACC_IDLE=0, //account is IDLE (no work is performed with account)
- ACC_FINDING, //DNS lookup for account
- ACC_CONNECTING, //connecting in progress
- ACC_LOGGING, //logging in progress
- ACC_WORKING, //working
- ACC_DISCONNECTING, //disconnecting from server
-};
-
-typedef struct CNotification
-{
-//#define YAMN_NOTIFICATIONVERSION is not implemented, use YAMN_ACCOUNTVERSION instead
- CNotification(): PopUpB(0), PopUpT(0), PopUpTime(0), App(NULL), AppParam(NULL), Sound(NULL), TrayIcon1(NULL), TrayIcon2(NULL) {}
-
-#define YAMN_ACC_SND 0x00000001 //Plays sound (1)
-#define YAMN_ACC_MSG 0x00000002 //Shows dialog
-#define YAMN_ACC_ICO 0x00000004 //Shows system tray icon (1)
-#define YAMN_ACC_ICOB 0x00000008 //not used now, enables tray icon flashing (1)
-#define YAMN_ACC_APP 0x00000010 //Runs application (1)
-#define YAMN_ACC_POP 0x00000020 //Shows popup
-#define YAMN_ACC_POPC 0x00000040 //Use custom colors in popup
-#define YAMN_ACC_MSGP 0x00000080 //Persistant messgage. This means, when an situation occurs (e.g. new mail) and message is displayed, it is not destroyed when YAMN_ACC_MSG is not set
-#define YAMN_ACC_KBN 0x00000100 //Use Keyboard notify
-#define YAMN_ACC_CONT 0x00000200 //Use Contact notify
-#define YAMN_ACC_CONTNICK 0x00000400 //Use Contact Nick replacement
-#define YAMN_ACC_CONTNOEVENT 0x00000800 //Suppress event for this contact
-//(1) - usable only in newmail notification
- DWORD Flags;
-
- COLORREF PopUpB;
- COLORREF PopUpT;
- DWORD PopUpTime;
- WCHAR *App;
- WCHAR *AppParam;
-
-//These parameters are not stored in standard YAMN book file and therefore must be set by plugin
- char *Sound;
- HICON TrayIcon1;
- HICON TrayIcon2;
-} YAMN_NOTIFICATION,*PYAMN_NOTIFICATION;
-
-typedef struct CServer
-{
- CServer(): Name(NULL),Login(NULL),Passwd(NULL) {}
-
- TCHAR *Name;
- DWORD Port;
-
- TCHAR *Login;
-
-// Password encryption definitions
-#define STARTCODEPSW 0x50
-#define ADDCODEPSW 0x0
- TCHAR *Passwd;
-
-} *PSERVER;
-
-//
-//================================== ACCOUNT DEFINITION ==================================
-//
-
-typedef struct CAccount
-{
-#define YAMN_ACCOUNTFILEVERSION 2 //version of standard file format (YAMN book file format)
-#define YAMN_ACCOUNTVERSION 3
-//If changes are made in this structure, version is changed.
-//So then YAMN does not initialzie your structure, if version does not matches.
-
- BOOL AbleToWork; //This is set to TRUE by default. When it is needed to stop working on this account, YAMN sets this to zero.
-
- struct CYAMNProtoPlugin *Plugin; //free access, because this member should not be changed. The same as YAMN_PLUGIN structure
-
- TCHAR *Name; //access only through AccountAccessSO
-
-// DWORD Abilities; //access only through AccountAccessSO
-
- PSERVER Server; //access only through AccountAccessSO
-
- WORD Interval; //access only through AccountAccessSO
-
-// YAMN account flags (set by user)
-#define YAMN_ACC_ENA 0x00000001 //Enables account. If account is disabled, no countdown is performed
-#define YAMN_ACC_POPN 0x00000002 //Shows one popup per one new mail or for N mails
-#define YAMN_ACC_APOP 0x00000004 //Use APOP authentication
-#define YAMN_ACC_SSL23 0x00000008 //Use SSLv2,3
-#define YAMN_ACC_NOTLS 0x00000010 //Don't try StartTLS (STLS) even available
-#define YAMN_ACC_BODY 0x00000020 //Always retrieve body of the message
- DWORD Flags; //access only through AccountAccessSO
-
-// YAMN account flags (set by plugin)
-#define YAMN_ACC_BROWSE 0x00000001 //Can browse mails. On this account we can run mailbrowser window
-#define YAMN_ACC_POPUP 0x00000002 //Popups of new mail belonging to this account can be showed
- DWORD AbilityFlags;
-
-// YAMN account status flags
-#define YAMN_ACC_ST0 0x00000001 //Check (countdown) when Offline
-#define YAMN_ACC_ST1 0x00000002 //Check (countdown) when Online
-#define YAMN_ACC_ST2 0x00000004 //Check (countdown) when Away
-#define YAMN_ACC_ST3 0x00000008 //Check (countdown) when N/A
-#define YAMN_ACC_ST4 0x00000010 //Check (countdown) when Occupied
-#define YAMN_ACC_ST5 0x00000020 //Check (countdown) when DND
-#define YAMN_ACC_ST6 0x00000040 //Check (countdown) when Free for chat
-#define YAMN_ACC_ST7 0x00000080 //Check (countdown) when Invisible
-#define YAMN_ACC_ST8 0x00000100 //Check (countdown) when On the phone
-#define YAMN_ACC_ST9 0x00000200 //Check (countdown) when Out to lunch
-#define YAMN_ACC_STARTA 0x00010000 //Check on start anyway
-#define YAMN_ACC_STARTS 0x00020000 //Check on start regarding to status setting
-#define YAMN_ACC_FORCE 0x00040000 //Check when "check new mail" item pressed (it is called forced checking)
- DWORD StatusFlags; //access only through AccountAccessSO
-
-// Plugin flags. Use this DWORD if you want YAMN to store it to YAMN book file. You can set here any value
- DWORD PluginFlags;
-
- YAMN_NOTIFICATION NewMailN; //access only through AccountAccessSO
- YAMN_NOTIFICATION NoNewMailN; //access only through AccountAccessSO
- YAMN_NOTIFICATION BadConnectN; //access only through AccountAccessSO
-
- SYSTEMTIME LastChecked; //last check, access only through AccountAccessSO
- SYSTEMTIME LastSChecked; //last check (successfull), access only through AccountAccessSO
- SYSTEMTIME LastSynchronised; //last synchronisation (successfull), access only through AccountAccessSO
- SYSTEMTIME LastMail; //last check when new mail detected, access only through AccountAccessSO
-
- char Status[255]; //access only through GetStatusFcn() and SetStatusFcn() functions
-
- DWORD TimeLeft; //access only through AccountAccessSO
-
- HANDLE Mails; //access only through MessagesAccessSO
-
-//Account members are mostly the same, but there can be protocol (POP3,IMAP...) special features.
-//To use them, only inherit this class and add your own features.
-//First idea was to add pointer to void, where plugin can store its own values.
-//But this solution is better in my opinion.
-
-//This is event with counter. Event is signaled when no threads are using account (and will not be using)
-//Very usefull for account delete operation
- PSCOUNTER UsingThreads;
-
-//We have to achieve, that only one thread can write to account and more threads can read.
-//Writing to account means that we change account parameters
-//Reading from account meands we read account parameters
-//Use WaitToRead(), ReadDone(), WaitToWrite(), WriteDone() synchronization functions
-//For plugins, this is a pointer to void. It does not matter for plugin what is this variable for,
-//because plugin works only with synchronization routines. And why is this void * ? It is because
-//plugin does not need to include headers for SWMRG structures...
- PSWMRG AccountAccessSO;
-
-//We have to achieve, that only one thread can write to account mails and more threads can read.
-//While some thread writes mails, other thread can write to account. This can be small problem, but it never appears in YAMN.
-//But you should think about this note if you want to add some features in the future
-//Writing to messages means any changes to message queue or message data
-//Reading from messages means reading message queue (browsing through all messages) or reading message data
-//Use MsgsWaitToRead(),MsgsReadDone(),MsgsWaitToWrite(),MsgsWriteDone() synchronization functions
- PSWMRG MessagesAccessSO;
-
-//For clist contact notification
- HANDLE hContact;
- BOOL isCounting;
-
- struct CAccount *Next;
-} *HACCOUNT;
-
-//
-//================================== FUNCTIONS DEFINITIONS ========================================
-//
-
-typedef void (WINAPI *YAMN_SETSTATUSFCN)(HACCOUNT,TCHAR *);
-typedef void (WINAPI *YAMN_GETSTATUSFCN)(HACCOUNT,TCHAR *);
-
-//
-//================================== QUICK FUNCTION CALL DEFINITIONS ========================================
-//
-
-//These are defininitions for YAMN exported functions. Your plugin can use them.
-//pYAMNFcn is global variable, it is pointer to your structure containing YAMN functions.
-//It is something similar like pluginLink variable in Miranda plugin. If you use
-//this name of variable, you have already defined these functions and you can use them.
-//It's similar to Miranda's CreateService function.
-
-//How to use YAMN functions:
-//Create a structure containing pointer to functions you want to use in your plugin
-//This structure can look something like this:
-//
-// struct
-// {
-// YAMN_SETSTATUSFCN SetStatusFcn;
-// YAMN_GETSTATUSFCN GetStatusFcn;
-// } *pYAMNFcn;
-//
-//then you have to fill this structure with pointers...
-//
-// pYAMNFcn->SetStatusFcn=(YAMN_SETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETSTATUSID,(LPARAM)0);
-// pYAMNFcn->GetStatusFcn=(YAMN_GETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_GETSTATUSID,(LPARAM)0);
-//
-//and in your plugin just simply use e.g.:
-//
-// SetAccountStatus(ActualAccount,ACC_CONNECTING); //this command set account status to "connecting to server"
-//
-
-#define YAMN_SETSTATUSID "YAMN/SetStatus"
-#define YAMN_GETSTATUSID "YAMN/GetStatus"
-
-#define SetAccountStatus(x,y) pYAMNFcn->SetStatusFcn(x,y)
-#define GetAccountStatus(x,y) pYAMNFcn->GetStatusFcn(x,y)
-
-#endif
diff --git a/YAMN/m_filterplugin.h b/YAMN/m_filterplugin.h
deleted file mode 100644
index 210cb0c..0000000
--- a/YAMN/m_filterplugin.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#ifndef __M_FILTERPLUGIN_H
-#define __M_FILTERPLUGIN_H
-
-#include <windows.h>
-#include "mails/m_mails.h" //for mail definition
-
-//
-//================================== IMPORTED FUNCTIONS ==================================
-//
-
-#ifndef YAMN_STANDARDFCN
-typedef DWORD (WINAPI *YAMN_STANDARDFCN)(LPVOID);
-#endif
-typedef DWORD (WINAPI *YAMN_FILTERMAILFCN)(HACCOUNT,DWORD,HYAMNMAIL,DWORD);
-
-typedef struct CFilterImportFcn
-{
-//If changes are made in this structure, version is changed.
-//So then YAMN does not initialize your structure, if version does not match.
-#define YAMN_FILTERIMPORTFCNVERSION 2
-
-//Function is called to get info from mail and mark mail as spam or not...
- YAMN_FILTERMAILFCN FilterMailFcnPtr;
-
-//Function is called when application exits. Plugin should unload
- YAMN_STANDARDFCN UnLoadFcn;
-} YAMN_FILTERIMPORTFCN, *PYAMN_FILTERIMPORTFCN;
-
-//
-//================================== FILTER PLUGIN REGISTRATION STRUCTURES ==================================
-//
-
-typedef struct CFilterPluginRegistration
-{
-#define YAMN_FILTERREGISTRATIONVERSION 2
-//Name of plugin
-//this member CANNOT be NULL. Just write here description, i.e. "PopFile filter plugin for YAMN"
- char *Name;
-
-//The version of plugin. CANNOT be NULL.
- char *Ver;
-
-//Plugin copyright
-//Write here your copyright if you want (or NULL)
- char *Copyright;
-
-//Plugin description. Can be NULL.
- char *Description;
-
-//Your contact (email). Can be NULL.
- char *Email;
-
-//The web page. Can be NULL.
- char *WWW;
-} YAMN_FILTERREGISTRATION, *PYAMN_FILTERREGISTRATION;
-
-typedef struct CYAMNFilterPlugin
-{
-//Importance of plugin. Mails are filtered in the way, that filter with smallest importance number
-//filters and marks mails first and the filter using the highest number marks mails the last. It means,
-//that number with highest number is the most important, because it can set or clear flags as it wants,
-//if another plugin set some flag, plugin with higher number can clear it.
- DWORD Importance;
-
-//All needed other info from plugin
- PYAMN_FILTERREGISTRATION PluginInfo;
-
-//Imported functions
- PYAMN_FILTERIMPORTFCN FilterFcn;
-} YAMN_FILTERPLUGIN, *PYAMN_FILTERPLUGIN, *HYAMNFILTERPLUGIN;
-
-typedef struct CFilterPluginQueue
-{
- HYAMNFILTERPLUGIN Plugin;
- struct CFilterPluginQueue *Next;
-} YAMN_FILTERPLUGINQUEUE,*PYAMN_FILTERPLUGINQUEUE;
-
-//
-//================================== YAMN SERVICES FOR PROTOCOL PLUGIN ==================================
-//
-
-//RegisterFilterPlugin Service
-//Registers filter plugin
-//WPARAM- pointer to YAMN_FILTERREGISTRATION structure. Plugin must not delete this structure from memory.
-//LPARAM- version of YAMN_FILTERREGISTRATION structure (use YAMN_PROTOREGISTRATIONVERSION definition)
-//returns handle to plugin (HYAMNFILTERPLUGIN), if registration failed (plugin not registered) returns NULL
-//You need next to call SetFilterPluginFcnImportFcn to have your plugin cooperated with YAMN.
-#define MS_YAMN_REGISTERFILTERPLUGIN "YAMN/Service/RegisterFilterPlugin"
-
-//UnregisterFilterPlugin Service
-//Unregisters filter plugin
-//WPARAM- (HYAMNFILTERPLUGIN) plugin handle
-//LPARAM- any value
-//returns nonzero if success
-#define MS_YAMN_UNREGISTERFILTERPLUGIN "YAMN/Service/UnregisterFilterPlugin"
-
-//
-//================================== FUNCTIONS DEFINITIONS ========================================
-//
-
-typedef INT_PTR (WINAPI *YAMN_SETFILTERPLUGINFCNIMPORTFCN)(HYAMNFILTERPLUGIN Plugin,DWORD Importance,PYAMN_FILTERIMPORTFCN YAMNFilterFcn,DWORD YAMNFilterFcnVer);
-
-//
-//================================== QUICK FUNCTION CALL DEFINITIONS ========================================
-//
-
-//These are defininitions for YAMN exported functions. Your plugin can use them.
-//pYAMNFcn is global variable, it is pointer to your structure containing YAMN functions.
-//It is something similar like pluginLink variable in Miranda plugin. If you use
-//this name of variable, you have already defined these functions and you can use them.
-//It's similar to Miranda's CreateService function.
-
-//How to use YAMN functions:
-//Create a structure containing pointer to functions you want to use in your plugin
-//This structure can look something like this:
-//
-// struct
-// {
-// YAMN_SETFILTERPLUGINFCNIMPORTFCN SetFilterPluginFcnImportFcn;
-// } *pYAMNFcn;
-//
-//then you have to fill this structure with pointers... If you use Miranda services, you will do it like this
-//
-// pYAMNFcn->SetFilterPluginFcnImportFcn=(YAMN_SETFILTERPLUGINFCNIMPORTFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETFILTERPLUGINFCNIMPORTID,(LPARAM)0);
-//
-//If you do not use Miranda services, call service MS_YAMN_GETFCNPTR directly. The address to the MS_YAMN_GETFCNPTR is sent to you in LoadFilter function:
-//
-// pYAMNFcn->SetFilterPluginFcnImportFcn=(YAMN_SETFILTERPLUGINFCNIMPORTFCN)YAMN_GetFcnPtr((WPARAM)YAMN_SETFILTERPLUGINFCNIMPORTID,(LPARAM)0);
-//
-//and in your plugin just simply use e.g.:
-//
-// SetFilterPluginFcnImport(...);
-//
-
-#define YAMN_SETFILTERPLUGINFCNIMPORTID "YAMN/SetFilterPluginFcnImport"
-
-#define SetFilterPluginFcnImport(a,b,c,d) pYAMNFcn->SetFilterPluginFcnImportFcn(a,b,c,d)
-
-#endif
diff --git a/YAMN/m_messages.h b/YAMN/m_messages.h
deleted file mode 100644
index 7fc0fbe..0000000
--- a/YAMN/m_messages.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef __MESSAGES_H
-#define __MESSAGES_H
-
-//#include "list.h"
-
-// structure for chained list of handles (window handles, account handles, whatever)
-struct WndHandles
-{
- HANDLE Handle;
-
- struct WndHandles *Next;
-};
-
-#define WM_YAMN WM_APP+0x2800 //(0xA800 in fact)
-enum
-{
- WM_YAMN_CHANGEHOTKEY=WM_YAMN,
- WM_YAMN_CHANGETIME,
-
-//ChangeStatus message
-//WPARAM- (HACCOUNT) Account whose status is changed
-//LPARAM- new status of account
- WM_YAMN_CHANGESTATUS,
-
-//StopAccount message
-//WPARAM- (HACCOUNT) Account, which should stop its work and finish immidiatelly
- WM_YAMN_STOPACCOUNT,
-
-//Account content changed
- WM_YAMN_CHANGECONTENT,
-
- WM_YAMN_UPDATEMAILS,
-
- WM_YAMN_NOTIFYICON,
-
- WM_YAMN_CHANGESTATUSOPTION,
-
- WM_YAMN_SHOWSELECTED,
-};
-
-#endif
diff --git a/YAMN/m_protoplugin.h b/YAMN/m_protoplugin.h
deleted file mode 100644
index 4407dae..0000000
--- a/YAMN/m_protoplugin.h
+++ /dev/null
@@ -1,389 +0,0 @@
-#ifndef __M_PROTOPLUGIN_H
-#define __M_PROTOPLUGIN_H
-
-#include <windows.h>
-#include "m_account.h" //for account import functions
-#include "mails/m_mails.h" //for mail import functions
-
-//
-//================================== OTHER DEFINITIONS ========================================
-//
-
-//structure is used to give parameters to Check, Synchro or Timeout function
-struct CheckParam
-{
-//Your plugin should use this definition
-#define YAMN_CHECKVERSION 2
-//Version of this structure. Please verify your version in your plugin
- DWORD Ver;
-//Event that new Check thread must set to signal calling thread that "I've copied all parameters from stack"
-//IMPORTANT!!!: Although version #defined in your plugin is not the same, your plugin MUST signal this event
-//in any way. YAMN is waiting for this event. If you do not signal it, YAMN is blocked.
- HANDLE ThreadRunningEV;
-//ActualAccount- the only parameter used in Check function and should contain all needed information I think :)
- HACCOUNT AccountParam;
-
-//I thought it, but this is needed, too
-#define YAMN_NORMALCHECK 0
-#define YAMN_FORCECHECK 1
- DWORD Flags;
-
-//YAMN writes here some informations that are needed to pass to mail browser function (or bad connection)
- void *BrowserParam;
-//Calling thread (protocol plugin) can write here its own parameters. Usefull when protocol calls its own check function. YAMN always sets this parameter to NULL
- void *CustomParam;
-};
-
-//structure is used to give parameters to DeleteMails function
-struct DeleteParam
-{
-//Your plugin should use this definition
-#define YAMN_DELETEVERSION 1
-//Version of this structure. Please verify your version in your plugin
- DWORD Ver;
-//Event that new Delete thread must set to signal calling thread that it copied all parameters from stack
-//IMPORTANT!!!: Although version #defined in your plugin is not the same, your plugin MUST signal this event
-//in any way. YAMN is waiting for this event. If you do not signal it, YAMN is blocked.
- HANDLE ThreadRunningEV;
-//ActualAccount- which account to delete
- HACCOUNT AccountParam;
-//YAMN writes here some informations that are needed to pass to mail browser function (or bad connection or no new mail)
- void *BrowserParam;
-//Calling thread can write here its own parameter. Usefull when protocol calls its own delete function. YAMN always sets this parameter to NULL
- void *CustomParam;
-};
-
-//
-//================================== IMPORTED FUNCTIONS ==================================
-//
-
-#ifndef YAMN_STANDARDFCN
-typedef DWORD (WINAPI *YAMN_STANDARDFCN)(LPVOID);
-#endif
-typedef struct CYAMNVariables *(WINAPI *YAMN_GETVARIABLESFCN)(DWORD);
-typedef HACCOUNT (WINAPI *YAMN_NEWACCOUNTFCN)(struct CYAMNProtoPlugin *,DWORD);
-typedef void (WINAPI *YAMN_STOPACCOUNTFCN)(HACCOUNT);
-typedef void (WINAPI *YAMN_DELETEACCOUNTFCN)(HACCOUNT);
-typedef DWORD (WINAPI *YAMN_WRITEPLUGINOPTS)(HANDLE File,HACCOUNT);
-typedef DWORD (WINAPI *YAMN_READPLUGINOPTS)(HACCOUNT,TCHAR **,TCHAR *);
-typedef DWORD (WINAPI *YAMN_CHECKFCN)(struct CheckParam *);
-typedef DWORD (WINAPI *YAMN_DELETEFCN)(struct DeleteParam *);
-typedef WCHAR* (WINAPI *YAMN_GETERRORSTRINGWFCN)(DWORD);
-typedef char* (WINAPI *YAMN_GETERRORSTRINGAFCN)(DWORD);
-typedef void (WINAPI *YAMN_DELETEERRORSTRINGFCN)(LPVOID);
-typedef DWORD (WINAPI *YAMN_WRITEACCOUNTSFCN)();
-
-typedef struct CAccountImportFcn
-{
-//If changes are made in this structure, version is changed.
-//So then YAMN does not initialize your structure, if version does not match.
-#define YAMN_PROTOIMPORTFCNVERSION 3
-
-//Note: not all of these functions are needed to be implemented in your protocol plugin. Those
-//functions, which are not implemented, you have to set to NULL.
-
-//Function is called to construct protocol defined account
-//This is VERY IMPORTANT for YAMN and plugin to cooperate:
-//Imagine following situation. YAMN wants to add new account (it is possible e.g.
-//when loading accounts from file), so it has to call protocol constructor.
-//It calls NewAccount function and plugin creates new account and returns
-//its handle (pointer in fact). That means new account is created with plugin features
-//(it is created inherited account, not base class).
- YAMN_NEWACCOUNTFCN NewAccountFcnPtr;
-
-//Function is called to delete protocol defined variables to inherited CAccount structure
- YAMN_DELETEACCOUNTFCN DeleteAccountFcnPtr;
-
-//Function is called when user requests not tu run account longer. (E.g. when closing Miranda)
- YAMN_STOPACCOUNTFCN StopAccountFcnPtr;
-
-//Function is called when plugin should write its own info into book file
- YAMN_WRITEPLUGINOPTS WritePluginOptsFcnPtr;
-
-//Function is called when plugin should read its own info from book file
- YAMN_READPLUGINOPTS ReadPluginOptsFcnPtr;
-
-//Function is called to synchronise account (delete old mails and get the new ones)
- YAMN_CHECKFCN SynchroFcnPtr;
-
-//Function is called when timer timed out- it can be the same as SynchroFcnPtr
- YAMN_CHECKFCN TimeoutFcnPtr;
-
-//Function is called when forced checking- it can be the same as SynchroFcnPtr
- YAMN_CHECKFCN ForceCheckFcnPtr;
-
-//Function is called when user wants to delete mails
- YAMN_DELETEFCN DeleteMailsFcnPtr;
-
-//Function is called when YAMN wants to get error description. Note the parameter given in
-//this function is in fact the same as your CheckFcnPtr, DeleteMailsFcnPtr etc. returns to YAMN.
-//If you want, you may return pointer to some structure, which includes more information about
-//error than only one DWORD. And then, you can in your function create Unicode string containing
-//all your error code. YAMN copies this string into its own buffer. Your error code and pointer
-//can be deleted in DeleteErrorStringFcnPtr, which is called by YAMN
- YAMN_GETERRORSTRINGWFCN GetErrorStringWFcnPtr;
-
-//This is the same as previous one, but plugin returns normal string (not Unicode). YAMN first
-//looks, if your plugin has implemented GetErrorStringWFcnPtr. If not, it looks for this function
-//So as you (of course) wait, you implemnt only one of these functions or no one of them.
- YAMN_GETERRORSTRINGAFCN GetErrorStringAFcnPtr;
-
-//Deletes error string that was allocated in your GetErrorStringXFcnPtr. Parameter to this fcn is
-//Unicode or normal string. Therefore parameter is defined as LPVOID, but your plugin knows if it is
-//Unicode or not...
-//If NULL, YAMN does nothing with string
- YAMN_DELETEERRORSTRINGFCN DeleteErrorStringFcnPtr;
-
-//Function is called to notify plugin, that it is quite good to store account status (and mails)
- YAMN_WRITEACCOUNTSFCN WriteAccountsFcnPtr;
-
-//Function is called when user wants to view mails
-//not used now, in the future
- YAMN_STANDARDFCN ViewMailsFcnPtr;
-
-//Function is called when application exits. Plugin should unload
- YAMN_STANDARDFCN UnLoadFcn;
-} YAMN_PROTOIMPORTFCN, *PYAMN_PROTOIMPORTFCN;
-
-typedef HYAMNMAIL (WINAPI *YAMN_NEWMAILFCN)(HACCOUNT,DWORD);
-typedef void (WINAPI *YAMN_DELETEMAILFCN)(HYAMNMAIL);
-typedef DWORD (WINAPI *YAMN_WRITEMAILOPTS)(HANDLE File,HYAMNMAIL);
-typedef DWORD (WINAPI *YAMN_READMAILOPTS)(HYAMNMAIL,TCHAR **,TCHAR *);
-
-typedef struct CMailImportFcn
-{
-//If changes are made in this structure, version is changed.
-//So then YAMN does not initialize your structure, if version does not match.
-#define YAMN_MAILIMPORTFCNVERSION 1
-
-//Note: not all of these functions are needed to be implemented in your protocol plugin. Those
-//functions, which are not implemented, you have to set to NULL.
-
-//Function is called to construct protocol defined account
-//This is VERY IMPORTANT for YAMN and plugin to cooperate:
-//Imagine following situation. YAMN wants to add new account (it is possible e.g.
-//when loading accounts from file), so it has to call protocol constructor.
-//It calls NewAccount function and plugin creates new account and returns
-//its handle (pointer in fact). That means new account is created with plugin features
-//(it is created inherited account, not base class).
- YAMN_NEWMAILFCN NewMailFcnPtr;
-
-//Function is called to delete protocol defined variables to inherited CAccount structure
- YAMN_DELETEMAILFCN DeleteMailFcnPtr;
-
-//Function is called when plugin should write its own info into book file
- YAMN_WRITEMAILOPTS WriteMailOptsFcnPtr;
-
-//Function is called when plugin should read its own info from book file
- YAMN_READMAILOPTS ReadMailOptsFcnPtr;
-} YAMN_MAILIMPORTFCN, *PYAMN_MAILIMPORTFCN;
-
-//
-//================================== PROTOCOL PLUGIN REGISTRATION STRUCTURES ==================================
-//
-
-typedef struct CProtoPluginRegistration
-{
-#define YAMN_PROTOREGISTRATIONVERSION 1
-//Name of plugin
-//this member CANNOT be NULL. Just write here description, i.e. "Yahoo Mail 1.2"
- char *Name;
-
-//The version of plugin. CANNOT be NULL.
- char *Ver;
-
-//Plugin copyright
-//Write here your copyright if you want (or NULL)
- char *Copyright;
-
-//Plugin description. Can be NULL.
- char *Description;
-
-//Your contact (email). Can be NULL.
- char *Email;
-
-//The web page. Can be NULL.
- char *WWW;
-
-} YAMN_PROTOREGISTRATION, *PYAMN_PROTOREGISTRATION;
-
-typedef struct CYAMNProtoPlugin
-{
-//Pointer to first protocol plugin account
- HACCOUNT FirstAccount;
-
-//We prevent browsing through accounts (chained list) from deleting or adding any account
-//If we want to delete or add, we must have "write" access to AccountBrowserSO
-//Note that accounts can be changed during AccountBrowser is in "read" mode, because we do not add or delete account.
- PSWMRG AccountBrowserSO;
-
-//All needed other info from plugin
- PYAMN_PROTOREGISTRATION PluginInfo;
-
-//Imported functions
- PYAMN_PROTOIMPORTFCN Fcn;
- PYAMN_MAILIMPORTFCN MailFcn;
-} YAMN_PROTOPLUGIN, *PYAMN_PROTOPLUGIN, *HYAMNPROTOPLUGIN;
-
-typedef struct CProtoPluginQueue
-{
- HYAMNPROTOPLUGIN Plugin;
- struct CProtoPluginQueue *Next;
-} YAMN_PROTOPLUGINQUEUE,*PYAMN_PROTOPLUGINQUEUE;
-
-//
-//================================== YAMN SERVICES FOR PROTOCOL PLUGIN ==================================
-//
-
-//RegisterProtoPlugin Service
-//Your plugin can call this service to "connect to YAMN"- it means, that you
-//give some parameters to YAMN and YAMN can then cooperate with your protocol plugins
-//WPARAM- pointer to YAMN_PROTOREGISTRATION structure. Plugin must not delete this structure from memory.
-//LPARAM- version of YAMN_PROTOREGISTRATION structure (use YAMN_PROTOREGISTRATIONVERSION definition)
-//returns handle to plugin (HYAMNPROTOPLUGIN), if registration failed (plugin not registered) returns NULL
-//Note, that your plugin should store returned plugin handle, because it will be usefull in next services.
-//You need next to call SetProtocolPluginFcnImportFcn to have your plugin cooperated with YAMN.
-#define MS_YAMN_REGISTERPROTOPLUGIN "YAMN/Service/RegisterProtocolPlugin"
-
-//UnregisterProtoPlugin Service
-//Removes plugin from YAMN and deltes its structures
-//WPARAM- (HYAMNPROTOPLUGIN) handle of protocol plugin
-//LPARAM- any value
-//returns nonzero if success
-#define MS_YAMN_UNREGISTERPROTOPLUGIN "YAMN/Service/UnregisterProtocolPlugin"
-
-//CreateAccount Service
-//Your plugin should call this to create new account for your plugin.
-//WPARAM- (HYAMNPLUGIN) Plugin handle
-//LPARAM- CAccount version (use YAMN_ACCOUNTVERSION definition)
-//returns pointer to (HACCOUNT) or pointer to your structure returned from imported NewAccountFcnPtr, if implemented
-#define MS_YAMN_CREATEPLUGINACCOUNT "YAMN/Service/CreateAccount"
-
-//DeletePluginAccount Service
-//Deletes plugin's account from memory. You probably won't use this service, because it deletes only account
-//without any synchronization. Use MS_YAMN_DELETEACCOUNT instead.
-//WPARAM- (HACCOUNT) to delete
-//LPARAM- any value
-//returns zero if failed, otherwise returns nonzero
-#define MS_YAMN_DELETEPLUGINACCOUNT "YAMN/Service/DeletePluginAccount"
-
-//FindAccountByName Service
-//Searches accounts queue for first account that belongs to plugin
-//WPARAM- (HYAMNPLUGIN) Plugin handle
-//LPARAM- (TCHAR *)string, name of account to find
-//returns found HACCOUNT handle or NULL if not found
-#define MS_YAMN_FINDACCOUNTBYNAME "YAMN/Service/FindAccountByName"
-
-//GetNextFreeAccount Service
-//Creates new account for plugin and adds it to plugin account queue.
-//Note!!! you have to use AccountBrowserSO in your plugin before and after calling this service, because it is not synchronized
-//So the normal way is like this:
-// WaitToWriteSO(MyPlugin->AccountBrowserSO);
-// CallService(MS_YAMN_GETNEXTFREEACCOUNT,MyPlugin,YAMN_ACCOUNTVERSION);
-// WriteDoneSO(MyPlugin->AccountBrowserSO);
-//
-//WPARAM- (HYAMNPLUGIN) Plugin handle
-//LPARAM- CAccount version (use YAMN_ACCOUNTVERSION definition)
-//returns new HACCOUNT handle or NULL if not found
-#define MS_YAMN_GETNEXTFREEACCOUNT "YAMN/Service/GetNextFreeAccount"
-
-//DeleteAccount Service
-//Deletes account from plugin account queue. It also deletes it, but in background (when needed).
-//This deleting is full synchronized and safe. It is recommended for plugins to use this service.
-//WPARAM- (HYAMNPLUGIN) Plugin handle
-//LPARAM- (HACCOUNT) Account to delete
-#define MS_YAMN_DELETEACCOUNT "YAMN/Service/DeleteAccount"
-
-//ReadAccountsA Service
-//Reads standard accounts to file. Standard account means standard YAMN book format.
-//WPARAM- (HYAMNPLUGIN) Plugin handle
-//LPARAM- (char *)filename string. Put here your own desired filename.
-//return value is one of the ones written in "account.h" file
-#define MS_YAMN_READACCOUNTSA "YAMN/Service/ReadAccountsA"
-
-//ReadAccountsW Service
-//Same as ReadAccountsA service, but difference is in WPARAM
-//WPARAM- (HYAMNPLUGIN) Plugin handle
-//LPARAM- (WCHAR *)filename string. Use MS_YAMN_GETFILENAMEW service to retrieve your filename, or
-// just put your own desired filename
-#define MS_YAMN_READACCOUNTSW "YAMN/Service/ReadAccountsW"
-
-//WriteAccountsA Service
-//Writes standard accounts to file. Standard account means standard YAMN book format. It does not
-//store special protocol features. It stores Account settings from CAccount struct and stores MIME mails
-//from CMimeMsgQueue. If your Mails pointer does not point to CMimeMsgQueue structure,
-//do not use this function. You are then forced to write your own function
-//WPARAM- (HYAMNPLUGIN) Plugin handle
-//LPARAM- (char *)filename string. Put here your own desired filename.
-//return value is one of the ones written in "account.h" file
-#define MS_YAMN_WRITEACCOUNTSA "YAMN/Service/WriteAccountsA"
-
-//WriteAccountsW Service
-//Writes standard accounts to file. Standard account means standard YAMN book format.
-//WPARAM- (HYAMNPLUGIN) Plugin handle
-//LPARAM- (WCHAR *)filename string. Use MS_YAMN_GETFILENAMEW service to retrieve your filename, or
-// just put your own desired filename
-//return value is one of the ones written in "account.h" file
-#define MS_YAMN_WRITEACCOUNTSW "YAMN/Service/WriteAccountsW"
-
-//GetFileNameA Service
-//Function makes original filename, when you add your protocol string
-//From "yahoo" makes "yamn-accounts.yahoo.xxxxx.book" filename
-//It is good to use this fcn to have similar filenames...
-//WPARAM- (char *) plugin string
-//LPARAM- any value
-//returns NULL when failed, otherwise returns (WCHAR *)string (!!! not char *) to filename!!!
-//You can use MS_YAMN_DELETEFILENAME service to release allocated filename from memory
-#define MS_YAMN_GETFILENAMEA "YAMN/Service/GetFileNameA"
-
-//GetFileNameW Service
-//Same as GetFileNameA service, but difference is in WPARAM
-//WPARAM- (WCHAR *) plugin string
-//LPARAM- any value
-#define MS_YAMN_GETFILENAMEW "YAMN/Service/GetFileNameW"
-
-//DeleteFileName Service
-//deletes unicode string from memory
-//WPARAM- (WCHAR *) pointer to unicode string
-//LPARAM- any value
-#define MS_YAMN_DELETEFILENAME "YAMN/Service/DeleteFileName"
-
-//
-//================================== FUNCTIONS DEFINITIONS ========================================
-//
-
-typedef int (WINAPI *YAMN_SETPROTOCOLPLUGINFCNIMPORTFCN)(HYAMNPROTOPLUGIN Plugin,PYAMN_PROTOIMPORTFCN YAMNFcn,DWORD YAMNFcnVer,PYAMN_MAILIMPORTFCN YAMNMailFcn,DWORD YAMNMailFcnVer);
-
-//
-//================================== QUICK FUNCTION CALL DEFINITIONS ========================================
-//
-
-//These are defininitions for YAMN exported functions. Your plugin can use them.
-//pYAMNFcn is global variable, it is pointer to your structure containing YAMN functions.
-//It is something similar like pluginLink variable in Miranda plugin. If you use
-//this name of variable, you have already defined these functions and you can use them.
-//It's similar to Miranda's CreateService function.
-
-//How to use YAMN functions:
-//Create a structure containing pointer to functions you want to use in your plugin
-//This structure can look something like this:
-//
-// struct
-// {
-// YAMN_SETPROTOCOLPLUGINFCNIMPORTFCN SetProtocolPluginFcnImportFcn;
-// } *pYAMNFcn;
-//
-//then you have to fill this structure with pointers...
-//
-// pYAMNFcn->SetProtocolPluginFcnImportFcn=(YAMN_SETPROTOCOLPLUGINFCNIMPORTFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETPROTOCOLPLUGINFCNIMPORTID,(LPARAM)0);
-//
-//and in your plugin just simply use e.g.:
-//
-// SetProtocolPluginFcnImport(...);
-//
-
-#define YAMN_SETPROTOCOLPLUGINFCNIMPORTID "YAMN/SetProtocolPluginFcnImport"
-
-#define SetProtocolPluginFcnImport(a,b,c,d,e) pYAMNFcn->SetProtocolPluginFcnImportFcn(a,b,c,d,e)
-
-#endif
diff --git a/YAMN/m_synchro.h b/YAMN/m_synchro.h
deleted file mode 100644
index ff3e601..0000000
--- a/YAMN/m_synchro.h
+++ /dev/null
@@ -1,160 +0,0 @@
-#ifndef __SYNCHRO_H
-#define __SYNCHRO_H
-
-#include <windows.h>
-
-//
-//================================== OTHER DEFINITIONS ========================================
-//
-
-#define WAIT_FINISH WAIT_OBJECT_0+1
-
-// This structure is used to get semaphore-like synchronization:
-// Includes incrementing, decrementing DWORD value and if DWORD is zero, sets event
-typedef struct SynchronisedCounter
-{
-// Stores number value
- HANDLE Event;
- DWORD Number;
-
-// These methods are deleted due to external plugins. Use SCGetNumber,SCInc and SCDec instead
-// DWORD GetNumber();
-// DWORD Inc();
-// DWORD Dec();
-
-// Yes, some code is defined here. But it is not so problematic, because it uses only Win32 API calls and Win32 structures,
- SynchronisedCounter(): Number(0)
- {
- InitializeCriticalSection(&CounterCS);
- Event=CreateEvent(NULL,FALSE,TRUE,NULL);
- SetEvent(Event);
- }
-
- SynchronisedCounter(HANDLE InitializedEvent): Number(0)
- {
- InitializeCriticalSection(&CounterCS);
- Event=InitializedEvent;
- SetEvent(Event);
- }
-
- ~SynchronisedCounter()
- {
- DeleteCriticalSection(&CounterCS);
- CloseHandle(Event);
- }
-
-//private: //it is not private as other functions (not methods) use these members
- CRITICAL_SECTION CounterCS;
-} SCOUNTER, *PSCOUNTER;
-
-// The single-writer/multiple-reader guard
-// compound synchronization object (SO)
-// Notices: Copyright (c) 1995-1997 Jeffrey Richter
-// Changes: majvan, only one process implementation,
-// hFinishEV event added- signals when we do not want to use this SO anymore
-typedef struct SingleWriterMultiReaderGuard
-{
-// This event guards access to the other objects
-// managed by this data structure and also indicates
-// whether any writer threads are writing.
- HANDLE hEventNoWriter;
-
-// This manual-reset event is signaled when
-// no reader threads are reading.
- HANDLE hEventNoReaders;
-
-// This value is used simply as a counter.
-// (the count is the number of reader threads)
- HANDLE hSemNumReaders;
-
-// The request is for not to enter critical section
-// for writing or reading due to going to delete guard
- HANDLE hFinishEV;
-} SWMRG, *PSWMRG;
-
-//
-//================================== FUNCTIONS DEFINITIONS ========================================
-//
-
-typedef DWORD (WINAPI *YAMN_WAITTOWRITEFCN)(PSWMRG,PSCOUNTER);
-typedef void (WINAPI *YAMN_WRITEDONEFCN)(PSWMRG,PSCOUNTER);
-typedef DWORD (WINAPI *YAMN_WAITTOREADFCN)(PSWMRG);
-typedef void (WINAPI *YAMN_READDONEFCN)(PSWMRG);
-typedef DWORD (WINAPI *YAMN_SCMANAGEFCN)(PSCOUNTER);
-
-//
-//================================== QUICK FUNCTION CALL DEFINITIONS ========================================
-//
-
-//These are defininitions for YAMN exported functions. Your plugin can use them.
-//pYAMNFcn is global variable, it is pointer to your structure containing YAMN functions.
-//It is something similar like pluginLink variable in Miranda plugin. If you use
-//this name of variable, you have already defined these functions and you can use them.
-//It's similar to Miranda's CreateService function.
-//These functions are used to synchronize accounts. YAMN could create service for these
-//functions and you could call them then e.g. CallService(MS_YAMNWAITTOWRITE,WPARAM,LPARAM),
-//but I think this solution is better, because these functions are much used. It is more
-//"normal" if you call function for example like:
-//WaitToWrite(ActualAccount) than CallService(MS_YAMNWAITTOWRITE,ActualAccount,NULL))
-
-//How to use YAMN functions:
-//Create a structure containing pointer to functions you want to use in your plugin
-//This structure can look something like this:
-//
-// struct
-// {
-// YAMN_WAITTOWRITEFCN WaitToWriteFcn;
-// YAMN_WRITEDONEFCN WriteDoneFcn;
-// } *pYAMNFcn;
-//
-//then you have to fill this structure with pointers...
-//you have to use YAMN service to get pointer, like this (I wrote here all functions you may need,
-//you can copy to your sources only those you need):
-//
-// pYAMNFcn->WaitToWriteFcn=(YAMN_WAITTOWRITEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WAITTOWRITEID,(LPARAM)0);
-// pYAMNFcn->WriteDoneFcn=(YAMN_WRITEDONEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WRITEDONEID,(LPARAM)0);
-// pYAMNFcn->WaitToReadFcn=(YAMN_WAITTOREADFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WAITTOREADID,(LPARAM)0);
-// pYAMNFcn->ReadDoneFcn=(YAMN_READDONEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_READDONEID,(LPARAM)0);
-// pYAMNFcn->SCGetNumberFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCGETNUMBERID,(LPARAM)0);
-// pYAMNFcn->SCIncFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCINCID,(LPARAM)0);
-// pYAMNFcn->SCDecFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCDECID,(LPARAM)0);
-//
-//and in your plugin just simply use e.g.:
-//
-// MsgsWriteDone(ActualAccount); //this command leaves write access to account mails
-//
-
-#define YAMN_WAITTOWRITEID "YAMN/WaitToWrite"
-#define YAMN_WRITEDONEID "YAMN/WriteDone"
-#define YAMN_WAITTOREADID "YAMN/WaitToRead"
-#define YAMN_READDONEID "YAMN/ReadDone"
-#define YAMN_SCGETNUMBERID "YAMN/SCGetNumber"
-#define YAMN_SCINCID "YAMN/SCInc"
-#define YAMN_SCDECID "YAMN/SCDec"
-
-#define WaitToWrite(x) pYAMNFcn->WaitToWriteFcn(x->AccountAccessSO,0)
-#define WaitToWriteEx(x,y) pYAMNFcn->WaitToWriteFcn(x->AccountAccessSO,y)
-#define WriteDone(x) pYAMNFcn->WriteDoneFcn(x->AccountAccessSO,0)
-#define WaitToRead(x) pYAMNFcn->WaitToReadFcn(x->AccountAccessSO)
-#define WaitToReadEx(x,y) pYAMNFcn->WaitToReadFcn(x->AccountAccessSO,y)
-#define ReadDone(x) pYAMNFcn->ReadDoneFcn(x->AccountAccessSO)
-
-#define MsgsWaitToWrite(x) pYAMNFcn->WaitToWriteFcn(x->MessagesAccessSO,0)
-#define MsgsWaitToWriteEx(x,y) pYAMNFcn->WaitToWriteFcn(x->MessagesAccessSO,y)
-#define MsgsWriteDone(x) pYAMNFcn->WriteDoneFcn(x->MessagesAccessSO,0)
-#define MsgsWaitToRead(x) pYAMNFcn->WaitToReadFcn(x->MessagesAccessSO)
-#define MsgsWaitToReadEx(x) pYAMNFcn->WaitToReadFcn(x->MessagesAccessSO,y)
-#define MsgsReadDone(x) pYAMNFcn->ReadDoneFcn(x->MessagesAccessSO)
-
-#define WaitToWriteSO(x) pYAMNFcn->WaitToWriteFcn(x,0)
-#define WaitToWriteSOEx(x,y) pYAMNFcn->WaitToWriteFcn(x,y)
-#define WriteDoneSO(x) pYAMNFcn->WriteDoneFcn(x,0)
-#define WaitToReadSO(x) pYAMNFcn->WaitToReadFcn(x)
-#define WaitToReadSOEx(x,y) pYAMNFcn->WaitToReadFcn(x,y)
-#define ReadDoneSO(x) pYAMNFcn->ReadDoneFcn(x)
-
-#define SCGetNumber(x) pYAMNFcn->SCGetNumberFcn(x)
-#define SCInc(x) pYAMNFcn->SCIncFcn(x)
-#define SCDec(x) pYAMNFcn->SCDecFcn(x)
-
-#endif
diff --git a/YAMN/m_yamn.h b/YAMN/m_yamn.h
deleted file mode 100644
index 035c71f..0000000
--- a/YAMN/m_yamn.h
+++ /dev/null
@@ -1,154 +0,0 @@
-#ifndef __M_YAMN_H
-#define __M_YAMN_H
-
-#include <windows.h>
-
-//
-//================================== VARIABLES STRUCT ========================================
-//
-
-#ifndef MIRANDASERVICE
-typedef INT_PTR (*MIRANDASERVICE)(WPARAM,LPARAM);
-#endif
-
-typedef struct CYAMNVariables
-{
-#define YAMN_VARIABLESVERSION 3
- HINSTANCE hInst;
- HANDLE MessageWnds;
- HANDLE NewMailAccountWnd;
- int Shutdown;
-} YAMN_VARIABLES, *PYAMN_VARIABLES;
-
-//
-//================================== EXPORTED FUNCTIONS STRUCT ===============================
-//
-
-struct CExportedFunctions
-{
- char* ID;
- void *Ptr;
-};
-
-struct CExportedServices
-{
- char* ID;
- INT_PTR (* Ptr)(WPARAM,LPARAM);
-};
-
-//
-//================================== YAMN EVENTS ==================================
-//
-
-//UninstallPlugin Event
-//Sent when user wants to uninstall YAMN and all its plugins
-#define ME_YAMN_UNINSTALLPLUGINS "YAMN/MirandaEvents/UninstallPlugins"
-
-//NewMail Event
-//Notifies you about new mail
-//no arguments now (Developers, send mail, which params would you like to have, but note there's problem that
-//params are 32b numbers. When it is pointer to some data, these data should persist while every plugin read them and
-//after that they can be removed from memory. So it is problem)
-#define ME_YAMN_NEWMAIL "YAMN/MirandaEvents/NewMail"
-
-//
-//================================== YAMN SERVICES ==================================
-//
-
-//GetFcnPtr Service
-//Your plugin can co-operate with YAMN in 2 ways: with Miranda services and with YAMN exported functions
-//Some commands are written in services, some are functions. The advantage of function calling instead of
-//service calling is, that your code is more clear and it is faster than service calling (smaller, FASTER,
-//easier- it is slogan of Miranda, isn't it ?). Miranda service has only 2 parameters, that can be
-//disadvantage too.
-//In every way, it is discutable which functions should be exported or if they should be implemented as
-//services. And if YAMN should export some functions etc. Functions not used very often are now implemented
-//as Miranda services.
-//
-//This service gets pointer to YAMN function. Then you can use function directly. In m_?????.h files you have
-//definitions of some functions, with definitions of structure variable, so you can use functions very
-//clearly, just look to header file.
-//WPARAM- function ID. It is string representating function you need to get pointer (e.g. YAMN_WRITEWAITID)
-//LPARAM- not used now, but set it to 0
-//returns pointer to YAMN function or NULL when functions does not exist
-#define MS_YAMN_GETFCNPTR "YAMN/Service/GetFcn"
-
-//GetVariables Service
-//Ask YAMN for pointer to CYAMNVariables structure.
-//WPARAM- YAMN_VARIABLESVERSION
-//LPARAM- any value
-//returns pointer to YAMN_VARIABLES or NULL when version of structure does not match
-#define MS_YAMN_GETVARIABLES "YAMN/Service/GetVar"
-
-//ForceCheck Service
-//Check mail on accounts
-//WPARAM- not used
-//LPARAM- not used
-#define MS_YAMN_FORCECHECK "YAMN/Service/ForceCheck"
-
-//AccountCheck Service
-//Check mail on individual account
-//WPARAM- HACCOUNT
-//LPARAM- BOOL: Show Popup on no new mail
-#define MS_YAMN_ACCOUNTCHECK "YAMN/Service/AccountCheck"
-
-//Contact List Context Menu Click
-//wParam=(WPARAM)hContact
-//lParam=0
-//
-//Event is fired when there is a double click on a CList contact,
-//it is upto the caller to check for the protocol & status
-//of the HCONTACT, it's not done for you anymore since it didn't make
-//sense to store all this information in memory, etc.
-#define MS_YAMN_CLISTCONTEXT "YAMN/Service/ClistContactContextMenu"
-
-//Contact List Context Menu Click for application
-//wParam=(WPARAM)hContact
-//lParam=0
-//
-//Event is fired when there is a double click on a CList contact,
-//it is upto the caller to check for the protocol & status
-//of the HCONTACT, it's not done for you anymore since it didn't make
-//sense to store all this information in memory, etc.
-#define MS_YAMN_CLISTCONTEXTAPP "YAMN/Service/ClistContactContextMenuApp"
-
-//Contact List Double Click
-//wParam=(WPARAM)hContact
-//lParam=0
-//
-//Event is fired when there is a double click on a CList contact,
-//it is upto the caller to check for the protocol & status
-//of the HCONTACT, it's not done for you anymore since it didn't make
-//sense to store all this information in memory, etc.
-#define MS_YAMN_CLISTDBLCLICK "YAMN/Service/ClistContactDoubleclicked"
-
-//FilterMail Service
-//Ask YAMN to process mail filtering. YAMN calls filter plugins to mark mail as spam etc... Warning! Leave all
-//read or write access to mail as this function waits for write-access to mail!
-//WPARAM- (HACCOUNT) account to which mail belongs
-//LPARAM- (HYAMNMAIL) mail to filter
-#define MS_YAMN_FILTERMAIL "YAMN/Service/FilterMail"
-
-//MailBrowser Service
-//runs mail browser window (or tray icon only or popups only)
-//WPARAM- pointer to YAMN_MAILBROWSERPARAM structure, data to mailbrowser. You do not need to fill ThreadRunningEV event member.
-//LPARAM- YAMN_MAILBROWSERPARAM structure version param. Use YAMN_MAILBROWSERVERSION definition.
-//returns zero if failed, nonzero if succeed
-#define MS_YAMN_MAILBROWSER "YAMN/Service/RunMailBrowser"
-
-//NoNewMail Service
-//runs no new mail procedure (shows popups e.g.)
-//WPARAM- pointer to YAMN_NONEWMAILPARAM structure, data to no new mail procedure. You do not need to fill ThreadRunningEV event member.
-//LPARAM- YAMN_NONEWMAILPARAM structure version param. Use YAMN_NONEWMAILVERSION definition.
-//returns zero if failed, nonzero if succeed
-#define MS_YAMN_NONEWMAILPROC "YAMN/Service/NoNewMailProc"
-
-//BadConnection Service
-//runs bad connection window
-//WPARAM- pointer to YAMN_BADCONNECTIONPARAM structure, data to mailbrowser. You do not need to fill ThreadRunningEV event member.
-//LPARAM- YAMN_BADCONNECTIONPARAM structure version param. Use YAMN_BADCONNECTIONVERSION definition.
-//returns zero if failed, nonzero if succeed
-#define MS_YAMN_BADCONNECTION "YAMN/Service/BadConnection"
-
-#define MUUID_YAMN_FORCECHECK { 0x7d15e716, 0x6045, 0x40e3, { 0xa2, 0xb5, 0x5f, 0xb, 0xa4, 0x2b, 0xc7, 0x77 } }
-#endif