summaryrefslogtreecommitdiff
path: root/protocols/Dummy/src
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-09-18 09:39:45 +0000
committerRobert Pösel <robyer@seznam.cz>2014-09-18 09:39:45 +0000
commita4861f09eb12744e28718da2e38dda9482b5dc2a (patch)
treece2dab4b80886823e656fa3e9c1ec98f8028514e /protocols/Dummy/src
parentf6ea237b83c24ff0a9bfe8722465cde83c0b5d2d (diff)
Implement basic Dummy protocol
git-svn-id: http://svn.miranda-ng.org/main/trunk@10506 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Dummy/src')
-rw-r--r--protocols/Dummy/src/dummy.h23
-rw-r--r--protocols/Dummy/src/dummy_options.cpp86
-rw-r--r--protocols/Dummy/src/dummy_proto.cpp249
-rw-r--r--protocols/Dummy/src/dummy_proto.h83
-rw-r--r--protocols/Dummy/src/main.cpp101
-rw-r--r--protocols/Dummy/src/resource.h19
-rw-r--r--protocols/Dummy/src/stdafx.cpp18
-rw-r--r--protocols/Dummy/src/stdafx.h71
-rw-r--r--protocols/Dummy/src/version.h14
9 files changed, 664 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>.
+*/
+
+struct CDummyProto;
+extern LIST<CDummyProto> 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 <http://www.gnu.org/licenses/>.
+*/
+
+#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 <http://www.gnu.org/licenses/>.
+*/
+
+#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<CDummyProto> dummy_Instances(1, sttCompareProtocols);
+
+CDummyProto::CDummyProto(const char *szModuleName, const TCHAR *ptszUserName) :
+ PROTO<CDummyProto>(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 <http://www.gnu.org/licenses/>.
+*/
+
+struct CDummyProto;
+
+struct CDummyProto : public PROTO<CDummyProto>
+{
+ 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 <http://www.gnu.org/licenses/>.
+*/
+
+#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 <http://www.gnu.org/licenses/>.
+*/
+
+#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 <http://www.gnu.org/licenses/>.
+*/
+
+#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 <Windows.h>
+#include <Shlwapi.h>
+#include <Wincrypt.h>
+
+#include <stdio.h>
+#include <malloc.h>
+#include <tchar.h>
+#include <time.h>
+
+#include <newpluginapi.h>
+#include <m_system.h>
+#include <m_system_cpp.h>
+
+#include <m_avatars.h>
+#include <m_chat.h>
+#include <m_clistint.h>
+#include <m_database.h>
+#include <m_extraicons.h>
+#include <m_file.h>
+#include <m_fontservice.h>
+#include <m_genmenu.h>
+#include <m_hotkeys.h>
+#include <m_icolib.h>
+#include <m_idle.h>
+#include <m_imgsrvc.h>
+#include <m_json.h>
+#include <m_langpack.h>
+#include <m_message.h>
+#include <m_netlib.h>
+#include <m_options.h>
+#include <m_protomod.h>
+#include <m_protosvc.h>
+#include <m_protoint.h>
+#include <m_skin.h>
+#include <m_string.h>
+#include <m_timezones.h>
+#include <m_toptoolbar.h>
+#include <m_userinfo.h>
+#include <m_utils.h>
+#include <m_proto_listeningto.h>
+
+#include <m_folders.h>
+
+#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 <stdver.h>
+
+#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"