From a905c9c3f92fd54f37a5466649ac378db69e7cb0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Mar 2018 14:29:31 +0300 Subject: all protocols rewritten to CMPluginBase --- plugins/LotusNotify/src/LotusNotify.cpp | 19 ++++++++++++------- plugins/LotusNotify/src/stdafx.h | 4 +--- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'plugins/LotusNotify') diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index d13ff2253c..344bf56f18 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -1708,13 +1708,6 @@ extern "C" int __declspec(dllexport) Load(void) Menu_EnableItem(hMenuHandle, FALSE); } - // create protocol - PROTOCOLDESCRIPTOR pd = { 0 }; - pd.cbSize = sizeof(pd); - pd.szName = PLUGINNAME; - pd.type = PROTOTYPE_PROTOCOL; - Proto_RegisterModule(&pd); - // set all contacts to offline for (auto &hContact : Contacts(PLUGINNAME)) db_set_w(hContact, PLUGINNAME, "status", ID_STATUS_OFFLINE); @@ -1777,3 +1770,15 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID ) } return TRUE; } + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CMPlugin : public CMPluginBase +{ + CMPlugin() : + CMPluginBase(PLUGINNAME) + { + RegisterProtocol(PROTOTYPE_PROTOCOL); + } +} + g_plugin; diff --git a/plugins/LotusNotify/src/stdafx.h b/plugins/LotusNotify/src/stdafx.h index f94dbb2002..9e66d0cc79 100644 --- a/plugins/LotusNotify/src/stdafx.h +++ b/plugins/LotusNotify/src/stdafx.h @@ -21,10 +21,8 @@ #include #include #include -//debug.h #include - - +#include // Notesapi headers #define W32 -- cgit v1.2.3