diff options
author | George Hazan <ghazan@miranda.im> | 2022-09-10 03:23:51 -0700 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-09-10 03:23:51 -0700 |
commit | 6847777dfa98b0436a642277b757c3b09717817c (patch) | |
tree | fd042ecc582eb86a4ac29a3dfb50a31453a4e5da /protocols | |
parent | f9bfb22761ce245be0681bec065d04388f586b72 (diff) |
no need to export Miranda's offal to the outside world
Diffstat (limited to 'protocols')
10 files changed, 27 insertions, 33 deletions
diff --git a/protocols/CloudFile/src/Services/dropbox_service.cpp b/protocols/CloudFile/src/Services/dropbox_service.cpp index 46a096df0b..805a7f2800 100644 --- a/protocols/CloudFile/src/Services/dropbox_service.cpp +++ b/protocols/CloudFile/src/Services/dropbox_service.cpp @@ -8,10 +8,10 @@ struct CMPluginDropbox : public PLUGIN<CMPluginDropbox> { m_hInst = g_plugin.getInst(); - RegisterProtocol(PROTOTYPE_PROTOWITHACCS, (pfnInitProto)CDropboxService::Init, (pfnUninitProto)CDropboxService::UnInit); + RegisterProtocol(PROTOTYPE_PROTOWITHACCS, CDropboxService::Init, CDropboxService::UnInit); } } -g_pluginDropbox; + g_pluginDropbox; ///////////////////////////////////////////////////////////////////////////////////////// @@ -21,16 +21,16 @@ CDropboxService::CDropboxService(const char *protoName, const wchar_t *userName) m_hProtoIcon = g_plugin.getIconHandle(IDI_DROPBOX); } -CDropboxService* CDropboxService::Init(const char *moduleName, const wchar_t *userName) +PROTO_INTERFACE* CDropboxService::Init(const char *moduleName, const wchar_t *userName) { CDropboxService *proto = new CDropboxService(moduleName, userName); Services.insert(proto); return proto; } -int CDropboxService::UnInit(CDropboxService *proto) +int CDropboxService::UnInit(PROTO_INTERFACE *proto) { - Services.remove(proto); + Services.remove((CDropboxService *)proto); delete proto; return 0; } diff --git a/protocols/CloudFile/src/Services/dropbox_service.h b/protocols/CloudFile/src/Services/dropbox_service.h index b6c5a7dfcd..5166a9c17c 100644 --- a/protocols/CloudFile/src/Services/dropbox_service.h +++ b/protocols/CloudFile/src/Services/dropbox_service.h @@ -21,8 +21,8 @@ private: public: CDropboxService(const char *protoName, const wchar_t *userName); - static CDropboxService* Init(const char *szModuleName, const wchar_t *szUserName); - static int UnInit(CDropboxService*); + static PROTO_INTERFACE* Init(const char *szModuleName, const wchar_t *szUserName); + static int UnInit(PROTO_INTERFACE *); const char* GetModuleName() const override; diff --git a/protocols/CloudFile/src/Services/google_service.cpp b/protocols/CloudFile/src/Services/google_service.cpp index c7498d936c..58b32eaa7f 100644 --- a/protocols/CloudFile/src/Services/google_service.cpp +++ b/protocols/CloudFile/src/Services/google_service.cpp @@ -9,7 +9,7 @@ struct CMPluginGoogle : public CMPluginBase { m_hInst = g_plugin.getInst(); - RegisterProtocol(PROTOTYPE_PROTOWITHACCS, (pfnInitProto)CGDriveService::Init, (pfnUninitProto)CGDriveService::UnInit); + RegisterProtocol(PROTOTYPE_PROTOWITHACCS, CGDriveService::Init, CGDriveService::UnInit); } } g_pluginGoogle; @@ -22,16 +22,16 @@ CGDriveService::CGDriveService(const char *protoName, const wchar_t *userName) : m_hProtoIcon = g_plugin.getIconHandle(IDI_GDRIVE); } -CGDriveService* CGDriveService::Init(const char *moduleName, const wchar_t *userName) +PROTO_INTERFACE* CGDriveService::Init(const char *moduleName, const wchar_t *userName) { CGDriveService *proto = new CGDriveService(moduleName, userName); Services.insert(proto); return proto; } -int CGDriveService::UnInit(CGDriveService *proto) +int CGDriveService::UnInit(PROTO_INTERFACE *proto) { - Services.remove(proto); + Services.remove((CGDriveService*)proto); delete proto; return 0; } diff --git a/protocols/CloudFile/src/Services/google_service.h b/protocols/CloudFile/src/Services/google_service.h index 919babb86f..7133ab9a52 100644 --- a/protocols/CloudFile/src/Services/google_service.h +++ b/protocols/CloudFile/src/Services/google_service.h @@ -20,8 +20,8 @@ private: public: CGDriveService(const char *protoName, const wchar_t *userName); - static CGDriveService* Init(const char *szModuleName, const wchar_t *szUserName); - static int UnInit(CGDriveService*); + static PROTO_INTERFACE* Init(const char *szModuleName, const wchar_t *szUserName); + static int UnInit(PROTO_INTERFACE*); const char* GetModuleName() const override; diff --git a/protocols/CloudFile/src/Services/microsoft_service.cpp b/protocols/CloudFile/src/Services/microsoft_service.cpp index 1c74d469e8..8d63f4a23f 100644 --- a/protocols/CloudFile/src/Services/microsoft_service.cpp +++ b/protocols/CloudFile/src/Services/microsoft_service.cpp @@ -8,7 +8,7 @@ struct CMPluginOnedrive : public CMPluginBase { m_hInst = g_plugin.getInst(); - RegisterProtocol(PROTOTYPE_PROTOWITHACCS, (pfnInitProto)COneDriveService::Init, (pfnUninitProto)COneDriveService::UnInit); + RegisterProtocol(PROTOTYPE_PROTOWITHACCS, COneDriveService::Init, COneDriveService::UnInit); } } g_pluginOnedrive; @@ -21,16 +21,16 @@ COneDriveService::COneDriveService(const char *protoName, const wchar_t *userNam m_hProtoIcon = g_plugin.getIconHandle(IDI_ONEDRIVE); } -COneDriveService* COneDriveService::Init(const char *moduleName, const wchar_t *userName) +PROTO_INTERFACE* COneDriveService::Init(const char *moduleName, const wchar_t *userName) { COneDriveService *proto = new COneDriveService(moduleName, userName); Services.insert(proto); return proto; } -int COneDriveService::UnInit(COneDriveService *proto) +int COneDriveService::UnInit(PROTO_INTERFACE *proto) { - Services.remove(proto); + Services.remove((COneDriveService *)proto); delete proto; return 0; } diff --git a/protocols/CloudFile/src/Services/microsoft_service.h b/protocols/CloudFile/src/Services/microsoft_service.h index d993410003..b8fe3c2bde 100644 --- a/protocols/CloudFile/src/Services/microsoft_service.h +++ b/protocols/CloudFile/src/Services/microsoft_service.h @@ -19,8 +19,8 @@ private: public: COneDriveService(const char *protoName, const wchar_t *userName); - static COneDriveService* Init(const char *szModuleName, const wchar_t *szUserName); - static int UnInit(COneDriveService*); + static PROTO_INTERFACE* Init(const char *szModuleName, const wchar_t *szUserName); + static int UnInit(PROTO_INTERFACE *); const char* GetModuleName() const override; diff --git a/protocols/CloudFile/src/Services/yandex_service.cpp b/protocols/CloudFile/src/Services/yandex_service.cpp index 739d8a2722..f21e9ef2e0 100644 --- a/protocols/CloudFile/src/Services/yandex_service.cpp +++ b/protocols/CloudFile/src/Services/yandex_service.cpp @@ -8,7 +8,7 @@ struct CMPluginYandex : public CMPluginBase { m_hInst = g_plugin.getInst(); - RegisterProtocol(PROTOTYPE_PROTOWITHACCS, (pfnInitProto)CYandexService::Init, (pfnUninitProto)CYandexService::UnInit); + RegisterProtocol(PROTOTYPE_PROTOWITHACCS, CYandexService::Init, CYandexService::UnInit); } } g_pluginYandex; @@ -21,16 +21,16 @@ CYandexService::CYandexService(const char *protoName, const wchar_t *userName) : m_hProtoIcon = g_plugin.getIconHandle(IDI_YADISK); } -CYandexService* CYandexService::Init(const char *moduleName, const wchar_t *userName) +PROTO_INTERFACE* CYandexService::Init(const char *moduleName, const wchar_t *userName) { CYandexService *proto = new CYandexService(moduleName, userName); Services.insert(proto); return proto; } -int CYandexService::UnInit(CYandexService *proto) +int CYandexService::UnInit(PROTO_INTERFACE *proto) { - Services.remove(proto); + Services.remove((CYandexService*)proto); delete proto; return 0; } diff --git a/protocols/CloudFile/src/Services/yandex_service.h b/protocols/CloudFile/src/Services/yandex_service.h index 0fdcdf679a..c83a49f22c 100644 --- a/protocols/CloudFile/src/Services/yandex_service.h +++ b/protocols/CloudFile/src/Services/yandex_service.h @@ -20,8 +20,8 @@ private: public: CYandexService(const char *protoName, const wchar_t *userName); - static CYandexService* Init(const char *szModuleName, const wchar_t *szUserName); - static int UnInit(CYandexService*); + static PROTO_INTERFACE* Init(const char *szModuleName, const wchar_t *szUserName); + static int UnInit(PROTO_INTERFACE *); const char* GetModuleName() const override; diff --git a/protocols/CloudFile/src/cloud_file.cpp b/protocols/CloudFile/src/cloud_file.cpp index 6cd398adb3..81e2c37a2b 100644 --- a/protocols/CloudFile/src/cloud_file.cpp +++ b/protocols/CloudFile/src/cloud_file.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" -CCloudService::CCloudService(const char *protoName, const wchar_t *userName, HPLUGIN pPlugin) - : PROTO<CCloudService>(protoName, userName), +CCloudService::CCloudService(const char *protoName, const wchar_t *userName, HPLUGIN pPlugin) : + PROTO<CCloudService>(protoName, userName), m_pPlugin(pPlugin) { NETLIBUSER nlu = {}; @@ -19,11 +19,6 @@ CCloudService::~CCloudService() m_hConnection = nullptr; } -void CCloudService::OnErase() -{ - KillModuleMenus(m_pPlugin); -} - HPLUGIN CCloudService::GetId() const { return m_pPlugin; diff --git a/protocols/CloudFile/src/cloud_file.h b/protocols/CloudFile/src/cloud_file.h index 1e70671054..f02589c2bd 100644 --- a/protocols/CloudFile/src/cloud_file.h +++ b/protocols/CloudFile/src/cloud_file.h @@ -24,7 +24,6 @@ protected: virtual void HandleHttpError(NETLIBHTTPREQUEST *response); virtual void HandleJsonError(JSONNode &node) = 0; - void OnErase() override; void OnModulesLoaded() override; JSONNode GetJsonResponse(NETLIBHTTPREQUEST *response); |