From 987ceba57a977c691977a0f5aa8005678fcbc7e7 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Fri, 26 Feb 2016 11:29:17 +0000 Subject: Dropbox: - added ability to intercept transfers from other protocols - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@16344 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dropbox/src/dropbox.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'plugins/Dropbox/src/dropbox.cpp') diff --git a/plugins/Dropbox/src/dropbox.cpp b/plugins/Dropbox/src/dropbox.cpp index 46d8d5fa8c..d9a47c1e04 100644 --- a/plugins/Dropbox/src/dropbox.cpp +++ b/plugins/Dropbox/src/dropbox.cpp @@ -2,12 +2,6 @@ CDropbox::CDropbox() : transfers(1, HandleKeySortT) { - PROTOCOLDESCRIPTOR pd = { 0 }; - pd.cbSize = sizeof(pd); - pd.szName = MODULE; - pd.type = PROTOTYPE_VIRTUAL; - Proto_RegisterModule(&pd); - HookEvent(ME_PROTO_ACK, OnProtoAck); HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown); HookEventObj(ME_SYSTEM_MODULESLOADED, GlobalEvent<&CDropbox::OnModulesLoaded>, this); @@ -16,6 +10,12 @@ CDropbox::CDropbox() : transfers(1, HandleKeySortT) CreateServiceFunctionObj(MS_DROPBOX_SEND_FILE, GlobalService<&CDropbox::SendFileToDropbox>, this); + PROTOCOLDESCRIPTOR pd = { 0 }; + pd.cbSize = sizeof(pd); + pd.szName = MODULE; + pd.type = PROTOTYPE_VIRTUAL; + Proto_RegisterModule(&pd); + CreateProtoServiceFunction(MODULE, PS_GETCAPS, ProtoGetCaps); CreateProtoServiceFunction(MODULE, PS_GETNAME, ProtoGetName); CreateProtoServiceFunction(MODULE, PS_LOADICON, ProtoLoadIcon); @@ -25,6 +25,12 @@ CDropbox::CDropbox() : transfers(1, HandleKeySortT) CreateProtoServiceFunctionObj(PSS_MESSAGE, GlobalService<&CDropbox::ProtoSendMessage>, this); CreateProtoServiceFunction(MODULE, PSR_MESSAGE, ProtoReceiveMessage); + pd.szName = MODULE"Inteceptor"; + pd.type = PROTOTYPE_FILTER; + Proto_RegisterModule(&pd); + + CreateServiceFunctionObj(MODULE"Inteceptor"PSS_FILE, GlobalService<&CDropbox::ProtoSendFileInterceptor>, this); + InitializeMenus(); hFileProcess = hMessageProcess = 1; -- cgit v1.2.3