summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox_events.cpp
diff options
context:
space:
mode:
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