From 0b9fa1d90f8d0aff7118837ceb1211b578a5a9c8 Mon Sep 17 00:00:00 2001 From: aunsane Date: Sun, 16 Apr 2017 01:32:19 +0300 Subject: CloudFile: initial commit - Dropbox (worked) - Yandex.Disk (worked) - GDrive (not worked) --- plugins/CloudFile/src/stdafx.h | 115 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 plugins/CloudFile/src/stdafx.h (limited to 'plugins/CloudFile/src/stdafx.h') diff --git a/plugins/CloudFile/src/stdafx.h b/plugins/CloudFile/src/stdafx.h new file mode 100644 index 0000000000..4cbb6eace4 --- /dev/null +++ b/plugins/CloudFile/src/stdafx.h @@ -0,0 +1,115 @@ +#ifndef _COMMON_H_ +#define _COMMON_H_ + +#include +#include +#include + +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "version.h" +#include "resource.h" +#include "options.h" + +extern HINSTANCE hInstance; +extern HNETLIBUSER hNetlibConnection; + +class Exception +{ + CMStringA message; + +public: + Exception(const char *message) : + message(message) + { + } + + const char* what() const throw() + { + return message.c_str(); + } +}; + +#define MODULE "CloudFile" + +#define FILE_CHUNK_SIZE 1024 * 1024 //1 MB + +#include "http_request.h" +#include "file_transfer.h" + +// services +#include "cloud_service.h" +#include "oauth.h" +#include "Services\dropbox_service.h" +#include "Services\google_service.h" +#include "Services\yandex_service.h" +extern LIST Services; +void InitServices(); + +// proto +INT_PTR ProtoGetCaps(WPARAM, LPARAM); +INT_PTR ProtoGetName(WPARAM, LPARAM); +INT_PTR ProtoLoadIcon(WPARAM, LPARAM); + +// events +int OnModulesLoaded(WPARAM, LPARAM); +int OnProtoAck(WPARAM, LPARAM); +int OnFileDialogCanceled(void* obj, WPARAM hContact, LPARAM); + +// icons +void InitializeIcons(); +HANDLE GetIconHandle(int iconId); +HANDLE GetIconHandle(const char *name); +HICON LoadIconEx(int iconId, bool big = false); + +// menus +extern HGENMENU hContactMenu; +void InitializeMenus(); +int OnPrebuildContactMenu(WPARAM, LPARAM); + +// srmm +#define BBB_ID_FILE_SEND 10001 +int OnSrmmToolbarLoaded(WPARAM, LPARAM); +int OnSrmmWindowOpened(WPARAM, LPARAM); +int OnSrmmButtonPressed(WPARAM, LPARAM); + +// options +int OnOptionsInitialized(WPARAM wParam, LPARAM); + +// transfers +extern LIST Transfers; +INT_PTR ProtoSendFile(void *obj, WPARAM, LPARAM lParam); +INT_PTR ProtoSendFileInterceptor(void *obj, WPARAM wParam, LPARAM lParam); +INT_PTR ProtoCancelFile(WPARAM, LPARAM lParam); +UINT UploadAndReportProgressThread(void *owner, void *arg); + +// utils +void ShowNotification(const wchar_t *caption, const wchar_t *message, int flags, MCONTACT hContact = NULL); +void ShowNotification(const wchar_t *message, int flags, MCONTACT hContact = NULL); +MEVENT AddEventToDb(MCONTACT hContact, WORD type, DWORD flags, DWORD cbBlob, PBYTE pBlob); + +#endif //_COMMON_H_ \ No newline at end of file -- cgit v1.2.3