linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #05819
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2976: Add sample plugin to the repo
------------------------------------------------------------
revno: 2976
committer: iceman50 <bdcdevel@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Mon 2012-07-02 11:40:48 -0500
message:
Add sample plugin to the repo
added:
plugins/
plugins/SamplePlugin/
plugins/SamplePlugin/Plugin.c
plugins/SamplePlugin/Plugin.def
plugins/SamplePlugin/Plugin.h
plugins/SamplePlugin/SamplePlugin.rc
plugins/SamplePlugin/main.c
plugins/SamplePlugin/resource.h
plugins/SamplePlugin/stdafx.c
plugins/SamplePlugin/stdafx.h
plugins/SamplePlugin/version.h
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== added directory 'plugins'
=== added directory 'plugins/SamplePlugin'
=== added file 'plugins/SamplePlugin/Plugin.c'
--- plugins/SamplePlugin/Plugin.c 1970-01-01 00:00:00 +0000
+++ plugins/SamplePlugin/Plugin.c 2012-07-02 16:40:48 +0000
@@ -0,0 +1,320 @@
+/*
+ * Copyright (C) 2010 Jacek Sieka, arnetheduck on gmail point com
+ *
+ * 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 "stdafx.h"
+#include "Plugin.h"
+
+#ifndef __cplusplus
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+#else
+# include <cstdio>
+# include <cstdlib>
+# include <cstring>
+#endif
+
+#ifdef _WIN32
+# include "resource.h"
+# ifdef _MSC_VER
+# define snprintf _snprintf
+# define snwprintf _snwprintf
+# endif
+#elif __GNUC__
+# define stricmp strcasecmp
+# define strnicmp strncasecmp
+#else
+# error No supported compiler found
+#endif
+
+/* Variables */
+DCCorePtr dcpp;
+
+DCHooksPtr hooks;
+DCConfigPtr config;
+DCLogPtr logging;
+
+DCHubPtr hub;
+DCUtilsPtr utils = NULL;
+
+/* Hook subscription store */
+#define HOOKS_SUBSCRIBED 2
+
+const char* hookGuids[HOOKS_SUBSCRIBED] = {
+ HOOK_UI_PROCESS_CHAT_CMD,
+ HOOK_HUB_ONLINE
+};
+
+DCHOOK hookFuncs[HOOKS_SUBSCRIBED] = {
+ &onHubEnter,
+ &onHubOnline
+};
+
+subsHandle subs[HOOKS_SUBSCRIBED];
+
+Bool onLoad(uint32_t eventId, DCCorePtr core) {
+ uint32_t i = 0;
+ dcpp = core;
+
+ hooks = (DCHooksPtr)core->query_interface(DCINTF_HOOKS, DCINTF_HOOKS_VER);
+ config = (DCConfigPtr)core->query_interface(DCINTF_CONFIG, DCINTF_CONFIG_VER);
+ logging = (DCLogPtr)core->query_interface(DCINTF_LOGGING, DCINTF_LOGGING_VER);
+
+ hub = (DCHubPtr)core->query_interface(DCINTF_DCPP_HUBS, DCINTF_DCPP_HUBS_VER);
+#ifdef _WIN32
+ utils = (DCUtilsPtr)core->query_interface(DCINTF_DCPP_UTILS, DCINTF_DCPP_UTILS_VER);
+#endif
+
+ if(eventId == ON_INSTALL) {
+ /* Default settings */
+ set_cfg("SendSuffix", "<DC++ Plugins Test>");
+ }
+
+ while(i < HOOKS_SUBSCRIBED) {
+ subs[i] = hooks->bind_hook(hookGuids[i], hookFuncs[i], NULL);
+ ++i;
+ }
+
+ return True;
+}
+
+Bool onUnload() {
+ uint32_t i = 0;
+ while(i < HOOKS_SUBSCRIBED) {
+ if(subs[i]) hooks->release_hook(subs[i]);
+ ++i;
+ }
+ return True;
+}
+
+/* Event handlers */
+Bool DCAPI onHubEnter(dcptr_t pObject, dcptr_t pData, Bool* bBreak) {
+ HubDataPtr hHub = (HubDataPtr)pObject;
+ CommandDataPtr cmd = (CommandDataPtr)pData;
+
+ if(cmd->isPrivate)
+ return False;
+
+ if(stricmp(cmd->command, "help") == 0 && stricmp(cmd->params, "plugins") == 0) {
+ const char* help =
+ "\t\t\t Help: SamplePlugin \t\t\t\n"
+ "\t /pluginhelp \t\t\t Prints info about the purpose of this plugin\n"
+ "\t /plugininfo \t\t\t Prints info about the sample plugin\n"
+ "\t /unhook <index> \t\t Hooks test\n"
+ "\t /rehook <index> \t\t Hooks test\n"
+ "\t /send <text> \t\t\t Chat message test\n";
+
+ hub->local_message(hHub, help, MSG_SYSTEM);
+ return True;
+ } else if(stricmp(cmd->command, "pluginhelp") == 0) {
+ const char* pluginhelp =
+ "\t\t\t Plugin Help: SamplePlugin \t\t\t\n"
+ "\t The sample plugin project is intended to both demostrate the use and test the implementation of the API\n"
+ "\t as such the plugin itself does nothing useful but it can be used to verify whether an implementation works\n"
+ "\t with the API or not, however, it is by no means intended to be a comprehensive testing tool for the API.\n";
+
+ hub->local_message(hHub, pluginhelp, MSG_SYSTEM);
+ return True;
+ } else if(stricmp(cmd->command, "plugininfo") == 0) {
+ const char* info =
+ "\t\t\t Plugin Info: SamplePlugin \t\t\t\n"
+ "\t Name: \t\t\t\t" PLUGIN_NAME "\n"
+ "\t Author: \t\t\t" PLUGIN_AUTHOR "\n"
+ "\t Version: \t\t\t" STRINGIZE(PLUGIN_VERSION) "\n"
+ "\t Description: \t\t\t" PLUGIN_DESC "\n"
+ "\t GUID/UUID: \t\t\t" PLUGIN_GUID "\n";
+
+ hub->local_message(hHub, info, MSG_SYSTEM);
+ return True;
+ } else if(stricmp(cmd->command, "unhook") == 0) {
+ /* Unhook test */
+ if(strlen(cmd->params) == 0) {
+ hub->local_message(hHub, "You must supply a parameter!", MSG_SYSTEM);
+ } else {
+ uint32_t subIdx = atoi(cmd->params);
+ if((subIdx < HOOKS_SUBSCRIBED) && subs[subIdx]) {
+ hooks->release_hook(subs[subIdx]);
+ subs[subIdx] = 0;
+ hub->local_message(hHub, "Hooking changed...", MSG_SYSTEM);
+ }
+ }
+ return True;
+ } else if(stricmp(cmd->command, "rehook") == 0) {
+ /* Rehook test */
+ if(strlen(cmd->params) == 0) {
+ hub->local_message(hHub, "You must supply a parameter!", MSG_SYSTEM);
+ } else {
+ uint32_t subIdx = atoi(cmd->params);
+ if((subIdx < HOOKS_SUBSCRIBED) && !subs[subIdx]) {
+ subs[subIdx] = hooks->bind_hook(hookGuids[subIdx], hookFuncs[subIdx], NULL);
+ hub->local_message(hHub, "Hooking changed...", MSG_SYSTEM);
+ }
+ }
+ return True;
+ } else if(stricmp(cmd->command, "send") == 0) {
+ size_t len = strlen(cmd->params);
+ if(len > 0) {
+ ConfigStrPtr suffix = get_cfg("SendSuffix");
+ size_t msgLen = len + strlen(suffix->value) + 2;
+ char* text = (char*)memset(malloc(msgLen), 0, msgLen);
+
+ strcat(text, cmd->params);
+ text[len] = ' ';
+ strcat(text, suffix->value);
+
+ hub->send_message(hHub, text, (strnicmp(text, "/me ", 4) == 0) ? True : False);
+
+ free(text);
+ config->release((ConfigValuePtr)suffix);
+ } else {
+ hub->local_message(hHub, "You must supply a parameter!", MSG_SYSTEM);
+ }
+ return True;
+ }
+ return False;
+}
+
+Bool DCAPI onHubOnline(dcptr_t pObject, dcptr_t pData, Bool* bBreak) {
+ HubDataPtr hHub = (HubDataPtr)pObject;
+
+ char* buf = (char*)memset(malloc(256), 0, 256);
+ snprintf(buf, 256, "*** %s connected! (%s)", hHub->url, (hHub->protocol == PROTOCOL_ADC ? "adc" : "nmdc"));
+
+ logging->log(buf);
+ free(buf);
+
+ return False;
+}
+
+#ifdef _WIN32
+/* Config dialog stuff */
+BOOL onConfigInit(HWND hWnd) {
+ ConfigStrPtr value = get_cfg("SendSuffix");
+ size_t len = strlen(value->value) + 1;
+ TCHAR* buf = (TCHAR*)memset(malloc(len * sizeof(TCHAR)), 0, len * sizeof(TCHAR));
+
+ utils->utf8_to_wcs(buf, value->value, len);
+ config->release((ConfigValuePtr)value);
+ value = NULL;
+
+ SetDlgItemText(hWnd, IDC_SUFFIX, buf);
+ SetWindowText(hWnd, _T(PLUGIN_NAME) _T(" Settings"));
+
+ free(buf);
+ return TRUE;
+}
+
+BOOL onConfigClose(HWND hWnd, UINT wID) {
+ if(wID == IDOK) {
+ int len = GetWindowTextLength(GetDlgItem(hWnd, IDC_SUFFIX)) + 1;
+ TCHAR* wbuf = (TCHAR*)memset(malloc(len * sizeof(TCHAR)), 0, len * sizeof(TCHAR));
+ char* value = (char*)memset(malloc(len), 0, len);
+
+ GetWindowText(GetDlgItem(hWnd, IDC_SUFFIX), wbuf, len);
+ utils->wcs_to_utf8(value, wbuf, len);
+ set_cfg("SendSuffix", value);
+
+ free(value);
+ free(wbuf);
+ }
+
+ EndDialog(hWnd, wID);
+ return FALSE;
+}
+
+BOOL CALLBACK configProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
+ UNREFERENCED_PARAMETER(lParam);
+ switch(uMsg) {
+ case WM_INITDIALOG:
+ return onConfigInit(hWnd);
+ case WM_COMMAND: {
+ switch(LOWORD(wParam)) {
+ case IDOK:
+ case IDCANCEL:
+ case IDCLOSE:
+ return onConfigClose(hWnd, LOWORD(wParam));
+ }
+ }
+ }
+ return FALSE;
+}
+#endif
+
+Bool onConfig(dcptr_t hWnd) {
+#ifdef _WIN32
+ DialogBox(hInst, MAKEINTRESOURCE(IDD_PLUGINDLG), (HWND)hWnd, (DLGPROC)&configProc);
+ return True;
+#else
+ return False;
+#endif
+}
+
+/* Settings helpers */
+ConfigStrPtr DCAPI get_cfg(const char* name) {
+ return (ConfigStrPtr)config->get_cfg(PLUGIN_GUID, name, CFG_TYPE_STRING);
+}
+
+ConfigIntPtr DCAPI get_cfg_int(const char* name) {
+ return (ConfigIntPtr)config->get_cfg(PLUGIN_GUID, name, CFG_TYPE_INT);
+}
+
+ConfigInt64Ptr DCAPI get_cfg_int64(const char* name) {
+ return (ConfigInt64Ptr)config->get_cfg(PLUGIN_GUID, name, CFG_TYPE_INT64);
+}
+
+void DCAPI set_cfg(const char* name, const char* value) {
+ ConfigStr val;
+ memset(&val, 0, sizeof(ConfigStr));
+
+ val.type = CFG_TYPE_STRING;
+ val.value = value;
+ config->set_cfg(PLUGIN_GUID, name, (ConfigValuePtr)&val);
+}
+
+void DCAPI set_cfg_int(const char* name, int32_t value) {
+ ConfigInt val;
+ memset(&val, 0, sizeof(ConfigInt64));
+
+ val.type = CFG_TYPE_INT;
+ val.value = value;
+ config->set_cfg(PLUGIN_GUID, name, (ConfigValuePtr)&val);
+}
+
+void DCAPI set_cfg_int64(const char* name, int64_t value) {
+ ConfigInt64 val;
+ memset(&val, 0, sizeof(ConfigInt64));
+
+ val.type = CFG_TYPE_INT64;
+ val.value = value;
+ config->set_cfg(PLUGIN_GUID, name, (ConfigValuePtr)&val);
+}
+
+/* Plugin main function */
+Bool DCAPI pluginMain(PluginState state, DCCorePtr core, dcptr_t pData) {
+ switch(state) {
+ case ON_INSTALL:
+ case ON_LOAD:
+ return onLoad(state, core);
+ case ON_UNINSTALL:
+ case ON_UNLOAD:
+ return onUnload();
+ case ON_CONFIGURE:
+ return onConfig(pData);
+ default: return False;
+ }
+}
=== added file 'plugins/SamplePlugin/Plugin.def'
--- plugins/SamplePlugin/Plugin.def 1970-01-01 00:00:00 +0000
+++ plugins/SamplePlugin/Plugin.def 2012-07-02 16:40:48 +0000
@@ -0,0 +1,4 @@
+LIBRARY "SamplePlugin"
+
+EXPORTS
+ pluginInit = _pluginInit@4 @1
=== added file 'plugins/SamplePlugin/Plugin.h'
--- plugins/SamplePlugin/Plugin.h 1970-01-01 00:00:00 +0000
+++ plugins/SamplePlugin/Plugin.h 2012-07-02 16:40:48 +0000
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2010 Jacek Sieka, arnetheduck on gmail point com
+ *
+ * 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.
+ */
+
+#ifndef PLUGIN_H
+#define PLUGIN_H
+
+#include "version.h"
+
+#ifdef _WIN32
+extern HINSTANCE hInst;
+#endif
+
+/* Settings helpers */
+ConfigStrPtr DCAPI get_cfg(const char* name);
+ConfigIntPtr DCAPI get_cfg_int(const char* name);
+ConfigInt64Ptr DCAPI get_cfg_int64(const char* name);
+
+void DCAPI set_cfg(const char* name, const char* value);
+void DCAPI set_cfg_int(const char* name, int32_t value);
+void DCAPI set_cfg_int64(const char* name, int64_t value);
+
+/* Event handlers */
+Bool DCAPI onHubEnter(dcptr_t pObject, dcptr_t pData, Bool* bBreak);
+Bool DCAPI onHubOnline(dcptr_t pObject, dcptr_t pData, Bool* bBreak);
+
+/* Plugin main function */
+Bool DCAPI pluginMain(PluginState state, DCCorePtr core, dcptr_t pData);
+
+#endif /* PLUGIN_H */
\ No newline at end of file
=== added file 'plugins/SamplePlugin/SamplePlugin.rc'
--- plugins/SamplePlugin/SamplePlugin.rc 1970-01-01 00:00:00 +0000
+++ plugins/SamplePlugin/SamplePlugin.rc 2012-07-02 16:40:48 +0000
@@ -0,0 +1,139 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,0
+ PRODUCTVERSION 1,0,0,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "080004b0"
+ BEGIN
+ VALUE "FileDescription", "SamplePlugin Dynamic Link Library"
+ VALUE "FileVersion", "1, 0, 0, 0"
+ VALUE "InternalName", "SamplePlugin"
+ VALUE "LegalCopyright", "Copyright (C) 2010 Jacek Sieka"
+ VALUE "OriginalFilename", "SamplePlugin.dll"
+ VALUE "ProductName", "SamplePlugin Dynamic Link Library"
+ VALUE "ProductVersion", "1, 0, 0, 0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x800, 1200
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_PLUGINDLG DIALOGEX 0, 0, 244, 75
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "SamplePlugin Settings"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,132,54,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,187,54,50,14
+ GROUPBOX "Settings",IDC_STATIC,7,7,230,45
+ EDITTEXT IDC_SUFFIX,93,16,133,14,ES_AUTOHSCROLL
+ LTEXT "/send command suffix:",IDC_STATIC,17,19,74,8
+ CTEXT "This is an example of plugin implanted configuration dialog.",IDC_STATIC,14,37,216,13
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_PLUGINDLG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 237
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 68
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
=== added file 'plugins/SamplePlugin/main.c'
--- plugins/SamplePlugin/main.c 1970-01-01 00:00:00 +0000
+++ plugins/SamplePlugin/main.c 2012-07-02 16:40:48 +0000
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2010 Jacek Sieka, arnetheduck on gmail point com
+ *
+ * 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 "stdafx.h"
+#include "Plugin.h"
+
+const char* dependencies[] = {
+ /* Plugins with these GUID's must have been loaded *before* this plugin */
+ "{aaaaaaaa-1111-bbbb-2222-cccccccccccc}",
+ "{aaaaaaaa-2222-cccc-3333-dddddddddddd}"
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* Plugin loader */
+ DCEXP DCMAIN DCAPI pluginInit(MetaDataPtr info) {
+ info->name = PLUGIN_NAME;
+ info->author = PLUGIN_AUTHOR;
+ info->description = PLUGIN_DESC;
+ info->version = PLUGIN_VERSION;
+ info->web = PLUGIN_WEB;
+ info->apiVersion = DCAPI_CORE_VER;
+ info->guid = PLUGIN_GUID;
+
+ /* Plugin dependencies
+ info->dependencies = dependencies;
+ info->numDependencies = 2;*/
+
+ return &pluginMain;
+ }
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifdef _WIN32
+HINSTANCE hInst = NULL;
+
+BOOL APIENTRY DllMain(HANDLE hModule, DWORD reason, LPVOID lpReserved) {
+ UNREFERENCED_PARAMETER(reason);
+ UNREFERENCED_PARAMETER(lpReserved);
+ hInst = (HINSTANCE)hModule;
+ return TRUE;
+}
+#endif
\ No newline at end of file
=== added file 'plugins/SamplePlugin/resource.h'
--- plugins/SamplePlugin/resource.h 1970-01-01 00:00:00 +0000
+++ plugins/SamplePlugin/resource.h 2012-07-02 16:40:48 +0000
@@ -0,0 +1,19 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by SamplePlugin.rc
+//
+#define VERSION_INFO 1
+#define IDD_PLUGINDLG 101
+#define IDC_SUFFIX 1001
+#define IDC_API_TESTER 1002
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1003
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
=== added file 'plugins/SamplePlugin/stdafx.c'
--- plugins/SamplePlugin/stdafx.c 1970-01-01 00:00:00 +0000
+++ plugins/SamplePlugin/stdafx.c 2012-07-02 16:40:48 +0000
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2010 Jacek Sieka, arnetheduck on gmail point com
+ *
+ * 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 "stdafx.h"
\ No newline at end of file
=== added file 'plugins/SamplePlugin/stdafx.h'
--- plugins/SamplePlugin/stdafx.h 1970-01-01 00:00:00 +0000
+++ plugins/SamplePlugin/stdafx.h 2012-07-02 16:40:48 +0000
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2010 Jacek Sieka, arnetheduck on gmail point com
+ *
+ * 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.
+ */
+
+#ifndef PLUGIN_STDAFX_H
+#define PLUGIN_STDAFX_H
+
+#ifdef _WIN32
+
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+
+#define STRICT
+#define WIN32_LEAN_AND_MEAN
+
+#ifdef _MSC_VER
+
+/* disable the deprecated warnings for the CRT functions. */
+#define _CRT_SECURE_NO_DEPRECATE 1
+#define _ATL_SECURE_NO_DEPRECATE 1
+#define _CRT_NON_CONFORMING_SWPRINTFS 1
+
+#if _MSC_VER == 1400 || _MSC_VER == 1500
+#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
+/* disable the deprecated warnings for the crt functions. */
+#pragma warning(disable: 4996)
+#endif
+
+#endif
+
+#include <windows.h>
+#include <tchar.h>
+
+#else
+#include <unistd.h>
+#endif
+
+/* This can make a #define value to string (from boost) */
+#define STRINGIZE(X) DO_STRINGIZE(X)
+#define DO_STRINGIZE(X) #X
+
+#include <stdint.h>
+#include <PluginDefs.h>
+
+#endif /* PLUGIN_STDAFX_H */
\ No newline at end of file
=== added file 'plugins/SamplePlugin/version.h'
--- plugins/SamplePlugin/version.h 1970-01-01 00:00:00 +0000
+++ plugins/SamplePlugin/version.h 2012-07-02 16:40:48 +0000
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2010 Jacek Sieka, arnetheduck on gmail point com
+ *
+ * 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.
+ */
+
+#ifndef VERSION_H
+#define VERSION_H
+
+#define PLUGIN_GUID "{5fa64766-ab6e-4d79-8439-dad40fda9738}" /* UUID/GUID for this plugin project */
+
+#define PLUGIN_NAME "Sample Plugin" /* Name of the plugin */
+#define PLUGIN_AUTHOR "dcplusplus-team" /* Author of the plugin */
+#define PLUGIN_DESC "Sample plugin project" /* Short description about the plugin */
+#define PLUGIN_VERSION 1.00 /* Version of the plugin (note: not api version) */
+#define PLUGIN_WEB "http://dcplusplus.sourceforge.net/" /* Plugin website, set to "N/A" if none */
+
+#endif /* VERSION_H */
\ No newline at end of file