summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/options.h
blob: 58e1de767e89cd9f8564c6d81e02e2b2a175315b (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
#pragma once

#include "gg.h"

struct GaduOptions
{
	CMOption<BYTE> autoRecconect;
	CMOption<BYTE> keepConnectionAlive;
	CMOption<BYTE> showConnectionErrors;
	CMOption<BYTE> useDirectConnections;
	CMOption<BYTE> useForwarding;
	CMOption<BYTE> useManualHosts;
	CMOption<BYTE> useMsgDeliveryAcknowledge;
	CMOption<BYTE> useSslConnection;

	CMOption<WORD> directConnectionPort;
	CMOption<WORD> forwardPort;

	CMOption<wchar_t*> forwardHost;
	CMOption<wchar_t*> serverHosts;

	GaduOptions(PROTO_INTERFACE *proto);
};

using GaduDlgBase = CProtoDlgBase<GaduProto>;

class GaduOptionsDlgAdvanced : public GaduDlgBase
{
private:
	CCtrlCheck chkAutoReconnect;
	CCtrlCheck chkKeepConnectionAlive;
	CCtrlCheck chkMsgAcknowledge;
	CCtrlCheck chkShowConnectionErrors;
	CCtrlCheck chkSslConnection;
	
	CCtrlCheck chkManualHosts;
	CCtrlEdit edtServerHosts;
	CCtrlBase txtServerHostsLabel;

	CCtrlCheck chkDirectConnections;
	CCtrlEdit edtDirectPort;
	CCtrlBase txtDirectPortLabel;

	CCtrlCheck chkForwarding;
	CCtrlEdit edtForwardHost;
	CCtrlBase txtForwardHostLabel;
	CCtrlEdit edtForwardPort;
	CCtrlBase txtForwardPortLabel;

	CCtrlBase txtReconnectRequired;

public:
	GaduOptionsDlgAdvanced(GaduProto *proto);

	void OnInitDialog() override;

private:
	void onCheck_ManualHosts(CCtrlCheck*);
	void onCheck_DirectConnections(CCtrlCheck*);
	void onCheck_Forwarding(CCtrlCheck*);

	void showRecconectRequired(CCtrlBase* = nullptr);
};