-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSockOptsDlg.hpp
91 lines (76 loc) · 1.7 KB
/
SockOptsDlg.hpp
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
/******************************************************************************
** (C) Chris Oldwood
**
** MODULE: SOCKOPTSDLG.HPP
** COMPONENT: The Application
** DESCRIPTION: The CSockOptsDlg class declaration.
**
*******************************************************************************
*/
// Check for previous inclusion
#ifndef SOCKOPTSDLG_HPP
#define SOCKOPTSDLG_HPP
#if _MSC_VER > 1000
#pragma once
#endif
#include <WCL/CommonUI.hpp>
#include "SockConfig.hpp"
/******************************************************************************
**
** The dialog used to configure the sockets to trace.
**
*******************************************************************************
*/
class CSockOptsDlg : public CDialog
{
public:
//
// Constructors/Destructor.
//
CSockOptsDlg();
~CSockOptsDlg();
//
// Members.
//
CSockConfigs m_aoConfigs;
bool m_bModified;
protected:
//
// Controls.
//
CListView m_lvSocks;
// Columns.
enum
{
SRC_PORT,
SRC_PROTOCOL,
DST_HOST,
DST_PORT,
};
//
// Message handlers.
//
virtual void OnInitDialog();
virtual bool OnOk();
LRESULT OnListDoubleClick(NMHDR& oHdr);
void OnAdd();
void OnEdit();
void OnRemove();
//
// Internal methods.
//
CSockConfig* ItemConfig(size_t nItem);
void UpdateConfig(size_t nItem, CSockConfig* pConfig);
};
/******************************************************************************
**
** Implementation of inline functions.
**
*******************************************************************************
*/
inline CSockConfig* CSockOptsDlg::ItemConfig(size_t nItem)
{
ASSERT(nItem < m_lvSocks.ItemCount());
return static_cast<CSockConfig*>(m_lvSocks.ItemPtr(nItem));
}
#endif // SOCKOPTSDLG_HPP