summaryrefslogtreecommitdiffabout
path: root/PumpKINDlg.h
Unidiff
Diffstat (limited to 'PumpKINDlg.h') (more/less context) (ignore whitespace changes)
-rw-r--r--PumpKINDlg.h178
1 files changed, 169 insertions, 9 deletions
diff --git a/PumpKINDlg.h b/PumpKINDlg.h
index 42ae62d..b247c56 100644
--- a/PumpKINDlg.h
+++ b/PumpKINDlg.h
@@ -20,308 +20,468 @@ struct tftp {
20 opWRQ = 2, 20 opWRQ = 2,
21 opDATA = 3, 21 opDATA = 3,
22 opACK = 4, 22 opACK = 4,
23 opERROR = 5, 23 opERROR = 5,
24 opOACK = 6, 24 opOACK = 6,
25 25
26 errUndefined = 0, 26 errUndefined = 0,
27 errNotFound = 1, 27 errNotFound = 1,
28 errAccessViolation = 2, 28 errAccessViolation = 2,
29 errDiskFull = 3, 29 errDiskFull = 3,
30 errIllegalOp = 4, 30 errIllegalOp = 4,
31 errUnknownTID = 5, 31 errUnknownTID = 5,
32 errFileExists = 6, 32 errFileExists = 6,
33 errNoUser = 7, 33 errNoUser = 7,
34 errOption = 8 34 errOption = 8
35 }; 35 };
36 structtftpUNKNOWN { 36 structtftpUNKNOWN {
37 BYTE data[1]; 37 BYTE data[1];
38 }; 38 };
39 structtftpRQ { 39 structtftpRQ {
40 BYTE data[1]; 40 BYTE data[1];
41public: 41public:
42 void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); 42 void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
43 static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); 43 static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
44 }; 44 };
45 structtftpRRQ { 45 structtftpRRQ {
46 BYTE data[1]; 46 BYTE data[1];
47public: 47public:
48 void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); 48 void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
49 static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); 49 static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
50 }; 50 };
51 structtftpWRQ { 51 structtftpWRQ {
52 BYTE data[1]; 52 BYTE data[1];
53public: 53public:
54 void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); 54 void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
55 static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); 55 static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
56 }; 56 };
57 structtftpDATA { 57 structtftpDATA {
58 WORD block; 58 WORD block;
59 BYTE data[1]; 59 BYTE data[1];
60 public: 60 public:
61 WORD Block(); 61 WORD Block();
62 void SetBlock(WORD b); 62 void SetBlock(WORD b);
63 static UINT tftpSize(UINT blkSize=512); 63 static UINT tftpSize(UINT blkSize=512);
64 }; 64 };
65 struct tftpACK { 65 struct tftpACK {
66 WORD block; 66 WORD block;
67 public: 67 public:
68 static UINT tftpSize(); 68 static UINT tftpSize();
69 void SetBlock(WORD b); 69 void SetBlock(WORD b);
70 WORD Block(); 70 WORD Block();
71 }; 71 };
72 structtftpERROR { 72 structtftpERROR {
73 typedef WORD tftpErrorCode; 73 typedef WORD tftpErrorCode;
74 tftpErrorCode code; 74 tftpErrorCode code;
75 BYTE data[1]; 75 BYTE data[1];
76 public: 76 public:
77 void SetCode(WORD c); 77 void SetCode(WORD c);
78 WORD Code(); 78 WORD Code();
79 static UINT tftpSize(LPCTSTR msg); 79 static UINT tftpSize(LPCTSTR msg);
80 }; 80 };
81 struct tftpOACK { 81 struct tftpOACK {
82 BYTE data[1]; 82 BYTE data[1];
83 public: 83 public:
84 void Set(tftpOptions* ops); 84 void Set(tftpOptions* ops);
85 static UINT tftpSize(tftpOptions* ops); 85 static UINT tftpSize(tftpOptions* ops);
86 }; 86 };
87 uniontftpPacket { 87 uniontftpPacket {
88 tftpUNKNOWN m_UNKNOWN; 88 tftpUNKNOWN m_UNKNOWN;
89 tftpRQ m_RQ; 89 tftpRQ m_RQ;
90 tftpRRQ m_RRQ; 90 tftpRRQ m_RRQ;
91 tftpWRQ m_WRQ; 91 tftpWRQ m_WRQ;
92 tftpDATA m_DATA; 92 tftpDATA m_DATA;
93 tftpACK m_ACK; 93 tftpACK m_ACK;
94 tftpERROR m_ERROR; 94 tftpERROR m_ERROR;
95 tftpOACK m_OACK; 95 tftpOACK m_OACK;
96 }data; 96 }data;
97 97
98 void *udpBase(void){ return &opcode; } 98 void *udpBase(void){ return &opcode; }
99public: 99public:
100 static tftp* Copy(tftp *src); 100 static tftp* Copy(tftp *src);
101 CString errMessage(); 101 CString errMessage();
102 void SetOpcode(WORD op); 102 void SetOpcode(WORD op);
103 void errSet(UINT code,LPCTSTR msg); 103 void errSet(UINT code,LPCTSTR msg);
104 static tftp* Allocate(UINT tftpSize=0); 104 static tftp* Allocate(UINT tftpSize=0);
105 BOOL Send(CAsyncSocket *socket,SOCKADDR_IN* saddr); 105 BOOL Send(CAsyncSocket *socket,SOCKADDR_IN* saddr);
106 CString rqType(); 106 CString rqType();
107 CString rqFileName(); 107 CString rqFileName();
108 UINT GetOptions(tftpOptions* ops); 108 UINT GetOptions(tftpOptions* ops);
109 tftp(); 109 tftp();
110 UINT Opcode(); 110 UINT Opcode();
111 BOOL Receive(CAsyncSocket* socket,UINT maxLength,SOCKADDR_IN *sin=NULL); 111 BOOL Receive(CAsyncSocket* socket,UINT maxLength,SOCKADDR_IN *sin=NULL);
112}; 112};
113 #define tftpHdrSize(sizeof(tftp)-sizeof(tftp::tftpPacket)) 113 #define tftpHdrSize(sizeof(tftp)-sizeof(tftp::tftpPacket))
114 #definetftpSlackSize sizeof(tftp::tftpLength) 114 #definetftpSlackSize sizeof(tftp::tftpLength)
115 115
116struct acl_rule {
117 enum {
118 opRRQ=tftp::opRRQ, opWRQ=tftp::opWRQ
119 };
120 int op;
121 DWORD addr, mask;
122 enum {
123 rrqGrant=0, rrqPrompt, rrqDeny,
124 rrqRules,
125 rrqNone=-1
126 };
127 enum {
128 wrqGrant=0, wrqPromptIfExists, wrqPrompt, wrqDeny,
129 wrqRules,
130 wrqNone=-1
131 };
132 int target;
133
134 acl_rule()
135 : op(-1), addr(0), mask(0), target(-1) { }
136 acl_rule(int o,DWORD a,DWORD m,int t)
137 : op(o), addr(a), mask(m), target(t) { }
138 acl_rule(const acl_rule& s)
139 : op(s.op), addr(s.addr), mask(s.mask), target(s.target) { }
140
141 BOOL IsValid() {
142 if(op==opRRQ) {
143 if(target<rrqNone || target>=rrqRules)
144 return FALSE;
145 }else if(op==opWRQ) {
146 if(target<wrqNone || target>=wrqRules)
147 return FALSE;
148 }else
149 return FALSE;
150 return TRUE;
151 }
152
153 BOOL IsMatch(int o,DWORD a) {
154 if(o!=op) return FALSE;
155 if( (a&mask) != (addr&mask)) return FALSE;
156 return TRUE;
157 }
158
159 CString str_addr() {
160 return inet_ntoa(*(struct in_addr*)&addr);
161 }
162 CString str_mask() {
163 return inet_ntoa(*(struct in_addr*)&mask);
164 }
165 CString str_target() {
166 if(op==opRRQ) {
167 switch(target) {
168 case rrqNone: return "fallback";
169 case rrqGrant: return "grant";
170 case rrqPrompt: return "prompt";
171 case rrqDeny: return "deny";
172 default: return "?";
173 }
174 }else if(op==opWRQ) {
175 switch(target) {
176 case wrqNone: return "fallback";
177 case wrqGrant: return "grant";
178 case wrqPromptIfExists: return "prompt if exists";
179 case wrqPrompt: return "prompt";
180 case wrqDeny: return "deny";
181 default: return "?";
182 }
183 }else
184 return "?";
185 }
186
187 void SaveProfile(CWinApp* app,int i) {
188 CString n; n.Format("%d",i);
189 app->WriteProfileInt("ACL","op_"+n,op);
190 app->WriteProfileString("ACL","addr_"+n,str_addr());
191 app->WriteProfileString("ACL","mask_"+n,str_mask());
192 app->WriteProfileInt("ACL","target_"+n,target);
193 }
194
195 void LoadProfile(CWinApp* app,int i) {
196 CString n; n.Format("%d",i);
197 op=app->GetProfileInt("ACL","op_"+n,-1);
198 addr=inet_addr(app->GetProfileString("ACL","addr_"+n));
199 mask=inet_addr(app->GetProfileString("ACL","mask_"+n));
200 target=app->GetProfileInt("ACL","target_"+n,-1);
201 }
202
203};
204
205class acl_rules_t : public CArray<acl_rule,acl_rule&> {
206public:
207
208 acl_rules_t& operator=(const acl_rules_t& s) {
209 // Copy(s); XXX: unsuprisingly, there's a bug in MFC Copy, *pDst++=*pSrc (no ++ for Src)
210 RemoveAll();
211 int ns = s.GetSize();
212 SetSize(ns);
213 for(int i=0;i<ns;++i)
214 m_pData[i]=s.m_pData[i];
215 return *this;
216 }
217
218 int AppendRule(acl_rule& r) {
219 return Add(r);
220 }
221
222 void DeleteRule(int r) {
223 RemoveAt(r);
224 }
225
226 int FindRule(int op,DWORD ip) {
227 for(int i=0;i<GetSize();++i)
228 if(m_pData[i].IsMatch(op,ip))
229 return i;
230 return -1;
231 }
232
233 int FindTarget(int op,DWORD ip) {
234 int r=FindRule(op,ip);
235 if(r<0) return -1;
236 return m_pData[r].target;
237 }
238
239 void SaveProfile(CWinApp* app) {
240 int s=GetSize();
241 for(int i=0;i<s;++i)
242 m_pData[i].SaveProfile(app,i);
243 app->WriteProfileInt("ACL","rules",s);
244 }
245 void LoadProfile(CWinApp* app) {
246 RemoveAll();
247 int s=app->GetProfileInt("ACL","rules",0);
248 for(int i=0;i<s;++i) {
249 acl_rule r;
250 r.LoadProfile(app,i);
251 if(r.IsValid())
252 Add(r);
253 }
254 }
255};
256
116class CPumpKINDlg; 257class CPumpKINDlg;
117 class CListenSocket : public CAsyncSocket{ 258 class CListenSocket : public CAsyncSocket{
118public: 259public:
119 virtual void OnReceive(int nErrorCode);
120 CPumpKINDlg* m_Daddy; 260 CPumpKINDlg* m_Daddy;
261 BOOL m_bListen;
262
263 CListenSocket()
264 : m_bListen(FALSE), m_Daddy(0) { }
265
266 BOOL SetListen(BOOL b);
267 virtual void OnReceive(int nErrorCode);
121}; 268};
122 269
123 typedef CList<tftp*,tftp*>CTFTPList; 270 typedef CList<tftp*,tftp*>CTFTPList;
124class CResolver; 271class CResolver;
125 class CXferSocket : public CAsyncSocket{ 272 class CXferSocket : public CAsyncSocket{
126public: 273public:
127 UINT m__timeOut; 274 UINT m__timeOut;
128 UINT m__blkSize; 275 UINT m__blkSize;
129 tftp::tftpOptions m_Options; 276 tftp::tftpOptions m_Options;
130 LONG m_xferSize; 277 LONG m_xferSize;
131 UINT m_timeOut; 278 UINT m_timeOut;
132 UINT m_blkSize; 279 UINT m_blkSize;
133 BOOL m_bRetry; 280 BOOL m_bRetry;
134 void SetTry(tftp *p=NULL); 281 void SetTry(tftp *p=NULL);
135 tftp* m_Retry; 282 tftp* m_Retry;
136 void OnRetry(); 283 void OnRetry();
137 BOOL CheckBadRelativeness(LPCTSTR file); 284 BOOL CheckBadRelativeness(LPCTSTR file);
138 CString ApplyRootGently(LPCTSTR fn); 285 CString ApplyRootGently(LPCTSTR fn);
139 CString m_HostName; 286 CString m_HostName;
140 virtual void OnResolved(); 287 virtual void OnResolved();
141 virtual void OnFailedToResolve(); 288 virtual void OnFailedToResolve();
142 CResolver *m_wndResolver; 289 CResolver *m_wndResolver;
143 BYTE m_ResolveBuff[MAXGETHOSTSTRUCT]; 290 BYTE m_ResolveBuff[MAXGETHOSTSTRUCT];
144 virtual void Abort(); 291 virtual void Abort();
145 void ResetTimeout(); 292 void ResetTimeout();
146 enum{ 293 enum{
147 stateNone, stateDeny, stateInit, stateOACK, stateXfer, stateFinish, stateClosing 294 stateNone, stateDeny, stateInit, stateOACK, stateXfer, stateFinish, stateClosing
148 }; 295 };
149 int state; 296 int state;
150 void Deny(UINT errCode,UINT errID); 297 void Deny(UINT errCode,UINT errID);
151 void Deny(CFileException* e); 298 void Deny(CFileException* e);
152 CString ApplyRoot(LPCTSTR fileName); 299 CString ApplyRoot(LPCTSTR fileName);
153 void TurnSlashes(CString& fn,BOOL bBack=TRUE); 300 void TurnSlashes(CString& fn,BOOL bBack=TRUE);
154 virtual void Destroy(BOOL success=TRUE); 301 virtual void Destroy(BOOL success=TRUE);
155 void PostError(CFileException* e); 302 void PostError(CFileException* e);
156 void PostError(UINT errCode,UINT errID); 303 void PostError(UINT errCode,UINT errID);
157 void PostTFTP(tftp* p,BOOL retryable=FALSE); 304 void PostTFTP(tftp* p,BOOL retryable=FALSE);
158 CXferSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN* sin); 305 CXferSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN* sin);
159 CFile m_File; 306 CFile m_File;
160 virtual ULONG GetACK(); 307 virtual ULONG GetACK();
161 CString m_Type; 308 CString m_Type;
162 CString m_FileName; 309 CString m_FileName;
163 CXferSocket(); 310 CXferSocket();
164 void UpdateList(); 311 void UpdateList();
165 void SetPeer(SOCKADDR_IN *sin); 312 void SetPeer(SOCKADDR_IN *sin);
166 virtual BOOL OnTFTP(tftp* p) = 0; 313 virtual BOOL OnTFTP(tftp* p) = 0;
167 virtual void OnReceive(int nErrorCode); 314 virtual void OnReceive(int nErrorCode);
168 void DoSelect(); 315 void DoSelect();
169 SOCKADDR_IN m_Peer; 316 SOCKADDR_IN m_Peer;
170 virtual void OnSend(int nErrorCode); 317 virtual void OnSend(int nErrorCode);
171 CPumpKINDlg* m_Daddy; 318 CPumpKINDlg* m_Daddy;
172 CTFTPList m_Queue; 319 CTFTPList m_Queue;
173 320
174 DECLARE_DYNAMIC(CXferSocket) 321 DECLARE_DYNAMIC(CXferSocket)
175}; 322};
176class CWRQSocket : public CXferSocket { 323class CWRQSocket : public CXferSocket {
177public: 324public:
178 BOOL m_bResume; 325 BOOL m_bResume;
179 void OnHostKnown(); 326 void OnHostKnown();
180 virtual void OnResolved(); 327 virtual void OnResolved();
181 UINT m_LastSlack; 328 UINT m_LastSlack;
182 ULONG GetACK(); 329 ULONG GetACK();
183 void DoXfer(); 330 void DoXfer();
184 UINT m_ACK; 331 UINT m_ACK;
185 BOOL SaveAs(CString& fn); 332 BOOL SaveAs(CString& fn);
186 BOOL RenameFile(CString& fn); 333 BOOL RenameFile(CString& fn);
187 BOOL m_Rename; 334 BOOL m_Rename;
188 BOOL ConfirmRequest(); 335 BOOL ConfirmRequest();
189 BOOL Create(LPCTSTR localFile=NULL,LPCTSTR hostName=NULL); 336 BOOL Create(LPCTSTR localFile=NULL,LPCTSTR hostName=NULL);
190 CWRQSocket(CPumpKINDlg* daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin); 337 CWRQSocket(CPumpKINDlg* daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin);
191 BOOL OnTFTP(tftp* p); 338 BOOL OnTFTP(tftp* p);
192 339
193 DECLARE_DYNAMIC(CWRQSocket) 340 DECLARE_DYNAMIC(CWRQSocket)
194}; 341};
195class CRRQSocket : public CXferSocket { 342class CRRQSocket : public CXferSocket {
196public: 343public:
197 void OnHostKnown(); 344 void OnHostKnown();
198 virtual void OnResolved(); 345 virtual void OnResolved();
199 BOOL ConfirmRequest(); 346 BOOL ConfirmRequest();
200 WORD m_LastSlack; 347 WORD m_LastSlack;
201 UINT m_ACK; 348 UINT m_ACK;
202 BOOL OnTFTP(tftp* p); 349 BOOL OnTFTP(tftp* p);
203 ULONG GetACK(void); 350 ULONG GetACK(void);
204 void DoXfer(); 351 void DoXfer();
205 CRRQSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin); 352 CRRQSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin);
206 BOOL Create(LPCTSTR localFile=NULL,LPCTSTR hostName=NULL); 353 BOOL Create(LPCTSTR localFile=NULL,LPCTSTR hostName=NULL);
207 354
208 DECLARE_DYNAMIC(CRRQSocket) 355 DECLARE_DYNAMIC(CRRQSocket)
209}; 356};
210 357
211 typedef CMap<SOCKET,SOCKET,CXferSocket*,CXferSocket*>CTIDMap; 358 typedef CMap<SOCKET,SOCKET,CXferSocket*,CXferSocket*>CTIDMap;
212typedef CMap<CTime*,CTime*,CTime*,CTime*> CTimeMap; 359typedef CMap<CTime*,CTime*,CTime*,CTime*> CTimeMap;
213 360
214///////////////////////////////////////////////////////////////////////////// 361/////////////////////////////////////////////////////////////////////////////
215// CPumpKINDlg dialog 362// CPumpKINDlg dialog
216 363
217class CTrayer; 364class CTrayer;
218class CRetrier; 365class CRetrier;
219class CPumpKINDlg : public CDialog 366class CPumpKINDlg : public CDialog
220{ 367{
221// Construction 368// Construction
222public: 369public:
370 CString m_lastlogerr;
371 void LogLine(LPCTSTR str);
372 CString m_LogFile;
373 BOOL m_bListen;
374 acl_rules_t m_aclRules;
223 CString m_bnwRequest; 375 CString m_bnwRequest;
224 CString m_bnwSuccess; 376 CString m_bnwSuccess;
225 CString m_bnwAbort; 377 CString m_bnwAbort;
226 CBellsNWhistles m_bnw; 378 CBellsNWhistles m_bnw;
227 CTrayer *m_Trayer; 379 CTrayer *m_Trayer;
228 CTimeSpan m_RetryTimeOut; 380 CTimeSpan m_RetryTimeOut;
229 virtual ~CPumpKINDlg(); 381 virtual ~CPumpKINDlg();
230 CRetrier* m_Retrier; 382 CRetrier* m_Retrier;
231 virtual BOOL PreTranslateMessage(MSG* pMsg); 383 virtual BOOL PreTranslateMessage(MSG* pMsg);
232 BOOL m_bShown; 384 BOOL m_bShown;
233 BOOL m_bExiting; 385 BOOL m_bExiting;
234 void SaveSettings(); 386 void SaveSettings();
235 void LoadSettings(); 387 void LoadSettings();
236 void SetupButtons(); 388 void SetupButtons();
237 BITMAP m_bitmapBack; 389 BITMAP m_bitmapBack;
238 CBitmap m_bmpBack; 390 CBitmap m_bmpBack;
239 UINT m_PromptTimeOut; 391 UINT m_PromptTimeOut;
240 UINT m_SpeakPort; 392 UINT m_SpeakPort;
241 void LogLine(UINT msgID); 393 void LogLine(UINT msgID);
242 CTimeMap m_LogTimes; 394 CTimeMap m_LogTimes;
243 void LogLine(LPCTSTR str); 395 void LogLineToFile(LPCTSTR str);
396 void LogLineToScreen(LPCTSTR str);
244 int m_LogLength; 397 int m_LogLength;
245 enum{ 398 enum{
246 subitemFile=0, subitemType, subitemPeer, subitemBytes, subitemTSize 399 subitemFile=0, subitemType, subitemPeer, subitemBytes, subitemTSize
247 }; 400 };
248 int m_iWRQ; 401 int m_iWRQ;
249 int m_iRRQ; 402 int m_iRRQ;
250 CImageList m_Images; 403 CImageList m_Images;
251 CTIDMap m_Xfers; 404 CTIDMap m_Xfers;
252 CTimeSpan m_TFTPTimeOut; 405 CTimeSpan m_TFTPTimeOut;
253 enum{ 406 enum{
254 rrqGiveAll=0, 407 rrqGiveAll=acl_rule::rrqGrant,
255 rrqAlwaysConfirm, 408 rrqAlwaysConfirm=acl_rule::rrqPrompt,
256 rrqDenyAll 409 rrqDenyAll=acl_rule::rrqDeny,
410 rrqFallback=acl_rule::rrqNone,
411 rrqGrant=rrqGiveAll, rrqDeny=rrqDenyAll, rrqPrompt=rrqAlwaysConfirm
257 }; 412 };
258 enum{ 413 enum{
259 wrqTakeAll=0, 414 wrqTakeAll=acl_rule::wrqGrant,
260 wrqConfirmIfExists, 415 wrqConfirmIfExists=acl_rule::wrqPromptIfExists,
261 wrqAlwaysConfirm, 416 wrqAlwaysConfirm=acl_rule::wrqPrompt,
262 wrqDenyAll 417 wrqDenyAll=acl_rule::wrqDeny,
418 wrqFallback=acl_rule::wrqNone,
419 wrqGrant=wrqTakeAll,wrqDeny=wrqDenyAll, wrqPrompt=wrqAlwaysConfirm
263 }; 420 };
264 UINT m_RRQMode; 421 UINT m_RRQMode;
265 UINT m_WRQMode; 422 UINT m_WRQMode;
266 BOOL m_bTFTPSubdirs; 423 BOOL m_bTFTPSubdirs;
267 CString m_TFTPRoot; 424 CString m_TFTPRoot;
268 UINT m_ListenPort; 425 UINT m_ListenPort;
269 UINT m_BlockSize; 426 UINT m_BlockSize;
270 CListenSocket m_Listener; 427 CListenSocket m_Listener;
271 CPumpKINDlg(CWnd* pParent = NULL);// standard constructor 428 CPumpKINDlg(CWnd* pParent = NULL);// standard constructor
272 429
273// Dialog Data 430// Dialog Data
274 //{{AFX_DATA(CPumpKINDlg) 431 //{{AFX_DATA(CPumpKINDlg)
275 enum { IDD = IDD_PUMPKIN_DIALOG }; 432 enum { IDD = IDD_PUMPKIN_DIALOG };
433 CButtonm_ListenCtl;
276 CButtonm_AbortCtl; 434 CButtonm_AbortCtl;
277 CButtonm_OptionsCtl; 435 CButtonm_OptionsCtl;
278 CListBoxm_Log; 436 CListBoxm_Log;
279 CListCtrlm_List; 437 CListCtrlm_List;
280 //}}AFX_DATA 438 //}}AFX_DATA
281 439
282 // ClassWizard generated virtual function overrides 440 // ClassWizard generated virtual function overrides
283 //{{AFX_VIRTUAL(CPumpKINDlg) 441 //{{AFX_VIRTUAL(CPumpKINDlg)
284 protected: 442 protected:
285 virtual void DoDataExchange(CDataExchange* pDX);// DDX/DDV support 443 virtual void DoDataExchange(CDataExchange* pDX);// DDX/DDV support
286 //}}AFX_VIRTUAL 444 //}}AFX_VIRTUAL
287 445
288// Implementation 446// Implementation
289protected: 447protected:
290 CToolTipCtrl m_tooltip; 448 CToolTipCtrl m_tooltip;
291 HICON m_hIcon; 449 HICON m_hIcon;
292 450
293 // Generated message map functions 451 // Generated message map functions
294 //{{AFX_MSG(CPumpKINDlg) 452 //{{AFX_MSG(CPumpKINDlg)
295 virtual BOOL OnInitDialog(); 453 virtual BOOL OnInitDialog();
296 afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 454 afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
297 afx_msg void OnDestroy(); 455 afx_msg void OnDestroy();
298 afx_msg void OnPaint(); 456 afx_msg void OnPaint();
299 afx_msg HCURSOR OnQueryDragIcon(); 457 afx_msg HCURSOR OnQueryDragIcon();
300 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 458 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
301 afx_msg void OnOptions(); 459 afx_msg void OnOptions();
302 afx_msg void OnTimer(UINT nIDEvent); 460 afx_msg void OnTimer(UINT nIDEvent);
303 afx_msg void OnExit(); 461 afx_msg void OnExit();
304 afx_msg void OnPut(); 462 afx_msg void OnPut();
305 afx_msg void OnGet(); 463 afx_msg void OnGet();
306 afx_msg void OnDeleteallitemsConnections(NMHDR* pNMHDR, LRESULT* pResult); 464 afx_msg void OnDeleteallitemsConnections(NMHDR* pNMHDR, LRESULT* pResult);
307 afx_msg void OnDeleteitemConnections(NMHDR* pNMHDR, LRESULT* pResult); 465 afx_msg void OnDeleteitemConnections(NMHDR* pNMHDR, LRESULT* pResult);
308 afx_msg void OnInsertitemConnections(NMHDR* pNMHDR, LRESULT* pResult); 466 afx_msg void OnInsertitemConnections(NMHDR* pNMHDR, LRESULT* pResult);
309 afx_msg void OnItemchangedConnections(NMHDR* pNMHDR, LRESULT* pResult); 467 afx_msg void OnItemchangedConnections(NMHDR* pNMHDR, LRESULT* pResult);
310 afx_msg void OnAbort(); 468 afx_msg void OnAbort();
311 afx_msg void OnClose(); 469 afx_msg void OnClose();
312 afx_msg void OnTrayShowpumpkinwindow(); 470 afx_msg void OnTrayShowpumpkinwindow();
471 afx_msg void OnTrayListen();
313 afx_msg void OnTrayExit(); 472 afx_msg void OnTrayExit();
314 afx_msg void OnTrayAboutpumpkin(); 473 afx_msg void OnTrayAboutpumpkin();
315 afx_msg void OnTrayFetchfile(); 474 afx_msg void OnTrayFetchfile();
316 afx_msg void OnTrayHelp(); 475 afx_msg void OnTrayHelp();
317 afx_msg void OnTrayOptions(); 476 afx_msg void OnTrayOptions();
318 afx_msg void OnTraySendfile(); 477 afx_msg void OnTraySendfile();
319 afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos); 478 afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
320 afx_msg void OnSelchangeLog(); 479 afx_msg void OnSelchangeLog();
321 afx_msg void OnTrayOpenfilesfolder(); 480 afx_msg void OnTrayOpenfilesfolder();
322 afx_msg void OnDropFiles(HDROP hDropInfo); 481 afx_msg void OnDropFiles(HDROP hDropInfo);
323 virtual void OnCancel(); 482 virtual void OnCancel();
324 afx_msg void OnHelp(); 483 afx_msg void OnHelp();
484 afx_msg void OnListening();
325 //}}AFX_MSG 485 //}}AFX_MSG
326 DECLARE_MESSAGE_MAP() 486 DECLARE_MESSAGE_MAP()
327}; 487};