summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox_events.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-02-19 13:33:46 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-02-19 13:33:46 +0000
commit36df84a13018c6c26e7cd1bb8e093dc54393aed7 (patch)
treebe220c6dd21741370af430e066486143a4cc747f /plugins/Dropbox/src/dropbox_events.cpp
parenta8934644810474ad6f367759ee0ea14da12909de (diff)
folder rename
git-svn-id: http://svn.miranda-ng.org/main/trunk@8179 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox_events.cpp')
-rw-r--r--plugins/Dropbox/src/dropbox_events.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/Dropbox/src/dropbox_events.cpp b/plugins/Dropbox/src/dropbox_events.cpp
new file mode 100644
index 0000000000..83ee861712
--- /dev/null
+++ b/plugins/Dropbox/src/dropbox_events.cpp
@@ -0,0 +1,40 @@
+#include "dropbox.h"
+
+int CDropbox::OnModulesLoaded(WPARAM wParam, LPARAM lParam)
+{
+ NETLIBUSER nlu = { sizeof(nlu) };
+ nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
+ nlu.szSettingsModule = MODULE;
+ nlu.szSettingsModule = MODULE;
+ nlu.ptszDescriptiveName = L"Dropbox";
+
+ g_dropbox->hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
+
+ MCONTACT hContact = GetDefaultContact();
+ if (!hContact)
+ {
+ hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ if (!CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)MODULE))
+ {
+ db_set_s(hContact, MODULE, "Nick", MODULE);
+ }
+ }
+
+ return 0;
+}
+
+int CDropbox::OnOptionsInit(WPARAM wParam, LPARAM lParam)
+{
+ OPTIONSDIALOGPAGE odp = { sizeof(odp) };
+ odp.position = 100000000;
+ odp.hInstance = g_hInstance;
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_MAIN);
+ odp.pszGroup = LPGEN("Network");
+ odp.pszTitle = LPGEN("Dropbox");
+ odp.pfnDlgProc = MainOptionsProc;
+
+ //Options_AddPage(wParam, &odp);
+
+ return 0;
+} \ No newline at end of file