2019-07-28 10:31:56 +08:00
|
|
|
|
// net_toolsDlg.h : ͷ<>ļ<EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
#include "ui/MeterBar.h"
|
|
|
|
|
#include "ui/TrayIcon.h"
|
|
|
|
|
#include "ping/ping.h"
|
|
|
|
|
#include "upload/upload.h"
|
|
|
|
|
#include "dns/nslookup.h"
|
|
|
|
|
#include "mail/smtp_client.h"
|
|
|
|
|
#include "mail/pop3_client.h"
|
|
|
|
|
#include "test_all.h"
|
|
|
|
|
#include "net_store.h"
|
|
|
|
|
|
2019-07-28 10:31:56 +08:00
|
|
|
|
// Cnet_toolsDlg <20>Ի<EFBFBD><D4BB><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
class Cnet_toolsDlg : public CDialog
|
|
|
|
|
, public ping_callback
|
|
|
|
|
, public nslookup_callback
|
|
|
|
|
, public upload_callback
|
|
|
|
|
, public net_store_callback
|
|
|
|
|
, public smtp_callback
|
|
|
|
|
, public pop3_callback
|
|
|
|
|
, public test_callback
|
|
|
|
|
{
|
2019-07-28 10:31:56 +08:00
|
|
|
|
// <20><><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
public:
|
2019-07-28 10:31:56 +08:00
|
|
|
|
Cnet_toolsDlg(CWnd* pParent = NULL); // <20><><EFBFBD><D7BC><EFBFBD>캯<EFBFBD><ECBAAF>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
~Cnet_toolsDlg();
|
2019-07-28 10:31:56 +08:00
|
|
|
|
// <20>Ի<EFBFBD><D4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
enum { IDD = IDD_NET_TOOLS_DIALOG };
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-07-28 10:31:56 +08:00
|
|
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ֧<><D6A7>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
|
|
|
|
|
2019-07-28 10:31:56 +08:00
|
|
|
|
// ʵ<><CAB5>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
protected:
|
|
|
|
|
HICON m_hIcon;
|
|
|
|
|
CMeterBar m_wndMeterBar;
|
|
|
|
|
CTrayIcon m_trayIcon;
|
|
|
|
|
BOOL m_bShutdown;
|
|
|
|
|
|
2019-07-28 10:31:56 +08:00
|
|
|
|
// <20><><EFBFBD>ɵ<EFBFBD><C9B5><EFBFBD>Ϣӳ<CFA2>亯<EFBFBD><E4BAAF>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
virtual BOOL OnInitDialog();
|
|
|
|
|
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
|
|
|
|
|
afx_msg void OnPaint();
|
|
|
|
|
afx_msg HCURSOR OnQueryDragIcon();
|
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
|
public:
|
|
|
|
|
afx_msg void OnBnClickedLoadIp();
|
|
|
|
|
afx_msg void OnBnClickedPing();
|
|
|
|
|
afx_msg void OnBnClickedLoadDomain();
|
|
|
|
|
afx_msg void OnBnClickedNslookup();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
FILE* m_dosFp;
|
|
|
|
|
|
2019-07-28 10:31:56 +08:00
|
|
|
|
// ping <20><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
UINT m_nPkt;
|
|
|
|
|
UINT m_delay;
|
|
|
|
|
UINT m_pingTimeout;
|
|
|
|
|
UINT m_pktSize;
|
|
|
|
|
BOOL m_pingBusy;
|
|
|
|
|
CString m_ipFilePath;
|
|
|
|
|
CString m_pingDbPath;
|
|
|
|
|
|
2019-07-28 10:31:56 +08:00
|
|
|
|
// dns <20><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
CString m_dnsIp;
|
|
|
|
|
UINT m_dnsPort;
|
|
|
|
|
UINT m_lookupTimeout;
|
|
|
|
|
BOOL m_dnsBusy;
|
|
|
|
|
CString m_domainFilePath;
|
|
|
|
|
CString m_dnsDbPath;
|
|
|
|
|
|
2019-07-28 10:31:56 +08:00
|
|
|
|
// <20>ϴ<EFBFBD><CFB4><EFBFBD>־<EFBFBD><D6BE><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
CString m_smtpAddr;
|
|
|
|
|
int m_smtpPort;
|
|
|
|
|
int m_connecTimeout;
|
|
|
|
|
int m_rwTimeout;
|
|
|
|
|
CString m_smtpUser;
|
|
|
|
|
CString m_smtpPass;
|
|
|
|
|
CString m_recipients;
|
|
|
|
|
CString m_attachFilePath;
|
|
|
|
|
|
|
|
|
|
CString m_pop3Addr;
|
|
|
|
|
int m_pop3Port;
|
|
|
|
|
UINT m_recvLimit;
|
|
|
|
|
BOOL m_recvAll;
|
|
|
|
|
BOOL m_recvSave;
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
virtual void ping_report(size_t total, size_t curr, size_t nerror);
|
|
|
|
|
virtual void ping_finish(const char* dbpath);
|
|
|
|
|
|
|
|
|
|
virtual void nslookup_report(size_t total, size_t curr);
|
|
|
|
|
virtual void nslookup_finish(const char* dbpath);
|
|
|
|
|
|
|
|
|
|
virtual void smtp_report(const char* msg, size_t total,
|
|
|
|
|
size_t curr, const SMTP_METER& meter);
|
|
|
|
|
virtual void smtp_finish(const char* dbpath);
|
|
|
|
|
|
|
|
|
|
virtual void pop3_report(const char* msg, size_t total,
|
|
|
|
|
size_t curr, const POP3_METER& meter);
|
|
|
|
|
virtual void pop3_finish(const char* dbpath);
|
|
|
|
|
|
|
|
|
|
virtual void test_report(const char* msg, unsigned nstep);
|
|
|
|
|
virtual void test_store(const char* dbpath);
|
|
|
|
|
virtual void test_finish();
|
|
|
|
|
|
|
|
|
|
virtual void upload_report(const char* msg, size_t total,
|
|
|
|
|
size_t curr, const UPLOAD_METER& meter);
|
|
|
|
|
|
|
|
|
|
virtual void load_db_callback(const char* smtp_addr, int smtp_port,
|
|
|
|
|
const char* pop3_addr, int pop3_port,
|
|
|
|
|
const char* user, const char* pass,
|
|
|
|
|
const char* recipients, bool store);
|
|
|
|
|
private:
|
|
|
|
|
std::vector<acl::string> attaches_;
|
|
|
|
|
public:
|
|
|
|
|
afx_msg void OnBnClickedOpenDos();
|
|
|
|
|
afx_msg void OnBnClickedOption();
|
|
|
|
|
afx_msg void OnBnClickedTestall();
|
|
|
|
|
afx_msg void OnOpenMain();
|
|
|
|
|
afx_msg void OnQuit();
|
|
|
|
|
afx_msg void OnClose();
|
|
|
|
|
afx_msg void OnNcPaint();
|
|
|
|
|
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
|
|
|
|
afx_msg LRESULT OnTrayNotification(WPARAM uID, LPARAM lEvent);
|
|
|
|
|
afx_msg void OnBnClickedLoadFile();
|
|
|
|
|
afx_msg void OnBnClickedSendMail();
|
|
|
|
|
afx_msg void OnBnClickedRecvMail();
|
|
|
|
|
afx_msg void OnEnSetfocusIpFilePath();
|
|
|
|
|
afx_msg void OnEnSetfocusDomainFile();
|
|
|
|
|
afx_msg void OnEnSetfocusFile();
|
|
|
|
|
afx_msg void OnBnClickedRecvAll();
|
|
|
|
|
private:
|
|
|
|
|
void check();
|
|
|
|
|
public:
|
|
|
|
|
afx_msg void OnDestroy();
|
|
|
|
|
afx_msg void OnEnKillfocusIpFilePath();
|
|
|
|
|
afx_msg void OnEnKillfocusNpkt();
|
|
|
|
|
afx_msg void OnEnKillfocusDelay();
|
|
|
|
|
afx_msg void OnEnKillfocusTimeout();
|
|
|
|
|
afx_msg void OnEnKillfocusPktSize();
|
|
|
|
|
afx_msg void OnEnKillfocusDomainFile();
|
|
|
|
|
afx_msg void OnEnKillfocusDnsPort();
|
|
|
|
|
afx_msg void OnEnKillfocusLookupTimeout();
|
|
|
|
|
afx_msg void OnEnKillfocusFile();
|
|
|
|
|
afx_msg void OnEnKillfocusRecvLimit();
|
|
|
|
|
afx_msg void OnBnKillfocusRecvAll();
|
|
|
|
|
afx_msg void OnBnClickedRecvSave();
|
|
|
|
|
};
|