summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/stdafx.h
blob: 86da917de955986013f0c763c070f21077b8dcbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#ifndef _COMMON_H_
#define _COMMON_H_

#include <windows.h>
#include <windns.h>
#include <time.h>
#include <commctrl.h>
#include <msapi/comptr.h>

#include <mmreg.h>
#include <MMDeviceAPI.h>

#define EXIT_ON_ERROR(hres) if (FAILED(hres)) { goto Exit; }

DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14);

#include <vector>
#include <regex>
#include <map>

#include <newpluginapi.h>

#include <m_protoint.h>
#include <m_protosvc.h>

#include <m_database.h>
#include <m_langpack.h>
#include <m_options.h>
#include <m_netlib.h>
#include <m_popup.h>
#include <m_icolib.h>
#include <m_userinfo.h>
#include <m_addcontact.h>
#include <m_message.h>
#include <m_avatars.h>
#include <m_skin.h>
#include <m_chat_int.h>
#include <m_genmenu.h>
#include <m_clc.h>
#include <m_clist.h>
#include <m_gui.h>
#include <m_folders.h>
#include <m_assocmgr.h>
#include <m_json.h>
#include <m_http.h>

#include <tox.h>
#include <toxdns.h>
#include <toxencryptsave.h>

struct CToxProto;

#include "version.h"
#include "resource.h"
#include "tox_menus.h"
#include "tox_thread.h"
#include "tox_address.h"
#include "tox_dialogs.h"
#include "tox_profile.h"
#include "tox_options.h"
#include "tox_transfer.h"
#include "tox_proto.h"

#include "http_request.h"

extern HINSTANCE g_hInstance;

#define MODULE "Tox"

#define TOX_API_VER_MAJOR 0
#define TOX_API_VER_MINOR 1
#define TOX_API_VER_PATCH 5

#define TOX_ERROR -1

#define TOX_MAX_CONNECT_RETRIES 10
#define TOX_MAX_RECONNECT_RETRIES 10

#define TOX_INI_PATH "%miranda_path%\\Plugins\\tox.ini"
#define TOX_JSON_PATH "%miranda_userdata%\\tox.json"

#define TOX_SETTINGS_ID "ToxID"
#define TOX_SETTINGS_DNS "DnsID"
#define TOX_SETTINGS_CHAT_ID "ChatID"
#define TOX_SETTINGS_PASSWORD "Password"
#define TOX_SETTINGS_GROUP "DefaultGroup"
#define TOX_SETTINGS_AVATAR_HASH "AvatarHash"

#define TOX_SETTINGS_NODE_PREFIX "Node_"
#define TOX_SETTINGS_NODE_IPV4 TOX_SETTINGS_NODE_PREFIX"%d_IPv4"
#define TOX_SETTINGS_NODE_IPV6 TOX_SETTINGS_NODE_PREFIX"%d_IPv6"
#define TOX_SETTINGS_NODE_PORT TOX_SETTINGS_NODE_PREFIX"%d_Port"
#define TOX_SETTINGS_NODE_PKEY TOX_SETTINGS_NODE_PREFIX"%d_PubKey"
#define TOX_SETTINGS_NODE_COUNT TOX_SETTINGS_NODE_PREFIX"Count"

#define DB_EVENT_ACTION 10001
#define TOX_MAX_AVATAR_SIZE 1 << 16 // 2 ^ 16 bytes

extern HANDLE hProfileFolderPath;

#endif //_COMMON_H_