summaryrefslogtreecommitdiff
path: root/plugins/CloudFile/src/main.cpp
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2017-04-16 01:32:19 +0300
committeraunsane <aunsane@gmail.com>2017-04-16 01:32:58 +0300
commit0b9fa1d90f8d0aff7118837ceb1211b578a5a9c8 (patch)
tree3b8be7b839a98a3a52a38d713c2d708ada015510 /plugins/CloudFile/src/main.cpp
parent008fb731e3e3b587f596afba1cfe7446de7f0cac (diff)
CloudFile: initial commit
- Dropbox (worked) - Yandex.Disk (worked) - GDrive (not worked)
Diffstat (limited to 'plugins/CloudFile/src/main.cpp')
-rw-r--r--plugins/CloudFile/src/main.cpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/plugins/CloudFile/src/main.cpp b/plugins/CloudFile/src/main.cpp
new file mode 100644
index 0000000000..abdc3ba4ec
--- /dev/null
+++ b/plugins/CloudFile/src/main.cpp
@@ -0,0 +1,65 @@
+#include "stdafx.h"
+
+int hLangpack;
+HINSTANCE hInstance;
+HNETLIBUSER hNetlibConnection;
+
+PLUGININFOEX pluginInfo =
+{
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ UNICODE_AWARE,
+ // {E876FE63-0701-4CDA-BED5-7C73A379C1D1}
+ { 0xe876fe63, 0x701, 0x4cda, { 0xbe, 0xd5, 0x7c, 0x73, 0xa3, 0x79, 0xc1, 0xd1 }}
+};
+
+DWORD WINAPI DllMain(HINSTANCE hInst, DWORD, LPVOID)
+{
+ hInstance = hInst;
+ return TRUE;
+}
+
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
+{
+ return &pluginInfo;
+}
+
+extern "C" int __declspec(dllexport) Load(void)
+{
+ mir_getLP(&pluginInfo);
+
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
+ pd.szName = MODULE;
+ pd.type = PROTOTYPE_VIRTUAL;
+ Proto_RegisterModule(&pd);
+
+ CreateServiceFunction(MODULE PS_GETCAPS, ProtoGetCaps);
+ CreateServiceFunction(MODULE PS_GETNAME, ProtoGetName);
+ CreateServiceFunction(MODULE PS_LOADICON, ProtoLoadIcon);
+
+ HookEvent(ME_PROTO_ACK, OnProtoAck);
+ HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+
+ NETLIBUSER nlu = {};
+ nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
+ nlu.szSettingsModule = MODULE;
+ nlu.szDescriptiveName.w = _A2W("MODULE");
+ hNetlibConnection = Netlib_RegisterUser(&nlu);
+
+ InitServices();
+ InitializeIcons();
+ InitializeMenus();
+
+ return 0;
+}
+
+extern "C" int __declspec(dllexport) Unload(void)
+{
+ return 0;
+} \ No newline at end of file