From a00df015c7408935b9edf33da47cdd9c89f50de7 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Sat, 2 May 2015 18:11:42 +0000 Subject: Dropbox and Proto_Dropbox - unified projects git-svn-id: http://svn.miranda-ng.org/main/trunk@13384 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dropbox/src/common.h | 42 -------------------------- plugins/Dropbox/src/dropbox.cpp | 2 +- plugins/Dropbox/src/dropbox_commands.cpp | 2 +- plugins/Dropbox/src/dropbox_dialogs.cpp | 2 +- plugins/Dropbox/src/dropbox_events.cpp | 2 +- plugins/Dropbox/src/dropbox_icons.cpp | 2 +- plugins/Dropbox/src/dropbox_menus.cpp | 2 +- plugins/Dropbox/src/dropbox_services.cpp | 2 +- plugins/Dropbox/src/dropbox_transfers.cpp | 2 +- plugins/Dropbox/src/dropbox_utils.cpp | 2 +- plugins/Dropbox/src/file_transfer.h | 2 +- plugins/Dropbox/src/http_request.h | 2 +- plugins/Dropbox/src/main.cpp | 49 +++++++++++++++++++++++++++++++ plugins/Dropbox/src/stdafx.cpp | 49 ------------------------------- plugins/Dropbox/src/stdafx.cxx | 18 ++++++++++++ plugins/Dropbox/src/stdafx.h | 42 ++++++++++++++++++++++++++ 16 files changed, 120 insertions(+), 102 deletions(-) delete mode 100644 plugins/Dropbox/src/common.h create mode 100644 plugins/Dropbox/src/main.cpp delete mode 100644 plugins/Dropbox/src/stdafx.cpp create mode 100644 plugins/Dropbox/src/stdafx.cxx create mode 100644 plugins/Dropbox/src/stdafx.h (limited to 'plugins/Dropbox/src') diff --git a/plugins/Dropbox/src/common.h b/plugins/Dropbox/src/common.h deleted file mode 100644 index c34bab3d16..0000000000 --- a/plugins/Dropbox/src/common.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef _COMMON_H_ -#define _COMMON_H_ - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include - -#include "version.h" -#include "resource.h" - -#define MODULE "Dropbox" - -extern HINSTANCE g_hInstance; - -class CDropbox; - -#include "dropbox.h" - -#endif //_COMMON_H_ \ No newline at end of file diff --git a/plugins/Dropbox/src/dropbox.cpp b/plugins/Dropbox/src/dropbox.cpp index 7487fab330..98e37451f7 100644 --- a/plugins/Dropbox/src/dropbox.cpp +++ b/plugins/Dropbox/src/dropbox.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "stdafx.h" CDropbox::CDropbox() { diff --git a/plugins/Dropbox/src/dropbox_commands.cpp b/plugins/Dropbox/src/dropbox_commands.cpp index e83988ff0c..52422ea779 100644 --- a/plugins/Dropbox/src/dropbox_commands.cpp +++ b/plugins/Dropbox/src/dropbox_commands.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "stdafx.h" void CDropbox::CommandHelp(void *arg) { diff --git a/plugins/Dropbox/src/dropbox_dialogs.cpp b/plugins/Dropbox/src/dropbox_dialogs.cpp index 6cb5d9bbf3..a57afbae5b 100644 --- a/plugins/Dropbox/src/dropbox_dialogs.cpp +++ b/plugins/Dropbox/src/dropbox_dialogs.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "stdafx.h" INT_PTR CALLBACK CDropbox::MainOptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { diff --git a/plugins/Dropbox/src/dropbox_events.cpp b/plugins/Dropbox/src/dropbox_events.cpp index d361f07d28..1d2c2f53e9 100644 --- a/plugins/Dropbox/src/dropbox_events.cpp +++ b/plugins/Dropbox/src/dropbox_events.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "stdafx.h" int CDropbox::OnModulesLoaded(void *obj, WPARAM, LPARAM) { diff --git a/plugins/Dropbox/src/dropbox_icons.cpp b/plugins/Dropbox/src/dropbox_icons.cpp index d3bded41f7..97bb2e4884 100644 --- a/plugins/Dropbox/src/dropbox_icons.cpp +++ b/plugins/Dropbox/src/dropbox_icons.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "stdafx.h" void CDropbox::InitializeIcons() { diff --git a/plugins/Dropbox/src/dropbox_menus.cpp b/plugins/Dropbox/src/dropbox_menus.cpp index fe1200fc29..3130555d3d 100644 --- a/plugins/Dropbox/src/dropbox_menus.cpp +++ b/plugins/Dropbox/src/dropbox_menus.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "stdafx.h" INT_PTR CDropbox::SendFilesToDropboxCommand(void *obj, WPARAM hContact, LPARAM) { diff --git a/plugins/Dropbox/src/dropbox_services.cpp b/plugins/Dropbox/src/dropbox_services.cpp index 270b129d50..c1bce181d0 100644 --- a/plugins/Dropbox/src/dropbox_services.cpp +++ b/plugins/Dropbox/src/dropbox_services.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "stdafx.h" int g_nStatus = ID_STATUS_OFFLINE; diff --git a/plugins/Dropbox/src/dropbox_transfers.cpp b/plugins/Dropbox/src/dropbox_transfers.cpp index 52ce2aed57..760e761ebe 100644 --- a/plugins/Dropbox/src/dropbox_transfers.cpp +++ b/plugins/Dropbox/src/dropbox_transfers.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "stdafx.h" int CDropbox::SendFile(const char *fileName, const char *data, int length) { diff --git a/plugins/Dropbox/src/dropbox_utils.cpp b/plugins/Dropbox/src/dropbox_utils.cpp index 925d157dfd..ba7fec2ee4 100644 --- a/plugins/Dropbox/src/dropbox_utils.cpp +++ b/plugins/Dropbox/src/dropbox_utils.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "stdafx.h" wchar_t *CDropbox::HttpStatusToText(HTTP_STATUS status) { diff --git a/plugins/Dropbox/src/file_transfer.h b/plugins/Dropbox/src/file_transfer.h index 7558b83eba..f214ede484 100644 --- a/plugins/Dropbox/src/file_transfer.h +++ b/plugins/Dropbox/src/file_transfer.h @@ -1,7 +1,7 @@ #ifndef _FILE_TRANSFER_H_ #define _FILE_TRANSFER_H_ -#include "common.h" +#include "stdafx.h" struct FileTransferParam { diff --git a/plugins/Dropbox/src/http_request.h b/plugins/Dropbox/src/http_request.h index 162af8c838..231efbae25 100644 --- a/plugins/Dropbox/src/http_request.h +++ b/plugins/Dropbox/src/http_request.h @@ -1,7 +1,7 @@ #ifndef _HTTP_REQUEST_H_ #define _HTTP_REQUEST_H_ -#include "common.h" +#include "stdafx.h" enum HTTP_STATUS { diff --git a/plugins/Dropbox/src/main.cpp b/plugins/Dropbox/src/main.cpp new file mode 100644 index 0000000000..590b9802c4 --- /dev/null +++ b/plugins/Dropbox/src/main.cpp @@ -0,0 +1,49 @@ +#include "stdafx.h" + +int hLangpack; +CDropbox *dropbox; +HINSTANCE g_hInstance; + +PLUGININFOEX pluginInfo = +{ + sizeof(PLUGININFOEX), + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, + UNICODE_AWARE, + // {B908773A-86F7-4A91-8674-6A20BA0E67D1} + {0xb908773a, 0x86f7, 0x4a91, {0x86, 0x74, 0x6a, 0x20, 0xba, 0xe, 0x67, 0xd1}} + +}; + +DWORD WINAPI DllMain(HINSTANCE hInstance, DWORD, LPVOID) +{ + g_hInstance = hInstance; + + return TRUE; +} + +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +{ + return &pluginInfo; +} + +extern "C" int __declspec(dllexport) Load(void) +{ + mir_getLP(&pluginInfo); + + dropbox = new CDropbox(); + + return 0; +} + +extern "C" int __declspec(dllexport) Unload(void) +{ + delete dropbox; + + return 0; +} \ No newline at end of file diff --git a/plugins/Dropbox/src/stdafx.cpp b/plugins/Dropbox/src/stdafx.cpp deleted file mode 100644 index 4f582768a9..0000000000 --- a/plugins/Dropbox/src/stdafx.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include "common.h" - -int hLangpack; -CDropbox *dropbox; -HINSTANCE g_hInstance; - -PLUGININFOEX pluginInfo = -{ - sizeof(PLUGININFOEX), - __PLUGIN_NAME, - PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), - __DESCRIPTION, - __AUTHOR, - __AUTHOREMAIL, - __COPYRIGHT, - __AUTHORWEB, - UNICODE_AWARE, - // {B908773A-86F7-4A91-8674-6A20BA0E67D1} - {0xb908773a, 0x86f7, 0x4a91, {0x86, 0x74, 0x6a, 0x20, 0xba, 0xe, 0x67, 0xd1}} - -}; - -DWORD WINAPI DllMain(HINSTANCE hInstance, DWORD, LPVOID) -{ - g_hInstance = hInstance; - - return TRUE; -} - -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfo; -} - -extern "C" int __declspec(dllexport) Load(void) -{ - mir_getLP(&pluginInfo); - - dropbox = new CDropbox(); - - return 0; -} - -extern "C" int __declspec(dllexport) Unload(void) -{ - delete dropbox; - - return 0; -} \ No newline at end of file diff --git a/plugins/Dropbox/src/stdafx.cxx b/plugins/Dropbox/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/Dropbox/src/stdafx.cxx @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "stdafx.h" \ No newline at end of file diff --git a/plugins/Dropbox/src/stdafx.h b/plugins/Dropbox/src/stdafx.h new file mode 100644 index 0000000000..c34bab3d16 --- /dev/null +++ b/plugins/Dropbox/src/stdafx.h @@ -0,0 +1,42 @@ +#ifndef _COMMON_H_ +#define _COMMON_H_ + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +#include "version.h" +#include "resource.h" + +#define MODULE "Dropbox" + +extern HINSTANCE g_hInstance; + +class CDropbox; + +#include "dropbox.h" + +#endif //_COMMON_H_ \ No newline at end of file -- cgit v1.2.3