From 84f85ceac0f993be95dda89584749ea59fe5b8e7 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 7 Aug 2014 13:49:07 +0000 Subject: Tox added from branch git-svn-id: http://svn.miranda-ng.org/main/trunk@10115 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/main.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 protocols/Tox/src/main.cpp (limited to 'protocols/Tox/src/main.cpp') diff --git a/protocols/Tox/src/main.cpp b/protocols/Tox/src/main.cpp new file mode 100644 index 0000000000..f9322d7f3e --- /dev/null +++ b/protocols/Tox/src/main.cpp @@ -0,0 +1,52 @@ +#include "common.h" + +int hLangpack; +HINSTANCE g_hInstance; + +PLUGININFOEX pluginInfo = +{ + sizeof(PLUGININFOEX), + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, + UNICODE_AWARE, + // {00272A3E-F5FA-4090-8B67-3E62AC1EE0B4} + {0x272a3e, 0xf5fa, 0x4090, {0x8b, 0x67, 0x3e, 0x62, 0xac, 0x1e, 0xe0, 0xb4}} +}; + +DWORD WINAPI DllMain(HINSTANCE hInstance, DWORD, LPVOID) +{ + g_hInstance = hInstance; + + return TRUE; +} + +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +{ + return &pluginInfo; +} + +extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCOL, MIID_LAST}; + +extern "C" int __declspec(dllexport) Load(void) +{ + mir_getLP(&pluginInfo); + + PROTOCOLDESCRIPTOR pd = { sizeof(pd) }; + pd.szName = "TOX"; + pd.type = PROTOTYPE_PROTOCOL; + pd.fnInit = (pfnInitProto)CToxProto::InitProtoInstance; + pd.fnUninit = (pfnUninitProto)CToxProto::UninitProtoInstance; + CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd); + + return 0; +} + +extern "C" int __declspec(dllexport) Unload(void) +{ + return 0; +} \ No newline at end of file -- cgit v1.2.3