From 1572f78c8d183b01614b599f67d7cc29e3b77240 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 8 Oct 2023 13:42:34 +0300 Subject: YAMN: unused code removed --- plugins/ExternalAPI/m_filterplugin.h | 139 ----------------------------------- plugins/ExternalAPI/m_yamn.h | 7 -- 2 files changed, 146 deletions(-) delete mode 100644 plugins/ExternalAPI/m_filterplugin.h (limited to 'plugins/ExternalAPI') diff --git a/plugins/ExternalAPI/m_filterplugin.h b/plugins/ExternalAPI/m_filterplugin.h deleted file mode 100644 index 80f7ccd910..0000000000 --- a/plugins/ExternalAPI/m_filterplugin.h +++ /dev/null @@ -1,139 +0,0 @@ -#ifndef __M_FILTERPLUGIN_H -#define __M_FILTERPLUGIN_H - -#include -#include "m_mails.h" //for mail definition - -// -//================================== IMPORTED FUNCTIONS ================================== -// - -#ifndef YAMN_STANDARDFCN -typedef DWORD (WINAPI *YAMN_STANDARDFCN)(LPVOID); -#endif -typedef DWORD (WINAPI *YAMN_FILTERMAILFCN)(CAccount *,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 (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,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,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/plugins/ExternalAPI/m_yamn.h b/plugins/ExternalAPI/m_yamn.h index 10b4f94513..77ea3cb676 100644 --- a/plugins/ExternalAPI/m_yamn.h +++ b/plugins/ExternalAPI/m_yamn.h @@ -110,13 +110,6 @@ struct CExportedServices //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. -- cgit v1.2.3