author | Michael Krelin <hacker@klever.net> | 2004-07-05 01:53:09 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2004-07-05 01:53:09 (UTC) |
commit | 5305ddd8332ebd905ebef3b8365fc0d736858a7a (patch) (unidiff) | |
tree | ba6dc874bdcb00bd2e116b377a92f347ab81a733 /DipstickDlg.h | |
download | dipstick-5305ddd8332ebd905ebef3b8365fc0d736858a7a.zip dipstick-5305ddd8332ebd905ebef3b8365fc0d736858a7a.tar.gz dipstick-5305ddd8332ebd905ebef3b8365fc0d736858a7a.tar.bz2 |
initial commit into svn repository
git-svn-id: http://svn.klever.net/kin/dipstick/trunk@1 fe716a7a-6dde-0310-88d9-d003556173a8
-rw-r--r-- | DipstickDlg.h | 184 |
1 files changed, 184 insertions, 0 deletions
diff --git a/DipstickDlg.h b/DipstickDlg.h new file mode 100644 index 0000000..ce9ed22 --- a/dev/null +++ b/DipstickDlg.h | |||
@@ -0,0 +1,184 @@ | |||
1 | // DipstickDlg.h : header file | ||
2 | // | ||
3 | |||
4 | class CDipstickDlg; | ||
5 | struct CPingyHost{ | ||
6 | CPingyHost(CDipstickDlg* daddy) : m_IP(0), m_MinRTT(0), m_AvgRTT(0), m_MaxRTT(0), m_Pinged(FALSE), m_Pinging(FALSE), m_Packetloss(-1), m_bToPing(TRUE), m_Daddy(daddy){} | ||
7 | CPingyHost(CDipstickDlg* daddy,LPTSTR hostname) : m_HostName(hostname), m_IP(0), m_MinRTT(0), m_AvgRTT(0), m_MaxRTT(0), m_Pinged(FALSE), m_Pinging(FALSE), m_Packetloss(-1), m_bToPing(TRUE), m_Daddy(daddy){} | ||
8 | CPingyHost(CDipstickDlg* daddy,LPTSTR hostname,DWORD ip) : m_HostName(hostname), m_IP(ip), m_MinRTT(0), m_AvgRTT(0), m_MaxRTT(0), m_Pinged(FALSE), m_Pinging(FALSE), m_Packetloss(-1), m_bToPing(TRUE), m_Daddy(daddy){} | ||
9 | CPingyHost(CDipstickDlg* daddy,DWORD ip) : m_IP(ip), m_MinRTT(0), m_AvgRTT(0), m_MaxRTT(0), m_Pinged(FALSE), m_Pinging(FALSE), m_Packetloss(-1), m_bToPing(TRUE), m_Daddy(daddy){} | ||
10 | public: | ||
11 | static UINT SuicideProc(LPVOID pParam); | ||
12 | void Suicide(); | ||
13 | void Ping(); | ||
14 | UINT DoPing(); | ||
15 | static UINT PingProc(LPVOID); | ||
16 | CDipstickDlg* m_Daddy; | ||
17 | CMutex m_mutex; | ||
18 | CString m_Descr; | ||
19 | CString m_URL; | ||
20 | BOOL m_bToPing; | ||
21 | BOOL m_Pinging; | ||
22 | CStringm_HostName; | ||
23 | CString m_Status; | ||
24 | DWORD m_IP; | ||
25 | ULONG m_MinRTT; | ||
26 | ULONG m_AvgRTT; | ||
27 | ULONG m_MaxRTT; | ||
28 | BOOL m_Pinged; | ||
29 | int m_Packetloss; | ||
30 | }; | ||
31 | |||
32 | typedef CList<CPingyHost*,CPingyHost*>CHostList; | ||
33 | |||
34 | ///////////////////////////////////////////////////////////////////////////// | ||
35 | // CDipstickDlg dialog | ||
36 | |||
37 | class CDragPad; | ||
38 | class CDipstickDlg : public CDialog | ||
39 | { | ||
40 | // Construction | ||
41 | struct _xferHTML{ | ||
42 | CString html; | ||
43 | CCrackURL src; | ||
44 | }; | ||
45 | public: | ||
46 | BOOL ExportLocations(LPCTSTR file); | ||
47 | CString m_impexPath; | ||
48 | BOOL ImportLocations(LPCTSTR file); | ||
49 | BOOL m_bIgnorelative; | ||
50 | CEvent m_eveStartup; | ||
51 | UINT volatile m_ActiveThreads; | ||
52 | BOOL m_bAdjustInnermost; | ||
53 | BOOL m_bSmartAdjust; | ||
54 | BOOL CollectURLs(COleDataObject* pDO,BOOL bTestOnly=FALSE); | ||
55 | BOOL IsPasteableClipboard(); | ||
56 | void UpdateDragpadTitle(); | ||
57 | BOOL m_bAutoBest; | ||
58 | void RecalcLayout(int cx,int cy); | ||
59 | CSize m_MinSize; | ||
60 | UINT m_GapY; | ||
61 | UINT m_OverY; | ||
62 | UINT m_OverX; | ||
63 | BOOL m_bMSWorkAround; | ||
64 | CRegEx m_reCrackHost; | ||
65 | CRegEx m_reNestedURL; | ||
66 | CRegEx m_reHTMLURL; // 1 - URL | ||
67 | CRegEx m_reCrackURL; //3 - schema, 4 - host, 5 - path, 7 - query string | ||
68 | BITMAP m_bitmapBack; | ||
69 | CBitmap m_bmpBack; | ||
70 | int m_iUnreachable; | ||
71 | int m_iCompleted; | ||
72 | int m_iPinging; | ||
73 | int m_iPending; | ||
74 | CImageList m_Images; | ||
75 | void UpdateControlButtons(); | ||
76 | BOOL m_bExiting; | ||
77 | int CheckForPendingRequests(); | ||
78 | UINT m_MaxThreads; | ||
79 | BOOL m_bShown; | ||
80 | enum{ | ||
81 | sortHost, sortIP, sortMin, sortAvg, sortMax, sortLoss | ||
82 | }; | ||
83 | int m_SortCriteria; | ||
84 | static int CALLBACK CompareItems(LPARAM lp1, LPARAM lp2, LPARAM lp); | ||
85 | DWORD m_Interval; | ||
86 | BOOL RemovePingyHost(CPingyHost *host,int index=-1); | ||
87 | BOOL UpdatePingyHost(CPingyHost *host,int index=-1); | ||
88 | BOOL AddPingyHost(CPingyHost *host); | ||
89 | CHostList m_Hosts; | ||
90 | enum{ | ||
91 | subitemHost = 0, subitemIP, subitemMin,subitemAvg,subitemMax, subitemPacketloss | ||
92 | }; | ||
93 | DWORD m_TimeOut; | ||
94 | UINT m_PingSize; | ||
95 | UINT m_PingsPerHost; | ||
96 | CDragPad * m_DragPad; | ||
97 | ~CDipstickDlg(); | ||
98 | CDipstickDlg(CWnd* pParent = NULL);// standard constructor | ||
99 | |||
100 | // Dialog Data | ||
101 | //{{AFX_DATA(CDipstickDlg) | ||
102 | enum { IDD = IDD_DIPSTICK_DIALOG }; | ||
103 | CButtonm_AdvancedCtl; | ||
104 | CButtonm_HelpCtl; | ||
105 | CButtonm_ExitCtl; | ||
106 | CButtonm_OptionsCtl; | ||
107 | CButtonm_ManualPingCtl; | ||
108 | CButtonm_RemoveCtl; | ||
109 | CButtonm_RepingAllCtl; | ||
110 | CButtonm_RepingCtl; | ||
111 | CButtonm_ClearListCtl; | ||
112 | CListCtrlm_HostList; | ||
113 | //}}AFX_DATA | ||
114 | |||
115 | // ClassWizard generated virtual function overrides | ||
116 | //{{AFX_VIRTUAL(CDipstickDlg) | ||
117 | protected: | ||
118 | virtual void DoDataExchange(CDataExchange* pDX);// DDX/DDV support | ||
119 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); | ||
120 | //}}AFX_VIRTUAL | ||
121 | |||
122 | // Implementation | ||
123 | protected: | ||
124 | HICON m_hIcon; | ||
125 | |||
126 | // Generated message map functions | ||
127 | //{{AFX_MSG(CDipstickDlg) | ||
128 | virtual BOOL OnInitDialog(); | ||
129 | afx_msg void OnSysCommand(UINT nID, LPARAM lParam); | ||
130 | afx_msg void OnPaint(); | ||
131 | afx_msg HCURSOR OnQueryDragIcon(); | ||
132 | afx_msg void OnDestroy(); | ||
133 | afx_msg void OnOptions(); | ||
134 | afx_msg LRESULT OnUrlPing(WPARAM,LPARAM); | ||
135 | afx_msg LRESULT OnActivityCount(WPARAM,LPARAM); | ||
136 | afx_msg LRESULT OnUpdateHostData(WPARAM,LPARAM); | ||
137 | afx_msg LRESULT OnHTMLTransfer(WPARAM,LPARAM); | ||
138 | afx_msg void OnColumnclickHostlist(NMHDR* pNMHDR, LRESULT* pResult); | ||
139 | afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos); | ||
140 | afx_msg void OnDragpadOptions(); | ||
141 | afx_msg void OnDragpadShowmainwindow(); | ||
142 | afx_msg void OnDragpadHelp(); | ||
143 | afx_msg void OnDragpadAbout(); | ||
144 | afx_msg void OnDragpadExit(); | ||
145 | virtual void OnOK(); | ||
146 | virtual void OnCancel(); | ||
147 | afx_msg void OnManualping(); | ||
148 | afx_msg void OnDragpadManualping(); | ||
149 | afx_msg void OnDragpadRepingAll(); | ||
150 | afx_msg void OnDragpadRemoveAll(); | ||
151 | afx_msg void OnReping(); | ||
152 | afx_msg void OnRepingall(); | ||
153 | afx_msg void OnClear(); | ||
154 | afx_msg void OnInsertitemHostlist(NMHDR* pNMHDR, LRESULT* pResult); | ||
155 | afx_msg void OnDeleteitemHostlist(NMHDR* pNMHDR, LRESULT* pResult); | ||
156 | afx_msg void OnDeleteallitemsHostlist(NMHDR* pNMHDR, LRESULT* pResult); | ||
157 | afx_msg void OnExit(); | ||
158 | afx_msg void OnItemchangedHostlist(NMHDR* pNMHDR, LRESULT* pResult); | ||
159 | afx_msg void OnRemove(); | ||
160 | afx_msg void OnRclickHostlist(NMHDR* pNMHDR, LRESULT* pResult); | ||
161 | afx_msg void OnHostListReping(); | ||
162 | afx_msg void OnHostListRemove(); | ||
163 | afx_msg void OnHostListRepingAll(); | ||
164 | afx_msg void OnHostListRemoveAll(); | ||
165 | afx_msg void OnHostListOpenURL(); | ||
166 | afx_msg void OnHostListProperties(); | ||
167 | afx_msg void OnDblclkHostlist(NMHDR* pNMHDR, LRESULT* pResult); | ||
168 | afx_msg void OnClose(); | ||
169 | afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); | ||
170 | afx_msg void OnSize(UINT nType, int cx, int cy); | ||
171 | afx_msg void OnHelp(); | ||
172 | afx_msg void OnBegindragHostlist(NMHDR* pNMHDR, LRESULT* pResult); | ||
173 | afx_msg void OnPasteurl(); | ||
174 | afx_msg void OnHostlistCopyurl(); | ||
175 | afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo); | ||
176 | afx_msg void OnDropFiles(HDROP hDropInfo); | ||
177 | afx_msg void OnAdvanced(); | ||
178 | afx_msg void OnAdvancedExportlist(); | ||
179 | afx_msg void OnAdvancedImportlist(); | ||
180 | afx_msg void OnDragpadAdvancedExportlist(); | ||
181 | afx_msg void OnDragpadAdvancedImportlist(); | ||
182 | //}}AFX_MSG | ||
183 | DECLARE_MESSAGE_MAP() | ||
184 | }; | ||