#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 #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_file.h" #include "oauth.h" #include "Services\dropbox_service.h" #include "Services\google_service.h" #include "Services\microsoft_service.h" #include "Services\yandex_service.h" extern LIST Services; void InitializeServices(); // 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(); void AddServiceMenuItem(const CCloudService *service); 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; 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); bool CanSendToContact(MCONTACT hContact); void SendToContact(MCONTACT hContact, const wchar_t *data); void PasteToInputArea(MCONTACT hContact, const wchar_t *data); void PasteToClipboard(const wchar_t *data); #endif //_COMMON_H_