diff options
Diffstat (limited to 'plugins/CloudFile/src')
-rw-r--r-- | plugins/CloudFile/src/Services/dropbox_service.cpp | 12 | ||||
-rw-r--r-- | plugins/CloudFile/src/Services/google_service.cpp | 12 | ||||
-rw-r--r-- | plugins/CloudFile/src/Services/microsoft_service.cpp | 12 | ||||
-rw-r--r-- | plugins/CloudFile/src/Services/yandex_service.cpp | 12 | ||||
-rw-r--r-- | plugins/CloudFile/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/CloudFile/src/services.cpp | 26 | ||||
-rw-r--r-- | plugins/CloudFile/src/stdafx.h | 1 |
7 files changed, 52 insertions, 25 deletions
diff --git a/plugins/CloudFile/src/Services/dropbox_service.cpp b/plugins/CloudFile/src/Services/dropbox_service.cpp index a9c902e13a..573fe90dbb 100644 --- a/plugins/CloudFile/src/Services/dropbox_service.cpp +++ b/plugins/CloudFile/src/Services/dropbox_service.cpp @@ -299,3 +299,15 @@ UINT CDropboxService::Upload(FileTransferParam *ftp) ftp->SetStatus(ACKRESULT_SUCCESS); return ACKRESULT_SUCCESS; } + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CMPlugin : public CMPluginBase +{ + CMPlugin() : + CMPluginBase(MODULE "/Dropbox") + { + RegisterProtocol(PROTOTYPE_PROTOCOL, (pfnInitProto)CDropboxService::Init, (pfnUninitProto)CDropboxService::UnInit); + } +} +static g_plugin; diff --git a/plugins/CloudFile/src/Services/google_service.cpp b/plugins/CloudFile/src/Services/google_service.cpp index 6a40d3ec46..be818596a6 100644 --- a/plugins/CloudFile/src/Services/google_service.cpp +++ b/plugins/CloudFile/src/Services/google_service.cpp @@ -284,3 +284,15 @@ UINT CGDriveService::Upload(FileTransferParam *ftp) ftp->SetStatus(ACKRESULT_SUCCESS); return ACKRESULT_SUCCESS; } + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CMPlugin : public CMPluginBase +{ + CMPlugin() : + CMPluginBase(MODULE "/GDrive") + { + RegisterProtocol(PROTOTYPE_PROTOCOL, (pfnInitProto)CGDriveService::Init, (pfnUninitProto)CGDriveService::UnInit); + } +} +static g_plugin; diff --git a/plugins/CloudFile/src/Services/microsoft_service.cpp b/plugins/CloudFile/src/Services/microsoft_service.cpp index 3f5ebeab4d..3366779d33 100644 --- a/plugins/CloudFile/src/Services/microsoft_service.cpp +++ b/plugins/CloudFile/src/Services/microsoft_service.cpp @@ -273,3 +273,15 @@ UINT COneDriveService::Upload(FileTransferParam *ftp) ftp->SetStatus(ACKRESULT_SUCCESS); return ACKRESULT_SUCCESS; } + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CMPlugin : public CMPluginBase +{ + CMPlugin() : + CMPluginBase(MODULE "/OneDrive") + { + RegisterProtocol(PROTOTYPE_PROTOCOL, (pfnInitProto)COneDriveService::Init, (pfnUninitProto)COneDriveService::UnInit); + } +} +static g_plugin; diff --git a/plugins/CloudFile/src/Services/yandex_service.cpp b/plugins/CloudFile/src/Services/yandex_service.cpp index 97ce0eda46..88419fffc4 100644 --- a/plugins/CloudFile/src/Services/yandex_service.cpp +++ b/plugins/CloudFile/src/Services/yandex_service.cpp @@ -279,3 +279,15 @@ UINT CYandexService::Upload(FileTransferParam *ftp) ftp->SetStatus(ACKRESULT_SUCCESS); return ACKRESULT_SUCCESS; } + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CMPlugin : public CMPluginBase +{ + CMPlugin() : + CMPluginBase(MODULE "/YandexDisk") + { + RegisterProtocol(PROTOTYPE_PROTOCOL, (pfnInitProto)CYandexService::Init, (pfnUninitProto)CYandexService::UnInit); + } +} +static g_plugin; diff --git a/plugins/CloudFile/src/main.cpp b/plugins/CloudFile/src/main.cpp index 28627c612e..c01ca5eba7 100644 --- a/plugins/CloudFile/src/main.cpp +++ b/plugins/CloudFile/src/main.cpp @@ -44,4 +44,4 @@ extern "C" int __declspec(dllexport) Load(void) extern "C" int __declspec(dllexport) Unload(void) { return 0; -}
\ No newline at end of file +} diff --git a/plugins/CloudFile/src/services.cpp b/plugins/CloudFile/src/services.cpp index 80fc88a852..0b9e062b09 100644 --- a/plugins/CloudFile/src/services.cpp +++ b/plugins/CloudFile/src/services.cpp @@ -89,30 +89,8 @@ INT_PTR Upload(WPARAM wParam, LPARAM lParam) void InitializeServices() { PROTOCOLDESCRIPTOR pd = { sizeof(pd) }; - pd.type = PROTOTYPE_PROTOCOL; - - pd.szName = MODULE "/Dropbox"; - pd.fnInit = (pfnInitProto)CDropboxService::Init; - pd.fnUninit = (pfnUninitProto)CDropboxService::UnInit; - Proto_RegisterModule(&pd); - - pd.szName = MODULE "/GDrive"; - pd.fnInit = (pfnInitProto)CGDriveService::Init; - pd.fnUninit = (pfnUninitProto)CGDriveService::UnInit; - Proto_RegisterModule(&pd); - - pd.szName = MODULE "/OneDrivre"; - pd.fnInit = (pfnInitProto)COneDriveService::Init; - pd.fnUninit = (pfnUninitProto)COneDriveService::UnInit; - Proto_RegisterModule(&pd); - - pd.szName = MODULE "/YandexDisk"; - pd.fnInit = (pfnInitProto)CYandexService::Init; - pd.fnUninit = (pfnUninitProto)CYandexService::UnInit; - Proto_RegisterModule(&pd); - - pd.szName = MODULE; pd.type = PROTOTYPE_FILTER; + pd.szName = MODULE; Proto_RegisterModule(&pd); CreateServiceFunction(MODULE PSS_FILE, SendFileInterceptor); @@ -120,4 +98,4 @@ void InitializeServices() CreateServiceFunction(MS_CLOUDFILE_GETSERVICE, GetService); CreateServiceFunction(MS_CLOUDFILE_ENUMSERVICES, EnumServices); CreateServiceFunction(MS_CLOUDFILE_UPLOAD, Upload); -}
\ No newline at end of file +} diff --git a/plugins/CloudFile/src/stdafx.h b/plugins/CloudFile/src/stdafx.h index 61d86ce5fa..b35ab0ed8c 100644 --- a/plugins/CloudFile/src/stdafx.h +++ b/plugins/CloudFile/src/stdafx.h @@ -30,6 +30,7 @@ #include <m_metacontacts.h> #include <m_protoint.h> #include <m_protosvc.h> +#include <m_plugin.h> #include <m_cloudfile.h> |