From 9370749734fa9e0a22e5ed7ff89857c6124c5ae0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 13 Apr 2013 17:36:17 +0000 Subject: stub for the standard encryptor git-svn-id: http://svn.miranda-ng.org/main/trunk@4443 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdcrypt/commonheaders.cpp | 2 + src/core/stdcrypt/commonheaders.h | 89 ++++++++++ src/core/stdcrypt/encrypt.cpp | 29 ++++ src/core/stdcrypt/main.cpp | 65 ++++++++ src/core/stdcrypt/resource.rc | 66 ++++++++ src/core/stdcrypt/stdcrypt_10.vcxproj | 223 +++++++++++++++++++++++++ src/core/stdcrypt/stdcrypt_10.vcxproj.filters | 47 ++++++ src/core/stdcrypt/stdcrypt_11.vcxproj | 228 ++++++++++++++++++++++++++ src/core/stdcrypt/stdcrypt_11.vcxproj.filters | 47 ++++++ src/core/stdcrypt/version.h | 14 ++ src/core/stdcrypt/version.rc | 42 +++++ 11 files changed, 852 insertions(+) create mode 100644 src/core/stdcrypt/commonheaders.cpp create mode 100644 src/core/stdcrypt/commonheaders.h create mode 100644 src/core/stdcrypt/encrypt.cpp create mode 100644 src/core/stdcrypt/main.cpp create mode 100644 src/core/stdcrypt/resource.rc create mode 100644 src/core/stdcrypt/stdcrypt_10.vcxproj create mode 100644 src/core/stdcrypt/stdcrypt_10.vcxproj.filters create mode 100644 src/core/stdcrypt/stdcrypt_11.vcxproj create mode 100644 src/core/stdcrypt/stdcrypt_11.vcxproj.filters create mode 100644 src/core/stdcrypt/version.h create mode 100644 src/core/stdcrypt/version.rc (limited to 'src/core/stdcrypt') diff --git a/src/core/stdcrypt/commonheaders.cpp b/src/core/stdcrypt/commonheaders.cpp new file mode 100644 index 0000000000..95b2201163 --- /dev/null +++ b/src/core/stdcrypt/commonheaders.cpp @@ -0,0 +1,2 @@ +#include "commonheaders.h" + diff --git a/src/core/stdcrypt/commonheaders.h b/src/core/stdcrypt/commonheaders.h new file mode 100644 index 0000000000..205a18193b --- /dev/null +++ b/src/core/stdcrypt/commonheaders.h @@ -0,0 +1,89 @@ +/* + +Miranda IM: the free IM client for Microsoft* Windows* + +Copyright 2000-12 Miranda IM, 2012-13 Miranda NG project, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +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; either version 2 +of the License, or (at your option) any later version. + +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, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#define WINVER 0x0700 +#define _WIN32_WINNT 0x0700 +#define _WIN32_IE 0x0601 + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#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" +#include "../stdplug.h" + +extern HINSTANCE hInst; diff --git a/src/core/stdcrypt/encrypt.cpp b/src/core/stdcrypt/encrypt.cpp new file mode 100644 index 0000000000..e86e34437d --- /dev/null +++ b/src/core/stdcrypt/encrypt.cpp @@ -0,0 +1,29 @@ +/* + +Miranda NG: the free IM client for Microsoft* Windows* + +Copyright (C) 2012-13 Miranda NG project, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +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; either version 2 +of the License, or (at your option) any later version. + +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, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "commonheaders.h" + +int LoadEncryptionModule(void) +{ + return 0; +} diff --git a/src/core/stdcrypt/main.cpp b/src/core/stdcrypt/main.cpp new file mode 100644 index 0000000000..5c2d8b3084 --- /dev/null +++ b/src/core/stdcrypt/main.cpp @@ -0,0 +1,65 @@ +/* + +Standard encryption plugin for Myranda NG +Copyright (C) 2012-13 George Hazan + +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; either version 2 of the License, or +(at your option) any later version. + +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, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + +#include "commonheaders.h" + +int LoadEncryptionModule(void); + +HINSTANCE hInst; +int hLangpack; + +PLUGININFOEX pluginInfo = { + sizeof(PLUGININFOEX), + __PLUGIN_NAME, + MIRANDA_VERSION_DWORD, + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, + UNICODE_AWARE, + // {D3637189-A5A5-41F5-BC72-67A2F8AF1B6F} + { 0xd3637189, 0xa5a5, 0x41f5, {0xbc, 0x72, 0x67, 0xa2, 0xf8, 0xaf, 0x1b, 0x6f}} +}; + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + hInst = hinstDLL; + return TRUE; +} + +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +{ + return &pluginInfo; +} + +extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_CRYPTO, MIID_LAST }; + +extern "C" int __declspec(dllexport) Load(void) +{ + mir_getLP(&pluginInfo); + + return LoadEncryptionModule(); +} + +extern "C" int __declspec(dllexport) Unload(void) +{ + return 0; +} diff --git a/src/core/stdcrypt/resource.rc b/src/core/stdcrypt/resource.rc new file mode 100644 index 0000000000..5bb57eb276 --- /dev/null +++ b/src/core/stdcrypt/resource.rc @@ -0,0 +1,66 @@ +// Microsoft Visual C++ generated resource script. +// +#include "..\..\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include +#include + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +#endif // APSTUDIO_INVOKED + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "..\..\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include \r\n" + "#include \r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED diff --git a/src/core/stdcrypt/stdcrypt_10.vcxproj b/src/core/stdcrypt/stdcrypt_10.vcxproj new file mode 100644 index 0000000000..a7bf4e680e --- /dev/null +++ b/src/core/stdcrypt/stdcrypt_10.vcxproj @@ -0,0 +1,223 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + StdCrypt + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3} + + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + true + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\Core\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)\Core\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Core\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Core\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + true + + + + Full + OnlyExplicitInline + Size + ..\..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;ADDCONTACTPLUS_EXPORTS;%(PreprocessorDefinitions) + true + false + true + Fast + Level3 + 4996;%(DisableSpecificWarnings) + Use + commonheaders.h + false + + + NDEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi;..\..\..\include + + + miranda32.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + true + true + true + 0x3ae00000 + false + $(IntDir)$(TargetName).lib + Windows + $(ProfileDir)..\..\..\bin10\lib + /PDBALTPATH:%_PDB% + + + + + Disabled + ..\..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;ADDCONTACTPLUS_EXPORTS;%(PreprocessorDefinitions) + false + true + EnableFastChecks + MultiThreadedDebugDLL + true + Level3 + EditAndContinue + 4996;%(DisableSpecificWarnings) + Use + commonheaders.h + false + + + _DEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi;..\..\..\include + + + miranda32.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + true + 0x3ae00000 + false + $(IntDir)$(TargetName).lib + Windows + $(ProfileDir)..\..\..\bin10\lib + + + + + Full + OnlyExplicitInline + Size + ..\..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN64;NDEBUG;_WINDOWS;_USRDLL;ADDCONTACTPLUS_EXPORTS;%(PreprocessorDefinitions) + true + false + true + Fast + Level3 + 4996;%(DisableSpecificWarnings) + Use + commonheaders.h + false + + + NDEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi;..\..\..\include + + + miranda64.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + true + true + true + 0x3ae00000 + false + $(IntDir)$(TargetName).lib + Windows + $(ProfileDir)..\..\..\bin10\lib + /PDBALTPATH:%_PDB% + + + + + Disabled + ..\..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN64;_DEBUG;_WINDOWS;_USRDLL;ADDCONTACTPLUS_EXPORTS;%(PreprocessorDefinitions) + false + true + EnableFastChecks + MultiThreadedDebugDLL + true + Level3 + 4996;%(DisableSpecificWarnings) + Use + commonheaders.h + false + + + _DEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi;..\..\..\include + + + miranda64.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + true + 0x3ae00000 + false + $(IntDir)$(TargetName).lib + Windows + $(ProfileDir)..\..\..\bin10\lib + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/core/stdcrypt/stdcrypt_10.vcxproj.filters b/src/core/stdcrypt/stdcrypt_10.vcxproj.filters new file mode 100644 index 0000000000..c8a48044f2 --- /dev/null +++ b/src/core/stdcrypt/stdcrypt_10.vcxproj.filters @@ -0,0 +1,47 @@ + + + + + {5c074c9e-6c66-4233-bbd3-a50170fccf47} + cpp;c;cxx;rc;def;r;odl;idl;hpj;bat + + + {e30af2c4-42d4-4342-8eb9-2dbca157c6bb} + h;hpp;hxx;hm;inl + + + {9208a050-ffae-47fa-bc98-4ca4f79d37d7} + ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + Resource Files + + + \ No newline at end of file diff --git a/src/core/stdcrypt/stdcrypt_11.vcxproj b/src/core/stdcrypt/stdcrypt_11.vcxproj new file mode 100644 index 0000000000..c4161fdc50 --- /dev/null +++ b/src/core/stdcrypt/stdcrypt_11.vcxproj @@ -0,0 +1,228 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + StdCrypt + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3} + + + + DynamicLibrary + Unicode + v110_xp + + + DynamicLibrary + Unicode + true + v110_xp + + + DynamicLibrary + Unicode + v110_xp + + + DynamicLibrary + Unicode + true + v110_xp + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\Core\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)\Core\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Core\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Core\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + true + + + + Full + OnlyExplicitInline + Size + ..\..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;ADDCONTACTPLUS_EXPORTS;%(PreprocessorDefinitions) + true + false + true + Fast + Level3 + 4996;%(DisableSpecificWarnings) + Use + commonheaders.h + false + + + NDEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi;..\..\..\include + + + miranda32.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + true + true + true + 0x3ae00000 + false + $(IntDir)$(TargetName).lib + Windows + $(ProfileDir)..\..\..\bin11\lib + /PDBALTPATH:%_PDB% + + + + + Disabled + ..\..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;ADDCONTACTPLUS_EXPORTS;%(PreprocessorDefinitions) + false + true + EnableFastChecks + MultiThreadedDebugDLL + true + Level3 + EditAndContinue + 4996;%(DisableSpecificWarnings) + Use + commonheaders.h + false + + + _DEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi;..\..\..\include + + + miranda32.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + true + 0x3ae00000 + false + $(IntDir)$(TargetName).lib + Windows + $(ProfileDir)..\..\..\bin11\lib + false + + + + + Full + OnlyExplicitInline + Size + ..\..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN64;NDEBUG;_WINDOWS;_USRDLL;ADDCONTACTPLUS_EXPORTS;%(PreprocessorDefinitions) + true + false + true + Fast + Level3 + 4996;%(DisableSpecificWarnings) + Use + commonheaders.h + false + + + NDEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi;..\..\..\include + + + miranda64.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + true + true + true + 0x3ae00000 + false + $(IntDir)$(TargetName).lib + Windows + $(ProfileDir)..\..\..\bin11\lib + /PDBALTPATH:%_PDB% + + + + + Disabled + ..\..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) + WIN64;_DEBUG;_WINDOWS;_USRDLL;ADDCONTACTPLUS_EXPORTS;%(PreprocessorDefinitions) + false + true + EnableFastChecks + MultiThreadedDebugDLL + true + Level3 + 4996;%(DisableSpecificWarnings) + Use + commonheaders.h + false + + + _DEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi;..\..\..\include + + + miranda64.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + true + 0x3ae00000 + false + $(IntDir)$(TargetName).lib + Windows + $(ProfileDir)..\..\..\bin11\lib + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/core/stdcrypt/stdcrypt_11.vcxproj.filters b/src/core/stdcrypt/stdcrypt_11.vcxproj.filters new file mode 100644 index 0000000000..c8a48044f2 --- /dev/null +++ b/src/core/stdcrypt/stdcrypt_11.vcxproj.filters @@ -0,0 +1,47 @@ + + + + + {5c074c9e-6c66-4233-bbd3-a50170fccf47} + cpp;c;cxx;rc;def;r;odl;idl;hpj;bat + + + {e30af2c4-42d4-4342-8eb9-2dbca157c6bb} + h;hpp;hxx;hm;inl + + + {9208a050-ffae-47fa-bc98-4ca4f79d37d7} + ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + Resource Files + + + \ No newline at end of file diff --git a/src/core/stdcrypt/version.h b/src/core/stdcrypt/version.h new file mode 100644 index 0000000000..cb9566e458 --- /dev/null +++ b/src/core/stdcrypt/version.h @@ -0,0 +1,14 @@ + +#include + +#define __FILEVERSION_STRING MIRANDA_VERSION_FILEVERSION +#define __VERSION_STRING MIRANDA_VERSION_STRING + +#define __PLUGIN_NAME "Standard encrypting module" +#define __INTERNAL_NAME "stdcrypt" +#define __FILENAME "stdcrypt.dll" +#define __DESCRIPTION "Core module for encryption." +#define __AUTHOR "Miranda NG Development Team" +#define __AUTHOREMAIL "" +#define __AUTHORWEB "http://miranda-ng.org/" +#define __COPYRIGHT "© 2012-13 Miranda NG Development Team" diff --git a/src/core/stdcrypt/version.rc b/src/core/stdcrypt/version.rc new file mode 100644 index 0000000000..d1da5e8d6a --- /dev/null +++ b/src/core/stdcrypt/version.rc @@ -0,0 +1,42 @@ +// Microsoft Visual C++ generated resource script. +// +#ifdef APSTUDIO_INVOKED +#error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + +#include "afxres.h" +#include "version.h" + +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#endif //_WIN32 + +VS_VERSION_INFO VERSIONINFO + FILEVERSION __FILEVERSION_STRING + PRODUCTVERSION __FILEVERSION_STRING + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "FileDescription", __DESCRIPTION + VALUE "InternalName", __PLUGIN_NAME + VALUE "LegalCopyright", __COPYRIGHT + VALUE "OriginalFilename", __FILENAME + VALUE "ProductName", __PLUGIN_NAME + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END -- cgit v1.2.3