#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 #include #include "version.h" #include "resource.h" #include "tox_address.h" #include "tox_transfer.h" #include "tox_proto.h" extern HINSTANCE g_hInstance; #define MODULE "TOX" #define TOX_ERROR -1 #define TOX_MAX_DISCONNECT_RETRIES 100 #define TOX_SETTINGS_ID "ToxID" #define TOX_SETTINGS_DNS "DnsID" #define TOX_SETTINGS_GROUP "DefaultGroup" #define TOX_SETTINGS_AVATAR_HASH "AvatarHash" #define TOX_SETTINGS_NODE_IPV4 "Node_%d_IPv4" #define TOX_SETTINGS_NODE_IPV6 "Node_%d_IPv6" #define TOX_SETTINGS_NODE_PORT "Node_%d_Port" #define TOX_SETTINGS_NODE_PKEY "Node_%d_PubKey" #define TOX_SETTINGS_NODE_COUNT "NodeCount" #define TOX_DB_EVENT_TYPE_ACTION 10001 #define TOX_FILE_BLOCK_SIZE 1024 * 1024 extern HMODULE g_hToxLibrary; template T CreateFunction(LPCSTR functionName) { if (g_hToxLibrary == NULL) { g_hToxLibrary = LoadLibrary(L"libtox.dll"); } return reinterpret_cast(GetProcAddress(g_hToxLibrary, functionName)); } int OptInit(WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK ToxNodesOptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); #endif //_COMMON_H_