From a4861f09eb12744e28718da2e38dda9482b5dc2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Thu, 18 Sep 2014 09:39:45 +0000 Subject: Implement basic Dummy protocol git-svn-id: http://svn.miranda-ng.org/main/trunk@10506 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Dummy/dummy_10.vcxproj | 199 ++++++++++++++++ protocols/Dummy/dummy_10.vcxproj.filters | 56 +++++ protocols/Dummy/dummy_12.vcxproj | 202 +++++++++++++++++ protocols/Dummy/dummy_12.vcxproj.filters | 56 +++++ protocols/Dummy/proto_dummy/Proto_Dummy_10.vcxproj | 131 +++++++++++ .../proto_dummy/Proto_Dummy_10.vcxproj.filters | 23 ++ protocols/Dummy/proto_dummy/Proto_Dummy_12.vcxproj | 135 +++++++++++ .../proto_dummy/Proto_Dummy_12.vcxproj.filters | 23 ++ protocols/Dummy/proto_dummy/res/Away.ico | Bin 0 -> 5430 bytes protocols/Dummy/proto_dummy/res/DND.ico | Bin 0 -> 5430 bytes protocols/Dummy/proto_dummy/res/FFC.ico | Bin 0 -> 5430 bytes protocols/Dummy/proto_dummy/res/Invisible.ico | Bin 0 -> 5430 bytes protocols/Dummy/proto_dummy/res/Lunch.ico | Bin 0 -> 5430 bytes protocols/Dummy/proto_dummy/res/NA.ico | Bin 0 -> 5430 bytes protocols/Dummy/proto_dummy/res/Occupied.ico | Bin 0 -> 5430 bytes protocols/Dummy/proto_dummy/res/Offline.ico | Bin 0 -> 5430 bytes protocols/Dummy/proto_dummy/res/Online.ico | Bin 0 -> 5430 bytes protocols/Dummy/proto_dummy/res/Phone.ico | Bin 0 -> 5430 bytes protocols/Dummy/proto_dummy/res/Proto_Dummy.rc | 77 +++++++ protocols/Dummy/proto_dummy/src/resource.h | 24 ++ protocols/Dummy/res/resource.aps | Bin 0 -> 3220 bytes protocols/Dummy/res/resource.rc | 98 ++++++++ protocols/Dummy/res/version.rc | 38 ++++ protocols/Dummy/src/dummy.h | 23 ++ protocols/Dummy/src/dummy_options.cpp | 86 +++++++ protocols/Dummy/src/dummy_proto.cpp | 249 +++++++++++++++++++++ protocols/Dummy/src/dummy_proto.h | 83 +++++++ protocols/Dummy/src/main.cpp | 101 +++++++++ protocols/Dummy/src/resource.h | 19 ++ protocols/Dummy/src/stdafx.cpp | 18 ++ protocols/Dummy/src/stdafx.h | 71 ++++++ protocols/Dummy/src/version.h | 14 ++ 32 files changed, 1726 insertions(+) create mode 100644 protocols/Dummy/dummy_10.vcxproj create mode 100644 protocols/Dummy/dummy_10.vcxproj.filters create mode 100644 protocols/Dummy/dummy_12.vcxproj create mode 100644 protocols/Dummy/dummy_12.vcxproj.filters create mode 100644 protocols/Dummy/proto_dummy/Proto_Dummy_10.vcxproj create mode 100644 protocols/Dummy/proto_dummy/Proto_Dummy_10.vcxproj.filters create mode 100644 protocols/Dummy/proto_dummy/Proto_Dummy_12.vcxproj create mode 100644 protocols/Dummy/proto_dummy/Proto_Dummy_12.vcxproj.filters create mode 100644 protocols/Dummy/proto_dummy/res/Away.ico create mode 100644 protocols/Dummy/proto_dummy/res/DND.ico create mode 100644 protocols/Dummy/proto_dummy/res/FFC.ico create mode 100644 protocols/Dummy/proto_dummy/res/Invisible.ico create mode 100644 protocols/Dummy/proto_dummy/res/Lunch.ico create mode 100644 protocols/Dummy/proto_dummy/res/NA.ico create mode 100644 protocols/Dummy/proto_dummy/res/Occupied.ico create mode 100644 protocols/Dummy/proto_dummy/res/Offline.ico create mode 100644 protocols/Dummy/proto_dummy/res/Online.ico create mode 100644 protocols/Dummy/proto_dummy/res/Phone.ico create mode 100644 protocols/Dummy/proto_dummy/res/Proto_Dummy.rc create mode 100644 protocols/Dummy/proto_dummy/src/resource.h create mode 100644 protocols/Dummy/res/resource.aps create mode 100644 protocols/Dummy/res/resource.rc create mode 100644 protocols/Dummy/res/version.rc create mode 100644 protocols/Dummy/src/dummy.h create mode 100644 protocols/Dummy/src/dummy_options.cpp create mode 100644 protocols/Dummy/src/dummy_proto.cpp create mode 100644 protocols/Dummy/src/dummy_proto.h create mode 100644 protocols/Dummy/src/main.cpp create mode 100644 protocols/Dummy/src/resource.h create mode 100644 protocols/Dummy/src/stdafx.cpp create mode 100644 protocols/Dummy/src/stdafx.h create mode 100644 protocols/Dummy/src/version.h diff --git a/protocols/Dummy/dummy_10.vcxproj b/protocols/Dummy/dummy_10.vcxproj new file mode 100644 index 0000000000..0268326990 --- /dev/null +++ b/protocols/Dummy/dummy_10.vcxproj @@ -0,0 +1,199 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {BF6E1942-7E42-4564-9DF5-FD0A00D71173} + Dummy + + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\Plugins\ + $(SolutionDir)$(Configuration)64\Plugins\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)\Plugins\ + $(SolutionDir)$(Configuration)64\Plugins\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + true + + + + Disabled + ..\..\include;..\..\plugins\ExternalAPI;..\..\..\boost;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_USRDLL;TWITTER_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level3 + EditAndContinue + Use + false + + + true + Windows + $(IntDir)$(TargetName).lib + false + $(ProfileDir)..\..\bin10\lib + + + _DEBUG;%(PreprocessorDefinitions) + ..\..\include\msapi + + + + + Disabled + ..\..\include;..\..\plugins\ExternalAPI;..\..\..\boost;%(AdditionalIncludeDirectories) + _WINDOWS;_USRDLL;TWITTER_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + Level3 + Use + false + + + true + Windows + $(IntDir)$(TargetName).lib + false + $(ProfileDir)..\..\bin10\lib + + + _DEBUG;%(PreprocessorDefinitions) + ..\..\include\msapi + + + + + ..\..\include;..\..\plugins\ExternalAPI;..\..\..\boost;%(AdditionalIncludeDirectories) + NDEBUG;_WINDOWS;_USRDLL;TWITTER_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions) + Level3 + Full + OnlyExplicitInline + Size + Use + false + true + + + true + Windows + true + true + $(IntDir)$(TargetName).lib + false + $(ProfileDir)..\..\bin10\lib + /PDBALTPATH:%_PDB% + + + ..\..\include\msapi + NDEBUG;%(PreprocessorDefinitions) + + + + + ..\..\include;..\..\plugins\ExternalAPI;..\..\..\boost;%(AdditionalIncludeDirectories) + NDEBUG;_WINDOWS;_USRDLL;TWITTER_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions) + Level3 + Full + OnlyExplicitInline + Size + Use + false + true + + + true + Windows + true + true + $(IntDir)$(TargetName).lib + false + $(ProfileDir)..\..\bin10\lib + /PDBALTPATH:%_PDB% + + + ..\..\include\msapi + NDEBUG;%(PreprocessorDefinitions) + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/protocols/Dummy/dummy_10.vcxproj.filters b/protocols/Dummy/dummy_10.vcxproj.filters new file mode 100644 index 0000000000..c408a8f31f --- /dev/null +++ b/protocols/Dummy/dummy_10.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + Resource Files + + + \ No newline at end of file diff --git a/protocols/Dummy/dummy_12.vcxproj b/protocols/Dummy/dummy_12.vcxproj new file mode 100644 index 0000000000..3b69aef632 --- /dev/null +++ b/protocols/Dummy/dummy_12.vcxproj @@ -0,0 +1,202 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {BF6E1942-7E42-4564-9DF5-FD0A00D71173} + Dummy + + + + DynamicLibrary + Unicode + true + v120_xp + + + DynamicLibrary + Unicode + true + v120_xp + + + DynamicLibrary + Unicode + v120_xp + + + DynamicLibrary + Unicode + v120_xp + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\Plugins\ + $(SolutionDir)$(Configuration)64\Plugins\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)\Plugins\ + $(SolutionDir)$(Configuration)64\Plugins\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + true + + + + Disabled + ..\..\include;..\..\plugins\ExternalAPI;..\..\..\boost;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_USRDLL;TWITTER_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level3 + EditAndContinue + Use + false + + + true + Windows + $(IntDir)$(TargetName).lib + false + $(ProfileDir)..\..\bin12\lib + false + + + _DEBUG;%(PreprocessorDefinitions) + ..\..\include\msapi + + + + + Disabled + ..\..\include;..\..\plugins\ExternalAPI;..\..\..\boost;%(AdditionalIncludeDirectories) + _WINDOWS;_USRDLL;TWITTER_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + Level3 + Use + false + + + true + Windows + $(IntDir)$(TargetName).lib + false + $(ProfileDir)..\..\bin12\lib + + + _DEBUG;%(PreprocessorDefinitions) + ..\..\include\msapi + + + + + ..\..\include;..\..\plugins\ExternalAPI;..\..\..\boost;%(AdditionalIncludeDirectories) + NDEBUG;_WINDOWS;_USRDLL;TWITTER_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions) + Level3 + Full + OnlyExplicitInline + Size + Use + false + true + + + true + Windows + true + true + $(IntDir)$(TargetName).lib + false + $(ProfileDir)..\..\bin12\lib + + + ..\..\include\msapi + NDEBUG;%(PreprocessorDefinitions) + + + + + ..\..\include;..\..\plugins\ExternalAPI;..\..\..\boost;%(AdditionalIncludeDirectories) + NDEBUG;_WINDOWS;_USRDLL;TWITTER_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions) + Level3 + Full + OnlyExplicitInline + Size + Use + false + true + + + true + Windows + true + true + $(IntDir)$(TargetName).lib + false + $(ProfileDir)..\..\bin12\lib + + + ..\..\include\msapi + NDEBUG;%(PreprocessorDefinitions) + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/protocols/Dummy/dummy_12.vcxproj.filters b/protocols/Dummy/dummy_12.vcxproj.filters new file mode 100644 index 0000000000..c408a8f31f --- /dev/null +++ b/protocols/Dummy/dummy_12.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + Resource Files + + + \ No newline at end of file diff --git a/protocols/Dummy/proto_dummy/Proto_Dummy_10.vcxproj b/protocols/Dummy/proto_dummy/Proto_Dummy_10.vcxproj new file mode 100644 index 0000000000..3096902632 --- /dev/null +++ b/protocols/Dummy/proto_dummy/Proto_Dummy_10.vcxproj @@ -0,0 +1,131 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {5F8495EF-0765-4E03-905D-639BDBF05B4F} + Proto_Dummy + + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\Icons\ + $(SolutionDir)$(Configuration)64\Icons\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)\Icons\ + $(SolutionDir)$(Configuration)64\Icons\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + true + + + + Windows + true + false + $(SolutionDir)\lib + + + _DEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi + + + + + Windows + true + false + $(SolutionDir)\lib + + + _DEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi + + + + + Windows + true + false + $(SolutionDir)\lib + + + NDEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi + + + + + Windows + true + false + $(SolutionDir)\lib + + + NDEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi + + + + + + + + + + + + \ No newline at end of file diff --git a/protocols/Dummy/proto_dummy/Proto_Dummy_10.vcxproj.filters b/protocols/Dummy/proto_dummy/Proto_Dummy_10.vcxproj.filters new file mode 100644 index 0000000000..a9b9951359 --- /dev/null +++ b/protocols/Dummy/proto_dummy/Proto_Dummy_10.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/protocols/Dummy/proto_dummy/Proto_Dummy_12.vcxproj b/protocols/Dummy/proto_dummy/Proto_Dummy_12.vcxproj new file mode 100644 index 0000000000..5544465086 --- /dev/null +++ b/protocols/Dummy/proto_dummy/Proto_Dummy_12.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3B490839-B3C2-4A53-85A0-1516E5415D76} + Proto_Dummy + + + + DynamicLibrary + true + Unicode + v120_xp + + + DynamicLibrary + true + Unicode + v120_xp + + + DynamicLibrary + false + Unicode + v120_xp + + + DynamicLibrary + false + Unicode + v120_xp + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\Icons\ + $(SolutionDir)$(Configuration)64\Icons\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)\Icons\ + $(SolutionDir)$(Configuration)64\Icons\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + true + + + + Windows + true + false + $(SolutionDir)\lib + + + _DEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi + + + + + Windows + true + false + $(SolutionDir)\lib + + + _DEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi + + + + + Windows + true + false + $(SolutionDir)\lib + + + NDEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi + + + + + Windows + true + false + $(SolutionDir)\lib + + + NDEBUG;%(PreprocessorDefinitions) + ..\..\..\include\msapi + + + + + + + + + + + + \ No newline at end of file diff --git a/protocols/Dummy/proto_dummy/Proto_Dummy_12.vcxproj.filters b/protocols/Dummy/proto_dummy/Proto_Dummy_12.vcxproj.filters new file mode 100644 index 0000000000..a9b9951359 --- /dev/null +++ b/protocols/Dummy/proto_dummy/Proto_Dummy_12.vcxproj.filters @@ -0,0 +1,23 @@ + + + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/protocols/Dummy/proto_dummy/res/Away.ico b/protocols/Dummy/proto_dummy/res/Away.ico new file mode 100644 index 0000000000..4507fd3555 Binary files /dev/null and b/protocols/Dummy/proto_dummy/res/Away.ico differ diff --git a/protocols/Dummy/proto_dummy/res/DND.ico b/protocols/Dummy/proto_dummy/res/DND.ico new file mode 100644 index 0000000000..fa722577ad Binary files /dev/null and b/protocols/Dummy/proto_dummy/res/DND.ico differ diff --git a/protocols/Dummy/proto_dummy/res/FFC.ico b/protocols/Dummy/proto_dummy/res/FFC.ico new file mode 100644 index 0000000000..f0d7976014 Binary files /dev/null and b/protocols/Dummy/proto_dummy/res/FFC.ico differ diff --git a/protocols/Dummy/proto_dummy/res/Invisible.ico b/protocols/Dummy/proto_dummy/res/Invisible.ico new file mode 100644 index 0000000000..8874c61bf6 Binary files /dev/null and b/protocols/Dummy/proto_dummy/res/Invisible.ico differ diff --git a/protocols/Dummy/proto_dummy/res/Lunch.ico b/protocols/Dummy/proto_dummy/res/Lunch.ico new file mode 100644 index 0000000000..aa04cfce75 Binary files /dev/null and b/protocols/Dummy/proto_dummy/res/Lunch.ico differ diff --git a/protocols/Dummy/proto_dummy/res/NA.ico b/protocols/Dummy/proto_dummy/res/NA.ico new file mode 100644 index 0000000000..ba01420fb5 Binary files /dev/null and b/protocols/Dummy/proto_dummy/res/NA.ico differ diff --git a/protocols/Dummy/proto_dummy/res/Occupied.ico b/protocols/Dummy/proto_dummy/res/Occupied.ico new file mode 100644 index 0000000000..ba4662b516 Binary files /dev/null and b/protocols/Dummy/proto_dummy/res/Occupied.ico differ diff --git a/protocols/Dummy/proto_dummy/res/Offline.ico b/protocols/Dummy/proto_dummy/res/Offline.ico new file mode 100644 index 0000000000..93e2c01165 Binary files /dev/null and b/protocols/Dummy/proto_dummy/res/Offline.ico differ diff --git a/protocols/Dummy/proto_dummy/res/Online.ico b/protocols/Dummy/proto_dummy/res/Online.ico new file mode 100644 index 0000000000..2a0e4ee302 Binary files /dev/null and b/protocols/Dummy/proto_dummy/res/Online.ico differ diff --git a/protocols/Dummy/proto_dummy/res/Phone.ico b/protocols/Dummy/proto_dummy/res/Phone.ico new file mode 100644 index 0000000000..76b9ea7b91 Binary files /dev/null and b/protocols/Dummy/proto_dummy/res/Phone.ico differ diff --git a/protocols/Dummy/proto_dummy/res/Proto_Dummy.rc b/protocols/Dummy/proto_dummy/res/Proto_Dummy.rc new file mode 100644 index 0000000000..ad0b17baaa --- /dev/null +++ b/protocols/Dummy/proto_dummy/res/Proto_Dummy.rc @@ -0,0 +1,77 @@ +// Microsoft Visual C++ generated resource script. +// +#include "..\src\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian (Russia) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "..\\src\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "Offline.ico" +IDI_ICON2 ICON "Online.ico" +IDI_ICON3 ICON "Away.ico" +IDI_ICON4 ICON "Invisible.ico" +IDI_ICON5 ICON "NA.ico" +IDI_ICON6 ICON "DND.ico" +IDI_ICON7 ICON "Occupied.ico" +IDI_ICON8 ICON "Lunch.ico" +IDI_ICON9 ICON "Phone.ico" +#endif // Russian (Russia) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/protocols/Dummy/proto_dummy/src/resource.h b/protocols/Dummy/proto_dummy/src/resource.h new file mode 100644 index 0000000000..474a902b4e --- /dev/null +++ b/protocols/Dummy/proto_dummy/src/resource.h @@ -0,0 +1,24 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Proto_IRC.rc +// +#define IDI_ICON1 105 +#define IDI_ICON2 104 +#define IDI_ICON3 128 +#define IDI_ICON4 130 +#define IDI_ICON5 131 +#define IDI_ICON6 158 +#define IDI_ICON7 159 +#define IDI_ICON8 1003 +#define IDI_ICON9 1002 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 110 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/protocols/Dummy/res/resource.aps b/protocols/Dummy/res/resource.aps new file mode 100644 index 0000000000..368e406239 Binary files /dev/null and b/protocols/Dummy/res/resource.aps differ diff --git a/protocols/Dummy/res/resource.rc b/protocols/Dummy/res/resource.rc new file mode 100644 index 0000000000..8e73d05bb1 --- /dev/null +++ b/protocols/Dummy/res/resource.rc @@ -0,0 +1,98 @@ +// Microsoft Visual C++ generated resource script. +// +#include "..\src\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" +///////////////////////////////////////////////////////////////////////////// +#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 +// + +IDD_ACCMGRUI DIALOGEX 0, 0, 186, 93 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + LTEXT "Unique ID setting:",IDC_STATIC,0,0,95,12 + EDITTEXT IDC_ID_SETTING,96,0,89,12,ES_AUTOHSCROLL + LTEXT "Name of setting that holds unique identifier of contacts",IDC_STATIC,10,15,175,18 + LTEXT "Unique ID text:",IDC_STATIC,0,36,94,12 + EDITTEXT IDC_ID_TEXT,95,36,90,12,ES_AUTOHSCROLL + LTEXT "Visible name of unique identifier of contacts",IDC_STATIC,10,52,175,18 + LTEXT "Restart is required to apply these changes.",IDC_STATIC,0,78,185,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_ACCMGRUI, DIALOG + BEGIN + RIGHTMARGIN, 185 + VERTGUIDE, 10 + , 50 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "..\\src\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\0" + "#include ""..\\src\\version.h""\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/protocols/Dummy/res/version.rc b/protocols/Dummy/res/version.rc new file mode 100644 index 0000000000..675d852de7 --- /dev/null +++ b/protocols/Dummy/res/version.rc @@ -0,0 +1,38 @@ +// 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 "..\src\version.h" + +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 diff --git a/protocols/Dummy/src/dummy.h b/protocols/Dummy/src/dummy.h new file mode 100644 index 0000000000..9fa7c9d0c1 --- /dev/null +++ b/protocols/Dummy/src/dummy.h @@ -0,0 +1,23 @@ +/* +Copyright (c) 2014 Robert Pösel + +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 . +*/ + +struct CDummyProto; +extern LIST dummy_Instances; +extern HINSTANCE hInst; + +#define DUMMY_ID_TEXT "UniqueIdText" +#define DUMMY_ID_SETTING "UniqueIdSetting" \ No newline at end of file diff --git a/protocols/Dummy/src/dummy_options.cpp b/protocols/Dummy/src/dummy_options.cpp new file mode 100644 index 0000000000..b546aa564e --- /dev/null +++ b/protocols/Dummy/src/dummy_options.cpp @@ -0,0 +1,86 @@ +/* +Copyright (c) 2014 Robert Pösel + +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" + +////////////////////////////////////////////////////////////////////////////// +// Account manager dialog + +INT_PTR CALLBACK DummyAccountProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + CDummyProto *ppro = (CDummyProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + + switch (uMsg) { + case WM_INITDIALOG: + TranslateDialogDefault(hwndDlg); + + ppro = (CDummyProto*)lParam; + SetWindowLongPtr( hwndDlg, GWLP_USERDATA, lParam ); + + SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_GetIconByHandle(ppro->m_hProtoIcon, true)); + SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIconByHandle(ppro->m_hProtoIcon)); + { + ptrA tszIdText(ppro->getStringA(DUMMY_ID_TEXT)); + if (tszIdText != NULL) + SetDlgItemTextA(hwndDlg, IDC_ID_TEXT, tszIdText); + + ptrA tszIdSetting(ppro->getStringA(DUMMY_ID_SETTING)); + if (tszIdSetting != NULL) + SetDlgItemTextA(hwndDlg, IDC_ID_SETTING, tszIdSetting); + } + return TRUE; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDC_ID_TEXT: + case IDC_ID_SETTING: + if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus()) { + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); + break; + } + } + break; + + case WM_NOTIFY: + switch (((LPNMHDR)lParam)->code) { + case PSN_APPLY: + char str[128]; + GetDlgItemTextA(hwndDlg, IDC_ID_TEXT, str, SIZEOF(str)); + ppro->setString(DUMMY_ID_TEXT, str); + + GetDlgItemTextA(hwndDlg, IDC_ID_SETTING, str, SIZEOF(str)); + ppro->setString(DUMMY_ID_SETTING, str); + } + break; + + case WM_CLOSE: + EndDialog(hwndDlg, 0); + break; + + case WM_DESTROY: + Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_GETICON, ICON_BIG, 0)); + Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_GETICON, ICON_SMALL, 0)); + break; + } + + return FALSE; +} + +INT_PTR CDummyProto::SvcCreateAccMgrUI(WPARAM wParam, LPARAM lParam) +{ + return (INT_PTR)CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ACCMGRUI), (HWND)lParam, DummyAccountProc, (LPARAM)this); +} diff --git a/protocols/Dummy/src/dummy_proto.cpp b/protocols/Dummy/src/dummy_proto.cpp new file mode 100644 index 0000000000..8ac49017eb --- /dev/null +++ b/protocols/Dummy/src/dummy_proto.cpp @@ -0,0 +1,249 @@ +/* +Copyright (c) 2014 Robert Pösel + +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" + +char uniqueIdText[100] = { 0 }; +char uniqueIdSetting[100] = { 0 }; + +void CDummyProto::SendMsgAck(void *param) +{ + MCONTACT hContact = (MCONTACT)param; + Sleep(100); + ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)0, (LPARAM)Translate("Dummy protocol is too dumb to send messages.")); +} + +static int sttCompareProtocols(const CDummyProto *p1, const CDummyProto *p2) +{ + return lstrcmp(p1->m_tszUserName, p2->m_tszUserName); +} + +LIST dummy_Instances(1, sttCompareProtocols); + +CDummyProto::CDummyProto(const char *szModuleName, const TCHAR *ptszUserName) : + PROTO(szModuleName, ptszUserName) +{ + CreateProtoService(PS_CREATEACCMGRUI, &CDummyProto::SvcCreateAccMgrUI); + + dummy_Instances.insert(this); +} + +CDummyProto::~CDummyProto() +{ + Netlib_CloseHandle(m_hNetlibUser); m_hNetlibUser = NULL; + dummy_Instances.remove(this); +} + +////////////////////////////////////////////////////////////////////////////// + +DWORD_PTR CDummyProto::GetCaps(int type, MCONTACT hContact) +{ + switch(type) { + case PFLAGNUM_1: + return PF1_IM; + + case PFLAGNUM_2: + return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE; + + case PFLAGNUM_3: + return 0; + + case PFLAGNUM_4: + return 0; + + case PFLAGNUM_5: + return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE; + + case PFLAG_MAXLENOFMESSAGE: + return 0; + + case PFLAG_UNIQUEIDTEXT: + if (uniqueIdSetting[0] == '\0') { + ptrA setting(getStringA(DUMMY_ID_TEXT)); + if (setting != NULL) + mir_snprintf(uniqueIdSetting, SIZEOF(uniqueIdSetting), "%s", setting); + } + return (DWORD_PTR)uniqueIdSetting; + + case PFLAG_UNIQUEIDSETTING: + if (uniqueIdText[0] == '\0') { + ptrA setting(getStringA(DUMMY_ID_SETTING)); + if (setting != NULL) + mir_snprintf(uniqueIdText, SIZEOF(uniqueIdText), "%s", setting); + } + return (DWORD_PTR)uniqueIdText; + } + return 0; +} + +////////////////////////////////////////////////////////////////////////////// + +int CDummyProto::OnEvent(PROTOEVENTTYPE event, WPARAM wParam, LPARAM lParam) +{ + return 1; +} + +int CDummyProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre) +{ + return 0; +} + +int CDummyProto::SendMsg(MCONTACT hContact, int flags, const char *msg) +{ + ForkThread(&CDummyProto::SendMsgAck, (void*)hContact); + return 0; +} + +int CDummyProto::SetStatus(int iNewStatus) +{ + return 0; +} + +HANDLE CDummyProto::SearchBasic(const PROTOCHAR* id) +{ + return 0; +} + +HANDLE CDummyProto::SearchByEmail(const PROTOCHAR* email) +{ + return 0; +} + +HANDLE CDummyProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName) +{ + return 0; +} + +MCONTACT CDummyProto::AddToList(int flags, PROTOSEARCHRESULT* psr) +{ + return NULL; +} + +int CDummyProto::AuthRequest(MCONTACT hContact,const PROTOCHAR *message) +{ + return 0; +} + +int CDummyProto::Authorize(HANDLE hDbEvent) +{ + return 1; +} + +int CDummyProto::AuthDeny(HANDLE hDbEvent, const PROTOCHAR *reason) +{ + return 1; +} + +int CDummyProto::UserIsTyping(MCONTACT hContact, int type) +{ + return 1; +} + +MCONTACT CDummyProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent) +{ + return NULL; +} + +int CDummyProto::AuthRecv(MCONTACT hContact,PROTORECVEVENT *) +{ + return 1; +} + +HANDLE CDummyProto::FileAllow(MCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *path) +{ + return NULL; +} + +int CDummyProto::FileCancel(MCONTACT hContact,HANDLE hTransfer) +{ + return 1; +} + +int CDummyProto::FileDeny(MCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *reason) +{ + return 1; +} + +int CDummyProto::FileResume(HANDLE hTransfer,int *action,const PROTOCHAR **filename) +{ + return 1; +} + +int CDummyProto::GetInfo(MCONTACT hContact, int infoType) +{ + return 1; +} + +HWND CDummyProto::SearchAdvanced(HWND owner) +{ + return NULL; +} + +HWND CDummyProto::CreateExtendedSearchUI(HWND owner) +{ + return NULL; +} + +int CDummyProto::RecvContacts(MCONTACT hContact,PROTORECVEVENT *) +{ + return 1; +} + +int CDummyProto::RecvFile(MCONTACT hContact,PROTORECVFILET *) +{ + return 1; +} + +int CDummyProto::RecvUrl(MCONTACT hContact,PROTORECVEVENT *) +{ + return 1; +} + +int CDummyProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList) +{ + return 1; +} + +HANDLE CDummyProto::SendFile(MCONTACT hContact,const PROTOCHAR *desc, PROTOCHAR **files) +{ + return NULL; +} + +int CDummyProto::SendUrl(MCONTACT hContact,int flags,const char *url) +{ + return 1; +} + +int CDummyProto::SetApparentMode(MCONTACT hContact,int mode) +{ + return 1; +} + +int CDummyProto::RecvAwayMsg(MCONTACT hContact,int mode,PROTORECVEVENT *evt) +{ + return 1; +} + +HANDLE CDummyProto::GetAwayMsg(MCONTACT hContact) +{ + return 0; +} + +int CDummyProto::SetAwayMsg(int status, const PROTOCHAR *msg) +{ + return 0; +} diff --git a/protocols/Dummy/src/dummy_proto.h b/protocols/Dummy/src/dummy_proto.h new file mode 100644 index 0000000000..cffccd2f37 --- /dev/null +++ b/protocols/Dummy/src/dummy_proto.h @@ -0,0 +1,83 @@ +/* +Copyright (c) 2014 Robert Pösel + +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 . +*/ + +struct CDummyProto; + +struct CDummyProto : public PROTO +{ + CDummyProto(const char*, const TCHAR*); + ~CDummyProto(); + + //==================================================================================== + // PROTO_INTERFACE + //==================================================================================== + + virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr); + virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent); + + virtual int __cdecl Authorize(HANDLE hDbEvent); + virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR *szReason); + virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*); + virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR *szMessage); + + virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath); + virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer); + virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason); + virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename); + + virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL); + virtual int __cdecl GetInfo(MCONTACT hContact, int infoType); + + virtual HANDLE __cdecl SearchBasic(const TCHAR *id); + virtual HANDLE __cdecl SearchByEmail(const TCHAR *email); + virtual HANDLE __cdecl SearchByName(const TCHAR *nick, const TCHAR *firstName, const TCHAR *lastName); + virtual HWND __cdecl SearchAdvanced(HWND owner); + virtual HWND __cdecl CreateExtendedSearchUI(HWND owner); + + virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*); + virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*); + virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*); + virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*); + + virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList); + virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles); + virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg); + virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url); + + virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode); + virtual int __cdecl SetStatus(int iNewStatus); + + virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact); + virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt); + virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg); + + virtual int __cdecl UserIsTyping(MCONTACT hContact, int type); + + virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam); + + //==== Events ======================================================================== + + int __cdecl OnModulesLoaded(WPARAM, LPARAM); + int __cdecl OnOptionsInit(WPARAM, LPARAM); + int __cdecl OnPreShutdown(WPARAM, LPARAM); + + //==== Services ====================================================================== + + INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM, LPARAM); + + void __cdecl SendMsgAck(void *param); +}; diff --git a/protocols/Dummy/src/main.cpp b/protocols/Dummy/src/main.cpp new file mode 100644 index 0000000000..2feae8d894 --- /dev/null +++ b/protocols/Dummy/src/main.cpp @@ -0,0 +1,101 @@ +/* +Copyright (c) 2014 Robert Pösel + +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" +#include "version.h" + +HINSTANCE hInst; +int hLangpack; +CLIST_INTERFACE *pcli; + +PLUGININFOEX pluginInfo = +{ + sizeof(PLUGININFOEX), + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, + UNICODE_AWARE, + // {2A1081D1-AEE3-4091-B70D-AE46D09F9A7F} + { 0x2a1081d1, 0xaee3, 0x4091, {0xb7, 0xd, 0xae, 0x46, 0xd0, 0x9f, 0x9a, 0x7f}} +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +BOOL WINAPI DllMain(HINSTANCE hModule, DWORD, LPVOID) +{ + hInst = hModule; + return TRUE; +} + +extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion) +{ + return &pluginInfo; +} + +extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCOL, MIID_LAST}; + +///////////////////////////////////////////////////////////////////////////////////////// +// OnModulesLoaded - execute some code when all plugins are initialized + +static int OnModulesLoaded(WPARAM, LPARAM) +{ + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// OnLoad - initialize the plugin instance + +static CDummyProto* dummyProtoInit(const char* pszProtoName, const TCHAR *tszUserName) +{ + CDummyProto *ppro = new CDummyProto(pszProtoName, tszUserName); + return ppro; +} + +static int dummyProtoUninit(CDummyProto *ppro) +{ + delete ppro; + return 0; +} + +extern "C" int __declspec(dllexport) Load() +{ + mir_getLP(&pluginInfo); + mir_getCLI(); + + // Register protocol module + PROTOCOLDESCRIPTOR pd = { sizeof(pd) }; + pd.szName = "Dummy"; + pd.fnInit = (pfnInitProto)dummyProtoInit; + pd.fnUninit = (pfnUninitProto)dummyProtoUninit; + pd.type = PROTOTYPE_PROTOCOL; + CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd); + + HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Unload - destroy the plugin instance + +extern "C" int __declspec(dllexport) Unload(void) +{ + return 0; +} diff --git a/protocols/Dummy/src/resource.h b/protocols/Dummy/src/resource.h new file mode 100644 index 0000000000..3dbd026269 --- /dev/null +++ b/protocols/Dummy/src/resource.h @@ -0,0 +1,19 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by D:\Development\Miranda NG\protocols\Dummy\res\resource.rc +// +#define IDD_ACCMGRUI 101 +#define IDC_ID_TEXT 1030 +#define IDC_ID_SETTING 1031 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NO_MFC 1 +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1032 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/protocols/Dummy/src/stdafx.cpp b/protocols/Dummy/src/stdafx.cpp new file mode 100644 index 0000000000..4c7b0c9368 --- /dev/null +++ b/protocols/Dummy/src/stdafx.cpp @@ -0,0 +1,18 @@ +/* +Copyright (c) 2014 Robert Pösel + +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" diff --git a/protocols/Dummy/src/stdafx.h b/protocols/Dummy/src/stdafx.h new file mode 100644 index 0000000000..c6963da6e3 --- /dev/null +++ b/protocols/Dummy/src/stdafx.h @@ -0,0 +1,71 @@ +/* +Copyright (c) 2014 Robert Pösel + +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 . +*/ + +#pragma once + +#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. +#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. +#endif + +#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 "win2k.h" + +#include "resource.h" +#include "dummy.h" +#include "dummy_proto.h" diff --git a/protocols/Dummy/src/version.h b/protocols/Dummy/src/version.h new file mode 100644 index 0000000000..3e8d121f23 --- /dev/null +++ b/protocols/Dummy/src/version.h @@ -0,0 +1,14 @@ +#define __MAJOR_VERSION 0 +#define __MINOR_VERSION 1 +#define __RELEASE_NUM 0 +#define __BUILD_NUM 0 + +#include + +#define __PLUGIN_NAME "Dummy protocol" +#define __FILENAME "Dummy.dll" +#define __DESCRIPTION "Dummy protocol for Miranda NG." +#define __AUTHOR "Robert P\xf6" "sel" +#define __AUTHOREMAIL "robyer@seznam.cz" +#define __AUTHORWEB "http://miranda-ng.org/p/Dummy/" +#define __COPYRIGHT "© 2014 Robert P\xf6" "sel" -- cgit v1.2.3