summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--.gitignore42
-rw-r--r--ACLTargetCombo.cpp85
-rw-r--r--ACLTargetCombo.h42
-rw-r--r--COPYING2
-rw-r--r--ConfirmRRQDlg.cpp67
-rw-r--r--ConfirmRRQDlg.h39
-rw-r--r--ConfirmWRQDlg.cpp89
-rw-r--r--ConfirmWRQDlg.h44
-rw-r--r--KTAGS12
-rw-r--r--Makefile18
-rw-r--r--PropsACL.cpp290
-rw-r--r--PropsACL.h71
-rwxr-xr-xPropsNetwork.cpp74
-rwxr-xr-xPropsNetwork.h46
-rw-r--r--PropsServer.cpp98
-rw-r--r--PropsServer.h48
-rw-r--r--PropsSounds.cpp146
-rw-r--r--PropsSounds.h58
-rwxr-xr-xPumpKINDlg.cpp2178
-rwxr-xr-xPumpKINDlg.h502
-rw-r--r--README.RELEASE33
-rw-r--r--RequestDlg.cpp299
-rw-r--r--RequestDlg.h63
-rw-r--r--Resolver.cpp71
-rw-r--r--Resolver.h42
-rw-r--r--Retrier.cpp46
-rw-r--r--Retrier.h38
-rw-r--r--Trayer.cpp125
-rw-r--r--Trayer.h49
-rw-r--r--biportal/main.c46
-rw-r--r--dmg-DS_Storebin0 -> 15364 bytes
-rw-r--r--dmg-background.pngbin0 -> 186026 bytes
-rw-r--r--help/pumpkin.bmpbin1318 -> 0 bytes
-rw-r--r--help/pumpkin.cnt15
-rw-r--r--help/pumpkin.hpj19
-rw-r--r--help/pumpkin.rtf148
-rw-r--r--help/pumpkin.xml120
-rw-r--r--install/Install.clw35
-rw-r--r--install/custom.rch10
-rw-r--r--install/install.cpp74
-rw-r--r--install/install.rc182
-rw-r--r--install/resource.h24
-rw-r--r--makehelp.bat32
-rw-r--r--pumpkin.clw329
-rw-r--r--pumpkin.cpp69
-rw-r--r--pumpkin.h36
-rw-r--r--pumpkin.icnsbin0 -> 605583 bytes
-rw-r--r--pumpkin.mak1583
-rwxr-xr-xpumpkin.rc689
-rw-r--r--pumpkin.xcodeproj/project.pbxproj519
-rw-r--r--pumpkin.xcodeproj/project.xcworkspace/contents.xcworkspacedata7
-rw-r--r--pumpkin/ARequest.h47
-rw-r--r--pumpkin/ARequest.m184
-rw-r--r--pumpkin/ARequest.xib1790
-rw-r--r--pumpkin/ConfirmRequest.h38
-rw-r--r--pumpkin/ConfirmRequest.m57
-rw-r--r--pumpkin/ConfirmRequest.xib695
-rw-r--r--pumpkin/Credits.rtf17
-rw-r--r--pumpkin/DaemonListener.h15
-rw-r--r--pumpkin/DaemonListener.m111
-rw-r--r--pumpkin/IPFormatter.h6
-rw-r--r--pumpkin/IPFormatter.m21
-rw-r--r--pumpkin/IPTransformer.h6
-rw-r--r--pumpkin/IPTransformer.m21
-rw-r--r--pumpkin/NSPortNumberTransformer.h5
-rw-r--r--pumpkin/NSPortNumberTransformer.m22
-rw-r--r--pumpkin/NumberTransformer.h6
-rw-r--r--pumpkin/NumberTransformer.m19
-rw-r--r--pumpkin/PumpKIN.h49
-rw-r--r--pumpkin/PumpKIN.m301
-rw-r--r--pumpkin/PumpKIN.xib4251
-rw-r--r--pumpkin/ReceiveXFer.h8
-rw-r--r--pumpkin/ReceiveXFer.m168
-rw-r--r--pumpkin/SendXFer.h16
-rw-r--r--pumpkin/SendXFer.m156
-rw-r--r--pumpkin/StringsAttached.h11
-rw-r--r--pumpkin/StringsAttached.m19
-rw-r--r--pumpkin/TFTPPacket.h87
-rw-r--r--pumpkin/TFTPPacket.m203
-rw-r--r--pumpkin/XFer.h68
-rw-r--r--pumpkin/XFer.m205
-rw-r--r--pumpkin/XFersViewDatasource.h11
-rw-r--r--pumpkin/XFersViewDatasource.m24
-rw-r--r--pumpkin/abort.icnsbin0 -> 8393 bytes
-rw-r--r--pumpkin/en.lproj/InfoPlist.strings2
-rw-r--r--pumpkin/get.icnsbin0 -> 8016 bytes
-rw-r--r--pumpkin/klever-background.pngbin0 -> 2175 bytes
-rw-r--r--pumpkin/main.m6
-rw-r--r--pumpkin/pumpkin-Info.plist38
-rw-r--r--pumpkin/pumpkin-Prefix.pch7
-rw-r--r--pumpkin/pumpkin-defaults.plist28
-rw-r--r--pumpkin/put.icnsbin0 -> 8136 bytes
-rw-r--r--res/down.icobin766 -> 0 bytes
-rw-r--r--res/failed.wavbin6746 -> 0 bytes
-rw-r--r--res/finished.wavbin8978 -> 0 bytes
-rw-r--r--res/pumpkin.icobin4710 -> 0 bytes
-rw-r--r--res/pumpkin.rc213
-rw-r--r--res/remove.icobin766 -> 0 bytes
-rw-r--r--res/ring.wavbin3364 -> 0 bytes
-rw-r--r--res/rrq.icobin4710 -> 0 bytes
-rw-r--r--res/up.icobin766 -> 0 bytes
-rw-r--r--res/wrq.icobin4710 -> 0 bytes
-rwxr-xr-xresource.h174
-rw-r--r--shared-code/BTreendex.h595
-rw-r--r--shared-code/BellsNWhistles.h146
-rw-r--r--shared-code/BitSet.h105
-rw-r--r--shared-code/Dynamide.h443
-rw-r--r--shared-code/FindIFace.h125
-rw-r--r--shared-code/LRUCache.h113
-rw-r--r--shared-code/RegEx.cpp1697
-rw-r--r--shared-code/RegEx.h158
-rw-r--r--shared-code/SNMPExtDll.h252
-rw-r--r--shared-code/SNMPOIDs.h221
-rw-r--r--shared-code/SNMPeer.h286
-rw-r--r--shared-code/install.h370
-rw-r--r--shared-code/ip_icmp.h91
-rw-r--r--shared-code/kHelpers.h159
-rw-r--r--shared-code/kICMP.cpp300
-rw-r--r--shared-code/kICMP.h80
-rw-r--r--shared-code/kinhelp.xsl250
-rw-r--r--shared-code/ms_icmp.h77
-rw-r--r--shared-data/browse-icon.icobin1078 -> 0 bytes
-rw-r--r--shared-data/install-icon.icobin2998 -> 0 bytes
-rw-r--r--shared-data/klever-background.bmpbin2578 -> 0 bytes
-rw-r--r--shared-data/play-icon.icobin1078 -> 0 bytes
-rw-r--r--stdafx.cpp6
-rw-r--r--stdafx.h27
127 files changed, 9314 insertions, 13746 deletions
diff --git a/.gitignore b/.gitignore
index fd020f1..0370190 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,37 +1,5 @@
1 1.DS_Store
2# / 2/build
3/Debug 3/*.xcodeproj/*.mode1v3
4/Release 4/*.xcodeproj/*.pbxuser
5/Releast 5xcuserdata/
6/debug
7/release
8/releast
9/DEBUG
10/RELEASE
11/RELEAST
12/*.mdp
13/*.ncb
14/*.aps
15/redist
16
17# /help/
18/help/PUMPKIN.HLP
19/help/pumpkin.LOG
20/help/pumpkin.hm
21/help/pumpkin.GID
22/help/PumpKIN.FTS
23
24# /install/
25/install/debug
26/install/pure
27/install/canned
28/install/static
29/install/Debug
30/install/Pure
31/install/Canned
32/install/Static
33/install/DEBUG
34/install/PURE
35/install/CANNED
36/install/STATIC
37/install/*.aps
diff --git a/ACLTargetCombo.cpp b/ACLTargetCombo.cpp
deleted file mode 100644
index cdbd075..0000000
--- a/ACLTargetCombo.cpp
+++ b/dev/null
@@ -1,85 +0,0 @@
1// ACLTargetCombo.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "PumpKINDlg.h"
7#include "ACLTargetCombo.h"
8
9#ifdef _DEBUG
10#define new DEBUG_NEW
11#undef THIS_FILE
12static char THIS_FILE[] = __FILE__;
13#endif
14
15/////////////////////////////////////////////////////////////////////////////
16// CACLTargetCombo
17
18CACLTargetCombo::CACLTargetCombo()
19: m_op(-1)
20{
21}
22
23CACLTargetCombo::~CACLTargetCombo()
24{
25}
26
27
28BEGIN_MESSAGE_MAP(CACLTargetCombo, CComboBox)
29 //{{AFX_MSG_MAP(CACLTargetCombo)
30 // NOTE - the ClassWizard will add and remove mapping macros here.
31 //}}AFX_MSG_MAP
32END_MESSAGE_MAP()
33
34/////////////////////////////////////////////////////////////////////////////
35// CACLTargetCombo message handlers
36
37void CACLTargetCombo::SetOp(int op)
38{
39 m_op=op;
40 ResetContent();
41 switch(op) {
42 case tftp::opRRQ:
43 m_tmap.RemoveAll();
44 SetItemData(m_tmap[acl_rule::rrqNone]=AddString("fallback to global"),acl_rule::rrqNone);
45 SetItemData(m_tmap[acl_rule::rrqDeny]=AddString("deny access"),acl_rule::rrqDeny);
46 SetItemData(m_tmap[acl_rule::rrqPrompt]=AddString("prompt"),acl_rule::rrqPrompt);
47 SetItemData(m_tmap[acl_rule::rrqGrant]=AddString("grant access"),CPumpKINDlg::rrqGrant);
48 SetCurSel(0);
49 EnableWindow(TRUE);
50 break;
51 case tftp::opWRQ:
52 m_tmap.RemoveAll();
53 SetItemData(m_tmap[acl_rule::wrqNone]=AddString("fallback to global"),acl_rule::wrqNone);
54 SetItemData(m_tmap[acl_rule::wrqDeny]=AddString("deny access"),acl_rule::wrqDeny);
55 SetItemData(m_tmap[acl_rule::wrqPrompt]=AddString("prompt"),acl_rule::wrqPrompt);
56 SetItemData(m_tmap[acl_rule::wrqPromptIfExists]=AddString("prompt if file exists"),acl_rule::wrqPromptIfExists);
57 SetItemData(m_tmap[acl_rule::wrqGrant]=AddString("grant access"),acl_rule::wrqGrant);
58 SetCurSel(0);
59 EnableWindow(TRUE);
60 break;
61 default:
62 EnableWindow(FALSE);
63 break;
64 }
65}
66
67int CACLTargetCombo::GetTarget()
68{
69 int cs=GetCurSel();
70 if(cs==CB_ERR)
71 return -1;
72 return GetItemData(cs);
73}
74
75void CACLTargetCombo::SetTarget(int t,int op)
76{
77 if(op>=0)
78 SetOp(op);
79 ASSERT(m_op>=0);
80 int i;
81 if(m_tmap.Lookup(t,i))
82 SetCurSel(i);
83 else
84 SetCurSel(0);
85}
diff --git a/ACLTargetCombo.h b/ACLTargetCombo.h
deleted file mode 100644
index ef7baef..0000000
--- a/ACLTargetCombo.h
+++ b/dev/null
@@ -1,42 +0,0 @@
1// ACLTargetCombo.h : header file
2//
3
4/////////////////////////////////////////////////////////////////////////////
5// CACLTargetCombo window
6
7class CACLTargetCombo : public CComboBox
8{
9// Construction
10public:
11 void SetTarget(int t,int op=-1);
12 int GetTarget();
13 void SetOp(int op);
14 int m_op;
15 CACLTargetCombo();
16
17// Attributes
18public:
19 CMap<int,int,int,int> m_tmap;
20
21// Operations
22public:
23
24// Overrides
25 // ClassWizard generated virtual function overrides
26 //{{AFX_VIRTUAL(CACLTargetCombo)
27 //}}AFX_VIRTUAL
28
29// Implementation
30public:
31 virtual ~CACLTargetCombo();
32
33 // Generated message map functions
34protected:
35 //{{AFX_MSG(CACLTargetCombo)
36 // NOTE - the ClassWizard will add and remove member functions here.
37 //}}AFX_MSG
38
39 DECLARE_MESSAGE_MAP()
40};
41
42/////////////////////////////////////////////////////////////////////////////
diff --git a/COPYING b/COPYING
index 72571d7..a261fe4 100644
--- a/COPYING
+++ b/COPYING
@@ -1,13 +1,13 @@
1Copyright (c) 1997-2006 Klever Group (http://www.klever.net/) 1Copyright (c) 2012 Klever Group (http://www.klever.net/)
2 2
3Permission is hereby granted, free of charge, to any person obtaining a copy of 3Permission is hereby granted, free of charge, to any person obtaining a copy of
4this software and associated documentation files (the "Software"), to deal in 4this software and associated documentation files (the "Software"), to deal in
5the Software without restriction, including without limitation the rights to 5the Software without restriction, including without limitation the rights to
6use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 6use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7of the Software, and to permit persons to whom the Software is furnished to do 7of the Software, and to permit persons to whom the Software is furnished to do
8so, subject to the following conditions: 8so, subject to the following conditions:
9 9
10The above copyright notice and this permission notice shall be included in all 10The above copyright notice and this permission notice shall be included in all
11copies or substantial portions of the Software. 11copies or substantial portions of the Software.
12 12
13THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
diff --git a/ConfirmRRQDlg.cpp b/ConfirmRRQDlg.cpp
deleted file mode 100644
index 361ad14..0000000
--- a/ConfirmRRQDlg.cpp
+++ b/dev/null
@@ -1,67 +0,0 @@
1// ConfirmRRQDlg.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "ConfirmRRQDlg.h"
7#include "PumpKINDlg.h"
8
9#ifdef _DEBUG
10#define new DEBUG_NEW
11#undef THIS_FILE
12static char THIS_FILE[] = __FILE__;
13#endif
14
15/////////////////////////////////////////////////////////////////////////////
16// CConfirmRRQDlg dialog
17
18
19CConfirmRRQDlg::CConfirmRRQDlg(CWnd* pParent /*=NULL*/)
20 : CDialog(CConfirmRRQDlg::IDD, pParent)
21{
22 m_Daddy=NULL;
23 //{{AFX_DATA_INIT(CConfirmRRQDlg)
24 m_File = _T("");
25 m_Host = _T("");
26 //}}AFX_DATA_INIT
27}
28
29
30void CConfirmRRQDlg::DoDataExchange(CDataExchange* pDX)
31{
32 CDialog::DoDataExchange(pDX);
33 //{{AFX_DATA_MAP(CConfirmRRQDlg)
34 DDX_Text(pDX, IDC_FILE, m_File);
35 DDX_Text(pDX, IDC_HOST, m_Host);
36 //}}AFX_DATA_MAP
37}
38
39
40BEGIN_MESSAGE_MAP(CConfirmRRQDlg, CDialog)
41 //{{AFX_MSG_MAP(CConfirmRRQDlg)
42 ON_WM_TIMER()
43 //}}AFX_MSG_MAP
44END_MESSAGE_MAP()
45
46/////////////////////////////////////////////////////////////////////////////
47// CConfirmRRQDlg message handlers
48
49BOOL CConfirmRRQDlg::OnInitDialog()
50{
51 CDialog::OnInitDialog();
52
53 m_Daddy->m_Daddy->m_bnw.StartSound(m_Daddy->m_Daddy->m_bnwRequest);
54 if(m_Daddy->m_Daddy->m_PromptTimeOut)
55 SetTimer(1,m_Daddy->m_Daddy->m_PromptTimeOut*1000,NULL);
56 SetWindowPos(&CWnd::wndTopMost,0,0,0,0,SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE);
57
58 return TRUE; // return TRUE unless you set the focus to a control
59 // EXCEPTION: OCX Property Pages should return FALSE
60}
61
62void CConfirmRRQDlg::OnTimer(UINT nIDEvent)
63{
64 if(nIDEvent==1)
65 EndDialog(IDCANCEL);
66 CDialog::OnTimer(nIDEvent);
67}
diff --git a/ConfirmRRQDlg.h b/ConfirmRRQDlg.h
deleted file mode 100644
index 465d438..0000000
--- a/ConfirmRRQDlg.h
+++ b/dev/null
@@ -1,39 +0,0 @@
1// ConfirmRRQDlg.h : header file
2//
3
4/////////////////////////////////////////////////////////////////////////////
5// CConfirmRRQDlg dialog
6
7class CRRQSocket;
8class CConfirmRRQDlg : public CDialog
9{
10// Construction
11public:
12 CRRQSocket * m_Daddy;
13 CConfirmRRQDlg(CWnd* pParent = NULL); // standard constructor
14
15// Dialog Data
16 //{{AFX_DATA(CConfirmRRQDlg)
17 enum { IDD = IDD_CONFIRM_RRQ };
18 CStringm_File;
19 CStringm_Host;
20 //}}AFX_DATA
21
22
23// Overrides
24 // ClassWizard generated virtual function overrides
25 //{{AFX_VIRTUAL(CConfirmRRQDlg)
26 protected:
27 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
28 //}}AFX_VIRTUAL
29
30// Implementation
31protected:
32
33 // Generated message map functions
34 //{{AFX_MSG(CConfirmRRQDlg)
35 virtual BOOL OnInitDialog();
36 afx_msg void OnTimer(UINT nIDEvent);
37 //}}AFX_MSG
38 DECLARE_MESSAGE_MAP()
39};
diff --git a/ConfirmWRQDlg.cpp b/ConfirmWRQDlg.cpp
deleted file mode 100644
index c0380e3..0000000
--- a/ConfirmWRQDlg.cpp
+++ b/dev/null
@@ -1,89 +0,0 @@
1// ConfirmWRQDlg.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "ConfirmWRQDlg.h"
7
8#include "PumpKINDlg.h"
9
10#ifdef _DEBUG
11#define new DEBUG_NEW
12#undef THIS_FILE
13static char THIS_FILE[] = __FILE__;
14#endif
15
16/////////////////////////////////////////////////////////////////////////////
17// CConfirmWRQDlg dialog
18
19
20CConfirmWRQDlg::CConfirmWRQDlg(CWnd* pParent /*=NULL*/)
21 : CDialog(CConfirmWRQDlg::IDD, pParent)
22{
23 //{{AFX_DATA_INIT(CConfirmWRQDlg)
24 m_File = _T("");
25 m_Host = _T("");
26 //}}AFX_DATA_INIT
27}
28
29
30void CConfirmWRQDlg::DoDataExchange(CDataExchange* pDX)
31{
32 CDialog::DoDataExchange(pDX);
33 //{{AFX_DATA_MAP(CConfirmWRQDlg)
34 DDX_Control(pDX, IDC_RESUME, m_ResumeCtl);
35 DDX_Control(pDX, IDOK, m_OkCtl);
36 DDX_Control(pDX, IDC_RENAME, m_RenameCtl);
37 DDX_Text(pDX, IDC_FILE, m_File);
38 DDX_Text(pDX, IDC_HOST, m_Host);
39 //}}AFX_DATA_MAP
40}
41
42
43BEGIN_MESSAGE_MAP(CConfirmWRQDlg, CDialog)
44 //{{AFX_MSG_MAP(CConfirmWRQDlg)
45 ON_BN_CLICKED(IDC_RENAME, OnRename)
46 ON_WM_TIMER()
47 ON_BN_CLICKED(IDC_RESUME, OnResume)
48 //}}AFX_MSG_MAP
49END_MESSAGE_MAP()
50
51/////////////////////////////////////////////////////////////////////////////
52// CConfirmWRQDlg message handlers
53
54void CConfirmWRQDlg::OnRename()
55{
56 EndDialog(IDC_RENAME);
57}
58
59BOOL CConfirmWRQDlg::OnInitDialog()
60{
61 CDialog::OnInitDialog();
62
63 m_Daddy->m_Daddy->m_bnw.StartSound(m_Daddy->m_Daddy->m_bnwRequest);
64 if(m_Daddy->m_Daddy->m_PromptTimeOut)
65 SetTimer(1,m_Daddy->m_Daddy->m_PromptTimeOut*1000,NULL);
66 SetWindowPos(&CWnd::wndTopMost,0,0,0,0,SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE);
67 m_ResumeCtl.EnableWindow(m_Daddy->m_bResume);
68 if(m_Daddy->m_Rename){
69 m_OkCtl.SetButtonStyle(m_OkCtl.GetButtonStyle()&~BS_DEFPUSHBUTTON);
70 m_RenameCtl.SetButtonStyle(m_RenameCtl.GetButtonStyle()|BS_DEFPUSHBUTTON);
71 m_RenameCtl.SetFocus();
72 return FALSE;
73 }
74
75 return TRUE; // return TRUE unless you set the focus to a control
76 // EXCEPTION: OCX Property Pages should return FALSE
77}
78
79void CConfirmWRQDlg::OnTimer(UINT nIDEvent)
80{
81 if(nIDEvent==1)
82 EndDialog(IDCANCEL);
83 CDialog::OnTimer(nIDEvent);
84}
85
86void CConfirmWRQDlg::OnResume()
87{
88 EndDialog(IDC_RESUME);
89}
diff --git a/ConfirmWRQDlg.h b/ConfirmWRQDlg.h
deleted file mode 100644
index c14848d..0000000
--- a/ConfirmWRQDlg.h
+++ b/dev/null
@@ -1,44 +0,0 @@
1// ConfirmWRQDlg.h : header file
2//
3
4/////////////////////////////////////////////////////////////////////////////
5// CConfirmWRQDlg dialog
6
7class CWRQSocket;
8class CConfirmWRQDlg : public CDialog
9{
10// Construction
11public:
12 CWRQSocket *m_Daddy;
13 CConfirmWRQDlg(CWnd* pParent = NULL); // standard constructor
14
15// Dialog Data
16 //{{AFX_DATA(CConfirmWRQDlg)
17 enum { IDD = IDD_CONFIRM_WRQ };
18 CButtonm_ResumeCtl;
19 CButtonm_OkCtl;
20 CButtonm_RenameCtl;
21 CStringm_File;
22 CStringm_Host;
23 //}}AFX_DATA
24
25
26// Overrides
27 // ClassWizard generated virtual function overrides
28 //{{AFX_VIRTUAL(CConfirmWRQDlg)
29 protected:
30 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
31 //}}AFX_VIRTUAL
32
33// Implementation
34protected:
35
36 // Generated message map functions
37 //{{AFX_MSG(CConfirmWRQDlg)
38 afx_msg void OnRename();
39 virtual BOOL OnInitDialog();
40 afx_msg void OnTimer(UINT nIDEvent);
41 afx_msg void OnResume();
42 //}}AFX_MSG
43 DECLARE_MESSAGE_MAP()
44};
diff --git a/KTAGS b/KTAGS
deleted file mode 100644
index b27cd12..0000000
--- a/KTAGS
+++ b/dev/null
@@ -1,12 +0,0 @@
1 about-date pumpkin.rc /LTEXT\s\+"Copyright /;"kind:d
2 about-version pumpkin.rc /LTEXT\s\+"PumpKIN, Version /;"kind:v
3 help-license-date ./help/pumpkin.xml /<license\s/;"kind:d
4 help-news ./help/pumpkin.xml/<newsfor\s/
5 install-version ./install/install.cpp /^#define\s\+VERSION\s\+"/;"kind:v
6 install-vsinfo-date install/install.rc /^\s\+VALUE\s\+"LegalCopyright",/;"kind:d
7 install-vsinfo-numeric-version install/install.rc /^\s\+FILEVERSION\s\+/;"kind:v
8 install-vsinfo-string-version install/install.rc /^\s\+VALUE\s\+"FileVersion",/;"kind:v
9 license-date COPYING :1;"kind:d
10 vsinfo-date pumpkin.rc /VALUE\s\+"LegalCopyright",/;"kind:d
11 vsinfo-numeric-version pumpkin.rc /^\s\+FILEVERSION\s\+/;"kind:v
12 vsinfo-string-version pumpkin.rc /^\s\+VALUE\s\+"FileVersion",/;"kind:v
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..77d7afc
--- a/dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
1VERSION=0.0
2KIN=pumpkin
3PACKAGE=${KIN}-${VERSION}
4TARNAME=${PACKAGE}-osx
5TARS=$(addprefix ${TARNAME}.tar.,gz bz2) ${TARNAME}.tar
6
7dist: ${TARS}
8clean:
9 rm -f ${TARS}
10
11${TARNAME}.tar.gz: ${TARNAME}.tar
12 gzip -v9 <"$<" >"$@"
13${TARNAME}.tar.bz2: ${TARNAME}.tar
14 bzip2 -v9 <"$<" >"$@"
15${TARNAME}.tar:
16 git archive --format tar -o "$@" --prefix="${PACKAGE}/" HEAD
17
18.INTERMEDIATE: ${TARNAME}.tar
diff --git a/PropsACL.cpp b/PropsACL.cpp
deleted file mode 100644
index 6d918ad..0000000
--- a/PropsACL.cpp
+++ b/dev/null
@@ -1,290 +0,0 @@
1// PropsACL.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "PumpKINDlg.h"
7#include "ACLTargetCombo.h"
8#include "PropsACL.h"
9
10#ifdef _DEBUG
11#define new DEBUG_NEW
12#undef THIS_FILE
13static char THIS_FILE[] = __FILE__;
14#endif
15
16/////////////////////////////////////////////////////////////////////////////
17// CPropsACL property page
18
19IMPLEMENT_DYNCREATE(CPropsACL, CPropertyPage)
20
21CPropsACL::CPropsACL() : CPropertyPage(CPropsACL::IDD)
22{
23 //{{AFX_DATA_INIT(CPropsACL)
24 //}}AFX_DATA_INIT
25}
26
27CPropsACL::~CPropsACL()
28{
29}
30
31void CPropsACL::DoDataExchange(CDataExchange* pDX)
32{
33 CPropertyPage::DoDataExchange(pDX);
34 //{{AFX_DATA_MAP(CPropsACL)
35 DDX_Control(pDX, IDC_ACL_REPLACE, m_ReplaceCtl);
36 DDX_Control(pDX, IDC_ACL_NETMASK, m_NetmaskCtl);
37 DDX_Control(pDX, IDC_ACL_XFER, m_XferCtl);
38 DDX_Control(pDX, IDC_ACL_UP, m_UpCtl);
39 DDX_Control(pDX, IDC_ACL_RULE, m_RuleCtl);
40 DDX_Control(pDX, IDC_ACL_REMOVE, m_RemoveCtl);
41 DDX_Control(pDX, IDC_ACL_LIST, m_ListCtl);
42 DDX_Control(pDX, IDC_ACL_DOWN, m_DownCtl);
43 DDX_Control(pDX, IDC_ACL_ADDR, m_AddrCtl);
44 DDX_Control(pDX, IDC_ACL_ADD, m_AddCtl);
45 //}}AFX_DATA_MAP
46}
47
48
49BEGIN_MESSAGE_MAP(CPropsACL, CPropertyPage)
50 //{{AFX_MSG_MAP(CPropsACL)
51 ON_CBN_SELCHANGE(IDC_ACL_XFER, OnSelchangeAclXfer)
52 ON_NOTIFY(LVN_ITEMCHANGED, IDC_ACL_LIST, OnItemchangedAclList)
53 ON_BN_CLICKED(IDC_ACL_ADD, OnAclAdd)
54 ON_BN_CLICKED(IDC_ACL_REPLACE, OnAclReplace)
55 ON_BN_CLICKED(IDC_ACL_REMOVE, OnAclRemove)
56 ON_BN_CLICKED(IDC_ACL_UP, OnAclUp)
57 ON_BN_CLICKED(IDC_ACL_DOWN, OnAclDown)
58 //}}AFX_MSG_MAP
59END_MESSAGE_MAP()
60
61/////////////////////////////////////////////////////////////////////////////
62// CPropsACL message handlers
63
64BOOL CPropsACL::OnInitDialog()
65{
66 CPropertyPage::OnInitDialog();
67
68 m_FocusedRule=-1;
69
70 m_Images.Create(16,16,TRUE,2,1);
71 m_iRRQ = m_Images.Add(AfxGetApp()->LoadIcon(IDI_RRQ));
72 m_iWRQ = m_Images.Add(AfxGetApp()->LoadIcon(IDI_WRQ));
73 ASSERT(m_iRRQ>=0); ASSERT(m_iWRQ>=0);
74 m_ListCtl.SetImageList(&m_Images,LVSIL_NORMAL);
75 m_ListCtl.SetImageList(&m_Images,LVSIL_SMALL);
76 m_ListCtl.SetImageList(&m_Images,LVSIL_STATE);
77
78 CRect lrc; m_ListCtl.GetClientRect(&lrc);
79 long lrcw3 = lrc.Width()/3;
80 m_ListCtl.InsertColumn(0,"IP",LVCFMT_LEFT,lrcw3,subitemIP);
81 m_ListCtl.InsertColumn(1,"netmask",LVCFMT_LEFT,lrcw3,subitemNM);
82 m_ListCtl.InsertColumn(2,"action",LVCFMT_LEFT,lrc.Width()-lrcw3*2,subitemAction);
83
84 m_UpCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_UP));
85 m_DownCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_DOWN));
86 m_RemoveCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_REMOVE));
87
88 m_XferCtl.SetItemData(0,tftp::opRRQ);
89 m_XferCtl.SetItemData(1,tftp::opWRQ);
90
91 m_AddrCtl.SetWindowText("192.168.0.0");
92 m_NetmaskCtl.SetWindowText("255.255.255.0");
93
94 for(int i=0;i<m_rulist.GetSize();++i) {
95 m_ListCtl.InsertItem(i,0);
96 SetListRule(i,m_rulist[i]);
97 }
98
99 UpdateControls();
100
101 return TRUE; // return TRUE unless you set the focus to a control
102 // EXCEPTION: OCX Property Pages should return FALSE
103}
104
105void CPropsACL::OnSelchangeAclXfer() {
106 int cs = m_XferCtl.GetCurSel();
107 if(cs==CB_ERR) {
108 m_RuleCtl.EnableWindow(FALSE);
109 }else{
110 int rq = m_XferCtl.GetItemData(cs);
111 m_RuleCtl.SetOp(rq);
112 }
113}
114
115void CPropsACL::OnItemchangedAclList(NMHDR* pNMHDR, LRESULT* pResult) {
116 NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
117 if(
118 (pNMListView->uChanged&LVIF_STATE)
119 &&
120 (pNMListView->uNewState&LVIS_FOCUSED)!=(pNMListView->uOldState&LVIS_FOCUSED)
121 &&
122 pNMListView->iItem>=0 && pNMListView->iItem<m_ListCtl.GetItemCount()
123 ){
124 if(pNMListView->uNewState&LVIS_FOCUSED)
125 m_FocusedRule=pNMListView->iItem;
126 else if(pNMListView->iItem==m_FocusedRule)
127 m_FocusedRule=-1;
128 UpdateControls();
129 }
130
131 *pResult = 0;
132}
133
134void CPropsACL::UpdateControls() {
135 if(m_FocusedRule>=m_rulist.GetSize())
136 m_FocusedRule=-1;
137 if(m_FocusedRule>=0) {
138 m_UpCtl.EnableWindow(m_FocusedRule>0);
139 m_DownCtl.EnableWindow(m_FocusedRule<(m_ListCtl.GetItemCount()-1));
140 acl_rule r;
141 GetListRule(m_FocusedRule,r);
142 SetRule(r);
143 m_AddCtl.EnableWindow(TRUE);
144 m_ReplaceCtl.EnableWindow(TRUE);
145 }else{
146 OnSelchangeAclXfer();
147 m_AddCtl.EnableWindow(TRUE);
148 m_ReplaceCtl.EnableWindow(FALSE);
149 }
150 m_RemoveCtl.EnableWindow(m_ListCtl.GetSelectedCount()!=0 || m_FocusedRule>=0);
151}
152
153void CPropsACL::OnAclAdd() {
154 acl_rule r;
155 UINT err=GetRule(r);
156 if(err) {
157 AfxMessageBox(err,MB_OK);
158 }else{
159 int i=m_rulist.AppendRule(r);
160 ASSERT(r.op==acl_rule::opRRQ || r.op==acl_rule::opWRQ);
161 m_ListCtl.InsertItem(i,0);
162 SetListRule(i,r);
163 }
164}
165
166void CPropsACL::OnAclReplace() {
167 acl_rule r;
168 UINT err=GetRule(r);
169 if(err) {
170 AfxMessageBox(err,MB_OK);
171 }else{
172 ASSERT(m_FocusedRule>=0);
173 m_rulist[m_FocusedRule]=r;
174 SetListRule(m_FocusedRule,r);
175 }
176}
177
178int CPropsACL::GetOp() {
179 int cs=m_XferCtl.GetCurSel();
180 if(cs==CB_ERR)
181 return -1;
182 else
183 return m_XferCtl.GetItemData(cs);
184}
185
186void CPropsACL::SetOp(int op) {
187 int os=m_XferCtl.GetCount();
188 for(int i=0;i<os;++i) {
189 if(m_XferCtl.GetItemData(i)==op) {
190 m_XferCtl.SetCurSel(i);
191 return;
192 }
193 }
194 m_XferCtl.SetCurSel(-1);
195}
196
197void CPropsACL::SetListRule(int i,acl_rule& r) {
198 m_ListCtl.SetItem(i,subitemIP,LVIF_TEXT|LVIF_IMAGE,r.str_addr(),(r.op==acl_rule::opRRQ)?m_iRRQ:m_iWRQ,0,0,0);
199 m_ListCtl.SetItemText(i,subitemNM,r.str_mask());
200 m_ListCtl.SetItemText(i,subitemAction,r.str_target());
201}
202
203void CPropsACL::SetRule(acl_rule& r) {
204 SetOp(r.op);
205 m_AddrCtl.SetWindowText(r.str_addr());
206 m_NetmaskCtl.SetWindowText(r.str_mask());
207 m_RuleCtl.SetTarget(r.target,r.op);
208}
209
210void CPropsACL::GetListRule(int i,acl_rule& r) {
211 r = m_rulist[i];
212}
213
214UINT CPropsACL::GetRule(acl_rule& r)
215{
216 UINT rv=0;
217 r.op=GetOp();
218 if(r.op!=acl_rule::opRRQ && r.op!=acl_rule::opWRQ)
219 rv=IDS_NO_XFER_OP;
220 else{
221 CString t;
222 m_AddrCtl.GetWindowText(t);
223 if(t.IsEmpty() || ( (r.addr=inet_addr((LPCSTR)t))==INADDR_NONE && t!="255.255.255.255") )
224 rv=IDS_INVALID_IP;
225 else{
226 m_NetmaskCtl.GetWindowText(t);
227 if(t.IsEmpty() || ( (r.mask=inet_addr((LPCSTR)t))==INADDR_NONE && t!="255.255.255.255") )
228 rv=IDS_INVALID_NETMASK;
229 else{
230 r.target=m_RuleCtl.GetTarget();
231 if(!r.IsValid())
232 rv=IDS_INVALID_RULE;
233 }
234 }
235 }
236 return rv;
237}
238
239void CPropsACL::OnAclRemove() {
240 ASSERT(m_FocusedRule>=0);
241 int fr=m_FocusedRule;
242 if(fr<0 || fr>=m_rulist.GetSize()) return;
243 m_rulist.DeleteRule(fr);
244 m_ListCtl.DeleteItem(fr);
245 ASSERT(m_rulist.GetSize()==m_ListCtl.GetItemCount());
246 if(fr>=m_rulist.GetSize()) {
247 if(fr>0) {
248 fr=m_rulist.GetSize()-1;
249 }
250 }else
251 fr=-1;
252 if(fr>0)
253 SetListFocusSelection(fr);
254 m_ListCtl.SetFocus();
255}
256
257void CPropsACL::OnAclUp() {
258 int s=m_FocusedRule;
259 if(s<=0) return;
260 int d=s-1;
261 acl_rule r=m_rulist[s];
262 m_rulist[s]=m_rulist[d];
263 m_rulist[d]=r;
264 SetListRule(d,m_rulist[d]);
265 SetListRule(s,m_rulist[s]);
266 SetListFocusSelection(d);
267 m_ListCtl.SetFocus();
268}
269
270void CPropsACL::OnAclDown() {
271 int s=m_FocusedRule;
272 int d=s+1;
273 if(s<0 || d>=m_rulist.GetSize()) return;
274 acl_rule r=m_rulist[s];
275 m_rulist[s]=m_rulist[d];
276 m_rulist[d]=r;
277 SetListRule(d,m_rulist[d]);
278 SetListRule(s,m_rulist[s]);
279 SetListFocusSelection(d);
280 m_ListCtl.SetFocus();
281}
282
283void CPropsACL::SetListFocusSelection(int i) {
284 int s=m_ListCtl.GetItemCount();
285 for(int t=0;t<s;++t)
286 if(t!=i)
287 m_ListCtl.SetItemState(t,0,LVIS_FOCUSED|LVIS_SELECTED);
288 m_ListCtl.SetItemState(i,LVIS_FOCUSED|LVIS_SELECTED,LVIS_FOCUSED|LVIS_SELECTED);
289}
290
diff --git a/PropsACL.h b/PropsACL.h
deleted file mode 100644
index c8773e7..0000000
--- a/PropsACL.h
+++ b/dev/null
@@ -1,71 +0,0 @@
1// PropsACL.h : header file
2//
3
4/////////////////////////////////////////////////////////////////////////////
5// CPropsACL dialog
6
7class CPropsACL : public CPropertyPage
8{
9 DECLARE_DYNCREATE(CPropsACL)
10
11// Construction
12public:
13 void SetListFocusSelection(int i);
14 UINT GetRule(acl_rule& r);
15 void GetListRule(int i,acl_rule& r);
16 void SetOp(int op);
17 void SetRule(acl_rule& r);
18 void SetListRule(int i,acl_rule& r);
19 int m_iWRQ;
20 int m_iRRQ;
21 CImageList m_Images;
22 int GetOp();
23 acl_rules_t m_rulist;
24 int m_FocusedRule;
25 void UpdateControls();
26 enum {
27 subitemIP=0, subitemNM, subitemAction
28 };
29
30 CPropsACL();
31 ~CPropsACL();
32
33// Dialog Data
34 //{{AFX_DATA(CPropsACL)
35 enum { IDD = IDD_PROPS_ACL };
36 CButtonm_ReplaceCtl;
37 CEditm_NetmaskCtl;
38 CComboBoxm_XferCtl;
39 CButtonm_UpCtl;
40 CACLTargetCombom_RuleCtl;
41 CButtonm_RemoveCtl;
42 CListCtrlm_ListCtl;
43 CButtonm_DownCtl;
44 CEditm_AddrCtl;
45 CButtonm_AddCtl;
46 //}}AFX_DATA
47
48
49// Overrides
50 // ClassWizard generate virtual function overrides
51 //{{AFX_VIRTUAL(CPropsACL)
52 protected:
53 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
54 //}}AFX_VIRTUAL
55
56// Implementation
57protected:
58 // Generated message map functions
59 //{{AFX_MSG(CPropsACL)
60 virtual BOOL OnInitDialog();
61 afx_msg void OnSelchangeAclXfer();
62 afx_msg void OnItemchangedAclList(NMHDR* pNMHDR, LRESULT* pResult);
63 afx_msg void OnAclAdd();
64 afx_msg void OnAclReplace();
65 afx_msg void OnAclRemove();
66 afx_msg void OnAclUp();
67 afx_msg void OnAclDown();
68 //}}AFX_MSG
69 DECLARE_MESSAGE_MAP()
70
71};
diff --git a/PropsNetwork.cpp b/PropsNetwork.cpp
deleted file mode 100755
index 2dd5913..0000000
--- a/PropsNetwork.cpp
+++ b/dev/null
@@ -1,74 +0,0 @@
1// PropsNetwork.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "PropsNetwork.h"
7
8#ifdef _DEBUG
9#define new DEBUG_NEW
10#undef THIS_FILE
11static char THIS_FILE[] = __FILE__;
12#endif
13
14/////////////////////////////////////////////////////////////////////////////
15// CPropsNetwork property page
16
17IMPLEMENT_DYNCREATE(CPropsNetwork, CPropertyPage)
18
19CPropsNetwork::CPropsNetwork() : CPropertyPage(CPropsNetwork::IDD)
20{
21 //{{AFX_DATA_INIT(CPropsNetwork)
22 m_ListenPort = 0;
23 m_SpeakPort = 0;
24 m_TimeOut = 0;
25 m_BlockSize = 0;
26 m_ListenAddress = _T("");
27 //}}AFX_DATA_INIT
28}
29
30CPropsNetwork::~CPropsNetwork()
31{
32}
33
34void CPropsNetwork::DoDataExchange(CDataExchange* pDX)
35{
36 CPropertyPage::DoDataExchange(pDX);
37 //{{AFX_DATA_MAP(CPropsNetwork)
38 DDX_Control(pDX, IDC_BSIZESPIN, m_BSizeSpinCtl);
39 DDX_Control(pDX, IDC_TIMESPIN, m_TimeSpinCtl);
40 DDX_Control(pDX, IDC_SPEAKSPIN, m_SpeakSpinCtl);
41 DDX_Control(pDX, IDC_LISTENSPIN, m_ListenSpinCtl);
42 DDX_Text(pDX, IDC_LISTENPORT, m_ListenPort);
43 DDX_Text(pDX, IDC_SPEAKPORT, m_SpeakPort);
44 DDX_Text(pDX, IDC_TIMEOUT, m_TimeOut);
45 DDV_MinMaxUInt(pDX, m_TimeOut, 5, 60);
46 DDX_Text(pDX, IDC_BLOCKSIZE, m_BlockSize);
47 DDX_Text(pDX, IDC_LISTENADDRESS, m_ListenAddress);
48 DDV_MaxChars(pDX, m_ListenAddress, 15);
49 //}}AFX_DATA_MAP
50}
51
52
53BEGIN_MESSAGE_MAP(CPropsNetwork, CPropertyPage)
54 //{{AFX_MSG_MAP(CPropsNetwork)
55 //}}AFX_MSG_MAP
56END_MESSAGE_MAP()
57
58/////////////////////////////////////////////////////////////////////////////
59// CPropsNetwork message handlers
60
61BOOL CPropsNetwork::OnInitDialog()
62{
63 CPropertyPage::OnInitDialog();
64
65 m_ListenSpinCtl.SetRange(0,32767);
66 m_SpeakSpinCtl.SetRange(0,32767);
67 m_TimeSpinCtl.SetRange(5,60);
68 m_BSizeSpinCtl.SetRange(512,16384);
69UDACCEL uda = {0,512};
70 m_BSizeSpinCtl.SetAccel(1,&uda);
71
72 return TRUE; // return TRUE unless you set the focus to a control
73 // EXCEPTION: OCX Property Pages should return FALSE
74}
diff --git a/PropsNetwork.h b/PropsNetwork.h
deleted file mode 100755
index 565b090..0000000
--- a/PropsNetwork.h
+++ b/dev/null
@@ -1,46 +0,0 @@
1// PropsNetwork.h : header file
2//
3
4/////////////////////////////////////////////////////////////////////////////
5// CPropsNetwork dialog
6
7class CPropsNetwork : public CPropertyPage
8{
9 DECLARE_DYNCREATE(CPropsNetwork)
10
11// Construction
12public:
13 CPropsNetwork();
14 ~CPropsNetwork();
15
16// Dialog Data
17 //{{AFX_DATA(CPropsNetwork)
18 enum { IDD = IDD_PROPS_NETWORK };
19 CSpinButtonCtrlm_BSizeSpinCtl;
20 CSpinButtonCtrlm_TimeSpinCtl;
21 CSpinButtonCtrlm_SpeakSpinCtl;
22 CSpinButtonCtrlm_ListenSpinCtl;
23 UINTm_ListenPort;
24 UINTm_SpeakPort;
25 UINTm_TimeOut;
26 UINTm_BlockSize;
27 CStringm_ListenAddress;
28 //}}AFX_DATA
29
30
31// Overrides
32 // ClassWizard generate virtual function overrides
33 //{{AFX_VIRTUAL(CPropsNetwork)
34 protected:
35 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
36 //}}AFX_VIRTUAL
37
38// Implementation
39protected:
40 // Generated message map functions
41 //{{AFX_MSG(CPropsNetwork)
42 virtual BOOL OnInitDialog();
43 //}}AFX_MSG
44 DECLARE_MESSAGE_MAP()
45
46};
diff --git a/PropsServer.cpp b/PropsServer.cpp
deleted file mode 100644
index a3948e0..0000000
--- a/PropsServer.cpp
+++ b/dev/null
@@ -1,98 +0,0 @@
1// PropsServer.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "PropsServer.h"
7
8#ifdef _DEBUG
9#define new DEBUG_NEW
10#undef THIS_FILE
11static char THIS_FILE[] = __FILE__;
12#endif
13
14/////////////////////////////////////////////////////////////////////////////
15// CPropsServer property page
16
17IMPLEMENT_DYNCREATE(CPropsServer, CPropertyPage)
18
19CPropsServer::CPropsServer() : CPropertyPage(CPropsServer::IDD)
20{
21 //{{AFX_DATA_INIT(CPropsServer)
22 m_RRQMode = -1;
23 m_TFTPRoot = _T("");
24 m_TFTPSubdirs = FALSE;
25 m_WRQMode = -1;
26 m_LogFile = _T("");
27 //}}AFX_DATA_INIT
28}
29
30CPropsServer::~CPropsServer()
31{
32}
33
34void CPropsServer::DoDataExchange(CDataExchange* pDX)
35{
36 CPropertyPage::DoDataExchange(pDX);
37 //{{AFX_DATA_MAP(CPropsServer)
38 DDX_Control(pDX, IDC_LOGFILE_BROWSE, m_LogBrowseCtl);
39 DDX_Control(pDX, IDC_BROWSE, m_BrowseCtl);
40 DDX_Control(pDX, IDC_PROMPTTIMEOUT, m_PromptTimeoutCtl);
41 DDX_Radio(pDX, IDC_RRQ_GIVEALL, m_RRQMode);
42 DDX_Text(pDX, IDC_TFTPROOT, m_TFTPRoot);
43 DDX_Check(pDX, IDC_TFTPSUBDIRS, m_TFTPSubdirs);
44 DDX_Radio(pDX, IDC_WRQ_TAKEALL, m_WRQMode);
45 DDX_Text(pDX, IDC_LOGFILE, m_LogFile);
46 //}}AFX_DATA_MAP
47 if(pDX->m_bSaveAndValidate)
48 m_PromptTimeOut=m_PromptTimeoutCtl.GetPos();
49 else
50 m_PromptTimeoutCtl.SetPos(m_PromptTimeOut);
51}
52
53
54BEGIN_MESSAGE_MAP(CPropsServer, CPropertyPage)
55 //{{AFX_MSG_MAP(CPropsServer)
56 ON_BN_CLICKED(IDC_BROWSE, OnBrowse)
57 ON_BN_CLICKED(IDC_LOGFILE_BROWSE, OnLogfileBrowse)
58 //}}AFX_MSG_MAP
59END_MESSAGE_MAP()
60
61/////////////////////////////////////////////////////////////////////////////
62// CPropsServer message handlers
63
64BOOL CPropsServer::OnInitDialog()
65{
66 CPropertyPage::OnInitDialog();
67
68 m_PromptTimeoutCtl.SetRange(5,60);
69 m_BrowseCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_BROWSE));
70 m_LogBrowseCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_BROWSE));
71
72 return TRUE; // return TRUE unless you set the focus to a control
73 // EXCEPTION: OCX Property Pages should return FALSE
74}
75
76void CPropsServer::OnBrowse()
77{
78CString nr = m_TFTPRoot;
79 if(Klever::BrowseForFolder(nr,IDS_SELECT_TFTPROOT,this)){
80 UpdateData(TRUE);
81 m_TFTPRoot=nr;
82 UpdateData(FALSE);
83 }
84}
85
86void CPropsServer::OnLogfileBrowse()
87{
88 UpdateData(TRUE);
89 CFileDialog cfd(
90 FALSE, ".log", (LPCSTR)m_LogFile,
91 OFN_EXPLORER|OFN_HIDEREADONLY|OFN_LONGNAMES|OFN_NOCHANGEDIR|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,
92 "Log files (*.log)|*.log|All Files (*.*)|*.*||",
93 this);
94 if(cfd.DoModal()==IDOK) {
95 m_LogFile = cfd.GetPathName();
96 UpdateData(FALSE);
97 }
98}
diff --git a/PropsServer.h b/PropsServer.h
deleted file mode 100644
index 1563479..0000000
--- a/PropsServer.h
+++ b/dev/null
@@ -1,48 +0,0 @@
1// PropsServer.h : header file
2//
3
4/////////////////////////////////////////////////////////////////////////////
5// CPropsServer dialog
6
7class CPropsServer : public CPropertyPage
8{
9 DECLARE_DYNCREATE(CPropsServer)
10
11// Construction
12public:
13 UINT m_PromptTimeOut;
14 CPropsServer();
15 ~CPropsServer();
16
17// Dialog Data
18 //{{AFX_DATA(CPropsServer)
19 enum { IDD = IDD_PROPS_SERVER };
20 CButtonm_LogBrowseCtl;
21 CButtonm_BrowseCtl;
22 CSliderCtrlm_PromptTimeoutCtl;
23 int m_RRQMode;
24 CStringm_TFTPRoot;
25 BOOLm_TFTPSubdirs;
26 int m_WRQMode;
27 CStringm_LogFile;
28 //}}AFX_DATA
29
30
31// Overrides
32 // ClassWizard generate virtual function overrides
33 //{{AFX_VIRTUAL(CPropsServer)
34 protected:
35 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
36 //}}AFX_VIRTUAL
37
38// Implementation
39protected:
40 // Generated message map functions
41 //{{AFX_MSG(CPropsServer)
42 virtual BOOL OnInitDialog();
43 afx_msg void OnBrowse();
44 afx_msg void OnLogfileBrowse();
45 //}}AFX_MSG
46 DECLARE_MESSAGE_MAP()
47
48};
diff --git a/PropsSounds.cpp b/PropsSounds.cpp
deleted file mode 100644
index a6f68d7..0000000
--- a/PropsSounds.cpp
+++ b/dev/null
@@ -1,146 +0,0 @@
1// PropsSounds.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "PropsSounds.h"
7#include "PumpKINDlg.h"
8
9#ifdef _DEBUG
10#define new DEBUG_NEW
11#undef THIS_FILE
12static char THIS_FILE[] = __FILE__;
13#endif
14
15/////////////////////////////////////////////////////////////////////////////
16// CPropsSounds property page
17
18IMPLEMENT_DYNCREATE(CPropsSounds, CPropertyPage)
19
20CPropsSounds::CPropsSounds() : CPropertyPage(CPropsSounds::IDD)
21{
22 //{{AFX_DATA_INIT(CPropsSounds)
23 m_Abort = _T("");
24 m_Success = _T("");
25 m_Request = _T("");
26 //}}AFX_DATA_INIT
27}
28
29CPropsSounds::~CPropsSounds()
30{
31}
32
33void CPropsSounds::DoDataExchange(CDataExchange* pDX)
34{
35 CPropertyPage::DoDataExchange(pDX);
36 //{{AFX_DATA_MAP(CPropsSounds)
37 DDX_Control(pDX, IDC_RING_PLAY, m_RequestPlayCtl);
38 DDX_Control(pDX, IDC_RING_BROWSE, m_RequestBrowseCtl);
39 DDX_Control(pDX, IDC_RING, m_RequestCtl);
40 DDX_Control(pDX, IDC_FINISHED_PLAY, m_SuccessPlayCtl);
41 DDX_Control(pDX, IDC_FINISHED_BROWSE, m_SuccessBrowseCtl);
42 DDX_Control(pDX, IDC_FINISHED, m_SuccessCtl);
43 DDX_Control(pDX, IDC_ABORTED_PLAY, m_AbortPlayCtl);
44 DDX_Control(pDX, IDC_ABORTED_BROWSE, m_AbortBrowseCtl);
45 DDX_Control(pDX, IDC_ABORTED, m_AbortCtl);
46 DDX_CBString(pDX, IDC_ABORTED, m_Abort);
47 DDX_CBString(pDX, IDC_FINISHED, m_Success);
48 DDX_CBString(pDX, IDC_RING, m_Request);
49 //}}AFX_DATA_MAP
50}
51
52
53BEGIN_MESSAGE_MAP(CPropsSounds, CPropertyPage)
54 //{{AFX_MSG_MAP(CPropsSounds)
55 ON_BN_CLICKED(IDC_ABORTED_BROWSE, OnAbortedBrowse)
56 ON_BN_CLICKED(IDC_FINISHED_BROWSE, OnFinishedBrowse)
57 ON_BN_CLICKED(IDC_RING_BROWSE, OnRingBrowse)
58 ON_BN_CLICKED(IDC_ABORTED_PLAY, OnAbortedPlay)
59 ON_BN_CLICKED(IDC_FINISHED_PLAY, OnFinishedPlay)
60 ON_BN_CLICKED(IDC_RING_PLAY, OnRingPlay)
61 //}}AFX_MSG_MAP
62END_MESSAGE_MAP()
63
64/////////////////////////////////////////////////////////////////////////////
65// CPropsSounds message handlers
66
67BOOL CPropsSounds::OnInitDialog()
68{
69 CPropertyPage::OnInitDialog();
70
71HICON hP = AfxGetApp()->LoadIcon(IDI_PLAY);
72HICON hB = AfxGetApp()->LoadIcon(IDI_BROWSE);
73 m_RequestPlayCtl.SetIcon(hP);
74 m_SuccessPlayCtl.SetIcon(hP);
75 m_AbortPlayCtl.SetIcon(hP);
76 m_RequestBrowseCtl.SetIcon(hB);
77 m_SuccessBrowseCtl.SetIcon(hB);
78 m_AbortBrowseCtl.SetIcon(hB);
79
80CPumpKINDlg* pd = (CPumpKINDlg*)AfxGetMainWnd();
81 //ASSERT_KINDOF(CPumpKINDlg,pd);
82 m_bnw=&pd->m_bnw;
83
84 m_bnw->FillInCombo(&m_RequestCtl);
85 m_bnw->FillInCombo(&m_SuccessCtl);
86 m_bnw->FillInCombo(&m_AbortCtl);
87
88 return TRUE; // return TRUE unless you set the focus to a control
89 // EXCEPTION: OCX Property Pages should return FALSE
90}
91
92void CPropsSounds::OnAbortedBrowse()
93{
94 Browse(m_AbortCtl);
95}
96void CPropsSounds::OnFinishedBrowse()
97{
98 Browse(m_SuccessCtl);
99}
100void CPropsSounds::OnRingBrowse()
101{
102 Browse(m_RequestCtl);
103}
104
105void CPropsSounds::OnAbortedPlay()
106{
107 Play(m_AbortCtl);
108}
109
110void CPropsSounds::OnFinishedPlay()
111{
112 Play(m_SuccessCtl);
113}
114
115void CPropsSounds::OnRingPlay()
116{
117 Play(m_RequestCtl);
118}
119
120void CPropsSounds::Browse(CComboBox& ctl)
121{
122CString f;
123 ctl.GetWindowText(f);
124CString filter;
125 filter.LoadString(IDS_FILTER_WAV);
126CFileDialog fd(TRUE,NULL,(LPCTSTR)f,
127 OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY
128 |OFN_LONGNAMES|OFN_NOCHANGEDIR|OFN_PATHMUSTEXIST,
129 filter,this);
130CString title;
131 title.LoadString(IDS_TITLE_WAV);
132 fd.m_ofn.lpstrTitle=(LPCTSTR)title;
133 if(fd.DoModal()==IDOK)
134 ctl.SetWindowText(fd.GetPathName());
135}
136
137void CPropsSounds::Play(CComboBox& ctl)
138{
139CString s;
140 ctl.GetWindowText(s);
141CBellsNWhistles::Whistling w = m_bnw->StartSound(s);
142 if(w){
143 Sleep(5000);
144 m_bnw->StopSound(w);
145 }
146}
diff --git a/PropsSounds.h b/PropsSounds.h
deleted file mode 100644
index 05aea4c..0000000
--- a/PropsSounds.h
+++ b/dev/null
@@ -1,58 +0,0 @@
1// PropsSounds.h : header file
2//
3
4/////////////////////////////////////////////////////////////////////////////
5// CPropsSounds dialog
6
7class CPropsSounds : public CPropertyPage
8{
9 DECLARE_DYNCREATE(CPropsSounds)
10
11// Construction
12public:
13 void Play(CComboBox& ctl);
14 void Browse(CComboBox& ctl);
15 CBellsNWhistles* m_bnw;
16 CPropsSounds();
17 ~CPropsSounds();
18
19// Dialog Data
20 //{{AFX_DATA(CPropsSounds)
21 enum { IDD = IDD_PROPS_SOUNDS };
22 CButtonm_RequestPlayCtl;
23 CButtonm_RequestBrowseCtl;
24 CComboBoxm_RequestCtl;
25 CButtonm_SuccessPlayCtl;
26 CButtonm_SuccessBrowseCtl;
27 CComboBoxm_SuccessCtl;
28 CButtonm_AbortPlayCtl;
29 CButtonm_AbortBrowseCtl;
30 CComboBoxm_AbortCtl;
31 CStringm_Abort;
32 CStringm_Success;
33 CStringm_Request;
34 //}}AFX_DATA
35
36
37// Overrides
38 // ClassWizard generate virtual function overrides
39 //{{AFX_VIRTUAL(CPropsSounds)
40 protected:
41 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
42 //}}AFX_VIRTUAL
43
44// Implementation
45protected:
46 // Generated message map functions
47 //{{AFX_MSG(CPropsSounds)
48 virtual BOOL OnInitDialog();
49 afx_msg void OnAbortedBrowse();
50 afx_msg void OnFinishedBrowse();
51 afx_msg void OnRingBrowse();
52 afx_msg void OnAbortedPlay();
53 afx_msg void OnFinishedPlay();
54 afx_msg void OnRingPlay();
55 //}}AFX_MSG
56 DECLARE_MESSAGE_MAP()
57
58};
diff --git a/PumpKINDlg.cpp b/PumpKINDlg.cpp
deleted file mode 100755
index 0c5c19b..0000000
--- a/PumpKINDlg.cpp
+++ b/dev/null
@@ -1,2178 +0,0 @@
1// PumpKINDlg.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "PumpKINDlg.h"
7
8#include "ACLTargetCombo.h"
9#include "PropsServer.h"
10#include "PropsNetwork.h"
11#include "PropsSounds.h"
12#include "PropsACL.h"
13#include "ConfirmRRQDlg.h"
14#include "ConfirmWRQDlg.h"
15#include "RequestDlg.h"
16#include "Resolver.h"
17#include "Retrier.h"
18#include "Trayer.h"
19
20#include <io.h>
21
22#ifdef _DEBUG
23#define new DEBUG_NEW
24#undef THIS_FILE
25static char THIS_FILE[] = __FILE__;
26#endif
27
28IMPLEMENT_DYNAMIC(CXferSocket, CAsyncSocket)
29IMPLEMENT_DYNAMIC(CWRQSocket, CXferSocket)
30IMPLEMENT_DYNAMIC(CRRQSocket, CXferSocket)
31
32/////////////////////////////////////////////////////////////////////////////
33// CAboutDlg dialog used for App About
34
35class CAboutDlg : public CDialog
36{
37public:
38 CAboutDlg();
39
40// Dialog Data
41 //{{AFX_DATA(CAboutDlg)
42 enum { IDD = IDD_ABOUTBOX };
43 //}}AFX_DATA
44
45 // ClassWizard generated virtual function overrides
46 //{{AFX_VIRTUAL(CAboutDlg)
47 protected:
48 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
49 //}}AFX_VIRTUAL
50
51// Implementation
52protected:
53 //{{AFX_MSG(CAboutDlg)
54 afx_msg void OnKlevernet();
55 //}}AFX_MSG
56 DECLARE_MESSAGE_MAP()
57};
58
59CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
60{
61 //{{AFX_DATA_INIT(CAboutDlg)
62 //}}AFX_DATA_INIT
63}
64
65void CAboutDlg::DoDataExchange(CDataExchange* pDX)
66{
67 CDialog::DoDataExchange(pDX);
68 //{{AFX_DATA_MAP(CAboutDlg)
69 //}}AFX_DATA_MAP
70}
71
72BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
73 //{{AFX_MSG_MAP(CAboutDlg)
74 ON_BN_CLICKED(IDC_KLEVERNET, OnKlevernet)
75 //}}AFX_MSG_MAP
76END_MESSAGE_MAP()
77
78/////////////////////////////////////////////////////////////////////////////
79// CPumpKINDlg dialog
80
81CPumpKINDlg::CPumpKINDlg(CWnd* pParent /*=NULL*/)
82 : CDialog(CPumpKINDlg::IDD, pParent), m_MinSize(0,0)
83{
84 m_Listener.m_Daddy = this;
85
86 m_bListen = TRUE;
87
88 m_ListenPort = 69;
89 m_bTFTPSubdirs = TRUE;
90 m_RRQMode = rrqAlwaysConfirm;
91 m_WRQMode = wrqAlwaysConfirm;
92 m_TFTPTimeOut = CTimeSpan(0,0,0,30);
93 m_RetryTimeOut = CTimeSpan(0,0,0,10);
94 m_LogLength = 100;
95 m_SpeakPort = 69;
96 m_PromptTimeOut=30;
97 m_bShown=TRUE;
98 m_bExiting=FALSE;
99 m_BlockSize=2048;
100 m_bnw.AssignSound("(bang)",IDR_WAVE_RING,CBellsNWhistles::CBang::bangResource);
101 m_bnw.AssignSound("(done)",IDR_WAVE_FINISHED,CBellsNWhistles::CBang::bangResource);
102 m_bnw.AssignSound("(oops)",IDR_WAVE_ABORTED,CBellsNWhistles::CBang::bangResource);
103 m_bnw.AssignSound("(none)",(int)0,CBellsNWhistles::CBang::bangNone);
104 m_bnwRequest="(bang)"; m_bnwSuccess="(done)";
105 m_bnwAbort="(oops)";
106 //{{AFX_DATA_INIT(CPumpKINDlg)
107 //}}AFX_DATA_INIT
108 // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
109 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
110 m_bmpBack.LoadBitmap(IDB_BACKGROUND);
111 m_bmpBack.GetBitmap(&m_bitmapBack);
112 m_Retrier = new CRetrier(this);
113 ASSERT(m_Retrier);
114 m_Trayer = new CTrayer(this);
115 ASSERT(m_Trayer);
116 /* Ensure we're backwards compatible */
117 ASSERT(CPumpKINDlg::rrqGiveAll==0);
118 ASSERT(CPumpKINDlg::rrqAlwaysConfirm==1);
119 ASSERT(CPumpKINDlg::rrqDenyAll==2);
120 ASSERT(CPumpKINDlg::wrqTakeAll==0);
121 ASSERT(CPumpKINDlg::wrqConfirmIfExists==1);
122 ASSERT(CPumpKINDlg::wrqAlwaysConfirm==2);
123 ASSERT(CPumpKINDlg::wrqDenyAll==3);
124 /* -- */
125 LoadSettings();
126}
127
128void CPumpKINDlg::DoDataExchange(CDataExchange* pDX)
129{
130 CDialog::DoDataExchange(pDX);
131 //{{AFX_DATA_MAP(CPumpKINDlg)
132 DDX_Control(pDX, ID_HELP, m_HelpCtl);
133 DDX_Control(pDX, IDC_PUT, m_PutCtl);
134 DDX_Control(pDX, IDC_GET, m_GetCtl);
135 DDX_Control(pDX, IDC_EXIT, m_ExitCtl);
136 DDX_Control(pDX, IDC_LISTENING, m_ListenCtl);
137 DDX_Control(pDX, IDC_ABORT, m_AbortCtl);
138 DDX_Control(pDX, IDC_OPTIONS, m_OptionsCtl);
139 DDX_Control(pDX, IDC_LOG, m_Log);
140 DDX_Control(pDX, IDC_CONNECTIONS, m_List);
141 //}}AFX_DATA_MAP
142}
143
144BEGIN_MESSAGE_MAP(CPumpKINDlg, CDialog)
145 //{{AFX_MSG_MAP(CPumpKINDlg)
146 ON_WM_SYSCOMMAND()
147 ON_WM_DESTROY()
148 ON_WM_PAINT()
149 ON_WM_QUERYDRAGICON()
150 ON_WM_CREATE()
151 ON_BN_CLICKED(IDC_OPTIONS, OnOptions)
152 ON_WM_TIMER()
153 ON_BN_CLICKED(IDC_EXIT, OnExit)
154 ON_BN_CLICKED(IDC_PUT, OnPut)
155 ON_BN_CLICKED(IDC_GET, OnGet)
156 ON_NOTIFY(LVN_DELETEALLITEMS, IDC_CONNECTIONS, OnDeleteallitemsConnections)
157 ON_NOTIFY(LVN_DELETEITEM, IDC_CONNECTIONS, OnDeleteitemConnections)
158 ON_NOTIFY(LVN_INSERTITEM, IDC_CONNECTIONS, OnInsertitemConnections)
159 ON_NOTIFY(LVN_ITEMCHANGED, IDC_CONNECTIONS, OnItemchangedConnections)
160 ON_BN_CLICKED(IDC_ABORT, OnAbort)
161 ON_WM_CLOSE()
162 ON_COMMAND(ID_TRAY_SHOWPUMPKINWINDOW, OnTrayShowpumpkinwindow)
163 ON_COMMAND(ID_TRAY_LISTEN, OnTrayListen)
164 ON_COMMAND(ID_TRAY_EXIT, OnTrayExit)
165 ON_COMMAND(ID_TRAY_ABOUTPUMPKIN, OnTrayAboutpumpkin)
166 ON_COMMAND(ID_TRAY_FETCHFILE, OnTrayFetchfile)
167 ON_COMMAND(ID_TRAY_HELP, OnTrayHelp)
168 ON_COMMAND(ID_TRAY_OPTIONS, OnTrayOptions)
169 ON_COMMAND(ID_TRAY_SENDFILE, OnTraySendfile)
170 ON_WM_WINDOWPOSCHANGING()
171 ON_LBN_SELCHANGE(IDC_LOG, OnSelchangeLog)
172 ON_COMMAND(ID_TRAY_OPENFILESFOLDER, OnTrayOpenfilesfolder)
173 ON_WM_DROPFILES()
174 ON_BN_CLICKED(ID_HELP, OnHelp)
175 ON_BN_CLICKED(IDC_LISTENING, OnListening)
176 ON_WM_GETMINMAXINFO()
177 ON_WM_SIZE()
178 //}}AFX_MSG_MAP
179END_MESSAGE_MAP()
180
181/////////////////////////////////////////////////////////////////////////////
182// CPumpKINDlg message handlers
183
184BOOL CPumpKINDlg::OnInitDialog()
185{
186 CDialog::OnInitDialog();
187
188 // Add "About..." menu item to system menu.
189
190 // IDM_ABOUTBOX must be in the system command range.
191 ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
192 ASSERT(IDM_ABOUTBOX < 0xF000);
193
194 CMenu* pSysMenu = GetSystemMenu(FALSE);
195 CString strAboutMenu;
196 strAboutMenu.LoadString(IDS_ABOUTBOX);
197 if (!strAboutMenu.IsEmpty())
198 {
199 pSysMenu->AppendMenu(MF_SEPARATOR);
200 pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
201 }
202
203 // Set the icon for this dialog. The framework does this automatically
204 // when the application's main window is not a dialog
205 SetIcon(m_hIcon, TRUE); // Set big icon
206 SetIcon(m_hIcon, FALSE); // Set small icon
207
208 VERIFY(m_Retrier->Create(NULL,"PumpKIN-Retrier",WS_CHILD,CRect(0,0,0,0),this,0));
209
210 m_Images.Create(16,16,TRUE,2,1);
211 m_iRRQ = m_Images.Add(AfxGetApp()->LoadIcon(IDI_RRQ));
212 m_iWRQ = m_Images.Add(AfxGetApp()->LoadIcon(IDI_WRQ));
213 ASSERT(m_iRRQ>=0);
214 ASSERT(m_iWRQ>=0);
215 m_List.SetImageList(&m_Images,LVSIL_NORMAL);
216 m_List.SetImageList(&m_Images,LVSIL_SMALL);
217 m_List.SetImageList(&m_Images,LVSIL_STATE);
218 m_List.SetTextColor(RGB(255,255,0));// Yellow
219 m_List.SetTextBkColor(RGB(12,167,0));// Green
220 m_List.SetBkColor(RGB(12,167,0));// Green
221CRect listrc;
222 m_List.GetClientRect(&listrc);
223 m_List.InsertColumn(0,"File",LVCFMT_LEFT,listrc.Width()-((listrc.Width()/7)*3+listrc.Width()*2/7),subitemFile);
224 m_List.InsertColumn(1,"type",LVCFMT_CENTER,listrc.Width()/7,subitemType);
225 m_List.InsertColumn(2,"peer",LVCFMT_LEFT,listrc.Width()*2/7,subitemPeer);
226 m_List.InsertColumn(3,"ACK",LVCFMT_RIGHT,listrc.Width()/7,subitemBytes);
227 m_List.InsertColumn(4,"tsize",LVCFMT_RIGHT,listrc.Width()/7,subitemTSize);
228
229 LogLine(IDS_LOG_START);
230
231 SetupButtons();
232
233CRect wrci, wrco;
234 GetWindowRect(&wrco);
235 GetClientRect(&wrci);
236CRect brc;
237 m_GetCtl.GetWindowRect(&brc); ScreenToClient(&brc);
238 m_rightGapButtons = wrci.right-brc.right;
239 m_List.GetWindowRect(&brc); ScreenToClient(&brc);
240 m_rightGapList = wrci.right-brc.right;
241 m_ListenCtl.GetWindowRect(&brc); ScreenToClient(&brc);
242 m_bottomGapListen = wrci.bottom-brc.bottom;
243 m_Log.GetWindowRect(&brc);ScreenToClient(&brc);
244 m_bottomGapLog = wrci.bottom-brc.bottom;
245 m_MinSize.cx = wrco.Width(); m_MinSize.cy=wrco.Height();
246
247CRect rc, drc;
248 GetWindowRect(rc);
249 GetDesktopWindow()->GetWindowRect(drc);
250 SetWindowPos(NULL,drc.right-6-rc.Width(),6,0,0,SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER);
251
252 if(m_bShown)
253 ShowWindow(SW_SHOW);
254 else
255 ShowWindow(SW_HIDE);
256
257 m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0);
258
259 // CG: The following block was added by the ToolTips component.
260 {
261 // Create the ToolTip control.
262 m_tooltip.Create(this);
263 m_tooltip.Activate(TRUE);
264
265 m_tooltip.AddTool(&m_List,IDC_CONNECTIONS);
266 m_tooltip.AddTool(GetDlgItem(IDC_PUT),IDC_PUT);
267 m_tooltip.AddTool(GetDlgItem(IDC_GET),IDC_GET);
268 m_tooltip.AddTool(&m_AbortCtl,IDC_ABORT);
269 m_tooltip.AddTool(GetDlgItem(IDC_OPTIONS),IDC_OPTIONS);
270 m_tooltip.AddTool(GetDlgItem(IDC_EXIT),IDC_EXIT);
271 m_tooltip.AddTool(GetDlgItem(ID_HELP),ID_HELP);
272 m_tooltip.AddTool(GetDlgItem(IDC_LOG),IDC_LOG);
273 }
274 return TRUE; // return TRUE unless you set the focus to a control
275}
276
277void CPumpKINDlg::OnSysCommand(UINT nID, LPARAM lParam)
278{
279 if ((nID & 0xFFF0) == IDM_ABOUTBOX)
280 {
281 CAboutDlg dlgAbout;
282 dlgAbout.DoModal();
283 }
284 else
285 {
286 CDialog::OnSysCommand(nID, lParam);
287 }
288}
289
290void CPumpKINDlg::OnDestroy()
291{
292 SaveSettings();
293
294NOTIFYICONDATA nid;
295 memset(&nid,0,sizeof(nid));
296 nid.cbSize=sizeof(nid);
297 nid.hWnd=m_Trayer->m_hWnd;
298 nid.uID=IDC_TRAYICON;
299 nid.uFlags=0;
300 VERIFY(Shell_NotifyIcon(NIM_DELETE,&nid));
301
302 WinHelp(0L, HELP_QUIT);
303 CDialog::OnDestroy();
304POSITION p = m_LogTimes.GetStartPosition();
305 while(p){
306 CTime *t,*tt;
307 m_LogTimes.GetNextAssoc(p,t,tt);
308 ASSERT(t && tt && t==tt);
309 delete t;
310 }
311 // *** Abort and cleanup transfers
312 m_LogTimes.RemoveAll();
313}
314
315// If you add a minimize button to your dialog, you will need the code below
316// to draw the icon. For MFC applications using the document/view model,
317// this is automatically done for you by the framework.
318
319void CPumpKINDlg::OnPaint()
320{
321 if (IsIconic())
322 {
323 CPaintDC dc(this); // device context for painting
324
325 SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
326
327 // Center icon in client rectangle
328 int cxIcon = GetSystemMetrics(SM_CXICON);
329 int cyIcon = GetSystemMetrics(SM_CYICON);
330 CRect rect;
331 GetClientRect(&rect);
332 int x = (rect.Width() - cxIcon + 1) / 2;
333 int y = (rect.Height() - cyIcon + 1) / 2;
334
335 // Draw the icon
336 dc.DrawIcon(x, y, m_hIcon);
337 }
338 else
339 {
340 CPaintDC pDC(this);
341 CDC bmpDC;
342 bmpDC.CreateCompatibleDC(&pDC);
343 bmpDC.SelectObject(&m_bmpBack);
344 CRect rc;
345 GetClientRect(&rc);
346 for(int x=-m_bitmapBack.bmWidth*2/4;x<rc.Width();x+=m_bitmapBack.bmWidth)
347 for(int y=-m_bitmapBack.bmHeight*2/4;y<rc.Height();y+=m_bitmapBack.bmHeight)
348 pDC.BitBlt(x,y,m_bitmapBack.bmWidth,m_bitmapBack.bmHeight,&bmpDC,0,0,SRCCOPY);
349 bmpDC.DeleteDC();
350 CDialog::OnPaint();
351 }
352}
353
354// The system calls this to obtain the cursor to display while the user drags
355// the minimized window.
356HCURSOR CPumpKINDlg::OnQueryDragIcon()
357{
358 return (HCURSOR) m_hIcon;
359}
360
361int CPumpKINDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
362{
363 if (CDialog::OnCreate(lpCreateStruct) == -1)
364 return -1;
365
366 if(!m_Listener.SetListen(m_bListen)) {
367 m_bListen=FALSE;
368 TRACE0("Failed to create socket\n");
369 AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION);
370 }
371
372 if(!m_Trayer->Create(NULL,"PumpKIN TrayIcon",WS_CHILD,CRect(0,0,0,0),this,0)){
373 TRACE0("Failed to create trayer\n");
374 return -1;
375 }
376
377NOTIFYICONDATA nid;
378 memset(&nid,0,sizeof(nid));
379 nid.cbSize=sizeof(nid);
380 nid.hWnd=m_Trayer->m_hWnd;
381 nid.uID=IDC_TRAYICON;
382 nid.uFlags=NIF_MESSAGE|NIF_ICON|NIF_TIP;
383 nid.uCallbackMessage=WM_TRAYICON;
384 nid.hIcon=AfxGetApp()->LoadIcon(IDR_MAINFRAME);
385 // *** Load from resource
386 strcpy(nid.szTip,"PumpKIN");
387 VERIFY(Shell_NotifyIcon(NIM_ADD,&nid));
388
389 return 0;
390}
391
392void CListenSocket::OnReceive(int nErrorCode)
393{
394 ASSERT(m_Daddy);
395 if(nErrorCode){
396 m_Daddy->LogLine(IDS_LOG_LISTENRECEIVEERROR);
397 return;
398 }
399DWORD fionread = 0;
400 VERIFY(IOCtl(FIONREAD,&fionread));// *** Do some checking on the value acquired
401tftp *tftpRQ = tftp::Allocate(fionread);
402 ASSERT(tftpRQ);
403SOCKADDR_IN sin;
404 if(!tftpRQ->Receive(this,fionread,&sin)){
405 m_Daddy->LogLine(IDS_LOG_LISTENACCEPTERROR);
406 delete tftpRQ;
407 return;
408 }
409 #ifndefNDEBUG
410CString tmp;
411 tmp.Format("%u - %s - %u\n",tftpRQ->Opcode(),inet_ntoa(sin.sin_addr),sin.sin_port);
412 TRACE0(tmp);
413#endif
414POSITION p = m_Daddy->m_Xfers.GetStartPosition();
415 while(p){
416 SOCKET key;
417 CXferSocket *sock;
418 m_Daddy->m_Xfers.GetNextAssoc(p,key,sock);
419 ASSERT(sock);
420 if(sock->m_Peer.sin_addr.s_addr==sin.sin_addr.s_addr && sock->m_Peer.sin_port==sin.sin_port){
421 TRACE0("Ignoring request which we are already processing\n");
422 delete tftpRQ;
423 return;
424 }
425 }
426 switch(tftpRQ->Opcode()){
427 case tftp::opRRQ:
428 // Read Request
429 {
430 CString tmp;
431 tmp.Format(IDS_LOG_RRQSERVE,tftpRQ->rqFileName(),tftpRQ->rqType(),inet_ntoa(sin.sin_addr));
432 m_Daddy->LogLine(tmp);
433 CRRQSocket *s = new CRRQSocket(m_Daddy,tftpRQ->rqFileName(),tftpRQ->rqType(),&sin);
434 ASSERT(s);
435 tftpRQ->GetOptions(&s->m_Options);
436 if(!s->Create())
437 s->Destroy(FALSE);
438 }
439 break;
440 case tftp::opWRQ:
441 // Write Request
442 {
443 CString tmp;
444 tmp.Format(IDS_LOG_WRQSERVE,tftpRQ->rqFileName(),tftpRQ->rqType(),inet_ntoa(sin.sin_addr));
445 m_Daddy->LogLine(tmp);
446 CWRQSocket *s = new CWRQSocket(m_Daddy,tftpRQ->rqFileName(),tftpRQ->rqType(),&sin);
447 ASSERT(s);
448 tftpRQ->GetOptions(&s->m_Options);
449 if(!s->Create(NULL,NULL))
450 s->Destroy(FALSE);
451 }
452 break;
453 default:
454 m_Daddy->LogLine(IDS_LOG_LISTENOPCODE);
455 delete tftpRQ;
456 return;
457 }
458 delete tftpRQ;
459}
460
461BOOL tftp::Receive(CAsyncSocket* socket,UINT maxLength,SOCKADDR_IN *sin)
462{
463 ASSERT(socket);
464int saddrLen = sizeof(SOCKADDR_IN);
465 length = sin ?
466 socket->ReceiveFrom(udpBase(),maxLength,(SOCKADDR*)sin,&saddrLen)
467 :
468 socket->Receive(udpBase(),maxLength)
469 ;
470 if(!length)
471 return FALSE;
472 if(length==(tftpLength)SOCKET_ERROR)
473 return FALSE;
474 return TRUE;
475}
476
477UINT tftp::Opcode()
478{
479 return REVERSEBYTES(opcode);
480}
481
482CString tftp::rqFileName()
483{
484 ASSERT(length);
485 ASSERT(Opcode()==opRRQ || Opcode()==opWRQ);
486CString rv;
487 if(memchr(&data.m_RQ.data,0,length-sizeof(opcode)))
488 rv = (LPCTSTR)data.m_RQ.data;
489 return rv;
490}
491
492CString tftp::rqType()
493{
494 ASSERT(length);
495 ASSERT(Opcode()==opRRQ || Opcode()==opWRQ);
496CString rv;
497char *tmp = (char*)memchr(&data.m_RQ.data,0,length-sizeof(opcode));
498 if(tmp++)
499 rv = (LPCTSTR)tmp;
500 return rv;
501}
502
503UINT tftp::GetOptions(tftp::tftpOptions* ops)
504{
505 ASSERT(length);
506 ASSERT(Opcode()==opRRQ || Opcode()==opWRQ || Opcode()==opOACK);
507 ASSERT(ops);
508tftpOptions& o = *ops;
509LPSTR base = (LPSTR)&data.m_RQ.data;
510UINT basePtr = 0;
511 if(Opcode()==opRRQ || Opcode()==opWRQ){
512 base = (LPSTR)memchr(&data.m_RQ.data,0,length-sizeof(opcode));
513 if(!base)
514 return 0;
515 base++;
516 basePtr = (base-(LPSTR)&data.m_RQ.data);
517 base = (LPSTR)memchr(base,0,length-basePtr);
518 if(!base)
519 return 0;
520 base++;
521 basePtr = (base-(LPSTR)&data.m_RQ.data);
522 }
523 ops->RemoveAll();
524UINT rv = 0;
525 while(basePtr<(length-sizeof(opcode))){
526 CString onam = (LPSTR)&data.m_RQ.data[basePtr];
527 basePtr+=onam.GetLength()+1;
528 CString oval = (LPSTR)&data.m_RQ.data[basePtr];
529 basePtr+=oval.GetLength()+1;
530 onam.MakeLower();
531 o[onam]=oval;
532 rv++;
533 }
534 return rv;
535}
536
537tftp::tftp()
538{
539 length=0;
540}
541
542
543void CXferSocket::OnSend(int nErrorCode)
544{
545 if(nErrorCode){
546 ASSERT(m_Daddy);
547 m_Daddy->LogLine(IDS_LOG_XFERSEND);
548 return;
549 }
550 if(!m_Queue.IsEmpty()){
551 tftp *p = m_Queue.GetHead();
552 ASSERT(p);
553 m_Queue.RemoveHead();
554 if(!p->Send(this,&m_Peer)){
555 ASSERT(m_Daddy);
556 m_Daddy->LogLine(IDS_LOG_XFERUDPSEND);
557 }
558 delete p;
559 }
560 DoSelect();
561 if(m_Queue.IsEmpty()){
562 switch(state){
563 case stateDeny:
564 Destroy(FALSE);
565 break;
566 case stateFinish:
567 Destroy(TRUE);
568 break;
569 }
570 }
571}
572
573BOOL tftp::Send(CAsyncSocket *socket,SOCKADDR_IN* saddr)
574{
575 ASSERT(socket);
576int rv = socket->SendTo(udpBase(),length,(SOCKADDR*)saddr,sizeof(SOCKADDR_IN));
577 if(rv!=length)
578 return FALSE;
579 return TRUE;
580}
581
582void CXferSocket::DoSelect(BOOL do_select)
583{
584 if(m_Peer.sin_addr.s_addr!=INADDR_NONE)
585 AsyncSelect(FD_CLOSE|FD_READ|((m_Queue.IsEmpty()&&!do_select)?0:FD_WRITE));
586}
587
588void CXferSocket::OnReceive(int nErrorCode)
589{
590 if(nErrorCode){
591 ASSERT(m_Daddy);
592 m_Daddy->LogLine(IDS_LOG_XFERRECEIVE);
593 return;
594 }
595 ASSERT(m_Daddy);
596DWORD fionread = 0;
597 VERIFY(IOCtl(FIONREAD,&fionread));
598tftp *p = tftp::Allocate(fionread);
599 ASSERT(p);
600SOCKADDR_IN sin;
601 if(!p->Receive(this,fionread,&sin)){
602 m_Daddy->LogLine(IDS_LOG_XFERUDPRECEIVE);
603 delete p;
604 return;
605 }else
606 if(m_Peer.sin_addr.s_addr==INADDR_NONE){
607 m_Peer.sin_addr=sin.sin_addr;
608 m_Peer.sin_port=sin.sin_port;
609 }
610BOOL alive = TRUE;
611 if(state==stateInit){
612 state=stateXfer;
613 m_Peer.sin_port=sin.sin_port;
614 UpdateList();
615 }
616 if(sin.sin_addr.s_addr!=m_Peer.sin_addr.s_addr || sin.sin_port!=m_Peer.sin_port){
617 m_Daddy->LogLine(IDS_LOG_XFERSOURCETID);
618 // *** Bounce it!
619 }else{
620 alive = OnTFTP(p);
621 }
622 delete p;
623 if(alive){
624 DoSelect();
625 ResetTimeout();
626 }
627}
628
629void CXferSocket::SetPeer(SOCKADDR_IN *sin)
630{
631 ASSERT(sin);
632 memmove(&m_Peer,sin,sizeof(m_Peer));
633}
634
635void CXferSocket::UpdateList()
636{
637 ASSERT(m_Daddy);
638LV_FINDINFO lvf;
639 memset(&lvf,0,sizeof(lvf));
640 lvf.flags=LVFI_PARAM;
641 lvf.lParam=(LPARAM)this;
642int i = m_Daddy->m_List.FindItem(&lvf);
643 if(i<0){
644 ASSERT(IsKindOf(RUNTIME_CLASS(CRRQSocket)) || IsKindOf(RUNTIME_CLASS(CWRQSocket)));
645 i=m_Daddy->m_List.InsertItem(0,m_FileName,IsKindOf(RUNTIME_CLASS(CRRQSocket))?m_Daddy->m_iRRQ:m_Daddy->m_iWRQ);
646 ASSERT(!(i<0));
647 m_Daddy->m_List.SetItemData(i,(DWORD)this);
648 }
649 m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemFile,m_FileName);
650 m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemType,m_Type);
651 m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemPeer,inet_ntoa(m_Peer.sin_addr));
652CString tmp;
653 tmp.Format(IDS_FMT_BYTES,GetACK());
654 m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemBytes,tmp);
655 if(m_xferSize>=0){
656 tmp.Format(IDS_FMT_BYTES,m_xferSize);
657 m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemTSize,tmp);
658 }
659}
660
661CXferSocket::CXferSocket()
662 : m_wndResolver(NULL), m_Retry(NULL), m_bRetry(FALSE),
663 m_blkSize(512), m_timeOut(30), m_xferSize(-1),
664 m__blkSize(512), m__timeOut(30)
665{
666 m_Daddy=NULL;
667 m_Peer.sin_addr.s_addr=INADDR_NONE;
668 m_Peer.sin_family=AF_INET;
669 state=stateNone;
670}
671
672ULONG CXferSocket::GetACK()
673{
674 return 0;
675}
676
677CXferSocket::CXferSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN* sin)
678 : m_wndResolver(NULL), m_Retry(NULL), m_bRetry(FALSE),
679 m_blkSize(512), m_timeOut(30), m_xferSize(-1),
680 m__blkSize(512), m__timeOut(30)
681{
682 m_Peer.sin_family=AF_INET;
683 state=stateNone;
684 ASSERT(daddy);
685 m_Daddy=daddy;
686 m_timeOut=m__timeOut=m_Daddy->m_TFTPTimeOut.GetTotalSeconds();
687 if(sin){
688 m_Peer.sin_addr.s_addr=sin->sin_addr.s_addr;
689 m_Peer.sin_port=sin->sin_port;
690 }else
691 m_Peer.sin_addr.s_addr=INADDR_NONE;
692 m_FileName=fileName;
693 m_Type=type;
694}
695
696BOOL CRRQSocket::Create(LPCTSTR localFile,LPCTSTR hostName)
697{
698 if(!CAsyncSocket::Create(0,SOCK_DGRAM))
699 return FALSE;
700 ASSERT(m_Daddy);
701 ASSERT(m_Peer.sin_addr.s_addr!=INADDR_NONE || hostName);
702 m_Daddy->m_Xfers[m_hSocket]=this;
703CString lFile = localFile?localFile:m_FileName;
704 TurnSlashes(lFile,TRUE);
705 UpdateList();
706 if(!localFile){// Check only for incoming requests
707 if(CheckBadRelativeness(m_FileName)){
708 Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS);
709 return TRUE;
710 }
711 int atar=m_Daddy->m_aclRules.FindTarget(acl_rule::opRRQ,m_Peer.sin_addr.s_addr);
712 if(atar<0)
713 atar = m_Daddy->m_RRQMode;
714 switch(atar){
715 case CPumpKINDlg::rrqGiveAll:
716 break;
717 case CPumpKINDlg::rrqAlwaysConfirm:
718 if(ConfirmRequest())
719 break;
720 default:
721 TRACE1("Unexpected access target: %d\n",atar);
722 case CPumpKINDlg::rrqDenyAll:
723 Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS);
724 return TRUE;
725 }
726 }
727CString fn = localFile?ApplyRootGently(lFile):ApplyRoot(lFile);
728CFileException e;
729 if(!m_File.Open(fn,CFile::modeRead|CFile::shareDenyWrite,&e)){
730 if(localFile){
731 CString tmp;
732 tmp.Format(IDS_LOG_FAILEDLOCALFILE,fn);
733 m_Daddy->LogLine(tmp);
734 return FALSE;
735 }
736 Deny(&e);
737 return TRUE;
738 }
739 m_xferSize=m_File.GetLength();// *** HANDLE EXCEPTION
740 if(hostName){
741 m_HostName=hostName;
742
743 CString tmp;
744 tmp.Format(IDS_LOG_SENDING,m_FileName,m_HostName);
745 m_Daddy->LogLine(tmp);
746
747 CString inAddr = hostName;
748 int at = inAddr.Find('@');
749 if(at>=0)
750 inAddr=inAddr.Mid(at+1);
751 if((m_Peer.sin_addr.s_addr=inet_addr((LPCTSTR)inAddr))==INADDR_NONE){
752 ASSERT(!m_wndResolver);
753 m_wndResolver = new CResolver(this);
754 ASSERT(m_wndResolver);
755 return m_wndResolver->Resolve();
756 }
757 else
758 OnHostKnown();
759 }else{
760 tftp::tftpOptions o;
761 CString v;
762 if(m_Options.Lookup(tftpoBSize,v)){
763 m__blkSize=atoi(v);
764 if(m__blkSize){
765 m_blkSize=m__blkSize;
766 v.Format("%u",m_blkSize);
767 o[tftpoBSize]=v;
768 }
769 }
770 if(m_Options.Lookup(tftpoTSize,v)){
771 v.Format("%lu",m_xferSize);
772 o[tftpoTSize]=v;
773 }
774 if(m_Options.Lookup(tftpoTOut,v)){
775 m__timeOut=atoi(v);
776 if(m__timeOut){
777 m_timeOut=m__timeOut;
778 v.Format("%u",m_timeOut);
779 o[tftpoTOut]=v;
780 }
781 }
782 // XXX: see if we can enforce our preference regarding block size here.
783 if(m_xferSize >= (m_blkSize<<16)) {
784 Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG);
785 return TRUE;
786 }
787 state = stateXfer;
788 m_ACK=0;
789 if(o.GetCount()){
790 tftp *p = tftp::Allocate(tftp::tftpOACK::tftpSize(&o));
791 ASSERT(p);
792 p->SetOpcode(tftp::opOACK);
793 p->data.m_OACK.Set(&o);
794 PostTFTP(p,TRUE);
795 }else
796 DoXfer();
797 }
798 return TRUE;
799}
800
801CRRQSocket::CRRQSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin)
802 : CXferSocket(daddy,fileName,type,sin)
803{
804 m_ACK=0;
805 m_LastSlack=0;
806}
807
808UINT tftp::tftpERROR::tftpSize(LPCTSTR msg)
809{
810 return tftpHdrSize-tftpSlackSize+sizeof(tftp::tftpERROR::tftpErrorCode)+strlen(msg)+1;
811}
812
813tftp* tftp::Allocate(UINT tftpSize)
814{
815 ASSERT(tftpSize);
816tftp* rv = (tftp*) new BYTE[tftpSlackSize+tftpSize];
817 ASSERT(rv);
818 rv->length=tftpSize;
819 return rv;
820}
821
822void tftp::errSet(UINT code,LPCTSTR msg)
823{
824 ASSERT(this);
825 ASSERT(length>=data.m_ERROR.tftpSize(msg));
826 strcpy((char*)data.m_ERROR.data,msg);
827 data.m_ERROR.SetCode(code);
828}
829
830void CXferSocket::PostTFTP(tftp* p,BOOL retryable)
831{
832 ASSERT(p);
833 m_Queue.AddTail(p);
834 DoSelect();
835 if(!m_bRetry){
836 if(retryable)
837 SetTry(p);
838 else
839 SetTry();
840 }
841 ResetTimeout();
842}
843
844void CXferSocket::Deny(UINT errCode,UINT errID)
845{
846 PostError(errCode,errID);
847 state=stateDeny;
848}
849
850void CRRQSocket::DoXfer()
851{
852tftp *p = tftp::Allocate(tftp::tftpDATA::tftpSize(m_blkSize));
853 ASSERT(p);
854 p->SetOpcode(tftp::opDATA);
855 TRY{
856 m_File.Seek(m_ACK*m_blkSize,CFile::begin);
857 int bytes = m_File.Read(p->data.m_DATA.data,m_blkSize);
858 p->data.m_DATA.SetBlock(m_ACK+1);
859 p->length=p->length-m_blkSize+bytes;
860 m_LastSlack = m_blkSize-bytes;
861 PostTFTP(p);
862 if(bytes<m_blkSize){
863 state=stateClosing; m_ACKtoClose = m_ACK+1;
864 }
865 }CATCH(CFileException,e){
866 Deny(e);
867 }END_CATCH
868}
869
870UINT tftp::tftpDATA::tftpSize(UINT blkSize)
871{
872 return tftpHdrSize-tftpSlackSize+sizeof(tftp::tftpDATA)
873 -sizeof(BYTE)+blkSize;
874}
875
876void CXferSocket::Deny(CFileException* e)
877{
878 PostError(e);
879 state=stateDeny;
880}
881
882void CXferSocket::PostError(UINT errCode,UINT errID)
883{
884CString msg;
885 msg.LoadString(errID);
886 ASSERT(m_Daddy);
887CString tmp;
888 tmp.Format(IDS_LOG_SENTTFTPERROR,errCode,(LPCTSTR)msg);
889 m_Daddy->LogLine(tmp);
890tftp* err = tftp::Allocate(tftp::tftpERROR::tftpSize(msg));
891err->SetOpcode(tftp::opERROR);
892 err->errSet(errCode,msg);
893 PostTFTP(err);
894}
895
896void CXferSocket::PostError(CFileException* e)
897{
898UINT eCode;
899UINT eMsgID;
900 switch(e->m_cause){
901 case CFileException::fileNotFound:
902 eCode=tftp::errNotFound;
903 eMsgID=IDS_TFTP_ERROR_NOTFOUND;
904 break;
905 case CFileException::accessDenied:
906 eCode=tftp::errAccessViolation;
907 eMsgID=IDS_TFTP_ERROR_ACCESS;
908 break;
909 case CFileException::directoryFull:
910 eCode=tftp::errDiskFull;
911 eMsgID=IDS_TFTP_ERROR_DIRFULL;
912 break;
913 case CFileException::sharingViolation:
914 eCode=tftp::errAccessViolation;
915 eMsgID=IDS_TFTP_ERROR_SHARING;
916 break;
917 case CFileException::diskFull:
918 eCode=tftp::errDiskFull;
919 eMsgID=IDS_TFTP_ERROR_DISKFULL;
920 break;
921 default:
922 eCode=tftp::errUndefined;
923 eMsgID=IDS_TFTP_ERROR_UNDEFINED;
924 break;
925 }
926 PostError(eCode,eMsgID);
927}
928
929ULONG CRRQSocket::GetACK(void)
930{
931 return (m_ACK*m_blkSize)-m_LastSlack;
932}
933
934BOOL CRRQSocket::OnTFTP(tftp* p)
935{
936BOOL rv = TRUE;
937 switch(p->Opcode()){
938 case tftp::opOACK:
939 {
940 m_ACK=0;
941 ASSERT(state!=stateFinish);
942 tftp::tftpOptions o;
943 if(p->GetOptions(&o)){
944 CString v;
945 if(o.Lookup(tftpoBSize,v)){
946 m_blkSize=atoi(v);
947 if(!m_blkSize){// *** More sanity checks
948 Deny(tftp::errOption,IDS_TFTP_ERROR_BSIZE);
949 rv = TRUE;
950 break;
951 }
952 }
953 if(o.Lookup(tftpoTOut,v)){
954 m_timeOut=atoi(v);
955 if(!m_timeOut){// *** More sanity checks
956 Deny(tftp::errOption,IDS_TFTP_ERROR_TOUT);
957 rv = TRUE;
958 break;
959 }
960 }
961 if(o.Lookup(tftpoXResume,v)){
962 m_ACK=atoi(v);
963 }
964 }
965 UpdateList();
966 DoXfer();
967 }
968 break;
969 case tftp::opACK:
970 m_ACK=p->data.m_ACK.Block();
971 if(state==stateClosing && m_ACK==m_ACKtoClose) {
972 state = stateFinish;
973 ASSERT(m_Daddy);
974 CString tmp;
975 tmp.Format(IDS_LOG_XFERRRQFINISHED,(LPCTSTR)m_FileName);
976 m_Daddy->LogLine(tmp);
977 rv = FALSE;
978 DoSelect(TRUE);
979 }else if(state!=stateFinish){
980 UpdateList();
981 DoXfer();
982 }
983 break;
984 case tftp::opERROR:
985 {
986 ASSERT(m_Daddy);
987 CString tmp;
988 tmp.Format(IDS_LOG_GOTTFTPERROR,p->data.m_ERROR.Code(),(LPCTSTR)p->errMessage());
989 m_Daddy->LogLine(tmp);
990 }
991 Destroy(FALSE);
992 rv = FALSE;
993 break;
994 default:
995 {
996 ASSERT(m_Daddy);
997 CString tmp;
998 tmp.Format(IDS_LOG_XFEROPCODE,p->Opcode());
999 m_Daddy->LogLine(tmp);
1000 // *** Self destruct maybe??
1001 }
1002 break;
1003 }
1004 return rv;
1005}
1006
1007BOOL CWRQSocket::OnTFTP(tftp* p)
1008{
1009 switch(p->Opcode()){
1010 case tftp::opOACK:
1011 ASSERT(state!=stateFinish);
1012 {
1013 if(m_bResume)
1014 m_ACK=m_File.GetLength()/m_blkSize;
1015 else
1016 m_ACK=0;
1017 tftp::tftpOptions o;
1018 if(p->GetOptions(&o)){
1019 CString v;
1020 if(o.Lookup(tftpoBSize,v)){
1021 m_blkSize=atoi(v);
1022 if(!m_blkSize){// *** More sanity checks
1023 Deny(tftp::errOption,IDS_TFTP_ERROR_BSIZE);
1024 return TRUE;
1025 }
1026 }
1027 if(o.Lookup(tftpoTOut,v)){
1028 m_timeOut=atoi(v);
1029 if(!m_timeOut){// *** More sanity checks
1030 Deny(tftp::errOption,IDS_TFTP_ERROR_TOUT);
1031 return TRUE;
1032 }
1033 }
1034 if(o.Lookup(tftpoTSize,v)){
1035 m_xferSize=atoi(v);
1036 }
1037 if(m_xferSize>=0 && m_xferSize>=(m_blkSize<<16)) {
1038 Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG);
1039 return TRUE;
1040 }
1041 }
1042 UpdateList();
1043 DoXfer();
1044 }
1045 break;
1046 case tftp::opDATA:
1047 {
1048 UINTblock = p->data.m_DATA.Block();
1049 TRY{
1050 m_File.Seek((block-1)*m_blkSize,CFile::begin);
1051 int bytes = p->length-sizeof(p->data.m_DATA.block)-(tftpHdrSize-tftpSlackSize);
1052 if(bytes){
1053 m_File.Write(p->data.m_DATA.data,bytes);
1054 // *** Move to the other place where we can do it not that often
1055 m_File.SetLength(m_File.GetPosition());
1056 }
1057 if(bytes<m_blkSize){
1058 state=stateFinish;
1059 ASSERT(m_Daddy);
1060 CString tmp;
1061 tmp.Format(IDS_LOG_XFERWRQFINISHED,(LPCTSTR)m_FileName);
1062 m_Daddy->LogLine(tmp);
1063 }
1064 m_ACK=block;
1065 m_LastSlack=m_blkSize-bytes;
1066 UpdateList();
1067 DoXfer();
1068 }CATCH(CFileException,e){
1069 Deny(e);
1070 }END_CATCH
1071 }
1072 break;
1073 case tftp::opERROR:
1074 {
1075 ASSERT(m_Daddy);
1076 CString tmp;
1077 tmp.Format(IDS_LOG_GOTTFTPERROR,p->data.m_ERROR.Code(),(LPCTSTR)p->errMessage());
1078 m_Daddy->LogLine(tmp);
1079 }
1080 Destroy(FALSE);
1081 return FALSE;
1082 default:
1083 {
1084 ASSERT(m_Daddy);
1085 CString tmp;
1086 tmp.Format(IDS_LOG_XFEROPCODE,p->Opcode());
1087 m_Daddy->LogLine(tmp);
1088 // *** Self destruct maybe??
1089 }
1090 break;
1091 }
1092 return TRUE;
1093}
1094
1095void tftp::SetOpcode(WORD op)
1096{
1097 opcode = REVERSEBYTES(op);
1098}
1099void tftp::tftpDATA::SetBlock(WORD b)
1100{
1101 block=REVERSEBYTES(b);
1102}
1103WORD tftp::tftpDATA::Block()
1104{
1105 return REVERSEBYTES(block);
1106}
1107WORD tftp::tftpACK::Block()
1108{
1109 return REVERSEBYTES(block);
1110}
1111void tftp::tftpACK::SetBlock(WORD b)
1112{
1113 block = REVERSEBYTES(b);
1114}
1115WORD tftp::tftpERROR::Code()
1116{
1117 return REVERSEBYTES(code);
1118}
1119void tftp::tftpERROR::SetCode(WORD c)
1120{
1121 code = REVERSEBYTES(c);
1122}
1123
1124
1125CString tftp::errMessage()
1126{
1127CString rv;
1128 if(memchr(data.m_ERROR.data,0,length-(tftpHdrSize-tftpSlackSize)-sizeof(data.m_ERROR.code)))
1129 rv = (LPCTSTR)data.m_ERROR.data;
1130 return rv;
1131}
1132
1133void CXferSocket::Destroy(BOOL success)
1134{
1135 if(m_wndResolver){
1136 delete m_wndResolver;
1137 m_wndResolver=NULL;
1138 }
1139 SetTry();
1140 m_Daddy->m_bnw.StartSound(
1141 success
1142 ? m_Daddy->m_bnwSuccess
1143 : m_Daddy->m_bnwAbort
1144 );
1145 if(m_File.m_hFile!=CFile::hFileNull){
1146 TRY{
1147 m_File.Close();
1148 }CATCH(CFileException,e){
1149 TRACE0("Error closing file\n");
1150 }END_CATCH
1151 }
1152 ASSERT(m_Daddy);
1153 m_Daddy->KillTimer(m_hSocket);
1154 m_Daddy->m_Xfers.RemoveKey(m_hSocket);
1155LV_FINDINFO lvf;
1156 memset(&lvf,0,sizeof(lvf));
1157 lvf.flags=LVFI_PARAM;
1158 lvf.lParam=(LPARAM)this;
1159int i = m_Daddy->m_List.FindItem(&lvf);
1160 if(i>=0)
1161 m_Daddy->m_List.DeleteItem(i);
1162 delete this;
1163}
1164
1165void CPumpKINDlg::LogLineToScreen(LPCTSTR str)
1166{
1167 ASSERT(m_LogLength);
1168 while(m_Log.GetCount()>m_LogLength && m_Log.GetCount()!=LB_ERR){
1169 CTime *t = (CTime*)m_Log.GetItemData(0);
1170 if(((DWORD)t)!=LB_ERR){
1171 ASSERT(t);
1172 m_LogTimes.RemoveKey(t);
1173 delete t;
1174 }
1175 m_Log.DeleteString(0);
1176 }
1177int i = m_Log.AddString(str);
1178 ASSERT(i!=LB_ERR);
1179CTime *t = new CTime(CTime::GetCurrentTime());
1180 m_Log.SetItemData(i,(DWORD)(m_LogTimes[t]=t));
1181 m_Log.SetCurSel(i);
1182}
1183
1184void CPumpKINDlg::LogLine(UINT msgID)
1185{
1186CString tmp;
1187 tmp.Format(msgID);
1188 LogLine(tmp);
1189}
1190
1191void CXferSocket::TurnSlashes(CString& fn,BOOL bBack)
1192{
1193 ints = fn.Find(bBack?'/':'\\');
1194 while(s>=0){
1195 fn.SetAt(s,bBack?'\\':'/');
1196 s = fn.Find(bBack?'/':'\\');
1197 }
1198}
1199
1200CString CXferSocket::ApplyRoot(LPCTSTR fileName)
1201{
1202 ASSERT(m_Daddy);
1203CString fn = fileName;
1204CString rv = m_Daddy->m_TFTPRoot;
1205 if(rv.IsEmpty())
1206 rv = ".";
1207 if(rv[rv.GetLength()-1]!='\\')
1208 rv+="\\";
1209 while((!fn.IsEmpty()) && fn[0]=='\\')
1210 fn=fn.Mid(1);
1211 rv+=fn;
1212 return rv;
1213}
1214
1215void CPumpKINDlg::OnOptions()
1216{
1217CPropertySheet cps(IDS_TITLE_OPTIONS,this);
1218CPropsServer server;
1219CPropsNetwork network;
1220CPropsSounds sounds;
1221CPropsACL acl;
1222
1223 server.m_RRQMode=m_RRQMode;
1224 server.m_TFTPRoot=m_TFTPRoot;
1225 server.m_TFTPSubdirs=m_bTFTPSubdirs;
1226 server.m_WRQMode=m_WRQMode;
1227 server.m_PromptTimeOut=m_PromptTimeOut;
1228 server.m_LogFile=m_LogFile;
1229
1230 network.m_ListenPort=m_ListenPort;
1231 network.m_ListenAddress=m_ListenAddress;
1232 network.m_SpeakPort=m_SpeakPort;
1233 network.m_TimeOut=m_TFTPTimeOut.GetTotalSeconds();
1234 network.m_BlockSize=m_BlockSize;
1235
1236 sounds.m_Request = m_bnwRequest;
1237 sounds.m_Success = m_bnwSuccess;
1238 sounds.m_Abort = m_bnwAbort;
1239
1240 acl.m_rulist = m_aclRules;
1241
1242 cps.AddPage(&server);
1243 cps.AddPage(&network);
1244 cps.AddPage(&sounds);
1245 cps.AddPage(&acl);
1246 if(cps.DoModal()==IDOK){
1247 m_RRQMode=server.m_RRQMode;
1248 m_TFTPRoot=server.m_TFTPRoot;
1249 m_bTFTPSubdirs=server.m_TFTPSubdirs;
1250 m_WRQMode=server.m_WRQMode;
1251 m_PromptTimeOut=server.m_PromptTimeOut;
1252 m_LogFile=server.m_LogFile;
1253
1254 m_ListenPort=network.m_ListenPort;
1255 m_ListenAddress=network.m_ListenAddress;
1256 m_SpeakPort=network.m_SpeakPort;
1257 m_TFTPTimeOut=CTimeSpan(network.m_TimeOut);
1258 m_BlockSize=network.m_BlockSize;
1259
1260 m_bnwRequest = sounds.m_Request;
1261 m_bnwSuccess = sounds.m_Success;
1262 m_bnwAbort = sounds.m_Abort;
1263
1264 m_aclRules = acl.m_rulist;
1265
1266 m_lastlogerr.Empty();
1267 }
1268}
1269
1270BOOL CRRQSocket::ConfirmRequest()
1271{
1272CConfirmRRQDlg cd(NULL);
1273 cd.m_Daddy=this;
1274 cd.m_File=m_FileName;
1275 cd.m_Host=inet_ntoa(m_Peer.sin_addr);
1276 if(cd.DoModal()==IDOK)
1277 return TRUE;
1278 return FALSE;
1279}
1280
1281CWRQSocket::CWRQSocket(CPumpKINDlg* daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin)
1282 : CXferSocket(daddy,fileName,type,sin)
1283{
1284 state=stateNone;
1285 m_ACK=0;
1286 m_LastSlack=0;
1287 m_bResume=FALSE;
1288}
1289
1290BOOL CWRQSocket::Create(LPCTSTR localFile,LPCTSTR hostName)
1291{
1292 if(!CAsyncSocket::Create(0,SOCK_DGRAM))
1293 return FALSE;
1294 ASSERT(m_Daddy);
1295 ASSERT(m_Peer.sin_addr.s_addr!=INADDR_NONE || hostName);
1296 m_Daddy->m_Xfers[m_hSocket]=this;
1297 UpdateList();
1298CString lf;
1299 if(!localFile) {
1300 lf = m_FileName;
1301 TurnSlashes(lf,TRUE);
1302 }
1303CString fn = localFile?ApplyRootGently(localFile):ApplyRoot(lf);
1304 if(!localFile){// This is an incoming request..
1305 if(CheckBadRelativeness(m_FileName)){
1306 Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS);
1307 return TRUE;
1308 }
1309 BOOL exists;
1310 if(!_access((LPCTSTR)fn,0))
1311 m_Rename=exists=TRUE;
1312 else
1313 m_Rename=exists=FALSE;
1314 int atar=m_Daddy->m_aclRules.FindTarget(acl_rule::opWRQ,m_Peer.sin_addr.s_addr);
1315 if(atar<0)
1316 atar=m_Daddy->m_WRQMode;
1317 switch(atar){
1318 case CPumpKINDlg::wrqTakeAll:
1319 if(exists){
1320 if(!RenameFile(fn)){
1321 Deny(tftp::errDiskFull,IDS_TFTP_ERROR_FAILEDTORENAME);
1322 return TRUE;
1323 }
1324 }
1325 break;
1326 case CPumpKINDlg::wrqConfirmIfExists:
1327 if(!exists)
1328 break;
1329 case CPumpKINDlg::wrqAlwaysConfirm:
1330 if(exists)
1331 m_bResume=TRUE;
1332 if(ConfirmRequest()){
1333 if(m_Rename){
1334 RenameFile(fn);
1335 if(SaveAs(fn))
1336 break;
1337 }else
1338 break;
1339 }
1340 default:
1341 TRACE1("Unexpected access target: %d\n",atar);
1342 case CPumpKINDlg::wrqDenyAll:
1343 Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS);
1344 return TRUE;
1345 }
1346 }
1347CFileException e;
1348 if(!m_File.Open(
1349 fn,
1350 m_bResume
1351 ?(CFile::modeWrite|CFile::shareDenyWrite)
1352 :(CFile::modeCreate|CFile::modeWrite|CFile::shareDenyWrite),
1353 &e
1354 )){
1355 if(localFile){// Outgoing request
1356 CString tmp;
1357 tmp.Format(IDS_LOG_FAILEDTOOPEN,fn);
1358 m_Daddy->LogLine(tmp);
1359 return FALSE;
1360 }else{
1361 Deny(&e);
1362 return TRUE;
1363 }
1364 }
1365 if(hostName){
1366 m_HostName=hostName;
1367
1368 CString tmp;
1369 tmp.Format(IDS_LOG_REQUESTING,m_FileName,m_HostName);
1370 m_Daddy->LogLine(tmp);
1371
1372 CString inAddr = hostName;
1373 int at = inAddr.Find('@');
1374 if(at>=0)
1375 inAddr=inAddr.Mid(at+1);
1376 if((m_Peer.sin_addr.s_addr=inet_addr((LPCTSTR)inAddr))==INADDR_NONE){
1377 ASSERT(!m_wndResolver);
1378 m_wndResolver = new CResolver(this);
1379 ASSERT(m_wndResolver);
1380 return m_wndResolver->Resolve();
1381 }else{
1382 OnHostKnown();
1383 return TRUE;
1384 }
1385 }
1386CString v;
1387tftp::tftpOptions oack;
1388 if(m_Options.Lookup(tftpoTSize,v)){
1389 m_xferSize=atol(v);
1390 if(!m_xferSize){
1391 Deny(tftp::errOption,IDS_TFTP_ERROR_TSIZE);
1392 return TRUE;
1393 }
1394 }
1395 if(m_Options.Lookup(tftpoBSize,v)){
1396 m_blkSize=atoi(v);
1397 if(!m_blkSize){// *** Do more about sanity check
1398 Deny(tftp::errOption,IDS_TFTP_ERROR_BSIZE);
1399 return TRUE;
1400 }
1401 v.Format("%u",m_blkSize);
1402 oack[tftpoBSize]=v;
1403 }
1404 if(m_Options.Lookup(tftpoTOut,v)){
1405 m_timeOut=atoi(v);
1406 if(!m_timeOut){// *** Do more about sanity check
1407 Deny(tftp::errOption,IDS_TFTP_ERROR_TOUT);
1408 return TRUE;
1409 }
1410 v.Format("%u",m_timeOut);
1411 oack[tftpoTOut]=v;
1412 }
1413 if(m_Options.Lookup(tftpoXResume,v) && m_bResume){
1414 m_ACK=m_File.GetLength()/m_blkSize;
1415 v.Format("%u",m_ACK);
1416 oack[tftpoXResume]=v;
1417 }else
1418 m_ACK=0;
1419 // XXX: see if we can negotiate the right block size somehow
1420 if(m_xferSize>=0 && m_xferSize>=(m_blkSize<<16)) {
1421 Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG);
1422 return TRUE;
1423 }
1424 state=stateXfer;
1425 if(oack.GetCount()){
1426 tftp *p = tftp::Allocate(tftp::tftpOACK::tftpSize(&oack));
1427 ASSERT(p);
1428 p->SetOpcode(tftp::opOACK);
1429 p->data.m_OACK.Set(&oack);
1430 PostTFTP(p,TRUE);
1431 }else
1432 DoXfer();
1433 return TRUE;
1434}
1435
1436BOOL CWRQSocket::ConfirmRequest()
1437{
1438CConfirmWRQDlg cd(NULL);
1439 cd.m_Daddy=this;
1440 cd.m_File=m_FileName;
1441 cd.m_Host=inet_ntoa(m_Peer.sin_addr);
1442 switch(cd.DoModal()){
1443 case IDOK:
1444 m_Rename=FALSE;
1445 m_bResume=FALSE;
1446 return TRUE;
1447 case IDC_RENAME:
1448 m_bResume=FALSE;
1449 m_Rename=TRUE;
1450 return TRUE;
1451 case IDC_RESUME:
1452 m_Rename=FALSE;
1453 m_bResume=TRUE;
1454 return TRUE;
1455 case IDCANCEL:
1456 return FALSE;
1457 }
1458 return FALSE;
1459}
1460
1461BOOL CWRQSocket::RenameFile(CString& fn)
1462{
1463CString renamed = fn;
1464 if(fn.IsEmpty())
1465 return FALSE;
1466 if(fn[fn.GetLength()-1]==')'){
1467 int op = fn.ReverseFind('(');
1468 if(op>0 && fn[op-1]==' '){
1469 if(fn.Mid(op+1,fn.GetLength()-op-2).SpanExcluding("0123456789").IsEmpty())
1470 renamed = renamed.Left(op-1);
1471 }
1472 }
1473CString testFN;
1474 for(UINT tmp=0;tmp<32768;tmp++){
1475 testFN.Format("%s (%u)",(LPCTSTR)renamed,tmp);
1476 if(!_access((LPCTSTR)testFN,0))
1477 continue;
1478 fn=testFN;
1479 return TRUE;
1480 }
1481 return FALSE;
1482}
1483
1484BOOL CWRQSocket::SaveAs(CString& fn)
1485{
1486CFileDialog cfd(FALSE,NULL,fn,OFN_EXPLORER|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,NULL,m_Daddy);
1487CString title;
1488 title.LoadString(IDS_RENAME_TITLE);
1489 cfd.m_ofn.lpstrTitle=(LPCTSTR)title;
1490 if(cfd.DoModal()!=IDOK)
1491 return FALSE;
1492 fn = cfd.GetPathName();
1493 return TRUE;
1494}
1495
1496void CWRQSocket::DoXfer()
1497{
1498tftp *p = tftp::Allocate(tftp::tftpACK::tftpSize());
1499 ASSERT(p);
1500 p->SetOpcode(tftp::opACK);
1501 p->data.m_ACK.SetBlock(m_ACK);
1502 TRACE1("WRQ-ACK-%u\n",m_ACK);
1503 PostTFTP(p,TRUE);// *** ??? Hope this is right
1504}
1505
1506UINT tftp::tftpACK::tftpSize()
1507{
1508 return tftpHdrSize-tftpSlackSize+sizeof(tftp::tftpACK);
1509}
1510
1511ULONG CWRQSocket::GetACK()
1512{
1513 return (m_ACK*m_blkSize)-m_LastSlack;
1514}
1515
1516void CXferSocket::ResetTimeout()
1517{
1518 ASSERT(m_Daddy);
1519 m_Daddy->m_Retrier->KillTimer(m_hSocket);
1520 if(m_Retry)
1521 m_Daddy->m_Retrier->SetTimer(m_hSocket,min(60,m_Daddy->m_RetryTimeOut.GetTotalSeconds())*1000,NULL);
1522 if(!m_bRetry){
1523 m_Daddy->KillTimer(m_hSocket);
1524 m_Daddy->SetTimer(m_hSocket,min(60,m_timeOut)*1000,NULL);
1525 }
1526}
1527
1528void CXferSocket::Abort()
1529{
1530 ASSERT(m_Daddy);
1531CString tmp;
1532 tmp.Format(IDS_LOG_XFERABORTED,(LPCTSTR)m_FileName);
1533 m_Daddy->LogLine(tmp);
1534 Destroy(FALSE);
1535}
1536
1537void CPumpKINDlg::OnTimer(UINT nIDEvent)
1538{
1539CXferSocket *socket;
1540 if(m_Xfers.Lookup(nIDEvent,socket)){
1541 CString tmp;
1542 tmp.Format(IDS_LOG_TIMEDOUT,socket->m_FileName);
1543 LogLine(tmp);
1544 socket->Abort();
1545 }else{
1546 TRACE0("Failed to find timed out socket!\n");
1547 }
1548 CDialog::OnTimer(nIDEvent);
1549}
1550
1551void CPumpKINDlg::OnExit()
1552{
1553 if(!m_Xfers.IsEmpty()){
1554 CString title,text;
1555 title.LoadString(IDS_CONFIRMEXIT_TITLE);
1556 text.LoadString(IDS_CONFIRMEXIT_TEXT);
1557 if(MessageBox(text,title,MB_ICONQUESTION|MB_YESNO)!=IDYES)
1558 return;
1559 }
1560 m_bExiting=TRUE;
1561 EndDialog(IDOK);
1562}
1563
1564void CPumpKINDlg::OnPut()
1565{
1566CRequestDlg crd(NULL);
1567 crd.m_Put=TRUE;
1568 crd.m_BSize=m_BlockSize;
1569 if(crd.DoModal()==IDOK){
1570 CRRQSocket *socket = new CRRQSocket(this,crd.m_RemoteFile,crd.m_Type,NULL);
1571 if(crd.m_BSize)
1572 socket->m__blkSize=crd.m_BSize;
1573 if(!socket->Create(crd.m_LocalFile,crd.m_Host))
1574 socket->Destroy();
1575 }
1576}
1577
1578void CPumpKINDlg::OnGet()
1579{
1580CRequestDlg crd(NULL);
1581 crd.m_Put=FALSE;
1582 crd.m_BSize=m_BlockSize;
1583 if(crd.DoModal()==IDOK){
1584 CWRQSocket *socket = new CWRQSocket(this,crd.m_RemoteFile,crd.m_Type,NULL);
1585 if(crd.m_BSize)
1586 socket->m__blkSize=crd.m_BSize;
1587 if(!socket->Create(crd.m_LocalFile,crd.m_Host))
1588 socket->Destroy();
1589 }
1590}
1591
1592void CPumpKINDlg::SetupButtons()
1593{
1594 m_AbortCtl.EnableWindow(m_List.GetSelectedCount()>0);
1595}
1596
1597void CPumpKINDlg::OnDeleteallitemsConnections(NMHDR* pNMHDR, LRESULT* pResult)
1598{
1599 NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
1600 SetupButtons();
1601 *pResult = 0;
1602}
1603
1604void CPumpKINDlg::OnDeleteitemConnections(NMHDR* pNMHDR, LRESULT* pResult)
1605{
1606 NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
1607 SetupButtons();
1608 *pResult = 0;
1609}
1610
1611void CPumpKINDlg::OnInsertitemConnections(NMHDR* pNMHDR, LRESULT* pResult)
1612{
1613 NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
1614 SetupButtons();
1615 *pResult = 0;
1616}
1617
1618void CPumpKINDlg::OnItemchangedConnections(NMHDR* pNMHDR, LRESULT* pResult)
1619{
1620 NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
1621 SetupButtons();
1622 *pResult = 0;
1623}
1624
1625void CPumpKINDlg::OnAbort()
1626{
1627 if(!m_List.GetSelectedCount())
1628 return;
1629 intitems = m_List.GetItemCount();
1630 for(int tmp=0;tmp<items;tmp++){
1631 if(!(m_List.GetItemState(tmp,LVIS_SELECTED)&LVIS_SELECTED))
1632 continue;
1633 CXferSocket *xfer = (CXferSocket*) m_List.GetItemData(tmp);
1634 ASSERT(xfer);
1635 xfer->Abort();
1636 }
1637}
1638
1639void CXferSocket::OnFailedToResolve()
1640{
1641 TRACE0("Resolve failed\n");
1642 delete m_wndResolver;
1643 m_wndResolver=NULL;
1644 ASSERT(m_Daddy);
1645CString tmp;
1646 tmp.Format(IDS_LOG_RESOLVEFAILED,m_HostName);
1647 m_Daddy->LogLine(tmp);
1648 Abort();
1649}
1650
1651void CXferSocket::OnResolved()
1652{
1653 delete m_wndResolver;
1654 m_wndResolver=NULL;
1655 TRACE0("Resolved\n");
1656 m_Peer.sin_addr.s_addr = *(DWORD*)(((hostent*)m_ResolveBuff)->h_addr);
1657}
1658
1659void CRRQSocket::OnResolved()
1660{
1661 CXferSocket::OnResolved();
1662 OnHostKnown();
1663}
1664
1665void CRRQSocket::OnHostKnown()
1666{
1667 ASSERT(m_Daddy);
1668 m_Peer.sin_port=htons(m_Daddy->m_SpeakPort);
1669tftp::tftpOptions o;
1670CString v;
1671 ASSERT(m_xferSize>=0);
1672 v.Format("%lu",m_xferSize);
1673 o[tftpoTSize] = v;
1674 ASSERT(m__blkSize);
1675 v.Format("%u",m__blkSize);
1676 o[tftpoBSize] = v;
1677 ASSERT(m__timeOut);
1678 v.Format("%u",m__timeOut);
1679 o[tftpoTOut] = v;
1680 o[tftpoXResume] = "0";
1681 tftp*p = tftp::Allocate(tftp::tftpWRQ::tftpSize(m_FileName,m_Type,&o));
1682 ASSERT(p);
1683 p->SetOpcode(tftp::opWRQ);
1684 p->data.m_WRQ.Set(m_FileName,m_Type,&o);
1685 PostTFTP(p,TRUE);
1686 state=stateInit;
1687 UpdateList();
1688}
1689
1690UINT tftp::tftpRQ::tftpSize(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops)
1691{
1692UINT rv = tftpHdrSize-tftpSlackSize+strlen(file)+1+strlen(type)+1;
1693 if(ops){
1694 tftpOptions& o = *ops;
1695 POSITION p = o.GetStartPosition();
1696 while(p){
1697 CString n,v;
1698 o.GetNextAssoc(p,n,v);
1699 rv+=n.GetLength()+1+v.GetLength()+1;
1700 }
1701 }
1702 return rv;
1703}
1704UINT tftp::tftpRRQ::tftpSize(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops)
1705{
1706 return tftp::tftpRQ::tftpSize(file,type,ops);
1707}
1708UINT tftp::tftpWRQ::tftpSize(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops)
1709{
1710 return tftp::tftpRQ::tftpSize(file,type,ops);
1711}
1712UINT tftp::tftpOACK::tftpSize(tftp::tftpOptions* ops)
1713{
1714UINT rv = tftpHdrSize-tftpSlackSize;
1715 if(ops){
1716 tftpOptions& o = *ops;
1717 POSITION p = o.GetStartPosition();
1718 while(p){
1719 CString n,v;
1720 o.GetNextAssoc(p,n,v);
1721 rv+=n.GetLength()+1+v.GetLength()+1;
1722 }
1723 }
1724 return rv;
1725}
1726void tftp::tftpRQ::Set(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops)
1727{
1728 // MAY BE DANGEROUS!
1729UINT ptr = 0;
1730 strcpy((LPTSTR)&data[ptr],file); ptr+=strlen(file)+1;
1731 strcpy((LPTSTR)&data[ptr],type); ptr+=strlen(type)+1;
1732 if(ops){
1733 tftpOptions& o = *ops;
1734 POSITION p = o.GetStartPosition();
1735 while(p){
1736 CString n,v;
1737 o.GetNextAssoc(p,n,v);
1738 strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1;
1739 strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1;
1740 }
1741 }
1742}
1743void tftp::tftpRRQ::Set(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops)
1744{
1745 // MAY BE DANGEROUS!
1746UINT ptr = 0;
1747 strcpy((LPTSTR)&data[ptr],file); ptr+=strlen(file)+1;
1748 strcpy((LPTSTR)&data[ptr],type); ptr+=strlen(type)+1;
1749 if(ops){
1750 tftpOptions& o = *ops;
1751 POSITION p = o.GetStartPosition();
1752 while(p){
1753 CString n,v;
1754 o.GetNextAssoc(p,n,v);
1755 strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1;
1756 strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1;
1757 }
1758 }
1759}
1760void tftp::tftpWRQ::Set(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops)
1761{
1762 // MAY BE DANGEROUS!
1763UINT ptr = 0;
1764 strcpy((LPTSTR)&data[ptr],file); ptr+=strlen(file)+1;
1765 strcpy((LPTSTR)&data[ptr],type); ptr+=strlen(type)+1;
1766 if(ops){
1767 tftpOptions& o = *ops;
1768 POSITION p = o.GetStartPosition();
1769 while(p){
1770 CString n,v;
1771 o.GetNextAssoc(p,n,v);
1772 strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1;
1773 strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1;
1774 }
1775 }
1776}
1777void tftp::tftpOACK::Set(tftpOptions* ops)
1778{
1779 ASSERT(ops);
1780UINT ptr = 0;
1781tftpOptions& o = *ops;
1782POSITION p = o.GetStartPosition();
1783 while(p){
1784 CString n,v;
1785 o.GetNextAssoc(p,n,v);
1786 strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1;
1787 strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1;
1788 }
1789}
1790
1791void CWRQSocket::OnResolved()
1792{
1793 CXferSocket::OnResolved();
1794 OnHostKnown();
1795}
1796
1797void CWRQSocket::OnHostKnown()
1798{
1799 ASSERT(m_Daddy);
1800 m_Peer.sin_port=htons(m_Daddy->m_SpeakPort);
1801tftp::tftpOptions o;
1802CString v;
1803 o[tftpoTSize]="0";
1804 if(m__blkSize){
1805 v.Format("%u",m__blkSize);
1806 o[tftpoBSize]=v;
1807 }
1808 if(m__timeOut){
1809 v.Format("%u",m__timeOut);
1810 o[tftpoTOut]=v;
1811 }
1812 tftp*p = tftp::Allocate(tftp::tftpRRQ::tftpSize(m_FileName,m_Type,&o));
1813 ASSERT(p);
1814 p->SetOpcode(tftp::opRRQ);
1815 p->data.m_RRQ.Set(m_FileName,m_Type,&o);
1816 PostTFTP(p,TRUE);
1817 state=stateInit;
1818 UpdateList();
1819}
1820
1821void CPumpKINDlg::OnClose()
1822{
1823 OnTrayShowpumpkinwindow();
1824}
1825
1826void CPumpKINDlg::OnTrayShowpumpkinwindow()
1827{
1828 if(IsWindowVisible()){
1829 m_bShown=FALSE;
1830 ShowWindow(SW_HIDE);
1831 }else{
1832 m_bShown=TRUE;
1833 ShowWindow(SW_SHOW);
1834 SetForegroundWindow();
1835 SetFocus();
1836 }
1837}
1838
1839void CPumpKINDlg::OnTrayExit()
1840{
1841 OnExit();
1842}
1843
1844void CPumpKINDlg::OnTrayAboutpumpkin()
1845{
1846CAboutDlg dlgAbout;
1847 dlgAbout.DoModal();
1848}
1849
1850void CPumpKINDlg::OnTrayFetchfile()
1851{
1852 OnGet();
1853}
1854
1855void CPumpKINDlg::OnTrayHelp()
1856{
1857 OnHelp();
1858}
1859
1860void CPumpKINDlg::OnTrayOptions()
1861{
1862 OnOptions();
1863}
1864
1865void CPumpKINDlg::OnTraySendfile()
1866{
1867 OnPut();
1868}
1869
1870void CPumpKINDlg::LoadSettings()
1871{
1872CWinApp *app = AfxGetApp();
1873 ASSERT(app);
1874 m_bListen=app->GetProfileInt("TFTPSettings","Listen",m_bListen);
1875 m_bnwRequest=app->GetProfileString("BellsNWhistles","Request",m_bnwRequest);
1876 m_bnwSuccess=app->GetProfileString("BellsNWhistles","Success",m_bnwSuccess);
1877 m_bnwAbort=app->GetProfileString("BellsNWhistles","Abort",m_bnwAbort);
1878 m_bTFTPSubdirs=app->GetProfileInt("TFTPSettings","Subdirs",m_bTFTPSubdirs);
1879 m_ListenPort=app->GetProfileInt("TFTPSettings","ListenPort",m_ListenPort);
1880 m_ListenAddress=app->GetProfileString("TFTPSettings","ListenAddress",m_ListenAddress);
1881 m_LogLength=app->GetProfileInt("UISettings","LogLength",m_LogLength);
1882 m_PromptTimeOut=app->GetProfileInt("UISettings","PromptTimeout",m_PromptTimeOut);
1883 m_RRQMode=app->GetProfileInt("TFTPSettings","RRQMode",m_RRQMode);
1884 m_SpeakPort=app->GetProfileInt("TFTPSettings","SpeakPort",m_SpeakPort);
1885 m_TFTPRoot=app->GetProfileString("TFTPSettings","TFTPRoot",m_TFTPRoot);
1886 m_LogFile=app->GetProfileString("General","LogFile",m_LogFile);
1887 m_TFTPTimeOut=CTimeSpan(app->GetProfileInt("TFTPSettings","TFTPTimeout",m_TFTPTimeOut.GetTotalSeconds()));
1888 m_BlockSize=app->GetProfileInt("TFTPSettings","TFTPBlockSize",m_BlockSize);
1889 m_RetryTimeOut=CTimeSpan(app->GetProfileInt("TFTPSettings","RetryTimeout",m_RetryTimeOut.GetTotalSeconds()));
1890 m_WRQMode=app->GetProfileInt("TFTPSettings","WRQMode",m_WRQMode);
1891 m_bShown=app->GetProfileInt("UISettings","Visble",m_bShown);
1892 if(m_TFTPRoot.IsEmpty()){
1893 DWORD dL = ::GetCurrentDirectory(0,NULL);
1894 VERIFY(::GetCurrentDirectory(dL,m_TFTPRoot.GetBuffer(dL)));
1895 m_TFTPRoot.ReleaseBuffer();
1896 }
1897 ::SetCurrentDirectory(m_TFTPRoot);
1898 m_aclRules.LoadProfile(app);
1899}
1900
1901void CPumpKINDlg::SaveSettings()
1902{
1903CWinApp *app = AfxGetApp();
1904 ASSERT(app);
1905 app->WriteProfileInt("TFTPSettings","Listen",m_bListen);
1906 app->WriteProfileString("BellsNWhistles","Request",m_bnwRequest);
1907 app->WriteProfileString("BellsNWhistles","Success",m_bnwSuccess);
1908 app->WriteProfileString("BellsNWhistles","Abort",m_bnwAbort);
1909 app->WriteProfileInt("TFTPSettings","Subdirs",m_bTFTPSubdirs);
1910 app->WriteProfileInt("TFTPSettings","ListenPort",m_ListenPort);
1911 app->WriteProfileString("TFTPSettings","ListenAddress",m_ListenAddress);
1912 app->WriteProfileInt("UISettings","LogLength",m_LogLength);
1913 app->WriteProfileInt("UISettings","PromptTimeout",m_PromptTimeOut);
1914 app->WriteProfileInt("TFTPSettings","RRQMode",m_RRQMode);
1915 app->WriteProfileInt("TFTPSettings","SpeakPort",m_SpeakPort);
1916 app->WriteProfileString("TFTPSettings","TFTPRoot",m_TFTPRoot);
1917 app->WriteProfileString("General","LogFile",m_LogFile);
1918 app->WriteProfileInt("TFTPSettings","TFTPTimeout",m_TFTPTimeOut.GetTotalSeconds());
1919 app->WriteProfileInt("TFTPSettings","TFTPBlockSize",m_BlockSize);
1920 app->WriteProfileInt("TFTPSettings","RetryTimeout",m_RetryTimeOut.GetTotalSeconds());
1921 app->WriteProfileInt("TFTPSettings","WRQMode",m_WRQMode);
1922 app->WriteProfileInt("UISettings","Visble",m_bShown);
1923 m_aclRules.SaveProfile(app);
1924}
1925
1926void CPumpKINDlg::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
1927{
1928 CDialog::OnWindowPosChanging(lpwndpos);
1929 if(!m_bExiting){
1930 if(m_bShown){
1931 lpwndpos->flags&=~SWP_HIDEWINDOW;
1932 lpwndpos->flags|=SWP_SHOWWINDOW;
1933 }else{
1934 lpwndpos->flags&=~SWP_SHOWWINDOW;
1935 lpwndpos->flags|=SWP_HIDEWINDOW;
1936 if(::GetForegroundWindow()==m_hWnd && (m_Trayer && !m_Trayer->m_inMenu))
1937 GetDesktopWindow()->SetForegroundWindow();
1938 }
1939 }
1940}
1941
1942CString CXferSocket::ApplyRootGently(LPCTSTR fn)
1943{
1944CString f = fn;
1945CString rv = f;
1946 if((!f.IsEmpty()) && f[0]!='\\' && f.Find(":")<0 && f.Find("\\")<0)
1947 rv = ApplyRoot(f);
1948 return rv;
1949}
1950
1951BOOL CXferSocket::CheckBadRelativeness(LPCTSTR file)
1952{
1953CString tmp = file;
1954 if(tmp.IsEmpty())
1955 return FALSE;
1956 if(tmp.Find("..")>=0)
1957 return TRUE;
1958 if(tmp.Find(":")>=0)
1959 return TRUE;
1960 if((!m_Daddy->m_bTFTPSubdirs) && m_FileName.Find('\\')>=0)
1961 return TRUE;
1962 return FALSE;
1963}
1964
1965void CAboutDlg::OnKlevernet()
1966{
1967CString url;
1968 url.LoadString(IDS_KLEVERNET_URL);
1969 ShellExecute(::GetDesktopWindow(),"open",url,NULL,NULL,SW_SHOWMAXIMIZED);
1970}
1971
1972BOOL CPumpKINDlg::PreTranslateMessage(MSG* pMsg)
1973{
1974 // CG: The following block was added by the ToolTips component.
1975 {
1976 // Let the ToolTip process this message.
1977 m_tooltip.RelayEvent(pMsg);
1978
1979 return CDialog::PreTranslateMessage(pMsg);
1980 }
1981}
1982
1983void CPumpKINDlg::OnSelchangeLog()
1984{
1985int sel = m_Log.GetCurSel();
1986 if(sel==LB_ERR){
1987 TRACE0("Error retrieving selection\n");
1988 }else{
1989 CTime *t = (CTime*)m_Log.GetItemData(sel);
1990 ASSERT(t);
1991 m_tooltip.UpdateTipText(t->Format(IDS_LOGTIMEFORMAT),&m_Log);
1992 }
1993}
1994
1995void CPumpKINDlg::OnTrayOpenfilesfolder()
1996{
1997 ShellExecute(::GetDesktopWindow(),NULL,m_TFTPRoot,NULL,NULL,SW_SHOWDEFAULT);
1998}
1999
2000void CPumpKINDlg::OnDropFiles(HDROP hDropInfo)
2001{
2002UINT files = ::DragQueryFile(hDropInfo,0xFFFFFFFF,NULL,0);
2003 ASSERT(files);
2004 for(UINT file=0;file<files;file++){
2005 CString theFile;
2006 UINT fileNameLength = ::DragQueryFile(hDropInfo,file,NULL,0);
2007 ASSERT(fileNameLength);
2008 VERIFY(::DragQueryFile(hDropInfo,file,theFile.GetBuffer(fileNameLength+5),fileNameLength+4)<=fileNameLength);
2009 theFile.ReleaseBuffer();
2010 // Send it over!
2011 CRequestDlg crd(NULL);
2012 crd.m_Drop=TRUE;
2013 crd.m_Put=TRUE;
2014 crd.m_BSize=m_BlockSize;
2015 crd.m_LocalFile=theFile;
2016 if(crd.DoModal()==IDOK){
2017 CRRQSocket *socket = new CRRQSocket(this,crd.m_RemoteFile,crd.m_Type,NULL);
2018 if(crd.m_BSize)
2019 socket->m__blkSize=crd.m_BSize;
2020 if(!socket->Create(crd.m_LocalFile,crd.m_Host))
2021 socket->Destroy();
2022 }
2023 }
2024 ::DragFinish(hDropInfo);
2025}
2026
2027void CPumpKINDlg::OnCancel()
2028{
2029 OnClose();
2030}
2031
2032CPumpKINDlg::~CPumpKINDlg()
2033{
2034 delete m_Trayer;
2035 delete m_Retrier;
2036}
2037
2038void CXferSocket::OnRetry()
2039{
2040 if(!m_Retry){
2041 TRACE("Retrying unretriable..\n");
2042 return;
2043 }
2044 TRACE0("Retrying..\n");
2045 m_bRetry=TRUE;
2046 PostTFTP(tftp::Copy(m_Retry));
2047 m_bRetry=FALSE;
2048}
2049
2050tftp* tftp::Copy(tftp *src)
2051{
2052 ASSERT(src);
2053 ASSERT(src->length);
2054tftp* rv = Allocate(src->length);
2055 ASSERT(rv);
2056 memmove(rv,src,tftpSlackSize+src->length);
2057 return rv;
2058}
2059
2060void CXferSocket::SetTry(tftp *p)
2061{
2062 if(m_Retry)
2063 delete m_Retry;
2064 m_Retry=p?tftp::Copy(p):NULL;
2065}
2066
2067void CPumpKINDlg::OnHelp()
2068{
2069 AfxGetApp()->WinHelp(0,HELP_FINDER);
2070}
2071
2072BOOL CListenSocket::SetListen(BOOL b) {
2073 ASSERT(m_Daddy);
2074 if(b==m_bListen) return TRUE;
2075 if(!b) {
2076 Close(); m_bListen=FALSE;
2077 return TRUE;
2078 }
2079 return m_bListen=Create(m_Daddy->m_ListenPort,SOCK_DGRAM,
2080 FD_READ|FD_WRITE|FD_OOB|FD_ACCEPT|FD_CONNECT|FD_CLOSE,
2081 m_Daddy->m_ListenAddress.IsEmpty()?NULL:(LPCTSTR)m_Daddy->m_ListenAddress);
2082}
2083
2084void CPumpKINDlg::OnListening()
2085{
2086 if(!m_Listener.SetListen(m_ListenCtl.GetCheck()==1)) {
2087 TRACE0("Failed to create socket\n");
2088 AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION);
2089 }
2090 m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0);
2091 m_bListen=m_Listener.m_bListen;
2092}
2093
2094void CPumpKINDlg::OnTrayListen()
2095{
2096 if(!m_Listener.SetListen(!m_Listener.m_bListen)) {
2097 TRACE0("Failed to create socket\n");
2098 AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION);
2099 }
2100 m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0);
2101 m_bListen=m_Listener.m_bListen;
2102}
2103
2104void CPumpKINDlg::LogLine(LPCTSTR str)
2105{
2106 LogLineToScreen(str);
2107 if(!m_LogFile.IsEmpty()) {
2108 if(!Klever::LogRecord((LPCTSTR)m_LogFile,str)) {
2109 if(m_lastlogerr!=m_LogFile) {
2110 CString tmp;
2111 tmp.Format(IDS_LOG_LOGERROR,m_LogFile);
2112 LogLineToScreen(tmp);
2113 m_lastlogerr=m_LogFile;
2114 }
2115 }
2116 }
2117}
2118
2119void CPumpKINDlg::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
2120{
2121 CDialog::OnGetMinMaxInfo(lpMMI);
2122 if(m_MinSize.cx>0 && m_MinSize.cy>0){
2123 lpMMI->ptMinTrackSize.x = m_MinSize.cx;
2124 lpMMI->ptMinTrackSize.y = m_MinSize.cy;
2125 }
2126}
2127
2128void CPumpKINDlg::OnSize(UINT nType, int cx, int cy)
2129{
2130 CDialog::OnSize(nType, cx, cy);
2131 if(nType==SIZE_RESTORED)
2132 RecalcLayout(cx,cy);
2133}
2134
2135void CPumpKINDlg::RecalcLayout(int,int)
2136{
2137 CRect wrc;
2138 GetClientRect(&wrc);
2139 AdjustButton(m_GetCtl,wrc);
2140 AdjustButton(m_PutCtl,wrc);
2141 AdjustButton(m_AbortCtl,wrc);
2142 AdjustButton(m_HelpCtl,wrc);
2143 AdjustButton(m_ExitCtl,wrc);
2144 AdjustButton(m_OptionsCtl,wrc);
2145 CRect brc;
2146 m_List.GetWindowRect(&brc); ScreenToClient(&brc);
2147 m_List.SetWindowPos(
2148 0,
2149 brc.left, brc.top,
2150 wrc.right-m_rightGapList-brc.left, brc.bottom-brc.top,
2151 SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER|SWP_NOCOPYBITS );
2152 m_Log.GetWindowRect(&brc); ScreenToClient(&brc);
2153 m_Log.SetWindowPos(
2154 0,
2155 brc.left, brc.top,
2156 wrc.right-m_rightGapButtons-brc.left, wrc.bottom-m_bottomGapLog-brc.top,
2157 SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER|SWP_NOCOPYBITS );
2158 m_ListenCtl.GetWindowRect(&brc); ScreenToClient(&brc);
2159 m_ListenCtl.SetWindowPos(
2160 0,
2161 wrc.right-brc.Width()-m_rightGapButtons, wrc.bottom-brc.Height()-m_bottomGapListen,
2162 0,0,
2163 SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS );
2164 int i = m_Log.GetCount();
2165 if(i!=LB_ERR)
2166 m_Log.SetCurSel(i-1);
2167}
2168
2169void CPumpKINDlg::AdjustButton(CWnd& w,CRect& wrc)
2170{
2171 CRect brc;
2172 w.GetWindowRect(&brc); ScreenToClient(&brc);
2173 w.SetWindowPos(
2174 0,
2175 wrc.right-brc.Width()-m_rightGapButtons, brc.top,
2176 0, 0,
2177 SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS );
2178}
diff --git a/PumpKINDlg.h b/PumpKINDlg.h
deleted file mode 100755
index 9077292..0000000
--- a/PumpKINDlg.h
+++ b/dev/null
@@ -1,502 +0,0 @@
1// PumpKINDlg.h : header file
2//
3
4 //#define REVERSEBYTES(w)MAKEWORD(HIBYTE(w),LOBYTE(w));
5 #defineREVERSEBYTES(w) (htons((WORD)w))
6 #define tftpoBSize"blksize"
7 #define tftpoTSize"tsize"
8 #define tftpoTOut"timeout"
9
10 #define tftpoXResume"x-resume"
11
12 struct tftp{
13 typedef CMapStringToString tftpOptions;
14 typedef WORD tftpLength;
15 typedef WORD tftpOpcode;
16 tftpLengthlength;
17 tftpOpcode opcode;
18 enum{
19 opRRQ = 1,
20 opWRQ = 2,
21 opDATA = 3,
22 opACK = 4,
23 opERROR = 5,
24 opOACK = 6,
25
26 errUndefined = 0,
27 errNotFound = 1,
28 errAccessViolation = 2,
29 errDiskFull = 3,
30 errIllegalOp = 4,
31 errUnknownTID = 5,
32 errFileExists = 6,
33 errNoUser = 7,
34 errOption = 8
35 };
36 structtftpUNKNOWN {
37 BYTE data[1];
38 };
39 structtftpRQ {
40 BYTE data[1];
41public:
42 void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
43 static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
44 };
45 structtftpRRQ {
46 BYTE data[1];
47public:
48 void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
49 static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
50 };
51 structtftpWRQ {
52 BYTE data[1];
53public:
54 void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
55 static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
56 };
57 structtftpDATA {
58 WORD block;
59 BYTE data[1];
60 public:
61 WORD Block();
62 void SetBlock(WORD b);
63 static UINT tftpSize(UINT blkSize=512);
64 };
65 struct tftpACK {
66 WORD block;
67 public:
68 static UINT tftpSize();
69 void SetBlock(WORD b);
70 WORD Block();
71 };
72 structtftpERROR {
73 typedef WORD tftpErrorCode;
74 tftpErrorCode code;
75 BYTE data[1];
76 public:
77 void SetCode(WORD c);
78 WORD Code();
79 static UINT tftpSize(LPCTSTR msg);
80 };
81 struct tftpOACK {
82 BYTE data[1];
83 public:
84 void Set(tftpOptions* ops);
85 static UINT tftpSize(tftpOptions* ops);
86 };
87 uniontftpPacket {
88 tftpUNKNOWN m_UNKNOWN;
89 tftpRQ m_RQ;
90 tftpRRQ m_RRQ;
91 tftpWRQ m_WRQ;
92 tftpDATA m_DATA;
93 tftpACK m_ACK;
94 tftpERROR m_ERROR;
95 tftpOACK m_OACK;
96 }data;
97
98 void *udpBase(void){ return &opcode; }
99public:
100 static tftp* Copy(tftp *src);
101 CString errMessage();
102 void SetOpcode(WORD op);
103 void errSet(UINT code,LPCTSTR msg);
104 static tftp* Allocate(UINT tftpSize=0);
105 BOOL Send(CAsyncSocket *socket,SOCKADDR_IN* saddr);
106 CString rqType();
107 CString rqFileName();
108 UINT GetOptions(tftpOptions* ops);
109 tftp();
110 UINT Opcode();
111 BOOL Receive(CAsyncSocket* socket,UINT maxLength,SOCKADDR_IN *sin=NULL);
112};
113 #define tftpHdrSize(sizeof(tftp)-sizeof(tftp::tftpPacket))
114 #definetftpSlackSize sizeof(tftp::tftpLength)
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
257class CPumpKINDlg;
258 class CListenSocket : public CAsyncSocket{
259public:
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);
268};
269
270 typedef CList<tftp*,tftp*>CTFTPList;
271class CResolver;
272 class CXferSocket : public CAsyncSocket{
273public:
274 UINT m__timeOut;
275 UINT m__blkSize;
276 tftp::tftpOptions m_Options;
277 LONG m_xferSize;
278 UINT m_timeOut;
279 UINT m_blkSize;
280 BOOL m_bRetry;
281 void SetTry(tftp *p=NULL);
282 tftp* m_Retry;
283 void OnRetry();
284 BOOL CheckBadRelativeness(LPCTSTR file);
285 CString ApplyRootGently(LPCTSTR fn);
286 CString m_HostName;
287 virtual void OnResolved();
288 virtual void OnFailedToResolve();
289 CResolver *m_wndResolver;
290 BYTE m_ResolveBuff[MAXGETHOSTSTRUCT];
291 virtual void Abort();
292 void ResetTimeout();
293 enum{
294 stateNone, stateDeny, stateInit, stateOACK, stateXfer, stateFinish, stateClosing
295 };
296 int state;
297 void Deny(UINT errCode,UINT errID);
298 void Deny(CFileException* e);
299 CString ApplyRoot(LPCTSTR fileName);
300 void TurnSlashes(CString& fn,BOOL bBack=TRUE);
301 virtual void Destroy(BOOL success=TRUE);
302 void PostError(CFileException* e);
303 void PostError(UINT errCode,UINT errID);
304 void PostTFTP(tftp* p,BOOL retryable=FALSE);
305 CXferSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN* sin);
306 CFile m_File;
307 virtual ULONG GetACK();
308 CString m_Type;
309 CString m_FileName;
310 CXferSocket();
311 void UpdateList();
312 void SetPeer(SOCKADDR_IN *sin);
313 virtual BOOL OnTFTP(tftp* p) = 0;
314 virtual void OnReceive(int nErrorCode);
315 void DoSelect(BOOL do_select=FALSE);
316 SOCKADDR_IN m_Peer;
317 virtual void OnSend(int nErrorCode);
318 CPumpKINDlg* m_Daddy;
319 CTFTPList m_Queue;
320
321 DECLARE_DYNAMIC(CXferSocket)
322};
323class CWRQSocket : public CXferSocket {
324public:
325 BOOL m_bResume;
326 void OnHostKnown();
327 virtual void OnResolved();
328 UINT m_LastSlack;
329 ULONG GetACK();
330 void DoXfer();
331 UINT m_ACK;
332 BOOL SaveAs(CString& fn);
333 BOOL RenameFile(CString& fn);
334 BOOL m_Rename;
335 BOOL ConfirmRequest();
336 BOOL Create(LPCTSTR localFile=NULL,LPCTSTR hostName=NULL);
337 CWRQSocket(CPumpKINDlg* daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin);
338 BOOL OnTFTP(tftp* p);
339
340 DECLARE_DYNAMIC(CWRQSocket)
341};
342class CRRQSocket : public CXferSocket {
343public:
344 UINT m_ACKtoClose;
345 void OnHostKnown();
346 virtual void OnResolved();
347 BOOL ConfirmRequest();
348 WORD m_LastSlack;
349 UINT m_ACK;
350 BOOL OnTFTP(tftp* p);
351 ULONG GetACK(void);
352 void DoXfer();
353 CRRQSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin);
354 BOOL Create(LPCTSTR localFile=NULL,LPCTSTR hostName=NULL);
355
356 DECLARE_DYNAMIC(CRRQSocket)
357};
358
359 typedef CMap<SOCKET,SOCKET,CXferSocket*,CXferSocket*>CTIDMap;
360typedef CMap<CTime*,CTime*,CTime*,CTime*> CTimeMap;
361
362/////////////////////////////////////////////////////////////////////////////
363// CPumpKINDlg dialog
364
365class CTrayer;
366class CRetrier;
367class CPumpKINDlg : public CDialog
368{
369// Construction
370public:
371 void AdjustButton(CWnd& w,CRect& wrc);
372 void RecalcLayout(int,int);
373 CSize m_MinSize;
374 UINT m_bottomGapLog;
375 UINT m_bottomGapListen;
376 UINT m_rightGapList;
377 UINT m_rightGapButtons;
378 CString m_lastlogerr;
379 void LogLine(LPCTSTR str);
380 CString m_LogFile;
381 BOOL m_bListen;
382 acl_rules_t m_aclRules;
383 CString m_bnwRequest;
384 CString m_bnwSuccess;
385 CString m_bnwAbort;
386 CBellsNWhistles m_bnw;
387 CTrayer *m_Trayer;
388 CTimeSpan m_RetryTimeOut;
389 virtual ~CPumpKINDlg();
390 CRetrier* m_Retrier;
391 virtual BOOL PreTranslateMessage(MSG* pMsg);
392 BOOL m_bShown;
393 BOOL m_bExiting;
394 void SaveSettings();
395 void LoadSettings();
396 void SetupButtons();
397 BITMAP m_bitmapBack;
398 CBitmap m_bmpBack;
399 UINT m_PromptTimeOut;
400 UINT m_SpeakPort;
401 void LogLine(UINT msgID);
402 CTimeMap m_LogTimes;
403 void LogLineToFile(LPCTSTR str);
404 void LogLineToScreen(LPCTSTR str);
405 int m_LogLength;
406 enum{
407 subitemFile=0, subitemType, subitemPeer, subitemBytes, subitemTSize
408 };
409 int m_iWRQ;
410 int m_iRRQ;
411 CImageList m_Images;
412 CTIDMap m_Xfers;
413 CTimeSpan m_TFTPTimeOut;
414 enum{
415 rrqGiveAll=acl_rule::rrqGrant,
416 rrqAlwaysConfirm=acl_rule::rrqPrompt,
417 rrqDenyAll=acl_rule::rrqDeny,
418 rrqFallback=acl_rule::rrqNone,
419 rrqGrant=rrqGiveAll, rrqDeny=rrqDenyAll, rrqPrompt=rrqAlwaysConfirm
420 };
421 enum{
422 wrqTakeAll=acl_rule::wrqGrant,
423 wrqConfirmIfExists=acl_rule::wrqPromptIfExists,
424 wrqAlwaysConfirm=acl_rule::wrqPrompt,
425 wrqDenyAll=acl_rule::wrqDeny,
426 wrqFallback=acl_rule::wrqNone,
427 wrqGrant=wrqTakeAll,wrqDeny=wrqDenyAll, wrqPrompt=wrqAlwaysConfirm
428 };
429 UINT m_RRQMode;
430 UINT m_WRQMode;
431 BOOL m_bTFTPSubdirs;
432 CString m_TFTPRoot;
433 UINT m_ListenPort;
434 CString m_ListenAddress;
435 UINT m_BlockSize;
436 CListenSocket m_Listener;
437 CPumpKINDlg(CWnd* pParent = NULL);// standard constructor
438
439// Dialog Data
440 //{{AFX_DATA(CPumpKINDlg)
441 enum { IDD = IDD_PUMPKIN_DIALOG };
442 CButtonm_HelpCtl;
443 CButtonm_PutCtl;
444 CButtonm_GetCtl;
445 CButtonm_ExitCtl;
446 CButtonm_ListenCtl;
447 CButtonm_AbortCtl;
448 CButtonm_OptionsCtl;
449 CListBoxm_Log;
450 CListCtrlm_List;
451 //}}AFX_DATA
452
453 // ClassWizard generated virtual function overrides
454 //{{AFX_VIRTUAL(CPumpKINDlg)
455 protected:
456 virtual void DoDataExchange(CDataExchange* pDX);// DDX/DDV support
457 //}}AFX_VIRTUAL
458
459// Implementation
460protected:
461 CToolTipCtrl m_tooltip;
462 HICON m_hIcon;
463
464 // Generated message map functions
465 //{{AFX_MSG(CPumpKINDlg)
466 virtual BOOL OnInitDialog();
467 afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
468 afx_msg void OnDestroy();
469 afx_msg void OnPaint();
470 afx_msg HCURSOR OnQueryDragIcon();
471 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
472 afx_msg void OnOptions();
473 afx_msg void OnTimer(UINT nIDEvent);
474 afx_msg void OnExit();
475 afx_msg void OnPut();
476 afx_msg void OnGet();
477 afx_msg void OnDeleteallitemsConnections(NMHDR* pNMHDR, LRESULT* pResult);
478 afx_msg void OnDeleteitemConnections(NMHDR* pNMHDR, LRESULT* pResult);
479 afx_msg void OnInsertitemConnections(NMHDR* pNMHDR, LRESULT* pResult);
480 afx_msg void OnItemchangedConnections(NMHDR* pNMHDR, LRESULT* pResult);
481 afx_msg void OnAbort();
482 afx_msg void OnClose();
483 afx_msg void OnTrayShowpumpkinwindow();
484 afx_msg void OnTrayListen();
485 afx_msg void OnTrayExit();
486 afx_msg void OnTrayAboutpumpkin();
487 afx_msg void OnTrayFetchfile();
488 afx_msg void OnTrayHelp();
489 afx_msg void OnTrayOptions();
490 afx_msg void OnTraySendfile();
491 afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
492 afx_msg void OnSelchangeLog();
493 afx_msg void OnTrayOpenfilesfolder();
494 afx_msg void OnDropFiles(HDROP hDropInfo);
495 virtual void OnCancel();
496 afx_msg void OnHelp();
497 afx_msg void OnListening();
498 afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
499 afx_msg void OnSize(UINT nType, int cx, int cy);
500 //}}AFX_MSG
501 DECLARE_MESSAGE_MAP()
502};
diff --git a/README.RELEASE b/README.RELEASE
deleted file mode 100644
index fbdfd9c..0000000
--- a/README.RELEASE
+++ b/dev/null
@@ -1,33 +0,0 @@
1
2Before compiling canned install executable the following files should be placed
3in the build tree:
4
5redist/mfc42.dl_
6
7Release checklist:
8 (These are tags stored in KTAGS file. please, keep in sync. Use vim to
9 jump to these tags. I haven't tried it on windows, though).
10
11 |help-news| - Release notes in help file
12
13Version number in the following places:
14
15 |about-version| - About box
16 |vsinfo-numeric-version| - VERSIONINFO numerical File&Prod V
17 |vsinfo-string-version| - VERSIONINFO string File&Prod V
18 |install-version| - Version used in install
19 |install-vsinfo-numeric-version|- install's VERSIONINFO block
20 |install-vsinfo-string-version| - install's VERSIONINFO block
21
22If the year flips check these:
23
24 |about-date| - About box
25 |help-license-date| - license in help file
26 |license-date| - license in COPYING file
27 |vsinfo-date| - Copyright in VERSIONINFO block
28 |install-vsinfo-date| - Copyright in install's VERSIONINFO
29 block
30
31
32This is for vim (don't remove):
33 vim:set tags=KTAGS isk=!-~,^*,^\|,^\" ft=help:
diff --git a/RequestDlg.cpp b/RequestDlg.cpp
deleted file mode 100644
index 94a8a98..0000000
--- a/RequestDlg.cpp
+++ b/dev/null
@@ -1,299 +0,0 @@
1// RequestDlg.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "RequestDlg.h"
7
8#ifdef _DEBUG
9#define new DEBUG_NEW
10#undef THIS_FILE
11static char THIS_FILE[] = __FILE__;
12#endif
13
14/////////////////////////////////////////////////////////////////////////////
15// CRequestDlg dialog
16
17
18CRequestDlg::CRequestDlg(CWnd* pParent /*=NULL*/)
19 : CDialog(CRequestDlg::IDD, pParent)
20{
21 m_Put=TRUE;
22 m_Drop=FALSE;
23 //{{AFX_DATA_INIT(CRequestDlg)
24 m_Host = m_MRUHost;
25 m_LocalFile = _T("");
26 m_RemoteFile = _T("");
27 m_Type = _T("octet");
28 m_strBSize = _T("");
29 //}}AFX_DATA_INIT
30}
31
32
33void CRequestDlg::DoDataExchange(CDataExchange* pDX)
34{
35 CDialog::DoDataExchange(pDX);
36 if(!pDX->m_bSaveAndValidate)
37 m_strBSize.Format("%u",m_BSize);
38 //{{AFX_DATA_MAP(CRequestDlg)
39 DDX_Control(pDX, IDC_REMOTEFILE, m_RemoteFileCtl);
40 DDX_Control(pDX, IDC_LOCALFILE, m_LocalFileCtl);
41 DDX_Control(pDX, IDC_REFRESH, m_RefreshCtl);
42 DDX_Control(pDX, IDOK, m_OKCtl);
43 DDX_Control(pDX, IDC_TALKS, m_TalksCtl);
44 DDX_Control(pDX, IDC_BROWSE, m_BrowseCtl);
45 DDX_CBString(pDX, IDC_TALKS, m_Host);
46 DDX_Text(pDX, IDC_LOCALFILE, m_LocalFile);
47 DDX_Text(pDX, IDC_REMOTEFILE, m_RemoteFile);
48 DDX_CBString(pDX, IDC_TYPE, m_Type);
49 DDX_CBString(pDX, IDC_BSIZE, m_strBSize);
50 //}}AFX_DATA_MAP
51 if(pDX->m_bSaveAndValidate)
52 m_BSize=atoi(m_strBSize);
53}
54
55CString CRequestDlg::m_MRUHost;
56
57BEGIN_MESSAGE_MAP(CRequestDlg, CDialog)
58 //{{AFX_MSG_MAP(CRequestDlg)
59 ON_BN_CLICKED(IDC_REFRESH, OnRefresh)
60 ON_BN_CLICKED(IDC_BROWSE, OnBrowse)
61 ON_EN_CHANGE(IDC_LOCALFILE, OnChangeLocalfile)
62 ON_EN_CHANGE(IDC_REMOTEFILE, OnChangeRemotefile)
63 ON_CBN_EDITCHANGE(IDC_TALKS, OnEditchangeTalks)
64 ON_CBN_SELCHANGE(IDC_TALKS, OnSelchangeTalks)
65 ON_WM_CTLCOLOR()
66 ON_WM_DROPFILES()
67 //}}AFX_MSG_MAP
68END_MESSAGE_MAP()
69
70/////////////////////////////////////////////////////////////////////////////
71// CRequestDlg message handlers
72
73BOOL CRequestDlg::OnInitDialog()
74{
75 CDialog::OnInitDialog();
76
77 m_RefreshCtl.SendMessage(WM_SETFONT,(WPARAM)::GetStockObject(ANSI_FIXED_FONT),0);
78 m_BrowseCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_BROWSE));
79
80CString title;
81 title.LoadString(m_Put?IDS_TITLE_PUTREQUEST:IDS_TITLE_GETREQUEST);
82 SetWindowText(title);
83 UpdateOK();
84 SyncNames();
85 BringWindowToTop();
86 SetForegroundWindow();
87 OnRefresh();
88 if(!m_MRUHost.IsEmpty())
89 m_TalksCtl.SetWindowText(m_MRUHost);
90 else{
91 if(m_TalksCtl.GetCount()==1){
92 CString tmp;
93 m_TalksCtl.GetLBText(0,tmp);
94 m_TalksCtl.SetWindowText(tmp);
95 }
96 }
97
98 // CG: The following block was added by the ToolTips component.
99 {
100 // Create the ToolTip control.
101 m_tooltip.Create(this);
102 m_tooltip.Activate(TRUE);
103
104 m_tooltip.AddTool(&m_BrowseCtl,IDC_BROWSE);
105 m_tooltip.AddTool(&m_RefreshCtl,IDC_REFRESH);
106 }
107
108 if(m_Put)
109 DragAcceptFiles();
110
111 if(m_Drop || !m_Put){
112 m_RemoteFileCtl.SetFocus();
113 return FALSE;
114 }
115
116 return TRUE; // return TRUE unless you set the focus to a control
117 // EXCEPTION: OCX Property Pages should return FALSE
118}
119
120void CRequestDlg::OnRefresh()
121{
122 m_TalksCtl.ResetContent();
123CWnd *wnd = CWnd::FindWindow(NULL,NULL);
124CString wtalkHead,wtalkAt;
125 wtalkHead.LoadString(IDS_WTALKHEADING);wtalkAt.LoadString(IDS_WTALKAT);
126CString otalxHead,otalxAt;
127 otalxHead.LoadString(IDS_OTALXHEADING);otalxAt.LoadString(IDS_OTALXAT);
128 while(wnd){
129 CString text;
130 wnd->GetWindowText(text);
131 int tw = text.Find(wtalkHead);
132 if(tw==0){
133 text=text.Mid(wtalkHead.GetLength());
134 int at = text.Find(wtalkAt);
135 if(at>=0){
136 if(text.GetLength()>(at+wtalkAt.GetLength())){
137 text=text.Left(at)+'@'+text.Mid(at+wtalkAt.GetLength());
138 text.TrimLeft();
139 text.TrimRight();
140 VERIFY(m_TalksCtl.AddString(text)>=0);
141 }
142 }
143 }else{
144 tw = text.Find(otalxHead);
145 if(tw==0){
146 text=text.Mid(otalxHead.GetLength());
147 int at = text.Find(otalxAt);
148 if(at>=0){
149 if(text.GetLength()>(at+otalxAt.GetLength())){
150 text=text.Left(at)+'@'+text.Mid(at+otalxAt.GetLength());
151 text.TrimLeft();
152 text.TrimRight();
153 VERIFY(m_TalksCtl.AddString(text)>=0);
154 }
155 }
156 }
157 }
158 wnd = wnd->GetNextWindow();
159 }
160 UpdateOK();
161}
162
163void CRequestDlg::OnBrowse()
164{
165 UpdateData(TRUE);
166CFileDialog cfd(m_Put,NULL,m_LocalFile.IsEmpty()?NULL:m_LocalFile,OFN_EXPLORER|OFN_HIDEREADONLY|OFN_PATHMUSTEXIST|(m_Put?OFN_FILEMUSTEXIST:OFN_OVERWRITEPROMPT),NULL,this);
167CString title;
168 title.LoadString(IDS_TITLE_BROWSEFILE);
169 cfd.m_ofn.lpstrTitle=(LPCTSTR)title;
170 if(cfd.DoModal()==IDOK){
171 m_LocalFile=cfd.GetPathName();
172 UpdateData(FALSE);
173 SyncNames();
174 UpdateOK();
175 }
176}
177
178void CRequestDlg::SyncNames()
179{
180 if(m_Put){
181 CString tmp;
182 m_LocalFileCtl.GetWindowText(tmp);
183 int s=tmp.ReverseFind('\\');
184 if(s>=0)
185 tmp=tmp.Mid(s+1);
186 else{
187 s = tmp.ReverseFind('/');
188 if(s>=0)
189 tmp=tmp.Mid(s+1);
190 }
191 if(!tmp.IsEmpty())
192 m_RemoteFileCtl.SetWindowText(tmp);
193 }else{
194 CString tmp;
195 m_RemoteFileCtl.GetWindowText(tmp);
196 int s=tmp.ReverseFind('\\');
197 if(s>=0)
198 tmp=tmp.Mid(s+1);
199 else{
200 s = tmp.ReverseFind('/');
201 if(s>=0)
202 tmp=tmp.Mid(s+1);
203 }
204 if(!tmp.IsEmpty())
205 m_LocalFileCtl.SetWindowText(tmp);
206 }
207}
208
209void CRequestDlg::OnChangeLocalfile()
210{
211 if(m_Put)
212 SyncNames();
213 UpdateOK();
214}
215
216void CRequestDlg::OnChangeRemotefile()
217{
218 if(!m_Put)
219 SyncNames();
220 UpdateOK();
221}
222
223void CRequestDlg::UpdateOK()
224{
225CString t;
226 m_LocalFileCtl.GetWindowText(t);
227 if(t.IsEmpty())
228 gotodAble;
229 m_RemoteFileCtl.GetWindowText(t);
230 if(t.IsEmpty())
231 goto dAble;
232 m_TalksCtl.GetWindowText(t);
233 if(t.IsEmpty())
234 goto dAble;
235 m_OKCtl.EnableWindow(TRUE);
236 return;
237dAble:
238 m_OKCtl.EnableWindow(FALSE);
239}
240
241void CRequestDlg::OnEditchangeTalks()
242{
243 UpdateOK();
244}
245
246void CRequestDlg::OnSelchangeTalks()
247{
248 UpdateOK();
249}
250
251HBRUSH CRequestDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
252{
253 HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
254 UpdateOK();
255 return hbr;
256}
257
258BOOL CRequestDlg::PreTranslateMessage(MSG* pMsg)
259{
260 // CG: The following block was added by the ToolTips component.
261 {
262 // Let the ToolTip process this message.
263 if(::IsWindow(m_tooltip.m_hWnd))
264 m_tooltip.RelayEvent(pMsg);
265
266 return CDialog::PreTranslateMessage(pMsg);
267 }
268}
269
270int CRequestDlg::DoModal()
271{
272int rv = CDialog::DoModal();
273 if(rv==IDOK)
274 m_MRUHost=m_Host;
275 return rv;
276}
277
278void CRequestDlg::OnDropFiles(HDROP hDropInfo)
279{
280UINT files = ::DragQueryFile(hDropInfo,0xFFFFFFFF,NULL,0);
281 if(files!=1){
282 CString title,text;
283 title.LoadString(IDS_DROPFILES_TITLE);
284 text.LoadString(IDS_NOMULTIPLEDROP_TEXT);
285 if(MessageBox(text,title,MB_ICONSTOP|MB_OKCANCEL)!=IDOK){
286 ::DragFinish(hDropInfo);
287 return;
288 }
289 }
290 ASSERT(files);
291CString theFile;
292UINT fileNameLength = ::DragQueryFile(hDropInfo,0,NULL,0);
293 ASSERT(fileNameLength);
294 VERIFY(::DragQueryFile(hDropInfo,0,theFile.GetBuffer(fileNameLength+5),fileNameLength+4)<=fileNameLength);
295 theFile.ReleaseBuffer();
296 m_LocalFileCtl.SetWindowText(theFile);
297 SyncNames();
298 ::DragFinish(hDropInfo);
299}
diff --git a/RequestDlg.h b/RequestDlg.h
deleted file mode 100644
index fcd2d20..0000000
--- a/RequestDlg.h
+++ b/dev/null
@@ -1,63 +0,0 @@
1// RequestDlg.h : header file
2//
3
4/////////////////////////////////////////////////////////////////////////////
5// CRequestDlg dialog
6
7class CRequestDlg : public CDialog
8{
9// Construction
10public:
11 UINT m_BSize;
12 static CString m_MRUHost;
13 BOOL m_Drop;
14 virtual BOOL PreTranslateMessage(MSG* pMsg);
15 void UpdateOK();
16 void SyncNames();
17 BOOL m_Put;
18 CRequestDlg(CWnd* pParent = NULL); // standard constructor
19
20// Dialog Data
21 //{{AFX_DATA(CRequestDlg)
22 enum { IDD = IDD_REQUEST };
23 CEditm_RemoteFileCtl;
24 CEditm_LocalFileCtl;
25 CButtonm_RefreshCtl;
26 CButtonm_OKCtl;
27 CComboBoxm_TalksCtl;
28 CButtonm_BrowseCtl;
29 CStringm_Host;
30 CStringm_LocalFile;
31 CStringm_RemoteFile;
32 CStringm_Type;
33 CStringm_strBSize;
34 //}}AFX_DATA
35
36
37// Overrides
38 // ClassWizard generated virtual function overrides
39 //{{AFX_VIRTUAL(CRequestDlg)
40 public:
41 virtual int DoModal();
42 protected:
43 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
44 //}}AFX_VIRTUAL
45
46// Implementation
47protected:
48 CToolTipCtrl m_tooltip;
49
50 // Generated message map functions
51 //{{AFX_MSG(CRequestDlg)
52 virtual BOOL OnInitDialog();
53 afx_msg void OnRefresh();
54 afx_msg void OnBrowse();
55 afx_msg void OnChangeLocalfile();
56 afx_msg void OnChangeRemotefile();
57 afx_msg void OnEditchangeTalks();
58 afx_msg void OnSelchangeTalks();
59 afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
60 afx_msg void OnDropFiles(HDROP hDropInfo);
61 //}}AFX_MSG
62 DECLARE_MESSAGE_MAP()
63};
diff --git a/Resolver.cpp b/Resolver.cpp
deleted file mode 100644
index 0ec66d3..0000000
--- a/Resolver.cpp
+++ b/dev/null
@@ -1,71 +0,0 @@
1// Resolver.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "Resolver.h"
7#include "PumpKINDlg.h"
8
9#ifdef _DEBUG
10#define new DEBUG_NEW
11#undef THIS_FILE
12static char THIS_FILE[] = __FILE__;
13#endif
14
15/////////////////////////////////////////////////////////////////////////////
16// CResolver
17
18CResolver::CResolver()
19{
20 ASSERT(NULL);
21}
22
23CResolver::~CResolver()
24{
25}
26
27
28BEGIN_MESSAGE_MAP(CResolver, CWnd)
29 //{{AFX_MSG_MAP(CResolver)
30 ON_WM_CREATE()
31 ON_MESSAGE(WM_RESOLVED, OnResolved)
32 //}}AFX_MSG_MAP
33END_MESSAGE_MAP()
34
35
36/////////////////////////////////////////////////////////////////////////////
37// CResolver message handlers
38
39CResolver::CResolver(CXferSocket *socket)
40 : socket(socket)
41{
42}
43
44int CResolver::OnCreate(LPCREATESTRUCT lpCreateStruct)
45{
46 if (CWnd::OnCreate(lpCreateStruct) == -1)
47 return -1;
48
49 ASSERT(socket);
50CString hostName = socket->m_HostName;
51int at = hostName.Find('@');
52 if(at>=0)
53 hostName=hostName.Mid(at+1);
54 m_hAsync=WSAAsyncGetHostByName(m_hWnd,WM_RESOLVED,(LPCTSTR)hostName,(char*)socket->m_ResolveBuff,sizeof(socket->m_ResolveBuff));
55 ASSERT(m_hAsync);
56 return 0;
57}
58
59LRESULT CResolver::OnResolved(WPARAM wP,LPARAM lP)
60{
61 if(WSAGETASYNCERROR(lP))
62 socket->OnFailedToResolve();
63 else
64 socket->OnResolved();
65 return 0;
66}
67
68BOOL CResolver::Resolve()
69{
70 return Create(NULL,"PumpKIN-Resolver",WS_CHILD,CRect(0,0,0,0),socket->m_Daddy,0);
71}
diff --git a/Resolver.h b/Resolver.h
deleted file mode 100644
index a97b23e..0000000
--- a/Resolver.h
+++ b/dev/null
@@ -1,42 +0,0 @@
1// Resolver.h : header file
2//
3
4/////////////////////////////////////////////////////////////////////////////
5// CResolver window
6
7class CXferSocket;
8class CResolver : public CWnd
9{
10// Construction
11public:
12 BOOL Resolve();
13 HANDLE m_hAsync;
14 CResolver(CXferSocket *socket);
15 CXferSocket* socket;
16 CResolver();
17
18// Attributes
19public:
20
21// Operations
22public:
23
24// Overrides
25 // ClassWizard generated virtual function overrides
26 //{{AFX_VIRTUAL(CResolver)
27 //}}AFX_VIRTUAL
28
29// Implementation
30public:
31 virtual ~CResolver();
32
33 // Generated message map functions
34protected:
35 //{{AFX_MSG(CResolver)
36 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
37 afx_msg LRESULT OnResolved(WPARAM wP,LPARAM lP);
38 //}}AFX_MSG
39 DECLARE_MESSAGE_MAP()
40};
41
42/////////////////////////////////////////////////////////////////////////////
diff --git a/Retrier.cpp b/Retrier.cpp
deleted file mode 100644
index 15b9fc3..0000000
--- a/Retrier.cpp
+++ b/dev/null
@@ -1,46 +0,0 @@
1// Retrier.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "Retrier.h"
7
8#include "PumpKINDlg.h"
9
10#ifdef _DEBUG
11#define new DEBUG_NEW
12#undef THIS_FILE
13static char THIS_FILE[] = __FILE__;
14#endif
15
16/////////////////////////////////////////////////////////////////////////////
17// CRetrier
18
19CRetrier::CRetrier(CPumpKINDlg *daddy)
20 : m_Daddy(daddy)
21{
22}
23
24CRetrier::~CRetrier()
25{
26}
27
28
29BEGIN_MESSAGE_MAP(CRetrier, CWnd)
30 //{{AFX_MSG_MAP(CRetrier)
31 ON_WM_TIMER()
32 //}}AFX_MSG_MAP
33END_MESSAGE_MAP()
34
35
36/////////////////////////////////////////////////////////////////////////////
37// CRetrier message handlers
38
39void CRetrier::OnTimer(UINT nIDEvent)
40{
41 ASSERT(m_Daddy);
42CXferSocket *socket;
43 if(m_Daddy->m_Xfers.Lookup(nIDEvent,socket))
44 socket->OnRetry();
45 CWnd::OnTimer(nIDEvent);
46}
diff --git a/Retrier.h b/Retrier.h
deleted file mode 100644
index 1a50ce2..0000000
--- a/Retrier.h
+++ b/dev/null
@@ -1,38 +0,0 @@
1// Retrier.h : header file
2//
3
4/////////////////////////////////////////////////////////////////////////////
5// CRetrier window
6
7class CPumpKINDlg;
8class CRetrier : public CWnd
9{
10// Construction
11public:
12 CPumpKINDlg* m_Daddy;
13 CRetrier(CPumpKINDlg *daddy);
14
15// Attributes
16public:
17
18// Operations
19public:
20
21// Overrides
22 // ClassWizard generated virtual function overrides
23 //{{AFX_VIRTUAL(CRetrier)
24 //}}AFX_VIRTUAL
25
26// Implementation
27public:
28 virtual ~CRetrier();
29
30 // Generated message map functions
31protected:
32 //{{AFX_MSG(CRetrier)
33 afx_msg void OnTimer(UINT nIDEvent);
34 //}}AFX_MSG
35 DECLARE_MESSAGE_MAP()
36};
37
38/////////////////////////////////////////////////////////////////////////////
diff --git a/Trayer.cpp b/Trayer.cpp
deleted file mode 100644
index 1e1ab3c..0000000
--- a/Trayer.cpp
+++ b/dev/null
@@ -1,125 +0,0 @@
1// Trayer.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "Trayer.h"
7
8#include "PumpKINDlg.h"
9
10#ifdef _DEBUG
11#define new DEBUG_NEW
12#undef THIS_FILE
13static char THIS_FILE[] = __FILE__;
14#endif
15
16/////////////////////////////////////////////////////////////////////////////
17// CTrayer
18
19CTrayer::CTrayer()
20{
21 m_inMenu=0;
22}
23
24CTrayer::~CTrayer()
25{
26}
27
28
29BEGIN_MESSAGE_MAP(CTrayer, CWnd)
30 //{{AFX_MSG_MAP(CTrayer)
31 ON_MESSAGE(WM_TRAYICON, OnTray)
32 ON_COMMAND(ID_TRAY_ABOUTPUMPKIN, OnTrayAboutpumpkin)
33 ON_COMMAND(ID_TRAY_EXIT, OnTrayExit)
34 ON_COMMAND(ID_TRAY_FETCHFILE, OnTrayFetchfile)
35 ON_COMMAND(ID_TRAY_HELP, OnTrayHelp)
36 ON_COMMAND(ID_TRAY_OPENFILESFOLDER, OnTrayOpenfilesfolder)
37 ON_COMMAND(ID_TRAY_OPTIONS, OnTrayOptions)
38 ON_COMMAND(ID_TRAY_SENDFILE, OnTraySendfile)
39 ON_COMMAND(ID_TRAY_SHOWPUMPKINWINDOW, OnTrayShowpumpkinwindow)
40 ON_COMMAND(ID_TRAY_LISTEN, OnTrayListen)
41 //}}AFX_MSG_MAP
42END_MESSAGE_MAP()
43
44
45/////////////////////////////////////////////////////////////////////////////
46// CTrayer message handlers
47
48CTrayer::CTrayer(CPumpKINDlg* daddy)
49 : m_Daddy(daddy)
50{
51 m_inMenu=0;
52}
53
54LRESULT CTrayer::OnTray(WPARAM wP,LPARAM lP)
55{
56 ASSERT(wP==IDC_TRAYICON);
57 switch(lP){
58 case WM_RBUTTONDOWN:
59 {
60 CMenu menu;
61 VERIFY(menu.LoadMenu(IDM_POPUPS));
62 CMenu *popUp = menu.GetSubMenu(0);
63 ASSERT(popUp);
64 CPoint pt;
65 VERIFY(::GetCursorPos(&pt));
66 m_inMenu++;
67 SetForegroundWindow();
68 popUp->CheckMenuItem(ID_TRAY_SHOWPUMPKINWINDOW,MF_BYCOMMAND|(IsWindowVisible()?MF_CHECKED:MF_UNCHECKED));
69 popUp->CheckMenuItem(ID_TRAY_LISTEN,MF_BYCOMMAND|(m_Daddy->m_Listener.m_bListen?MF_CHECKED:MF_UNCHECKED));
70 popUp->TrackPopupMenu(TPM_RIGHTALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON,pt.x,pt.y,this);
71 m_inMenu--;
72 SendMessage(WM_NULL);
73 }
74 break;
75 case WM_LBUTTONDOWN:
76 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_SHOWPUMPKINWINDOW);
77 break;
78 }
79 return 0;
80}
81
82void CTrayer::OnTrayAboutpumpkin()
83{
84 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_ABOUTPUMPKIN);
85}
86
87void CTrayer::OnTrayExit()
88{
89 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_EXIT);
90}
91
92void CTrayer::OnTrayFetchfile()
93{
94 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_FETCHFILE);
95}
96
97void CTrayer::OnTrayHelp()
98{
99 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_HELP);
100}
101
102void CTrayer::OnTrayOpenfilesfolder()
103{
104 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_OPENFILESFOLDER);
105}
106
107void CTrayer::OnTrayOptions()
108{
109 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_OPTIONS);
110}
111
112void CTrayer::OnTraySendfile()
113{
114 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_SENDFILE);
115}
116
117void CTrayer::OnTrayShowpumpkinwindow()
118{
119 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_SHOWPUMPKINWINDOW);
120}
121
122void CTrayer::OnTrayListen()
123{
124 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_LISTEN);
125}
diff --git a/Trayer.h b/Trayer.h
deleted file mode 100644
index c5a9465..0000000
--- a/Trayer.h
+++ b/dev/null
@@ -1,49 +0,0 @@
1// Trayer.h : header file
2//
3
4/////////////////////////////////////////////////////////////////////////////
5// CTrayer window
6
7class CPumpKINDlg;
8class CTrayer : public CWnd
9{
10// Construction
11public:
12 int m_inMenu;
13 CPumpKINDlg* m_Daddy;
14 CTrayer(CPumpKINDlg* daddy);
15 CTrayer();
16
17// Attributes
18public:
19
20// Operations
21public:
22
23// Overrides
24 // ClassWizard generated virtual function overrides
25 //{{AFX_VIRTUAL(CTrayer)
26 //}}AFX_VIRTUAL
27
28// Implementation
29public:
30 virtual ~CTrayer();
31
32 // Generated message map functions
33protected:
34 //{{AFX_MSG(CTrayer)
35 afx_msg LRESULT OnTray(WPARAM,LPARAM);
36 afx_msg void OnTrayAboutpumpkin();
37 afx_msg void OnTrayExit();
38 afx_msg void OnTrayFetchfile();
39 afx_msg void OnTrayHelp();
40 afx_msg void OnTrayOpenfilesfolder();
41 afx_msg void OnTrayOptions();
42 afx_msg void OnTraySendfile();
43 afx_msg void OnTrayShowpumpkinwindow();
44 afx_msg void OnTrayListen();
45 //}}AFX_MSG
46 DECLARE_MESSAGE_MAP()
47};
48
49/////////////////////////////////////////////////////////////////////////////
diff --git a/biportal/main.c b/biportal/main.c
new file mode 100644
index 0000000..57085d7
--- a/dev/null
+++ b/biportal/main.c
@@ -0,0 +1,46 @@
1#include <stdio.h>
2#include <string.h>
3#include <unistd.h>
4#include <stdlib.h>
5#include <sys/types.h>
6#include <sys/socket.h>
7#include <arpa/inet.h>
8#include <errno.h>
9#include <sys/stat.h>
10
11int main (int argc, const char * argv[]) {
12 if(geteuid()) return fprintf(stderr, "unprivileged\n"), printf("%d",EPERM), 1;
13 if(argc==1) {
14 struct stat st;
15 if(stat(*argv, &st)) return fprintf(stderr, "failed to self-stat\n"), printf("%d",errno), 2;
16 if(st.st_uid!=0 && chown(*argv, 0, 0)) return fprintf(stderr, "failed to self-chown\n"), printf("%d",errno), 3;
17 if((!(st.st_mode&S_ISUID)) && chmod(*argv, S_ISUID|0555)) return fprintf(stderr, "failed to self-chmod\n"), printf("%d",errno), 4;
18 return printf("0"),0;
19 }
20 if(argc==2 && !strcmp(argv[1],"-k")) {
21 pid_t p = fork();
22 if(p<0) return fprintf(stderr, "failed to fork\n"), printf("%d",errno), 5;
23 if(!p) {
24 if(setuid(0)) return fprintf(stderr,"failed to setuid\n"), printf("%d",errno),8;
25 execl("/bin/launchctl","/bin/launchctl", "remove", "com.apple.tftpd", NULL);
26 exit(errno);
27 }
28 int r, wp;
29 while((wp=waitpid(p,&r,0))<0 && errno==EINTR);
30 if(p!=wp) return fprintf(stderr,"failed to wait for launchctl"), 6;
31 if(!WIFEXITED(r)) return fprintf(stderr,"launchctl failed"), 7;
32 return fprintf(stderr,"launchctl terminated with %d",WEXITSTATUS(r)), r;
33 }
34 if(argc!=4) return fprintf(stderr, "Usage: %s s h p\n",*argv), 10;
35 struct sockaddr_in sin; memset(&sin,0,sizeof(sin));
36 sin.sin_family = AF_INET;
37 sin.sin_addr.s_addr = inet_addr(argv[2]);
38 sin.sin_port = htons(strtol(argv[3],NULL,0));
39 int rc;
40 printf("%d",
41 rc=(bind( (int)strtol(argv[1],NULL,0), (struct sockaddr*)&sin,sizeof(sin) )<0)
42 ? errno : 0);
43 return rc;
44}
45
46
diff --git a/dmg-DS_Store b/dmg-DS_Store
new file mode 100644
index 0000000..c0a6b33
--- a/dev/null
+++ b/dmg-DS_Store
Binary files differ
diff --git a/dmg-background.png b/dmg-background.png
new file mode 100644
index 0000000..165b0f0
--- a/dev/null
+++ b/dmg-background.png
Binary files differ
diff --git a/help/pumpkin.bmp b/help/pumpkin.bmp
deleted file mode 100644
index 9c09c21..0000000
--- a/help/pumpkin.bmp
+++ b/dev/null
Binary files differ
diff --git a/help/pumpkin.cnt b/help/pumpkin.cnt
deleted file mode 100644
index dfe42e5..0000000
--- a/help/pumpkin.cnt
+++ b/dev/null
@@ -1,15 +0,0 @@
1:Base PumpKIN.hlp>Standard
2:Title PumpKIN
31 PumpKIN
42 About PumpKIN=About
52 What's New=News
62 Using PumpKIN=Using
71 PumpKIN Dialogs
82 Confirm Read Request Dialog=ConfirmRRQ
92 Confirm Write Request Dialog=ConfirmWRQ
102 Request Dialog=Request
111 PumpKIN Options
122 Server Options=ServerOptions
132 Network Options=NetworkOptions
142 Sounds Options=SoundsOptions
152 Access Lists=ACL
diff --git a/help/pumpkin.hpj b/help/pumpkin.hpj
deleted file mode 100644
index d4a2efe..0000000
--- a/help/pumpkin.hpj
+++ b/dev/null
@@ -1,19 +0,0 @@
1; This file is maintained by HCW. Do not modify this file directly.
2
3[OPTIONS]
4COMPRESS=12 Hall Zeck
5LCID=0x409 0x0 0x0 ; English (United States)
6REPORT=Yes
7CONTENTS=Using
8TITLE=PumpKIN
9CNT=pumpkin.cnt
10HLP=PUMPKIN.HLP
11
12[FILES]
13pumpkin.rtf
14
15[MAP]
16#include pumpkin.hm
17
18[WINDOWS]
19Standard="",(2,6,732,884),20740,(r14876671),(r12632256),f2
diff --git a/help/pumpkin.rtf b/help/pumpkin.rtf
deleted file mode 100644
index 39fc02a..0000000
--- a/help/pumpkin.rtf
+++ b/dev/null
@@ -1,148 +0,0 @@
1{\rtf1\ansi
2@{\footnote
3THIS FILE WAS AUTOMATICALLY GENERATED FROM XML DOCUMENT.
4DO NOT MODIFY THIS FILE DIRECTLY. EDIT XML DOCUMENT INSTEAD
5}
6{\fonttbl{\f0\froman Times New Roman;}{\f1\fswiss Arial;}{\f3\froman Symbol;}}{\colortbl;
7 \red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;
8 \red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
9 \red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;
10 \red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
11
12\pard\plain\keepn
13#{\footnote About}
14${\footnote About PumpKIN}
15K{\footnote about}
16{ \f1\fs18\b\sb120 About {\b PumpKIN}}
17\par\sa120\sb120\qj \f1\fs18\sb120 {\b PumpKIN} is a program designed to send and receive files over the net while having {\uldb {\b T42}}{\v %!ExecFile("http://kin.klever.net/T42/")} or {\b\cf6 Wintalk} session running using {\i TFTP} ({\uldb {\b RFC1350}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1350.txt")}) protocol. It includes full-functional {\i TFTP} server/client so it may be useful for maintaining {\uldb CISCO}{\v %!ExecFile("http://www.cisco.com/")} routers and other network equipment.
18\par\sa120\sb120\qj \f1\fs18\sb120
19\par\sa120\sb120\qj \f1\fs18\sb120 {\b {\i Enjoy!}}
20{
21\par\pard\plain\sb360\sa120 \f1\fs16 Copyright (c) 1997-2011 {\uldb\cf0 Klever Group (http://www.klever.net/)}{\v %!ExecFile("http://www.klever.net/")}
22\par\qj\sb120\sa120Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
23\par The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
24\par \sa360 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25}
26\page
27
28\pard\plain
29#{\footnote News}
30${\footnote What's New}
31\par\pard\plain\f1\fs24\qc\cf2\b 2.7.2.1 - Apr 27th, 2011
32\par\pard\plain\fi0\li0\f1\fs18 \bullet Fixed a minor bug that lead to misdiagnosis of the packet from unexpected source
33\par\pard\plain\f1\fs24\qc\cf2\b 2.7.2 - October 18th, 2006
34\par\pard\plain\fi0\li0\f1\fs18 \bullet Added rejecting of too large file requests with explicit error message about the block size
35\par\pard\plain\fi0\li0\f1\fs18 \bullet A bit more elaborate logging
36\par\pard\plain\fi0\li0\f1\fs18 \bullet Not closing receive socket until the last ACK receved now
37\par\pard\plain\f1\fs24\qc\cf2\b 2.7.1 - March 13th, 2006
38\par\pard\plain\fi0\li0\f1\fs18 \bullet Bugfix release
39\par\pard\plain\f1\fs24\qc\cf2\b 2.7 - February 28th, 2006
40\par\pard\plain\fi0\li0\f1\fs18 \bullet Access lists based on request IP address and TFTP opcode for automating access policy
41\par\pard\plain\fi0\li0\f1\fs18 \bullet Possibility to start/stop TFTP server, while keeping client functionality intact
42\par\pard\plain\fi0\li0\f1\fs18 \bullet Logging to file
43\par\pard\plain\fi0\li0\f1\fs18 \bullet Resizable main window
44\par\pard\plain\f1\fs24\qc\cf2\b 2.6 - August 6th, 2005
45\par\pard\plain\fi0\li0\f1\fs18 \bullet more robust solution to the backslash/slash dilemma
46\par\pard\plain\fi0\li0\f1\fs18 \bullet A bit more elaborate error reporting
47\par\pard\plain\fi0\li0\f1\fs18 \bullet Fixed uninstall procedure so that it works on XP
48\par\pard\plain\f1\fs24\qc\cf2\b 2.5 - July 11th, 2004
49\par\pard\plain\fi0\li0\f1\fs18 \bullet Change of {\uldb license}{\v About} and opening the source.
50\par\pard\plain\fi0\li0\f1\fs18 \bullet Minor cosmetic changes
51\par\pard\plain\f1\fs24\qc\cf2\b 2.0 - June 13th, 1998
52\par\pard\plain\fi0\li0\f1\fs18 \bullet Sounds customization. Now you can customize {\b PumpKIN} bells and whistles or turn them off completely.
53\par\pard\plain\fi0\li0\f1\fs18 \bullet Previous version of {\b PumpKIN} had a bug causing it to misbehave when you're requesting file from remote {\i tftp} server using {\b IP Address} (as opposed to {\b hostname}).
54\par\pard\plain\fi0\li0\f1\fs18 \bullet Typo causing {\b PumpKIN} to log outgoing request in reverse (i.e. {\i Requesting 'hostname' from 'filename'}) fixed.
55\par\pard\plain\fi0\li0\f1\fs18 \bullet Something else that you may not notice and I can not remember.
56\par\pard\plain\f1\fs24\qc\cf2\b 1.5 - February 12th, 1998
57\par\pard\plain\fi0\li0\f1\fs18 \bullet Transfer resumes. No checking on file contents is done, so it's up to you to decide whether you want to start transmission from the beginning or resume unfinished transfer.
58\par\pard\plain\fi0\li0\f1\fs18 \bullet Support for {\b block size}, {\b trasnfer size} and {\b transfer timeout} options as described in {\uldb {\b RFC1782}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1782.txt")}, {\uldb {\b RFC1783}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1783.txt")} and {\uldb {\b RFC1784}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1784.txt")}. I'm not sure if there are any other {\i TFTP} implementations supporting this, but at least it makes sense if you use {\b PumpKIN} on both ends.
59\par\pard\plain\fi0\li0\f1\fs18 \bullet New Install program
60\page
61
62\pard\plain\keepn
63#{\footnote Using}
64${\footnote Using PumpKIN}
65{ \f1\fs18\b\sb120 Using {\b PumpKIN}}
66\par\sa120\sb120\qj \f1\fs18\sb120 This is a simple program for file exchange between two parties. It allows you to send files over the network to your party while having a {\uldb {\b T42}}{\v %!ExecFile("http://kin.klever.net/T42/")} or {\b\cf6 Wintalk} conversation. It uses open sessions to determine IP address of your party. Also you may use it as a {\i TFTP} client/server by itself. To get/put files from/to {\i TFTP} server you need to enter host name/IP address manually in the {\uldb Request Dialog}{\v Request}.
67\par\sa120\sb120\qj \f1\fs18\sb120 To Abort transfer(s) currently in progress - select transfer(s) you want to terminate in the list and click {\b Abort xfer} button.
68\par\sa120\sb120\qj \f1\fs18\sb120 You may want to hide {\b PumpKIN} window and leave it as a tray icon only. Just click the \{bmct pumpkin.bmp\} icon in the tray or simply close the window.
69\par\sa120\sb120\qj \f1\fs18\sb120 Use {\uldb Options}{\v Options} button to set {\b PumpKIN} options.
70\par\sa120\sb120\qj \f1\fs18\sb120 You can start and stop {\b PumpKIN}'s {\i TFTP} server by checking and unchecking the {\b Server is running} checkbox in the lower right corner of main {\b PumpKIN} window.
71\page
72
73\pard\plain\keepn
74#{\footnote ConfirmRRQ}
75${\footnote Confirm Read Request Dialog}
76{ \f1\fs18\b\sb120 Confirm Read Request Dialog}
77\par\sa120\sb120\qj \f1\fs18\sb120 When the file is requested from your {\i TFTP} server you may choose to {\b Grant Access} to this file or to {\b Deny Access}. If you hesitate to answer for {\uldb {\b Confirmation timeout}}{\v ConfirmationTimeout} ({\i default - 30 seconds}) {\b PumpKIN} defaults to denial of all requests.
78\page
79
80\pard\plain\keepn
81#{\footnote ConfirmWRQ}
82${\footnote Confirm Write Request Dialog}
83{ \f1\fs18\b\sb120 Confirm Write Request Dialog}
84\par\sa120\sb120\qj \f1\fs18\sb120 Whenever your party sends you a file you have always a choice to accept it or not. You can also save the file under a different name by choosing the {\b Rename} option. If you already have file with such name you may chose to {\b resume} transfer. No checking on file contents is done. This option may or may not work depending on remote implementation of protocol. It does work if you use {\b PumpKIN} on both ends. If you are still unsure for {\uldb {\b Confirmation timeout}}{\v ConfirmationTimeOut} ({\i default - 30 seconds}) {\b PumpKIN} will make safe decision for you (deny).
85\page
86
87\pard\plain\keepn
88#{\footnote Request}
89${\footnote Request Dialog}
90{ \f1\fs18\b\sb120 Request Dialog}
91\par\sa120\sb120\qj \f1\fs18\sb120 Request dialog is aimed to let you form read or write request. You may set the following options:\pard
92\par \fi0\li0 \bullet {\b Local File} - You can change the name of the file you're sending (or destination in case you're receiving) right here. You may also use {\b Browse} button to select the file.
93\par \fi0\li0 \bullet {\b Remote File} Specifies the name of file on the remote host you're requesting (in case of read request) or the name of file you want your file to appear as (in case of write request).
94\par \fi0\li0 \bullet {\b Remote Host} is your party's host or {\i TFTP} server you're requesting file from/sending file to. To refresh the list of your talk windows use {\b REFRESH} button.
95\par \fi0\li0 \bullet {\b Type} is the type of transfer as defined in {\uldb {\b RFC1350}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1350.txt")}. Doesn't mean much, really. Defined types are '{\i octet}' or '{\i netascii}'. Default is '{\i octet}'.
96\par \fi0\li0 \bullet {\b Block Size} - Use this block size if remote is {\uldb {\b RFC1783}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1783.txt")}-compliant. If remote doesn't support this option {\b PumpKIN} will fallback to 512 bytes per block.\pard
97\page
98
99\pard\plain\keepn
100#{\footnote Options}
101${\footnote Options}
102{ \f1\fs18\b\sb120 Options}
103\par\sa120\sb120\qj \f1\fs18\sb120 {\b PumpKIN} options property sheet consists of two tabs. For more information see {\uldb {\b Network}}{\v NetworkOptions} and {\b Server} options.
104\page
105
106\pard\plain\keepn
107#{\footnote NetworkOptions}
108${\footnote Network Options}
109{ \f1\fs18\b\sb120 Network Options}\pard
110\par \fi0\li0 \bullet {\b UDP Ports}\pard
111\par \fi0\li0 \bullet {\b Listen for incoming connections on port} - specifies the port we're listening to. The default as defined in {\uldb {\b RFC1350}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1350.txt")} is 69.
112\par \fi0\li0 \bullet {\b ip address} - ip address to listen to.
113\par \fi0\li0 \bullet {\b Send outgoing requests to port} - specifies the port we're going to send all requests to.\pard
114\par \fi0\li0 \bullet {\b Default Connection timeout} - if there's no activity for specified time, transfer is considered to be dead and terminated. {\b PumpKIN} tries to propagate this value to remote as described in {\uldb {\b RFC1782}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1782.txt")} and {\uldb {\b RFC1784}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1784.txt")} if possible.
115\par \fi0\li0 \bullet {\b Default Block Size} - {\b PumpKIN} tries to negotiate block size with remote using this value unless specified explicitly in request. If remote doesn't support {\uldb {\b RFC1782}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1782.txt")} and {\uldb {\b RFC1783}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1783.txt")}{\b PumpKIN} falls back to 512 bytes per block.\pard
116\page
117
118\pard\plain\keepn
119#{\footnote ServerOptions}
120${\footnote Server Options}
121{ \f1\fs18\b\sb120 Server Options}\pard
122\par \fi0\li0 \bullet {\b TFTP Filesystem root} - Specifies the location of files you're transmitting or where to start looking for them from. Defaults to the directory you start {\b PumpKIN} for the first time from.
123\par \fi0\li0 \bullet {\b Allow access to subdirectories} - specifies whether you want allow access to the whole subtree of {\b TFTP Root} or only to the directory itself.
124\par \fi0\li0 \bullet {\b Read Request Behavior} - You may choose to automatically agree to give all files requested, to be prompted to confirm these operations, or to deny all requests as if you're not even here.
125\par \fi0\li0 \bullet {\b Write Request Behavior} - You may chose to {\b take all files} ({\i not recommended}), to {\b prompt only if file exists already}, {\b Always prompt} or {\b Deny all requests}.
126\par \fi0\li0 \bullet {#{\footnote ConfirmationTimeOut}}{\b Confirmation timeout} - this is the time {\b PumpKIN} will wait for you to accept or deny request before it will give up and take default action which is always deny.
127\par \fi0\li0 \bullet {\b Log file} - If you want to enable logging to file, set the destination file here.\pard
128\page
129
130\pard\plain\keepn
131#{\footnote SoundsOptions}
132${\footnote Sounds Options}
133{ \f1\fs18\b\sb120 Sounds}
134\par\sa120\sb120\qj \f1\fs18\sb120 You can customize {\b PumpKIN} sounds notifications here. There are three customizable sounds defined - {\b Incoming request}, which notifies you about incoming request prompt if you're set to be prompted whenever incoming request occurs. {\b xfer Aborted} - which happens to sound every time transfer is interrupted for whatever reason - time out, explicit kill, denied access, etc. {\b xfer Finished} means that your file was successfully transmitted.
135\par\sa120\sb120\qj \f1\fs18\sb120 You can select any {\b .wav} file or one of the predefined sounds from the dropdown list.
136\page
137
138\pard\plain\keepn
139#{\footnote ACL}
140${\footnote Access Lists}
141{ \f1\fs18\b\sb120 Access Lists}
142\par\sa120\sb120\qj \f1\fs18\sb120 You can slightly automate your access policies by setting up read/write request behavior for different incoming requests.
143\par\sa120\sb120\qj \f1\fs18\sb120 The rule consists of {\b request type}, source network ({\b ip} and {\b netmask}) and {\b action} to take (see also {\uldb Server Options}{\v ServerOptions}).
144\par\sa120\sb120\qj \f1\fs18\sb120 When {\b PumpKIN} receives request it goes through the list of rules and bases its decision on the first matching rule. To rearrange order of rules, select the rule you wish to move and use up and down arrows buttons on the right. To remove rule, use the cross button.
145\par\sa120\sb120\qj \f1\fs18\sb120 To add a new rule fill in the information about {\b request type}, source {\b address} and {\b netmask} and desired action. Then click on the 'Add new rule' button.
146\par\sa120\sb120\qj \f1\fs18\sb120 If you wish to amend the rule, select it in the rules list, change parameters below and click the 'Replace rule' button.
147\page
148} \ No newline at end of file
diff --git a/help/pumpkin.xml b/help/pumpkin.xml
deleted file mode 100644
index 486ac82..0000000
--- a/help/pumpkin.xml
+++ b/dev/null
@@ -1,120 +0,0 @@
1<?xml version="1.0"?>
2<winhelp>
3 <topic id="About" title="About PumpKIN" keywords="about">
4 <heading scroll="no">About <kin>PumpKIN</kin></heading>
5 <p><kin>PumpKIN</kin> is a program designed to send and receive files over the net while having <kin href="http://kin.klever.net/T42/">T42</kin> or <product>Wintalk</product> session running using <term>TFTP</term> (<rfc num="1350"/>) protocol. It includes full-functional <term>TFTP</term> server/client so it may be useful for maintaining <a href="http://www.cisco.com/">CISCO</a> routers and other network equipment.</p>
6 <p/>
7 <p><b><i>Enjoy!</i></b></p>
8 <license years="1997-2011"/>
9 <credist/>
10 </topic>
11 <topic id="News" title="What's New">
12 <newsfor version="2.7.3" date="Apr 27th, 2011">
13 <ni>Added configuration option to bind to specific ip address</ni>
14 <ni>Fixed a minor bug that lead to misdiagnosis of the packet from unexpected source</ni>
15 </newsfor>
16 <newsfor version="2.7.2" date="October 18th, 2006">
17 <ni>Added rejecting of too large file requests with explicit error message about the block size</ni>
18 <ni>A bit more elaborate logging</ni>
19 <ni>Not closing receive socket until the last ACK receved now</ni>
20 </newsfor>
21 <newsfor version="2.7.1" date="March 13th, 2006">
22 <ni>Bugfix release</ni>
23 </newsfor>
24 <newsfor version="2.7" date="February 28th, 2006">
25 <ni>Access lists based on request IP address and TFTP opcode for automating access policy</ni>
26 <ni>Possibility to start/stop TFTP server, while keeping client functionality intact</ni>
27 <ni>Logging to file</ni>
28 <ni>Resizable main window</ni>
29 </newsfor>
30 <newsfor version="2.6" date="August 6th, 2005">
31 <ni>more robust solution to the backslash/slash dilemma</ni>
32 <ni>A bit more elaborate error reporting</ni>
33 <ni>Fixed uninstall procedure so that it works on XP</ni>
34 </newsfor>
35 <newsfor version="2.5" date="July 11th, 2004">
36 <ni>Change of <a href="#About">license</a> and opening the source.</ni>
37 <ni>Minor cosmetic changes</ni>
38 </newsfor>
39 <newsfor version="2.0" date="June 13th, 1998">
40 <ni>Sounds customization. Now you can customize <kin>PumpKIN</kin> bells and whistles or turn them off completely.</ni>
41 <ni>Previous version of <kin>PumpKIN</kin> had a bug causing it to misbehave when you're requesting file from remote <term>tftp</term> server using <b>IP Address</b> (as opposed to <b>hostname</b>).</ni>
42 <ni>Typo causing <kin>PumpKIN</kin> to log outgoing request in reverse (i.e. <i>Requesting 'hostname' from 'filename'</i>) fixed.</ni>
43 <ni>Something else that you may not notice and I can not remember.</ni>
44 </newsfor>
45 <newsfor version="1.5" date="February 12th, 1998">
46 <ni>Transfer resumes. No checking on file contents is done, so it's up to you to decide whether you want to start transmission from the beginning or resume unfinished transfer.</ni>
47 <ni>Support for <b>block size</b>, <b>trasnfer size</b> and <b>transfer timeout</b> options as described in <rfc num="1782"/>, <rfc num="1783"/> and <rfc num="1784"/>. I'm not sure if there are any other <term>TFTP</term> implementations supporting this, but at least it makes sense if you use <kin>PumpKIN</kin> on both ends.</ni>
48 <ni>New Install program</ni>
49 </newsfor>
50 </topic>
51 <topic id="Using" title="Using PumpKIN">
52 <heading scroll="no">Using <kin>PumpKIN</kin></heading>
53 <p>This is a simple program for file exchange between two parties. It allows you to send files over the network to your party while having a <kin href="http://kin.klever.net/T42/">T42</kin> or <product>Wintalk</product> conversation. It uses open sessions to determine IP address of your party. Also you may use it as a <term>TFTP</term> client/server by itself. To get/put files from/to <term>TFTP</term> server you need to enter host name/IP address manually in the <a href="#Request">Request Dialog</a>.</p>
54 <p>To Abort transfer(s) currently in progress - select transfer(s) you want to terminate in the list and click <b>Abort xfer</b> button.</p>
55 <p>You may want to hide <kin>PumpKIN</kin> window and leave it as a tray icon only. Just click the <image source="pumpkin.bmp"/> icon in the tray or simply close the window.</p>
56 <p>Use <a href="#Options">Options</a> button to set <kin>PumpKIN</kin> options.</p>
57 <p>You can start and stop <kin>PumpKIN</kin>'s <term>TFTP</term> server by checking and unchecking the <b>Server is running</b> checkbox in the lower right corner of main <kin>PumpKIN</kin> window.</p>
58 </topic>
59 <topic id="ConfirmRRQ" title="Confirm Read Request Dialog">
60 <heading scroll="no">Confirm Read Request Dialog</heading>
61 <p>When the file is requested from your <term>TFTP</term> server you may choose to <b>Grant Access</b> to this file or to <b>Deny Access</b>. If you hesitate to answer for <a href="#ConfirmationTimeout"><b>Confirmation timeout</b></a> (<i>default - 30 seconds</i>) <kin>PumpKIN</kin> defaults to denial of all requests.</p>
62 </topic>
63 <topic id="ConfirmWRQ" title="Confirm Write Request Dialog">
64 <heading scroll="no">Confirm Write Request Dialog</heading>
65 <p>Whenever your party sends you a file you have always a choice to accept it or not. You can also save the file under a different name by choosing the <b>Rename</b> option. If you already have file with such name you may chose to <b>resume</b> transfer. No checking on file contents is done. This option may or may not work depending on remote implementation of protocol. It does work if you use <kin>PumpKIN</kin> on both ends. If you are still unsure for <a href="#ConfirmationTimeOut"><b>Confirmation timeout</b></a> (<i>default - 30 seconds</i>) <kin>PumpKIN</kin> will make safe decision for you (deny).</p>
66 </topic>
67 <topic id="Request" title="Request Dialog">
68 <heading scroll="no">Request Dialog</heading>
69 <p>Request dialog is aimed to let you form read or write request. You may set the following options:</p>
70 <ul>
71 <li><b>Local File</b> - You can change the name of the file you're sending (or destination in case you're receiving) right here. You may also use <b>Browse</b> button to select the file.</li>
72 <li><b>Remote File</b> Specifies the name of file on the remote host you're requesting (in case of read request) or the name of file you want your file to appear as (in case of write request).</li>
73 <li><b>Remote Host</b> is your party's host or <term>TFTP</term> server you're requesting file from/sending file to. To refresh the list of your talk windows use <b>REFRESH</b> button.</li>
74 <li><b>Type</b> is the type of transfer as defined in <rfc num="1350"/>. Doesn't mean much, really. Defined types are '<i>octet</i>' or '<i>netascii</i>'. Default is '<i>octet</i>'.</li>
75 <li><b>Block Size</b> - Use this block size if remote is <rfc num="1783"/>-compliant. If remote doesn't support this option <kin>PumpKIN</kin> will fallback to 512 bytes per block.</li>
76 </ul>
77 </topic>
78 <topic id="Options" title="Options">
79 <heading scroll="no">Options</heading>
80 <p><kin>PumpKIN</kin> options property sheet consists of two tabs. For more information see <a href="#NetworkOptions"><b>Network</b></a> and <a herf="#ServerOptions"><b>Server</b></a> options.</p>
81 </topic>
82 <topic id="NetworkOptions" title="Network Options">
83 <heading scroll="no">Network Options</heading>
84 <ul>
85 <li><b>UDP Ports</b>
86 <ul>
87 <li><b>Listen for incoming connections on port</b> - specifies the port we're listening to. The default as defined in <rfc num="1350"/> is 69.</li>
88 <li><b>ip address</b> - ip address to listen to.</li>
89 <li><b>Send outgoing requests to port</b> - specifies the port we're going to send all requests to.</li>
90 </ul>
91 </li>
92 <li><b>Default Connection timeout</b> - if there's no activity for specified time, transfer is considered to be dead and terminated. <kin>PumpKIN</kin> tries to propagate this value to remote as described in <rfc num="1782"/> and <rfc num="1784"/> if possible.</li>
93 <li><b>Default Block Size</b> - <kin>PumpKIN</kin> tries to negotiate block size with remote using this value unless specified explicitly in request. If remote doesn't support <rfc num="1782"/> and <rfc num="1783"/> <kin>PumpKIN</kin> falls back to 512 bytes per block.</li>
94 </ul>
95 </topic>
96 <topic id="ServerOptions" title="Server Options">
97 <heading scroll="no">Server Options</heading>
98 <ul>
99 <li><b>TFTP Filesystem root</b> - Specifies the location of files you're transmitting or where to start looking for them from. Defaults to the directory you start <kin>PumpKIN</kin> for the first time from.</li>
100 <li><b>Allow access to subdirectories</b> - specifies whether you want allow access to the whole subtree of <b>TFTP Root</b> or only to the directory itself.</li>
101 <li><b>Read Request Behavior</b> - You may choose to automatically agree to give all files requested, to be prompted to confirm these operations, or to deny all requests as if you're not even here.</li>
102 <li><b>Write Request Behavior</b> - You may chose to <b>take all files</b> (<i>not recommended</i>), to <b>prompt only if file exists already</b>, <b>Always prompt</b> or <b>Deny all requests</b>.</li>
103 <li><a name="ConfirmationTimeOut"/><b>Confirmation timeout</b> - this is the time <kin>PumpKIN</kin> will wait for you to accept or deny request before it will give up and take default action which is always deny.</li>
104 <li><b>Log file</b> - If you want to enable logging to file, set the destination file here.</li>
105 </ul>
106 </topic>
107 <topic id="SoundsOptions" title="Sounds Options">
108 <heading scroll="no">Sounds</heading>
109 <p>You can customize <kin>PumpKIN</kin> sounds notifications here. There are three customizable sounds defined - <b>Incoming request</b>, which notifies you about incoming request prompt if you're set to be prompted whenever incoming request occurs. <b>xfer Aborted</b> - which happens to sound every time transfer is interrupted for whatever reason - time out, explicit kill, denied access, etc. <b>xfer Finished</b> means that your file was successfully transmitted.</p>
110 <p>You can select any <b>.wav</b> file or one of the predefined sounds from the dropdown list.</p>
111 </topic>
112 <topic id="ACL" title="Access Lists">
113 <heading scroll="no">Access Lists</heading>
114 <p>You can slightly automate your access policies by setting up read/write request behavior for different incoming requests.</p>
115 <p>The rule consists of <b>request type</b>, source network (<b>ip</b> and <b>netmask</b>) and <b>action</b> to take (see also <a href="#ServerOptions">Server Options</a>).</p>
116 <p>When <kin>PumpKIN</kin> receives request it goes through the list of rules and bases its decision on the first matching rule. To rearrange order of rules, select the rule you wish to move and use up and down arrows buttons on the right. To remove rule, use the cross button.</p>
117 <p>To add a new rule fill in the information about <b>request type</b>, source <b>address</b> and <b>netmask</b> and desired action. Then click on the 'Add new rule' button.</p>
118 <p>If you wish to amend the rule, select it in the rules list, change parameters below and click the 'Replace rule' button.</p>
119 </topic>
120</winhelp>
diff --git a/install/Install.clw b/install/Install.clw
deleted file mode 100644
index 6775b4c..0000000
--- a/install/Install.clw
+++ b/dev/null
@@ -1,35 +0,0 @@
1; CLW file contains information for the MFC ClassWizard
2
3[General Info]
4Version=1
5LastClass=
6LastTemplate=CDialog
7NewFileInclude1=#include "stdafx.h"
8NewFileInclude2=#include "install.h"
9LastPage=0
10
11ClassCount=0
12
13ResourceCount=2
14Resource1=IDD_INSTALLING (FALSE)
15Resource2=IDD_PATH
16
17[DLG:IDD_INSTALLING (FALSE)]
18Type=1
19Class=?
20ControlCount=4
21Control1=IDCANCEL,button,1342295808
22Control2=IDC_DISKS,SysAnimate32,1342242822
23Control3=IDC_STATE,static,1342308736
24Control4=IDC_PROGRESS,msctls_progress32,1342177280
25
26[DLG:IDD_PATH]
27Type=1
28Class=?
29ControlCount=5
30Control1=IDC_PROMPT,static,1342308352
31Control2=IDC_PATH,edit,1350631552
32Control3=IDC_BROWSE,button,1342242816
33Control4=IDOK,button,1342242817
34Control5=IDCANCEL,button,1342242816
35
diff --git a/install/custom.rch b/install/custom.rch
deleted file mode 100644
index d37b074..0000000
--- a/install/custom.rch
+++ b/dev/null
@@ -1,10 +0,0 @@
1 #ifdefSTATI_K
2PumpKIN.ex_ rcdata discardable "../releast/pumpkin.ex_"
3#else
4PumpKIN.ex_ rcdata discardable "../release/pumpkin.ex_"
5#endif
6PumpKIN.cn_ rcdata discardable "../release/pumpkin.cn_"
7PumpKIN.hl_ rcdata discardable "../release/pumpkin.hl_"
8#ifdef K_ANNED
9mfc42.dl_ rcdata discardable "../redist/mfc42.dl_"
10#endif
diff --git a/install/install.cpp b/install/install.cpp
deleted file mode 100644
index ea27a2c..0000000
--- a/install/install.cpp
+++ b/dev/null
@@ -1,74 +0,0 @@
1#include "resource.h"
2#include "../shared-code/install.h"
3
4#define VERSION "2.7.3"
5 #defineKINAME "PumpKIN " VERSION
6#define SKINAME "PumpKIN"
7
8BOOL Install(void)
9{
10STRING dPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",SKINAME "Path");
11STRING kPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath");
12LPCSTR qPath = ((LPCSTR)dPath)?(LPCSTR)dPath:(((LPCSTR)kPath)?(LPSTR)kPath:"C:\\Program Files\\Klever\\Nothings");
13STRING path = REQUESTPATH(" " KINAME,"\nEnter destination path:",qPath);
14 if(!path)
15 return NULL;
16
17 #ifdefK_ANNED
18STRING sysDir(_MAX_PATH);
19 GetSystemDirectory(sysDir,_MAX_PATH);
20 INSTALLFILE("mfc42.dl_",sysDir,"mfc42.dll");
21#endif
22
23 MAKE_PATH(path);
24STRING shortPath = GET_SHORT_PATH(path);
25 if(!shortPath){
26 MessageBox(NULL,"Failed to install " KINAME " in specified directory",NULL,MB_ICONERROR|MB_OK);
27 return FALSE;
28 }
29
30 if(!(
31 INSTALLFILE(SKINAME ".ex_",path,SKINAME ".exe") &&
32 INSTALLFILE(SKINAME ".hl_",path,SKINAME ".hlp") &&
33 INSTALLFILE(SKINAME ".cn_",path,SKINAME ".cnt")
34 )){
35 MessageBox(NULL,"Failed to install " KINAME " in specified directory",NULL,MB_ICONERROR|MB_OK);
36 return FALSE;
37 }
38 ADDMENU("Klever Group",SKINAME,path, SKINAME ".exe");
39
40 strSET_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",SKINAME "Path",path);
41 strSET_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath",path);
42
43FILE* inf=CREATE_INF_FILE(path,SKINAME ".INF");
44 if(!inf){
45 MessageBox(NULL,"Failed to install " KINAME,NULL,MB_ICONERROR|MB_OK);
46 return FALSE;
47 }
48 INF_FILE_HEADER(inf);
49 INF_FILE_SECTION(inf,"Uninstall");
50 fprintf(inf,"AddReg=kFiles\nDelReg=kReg\nUpdateInis=kMenu\n");
51 INF_FILE_SECTION(inf,"kFiles");
52 INF_REMOVE_ROOT(inf,SKINAME "Files",shortPath);
53 INF_REMOVE_FILE(inf,SKINAME "Files",SKINAME ".exe");
54 INF_REMOVE_HELP_FILE(inf,SKINAME "Files",SKINAME);
55 INF_REMOVE_FILE(inf,SKINAME "Files",SKINAME ".inf");
56 INF_FILE_SECTION(inf,"kReg");
57 INF_UNINSTALL_REG(inf,SKINAME);
58 INF_FILE_SECTION(inf,"kMenu");
59 INF_MENU_GROUP(inf,1,"Klever Group");
60 INF_MENU_ITEM(inf,1,SKINAME);
61 fclose(inf);
62
63 REG_UNINSTALL_COMMAND(SKINAME,"Klever " KINAME,shortPath,SKINAME ".INF","Uninstall");
64 REG_UNINSTALL_ICON(SKINAME,path,SKINAME ".exe",0);
65 REG_UNINSTALL_COMMENT(SKINAME,"Klever PumpKIN");
66 REG_UNINSTALL_VERSION(SKINAME,VERSION);
67 REG_UNINSTALL_LOCATION(SKINAME,path);
68 REG_UNINSTALL_PUBLISHER(SKINAME,"Klever Group");
69 REG_UNINSTALL_URLS(SKINAME,"http://www.klever.net/","http://kin.klever.net/pumpkin/");
70
71 MessageBox(NULL,KINAME " installed successfully, you may now run it from 'Programs/Klever Group' menu or remove it using Control Panel Add/Remove Programs applet."," Rejoice!",MB_ICONINFORMATION|MB_OK);
72
73 return TRUE;
74}
diff --git a/install/install.rc b/install/install.rc
deleted file mode 100644
index 2dce211..0000000
--- a/install/install.rc
+++ b/dev/null
@@ -1,182 +0,0 @@
1//Microsoft Developer Studio generated resource script.
2//
3#include "resource.h"
4
5#define APSTUDIO_READONLY_SYMBOLS
6/////////////////////////////////////////////////////////////////////////////
7//
8// Generated from the TEXTINCLUDE 2 resource.
9//
10#include "afxres.h"
11
12/////////////////////////////////////////////////////////////////////////////
13#undef APSTUDIO_READONLY_SYMBOLS
14
15/////////////////////////////////////////////////////////////////////////////
16// English (U.S.) resources
17
18#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19#ifdef _WIN32
20LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21#pragma code_page(1252)
22#endif //_WIN32
23
24/////////////////////////////////////////////////////////////////////////////
25//
26// Dialog
27//
28
29#if defined(APSTUDIO_INVOKED) || defined(FALSE)
30#if defined(APSTUDIO_INVOKED)
31IDD_INSTALLING$(FALSE) DIALOGEX 0, 0, 200, 74
32#else
33IDD_INSTALLING DIALOGEX 0, 0, 200, 74
34#endif
35STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP
36FONT 8, "MS Sans Serif", 0, 0, 0x1
37BEGIN
38 PUSHBUTTON "Cancel",IDCANCEL,143,53,50,14,BS_CENTER | BS_VCENTER |
39 BS_NOTIFY | BS_FLAT,WS_EX_DLGMODALFRAME
40 CONTROL "Animate1",IDC_DISKS,"SysAnimate32",ACS_TRANSPARENT |
41 ACS_AUTOPLAY | WS_TABSTOP,161,7,32,32
42 LTEXT "",IDC_STATE,7,7,150,32,SS_NOPREFIX | SS_NOTIFY
43 CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",0x0,7,45,
44 186,7,WS_EX_DLGMODALFRAME
45END
46#endif
47
48IDD_PATH DIALOGEX 0, 0, 255, 73
49STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_POPUP |
50 WS_VISIBLE | WS_CAPTION
51EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
52FONT 8, "MS Sans Serif", 0, 0, 0x1
53BEGIN
54 LTEXT "",IDC_PROMPT,7,7,241,30
55 EDITTEXT IDC_PATH,7,37,195,12,ES_AUTOHSCROLL
56 PUSHBUTTON "B&rowse..",IDC_BROWSE,208,37,40,12
57 DEFPUSHBUTTON "OK",IDOK,69,52,50,14
58 PUSHBUTTON "Cancel",IDCANCEL,135,52,50,14
59END
60
61
62/////////////////////////////////////////////////////////////////////////////
63//
64// DESIGNINFO
65//
66
67#ifdef APSTUDIO_INVOKED
68GUIDELINES DESIGNINFO DISCARDABLE
69BEGIN
70 "IDD_INSTALLING$(FALSE)", DIALOG
71 BEGIN
72 LEFTMARGIN, 7
73 RIGHTMARGIN, 193
74 TOPMARGIN, 7
75 BOTTOMMARGIN, 67
76 HORZGUIDE, 39
77 END
78
79 IDD_PATH, DIALOG
80 BEGIN
81 LEFTMARGIN, 7
82 RIGHTMARGIN, 248
83 VERTGUIDE, 202
84 VERTGUIDE, 208
85 TOPMARGIN, 7
86 BOTTOMMARGIN, 66
87 HORZGUIDE, 37
88 END
89END
90#endif // APSTUDIO_INVOKED
91
92
93#ifdef APSTUDIO_INVOKED
94/////////////////////////////////////////////////////////////////////////////
95//
96// TEXTINCLUDE
97//
98
991 TEXTINCLUDE DISCARDABLE
100BEGIN
101 "resource.h\0"
102END
103
1042 TEXTINCLUDE DISCARDABLE
105BEGIN
106 "#include ""afxres.h""\r\n"
107 "\0"
108END
109
1103 TEXTINCLUDE DISCARDABLE
111BEGIN
112 "#include ""custom.rch""\0"
113END
114
115#endif // APSTUDIO_INVOKED
116
117
118/////////////////////////////////////////////////////////////////////////////
119//
120// Icon
121//
122
123// Icon with lowest ID value placed first to ensure application icon
124// remains consistent on all systems.
125IDI_ICON ICON DISCARDABLE "../shared-data/install-icon.ico"
126
127#ifndef _MAC
128/////////////////////////////////////////////////////////////////////////////
129//
130// Version
131//
132
133VS_VERSION_INFO VERSIONINFO
134 FILEVERSION 2,7,3,0
135 PRODUCTVERSION 2,7,3,0
136 FILEFLAGSMASK 0x3fL
137#ifdef _DEBUG
138 FILEFLAGS 0x1L
139#else
140 FILEFLAGS 0x0L
141#endif
142 FILEOS 0x40004L
143 FILETYPE 0x1L
144 FILESUBTYPE 0x0L
145BEGIN
146 BLOCK "StringFileInfo"
147 BEGIN
148 BLOCK "040904b0"
149 BEGIN
150 VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0"
151 VALUE "FileDescription", "INSTALL: PumpKIN, tftp client/daemon\0"
152 VALUE "FileVersion", "2, 7, 3, 0\0"
153 VALUE "InternalName", "INSTALL\0"
154 VALUE "LegalCopyright", "Copyright © 1997-2011 Klever Group (http://www.klever.net/)\0"
155 VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0"
156 VALUE "OriginalFilename", "INSTALL.EXE\0"
157 VALUE "ProductName", "PumpKIN\0"
158 VALUE "ProductVersion", "2, 7, 3, 0\0"
159 END
160 END
161 BLOCK "VarFileInfo"
162 BEGIN
163 VALUE "Translation", 0x409, 1200
164 END
165END
166
167#endif // !_MAC
168
169#endif // English (U.S.) resources
170/////////////////////////////////////////////////////////////////////////////
171
172
173
174#ifndef APSTUDIO_INVOKED
175/////////////////////////////////////////////////////////////////////////////
176//
177// Generated from the TEXTINCLUDE 3 resource.
178//
179#include "custom.rch"
180/////////////////////////////////////////////////////////////////////////////
181#endif // not APSTUDIO_INVOKED
182
diff --git a/install/resource.h b/install/resource.h
deleted file mode 100644
index ebf7991..0000000
--- a/install/resource.h
+++ b/dev/null
@@ -1,24 +0,0 @@
1//{{NO_DEPENDENCIES}}
2// Microsoft Developer Studio generated include file.
3// Used by Install.rc
4//
5#define IDD_INSTALLING 101
6#define IDD_PATH 102
7#define IDI_ICON 105
8#define IDC_DISKS 1000
9#define IDC_STATE 1001
10#define IDC_PROGRESS 1002
11#define IDC_PROMPT 1003
12#define IDC_PATH 1004
13#define IDC_BROWSE 1005
14
15// Next default values for new objects
16//
17#ifdef APSTUDIO_INVOKED
18#ifndef APSTUDIO_READONLY_SYMBOLS
19#define _APS_NEXT_RESOURCE_VALUE 107
20#define _APS_NEXT_COMMAND_VALUE 40001
21#define _APS_NEXT_CONTROL_VALUE 1006
22#define _APS_NEXT_SYMED_VALUE 101
23#endif
24#endif
diff --git a/makehelp.bat b/makehelp.bat
deleted file mode 100644
index 4132ec8..0000000
--- a/makehelp.bat
+++ b/dev/null
@@ -1,32 +0,0 @@
1@echo off
2REM -- First make map file from Microsoft Visual C++ generated resource.h
3echo // MAKEHELP.BAT generated Help Map file. Used by PUMPKIN.HPJ. >"help\pumpkin.hm"
4echo. >>"help\pumpkin.hm"
5echo // Commands (ID_* and IDM_*) >>"help\pumpkin.hm"
6makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 resource.h >>"help\pumpkin.hm"
7echo. >>"help\pumpkin.hm"
8echo // Prompts (IDP_*) >>"help\pumpkin.hm"
9makehm IDP_,HIDP_,0x30000 resource.h >>"help\pumpkin.hm"
10echo. >>"help\pumpkin.hm"
11echo // Resources (IDR_*) >>"help\pumpkin.hm"
12makehm IDR_,HIDR_,0x20000 resource.h >>"help\pumpkin.hm"
13echo. >>"help\pumpkin.hm"
14echo // Dialogs (IDD_*) >>"help\pumpkin.hm"
15makehm IDD_,HIDD_,0x20000 resource.h >>"help\pumpkin.hm"
16echo. >>"help\pumpkin.hm"
17echo // Frame Controls (IDW_*) >>"help\pumpkin.hm"
18makehm IDW_,HIDW_,0x50000 resource.h >>"help\pumpkin.hm"
19REM -- Make help for Project PUMPKIN
20
21echo Building RTF file
22xsltproc -o help/pumpkin.rtf shared-code/kinhelp.xsl help/pumpkin.xml
23echo Building Win32 Help files
24start /wait hcrtf -x "help\pumpkin.hpj"
25echo.
26if exist Debug\nul copy "help\pumpkin.hlp" Debug
27if exist Debug\nul copy "help\pumpkin.cnt" Debug
28if exist Release\nul copy "help\pumpkin.hlp" Release
29if exist Release\nul copy "help\pumpkin.cnt" Release
30if exist Releast\nul copy "help\pumpkin.hlp" Releast
31if exist Releast\nul copy "help\pumpkin.cnt" Releast
32echo.
diff --git a/pumpkin.clw b/pumpkin.clw
deleted file mode 100644
index 7fa927b..0000000
--- a/pumpkin.clw
+++ b/dev/null
@@ -1,329 +0,0 @@
1; CLW file contains information for the MFC ClassWizard
2
3[General Info]
4Version=1
5LastClass=CPropsNetwork
6LastTemplate=CComboBox
7NewFileInclude1=#include "stdafx.h"
8NewFileInclude2=#include "PumpKIN.h"
9
10ClassCount=14
11Class1=CPumpKINApp
12Class2=CPumpKINDlg
13Class3=CAboutDlg
14
15ResourceCount=10
16Resource1=IDD_REQUEST
17Resource2=IDD_PUMPKIN_DIALOG
18Resource3=IDD_CONFIRM_RRQ
19Resource4=IDD_PROPS_SERVER
20Class4=CPropsServer
21Class5=CPropsNetwork
22Resource5=IDD_CONFIRM_WRQ
23Resource6=IDD_PROPS_ACL
24Class6=CConfirmRRQDlg
25Class7=CConfirmWRQDlg
26Resource7=IDD_ABOUTBOX
27Class8=CRequestDlg
28Class9=CResolver
29Class10=CRetrier
30Class11=CTrayer
31Resource8=IDD_PROPS_SOUNDS
32Class12=CPropsSounds
33Resource9=IDM_POPUPS
34Class13=CPropsACL
35Class14=CACLTargetCombo
36Resource10=IDD_PROPS_NETWORK
37
38[CLS:CPumpKINApp]
39Type=0
40HeaderFile=PumpKIN.h
41ImplementationFile=PumpKIN.cpp
42Filter=N
43
44[CLS:CPumpKINDlg]
45Type=0
46HeaderFile=PumpKINDlg.h
47ImplementationFile=PumpKINDlg.cpp
48Filter=W
49BaseClass=CDialog
50VirtualFilter=dWC
51LastObject=CPumpKINDlg
52
53[CLS:CAboutDlg]
54Type=0
55HeaderFile=PumpKINDlg.h
56ImplementationFile=PumpKINDlg.cpp
57Filter=D
58BaseClass=CDialog
59VirtualFilter=dWC
60LastObject=CAboutDlg
61
62[DLG:IDD_ABOUTBOX]
63Type=1
64Class=CAboutDlg
65ControlCount=5
66Control1=IDC_STATIC,static,1342177283
67Control2=IDC_STATIC,static,1342308480
68Control3=IDC_STATIC,static,1342308352
69Control4=IDOK,button,1342373889
70Control5=IDC_KLEVERNET,button,1342242816
71
72[DLG:IDD_PUMPKIN_DIALOG]
73Type=1
74Class=CPumpKINDlg
75ControlCount=10
76Control1=IDC_CONNECTIONS,SysListView32,1350631681
77Control2=IDC_GET,button,1342259200
78Control3=IDC_PUT,button,1342259200
79Control4=IDC_ABORT,button,1342259200
80Control5=IDC_OPTIONS,button,1342259200
81Control6=IDC_EXIT,button,1342259200
82Control7=ID_HELP,button,1342259200
83Control8=IDC_LOG,listbox,1353728385
84Control9=IDCANCEL,button,1073741824
85Control10=IDC_LISTENING,button,1342275619
86
87[DLG:IDD_PROPS_SERVER]
88Type=1
89Class=CPropsServer
90ControlCount=18
91Control1=IDC_STATIC,button,1342177287
92Control2=IDC_TFTPROOT,edit,1350631552
93Control3=IDC_BROWSE,button,1342242880
94Control4=IDC_TFTPSUBDIRS,button,1342242819
95Control5=IDC_STATIC,button,1342177287
96Control6=IDC_RRQ_GIVEALL,button,1342324745
97Control7=IDC_RRQ_ALWAYSCONFIRM,button,1342193673
98Control8=IDC_RRQ_DENYALL,button,1342193673
99Control9=IDC_STATIC,button,1342308359
100Control10=IDC_WRQ_TAKEALL,button,1342308361
101Control11=IDC_WRQ_PROMPTEXISTING,button,1342177289
102Control12=IDC_WRQ_ALWAYSCONFIRM,button,1342177289
103Control13=IDC_WRQ_DENYALL,button,1342177289
104Control14=IDC_STATIC,static,1342308609
105Control15=IDC_PROMPTTIMEOUT,msctls_trackbar32,1342242823
106Control16=IDC_STATIC,button,1342177287
107Control17=IDC_LOGFILE,edit,1350631552
108Control18=IDC_LOGFILE_BROWSE,button,1342242880
109
110[DLG:IDD_PROPS_NETWORK]
111Type=1
112Class=CPropsNetwork
113ControlCount=17
114Control1=IDC_STATIC,button,1342177287
115Control2=IDC_STATIC,static,1342308354
116Control3=IDC_LISTENPORT,edit,1350631552
117Control4=IDC_LISTENSPIN,msctls_updown32,1342177463
118Control5=IDC_STATIC,static,1342308354
119Control6=IDC_SPEAKPORT,edit,1350631552
120Control7=IDC_SPEAKSPIN,msctls_updown32,1342177463
121Control8=IDC_STATIC,static,1342308352
122Control9=IDC_TIMEOUT,edit,1350639744
123Control10=IDC_TIMESPIN,msctls_updown32,1342177463
124Control11=IDC_STATIC,static,1342308352
125Control12=IDC_STATIC,static,1342308352
126Control13=IDC_STATIC,static,1342308352
127Control14=IDC_BLOCKSIZE,edit,1350639744
128Control15=IDC_BSIZESPIN,msctls_updown32,1342177463
129Control16=IDC_STATIC,static,1342308354
130Control17=IDC_LISTENADDRESS,edit,1350631552
131
132[CLS:CPropsServer]
133Type=0
134HeaderFile=PropsServer.h
135ImplementationFile=PropsServer.cpp
136BaseClass=CPropertyPage
137Filter=D
138VirtualFilter=idWC
139LastObject=CPropsServer
140
141[CLS:CPropsNetwork]
142Type=0
143HeaderFile=PropsNetwork.h
144ImplementationFile=PropsNetwork.cpp
145BaseClass=CPropertyPage
146Filter=D
147VirtualFilter=idWC
148LastObject=IDC_LISTENADDRESS
149
150[DLG:IDD_CONFIRM_RRQ]
151Type=1
152Class=CConfirmRRQDlg
153ControlCount=9
154Control1=IDOK,button,1342242817
155Control2=IDCANCEL,button,1342242816
156Control3=IDC_STATIC,static,1342308352
157Control4=IDC_HOST,static,1350701313
158Control5=IDC_STATIC,static,1342308353
159Control6=IDC_FILE,static,1350701313
160Control7=IDC_STATIC,static,1342177296
161Control8=IDC_STATIC,static,1342177283
162Control9=IDC_STATIC,static,1342177283
163
164[DLG:IDD_CONFIRM_WRQ]
165Type=1
166Class=CConfirmWRQDlg
167ControlCount=11
168Control1=IDOK,button,1342242817
169Control2=IDC_RENAME,button,1342242816
170Control3=IDCANCEL,button,1342242816
171Control4=IDC_STATIC,static,1342308352
172Control5=IDC_HOST,static,1350701313
173Control6=IDC_STATIC,static,1342308353
174Control7=IDC_FILE,static,1350701313
175Control8=IDC_STATIC,static,1342177296
176Control9=IDC_STATIC,static,1342177283
177Control10=IDC_STATIC,static,1342177283
178Control11=IDC_RESUME,button,1342242816
179
180[CLS:CConfirmRRQDlg]
181Type=0
182HeaderFile=ConfirmRRQDlg.h
183ImplementationFile=ConfirmRRQDlg.cpp
184BaseClass=CDialog
185Filter=D
186VirtualFilter=dWC
187LastObject=CConfirmRRQDlg
188
189[CLS:CConfirmWRQDlg]
190Type=0
191HeaderFile=ConfirmWRQDlg.h
192ImplementationFile=ConfirmWRQDlg.cpp
193BaseClass=CDialog
194Filter=D
195VirtualFilter=dWC
196LastObject=IDC_RESUME
197
198[DLG:IDD_REQUEST]
199Type=1
200Class=CRequestDlg
201ControlCount=15
202Control1=IDC_STATIC,static,1342308608
203Control2=IDC_LOCALFILE,edit,1350631552
204Control3=IDC_BROWSE,button,1342242880
205Control4=IDC_STATIC,static,1342308608
206Control5=IDC_REMOTEFILE,edit,1350631552
207Control6=IDC_STATIC,static,1342308608
208Control7=IDC_TALKS,combobox,1344341313
209Control8=IDC_REFRESH,button,1342271232
210Control9=IDC_STATIC,static,1342308352
211Control10=IDC_TYPE,combobox,1344356418
212Control11=IDC_STATIC,static,1342308352
213Control12=IDC_BSIZE,combobox,1344339970
214Control13=IDOK,button,1342242817
215Control14=IDCANCEL,button,1342242816
216Control15=IDC_STATIC,static,1342177297
217
218[CLS:CRequestDlg]
219Type=0
220HeaderFile=RequestDlg.h
221ImplementationFile=RequestDlg.cpp
222BaseClass=CDialog
223Filter=W
224VirtualFilter=dWC
225LastObject=CRequestDlg
226
227[CLS:CResolver]
228Type=0
229HeaderFile=Resolver.h
230ImplementationFile=Resolver.cpp
231BaseClass=CWnd
232Filter=W
233LastObject=CResolver
234VirtualFilter=WC
235
236[MNU:IDM_POPUPS]
237Type=1
238Class=CPumpKINDlg
239Command1=ID_TRAY_SENDFILE
240Command2=ID_TRAY_FETCHFILE
241Command3=ID_TRAY_OPTIONS
242Command4=ID_TRAY_LISTEN
243Command5=ID_TRAY_SHOWPUMPKINWINDOW
244Command6=ID_TRAY_OPENFILESFOLDER
245Command7=ID_TRAY_HELP
246Command8=ID_TRAY_ABOUTPUMPKIN
247Command9=ID_TRAY_EXIT
248CommandCount=9
249
250[CLS:CRetrier]
251Type=0
252HeaderFile=Retrier.h
253ImplementationFile=Retrier.cpp
254BaseClass=CWnd
255Filter=W
256LastObject=CRetrier
257VirtualFilter=WC
258
259[CLS:CTrayer]
260Type=0
261HeaderFile=Trayer.h
262ImplementationFile=Trayer.cpp
263BaseClass=CWnd
264Filter=W
265LastObject=CTrayer
266VirtualFilter=WC
267
268[DLG:IDD_PROPS_SOUNDS]
269Type=1
270Class=CPropsSounds
271ControlCount=12
272Control1=IDC_STATIC,static,1342308352
273Control2=IDC_RING,combobox,1344340290
274Control3=IDC_RING_BROWSE,button,1342242880
275Control4=IDC_RING_PLAY,button,1342242880
276Control5=IDC_STATIC,static,1342308352
277Control6=IDC_FINISHED,combobox,1344340290
278Control7=IDC_FINISHED_BROWSE,button,1342242880
279Control8=IDC_FINISHED_PLAY,button,1342242880
280Control9=IDC_STATIC,static,1342308352
281Control10=IDC_ABORTED,combobox,1344340290
282Control11=IDC_ABORTED_BROWSE,button,1342242880
283Control12=IDC_ABORTED_PLAY,button,1342242880
284
285[CLS:CPropsSounds]
286Type=0
287HeaderFile=PropsSounds.h
288ImplementationFile=PropsSounds.cpp
289BaseClass=CPropertyPage
290Filter=D
291LastObject=CPropsSounds
292VirtualFilter=idWC
293
294[DLG:IDD_PROPS_ACL]
295Type=1
296Class=CPropsACL
297ControlCount=14
298Control1=IDC_ACL_LIST,SysListView32,1350631425
299Control2=IDC_ACL_UP,button,1342246720
300Control3=IDC_ACL_DOWN,button,1342246720
301Control4=IDC_ACL_REMOVE,button,1342246720
302Control5=IDC_STATIC,static,1342308352
303Control6=IDC_ACL_XFER,combobox,1344339971
304Control7=IDC_STATIC,static,1342308352
305Control8=IDC_ACL_ADDR,edit,1350631552
306Control9=IDC_STATIC,static,1342308352
307Control10=IDC_ACL_NETMASK,edit,1350631552
308Control11=IDC_STATIC,static,1342308352
309Control12=IDC_ACL_RULE,combobox,1344339971
310Control13=IDC_ACL_ADD,button,1342242816
311Control14=IDC_ACL_REPLACE,button,1342242816
312
313[CLS:CPropsACL]
314Type=0
315HeaderFile=PropsACL.h
316ImplementationFile=PropsACL.cpp
317BaseClass=CPropertyPage
318Filter=D
319LastObject=CPropsACL
320VirtualFilter=idWC
321
322[CLS:CACLTargetCombo]
323Type=0
324HeaderFile=ACLTargetCombo.h
325ImplementationFile=ACLTargetCombo.cpp
326BaseClass=CComboBox
327Filter=W
328LastObject=CACLTargetCombo
329
diff --git a/pumpkin.cpp b/pumpkin.cpp
deleted file mode 100644
index c086fb3..0000000
--- a/pumpkin.cpp
+++ b/dev/null
@@ -1,69 +0,0 @@
1// PumpKIN.cpp : Defines the class behaviors for the application.
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "PumpKINDlg.h"
7
8#ifdef _DEBUG
9#define new DEBUG_NEW
10#undef THIS_FILE
11static char THIS_FILE[] = __FILE__;
12#endif
13
14/////////////////////////////////////////////////////////////////////////////
15// CPumpKINApp
16
17BEGIN_MESSAGE_MAP(CPumpKINApp, CWinApp)
18 //{{AFX_MSG_MAP(CPumpKINApp)
19 //}}AFX_MSG
20 ON_COMMAND(ID_HELP, CWinApp::OnHelp)
21END_MESSAGE_MAP()
22
23/////////////////////////////////////////////////////////////////////////////
24// CPumpKINApp construction
25
26CPumpKINApp::CPumpKINApp()
27{
28}
29
30/////////////////////////////////////////////////////////////////////////////
31// The one and only CPumpKINApp object
32
33CPumpKINApp theApp;
34
35/////////////////////////////////////////////////////////////////////////////
36// CPumpKINApp initialization
37
38BOOL CPumpKINApp::InitInstance()
39{
40 if (!AfxSocketInit())
41 {
42 AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
43 return FALSE;
44 }
45
46 // Standard initialization
47 // If you are not using these features and wish to reduce the size
48 // of your final executable, you should remove from the following
49 // the specific initialization routines you do not need.
50
51#ifdef _AFXDLL
52 Enable3dControls(); // Call this when using MFC in a shared DLL
53#else
54 Enable3dControlsStatic();// Call this when linking to MFC statically
55#endif
56
57 SetRegistryKey(IDS_REGISTRYKEY);
58 m_HelpFile = m_pszHelpFilePath;
59 m_HelpFile+=">Standard";
60 m_pszHelpFilePath=(LPCTSTR)m_HelpFile;
61
62 CPumpKINDlg dlg;
63 m_pMainWnd = &dlg;
64 int nResponse = dlg.DoModal();
65
66 // Since the dialog has been closed, return FALSE so that we exit the
67 // application, rather than start the application's message pump.
68 return FALSE;
69}
diff --git a/pumpkin.h b/pumpkin.h
deleted file mode 100644
index 71c720e..0000000
--- a/pumpkin.h
+++ b/dev/null
@@ -1,36 +0,0 @@
1// PumpKIN.h : main header file for the PUMPKIN application
2//
3
4#ifndef __AFXWIN_H__
5 #error include 'stdafx.h' before including this file for PCH
6#endif
7
8 #include "resource.h" // main symbols
9
10/////////////////////////////////////////////////////////////////////////////
11// CPumpKINApp:
12// See PumpKIN.cpp for the implementation of this class
13//
14
15class CPumpKINApp : public CWinApp
16{
17public:
18 CString m_HelpFile;
19 CPumpKINApp();
20
21// Overrides
22 // ClassWizard generated virtual function overrides
23 //{{AFX_VIRTUAL(CPumpKINApp)
24 public:
25 virtual BOOL InitInstance();
26 //}}AFX_VIRTUAL
27
28// Implementation
29
30 //{{AFX_MSG(CPumpKINApp)
31 //}}AFX_MSG
32 DECLARE_MESSAGE_MAP()
33};
34
35
36/////////////////////////////////////////////////////////////////////////////
diff --git a/pumpkin.icns b/pumpkin.icns
new file mode 100644
index 0000000..91a9dfd
--- a/dev/null
+++ b/pumpkin.icns
Binary files differ
diff --git a/pumpkin.mak b/pumpkin.mak
deleted file mode 100644
index bf9e895..0000000
--- a/pumpkin.mak
+++ b/dev/null
@@ -1,1583 +0,0 @@
1# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
2# ** DO NOT EDIT **
3
4# TARGTYPE "Win32 (x86) Application" 0x0101
5
6!IF "$(CFG)" == ""
7CFG=Install - Win32 Debug
8!MESSAGE No configuration specified. Defaulting to Install - Win32 Debug.
9!ENDIF
10
11!IF "$(CFG)" != "PumpKIN - Win32 Release" && "$(CFG)" !=\
12 "PumpKIN - Win32 Debug" && "$(CFG)" != "PumpKIN - Win32 Static" && "$(CFG)" !=\
13 "Install - Win32 Debug" && "$(CFG)" != "Install - Win32 Pure" && "$(CFG)" !=\
14 "Install - Win32 Static" && "$(CFG)" != "Install - Win32 Canned"
15!MESSAGE Invalid configuration "$(CFG)" specified.
16!MESSAGE You can specify a configuration when running NMAKE on this makefile
17!MESSAGE by defining the macro CFG on the command line. For example:
18!MESSAGE
19!MESSAGE NMAKE /f "pumpkin.mak" CFG="Install - Win32 Debug"
20!MESSAGE
21!MESSAGE Possible choices for configuration are:
22!MESSAGE
23!MESSAGE "PumpKIN - Win32 Release" (based on "Win32 (x86) Application")
24!MESSAGE "PumpKIN - Win32 Debug" (based on "Win32 (x86) Application")
25!MESSAGE "PumpKIN - Win32 Static" (based on "Win32 (x86) Application")
26!MESSAGE "Install - Win32 Debug" (based on "Win32 (x86) Application")
27!MESSAGE "Install - Win32 Pure" (based on "Win32 (x86) Application")
28!MESSAGE "Install - Win32 Static" (based on "Win32 (x86) Application")
29!MESSAGE "Install - Win32 Canned" (based on "Win32 (x86) Application")
30!MESSAGE
31!ERROR An invalid configuration is specified.
32!ENDIF
33
34!IF "$(OS)" == "Windows_NT"
35NULL=
36!ELSE
37NULL=nul
38!ENDIF
39################################################################################
40# Begin Project
41# PROP Target_Last_Scanned "PumpKIN - Win32 Debug"
42CPP=cl.exe
43RSC=rc.exe
44MTL=mktyplib.exe
45
46!IF "$(CFG)" == "PumpKIN - Win32 Release"
47
48# PROP BASE Use_MFC 6
49# PROP BASE Use_Debug_Libraries 0
50# PROP BASE Output_Dir "Release"
51# PROP BASE Intermediate_Dir "Release"
52# PROP BASE Target_Dir ""
53# PROP Use_MFC 6
54# PROP Use_Debug_Libraries 0
55# PROP Output_Dir "Release"
56# PROP Intermediate_Dir "Release"
57# PROP Target_Dir ""
58OUTDIR=.\Release
59INTDIR=.\Release
60# Begin Custom Macros
61OutDir=.\Release
62TargetName=pumpkin
63# End Custom Macros
64
65ALL : "$(OUTDIR)\pumpkin.exe" "$(OUTDIR)\pumpkin.ex_" "$(OUTDIR)\pumpkin.hlp"\
66 "$(OUTDIR)\pumpkin.cnt" "$(OUTDIR)\pumpkin.hl_" "$(OUTDIR)\pumpkin.cn_"
67
68CLEAN :
69 -@erase "$(INTDIR)\ACLTargetCombo.obj"
70 -@erase "$(INTDIR)\ConfirmRRQDlg.obj"
71 -@erase "$(INTDIR)\ConfirmWRQDlg.obj"
72 -@erase "$(INTDIR)\PropsACL.obj"
73 -@erase "$(INTDIR)\PropsNetwork.obj"
74 -@erase "$(INTDIR)\PropsServer.obj"
75 -@erase "$(INTDIR)\PropsSounds.obj"
76 -@erase "$(INTDIR)\pumpkin.cn_"
77 -@erase "$(INTDIR)\pumpkin.cnt"
78 -@erase "$(INTDIR)\pumpkin.hl_"
79 -@erase "$(INTDIR)\pumpkin.hlp"
80 -@erase "$(INTDIR)\PumpKIN.obj"
81 -@erase "$(INTDIR)\pumpkin.pch"
82 -@erase "$(INTDIR)\pumpkin.res"
83 -@erase "$(INTDIR)\PumpKINDlg.obj"
84 -@erase "$(INTDIR)\RequestDlg.obj"
85 -@erase "$(INTDIR)\Resolver.obj"
86 -@erase "$(INTDIR)\Retrier.obj"
87 -@erase "$(INTDIR)\StdAfx.obj"
88 -@erase "$(INTDIR)\Trayer.obj"
89 -@erase "$(OUTDIR)\pumpkin.ex_"
90 -@erase "$(OUTDIR)\pumpkin.exe"
91
92"$(OUTDIR)" :
93 if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
94
95# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
96# ADD CPP /nologo /Zp1 /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
97CPP_PROJ=/nologo /Zp1 /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
98 "_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/pumpkin.pch" /Yu"stdafx.h" /Fo"$(INTDIR)/"\
99 /c
100CPP_OBJS=.\Release/
101CPP_SBRS=.\.
102# ADD BASE MTL /nologo /D "NDEBUG" /win32
103# ADD MTL /nologo /D "NDEBUG" /win32
104MTL_PROJ=/nologo /D "NDEBUG" /win32
105# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
106# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
107RSC_PROJ=/l 0x409 /fo"$(INTDIR)/pumpkin.res" /d "NDEBUG" /d "_AFXDLL"
108BSC32=bscmake.exe
109# ADD BASE BSC32 /nologo
110# ADD BSC32 /nologo
111BSC32_FLAGS=/nologo /o"$(OUTDIR)/pumpkin.bsc"
112BSC32_SBRS= \
113
114LINK32=link.exe
115# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
116# ADD LINK32 /nologo /subsystem:windows /machine:I386
117LINK32_FLAGS=/nologo /subsystem:windows /incremental:no\
118 /pdb:"$(OUTDIR)/pumpkin.pdb" /machine:I386 /out:"$(OUTDIR)/pumpkin.exe"
119LINK32_OBJS= \
120 "$(INTDIR)\ACLTargetCombo.obj" \
121 "$(INTDIR)\ConfirmRRQDlg.obj" \
122 "$(INTDIR)\ConfirmWRQDlg.obj" \
123 "$(INTDIR)\PropsACL.obj" \
124 "$(INTDIR)\PropsNetwork.obj" \
125 "$(INTDIR)\PropsServer.obj" \
126 "$(INTDIR)\PropsSounds.obj" \
127 "$(INTDIR)\PumpKIN.obj" \
128 "$(INTDIR)\pumpkin.res" \
129 "$(INTDIR)\PumpKINDlg.obj" \
130 "$(INTDIR)\RequestDlg.obj" \
131 "$(INTDIR)\Resolver.obj" \
132 "$(INTDIR)\Retrier.obj" \
133 "$(INTDIR)\StdAfx.obj" \
134 "$(INTDIR)\Trayer.obj"
135
136"$(OUTDIR)\pumpkin.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
137 $(LINK32) @<<
138 $(LINK32_FLAGS) $(LINK32_OBJS)
139<<
140
141# Begin Custom Build
142OutDir=.\Release
143TargetName=pumpkin
144InputPath=.\Release\pumpkin.exe
145SOURCE=$(InputPath)
146
147"$(OutDir)\$(TargetName).ex_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
148 compress $(OutDir)\$(TargetName).exe $(OutDir)\$(TargetName).ex_
149
150# End Custom Build
151
152!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
153
154# PROP BASE Use_MFC 6
155# PROP BASE Use_Debug_Libraries 1
156# PROP BASE Output_Dir "Debug"
157# PROP BASE Intermediate_Dir "Debug"
158# PROP BASE Target_Dir ""
159# PROP Use_MFC 6
160# PROP Use_Debug_Libraries 1
161# PROP Output_Dir "Debug"
162# PROP Intermediate_Dir "Debug"
163# PROP Target_Dir ""
164OUTDIR=.\Debug
165INTDIR=.\Debug
166# Begin Custom Macros
167OutDir=.\Debug
168TargetName=pumpkin
169# End Custom Macros
170
171ALL : "$(OUTDIR)\pumpkin.exe" "$(OUTDIR)\pumpkin.bsc" "$(OUTDIR)\pumpkin.ex_"\
172 "$(OUTDIR)\pumpkin.hlp" "$(OUTDIR)\pumpkin.cnt" "$(OUTDIR)\pumpkin.hl_"\
173 "$(OUTDIR)\pumpkin.cn_"
174
175CLEAN :
176 -@erase "$(INTDIR)\ACLTargetCombo.obj"
177 -@erase "$(INTDIR)\ACLTargetCombo.sbr"
178 -@erase "$(INTDIR)\ConfirmRRQDlg.obj"
179 -@erase "$(INTDIR)\ConfirmRRQDlg.sbr"
180 -@erase "$(INTDIR)\ConfirmWRQDlg.obj"
181 -@erase "$(INTDIR)\ConfirmWRQDlg.sbr"
182 -@erase "$(INTDIR)\PropsACL.obj"
183 -@erase "$(INTDIR)\PropsACL.sbr"
184 -@erase "$(INTDIR)\PropsNetwork.obj"
185 -@erase "$(INTDIR)\PropsNetwork.sbr"
186 -@erase "$(INTDIR)\PropsServer.obj"
187 -@erase "$(INTDIR)\PropsServer.sbr"
188 -@erase "$(INTDIR)\PropsSounds.obj"
189 -@erase "$(INTDIR)\PropsSounds.sbr"
190 -@erase "$(INTDIR)\pumpkin.cn_"
191 -@erase "$(INTDIR)\pumpkin.cnt"
192 -@erase "$(INTDIR)\pumpkin.hl_"
193 -@erase "$(INTDIR)\pumpkin.hlp"
194 -@erase "$(INTDIR)\PumpKIN.obj"
195 -@erase "$(INTDIR)\pumpkin.pch"
196 -@erase "$(INTDIR)\pumpkin.res"
197 -@erase "$(INTDIR)\PumpKIN.sbr"
198 -@erase "$(INTDIR)\PumpKINDlg.obj"
199 -@erase "$(INTDIR)\PumpKINDlg.sbr"
200 -@erase "$(INTDIR)\RequestDlg.obj"
201 -@erase "$(INTDIR)\RequestDlg.sbr"
202 -@erase "$(INTDIR)\Resolver.obj"
203 -@erase "$(INTDIR)\Resolver.sbr"
204 -@erase "$(INTDIR)\Retrier.obj"
205 -@erase "$(INTDIR)\Retrier.sbr"
206 -@erase "$(INTDIR)\StdAfx.obj"
207 -@erase "$(INTDIR)\StdAfx.sbr"
208 -@erase "$(INTDIR)\Trayer.obj"
209 -@erase "$(INTDIR)\Trayer.sbr"
210 -@erase "$(INTDIR)\vc40.idb"
211 -@erase "$(INTDIR)\vc40.pdb"
212 -@erase "$(OUTDIR)\pumpkin.bsc"
213 -@erase "$(OUTDIR)\pumpkin.ex_"
214 -@erase "$(OUTDIR)\pumpkin.exe"
215 -@erase "$(OUTDIR)\pumpkin.ilk"
216 -@erase "$(OUTDIR)\pumpkin.pdb"
217
218"$(OUTDIR)" :
219 if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
220
221# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
222# ADD CPP /nologo /Zp1 /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /c
223CPP_PROJ=/nologo /Zp1 /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D\
224 "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/pumpkin.pch"\
225 /Yu"stdafx.h" /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
226CPP_OBJS=.\Debug/
227CPP_SBRS=.\Debug/
228# ADD BASE MTL /nologo /D "_DEBUG" /win32
229# ADD MTL /nologo /D "_DEBUG" /win32
230MTL_PROJ=/nologo /D "_DEBUG" /win32
231# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
232# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
233RSC_PROJ=/l 0x409 /fo"$(INTDIR)/pumpkin.res" /d "_DEBUG" /d "_AFXDLL"
234BSC32=bscmake.exe
235# ADD BASE BSC32 /nologo
236# ADD BSC32 /nologo
237BSC32_FLAGS=/nologo /o"$(OUTDIR)/pumpkin.bsc"
238BSC32_SBRS= \
239 "$(INTDIR)\ACLTargetCombo.sbr" \
240 "$(INTDIR)\ConfirmRRQDlg.sbr" \
241 "$(INTDIR)\ConfirmWRQDlg.sbr" \
242 "$(INTDIR)\PropsACL.sbr" \
243 "$(INTDIR)\PropsNetwork.sbr" \
244 "$(INTDIR)\PropsServer.sbr" \
245 "$(INTDIR)\PropsSounds.sbr" \
246 "$(INTDIR)\PumpKIN.sbr" \
247 "$(INTDIR)\PumpKINDlg.sbr" \
248 "$(INTDIR)\RequestDlg.sbr" \
249 "$(INTDIR)\Resolver.sbr" \
250 "$(INTDIR)\Retrier.sbr" \
251 "$(INTDIR)\StdAfx.sbr" \
252 "$(INTDIR)\Trayer.sbr"
253
254"$(OUTDIR)\pumpkin.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
255 $(BSC32) @<<
256 $(BSC32_FLAGS) $(BSC32_SBRS)
257<<
258
259LINK32=link.exe
260# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386
261# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386
262LINK32_FLAGS=/nologo /subsystem:windows /incremental:yes\
263 /pdb:"$(OUTDIR)/pumpkin.pdb" /debug /machine:I386 /out:"$(OUTDIR)/pumpkin.exe"
264LINK32_OBJS= \
265 "$(INTDIR)\ACLTargetCombo.obj" \
266 "$(INTDIR)\ConfirmRRQDlg.obj" \
267 "$(INTDIR)\ConfirmWRQDlg.obj" \
268 "$(INTDIR)\PropsACL.obj" \
269 "$(INTDIR)\PropsNetwork.obj" \
270 "$(INTDIR)\PropsServer.obj" \
271 "$(INTDIR)\PropsSounds.obj" \
272 "$(INTDIR)\PumpKIN.obj" \
273 "$(INTDIR)\pumpkin.res" \
274 "$(INTDIR)\PumpKINDlg.obj" \
275 "$(INTDIR)\RequestDlg.obj" \
276 "$(INTDIR)\Resolver.obj" \
277 "$(INTDIR)\Retrier.obj" \
278 "$(INTDIR)\StdAfx.obj" \
279 "$(INTDIR)\Trayer.obj"
280
281"$(OUTDIR)\pumpkin.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
282 $(LINK32) @<<
283 $(LINK32_FLAGS) $(LINK32_OBJS)
284<<
285
286# Begin Custom Build
287OutDir=.\Debug
288TargetName=pumpkin
289InputPath=.\Debug\pumpkin.exe
290SOURCE=$(InputPath)
291
292"$(OutDir)\$(TargetName).ex_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
293 compress $(OutDir)\$(TargetName).exe $(OutDir)\$(TargetName).ex_
294
295# End Custom Build
296
297!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
298
299# PROP BASE Use_MFC 6
300# PROP BASE Use_Debug_Libraries 0
301# PROP BASE Output_Dir "PumpKIN_"
302# PROP BASE Intermediate_Dir "PumpKIN_"
303# PROP BASE Target_Dir ""
304# PROP Use_MFC 5
305# PROP Use_Debug_Libraries 0
306# PROP Output_Dir "Releast"
307# PROP Intermediate_Dir "Releast"
308# PROP Target_Dir ""
309OUTDIR=.\Releast
310INTDIR=.\Releast
311# Begin Custom Macros
312OutDir=.\Releast
313TargetName=pumpkin
314# End Custom Macros
315
316ALL : "$(OUTDIR)\pumpkin.exe" "$(OUTDIR)\pumpkin.ex_" "$(OUTDIR)\pumpkin.hlp"\
317 "$(OUTDIR)\pumpkin.cnt" "$(OUTDIR)\pumpkin.hl_" "$(OUTDIR)\pumpkin.cn_"
318
319CLEAN :
320 -@erase "$(INTDIR)\ACLTargetCombo.obj"
321 -@erase "$(INTDIR)\ConfirmRRQDlg.obj"
322 -@erase "$(INTDIR)\ConfirmWRQDlg.obj"
323 -@erase "$(INTDIR)\PropsACL.obj"
324 -@erase "$(INTDIR)\PropsNetwork.obj"
325 -@erase "$(INTDIR)\PropsServer.obj"
326 -@erase "$(INTDIR)\PropsSounds.obj"
327 -@erase "$(INTDIR)\pumpkin.cn_"
328 -@erase "$(INTDIR)\pumpkin.cnt"
329 -@erase "$(INTDIR)\pumpkin.hl_"
330 -@erase "$(INTDIR)\pumpkin.hlp"
331 -@erase "$(INTDIR)\PumpKIN.obj"
332 -@erase "$(INTDIR)\pumpkin.pch"
333 -@erase "$(INTDIR)\pumpkin.res"
334 -@erase "$(INTDIR)\PumpKINDlg.obj"
335 -@erase "$(INTDIR)\RequestDlg.obj"
336 -@erase "$(INTDIR)\Resolver.obj"
337 -@erase "$(INTDIR)\Retrier.obj"
338 -@erase "$(INTDIR)\StdAfx.obj"
339 -@erase "$(INTDIR)\Trayer.obj"
340 -@erase "$(OUTDIR)\pumpkin.ex_"
341 -@erase "$(OUTDIR)\pumpkin.exe"
342
343"$(OUTDIR)" :
344 if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
345
346# ADD BASE CPP /nologo /Zp1 /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
347# ADD CPP /nologo /Zp1 /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /c
348CPP_PROJ=/nologo /Zp1 /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
349 "_MBCS" /Fp"$(INTDIR)/pumpkin.pch" /Yu"stdafx.h" /Fo"$(INTDIR)/" /c
350CPP_OBJS=.\Releast/
351CPP_SBRS=.\.
352# ADD BASE MTL /nologo /D "NDEBUG" /win32
353# ADD MTL /nologo /D "NDEBUG" /win32
354MTL_PROJ=/nologo /D "NDEBUG" /win32
355# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
356# ADD RSC /l 0x409 /d "NDEBUG"
357RSC_PROJ=/l 0x409 /fo"$(INTDIR)/pumpkin.res" /d "NDEBUG"
358BSC32=bscmake.exe
359# ADD BASE BSC32 /nologo
360# ADD BSC32 /nologo
361BSC32_FLAGS=/nologo /o"$(OUTDIR)/pumpkin.bsc"
362BSC32_SBRS= \
363
364LINK32=link.exe
365# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
366# ADD LINK32 /nologo /subsystem:windows /machine:I386
367LINK32_FLAGS=/nologo /subsystem:windows /incremental:no\
368 /pdb:"$(OUTDIR)/pumpkin.pdb" /machine:I386 /out:"$(OUTDIR)/pumpkin.exe"
369LINK32_OBJS= \
370 "$(INTDIR)\ACLTargetCombo.obj" \
371 "$(INTDIR)\ConfirmRRQDlg.obj" \
372 "$(INTDIR)\ConfirmWRQDlg.obj" \
373 "$(INTDIR)\PropsACL.obj" \
374 "$(INTDIR)\PropsNetwork.obj" \
375 "$(INTDIR)\PropsServer.obj" \
376 "$(INTDIR)\PropsSounds.obj" \
377 "$(INTDIR)\PumpKIN.obj" \
378 "$(INTDIR)\pumpkin.res" \
379 "$(INTDIR)\PumpKINDlg.obj" \
380 "$(INTDIR)\RequestDlg.obj" \
381 "$(INTDIR)\Resolver.obj" \
382 "$(INTDIR)\Retrier.obj" \
383 "$(INTDIR)\StdAfx.obj" \
384 "$(INTDIR)\Trayer.obj"
385
386"$(OUTDIR)\pumpkin.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
387 $(LINK32) @<<
388 $(LINK32_FLAGS) $(LINK32_OBJS)
389<<
390
391# Begin Custom Build
392OutDir=.\Releast
393TargetName=pumpkin
394InputPath=.\Releast\pumpkin.exe
395SOURCE=$(InputPath)
396
397"$(OutDir)\$(TargetName).ex_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
398 compress $(OutDir)\$(TargetName).exe $(OutDir)\$(TargetName).ex_
399
400# End Custom Build
401
402!ELSEIF "$(CFG)" == "Install - Win32 Debug"
403
404# PROP BASE Use_MFC 2
405# PROP BASE Use_Debug_Libraries 1
406# PROP BASE Output_Dir "Install\Debug"
407# PROP BASE Intermediate_Dir "Install\Debug"
408# PROP BASE Target_Dir "Install"
409# PROP Use_MFC 0
410# PROP Use_Debug_Libraries 1
411# PROP Output_Dir "Install\Debug"
412# PROP Intermediate_Dir "Install\Debug"
413# PROP Target_Dir "Install"
414OUTDIR=.\Install\Debug
415INTDIR=.\Install\Debug
416
417ALL : "$(OUTDIR)\Install.exe"
418
419CLEAN :
420 -@erase "$(INTDIR)\install.obj"
421 -@erase "$(INTDIR)\Install.res"
422 -@erase "$(INTDIR)\vc40.idb"
423 -@erase "$(INTDIR)\vc40.pdb"
424 -@erase "$(OUTDIR)\Install.exe"
425 -@erase "$(OUTDIR)\Install.ilk"
426 -@erase "$(OUTDIR)\Install.pdb"
427
428"$(OUTDIR)" :
429 if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
430
431# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX /c
432# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /c
433CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\
434 /D "_MBCS" /Fp"$(INTDIR)/Install.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
435CPP_OBJS=.\Install\Debug/
436CPP_SBRS=.\.
437# ADD BASE MTL /nologo /D "_DEBUG" /win32
438# ADD MTL /nologo /D "_DEBUG" /win32
439MTL_PROJ=/nologo /D "_DEBUG" /win32
440# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
441# ADD RSC /l 0x409 /d "_DEBUG"
442RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Install.res" /d "_DEBUG"
443BSC32=bscmake.exe
444# ADD BASE BSC32 /nologo
445# ADD BSC32 /nologo
446BSC32_FLAGS=/nologo /o"$(OUTDIR)/Install.bsc"
447BSC32_SBRS= \
448
449LINK32=link.exe
450# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386
451# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib version.lib /nologo /subsystem:windows /debug /machine:I386
452LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
453 advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
454 odbccp32.lib version.lib /nologo /subsystem:windows /incremental:yes\
455 /pdb:"$(OUTDIR)/Install.pdb" /debug /machine:I386 /out:"$(OUTDIR)/Install.exe"
456LINK32_OBJS= \
457 "$(INTDIR)\install.obj" \
458 "$(INTDIR)\Install.res"
459
460"$(OUTDIR)\Install.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
461 $(LINK32) @<<
462 $(LINK32_FLAGS) $(LINK32_OBJS)
463<<
464
465!ELSEIF "$(CFG)" == "Install - Win32 Pure"
466
467# PROP BASE Use_MFC 2
468# PROP BASE Use_Debug_Libraries 0
469# PROP BASE Output_Dir "Install\Pure"
470# PROP BASE Intermediate_Dir "Install\Pure"
471# PROP BASE Target_Dir "Install"
472# PROP Use_MFC 0
473# PROP Use_Debug_Libraries 0
474# PROP Output_Dir "Install\Pure"
475# PROP Intermediate_Dir "Install\Pure"
476# PROP Target_Dir "Install"
477OUTDIR=.\Install\Pure
478INTDIR=.\Install\Pure
479
480ALL : "$(OUTDIR)\Install.exe" "$(OUTDIR)\Install.bsc"
481
482CLEAN :
483 -@erase "$(INTDIR)\install.obj"
484 -@erase "$(INTDIR)\Install.res"
485 -@erase "$(INTDIR)\install.sbr"
486 -@erase "$(OUTDIR)\Install.bsc"
487 -@erase "$(OUTDIR)\Install.exe"
488
489"$(OUTDIR)" :
490 if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
491
492# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX /c
493# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /c
494CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
495 "_MBCS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/Install.pch" /YX /Fo"$(INTDIR)/" /c
496CPP_OBJS=.\Install\Pure/
497CPP_SBRS=.\Install\Pure/
498# ADD BASE MTL /nologo /D "NDEBUG" /win32
499# ADD MTL /nologo /D "NDEBUG" /win32
500MTL_PROJ=/nologo /D "NDEBUG" /win32
501# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
502# ADD RSC /l 0x409 /d "NDEBUG"
503RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Install.res" /d "NDEBUG"
504BSC32=bscmake.exe
505# ADD BASE BSC32 /nologo
506# ADD BSC32 /nologo
507BSC32_FLAGS=/nologo /o"$(OUTDIR)/Install.bsc"
508BSC32_SBRS= \
509 "$(INTDIR)\install.sbr"
510
511"$(OUTDIR)\Install.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
512 $(BSC32) @<<
513 $(BSC32_FLAGS) $(BSC32_SBRS)
514<<
515
516LINK32=link.exe
517# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
518# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib version.lib /nologo /subsystem:windows /machine:I386
519LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
520 advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
521 odbccp32.lib version.lib /nologo /subsystem:windows /incremental:no\
522 /pdb:"$(OUTDIR)/Install.pdb" /machine:I386 /out:"$(OUTDIR)/Install.exe"
523LINK32_OBJS= \
524 "$(INTDIR)\install.obj" \
525 "$(INTDIR)\Install.res"
526
527"$(OUTDIR)\Install.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
528 $(LINK32) @<<
529 $(LINK32_FLAGS) $(LINK32_OBJS)
530<<
531
532!ELSEIF "$(CFG)" == "Install - Win32 Static"
533
534# PROP BASE Use_MFC 2
535# PROP BASE Use_Debug_Libraries 0
536# PROP BASE Output_Dir "Install\Static"
537# PROP BASE Intermediate_Dir "Install\Static"
538# PROP BASE Target_Dir "Install"
539# PROP Use_MFC 0
540# PROP Use_Debug_Libraries 0
541# PROP Output_Dir "Install\Static"
542# PROP Intermediate_Dir "Install\Static"
543# PROP Target_Dir "Install"
544OUTDIR=.\Install\Static
545INTDIR=.\Install\Static
546
547ALL : "$(OUTDIR)\Install.exe"
548
549CLEAN :
550 -@erase "$(INTDIR)\install.obj"
551 -@erase "$(INTDIR)\Install.res"
552 -@erase "$(OUTDIR)\Install.exe"
553
554"$(OUTDIR)" :
555 if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
556
557# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX /c
558# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "STATI_K" /YX /c
559CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
560 "_MBCS" /D "STATI_K" /Fp"$(INTDIR)/Install.pch" /YX /Fo"$(INTDIR)/" /c
561CPP_OBJS=.\Install\Static/
562CPP_SBRS=.\.
563# ADD BASE MTL /nologo /D "NDEBUG" /win32
564# ADD MTL /nologo /D "NDEBUG" /win32
565MTL_PROJ=/nologo /D "NDEBUG" /win32
566# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
567# ADD RSC /l 0x409 /d "NDEBUG" /d "STATI_K"
568RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Install.res" /d "NDEBUG" /d "STATI_K"
569BSC32=bscmake.exe
570# ADD BASE BSC32 /nologo
571# ADD BSC32 /nologo
572BSC32_FLAGS=/nologo /o"$(OUTDIR)/Install.bsc"
573BSC32_SBRS= \
574
575LINK32=link.exe
576# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
577# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib version.lib /nologo /subsystem:windows /machine:I386
578LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
579 advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
580 odbccp32.lib version.lib /nologo /subsystem:windows /incremental:no\
581 /pdb:"$(OUTDIR)/Install.pdb" /machine:I386 /out:"$(OUTDIR)/Install.exe"
582LINK32_OBJS= \
583 "$(INTDIR)\install.obj" \
584 "$(INTDIR)\Install.res"
585
586"$(OUTDIR)\Install.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
587 $(LINK32) @<<
588 $(LINK32_FLAGS) $(LINK32_OBJS)
589<<
590
591!ELSEIF "$(CFG)" == "Install - Win32 Canned"
592
593# PROP BASE Use_MFC 2
594# PROP BASE Use_Debug_Libraries 0
595# PROP BASE Output_Dir "Install\Canned"
596# PROP BASE Intermediate_Dir "Install\Canned"
597# PROP BASE Target_Dir "Install"
598# PROP Use_MFC 0
599# PROP Use_Debug_Libraries 0
600# PROP Output_Dir "Install\Canned"
601# PROP Intermediate_Dir "Install\Canned"
602# PROP Target_Dir "Install"
603OUTDIR=.\Install\Canned
604INTDIR=.\Install\Canned
605
606ALL : "$(OUTDIR)\Install.exe"
607
608CLEAN :
609 -@erase "$(INTDIR)\install.obj"
610 -@erase "$(INTDIR)\Install.res"
611 -@erase "$(OUTDIR)\Install.exe"
612
613"$(OUTDIR)" :
614 if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
615
616# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX /c
617# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "K_ANNED" /YX /c
618CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
619 "_MBCS" /D "K_ANNED" /Fp"$(INTDIR)/Install.pch" /YX /Fo"$(INTDIR)/" /c
620CPP_OBJS=.\Install\Canned/
621CPP_SBRS=.\.
622# ADD BASE MTL /nologo /D "NDEBUG" /win32
623# ADD MTL /nologo /D "NDEBUG" /win32
624MTL_PROJ=/nologo /D "NDEBUG" /win32
625# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
626# ADD RSC /l 0x409 /d "NDEBUG" /d "K_ANNED"
627RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Install.res" /d "NDEBUG" /d "K_ANNED"
628BSC32=bscmake.exe
629# ADD BASE BSC32 /nologo
630# ADD BSC32 /nologo
631BSC32_FLAGS=/nologo /o"$(OUTDIR)/Install.bsc"
632BSC32_SBRS= \
633
634LINK32=link.exe
635# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
636# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib version.lib /nologo /subsystem:windows /machine:I386
637LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
638 advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
639 odbccp32.lib version.lib /nologo /subsystem:windows /incremental:no\
640 /pdb:"$(OUTDIR)/Install.pdb" /machine:I386 /out:"$(OUTDIR)/Install.exe"
641LINK32_OBJS= \
642 "$(INTDIR)\install.obj" \
643 "$(INTDIR)\Install.res"
644
645"$(OUTDIR)\Install.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
646 $(LINK32) @<<
647 $(LINK32_FLAGS) $(LINK32_OBJS)
648<<
649
650!ENDIF
651
652.c{$(CPP_OBJS)}.obj:
653 $(CPP) $(CPP_PROJ) $<
654
655.cpp{$(CPP_OBJS)}.obj:
656 $(CPP) $(CPP_PROJ) $<
657
658.cxx{$(CPP_OBJS)}.obj:
659 $(CPP) $(CPP_PROJ) $<
660
661.c{$(CPP_SBRS)}.sbr:
662 $(CPP) $(CPP_PROJ) $<
663
664.cpp{$(CPP_SBRS)}.sbr:
665 $(CPP) $(CPP_PROJ) $<
666
667.cxx{$(CPP_SBRS)}.sbr:
668 $(CPP) $(CPP_PROJ) $<
669
670################################################################################
671# Begin Target
672
673# Name "PumpKIN - Win32 Release"
674# Name "PumpKIN - Win32 Debug"
675# Name "PumpKIN - Win32 Static"
676
677!IF "$(CFG)" == "PumpKIN - Win32 Release"
678
679!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
680
681!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
682
683!ENDIF
684
685################################################################################
686# Begin Source File
687
688SOURCE=.\PumpKIN.cpp
689DEP_CPP_PUMPK=\
690 ".\pumpkin.h"\
691 ".\PumpKINDlg.h"\
692 ".\shared-code\BellsNWhistles.h"\
693 ".\shared-code\kHelpers.h"\
694 ".\stdafx.h"\
695
696
697!IF "$(CFG)" == "PumpKIN - Win32 Release"
698
699
700"$(INTDIR)\PumpKIN.obj" : $(SOURCE) $(DEP_CPP_PUMPK) "$(INTDIR)"\
701 "$(INTDIR)\pumpkin.pch"
702
703
704!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
705
706
707"$(INTDIR)\PumpKIN.obj" : $(SOURCE) $(DEP_CPP_PUMPK) "$(INTDIR)"\
708 "$(INTDIR)\pumpkin.pch"
709
710"$(INTDIR)\PumpKIN.sbr" : $(SOURCE) $(DEP_CPP_PUMPK) "$(INTDIR)"\
711 "$(INTDIR)\pumpkin.pch"
712
713
714!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
715
716
717"$(INTDIR)\PumpKIN.obj" : $(SOURCE) $(DEP_CPP_PUMPK) "$(INTDIR)"\
718 "$(INTDIR)\pumpkin.pch"
719
720
721!ENDIF
722
723# End Source File
724################################################################################
725# Begin Source File
726
727SOURCE=.\PumpKINDlg.cpp
728
729!IF "$(CFG)" == "PumpKIN - Win32 Release"
730
731DEP_CPP_PUMPKI=\
732 ".\ACLTargetCombo.h"\
733 ".\ConfirmRRQDlg.h"\
734 ".\ConfirmWRQDlg.h"\
735 ".\PropsACL.h"\
736 ".\PropsNetwork.h"\
737 ".\PropsServer.h"\
738 ".\PropsSounds.h"\
739 ".\pumpkin.h"\
740 ".\PumpKINDlg.h"\
741 ".\RequestDlg.h"\
742 ".\Resolver.h"\
743 ".\Retrier.h"\
744 ".\shared-code\BellsNWhistles.h"\
745 ".\shared-code\kHelpers.h"\
746 ".\stdafx.h"\
747 ".\Trayer.h"\
748
749
750"$(INTDIR)\PumpKINDlg.obj" : $(SOURCE) $(DEP_CPP_PUMPKI) "$(INTDIR)"\
751 "$(INTDIR)\pumpkin.pch"
752
753
754!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
755
756DEP_CPP_PUMPKI=\
757 ".\ACLTargetCombo.h"\
758 ".\ConfirmRRQDlg.h"\
759 ".\ConfirmWRQDlg.h"\
760 ".\PropsACL.h"\
761 ".\PropsNetwork.h"\
762 ".\PropsServer.h"\
763 ".\PropsSounds.h"\
764 ".\pumpkin.h"\
765 ".\PumpKINDlg.h"\
766 ".\RequestDlg.h"\
767 ".\Resolver.h"\
768 ".\Retrier.h"\
769 ".\shared-code\kHelpers.h"\
770 ".\stdafx.h"\
771 ".\Trayer.h"\
772
773NODEP_CPP_PUMPKI=\
774 ".\DoSelect"\
775
776
777"$(INTDIR)\PumpKINDlg.obj" : $(SOURCE) $(DEP_CPP_PUMPKI) "$(INTDIR)"\
778 "$(INTDIR)\pumpkin.pch"
779
780"$(INTDIR)\PumpKINDlg.sbr" : $(SOURCE) $(DEP_CPP_PUMPKI) "$(INTDIR)"\
781 "$(INTDIR)\pumpkin.pch"
782
783
784!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
785
786DEP_CPP_PUMPKI=\
787 ".\ACLTargetCombo.h"\
788 ".\ConfirmRRQDlg.h"\
789 ".\ConfirmWRQDlg.h"\
790 ".\PropsACL.h"\
791 ".\PropsNetwork.h"\
792 ".\PropsServer.h"\
793 ".\PropsSounds.h"\
794 ".\pumpkin.h"\
795 ".\PumpKINDlg.h"\
796 ".\RequestDlg.h"\
797 ".\Resolver.h"\
798 ".\Retrier.h"\
799 ".\shared-code\BellsNWhistles.h"\
800 ".\shared-code\kHelpers.h"\
801 ".\stdafx.h"\
802 ".\Trayer.h"\
803
804
805"$(INTDIR)\PumpKINDlg.obj" : $(SOURCE) $(DEP_CPP_PUMPKI) "$(INTDIR)"\
806 "$(INTDIR)\pumpkin.pch"
807
808
809!ENDIF
810
811# End Source File
812################################################################################
813# Begin Source File
814
815SOURCE=.\StdAfx.cpp
816DEP_CPP_STDAF=\
817 ".\shared-code\BellsNWhistles.h"\
818 ".\shared-code\kHelpers.h"\
819 ".\stdafx.h"\
820
821
822!IF "$(CFG)" == "PumpKIN - Win32 Release"
823
824# ADD CPP /Yc"stdafx.h"
825
826BuildCmds= \
827 $(CPP) /nologo /Zp1 /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
828 "_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/pumpkin.pch" /Yc"stdafx.h" /Fo"$(INTDIR)/"\
829 /c $(SOURCE) \
830
831
832"$(INTDIR)\StdAfx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
833 $(BuildCmds)
834
835"$(INTDIR)\pumpkin.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
836 $(BuildCmds)
837
838!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
839
840# ADD CPP /Yc"stdafx.h"
841
842BuildCmds= \
843 $(CPP) /nologo /Zp1 /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D\
844 "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/pumpkin.pch"\
845 /Yc"stdafx.h" /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c $(SOURCE) \
846
847
848"$(INTDIR)\StdAfx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
849 $(BuildCmds)
850
851"$(INTDIR)\StdAfx.sbr" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
852 $(BuildCmds)
853
854"$(INTDIR)\pumpkin.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
855 $(BuildCmds)
856
857!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
858
859# ADD BASE CPP /Yc"stdafx.h"
860# ADD CPP /Yc"stdafx.h"
861
862BuildCmds= \
863 $(CPP) /nologo /Zp1 /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
864 "_MBCS" /Fp"$(INTDIR)/pumpkin.pch" /Yc"stdafx.h" /Fo"$(INTDIR)/" /c $(SOURCE) \
865
866
867"$(INTDIR)\StdAfx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
868 $(BuildCmds)
869
870"$(INTDIR)\pumpkin.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
871 $(BuildCmds)
872
873!ENDIF
874
875# End Source File
876################################################################################
877# Begin Source File
878
879SOURCE=.\pumpkin.rc
880DEP_RSC_PUMPKIN=\
881 ".\res\down.ico"\
882 ".\res\failed.wav"\
883 ".\res\finished.wav"\
884 ".\res\PumpKIN.ico"\
885 ".\res\pumpkin.rc2"\
886 ".\res\remove.ico"\
887 ".\res\ring.wav"\
888 ".\res\rrq.ico"\
889 ".\res\up.ico"\
890 ".\res\wrq.ico"\
891 ".\shared-data\browse-icon.ico"\
892 ".\shared-data\klever-background.bmp"\
893 ".\shared-data\play-icon.ico"\
894
895
896!IF "$(CFG)" == "PumpKIN - Win32 Release"
897
898
899"$(INTDIR)\pumpkin.res" : $(SOURCE) $(DEP_RSC_PUMPKIN) "$(INTDIR)"
900 $(RSC) $(RSC_PROJ) $(SOURCE)
901
902
903!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
904
905
906"$(INTDIR)\pumpkin.res" : $(SOURCE) $(DEP_RSC_PUMPKIN) "$(INTDIR)"
907 $(RSC) $(RSC_PROJ) $(SOURCE)
908
909
910!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
911
912
913"$(INTDIR)\pumpkin.res" : $(SOURCE) $(DEP_RSC_PUMPKIN) "$(INTDIR)"
914 $(RSC) $(RSC_PROJ) $(SOURCE)
915
916
917!ENDIF
918
919# End Source File
920################################################################################
921# Begin Source File
922
923SOURCE=.\help\pumpkin.hpj
924
925!IF "$(CFG)" == "PumpKIN - Win32 Release"
926
927# Begin Custom Build - Making help files...
928OutDir=.\Release
929ProjDir=.
930TargetName=pumpkin
931InputPath=.\help\pumpkin.hpj
932
933BuildCmds= \
934 "$(ProjDir)\makehelp.bat" \
935 compress $(OutDir)\$(TargetName).hlp $(OutDir)\$(TargetName).hl_ \
936 compress $(OutDir)\$(TargetName).cnt $(OutDir)\$(TargetName).cn_ \
937
938
939"$(OutDir)\$(TargetName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
940 $(BuildCmds)
941
942"$(OutDir)\$(TargetName).cnt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
943 $(BuildCmds)
944
945"$(OutDir)\$(TargetName).hl_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
946 $(BuildCmds)
947
948"$(OutDir)\$(TargetName).cn_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
949 $(BuildCmds)
950# End Custom Build
951
952!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
953
954# Begin Custom Build - Making help files...
955OutDir=.\Debug
956ProjDir=.
957TargetName=pumpkin
958InputPath=.\help\pumpkin.hpj
959
960BuildCmds= \
961 "$(ProjDir)\makehelp.bat" \
962 compress $(OutDir)\$(TargetName).hlp $(OutDir)\$(TargetName).hl_ \
963 compress $(OutDir)\$(TargetName).cnt $(OutDir)\$(TargetName).cn_ \
964
965
966"$(OutDir)\$(TargetName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
967 $(BuildCmds)
968
969"$(OutDir)\$(TargetName).cnt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
970 $(BuildCmds)
971
972"$(OutDir)\$(TargetName).hl_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
973 $(BuildCmds)
974
975"$(OutDir)\$(TargetName).cn_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
976 $(BuildCmds)
977# End Custom Build
978
979!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
980
981# Begin Custom Build - Making help files...
982OutDir=.\Releast
983ProjDir=.
984TargetName=pumpkin
985InputPath=.\help\pumpkin.hpj
986
987BuildCmds= \
988 "$(ProjDir)\makehelp.bat" \
989 compress $(OutDir)\$(TargetName).hlp $(OutDir)\$(TargetName).hl_ \
990 compress $(OutDir)\$(TargetName).cnt $(OutDir)\$(TargetName).cn_ \
991
992
993"$(OutDir)\$(TargetName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
994 $(BuildCmds)
995
996"$(OutDir)\$(TargetName).cnt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
997 $(BuildCmds)
998
999"$(OutDir)\$(TargetName).hl_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
1000 $(BuildCmds)
1001
1002"$(OutDir)\$(TargetName).cn_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
1003 $(BuildCmds)
1004# End Custom Build
1005
1006!ENDIF
1007
1008# End Source File
1009################################################################################
1010# Begin Source File
1011
1012SOURCE=.\PropsServer.cpp
1013DEP_CPP_PROPS=\
1014 ".\PropsServer.h"\
1015 ".\pumpkin.h"\
1016 ".\shared-code\BellsNWhistles.h"\
1017 ".\shared-code\kHelpers.h"\
1018 ".\stdafx.h"\
1019
1020
1021!IF "$(CFG)" == "PumpKIN - Win32 Release"
1022
1023
1024"$(INTDIR)\PropsServer.obj" : $(SOURCE) $(DEP_CPP_PROPS) "$(INTDIR)"\
1025 "$(INTDIR)\pumpkin.pch"
1026
1027
1028!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
1029
1030
1031"$(INTDIR)\PropsServer.obj" : $(SOURCE) $(DEP_CPP_PROPS) "$(INTDIR)"\
1032 "$(INTDIR)\pumpkin.pch"
1033
1034"$(INTDIR)\PropsServer.sbr" : $(SOURCE) $(DEP_CPP_PROPS) "$(INTDIR)"\
1035 "$(INTDIR)\pumpkin.pch"
1036
1037
1038!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
1039
1040
1041"$(INTDIR)\PropsServer.obj" : $(SOURCE) $(DEP_CPP_PROPS) "$(INTDIR)"\
1042 "$(INTDIR)\pumpkin.pch"
1043
1044
1045!ENDIF
1046
1047# End Source File
1048################################################################################
1049# Begin Source File
1050
1051SOURCE=.\PropsNetwork.cpp
1052DEP_CPP_PROPSN=\
1053 ".\PropsNetwork.h"\
1054 ".\pumpkin.h"\
1055 ".\shared-code\BellsNWhistles.h"\
1056 ".\shared-code\kHelpers.h"\
1057 ".\stdafx.h"\
1058
1059
1060!IF "$(CFG)" == "PumpKIN - Win32 Release"
1061
1062
1063"$(INTDIR)\PropsNetwork.obj" : $(SOURCE) $(DEP_CPP_PROPSN) "$(INTDIR)"\
1064 "$(INTDIR)\pumpkin.pch"
1065
1066
1067!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
1068
1069
1070"$(INTDIR)\PropsNetwork.obj" : $(SOURCE) $(DEP_CPP_PROPSN) "$(INTDIR)"\
1071 "$(INTDIR)\pumpkin.pch"
1072
1073"$(INTDIR)\PropsNetwork.sbr" : $(SOURCE) $(DEP_CPP_PROPSN) "$(INTDIR)"\
1074 "$(INTDIR)\pumpkin.pch"
1075
1076
1077!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
1078
1079
1080"$(INTDIR)\PropsNetwork.obj" : $(SOURCE) $(DEP_CPP_PROPSN) "$(INTDIR)"\
1081 "$(INTDIR)\pumpkin.pch"
1082
1083
1084!ENDIF
1085
1086# End Source File
1087################################################################################
1088# Begin Source File
1089
1090SOURCE=.\ConfirmRRQDlg.cpp
1091DEP_CPP_CONFI=\
1092 ".\ConfirmRRQDlg.h"\
1093 ".\pumpkin.h"\
1094 ".\PumpKINDlg.h"\
1095 ".\shared-code\BellsNWhistles.h"\
1096 ".\shared-code\kHelpers.h"\
1097 ".\stdafx.h"\
1098
1099
1100!IF "$(CFG)" == "PumpKIN - Win32 Release"
1101
1102
1103"$(INTDIR)\ConfirmRRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFI) "$(INTDIR)"\
1104 "$(INTDIR)\pumpkin.pch"
1105
1106
1107!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
1108
1109
1110"$(INTDIR)\ConfirmRRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFI) "$(INTDIR)"\
1111 "$(INTDIR)\pumpkin.pch"
1112
1113"$(INTDIR)\ConfirmRRQDlg.sbr" : $(SOURCE) $(DEP_CPP_CONFI) "$(INTDIR)"\
1114 "$(INTDIR)\pumpkin.pch"
1115
1116
1117!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
1118
1119
1120"$(INTDIR)\ConfirmRRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFI) "$(INTDIR)"\
1121 "$(INTDIR)\pumpkin.pch"
1122
1123
1124!ENDIF
1125
1126# End Source File
1127################################################################################
1128# Begin Source File
1129
1130SOURCE=.\ConfirmWRQDlg.cpp
1131DEP_CPP_CONFIR=\
1132 ".\ConfirmWRQDlg.h"\
1133 ".\pumpkin.h"\
1134 ".\PumpKINDlg.h"\
1135 ".\shared-code\BellsNWhistles.h"\
1136 ".\shared-code\kHelpers.h"\
1137 ".\stdafx.h"\
1138
1139
1140!IF "$(CFG)" == "PumpKIN - Win32 Release"
1141
1142
1143"$(INTDIR)\ConfirmWRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFIR) "$(INTDIR)"\
1144 "$(INTDIR)\pumpkin.pch"
1145
1146
1147!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
1148
1149
1150"$(INTDIR)\ConfirmWRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFIR) "$(INTDIR)"\
1151 "$(INTDIR)\pumpkin.pch"
1152
1153"$(INTDIR)\ConfirmWRQDlg.sbr" : $(SOURCE) $(DEP_CPP_CONFIR) "$(INTDIR)"\
1154 "$(INTDIR)\pumpkin.pch"
1155
1156
1157!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
1158
1159
1160"$(INTDIR)\ConfirmWRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFIR) "$(INTDIR)"\
1161 "$(INTDIR)\pumpkin.pch"
1162
1163
1164!ENDIF
1165
1166# End Source File
1167################################################################################
1168# Begin Source File
1169
1170SOURCE=.\RequestDlg.cpp
1171DEP_CPP_REQUE=\
1172 ".\pumpkin.h"\
1173 ".\RequestDlg.h"\
1174 ".\shared-code\BellsNWhistles.h"\
1175 ".\shared-code\kHelpers.h"\
1176 ".\stdafx.h"\
1177
1178
1179!IF "$(CFG)" == "PumpKIN - Win32 Release"
1180
1181
1182"$(INTDIR)\RequestDlg.obj" : $(SOURCE) $(DEP_CPP_REQUE) "$(INTDIR)"\
1183 "$(INTDIR)\pumpkin.pch"
1184
1185
1186!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
1187
1188
1189"$(INTDIR)\RequestDlg.obj" : $(SOURCE) $(DEP_CPP_REQUE) "$(INTDIR)"\
1190 "$(INTDIR)\pumpkin.pch"
1191
1192"$(INTDIR)\RequestDlg.sbr" : $(SOURCE) $(DEP_CPP_REQUE) "$(INTDIR)"\
1193 "$(INTDIR)\pumpkin.pch"
1194
1195
1196!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
1197
1198
1199"$(INTDIR)\RequestDlg.obj" : $(SOURCE) $(DEP_CPP_REQUE) "$(INTDIR)"\
1200 "$(INTDIR)\pumpkin.pch"
1201
1202
1203!ENDIF
1204
1205# End Source File
1206################################################################################
1207# Begin Source File
1208
1209SOURCE=.\Resolver.cpp
1210DEP_CPP_RESOL=\
1211 ".\pumpkin.h"\
1212 ".\PumpKINDlg.h"\
1213 ".\Resolver.h"\
1214 ".\shared-code\BellsNWhistles.h"\
1215 ".\shared-code\kHelpers.h"\
1216 ".\stdafx.h"\
1217
1218
1219!IF "$(CFG)" == "PumpKIN - Win32 Release"
1220
1221
1222"$(INTDIR)\Resolver.obj" : $(SOURCE) $(DEP_CPP_RESOL) "$(INTDIR)"\
1223 "$(INTDIR)\pumpkin.pch"
1224
1225
1226!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
1227
1228
1229"$(INTDIR)\Resolver.obj" : $(SOURCE) $(DEP_CPP_RESOL) "$(INTDIR)"\
1230 "$(INTDIR)\pumpkin.pch"
1231
1232"$(INTDIR)\Resolver.sbr" : $(SOURCE) $(DEP_CPP_RESOL) "$(INTDIR)"\
1233 "$(INTDIR)\pumpkin.pch"
1234
1235
1236!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
1237
1238
1239"$(INTDIR)\Resolver.obj" : $(SOURCE) $(DEP_CPP_RESOL) "$(INTDIR)"\
1240 "$(INTDIR)\pumpkin.pch"
1241
1242
1243!ENDIF
1244
1245# End Source File
1246################################################################################
1247# Begin Source File
1248
1249SOURCE=.\Retrier.cpp
1250DEP_CPP_RETRI=\
1251 ".\pumpkin.h"\
1252 ".\PumpKINDlg.h"\
1253 ".\Retrier.h"\
1254 ".\shared-code\BellsNWhistles.h"\
1255 ".\shared-code\kHelpers.h"\
1256 ".\stdafx.h"\
1257
1258
1259!IF "$(CFG)" == "PumpKIN - Win32 Release"
1260
1261
1262"$(INTDIR)\Retrier.obj" : $(SOURCE) $(DEP_CPP_RETRI) "$(INTDIR)"\
1263 "$(INTDIR)\pumpkin.pch"
1264
1265
1266!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
1267
1268
1269"$(INTDIR)\Retrier.obj" : $(SOURCE) $(DEP_CPP_RETRI) "$(INTDIR)"\
1270 "$(INTDIR)\pumpkin.pch"
1271
1272"$(INTDIR)\Retrier.sbr" : $(SOURCE) $(DEP_CPP_RETRI) "$(INTDIR)"\
1273 "$(INTDIR)\pumpkin.pch"
1274
1275
1276!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
1277
1278
1279"$(INTDIR)\Retrier.obj" : $(SOURCE) $(DEP_CPP_RETRI) "$(INTDIR)"\
1280 "$(INTDIR)\pumpkin.pch"
1281
1282
1283!ENDIF
1284
1285# End Source File
1286################################################################################
1287# Begin Source File
1288
1289SOURCE=.\Trayer.cpp
1290DEP_CPP_TRAYE=\
1291 ".\pumpkin.h"\
1292 ".\PumpKINDlg.h"\
1293 ".\shared-code\BellsNWhistles.h"\
1294 ".\shared-code\kHelpers.h"\
1295 ".\stdafx.h"\
1296 ".\Trayer.h"\
1297
1298
1299!IF "$(CFG)" == "PumpKIN - Win32 Release"
1300
1301
1302"$(INTDIR)\Trayer.obj" : $(SOURCE) $(DEP_CPP_TRAYE) "$(INTDIR)"\
1303 "$(INTDIR)\pumpkin.pch"
1304
1305
1306!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
1307
1308
1309"$(INTDIR)\Trayer.obj" : $(SOURCE) $(DEP_CPP_TRAYE) "$(INTDIR)"\
1310 "$(INTDIR)\pumpkin.pch"
1311
1312"$(INTDIR)\Trayer.sbr" : $(SOURCE) $(DEP_CPP_TRAYE) "$(INTDIR)"\
1313 "$(INTDIR)\pumpkin.pch"
1314
1315
1316!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
1317
1318
1319"$(INTDIR)\Trayer.obj" : $(SOURCE) $(DEP_CPP_TRAYE) "$(INTDIR)"\
1320 "$(INTDIR)\pumpkin.pch"
1321
1322
1323!ENDIF
1324
1325# End Source File
1326################################################################################
1327# Begin Source File
1328
1329SOURCE=.\help\pumpkin.cnt
1330
1331!IF "$(CFG)" == "PumpKIN - Win32 Release"
1332
1333# PROP Exclude_From_Build 1
1334
1335!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
1336
1337# PROP Exclude_From_Build 1
1338
1339!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
1340
1341# PROP Exclude_From_Build 1
1342
1343!ENDIF
1344
1345# End Source File
1346################################################################################
1347# Begin Source File
1348
1349SOURCE=.\PropsSounds.cpp
1350DEP_CPP_PROPSS=\
1351 ".\PropsSounds.h"\
1352 ".\pumpkin.h"\
1353 ".\PumpKINDlg.h"\
1354 ".\shared-code\BellsNWhistles.h"\
1355 ".\shared-code\kHelpers.h"\
1356 ".\stdafx.h"\
1357
1358
1359!IF "$(CFG)" == "PumpKIN - Win32 Release"
1360
1361
1362"$(INTDIR)\PropsSounds.obj" : $(SOURCE) $(DEP_CPP_PROPSS) "$(INTDIR)"\
1363 "$(INTDIR)\pumpkin.pch"
1364
1365
1366!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
1367
1368
1369"$(INTDIR)\PropsSounds.obj" : $(SOURCE) $(DEP_CPP_PROPSS) "$(INTDIR)"\
1370 "$(INTDIR)\pumpkin.pch"
1371
1372"$(INTDIR)\PropsSounds.sbr" : $(SOURCE) $(DEP_CPP_PROPSS) "$(INTDIR)"\
1373 "$(INTDIR)\pumpkin.pch"
1374
1375
1376!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
1377
1378
1379"$(INTDIR)\PropsSounds.obj" : $(SOURCE) $(DEP_CPP_PROPSS) "$(INTDIR)"\
1380 "$(INTDIR)\pumpkin.pch"
1381
1382
1383!ENDIF
1384
1385# End Source File
1386################################################################################
1387# Begin Source File
1388
1389SOURCE=.\PropsACL.cpp
1390DEP_CPP_PROPSA=\
1391 ".\ACLTargetCombo.h"\
1392 ".\PropsACL.h"\
1393 ".\pumpkin.h"\
1394 ".\PumpKINDlg.h"\
1395 ".\shared-code\BellsNWhistles.h"\
1396 ".\shared-code\kHelpers.h"\
1397 ".\stdafx.h"\
1398
1399
1400!IF "$(CFG)" == "PumpKIN - Win32 Release"
1401
1402
1403"$(INTDIR)\PropsACL.obj" : $(SOURCE) $(DEP_CPP_PROPSA) "$(INTDIR)"\
1404 "$(INTDIR)\pumpkin.pch"
1405
1406
1407!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
1408
1409
1410"$(INTDIR)\PropsACL.obj" : $(SOURCE) $(DEP_CPP_PROPSA) "$(INTDIR)"\
1411 "$(INTDIR)\pumpkin.pch"
1412
1413"$(INTDIR)\PropsACL.sbr" : $(SOURCE) $(DEP_CPP_PROPSA) "$(INTDIR)"\
1414 "$(INTDIR)\pumpkin.pch"
1415
1416
1417!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
1418
1419
1420"$(INTDIR)\PropsACL.obj" : $(SOURCE) $(DEP_CPP_PROPSA) "$(INTDIR)"\
1421 "$(INTDIR)\pumpkin.pch"
1422
1423
1424!ENDIF
1425
1426# End Source File
1427################################################################################
1428# Begin Source File
1429
1430SOURCE=.\ACLTargetCombo.cpp
1431DEP_CPP_ACLTA=\
1432 ".\ACLTargetCombo.h"\
1433 ".\pumpkin.h"\
1434 ".\PumpKINDlg.h"\
1435 ".\shared-code\BellsNWhistles.h"\
1436 ".\shared-code\kHelpers.h"\
1437 ".\stdafx.h"\
1438
1439
1440!IF "$(CFG)" == "PumpKIN - Win32 Release"
1441
1442
1443"$(INTDIR)\ACLTargetCombo.obj" : $(SOURCE) $(DEP_CPP_ACLTA) "$(INTDIR)"\
1444 "$(INTDIR)\pumpkin.pch"
1445
1446
1447!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
1448
1449
1450"$(INTDIR)\ACLTargetCombo.obj" : $(SOURCE) $(DEP_CPP_ACLTA) "$(INTDIR)"\
1451 "$(INTDIR)\pumpkin.pch"
1452
1453"$(INTDIR)\ACLTargetCombo.sbr" : $(SOURCE) $(DEP_CPP_ACLTA) "$(INTDIR)"\
1454 "$(INTDIR)\pumpkin.pch"
1455
1456
1457!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
1458
1459
1460"$(INTDIR)\ACLTargetCombo.obj" : $(SOURCE) $(DEP_CPP_ACLTA) "$(INTDIR)"\
1461 "$(INTDIR)\pumpkin.pch"
1462
1463
1464!ENDIF
1465
1466# End Source File
1467# End Target
1468################################################################################
1469# Begin Target
1470
1471# Name "Install - Win32 Debug"
1472# Name "Install - Win32 Pure"
1473# Name "Install - Win32 Static"
1474# Name "Install - Win32 Canned"
1475
1476!IF "$(CFG)" == "Install - Win32 Debug"
1477
1478!ELSEIF "$(CFG)" == "Install - Win32 Pure"
1479
1480!ELSEIF "$(CFG)" == "Install - Win32 Static"
1481
1482!ELSEIF "$(CFG)" == "Install - Win32 Canned"
1483
1484!ENDIF
1485
1486################################################################################
1487# Begin Source File
1488
1489SOURCE=.\Install\Install.rc
1490DEP_RSC_INSTA=\
1491 ".\Install\Custom.rch"\
1492 ".\shared-data\install-icon.ico"\
1493
1494
1495!IF "$(CFG)" == "Install - Win32 Debug"
1496
1497
1498"$(INTDIR)\Install.res" : $(SOURCE) $(DEP_RSC_INSTA) "$(INTDIR)"
1499 $(RSC) /l 0x409 /fo"$(INTDIR)/Install.res" /i "Install" /d "_DEBUG"\
1500 $(SOURCE)
1501
1502
1503!ELSEIF "$(CFG)" == "Install - Win32 Pure"
1504
1505
1506"$(INTDIR)\Install.res" : $(SOURCE) $(DEP_RSC_INSTA) "$(INTDIR)"
1507 $(RSC) /l 0x409 /fo"$(INTDIR)/Install.res" /i "Install" /d "NDEBUG"\
1508 $(SOURCE)
1509
1510
1511!ELSEIF "$(CFG)" == "Install - Win32 Static"
1512
1513
1514"$(INTDIR)\Install.res" : $(SOURCE) $(DEP_RSC_INSTA) "$(INTDIR)"
1515 $(RSC) /l 0x409 /fo"$(INTDIR)/Install.res" /i "Install" /d "NDEBUG" /d\
1516 "STATI_K" $(SOURCE)
1517
1518
1519!ELSEIF "$(CFG)" == "Install - Win32 Canned"
1520
1521
1522"$(INTDIR)\Install.res" : $(SOURCE) $(DEP_RSC_INSTA) "$(INTDIR)"
1523 $(RSC) /l 0x409 /fo"$(INTDIR)/Install.res" /i "Install" /d "NDEBUG" /d\
1524 "K_ANNED" $(SOURCE)
1525
1526
1527!ENDIF
1528
1529# End Source File
1530################################################################################
1531# Begin Source File
1532
1533SOURCE=.\Install\install.cpp
1534DEP_CPP_INSTAL=\
1535 ".\shared-code\install.h"\
1536
1537
1538!IF "$(CFG)" == "Install - Win32 Debug"
1539
1540
1541"$(INTDIR)\install.obj" : $(SOURCE) $(DEP_CPP_INSTAL) "$(INTDIR)"
1542 $(CPP) $(CPP_PROJ) $(SOURCE)
1543
1544
1545!ELSEIF "$(CFG)" == "Install - Win32 Pure"
1546
1547
1548BuildCmds= \
1549 $(CPP) $(CPP_PROJ) $(SOURCE) \
1550
1551
1552"$(INTDIR)\install.obj" : $(SOURCE) $(DEP_CPP_INSTAL) "$(INTDIR)"
1553 $(BuildCmds)
1554
1555"$(INTDIR)\install.sbr" : $(SOURCE) $(DEP_CPP_INSTAL) "$(INTDIR)"
1556 $(BuildCmds)
1557
1558!ELSEIF "$(CFG)" == "Install - Win32 Static"
1559
1560
1561"$(INTDIR)\install.obj" : $(SOURCE) $(DEP_CPP_INSTAL) "$(INTDIR)"
1562 $(CPP) $(CPP_PROJ) $(SOURCE)
1563
1564
1565!ELSEIF "$(CFG)" == "Install - Win32 Canned"
1566
1567
1568"$(INTDIR)\install.obj" : $(SOURCE) $(DEP_CPP_INSTAL) "$(INTDIR)"
1569 $(CPP) $(CPP_PROJ) $(SOURCE)
1570
1571
1572!ENDIF
1573
1574# End Source File
1575# End Target
1576# End Project
1577################################################################################
1578################################################################################
1579# Section PumpKIN : {4FD78B34-1FD7-11D0-A9FB-444553540000}
1580 # 2:11:CPumpKINDlg:1
1581 # 2:11:CRequestDlg:1
1582# End Section
1583################################################################################
diff --git a/pumpkin.rc b/pumpkin.rc
deleted file mode 100755
index 6f01fdf..0000000
--- a/pumpkin.rc
+++ b/dev/null
@@ -1,689 +0,0 @@
1//Microsoft Developer Studio generated resource script.
2//
3#include "resource.h"
4
5#define APSTUDIO_READONLY_SYMBOLS
6/////////////////////////////////////////////////////////////////////////////
7//
8// Generated from the TEXTINCLUDE 2 resource.
9//
10#include "afxres.h"
11
12/////////////////////////////////////////////////////////////////////////////
13#undef APSTUDIO_READONLY_SYMBOLS
14
15/////////////////////////////////////////////////////////////////////////////
16// English (U.S.) resources
17
18#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19#ifdef _WIN32
20LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21#pragma code_page(1252)
22#endif //_WIN32
23
24#ifdef APSTUDIO_INVOKED
25/////////////////////////////////////////////////////////////////////////////
26//
27// TEXTINCLUDE
28//
29
301 TEXTINCLUDE DISCARDABLE
31BEGIN
32 "resource.h\0"
33END
34
352 TEXTINCLUDE DISCARDABLE
36BEGIN
37 "#include ""afxres.h""\r\n"
38 "\0"
39END
40
413 TEXTINCLUDE DISCARDABLE
42BEGIN
43 "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
44 "#define _AFX_NO_OLE_RESOURCES\r\n"
45 "#define _AFX_NO_TRACKER_RESOURCES\r\n"
46 "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
47 "\r\n"
48 "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
49 "#ifdef _WIN32\r\n"
50 "LANGUAGE 9, 1\r\n"
51 "#pragma code_page(1252)\r\n"
52 "#endif\r\n"
53 "#include ""res\\PumpKIN.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
54 "#include ""afxres.rc"" // Standard components\r\n"
55 "#endif\0"
56END
57
58#endif // APSTUDIO_INVOKED
59
60
61/////////////////////////////////////////////////////////////////////////////
62//
63// Icon
64//
65
66// Icon with lowest ID value placed first to ensure application icon
67// remains consistent on all systems.
68IDI_RRQ ICON DISCARDABLE "res\\wrq.ico"
69IDI_WRQ ICON DISCARDABLE "res\\rrq.ico"
70IDI_BROWSE ICON DISCARDABLE "shared-data/browse-icon.ico"
71IDR_MAINFRAME ICON DISCARDABLE "res\\pumpkin.ico"
72IDI_PLAY ICON DISCARDABLE "shared-data/play-icon.ico"
73IDI_UP ICON DISCARDABLE "res\\up.ico"
74IDI_DOWN ICON DISCARDABLE "res\\down.ico"
75IDI_REMOVE ICON DISCARDABLE "res\\remove.ico"
76
77/////////////////////////////////////////////////////////////////////////////
78//
79// Dialog
80//
81
82IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 217, 74
83STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
84CAPTION "About PumpKIN"
85FONT 8, "MS Sans Serif"
86BEGIN
87 ICON IDR_MAINFRAME,IDC_STATIC,7,17,18,20
88 LTEXT "PumpKIN, Version 2.7.3",IDC_STATIC,40,15,119,8,
89 SS_NOPREFIX
90 LTEXT "Copyright © 1997-2011 Klever Group",IDC_STATIC,40,30,
91 170,8
92 DEFPUSHBUTTON "OK",IDOK,178,7,32,14,WS_GROUP
93 PUSHBUTTON "http://www.klever.net/",IDC_KLEVERNET,124,53,86,14
94END
95
96IDD_PUMPKIN_DIALOG DIALOGEX 0, 0, 362, 193
97STYLE DS_3DLOOK | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
98EXSTYLE WS_EX_ACCEPTFILES | WS_EX_APPWINDOW
99CAPTION " PumpKIN"
100FONT 8, "MS Sans Serif", 0, 0, 0x1
101BEGIN
102 CONTROL "List1",IDC_CONNECTIONS,"SysListView32",LVS_REPORT |
103 LVS_AUTOARRANGE | WS_BORDER | WS_TABSTOP,7,7,295,108,
104 WS_EX_DLGMODALFRAME
105 PUSHBUTTON "&Get File",IDC_GET,305,7,50,17,BS_NOTIFY,
106 WS_EX_CLIENTEDGE
107 PUSHBUTTON "&Put File",IDC_PUT,305,25,50,17,BS_NOTIFY,
108 WS_EX_CLIENTEDGE
109 PUSHBUTTON "&Abort xfer",IDC_ABORT,305,43,50,17,BS_NOTIFY,
110 WS_EX_CLIENTEDGE
111 PUSHBUTTON "&Options",IDC_OPTIONS,305,61,50,17,BS_NOTIFY,
112 WS_EX_CLIENTEDGE
113 PUSHBUTTON "E&xit",IDC_EXIT,305,79,50,17,BS_NOTIFY,WS_EX_CLIENTEDGE
114 PUSHBUTTON "&Help",ID_HELP,305,97,50,17,BS_NOTIFY,WS_EX_CLIENTEDGE
115 LISTBOX IDC_LOG,7,115,348,64,LBS_USETABSTOPS |
116 LBS_NOINTEGRALHEIGHT | LBS_NOSEL | WS_VSCROLL |
117 WS_HSCROLL,WS_EX_DLGMODALFRAME
118 PUSHBUTTON "..",IDCANCEL,0,183,6,7,NOT WS_VISIBLE | NOT WS_TABSTOP
119 CONTROL "&Server is running",IDC_LISTENING,"Button",
120 BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT | WS_TABSTOP,286,
121 181,69,11,WS_EX_TRANSPARENT | WS_EX_STATICEDGE
122END
123
124IDD_PROPS_SERVER DIALOG DISCARDABLE 0, 0, 300, 201
125STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
126CAPTION "Server"
127FONT 8, "MS Sans Serif"
128BEGIN
129 GROUPBOX "TFTP filesystem &root (download path)",IDC_STATIC,7,7,
130 286,38
131 EDITTEXT IDC_TFTPROOT,13,16,256,13,ES_AUTOHSCROLL
132 PUSHBUTTON "&B",IDC_BROWSE,274,16,13,13,BS_ICON
133 CONTROL "Allow access to &subdirectories",IDC_TFTPSUBDIRS,
134 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,31,111,10
135 GROUPBOX "Read Request Behavior",IDC_STATIC,7,48,243,56
136 CONTROL "Give &all files",IDC_RRQ_GIVEALL,"Button",
137 BS_AUTORADIOBUTTON | BS_NOTIFY | WS_GROUP,13,63,53,10
138 CONTROL "&Prompt before giving file",IDC_RRQ_ALWAYSCONFIRM,
139 "Button",BS_AUTORADIOBUTTON | BS_NOTIFY,43,75,91,10
140 CONTROL "&Deny all requests",IDC_RRQ_DENYALL,"Button",
141 BS_AUTORADIOBUTTON | BS_NOTIFY,73,87,70,10
142 GROUPBOX "Write Request Behavior",IDC_STATIC,7,106,243,56,
143 WS_GROUP
144 CONTROL "Take a&ll files",IDC_WRQ_TAKEALL,"Button",
145 BS_AUTORADIOBUTTON | WS_GROUP,13,116,55,10
146 CONTROL "Prompt if file &exists",IDC_WRQ_PROMPTEXISTING,"Button",
147 BS_AUTORADIOBUTTON,43,126,73,10
148 CONTROL "Always pro&mpt before accepting file",
149 IDC_WRQ_ALWAYSCONFIRM,"Button",BS_AUTORADIOBUTTON,73,136,
150 139,10
151 CONTROL "D&eny all requests",IDC_WRQ_DENYALL,"Button",
152 BS_AUTORADIOBUTTON,103,146,70,10
153 CTEXT "Confirmation &timeout",IDC_STATIC,253,52,40,19,
154 SS_NOTIFY
155 CONTROL "Slider1",IDC_PROMPTTIMEOUT,"msctls_trackbar32",
156 TBS_AUTOTICKS | TBS_VERT | TBS_TOP | WS_TABSTOP,272,72,
157 21,90
158 GROUPBOX "Log file (leave empty to disable logging to file)",
159 IDC_STATIC,7,165,286,29
160 EDITTEXT IDC_LOGFILE,13,175,256,13,ES_AUTOHSCROLL
161 PUSHBUTTON "",IDC_LOGFILE_BROWSE,274,175,13,13,BS_ICON
162END
163
164IDD_PROPS_NETWORK DIALOG DISCARDABLE 0, 0, 300, 201
165STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
166CAPTION "Network"
167FONT 8, "MS Sans Serif"
168BEGIN
169 GROUPBOX "UDP Ports",IDC_STATIC,7,7,286,55
170 RTEXT "Listen for &incoming requests on port:",IDC_STATIC,13,
171 18,135,8
172 EDITTEXT IDC_LISTENPORT,154,16,61,13,ES_AUTOHSCROLL
173 CONTROL "Spin1",IDC_LISTENSPIN,"msctls_updown32",UDS_WRAP |
174 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
175 UDS_ARROWKEYS | UDS_NOTHOUSANDS,204,16,11,13
176 RTEXT "Send &outging requests to port:",IDC_STATIC,13,46,135,8
177 EDITTEXT IDC_SPEAKPORT,154,44,61,13,ES_AUTOHSCROLL
178 CONTROL "Spin1",IDC_SPEAKSPIN,"msctls_updown32",UDS_WRAP |
179 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
180 UDS_ARROWKEYS | UDS_NOTHOUSANDS,204,43,11,13
181 LTEXT "Default connection timeout:",IDC_STATIC,7,66,88,8
182 EDITTEXT IDC_TIMEOUT,110,64,40,13,ES_AUTOHSCROLL | ES_NUMBER
183 CONTROL "Spin3",IDC_TIMESPIN,"msctls_updown32",UDS_WRAP |
184 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
185 UDS_ARROWKEYS | UDS_NOTHOUSANDS,140,64,11,13
186 LTEXT "Default block size:",IDC_STATIC,7,80,59,8
187 LTEXT "seconds",IDC_STATIC,154,66,28,8
188 LTEXT "bytes",IDC_STATIC,154,80,18,8
189 EDITTEXT IDC_BLOCKSIZE,110,78,40,13,ES_AUTOHSCROLL | ES_NUMBER
190 CONTROL "Spin3",IDC_BSIZESPIN,"msctls_updown32",UDS_WRAP |
191 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
192 UDS_ARROWKEYS | UDS_NOTHOUSANDS,140,78,11,13
193 RTEXT "ip address:",IDC_STATIC,13,32,135,8
194 EDITTEXT IDC_LISTENADDRESS,154,28,61,14,ES_AUTOHSCROLL
195END
196
197IDD_CONFIRM_RRQ DIALOGEX 0, 0, 181, 79
198STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP |
199 WS_CAPTION
200EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
201CAPTION " PumpKIN - Confirm Read Request"
202FONT 8, "MS Sans Serif", 0, 0, 0x1
203BEGIN
204 DEFPUSHBUTTON "&Grant Access",IDOK,27,58,54,14
205 PUSHBUTTON "&Deny Access",IDCANCEL,97,58,54,14
206 LTEXT "The host",IDC_STATIC,77,7,29,8
207 CTEXT "255.255.255.255",IDC_HOST,57,15,68,14,SS_NOTIFY |
208 SS_SUNKEN | WS_BORDER,WS_EX_DLGMODALFRAME |
209 WS_EX_CLIENTEDGE
210 CTEXT "is requesting the file",IDC_STATIC,23,29,135,8
211 CTEXT "",IDC_FILE,23,37,135,14,SS_NOTIFY | SS_SUNKEN |
212 WS_BORDER,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE
213 CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,54,167,1
214 ICON IDR_MAINFRAME,IDC_STATIC,7,7,18,20
215 ICON IDR_MAINFRAME,IDC_STATIC,153,7,18,20
216END
217
218IDD_CONFIRM_WRQ DIALOGEX 0, 0, 201, 95
219STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_CAPTION
220EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
221CAPTION " PumpKIN - Confirm Write Request"
222FONT 8, "MS Sans Serif", 0, 0, 0x1
223BEGIN
224 DEFPUSHBUTTON "&Accept",IDOK,7,58,59,14
225 PUSHBUTTON "&Rename",IDC_RENAME,71,58,59,14
226 PUSHBUTTON "&Deny Access",IDCANCEL,135,58,59,14
227 LTEXT "The host",IDC_STATIC,87,7,29,8
228 CTEXT "255.255.255.255",IDC_HOST,67,15,68,14,SS_NOTIFY |
229 SS_SUNKEN | WS_BORDER,WS_EX_DLGMODALFRAME |
230 WS_EX_CLIENTEDGE
231 CTEXT "is attempting to send you a file",IDC_STATIC,33,29,135,
232 8
233 CTEXT "",IDC_FILE,33,37,135,14,SS_NOTIFY | SS_SUNKEN |
234 WS_BORDER,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE
235 CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,54,187,1
236 ICON IDR_MAINFRAME,IDC_STATIC,7,7,21,20
237 ICON IDR_MAINFRAME,IDC_STATIC,173,7,21,20
238 PUSHBUTTON "Res&ume",IDC_RESUME,71,74,59,14
239END
240
241IDD_REQUEST DIALOGEX 0, 0, 191, 161
242STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_CAPTION |
243 WS_SYSMENU
244EXSTYLE WS_EX_CLIENTEDGE
245CAPTION "Request"
246FONT 8, "MS Sans Serif", 0, 0, 0x1
247BEGIN
248 LTEXT "&Local file:",IDC_STATIC,7,7,31,8,SS_NOTIFY
249 EDITTEXT IDC_LOCALFILE,7,16,157,14,ES_AUTOHSCROLL,
250 WS_EX_CLIENTEDGE | WS_EX_STATICEDGE
251 PUSHBUTTON "...",IDC_BROWSE,165,16,19,14,BS_ICON,WS_EX_STATICEDGE
252 LTEXT "&Remote file:",IDC_STATIC,7,34,38,8,SS_NOTIFY
253 EDITTEXT IDC_REMOTEFILE,7,44,177,14,ES_AUTOHSCROLL,
254 WS_EX_CLIENTEDGE | WS_EX_STATICEDGE
255 LTEXT "Remote &host:",IDC_STATIC,7,61,43,8,SS_NOTIFY
256 COMBOBOX IDC_TALKS,7,72,157,66,CBS_SIMPLE | CBS_AUTOHSCROLL |
257 CBS_SORT | CBS_NOINTEGRALHEIGHT | WS_VSCROLL |
258 WS_TABSTOP,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE
259 PUSHBUTTON "R\nE\n&F\nR\nE\nS\nH",IDC_REFRESH,165,72,19,66,
260 BS_CENTER | BS_VCENTER | BS_MULTILINE | BS_NOTIFY,
261 WS_EX_CLIENTEDGE
262 LTEXT "&Type:",IDC_STATIC,58,34,19,8
263 COMBOBOX IDC_TYPE,80,31,43,41,CBS_DROPDOWN | CBS_AUTOHSCROLL |
264 CBS_LOWERCASE | WS_VSCROLL | WS_TABSTOP
265 LTEXT "&Block:",IDC_STATIC,127,34,21,8
266 COMBOBOX IDC_BSIZE,149,31,35,53,CBS_DROPDOWN | WS_VSCROLL |
267 WS_TABSTOP
268 DEFPUSHBUTTON "OK",IDOK,35,140,50,14
269 PUSHBUTTON "Cancel",IDCANCEL,101,140,50,14
270 CONTROL "",IDC_STATIC,"Static",SS_ETCHEDVERT,52,32,1,11
271END
272
273IDD_PROPS_SOUNDS DIALOG DISCARDABLE 0, 0, 300, 201
274STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
275CAPTION "Sounds"
276FONT 8, "MS Sans Serif"
277BEGIN
278 LTEXT "&Incoming request:",IDC_STATIC,7,9,57,8
279 COMBOBOX IDC_RING,70,7,188,100,CBS_DROPDOWN | CBS_AUTOHSCROLL |
280 CBS_SORT | WS_VSCROLL | WS_TABSTOP
281 PUSHBUTTON "browse",IDC_RING_BROWSE,263,7,13,13,BS_ICON
282 PUSHBUTTON "play",IDC_RING_PLAY,280,7,13,13,BS_ICON
283 LTEXT "xfer &finished:",IDC_STATIC,7,25,57,8
284 COMBOBOX IDC_FINISHED,70,22,188,100,CBS_DROPDOWN |
285 CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
286 PUSHBUTTON "browse",IDC_FINISHED_BROWSE,263,22,13,13,BS_ICON
287 PUSHBUTTON "play",IDC_FINISHED_PLAY,280,22,13,13,BS_ICON
288 LTEXT "xfer &aborted:",IDC_STATIC,7,40,57,8
289 COMBOBOX IDC_ABORTED,70,37,188,100,CBS_DROPDOWN | CBS_AUTOHSCROLL |
290 CBS_SORT | WS_VSCROLL | WS_TABSTOP
291 PUSHBUTTON "browse",IDC_ABORTED_BROWSE,263,37,13,13,BS_ICON
292 PUSHBUTTON "play",IDC_ABORTED_PLAY,280,37,13,13,BS_ICON
293END
294
295IDD_PROPS_ACL DIALOG DISCARDABLE 0, 0, 300, 201
296STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
297CAPTION "Access Lists"
298FONT 8, "MS Sans Serif"
299BEGIN
300 CONTROL "List1",IDC_ACL_LIST,"SysListView32",LVS_REPORT |
301 WS_BORDER | WS_TABSTOP,7,7,258,110
302 PUSHBUTTON "&Up",IDC_ACL_UP,273,7,20,30,BS_ICON | BS_CENTER |
303 BS_VCENTER
304 PUSHBUTTON "&Down",IDC_ACL_DOWN,273,87,20,30,BS_ICON | BS_CENTER |
305 BS_VCENTER
306 PUSHBUTTON "&Remove",IDC_ACL_REMOVE,273,47,20,30,BS_ICON |
307 BS_CENTER | BS_VCENTER
308 LTEXT "If",IDC_STATIC,13,128,8,8
309 COMBOBOX IDC_ACL_XFER,21,125,48,67,CBS_DROPDOWNLIST | WS_VSCROLL |
310 WS_TABSTOP
311 LTEXT "request comes from the address in the network",
312 IDC_STATIC,71,128,122,8
313 EDITTEXT IDC_ACL_ADDR,47,143,80,12,ES_AUTOHSCROLL
314 LTEXT "with netmask",IDC_STATIC,129,145,41,8
315 EDITTEXT IDC_ACL_NETMASK,173,143,80,12,ES_AUTOHSCROLL
316 LTEXT "then",IDC_STATIC,124,160,15,8
317 COMBOBOX IDC_ACL_RULE,143,158,123,117,CBS_DROPDOWNLIST |
318 WS_VSCROLL | WS_TABSTOP
319 PUSHBUTTON "&Add new rule",IDC_ACL_ADD,7,178,130,16
320 PUSHBUTTON "&Replace rule",IDC_ACL_REPLACE,152,178,130,16
321END
322
323
324#ifndef _MAC
325/////////////////////////////////////////////////////////////////////////////
326//
327// Version
328//
329
330VS_VERSION_INFO VERSIONINFO
331 FILEVERSION 2,7,3,0
332 PRODUCTVERSION 2,7,3,0
333 FILEFLAGSMASK 0x3fL
334#ifdef _DEBUG
335 FILEFLAGS 0x1L
336#else
337 FILEFLAGS 0x0L
338#endif
339 FILEOS 0x4L
340 FILETYPE 0x1L
341 FILESUBTYPE 0x0L
342BEGIN
343 BLOCK "StringFileInfo"
344 BEGIN
345 BLOCK "040904b0"
346 BEGIN
347 VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0"
348 VALUE "FileDescription", "PumpKIN, tftp client/daemon\0"
349 VALUE "FileVersion", "2, 7, 3, 0\0"
350 VALUE "InternalName", "PUMPKIN\0"
351 VALUE "LegalCopyright", "Copyright © 1997-2011 Klever Group (http://www.klever.net)\0"
352 VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0"
353 VALUE "OriginalFilename", "PUMPKIN.EXE\0"
354 VALUE "ProductName", "PumpKIN\0"
355 VALUE "ProductVersion", "2, 7, 3, 0\0"
356 END
357 END
358 BLOCK "VarFileInfo"
359 BEGIN
360 VALUE "Translation", 0x409, 1200
361 END
362END
363
364#endif // !_MAC
365
366
367/////////////////////////////////////////////////////////////////////////////
368//
369// DESIGNINFO
370//
371
372#ifdef APSTUDIO_INVOKED
373GUIDELINES DESIGNINFO DISCARDABLE
374BEGIN
375 IDD_ABOUTBOX, DIALOG
376 BEGIN
377 LEFTMARGIN, 7
378 RIGHTMARGIN, 210
379 TOPMARGIN, 7
380 BOTTOMMARGIN, 67
381 END
382
383 IDD_PUMPKIN_DIALOG, DIALOG
384 BEGIN
385 LEFTMARGIN, 7
386 RIGHTMARGIN, 355
387 TOPMARGIN, 7
388 BOTTOMMARGIN, 186
389 HORZGUIDE, 115
390 END
391
392 IDD_PROPS_SERVER, DIALOG
393 BEGIN
394 LEFTMARGIN, 7
395 RIGHTMARGIN, 293
396 TOPMARGIN, 7
397 BOTTOMMARGIN, 194
398 END
399
400 IDD_PROPS_NETWORK, DIALOG
401 BEGIN
402 LEFTMARGIN, 7
403 RIGHTMARGIN, 293
404 TOPMARGIN, 7
405 BOTTOMMARGIN, 194
406 END
407
408 IDD_CONFIRM_RRQ, DIALOG
409 BEGIN
410 LEFTMARGIN, 7
411 RIGHTMARGIN, 174
412 TOPMARGIN, 7
413 BOTTOMMARGIN, 72
414 END
415
416 IDD_CONFIRM_WRQ, DIALOG
417 BEGIN
418 LEFTMARGIN, 7
419 RIGHTMARGIN, 194
420 TOPMARGIN, 7
421 BOTTOMMARGIN, 88
422 END
423
424 IDD_REQUEST, DIALOG
425 BEGIN
426 LEFTMARGIN, 7
427 RIGHTMARGIN, 184
428 TOPMARGIN, 7
429 BOTTOMMARGIN, 154
430 END
431
432 IDD_PROPS_SOUNDS, DIALOG
433 BEGIN
434 LEFTMARGIN, 7
435 RIGHTMARGIN, 293
436 TOPMARGIN, 7
437 BOTTOMMARGIN, 194
438 END
439
440 IDD_PROPS_ACL, DIALOG
441 BEGIN
442 LEFTMARGIN, 7
443 RIGHTMARGIN, 293
444 TOPMARGIN, 7
445 BOTTOMMARGIN, 194
446 HORZGUIDE, 117
447 HORZGUIDE, 125
448 END
449END
450#endif // APSTUDIO_INVOKED
451
452
453/////////////////////////////////////////////////////////////////////////////
454//
455// Bitmap
456//
457
458IDB_BACKGROUND BITMAP DISCARDABLE "shared-data/klever-background.bmp"
459
460/////////////////////////////////////////////////////////////////////////////
461//
462// WAVE
463//
464
465IDR_WAVE_RING WAVE DISCARDABLE "res\\ring.wav"
466IDR_WAVE_FINISHED WAVE DISCARDABLE "res\\finished.wav"
467IDR_WAVE_ABORTED WAVE DISCARDABLE "res\\failed.wav"
468
469/////////////////////////////////////////////////////////////////////////////
470//
471// Dialog Info
472//
473
474IDD_REQUEST DLGINIT
475BEGIN
476 IDC_TYPE, 0x403, 6, 0
4770x636f, 0x6574, 0x0074,
478 IDC_TYPE, 0x403, 9, 0
4790x656e, 0x6174, 0x6373, 0x6969, "\000"
480 IDC_BSIZE, 0x403, 4, 0
4810x3135, 0x0032,
482 IDC_BSIZE, 0x403, 5, 0
4830x3031, 0x3432, "\000"
484 IDC_BSIZE, 0x403, 5, 0
4850x3032, 0x3834, "\000"
486 IDC_BSIZE, 0x403, 5, 0
4870x3034, 0x3639, "\000"
488 IDC_BSIZE, 0x403, 5, 0
4890x3138, 0x3239, "\000"
490 0
491END
492
493IDD_PROPS_ACL DLGINIT
494BEGIN
495 IDC_ACL_XFER, 0x403, 5, 0
4960x6572, 0x6461, "\000"
497 IDC_ACL_XFER, 0x403, 6, 0
4980x7277, 0x7469, 0x0065,
499 IDC_ACL_RULE, 0x403, 12, 0
5000x6361, 0x6563, 0x7470, 0x6620, 0x6c69, 0x0065,
501 IDC_ACL_RULE, 0x403, 33, 0
5020x6361, 0x6563, 0x7470, 0x6120, 0x646e, 0x7220, 0x6e65, 0x6d61, 0x2065,
5030x6669, 0x6620, 0x6c69, 0x2065, 0x7865, 0x7369, 0x7374, "\000"
504 IDC_ACL_RULE, 0x403, 12, 0
5050x6572, 0x656a, 0x7463, 0x6620, 0x6c69, 0x0065,
506 IDC_ACL_RULE, 0x403, 31, 0
5070x6166, 0x6c6c, 0x6162, 0x6b63, 0x7420, 0x206f, 0x6874, 0x2065, 0x6c67,
5080x626f, 0x6c61, 0x7320, 0x7465, 0x6974, 0x676e, "\000"
509 0
510END
511
512
513/////////////////////////////////////////////////////////////////////////////
514//
515// Menu
516//
517
518IDM_POPUPS MENU DISCARDABLE
519BEGIN
520 POPUP "&Tray"
521 BEGIN
522 MENUITEM "&Send File", ID_TRAY_SENDFILE
523 MENUITEM "F&etch file", ID_TRAY_FETCHFILE
524 MENUITEM "&Options", ID_TRAY_OPTIONS
525 MENUITEM "&Listen to requests", ID_TRAY_LISTEN
526 MENUITEM "Show &PumpKIN Window", ID_TRAY_SHOWPUMPKINWINDOW
527 MENUITEM "Open &Files Folder", ID_TRAY_OPENFILESFOLDER
528 MENUITEM SEPARATOR
529 MENUITEM "&Help Topics", ID_TRAY_HELP
530 MENUITEM "&About PumpKIN", ID_TRAY_ABOUTPUMPKIN
531 MENUITEM SEPARATOR
532 MENUITEM "E&xit", ID_TRAY_EXIT
533 END
534END
535
536
537/////////////////////////////////////////////////////////////////////////////
538//
539// String Table
540//
541
542STRINGTABLE DISCARDABLE
543BEGIN
544 IDS_ABOUTBOX "&About PumpKIN..."
545 IDS_FMT_BYTES "%lu"
546 IDP_SOCKETS_INIT_FAILED "Windows sockets initialization failed."
547 IDS_TFTP_ERROR_ACCESS "Access violation"
548 IDS_TFTP_ERROR_NOTFOUND "File not found"
549 IDS_TFTP_ERROR_DIRFULL "Directory is full"
550 IDS_TFTP_ERROR_SHARING "Sharing violation"
551 IDS_TFTP_ERROR_DISKFULL "Disk full"
552 IDS_TFTP_ERROR_UNDEFINED "Undefined error"
553 IDS_LOG_START "PumpKIN started"
554 IDS_LOG_LISTENRECEIVEERROR "Error listening for incoming connections"
555END
556
557STRINGTABLE DISCARDABLE
558BEGIN
559 IDS_LOG_LISTENACCEPTERROR "Error accepting incoming connection"
560 IDS_LOG_RRQSERVE "'%s' of type '%s' is requested from %s"
561 IDS_LOG_LISTENOPCODE "Invalid opcode in initial connection request"
562 IDS_LOG_XFERUDPSEND "UDP packet send failed"
563 IDS_LOG_XFERRECEIVE "Error on xfer socket"
564 IDS_LOG_XFERSEND "Error on xfer socket"
565 IDS_LOG_XFERUDPRECEIVE "UDP packet receive failed"
566 IDS_LOG_XFERSOURCETID "Packet from unexpected source"
567 IDS_LOG_SENTTFTPERROR ">> %u: %s"
568 IDS_LOG_GOTTFTPERROR "TFTP:%u: %s"
569 IDS_LOG_XFEROPCODE "Invalid opcode (%u) during transfer received"
570 IDS_LOG_XFERRRQFINISHED "Transfer of '%s' has successfully completed"
571 IDS_TITLE_OPTIONS "Options"
572 IDS_LOG_WRQSERVE "Writing of '%s' of type '%s' is requested by %s"
573 IDS_TFTP_ERROR_FAILEDTORENAME "Too many clones of the file"
574 IDS_RENAME_TITLE "Save As"
575END
576
577STRINGTABLE DISCARDABLE
578BEGIN
579 IDS_LOG_TIMEDOUT "Transmission of '%s' is timed out"
580 IDS_CONFIRMEXIT_TITLE "Exit"
581 IDS_CONFIRMEXIT_TEXT "File transmission is currently in progress. Are you sure you want to exit?"
582 IDS_LOG_XFERWRQFINISHED "Transfer of '%s' has successfully completed"
583 IDS_LOG_XFERABORTED "Transfer of '%s' was aborted"
584 IDS_TITLE_PUTREQUEST "Send file"
585 IDS_TITLE_GETREQUEST "Fetch file"
586 IDS_WTALKHEADING "Talk with "
587 IDS_TITLE_BROWSEFILE "Browse"
588 IDS_LOG_RESOLVEFAILED "Failed to resolve host address for '%s'"
589 IDS_LOG_FAILEDLOCALFILE "Failed to open local file '%s'"
590 IDS_LOG_FAILEDTOOPEN "Failed to open '%s'"
591 IDS_OTALXHEADING "Open Talks: talking to "
592 IDS_REGISTRYKEY "Klever Group"
593 IDS_KLEVERNET_URL "http://www.klever.net/"
594 IDS_LOGTIMEFORMAT "%H:%M:%S %B %d"
595END
596
597STRINGTABLE DISCARDABLE
598BEGIN
599 ID_TRAY_HELP "Read the help on PumpKIN"
600 ID_TRAY_ABOUTPUMPKIN "Learn about PumpKIN and it's creator"
601 ID_TRAY_EXIT "Close PumpKIN"
602 ID_TRAY_SENDFILE "Send file over the network to your tete-a-tete"
603 ID_TRAY_FETCHFILE "Fetch file from remote computer"
604 ID_TRAY_OPTIONS "Set PumpKIN options"
605 ID_TRAY_SHOWPUMPKINWINDOW "Show main window"
606 ID_TRAY_OPENFILESFOLDER "Explore TFTP root folder"
607 ID_TRAY_LISTEN "Listen for incoming requests"
608END
609
610STRINGTABLE DISCARDABLE
611BEGIN
612 IDC_CONNECTIONS "Active transfers"
613 IDC_LOG "PumpKIN Activity Log"
614 IDC_GET "Fetch file from remote server"
615 IDC_PUT "Send file over the net"
616 IDC_ABORT "Abort transfer currently in progress"
617 IDC_EXIT "Close PumpKIN"
618END
619
620STRINGTABLE DISCARDABLE
621BEGIN
622 IDC_OPTIONS "Set PumpKIN options"
623 IDC_REFRESH "Refresh talks list"
624 IDC_BROWSE "Browse"
625END
626
627STRINGTABLE DISCARDABLE
628BEGIN
629 ID_HELP "Read help on PumpKIN"
630END
631
632STRINGTABLE DISCARDABLE
633BEGIN
634 IDS_DROPFILES_TITLE "Drop Files"
635 IDS_NOMULTIPLEDROP_TEXT "You can't drop more than one file here. Only the first one will be accepted"
636 IDS_LOG_REQUESTING "Requesting '%s' from '%s'"
637 IDS_LOG_SENDING "Sending '%s' to '%s'"
638 IDS_WTALKAT "@"
639 IDS_OTALXAT " at "
640 IDS_TFTP_ERROR_TSIZE "Invalid transfer size"
641 IDS_TFTP_ERROR_BSIZE "Invalid block size"
642 IDS_TFTP_ERROR_TOUT "Invalid timeout"
643 IDS_SELECT_TFTPROOT "Select TFTP filesystem root.."
644 IDS_FILTER_WAV "Sound Files (*.wav)|*.wav||"
645 IDS_TITLE_WAV "Select sound.."
646 IDS_BOX_CANTBIND "Failed to create listening socket. The port may be in use by another application."
647 IDS_NO_XFER_OP "No request type specified."
648 IDS_INVALID_IP "Invalid IP address."
649 IDS_INVALID_NETMASK "Invalid netmask."
650END
651
652STRINGTABLE DISCARDABLE
653BEGIN
654 AFX_IDS_APP_TITLE "PUMPKIN"
655END
656
657STRINGTABLE DISCARDABLE
658BEGIN
659 IDS_INVALID_RULE "Invalid access rule."
660 IDS_LOG_LOGERROR "Error logging to '%s'"
661 IDS_TFTP_ERROR_TOOBIG "File is too big, try increasing block size"
662END
663
664#endif // English (U.S.) resources
665/////////////////////////////////////////////////////////////////////////////
666
667
668
669#ifndef APSTUDIO_INVOKED
670/////////////////////////////////////////////////////////////////////////////
671//
672// Generated from the TEXTINCLUDE 3 resource.
673//
674#define _AFX_NO_SPLITTER_RESOURCES
675#define _AFX_NO_OLE_RESOURCES
676#define _AFX_NO_TRACKER_RESOURCES
677#define _AFX_NO_PROPERTY_RESOURCES
678
679#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
680#ifdef _WIN32
681LANGUAGE 9, 1
682#pragma code_page(1252)
683#endif
684#include "res\PumpKIN.rc2" // non-Microsoft Visual C++ edited resources
685#include "afxres.rc" // Standard components
686#endif
687/////////////////////////////////////////////////////////////////////////////
688#endif // not APSTUDIO_INVOKED
689
diff --git a/pumpkin.xcodeproj/project.pbxproj b/pumpkin.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..d2cffd7
--- a/dev/null
+++ b/pumpkin.xcodeproj/project.pbxproj
@@ -0,0 +1,519 @@
1// !$*UTF8*$!
2{
3 archiveVersion = 1;
4 classes = {
5 };
6 objectVersion = 46;
7 objects = {
8
9/* Begin PBXBuildFile section */
10 68081EA9160E6D2B009D14E1 /* put.icns in Resources */ = {isa = PBXBuildFile; fileRef = 68081EA8160E6D2B009D14E1 /* put.icns */; };
11 68081EAB160F856A009D14E1 /* get.icns in Resources */ = {isa = PBXBuildFile; fileRef = 68081EAA160F856A009D14E1 /* get.icns */; };
12 68081EAD160F8BE8009D14E1 /* abort.icns in Resources */ = {isa = PBXBuildFile; fileRef = 68081EAC160F8BE8009D14E1 /* abort.icns */; };
13 6808EC7A166158AF00F479A9 /* IPTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 6808EC79166158AE00F479A9 /* IPTransformer.m */; };
14 6808EC7E1661860D00F479A9 /* biportal in CopyFiles */ = {isa = PBXBuildFile; fileRef = 68DAEE2A14118D370007A630 /* biportal */; };
15 680E89A51482B03A008C9134 /* pumpkin-defaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = 680E89A41482B03A008C9134 /* pumpkin-defaults.plist */; };
16 680E89A91482EF73008C9134 /* NumberTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 680E89A81482EF73008C9134 /* NumberTransformer.m */; };
17 682A27901419688B005AB8FB /* XFer.m in Sources */ = {isa = PBXBuildFile; fileRef = 682A278F1419688B005AB8FB /* XFer.m */; };
18 682A2792141BD97B005AB8FB /* TFTPPacket.m in Sources */ = {isa = PBXBuildFile; fileRef = 682A2791141BD97B005AB8FB /* TFTPPacket.m */; };
19 683B812B15EA9FB5002A9253 /* pumpkin.icns in Resources */ = {isa = PBXBuildFile; fileRef = 683B812A15EA9FB5002A9253 /* pumpkin.icns */; };
20 68428F7A166BAFB500AF8D8C /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68428F79166BAFB500AF8D8C /* Cocoa.framework */; };
21 68428F7C166BAFC600AF8D8C /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68428F7B166BAFC600AF8D8C /* Security.framework */; };
22 68458CB7141579E100F1E4FF /* DaemonListener.m in Sources */ = {isa = PBXBuildFile; fileRef = 68458CB6141579E100F1E4FF /* DaemonListener.m */; };
23 68458CBE14157A4100F1E4FF /* SendXFer.m in Sources */ = {isa = PBXBuildFile; fileRef = 68458CBD14157A4100F1E4FF /* SendXFer.m */; };
24 685CCB0F14D4AC7700F5B76B /* XFersViewDatasource.m in Sources */ = {isa = PBXBuildFile; fileRef = 685CCB0E14D4AC7700F5B76B /* XFersViewDatasource.m */; };
25 685CCB1214D5BA1300F5B76B /* StringsAttached.m in Sources */ = {isa = PBXBuildFile; fileRef = 685CCB1114D5BA1300F5B76B /* StringsAttached.m */; };
26 686315D514DDE7B40067B682 /* ReceiveXFer.m in Sources */ = {isa = PBXBuildFile; fileRef = 686315D414DDE7B40067B682 /* ReceiveXFer.m */; };
27 68697A74166BC88900D08FEA /* PumpKIN.xib in Resources */ = {isa = PBXBuildFile; fileRef = 68697A73166BC88900D08FEA /* PumpKIN.xib */; };
28 68697A76166BC91900D08FEA /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 68697A75166BC91900D08FEA /* Credits.rtf */; };
29 68697A82166BCBE000D08FEA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 68697A80166BCBE000D08FEA /* InfoPlist.strings */; };
30 687435A914142E50003EF6EF /* klever-background.png in Resources */ = {isa = PBXBuildFile; fileRef = 687435A814142E50003EF6EF /* klever-background.png */; };
31 68783E43148585EB00DEE0B5 /* IPFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 68783E42148585EB00DEE0B5 /* IPFormatter.m */; };
32 68B3D56D14E1CD37002B0D56 /* ARequest.xib in Resources */ = {isa = PBXBuildFile; fileRef = 68B3D56C14E1CD37002B0D56 /* ARequest.xib */; };
33 68B3D57114E1CE8D002B0D56 /* ARequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 68B3D57014E1CE8D002B0D56 /* ARequest.m */; };
34 68D5F05D14F2ADBF00CF4CFE /* ConfirmRequest.xib in Resources */ = {isa = PBXBuildFile; fileRef = 68D5F05C14F2ADBF00CF4CFE /* ConfirmRequest.xib */; };
35 68D5F06114F4397200CF4CFE /* ConfirmRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 68D5F06014F4397200CF4CFE /* ConfirmRequest.m */; };
36 68DAEE1614118CB60007A630 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 68DAEE1514118CB60007A630 /* main.m */; };
37 68DAEE1D14118CB60007A630 /* PumpKIN.m in Sources */ = {isa = PBXBuildFile; fileRef = 68DAEE1C14118CB60007A630 /* PumpKIN.m */; };
38 68DAEE2E14118D370007A630 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 68DAEE2D14118D370007A630 /* main.c */; };
39/* End PBXBuildFile section */
40
41/* Begin PBXContainerItemProxy section */
42 68DAEE401412D5FC0007A630 /* PBXContainerItemProxy */ = {
43 isa = PBXContainerItemProxy;
44 containerPortal = 68DAEDFC14118CB60007A630 /* Project object */;
45 proxyType = 1;
46 remoteGlobalIDString = 68DAEE2914118D370007A630;
47 remoteInfo = biportal;
48 };
49/* End PBXContainerItemProxy section */
50
51/* Begin PBXCopyFilesBuildPhase section */
52 6808EC7D166185F900F479A9 /* CopyFiles */ = {
53 isa = PBXCopyFilesBuildPhase;
54 buildActionMask = 2147483647;
55 dstPath = "";
56 dstSubfolderSpec = 6;
57 files = (
58 6808EC7E1661860D00F479A9 /* biportal in CopyFiles */,
59 );
60 runOnlyForDeploymentPostprocessing = 0;
61 };
62 68DAEE2814118D370007A630 /* CopyFiles */ = {
63 isa = PBXCopyFilesBuildPhase;
64 buildActionMask = 2147483647;
65 dstPath = usr/share/man/man1;
66 dstSubfolderSpec = 0;
67 files = (
68 );
69 runOnlyForDeploymentPostprocessing = 1;
70 };
71/* End PBXCopyFilesBuildPhase section */
72
73/* Begin PBXFileReference section */
74 68081EA8160E6D2B009D14E1 /* put.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = put.icns; sourceTree = "<group>"; };
75 68081EAA160F856A009D14E1 /* get.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = get.icns; sourceTree = "<group>"; };
76 68081EAC160F8BE8009D14E1 /* abort.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = abort.icns; sourceTree = "<group>"; };
77 6808EC78166158AE00F479A9 /* IPTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IPTransformer.h; sourceTree = "<group>"; };
78 6808EC79166158AE00F479A9 /* IPTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IPTransformer.m; sourceTree = "<group>"; };
79 680E89A41482B03A008C9134 /* pumpkin-defaults.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "pumpkin-defaults.plist"; sourceTree = "<group>"; };
80 680E89A71482EF73008C9134 /* NumberTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NumberTransformer.h; sourceTree = "<group>"; };
81 680E89A81482EF73008C9134 /* NumberTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NumberTransformer.m; sourceTree = "<group>"; };
82 682A278E1419688A005AB8FB /* XFer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XFer.h; sourceTree = "<group>"; };
83 682A278F1419688B005AB8FB /* XFer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XFer.m; sourceTree = "<group>"; };
84 682A2791141BD97B005AB8FB /* TFTPPacket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TFTPPacket.m; sourceTree = "<group>"; };
85 683B812A15EA9FB5002A9253 /* pumpkin.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = pumpkin.icns; sourceTree = "<group>"; };
86 68428F79166BAFB500AF8D8C /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
87 68428F7B166BAFC600AF8D8C /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
88 68458CB5141579E100F1E4FF /* DaemonListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DaemonListener.h; sourceTree = "<group>"; };
89 68458CB6141579E100F1E4FF /* DaemonListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DaemonListener.m; sourceTree = "<group>"; };
90 68458CB914157A1000F1E4FF /* TFTPPacket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TFTPPacket.h; sourceTree = "<group>"; };
91 68458CBC14157A4100F1E4FF /* SendXFer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SendXFer.h; sourceTree = "<group>"; };
92 68458CBD14157A4100F1E4FF /* SendXFer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = SendXFer.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
93 685CCB0D14D4AC7700F5B76B /* XFersViewDatasource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XFersViewDatasource.h; sourceTree = "<group>"; };
94 685CCB0E14D4AC7700F5B76B /* XFersViewDatasource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XFersViewDatasource.m; sourceTree = "<group>"; };
95 685CCB1014D5BA1300F5B76B /* StringsAttached.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringsAttached.h; sourceTree = "<group>"; };
96 685CCB1114D5BA1300F5B76B /* StringsAttached.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StringsAttached.m; sourceTree = "<group>"; };
97 686315D314DDE7B40067B682 /* ReceiveXFer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReceiveXFer.h; sourceTree = "<group>"; };
98 686315D414DDE7B40067B682 /* ReceiveXFer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ReceiveXFer.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
99 68697A73166BC88900D08FEA /* PumpKIN.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PumpKIN.xib; sourceTree = "<group>"; };
100 68697A75166BC91900D08FEA /* Credits.rtf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = "<group>"; };
101 68697A7E166BCBAD00D08FEA /* pumpkin-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "pumpkin-Info.plist"; sourceTree = "<group>"; };
102 68697A81166BCBE000D08FEA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
103 687435A814142E50003EF6EF /* klever-background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "klever-background.png"; sourceTree = "<group>"; };
104 68783E41148585EA00DEE0B5 /* IPFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IPFormatter.h; sourceTree = "<group>"; };
105 68783E42148585EB00DEE0B5 /* IPFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IPFormatter.m; sourceTree = "<group>"; };
106 68B3D56C14E1CD37002B0D56 /* ARequest.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ARequest.xib; sourceTree = "<group>"; };
107 68B3D56F14E1CE8D002B0D56 /* ARequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ARequest.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
108 68B3D57014E1CE8D002B0D56 /* ARequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ARequest.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
109 68D5F05C14F2ADBF00CF4CFE /* ConfirmRequest.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ConfirmRequest.xib; sourceTree = "<group>"; };
110 68D5F05F14F4397200CF4CFE /* ConfirmRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ConfirmRequest.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
111 68D5F06014F4397200CF4CFE /* ConfirmRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ConfirmRequest.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
112 68DAEE0514118CB60007A630 /* pumpkin.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = pumpkin.app; sourceTree = BUILT_PRODUCTS_DIR; };
113 68DAEE1514118CB60007A630 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
114 68DAEE1714118CB60007A630 /* pumpkin-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "pumpkin-Prefix.pch"; sourceTree = "<group>"; };
115 68DAEE1B14118CB60007A630 /* PumpKIN.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PumpKIN.h; sourceTree = "<group>"; };
116 68DAEE1C14118CB60007A630 /* PumpKIN.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PumpKIN.m; sourceTree = "<group>"; };
117 68DAEE2A14118D370007A630 /* biportal */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = biportal; sourceTree = BUILT_PRODUCTS_DIR; };
118 68DAEE2D14118D370007A630 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
119/* End PBXFileReference section */
120
121/* Begin PBXFrameworksBuildPhase section */
122 68DAEE0214118CB60007A630 /* Frameworks */ = {
123 isa = PBXFrameworksBuildPhase;
124 buildActionMask = 2147483647;
125 files = (
126 68428F7C166BAFC600AF8D8C /* Security.framework in Frameworks */,
127 68428F7A166BAFB500AF8D8C /* Cocoa.framework in Frameworks */,
128 );
129 runOnlyForDeploymentPostprocessing = 0;
130 };
131 68DAEE2714118D370007A630 /* Frameworks */ = {
132 isa = PBXFrameworksBuildPhase;
133 buildActionMask = 2147483647;
134 files = (
135 );
136 runOnlyForDeploymentPostprocessing = 0;
137 };
138/* End PBXFrameworksBuildPhase section */
139
140/* Begin PBXGroup section */
141 68428F75166BA34400AF8D8C /* graphics */ = {
142 isa = PBXGroup;
143 children = (
144 68081EAC160F8BE8009D14E1 /* abort.icns */,
145 68081EAA160F856A009D14E1 /* get.icns */,
146 68081EA8160E6D2B009D14E1 /* put.icns */,
147 687435A814142E50003EF6EF /* klever-background.png */,
148 );
149 name = graphics;
150 sourceTree = "<group>";
151 };
152 68DAEDFA14118CB60007A630 = {
153 isa = PBXGroup;
154 children = (
155 683B812A15EA9FB5002A9253 /* pumpkin.icns */,
156 68DAEE0F14118CB60007A630 /* pumpkin */,
157 68DAEE2C14118D370007A630 /* biportal */,
158 68DAEE0814118CB60007A630 /* Frameworks */,
159 68DAEE0614118CB60007A630 /* Products */,
160 );
161 sourceTree = "<group>";
162 };
163 68DAEE0614118CB60007A630 /* Products */ = {
164 isa = PBXGroup;
165 children = (
166 68DAEE0514118CB60007A630 /* pumpkin.app */,
167 68DAEE2A14118D370007A630 /* biportal */,
168 );
169 name = Products;
170 sourceTree = "<group>";
171 };
172 68DAEE0814118CB60007A630 /* Frameworks */ = {
173 isa = PBXGroup;
174 children = (
175 68428F7B166BAFC600AF8D8C /* Security.framework */,
176 68428F79166BAFB500AF8D8C /* Cocoa.framework */,
177 );
178 name = Frameworks;
179 sourceTree = "<group>";
180 };
181 68DAEE0F14118CB60007A630 /* pumpkin */ = {
182 isa = PBXGroup;
183 children = (
184 68428F75166BA34400AF8D8C /* graphics */,
185 685CCB0D14D4AC7700F5B76B /* XFersViewDatasource.h */,
186 685CCB0E14D4AC7700F5B76B /* XFersViewDatasource.m */,
187 68458CB914157A1000F1E4FF /* TFTPPacket.h */,
188 682A2791141BD97B005AB8FB /* TFTPPacket.m */,
189 68D5F05C14F2ADBF00CF4CFE /* ConfirmRequest.xib */,
190 68D5F05F14F4397200CF4CFE /* ConfirmRequest.h */,
191 68D5F06014F4397200CF4CFE /* ConfirmRequest.m */,
192 682A278E1419688A005AB8FB /* XFer.h */,
193 682A278F1419688B005AB8FB /* XFer.m */,
194 686315D314DDE7B40067B682 /* ReceiveXFer.h */,
195 686315D414DDE7B40067B682 /* ReceiveXFer.m */,
196 68458CBC14157A4100F1E4FF /* SendXFer.h */,
197 68458CBD14157A4100F1E4FF /* SendXFer.m */,
198 68458CB5141579E100F1E4FF /* DaemonListener.h */,
199 68458CB6141579E100F1E4FF /* DaemonListener.m */,
200 68697A73166BC88900D08FEA /* PumpKIN.xib */,
201 68DAEE1B14118CB60007A630 /* PumpKIN.h */,
202 68DAEE1C14118CB60007A630 /* PumpKIN.m */,
203 6808EC78166158AE00F479A9 /* IPTransformer.h */,
204 6808EC79166158AE00F479A9 /* IPTransformer.m */,
205 68B3D56C14E1CD37002B0D56 /* ARequest.xib */,
206 68B3D56F14E1CE8D002B0D56 /* ARequest.h */,
207 68B3D57014E1CE8D002B0D56 /* ARequest.m */,
208 685CCB1014D5BA1300F5B76B /* StringsAttached.h */,
209 685CCB1114D5BA1300F5B76B /* StringsAttached.m */,
210 680E89A71482EF73008C9134 /* NumberTransformer.h */,
211 680E89A81482EF73008C9134 /* NumberTransformer.m */,
212 68783E41148585EA00DEE0B5 /* IPFormatter.h */,
213 68783E42148585EB00DEE0B5 /* IPFormatter.m */,
214 680E89A41482B03A008C9134 /* pumpkin-defaults.plist */,
215 68697A7E166BCBAD00D08FEA /* pumpkin-Info.plist */,
216 68DAEE1014118CB60007A630 /* Supporting Files */,
217 );
218 path = pumpkin;
219 sourceTree = "<group>";
220 };
221 68DAEE1014118CB60007A630 /* Supporting Files */ = {
222 isa = PBXGroup;
223 children = (
224 68697A80166BCBE000D08FEA /* InfoPlist.strings */,
225 68697A75166BC91900D08FEA /* Credits.rtf */,
226 68DAEE1514118CB60007A630 /* main.m */,
227 68DAEE1714118CB60007A630 /* pumpkin-Prefix.pch */,
228 );
229 name = "Supporting Files";
230 sourceTree = "<group>";
231 };
232 68DAEE2C14118D370007A630 /* biportal */ = {
233 isa = PBXGroup;
234 children = (
235 68DAEE2D14118D370007A630 /* main.c */,
236 );
237 path = biportal;
238 sourceTree = "<group>";
239 };
240/* End PBXGroup section */
241
242/* Begin PBXNativeTarget section */
243 68DAEE0414118CB60007A630 /* pumpkin */ = {
244 isa = PBXNativeTarget;
245 buildConfigurationList = 68DAEE2314118CB70007A630 /* Build configuration list for PBXNativeTarget "pumpkin" */;
246 buildPhases = (
247 68DAEE0114118CB60007A630 /* Sources */,
248 68DAEE0214118CB60007A630 /* Frameworks */,
249 68DAEE0314118CB60007A630 /* Resources */,
250 6808EC7D166185F900F479A9 /* CopyFiles */,
251 68697A84166BFCCB00D08FEA /* ShellScript */,
252 );
253 buildRules = (
254 );
255 dependencies = (
256 68DAEE411412D5FC0007A630 /* PBXTargetDependency */,
257 );
258 name = pumpkin;
259 productName = pumpkin;
260 productReference = 68DAEE0514118CB60007A630 /* pumpkin.app */;
261 productType = "com.apple.product-type.application";
262 };
263 68DAEE2914118D370007A630 /* biportal */ = {
264 isa = PBXNativeTarget;
265 buildConfigurationList = 68DAEE3114118D370007A630 /* Build configuration list for PBXNativeTarget "biportal" */;
266 buildPhases = (
267 68DAEE2614118D370007A630 /* Sources */,
268 68DAEE2714118D370007A630 /* Frameworks */,
269 68DAEE2814118D370007A630 /* CopyFiles */,
270 );
271 buildRules = (
272 );
273 dependencies = (
274 );
275 name = biportal;
276 productName = biportal;
277 productReference = 68DAEE2A14118D370007A630 /* biportal */;
278 productType = "com.apple.product-type.tool";
279 };
280/* End PBXNativeTarget section */
281
282/* Begin PBXProject section */
283 68DAEDFC14118CB60007A630 /* Project object */ = {
284 isa = PBXProject;
285 attributes = {
286 LastUpgradeCheck = 0450;
287 };
288 buildConfigurationList = 68DAEDFF14118CB60007A630 /* Build configuration list for PBXProject "pumpkin" */;
289 compatibilityVersion = "Xcode 3.2";
290 developmentRegion = English;
291 hasScannedForEncodings = 0;
292 knownRegions = (
293 en,
294 );
295 mainGroup = 68DAEDFA14118CB60007A630;
296 productRefGroup = 68DAEE0614118CB60007A630 /* Products */;
297 projectDirPath = "";
298 projectRoot = "";
299 targets = (
300 68DAEE0414118CB60007A630 /* pumpkin */,
301 68DAEE2914118D370007A630 /* biportal */,
302 );
303 };
304/* End PBXProject section */
305
306/* Begin PBXResourcesBuildPhase section */
307 68DAEE0314118CB60007A630 /* Resources */ = {
308 isa = PBXResourcesBuildPhase;
309 buildActionMask = 2147483647;
310 files = (
311 687435A914142E50003EF6EF /* klever-background.png in Resources */,
312 680E89A51482B03A008C9134 /* pumpkin-defaults.plist in Resources */,
313 68B3D56D14E1CD37002B0D56 /* ARequest.xib in Resources */,
314 68D5F05D14F2ADBF00CF4CFE /* ConfirmRequest.xib in Resources */,
315 683B812B15EA9FB5002A9253 /* pumpkin.icns in Resources */,
316 68081EA9160E6D2B009D14E1 /* put.icns in Resources */,
317 68081EAB160F856A009D14E1 /* get.icns in Resources */,
318 68081EAD160F8BE8009D14E1 /* abort.icns in Resources */,
319 68697A74166BC88900D08FEA /* PumpKIN.xib in Resources */,
320 68697A76166BC91900D08FEA /* Credits.rtf in Resources */,
321 68697A82166BCBE000D08FEA /* InfoPlist.strings in Resources */,
322 );
323 runOnlyForDeploymentPostprocessing = 0;
324 };
325/* End PBXResourcesBuildPhase section */
326
327/* Begin PBXShellScriptBuildPhase section */
328 68697A84166BFCCB00D08FEA /* ShellScript */ = {
329 isa = PBXShellScriptBuildPhase;
330 buildActionMask = 2147483647;
331 files = (
332 );
333 inputPaths = (
334 "$(BUILT_PRODUCTS_DIR)/$(PRODUCT_NAME).app",
335 "$(SRCROOT)/dmg-DS_Store",
336 );
337 outputPaths = (
338 "$(BUILT_PRODUCTS_DIR)/$(PRODUCT_NAME).dmg",
339 );
340 runOnlyForDeploymentPostprocessing = 0;
341 shellPath = /bin/sh;
342 shellScript = "set -ex\n\nrm -f \"$BUILT_PRODUCTS_DIR/$PRODUCT_NAME-hybrid.dmg\"\nrm -rf \"$BUILT_PRODUCTS_DIR/DMG\" && mkdir -p \"$BUILT_PRODUCTS_DIR/DMG\"\ncp -R \"$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app\" \"$BUILT_PRODUCTS_DIR/DMG\"\nmkdir \"$BUILT_PRODUCTS_DIR/DMG/.background\"\ncp \"$SRCROOT/dmg-background.png\" \"$BUILT_PRODUCTS_DIR/DMG/.background/background.png\"\ncp \"$SRCROOT/dmg-DS_Store\" \"$BUILT_PRODUCTS_DIR/DMG/.DS_Store\"\nln -s /Applications \"$BUILT_PRODUCTS_DIR/DMG/Applications\"\nhdiutil makehybrid -o \"$BUILT_PRODUCTS_DIR/$PRODUCT_NAME-hybrid.dmg\" -hfs -hfs-openfolder \"$BUILT_PRODUCTS_DIR/DMG\" -default-volume-name \"PumpKIN\" \"$BUILT_PRODUCTS_DIR/DMG\"\nrm -rf \"$BUILT_PRODUCTS_DIR/DMG\"\n\nrm -f \"$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.dmg\"\nhdiutil convert -format UDZO -o \"$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.dmg\" \"$BUILT_PRODUCTS_DIR/$PRODUCT_NAME-hybrid.dmg\"\n";
343 };
344/* End PBXShellScriptBuildPhase section */
345
346/* Begin PBXSourcesBuildPhase section */
347 68DAEE0114118CB60007A630 /* Sources */ = {
348 isa = PBXSourcesBuildPhase;
349 buildActionMask = 2147483647;
350 files = (
351 68DAEE1614118CB60007A630 /* main.m in Sources */,
352 68DAEE1D14118CB60007A630 /* PumpKIN.m in Sources */,
353 68458CB7141579E100F1E4FF /* DaemonListener.m in Sources */,
354 68458CBE14157A4100F1E4FF /* SendXFer.m in Sources */,
355 682A27901419688B005AB8FB /* XFer.m in Sources */,
356 682A2792141BD97B005AB8FB /* TFTPPacket.m in Sources */,
357 680E89A91482EF73008C9134 /* NumberTransformer.m in Sources */,
358 68783E43148585EB00DEE0B5 /* IPFormatter.m in Sources */,
359 685CCB0F14D4AC7700F5B76B /* XFersViewDatasource.m in Sources */,
360 685CCB1214D5BA1300F5B76B /* StringsAttached.m in Sources */,
361 686315D514DDE7B40067B682 /* ReceiveXFer.m in Sources */,
362 68B3D57114E1CE8D002B0D56 /* ARequest.m in Sources */,
363 68D5F06114F4397200CF4CFE /* ConfirmRequest.m in Sources */,
364 6808EC7A166158AF00F479A9 /* IPTransformer.m in Sources */,
365 );
366 runOnlyForDeploymentPostprocessing = 0;
367 };
368 68DAEE2614118D370007A630 /* Sources */ = {
369 isa = PBXSourcesBuildPhase;
370 buildActionMask = 2147483647;
371 files = (
372 68DAEE2E14118D370007A630 /* main.c in Sources */,
373 );
374 runOnlyForDeploymentPostprocessing = 0;
375 };
376/* End PBXSourcesBuildPhase section */
377
378/* Begin PBXTargetDependency section */
379 68DAEE411412D5FC0007A630 /* PBXTargetDependency */ = {
380 isa = PBXTargetDependency;
381 target = 68DAEE2914118D370007A630 /* biportal */;
382 targetProxy = 68DAEE401412D5FC0007A630 /* PBXContainerItemProxy */;
383 };
384/* End PBXTargetDependency section */
385
386/* Begin PBXVariantGroup section */
387 68697A80166BCBE000D08FEA /* InfoPlist.strings */ = {
388 isa = PBXVariantGroup;
389 children = (
390 68697A81166BCBE000D08FEA /* en */,
391 );
392 name = InfoPlist.strings;
393 sourceTree = "<group>";
394 };
395/* End PBXVariantGroup section */
396
397/* Begin XCBuildConfiguration section */
398 68DAEE2114118CB70007A630 /* Debug */ = {
399 isa = XCBuildConfiguration;
400 buildSettings = {
401 ALWAYS_SEARCH_USER_PATHS = NO;
402 ARCHS = "$(ARCHS_STANDARD_64_BIT)";
403 CODE_SIGN_ENTITLEMENTS = "";
404 COPY_PHASE_STRIP = NO;
405 GCC_C_LANGUAGE_STANDARD = gnu99;
406 GCC_DYNAMIC_NO_PIC = NO;
407 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
408 GCC_OPTIMIZATION_LEVEL = 0;
409 GCC_PREPROCESSOR_DEFINITIONS = (
410 "DEBUG=1",
411 "$(inherited)",
412 );
413 GCC_SYMBOLS_PRIVATE_EXTERN = NO;
414 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
415 GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
416 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
417 GCC_WARN_ABOUT_RETURN_TYPE = YES;
418 GCC_WARN_UNUSED_VARIABLE = YES;
419 MACOSX_DEPLOYMENT_TARGET = 10.7;
420 ONLY_ACTIVE_ARCH = YES;
421 SDKROOT = macosx;
422 };
423 name = Debug;
424 };
425 68DAEE2214118CB70007A630 /* Release */ = {
426 isa = XCBuildConfiguration;
427 buildSettings = {
428 ALWAYS_SEARCH_USER_PATHS = NO;
429 ARCHS = "$(ARCHS_STANDARD_64_BIT)";
430 CODE_SIGN_ENTITLEMENTS = "";
431 CODE_SIGN_IDENTITY = "Developer ID Application: Mikhail Krelin";
432 COPY_PHASE_STRIP = YES;
433 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
434 GCC_C_LANGUAGE_STANDARD = gnu99;
435 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
436 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
437 GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
438 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
439 GCC_WARN_ABOUT_RETURN_TYPE = YES;
440 GCC_WARN_UNUSED_VARIABLE = YES;
441 MACOSX_DEPLOYMENT_TARGET = 10.7;
442 PROVISIONING_PROFILE = "";
443 SDKROOT = macosx;
444 };
445 name = Release;
446 };
447 68DAEE2414118CB70007A630 /* Debug */ = {
448 isa = XCBuildConfiguration;
449 buildSettings = {
450 COMBINE_HIDPI_IMAGES = YES;
451 GCC_PRECOMPILE_PREFIX_HEADER = YES;
452 GCC_PREFIX_HEADER = "pumpkin/pumpkin-Prefix.pch";
453 INFOPLIST_FILE = "pumpkin/pumpkin-Info.plist";
454 PRODUCT_NAME = "$(TARGET_NAME)";
455 WRAPPER_EXTENSION = app;
456 };
457 name = Debug;
458 };
459 68DAEE2514118CB70007A630 /* Release */ = {
460 isa = XCBuildConfiguration;
461 buildSettings = {
462 COMBINE_HIDPI_IMAGES = YES;
463 GCC_PRECOMPILE_PREFIX_HEADER = YES;
464 GCC_PREFIX_HEADER = "pumpkin/pumpkin-Prefix.pch";
465 INFOPLIST_FILE = "pumpkin/pumpkin-Info.plist";
466 PRODUCT_NAME = "$(TARGET_NAME)";
467 WRAPPER_EXTENSION = app;
468 };
469 name = Release;
470 };
471 68DAEE3214118D370007A630 /* Debug */ = {
472 isa = XCBuildConfiguration;
473 buildSettings = {
474 PRODUCT_NAME = "$(TARGET_NAME)";
475 };
476 name = Debug;
477 };
478 68DAEE3314118D370007A630 /* Release */ = {
479 isa = XCBuildConfiguration;
480 buildSettings = {
481 PRODUCT_NAME = "$(TARGET_NAME)";
482 SKIP_INSTALL = YES;
483 };
484 name = Release;
485 };
486/* End XCBuildConfiguration section */
487
488/* Begin XCConfigurationList section */
489 68DAEDFF14118CB60007A630 /* Build configuration list for PBXProject "pumpkin" */ = {
490 isa = XCConfigurationList;
491 buildConfigurations = (
492 68DAEE2114118CB70007A630 /* Debug */,
493 68DAEE2214118CB70007A630 /* Release */,
494 );
495 defaultConfigurationIsVisible = 0;
496 defaultConfigurationName = Release;
497 };
498 68DAEE2314118CB70007A630 /* Build configuration list for PBXNativeTarget "pumpkin" */ = {
499 isa = XCConfigurationList;
500 buildConfigurations = (
501 68DAEE2414118CB70007A630 /* Debug */,
502 68DAEE2514118CB70007A630 /* Release */,
503 );
504 defaultConfigurationIsVisible = 0;
505 defaultConfigurationName = Release;
506 };
507 68DAEE3114118D370007A630 /* Build configuration list for PBXNativeTarget "biportal" */ = {
508 isa = XCConfigurationList;
509 buildConfigurations = (
510 68DAEE3214118D370007A630 /* Debug */,
511 68DAEE3314118D370007A630 /* Release */,
512 );
513 defaultConfigurationIsVisible = 0;
514 defaultConfigurationName = Release;
515 };
516/* End XCConfigurationList section */
517 };
518 rootObject = 68DAEDFC14118CB60007A630 /* Project object */;
519}
diff --git a/pumpkin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/pumpkin.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..ba44a6d
--- a/dev/null
+++ b/pumpkin.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<Workspace
3 version = "1.0">
4 <FileRef
5 location = "self:pumpkin.xcodeproj">
6 </FileRef>
7</Workspace>
diff --git a/pumpkin/ARequest.h b/pumpkin/ARequest.h
new file mode 100644
index 0000000..232dcf8
--- a/dev/null
+++ b/pumpkin/ARequest.h
@@ -0,0 +1,47 @@
1#import <Cocoa/Cocoa.h>
2
3@interface ARequest : NSWindowController {
4 BOOL requestIsGet;
5
6 CFHostRef cfhost;
7
8 NSString *localFile;
9 NSString *remoteHost;
10 NSNumber *remotePort;
11 NSString *remoteFile;
12 NSString *xferType;
13 NSNumber *blockSize;
14 NSNumber *timeout;
15
16 NSTextField *remoteHostBox;
17 BOOL doTouchMe;
18 NSString *statusLabel;
19 NSString *errorLabel;
20}
21
22@property BOOL requestIsGet;
23@property BOOL doTouchMe;
24@property (copy) NSString *statusLabel;
25@property (copy) NSString *errorLabel;
26
27@property (copy) NSString *localFile;
28@property (copy) NSString *remoteHost;
29@property (copy) NSNumber *remotePort;
30@property (copy) NSString *remoteFile;
31@property (copy) NSString *xferType;
32@property (copy) NSNumber *blockSize;
33@property (copy) NSNumber *timeout;
34
35@property (assign) IBOutlet NSTextField *remoteHostBox;
36
37- (IBAction)startXfer:(id)sender;
38- (IBAction)pickFile:(id)sender;
39
40-(void)hostCallbackWithHost:(CFHostRef)h info:(CFHostInfoType)hi andError:(const CFStreamError*)e;
41
42+(void)getFile;
43+(void)putFile;
44
45-(ARequest*)initWithGet:(BOOL)gr;
46
47@end
diff --git a/pumpkin/ARequest.m b/pumpkin/ARequest.m
new file mode 100644
index 0000000..439366e
--- a/dev/null
+++ b/pumpkin/ARequest.m
@@ -0,0 +1,184 @@
1
2#import "pumpkin.h"
3#import "ARequest.h"
4#import "ReceiveXFer.h"
5#import "SendXFer.h"
6
7static void cbHost(CFHostRef h,CFHostInfoType hi,const CFStreamError *e,void *i) {
8 [(ARequest*)i hostCallbackWithHost:h info:hi andError:e];
9}
10
11
12@implementation ARequest
13@synthesize requestIsGet;
14@synthesize doTouchMe;
15@synthesize statusLabel;
16@synthesize errorLabel;
17
18@synthesize localFile;
19@synthesize remoteHost;
20@synthesize remotePort;
21@synthesize remoteFile;
22@synthesize xferType;
23@synthesize blockSize;
24@synthesize timeout;
25
26@synthesize remoteHostBox;
27
28-(void)unhost {
29 if(!cfhost) return;
30 CFHostCancelInfoResolution(cfhost, kCFHostAddresses);
31 CFHostUnscheduleFromRunLoop(cfhost, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
32 CFRelease(cfhost);
33 cfhost = nil;
34}
35-(void)loadDefaults {
36 id d = [NSUserDefaultsController.sharedUserDefaultsController values];
37 self.remotePort = [d valueForKey:@"remotePort"];
38 self.blockSize = [d valueForKey:@"blockSize"];
39 self.xferType = [d valueForKey:@"xferType"];
40 self.remoteHost = [d valueForKey:@"remoteHost"];
41 self.timeout = [d valueForKey:@"timeout"];
42
43 self.localFile = [[d valueForKey:@"tftpRoot"] stringByAppendingString:@"/"];
44}
45-(void)saveDefaults {
46 NSUserDefaultsController *dc = [NSUserDefaultsController sharedUserDefaultsController];
47 id d = dc.values;
48 [d setValue:self.remotePort forKey:@"remotePort"];
49 [d setValue:self.remoteHost forKey:@"remoteHost"];
50 [d setValue:self.blockSize forKey:@"blockSize"];
51 [d setValue:self.xferType forKey:@"xferType"];
52 [d setValue:self.timeout forKey:@"timeout"];
53 [dc save:self];
54}
55
56
57- (IBAction)startXfer:(id)sender {
58 if(!(cfhost = CFHostCreateWithName(kCFAllocatorDefault, (CFStringRef)remoteHost))) {
59 self.errorLabel = @"failed to even try to resolve.";
60 return;
61 }
62 struct CFHostClientContext hc;
63 hc.version=0; hc.info=self; hc.retain=0;hc.release=0;
64 hc.copyDescription=0;
65 CFHostSetClient(cfhost, cbHost, &hc);
66 CFHostScheduleWithRunLoop(cfhost, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
67 CFStreamError e;
68 if(!CFHostStartInfoResolution(cfhost, kCFHostAddresses, &e)) {
69 self.errorLabel = @"failed to start host resolution.";
70 [self unhost];
71 return;
72 }
73 self.statusLabel = @"resolving remote host…";
74 self.doTouchMe = NO;
75}
76
77-(void)hostCallbackWithHost:(CFHostRef)h info:(CFHostInfoType)hi andError:(const CFStreamError *)e {
78 NSString *el = nil;
79 CFArrayRef aa = nil;
80 __block struct sockaddr_in peer;
81 do {
82 if(e && (e->domain || e->error)) {
83 el=@"failed to resolve remote address"; break;
84 }
85 Boolean hbr;
86 aa = CFHostGetAddressing(cfhost, &hbr);
87 if(!(hbr && aa && CFArrayGetCount(aa))) {
88 el=@"failed to find remote address"; break;
89 }
90 peer.sin_addr.s_addr=INADDR_NONE; [(NSArray*)aa enumerateObjectsUsingBlock:^(NSData *o,NSUInteger i,BOOL *s) {
91 const struct sockaddr_in *sin = o.bytes;
92 if(sin->sin_family!=AF_INET) return;
93 memmove(&peer,sin,sizeof(peer));
94 *s = YES;
95 }];
96 if(peer.sin_addr.s_addr==INADDR_NONE) {
97 el=@"found no ipv4 address"; break;
98 }
99 peer.sin_port = htons([remotePort unsignedIntValue]);
100 }while(false);
101 [self unhost];
102 if(el) {
103 self.errorLabel = el; self.doTouchMe = YES; return;
104 }
105 [self saveDefaults];
106 [[[requestIsGet?ReceiveXFer.class:SendXFer.class alloc]
107 initWithLocalFile:localFile peerAddress:&peer remoteFile:remoteFile xferType:xferType blockSize:blockSize.unsignedIntValue andTimeout:timeout.intValue]
108 autorelease];
109 [self.window performClose:nil];
110}
111
112- (IBAction)pickFile:(id)sender {
113 NSSavePanel *p = nil;
114 if(requestIsGet) {
115 p = [NSSavePanel savePanel];
116 p.canCreateDirectories = YES;
117 }else{
118 NSOpenPanel *pp = [NSOpenPanel openPanel];
119 pp.canChooseDirectories = NO;
120 pp.canChooseFiles = YES;
121 pp.allowsMultipleSelection = NO;
122 p = pp;
123 }
124 p.prompt = @"Pick the local file";
125 if([p runModal]!=NSFileHandlingPanelOKButton) return;
126 self.localFile = p.URL.path;
127}
128
129- (ARequest*) initWithGet:(BOOL)gr {
130 if(!(self = [super initWithWindowNibName:@"ARequest"])) return self;
131 self.doTouchMe = YES;
132 cfhost = nil;
133 requestIsGet = gr;
134 if(requestIsGet) {
135 self.window.title = @"Get file from remote TFTP server";
136 self.window.initialFirstResponder = remoteHostBox;
137 }else{
138 self.window.title = @"Put file to remote TFTP server";
139 }
140 [self loadDefaults];
141 [self addObserver:self forKeyPath:@"localFile" options:0 context:0];
142 [self addObserver:self forKeyPath:@"remoteFile" options:0 context:0];
143 return [self retain];
144}
145-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
146 if(requestIsGet) {
147 if([keyPath isEqualToString:@"remoteFile"]) {
148 if(self.remoteFile.length) {
149 self.localFile= [([self.localFile hasSuffix:@"/"]
150 ?self.localFile
151 :[self.localFile stringByDeletingLastPathComponent])
152 stringByAppendingPathComponent:self.remoteFile.lastPathComponent];
153 }else
154 self.localFile=[[self.localFile stringByDeletingLastPathComponent] stringByAppendingString:@"/"];
155 }
156 }else{
157 if([keyPath isEqualToString:@"localFile"]) {
158 self.remoteFile=[self.localFile hasSuffix:@"/"]
159 ?@"":self.localFile.lastPathComponent;
160 }
161 }
162}
163
164+ (ARequest*) aRequestWithGet:(BOOL)gr {
165 return [[[ARequest alloc] initWithGet:gr] autorelease];
166}
167
168static void popMeUp(BOOL g) {
169 [[ARequest aRequestWithGet:g].window makeKeyAndOrderFront:nil];
170}
171+ (void)getFile { popMeUp(YES); }
172+ (void)putFile { popMeUp(NO); }
173
174- (void)windowDidLoad {
175}
176
177- (void)windowWillClose:(NSNotification*)n {
178 [self unhost];
179 [self removeObserver:self forKeyPath:@"localFile" context:0];
180 [self removeObserver:self forKeyPath:@"remoteFile" context:0];
181 [self release];
182}
183
184@end
diff --git a/pumpkin/ARequest.xib b/pumpkin/ARequest.xib
new file mode 100644
index 0000000..5a85dcf
--- a/dev/null
+++ b/pumpkin/ARequest.xib
@@ -0,0 +1,1790 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
3 <data>
4 <int key="IBDocument.SystemTarget">1080</int>
5 <string key="IBDocument.SystemVersion">12C60</string>
6 <string key="IBDocument.InterfaceBuilderVersion">2844</string>
7 <string key="IBDocument.AppKitVersion">1187.34</string>
8 <string key="IBDocument.HIToolboxVersion">625.00</string>
9 <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
10 <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
11 <string key="NS.object.0">2844</string>
12 </object>
13 <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
14 <bool key="EncodedWithXMLCoder">YES</bool>
15 <string>NSButton</string>
16 <string>NSButtonCell</string>
17 <string>NSComboBox</string>
18 <string>NSComboBoxCell</string>
19 <string>NSCustomObject</string>
20 <string>NSProgressIndicator</string>
21 <string>NSTextField</string>
22 <string>NSTextFieldCell</string>
23 <string>NSUserDefaultsController</string>
24 <string>NSView</string>
25 <string>NSWindowTemplate</string>
26 </object>
27 <object class="NSArray" key="IBDocument.PluginDependencies">
28 <bool key="EncodedWithXMLCoder">YES</bool>
29 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
30 </object>
31 <object class="NSMutableDictionary" key="IBDocument.Metadata">
32 <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
33 <integer value="1" key="NS.object.0"/>
34 </object>
35 <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
36 <bool key="EncodedWithXMLCoder">YES</bool>
37 <object class="NSCustomObject" id="1001">
38 <string key="NSClassName">ARequest</string>
39 </object>
40 <object class="NSCustomObject" id="1003">
41 <string key="NSClassName">FirstResponder</string>
42 </object>
43 <object class="NSCustomObject" id="1004">
44 <string key="NSClassName">NSApplication</string>
45 </object>
46 <object class="NSWindowTemplate" id="265268434">
47 <int key="NSWindowStyleMask">3</int>
48 <int key="NSWindowBacking">2</int>
49 <string key="NSWindowRect">{{131, 159}, {553, 185}}</string>
50 <int key="NSWTFlags">611845120</int>
51 <string key="NSWindowTitle">PumpKIN request</string>
52 <string key="NSWindowClass">NSWindow</string>
53 <nil key="NSViewClass"/>
54 <nil key="NSUserInterfaceItemIdentifier"/>
55 <object class="NSView" key="NSWindowView" id="537034939">
56 <reference key="NSNextResponder"/>
57 <int key="NSvFlags">256</int>
58 <object class="NSMutableArray" key="NSSubviews">
59 <bool key="EncodedWithXMLCoder">YES</bool>
60 <object class="NSTextField" id="983573643">
61 <reference key="NSNextResponder" ref="537034939"/>
62 <int key="NSvFlags">268</int>
63 <string key="NSFrame">{{45, 145}, {65, 17}}</string>
64 <reference key="NSSuperview" ref="537034939"/>
65 <reference key="NSWindow"/>
66 <reference key="NSNextKeyView" ref="392834772"/>
67 <string key="NSReuseIdentifierKey">_NS:3936</string>
68 <bool key="NSEnabled">YES</bool>
69 <object class="NSTextFieldCell" key="NSCell" id="85931455">
70 <int key="NSCellFlags">68157504</int>
71 <int key="NSCellFlags2">272630784</int>
72 <string key="NSContents">Local file:</string>
73 <object class="NSFont" key="NSSupport" id="870520972">
74 <string key="NSName">LucidaGrande</string>
75 <double key="NSSize">13</double>
76 <int key="NSfFlags">1044</int>
77 </object>
78 <string key="NSCellIdentifier">_NS:3936</string>
79 <reference key="NSControlView" ref="983573643"/>
80 <object class="NSColor" key="NSBackgroundColor" id="462322918">
81 <int key="NSColorSpace">6</int>
82 <string key="NSCatalogName">System</string>
83 <string key="NSColorName">controlColor</string>
84 <object class="NSColor" key="NSColor" id="51768974">
85 <int key="NSColorSpace">3</int>
86 <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
87 </object>
88 </object>
89 <object class="NSColor" key="NSTextColor" id="374908237">
90 <int key="NSColorSpace">6</int>
91 <string key="NSCatalogName">System</string>
92 <string key="NSColorName">controlTextColor</string>
93 <object class="NSColor" key="NSColor" id="1058998983">
94 <int key="NSColorSpace">3</int>
95 <bytes key="NSWhite">MAA</bytes>
96 </object>
97 </object>
98 </object>
99 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
100 </object>
101 <object class="NSTextField" id="392834772">
102 <reference key="NSNextResponder" ref="537034939"/>
103 <int key="NSvFlags">270</int>
104 <string key="NSFrame">{{115, 143}, {349, 22}}</string>
105 <reference key="NSSuperview" ref="537034939"/>
106 <reference key="NSWindow"/>
107 <reference key="NSNextKeyView" ref="176529531"/>
108 <string key="NSReuseIdentifierKey">_NS:248</string>
109 <bool key="NSEnabled">YES</bool>
110 <object class="NSTextFieldCell" key="NSCell" id="47222242">
111 <int key="NSCellFlags">-1804599231</int>
112 <int key="NSCellFlags2">272630784</int>
113 <string key="NSContents"/>
114 <reference key="NSSupport" ref="870520972"/>
115 <string key="NSCellIdentifier">_NS:248</string>
116 <reference key="NSControlView" ref="392834772"/>
117 <bool key="NSDrawsBackground">YES</bool>
118 <object class="NSColor" key="NSBackgroundColor" id="970286794">
119 <int key="NSColorSpace">6</int>
120 <string key="NSCatalogName">System</string>
121 <string key="NSColorName">textBackgroundColor</string>
122 <object class="NSColor" key="NSColor" id="232866438">
123 <int key="NSColorSpace">3</int>
124 <bytes key="NSWhite">MQA</bytes>
125 </object>
126 </object>
127 <object class="NSColor" key="NSTextColor" id="95498365">
128 <int key="NSColorSpace">6</int>
129 <string key="NSCatalogName">System</string>
130 <string key="NSColorName">textColor</string>
131 <reference key="NSColor" ref="1058998983"/>
132 </object>
133 </object>
134 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
135 </object>
136 <object class="NSButton" id="176529531">
137 <reference key="NSNextResponder" ref="537034939"/>
138 <int key="NSvFlags">265</int>
139 <string key="NSFrame">{{472, 144}, {56, 19}}</string>
140 <reference key="NSSuperview" ref="537034939"/>
141 <reference key="NSWindow"/>
142 <reference key="NSNextKeyView" ref="712275833"/>
143 <string key="NSReuseIdentifierKey">_NS:1491</string>
144 <bool key="NSEnabled">YES</bool>
145 <object class="NSButtonCell" key="NSCell" id="827794247">
146 <int key="NSCellFlags">67108864</int>
147 <int key="NSCellFlags2">134217728</int>
148 <string key="NSContents">Browse</string>
149 <object class="NSFont" key="NSSupport">
150 <string key="NSName">LucidaGrande</string>
151 <double key="NSSize">12</double>
152 <int key="NSfFlags">4883</int>
153 </object>
154 <string key="NSCellIdentifier">_NS:1491</string>
155 <reference key="NSControlView" ref="176529531"/>
156 <int key="NSButtonFlags">-2033434624</int>
157 <int key="NSButtonFlags2">164</int>
158 <string key="NSAlternateContents"/>
159 <string key="NSKeyEquivalent"/>
160 <int key="NSPeriodicDelay">400</int>
161 <int key="NSPeriodicInterval">75</int>
162 </object>
163 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
164 </object>
165 <object class="NSTextField" id="712275833">
166 <reference key="NSNextResponder" ref="537034939"/>
167 <int key="NSvFlags">268</int>
168 <string key="NSFrame">{{22, 115}, {88, 17}}</string>
169 <reference key="NSSuperview" ref="537034939"/>
170 <reference key="NSWindow"/>
171 <reference key="NSNextKeyView" ref="23478474"/>
172 <string key="NSReuseIdentifierKey">_NS:3936</string>
173 <bool key="NSEnabled">YES</bool>
174 <object class="NSTextFieldCell" key="NSCell" id="931249278">
175 <int key="NSCellFlags">68157504</int>
176 <int key="NSCellFlags2">272630784</int>
177 <string key="NSContents">Remote host:</string>
178 <reference key="NSSupport" ref="870520972"/>
179 <string key="NSCellIdentifier">_NS:3936</string>
180 <reference key="NSControlView" ref="712275833"/>
181 <reference key="NSBackgroundColor" ref="462322918"/>
182 <reference key="NSTextColor" ref="374908237"/>
183 </object>
184 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
185 </object>
186 <object class="NSTextField" id="23478474">
187 <reference key="NSNextResponder" ref="537034939"/>
188 <int key="NSvFlags">268</int>
189 <string key="NSFrame">{{115, 113}, {146, 22}}</string>
190 <reference key="NSSuperview" ref="537034939"/>
191 <reference key="NSWindow"/>
192 <reference key="NSNextKeyView" ref="525390780"/>
193 <string key="NSReuseIdentifierKey">_NS:248</string>
194 <bool key="NSEnabled">YES</bool>
195 <object class="NSTextFieldCell" key="NSCell" id="241562469">
196 <int key="NSCellFlags">-1804599231</int>
197 <int key="NSCellFlags2">272630784</int>
198 <string key="NSContents"/>
199 <reference key="NSSupport" ref="870520972"/>
200 <string key="NSCellIdentifier">_NS:248</string>
201 <reference key="NSControlView" ref="23478474"/>
202 <bool key="NSDrawsBackground">YES</bool>
203 <reference key="NSBackgroundColor" ref="970286794"/>
204 <reference key="NSTextColor" ref="95498365"/>
205 </object>
206 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
207 </object>
208 <object class="NSTextField" id="525390780">
209 <reference key="NSNextResponder" ref="537034939"/>
210 <int key="NSvFlags">268</int>
211 <string key="NSFrame">{{266, 116}, {35, 17}}</string>
212 <reference key="NSSuperview" ref="537034939"/>
213 <reference key="NSWindow"/>
214 <reference key="NSNextKeyView" ref="471811034"/>
215 <string key="NSReuseIdentifierKey">_NS:3936</string>
216 <bool key="NSEnabled">YES</bool>
217 <object class="NSTextFieldCell" key="NSCell" id="637728381">
218 <int key="NSCellFlags">68157504</int>
219 <int key="NSCellFlags2">272630784</int>
220 <string key="NSContents">port:</string>
221 <reference key="NSSupport" ref="870520972"/>
222 <string key="NSCellIdentifier">_NS:3936</string>
223 <reference key="NSControlView" ref="525390780"/>
224 <reference key="NSBackgroundColor" ref="462322918"/>
225 <reference key="NSTextColor" ref="374908237"/>
226 </object>
227 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
228 </object>
229 <object class="NSTextField" id="471811034">
230 <reference key="NSNextResponder" ref="537034939"/>
231 <int key="NSvFlags">268</int>
232 <string key="NSFrame">{{306, 113}, {71, 22}}</string>
233 <reference key="NSSuperview" ref="537034939"/>
234 <reference key="NSWindow"/>
235 <reference key="NSNextKeyView" ref="656785083"/>
236 <string key="NSReuseIdentifierKey">_NS:248</string>
237 <bool key="NSEnabled">YES</bool>
238 <object class="NSTextFieldCell" key="NSCell" id="35095251">
239 <int key="NSCellFlags">-1804599231</int>
240 <int key="NSCellFlags2">272630784</int>
241 <string key="NSContents"/>
242 <reference key="NSSupport" ref="870520972"/>
243 <string key="NSCellIdentifier">_NS:248</string>
244 <reference key="NSControlView" ref="471811034"/>
245 <bool key="NSDrawsBackground">YES</bool>
246 <reference key="NSBackgroundColor" ref="970286794"/>
247 <reference key="NSTextColor" ref="95498365"/>
248 </object>
249 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
250 </object>
251 <object class="NSTextField" id="656785083">
252 <reference key="NSNextResponder" ref="537034939"/>
253 <int key="NSvFlags">268</int>
254 <string key="NSFrame">{{380, 115}, {28, 17}}</string>
255 <reference key="NSSuperview" ref="537034939"/>
256 <reference key="NSWindow"/>
257 <reference key="NSNextKeyView" ref="685519878"/>
258 <string key="NSReuseIdentifierKey">_NS:3936</string>
259 <bool key="NSEnabled">YES</bool>
260 <object class="NSTextFieldCell" key="NSCell" id="114681340">
261 <int key="NSCellFlags">68157504</int>
262 <int key="NSCellFlags2">272630784</int>
263 <string key="NSContents">file:</string>
264 <reference key="NSSupport" ref="870520972"/>
265 <string key="NSCellIdentifier">_NS:3936</string>
266 <reference key="NSControlView" ref="656785083"/>
267 <reference key="NSBackgroundColor" ref="462322918"/>
268 <reference key="NSTextColor" ref="374908237"/>
269 </object>
270 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
271 </object>
272 <object class="NSTextField" id="685519878">
273 <reference key="NSNextResponder" ref="537034939"/>
274 <int key="NSvFlags">268</int>
275 <string key="NSFrame">{{413, 113}, {120, 22}}</string>
276 <reference key="NSSuperview" ref="537034939"/>
277 <reference key="NSWindow"/>
278 <reference key="NSNextKeyView" ref="1027449834"/>
279 <string key="NSReuseIdentifierKey">_NS:248</string>
280 <bool key="NSEnabled">YES</bool>
281 <object class="NSTextFieldCell" key="NSCell" id="983145747">
282 <int key="NSCellFlags">-1804599231</int>
283 <int key="NSCellFlags2">272630784</int>
284 <string key="NSContents"/>
285 <reference key="NSSupport" ref="870520972"/>
286 <string key="NSCellIdentifier">_NS:248</string>
287 <reference key="NSControlView" ref="685519878"/>
288 <bool key="NSDrawsBackground">YES</bool>
289 <reference key="NSBackgroundColor" ref="970286794"/>
290 <reference key="NSTextColor" ref="95498365"/>
291 </object>
292 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
293 </object>
294 <object class="NSTextField" id="1027449834">
295 <reference key="NSNextResponder" ref="537034939"/>
296 <int key="NSvFlags">268</int>
297 <string key="NSFrame">{{17, 83}, {93, 17}}</string>
298 <reference key="NSSuperview" ref="537034939"/>
299 <reference key="NSWindow"/>
300 <reference key="NSNextKeyView" ref="1029217440"/>
301 <string key="NSReuseIdentifierKey">_NS:3936</string>
302 <bool key="NSEnabled">YES</bool>
303 <object class="NSTextFieldCell" key="NSCell" id="977543267">
304 <int key="NSCellFlags">68157504</int>
305 <int key="NSCellFlags2">272630784</int>
306 <string key="NSContents">Transfer type:</string>
307 <reference key="NSSupport" ref="870520972"/>
308 <string key="NSCellIdentifier">_NS:3936</string>
309 <reference key="NSControlView" ref="1027449834"/>
310 <reference key="NSBackgroundColor" ref="462322918"/>
311 <reference key="NSTextColor" ref="374908237"/>
312 </object>
313 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
314 </object>
315 <object class="NSComboBox" id="1029217440">
316 <reference key="NSNextResponder" ref="537034939"/>
317 <int key="NSvFlags">268</int>
318 <string key="NSFrame">{{115, 79}, {99, 26}}</string>
319 <reference key="NSSuperview" ref="537034939"/>
320 <reference key="NSWindow"/>
321 <reference key="NSNextKeyView" ref="213673854"/>
322 <string key="NSReuseIdentifierKey">_NS:66</string>
323 <bool key="NSEnabled">YES</bool>
324 <object class="NSComboBoxCell" key="NSCell" id="567568844">
325 <int key="NSCellFlags">342884416</int>
326 <int key="NSCellFlags2">272630784</int>
327 <string key="NSContents"/>
328 <reference key="NSSupport" ref="870520972"/>
329 <string key="NSCellIdentifier">_NS:66</string>
330 <reference key="NSControlView" ref="1029217440"/>
331 <bool key="NSDrawsBackground">YES</bool>
332 <reference key="NSBackgroundColor" ref="970286794"/>
333 <reference key="NSTextColor" ref="374908237"/>
334 <int key="NSVisibleItemCount">2</int>
335 <bool key="NSHasVerticalScroller">YES</bool>
336 <bool key="NSCompletes">YES</bool>
337 <object class="NSMutableArray" key="NSPopUpListData">
338 <bool key="EncodedWithXMLCoder">YES</bool>
339 <string>octet</string>
340 <string>netascii</string>
341 </object>
342 <reference key="NSDelegate" ref="1029217440"/>
343 <object class="NSComboTableView" key="NSTableView" id="681272190">
344 <reference key="NSNextResponder"/>
345 <int key="NSvFlags">274</int>
346 <string key="NSFrameSize">{13, 42}</string>
347 <reference key="NSSuperview"/>
348 <reference key="NSWindow"/>
349 <string key="NSReuseIdentifierKey">_NS:108</string>
350 <bool key="NSEnabled">YES</bool>
351 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
352 <bool key="NSControlAllowsExpansionToolTips">YES</bool>
353 <object class="NSMutableArray" key="NSTableColumns">
354 <bool key="EncodedWithXMLCoder">YES</bool>
355 <object class="NSTableColumn">
356 <double key="NSWidth">10</double>
357 <double key="NSMinWidth">10</double>
358 <double key="NSMaxWidth">1000</double>
359 <object class="NSTableHeaderCell" key="NSHeaderCell">
360 <int key="NSCellFlags">75497472</int>
361 <int key="NSCellFlags2">0</int>
362 <string key="NSContents"/>
363 <object class="NSFont" key="NSSupport" id="110565960">
364 <string key="NSName">LucidaGrande</string>
365 <double key="NSSize">12</double>
366 <int key="NSfFlags">16</int>
367 </object>
368 <object class="NSColor" key="NSBackgroundColor">
369 <int key="NSColorSpace">3</int>
370 <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
371 </object>
372 <reference key="NSTextColor" ref="232866438"/>
373 </object>
374 <object class="NSTextFieldCell" key="NSDataCell">
375 <int key="NSCellFlags">338690112</int>
376 <int key="NSCellFlags2">1024</int>
377 <reference key="NSSupport" ref="870520972"/>
378 <reference key="NSControlView" ref="681272190"/>
379 <bool key="NSDrawsBackground">YES</bool>
380 <object class="NSColor" key="NSBackgroundColor" id="240142953">
381 <int key="NSColorSpace">6</int>
382 <string key="NSCatalogName">System</string>
383 <string key="NSColorName">controlBackgroundColor</string>
384 <reference key="NSColor" ref="51768974"/>
385 </object>
386 <reference key="NSTextColor" ref="374908237"/>
387 </object>
388 <int key="NSResizingMask">3</int>
389 <bool key="NSIsResizeable">YES</bool>
390 <reference key="NSTableView" ref="681272190"/>
391 </object>
392 </object>
393 <double key="NSIntercellSpacingWidth">3</double>
394 <double key="NSIntercellSpacingHeight">2</double>
395 <reference key="NSBackgroundColor" ref="240142953"/>
396 <object class="NSColor" key="NSGridColor" id="524577992">
397 <int key="NSColorSpace">6</int>
398 <string key="NSCatalogName">System</string>
399 <string key="NSColorName">gridColor</string>
400 <object class="NSColor" key="NSColor">
401 <int key="NSColorSpace">3</int>
402 <bytes key="NSWhite">MC41AA</bytes>
403 </object>
404 </object>
405 <double key="NSRowHeight">19</double>
406 <string key="NSAction">tableViewAction:</string>
407 <int key="NSTvFlags">-765427712</int>
408 <reference key="NSDelegate" ref="567568844"/>
409 <reference key="NSDataSource" ref="567568844"/>
410 <reference key="NSTarget" ref="567568844"/>
411 <int key="NSColumnAutoresizingStyle">1</int>
412 <int key="NSDraggingSourceMaskForLocal">15</int>
413 <int key="NSDraggingSourceMaskForNonLocal">0</int>
414 <bool key="NSAllowsTypeSelect">YES</bool>
415 <int key="NSTableViewDraggingDestinationStyle">0</int>
416 <int key="NSTableViewGroupRowStyle">1</int>
417 </object>
418 </object>
419 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
420 </object>
421 <object class="NSTextField" id="291839274">
422 <reference key="NSNextResponder" ref="537034939"/>
423 <int key="NSvFlags">268</int>
424 <string key="NSFrame">{{39, 53}, {71, 17}}</string>
425 <reference key="NSSuperview" ref="537034939"/>
426 <reference key="NSWindow"/>
427 <reference key="NSNextKeyView" ref="183069999"/>
428 <string key="NSReuseIdentifierKey">_NS:3936</string>
429 <bool key="NSEnabled">YES</bool>
430 <object class="NSTextFieldCell" key="NSCell" id="61967082">
431 <int key="NSCellFlags">68157504</int>
432 <int key="NSCellFlags2">272630784</int>
433 <string key="NSContents">Block size:</string>
434 <reference key="NSSupport" ref="870520972"/>
435 <string key="NSCellIdentifier">_NS:3936</string>
436 <reference key="NSControlView" ref="291839274"/>
437 <reference key="NSBackgroundColor" ref="462322918"/>
438 <reference key="NSTextColor" ref="374908237"/>
439 </object>
440 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
441 </object>
442 <object class="NSComboBox" id="183069999">
443 <reference key="NSNextResponder" ref="537034939"/>
444 <int key="NSvFlags">268</int>
445 <string key="NSFrame">{{115, 49}, {99, 26}}</string>
446 <reference key="NSSuperview" ref="537034939"/>
447 <reference key="NSWindow"/>
448 <reference key="NSNextKeyView" ref="1053800845"/>
449 <string key="NSReuseIdentifierKey">_NS:66</string>
450 <bool key="NSEnabled">YES</bool>
451 <object class="NSComboBoxCell" key="NSCell" id="418627588">
452 <int key="NSCellFlags">342884416</int>
453 <int key="NSCellFlags2">272630784</int>
454 <string key="NSContents"/>
455 <reference key="NSSupport" ref="870520972"/>
456 <string key="NSCellIdentifier">_NS:66</string>
457 <reference key="NSControlView" ref="183069999"/>
458 <bool key="NSDrawsBackground">YES</bool>
459 <reference key="NSBackgroundColor" ref="970286794"/>
460 <reference key="NSTextColor" ref="374908237"/>
461 <int key="NSVisibleItemCount">5</int>
462 <bool key="NSHasVerticalScroller">YES</bool>
463 <object class="NSMutableArray" key="NSPopUpListData">
464 <bool key="EncodedWithXMLCoder">YES</bool>
465 <string>512</string>
466 <string>1024</string>
467 <string>2048</string>
468 <string>4096</string>
469 </object>
470 <reference key="NSDelegate" ref="183069999"/>
471 <object class="NSComboTableView" key="NSTableView" id="597366878">
472 <reference key="NSNextResponder"/>
473 <int key="NSvFlags">274</int>
474 <string key="NSFrameSize">{13, 84}</string>
475 <reference key="NSSuperview"/>
476 <reference key="NSWindow"/>
477 <string key="NSReuseIdentifierKey">_NS:108</string>
478 <bool key="NSEnabled">YES</bool>
479 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
480 <bool key="NSControlAllowsExpansionToolTips">YES</bool>
481 <object class="NSMutableArray" key="NSTableColumns">
482 <bool key="EncodedWithXMLCoder">YES</bool>
483 <object class="NSTableColumn">
484 <double key="NSWidth">10</double>
485 <double key="NSMinWidth">10</double>
486 <double key="NSMaxWidth">1000</double>
487 <object class="NSTableHeaderCell" key="NSHeaderCell">
488 <int key="NSCellFlags">75497472</int>
489 <int key="NSCellFlags2">0</int>
490 <string key="NSContents"/>
491 <reference key="NSSupport" ref="110565960"/>
492 <object class="NSColor" key="NSBackgroundColor">
493 <int key="NSColorSpace">3</int>
494 <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
495 </object>
496 <reference key="NSTextColor" ref="232866438"/>
497 </object>
498 <object class="NSTextFieldCell" key="NSDataCell">
499 <int key="NSCellFlags">338690112</int>
500 <int key="NSCellFlags2">1024</int>
501 <reference key="NSSupport" ref="870520972"/>
502 <reference key="NSControlView" ref="597366878"/>
503 <bool key="NSDrawsBackground">YES</bool>
504 <reference key="NSBackgroundColor" ref="240142953"/>
505 <reference key="NSTextColor" ref="374908237"/>
506 </object>
507 <int key="NSResizingMask">3</int>
508 <bool key="NSIsResizeable">YES</bool>
509 <reference key="NSTableView" ref="597366878"/>
510 </object>
511 </object>
512 <double key="NSIntercellSpacingWidth">3</double>
513 <double key="NSIntercellSpacingHeight">2</double>
514 <reference key="NSBackgroundColor" ref="240142953"/>
515 <reference key="NSGridColor" ref="524577992"/>
516 <double key="NSRowHeight">19</double>
517 <string key="NSAction">tableViewAction:</string>
518 <int key="NSTvFlags">-765427712</int>
519 <reference key="NSDelegate" ref="418627588"/>
520 <reference key="NSDataSource" ref="418627588"/>
521 <reference key="NSTarget" ref="418627588"/>
522 <int key="NSColumnAutoresizingStyle">1</int>
523 <int key="NSDraggingSourceMaskForLocal">15</int>
524 <int key="NSDraggingSourceMaskForNonLocal">0</int>
525 <bool key="NSAllowsTypeSelect">YES</bool>
526 <int key="NSTableViewDraggingDestinationStyle">0</int>
527 <int key="NSTableViewGroupRowStyle">1</int>
528 </object>
529 </object>
530 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
531 </object>
532 <object class="NSTextField" id="138314969">
533 <reference key="NSNextResponder" ref="537034939"/>
534 <int key="NSvFlags">268</int>
535 <string key="NSFrame">{{49, 23}, {61, 17}}</string>
536 <reference key="NSSuperview" ref="537034939"/>
537 <reference key="NSWindow"/>
538 <reference key="NSNextKeyView" ref="720108113"/>
539 <string key="NSReuseIdentifierKey">_NS:3936</string>
540 <bool key="NSEnabled">YES</bool>
541 <object class="NSTextFieldCell" key="NSCell" id="849261570">
542 <int key="NSCellFlags">68157504</int>
543 <int key="NSCellFlags2">272630784</int>
544 <string key="NSContents">Timeout:</string>
545 <reference key="NSSupport" ref="870520972"/>
546 <string key="NSCellIdentifier">_NS:3936</string>
547 <reference key="NSControlView" ref="138314969"/>
548 <reference key="NSBackgroundColor" ref="462322918"/>
549 <reference key="NSTextColor" ref="374908237"/>
550 </object>
551 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
552 </object>
553 <object class="NSTextField" id="720108113">
554 <reference key="NSNextResponder" ref="537034939"/>
555 <int key="NSvFlags">268</int>
556 <string key="NSFrame">{{115, 20}, {96, 22}}</string>
557 <reference key="NSSuperview" ref="537034939"/>
558 <reference key="NSWindow"/>
559 <string key="NSReuseIdentifierKey">_NS:248</string>
560 <bool key="NSEnabled">YES</bool>
561 <object class="NSTextFieldCell" key="NSCell" id="966502450">
562 <int key="NSCellFlags">-1804599231</int>
563 <int key="NSCellFlags2">272630784</int>
564 <string key="NSContents"/>
565 <reference key="NSSupport" ref="870520972"/>
566 <string key="NSCellIdentifier">_NS:248</string>
567 <reference key="NSControlView" ref="720108113"/>
568 <bool key="NSDrawsBackground">YES</bool>
569 <reference key="NSBackgroundColor" ref="970286794"/>
570 <reference key="NSTextColor" ref="95498365"/>
571 </object>
572 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
573 </object>
574 <object class="NSButton" id="1053800845">
575 <reference key="NSNextResponder" ref="537034939"/>
576 <int key="NSvFlags">268</int>
577 <string key="NSFrame">{{238, 45}, {178, 32}}</string>
578 <reference key="NSSuperview" ref="537034939"/>
579 <reference key="NSWindow"/>
580 <reference key="NSNextKeyView" ref="1061611931"/>
581 <string key="NSReuseIdentifierKey">_NS:161</string>
582 <bool key="NSEnabled">YES</bool>
583 <object class="NSButtonCell" key="NSCell" id="673387987">
584 <int key="NSCellFlags">67108864</int>
585 <int key="NSCellFlags2">134217728</int>
586 <string key="NSContents">I've changed my mind</string>
587 <reference key="NSSupport" ref="870520972"/>
588 <string key="NSCellIdentifier">_NS:161</string>
589 <reference key="NSControlView" ref="1053800845"/>
590 <int key="NSButtonFlags">-2038284288</int>
591 <int key="NSButtonFlags2">129</int>
592 <string key="NSAlternateContents"/>
593 <string key="NSKeyEquivalent"/>
594 <int key="NSPeriodicDelay">200</int>
595 <int key="NSPeriodicInterval">25</int>
596 </object>
597 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
598 </object>
599 <object class="NSButton" id="1061611931">
600 <reference key="NSNextResponder" ref="537034939"/>
601 <int key="NSvFlags">268</int>
602 <string key="NSFrame">{{416, 45}, {123, 32}}</string>
603 <reference key="NSSuperview" ref="537034939"/>
604 <reference key="NSWindow"/>
605 <reference key="NSNextKeyView" ref="138314969"/>
606 <string key="NSReuseIdentifierKey">_NS:161</string>
607 <bool key="NSEnabled">YES</bool>
608 <object class="NSButtonCell" key="NSCell" id="608238510">
609 <int key="NSCellFlags">67108864</int>
610 <int key="NSCellFlags2">134217728</int>
611 <string key="NSContents">Start transfer</string>
612 <reference key="NSSupport" ref="870520972"/>
613 <string key="NSCellIdentifier">_NS:161</string>
614 <reference key="NSControlView" ref="1061611931"/>
615 <int key="NSButtonFlags">-2038284288</int>
616 <int key="NSButtonFlags2">129</int>
617 <reference key="NSAlternateImage" ref="870520972"/>
618 <string key="NSAlternateContents"/>
619 <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
620 <int key="NSPeriodicDelay">200</int>
621 <int key="NSPeriodicInterval">25</int>
622 </object>
623 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
624 </object>
625 <object class="NSProgressIndicator" id="53446878">
626 <reference key="NSNextResponder" ref="537034939"/>
627 <int key="NSvFlags">1292</int>
628 <string key="NSFrame">{{244, 83}, {16, 16}}</string>
629 <reference key="NSSuperview" ref="537034939"/>
630 <reference key="NSWindow"/>
631 <reference key="NSNextKeyView" ref="727455678"/>
632 <string key="NSReuseIdentifierKey">_NS:3954</string>
633 <int key="NSpiFlags">28938</int>
634 <double key="NSMaxValue">100</double>
635 </object>
636 <object class="NSTextField" id="727455678">
637 <reference key="NSNextResponder" ref="537034939"/>
638 <int key="NSvFlags">268</int>
639 <string key="NSFrame">{{263, 83}, {273, 17}}</string>
640 <reference key="NSSuperview" ref="537034939"/>
641 <reference key="NSWindow"/>
642 <reference key="NSNextKeyView" ref="291839274"/>
643 <string key="NSReuseIdentifierKey">_NS:3936</string>
644 <bool key="NSEnabled">YES</bool>
645 <object class="NSTextFieldCell" key="NSCell" id="873681103">
646 <int key="NSCellFlags">68157504</int>
647 <int key="NSCellFlags2">272630784</int>
648 <string key="NSContents">status…</string>
649 <reference key="NSSupport" ref="870520972"/>
650 <string key="NSCellIdentifier">_NS:3936</string>
651 <reference key="NSControlView" ref="727455678"/>
652 <reference key="NSBackgroundColor" ref="462322918"/>
653 <reference key="NSTextColor" ref="374908237"/>
654 </object>
655 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
656 </object>
657 <object class="NSTextField" id="213673854">
658 <reference key="NSNextResponder" ref="537034939"/>
659 <int key="NSvFlags">268</int>
660 <string key="NSFrame">{{241, 83}, {295, 17}}</string>
661 <reference key="NSSuperview" ref="537034939"/>
662 <reference key="NSWindow"/>
663 <reference key="NSNextKeyView" ref="53446878"/>
664 <string key="NSReuseIdentifierKey">_NS:3936</string>
665 <bool key="NSEnabled">YES</bool>
666 <object class="NSTextFieldCell" key="NSCell" id="468926987">
667 <int key="NSCellFlags">68157504</int>
668 <int key="NSCellFlags2">272630784</int>
669 <string key="NSContents"/>
670 <reference key="NSSupport" ref="870520972"/>
671 <string key="NSCellIdentifier">_NS:3936</string>
672 <reference key="NSControlView" ref="213673854"/>
673 <reference key="NSBackgroundColor" ref="462322918"/>
674 <object class="NSColor" key="NSTextColor">
675 <int key="NSColorSpace">1</int>
676 <bytes key="NSRGB">MSAwIDAAA</bytes>
677 </object>
678 </object>
679 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
680 </object>
681 </object>
682 <string key="NSFrameSize">{553, 185}</string>
683 <reference key="NSSuperview"/>
684 <reference key="NSWindow"/>
685 <reference key="NSNextKeyView" ref="983573643"/>
686 <string key="NSReuseIdentifierKey">_NS:2818</string>
687 </object>
688 <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
689 <string key="NSMaxSize">{10000000000000, 10000000000000}</string>
690 <bool key="NSWindowIsRestorable">YES</bool>
691 </object>
692 <object class="NSUserDefaultsController" id="431450128">
693 <bool key="NSSharedInstance">YES</bool>
694 </object>
695 </object>
696 <object class="IBObjectContainer" key="IBDocument.Objects">
697 <object class="NSMutableArray" key="connectionRecords">
698 <bool key="EncodedWithXMLCoder">YES</bool>
699 <object class="IBConnectionRecord">
700 <object class="IBOutletConnection" key="connection">
701 <string key="label">window</string>
702 <reference key="source" ref="1001"/>
703 <reference key="destination" ref="265268434"/>
704 </object>
705 <int key="connectionID">29</int>
706 </object>
707 <object class="IBConnectionRecord">
708 <object class="IBOutletConnection" key="connection">
709 <string key="label">blockSizeBox</string>
710 <reference key="source" ref="1001"/>
711 <reference key="destination" ref="183069999"/>
712 </object>
713 <int key="connectionID">60</int>
714 </object>
715 <object class="IBConnectionRecord">
716 <object class="IBOutletConnection" key="connection">
717 <string key="label">remoteHostBox</string>
718 <reference key="source" ref="1001"/>
719 <reference key="destination" ref="712275833"/>
720 </object>
721 <int key="connectionID">129</int>
722 </object>
723 <object class="IBConnectionRecord">
724 <object class="IBActionConnection" key="connection">
725 <string key="label">startXfer:</string>
726 <reference key="source" ref="1001"/>
727 <reference key="destination" ref="1061611931"/>
728 </object>
729 <int key="connectionID">130</int>
730 </object>
731 <object class="IBConnectionRecord">
732 <object class="IBActionConnection" key="connection">
733 <string key="label">pickFile:</string>
734 <reference key="source" ref="1001"/>
735 <reference key="destination" ref="176529531"/>
736 </object>
737 <int key="connectionID">131</int>
738 </object>
739 <object class="IBConnectionRecord">
740 <object class="IBActionConnection" key="connection">
741 <string key="label">performClose:</string>
742 <reference key="source" ref="265268434"/>
743 <reference key="destination" ref="1053800845"/>
744 </object>
745 <int key="connectionID">35</int>
746 </object>
747 <object class="IBConnectionRecord">
748 <object class="IBOutletConnection" key="connection">
749 <string key="label">initialFirstResponder</string>
750 <reference key="source" ref="265268434"/>
751 <reference key="destination" ref="392834772"/>
752 </object>
753 <int key="connectionID">62</int>
754 </object>
755 <object class="IBConnectionRecord">
756 <object class="IBOutletConnection" key="connection">
757 <string key="label">delegate</string>
758 <reference key="source" ref="265268434"/>
759 <reference key="destination" ref="1001"/>
760 </object>
761 <int key="connectionID">128</int>
762 </object>
763 <object class="IBConnectionRecord">
764 <object class="IBBindingConnection" key="connection">
765 <string key="label">enabled: self.doTouchMe</string>
766 <reference key="source" ref="1053800845"/>
767 <reference key="destination" ref="1001"/>
768 <object class="NSNibBindingConnector" key="connector">
769 <reference key="NSSource" ref="1053800845"/>
770 <reference key="NSDestination" ref="1001"/>
771 <string key="NSLabel">enabled: self.doTouchMe</string>
772 <string key="NSBinding">enabled</string>
773 <string key="NSKeyPath">self.doTouchMe</string>
774 <int key="NSNibBindingConnectorVersion">2</int>
775 </object>
776 </object>
777 <int key="connectionID">80</int>
778 </object>
779 <object class="IBConnectionRecord">
780 <object class="IBBindingConnection" key="connection">
781 <string key="label">enabled: self.doTouchMe</string>
782 <reference key="source" ref="1061611931"/>
783 <reference key="destination" ref="1001"/>
784 <object class="NSNibBindingConnector" key="connector">
785 <reference key="NSSource" ref="1061611931"/>
786 <reference key="NSDestination" ref="1001"/>
787 <string key="NSLabel">enabled: self.doTouchMe</string>
788 <string key="NSBinding">enabled</string>
789 <string key="NSKeyPath">self.doTouchMe</string>
790 <int key="NSNibBindingConnectorVersion">2</int>
791 </object>
792 </object>
793 <int key="connectionID">82</int>
794 </object>
795 <object class="IBConnectionRecord">
796 <object class="IBBindingConnection" key="connection">
797 <string key="label">value: self.blockSize</string>
798 <reference key="source" ref="183069999"/>
799 <reference key="destination" ref="1001"/>
800 <object class="NSNibBindingConnector" key="connector">
801 <reference key="NSSource" ref="183069999"/>
802 <reference key="NSDestination" ref="1001"/>
803 <string key="NSLabel">value: self.blockSize</string>
804 <string key="NSBinding">value</string>
805 <string key="NSKeyPath">self.blockSize</string>
806 <object class="NSDictionary" key="NSOptions">
807 <bool key="EncodedWithXMLCoder">YES</bool>
808 <object class="NSArray" key="dict.sortedKeys">
809 <bool key="EncodedWithXMLCoder">YES</bool>
810 <string>NSContinuouslyUpdatesValue</string>
811 <string>NSValueTransformerName</string>
812 </object>
813 <object class="NSArray" key="dict.values">
814 <bool key="EncodedWithXMLCoder">YES</bool>
815 <boolean value="YES"/>
816 <string>NumberTransformer</string>
817 </object>
818 </object>
819 <int key="NSNibBindingConnectorVersion">2</int>
820 </object>
821 </object>
822 <int key="connectionID">56</int>
823 </object>
824 <object class="IBConnectionRecord">
825 <object class="IBBindingConnection" key="connection">
826 <string key="label">enabled: self.doTouchMe</string>
827 <reference key="source" ref="183069999"/>
828 <reference key="destination" ref="1001"/>
829 <object class="NSNibBindingConnector" key="connector">
830 <reference key="NSSource" ref="183069999"/>
831 <reference key="NSDestination" ref="1001"/>
832 <string key="NSLabel">enabled: self.doTouchMe</string>
833 <string key="NSBinding">enabled</string>
834 <string key="NSKeyPath">self.doTouchMe</string>
835 <int key="NSNibBindingConnectorVersion">2</int>
836 </object>
837 </object>
838 <int key="connectionID">77</int>
839 </object>
840 <object class="IBConnectionRecord">
841 <object class="IBBindingConnection" key="connection">
842 <string key="label">value: self.xferType</string>
843 <reference key="source" ref="1029217440"/>
844 <reference key="destination" ref="1001"/>
845 <object class="NSNibBindingConnector" key="connector">
846 <reference key="NSSource" ref="1029217440"/>
847 <reference key="NSDestination" ref="1001"/>
848 <string key="NSLabel">value: self.xferType</string>
849 <string key="NSBinding">value</string>
850 <string key="NSKeyPath">self.xferType</string>
851 <object class="NSDictionary" key="NSOptions">
852 <string key="NS.key.0">NSContinuouslyUpdatesValue</string>
853 <boolean value="YES" key="NS.object.0"/>
854 </object>
855 <int key="NSNibBindingConnectorVersion">2</int>
856 </object>
857 </object>
858 <int key="connectionID">52</int>
859 </object>
860 <object class="IBConnectionRecord">
861 <object class="IBBindingConnection" key="connection">
862 <string key="label">enabled: self.doTouchMe</string>
863 <reference key="source" ref="1029217440"/>
864 <reference key="destination" ref="1001"/>
865 <object class="NSNibBindingConnector" key="connector">
866 <reference key="NSSource" ref="1029217440"/>
867 <reference key="NSDestination" ref="1001"/>
868 <string key="NSLabel">enabled: self.doTouchMe</string>
869 <string key="NSBinding">enabled</string>
870 <string key="NSKeyPath">self.doTouchMe</string>
871 <int key="NSNibBindingConnectorVersion">2</int>
872 </object>
873 </object>
874 <int key="connectionID">75</int>
875 </object>
876 <object class="IBConnectionRecord">
877 <object class="IBBindingConnection" key="connection">
878 <string key="label">value: self.remoteFile</string>
879 <reference key="source" ref="685519878"/>
880 <reference key="destination" ref="1001"/>
881 <object class="NSNibBindingConnector" key="connector">
882 <reference key="NSSource" ref="685519878"/>
883 <reference key="NSDestination" ref="1001"/>
884 <string key="NSLabel">value: self.remoteFile</string>
885 <string key="NSBinding">value</string>
886 <string key="NSKeyPath">self.remoteFile</string>
887 <object class="NSDictionary" key="NSOptions">
888 <string key="NS.key.0">NSContinuouslyUpdatesValue</string>
889 <boolean value="YES" key="NS.object.0"/>
890 </object>
891 <int key="NSNibBindingConnectorVersion">2</int>
892 </object>
893 </object>
894 <int key="connectionID">49</int>
895 </object>
896 <object class="IBConnectionRecord">
897 <object class="IBBindingConnection" key="connection">
898 <string key="label">value: self.localFile</string>
899 <reference key="source" ref="392834772"/>
900 <reference key="destination" ref="1001"/>
901 <object class="NSNibBindingConnector" key="connector">
902 <reference key="NSSource" ref="392834772"/>
903 <reference key="NSDestination" ref="1001"/>
904 <string key="NSLabel">value: self.localFile</string>
905 <string key="NSBinding">value</string>
906 <string key="NSKeyPath">self.localFile</string>
907 <object class="NSDictionary" key="NSOptions">
908 <string key="NS.key.0">NSContinuouslyUpdatesValue</string>
909 <boolean value="YES" key="NS.object.0"/>
910 </object>
911 <int key="NSNibBindingConnectorVersion">2</int>
912 </object>
913 </object>
914 <int key="connectionID">43</int>
915 </object>
916 <object class="IBConnectionRecord">
917 <object class="IBBindingConnection" key="connection">
918 <string key="label">enabled: self.doTouchMe</string>
919 <reference key="source" ref="392834772"/>
920 <reference key="destination" ref="1001"/>
921 <object class="NSNibBindingConnector" key="connector">
922 <reference key="NSSource" ref="392834772"/>
923 <reference key="NSDestination" ref="1001"/>
924 <string key="NSLabel">enabled: self.doTouchMe</string>
925 <string key="NSBinding">enabled</string>
926 <string key="NSKeyPath">self.doTouchMe</string>
927 <int key="NSNibBindingConnectorVersion">2</int>
928 </object>
929 </object>
930 <int key="connectionID">70</int>
931 </object>
932 <object class="IBConnectionRecord">
933 <object class="IBBindingConnection" key="connection">
934 <string key="label">enabled: self.doTouchMe</string>
935 <reference key="source" ref="176529531"/>
936 <reference key="destination" ref="1001"/>
937 <object class="NSNibBindingConnector" key="connector">
938 <reference key="NSSource" ref="176529531"/>
939 <reference key="NSDestination" ref="1001"/>
940 <string key="NSLabel">enabled: self.doTouchMe</string>
941 <string key="NSBinding">enabled</string>
942 <string key="NSKeyPath">self.doTouchMe</string>
943 <int key="NSNibBindingConnectorVersion">2</int>
944 </object>
945 </object>
946 <int key="connectionID">73</int>
947 </object>
948 <object class="IBConnectionRecord">
949 <object class="IBBindingConnection" key="connection">
950 <string key="label">value: self.remoteHost</string>
951 <reference key="source" ref="23478474"/>
952 <reference key="destination" ref="1001"/>
953 <object class="NSNibBindingConnector" key="connector">
954 <reference key="NSSource" ref="23478474"/>
955 <reference key="NSDestination" ref="1001"/>
956 <string key="NSLabel">value: self.remoteHost</string>
957 <string key="NSBinding">value</string>
958 <string key="NSKeyPath">self.remoteHost</string>
959 <object class="NSDictionary" key="NSOptions">
960 <string key="NS.key.0">NSContinuouslyUpdatesValue</string>
961 <boolean value="YES" key="NS.object.0"/>
962 </object>
963 <int key="NSNibBindingConnectorVersion">2</int>
964 </object>
965 </object>
966 <int key="connectionID">46</int>
967 </object>
968 <object class="IBConnectionRecord">
969 <object class="IBBindingConnection" key="connection">
970 <string key="label">enabled: self.doTouchMe</string>
971 <reference key="source" ref="23478474"/>
972 <reference key="destination" ref="1001"/>
973 <object class="NSNibBindingConnector" key="connector">
974 <reference key="NSSource" ref="23478474"/>
975 <reference key="NSDestination" ref="1001"/>
976 <string key="NSLabel">enabled: self.doTouchMe</string>
977 <string key="NSBinding">enabled</string>
978 <string key="NSKeyPath">self.doTouchMe</string>
979 <int key="NSNibBindingConnectorVersion">2</int>
980 </object>
981 </object>
982 <int key="connectionID">85</int>
983 </object>
984 <object class="IBConnectionRecord">
985 <object class="IBBindingConnection" key="connection">
986 <string key="label">enabled: self.doTouchMe</string>
987 <reference key="source" ref="471811034"/>
988 <reference key="destination" ref="1001"/>
989 <object class="NSNibBindingConnector" key="connector">
990 <reference key="NSSource" ref="471811034"/>
991 <reference key="NSDestination" ref="1001"/>
992 <string key="NSLabel">enabled: self.doTouchMe</string>
993 <string key="NSBinding">enabled</string>
994 <string key="NSKeyPath">self.doTouchMe</string>
995 <int key="NSNibBindingConnectorVersion">2</int>
996 </object>
997 </object>
998 <int key="connectionID">87</int>
999 </object>
1000 <object class="IBConnectionRecord">
1001 <object class="IBBindingConnection" key="connection">
1002 <string key="label">value: self.remotePort</string>
1003 <reference key="source" ref="471811034"/>
1004 <reference key="destination" ref="1001"/>
1005 <object class="NSNibBindingConnector" key="connector">
1006 <reference key="NSSource" ref="471811034"/>
1007 <reference key="NSDestination" ref="1001"/>
1008 <string key="NSLabel">value: self.remotePort</string>
1009 <string key="NSBinding">value</string>
1010 <string key="NSKeyPath">self.remotePort</string>
1011 <object class="NSDictionary" key="NSOptions">
1012 <string key="NS.key.0">NSValueTransformerName</string>
1013 <string key="NS.object.0">NumberTransformer</string>
1014 </object>
1015 <int key="NSNibBindingConnectorVersion">2</int>
1016 </object>
1017 </object>
1018 <int key="connectionID">111</int>
1019 </object>
1020 <object class="IBConnectionRecord">
1021 <object class="IBBindingConnection" key="connection">
1022 <string key="label">animate: self.doTouchMe</string>
1023 <reference key="source" ref="53446878"/>
1024 <reference key="destination" ref="1001"/>
1025 <object class="NSNibBindingConnector" key="connector">
1026 <reference key="NSSource" ref="53446878"/>
1027 <reference key="NSDestination" ref="1001"/>
1028 <string key="NSLabel">animate: self.doTouchMe</string>
1029 <string key="NSBinding">animate</string>
1030 <string key="NSKeyPath">self.doTouchMe</string>
1031 <object class="NSDictionary" key="NSOptions">
1032 <string key="NS.key.0">NSValueTransformerName</string>
1033 <string key="NS.object.0">NSNegateBoolean</string>
1034 </object>
1035 <int key="NSNibBindingConnectorVersion">2</int>
1036 </object>
1037 </object>
1038 <int key="connectionID">94</int>
1039 </object>
1040 <object class="IBConnectionRecord">
1041 <object class="IBBindingConnection" key="connection">
1042 <string key="label">hidden: self.doTouchMe</string>
1043 <reference key="source" ref="53446878"/>
1044 <reference key="destination" ref="1001"/>
1045 <object class="NSNibBindingConnector" key="connector">
1046 <reference key="NSSource" ref="53446878"/>
1047 <reference key="NSDestination" ref="1001"/>
1048 <string key="NSLabel">hidden: self.doTouchMe</string>
1049 <string key="NSBinding">hidden</string>
1050 <string key="NSKeyPath">self.doTouchMe</string>
1051 <int key="NSNibBindingConnectorVersion">2</int>
1052 </object>
1053 </object>
1054 <int key="connectionID">95</int>
1055 </object>
1056 <object class="IBConnectionRecord">
1057 <object class="IBBindingConnection" key="connection">
1058 <string key="label">value: self.statusLabel</string>
1059 <reference key="source" ref="727455678"/>
1060 <reference key="destination" ref="1001"/>
1061 <object class="NSNibBindingConnector" key="connector">
1062 <reference key="NSSource" ref="727455678"/>
1063 <reference key="NSDestination" ref="1001"/>
1064 <string key="NSLabel">value: self.statusLabel</string>
1065 <string key="NSBinding">value</string>
1066 <string key="NSKeyPath">self.statusLabel</string>
1067 <int key="NSNibBindingConnectorVersion">2</int>
1068 </object>
1069 </object>
1070 <int key="connectionID">104</int>
1071 </object>
1072 <object class="IBConnectionRecord">
1073 <object class="IBBindingConnection" key="connection">
1074 <string key="label">enabled: self.doTouchMe</string>
1075 <reference key="source" ref="727455678"/>
1076 <reference key="destination" ref="1001"/>
1077 <object class="NSNibBindingConnector" key="connector">
1078 <reference key="NSSource" ref="727455678"/>
1079 <reference key="NSDestination" ref="1001"/>
1080 <string key="NSLabel">enabled: self.doTouchMe</string>
1081 <string key="NSBinding">enabled</string>
1082 <string key="NSKeyPath">self.doTouchMe</string>
1083 <int key="NSNibBindingConnectorVersion">2</int>
1084 </object>
1085 </object>
1086 <int key="connectionID">138</int>
1087 </object>
1088 <object class="IBConnectionRecord">
1089 <object class="IBBindingConnection" key="connection">
1090 <string key="label">hidden: self.doTouchMe</string>
1091 <reference key="source" ref="727455678"/>
1092 <reference key="destination" ref="1001"/>
1093 <object class="NSNibBindingConnector" key="connector">
1094 <reference key="NSSource" ref="727455678"/>
1095 <reference key="NSDestination" ref="1001"/>
1096 <string key="NSLabel">hidden: self.doTouchMe</string>
1097 <string key="NSBinding">hidden</string>
1098 <string key="NSKeyPath">self.doTouchMe</string>
1099 <int key="NSNibBindingConnectorVersion">2</int>
1100 </object>
1101 </object>
1102 <int key="connectionID">140</int>
1103 </object>
1104 <object class="IBConnectionRecord">
1105 <object class="IBBindingConnection" key="connection">
1106 <string key="label">value: self.errorLabel</string>
1107 <reference key="source" ref="213673854"/>
1108 <reference key="destination" ref="1001"/>
1109 <object class="NSNibBindingConnector" key="connector">
1110 <reference key="NSSource" ref="213673854"/>
1111 <reference key="NSDestination" ref="1001"/>
1112 <string key="NSLabel">value: self.errorLabel</string>
1113 <string key="NSBinding">value</string>
1114 <string key="NSKeyPath">self.errorLabel</string>
1115 <int key="NSNibBindingConnectorVersion">2</int>
1116 </object>
1117 </object>
1118 <int key="connectionID">115</int>
1119 </object>
1120 <object class="IBConnectionRecord">
1121 <object class="IBBindingConnection" key="connection">
1122 <string key="label">hidden: self.doTouchMe</string>
1123 <reference key="source" ref="213673854"/>
1124 <reference key="destination" ref="1001"/>
1125 <object class="NSNibBindingConnector" key="connector">
1126 <reference key="NSSource" ref="213673854"/>
1127 <reference key="NSDestination" ref="1001"/>
1128 <string key="NSLabel">hidden: self.doTouchMe</string>
1129 <string key="NSBinding">hidden</string>
1130 <string key="NSKeyPath">self.doTouchMe</string>
1131 <object class="NSDictionary" key="NSOptions">
1132 <string key="NS.key.0">NSValueTransformerName</string>
1133 <string key="NS.object.0">NSNegateBoolean</string>
1134 </object>
1135 <int key="NSNibBindingConnectorVersion">2</int>
1136 </object>
1137 </object>
1138 <int key="connectionID">118</int>
1139 </object>
1140 <object class="IBConnectionRecord">
1141 <object class="IBBindingConnection" key="connection">
1142 <string key="label">value: self.timeout</string>
1143 <reference key="source" ref="720108113"/>
1144 <reference key="destination" ref="1001"/>
1145 <object class="NSNibBindingConnector" key="connector">
1146 <reference key="NSSource" ref="720108113"/>
1147 <reference key="NSDestination" ref="1001"/>
1148 <string key="NSLabel">value: self.timeout</string>
1149 <string key="NSBinding">value</string>
1150 <string key="NSKeyPath">self.timeout</string>
1151 <object class="NSDictionary" key="NSOptions">
1152 <string key="NS.key.0">NSValueTransformerName</string>
1153 <string key="NS.object.0">NumberTransformer</string>
1154 </object>
1155 <int key="NSNibBindingConnectorVersion">2</int>
1156 </object>
1157 </object>
1158 <int key="connectionID">127</int>
1159 </object>
1160 </object>
1161 <object class="IBMutableOrderedSet" key="objectRecords">
1162 <object class="NSArray" key="orderedObjects">
1163 <bool key="EncodedWithXMLCoder">YES</bool>
1164 <object class="IBObjectRecord">
1165 <int key="objectID">0</int>
1166 <object class="NSArray" key="object" id="0">
1167 <bool key="EncodedWithXMLCoder">YES</bool>
1168 </object>
1169 <reference key="children" ref="1000"/>
1170 <nil key="parent"/>
1171 </object>
1172 <object class="IBObjectRecord">
1173 <int key="objectID">-2</int>
1174 <reference key="object" ref="1001"/>
1175 <reference key="parent" ref="0"/>
1176 <string key="objectName">File's Owner</string>
1177 </object>
1178 <object class="IBObjectRecord">
1179 <int key="objectID">-1</int>
1180 <reference key="object" ref="1003"/>
1181 <reference key="parent" ref="0"/>
1182 <string key="objectName">First Responder</string>
1183 </object>
1184 <object class="IBObjectRecord">
1185 <int key="objectID">-3</int>
1186 <reference key="object" ref="1004"/>
1187 <reference key="parent" ref="0"/>
1188 <string key="objectName">Application</string>
1189 </object>
1190 <object class="IBObjectRecord">
1191 <int key="objectID">3</int>
1192 <reference key="object" ref="265268434"/>
1193 <object class="NSMutableArray" key="children">
1194 <bool key="EncodedWithXMLCoder">YES</bool>
1195 <reference ref="537034939"/>
1196 </object>
1197 <reference key="parent" ref="0"/>
1198 <string key="objectName">Window - Request dialog</string>
1199 </object>
1200 <object class="IBObjectRecord">
1201 <int key="objectID">4</int>
1202 <reference key="object" ref="537034939"/>
1203 <object class="NSMutableArray" key="children">
1204 <bool key="EncodedWithXMLCoder">YES</bool>
1205 <reference ref="1053800845"/>
1206 <reference ref="183069999"/>
1207 <reference ref="1029217440"/>
1208 <reference ref="1027449834"/>
1209 <reference ref="291839274"/>
1210 <reference ref="685519878"/>
1211 <reference ref="712275833"/>
1212 <reference ref="983573643"/>
1213 <reference ref="1061611931"/>
1214 <reference ref="53446878"/>
1215 <reference ref="727455678"/>
1216 <reference ref="213673854"/>
1217 <reference ref="392834772"/>
1218 <reference ref="23478474"/>
1219 <reference ref="525390780"/>
1220 <reference ref="471811034"/>
1221 <reference ref="656785083"/>
1222 <reference ref="138314969"/>
1223 <reference ref="720108113"/>
1224 <reference ref="176529531"/>
1225 </object>
1226 <reference key="parent" ref="265268434"/>
1227 </object>
1228 <object class="IBObjectRecord">
1229 <int key="objectID">5</int>
1230 <reference key="object" ref="1053800845"/>
1231 <object class="NSMutableArray" key="children">
1232 <bool key="EncodedWithXMLCoder">YES</bool>
1233 <reference ref="673387987"/>
1234 </object>
1235 <reference key="parent" ref="537034939"/>
1236 <string key="objectName">Push Button - no</string>
1237 </object>
1238 <object class="IBObjectRecord">
1239 <int key="objectID">6</int>
1240 <reference key="object" ref="1061611931"/>
1241 <object class="NSMutableArray" key="children">
1242 <bool key="EncodedWithXMLCoder">YES</bool>
1243 <reference ref="608238510"/>
1244 </object>
1245 <reference key="parent" ref="537034939"/>
1246 <string key="objectName">Push Button - go</string>
1247 </object>
1248 <object class="IBObjectRecord">
1249 <int key="objectID">7</int>
1250 <reference key="object" ref="183069999"/>
1251 <object class="NSMutableArray" key="children">
1252 <bool key="EncodedWithXMLCoder">YES</bool>
1253 <reference ref="418627588"/>
1254 </object>
1255 <reference key="parent" ref="537034939"/>
1256 <string key="objectName">Combo Box - block size</string>
1257 </object>
1258 <object class="IBObjectRecord">
1259 <int key="objectID">8</int>
1260 <reference key="object" ref="1029217440"/>
1261 <object class="NSMutableArray" key="children">
1262 <bool key="EncodedWithXMLCoder">YES</bool>
1263 <reference ref="567568844"/>
1264 </object>
1265 <reference key="parent" ref="537034939"/>
1266 <string key="objectName">Combo Box - xfer type</string>
1267 </object>
1268 <object class="IBObjectRecord">
1269 <int key="objectID">9</int>
1270 <reference key="object" ref="1027449834"/>
1271 <object class="NSMutableArray" key="children">
1272 <bool key="EncodedWithXMLCoder">YES</bool>
1273 <reference ref="977543267"/>
1274 </object>
1275 <reference key="parent" ref="537034939"/>
1276 </object>
1277 <object class="IBObjectRecord">
1278 <int key="objectID">10</int>
1279 <reference key="object" ref="291839274"/>
1280 <object class="NSMutableArray" key="children">
1281 <bool key="EncodedWithXMLCoder">YES</bool>
1282 <reference ref="61967082"/>
1283 </object>
1284 <reference key="parent" ref="537034939"/>
1285 </object>
1286 <object class="IBObjectRecord">
1287 <int key="objectID">11</int>
1288 <reference key="object" ref="685519878"/>
1289 <object class="NSMutableArray" key="children">
1290 <bool key="EncodedWithXMLCoder">YES</bool>
1291 <reference ref="983145747"/>
1292 </object>
1293 <reference key="parent" ref="537034939"/>
1294 <string key="objectName">Text Field - remote file</string>
1295 </object>
1296 <object class="IBObjectRecord">
1297 <int key="objectID">12</int>
1298 <reference key="object" ref="712275833"/>
1299 <object class="NSMutableArray" key="children">
1300 <bool key="EncodedWithXMLCoder">YES</bool>
1301 <reference ref="931249278"/>
1302 </object>
1303 <reference key="parent" ref="537034939"/>
1304 </object>
1305 <object class="IBObjectRecord">
1306 <int key="objectID">13</int>
1307 <reference key="object" ref="392834772"/>
1308 <object class="NSMutableArray" key="children">
1309 <bool key="EncodedWithXMLCoder">YES</bool>
1310 <reference ref="47222242"/>
1311 </object>
1312 <reference key="parent" ref="537034939"/>
1313 <string key="objectName">Text Field - local file</string>
1314 </object>
1315 <object class="IBObjectRecord">
1316 <int key="objectID">14</int>
1317 <reference key="object" ref="983573643"/>
1318 <object class="NSMutableArray" key="children">
1319 <bool key="EncodedWithXMLCoder">YES</bool>
1320 <reference ref="85931455"/>
1321 </object>
1322 <reference key="parent" ref="537034939"/>
1323 </object>
1324 <object class="IBObjectRecord">
1325 <int key="objectID">15</int>
1326 <reference key="object" ref="176529531"/>
1327 <object class="NSMutableArray" key="children">
1328 <bool key="EncodedWithXMLCoder">YES</bool>
1329 <reference ref="827794247"/>
1330 </object>
1331 <reference key="parent" ref="537034939"/>
1332 </object>
1333 <object class="IBObjectRecord">
1334 <int key="objectID">16</int>
1335 <reference key="object" ref="827794247"/>
1336 <reference key="parent" ref="176529531"/>
1337 </object>
1338 <object class="IBObjectRecord">
1339 <int key="objectID">17</int>
1340 <reference key="object" ref="85931455"/>
1341 <reference key="parent" ref="983573643"/>
1342 </object>
1343 <object class="IBObjectRecord">
1344 <int key="objectID">18</int>
1345 <reference key="object" ref="47222242"/>
1346 <reference key="parent" ref="392834772"/>
1347 </object>
1348 <object class="IBObjectRecord">
1349 <int key="objectID">19</int>
1350 <reference key="object" ref="931249278"/>
1351 <reference key="parent" ref="712275833"/>
1352 </object>
1353 <object class="IBObjectRecord">
1354 <int key="objectID">20</int>
1355 <reference key="object" ref="983145747"/>
1356 <reference key="parent" ref="685519878"/>
1357 </object>
1358 <object class="IBObjectRecord">
1359 <int key="objectID">21</int>
1360 <reference key="object" ref="61967082"/>
1361 <reference key="parent" ref="291839274"/>
1362 </object>
1363 <object class="IBObjectRecord">
1364 <int key="objectID">22</int>
1365 <reference key="object" ref="977543267"/>
1366 <reference key="parent" ref="1027449834"/>
1367 </object>
1368 <object class="IBObjectRecord">
1369 <int key="objectID">23</int>
1370 <reference key="object" ref="567568844"/>
1371 <reference key="parent" ref="1029217440"/>
1372 </object>
1373 <object class="IBObjectRecord">
1374 <int key="objectID">24</int>
1375 <reference key="object" ref="418627588"/>
1376 <reference key="parent" ref="183069999"/>
1377 </object>
1378 <object class="IBObjectRecord">
1379 <int key="objectID">25</int>
1380 <reference key="object" ref="608238510"/>
1381 <reference key="parent" ref="1061611931"/>
1382 </object>
1383 <object class="IBObjectRecord">
1384 <int key="objectID">26</int>
1385 <reference key="object" ref="673387987"/>
1386 <reference key="parent" ref="1053800845"/>
1387 </object>
1388 <object class="IBObjectRecord">
1389 <int key="objectID">30</int>
1390 <reference key="object" ref="23478474"/>
1391 <object class="NSMutableArray" key="children">
1392 <bool key="EncodedWithXMLCoder">YES</bool>
1393 <reference ref="241562469"/>
1394 </object>
1395 <reference key="parent" ref="537034939"/>
1396 <string key="objectName">Text Field - remote host</string>
1397 </object>
1398 <object class="IBObjectRecord">
1399 <int key="objectID">31</int>
1400 <reference key="object" ref="241562469"/>
1401 <reference key="parent" ref="23478474"/>
1402 </object>
1403 <object class="IBObjectRecord">
1404 <int key="objectID">32</int>
1405 <reference key="object" ref="656785083"/>
1406 <object class="NSMutableArray" key="children">
1407 <bool key="EncodedWithXMLCoder">YES</bool>
1408 <reference ref="114681340"/>
1409 </object>
1410 <reference key="parent" ref="537034939"/>
1411 </object>
1412 <object class="IBObjectRecord">
1413 <int key="objectID">33</int>
1414 <reference key="object" ref="114681340"/>
1415 <reference key="parent" ref="656785083"/>
1416 </object>
1417 <object class="IBObjectRecord">
1418 <int key="objectID">37</int>
1419 <reference key="object" ref="431450128"/>
1420 <reference key="parent" ref="0"/>
1421 </object>
1422 <object class="IBObjectRecord">
1423 <int key="objectID">63</int>
1424 <reference key="object" ref="525390780"/>
1425 <object class="NSMutableArray" key="children">
1426 <bool key="EncodedWithXMLCoder">YES</bool>
1427 <reference ref="637728381"/>
1428 </object>
1429 <reference key="parent" ref="537034939"/>
1430 </object>
1431 <object class="IBObjectRecord">
1432 <int key="objectID">64</int>
1433 <reference key="object" ref="637728381"/>
1434 <reference key="parent" ref="525390780"/>
1435 </object>
1436 <object class="IBObjectRecord">
1437 <int key="objectID">65</int>
1438 <reference key="object" ref="471811034"/>
1439 <object class="NSMutableArray" key="children">
1440 <bool key="EncodedWithXMLCoder">YES</bool>
1441 <reference ref="35095251"/>
1442 </object>
1443 <reference key="parent" ref="537034939"/>
1444 <string key="objectName">Text Field - remote port</string>
1445 </object>
1446 <object class="IBObjectRecord">
1447 <int key="objectID">66</int>
1448 <reference key="object" ref="35095251"/>
1449 <reference key="parent" ref="471811034"/>
1450 </object>
1451 <object class="IBObjectRecord">
1452 <int key="objectID">88</int>
1453 <reference key="object" ref="53446878"/>
1454 <reference key="parent" ref="537034939"/>
1455 <string key="objectName">progress indicator</string>
1456 </object>
1457 <object class="IBObjectRecord">
1458 <int key="objectID">89</int>
1459 <reference key="object" ref="727455678"/>
1460 <object class="NSMutableArray" key="children">
1461 <bool key="EncodedWithXMLCoder">YES</bool>
1462 <reference ref="873681103"/>
1463 </object>
1464 <reference key="parent" ref="537034939"/>
1465 </object>
1466 <object class="IBObjectRecord">
1467 <int key="objectID">90</int>
1468 <reference key="object" ref="873681103"/>
1469 <reference key="parent" ref="727455678"/>
1470 </object>
1471 <object class="IBObjectRecord">
1472 <int key="objectID">112</int>
1473 <reference key="object" ref="213673854"/>
1474 <object class="NSMutableArray" key="children">
1475 <bool key="EncodedWithXMLCoder">YES</bool>
1476 <reference ref="468926987"/>
1477 </object>
1478 <reference key="parent" ref="537034939"/>
1479 <string key="objectName">Static Text - error</string>
1480 </object>
1481 <object class="IBObjectRecord">
1482 <int key="objectID">113</int>
1483 <reference key="object" ref="468926987"/>
1484 <reference key="parent" ref="213673854"/>
1485 </object>
1486 <object class="IBObjectRecord">
1487 <int key="objectID">121</int>
1488 <reference key="object" ref="138314969"/>
1489 <object class="NSMutableArray" key="children">
1490 <bool key="EncodedWithXMLCoder">YES</bool>
1491 <reference ref="849261570"/>
1492 </object>
1493 <reference key="parent" ref="537034939"/>
1494 </object>
1495 <object class="IBObjectRecord">
1496 <int key="objectID">122</int>
1497 <reference key="object" ref="849261570"/>
1498 <reference key="parent" ref="138314969"/>
1499 </object>
1500 <object class="IBObjectRecord">
1501 <int key="objectID">123</int>
1502 <reference key="object" ref="720108113"/>
1503 <object class="NSMutableArray" key="children">
1504 <bool key="EncodedWithXMLCoder">YES</bool>
1505 <reference ref="966502450"/>
1506 </object>
1507 <reference key="parent" ref="537034939"/>
1508 <string key="objectName">Text Field - timeout</string>
1509 </object>
1510 <object class="IBObjectRecord">
1511 <int key="objectID">124</int>
1512 <reference key="object" ref="966502450"/>
1513 <reference key="parent" ref="720108113"/>
1514 </object>
1515 </object>
1516 </object>
1517 <object class="NSMutableDictionary" key="flattenedProperties">
1518 <bool key="EncodedWithXMLCoder">YES</bool>
1519 <object class="NSArray" key="dict.sortedKeys">
1520 <bool key="EncodedWithXMLCoder">YES</bool>
1521 <string>-1.IBPluginDependency</string>
1522 <string>-2.IBPluginDependency</string>
1523 <string>-3.IBPluginDependency</string>
1524 <string>10.IBPluginDependency</string>
1525 <string>11.IBAttributePlaceholdersKey</string>
1526 <string>11.IBPluginDependency</string>
1527 <string>112.IBPluginDependency</string>
1528 <string>113.IBPluginDependency</string>
1529 <string>12.IBPluginDependency</string>
1530 <string>121.IBPluginDependency</string>
1531 <string>122.IBPluginDependency</string>
1532 <string>123.IBAttributePlaceholdersKey</string>
1533 <string>123.IBPluginDependency</string>
1534 <string>124.IBPluginDependency</string>
1535 <string>13.IBAttributePlaceholdersKey</string>
1536 <string>13.IBPluginDependency</string>
1537 <string>14.IBPluginDependency</string>
1538 <string>15.IBPluginDependency</string>
1539 <string>16.IBPluginDependency</string>
1540 <string>17.IBPluginDependency</string>
1541 <string>18.IBPluginDependency</string>
1542 <string>19.IBPluginDependency</string>
1543 <string>20.IBPluginDependency</string>
1544 <string>21.IBPluginDependency</string>
1545 <string>22.IBPluginDependency</string>
1546 <string>23.IBAttributePlaceholdersKey</string>
1547 <string>23.IBComboBoxObjectValuesKey.objectValues</string>
1548 <string>23.IBPluginDependency</string>
1549 <string>24.IBComboBoxObjectValuesKey.objectValues</string>
1550 <string>24.IBPluginDependency</string>
1551 <string>25.IBPluginDependency</string>
1552 <string>26.IBPluginDependency</string>
1553 <string>3.IBPluginDependency</string>
1554 <string>3.NSWindowTemplate.visibleAtLaunch</string>
1555 <string>30.IBAttributePlaceholdersKey</string>
1556 <string>30.IBPluginDependency</string>
1557 <string>31.IBPluginDependency</string>
1558 <string>32.IBPluginDependency</string>
1559 <string>33.IBPluginDependency</string>
1560 <string>37.IBPluginDependency</string>
1561 <string>4.IBPluginDependency</string>
1562 <string>4.IBUserGuides</string>
1563 <string>5.IBPluginDependency</string>
1564 <string>6.IBAttributePlaceholdersKey</string>
1565 <string>6.IBPluginDependency</string>
1566 <string>63.IBPluginDependency</string>
1567 <string>64.IBPluginDependency</string>
1568 <string>65.IBAttributePlaceholdersKey</string>
1569 <string>65.IBPluginDependency</string>
1570 <string>66.IBPluginDependency</string>
1571 <string>7.IBAttributePlaceholdersKey</string>
1572 <string>7.IBPluginDependency</string>
1573 <string>8.IBAttributePlaceholdersKey</string>
1574 <string>8.IBPluginDependency</string>
1575 <string>88.IBPluginDependency</string>
1576 <string>89.IBPluginDependency</string>
1577 <string>9.IBPluginDependency</string>
1578 <string>90.IBPluginDependency</string>
1579 </object>
1580 <object class="NSArray" key="dict.values">
1581 <bool key="EncodedWithXMLCoder">YES</bool>
1582 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1583 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1584 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1585 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1586 <object class="NSMutableDictionary">
1587 <string key="NS.key.0">ToolTip</string>
1588 <object class="IBToolTipAttribute" key="NS.object.0">
1589 <string key="name">ToolTip</string>
1590 <reference key="object" ref="685519878"/>
1591 <string key="toolTip">Remote file name (possibly with path relative to tftp root directory).</string>
1592 </object>
1593 </object>
1594 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1595 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1596 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1597 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1598 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1599 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1600 <object class="NSMutableDictionary">
1601 <string key="NS.key.0">ToolTip</string>
1602 <object class="IBToolTipAttribute" key="NS.object.0">
1603 <string key="name">ToolTip</string>
1604 <reference key="object" ref="720108113"/>
1605 <string key="toolTip">Retransmission timeout in seconds.</string>
1606 </object>
1607 </object>
1608 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1609 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1610 <object class="NSMutableDictionary">
1611 <string key="NS.key.0">ToolTip</string>
1612 <object class="IBToolTipAttribute" key="NS.object.0">
1613 <string key="name">ToolTip</string>
1614 <reference key="object" ref="392834772"/>
1615 <string key="toolTip">Local full file name with path.</string>
1616 </object>
1617 </object>
1618 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1619 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1620 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1621 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1622 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1623 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1624 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1625 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1626 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1627 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1628 <object class="NSMutableDictionary">
1629 <bool key="EncodedWithXMLCoder">YES</bool>
1630 <reference key="dict.sortedKeys" ref="0"/>
1631 <reference key="dict.values" ref="0"/>
1632 </object>
1633 <object class="NSArray">
1634 <bool key="EncodedWithXMLCoder">YES</bool>
1635 <string>octet</string>
1636 <string>netascii</string>
1637 </object>
1638 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1639 <object class="NSArray">
1640 <bool key="EncodedWithXMLCoder">YES</bool>
1641 <string>512</string>
1642 <string>1024</string>
1643 <string>2048</string>
1644 <string>4096</string>
1645 </object>
1646 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1647 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1648 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1649 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1650 <boolean value="NO"/>
1651 <object class="NSMutableDictionary">
1652 <string key="NS.key.0">ToolTip</string>
1653 <object class="IBToolTipAttribute" key="NS.object.0">
1654 <string key="name">ToolTip</string>
1655 <reference key="object" ref="23478474"/>
1656 <string key="toolTip">Remote host name or IP address.</string>
1657 </object>
1658 </object>
1659 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1660 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1661 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1662 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1663 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1664 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1665 <object class="NSMutableArray">
1666 <bool key="EncodedWithXMLCoder">YES</bool>
1667 </object>
1668 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1669 <object class="NSMutableDictionary">
1670 <bool key="EncodedWithXMLCoder">YES</bool>
1671 <reference key="dict.sortedKeys" ref="0"/>
1672 <reference key="dict.values" ref="0"/>
1673 </object>
1674 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1675 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1676 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1677 <object class="NSMutableDictionary">
1678 <string key="NS.key.0">ToolTip</string>
1679 <object class="IBToolTipAttribute" key="NS.object.0">
1680 <string key="name">ToolTip</string>
1681 <reference key="object" ref="471811034"/>
1682 <string key="toolTip">Remote UDP port.</string>
1683 </object>
1684 </object>
1685 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1686 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1687 <object class="NSMutableDictionary">
1688 <string key="NS.key.0">ToolTip</string>
1689 <object class="IBToolTipAttribute" key="NS.object.0">
1690 <string key="name">ToolTip</string>
1691 <reference key="object" ref="183069999"/>
1692 <string key="toolTip">Transmission block size in bytes.</string>
1693 </object>
1694 </object>
1695 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1696 <object class="NSMutableDictionary">
1697 <string key="NS.key.0">ToolTip</string>
1698 <object class="IBToolTipAttribute" key="NS.object.0">
1699 <string key="name">ToolTip</string>
1700 <reference key="object" ref="1029217440"/>
1701 <string key="toolTip">TFTP transfer type. Typically 'octet' or 'netascii'. Isn't really taken into account by PumpKIN.</string>
1702 </object>
1703 </object>
1704 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1705 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1706 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1707 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1708 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1709 </object>
1710 </object>
1711 <object class="NSMutableDictionary" key="unlocalizedProperties">
1712 <bool key="EncodedWithXMLCoder">YES</bool>
1713 <reference key="dict.sortedKeys" ref="0"/>
1714 <reference key="dict.values" ref="0"/>
1715 </object>
1716 <nil key="activeLocalization"/>
1717 <object class="NSMutableDictionary" key="localizations">
1718 <bool key="EncodedWithXMLCoder">YES</bool>
1719 <reference key="dict.sortedKeys" ref="0"/>
1720 <reference key="dict.values" ref="0"/>
1721 </object>
1722 <nil key="sourceID"/>
1723 <int key="maxID">140</int>
1724 </object>
1725 <object class="IBClassDescriber" key="IBDocument.Classes">
1726 <object class="NSMutableArray" key="referencedPartialClassDescriptions">
1727 <bool key="EncodedWithXMLCoder">YES</bool>
1728 <object class="IBPartialClassDescription">
1729 <string key="className">ARequest</string>
1730 <string key="superclassName">NSWindowController</string>
1731 <object class="NSMutableDictionary" key="actions">
1732 <bool key="EncodedWithXMLCoder">YES</bool>
1733 <object class="NSArray" key="dict.sortedKeys">
1734 <bool key="EncodedWithXMLCoder">YES</bool>
1735 <string>pickFile:</string>
1736 <string>startXfer:</string>
1737 </object>
1738 <object class="NSArray" key="dict.values">
1739 <bool key="EncodedWithXMLCoder">YES</bool>
1740 <string>id</string>
1741 <string>id</string>
1742 </object>
1743 </object>
1744 <object class="NSMutableDictionary" key="actionInfosByName">
1745 <bool key="EncodedWithXMLCoder">YES</bool>
1746 <object class="NSArray" key="dict.sortedKeys">
1747 <bool key="EncodedWithXMLCoder">YES</bool>
1748 <string>pickFile:</string>
1749 <string>startXfer:</string>
1750 </object>
1751 <object class="NSArray" key="dict.values">
1752 <bool key="EncodedWithXMLCoder">YES</bool>
1753 <object class="IBActionInfo">
1754 <string key="name">pickFile:</string>
1755 <string key="candidateClassName">id</string>
1756 </object>
1757 <object class="IBActionInfo">
1758 <string key="name">startXfer:</string>
1759 <string key="candidateClassName">id</string>
1760 </object>
1761 </object>
1762 </object>
1763 <object class="NSMutableDictionary" key="outlets">
1764 <string key="NS.key.0">remoteHostBox</string>
1765 <string key="NS.object.0">NSTextField</string>
1766 </object>
1767 <object class="NSMutableDictionary" key="toOneOutletInfosByName">
1768 <string key="NS.key.0">remoteHostBox</string>
1769 <object class="IBToOneOutletInfo" key="NS.object.0">
1770 <string key="name">remoteHostBox</string>
1771 <string key="candidateClassName">NSTextField</string>
1772 </object>
1773 </object>
1774 <object class="IBClassDescriptionSource" key="sourceIdentifier">
1775 <string key="majorKey">IBProjectSource</string>
1776 <string key="minorKey">./Classes/ARequest.h</string>
1777 </object>
1778 </object>
1779 </object>
1780 </object>
1781 <int key="IBDocument.localizationMode">0</int>
1782 <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
1783 <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
1784 <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
1785 <integer value="3000" key="NS.object.0"/>
1786 </object>
1787 <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
1788 <int key="IBDocument.defaultPropertyAccessControl">3</int>
1789 </data>
1790</archive>
diff --git a/pumpkin/ConfirmRequest.h b/pumpkin/ConfirmRequest.h
new file mode 100644
index 0000000..5db6f2e
--- a/dev/null
+++ b/pumpkin/ConfirmRequest.h
@@ -0,0 +1,38 @@
1
2#import <Cocoa/Cocoa.h>
3#import "TFTPPacket.h"
4#import "XFer.h"
5
6enum RequestVerdict {
7 verdictDeny = 0,
8 verdictAllow, verdictRename,
9 verdictDefault = verdictDeny
10};
11
12@interface ConfirmRequest : NSWindowController {
13 XFer *xfer;
14 NSString *remoteHost;
15 NSString *remoteAction;
16 NSString *fileName;
17 BOOL fileExists;
18 BOOL isWriteRequest;
19 NSTimer *timeout;
20}
21
22@property (copy) NSString *remoteHost;
23@property (copy) NSString *remoteAction;
24@property (copy) NSString *fileName;
25@property BOOL fileExists;
26@property BOOL isWriteRequest;
27
28@property (assign) IBOutlet NSButton *allowButton;
29@property (assign) IBOutlet NSButton *denyButton;
30@property (assign) IBOutlet NSButton *renameButton;
31
32- (IBAction)letItBe:(id)sender;
33- (IBAction)deny:(id)sender;
34- (IBAction)rename:(id)sender;
35
36+ (void) confirmationWithXfer:(XFer*)x;
37
38@end
diff --git a/pumpkin/ConfirmRequest.m b/pumpkin/ConfirmRequest.m
new file mode 100644
index 0000000..73dfcc1
--- a/dev/null
+++ b/pumpkin/ConfirmRequest.m
@@ -0,0 +1,57 @@
1
2#import "ConfirmRequest.h"
3#import "StringsAttached.h"
4
5@implementation ConfirmRequest
6@synthesize remoteHost;
7@synthesize remoteAction;
8@synthesize fileName;
9@synthesize fileExists;
10@synthesize isWriteRequest;
11
12-(void)sentence:(int)v {
13 [timeout invalidate], [timeout release], timeout=nil;
14 [xfer goOnWithVerdict:v];
15 [self.window performClose:nil];
16 [[[NSUserDefaultsController sharedUserDefaultsController] values]
17 setValue:@(v) forKey:isWriteRequest?@"WRQ.lastSentence":@"RRQ.lastSentence"];
18 [self release];
19}
20
21- (IBAction)letItBe:(id)sender { [self sentence:verdictAllow]; }
22- (IBAction)deny:(id)sender { [self sentence:verdictDeny]; }
23- (IBAction)rename:(id)sender { [self sentence:verdictRename]; }
24- (void)timeout { [self sentence:verdictDefault]; }
25
26- (ConfirmRequest*) initWithXfer:(XFer *)x {
27 enum TFTPOp op = x.initialPacket.op;
28 NSAssert(op==tftpOpRRQ || op==tftpOpWRQ,@"Invalid request to confirm");
29 if(!(self=[super initWithWindowNibName:@"ConfirmRequest"])) return self;
30 isWriteRequest = op==tftpOpWRQ;
31 remoteHost = [[NSString stringWithHostAddress:x.peer] retain];
32 remoteAction = isWriteRequest?@"tries to send you":@"requests the file";
33 fileName = x.xferFilename;
34 fileExists = [[NSFileManager defaultManager] fileExistsAtPath:x.localFile];
35 xfer = [x retain];
36 switch([[[[NSUserDefaultsController sharedUserDefaultsController] values] valueForKey:isWriteRequest?@"WRQ.lastSentence":@"RRQ.lastSentence"] intValue]) {
37 case verdictAllow: self.window.initialFirstResponder = self.allowButton; break;
38 case verdictDeny: self.window.initialFirstResponder = self.denyButton; break;
39 case verdictRename: self.window.initialFirstResponder = self.renameButton; break;
40 }
41 [self.window makeKeyAndOrderFront:nil];
42 timeout = [[NSTimer scheduledTimerWithTimeInterval:[[[[NSUserDefaultsController sharedUserDefaultsController] values] valueForKey:@"confirmationTimeout"] intValue] target:self selector:@selector(timeout) userInfo:nil repeats:NO] retain];
43 return self;
44}
45
46- (void) dealloc {
47 if(timeout) [timeout invalidate], [timeout release];
48 if(remoteHost) [remoteHost release];
49 if(xfer) [xfer release];
50 [super dealloc];
51}
52
53+ (void) confirmationWithXfer:(XFer *)x {
54 [[self alloc] initWithXfer:x];
55}
56
57@end
diff --git a/pumpkin/ConfirmRequest.xib b/pumpkin/ConfirmRequest.xib
new file mode 100644
index 0000000..86d0030
--- a/dev/null
+++ b/pumpkin/ConfirmRequest.xib
@@ -0,0 +1,695 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
3 <data>
4 <int key="IBDocument.SystemTarget">1080</int>
5 <string key="IBDocument.SystemVersion">12C60</string>
6 <string key="IBDocument.InterfaceBuilderVersion">2844</string>
7 <string key="IBDocument.AppKitVersion">1187.34</string>
8 <string key="IBDocument.HIToolboxVersion">625.00</string>
9 <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
10 <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
11 <string key="NS.object.0">2844</string>
12 </object>
13 <array key="IBDocument.IntegratedClassDependencies">
14 <string>NSButton</string>
15 <string>NSButtonCell</string>
16 <string>NSCustomObject</string>
17 <string>NSTextField</string>
18 <string>NSTextFieldCell</string>
19 <string>NSUserDefaultsController</string>
20 <string>NSView</string>
21 <string>NSWindowTemplate</string>
22 </array>
23 <array key="IBDocument.PluginDependencies">
24 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
25 </array>
26 <object class="NSMutableDictionary" key="IBDocument.Metadata">
27 <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
28 <integer value="1" key="NS.object.0"/>
29 </object>
30 <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
31 <object class="NSCustomObject" id="1001">
32 <string key="NSClassName">ConfirmRequest</string>
33 </object>
34 <object class="NSCustomObject" id="1003">
35 <string key="NSClassName">FirstResponder</string>
36 </object>
37 <object class="NSCustomObject" id="1004">
38 <string key="NSClassName">NSApplication</string>
39 </object>
40 <object class="NSWindowTemplate" id="1005">
41 <int key="NSWindowStyleMask">11</int>
42 <int key="NSWindowBacking">2</int>
43 <string key="NSWindowRect">{{578, 340}, {276, 203}}</string>
44 <int key="NSWTFlags">544735232</int>
45 <string key="NSWindowTitle">Incoming request</string>
46 <string key="NSWindowClass">NSWindow</string>
47 <nil key="NSViewClass"/>
48 <nil key="NSUserInterfaceItemIdentifier"/>
49 <string key="NSWindowContentMaxSize">{276, 203}</string>
50 <string key="NSWindowContentMinSize">{276, 203}</string>
51 <object class="NSView" key="NSWindowView" id="1006">
52 <reference key="NSNextResponder"/>
53 <int key="NSvFlags">256</int>
54 <array class="NSMutableArray" key="NSSubviews">
55 <object class="NSTextField" id="1043014274">
56 <reference key="NSNextResponder" ref="1006"/>
57 <int key="NSvFlags">268</int>
58 <string key="NSFrame">{{17, 166}, {60, 17}}</string>
59 <reference key="NSSuperview" ref="1006"/>
60 <reference key="NSNextKeyView" ref="493109509"/>
61 <string key="NSReuseIdentifierKey">_NS:3936</string>
62 <bool key="NSEnabled">YES</bool>
63 <object class="NSTextFieldCell" key="NSCell" id="751681516">
64 <int key="NSCellFlags">68157504</int>
65 <int key="NSCellFlags2">272630784</int>
66 <string key="NSContents">The host</string>
67 <object class="NSFont" key="NSSupport" id="480005309">
68 <string key="NSName">LucidaGrande</string>
69 <double key="NSSize">13</double>
70 <int key="NSfFlags">1044</int>
71 </object>
72 <string key="NSCellIdentifier">_NS:3936</string>
73 <reference key="NSControlView" ref="1043014274"/>
74 <object class="NSColor" key="NSBackgroundColor" id="566729528">
75 <int key="NSColorSpace">6</int>
76 <string key="NSCatalogName">System</string>
77 <string key="NSColorName">controlColor</string>
78 <object class="NSColor" key="NSColor">
79 <int key="NSColorSpace">3</int>
80 <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
81 </object>
82 </object>
83 <object class="NSColor" key="NSTextColor" id="737623876">
84 <int key="NSColorSpace">6</int>
85 <string key="NSCatalogName">System</string>
86 <string key="NSColorName">controlTextColor</string>
87 <object class="NSColor" key="NSColor">
88 <int key="NSColorSpace">3</int>
89 <bytes key="NSWhite">MAA</bytes>
90 </object>
91 </object>
92 </object>
93 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
94 </object>
95 <object class="NSTextField" id="493109509">
96 <reference key="NSNextResponder" ref="1006"/>
97 <int key="NSvFlags">268</int>
98 <string key="NSFrame">{{79, 166}, {117, 17}}</string>
99 <reference key="NSSuperview" ref="1006"/>
100 <reference key="NSNextKeyView" ref="442301359"/>
101 <string key="NSReuseIdentifierKey">_NS:3936</string>
102 <bool key="NSEnabled">YES</bool>
103 <object class="NSTextFieldCell" key="NSCell" id="808816111">
104 <int key="NSCellFlags">68157504</int>
105 <int key="NSCellFlags2">272630784</int>
106 <string key="NSContents">255.255.255.255</string>
107 <object class="NSFont" key="NSSupport" id="373119259">
108 <string key="NSName">LucidaGrande-Bold</string>
109 <double key="NSSize">13</double>
110 <int key="NSfFlags">2072</int>
111 </object>
112 <string key="NSCellIdentifier">_NS:3936</string>
113 <reference key="NSControlView" ref="493109509"/>
114 <bool key="NSDrawsBackground">YES</bool>
115 <reference key="NSBackgroundColor" ref="566729528"/>
116 <reference key="NSTextColor" ref="737623876"/>
117 </object>
118 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
119 </object>
120 <object class="NSTextField" id="442301359">
121 <reference key="NSNextResponder" ref="1006"/>
122 <int key="NSvFlags">268</int>
123 <string key="NSFrame">{{17, 141}, {134, 17}}</string>
124 <reference key="NSSuperview" ref="1006"/>
125 <reference key="NSNextKeyView" ref="826265339"/>
126 <string key="NSReuseIdentifierKey">_NS:3936</string>
127 <bool key="NSEnabled">YES</bool>
128 <object class="NSTextFieldCell" key="NSCell" id="570503156">
129 <int key="NSCellFlags">68157504</int>
130 <int key="NSCellFlags2">272630784</int>
131 <string key="NSContents">is requesting the file</string>
132 <reference key="NSSupport" ref="480005309"/>
133 <string key="NSCellIdentifier">_NS:3936</string>
134 <reference key="NSControlView" ref="442301359"/>
135 <reference key="NSBackgroundColor" ref="566729528"/>
136 <reference key="NSTextColor" ref="737623876"/>
137 </object>
138 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
139 </object>
140 <object class="NSTextField" id="826265339">
141 <reference key="NSNextResponder" ref="1006"/>
142 <int key="NSvFlags">266</int>
143 <string key="NSFrame">{{17, 116}, {242, 17}}</string>
144 <reference key="NSSuperview" ref="1006"/>
145 <reference key="NSNextKeyView" ref="204620803"/>
146 <string key="NSReuseIdentifierKey">_NS:3936</string>
147 <bool key="NSEnabled">YES</bool>
148 <object class="NSTextFieldCell" key="NSCell" id="64476756">
149 <int key="NSCellFlags">68157504</int>
150 <int key="NSCellFlags2">138413056</int>
151 <string key="NSContents">tftp.bin</string>
152 <reference key="NSSupport" ref="373119259"/>
153 <string key="NSCellIdentifier">_NS:3936</string>
154 <reference key="NSControlView" ref="826265339"/>
155 <reference key="NSBackgroundColor" ref="566729528"/>
156 <reference key="NSTextColor" ref="737623876"/>
157 </object>
158 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
159 </object>
160 <object class="NSTextField" id="204620803">
161 <reference key="NSNextResponder" ref="1006"/>
162 <int key="NSvFlags">268</int>
163 <string key="NSFrame">{{17, 97}, {69, 11}}</string>
164 <reference key="NSSuperview" ref="1006"/>
165 <reference key="NSNextKeyView" ref="95446448"/>
166 <string key="NSReuseIdentifierKey">_NS:3936</string>
167 <bool key="NSEnabled">YES</bool>
168 <object class="NSTextFieldCell" key="NSCell" id="957466536">
169 <int key="NSCellFlags">68157504</int>
170 <int key="NSCellFlags2">272630784</int>
171 <string key="NSContents">(the file exists)</string>
172 <object class="NSFont" key="NSSupport">
173 <string key="NSName">LucidaGrande</string>
174 <double key="NSSize">9</double>
175 <int key="NSfFlags">3614</int>
176 </object>
177 <string key="NSCellIdentifier">_NS:3936</string>
178 <reference key="NSControlView" ref="204620803"/>
179 <reference key="NSBackgroundColor" ref="566729528"/>
180 <reference key="NSTextColor" ref="737623876"/>
181 </object>
182 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
183 </object>
184 <object class="NSTextField" id="95446448">
185 <reference key="NSNextResponder" ref="1006"/>
186 <int key="NSvFlags">268</int>
187 <string key="NSFrame">{{96, 72}, {103, 17}}</string>
188 <reference key="NSSuperview" ref="1006"/>
189 <reference key="NSNextKeyView" ref="454803690"/>
190 <string key="NSReuseIdentifierKey">_NS:3936</string>
191 <bool key="NSEnabled">YES</bool>
192 <object class="NSTextFieldCell" key="NSCell" id="330029717">
193 <int key="NSCellFlags">68157504</int>
194 <int key="NSCellFlags2">138413056</int>
195 <string key="NSContents">do you want to</string>
196 <reference key="NSSupport" ref="480005309"/>
197 <string key="NSCellIdentifier">_NS:3936</string>
198 <reference key="NSControlView" ref="95446448"/>
199 <reference key="NSBackgroundColor" ref="566729528"/>
200 <reference key="NSTextColor" ref="737623876"/>
201 </object>
202 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
203 </object>
204 <object class="NSButton" id="454803690">
205 <reference key="NSNextResponder" ref="1006"/>
206 <int key="NSvFlags">266</int>
207 <string key="NSFrame">{{20, 45}, {109, 19}}</string>
208 <reference key="NSSuperview" ref="1006"/>
209 <reference key="NSNextKeyView" ref="173020989"/>
210 <string key="NSReuseIdentifierKey">_NS:1534</string>
211 <bool key="NSEnabled">YES</bool>
212 <object class="NSButtonCell" key="NSCell" id="239767303">
213 <int key="NSCellFlags">-2080374784</int>
214 <int key="NSCellFlags2">134217728</int>
215 <string key="NSContents">let it be</string>
216 <object class="NSFont" key="NSSupport" id="609726753">
217 <string key="NSName">LucidaGrande</string>
218 <double key="NSSize">12</double>
219 <int key="NSfFlags">16</int>
220 </object>
221 <string key="NSCellIdentifier">_NS:1534</string>
222 <reference key="NSControlView" ref="454803690"/>
223 <int key="NSButtonFlags">-2038153216</int>
224 <int key="NSButtonFlags2">164</int>
225 <string key="NSAlternateContents"/>
226 <string key="NSKeyEquivalent"/>
227 <int key="NSPeriodicDelay">400</int>
228 <int key="NSPeriodicInterval">75</int>
229 </object>
230 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
231 </object>
232 <object class="NSButton" id="173020989">
233 <reference key="NSNextResponder" ref="1006"/>
234 <int key="NSvFlags">266</int>
235 <string key="NSFrame">{{146, 45}, {110, 19}}</string>
236 <reference key="NSSuperview" ref="1006"/>
237 <reference key="NSNextKeyView" ref="17265301"/>
238 <string key="NSReuseIdentifierKey">_NS:1534</string>
239 <bool key="NSEnabled">YES</bool>
240 <object class="NSButtonCell" key="NSCell" id="50310263">
241 <int key="NSCellFlags">-2080374784</int>
242 <int key="NSCellFlags2">134217728</int>
243 <string key="NSContents">deny access</string>
244 <reference key="NSSupport" ref="609726753"/>
245 <string key="NSCellIdentifier">_NS:1534</string>
246 <reference key="NSControlView" ref="173020989"/>
247 <int key="NSButtonFlags">-2038153216</int>
248 <int key="NSButtonFlags2">164</int>
249 <string key="NSAlternateContents"/>
250 <string key="NSKeyEquivalent"/>
251 <int key="NSPeriodicDelay">400</int>
252 <int key="NSPeriodicInterval">75</int>
253 </object>
254 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
255 </object>
256 <object class="NSButton" id="17265301">
257 <reference key="NSNextResponder" ref="1006"/>
258 <int key="NSvFlags">266</int>
259 <string key="NSFrame">{{20, 19}, {236, 19}}</string>
260 <reference key="NSSuperview" ref="1006"/>
261 <string key="NSReuseIdentifierKey">_NS:1534</string>
262 <bool key="NSEnabled">YES</bool>
263 <object class="NSButtonCell" key="NSCell" id="577909785">
264 <int key="NSCellFlags">-2080374784</int>
265 <int key="NSCellFlags2">134217728</int>
266 <string key="NSContents">save under different name</string>
267 <reference key="NSSupport" ref="609726753"/>
268 <string key="NSCellIdentifier">_NS:1534</string>
269 <reference key="NSControlView" ref="17265301"/>
270 <int key="NSButtonFlags">-2038153216</int>
271 <int key="NSButtonFlags2">164</int>
272 <string key="NSAlternateContents"/>
273 <string key="NSKeyEquivalent"/>
274 <int key="NSPeriodicDelay">400</int>
275 <int key="NSPeriodicInterval">75</int>
276 </object>
277 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
278 </object>
279 </array>
280 <string key="NSFrameSize">{276, 203}</string>
281 <reference key="NSSuperview"/>
282 <reference key="NSNextKeyView" ref="1043014274"/>
283 </object>
284 <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
285 <string key="NSMinSize">{276, 225}</string>
286 <string key="NSMaxSize">{276, 225}</string>
287 <bool key="NSWindowIsRestorable">YES</bool>
288 </object>
289 <object class="NSUserDefaultsController" id="896102830">
290 <bool key="NSSharedInstance">YES</bool>
291 </object>
292 </array>
293 <object class="IBObjectContainer" key="IBDocument.Objects">
294 <array class="NSMutableArray" key="connectionRecords">
295 <object class="IBConnectionRecord">
296 <object class="IBOutletConnection" key="connection">
297 <string key="label">window</string>
298 <reference key="source" ref="1001"/>
299 <reference key="destination" ref="1005"/>
300 </object>
301 <int key="connectionID">37</int>
302 </object>
303 <object class="IBConnectionRecord">
304 <object class="IBActionConnection" key="connection">
305 <string key="label">rename:</string>
306 <reference key="source" ref="1001"/>
307 <reference key="destination" ref="17265301"/>
308 </object>
309 <int key="connectionID">40</int>
310 </object>
311 <object class="IBConnectionRecord">
312 <object class="IBActionConnection" key="connection">
313 <string key="label">deny:</string>
314 <reference key="source" ref="1001"/>
315 <reference key="destination" ref="173020989"/>
316 </object>
317 <int key="connectionID">46</int>
318 </object>
319 <object class="IBConnectionRecord">
320 <object class="IBActionConnection" key="connection">
321 <string key="label">letItBe:</string>
322 <reference key="source" ref="1001"/>
323 <reference key="destination" ref="454803690"/>
324 </object>
325 <int key="connectionID">47</int>
326 </object>
327 <object class="IBConnectionRecord">
328 <object class="IBOutletConnection" key="connection">
329 <string key="label">allowButton</string>
330 <reference key="source" ref="1001"/>
331 <reference key="destination" ref="454803690"/>
332 </object>
333 <int key="connectionID">48</int>
334 </object>
335 <object class="IBConnectionRecord">
336 <object class="IBOutletConnection" key="connection">
337 <string key="label">denyButton</string>
338 <reference key="source" ref="1001"/>
339 <reference key="destination" ref="173020989"/>
340 </object>
341 <int key="connectionID">49</int>
342 </object>
343 <object class="IBConnectionRecord">
344 <object class="IBOutletConnection" key="connection">
345 <string key="label">renameButton</string>
346 <reference key="source" ref="1001"/>
347 <reference key="destination" ref="17265301"/>
348 </object>
349 <int key="connectionID">50</int>
350 </object>
351 <object class="IBConnectionRecord">
352 <object class="IBOutletConnection" key="connection">
353 <string key="label">delegate</string>
354 <reference key="source" ref="1005"/>
355 <reference key="destination" ref="1001"/>
356 </object>
357 <int key="connectionID">36</int>
358 </object>
359 <object class="IBConnectionRecord">
360 <object class="IBBindingConnection" key="connection">
361 <string key="label">value: self.remoteHost</string>
362 <reference key="source" ref="493109509"/>
363 <reference key="destination" ref="1001"/>
364 <object class="NSNibBindingConnector" key="connector">
365 <reference key="NSSource" ref="493109509"/>
366 <reference key="NSDestination" ref="1001"/>
367 <string key="NSLabel">value: self.remoteHost</string>
368 <string key="NSBinding">value</string>
369 <string key="NSKeyPath">self.remoteHost</string>
370 <int key="NSNibBindingConnectorVersion">2</int>
371 </object>
372 </object>
373 <int key="connectionID">28</int>
374 </object>
375 <object class="IBConnectionRecord">
376 <object class="IBBindingConnection" key="connection">
377 <string key="label">value: self.remoteAction</string>
378 <reference key="source" ref="442301359"/>
379 <reference key="destination" ref="1001"/>
380 <object class="NSNibBindingConnector" key="connector">
381 <reference key="NSSource" ref="442301359"/>
382 <reference key="NSDestination" ref="1001"/>
383 <string key="NSLabel">value: self.remoteAction</string>
384 <string key="NSBinding">value</string>
385 <string key="NSKeyPath">self.remoteAction</string>
386 <int key="NSNibBindingConnectorVersion">2</int>
387 </object>
388 </object>
389 <int key="connectionID">30</int>
390 </object>
391 <object class="IBConnectionRecord">
392 <object class="IBBindingConnection" key="connection">
393 <string key="label">value: self.fileName</string>
394 <reference key="source" ref="826265339"/>
395 <reference key="destination" ref="1001"/>
396 <object class="NSNibBindingConnector" key="connector">
397 <reference key="NSSource" ref="826265339"/>
398 <reference key="NSDestination" ref="1001"/>
399 <string key="NSLabel">value: self.fileName</string>
400 <string key="NSBinding">value</string>
401 <string key="NSKeyPath">self.fileName</string>
402 <int key="NSNibBindingConnectorVersion">2</int>
403 </object>
404 </object>
405 <int key="connectionID">32</int>
406 </object>
407 <object class="IBConnectionRecord">
408 <object class="IBBindingConnection" key="connection">
409 <string key="label">hidden: self.fileExists</string>
410 <reference key="source" ref="204620803"/>
411 <reference key="destination" ref="1001"/>
412 <object class="NSNibBindingConnector" key="connector">
413 <reference key="NSSource" ref="204620803"/>
414 <reference key="NSDestination" ref="1001"/>
415 <string key="NSLabel">hidden: self.fileExists</string>
416 <string key="NSBinding">hidden</string>
417 <string key="NSKeyPath">self.fileExists</string>
418 <object class="NSDictionary" key="NSOptions">
419 <string key="NS.key.0">NSValueTransformerName</string>
420 <string key="NS.object.0">NSNegateBoolean</string>
421 </object>
422 <int key="NSNibBindingConnectorVersion">2</int>
423 </object>
424 </object>
425 <int key="connectionID">35</int>
426 </object>
427 <object class="IBConnectionRecord">
428 <object class="IBBindingConnection" key="connection">
429 <string key="label">hidden: self.writeRequest</string>
430 <reference key="source" ref="17265301"/>
431 <reference key="destination" ref="1001"/>
432 <object class="NSNibBindingConnector" key="connector">
433 <reference key="NSSource" ref="17265301"/>
434 <reference key="NSDestination" ref="1001"/>
435 <string key="NSLabel">hidden: self.writeRequest</string>
436 <string key="NSBinding">hidden</string>
437 <string key="NSKeyPath">self.writeRequest</string>
438 <object class="NSDictionary" key="NSOptions">
439 <string key="NS.key.0">NSValueTransformerName</string>
440 <string key="NS.object.0">NSNegateBoolean</string>
441 </object>
442 <int key="NSNibBindingConnectorVersion">2</int>
443 </object>
444 </object>
445 <int key="connectionID">45</int>
446 </object>
447 </array>
448 <object class="IBMutableOrderedSet" key="objectRecords">
449 <array key="orderedObjects">
450 <object class="IBObjectRecord">
451 <int key="objectID">0</int>
452 <array key="object" id="0"/>
453 <reference key="children" ref="1000"/>
454 <nil key="parent"/>
455 </object>
456 <object class="IBObjectRecord">
457 <int key="objectID">-2</int>
458 <reference key="object" ref="1001"/>
459 <reference key="parent" ref="0"/>
460 <string key="objectName">File's Owner</string>
461 </object>
462 <object class="IBObjectRecord">
463 <int key="objectID">-1</int>
464 <reference key="object" ref="1003"/>
465 <reference key="parent" ref="0"/>
466 <string key="objectName">First Responder</string>
467 </object>
468 <object class="IBObjectRecord">
469 <int key="objectID">-3</int>
470 <reference key="object" ref="1004"/>
471 <reference key="parent" ref="0"/>
472 <string key="objectName">Application</string>
473 </object>
474 <object class="IBObjectRecord">
475 <int key="objectID">1</int>
476 <reference key="object" ref="1005"/>
477 <array class="NSMutableArray" key="children">
478 <reference ref="1006"/>
479 </array>
480 <reference key="parent" ref="0"/>
481 </object>
482 <object class="IBObjectRecord">
483 <int key="objectID">2</int>
484 <reference key="object" ref="1006"/>
485 <array class="NSMutableArray" key="children">
486 <reference ref="1043014274"/>
487 <reference ref="493109509"/>
488 <reference ref="442301359"/>
489 <reference ref="204620803"/>
490 <reference ref="454803690"/>
491 <reference ref="173020989"/>
492 <reference ref="17265301"/>
493 <reference ref="826265339"/>
494 <reference ref="95446448"/>
495 </array>
496 <reference key="parent" ref="1005"/>
497 </object>
498 <object class="IBObjectRecord">
499 <int key="objectID">3</int>
500 <reference key="object" ref="1043014274"/>
501 <array class="NSMutableArray" key="children">
502 <reference ref="751681516"/>
503 </array>
504 <reference key="parent" ref="1006"/>
505 </object>
506 <object class="IBObjectRecord">
507 <int key="objectID">4</int>
508 <reference key="object" ref="751681516"/>
509 <reference key="parent" ref="1043014274"/>
510 </object>
511 <object class="IBObjectRecord">
512 <int key="objectID">5</int>
513 <reference key="object" ref="493109509"/>
514 <array class="NSMutableArray" key="children">
515 <reference ref="808816111"/>
516 </array>
517 <reference key="parent" ref="1006"/>
518 </object>
519 <object class="IBObjectRecord">
520 <int key="objectID">6</int>
521 <reference key="object" ref="808816111"/>
522 <reference key="parent" ref="493109509"/>
523 </object>
524 <object class="IBObjectRecord">
525 <int key="objectID">7</int>
526 <reference key="object" ref="442301359"/>
527 <array class="NSMutableArray" key="children">
528 <reference ref="570503156"/>
529 </array>
530 <reference key="parent" ref="1006"/>
531 </object>
532 <object class="IBObjectRecord">
533 <int key="objectID">8</int>
534 <reference key="object" ref="570503156"/>
535 <reference key="parent" ref="442301359"/>
536 </object>
537 <object class="IBObjectRecord">
538 <int key="objectID">9</int>
539 <reference key="object" ref="826265339"/>
540 <array class="NSMutableArray" key="children">
541 <reference ref="64476756"/>
542 </array>
543 <reference key="parent" ref="1006"/>
544 </object>
545 <object class="IBObjectRecord">
546 <int key="objectID">10</int>
547 <reference key="object" ref="64476756"/>
548 <reference key="parent" ref="826265339"/>
549 </object>
550 <object class="IBObjectRecord">
551 <int key="objectID">11</int>
552 <reference key="object" ref="204620803"/>
553 <array class="NSMutableArray" key="children">
554 <reference ref="957466536"/>
555 </array>
556 <reference key="parent" ref="1006"/>
557 </object>
558 <object class="IBObjectRecord">
559 <int key="objectID">12</int>
560 <reference key="object" ref="957466536"/>
561 <reference key="parent" ref="204620803"/>
562 </object>
563 <object class="IBObjectRecord">
564 <int key="objectID">13</int>
565 <reference key="object" ref="454803690"/>
566 <array class="NSMutableArray" key="children">
567 <reference ref="239767303"/>
568 </array>
569 <reference key="parent" ref="1006"/>
570 <string key="objectName">Button - allow</string>
571 </object>
572 <object class="IBObjectRecord">
573 <int key="objectID">14</int>
574 <reference key="object" ref="239767303"/>
575 <reference key="parent" ref="454803690"/>
576 </object>
577 <object class="IBObjectRecord">
578 <int key="objectID">15</int>
579 <reference key="object" ref="95446448"/>
580 <array class="NSMutableArray" key="children">
581 <reference ref="330029717"/>
582 </array>
583 <reference key="parent" ref="1006"/>
584 </object>
585 <object class="IBObjectRecord">
586 <int key="objectID">16</int>
587 <reference key="object" ref="330029717"/>
588 <reference key="parent" ref="95446448"/>
589 </object>
590 <object class="IBObjectRecord">
591 <int key="objectID">19</int>
592 <reference key="object" ref="173020989"/>
593 <array class="NSMutableArray" key="children">
594 <reference ref="50310263"/>
595 </array>
596 <reference key="parent" ref="1006"/>
597 <string key="objectName">Button - deny</string>
598 </object>
599 <object class="IBObjectRecord">
600 <int key="objectID">20</int>
601 <reference key="object" ref="50310263"/>
602 <reference key="parent" ref="173020989"/>
603 </object>
604 <object class="IBObjectRecord">
605 <int key="objectID">21</int>
606 <reference key="object" ref="17265301"/>
607 <array class="NSMutableArray" key="children">
608 <reference ref="577909785"/>
609 </array>
610 <reference key="parent" ref="1006"/>
611 <string key="objectName">Button - rename</string>
612 </object>
613 <object class="IBObjectRecord">
614 <int key="objectID">22</int>
615 <reference key="object" ref="577909785"/>
616 <reference key="parent" ref="17265301"/>
617 </object>
618 <object class="IBObjectRecord">
619 <int key="objectID">25</int>
620 <reference key="object" ref="896102830"/>
621 <reference key="parent" ref="0"/>
622 </object>
623 </array>
624 </object>
625 <dictionary class="NSMutableDictionary" key="flattenedProperties">
626 <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
627 <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
628 <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
629 <boolean value="YES" key="1.IBNSWindowAutoPositionCentersHorizontal"/>
630 <boolean value="YES" key="1.IBNSWindowAutoPositionCentersVertical"/>
631 <string key="1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
632 <string key="1.IBWindowTemplateEditedContentRect">{{357, 418}, {480, 270}}</string>
633 <boolean value="NO" key="1.NSWindowTemplate.visibleAtLaunch"/>
634 <string key="10.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
635 <string key="11.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
636 <string key="12.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
637 <object class="NSMutableDictionary" key="13.IBAttributePlaceholdersKey">
638 <string key="NS.key.0">ToolTip</string>
639 <object class="IBToolTipAttribute" key="NS.object.0">
640 <string key="name">ToolTip</string>
641 <reference key="object" ref="454803690"/>
642 <string key="toolTip">Allow transfer.</string>
643 </object>
644 </object>
645 <string key="13.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
646 <string key="14.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
647 <string key="15.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
648 <string key="16.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
649 <object class="NSMutableDictionary" key="19.IBAttributePlaceholdersKey">
650 <string key="NS.key.0">ToolTip</string>
651 <object class="IBToolTipAttribute" key="NS.object.0">
652 <string key="name">ToolTip</string>
653 <reference key="object" ref="173020989"/>
654 <string key="toolTip">Send back the rejection.</string>
655 </object>
656 </object>
657 <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
658 <string key="2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
659 <string key="20.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
660 <object class="NSMutableDictionary" key="21.IBAttributePlaceholdersKey">
661 <string key="NS.key.0">ToolTip</string>
662 <object class="IBToolTipAttribute" key="NS.object.0">
663 <string key="name">ToolTip</string>
664 <reference key="object" ref="17265301"/>
665 <string key="toolTip">Automatically rename file before saving.</string>
666 </object>
667 </object>
668 <string key="21.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
669 <string key="22.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
670 <string key="25.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
671 <string key="3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
672 <string key="4.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
673 <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
674 <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
675 <string key="7.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
676 <string key="8.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
677 <string key="9.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
678 </dictionary>
679 <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
680 <nil key="activeLocalization"/>
681 <dictionary class="NSMutableDictionary" key="localizations"/>
682 <nil key="sourceID"/>
683 <int key="maxID">50</int>
684 </object>
685 <object class="IBClassDescriber" key="IBDocument.Classes"/>
686 <int key="IBDocument.localizationMode">0</int>
687 <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
688 <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
689 <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
690 <real value="4000" key="NS.object.0"/>
691 </object>
692 <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
693 <int key="IBDocument.defaultPropertyAccessControl">3</int>
694 </data>
695</archive>
diff --git a/pumpkin/Credits.rtf b/pumpkin/Credits.rtf
new file mode 100644
index 0000000..3855c1a
--- a/dev/null
+++ b/pumpkin/Credits.rtf
@@ -0,0 +1,17 @@
1{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
2{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
3{\colortbl;\red255\green255\blue255;}
4\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0
5\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
6
7\f0\b\fs24 \cf0 \'a9 2012 Klever Group (http://www.klever.net/)\
8\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
9
10\b0 \cf0 \
11Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\
12\
13The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\
14\
15\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
16
17\b \cf0 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.} \ No newline at end of file
diff --git a/pumpkin/DaemonListener.h b/pumpkin/DaemonListener.h
new file mode 100644
index 0000000..1bb6f2a
--- a/dev/null
+++ b/pumpkin/DaemonListener.h
@@ -0,0 +1,15 @@
1
2#import <Cocoa/Cocoa.h>
3#include <netinet/in.h>
4
5@class PumpKIN;
6@interface DaemonListener : NSObject {
7 CFSocketRef sockie;
8 PumpKIN *pumpkin;
9 CFRunLoopSourceRef runloopSource;
10}
11
12+(DaemonListener*)listenerWithDefaults;
13-(void)callbackWithType:(CFSocketCallBackType)t addr:(CFDataRef)a data:(const void *)d;
14
15@end
diff --git a/pumpkin/DaemonListener.m b/pumpkin/DaemonListener.m
new file mode 100644
index 0000000..ab14296
--- a/dev/null
+++ b/pumpkin/DaemonListener.m
@@ -0,0 +1,111 @@
1#import "DaemonListener.h"
2#import "TFTPPacket.h"
3#import "SendXFer.h"
4#import "ReceiveXFer.h"
5#import "StringsAttached.h"
6
7#include <sys/socket.h>
8#include <arpa/inet.h>
9#include <sys/stat.h>
10
11static void cbListener(CFSocketRef sockie,CFSocketCallBackType cbt,CFDataRef cba,
12 const void *cbd,void *i) {
13 [(DaemonListener*)i callbackWithType:cbt addr:cba data:cbd];
14}
15
16@implementation DaemonListener
17
18-(void)callbackWithType:(CFSocketCallBackType)t addr:(CFDataRef)a data:(const void *)d {
19 switch(t) {
20 case kCFSocketDataCallBack:
21 {
22 struct sockaddr_in *sin = (struct sockaddr_in*)CFDataGetBytePtr(a);
23 if([pumpkin hasPeer:sin]) {
24 [pumpkin log:@"I'm already processing the request from %@",[NSString stringWithSocketAddress:sin]];
25 return;
26 }
27 TFTPPacket *p = [TFTPPacket packetWithData:(NSData*)d];
28 switch([p op]) {
29 case tftpOpRRQ: [[[SendXFer alloc] initWithPeer:sin andPacket:p] autorelease]; break;
30 case tftpOpWRQ: [[[ReceiveXFer alloc] initWithPeer:sin andPacket:p] autorelease]; break;
31 default:
32 [pumpkin log:@"Invalid OP %d received from %@",p.op,[NSString stringWithSocketAddress:sin]];
33 break;
34 }
35 }
36 break;
37 default:
38 NSLog(@"unhandled callback: %lu",t);
39 break;
40 }
41}
42
43
44-(DaemonListener*)initWithAddress:(struct sockaddr_in*)sin {
45 if(!(self=[super init])) return self;
46
47 pumpkin = NSApplication.sharedApplication.delegate;
48
49 @try {
50 CFSocketContext ctx;
51 ctx.version = 0;
52 ctx.info = self;
53 ctx.retain = 0; ctx.release = 0;
54 ctx.copyDescription = 0;
55 sockie = CFSocketCreate(kCFAllocatorDefault,PF_INET,SOCK_DGRAM,IPPROTO_UDP,
56 kCFSocketReadCallBack|kCFSocketDataCallBack,
57 cbListener,&ctx);
58 if(ntohs(sin->sin_port)>1024) {
59 NSData *nsd = [NSData dataWithBytes:sin length:sizeof(*sin)];
60 if(CFSocketSetAddress(sockie, (CFDataRef)nsd))
61 [[NSException exceptionWithName:@"BindFailure"
62 reason:[NSString stringWithFormat:@"Binding failed, error code: %d", errno]
63 userInfo:@{@"errno": @errno}
64 ] raise];
65 }else{
66 const char *args[] = {
67 0,
68 [[NSString stringWithFormat:@"%d", CFSocketGetNative(sockie)] UTF8String],
69 [[NSString stringWithHostAddress:sin] UTF8String],
70 [[NSString stringWithPortNumber:sin] UTF8String],
71 NULL
72 };
73 [pumpkin runBiportal:args];
74 }
75 }@catch(NSException *e) {
76 if(sockie) {
77 CFSocketInvalidate(sockie);
78 CFRelease(sockie);
79 }
80 @throw;
81 }
82
83 runloopSource = CFSocketCreateRunLoopSource(kCFAllocatorDefault, sockie, 0);
84 CFRunLoopAddSource(CFRunLoopGetCurrent(),runloopSource, kCFRunLoopDefaultMode);
85 return self;
86}
87
88-(void)dealloc {
89 if(runloopSource) {
90 CFRunLoopRemoveSource(CFRunLoopGetCurrent(), runloopSource, kCFRunLoopDefaultMode);
91 CFRelease(runloopSource);
92 }
93 if(sockie) {
94 CFSocketInvalidate(sockie);
95 CFRelease(sockie);
96 }
97 [super dealloc];
98}
99
100+(DaemonListener*) listenerWithDefaults {
101 struct sockaddr_in sin;
102 memset(&sin,0,sizeof(sin));
103 sin.sin_len=sizeof(sin);
104 sin.sin_family=AF_INET;
105 id d = [[NSUserDefaultsController sharedUserDefaultsController] values];
106 sin.sin_port=htons([[d valueForKey:@"bindPort"] intValue]);
107 sin.sin_addr.s_addr=inet_addr([[d valueForKey:@"bindAddress"] UTF8String]);
108 return [[[DaemonListener alloc] initWithAddress:&sin] autorelease];
109}
110
111@end
diff --git a/pumpkin/IPFormatter.h b/pumpkin/IPFormatter.h
new file mode 100644
index 0000000..c98f3a0
--- a/dev/null
+++ b/pumpkin/IPFormatter.h
@@ -0,0 +1,6 @@
1
2#import <Foundation/Foundation.h>
3
4@interface IPFormatter : NSFormatter
5
6@end
diff --git a/pumpkin/IPFormatter.m b/pumpkin/IPFormatter.m
new file mode 100644
index 0000000..78a51b4
--- a/dev/null
+++ b/pumpkin/IPFormatter.m
@@ -0,0 +1,21 @@
1
2#import "IPFormatter.h"
3#include <arpa/inet.h>
4
5@implementation IPFormatter
6
7-(NSString *)stringForObjectValue:(id)obj {
8 if(![obj isKindOfClass:[NSString class]]) return nil;
9 return obj;
10}
11
12-(BOOL)getObjectValue:(id*)anObject forString:(NSString*)string errorDescription:(NSString**)error {
13 if(inet_addr(string.UTF8String)==INADDR_NONE) {
14 if(error) *error=@"Doesn't look like an IP address to me";
15 return NO;
16 }
17 *anObject = [NSString stringWithString:string];
18 return YES;
19}
20
21@end
diff --git a/pumpkin/IPTransformer.h b/pumpkin/IPTransformer.h
new file mode 100644
index 0000000..8c52c71
--- a/dev/null
+++ b/pumpkin/IPTransformer.h
@@ -0,0 +1,6 @@
1
2#import <Foundation/Foundation.h>
3
4@interface IPTransformer : NSValueTransformer
5
6@end
diff --git a/pumpkin/IPTransformer.m b/pumpkin/IPTransformer.m
new file mode 100644
index 0000000..2307b05
--- a/dev/null
+++ b/pumpkin/IPTransformer.m
@@ -0,0 +1,21 @@
1
2#import "IPTransformer.h"
3
4#include <arpa/inet.h>
5
6@implementation IPTransformer
7
8+(Class)transformedValueClass { return [NSString class]; }
9+(BOOL)allowsReverseTransformation { return YES; }
10-(id)transformedValue:(id)value {
11 if(value &&
12 [value respondsToSelector:@selector(UTF8String)]
13 && inet_addr([value UTF8String])!=INADDR_NONE )
14 return value;
15 return nil;
16}
17-(id)reverseTransformedValue:(id)value {
18 return [self transformedValue:value];
19}
20
21@end \ No newline at end of file
diff --git a/pumpkin/NSPortNumberTransformer.h b/pumpkin/NSPortNumberTransformer.h
new file mode 100644
index 0000000..c9afb6c
--- a/dev/null
+++ b/pumpkin/NSPortNumberTransformer.h
@@ -0,0 +1,5 @@
1#import <Foundation/Foundation.h>
2
3@interface NSPortNumberTransformer : NSValueTransformer
4
5@end
diff --git a/pumpkin/NSPortNumberTransformer.m b/pumpkin/NSPortNumberTransformer.m
new file mode 100644
index 0000000..e1a14a5
--- a/dev/null
+++ b/pumpkin/NSPortNumberTransformer.m
@@ -0,0 +1,22 @@
1#import "NSPortNumberTransformer.h"
2
3@implementation NSPortNumberTransformer
4
5+(Class)transformedValueClass { return [NSNumber class]; }
6+(BOOL)allowsReverseTransformation { return YES; }
7-(id)transformedValue:(id)value {
8 if(value==nil) return nil;
9 if(![value respondsToSelector:@selector(integerValue)]) return nil;
10 NSInteger rv = [value integerValue];
11 if(rv<1 || rv>32767) return nil;
12 return [NSString stringWithFormat:@"%u",rv];
13}
14-(id)reverseTransformedValue:(id)value {
15 if(value==nil) return nil;
16 if(![value respondsToSelector:@selector(integerValue)]) return nil;
17 NSInteger rv = [value integerValue];
18 if(rv<1 || rv>32767) return nil;
19 return [NSNumber numberWithInteger:rv];
20}
21
22@end
diff --git a/pumpkin/NumberTransformer.h b/pumpkin/NumberTransformer.h
new file mode 100644
index 0000000..373950e
--- a/dev/null
+++ b/pumpkin/NumberTransformer.h
@@ -0,0 +1,6 @@
1
2#import <Foundation/Foundation.h>
3
4@interface NumberTransformer : NSValueTransformer
5
6@end
diff --git a/pumpkin/NumberTransformer.m b/pumpkin/NumberTransformer.m
new file mode 100644
index 0000000..c02cd8b
--- a/dev/null
+++ b/pumpkin/NumberTransformer.m
@@ -0,0 +1,19 @@
1
2#import "NumberTransformer.h"
3
4@implementation NumberTransformer
5
6+(Class)transformedValueClass { return [NSNumber class]; }
7+(BOOL)allowsReverseTransformation { return YES; }
8-(id)transformedValue:(id)value {
9 if(value==nil) return nil;
10 if(![value respondsToSelector:@selector(integerValue)]) return nil;
11 return [NSString stringWithFormat:@"%lu",[value integerValue]];
12}
13-(id)reverseTransformedValue:(id)value {
14 if(value==nil) return nil;
15 if(![value respondsToSelector:@selector(integerValue)]) return nil;
16 return @([value integerValue]);
17}
18
19@end
diff --git a/pumpkin/PumpKIN.h b/pumpkin/PumpKIN.h
new file mode 100644
index 0000000..d582c94
--- a/dev/null
+++ b/pumpkin/PumpKIN.h
@@ -0,0 +1,49 @@
1#import <Cocoa/Cocoa.h>
2#import "DaemonListener.h"
3#include <netinet/in.h>
4#import "XFersViewDatasource.h"
5
6enum {
7 onRRQGive=0, onRRQPrompt, onRRQDeny,
8 onWRQTake=0, onWRQPromptIfExists, onWRQPrompt, onWRQDeny
9};
10
11@interface PumpKIN : NSObject <NSApplicationDelegate> {
12 NSWindow *window;
13 NSTextView *logger;
14 DaemonListener *listener;
15 NSWindow *preferencesWindow;
16 NSUserDefaultsController *theDefaults;
17 NSMutableArray *xfers;
18 NSTableView *xfersView;
19 XFersViewDatasource *xvDatasource;
20 NSToolbar *toolbar;
21}
22
23@property (assign) IBOutlet NSWindow *window;
24@property (assign) IBOutlet NSTextView *logger;
25- (IBAction)showPreferences:(id)sender;
26@property (assign) IBOutlet NSWindow *preferencesWindow;
27@property (assign) IBOutlet NSUserDefaultsController *theDefaults;
28- (IBAction)pickTFTPFolder:(id)sender;
29- (IBAction)pickLogFile:(id)sender;
30@property (assign) IBOutlet NSTableView *xfersView;
31@property (readonly) BOOL hasSelectedXfer;
32@property (assign) IBOutlet NSToolbar *toolbar;
33- (IBAction)abortXfer:(id)sender;
34- (IBAction)getFile:(id)sender;
35- (IBAction)putFile:(id)sender;
36
37+(void)initialize;
38
39-(void)log:(NSString*)fmt,...;
40-(void)registerXfer:(id)xfer;
41-(void)unregisterXfer:(id)xfer;
42-(void)updateXfers;
43-(BOOL)hasPeer:(struct sockaddr_in*)sin;
44
45-(void)tableViewSelectionDidChange:(NSNotification*)an;
46
47- (void)runBiportal:(char const**)arg;
48
49@end
diff --git a/pumpkin/PumpKIN.m b/pumpkin/PumpKIN.m
new file mode 100644
index 0000000..9a4623a
--- a/dev/null
+++ b/pumpkin/PumpKIN.m
@@ -0,0 +1,301 @@
1#include <stdarg.h>
2#include <sys/stat.h>
3
4#import "PumpKIN.h"
5#import "NumberTransformer.h"
6#import "IPTransformer.h"
7#import "XFer.h"
8#import "XFersViewDatasource.h"
9#import "ARequest.h"
10
11
12@implementation PumpKIN
13@synthesize toolbar;
14@synthesize preferencesWindow;
15@synthesize theDefaults;
16
17@synthesize window;
18@synthesize logger;
19@synthesize xfersView;
20
21-(void) updateListener {
22 if(listener) {
23 [listener release]; listener = nil;
24 }
25 if(![[theDefaults.values valueForKey:@"listen"] boolValue]) return;
26 @try {
27 listener = [[DaemonListener listenerWithDefaults] retain];
28 }
29 @catch (NSException *e) {
30 [self log:@"Error starting the server. %@: %@",e.name,e.reason];
31 NSAlert *a = [NSAlert alertWithMessageText:@"Failed to enable tftp server" defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:@"Failed to enable tftp server.\n%@\n\n%@",e.name,e.reason];
32 a.alertStyle = NSWarningAlertStyle;
33 enum act_type {
34 actDont = 0,
35 actBindToAny = NSAlertThirdButtonReturn+1,
36 actRemoveTFTPD, actChangePort
37 };
38 id en;
39 if (e.userInfo && (en=(e.userInfo)[@"errno"])) {
40 switch([en intValue]) {
41 case EADDRINUSE:
42 {
43 int p = [[theDefaults.values valueForKey:@"bindPort"] intValue];
44 if(p==69) {
45 a.informativeText = @"The OS reports that the address is already in use.\n\n"
46 "It probably means, that some other programm is listening on the TFTP port."
47 " since Mac OS X comes with its own tftpd, it is the likeliest suspect."
48 " If you're going to use tftp server a lot, you may prefer to use that one."
49 " If you want to use PumpKIN, you can either use unprivileged port (but make sure"
50 " the client is aware of that and supports it) or unload Apple tftpd using"
51 " command 'launchctl remove com.apple.tftpd' (as root). I can try doing either for you.";
52 [a addButtonWithTitle:@"Change port to 6969"].tag = actChangePort;
53 [a addButtonWithTitle:@"Try to stop Apple's tftpd"].tag = actRemoveTFTPD;
54 }else if(p!=6969) {
55 a.informativeText = @"The OS reports that the address is already in use.\n\n"
56 "It probably means, that some other program is listening on the port."
57 " you can either try to find out who's using the port and shut it down or"
58 " change the port. Make sure to notify your peers of the change."
59 " I can help you with changing the port.";
60 [a addButtonWithTitle:@"Change port to 6969"].tag = actChangePort;
61 }else {
62 a.informativeText = @"The OS reports that the address is already in use.\n\n"
63 "It probably means that some other program is listening on the port."
64 "You should either change port to the one that is not used or find the"
65 " offending program and shut it down. Or go on without server.";
66 }
67 }
68 break;
69 case EADDRNOTAVAIL:
70 a.informativeText = @"The OS reports that the address is not available.\n\n"
71 "It probably means, that the IP address you specified is not configured on this machine.\n\n"
72 "You can either ignore the error and go on without TFTP server, fix the ip address, by entering the one"
73 " that is configured, or bind to the special '0.0.0.0' ip address which means listen to any"
74 " address configured. The latter you can do automatically with a single click below.";
75 [a addButtonWithTitle:@"Listen to any address"].tag = actBindToAny;
76 [a addButtonWithTitle:@"Try removing Apple's daemon"].tag = actRemoveTFTPD;
77 break;
78 }
79 };
80 [theDefaults.values setValue:@NO forKey:@"listen"];
81 switch([a runModal]) {
82 case actBindToAny:
83 [NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(bindToAny) userInfo:nil repeats:NO];
84 break;
85 case actChangePort:
86 [NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(bindTo6969) userInfo:nil repeats:NO];
87 break;
88 case actRemoveTFTPD:
89 {
90 @try {
91 char const *args[] = { 0,"-k",NULL };
92 [self runBiportal:args];
93 }@catch(NSException *e) {
94 [self log:@"Error trying to unload com.apple.tftpd. %@: %@",e.name,e.reason];
95 }
96 }
97 [NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(bindAgain) userInfo:nil repeats:NO];
98 break;
99 }
100 }
101}
102
103-(void)bindAgain {
104 [theDefaults.values setValue:@YES forKey:@"listen"];
105}
106-(void)bindTo6969 {
107 [theDefaults.values setValue:@6969 forKey:@"bindPort"];
108 [self bindAgain];
109}
110-(void)bindToAny {
111 [theDefaults.values setValue:@"0.0.0.0" forKey:@"bindAddress"];
112 [self bindAgain];
113}
114
115- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
116 if( object==theDefaults && (
117 [keyPath isEqualToString:@"values.listen"]
118 || [keyPath isEqualToString:@"values.bindPort"]
119 || [keyPath isEqualToString:@"values.bindAddress"]) ) {
120 [self updateListener];
121 }
122}
123
124- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
125{
126 [theDefaults addObserver:self forKeyPath:@"values.listen" options:0 context:0];
127 [theDefaults addObserver:self forKeyPath:@"values.bindAddress" options:0 context:0];
128 [theDefaults addObserver:self forKeyPath:@"values.bindPort" options:0 context:0];
129
130 listener = nil;
131 [window.contentView setWantsLayer:true];
132 window.backgroundColor = [NSColor colorWithPatternImage:[NSImage imageNamed:@"klever-background.png"]];
133 xfersView.dataSource = (xvDatasource = [[XFersViewDatasource alloc] initWithXfers:xfers=[NSMutableArray arrayWithCapacity:4]]);
134 [self updateListener];
135 if(![[theDefaults values] valueForKey:@"tftpRoot"])
136 [self showPreferences:nil];
137}
138
139- (IBAction)showPreferences:(id)sender {
140 [preferencesWindow makeKeyAndOrderFront:preferencesWindow];
141}
142
143- (void)log:(NSString*)fmt,... {
144 va_list vl; va_start(vl, fmt);
145 NSString *s = [[[[NSString alloc] initWithFormat:fmt arguments:vl] autorelease] stringByAppendingString:@"\n"];
146 va_end(vl);
147 NSString *lf = [theDefaults.values valueForKey:@"logFile"];
148 if(lf && ![lf isEqualTo:@""]) {
149 NSFileHandle *l = [NSFileHandle fileHandleForWritingAtPath:lf];
150 if(!l) {
151 [[NSFileManager defaultManager] createFileAtPath:lf contents:nil attributes:nil];
152 l = [NSFileHandle fileHandleForWritingAtPath:lf];
153 }
154 if(!l) {
155 static NSString *bl = nil;
156 if(!(bl && [bl isEqualToString:lf])) {
157 [[logger textStorage] appendAttributedString:[[[NSAttributedString alloc] initWithString:
158 [NSString stringWithFormat:@"Failed to open/create '%@' log file\n",lf] ] autorelease]];
159 if(bl) [bl release];
160 bl = [NSString stringWithString:lf];
161 }
162 }else{
163 [l seekToEndOfFile];
164 [l writeData:[[NSString stringWithFormat:@"[%@] %@",[[NSDate date] description],s] dataUsingEncoding:NSUTF8StringEncoding]];
165 [l closeFile];
166 }
167 }
168 [[logger textStorage] appendAttributedString:[[[NSAttributedString alloc] initWithString:
169 s ] autorelease]];
170 [logger scrollToEndOfDocument:nil];
171}
172
173-(void)registerXfer:(id)xfer {
174 [xfers insertObject:xfer atIndex:0];
175 [self updateXfers];
176}
177-(void)unregisterXfer:(id)xfer {
178 [xfers removeObject:xfer];
179 [self updateXfers];
180}
181-(void)updateXfers {
182 [xfersView reloadData];
183}
184-(BOOL)hasPeer:(struct sockaddr_in*)sin {
185 return NSNotFound!=[xfers indexOfObjectPassingTest:^BOOL(XFer *x,NSUInteger i,BOOL *s) {
186 struct sockaddr_in *p = x.peer;
187 return p->sin_len==sin->sin_len && !memcmp(p, sin, p->sin_len);
188 }];
189}
190
191-(BOOL)hasSelectedXfer {
192 return [xfersView selectedRow]>=0;
193}
194
195-(void)tableViewSelectionDidChange:(NSNotification *)an {
196 [toolbar validateVisibleItems];
197}
198-(BOOL)validateToolbarItem:(NSToolbarItem *)theItem {
199 if([theItem.itemIdentifier isEqualToString:@"abort_xfer"])
200 return self.hasSelectedXfer;
201 return YES;
202}
203-(IBAction)abortXfer:(id)sender {
204 NSInteger r = [xfersView selectedRow];
205 NSAssert(r>=0,@"no selected row");
206 if(r<0) return;
207 XFer *x = xfers[r];
208 [self log:@"Aborting transfer of '%@' %@",x.xferFilename,x.xferPrefix];
209 [x abort];
210}
211
212- (IBAction)getFile:(id)sender {
213 [ARequest getFile];
214}
215- (IBAction)putFile:(id)sender {
216 [ARequest putFile];
217}
218
219- (IBAction)pickTFTPFolder:(id)sender {
220 NSOpenPanel *op = [NSOpenPanel openPanel];
221 op.canChooseDirectories = YES; op.canChooseFiles = NO;
222 op.canCreateDirectories = YES;
223 op.allowsMultipleSelection = NO;
224 op.prompt = @"Set TFTP root";
225 op.title = @"TFTP root";
226 op.nameFieldLabel = @"TFTP root:";
227 if([op runModal]!=NSFileHandlingPanelOKButton) return;
228 [[theDefaults values] setValue:op.URL.path forKey:@"tftpRoot"];
229}
230
231- (IBAction)pickLogFile:(id)sender {
232 NSSavePanel *op = [NSSavePanel savePanel];
233 op.canCreateDirectories = YES;
234 op.prompt = @"Set log file";
235 op.title = @"Log to";
236 op.nameFieldLabel = @"Log to";
237 if([op runModal]!=NSFileHandlingPanelOKButton) return;
238 [[theDefaults values] setValue:op.URL.path forKey:@"logFile"];
239
240}
241
242- (void)runBiportal:(char const**)args {
243 FILE *f=NULL;
244 AuthorizationRef a=nil;
245 @try {
246 NSString *bip=[[NSBundle mainBundle] pathForAuxiliaryExecutable:@"biportal"];
247 struct stat st;
248 if(stat(bip.UTF8String, &st)) [NSException raise:@"ToolFailure" format:@"Can't see my tool"];
249 if(st.st_uid || !(st.st_mode&S_ISUID)) {
250 OSStatus r = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &a);
251 if(r!=errAuthorizationSuccess)
252 [NSException raise:@"AuthFailure" format:@"failed to AuthorizationCreate(): %d",r];
253 AuthorizationItem ai = {kAuthorizationRightExecute,0,NULL,0};
254 AuthorizationRights ar = {1,&ai};
255 r = AuthorizationCopyRights(a, &ar, NULL, kAuthorizationFlagDefaults|kAuthorizationFlagInteractionAllowed|kAuthorizationFlagPreAuthorize|kAuthorizationFlagExtendRights, NULL);
256 if(r!=errAuthorizationSuccess)
257 [NSException raise:@"AuthFailure" format:@"failed to AuthorizationCopyRights(): %d",r];
258 const char *args[] = { NULL };
259#pragma GCC diagnostic push
260#pragma GCC diagnostic ignored "-Wdeprecated"
261 r = AuthorizationExecuteWithPrivileges(a,bip.UTF8String,
262 kAuthorizationFlagDefaults, (char*const*)args, &f);
263#pragma GCC diagnostic pop
264 if(r!=errAuthorizationSuccess)
265 [NSException raise:@"AuthFailure" format:@"failed to AuthorizationExecuteWithPrivileges(): %d",r];
266 int e;
267 int sr = fscanf(f, "%d", &e);
268 fclose(f),f=NULL;
269 if(sr!=1)
270 [NSException raise:@"ToolFailure" format:@"failed to setup tool"];
271 if(e)
272 [NSException raise:@"ToolFailure" format:@"failed to setup tool, error code: %d",e];
273 }
274 *args = bip.UTF8String;
275 pid_t p = fork();
276 if(p<0) [NSException raise:@"ToolFailure" format:@"failed to fork"];
277 if(!p) execv(*args,(char**)args), exit(errno);
278 int r, wp;
279 while((wp=waitpid(p,&r,0))<0 && errno==EINTR);
280 if(wp!=p) [NSException raise:@"ToolFailure" format:@"failed to wait for tool"];
281 if(!WIFEXITED(r)) [NSException raise:@"ToolFailure" format:@"tool failed"];
282 if(WEXITSTATUS(r)) {
283 [[NSException exceptionWithName:@"ToolFailure" reason:[NSString stringWithFormat:@"tool failed, error code: %d", WEXITSTATUS(r)] userInfo:@{@"errno": @WEXITSTATUS(r)}] raise];
284 }
285 }@finally {
286 if(f) fclose(f);
287 if(a) AuthorizationFree(a,kAuthorizationFlagDefaults);
288 }
289}
290
291+(void)initialize {
292 [[NSUserDefaultsController sharedUserDefaultsController] setInitialValues:
293 [NSDictionary dictionaryWithContentsOfFile:
294 [[NSBundle mainBundle] pathForResource:@"pumpkin-defaults" ofType:@"plist"]
295 ]
296 ];
297 [NSValueTransformer setValueTransformer:[[[NumberTransformer alloc] init] autorelease] forName:@"PortNumberTransformer"];
298 [NSValueTransformer setValueTransformer:[[[IPTransformer alloc] init] autorelease] forName:@"IPAddressTransformer"];
299}
300
301@end
diff --git a/pumpkin/PumpKIN.xib b/pumpkin/PumpKIN.xib
new file mode 100644
index 0000000..8e76afe
--- a/dev/null
+++ b/pumpkin/PumpKIN.xib
@@ -0,0 +1,4251 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
3 <data>
4 <int key="IBDocument.SystemTarget">1080</int>
5 <string key="IBDocument.SystemVersion">12C60</string>
6 <string key="IBDocument.InterfaceBuilderVersion">2844</string>
7 <string key="IBDocument.AppKitVersion">1187.34</string>
8 <string key="IBDocument.HIToolboxVersion">625.00</string>
9 <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
10 <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
11 <string key="NS.object.0">2844</string>
12 </object>
13 <array key="IBDocument.IntegratedClassDependencies">
14 <string>IBCustomFormatter</string>
15 <string>NSBox</string>
16 <string>NSButton</string>
17 <string>NSButtonCell</string>
18 <string>NSCustomObject</string>
19 <string>NSCustomView</string>
20 <string>NSMatrix</string>
21 <string>NSMenu</string>
22 <string>NSMenuItem</string>
23 <string>NSNumberFormatter</string>
24 <string>NSScrollView</string>
25 <string>NSScroller</string>
26 <string>NSSplitView</string>
27 <string>NSTableColumn</string>
28 <string>NSTableHeaderView</string>
29 <string>NSTableView</string>
30 <string>NSTextField</string>
31 <string>NSTextFieldCell</string>
32 <string>NSTextView</string>
33 <string>NSToolbar</string>
34 <string>NSToolbarFlexibleSpaceItem</string>
35 <string>NSToolbarItem</string>
36 <string>NSToolbarSpaceItem</string>
37 <string>NSUserDefaultsController</string>
38 <string>NSView</string>
39 <string>NSWindowTemplate</string>
40 </array>
41 <array key="IBDocument.PluginDependencies">
42 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
43 </array>
44 <object class="NSMutableDictionary" key="IBDocument.Metadata">
45 <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
46 <integer value="1" key="NS.object.0"/>
47 </object>
48 <array class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
49 <object class="NSCustomObject" id="1021">
50 <string key="NSClassName">NSApplication</string>
51 </object>
52 <object class="NSCustomObject" id="1014">
53 <string key="NSClassName">FirstResponder</string>
54 </object>
55 <object class="NSCustomObject" id="1050">
56 <string key="NSClassName">NSApplication</string>
57 </object>
58 <object class="NSMenu" id="649796088">
59 <string key="NSTitle">AMainMenu</string>
60 <array class="NSMutableArray" key="NSMenuItems">
61 <object class="NSMenuItem" id="694149608">
62 <reference key="NSMenu" ref="649796088"/>
63 <string key="NSTitle">PumpKIN</string>
64 <string key="NSKeyEquiv"/>
65 <int key="NSKeyEquivModMask">1048576</int>
66 <int key="NSMnemonicLoc">2147483647</int>
67 <object class="NSCustomResource" key="NSOnImage" id="35465992">
68 <string key="NSClassName">NSImage</string>
69 <string key="NSResourceName">NSMenuCheckmark</string>
70 </object>
71 <object class="NSCustomResource" key="NSMixedImage" id="502551668">
72 <string key="NSClassName">NSImage</string>
73 <string key="NSResourceName">NSMenuMixedState</string>
74 </object>
75 <string key="NSAction">submenuAction:</string>
76 <object class="NSMenu" key="NSSubmenu" id="110575045">
77 <string key="NSTitle">PumpKIN</string>
78 <array class="NSMutableArray" key="NSMenuItems">
79 <object class="NSMenuItem" id="238522557">
80 <reference key="NSMenu" ref="110575045"/>
81 <string key="NSTitle">About PumpKIN</string>
82 <string key="NSKeyEquiv"/>
83 <int key="NSMnemonicLoc">2147483647</int>
84 <reference key="NSOnImage" ref="35465992"/>
85 <reference key="NSMixedImage" ref="502551668"/>
86 </object>
87 <object class="NSMenuItem" id="304266470">
88 <reference key="NSMenu" ref="110575045"/>
89 <bool key="NSIsDisabled">YES</bool>
90 <bool key="NSIsSeparator">YES</bool>
91 <string key="NSTitle"/>
92 <string key="NSKeyEquiv"/>
93 <int key="NSKeyEquivModMask">1048576</int>
94 <int key="NSMnemonicLoc">2147483647</int>
95 <reference key="NSOnImage" ref="35465992"/>
96 <reference key="NSMixedImage" ref="502551668"/>
97 </object>
98 <object class="NSMenuItem" id="609285721">
99 <reference key="NSMenu" ref="110575045"/>
100 <string key="NSTitle">Preferences…</string>
101 <string key="NSKeyEquiv">,</string>
102 <int key="NSKeyEquivModMask">1048576</int>
103 <int key="NSMnemonicLoc">2147483647</int>
104 <reference key="NSOnImage" ref="35465992"/>
105 <reference key="NSMixedImage" ref="502551668"/>
106 </object>
107 <object class="NSMenuItem" id="481834944">
108 <reference key="NSMenu" ref="110575045"/>
109 <bool key="NSIsDisabled">YES</bool>
110 <bool key="NSIsSeparator">YES</bool>
111 <string key="NSTitle"/>
112 <string key="NSKeyEquiv"/>
113 <int key="NSKeyEquivModMask">1048576</int>
114 <int key="NSMnemonicLoc">2147483647</int>
115 <reference key="NSOnImage" ref="35465992"/>
116 <reference key="NSMixedImage" ref="502551668"/>
117 </object>
118 <object class="NSMenuItem" id="1046388886">
119 <reference key="NSMenu" ref="110575045"/>
120 <string key="NSTitle">Services</string>
121 <string key="NSKeyEquiv"/>
122 <int key="NSKeyEquivModMask">1048576</int>
123 <int key="NSMnemonicLoc">2147483647</int>
124 <reference key="NSOnImage" ref="35465992"/>
125 <reference key="NSMixedImage" ref="502551668"/>
126 <string key="NSAction">submenuAction:</string>
127 <object class="NSMenu" key="NSSubmenu" id="752062318">
128 <string key="NSTitle">Services</string>
129 <array class="NSMutableArray" key="NSMenuItems"/>
130 <string key="NSName">_NSServicesMenu</string>
131 </object>
132 </object>
133 <object class="NSMenuItem" id="646227648">
134 <reference key="NSMenu" ref="110575045"/>
135 <bool key="NSIsDisabled">YES</bool>
136 <bool key="NSIsSeparator">YES</bool>
137 <string key="NSTitle"/>
138 <string key="NSKeyEquiv"/>
139 <int key="NSKeyEquivModMask">1048576</int>
140 <int key="NSMnemonicLoc">2147483647</int>
141 <reference key="NSOnImage" ref="35465992"/>
142 <reference key="NSMixedImage" ref="502551668"/>
143 </object>
144 <object class="NSMenuItem" id="755159360">
145 <reference key="NSMenu" ref="110575045"/>
146 <string key="NSTitle">Hide PumpKIN</string>
147 <string key="NSKeyEquiv">h</string>
148 <int key="NSKeyEquivModMask">1048576</int>
149 <int key="NSMnemonicLoc">2147483647</int>
150 <reference key="NSOnImage" ref="35465992"/>
151 <reference key="NSMixedImage" ref="502551668"/>
152 </object>
153 <object class="NSMenuItem" id="342932134">
154 <reference key="NSMenu" ref="110575045"/>
155 <string key="NSTitle">Hide Others</string>
156 <string key="NSKeyEquiv">h</string>
157 <int key="NSKeyEquivModMask">1572864</int>
158 <int key="NSMnemonicLoc">2147483647</int>
159 <reference key="NSOnImage" ref="35465992"/>
160 <reference key="NSMixedImage" ref="502551668"/>
161 </object>
162 <object class="NSMenuItem" id="908899353">
163 <reference key="NSMenu" ref="110575045"/>
164 <string key="NSTitle">Show All</string>
165 <string key="NSKeyEquiv"/>
166 <int key="NSKeyEquivModMask">1048576</int>
167 <int key="NSMnemonicLoc">2147483647</int>
168 <reference key="NSOnImage" ref="35465992"/>
169 <reference key="NSMixedImage" ref="502551668"/>
170 </object>
171 <object class="NSMenuItem" id="1056857174">
172 <reference key="NSMenu" ref="110575045"/>
173 <bool key="NSIsDisabled">YES</bool>
174 <bool key="NSIsSeparator">YES</bool>
175 <string key="NSTitle"/>
176 <string key="NSKeyEquiv"/>
177 <int key="NSKeyEquivModMask">1048576</int>
178 <int key="NSMnemonicLoc">2147483647</int>
179 <reference key="NSOnImage" ref="35465992"/>
180 <reference key="NSMixedImage" ref="502551668"/>
181 </object>
182 <object class="NSMenuItem" id="632727374">
183 <reference key="NSMenu" ref="110575045"/>
184 <string key="NSTitle">Quit PumpKIN</string>
185 <string key="NSKeyEquiv">q</string>
186 <int key="NSKeyEquivModMask">1048576</int>
187 <int key="NSMnemonicLoc">2147483647</int>
188 <reference key="NSOnImage" ref="35465992"/>
189 <reference key="NSMixedImage" ref="502551668"/>
190 </object>
191 </array>
192 <string key="NSName">_NSAppleMenu</string>
193 </object>
194 </object>
195 <object class="NSMenuItem" id="379814623">
196 <reference key="NSMenu" ref="649796088"/>
197 <string key="NSTitle">XFer</string>
198 <string key="NSKeyEquiv"/>
199 <int key="NSKeyEquivModMask">1048576</int>
200 <int key="NSMnemonicLoc">2147483647</int>
201 <reference key="NSOnImage" ref="35465992"/>
202 <reference key="NSMixedImage" ref="502551668"/>
203 <string key="NSAction">submenuAction:</string>
204 <object class="NSMenu" key="NSSubmenu" id="720053764">
205 <string key="NSTitle">XFer</string>
206 <array class="NSMutableArray" key="NSMenuItems">
207 <object class="NSMenuItem" id="869342911">
208 <reference key="NSMenu" ref="720053764"/>
209 <string key="NSTitle">Get file</string>
210 <string key="NSKeyEquiv">g</string>
211 <int key="NSKeyEquivModMask">1048576</int>
212 <int key="NSMnemonicLoc">2147483647</int>
213 <reference key="NSOnImage" ref="35465992"/>
214 <reference key="NSMixedImage" ref="502551668"/>
215 </object>
216 <object class="NSMenuItem" id="684754710">
217 <reference key="NSMenu" ref="720053764"/>
218 <string key="NSTitle">Put file</string>
219 <string key="NSKeyEquiv">p</string>
220 <int key="NSKeyEquivModMask">1048576</int>
221 <int key="NSMnemonicLoc">2147483647</int>
222 <reference key="NSOnImage" ref="35465992"/>
223 <reference key="NSMixedImage" ref="502551668"/>
224 </object>
225 <object class="NSMenuItem" id="511451131">
226 <reference key="NSMenu" ref="720053764"/>
227 <bool key="NSIsDisabled">YES</bool>
228 <bool key="NSIsSeparator">YES</bool>
229 <string key="NSTitle"/>
230 <string key="NSKeyEquiv"/>
231 <int key="NSMnemonicLoc">2147483647</int>
232 <reference key="NSOnImage" ref="35465992"/>
233 <reference key="NSMixedImage" ref="502551668"/>
234 </object>
235 <object class="NSMenuItem" id="964116338">
236 <reference key="NSMenu" ref="720053764"/>
237 <string key="NSTitle">Abort xfer</string>
238 <string key="NSKeyEquiv"/>
239 <int key="NSMnemonicLoc">2147483647</int>
240 <reference key="NSOnImage" ref="35465992"/>
241 <reference key="NSMixedImage" ref="502551668"/>
242 </object>
243 </array>
244 </object>
245 </object>
246 <object class="NSMenuItem" id="952259628">
247 <reference key="NSMenu" ref="649796088"/>
248 <string key="NSTitle">Edit</string>
249 <string key="NSKeyEquiv"/>
250 <int key="NSKeyEquivModMask">1048576</int>
251 <int key="NSMnemonicLoc">2147483647</int>
252 <reference key="NSOnImage" ref="35465992"/>
253 <reference key="NSMixedImage" ref="502551668"/>
254 <string key="NSAction">submenuAction:</string>
255 <object class="NSMenu" key="NSSubmenu" id="789758025">
256 <string key="NSTitle">Edit</string>
257 <array class="NSMutableArray" key="NSMenuItems">
258 <object class="NSMenuItem" id="1058277027">
259 <reference key="NSMenu" ref="789758025"/>
260 <string key="NSTitle">Undo</string>
261 <string key="NSKeyEquiv">z</string>
262 <int key="NSKeyEquivModMask">1048576</int>
263 <int key="NSMnemonicLoc">2147483647</int>
264 <reference key="NSOnImage" ref="35465992"/>
265 <reference key="NSMixedImage" ref="502551668"/>
266 </object>
267 <object class="NSMenuItem" id="790794224">
268 <reference key="NSMenu" ref="789758025"/>
269 <string key="NSTitle">Redo</string>
270 <string key="NSKeyEquiv">Z</string>
271 <int key="NSKeyEquivModMask">1179648</int>
272 <int key="NSMnemonicLoc">2147483647</int>
273 <reference key="NSOnImage" ref="35465992"/>
274 <reference key="NSMixedImage" ref="502551668"/>
275 </object>
276 <object class="NSMenuItem" id="1040322652">
277 <reference key="NSMenu" ref="789758025"/>
278 <bool key="NSIsDisabled">YES</bool>
279 <bool key="NSIsSeparator">YES</bool>
280 <string key="NSTitle"/>
281 <string key="NSKeyEquiv"/>
282 <int key="NSKeyEquivModMask">1048576</int>
283 <int key="NSMnemonicLoc">2147483647</int>
284 <reference key="NSOnImage" ref="35465992"/>
285 <reference key="NSMixedImage" ref="502551668"/>
286 </object>
287 <object class="NSMenuItem" id="296257095">
288 <reference key="NSMenu" ref="789758025"/>
289 <string key="NSTitle">Cut</string>
290 <string key="NSKeyEquiv">x</string>
291 <int key="NSKeyEquivModMask">1048576</int>
292 <int key="NSMnemonicLoc">2147483647</int>
293 <reference key="NSOnImage" ref="35465992"/>
294 <reference key="NSMixedImage" ref="502551668"/>
295 </object>
296 <object class="NSMenuItem" id="860595796">
297 <reference key="NSMenu" ref="789758025"/>
298 <string key="NSTitle">Copy</string>
299 <string key="NSKeyEquiv">c</string>
300 <int key="NSKeyEquivModMask">1048576</int>
301 <int key="NSMnemonicLoc">2147483647</int>
302 <reference key="NSOnImage" ref="35465992"/>
303 <reference key="NSMixedImage" ref="502551668"/>
304 </object>
305 <object class="NSMenuItem" id="29853731">
306 <reference key="NSMenu" ref="789758025"/>
307 <string key="NSTitle">Paste</string>
308 <string key="NSKeyEquiv">v</string>
309 <int key="NSKeyEquivModMask">1048576</int>
310 <int key="NSMnemonicLoc">2147483647</int>
311 <reference key="NSOnImage" ref="35465992"/>
312 <reference key="NSMixedImage" ref="502551668"/>
313 </object>
314 <object class="NSMenuItem" id="82994268">
315 <reference key="NSMenu" ref="789758025"/>
316 <string key="NSTitle">Paste and Match Style</string>
317 <string key="NSKeyEquiv">V</string>
318 <int key="NSKeyEquivModMask">1572864</int>
319 <int key="NSMnemonicLoc">2147483647</int>
320 <reference key="NSOnImage" ref="35465992"/>
321 <reference key="NSMixedImage" ref="502551668"/>
322 </object>
323 <object class="NSMenuItem" id="437104165">
324 <reference key="NSMenu" ref="789758025"/>
325 <string key="NSTitle">Delete</string>
326 <string key="NSKeyEquiv"/>
327 <int key="NSKeyEquivModMask">1048576</int>
328 <int key="NSMnemonicLoc">2147483647</int>
329 <reference key="NSOnImage" ref="35465992"/>
330 <reference key="NSMixedImage" ref="502551668"/>
331 </object>
332 <object class="NSMenuItem" id="583158037">
333 <reference key="NSMenu" ref="789758025"/>
334 <string key="NSTitle">Select All</string>
335 <string key="NSKeyEquiv">a</string>
336 <int key="NSKeyEquivModMask">1048576</int>
337 <int key="NSMnemonicLoc">2147483647</int>
338 <reference key="NSOnImage" ref="35465992"/>
339 <reference key="NSMixedImage" ref="502551668"/>
340 </object>
341 <object class="NSMenuItem" id="212016141">
342 <reference key="NSMenu" ref="789758025"/>
343 <bool key="NSIsDisabled">YES</bool>
344 <bool key="NSIsSeparator">YES</bool>
345 <string key="NSTitle"/>
346 <string key="NSKeyEquiv"/>
347 <int key="NSKeyEquivModMask">1048576</int>
348 <int key="NSMnemonicLoc">2147483647</int>
349 <reference key="NSOnImage" ref="35465992"/>
350 <reference key="NSMixedImage" ref="502551668"/>
351 </object>
352 <object class="NSMenuItem" id="892235320">
353 <reference key="NSMenu" ref="789758025"/>
354 <string key="NSTitle">Find</string>
355 <string key="NSKeyEquiv"/>
356 <int key="NSKeyEquivModMask">1048576</int>
357 <int key="NSMnemonicLoc">2147483647</int>
358 <reference key="NSOnImage" ref="35465992"/>
359 <reference key="NSMixedImage" ref="502551668"/>
360 <string key="NSAction">submenuAction:</string>
361 <object class="NSMenu" key="NSSubmenu" id="963351320">
362 <string key="NSTitle">Find</string>
363 <array class="NSMutableArray" key="NSMenuItems">
364 <object class="NSMenuItem" id="447796847">
365 <reference key="NSMenu" ref="963351320"/>
366 <string key="NSTitle">Find…</string>
367 <string key="NSKeyEquiv">f</string>
368 <int key="NSKeyEquivModMask">1048576</int>
369 <int key="NSMnemonicLoc">2147483647</int>
370 <reference key="NSOnImage" ref="35465992"/>
371 <reference key="NSMixedImage" ref="502551668"/>
372 <int key="NSTag">1</int>
373 </object>
374 <object class="NSMenuItem" id="738670835">
375 <reference key="NSMenu" ref="963351320"/>
376 <string key="NSTitle">Find and Replace…</string>
377 <string key="NSKeyEquiv">f</string>
378 <int key="NSKeyEquivModMask">1572864</int>
379 <int key="NSMnemonicLoc">2147483647</int>
380 <reference key="NSOnImage" ref="35465992"/>
381 <reference key="NSMixedImage" ref="502551668"/>
382 <int key="NSTag">12</int>
383 </object>
384 <object class="NSMenuItem" id="326711663">
385 <reference key="NSMenu" ref="963351320"/>
386 <string key="NSTitle">Find Next</string>
387 <string key="NSKeyEquiv">g</string>
388 <int key="NSKeyEquivModMask">1048576</int>
389 <int key="NSMnemonicLoc">2147483647</int>
390 <reference key="NSOnImage" ref="35465992"/>
391 <reference key="NSMixedImage" ref="502551668"/>
392 <int key="NSTag">2</int>
393 </object>
394 <object class="NSMenuItem" id="270902937">
395 <reference key="NSMenu" ref="963351320"/>
396 <string key="NSTitle">Find Previous</string>
397 <string key="NSKeyEquiv">G</string>
398 <int key="NSKeyEquivModMask">1179648</int>
399 <int key="NSMnemonicLoc">2147483647</int>
400 <reference key="NSOnImage" ref="35465992"/>
401 <reference key="NSMixedImage" ref="502551668"/>
402 <int key="NSTag">3</int>
403 </object>
404 <object class="NSMenuItem" id="159080638">
405 <reference key="NSMenu" ref="963351320"/>
406 <string key="NSTitle">Use Selection for Find</string>
407 <string key="NSKeyEquiv">e</string>
408 <int key="NSKeyEquivModMask">1048576</int>
409 <int key="NSMnemonicLoc">2147483647</int>
410 <reference key="NSOnImage" ref="35465992"/>
411 <reference key="NSMixedImage" ref="502551668"/>
412 <int key="NSTag">7</int>
413 </object>
414 <object class="NSMenuItem" id="88285865">
415 <reference key="NSMenu" ref="963351320"/>
416 <string key="NSTitle">Jump to Selection</string>
417 <string key="NSKeyEquiv">j</string>
418 <int key="NSKeyEquivModMask">1048576</int>
419 <int key="NSMnemonicLoc">2147483647</int>
420 <reference key="NSOnImage" ref="35465992"/>
421 <reference key="NSMixedImage" ref="502551668"/>
422 </object>
423 </array>
424 </object>
425 </object>
426 <object class="NSMenuItem" id="972420730">
427 <reference key="NSMenu" ref="789758025"/>
428 <string key="NSTitle">Spelling and Grammar</string>
429 <string key="NSKeyEquiv"/>
430 <int key="NSKeyEquivModMask">1048576</int>
431 <int key="NSMnemonicLoc">2147483647</int>
432 <reference key="NSOnImage" ref="35465992"/>
433 <reference key="NSMixedImage" ref="502551668"/>
434 <string key="NSAction">submenuAction:</string>
435 <object class="NSMenu" key="NSSubmenu" id="769623530">
436 <string key="NSTitle">Spelling and Grammar</string>
437 <array class="NSMutableArray" key="NSMenuItems">
438 <object class="NSMenuItem" id="679648819">
439 <reference key="NSMenu" ref="769623530"/>
440 <string key="NSTitle">Show Spelling and Grammar</string>
441 <string key="NSKeyEquiv">:</string>
442 <int key="NSKeyEquivModMask">1048576</int>
443 <int key="NSMnemonicLoc">2147483647</int>
444 <reference key="NSOnImage" ref="35465992"/>
445 <reference key="NSMixedImage" ref="502551668"/>
446 </object>
447 <object class="NSMenuItem" id="96193923">
448 <reference key="NSMenu" ref="769623530"/>
449 <string key="NSTitle">Check Document Now</string>
450 <string key="NSKeyEquiv">;</string>
451 <int key="NSKeyEquivModMask">1048576</int>
452 <int key="NSMnemonicLoc">2147483647</int>
453 <reference key="NSOnImage" ref="35465992"/>
454 <reference key="NSMixedImage" ref="502551668"/>
455 </object>
456 <object class="NSMenuItem" id="859480356">
457 <reference key="NSMenu" ref="769623530"/>
458 <bool key="NSIsDisabled">YES</bool>
459 <bool key="NSIsSeparator">YES</bool>
460 <string key="NSTitle"/>
461 <string key="NSKeyEquiv"/>
462 <int key="NSMnemonicLoc">2147483647</int>
463 <reference key="NSOnImage" ref="35465992"/>
464 <reference key="NSMixedImage" ref="502551668"/>
465 </object>
466 <object class="NSMenuItem" id="948374510">
467 <reference key="NSMenu" ref="769623530"/>
468 <string key="NSTitle">Check Spelling While Typing</string>
469 <string key="NSKeyEquiv"/>
470 <int key="NSKeyEquivModMask">1048576</int>
471 <int key="NSMnemonicLoc">2147483647</int>
472 <reference key="NSOnImage" ref="35465992"/>
473 <reference key="NSMixedImage" ref="502551668"/>
474 </object>
475 <object class="NSMenuItem" id="967646866">
476 <reference key="NSMenu" ref="769623530"/>
477 <string key="NSTitle">Check Grammar With Spelling</string>
478 <string key="NSKeyEquiv"/>
479 <int key="NSKeyEquivModMask">1048576</int>
480 <int key="NSMnemonicLoc">2147483647</int>
481 <reference key="NSOnImage" ref="35465992"/>
482 <reference key="NSMixedImage" ref="502551668"/>
483 </object>
484 <object class="NSMenuItem" id="795346622">
485 <reference key="NSMenu" ref="769623530"/>
486 <string key="NSTitle">Correct Spelling Automatically</string>
487 <string key="NSKeyEquiv"/>
488 <int key="NSMnemonicLoc">2147483647</int>
489 <reference key="NSOnImage" ref="35465992"/>
490 <reference key="NSMixedImage" ref="502551668"/>
491 </object>
492 </array>
493 </object>
494 </object>
495 <object class="NSMenuItem" id="507821607">
496 <reference key="NSMenu" ref="789758025"/>
497 <string key="NSTitle">Substitutions</string>
498 <string key="NSKeyEquiv"/>
499 <int key="NSKeyEquivModMask">1048576</int>
500 <int key="NSMnemonicLoc">2147483647</int>
501 <reference key="NSOnImage" ref="35465992"/>
502 <reference key="NSMixedImage" ref="502551668"/>
503 <string key="NSAction">submenuAction:</string>
504 <object class="NSMenu" key="NSSubmenu" id="698887838">
505 <string key="NSTitle">Substitutions</string>
506 <array class="NSMutableArray" key="NSMenuItems">
507 <object class="NSMenuItem" id="65139061">
508 <reference key="NSMenu" ref="698887838"/>
509 <string key="NSTitle">Show Substitutions</string>
510 <string key="NSKeyEquiv"/>
511 <int key="NSMnemonicLoc">2147483647</int>
512 <reference key="NSOnImage" ref="35465992"/>
513 <reference key="NSMixedImage" ref="502551668"/>
514 </object>
515 <object class="NSMenuItem" id="19036812">
516 <reference key="NSMenu" ref="698887838"/>
517 <bool key="NSIsDisabled">YES</bool>
518 <bool key="NSIsSeparator">YES</bool>
519 <string key="NSTitle"/>
520 <string key="NSKeyEquiv"/>
521 <int key="NSMnemonicLoc">2147483647</int>
522 <reference key="NSOnImage" ref="35465992"/>
523 <reference key="NSMixedImage" ref="502551668"/>
524 </object>
525 <object class="NSMenuItem" id="605118523">
526 <reference key="NSMenu" ref="698887838"/>
527 <string key="NSTitle">Smart Copy/Paste</string>
528 <string key="NSKeyEquiv">f</string>
529 <int key="NSKeyEquivModMask">1048576</int>
530 <int key="NSMnemonicLoc">2147483647</int>
531 <reference key="NSOnImage" ref="35465992"/>
532 <reference key="NSMixedImage" ref="502551668"/>
533 <int key="NSTag">1</int>
534 </object>
535 <object class="NSMenuItem" id="197661976">
536 <reference key="NSMenu" ref="698887838"/>
537 <string key="NSTitle">Smart Quotes</string>
538 <string key="NSKeyEquiv">g</string>
539 <int key="NSKeyEquivModMask">1048576</int>
540 <int key="NSMnemonicLoc">2147483647</int>
541 <reference key="NSOnImage" ref="35465992"/>
542 <reference key="NSMixedImage" ref="502551668"/>
543 <int key="NSTag">2</int>
544 </object>
545 <object class="NSMenuItem" id="672708820">
546 <reference key="NSMenu" ref="698887838"/>
547 <string key="NSTitle">Smart Dashes</string>
548 <string key="NSKeyEquiv"/>
549 <int key="NSMnemonicLoc">2147483647</int>
550 <reference key="NSOnImage" ref="35465992"/>
551 <reference key="NSMixedImage" ref="502551668"/>
552 </object>
553 <object class="NSMenuItem" id="708854459">
554 <reference key="NSMenu" ref="698887838"/>
555 <string key="NSTitle">Smart Links</string>
556 <string key="NSKeyEquiv">G</string>
557 <int key="NSKeyEquivModMask">1179648</int>
558 <int key="NSMnemonicLoc">2147483647</int>
559 <reference key="NSOnImage" ref="35465992"/>
560 <reference key="NSMixedImage" ref="502551668"/>
561 <int key="NSTag">3</int>
562 </object>
563 <object class="NSMenuItem" id="537092702">
564 <reference key="NSMenu" ref="698887838"/>
565 <string key="NSTitle">Text Replacement</string>
566 <string key="NSKeyEquiv"/>
567 <int key="NSMnemonicLoc">2147483647</int>
568 <reference key="NSOnImage" ref="35465992"/>
569 <reference key="NSMixedImage" ref="502551668"/>
570 </object>
571 </array>
572 </object>
573 </object>
574 <object class="NSMenuItem" id="288088188">
575 <reference key="NSMenu" ref="789758025"/>
576 <string key="NSTitle">Transformations</string>
577 <string key="NSKeyEquiv"/>
578 <int key="NSMnemonicLoc">2147483647</int>
579 <reference key="NSOnImage" ref="35465992"/>
580 <reference key="NSMixedImage" ref="502551668"/>
581 <string key="NSAction">submenuAction:</string>
582 <object class="NSMenu" key="NSSubmenu" id="579392910">
583 <string key="NSTitle">Transformations</string>
584 <array class="NSMutableArray" key="NSMenuItems">
585 <object class="NSMenuItem" id="1060694897">
586 <reference key="NSMenu" ref="579392910"/>
587 <string key="NSTitle">Make Upper Case</string>
588 <string key="NSKeyEquiv"/>
589 <int key="NSMnemonicLoc">2147483647</int>
590 <reference key="NSOnImage" ref="35465992"/>
591 <reference key="NSMixedImage" ref="502551668"/>
592 </object>
593 <object class="NSMenuItem" id="879586729">
594 <reference key="NSMenu" ref="579392910"/>
595 <string key="NSTitle">Make Lower Case</string>
596 <string key="NSKeyEquiv"/>
597 <int key="NSMnemonicLoc">2147483647</int>
598 <reference key="NSOnImage" ref="35465992"/>
599 <reference key="NSMixedImage" ref="502551668"/>
600 </object>
601 <object class="NSMenuItem" id="56570060">
602 <reference key="NSMenu" ref="579392910"/>
603 <string key="NSTitle">Capitalize</string>
604 <string key="NSKeyEquiv"/>
605 <int key="NSMnemonicLoc">2147483647</int>
606 <reference key="NSOnImage" ref="35465992"/>
607 <reference key="NSMixedImage" ref="502551668"/>
608 </object>
609 </array>
610 </object>
611 </object>
612 <object class="NSMenuItem" id="676164635">
613 <reference key="NSMenu" ref="789758025"/>
614 <string key="NSTitle">Speech</string>
615 <string key="NSKeyEquiv"/>
616 <int key="NSKeyEquivModMask">1048576</int>
617 <int key="NSMnemonicLoc">2147483647</int>
618 <reference key="NSOnImage" ref="35465992"/>
619 <reference key="NSMixedImage" ref="502551668"/>
620 <string key="NSAction">submenuAction:</string>
621 <object class="NSMenu" key="NSSubmenu" id="785027613">
622 <string key="NSTitle">Speech</string>
623 <array class="NSMutableArray" key="NSMenuItems">
624 <object class="NSMenuItem" id="731782645">
625 <reference key="NSMenu" ref="785027613"/>
626 <string key="NSTitle">Start Speaking</string>
627 <string key="NSKeyEquiv"/>
628 <int key="NSKeyEquivModMask">1048576</int>
629 <int key="NSMnemonicLoc">2147483647</int>
630 <reference key="NSOnImage" ref="35465992"/>
631 <reference key="NSMixedImage" ref="502551668"/>
632 </object>
633 <object class="NSMenuItem" id="680220178">
634 <reference key="NSMenu" ref="785027613"/>
635 <string key="NSTitle">Stop Speaking</string>
636 <string key="NSKeyEquiv"/>
637 <int key="NSKeyEquivModMask">1048576</int>
638 <int key="NSMnemonicLoc">2147483647</int>
639 <reference key="NSOnImage" ref="35465992"/>
640 <reference key="NSMixedImage" ref="502551668"/>
641 </object>
642 </array>
643 </object>
644 </object>
645 </array>
646 </object>
647 </object>
648 <object class="NSMenuItem" id="586577488">
649 <reference key="NSMenu" ref="649796088"/>
650 <string key="NSTitle">View</string>
651 <string key="NSKeyEquiv"/>
652 <int key="NSKeyEquivModMask">1048576</int>
653 <int key="NSMnemonicLoc">2147483647</int>
654 <reference key="NSOnImage" ref="35465992"/>
655 <reference key="NSMixedImage" ref="502551668"/>
656 <string key="NSAction">submenuAction:</string>
657 <object class="NSMenu" key="NSSubmenu" id="466310130">
658 <string key="NSTitle">View</string>
659 <array class="NSMutableArray" key="NSMenuItems">
660 <object class="NSMenuItem" id="102151532">
661 <reference key="NSMenu" ref="466310130"/>
662 <string key="NSTitle">Show Toolbar</string>
663 <string key="NSKeyEquiv">t</string>
664 <int key="NSKeyEquivModMask">1572864</int>
665 <int key="NSMnemonicLoc">2147483647</int>
666 <reference key="NSOnImage" ref="35465992"/>
667 <reference key="NSMixedImage" ref="502551668"/>
668 </object>
669 <object class="NSMenuItem" id="237841660">
670 <reference key="NSMenu" ref="466310130"/>
671 <string key="NSTitle">Customize Toolbar…</string>
672 <string key="NSKeyEquiv"/>
673 <int key="NSKeyEquivModMask">1048576</int>
674 <int key="NSMnemonicLoc">2147483647</int>
675 <reference key="NSOnImage" ref="35465992"/>
676 <reference key="NSMixedImage" ref="502551668"/>
677 </object>
678 </array>
679 </object>
680 </object>
681 <object class="NSMenuItem" id="713487014">
682 <reference key="NSMenu" ref="649796088"/>
683 <string key="NSTitle">Window</string>
684 <string key="NSKeyEquiv"/>
685 <int key="NSKeyEquivModMask">1048576</int>
686 <int key="NSMnemonicLoc">2147483647</int>
687 <reference key="NSOnImage" ref="35465992"/>
688 <reference key="NSMixedImage" ref="502551668"/>
689 <string key="NSAction">submenuAction:</string>
690 <object class="NSMenu" key="NSSubmenu" id="835318025">
691 <string key="NSTitle">Window</string>
692 <array class="NSMutableArray" key="NSMenuItems">
693 <object class="NSMenuItem" id="1011231497">
694 <reference key="NSMenu" ref="835318025"/>
695 <string key="NSTitle">Minimize</string>
696 <string key="NSKeyEquiv">m</string>
697 <int key="NSKeyEquivModMask">1048576</int>
698 <int key="NSMnemonicLoc">2147483647</int>
699 <reference key="NSOnImage" ref="35465992"/>
700 <reference key="NSMixedImage" ref="502551668"/>
701 </object>
702 <object class="NSMenuItem" id="575023229">
703 <reference key="NSMenu" ref="835318025"/>
704 <string key="NSTitle">Zoom</string>
705 <string key="NSKeyEquiv"/>
706 <int key="NSKeyEquivModMask">1048576</int>
707 <int key="NSMnemonicLoc">2147483647</int>
708 <reference key="NSOnImage" ref="35465992"/>
709 <reference key="NSMixedImage" ref="502551668"/>
710 </object>
711 <object class="NSMenuItem" id="299356726">
712 <reference key="NSMenu" ref="835318025"/>
713 <bool key="NSIsDisabled">YES</bool>
714 <bool key="NSIsSeparator">YES</bool>
715 <string key="NSTitle"/>
716 <string key="NSKeyEquiv"/>
717 <int key="NSKeyEquivModMask">1048576</int>
718 <int key="NSMnemonicLoc">2147483647</int>
719 <reference key="NSOnImage" ref="35465992"/>
720 <reference key="NSMixedImage" ref="502551668"/>
721 </object>
722 <object class="NSMenuItem" id="625202149">
723 <reference key="NSMenu" ref="835318025"/>
724 <string key="NSTitle">Bring All to Front</string>
725 <string key="NSKeyEquiv"/>
726 <int key="NSKeyEquivModMask">1048576</int>
727 <int key="NSMnemonicLoc">2147483647</int>
728 <reference key="NSOnImage" ref="35465992"/>
729 <reference key="NSMixedImage" ref="502551668"/>
730 </object>
731 </array>
732 <string key="NSName">_NSWindowsMenu</string>
733 </object>
734 </object>
735 <object class="NSMenuItem" id="448692316">
736 <reference key="NSMenu" ref="649796088"/>
737 <bool key="NSIsHidden">YES</bool>
738 <string key="NSTitle">Help</string>
739 <string key="NSKeyEquiv"/>
740 <int key="NSMnemonicLoc">2147483647</int>
741 <reference key="NSOnImage" ref="35465992"/>
742 <reference key="NSMixedImage" ref="502551668"/>
743 <string key="NSAction">submenuAction:</string>
744 <object class="NSMenu" key="NSSubmenu" id="992780483">
745 <string key="NSTitle">Help</string>
746 <array class="NSMutableArray" key="NSMenuItems">
747 <object class="NSMenuItem" id="105068016">
748 <reference key="NSMenu" ref="992780483"/>
749 <string key="NSTitle">PumpKIN Help</string>
750 <string key="NSKeyEquiv">?</string>
751 <int key="NSKeyEquivModMask">1048576</int>
752 <int key="NSMnemonicLoc">2147483647</int>
753 <reference key="NSOnImage" ref="35465992"/>
754 <reference key="NSMixedImage" ref="502551668"/>
755 </object>
756 </array>
757 <string key="NSName">_NSHelpMenu</string>
758 </object>
759 </object>
760 </array>
761 <string key="NSName">_NSMainMenu</string>
762 </object>
763 <object class="NSWindowTemplate" id="972006081">
764 <int key="NSWindowStyleMask">15</int>
765 <int key="NSWindowBacking">2</int>
766 <string key="NSWindowRect">{{335, 390}, {600, 322}}</string>
767 <int key="NSWTFlags">1954021376</int>
768 <string key="NSWindowTitle">PumpKIN</string>
769 <string key="NSWindowClass">NSWindow</string>
770 <object class="NSToolbar" key="NSViewClass" id="185334702">
771 <object class="NSMutableString" key="NSToolbarIdentifier">
772 <characters key="NS.bytes">348FD175-E511-41B0-AC1C-205ED57FC50B</characters>
773 </object>
774 <nil key="NSToolbarDelegate"/>
775 <bool key="NSToolbarPrefersToBeShown">YES</bool>
776 <bool key="NSToolbarShowsBaselineSeparator">YES</bool>
777 <bool key="NSToolbarAllowsUserCustomization">YES</bool>
778 <bool key="NSToolbarAutosavesConfiguration">NO</bool>
779 <int key="NSToolbarDisplayMode">1</int>
780 <int key="NSToolbarSizeMode">2</int>
781 <dictionary class="NSMutableDictionary" key="NSToolbarIBIdentifiedItems">
782 <object class="NSToolbarItem" key="6D17B806-047D-4E35-9CBF-FA07113768DF" id="1051457108">
783 <object class="NSMutableString" key="NSToolbarItemIdentifier">
784 <characters key="NS.bytes">6D17B806-047D-4E35-9CBF-FA07113768DF</characters>
785 </object>
786 <string key="NSToolbarItemLabel">Abort xfer</string>
787 <string key="NSToolbarItemPaletteLabel">Abort xfer</string>
788 <string key="NSToolbarItemToolTip">Cancel transfer in progress.</string>
789 <nil key="NSToolbarItemView"/>
790 <object class="NSCustomResource" key="NSToolbarItemImage">
791 <string key="NSClassName">NSImage</string>
792 <string key="NSResourceName">abort</string>
793 </object>
794 <nil key="NSToolbarItemTarget"/>
795 <nil key="NSToolbarItemAction"/>
796 <string key="NSToolbarItemMinSize">{0, 0}</string>
797 <string key="NSToolbarItemMaxSize">{0, 0}</string>
798 <bool key="NSToolbarItemEnabled">YES</bool>
799 <bool key="NSToolbarItemAutovalidates">YES</bool>
800 <int key="NSToolbarItemTag">-1</int>
801 <bool key="NSToolbarIsUserRemovable">YES</bool>
802 <int key="NSToolbarItemVisibilityPriority">0</int>
803 </object>
804 <object class="NSToolbarItem" key="7587C7D2-FAE0-4AF7-9DDB-64F34C45BD11" id="163657319">
805 <object class="NSMutableString" key="NSToolbarItemIdentifier">
806 <characters key="NS.bytes">7587C7D2-FAE0-4AF7-9DDB-64F34C45BD11</characters>
807 </object>
808 <string key="NSToolbarItemLabel">Put file</string>
809 <string key="NSToolbarItemPaletteLabel">Put file</string>
810 <string key="NSToolbarItemToolTip">Initiate WRQ request.</string>
811 <nil key="NSToolbarItemView"/>
812 <object class="NSCustomResource" key="NSToolbarItemImage">
813 <string key="NSClassName">NSImage</string>
814 <string key="NSResourceName">put</string>
815 </object>
816 <nil key="NSToolbarItemTarget"/>
817 <nil key="NSToolbarItemAction"/>
818 <string key="NSToolbarItemMinSize">{0, 0}</string>
819 <string key="NSToolbarItemMaxSize">{0, 0}</string>
820 <bool key="NSToolbarItemEnabled">YES</bool>
821 <bool key="NSToolbarItemAutovalidates">YES</bool>
822 <int key="NSToolbarItemTag">-1</int>
823 <bool key="NSToolbarIsUserRemovable">YES</bool>
824 <int key="NSToolbarItemVisibilityPriority">0</int>
825 </object>
826 <object class="NSToolbarItem" key="FAB1C64D-0CC8-46A0-815A-6423AD586E28" id="210005870">
827 <object class="NSMutableString" key="NSToolbarItemIdentifier">
828 <characters key="NS.bytes">FAB1C64D-0CC8-46A0-815A-6423AD586E28</characters>
829 </object>
830 <string key="NSToolbarItemLabel">Get file</string>
831 <string key="NSToolbarItemPaletteLabel">Get file</string>
832 <string key="NSToolbarItemToolTip">Initiate RRQ request.</string>
833 <nil key="NSToolbarItemView"/>
834 <object class="NSCustomResource" key="NSToolbarItemImage">
835 <string key="NSClassName">NSImage</string>
836 <string key="NSResourceName">get</string>
837 </object>
838 <nil key="NSToolbarItemTarget"/>
839 <nil key="NSToolbarItemAction"/>
840 <string key="NSToolbarItemMinSize">{0, 0}</string>
841 <string key="NSToolbarItemMaxSize">{0, 0}</string>
842 <bool key="NSToolbarItemEnabled">YES</bool>
843 <bool key="NSToolbarItemAutovalidates">YES</bool>
844 <int key="NSToolbarItemTag">-1</int>
845 <bool key="NSToolbarIsUserRemovable">YES</bool>
846 <int key="NSToolbarItemVisibilityPriority">0</int>
847 </object>
848 <object class="NSToolbarFlexibleSpaceItem" key="NSToolbarFlexibleSpaceItem" id="106903695">
849 <string key="NSToolbarItemIdentifier">NSToolbarFlexibleSpaceItem</string>
850 <string key="NSToolbarItemLabel"/>
851 <string key="NSToolbarItemPaletteLabel">Flexible Space</string>
852 <nil key="NSToolbarItemToolTip"/>
853 <nil key="NSToolbarItemView"/>
854 <nil key="NSToolbarItemImage"/>
855 <nil key="NSToolbarItemTarget"/>
856 <nil key="NSToolbarItemAction"/>
857 <string key="NSToolbarItemMinSize">{1, 5}</string>
858 <string key="NSToolbarItemMaxSize">{20000, 32}</string>
859 <bool key="NSToolbarItemEnabled">YES</bool>
860 <bool key="NSToolbarItemAutovalidates">YES</bool>
861 <int key="NSToolbarItemTag">-1</int>
862 <bool key="NSToolbarIsUserRemovable">YES</bool>
863 <int key="NSToolbarItemVisibilityPriority">0</int>
864 <object class="NSMenuItem" key="NSToolbarItemMenuFormRepresentation">
865 <bool key="NSIsDisabled">YES</bool>
866 <bool key="NSIsSeparator">YES</bool>
867 <string key="NSTitle"/>
868 <string key="NSKeyEquiv"/>
869 <int key="NSKeyEquivModMask">1048576</int>
870 <int key="NSMnemonicLoc">2147483647</int>
871 <reference key="NSOnImage" ref="35465992"/>
872 <reference key="NSMixedImage" ref="502551668"/>
873 </object>
874 </object>
875 <object class="NSToolbarSpaceItem" key="NSToolbarSpaceItem" id="166245072">
876 <string key="NSToolbarItemIdentifier">NSToolbarSpaceItem</string>
877 <string key="NSToolbarItemLabel"/>
878 <string key="NSToolbarItemPaletteLabel">Space</string>
879 <nil key="NSToolbarItemToolTip"/>
880 <nil key="NSToolbarItemView"/>
881 <nil key="NSToolbarItemImage"/>
882 <nil key="NSToolbarItemTarget"/>
883 <nil key="NSToolbarItemAction"/>
884 <string key="NSToolbarItemMinSize">{32, 5}</string>
885 <string key="NSToolbarItemMaxSize">{32, 32}</string>
886 <bool key="NSToolbarItemEnabled">YES</bool>
887 <bool key="NSToolbarItemAutovalidates">YES</bool>
888 <int key="NSToolbarItemTag">-1</int>
889 <bool key="NSToolbarIsUserRemovable">YES</bool>
890 <int key="NSToolbarItemVisibilityPriority">0</int>
891 <object class="NSMenuItem" key="NSToolbarItemMenuFormRepresentation">
892 <bool key="NSIsDisabled">YES</bool>
893 <bool key="NSIsSeparator">YES</bool>
894 <string key="NSTitle"/>
895 <string key="NSKeyEquiv"/>
896 <int key="NSKeyEquivModMask">1048576</int>
897 <int key="NSMnemonicLoc">2147483647</int>
898 <reference key="NSOnImage" ref="35465992"/>
899 <reference key="NSMixedImage" ref="502551668"/>
900 </object>
901 </object>
902 </dictionary>
903 <array key="NSToolbarIBAllowedItems">
904 <reference ref="210005870"/>
905 <reference ref="163657319"/>
906 <reference ref="1051457108"/>
907 <reference ref="166245072"/>
908 <reference ref="106903695"/>
909 </array>
910 <array key="NSToolbarIBDefaultItems">
911 <reference ref="210005870"/>
912 <reference ref="163657319"/>
913 <reference ref="1051457108"/>
914 <reference ref="166245072"/>
915 <reference ref="106903695"/>
916 </array>
917 <array key="NSToolbarIBSelectableItems" id="0"/>
918 </object>
919 <nil key="NSUserInterfaceItemIdentifier"/>
920 <string key="NSWindowContentMinSize">{492, 200}</string>
921 <object class="NSView" key="NSWindowView" id="439893737">
922 <nil key="NSNextResponder"/>
923 <int key="NSvFlags">256</int>
924 <array class="NSMutableArray" key="NSSubviews">
925 <object class="NSSplitView" id="250587056">
926 <reference key="NSNextResponder" ref="439893737"/>
927 <int key="NSvFlags">274</int>
928 <array class="NSMutableArray" key="NSSubviews">
929 <object class="NSCustomView" id="328183451">
930 <reference key="NSNextResponder" ref="250587056"/>
931 <int key="NSvFlags">256</int>
932 <array class="NSMutableArray" key="NSSubviews">
933 <object class="NSScrollView" id="192988542">
934 <reference key="NSNextResponder" ref="328183451"/>
935 <int key="NSvFlags">274</int>
936 <array class="NSMutableArray" key="NSSubviews">
937 <object class="NSClipView" id="790409929">
938 <reference key="NSNextResponder" ref="192988542"/>
939 <int key="NSvFlags">2304</int>
940 <array class="NSMutableArray" key="NSSubviews">
941 <object class="NSTableView" id="45603544">
942 <reference key="NSNextResponder" ref="790409929"/>
943 <int key="NSvFlags">256</int>
944 <string key="NSFrameSize">{568, 115}</string>
945 <reference key="NSSuperview" ref="790409929"/>
946 <reference key="NSNextKeyView" ref="862834072"/>
947 <string key="NSReuseIdentifierKey">_NS:1197</string>
948 <bool key="NSEnabled">YES</bool>
949 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
950 <bool key="NSControlAllowsExpansionToolTips">YES</bool>
951 <object class="NSTableHeaderView" key="NSHeaderView" id="1022673745">
952 <reference key="NSNextResponder" ref="862834072"/>
953 <int key="NSvFlags">256</int>
954 <string key="NSFrameSize">{568, 17}</string>
955 <reference key="NSSuperview" ref="862834072"/>
956 <reference key="NSNextKeyView" ref="790409929"/>
957 <string key="NSReuseIdentifierKey">_NS:1199</string>
958 <reference key="NSTableView" ref="45603544"/>
959 </object>
960 <object class="_NSCornerView" key="NSCornerView">
961 <nil key="NSNextResponder"/>
962 <int key="NSvFlags">-2147483392</int>
963 <string key="NSFrame">{{224, 0}, {16, 17}}</string>
964 <string key="NSReuseIdentifierKey">_NS:1202</string>
965 </object>
966 <array class="NSMutableArray" key="NSTableColumns">
967 <object class="NSTableColumn" id="919343863">
968 <string key="NSIdentifier">fileName</string>
969 <double key="NSWidth">235</double>
970 <double key="NSMinWidth">40</double>
971 <double key="NSMaxWidth">1000</double>
972 <object class="NSTableHeaderCell" key="NSHeaderCell">
973 <int key="NSCellFlags">75497536</int>
974 <int key="NSCellFlags2">2048</int>
975 <string key="NSContents">file</string>
976 <object class="NSFont" key="NSSupport" id="26">
977 <string key="NSName">LucidaGrande</string>
978 <double key="NSSize">11</double>
979 <int key="NSfFlags">3100</int>
980 </object>
981 <object class="NSColor" key="NSBackgroundColor" id="1015974014">
982 <int key="NSColorSpace">3</int>
983 <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
984 </object>
985 <object class="NSColor" key="NSTextColor" id="778577558">
986 <int key="NSColorSpace">6</int>
987 <string key="NSCatalogName">System</string>
988 <string key="NSColorName">headerTextColor</string>
989 <object class="NSColor" key="NSColor" id="515582523">
990 <int key="NSColorSpace">3</int>
991 <bytes key="NSWhite">MAA</bytes>
992 </object>
993 </object>
994 </object>
995 <object class="NSTextFieldCell" key="NSDataCell" id="967877425">
996 <int key="NSCellFlags">337641536</int>
997 <int key="NSCellFlags2">2048</int>
998 <string key="NSContents">Text Cell</string>
999 <object class="NSFont" key="NSSupport" id="809233629">
1000 <string key="NSName">LucidaGrande</string>
1001 <double key="NSSize">13</double>
1002 <int key="NSfFlags">1044</int>
1003 </object>
1004 <reference key="NSControlView" ref="45603544"/>
1005 <object class="NSColor" key="NSBackgroundColor" id="933857092">
1006 <int key="NSColorSpace">6</int>
1007 <string key="NSCatalogName">System</string>
1008 <string key="NSColorName">controlBackgroundColor</string>
1009 <object class="NSColor" key="NSColor" id="591163410">
1010 <int key="NSColorSpace">3</int>
1011 <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
1012 </object>
1013 </object>
1014 <object class="NSColor" key="NSTextColor" id="210721017">
1015 <int key="NSColorSpace">6</int>
1016 <string key="NSCatalogName">System</string>
1017 <string key="NSColorName">controlTextColor</string>
1018 <reference key="NSColor" ref="515582523"/>
1019 </object>
1020 </object>
1021 <int key="NSResizingMask">3</int>
1022 <bool key="NSIsResizeable">YES</bool>
1023 <reference key="NSTableView" ref="45603544"/>
1024 </object>
1025 <object class="NSTableColumn" id="1044915056">
1026 <string key="NSIdentifier">xferType</string>
1027 <double key="NSWidth">40</double>
1028 <double key="NSMinWidth">40</double>
1029 <double key="NSMaxWidth">1000</double>
1030 <object class="NSTableHeaderCell" key="NSHeaderCell">
1031 <int key="NSCellFlags">75497536</int>
1032 <int key="NSCellFlags2">134219776</int>
1033 <string key="NSContents">type</string>
1034 <reference key="NSSupport" ref="26"/>
1035 <reference key="NSBackgroundColor" ref="1015974014"/>
1036 <reference key="NSTextColor" ref="778577558"/>
1037 </object>
1038 <object class="NSTextFieldCell" key="NSDataCell" id="1061781149">
1039 <int key="NSCellFlags">67108928</int>
1040 <int key="NSCellFlags2">2048</int>
1041 <string key="NSContents">Text Cell</string>
1042 <reference key="NSSupport" ref="809233629"/>
1043 <reference key="NSControlView" ref="45603544"/>
1044 <reference key="NSBackgroundColor" ref="933857092"/>
1045 <reference key="NSTextColor" ref="210721017"/>
1046 </object>
1047 <int key="NSResizingMask">3</int>
1048 <bool key="NSIsResizeable">YES</bool>
1049 <reference key="NSTableView" ref="45603544"/>
1050 <string key="NSHeaderToolTip">TFTP transfer type.</string>
1051 </object>
1052 <object class="NSTableColumn" id="431807415">
1053 <string key="NSIdentifier">peerAddress</string>
1054 <double key="NSWidth">150</double>
1055 <double key="NSMinWidth">10</double>
1056 <double key="NSMaxWidth">3.4028234663852886e+38</double>
1057 <object class="NSTableHeaderCell" key="NSHeaderCell">
1058 <int key="NSCellFlags">75497536</int>
1059 <int key="NSCellFlags2">134219776</int>
1060 <string key="NSContents">peer</string>
1061 <reference key="NSSupport" ref="26"/>
1062 <object class="NSColor" key="NSBackgroundColor" id="459346940">
1063 <int key="NSColorSpace">6</int>
1064 <string key="NSCatalogName">System</string>
1065 <string key="NSColorName">headerColor</string>
1066 <object class="NSColor" key="NSColor" id="771510757">
1067 <int key="NSColorSpace">3</int>
1068 <bytes key="NSWhite">MQA</bytes>
1069 </object>
1070 </object>
1071 <reference key="NSTextColor" ref="778577558"/>
1072 </object>
1073 <object class="NSTextFieldCell" key="NSDataCell" id="762484653">
1074 <int key="NSCellFlags">67108928</int>
1075 <int key="NSCellFlags2">2048</int>
1076 <string key="NSContents">Text Cell</string>
1077 <reference key="NSSupport" ref="809233629"/>
1078 <reference key="NSControlView" ref="45603544"/>
1079 <reference key="NSBackgroundColor" ref="933857092"/>
1080 <reference key="NSTextColor" ref="210721017"/>
1081 </object>
1082 <int key="NSResizingMask">3</int>
1083 <bool key="NSIsResizeable">YES</bool>
1084 <reference key="NSTableView" ref="45603544"/>
1085 <string key="NSHeaderToolTip">Peer address.</string>
1086 </object>
1087 <object class="NSTableColumn" id="644944854">
1088 <string key="NSIdentifier">ackBytes</string>
1089 <double key="NSWidth">64</double>
1090 <double key="NSMinWidth">10</double>
1091 <double key="NSMaxWidth">3.4028234663852886e+38</double>
1092 <object class="NSTableHeaderCell" key="NSHeaderCell">
1093 <int key="NSCellFlags">75497536</int>
1094 <int key="NSCellFlags2">134219776</int>
1095 <string key="NSContents">ACK</string>
1096 <reference key="NSSupport" ref="26"/>
1097 <reference key="NSBackgroundColor" ref="459346940"/>
1098 <reference key="NSTextColor" ref="778577558"/>
1099 </object>
1100 <object class="NSTextFieldCell" key="NSDataCell" id="730146075">
1101 <int key="NSCellFlags">67108928</int>
1102 <int key="NSCellFlags2">67110912</int>
1103 <string key="NSContents">Text Cell</string>
1104 <reference key="NSSupport" ref="809233629"/>
1105 <reference key="NSControlView" ref="45603544"/>
1106 <reference key="NSBackgroundColor" ref="933857092"/>
1107 <reference key="NSTextColor" ref="210721017"/>
1108 </object>
1109 <int key="NSResizingMask">3</int>
1110 <bool key="NSIsResizeable">YES</bool>
1111 <reference key="NSTableView" ref="45603544"/>
1112 <string key="NSHeaderToolTip">Acknowledged (transferred) portion size.</string>
1113 </object>
1114 <object class="NSTableColumn" id="780404863">
1115 <string key="NSIdentifier">xferSize</string>
1116 <double key="NSWidth">64</double>
1117 <double key="NSMinWidth">10</double>
1118 <double key="NSMaxWidth">3.4028234663852886e+38</double>
1119 <object class="NSTableHeaderCell" key="NSHeaderCell">
1120 <int key="NSCellFlags">75497536</int>
1121 <int key="NSCellFlags2">134219776</int>
1122 <string key="NSContents">size</string>
1123 <reference key="NSSupport" ref="26"/>
1124 <reference key="NSBackgroundColor" ref="459346940"/>
1125 <reference key="NSTextColor" ref="778577558"/>
1126 </object>
1127 <object class="NSTextFieldCell" key="NSDataCell" id="475925037">
1128 <int key="NSCellFlags">67108928</int>
1129 <int key="NSCellFlags2">67110912</int>
1130 <string key="NSContents">Text Cell</string>
1131 <reference key="NSSupport" ref="809233629"/>
1132 <reference key="NSControlView" ref="45603544"/>
1133 <reference key="NSBackgroundColor" ref="933857092"/>
1134 <reference key="NSTextColor" ref="210721017"/>
1135 </object>
1136 <int key="NSResizingMask">3</int>
1137 <bool key="NSIsResizeable">YES</bool>
1138 <reference key="NSTableView" ref="45603544"/>
1139 <string key="NSHeaderToolTip">Total file size.</string>
1140 </object>
1141 </array>
1142 <double key="NSIntercellSpacingWidth">3</double>
1143 <double key="NSIntercellSpacingHeight">2</double>
1144 <reference key="NSBackgroundColor" ref="771510757"/>
1145 <object class="NSColor" key="NSGridColor">
1146 <int key="NSColorSpace">6</int>
1147 <string key="NSCatalogName">System</string>
1148 <string key="NSColorName">gridColor</string>
1149 <object class="NSColor" key="NSColor" id="288383301">
1150 <int key="NSColorSpace">3</int>
1151 <bytes key="NSWhite">MC41AA</bytes>
1152 </object>
1153 </object>
1154 <double key="NSRowHeight">17</double>
1155 <int key="NSTvFlags">-750780416</int>
1156 <reference key="NSDelegate"/>
1157 <reference key="NSDataSource"/>
1158 <int key="NSColumnAutoresizingStyle">5</int>
1159 <int key="NSDraggingSourceMaskForLocal">15</int>
1160 <int key="NSDraggingSourceMaskForNonLocal">0</int>
1161 <bool key="NSAllowsTypeSelect">YES</bool>
1162 <int key="NSTableViewDraggingDestinationStyle">0</int>
1163 <int key="NSTableViewGroupRowStyle">1</int>
1164 </object>
1165 </array>
1166 <string key="NSFrame">{{1, 17}, {568, 115}}</string>
1167 <reference key="NSSuperview" ref="192988542"/>
1168 <reference key="NSNextKeyView" ref="45603544"/>
1169 <string key="NSReuseIdentifierKey">_NS:1195</string>
1170 <reference key="NSDocView" ref="45603544"/>
1171 <reference key="NSBGColor" ref="933857092"/>
1172 <int key="NScvFlags">4</int>
1173 </object>
1174 <object class="NSScroller" id="600095476">
1175 <reference key="NSNextResponder" ref="192988542"/>
1176 <int key="NSvFlags">-2147483392</int>
1177 <string key="NSFrame">{{224, 17}, {15, 102}}</string>
1178 <reference key="NSSuperview" ref="192988542"/>
1179 <reference key="NSNextKeyView" ref="427087625"/>
1180 <string key="NSReuseIdentifierKey">_NS:1214</string>
1181 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1182 <reference key="NSTarget" ref="192988542"/>
1183 <string key="NSAction">_doScroller:</string>
1184 <double key="NSCurValue">37</double>
1185 <double key="NSPercent">0.1947367936372757</double>
1186 </object>
1187 <object class="NSScroller" id="1046047013">
1188 <reference key="NSNextResponder" ref="192988542"/>
1189 <int key="NSvFlags">-2147483392</int>
1190 <string key="NSFrame">{{1, 118}, {568, 15}}</string>
1191 <reference key="NSSuperview" ref="192988542"/>
1192 <reference key="NSNextKeyView" ref="600095476"/>
1193 <string key="NSReuseIdentifierKey">_NS:1216</string>
1194 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1195 <int key="NSsFlags">1</int>
1196 <reference key="NSTarget" ref="192988542"/>
1197 <string key="NSAction">_doScroller:</string>
1198 <double key="NSPercent">0.99824253075571179</double>
1199 </object>
1200 <object class="NSClipView" id="862834072">
1201 <reference key="NSNextResponder" ref="192988542"/>
1202 <int key="NSvFlags">2304</int>
1203 <array class="NSMutableArray" key="NSSubviews">
1204 <reference ref="1022673745"/>
1205 </array>
1206 <string key="NSFrame">{{1, 0}, {568, 17}}</string>
1207 <reference key="NSSuperview" ref="192988542"/>
1208 <reference key="NSNextKeyView" ref="1022673745"/>
1209 <string key="NSReuseIdentifierKey">_NS:1200</string>
1210 <reference key="NSDocView" ref="1022673745"/>
1211 <reference key="NSBGColor" ref="933857092"/>
1212 <int key="NScvFlags">4</int>
1213 </object>
1214 </array>
1215 <string key="NSFrameSize">{570, 133}</string>
1216 <reference key="NSSuperview" ref="328183451"/>
1217 <reference key="NSNextKeyView" ref="790409929"/>
1218 <string key="NSReuseIdentifierKey">_NS:1193</string>
1219 <int key="NSsFlags">133682</int>
1220 <reference key="NSVScroller" ref="600095476"/>
1221 <reference key="NSHScroller" ref="1046047013"/>
1222 <reference key="NSContentView" ref="790409929"/>
1223 <reference key="NSHeaderClipView" ref="862834072"/>
1224 <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
1225 <double key="NSMinMagnification">0.25</double>
1226 <double key="NSMaxMagnification">4</double>
1227 <double key="NSMagnification">1</double>
1228 </object>
1229 </array>
1230 <string key="NSFrameSize">{570, 133}</string>
1231 <reference key="NSSuperview" ref="250587056"/>
1232 <reference key="NSNextKeyView" ref="192988542"/>
1233 <string key="NSReuseIdentifierKey">_NS:547</string>
1234 <string key="NSClassName">NSView</string>
1235 </object>
1236 <object class="NSCustomView" id="427087625">
1237 <reference key="NSNextResponder" ref="250587056"/>
1238 <int key="NSvFlags">256</int>
1239 <array class="NSMutableArray" key="NSSubviews">
1240 <object class="NSScrollView" id="356109671">
1241 <reference key="NSNextResponder" ref="427087625"/>
1242 <int key="NSvFlags">274</int>
1243 <array class="NSMutableArray" key="NSSubviews">
1244 <object class="NSClipView" id="105628437">
1245 <reference key="NSNextResponder" ref="356109671"/>
1246 <int key="NSvFlags">2304</int>
1247 <array class="NSMutableArray" key="NSSubviews">
1248 <object class="NSTextView" id="827877557">
1249 <reference key="NSNextResponder" ref="105628437"/>
1250 <int key="NSvFlags">2322</int>
1251 <string key="NSFrameSize">{568, 130}</string>
1252 <reference key="NSSuperview" ref="105628437"/>
1253 <reference key="NSNextKeyView" ref="4720790"/>
1254 <string key="NSReuseIdentifierKey">_NS:3760</string>
1255 <object class="NSTextContainer" key="NSTextContainer" id="398997119">
1256 <object class="NSLayoutManager" key="NSLayoutManager">
1257 <object class="NSTextStorage" key="NSTextStorage">
1258 <object class="NSMutableString" key="NSString">
1259 <characters key="NS.bytes"/>
1260 </object>
1261 <nil key="NSDelegate"/>
1262 </object>
1263 <array class="NSMutableArray" key="NSTextContainers">
1264 <reference ref="398997119"/>
1265 </array>
1266 <int key="NSLMFlags">38</int>
1267 <nil key="NSDelegate"/>
1268 </object>
1269 <reference key="NSTextView" ref="827877557"/>
1270 <double key="NSWidth">568</double>
1271 <int key="NSTCFlags">1</int>
1272 </object>
1273 <object class="NSTextViewSharedData" key="NSSharedData">
1274 <int key="NSFlags">67119877</int>
1275 <int key="NSTextCheckingTypes">0</int>
1276 <nil key="NSMarkedAttributes"/>
1277 <reference key="NSBackgroundColor" ref="771510757"/>
1278 <dictionary key="NSSelectedAttributes">
1279 <object class="NSColor" key="NSBackgroundColor">
1280 <int key="NSColorSpace">6</int>
1281 <string key="NSCatalogName">System</string>
1282 <string key="NSColorName">selectedTextBackgroundColor</string>
1283 <reference key="NSColor" ref="591163410"/>
1284 </object>
1285 <object class="NSColor" key="NSColor">
1286 <int key="NSColorSpace">6</int>
1287 <string key="NSCatalogName">System</string>
1288 <string key="NSColorName">selectedTextColor</string>
1289 <reference key="NSColor" ref="515582523"/>
1290 </object>
1291 </dictionary>
1292 <reference key="NSInsertionColor" ref="515582523"/>
1293 <dictionary key="NSLinkAttributes">
1294 <object class="NSColor" key="NSColor">
1295 <int key="NSColorSpace">1</int>
1296 <bytes key="NSRGB">MCAwIDEAA</bytes>
1297 </object>
1298 <object class="NSCursor" key="NSCursor">
1299 <string key="NSHotSpot">{8, -8}</string>
1300 <int key="NSCursorType">13</int>
1301 </object>
1302 <integer value="1" key="NSUnderline"/>
1303 </dictionary>
1304 <nil key="NSDefaultParagraphStyle"/>
1305 <nil key="NSTextFinder"/>
1306 <int key="NSPreferredTextFinderStyle">1</int>
1307 </object>
1308 <int key="NSTVFlags">6</int>
1309 <string key="NSMaxSize">{696, 10000000}</string>
1310 <nil key="NSDelegate"/>
1311 </object>
1312 </array>
1313 <string key="NSFrame">{{1, 1}, {568, 130}}</string>
1314 <reference key="NSSuperview" ref="356109671"/>
1315 <reference key="NSNextKeyView" ref="827877557"/>
1316 <string key="NSReuseIdentifierKey">_NS:3758</string>
1317 <reference key="NSDocView" ref="827877557"/>
1318 <reference key="NSBGColor" ref="771510757"/>
1319 <object class="NSCursor" key="NSCursor">
1320 <string key="NSHotSpot">{4, 5}</string>
1321 <object class="NSImage" key="NSImage">
1322 <int key="NSImageFlags">12582912</int>
1323 <array class="NSMutableArray" key="NSReps">
1324 <array>
1325 <integer value="0"/>
1326 <object class="NSBitmapImageRep">
1327 <object class="NSData" key="NSTIFFRepresentation">
1328 <bytes key="NS.bytes">TU0AKgAAAHCAFUqgBVKsAAAAwdVQUqwaEQeIRGJRGFlYqwWLQ+JxuOQpVRmEx2RROKwOQyOUQSPyaUym
1329SxqWyKXyeYxyZzWbSuJTScRCbz2Nz+gRKhUOfTqeUai0OSxiWTiBQSHSGFquGwekxyAgAAAOAQAAAwAA
1330AAEAEAAAAQEAAwAAAAEAEAAAAQIAAwAAAAIACAAIAQMAAwAAAAEABQAAAQYAAwAAAAEAAQAAAREABAAA
1331AAEAAAAIARIAAwAAAAEAAQAAARUAAwAAAAEAAgAAARYAAwAAAAEAEAAAARcABAAAAAEAAABnARwAAwAA
1332AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
1333 </object>
1334 </object>
1335 </array>
1336 </array>
1337 <object class="NSColor" key="NSColor" id="785653565">
1338 <int key="NSColorSpace">3</int>
1339 <bytes key="NSWhite">MCAwAA</bytes>
1340 </object>
1341 </object>
1342 </object>
1343 <int key="NScvFlags">4</int>
1344 </object>
1345 <object class="NSScroller" id="275648235">
1346 <reference key="NSNextResponder" ref="356109671"/>
1347 <int key="NSvFlags">256</int>
1348 <string key="NSFrame">{{553, 1}, {16, 130}}</string>
1349 <reference key="NSSuperview" ref="356109671"/>
1350 <reference key="NSNextKeyView" ref="639837771"/>
1351 <string key="NSReuseIdentifierKey">_NS:3774</string>
1352 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1353 <reference key="NSTarget" ref="356109671"/>
1354 <string key="NSAction">_doScroller:</string>
1355 <double key="NSCurValue">1</double>
1356 <double key="NSPercent">0.85256409645080566</double>
1357 </object>
1358 <object class="NSScroller" id="4720790">
1359 <reference key="NSNextResponder" ref="356109671"/>
1360 <int key="NSvFlags">-2147483392</int>
1361 <string key="NSFrame">{{-100, -100}, {87, 18}}</string>
1362 <reference key="NSSuperview" ref="356109671"/>
1363 <reference key="NSNextKeyView" ref="105628437"/>
1364 <string key="NSReuseIdentifierKey">_NS:3762</string>
1365 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1366 <int key="NSsFlags">1</int>
1367 <reference key="NSTarget" ref="356109671"/>
1368 <string key="NSAction">_doScroller:</string>
1369 <double key="NSCurValue">1</double>
1370 <double key="NSPercent">0.94565218687057495</double>
1371 </object>
1372 </array>
1373 <string key="NSFrameSize">{570, 132}</string>
1374 <reference key="NSSuperview" ref="427087625"/>
1375 <reference key="NSNextKeyView" ref="105628437"/>
1376 <string key="NSReuseIdentifierKey">_NS:148</string>
1377 <int key="NSsFlags">133138</int>
1378 <reference key="NSVScroller" ref="275648235"/>
1379 <reference key="NSHScroller" ref="4720790"/>
1380 <reference key="NSContentView" ref="105628437"/>
1381 <double key="NSMinMagnification">0.25</double>
1382 <double key="NSMaxMagnification">4</double>
1383 <double key="NSMagnification">1</double>
1384 </object>
1385 </array>
1386 <string key="NSFrame">{{0, 134}, {570, 132}}</string>
1387 <reference key="NSSuperview" ref="250587056"/>
1388 <reference key="NSNextKeyView" ref="356109671"/>
1389 <string key="NSReuseIdentifierKey">_NS:549</string>
1390 <string key="NSClassName">NSView</string>
1391 </object>
1392 </array>
1393 <string key="NSFrame">{{15, 41}, {570, 266}}</string>
1394 <reference key="NSSuperview" ref="439893737"/>
1395 <reference key="NSNextKeyView" ref="328183451"/>
1396 <string key="NSReuseIdentifierKey">_NS:545</string>
1397 <int key="NSDividerStyle">2</int>
1398 </object>
1399 <object class="NSBox" id="639837771">
1400 <reference key="NSNextResponder" ref="439893737"/>
1401 <int key="NSvFlags">33</int>
1402 <array class="NSMutableArray" key="NSSubviews">
1403 <object class="NSView" id="1002721778">
1404 <reference key="NSNextResponder" ref="639837771"/>
1405 <int key="NSvFlags">274</int>
1406 <array class="NSMutableArray" key="NSSubviews">
1407 <object class="NSButton" id="230958321">
1408 <reference key="NSNextResponder" ref="1002721778"/>
1409 <int key="NSvFlags">289</int>
1410 <string key="NSFrame">{{13, 0}, {174, 29}}</string>
1411 <reference key="NSSuperview" ref="1002721778"/>
1412 <reference key="NSNextKeyView" ref="419622798"/>
1413 <string key="NSReuseIdentifierKey">_NS:239</string>
1414 <bool key="NSEnabled">YES</bool>
1415 <object class="NSButtonCell" key="NSCell" id="441222556">
1416 <int key="NSCellFlags">-2080374784</int>
1417 <int key="NSCellFlags2">134217728</int>
1418 <string key="NSContents">Listen on the address</string>
1419 <reference key="NSSupport" ref="809233629"/>
1420 <string key="NSCellIdentifier">_NS:239</string>
1421 <reference key="NSControlView" ref="230958321"/>
1422 <int key="NSButtonFlags">1211912448</int>
1423 <int key="NSButtonFlags2">2</int>
1424 <object class="NSCustomResource" key="NSNormalImage">
1425 <string key="NSClassName">NSImage</string>
1426 <string key="NSResourceName">NSSwitch</string>
1427 </object>
1428 <object class="NSButtonImageSource" key="NSAlternateImage">
1429 <string key="NSImageName">NSSwitch</string>
1430 </object>
1431 <string key="NSAlternateContents"/>
1432 <string key="NSKeyEquivalent"/>
1433 <int key="NSPeriodicDelay">200</int>
1434 <int key="NSPeriodicInterval">25</int>
1435 </object>
1436 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1437 </object>
1438 <object class="NSTextField" id="419622798">
1439 <reference key="NSNextResponder" ref="1002721778"/>
1440 <int key="NSvFlags">289</int>
1441 <string key="NSFrame">{{201, 3}, {119, 22}}</string>
1442 <reference key="NSSuperview" ref="1002721778"/>
1443 <reference key="NSNextKeyView" ref="7620662"/>
1444 <string key="NSReuseIdentifierKey">_NS:248</string>
1445 <bool key="NSEnabled">YES</bool>
1446 <object class="NSTextFieldCell" key="NSCell" id="226701554">
1447 <int key="NSCellFlags">-1804599231</int>
1448 <int key="NSCellFlags2">138413056</int>
1449 <string key="NSContents">0.0.0.0</string>
1450 <reference key="NSSupport" ref="809233629"/>
1451 <string key="NSCellIdentifier">_NS:248</string>
1452 <reference key="NSControlView" ref="419622798"/>
1453 <bool key="NSDrawsBackground">YES</bool>
1454 <object class="NSColor" key="NSBackgroundColor" id="449937964">
1455 <int key="NSColorSpace">6</int>
1456 <string key="NSCatalogName">System</string>
1457 <string key="NSColorName">textBackgroundColor</string>
1458 <reference key="NSColor" ref="771510757"/>
1459 </object>
1460 <object class="NSColor" key="NSTextColor" id="53075377">
1461 <int key="NSColorSpace">6</int>
1462 <string key="NSCatalogName">System</string>
1463 <string key="NSColorName">textColor</string>
1464 <reference key="NSColor" ref="515582523"/>
1465 </object>
1466 </object>
1467 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1468 </object>
1469 <object class="NSTextField" id="7620662">
1470 <reference key="NSNextResponder" ref="1002721778"/>
1471 <int key="NSvFlags">289</int>
1472 <string key="NSFrame">{{325, 2}, {75, 22}}</string>
1473 <reference key="NSSuperview" ref="1002721778"/>
1474 <reference key="NSNextKeyView" ref="711665850"/>
1475 <string key="NSReuseIdentifierKey">_NS:3936</string>
1476 <bool key="NSEnabled">YES</bool>
1477 <object class="NSTextFieldCell" key="NSCell" id="31855702">
1478 <int key="NSCellFlags">68157504</int>
1479 <int key="NSCellFlags2">138413056</int>
1480 <string key="NSContents">and port</string>
1481 <reference key="NSSupport" ref="809233629"/>
1482 <string key="NSCellIdentifier">_NS:3936</string>
1483 <reference key="NSControlView" ref="7620662"/>
1484 <bool key="NSDrawsBackground">YES</bool>
1485 <object class="NSColor" key="NSBackgroundColor" id="175645791">
1486 <int key="NSColorSpace">6</int>
1487 <string key="NSCatalogName">System</string>
1488 <string key="NSColorName">controlColor</string>
1489 <reference key="NSColor" ref="591163410"/>
1490 </object>
1491 <reference key="NSTextColor" ref="210721017"/>
1492 </object>
1493 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1494 </object>
1495 <object class="NSTextField" id="711665850">
1496 <reference key="NSNextResponder" ref="1002721778"/>
1497 <int key="NSvFlags">289</int>
1498 <string key="NSFrame">{{405, 3}, {40, 22}}</string>
1499 <reference key="NSSuperview" ref="1002721778"/>
1500 <string key="NSReuseIdentifierKey">_NS:248</string>
1501 <bool key="NSEnabled">YES</bool>
1502 <object class="NSTextFieldCell" key="NSCell" id="771004923">
1503 <int key="NSCellFlags">-1804599231</int>
1504 <int key="NSCellFlags2">71304192</int>
1505 <string key="NSContents">69</string>
1506 <reference key="NSSupport" ref="809233629"/>
1507 <string key="NSCellIdentifier">_NS:248</string>
1508 <reference key="NSControlView" ref="711665850"/>
1509 <bool key="NSDrawsBackground">YES</bool>
1510 <reference key="NSBackgroundColor" ref="449937964"/>
1511 <reference key="NSTextColor" ref="53075377"/>
1512 </object>
1513 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1514 </object>
1515 </array>
1516 <string key="NSFrame">{{1, 1}, {460, 28}}</string>
1517 <reference key="NSSuperview" ref="639837771"/>
1518 <reference key="NSNextKeyView" ref="230958321"/>
1519 <string key="NSReuseIdentifierKey">_NS:11</string>
1520 </object>
1521 </array>
1522 <string key="NSFrame">{{123, 7}, {462, 30}}</string>
1523 <reference key="NSSuperview" ref="439893737"/>
1524 <reference key="NSNextKeyView" ref="1002721778"/>
1525 <string key="NSReuseIdentifierKey">_NS:9</string>
1526 <string key="NSOffsets">{0, 0}</string>
1527 <object class="NSTextFieldCell" key="NSTitleCell">
1528 <int key="NSCellFlags">67108864</int>
1529 <int key="NSCellFlags2">0</int>
1530 <string key="NSContents">Box</string>
1531 <reference key="NSSupport" ref="26"/>
1532 <reference key="NSBackgroundColor" ref="449937964"/>
1533 <object class="NSColor" key="NSTextColor">
1534 <int key="NSColorSpace">3</int>
1535 <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
1536 </object>
1537 </object>
1538 <reference key="NSContentView" ref="1002721778"/>
1539 <int key="NSBorderType">1</int>
1540 <int key="NSBoxType">4</int>
1541 <int key="NSTitlePosition">2</int>
1542 <bool key="NSTransparent">NO</bool>
1543 <double key="NSCornerRadius2">5</double>
1544 <object class="NSColor" key="NSFillColor2">
1545 <int key="NSColorSpace">6</int>
1546 <string key="NSCatalogName">System</string>
1547 <string key="NSColorName">windowBackgroundColor</string>
1548 <reference key="NSColor" ref="288383301"/>
1549 </object>
1550 </object>
1551 </array>
1552 <string key="NSFrameSize">{600, 322}</string>
1553 <reference key="NSNextKeyView" ref="250587056"/>
1554 </object>
1555 <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
1556 <string key="NSMinSize">{492, 269}</string>
1557 <string key="NSMaxSize">{10000000000000, 10000000000000}</string>
1558 <bool key="NSWindowIsRestorable">YES</bool>
1559 </object>
1560 <object class="NSWindowTemplate" id="759947593">
1561 <int key="NSWindowStyleMask">3</int>
1562 <int key="NSWindowBacking">2</int>
1563 <string key="NSWindowRect">{{131, 159}, {603, 348}}</string>
1564 <int key="NSWTFlags">1685586944</int>
1565 <string key="NSWindowTitle">PumpKIN Preferences</string>
1566 <string key="NSWindowClass">NSWindow</string>
1567 <nil key="NSViewClass"/>
1568 <nil key="NSUserInterfaceItemIdentifier"/>
1569 <object class="NSView" key="NSWindowView" id="929656847">
1570 <nil key="NSNextResponder"/>
1571 <int key="NSvFlags">256</int>
1572 <array class="NSMutableArray" key="NSSubviews">
1573 <object class="NSBox" id="208819373">
1574 <reference key="NSNextResponder" ref="929656847"/>
1575 <int key="NSvFlags">12</int>
1576 <array class="NSMutableArray" key="NSSubviews">
1577 <object class="NSView" id="434868610">
1578 <reference key="NSNextResponder" ref="208819373"/>
1579 <int key="NSvFlags">274</int>
1580 <array class="NSMutableArray" key="NSSubviews">
1581 <object class="NSTextField" id="328098120">
1582 <reference key="NSNextResponder" ref="434868610"/>
1583 <int key="NSvFlags">268</int>
1584 <string key="NSFrame">{{18, 14}, {481, 22}}</string>
1585 <reference key="NSSuperview" ref="434868610"/>
1586 <reference key="NSNextKeyView" ref="240606174"/>
1587 <string key="NSReuseIdentifierKey">_NS:248</string>
1588 <bool key="NSEnabled">YES</bool>
1589 <object class="NSTextFieldCell" key="NSCell" id="151062802">
1590 <int key="NSCellFlags">-1804599231</int>
1591 <int key="NSCellFlags2">272630784</int>
1592 <string key="NSContents"/>
1593 <reference key="NSSupport" ref="809233629"/>
1594 <string key="NSCellIdentifier">_NS:248</string>
1595 <reference key="NSControlView" ref="328098120"/>
1596 <bool key="NSDrawsBackground">YES</bool>
1597 <reference key="NSBackgroundColor" ref="449937964"/>
1598 <reference key="NSTextColor" ref="53075377"/>
1599 </object>
1600 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1601 </object>
1602 <object class="NSButton" id="240606174">
1603 <reference key="NSNextResponder" ref="434868610"/>
1604 <int key="NSvFlags">268</int>
1605 <string key="NSFrame">{{507, 17}, {56, 19}}</string>
1606 <reference key="NSSuperview" ref="434868610"/>
1607 <reference key="NSNextKeyView" ref="233651545"/>
1608 <string key="NSReuseIdentifierKey">_NS:1491</string>
1609 <bool key="NSEnabled">YES</bool>
1610 <object class="NSButtonCell" key="NSCell" id="108023427">
1611 <int key="NSCellFlags">67108864</int>
1612 <int key="NSCellFlags2">134217728</int>
1613 <string key="NSContents">Browse</string>
1614 <object class="NSFont" key="NSSupport" id="752899677">
1615 <string key="NSName">LucidaGrande</string>
1616 <double key="NSSize">12</double>
1617 <int key="NSfFlags">16</int>
1618 </object>
1619 <string key="NSCellIdentifier">_NS:1491</string>
1620 <reference key="NSControlView" ref="240606174"/>
1621 <int key="NSButtonFlags">-2037104640</int>
1622 <int key="NSButtonFlags2">36</int>
1623 <object class="NSCustomResource" key="NSNormalImage">
1624 <string key="NSClassName">NSImage</string>
1625 <string key="NSResourceName">NSPathTemplate</string>
1626 </object>
1627 <string key="NSAlternateContents"/>
1628 <string key="NSKeyEquivalent"/>
1629 <int key="NSPeriodicDelay">400</int>
1630 <int key="NSPeriodicInterval">75</int>
1631 </object>
1632 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1633 </object>
1634 </array>
1635 <string key="NSFrame">{{1, 1}, {581, 46}}</string>
1636 <reference key="NSSuperview" ref="208819373"/>
1637 <reference key="NSNextKeyView" ref="328098120"/>
1638 <string key="NSReuseIdentifierKey">_NS:632</string>
1639 </object>
1640 </array>
1641 <string key="NSFrame">{{10, 266}, {583, 62}}</string>
1642 <reference key="NSSuperview" ref="929656847"/>
1643 <reference key="NSNextKeyView" ref="434868610"/>
1644 <string key="NSReuseIdentifierKey">_NS:630</string>
1645 <string key="NSOffsets">{0, 0}</string>
1646 <object class="NSTextFieldCell" key="NSTitleCell">
1647 <int key="NSCellFlags">67108864</int>
1648 <int key="NSCellFlags2">0</int>
1649 <string key="NSContents">TFTP filesystem root (download path)</string>
1650 <reference key="NSSupport" ref="26"/>
1651 <reference key="NSBackgroundColor" ref="449937964"/>
1652 <object class="NSColor" key="NSTextColor">
1653 <int key="NSColorSpace">3</int>
1654 <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
1655 </object>
1656 </object>
1657 <reference key="NSContentView" ref="434868610"/>
1658 <int key="NSBorderType">1</int>
1659 <int key="NSBoxType">0</int>
1660 <int key="NSTitlePosition">2</int>
1661 <bool key="NSTransparent">NO</bool>
1662 </object>
1663 <object class="NSBox" id="233651545">
1664 <reference key="NSNextResponder" ref="929656847"/>
1665 <int key="NSvFlags">12</int>
1666 <array class="NSMutableArray" key="NSSubviews">
1667 <object class="NSView" id="532822418">
1668 <reference key="NSNextResponder" ref="233651545"/>
1669 <int key="NSvFlags">274</int>
1670 <array class="NSMutableArray" key="NSSubviews">
1671 <object class="NSTextField" id="823695658">
1672 <reference key="NSNextResponder" ref="532822418"/>
1673 <int key="NSvFlags">268</int>
1674 <string key="NSFrame">{{18, 14}, {481, 22}}</string>
1675 <reference key="NSSuperview" ref="532822418"/>
1676 <reference key="NSNextKeyView" ref="379050521"/>
1677 <string key="NSReuseIdentifierKey">_NS:248</string>
1678 <bool key="NSEnabled">YES</bool>
1679 <object class="NSTextFieldCell" key="NSCell" id="424316336">
1680 <int key="NSCellFlags">-1804599231</int>
1681 <int key="NSCellFlags2">272630784</int>
1682 <string key="NSContents"/>
1683 <reference key="NSSupport" ref="809233629"/>
1684 <string key="NSCellIdentifier">_NS:248</string>
1685 <reference key="NSControlView" ref="823695658"/>
1686 <bool key="NSDrawsBackground">YES</bool>
1687 <reference key="NSBackgroundColor" ref="449937964"/>
1688 <reference key="NSTextColor" ref="53075377"/>
1689 </object>
1690 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1691 </object>
1692 <object class="NSButton" id="379050521">
1693 <reference key="NSNextResponder" ref="532822418"/>
1694 <int key="NSvFlags">268</int>
1695 <string key="NSFrame">{{507, 15}, {56, 19}}</string>
1696 <reference key="NSSuperview" ref="532822418"/>
1697 <reference key="NSNextKeyView" ref="197043543"/>
1698 <string key="NSReuseIdentifierKey">_NS:1491</string>
1699 <bool key="NSEnabled">YES</bool>
1700 <object class="NSButtonCell" key="NSCell" id="621926228">
1701 <int key="NSCellFlags">67108864</int>
1702 <int key="NSCellFlags2">134217728</int>
1703 <string key="NSContents">Browse</string>
1704 <reference key="NSSupport" ref="752899677"/>
1705 <string key="NSCellIdentifier">_NS:1491</string>
1706 <reference key="NSControlView" ref="379050521"/>
1707 <int key="NSButtonFlags">-2033434624</int>
1708 <int key="NSButtonFlags2">164</int>
1709 <string key="NSAlternateContents"/>
1710 <string key="NSKeyEquivalent"/>
1711 <int key="NSPeriodicDelay">400</int>
1712 <int key="NSPeriodicInterval">75</int>
1713 </object>
1714 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1715 </object>
1716 </array>
1717 <string key="NSFrame">{{1, 1}, {581, 46}}</string>
1718 <reference key="NSSuperview" ref="233651545"/>
1719 <reference key="NSNextKeyView" ref="823695658"/>
1720 <string key="NSReuseIdentifierKey">_NS:632</string>
1721 </object>
1722 </array>
1723 <string key="NSFrame">{{10, 200}, {583, 62}}</string>
1724 <reference key="NSSuperview" ref="929656847"/>
1725 <reference key="NSNextKeyView" ref="532822418"/>
1726 <string key="NSReuseIdentifierKey">_NS:630</string>
1727 <string key="NSOffsets">{0, 0}</string>
1728 <object class="NSTextFieldCell" key="NSTitleCell">
1729 <int key="NSCellFlags">67108864</int>
1730 <int key="NSCellFlags2">0</int>
1731 <string key="NSContents">Log file (leave empty to disable logging to file)</string>
1732 <reference key="NSSupport" ref="26"/>
1733 <reference key="NSBackgroundColor" ref="449937964"/>
1734 <object class="NSColor" key="NSTextColor">
1735 <int key="NSColorSpace">3</int>
1736 <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
1737 </object>
1738 </object>
1739 <reference key="NSContentView" ref="532822418"/>
1740 <int key="NSBorderType">1</int>
1741 <int key="NSBoxType">0</int>
1742 <int key="NSTitlePosition">2</int>
1743 <bool key="NSTransparent">NO</bool>
1744 </object>
1745 <object class="NSBox" id="197043543">
1746 <reference key="NSNextResponder" ref="929656847"/>
1747 <int key="NSvFlags">12</int>
1748 <array class="NSMutableArray" key="NSSubviews">
1749 <object class="NSView" id="202393739">
1750 <reference key="NSNextResponder" ref="197043543"/>
1751 <int key="NSvFlags">274</int>
1752 <array class="NSMutableArray" key="NSSubviews">
1753 <object class="NSMatrix" id="973753659">
1754 <reference key="NSNextResponder" ref="202393739"/>
1755 <int key="NSvFlags">268</int>
1756 <string key="NSFrame">{{18, 14}, {190, 58}}</string>
1757 <reference key="NSSuperview" ref="202393739"/>
1758 <reference key="NSNextKeyView" ref="866741769"/>
1759 <string key="NSReuseIdentifierKey">_NS:266</string>
1760 <bool key="NSEnabled">YES</bool>
1761 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1762 <int key="NSNumRows">3</int>
1763 <int key="NSNumCols">1</int>
1764 <array class="NSMutableArray" key="NSCells">
1765 <object class="NSButtonCell" id="529759421">
1766 <int key="NSCellFlags">-2080374784</int>
1767 <int key="NSCellFlags2">0</int>
1768 <string key="NSContents">Give all files</string>
1769 <reference key="NSSupport" ref="809233629"/>
1770 <reference key="NSControlView" ref="973753659"/>
1771 <int key="NSButtonFlags">1211912448</int>
1772 <int key="NSButtonFlags2">0</int>
1773 <object class="NSButtonImageSource" key="NSAlternateImage" id="914616927">
1774 <string key="NSImageName">NSRadioButton</string>
1775 </object>
1776 <int key="NSPeriodicDelay">400</int>
1777 <int key="NSPeriodicInterval">75</int>
1778 </object>
1779 <object class="NSButtonCell" id="859183946">
1780 <int key="NSCellFlags">67108864</int>
1781 <int key="NSCellFlags2">0</int>
1782 <string key="NSContents">Prompt before giving a file</string>
1783 <reference key="NSSupport" ref="809233629"/>
1784 <reference key="NSControlView" ref="973753659"/>
1785 <int key="NSTag">1</int>
1786 <int key="NSButtonFlags">1211912448</int>
1787 <int key="NSButtonFlags2">0</int>
1788 <reference key="NSAlternateImage" ref="914616927"/>
1789 <int key="NSPeriodicDelay">400</int>
1790 <int key="NSPeriodicInterval">75</int>
1791 </object>
1792 <object class="NSButtonCell" id="862531403">
1793 <int key="NSCellFlags">67108864</int>
1794 <int key="NSCellFlags2">0</int>
1795 <string key="NSContents">Deny all requests</string>
1796 <reference key="NSSupport" ref="809233629"/>
1797 <reference key="NSControlView" ref="973753659"/>
1798 <int key="NSTag">2</int>
1799 <int key="NSButtonFlags">1211912448</int>
1800 <int key="NSButtonFlags2">0</int>
1801 <reference key="NSAlternateImage" ref="914616927"/>
1802 <int key="NSPeriodicDelay">400</int>
1803 <int key="NSPeriodicInterval">75</int>
1804 </object>
1805 </array>
1806 <string key="NSCellSize">{190, 18}</string>
1807 <string key="NSIntercellSpacing">{4, 2}</string>
1808 <int key="NSMatrixFlags">1151868928</int>
1809 <string key="NSCellClass">NSActionCell</string>
1810 <object class="NSButtonCell" key="NSProtoCell" id="518920277">
1811 <int key="NSCellFlags">67108864</int>
1812 <int key="NSCellFlags2">0</int>
1813 <string key="NSContents">Radio</string>
1814 <reference key="NSSupport" ref="809233629"/>
1815 <int key="NSTag">-1</int>
1816 <int key="NSButtonFlags">1211912448</int>
1817 <int key="NSButtonFlags2">0</int>
1818 <object class="NSImage" key="NSNormalImage">
1819 <int key="NSImageFlags">549453824</int>
1820 <string key="NSSize">{18, 18}</string>
1821 <array class="NSMutableArray" key="NSReps">
1822 <array>
1823 <integer value="0"/>
1824 <object class="NSBitmapImageRep">
1825 <object class="NSData" key="NSTIFFRepresentation">
1826 <bytes key="NS.bytes">TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA
1827AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw
1828IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/
182929vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5
1830dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA
1831AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG
1832AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/
18330tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/
18347e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/
18355eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/
18363t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD
1837AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns
1838AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/
18396+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/
1840/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/
1841///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl
1842YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA
1843AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF
1844AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD
1845AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu
1846AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
1847AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB
1848AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES
1849AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS
1850AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
1851 </object>
1852 </object>
1853 </array>
1854 </array>
1855 <reference key="NSColor" ref="785653565"/>
1856 </object>
1857 <reference key="NSAlternateImage" ref="914616927"/>
1858 <int key="NSPeriodicDelay">400</int>
1859 <int key="NSPeriodicInterval">75</int>
1860 </object>
1861 <reference key="NSSelectedCell" ref="529759421"/>
1862 <reference key="NSBackgroundColor" ref="175645791"/>
1863 <reference key="NSCellBackgroundColor" ref="771510757"/>
1864 <reference key="NSFont" ref="809233629"/>
1865 </object>
1866 </array>
1867 <string key="NSFrame">{{1, 1}, {581, 82}}</string>
1868 <reference key="NSSuperview" ref="197043543"/>
1869 <reference key="NSNextKeyView" ref="973753659"/>
1870 <string key="NSReuseIdentifierKey">_NS:632</string>
1871 </object>
1872 </array>
1873 <string key="NSFrame">{{10, 98}, {583, 98}}</string>
1874 <reference key="NSSuperview" ref="929656847"/>
1875 <reference key="NSNextKeyView" ref="202393739"/>
1876 <string key="NSReuseIdentifierKey">_NS:630</string>
1877 <string key="NSOffsets">{0, 0}</string>
1878 <object class="NSTextFieldCell" key="NSTitleCell">
1879 <int key="NSCellFlags">67108864</int>
1880 <int key="NSCellFlags2">0</int>
1881 <string key="NSContents">Read Request Behavior</string>
1882 <reference key="NSSupport" ref="26"/>
1883 <reference key="NSBackgroundColor" ref="449937964"/>
1884 <object class="NSColor" key="NSTextColor">
1885 <int key="NSColorSpace">3</int>
1886 <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
1887 </object>
1888 </object>
1889 <reference key="NSContentView" ref="202393739"/>
1890 <int key="NSBorderType">1</int>
1891 <int key="NSBoxType">0</int>
1892 <int key="NSTitlePosition">2</int>
1893 <bool key="NSTransparent">NO</bool>
1894 </object>
1895 <object class="NSBox" id="866741769">
1896 <reference key="NSNextResponder" ref="929656847"/>
1897 <int key="NSvFlags">12</int>
1898 <array class="NSMutableArray" key="NSSubviews">
1899 <object class="NSView" id="132072321">
1900 <reference key="NSNextResponder" ref="866741769"/>
1901 <int key="NSvFlags">274</int>
1902 <array class="NSMutableArray" key="NSSubviews">
1903 <object class="NSMatrix" id="82294173">
1904 <reference key="NSNextResponder" ref="132072321"/>
1905 <int key="NSvFlags">268</int>
1906 <string key="NSFrame">{{18, 14}, {526, 38}}</string>
1907 <reference key="NSSuperview" ref="132072321"/>
1908 <string key="NSReuseIdentifierKey">_NS:266</string>
1909 <bool key="NSEnabled">YES</bool>
1910 <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
1911 <int key="NSNumRows">2</int>
1912 <int key="NSNumCols">2</int>
1913 <array class="NSMutableArray" key="NSCells">
1914 <object class="NSButtonCell" id="708384367">
1915 <int key="NSCellFlags">-2080374784</int>
1916 <int key="NSCellFlags2">0</int>
1917 <string key="NSContents">Take all files</string>
1918 <reference key="NSSupport" ref="809233629"/>
1919 <reference key="NSControlView" ref="82294173"/>
1920 <int key="NSButtonFlags">1211912448</int>
1921 <int key="NSButtonFlags2">0</int>
1922 <reference key="NSAlternateImage" ref="914616927"/>
1923 <string key="NSAlternateContents"/>
1924 <string key="NSKeyEquivalent"/>
1925 <int key="NSPeriodicDelay">200</int>
1926 <int key="NSPeriodicInterval">25</int>
1927 </object>
1928 <object class="NSButtonCell" id="158682464">
1929 <int key="NSCellFlags">67108864</int>
1930 <int key="NSCellFlags2">0</int>
1931 <string key="NSContents">Prompt if file exists</string>
1932 <reference key="NSSupport" ref="809233629"/>
1933 <reference key="NSControlView" ref="82294173"/>
1934 <int key="NSTag">1</int>
1935 <int key="NSButtonFlags">1211912448</int>
1936 <int key="NSButtonFlags2">0</int>
1937 <reference key="NSAlternateImage" ref="914616927"/>
1938 <int key="NSPeriodicDelay">400</int>
1939 <int key="NSPeriodicInterval">75</int>
1940 </object>
1941 <object class="NSButtonCell" id="527645225">
1942 <int key="NSCellFlags">67108864</int>
1943 <int key="NSCellFlags2">0</int>
1944 <string key="NSContents">Always prompt before accepting a file</string>
1945 <reference key="NSSupport" ref="809233629"/>
1946 <reference key="NSControlView" ref="82294173"/>
1947 <int key="NSTag">2</int>
1948 <int key="NSButtonFlags">1211912448</int>
1949 <int key="NSButtonFlags2">0</int>
1950 <object class="NSImage" key="NSNormalImage">
1951 <int key="NSImageFlags">549453824</int>
1952 <string key="NSSize">{18, 18}</string>
1953 <array class="NSMutableArray" key="NSReps">
1954 <array>
1955 <integer value="0"/>
1956 <object class="NSBitmapImageRep">
1957 <object class="NSData" key="NSTIFFRepresentation">
1958 <bytes key="NS.bytes">TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA
1959AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw
1960IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/
196129vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5
1962dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA
1963AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG
1964AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/
19650tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/
19667e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/
19675eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/
19683t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD
1969AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns
1970AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/
19716+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/
1972/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/
1973///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl
1974YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA
1975AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF
1976AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD
1977AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu
1978AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
1979AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB
1980AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES
1981AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS
1982AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
1983 </object>
1984 </object>
1985 </array>
1986 </array>
1987 <reference key="NSColor" ref="785653565"/>
1988 </object>
1989 <reference key="NSAlternateImage" ref="914616927"/>
1990 <int key="NSPeriodicDelay">400</int>
1991 <int key="NSPeriodicInterval">75</int>
1992 </object>
1993 <object class="NSButtonCell" id="310101904">
1994 <int key="NSCellFlags">67108864</int>
1995 <int key="NSCellFlags2">0</int>
1996 <string key="NSContents">Deny all requests</string>
1997 <reference key="NSSupport" ref="809233629"/>
1998 <reference key="NSControlView" ref="82294173"/>
1999 <int key="NSTag">3</int>
2000 <int key="NSButtonFlags">1211912448</int>
2001 <int key="NSButtonFlags2">0</int>
2002 <reference key="NSAlternateImage" ref="914616927"/>
2003 <int key="NSPeriodicDelay">400</int>
2004 <int key="NSPeriodicInterval">75</int>
2005 </object>
2006 </array>
2007 <string key="NSCellSize">{261, 18}</string>
2008 <string key="NSIntercellSpacing">{4, 2}</string>
2009 <int key="NSMatrixFlags">1151868928</int>
2010 <string key="NSCellClass">NSActionCell</string>
2011 <object class="NSButtonCell" key="NSProtoCell" id="672179877">
2012 <int key="NSCellFlags">67108864</int>
2013 <int key="NSCellFlags2">0</int>
2014 <string key="NSContents">Radio</string>
2015 <reference key="NSSupport" ref="809233629"/>
2016 <int key="NSTag">-1</int>
2017 <int key="NSButtonFlags">1211912448</int>
2018 <int key="NSButtonFlags2">0</int>
2019 <object class="NSImage" key="NSNormalImage">
2020 <int key="NSImageFlags">549453824</int>
2021 <string key="NSSize">{18, 18}</string>
2022 <array class="NSMutableArray" key="NSReps">
2023 <array>
2024 <integer value="0"/>
2025 <object class="NSBitmapImageRep">
2026 <object class="NSData" key="NSTIFFRepresentation">
2027 <bytes key="NS.bytes">TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA
2028AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw
2029IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/
203029vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5
2031dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA
2032AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG
2033AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/
20340tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/
20357e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/
20365eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/
20373t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD
2038AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns
2039AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/
20406+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/
2041/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/
2042///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl
2043YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA
2044AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF
2045AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD
2046AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu
2047AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2048AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB
2049AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES
2050AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS
2051AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
2052 </object>
2053 </object>
2054 </array>
2055 </array>
2056 <reference key="NSColor" ref="785653565"/>
2057 </object>
2058 <reference key="NSAlternateImage" ref="914616927"/>
2059 <int key="NSPeriodicDelay">400</int>
2060 <int key="NSPeriodicInterval">75</int>
2061 </object>
2062 <reference key="NSSelectedCell" ref="708384367"/>
2063 <reference key="NSBackgroundColor" ref="175645791"/>
2064 <reference key="NSCellBackgroundColor" ref="771510757"/>
2065 <reference key="NSFont" ref="809233629"/>
2066 </object>
2067 </array>
2068 <string key="NSFrame">{{1, 1}, {581, 62}}</string>
2069 <reference key="NSSuperview" ref="866741769"/>
2070 <reference key="NSNextKeyView" ref="82294173"/>
2071 <string key="NSReuseIdentifierKey">_NS:632</string>
2072 </object>
2073 </array>
2074 <string key="NSFrame">{{10, 16}, {583, 78}}</string>
2075 <reference key="NSSuperview" ref="929656847"/>
2076 <reference key="NSNextKeyView" ref="132072321"/>
2077 <string key="NSReuseIdentifierKey">_NS:630</string>
2078 <string key="NSOffsets">{0, 0}</string>
2079 <object class="NSTextFieldCell" key="NSTitleCell">
2080 <int key="NSCellFlags">67108864</int>
2081 <int key="NSCellFlags2">0</int>
2082 <string key="NSContents">Write Request Behavior</string>
2083 <reference key="NSSupport" ref="26"/>
2084 <reference key="NSBackgroundColor" ref="449937964"/>
2085 <object class="NSColor" key="NSTextColor">
2086 <int key="NSColorSpace">3</int>
2087 <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
2088 </object>
2089 </object>
2090 <reference key="NSContentView" ref="132072321"/>
2091 <int key="NSBorderType">1</int>
2092 <int key="NSBoxType">0</int>
2093 <int key="NSTitlePosition">2</int>
2094 <bool key="NSTransparent">NO</bool>
2095 </object>
2096 </array>
2097 <string key="NSFrameSize">{603, 348}</string>
2098 <reference key="NSNextKeyView" ref="208819373"/>
2099 <string key="NSReuseIdentifierKey">_NS:2818</string>
2100 </object>
2101 <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
2102 <string key="NSMaxSize">{10000000000000, 10000000000000}</string>
2103 <bool key="NSWindowIsRestorable">YES</bool>
2104 </object>
2105 <object class="NSNumberFormatter" id="668310416">
2106 <dictionary class="NSMutableDictionary" key="NS.attributes">
2107 <boolean value="YES" key="allowsFloats"/>
2108 <integer value="1040" key="formatterBehavior"/>
2109 <object class="NSLocale" key="locale">
2110 <string key="NS.identifier"/>
2111 </object>
2112 <real value="32765" key="maximum"/>
2113 <real value="1" key="minimum"/>
2114 <string key="negativeInfinitySymbol">-∞</string>
2115 <string key="nilSymbol"/>
2116 <integer value="0" key="numberStyle"/>
2117 <string key="positiveInfinitySymbol">+∞</string>
2118 </dictionary>
2119 <string key="NS.positiveformat">#</string>
2120 <string key="NS.negativeformat">#</string>
2121 <nil key="NS.positiveattrs"/>
2122 <nil key="NS.negativeattrs"/>
2123 <nil key="NS.zero"/>
2124 <object class="NSAttributedString" key="NS.nil">
2125 <string key="NSString"/>
2126 </object>
2127 <object class="NSAttributedString" key="NS.nan">
2128 <string key="NSString">NaN</string>
2129 <dictionary key="NSAttributes"/>
2130 </object>
2131 <real value="1" key="NS.min"/>
2132 <real value="32765" key="NS.max"/>
2133 <object class="NSDecimalNumberHandler" key="NS.rounding">
2134 <int key="NS.roundingmode">3</int>
2135 <bool key="NS.raise.overflow">YES</bool>
2136 <bool key="NS.raise.underflow">YES</bool>
2137 <bool key="NS.raise.dividebyzero">YES</bool>
2138 </object>
2139 <string key="NS.decimal">.</string>
2140 <string key="NS.thousand">,</string>
2141 <bool key="NS.hasthousands">NO</bool>
2142 <bool key="NS.localized">NO</bool>
2143 <bool key="NS.allowsfloats">YES</bool>
2144 </object>
2145 <object class="IBCustomFormatter" id="1047776860"/>
2146 <object class="NSCustomObject" id="976324537">
2147 <string key="NSClassName">PumpKIN</string>
2148 </object>
2149 <object class="NSCustomObject" id="755631768">
2150 <string key="NSClassName">NSFontManager</string>
2151 </object>
2152 <object class="NSUserDefaultsController" id="228329665">
2153 <bool key="NSSharedInstance">YES</bool>
2154 </object>
2155 </array>
2156 <object class="IBObjectContainer" key="IBDocument.Objects">
2157 <array class="NSMutableArray" key="connectionRecords">
2158 <object class="IBConnectionRecord">
2159 <object class="IBActionConnection" key="connection">
2160 <string key="label">terminate:</string>
2161 <reference key="source" ref="1050"/>
2162 <reference key="destination" ref="632727374"/>
2163 </object>
2164 <int key="connectionID">449</int>
2165 </object>
2166 <object class="IBConnectionRecord">
2167 <object class="IBActionConnection" key="connection">
2168 <string key="label">orderFrontStandardAboutPanel:</string>
2169 <reference key="source" ref="1021"/>
2170 <reference key="destination" ref="238522557"/>
2171 </object>
2172 <int key="connectionID">142</int>
2173 </object>
2174 <object class="IBConnectionRecord">
2175 <object class="IBOutletConnection" key="connection">
2176 <string key="label">delegate</string>
2177 <reference key="source" ref="1021"/>
2178 <reference key="destination" ref="976324537"/>
2179 </object>
2180 <int key="connectionID">495</int>
2181 </object>
2182 <object class="IBConnectionRecord">
2183 <object class="IBActionConnection" key="connection">
2184 <string key="label">performMiniaturize:</string>
2185 <reference key="source" ref="1014"/>
2186 <reference key="destination" ref="1011231497"/>
2187 </object>
2188 <int key="connectionID">37</int>
2189 </object>
2190 <object class="IBConnectionRecord">
2191 <object class="IBActionConnection" key="connection">
2192 <string key="label">arrangeInFront:</string>
2193 <reference key="source" ref="1014"/>
2194 <reference key="destination" ref="625202149"/>
2195 </object>
2196 <int key="connectionID">39</int>
2197 </object>
2198 <object class="IBConnectionRecord">
2199 <object class="IBActionConnection" key="connection">
2200 <string key="label">toggleContinuousSpellChecking:</string>
2201 <reference key="source" ref="1014"/>
2202 <reference key="destination" ref="948374510"/>
2203 </object>
2204 <int key="connectionID">222</int>
2205 </object>
2206 <object class="IBConnectionRecord">
2207 <object class="IBActionConnection" key="connection">
2208 <string key="label">undo:</string>
2209 <reference key="source" ref="1014"/>
2210 <reference key="destination" ref="1058277027"/>
2211 </object>
2212 <int key="connectionID">223</int>
2213 </object>
2214 <object class="IBConnectionRecord">
2215 <object class="IBActionConnection" key="connection">
2216 <string key="label">copy:</string>
2217 <reference key="source" ref="1014"/>
2218 <reference key="destination" ref="860595796"/>
2219 </object>
2220 <int key="connectionID">224</int>
2221 </object>
2222 <object class="IBConnectionRecord">
2223 <object class="IBActionConnection" key="connection">
2224 <string key="label">checkSpelling:</string>
2225 <reference key="source" ref="1014"/>
2226 <reference key="destination" ref="96193923"/>
2227 </object>
2228 <int key="connectionID">225</int>
2229 </object>
2230 <object class="IBConnectionRecord">
2231 <object class="IBActionConnection" key="connection">
2232 <string key="label">paste:</string>
2233 <reference key="source" ref="1014"/>
2234 <reference key="destination" ref="29853731"/>
2235 </object>
2236 <int key="connectionID">226</int>
2237 </object>
2238 <object class="IBConnectionRecord">
2239 <object class="IBActionConnection" key="connection">
2240 <string key="label">stopSpeaking:</string>
2241 <reference key="source" ref="1014"/>
2242 <reference key="destination" ref="680220178"/>
2243 </object>
2244 <int key="connectionID">227</int>
2245 </object>
2246 <object class="IBConnectionRecord">
2247 <object class="IBActionConnection" key="connection">
2248 <string key="label">cut:</string>
2249 <reference key="source" ref="1014"/>
2250 <reference key="destination" ref="296257095"/>
2251 </object>
2252 <int key="connectionID">228</int>
2253 </object>
2254 <object class="IBConnectionRecord">
2255 <object class="IBActionConnection" key="connection">
2256 <string key="label">showGuessPanel:</string>
2257 <reference key="source" ref="1014"/>
2258 <reference key="destination" ref="679648819"/>
2259 </object>
2260 <int key="connectionID">230</int>
2261 </object>
2262 <object class="IBConnectionRecord">
2263 <object class="IBActionConnection" key="connection">
2264 <string key="label">redo:</string>
2265 <reference key="source" ref="1014"/>
2266 <reference key="destination" ref="790794224"/>
2267 </object>
2268 <int key="connectionID">231</int>
2269 </object>
2270 <object class="IBConnectionRecord">
2271 <object class="IBActionConnection" key="connection">
2272 <string key="label">selectAll:</string>
2273 <reference key="source" ref="1014"/>
2274 <reference key="destination" ref="583158037"/>
2275 </object>
2276 <int key="connectionID">232</int>
2277 </object>
2278 <object class="IBConnectionRecord">
2279 <object class="IBActionConnection" key="connection">
2280 <string key="label">startSpeaking:</string>
2281 <reference key="source" ref="1014"/>
2282 <reference key="destination" ref="731782645"/>
2283 </object>
2284 <int key="connectionID">233</int>
2285 </object>
2286 <object class="IBConnectionRecord">
2287 <object class="IBActionConnection" key="connection">
2288 <string key="label">delete:</string>
2289 <reference key="source" ref="1014"/>
2290 <reference key="destination" ref="437104165"/>
2291 </object>
2292 <int key="connectionID">235</int>
2293 </object>
2294 <object class="IBConnectionRecord">
2295 <object class="IBActionConnection" key="connection">
2296 <string key="label">performZoom:</string>
2297 <reference key="source" ref="1014"/>
2298 <reference key="destination" ref="575023229"/>
2299 </object>
2300 <int key="connectionID">240</int>
2301 </object>
2302 <object class="IBConnectionRecord">
2303 <object class="IBActionConnection" key="connection">
2304 <string key="label">performFindPanelAction:</string>
2305 <reference key="source" ref="1014"/>
2306 <reference key="destination" ref="447796847"/>
2307 </object>
2308 <int key="connectionID">241</int>
2309 </object>
2310 <object class="IBConnectionRecord">
2311 <object class="IBActionConnection" key="connection">
2312 <string key="label">centerSelectionInVisibleArea:</string>
2313 <reference key="source" ref="1014"/>
2314 <reference key="destination" ref="88285865"/>
2315 </object>
2316 <int key="connectionID">245</int>
2317 </object>
2318 <object class="IBConnectionRecord">
2319 <object class="IBActionConnection" key="connection">
2320 <string key="label">toggleGrammarChecking:</string>
2321 <reference key="source" ref="1014"/>
2322 <reference key="destination" ref="967646866"/>
2323 </object>
2324 <int key="connectionID">347</int>
2325 </object>
2326 <object class="IBConnectionRecord">
2327 <object class="IBActionConnection" key="connection">
2328 <string key="label">toggleSmartInsertDelete:</string>
2329 <reference key="source" ref="1014"/>
2330 <reference key="destination" ref="605118523"/>
2331 </object>
2332 <int key="connectionID">355</int>
2333 </object>
2334 <object class="IBConnectionRecord">
2335 <object class="IBActionConnection" key="connection">
2336 <string key="label">toggleAutomaticQuoteSubstitution:</string>
2337 <reference key="source" ref="1014"/>
2338 <reference key="destination" ref="197661976"/>
2339 </object>
2340 <int key="connectionID">356</int>
2341 </object>
2342 <object class="IBConnectionRecord">
2343 <object class="IBActionConnection" key="connection">
2344 <string key="label">toggleAutomaticLinkDetection:</string>
2345 <reference key="source" ref="1014"/>
2346 <reference key="destination" ref="708854459"/>
2347 </object>
2348 <int key="connectionID">357</int>
2349 </object>
2350 <object class="IBConnectionRecord">
2351 <object class="IBActionConnection" key="connection">
2352 <string key="label">runToolbarCustomizationPalette:</string>
2353 <reference key="source" ref="1014"/>
2354 <reference key="destination" ref="237841660"/>
2355 </object>
2356 <int key="connectionID">365</int>
2357 </object>
2358 <object class="IBConnectionRecord">
2359 <object class="IBActionConnection" key="connection">
2360 <string key="label">toggleToolbarShown:</string>
2361 <reference key="source" ref="1014"/>
2362 <reference key="destination" ref="102151532"/>
2363 </object>
2364 <int key="connectionID">366</int>
2365 </object>
2366 <object class="IBConnectionRecord">
2367 <object class="IBActionConnection" key="connection">
2368 <string key="label">hide:</string>
2369 <reference key="source" ref="1014"/>
2370 <reference key="destination" ref="755159360"/>
2371 </object>
2372 <int key="connectionID">367</int>
2373 </object>
2374 <object class="IBConnectionRecord">
2375 <object class="IBActionConnection" key="connection">
2376 <string key="label">hideOtherApplications:</string>
2377 <reference key="source" ref="1014"/>
2378 <reference key="destination" ref="342932134"/>
2379 </object>
2380 <int key="connectionID">368</int>
2381 </object>
2382 <object class="IBConnectionRecord">
2383 <object class="IBActionConnection" key="connection">
2384 <string key="label">unhideAllApplications:</string>
2385 <reference key="source" ref="1014"/>
2386 <reference key="destination" ref="908899353"/>
2387 </object>
2388 <int key="connectionID">370</int>
2389 </object>
2390 <object class="IBConnectionRecord">
2391 <object class="IBActionConnection" key="connection">
2392 <string key="label">toggleAutomaticSpellingCorrection:</string>
2393 <reference key="source" ref="1014"/>
2394 <reference key="destination" ref="795346622"/>
2395 </object>
2396 <int key="connectionID">456</int>
2397 </object>
2398 <object class="IBConnectionRecord">
2399 <object class="IBActionConnection" key="connection">
2400 <string key="label">orderFrontSubstitutionsPanel:</string>
2401 <reference key="source" ref="1014"/>
2402 <reference key="destination" ref="65139061"/>
2403 </object>
2404 <int key="connectionID">458</int>
2405 </object>
2406 <object class="IBConnectionRecord">
2407 <object class="IBActionConnection" key="connection">
2408 <string key="label">toggleAutomaticDashSubstitution:</string>
2409 <reference key="source" ref="1014"/>
2410 <reference key="destination" ref="672708820"/>
2411 </object>
2412 <int key="connectionID">461</int>
2413 </object>
2414 <object class="IBConnectionRecord">
2415 <object class="IBActionConnection" key="connection">
2416 <string key="label">toggleAutomaticTextReplacement:</string>
2417 <reference key="source" ref="1014"/>
2418 <reference key="destination" ref="537092702"/>
2419 </object>
2420 <int key="connectionID">463</int>
2421 </object>
2422 <object class="IBConnectionRecord">
2423 <object class="IBActionConnection" key="connection">
2424 <string key="label">uppercaseWord:</string>
2425 <reference key="source" ref="1014"/>
2426 <reference key="destination" ref="1060694897"/>
2427 </object>
2428 <int key="connectionID">464</int>
2429 </object>
2430 <object class="IBConnectionRecord">
2431 <object class="IBActionConnection" key="connection">
2432 <string key="label">capitalizeWord:</string>
2433 <reference key="source" ref="1014"/>
2434 <reference key="destination" ref="56570060"/>
2435 </object>
2436 <int key="connectionID">467</int>
2437 </object>
2438 <object class="IBConnectionRecord">
2439 <object class="IBActionConnection" key="connection">
2440 <string key="label">lowercaseWord:</string>
2441 <reference key="source" ref="1014"/>
2442 <reference key="destination" ref="879586729"/>
2443 </object>
2444 <int key="connectionID">468</int>
2445 </object>
2446 <object class="IBConnectionRecord">
2447 <object class="IBActionConnection" key="connection">
2448 <string key="label">pasteAsPlainText:</string>
2449 <reference key="source" ref="1014"/>
2450 <reference key="destination" ref="82994268"/>
2451 </object>
2452 <int key="connectionID">486</int>
2453 </object>
2454 <object class="IBConnectionRecord">
2455 <object class="IBActionConnection" key="connection">
2456 <string key="label">performFindPanelAction:</string>
2457 <reference key="source" ref="1014"/>
2458 <reference key="destination" ref="326711663"/>
2459 </object>
2460 <int key="connectionID">487</int>
2461 </object>
2462 <object class="IBConnectionRecord">
2463 <object class="IBActionConnection" key="connection">
2464 <string key="label">performFindPanelAction:</string>
2465 <reference key="source" ref="1014"/>
2466 <reference key="destination" ref="270902937"/>
2467 </object>
2468 <int key="connectionID">488</int>
2469 </object>
2470 <object class="IBConnectionRecord">
2471 <object class="IBActionConnection" key="connection">
2472 <string key="label">performFindPanelAction:</string>
2473 <reference key="source" ref="1014"/>
2474 <reference key="destination" ref="159080638"/>
2475 </object>
2476 <int key="connectionID">489</int>
2477 </object>
2478 <object class="IBConnectionRecord">
2479 <object class="IBActionConnection" key="connection">
2480 <string key="label">showHelp:</string>
2481 <reference key="source" ref="1014"/>
2482 <reference key="destination" ref="105068016"/>
2483 </object>
2484 <int key="connectionID">493</int>
2485 </object>
2486 <object class="IBConnectionRecord">
2487 <object class="IBActionConnection" key="connection">
2488 <string key="label">performFindPanelAction:</string>
2489 <reference key="source" ref="1014"/>
2490 <reference key="destination" ref="738670835"/>
2491 </object>
2492 <int key="connectionID">535</int>
2493 </object>
2494 <object class="IBConnectionRecord">
2495 <object class="IBOutletConnection" key="connection">
2496 <string key="label">window</string>
2497 <reference key="source" ref="976324537"/>
2498 <reference key="destination" ref="972006081"/>
2499 </object>
2500 <int key="connectionID">532</int>
2501 </object>
2502 <object class="IBConnectionRecord">
2503 <object class="IBOutletConnection" key="connection">
2504 <string key="label">logger</string>
2505 <reference key="source" ref="976324537"/>
2506 <reference key="destination" ref="827877557"/>
2507 </object>
2508 <int key="connectionID">572</int>
2509 </object>
2510 <object class="IBConnectionRecord">
2511 <object class="IBOutletConnection" key="connection">
2512 <string key="label">toolbar</string>
2513 <reference key="source" ref="976324537"/>
2514 <reference key="destination" ref="185334702"/>
2515 </object>
2516 <int key="connectionID">1020</int>
2517 </object>
2518 <object class="IBConnectionRecord">
2519 <object class="IBActionConnection" key="connection">
2520 <string key="label">abortXfer:</string>
2521 <reference key="source" ref="976324537"/>
2522 <reference key="destination" ref="964116338"/>
2523 </object>
2524 <int key="connectionID">1142</int>
2525 </object>
2526 <object class="IBConnectionRecord">
2527 <object class="IBActionConnection" key="connection">
2528 <string key="label">abortXfer:</string>
2529 <reference key="source" ref="976324537"/>
2530 <reference key="destination" ref="1051457108"/>
2531 </object>
2532 <int key="connectionID">1143</int>
2533 </object>
2534 <object class="IBConnectionRecord">
2535 <object class="IBActionConnection" key="connection">
2536 <string key="label">getFile:</string>
2537 <reference key="source" ref="976324537"/>
2538 <reference key="destination" ref="210005870"/>
2539 </object>
2540 <int key="connectionID">1144</int>
2541 </object>
2542 <object class="IBConnectionRecord">
2543 <object class="IBActionConnection" key="connection">
2544 <string key="label">putFile:</string>
2545 <reference key="source" ref="976324537"/>
2546 <reference key="destination" ref="163657319"/>
2547 </object>
2548 <int key="connectionID">1145</int>
2549 </object>
2550 <object class="IBConnectionRecord">
2551 <object class="IBActionConnection" key="connection">
2552 <string key="label">putFile:</string>
2553 <reference key="source" ref="976324537"/>
2554 <reference key="destination" ref="684754710"/>
2555 </object>
2556 <int key="connectionID">1146</int>
2557 </object>
2558 <object class="IBConnectionRecord">
2559 <object class="IBOutletConnection" key="connection">
2560 <string key="label">preferencesWindow</string>
2561 <reference key="source" ref="976324537"/>
2562 <reference key="destination" ref="759947593"/>
2563 </object>
2564 <int key="connectionID">1147</int>
2565 </object>
2566 <object class="IBConnectionRecord">
2567 <object class="IBOutletConnection" key="connection">
2568 <string key="label">theDefaults</string>
2569 <reference key="source" ref="976324537"/>
2570 <reference key="destination" ref="228329665"/>
2571 </object>
2572 <int key="connectionID">1148</int>
2573 </object>
2574 <object class="IBConnectionRecord">
2575 <object class="IBActionConnection" key="connection">
2576 <string key="label">showPreferences:</string>
2577 <reference key="source" ref="976324537"/>
2578 <reference key="destination" ref="609285721"/>
2579 </object>
2580 <int key="connectionID">1149</int>
2581 </object>
2582 <object class="IBConnectionRecord">
2583 <object class="IBActionConnection" key="connection">
2584 <string key="label">pickLogFile:</string>
2585 <reference key="source" ref="976324537"/>
2586 <reference key="destination" ref="379050521"/>
2587 </object>
2588 <int key="connectionID">1151</int>
2589 </object>
2590 <object class="IBConnectionRecord">
2591 <object class="IBOutletConnection" key="connection">
2592 <string key="label">xfersView</string>
2593 <reference key="source" ref="976324537"/>
2594 <reference key="destination" ref="45603544"/>
2595 </object>
2596 <int key="connectionID">1152</int>
2597 </object>
2598 <object class="IBConnectionRecord">
2599 <object class="IBActionConnection" key="connection">
2600 <string key="label">getFile:</string>
2601 <reference key="source" ref="976324537"/>
2602 <reference key="destination" ref="869342911"/>
2603 </object>
2604 <int key="connectionID">1154</int>
2605 </object>
2606 <object class="IBConnectionRecord">
2607 <object class="IBActionConnection" key="connection">
2608 <string key="label">pickTFTPFolder:</string>
2609 <reference key="source" ref="976324537"/>
2610 <reference key="destination" ref="108023427"/>
2611 </object>
2612 <int key="connectionID">1162</int>
2613 </object>
2614 <object class="IBConnectionRecord">
2615 <object class="IBOutletConnection" key="connection">
2616 <string key="label">delegate</string>
2617 <reference key="source" ref="45603544"/>
2618 <reference key="destination" ref="976324537"/>
2619 </object>
2620 <int key="connectionID">1019</int>
2621 </object>
2622 <object class="IBConnectionRecord">
2623 <object class="IBBindingConnection" key="connection">
2624 <string key="label">enabled: self.hasSelectedXfer</string>
2625 <reference key="source" ref="1051457108"/>
2626 <reference key="destination" ref="976324537"/>
2627 <object class="NSNibBindingConnector" key="connector">
2628 <reference key="NSSource" ref="1051457108"/>
2629 <reference key="NSDestination" ref="976324537"/>
2630 <string key="NSLabel">enabled: self.hasSelectedXfer</string>
2631 <string key="NSBinding">enabled</string>
2632 <string key="NSKeyPath">self.hasSelectedXfer</string>
2633 <int key="NSNibBindingConnectorVersion">2</int>
2634 </object>
2635 </object>
2636 <int key="connectionID">1023</int>
2637 </object>
2638 <object class="IBConnectionRecord">
2639 <object class="IBBindingConnection" key="connection">
2640 <string key="label">enabled: self.hasSelectedXfer</string>
2641 <reference key="source" ref="964116338"/>
2642 <reference key="destination" ref="976324537"/>
2643 <object class="NSNibBindingConnector" key="connector">
2644 <reference key="NSSource" ref="964116338"/>
2645 <reference key="NSDestination" ref="976324537"/>
2646 <string key="NSLabel">enabled: self.hasSelectedXfer</string>
2647 <string key="NSBinding">enabled</string>
2648 <string key="NSKeyPath">self.hasSelectedXfer</string>
2649 <int key="NSNibBindingConnectorVersion">2</int>
2650 </object>
2651 </object>
2652 <int key="connectionID">1027</int>
2653 </object>
2654 <object class="IBConnectionRecord">
2655 <object class="IBOutletConnection" key="connection">
2656 <string key="label">formatter</string>
2657 <reference key="source" ref="419622798"/>
2658 <reference key="destination" ref="1047776860"/>
2659 </object>
2660 <int key="connectionID">1103</int>
2661 </object>
2662 <object class="IBConnectionRecord">
2663 <object class="IBBindingConnection" key="connection">
2664 <string key="label">value: values.bindAddress</string>
2665 <reference key="source" ref="419622798"/>
2666 <reference key="destination" ref="228329665"/>
2667 <object class="NSNibBindingConnector" key="connector">
2668 <reference key="NSSource" ref="419622798"/>
2669 <reference key="NSDestination" ref="228329665"/>
2670 <string key="NSLabel">value: values.bindAddress</string>
2671 <string key="NSBinding">value</string>
2672 <string key="NSKeyPath">values.bindAddress</string>
2673 <dictionary key="NSOptions">
2674 <boolean value="YES" key="NSValidatesImmediately"/>
2675 <string key="NSValueTransformerName">IPTransformer</string>
2676 </dictionary>
2677 <int key="NSNibBindingConnectorVersion">2</int>
2678 </object>
2679 </object>
2680 <int key="connectionID">1164</int>
2681 </object>
2682 <object class="IBConnectionRecord">
2683 <object class="IBOutletConnection" key="connection">
2684 <string key="label">formatter</string>
2685 <reference key="source" ref="711665850"/>
2686 <reference key="destination" ref="668310416"/>
2687 </object>
2688 <int key="connectionID">1097</int>
2689 </object>
2690 <object class="IBConnectionRecord">
2691 <object class="IBBindingConnection" key="connection">
2692 <string key="label">value: values.bindPort</string>
2693 <reference key="source" ref="711665850"/>
2694 <reference key="destination" ref="228329665"/>
2695 <object class="NSNibBindingConnector" key="connector">
2696 <reference key="NSSource" ref="711665850"/>
2697 <reference key="NSDestination" ref="228329665"/>
2698 <string key="NSLabel">value: values.bindPort</string>
2699 <string key="NSBinding">value</string>
2700 <string key="NSKeyPath">values.bindPort</string>
2701 <object class="NSDictionary" key="NSOptions">
2702 <string key="NS.key.0">NSValueTransformerName</string>
2703 <string key="NS.object.0">NumberTransformer</string>
2704 </object>
2705 <int key="NSNibBindingConnectorVersion">2</int>
2706 </object>
2707 </object>
2708 <int key="connectionID">1153</int>
2709 </object>
2710 <object class="IBConnectionRecord">
2711 <object class="IBBindingConnection" key="connection">
2712 <string key="label">value: values.listen</string>
2713 <reference key="source" ref="230958321"/>
2714 <reference key="destination" ref="228329665"/>
2715 <object class="NSNibBindingConnector" key="connector">
2716 <reference key="NSSource" ref="230958321"/>
2717 <reference key="NSDestination" ref="228329665"/>
2718 <string key="NSLabel">value: values.listen</string>
2719 <string key="NSBinding">value</string>
2720 <string key="NSKeyPath">values.listen</string>
2721 <int key="NSNibBindingConnectorVersion">2</int>
2722 </object>
2723 </object>
2724 <int key="connectionID">1140</int>
2725 </object>
2726 <object class="IBConnectionRecord">
2727 <object class="IBBindingConnection" key="connection">
2728 <string key="label">value: values.listen</string>
2729 <reference key="source" ref="441222556"/>
2730 <reference key="destination" ref="228329665"/>
2731 <object class="NSNibBindingConnector" key="connector">
2732 <reference key="NSSource" ref="441222556"/>
2733 <reference key="NSDestination" ref="228329665"/>
2734 <string key="NSLabel">value: values.listen</string>
2735 <string key="NSBinding">value</string>
2736 <string key="NSKeyPath">values.listen</string>
2737 <int key="NSNibBindingConnectorVersion">2</int>
2738 </object>
2739 </object>
2740 <int key="connectionID">1158</int>
2741 </object>
2742 <object class="IBConnectionRecord">
2743 <object class="IBBindingConnection" key="connection">
2744 <string key="label">value: values.tftpRoot</string>
2745 <reference key="source" ref="328098120"/>
2746 <reference key="destination" ref="228329665"/>
2747 <object class="NSNibBindingConnector" key="connector">
2748 <reference key="NSSource" ref="328098120"/>
2749 <reference key="NSDestination" ref="228329665"/>
2750 <string key="NSLabel">value: values.tftpRoot</string>
2751 <string key="NSBinding">value</string>
2752 <string key="NSKeyPath">values.tftpRoot</string>
2753 <int key="NSNibBindingConnectorVersion">2</int>
2754 </object>
2755 </object>
2756 <int key="connectionID">1134</int>
2757 </object>
2758 <object class="IBConnectionRecord">
2759 <object class="IBBindingConnection" key="connection">
2760 <string key="label">selectedTag: values.rrqBehavior</string>
2761 <reference key="source" ref="973753659"/>
2762 <reference key="destination" ref="228329665"/>
2763 <object class="NSNibBindingConnector" key="connector">
2764 <reference key="NSSource" ref="973753659"/>
2765 <reference key="NSDestination" ref="228329665"/>
2766 <string key="NSLabel">selectedTag: values.rrqBehavior</string>
2767 <string key="NSBinding">selectedTag</string>
2768 <string key="NSKeyPath">values.rrqBehavior</string>
2769 <int key="NSNibBindingConnectorVersion">2</int>
2770 </object>
2771 </object>
2772 <int key="connectionID">1133</int>
2773 </object>
2774 <object class="IBConnectionRecord">
2775 <object class="IBBindingConnection" key="connection">
2776 <string key="label">selectedTag: values.wrqBehavior</string>
2777 <reference key="source" ref="82294173"/>
2778 <reference key="destination" ref="228329665"/>
2779 <object class="NSNibBindingConnector" key="connector">
2780 <reference key="NSSource" ref="82294173"/>
2781 <reference key="NSDestination" ref="228329665"/>
2782 <string key="NSLabel">selectedTag: values.wrqBehavior</string>
2783 <string key="NSBinding">selectedTag</string>
2784 <string key="NSKeyPath">values.wrqBehavior</string>
2785 <int key="NSNibBindingConnectorVersion">2</int>
2786 </object>
2787 </object>
2788 <int key="connectionID">1135</int>
2789 </object>
2790 <object class="IBConnectionRecord">
2791 <object class="IBBindingConnection" key="connection">
2792 <string key="label">value: values.logFile</string>
2793 <reference key="source" ref="823695658"/>
2794 <reference key="destination" ref="228329665"/>
2795 <object class="NSNibBindingConnector" key="connector">
2796 <reference key="NSSource" ref="823695658"/>
2797 <reference key="NSDestination" ref="228329665"/>
2798 <string key="NSLabel">value: values.logFile</string>
2799 <string key="NSBinding">value</string>
2800 <string key="NSKeyPath">values.logFile</string>
2801 <int key="NSNibBindingConnectorVersion">2</int>
2802 </object>
2803 </object>
2804 <int key="connectionID">1136</int>
2805 </object>
2806 </array>
2807 <object class="IBMutableOrderedSet" key="objectRecords">
2808 <array key="orderedObjects">
2809 <object class="IBObjectRecord">
2810 <int key="objectID">0</int>
2811 <reference key="object" ref="0"/>
2812 <reference key="children" ref="1048"/>
2813 <nil key="parent"/>
2814 </object>
2815 <object class="IBObjectRecord">
2816 <int key="objectID">-2</int>
2817 <reference key="object" ref="1021"/>
2818 <reference key="parent" ref="0"/>
2819 <string key="objectName">File's Owner</string>
2820 </object>
2821 <object class="IBObjectRecord">
2822 <int key="objectID">-1</int>
2823 <reference key="object" ref="1014"/>
2824 <reference key="parent" ref="0"/>
2825 <string key="objectName">First Responder</string>
2826 </object>
2827 <object class="IBObjectRecord">
2828 <int key="objectID">-3</int>
2829 <reference key="object" ref="1050"/>
2830 <reference key="parent" ref="0"/>
2831 <string key="objectName">Application</string>
2832 </object>
2833 <object class="IBObjectRecord">
2834 <int key="objectID">29</int>
2835 <reference key="object" ref="649796088"/>
2836 <array class="NSMutableArray" key="children">
2837 <reference ref="713487014"/>
2838 <reference ref="694149608"/>
2839 <reference ref="952259628"/>
2840 <reference ref="379814623"/>
2841 <reference ref="586577488"/>
2842 <reference ref="448692316"/>
2843 </array>
2844 <reference key="parent" ref="0"/>
2845 </object>
2846 <object class="IBObjectRecord">
2847 <int key="objectID">19</int>
2848 <reference key="object" ref="713487014"/>
2849 <array class="NSMutableArray" key="children">
2850 <reference ref="835318025"/>
2851 </array>
2852 <reference key="parent" ref="649796088"/>
2853 </object>
2854 <object class="IBObjectRecord">
2855 <int key="objectID">56</int>
2856 <reference key="object" ref="694149608"/>
2857 <array class="NSMutableArray" key="children">
2858 <reference ref="110575045"/>
2859 </array>
2860 <reference key="parent" ref="649796088"/>
2861 </object>
2862 <object class="IBObjectRecord">
2863 <int key="objectID">217</int>
2864 <reference key="object" ref="952259628"/>
2865 <array class="NSMutableArray" key="children">
2866 <reference ref="789758025"/>
2867 </array>
2868 <reference key="parent" ref="649796088"/>
2869 </object>
2870 <object class="IBObjectRecord">
2871 <int key="objectID">83</int>
2872 <reference key="object" ref="379814623"/>
2873 <array class="NSMutableArray" key="children">
2874 <reference ref="720053764"/>
2875 </array>
2876 <reference key="parent" ref="649796088"/>
2877 </object>
2878 <object class="IBObjectRecord">
2879 <int key="objectID">81</int>
2880 <reference key="object" ref="720053764"/>
2881 <array class="NSMutableArray" key="children">
2882 <reference ref="869342911"/>
2883 <reference ref="684754710"/>
2884 <reference ref="511451131"/>
2885 <reference ref="964116338"/>
2886 </array>
2887 <reference key="parent" ref="379814623"/>
2888 </object>
2889 <object class="IBObjectRecord">
2890 <int key="objectID">205</int>
2891 <reference key="object" ref="789758025"/>
2892 <array class="NSMutableArray" key="children">
2893 <reference ref="437104165"/>
2894 <reference ref="583158037"/>
2895 <reference ref="1058277027"/>
2896 <reference ref="212016141"/>
2897 <reference ref="296257095"/>
2898 <reference ref="29853731"/>
2899 <reference ref="860595796"/>
2900 <reference ref="1040322652"/>
2901 <reference ref="790794224"/>
2902 <reference ref="892235320"/>
2903 <reference ref="972420730"/>
2904 <reference ref="676164635"/>
2905 <reference ref="507821607"/>
2906 <reference ref="288088188"/>
2907 <reference ref="82994268"/>
2908 </array>
2909 <reference key="parent" ref="952259628"/>
2910 </object>
2911 <object class="IBObjectRecord">
2912 <int key="objectID">202</int>
2913 <reference key="object" ref="437104165"/>
2914 <reference key="parent" ref="789758025"/>
2915 </object>
2916 <object class="IBObjectRecord">
2917 <int key="objectID">198</int>
2918 <reference key="object" ref="583158037"/>
2919 <reference key="parent" ref="789758025"/>
2920 </object>
2921 <object class="IBObjectRecord">
2922 <int key="objectID">207</int>
2923 <reference key="object" ref="1058277027"/>
2924 <reference key="parent" ref="789758025"/>
2925 </object>
2926 <object class="IBObjectRecord">
2927 <int key="objectID">214</int>
2928 <reference key="object" ref="212016141"/>
2929 <reference key="parent" ref="789758025"/>
2930 </object>
2931 <object class="IBObjectRecord">
2932 <int key="objectID">199</int>
2933 <reference key="object" ref="296257095"/>
2934 <reference key="parent" ref="789758025"/>
2935 </object>
2936 <object class="IBObjectRecord">
2937 <int key="objectID">203</int>
2938 <reference key="object" ref="29853731"/>
2939 <reference key="parent" ref="789758025"/>
2940 </object>
2941 <object class="IBObjectRecord">
2942 <int key="objectID">197</int>
2943 <reference key="object" ref="860595796"/>
2944 <reference key="parent" ref="789758025"/>
2945 </object>
2946 <object class="IBObjectRecord">
2947 <int key="objectID">206</int>
2948 <reference key="object" ref="1040322652"/>
2949 <reference key="parent" ref="789758025"/>
2950 </object>
2951 <object class="IBObjectRecord">
2952 <int key="objectID">215</int>
2953 <reference key="object" ref="790794224"/>
2954 <reference key="parent" ref="789758025"/>
2955 </object>
2956 <object class="IBObjectRecord">
2957 <int key="objectID">218</int>
2958 <reference key="object" ref="892235320"/>
2959 <array class="NSMutableArray" key="children">
2960 <reference ref="963351320"/>
2961 </array>
2962 <reference key="parent" ref="789758025"/>
2963 </object>
2964 <object class="IBObjectRecord">
2965 <int key="objectID">216</int>
2966 <reference key="object" ref="972420730"/>
2967 <array class="NSMutableArray" key="children">
2968 <reference ref="769623530"/>
2969 </array>
2970 <reference key="parent" ref="789758025"/>
2971 </object>
2972 <object class="IBObjectRecord">
2973 <int key="objectID">200</int>
2974 <reference key="object" ref="769623530"/>
2975 <array class="NSMutableArray" key="children">
2976 <reference ref="948374510"/>
2977 <reference ref="96193923"/>
2978 <reference ref="679648819"/>
2979 <reference ref="967646866"/>
2980 <reference ref="859480356"/>
2981 <reference ref="795346622"/>
2982 </array>
2983 <reference key="parent" ref="972420730"/>
2984 </object>
2985 <object class="IBObjectRecord">
2986 <int key="objectID">219</int>
2987 <reference key="object" ref="948374510"/>
2988 <reference key="parent" ref="769623530"/>
2989 </object>
2990 <object class="IBObjectRecord">
2991 <int key="objectID">201</int>
2992 <reference key="object" ref="96193923"/>
2993 <reference key="parent" ref="769623530"/>
2994 </object>
2995 <object class="IBObjectRecord">
2996 <int key="objectID">204</int>
2997 <reference key="object" ref="679648819"/>
2998 <reference key="parent" ref="769623530"/>
2999 </object>
3000 <object class="IBObjectRecord">
3001 <int key="objectID">220</int>
3002 <reference key="object" ref="963351320"/>
3003 <array class="NSMutableArray" key="children">
3004 <reference ref="270902937"/>
3005 <reference ref="88285865"/>
3006 <reference ref="159080638"/>
3007 <reference ref="326711663"/>
3008 <reference ref="447796847"/>
3009 <reference ref="738670835"/>
3010 </array>
3011 <reference key="parent" ref="892235320"/>
3012 </object>
3013 <object class="IBObjectRecord">
3014 <int key="objectID">213</int>
3015 <reference key="object" ref="270902937"/>
3016 <reference key="parent" ref="963351320"/>
3017 </object>
3018 <object class="IBObjectRecord">
3019 <int key="objectID">210</int>
3020 <reference key="object" ref="88285865"/>
3021 <reference key="parent" ref="963351320"/>
3022 </object>
3023 <object class="IBObjectRecord">
3024 <int key="objectID">221</int>
3025 <reference key="object" ref="159080638"/>
3026 <reference key="parent" ref="963351320"/>
3027 </object>
3028 <object class="IBObjectRecord">
3029 <int key="objectID">208</int>
3030 <reference key="object" ref="326711663"/>
3031 <reference key="parent" ref="963351320"/>
3032 </object>
3033 <object class="IBObjectRecord">
3034 <int key="objectID">209</int>
3035 <reference key="object" ref="447796847"/>
3036 <reference key="parent" ref="963351320"/>
3037 </object>
3038 <object class="IBObjectRecord">
3039 <int key="objectID">57</int>
3040 <reference key="object" ref="110575045"/>
3041 <array class="NSMutableArray" key="children">
3042 <reference ref="238522557"/>
3043 <reference ref="755159360"/>
3044 <reference ref="908899353"/>
3045 <reference ref="632727374"/>
3046 <reference ref="646227648"/>
3047 <reference ref="609285721"/>
3048 <reference ref="481834944"/>
3049 <reference ref="304266470"/>
3050 <reference ref="1046388886"/>
3051 <reference ref="1056857174"/>
3052 <reference ref="342932134"/>
3053 </array>
3054 <reference key="parent" ref="694149608"/>
3055 </object>
3056 <object class="IBObjectRecord">
3057 <int key="objectID">58</int>
3058 <reference key="object" ref="238522557"/>
3059 <reference key="parent" ref="110575045"/>
3060 </object>
3061 <object class="IBObjectRecord">
3062 <int key="objectID">134</int>
3063 <reference key="object" ref="755159360"/>
3064 <reference key="parent" ref="110575045"/>
3065 </object>
3066 <object class="IBObjectRecord">
3067 <int key="objectID">150</int>
3068 <reference key="object" ref="908899353"/>
3069 <reference key="parent" ref="110575045"/>
3070 </object>
3071 <object class="IBObjectRecord">
3072 <int key="objectID">136</int>
3073 <reference key="object" ref="632727374"/>
3074 <reference key="parent" ref="110575045"/>
3075 </object>
3076 <object class="IBObjectRecord">
3077 <int key="objectID">144</int>
3078 <reference key="object" ref="646227648"/>
3079 <reference key="parent" ref="110575045"/>
3080 </object>
3081 <object class="IBObjectRecord">
3082 <int key="objectID">129</int>
3083 <reference key="object" ref="609285721"/>
3084 <reference key="parent" ref="110575045"/>
3085 </object>
3086 <object class="IBObjectRecord">
3087 <int key="objectID">143</int>
3088 <reference key="object" ref="481834944"/>
3089 <reference key="parent" ref="110575045"/>
3090 </object>
3091 <object class="IBObjectRecord">
3092 <int key="objectID">236</int>
3093 <reference key="object" ref="304266470"/>
3094 <reference key="parent" ref="110575045"/>
3095 </object>
3096 <object class="IBObjectRecord">
3097 <int key="objectID">131</int>
3098 <reference key="object" ref="1046388886"/>
3099 <array class="NSMutableArray" key="children">
3100 <reference ref="752062318"/>
3101 </array>
3102 <reference key="parent" ref="110575045"/>
3103 </object>
3104 <object class="IBObjectRecord">
3105 <int key="objectID">149</int>
3106 <reference key="object" ref="1056857174"/>
3107 <reference key="parent" ref="110575045"/>
3108 </object>
3109 <object class="IBObjectRecord">
3110 <int key="objectID">145</int>
3111 <reference key="object" ref="342932134"/>
3112 <reference key="parent" ref="110575045"/>
3113 </object>
3114 <object class="IBObjectRecord">
3115 <int key="objectID">130</int>
3116 <reference key="object" ref="752062318"/>
3117 <reference key="parent" ref="1046388886"/>
3118 </object>
3119 <object class="IBObjectRecord">
3120 <int key="objectID">24</int>
3121 <reference key="object" ref="835318025"/>
3122 <array class="NSMutableArray" key="children">
3123 <reference ref="299356726"/>
3124 <reference ref="625202149"/>
3125 <reference ref="575023229"/>
3126 <reference ref="1011231497"/>
3127 </array>
3128 <reference key="parent" ref="713487014"/>
3129 </object>
3130 <object class="IBObjectRecord">
3131 <int key="objectID">92</int>
3132 <reference key="object" ref="299356726"/>
3133 <reference key="parent" ref="835318025"/>
3134 </object>
3135 <object class="IBObjectRecord">
3136 <int key="objectID">5</int>
3137 <reference key="object" ref="625202149"/>
3138 <reference key="parent" ref="835318025"/>
3139 </object>
3140 <object class="IBObjectRecord">
3141 <int key="objectID">239</int>
3142 <reference key="object" ref="575023229"/>
3143 <reference key="parent" ref="835318025"/>
3144 </object>
3145 <object class="IBObjectRecord">
3146 <int key="objectID">23</int>
3147 <reference key="object" ref="1011231497"/>
3148 <reference key="parent" ref="835318025"/>
3149 </object>
3150 <object class="IBObjectRecord">
3151 <int key="objectID">295</int>
3152 <reference key="object" ref="586577488"/>
3153 <array class="NSMutableArray" key="children">
3154 <reference ref="466310130"/>
3155 </array>
3156 <reference key="parent" ref="649796088"/>
3157 </object>
3158 <object class="IBObjectRecord">
3159 <int key="objectID">296</int>
3160 <reference key="object" ref="466310130"/>
3161 <array class="NSMutableArray" key="children">
3162 <reference ref="102151532"/>
3163 <reference ref="237841660"/>
3164 </array>
3165 <reference key="parent" ref="586577488"/>
3166 </object>
3167 <object class="IBObjectRecord">
3168 <int key="objectID">297</int>
3169 <reference key="object" ref="102151532"/>
3170 <reference key="parent" ref="466310130"/>
3171 </object>
3172 <object class="IBObjectRecord">
3173 <int key="objectID">298</int>
3174 <reference key="object" ref="237841660"/>
3175 <reference key="parent" ref="466310130"/>
3176 </object>
3177 <object class="IBObjectRecord">
3178 <int key="objectID">211</int>
3179 <reference key="object" ref="676164635"/>
3180 <array class="NSMutableArray" key="children">
3181 <reference ref="785027613"/>
3182 </array>
3183 <reference key="parent" ref="789758025"/>
3184 </object>
3185 <object class="IBObjectRecord">
3186 <int key="objectID">212</int>
3187 <reference key="object" ref="785027613"/>
3188 <array class="NSMutableArray" key="children">
3189 <reference ref="680220178"/>
3190 <reference ref="731782645"/>
3191 </array>
3192 <reference key="parent" ref="676164635"/>
3193 </object>
3194 <object class="IBObjectRecord">
3195 <int key="objectID">195</int>
3196 <reference key="object" ref="680220178"/>
3197 <reference key="parent" ref="785027613"/>
3198 </object>
3199 <object class="IBObjectRecord">
3200 <int key="objectID">196</int>
3201 <reference key="object" ref="731782645"/>
3202 <reference key="parent" ref="785027613"/>
3203 </object>
3204 <object class="IBObjectRecord">
3205 <int key="objectID">346</int>
3206 <reference key="object" ref="967646866"/>
3207 <reference key="parent" ref="769623530"/>
3208 </object>
3209 <object class="IBObjectRecord">
3210 <int key="objectID">348</int>
3211 <reference key="object" ref="507821607"/>
3212 <array class="NSMutableArray" key="children">
3213 <reference ref="698887838"/>
3214 </array>
3215 <reference key="parent" ref="789758025"/>
3216 </object>
3217 <object class="IBObjectRecord">
3218 <int key="objectID">349</int>
3219 <reference key="object" ref="698887838"/>
3220 <array class="NSMutableArray" key="children">
3221 <reference ref="605118523"/>
3222 <reference ref="197661976"/>
3223 <reference ref="708854459"/>
3224 <reference ref="65139061"/>
3225 <reference ref="19036812"/>
3226 <reference ref="672708820"/>
3227 <reference ref="537092702"/>
3228 </array>
3229 <reference key="parent" ref="507821607"/>
3230 </object>
3231 <object class="IBObjectRecord">
3232 <int key="objectID">350</int>
3233 <reference key="object" ref="605118523"/>
3234 <reference key="parent" ref="698887838"/>
3235 </object>
3236 <object class="IBObjectRecord">
3237 <int key="objectID">351</int>
3238 <reference key="object" ref="197661976"/>
3239 <reference key="parent" ref="698887838"/>
3240 </object>
3241 <object class="IBObjectRecord">
3242 <int key="objectID">354</int>
3243 <reference key="object" ref="708854459"/>
3244 <reference key="parent" ref="698887838"/>
3245 </object>
3246 <object class="IBObjectRecord">
3247 <int key="objectID">371</int>
3248 <reference key="object" ref="972006081"/>
3249 <array class="NSMutableArray" key="children">
3250 <reference ref="439893737"/>
3251 <reference ref="185334702"/>
3252 </array>
3253 <reference key="parent" ref="0"/>
3254 <string key="objectName">Window - PumpKIN</string>
3255 </object>
3256 <object class="IBObjectRecord">
3257 <int key="objectID">372</int>
3258 <reference key="object" ref="439893737"/>
3259 <array class="NSMutableArray" key="children">
3260 <reference ref="250587056"/>
3261 <reference ref="639837771"/>
3262 </array>
3263 <reference key="parent" ref="972006081"/>
3264 </object>
3265 <object class="IBObjectRecord">
3266 <int key="objectID">420</int>
3267 <reference key="object" ref="755631768"/>
3268 <reference key="parent" ref="0"/>
3269 </object>
3270 <object class="IBObjectRecord">
3271 <int key="objectID">450</int>
3272 <reference key="object" ref="288088188"/>
3273 <array class="NSMutableArray" key="children">
3274 <reference ref="579392910"/>
3275 </array>
3276 <reference key="parent" ref="789758025"/>
3277 </object>
3278 <object class="IBObjectRecord">
3279 <int key="objectID">451</int>
3280 <reference key="object" ref="579392910"/>
3281 <array class="NSMutableArray" key="children">
3282 <reference ref="1060694897"/>
3283 <reference ref="879586729"/>
3284 <reference ref="56570060"/>
3285 </array>
3286 <reference key="parent" ref="288088188"/>
3287 </object>
3288 <object class="IBObjectRecord">
3289 <int key="objectID">452</int>
3290 <reference key="object" ref="1060694897"/>
3291 <reference key="parent" ref="579392910"/>
3292 </object>
3293 <object class="IBObjectRecord">
3294 <int key="objectID">453</int>
3295 <reference key="object" ref="859480356"/>
3296 <reference key="parent" ref="769623530"/>
3297 </object>
3298 <object class="IBObjectRecord">
3299 <int key="objectID">454</int>
3300 <reference key="object" ref="795346622"/>
3301 <reference key="parent" ref="769623530"/>
3302 </object>
3303 <object class="IBObjectRecord">
3304 <int key="objectID">457</int>
3305 <reference key="object" ref="65139061"/>
3306 <reference key="parent" ref="698887838"/>
3307 </object>
3308 <object class="IBObjectRecord">
3309 <int key="objectID">459</int>
3310 <reference key="object" ref="19036812"/>
3311 <reference key="parent" ref="698887838"/>
3312 </object>
3313 <object class="IBObjectRecord">
3314 <int key="objectID">460</int>
3315 <reference key="object" ref="672708820"/>
3316 <reference key="parent" ref="698887838"/>
3317 </object>
3318 <object class="IBObjectRecord">
3319 <int key="objectID">462</int>
3320 <reference key="object" ref="537092702"/>
3321 <reference key="parent" ref="698887838"/>
3322 </object>
3323 <object class="IBObjectRecord">
3324 <int key="objectID">465</int>
3325 <reference key="object" ref="879586729"/>
3326 <reference key="parent" ref="579392910"/>
3327 </object>
3328 <object class="IBObjectRecord">
3329 <int key="objectID">466</int>
3330 <reference key="object" ref="56570060"/>
3331 <reference key="parent" ref="579392910"/>
3332 </object>
3333 <object class="IBObjectRecord">
3334 <int key="objectID">485</int>
3335 <reference key="object" ref="82994268"/>
3336 <reference key="parent" ref="789758025"/>
3337 </object>
3338 <object class="IBObjectRecord">
3339 <int key="objectID">490</int>
3340 <reference key="object" ref="448692316"/>
3341 <array class="NSMutableArray" key="children">
3342 <reference ref="992780483"/>
3343 </array>
3344 <reference key="parent" ref="649796088"/>
3345 </object>
3346 <object class="IBObjectRecord">
3347 <int key="objectID">491</int>
3348 <reference key="object" ref="992780483"/>
3349 <array class="NSMutableArray" key="children">
3350 <reference ref="105068016"/>
3351 </array>
3352 <reference key="parent" ref="448692316"/>
3353 </object>
3354 <object class="IBObjectRecord">
3355 <int key="objectID">492</int>
3356 <reference key="object" ref="105068016"/>
3357 <reference key="parent" ref="992780483"/>
3358 </object>
3359 <object class="IBObjectRecord">
3360 <int key="objectID">494</int>
3361 <reference key="object" ref="976324537"/>
3362 <reference key="parent" ref="0"/>
3363 </object>
3364 <object class="IBObjectRecord">
3365 <int key="objectID">534</int>
3366 <reference key="object" ref="738670835"/>
3367 <reference key="parent" ref="963351320"/>
3368 </object>
3369 <object class="IBObjectRecord">
3370 <int key="objectID">536</int>
3371 <reference key="object" ref="250587056"/>
3372 <array class="NSMutableArray" key="children">
3373 <reference ref="328183451"/>
3374 <reference ref="427087625"/>
3375 </array>
3376 <reference key="parent" ref="439893737"/>
3377 </object>
3378 <object class="IBObjectRecord">
3379 <int key="objectID">537</int>
3380 <reference key="object" ref="328183451"/>
3381 <array class="NSMutableArray" key="children">
3382 <reference ref="192988542"/>
3383 </array>
3384 <reference key="parent" ref="250587056"/>
3385 </object>
3386 <object class="IBObjectRecord">
3387 <int key="objectID">538</int>
3388 <reference key="object" ref="427087625"/>
3389 <array class="NSMutableArray" key="children">
3390 <reference ref="356109671"/>
3391 </array>
3392 <reference key="parent" ref="250587056"/>
3393 </object>
3394 <object class="IBObjectRecord">
3395 <int key="objectID">547</int>
3396 <reference key="object" ref="356109671"/>
3397 <array class="NSMutableArray" key="children">
3398 <reference ref="275648235"/>
3399 <reference ref="4720790"/>
3400 <reference ref="827877557"/>
3401 </array>
3402 <reference key="parent" ref="427087625"/>
3403 </object>
3404 <object class="IBObjectRecord">
3405 <int key="objectID">548</int>
3406 <reference key="object" ref="275648235"/>
3407 <reference key="parent" ref="356109671"/>
3408 </object>
3409 <object class="IBObjectRecord">
3410 <int key="objectID">549</int>
3411 <reference key="object" ref="4720790"/>
3412 <reference key="parent" ref="356109671"/>
3413 </object>
3414 <object class="IBObjectRecord">
3415 <int key="objectID">550</int>
3416 <reference key="object" ref="827877557"/>
3417 <reference key="parent" ref="356109671"/>
3418 </object>
3419 <object class="IBObjectRecord">
3420 <int key="objectID">551</int>
3421 <reference key="object" ref="192988542"/>
3422 <array class="NSMutableArray" key="children">
3423 <reference ref="600095476"/>
3424 <reference ref="1022673745"/>
3425 <reference ref="1046047013"/>
3426 <reference ref="45603544"/>
3427 </array>
3428 <reference key="parent" ref="328183451"/>
3429 </object>
3430 <object class="IBObjectRecord">
3431 <int key="objectID">552</int>
3432 <reference key="object" ref="600095476"/>
3433 <reference key="parent" ref="192988542"/>
3434 </object>
3435 <object class="IBObjectRecord">
3436 <int key="objectID">553</int>
3437 <reference key="object" ref="1022673745"/>
3438 <reference key="parent" ref="192988542"/>
3439 </object>
3440 <object class="IBObjectRecord">
3441 <int key="objectID">554</int>
3442 <reference key="object" ref="1046047013"/>
3443 <reference key="parent" ref="192988542"/>
3444 </object>
3445 <object class="IBObjectRecord">
3446 <int key="objectID">555</int>
3447 <reference key="object" ref="45603544"/>
3448 <array class="NSMutableArray" key="children">
3449 <reference ref="919343863"/>
3450 <reference ref="1044915056"/>
3451 <reference ref="431807415"/>
3452 <reference ref="644944854"/>
3453 <reference ref="780404863"/>
3454 </array>
3455 <reference key="parent" ref="192988542"/>
3456 </object>
3457 <object class="IBObjectRecord">
3458 <int key="objectID">556</int>
3459 <reference key="object" ref="919343863"/>
3460 <array class="NSMutableArray" key="children">
3461 <reference ref="967877425"/>
3462 </array>
3463 <reference key="parent" ref="45603544"/>
3464 </object>
3465 <object class="IBObjectRecord">
3466 <int key="objectID">557</int>
3467 <reference key="object" ref="1044915056"/>
3468 <array class="NSMutableArray" key="children">
3469 <reference ref="1061781149"/>
3470 </array>
3471 <reference key="parent" ref="45603544"/>
3472 </object>
3473 <object class="IBObjectRecord">
3474 <int key="objectID">558</int>
3475 <reference key="object" ref="1061781149"/>
3476 <reference key="parent" ref="1044915056"/>
3477 </object>
3478 <object class="IBObjectRecord">
3479 <int key="objectID">559</int>
3480 <reference key="object" ref="967877425"/>
3481 <reference key="parent" ref="919343863"/>
3482 </object>
3483 <object class="IBObjectRecord">
3484 <int key="objectID">566</int>
3485 <reference key="object" ref="431807415"/>
3486 <array class="NSMutableArray" key="children">
3487 <reference ref="762484653"/>
3488 </array>
3489 <reference key="parent" ref="45603544"/>
3490 </object>
3491 <object class="IBObjectRecord">
3492 <int key="objectID">567</int>
3493 <reference key="object" ref="762484653"/>
3494 <reference key="parent" ref="431807415"/>
3495 </object>
3496 <object class="IBObjectRecord">
3497 <int key="objectID">568</int>
3498 <reference key="object" ref="644944854"/>
3499 <array class="NSMutableArray" key="children">
3500 <reference ref="730146075"/>
3501 </array>
3502 <reference key="parent" ref="45603544"/>
3503 </object>
3504 <object class="IBObjectRecord">
3505 <int key="objectID">569</int>
3506 <reference key="object" ref="730146075"/>
3507 <reference key="parent" ref="644944854"/>
3508 </object>
3509 <object class="IBObjectRecord">
3510 <int key="objectID">570</int>
3511 <reference key="object" ref="780404863"/>
3512 <array class="NSMutableArray" key="children">
3513 <reference ref="475925037"/>
3514 </array>
3515 <reference key="parent" ref="45603544"/>
3516 </object>
3517 <object class="IBObjectRecord">
3518 <int key="objectID">571</int>
3519 <reference key="object" ref="475925037"/>
3520 <reference key="parent" ref="780404863"/>
3521 </object>
3522 <object class="IBObjectRecord">
3523 <int key="objectID">815</int>
3524 <reference key="object" ref="759947593"/>
3525 <array class="NSMutableArray" key="children">
3526 <reference ref="929656847"/>
3527 </array>
3528 <reference key="parent" ref="0"/>
3529 <string key="objectName">Window - PumpKIN preferences</string>
3530 </object>
3531 <object class="IBObjectRecord">
3532 <int key="objectID">816</int>
3533 <reference key="object" ref="929656847"/>
3534 <array class="NSMutableArray" key="children">
3535 <reference ref="197043543"/>
3536 <reference ref="233651545"/>
3537 <reference ref="208819373"/>
3538 <reference ref="866741769"/>
3539 </array>
3540 <reference key="parent" ref="759947593"/>
3541 </object>
3542 <object class="IBObjectRecord">
3543 <int key="objectID">915</int>
3544 <reference key="object" ref="228329665"/>
3545 <reference key="parent" ref="0"/>
3546 </object>
3547 <object class="IBObjectRecord">
3548 <int key="objectID">994</int>
3549 <reference key="object" ref="185334702"/>
3550 <array class="NSMutableArray" key="children">
3551 <reference ref="166245072"/>
3552 <reference ref="106903695"/>
3553 <reference ref="210005870"/>
3554 <reference ref="163657319"/>
3555 <reference ref="1051457108"/>
3556 </array>
3557 <reference key="parent" ref="972006081"/>
3558 </object>
3559 <object class="IBObjectRecord">
3560 <int key="objectID">998</int>
3561 <reference key="object" ref="166245072"/>
3562 <reference key="parent" ref="185334702"/>
3563 </object>
3564 <object class="IBObjectRecord">
3565 <int key="objectID">999</int>
3566 <reference key="object" ref="106903695"/>
3567 <reference key="parent" ref="185334702"/>
3568 </object>
3569 <object class="IBObjectRecord">
3570 <int key="objectID">1000</int>
3571 <reference key="object" ref="210005870"/>
3572 <reference key="parent" ref="185334702"/>
3573 <string key="objectName">Toolbar Item - Get file</string>
3574 </object>
3575 <object class="IBObjectRecord">
3576 <int key="objectID">1001</int>
3577 <reference key="object" ref="163657319"/>
3578 <reference key="parent" ref="185334702"/>
3579 <string key="objectName">Toolbar Item - Put file</string>
3580 </object>
3581 <object class="IBObjectRecord">
3582 <int key="objectID">1002</int>
3583 <reference key="object" ref="1051457108"/>
3584 <reference key="parent" ref="185334702"/>
3585 <string key="objectName">Toolbar Item - Abort xfer</string>
3586 </object>
3587 <object class="IBObjectRecord">
3588 <int key="objectID">1003</int>
3589 <reference key="object" ref="869342911"/>
3590 <reference key="parent" ref="720053764"/>
3591 <string key="objectName">Menu Item - Get file</string>
3592 </object>
3593 <object class="IBObjectRecord">
3594 <int key="objectID">1004</int>
3595 <reference key="object" ref="684754710"/>
3596 <reference key="parent" ref="720053764"/>
3597 <string key="objectName">Menu Item - Put file</string>
3598 </object>
3599 <object class="IBObjectRecord">
3600 <int key="objectID">1006</int>
3601 <reference key="object" ref="511451131"/>
3602 <reference key="parent" ref="720053764"/>
3603 </object>
3604 <object class="IBObjectRecord">
3605 <int key="objectID">1007</int>
3606 <reference key="object" ref="964116338"/>
3607 <reference key="parent" ref="720053764"/>
3608 <string key="objectName">Menu Item - Abort xfer</string>
3609 </object>
3610 <object class="IBObjectRecord">
3611 <int key="objectID">1096</int>
3612 <reference key="object" ref="668310416"/>
3613 <reference key="parent" ref="0"/>
3614 <string key="objectName">Port formatter</string>
3615 </object>
3616 <object class="IBObjectRecord">
3617 <int key="objectID">1102</int>
3618 <reference key="object" ref="1047776860"/>
3619 <reference key="parent" ref="0"/>
3620 <string key="objectName">IP formatter</string>
3621 </object>
3622 <object class="IBObjectRecord">
3623 <int key="objectID">1108</int>
3624 <reference key="object" ref="208819373"/>
3625 <array class="NSMutableArray" key="children">
3626 <reference ref="328098120"/>
3627 <reference ref="240606174"/>
3628 </array>
3629 <reference key="parent" ref="929656847"/>
3630 <string key="objectName">Box - TFTP filesystem root (download path)</string>
3631 </object>
3632 <object class="IBObjectRecord">
3633 <int key="objectID">1115</int>
3634 <reference key="object" ref="240606174"/>
3635 <array class="NSMutableArray" key="children">
3636 <reference ref="108023427"/>
3637 </array>
3638 <reference key="parent" ref="208819373"/>
3639 </object>
3640 <object class="IBObjectRecord">
3641 <int key="objectID">1114</int>
3642 <reference key="object" ref="328098120"/>
3643 <array class="NSMutableArray" key="children">
3644 <reference ref="151062802"/>
3645 </array>
3646 <reference key="parent" ref="208819373"/>
3647 </object>
3648 <object class="IBObjectRecord">
3649 <int key="objectID">1117</int>
3650 <reference key="object" ref="151062802"/>
3651 <reference key="parent" ref="328098120"/>
3652 </object>
3653 <object class="IBObjectRecord">
3654 <int key="objectID">1116</int>
3655 <reference key="object" ref="108023427"/>
3656 <reference key="parent" ref="240606174"/>
3657 </object>
3658 <object class="IBObjectRecord">
3659 <int key="objectID">1106</int>
3660 <reference key="object" ref="866741769"/>
3661 <array class="NSMutableArray" key="children">
3662 <reference ref="82294173"/>
3663 </array>
3664 <reference key="parent" ref="929656847"/>
3665 </object>
3666 <object class="IBObjectRecord">
3667 <int key="objectID">1123</int>
3668 <reference key="object" ref="82294173"/>
3669 <array class="NSMutableArray" key="children">
3670 <reference ref="672179877"/>
3671 <reference ref="708384367"/>
3672 <reference ref="527645225"/>
3673 <reference ref="158682464"/>
3674 <reference ref="310101904"/>
3675 </array>
3676 <reference key="parent" ref="866741769"/>
3677 </object>
3678 <object class="IBObjectRecord">
3679 <int key="objectID">1128</int>
3680 <reference key="object" ref="672179877"/>
3681 <reference key="parent" ref="82294173"/>
3682 </object>
3683 <object class="IBObjectRecord">
3684 <int key="objectID">1127</int>
3685 <reference key="object" ref="708384367"/>
3686 <reference key="parent" ref="82294173"/>
3687 <string key="objectName">Button Cell - take all</string>
3688 </object>
3689 <object class="IBObjectRecord">
3690 <int key="objectID">1126</int>
3691 <reference key="object" ref="527645225"/>
3692 <reference key="parent" ref="82294173"/>
3693 <string key="objectName">Button Cell - prompt</string>
3694 </object>
3695 <object class="IBObjectRecord">
3696 <int key="objectID">1125</int>
3697 <reference key="object" ref="158682464"/>
3698 <reference key="parent" ref="82294173"/>
3699 <string key="objectName">Button Cell - prompt if exists</string>
3700 </object>
3701 <object class="IBObjectRecord">
3702 <int key="objectID">1124</int>
3703 <reference key="object" ref="310101904"/>
3704 <reference key="parent" ref="82294173"/>
3705 <string key="objectName">Button Cell - deny all</string>
3706 </object>
3707 <object class="IBObjectRecord">
3708 <int key="objectID">1105</int>
3709 <reference key="object" ref="233651545"/>
3710 <array class="NSMutableArray" key="children">
3711 <reference ref="823695658"/>
3712 <reference ref="379050521"/>
3713 </array>
3714 <reference key="parent" ref="929656847"/>
3715 <string key="objectName">Box - Log file (leave empty to disable logging to file)</string>
3716 </object>
3717 <object class="IBObjectRecord">
3718 <int key="objectID">1130</int>
3719 <reference key="object" ref="823695658"/>
3720 <array class="NSMutableArray" key="children">
3721 <reference ref="424316336"/>
3722 </array>
3723 <reference key="parent" ref="233651545"/>
3724 </object>
3725 <object class="IBObjectRecord">
3726 <int key="objectID">1129</int>
3727 <reference key="object" ref="379050521"/>
3728 <array class="NSMutableArray" key="children">
3729 <reference ref="621926228"/>
3730 </array>
3731 <reference key="parent" ref="233651545"/>
3732 </object>
3733 <object class="IBObjectRecord">
3734 <int key="objectID">1132</int>
3735 <reference key="object" ref="621926228"/>
3736 <reference key="parent" ref="379050521"/>
3737 </object>
3738 <object class="IBObjectRecord">
3739 <int key="objectID">1131</int>
3740 <reference key="object" ref="424316336"/>
3741 <reference key="parent" ref="823695658"/>
3742 </object>
3743 <object class="IBObjectRecord">
3744 <int key="objectID">1107</int>
3745 <reference key="object" ref="197043543"/>
3746 <array class="NSMutableArray" key="children">
3747 <reference ref="973753659"/>
3748 </array>
3749 <reference key="parent" ref="929656847"/>
3750 </object>
3751 <object class="IBObjectRecord">
3752 <int key="objectID">1118</int>
3753 <reference key="object" ref="973753659"/>
3754 <array class="NSMutableArray" key="children">
3755 <reference ref="518920277"/>
3756 <reference ref="529759421"/>
3757 <reference ref="859183946"/>
3758 <reference ref="862531403"/>
3759 </array>
3760 <reference key="parent" ref="197043543"/>
3761 </object>
3762 <object class="IBObjectRecord">
3763 <int key="objectID">1119</int>
3764 <reference key="object" ref="862531403"/>
3765 <reference key="parent" ref="973753659"/>
3766 <string key="objectName">Button Cell - deny all</string>
3767 </object>
3768 <object class="IBObjectRecord">
3769 <int key="objectID">1120</int>
3770 <reference key="object" ref="859183946"/>
3771 <reference key="parent" ref="973753659"/>
3772 <string key="objectName">Button Cell - prompt</string>
3773 </object>
3774 <object class="IBObjectRecord">
3775 <int key="objectID">1121</int>
3776 <reference key="object" ref="529759421"/>
3777 <reference key="parent" ref="973753659"/>
3778 <string key="objectName">Button Cell - give all</string>
3779 </object>
3780 <object class="IBObjectRecord">
3781 <int key="objectID">1122</int>
3782 <reference key="object" ref="518920277"/>
3783 <reference key="parent" ref="973753659"/>
3784 </object>
3785 <object class="IBObjectRecord">
3786 <int key="objectID">1161</int>
3787 <reference key="object" ref="639837771"/>
3788 <array class="NSMutableArray" key="children">
3789 <reference ref="711665850"/>
3790 <reference ref="7620662"/>
3791 <reference ref="419622798"/>
3792 <reference ref="230958321"/>
3793 </array>
3794 <reference key="parent" ref="439893737"/>
3795 </object>
3796 <object class="IBObjectRecord">
3797 <int key="objectID">1090</int>
3798 <reference key="object" ref="230958321"/>
3799 <array class="NSMutableArray" key="children">
3800 <reference ref="441222556"/>
3801 </array>
3802 <reference key="parent" ref="639837771"/>
3803 <string key="objectName">Check Box - listen</string>
3804 </object>
3805 <object class="IBObjectRecord">
3806 <int key="objectID">1091</int>
3807 <reference key="object" ref="441222556"/>
3808 <reference key="parent" ref="230958321"/>
3809 </object>
3810 <object class="IBObjectRecord">
3811 <int key="objectID">1082</int>
3812 <reference key="object" ref="419622798"/>
3813 <array class="NSMutableArray" key="children">
3814 <reference ref="226701554"/>
3815 </array>
3816 <reference key="parent" ref="639837771"/>
3817 <string key="objectName">Text Field - bind address</string>
3818 </object>
3819 <object class="IBObjectRecord">
3820 <int key="objectID">1083</int>
3821 <reference key="object" ref="226701554"/>
3822 <reference key="parent" ref="419622798"/>
3823 </object>
3824 <object class="IBObjectRecord">
3825 <int key="objectID">1086</int>
3826 <reference key="object" ref="7620662"/>
3827 <array class="NSMutableArray" key="children">
3828 <reference ref="31855702"/>
3829 </array>
3830 <reference key="parent" ref="639837771"/>
3831 </object>
3832 <object class="IBObjectRecord">
3833 <int key="objectID">1087</int>
3834 <reference key="object" ref="31855702"/>
3835 <reference key="parent" ref="7620662"/>
3836 </object>
3837 <object class="IBObjectRecord">
3838 <int key="objectID">1084</int>
3839 <reference key="object" ref="711665850"/>
3840 <array class="NSMutableArray" key="children">
3841 <reference ref="771004923"/>
3842 </array>
3843 <reference key="parent" ref="639837771"/>
3844 <string key="objectName">Text Field - bind port</string>
3845 </object>
3846 <object class="IBObjectRecord">
3847 <int key="objectID">1085</int>
3848 <reference key="object" ref="771004923"/>
3849 <reference key="parent" ref="711665850"/>
3850 </object>
3851 </array>
3852 </object>
3853 <dictionary class="NSMutableDictionary" key="flattenedProperties">
3854 <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3855 <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3856 <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3857 <string key="1000.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3858 <string key="1001.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3859 <string key="1002.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3860 <string key="1002.designableToolbarItemIdentifier">abort_xfer</string>
3861 <string key="1003.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3862 <string key="1004.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3863 <string key="1006.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3864 <string key="1007.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3865 <object class="NSMutableDictionary" key="1082.IBAttributePlaceholdersKey">
3866 <string key="NS.key.0">ToolTip</string>
3867 <object class="IBToolTipAttribute" key="NS.object.0">
3868 <string key="name">ToolTip</string>
3869 <reference key="object" ref="419622798"/>
3870 <string key="toolTip">If you only want PumpKIN to listen to TFTP request on one IP address, specify it here.</string>
3871 </object>
3872 </object>
3873 <string key="1082.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3874 <string key="1083.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3875 <object class="NSMutableDictionary" key="1084.IBAttributePlaceholdersKey">
3876 <string key="NS.key.0">ToolTip</string>
3877 <object class="IBToolTipAttribute" key="NS.object.0">
3878 <string key="name">ToolTip</string>
3879 <reference key="object" ref="711665850"/>
3880 <string key="toolTip">The standard TFTP port is 69. If you change it, make sure peers are aware of the change and support it.</string>
3881 </object>
3882 </object>
3883 <string key="1084.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3884 <string key="1085.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3885 <string key="1086.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3886 <string key="1087.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3887 <object class="NSMutableDictionary" key="1090.IBAttributePlaceholdersKey">
3888 <string key="NS.key.0">ToolTip</string>
3889 <object class="IBToolTipAttribute" key="NS.object.0">
3890 <string key="name">ToolTip</string>
3891 <reference key="object" ref="230958321"/>
3892 <string key="toolTip">When enabled, pumpkin also acts as a daemon (server). Note, that this often requires escalating privileges to bind to the privileged (69 by default) port and may also conflict if you have another tftp daemon running (you'll be notified).</string>
3893 </object>
3894 </object>
3895 <string key="1090.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3896 <string key="1091.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3897 <integer value="1041" key="1096.IBNumberFormatterBehaviorMetadataKey"/>
3898 <boolean value="YES" key="1096.IBNumberFormatterLocalizesFormatMetadataKey"/>
3899 <string key="1096.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3900 <string key="1102.CustomClassName">IPFormatter</string>
3901 <string key="1102.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3902 <string key="1105.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3903 <string key="1106.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3904 <string key="1107.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3905 <string key="1108.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3906 <object class="NSMutableDictionary" key="1114.IBAttributePlaceholdersKey">
3907 <string key="NS.key.0">ToolTip</string>
3908 <object class="IBToolTipAttribute" key="NS.object.0">
3909 <string key="name">ToolTip</string>
3910 <reference key="object" ref="328098120"/>
3911 <string key="toolTip">TFTP root is a directory where incoming WRQ transfers are saved and RRQ transfers are served from. Point it to where the file you want to transfer are.</string>
3912 </object>
3913 </object>
3914 <string key="1114.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3915 <object class="NSMutableDictionary" key="1115.IBAttributePlaceholdersKey">
3916 <string key="NS.key.0">ToolTip</string>
3917 <object class="IBToolTipAttribute" key="NS.object.0">
3918 <string key="name">ToolTip</string>
3919 <reference key="object" ref="240606174"/>
3920 <string key="toolTip">Browse for the TFTP root directory.</string>
3921 </object>
3922 </object>
3923 <string key="1115.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3924 <string key="1116.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3925 <string key="1117.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3926 <string key="1118.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3927 <object class="NSMutableDictionary" key="1119.IBAttributePlaceholdersKey">
3928 <string key="NS.key.0">ToolTip</string>
3929 <object class="IBToolTipAttribute" key="NS.object.0">
3930 <string key="name">ToolTip</string>
3931 <reference key="object" ref="862531403"/>
3932 <string key="toolTip">No incoming RRQ will be served. Acess will be invariably denied.</string>
3933 </object>
3934 </object>
3935 <string key="1119.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3936 <object class="NSMutableDictionary" key="1120.IBAttributePlaceholdersKey">
3937 <string key="NS.key.0">ToolTip</string>
3938 <object class="IBToolTipAttribute" key="NS.object.0">
3939 <string key="name">ToolTip</string>
3940 <reference key="object" ref="859183946"/>
3941 <string key="toolTip">PumpKIN will prompt the user (probably, you) whenever RRQ request comes in.</string>
3942 </object>
3943 </object>
3944 <string key="1120.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3945 <object class="NSMutableDictionary" key="1121.IBAttributePlaceholdersKey">
3946 <string key="NS.key.0">ToolTip</string>
3947 <object class="IBToolTipAttribute" key="NS.object.0">
3948 <string key="name">ToolTip</string>
3949 <reference key="object" ref="529759421"/>
3950 <string key="toolTip">Server will automatically approve all incoming RRQ transfers (as long as they stay in TFTP root, of course).</string>
3951 </object>
3952 </object>
3953 <string key="1121.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3954 <string key="1122.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3955 <string key="1123.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3956 <object class="NSMutableDictionary" key="1124.IBAttributePlaceholdersKey">
3957 <string key="NS.key.0">ToolTip</string>
3958 <object class="IBToolTipAttribute" key="NS.object.0">
3959 <string key="name">ToolTip</string>
3960 <reference key="object" ref="310101904"/>
3961 <string key="toolTip">No incoming WRQ transfer will be accepted. Acess will be invariably denied.</string>
3962 </object>
3963 </object>
3964 <string key="1124.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3965 <object class="NSMutableDictionary" key="1125.IBAttributePlaceholdersKey">
3966 <string key="NS.key.0">ToolTip</string>
3967 <object class="IBToolTipAttribute" key="NS.object.0">
3968 <string key="name">ToolTip</string>
3969 <reference key="object" ref="158682464"/>
3970 <string key="toolTip">Incoming WRQ transfers for non-existing files are pre-approved, whereas an attempt to transfer already existing file results in prompting the user.</string>
3971 </object>
3972 </object>
3973 <string key="1125.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3974 <object class="NSMutableDictionary" key="1126.IBAttributePlaceholdersKey">
3975 <string key="NS.key.0">ToolTip</string>
3976 <object class="IBToolTipAttribute" key="NS.object.0">
3977 <string key="name">ToolTip</string>
3978 <reference key="object" ref="527645225"/>
3979 <string key="toolTip">All incoming WRQ transfers should be accepted by the user.</string>
3980 </object>
3981 </object>
3982 <string key="1126.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3983 <object class="NSMutableDictionary" key="1127.IBAttributePlaceholdersKey">
3984 <string key="NS.key.0">ToolTip</string>
3985 <object class="IBToolTipAttribute" key="NS.object.0">
3986 <string key="name">ToolTip</string>
3987 <reference key="object" ref="708384367"/>
3988 <string key="toolTip">All incoming WRQ transfers will be accepted. Note, that if file by the same name already exists, it will be renamed.</string>
3989 </object>
3990 </object>
3991 <string key="1127.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3992 <string key="1128.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
3993 <object class="NSMutableDictionary" key="1129.IBAttributePlaceholdersKey">
3994 <string key="NS.key.0">ToolTip</string>
3995 <object class="IBToolTipAttribute" key="NS.object.0">
3996 <string key="name">ToolTip</string>
3997 <reference key="object" ref="379050521"/>
3998 <string key="toolTip">Browse for the TFTP log file.</string>
3999 </object>
4000 </object>
4001 <string key="1129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4002 <object class="NSMutableDictionary" key="1130.IBAttributePlaceholdersKey">
4003 <string key="NS.key.0">ToolTip</string>
4004 <object class="IBToolTipAttribute" key="NS.object.0">
4005 <string key="name">ToolTip</string>
4006 <reference key="object" ref="823695658"/>
4007 <string key="toolTip">PumpKIN can optionally log the activity shown on screen into this file.</string>
4008 </object>
4009 </object>
4010 <string key="1130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4011 <string key="1131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4012 <string key="1132.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4013 <string key="1161.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4014 <string key="129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4015 <string key="130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4016 <string key="131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4017 <string key="134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4018 <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4019 <string key="143.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4020 <string key="144.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4021 <string key="145.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4022 <string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4023 <string key="150.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4024 <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4025 <string key="195.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4026 <string key="196.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4027 <string key="197.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4028 <string key="198.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4029 <string key="199.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4030 <string key="200.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4031 <string key="201.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4032 <string key="202.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4033 <string key="203.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4034 <string key="204.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4035 <string key="205.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4036 <string key="206.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4037 <string key="207.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4038 <string key="208.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4039 <string key="209.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4040 <string key="210.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4041 <string key="211.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4042 <string key="212.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4043 <string key="213.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4044 <string key="214.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4045 <string key="215.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4046 <string key="216.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4047 <string key="217.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4048 <string key="218.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4049 <string key="219.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4050 <string key="220.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4051 <string key="221.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4052 <string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4053 <string key="236.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4054 <string key="239.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4055 <string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4056 <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4057 <string key="295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4058 <string key="296.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4059 <string key="297.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4060 <string key="298.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4061 <string key="346.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4062 <string key="348.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4063 <string key="349.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4064 <string key="350.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4065 <string key="351.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4066 <string key="354.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4067 <string key="371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4068 <string key="371.IBWindowTemplateEditedContentRect">{{380, 496}, {480, 360}}</string>
4069 <integer value="1" key="371.NSWindowTemplate.visibleAtLaunch"/>
4070 <string key="372.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4071 <string key="420.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4072 <string key="450.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4073 <string key="451.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4074 <string key="452.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4075 <string key="453.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4076 <string key="454.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4077 <string key="457.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4078 <string key="459.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4079 <string key="460.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4080 <string key="462.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4081 <string key="465.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4082 <string key="466.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4083 <string key="485.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4084 <string key="490.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4085 <string key="491.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4086 <string key="492.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4087 <string key="494.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4088 <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4089 <string key="534.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4090 <string key="536.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4091 <string key="537.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4092 <string key="538.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4093 <object class="NSMutableDictionary" key="547.IBAttributePlaceholdersKey">
4094 <string key="NS.key.0">ToolTip</string>
4095 <object class="IBToolTipAttribute" key="NS.object.0">
4096 <string key="name">ToolTip</string>
4097 <reference key="object" ref="356109671"/>
4098 <string key="toolTip">Activity log.</string>
4099 </object>
4100 </object>
4101 <string key="547.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4102 <string key="548.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4103 <string key="549.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4104 <dictionary class="NSMutableDictionary" key="550.IBAttributePlaceholdersKey"/>
4105 <string key="550.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4106 <string key="550.userInterfaceItemIdentifier">logger</string>
4107 <string key="551.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4108 <string key="552.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4109 <string key="553.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4110 <string key="554.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4111 <string key="555.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4112 <string key="556.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4113 <string key="557.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4114 <string key="558.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4115 <string key="559.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4116 <string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4117 <string key="566.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4118 <string key="567.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4119 <string key="568.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4120 <string key="569.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4121 <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4122 <string key="570.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4123 <string key="571.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4124 <string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4125 <string key="81.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4126 <string key="815.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4127 <boolean value="NO" key="815.NSWindowTemplate.visibleAtLaunch"/>
4128 <string key="816.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4129 <string key="83.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4130 <string key="915.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4131 <string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4132 <string key="994.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4133 <string key="998.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4134 <string key="999.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
4135 </dictionary>
4136 <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
4137 <nil key="activeLocalization"/>
4138 <dictionary class="NSMutableDictionary" key="localizations"/>
4139 <nil key="sourceID"/>
4140 <int key="maxID">1164</int>
4141 </object>
4142 <object class="IBClassDescriber" key="IBDocument.Classes">
4143 <array class="NSMutableArray" key="referencedPartialClassDescriptions">
4144 <object class="IBPartialClassDescription">
4145 <string key="className">IPFormatter</string>
4146 <string key="superclassName">NSFormatter</string>
4147 <object class="IBClassDescriptionSource" key="sourceIdentifier">
4148 <string key="majorKey">IBProjectSource</string>
4149 <string key="minorKey">./Classes/IPFormatter.h</string>
4150 </object>
4151 </object>
4152 <object class="IBPartialClassDescription">
4153 <string key="className">PumpKIN</string>
4154 <string key="superclassName">NSObject</string>
4155 <dictionary class="NSMutableDictionary" key="actions">
4156 <string key="abortXfer:">id</string>
4157 <string key="getFile:">id</string>
4158 <string key="pickLogFile:">id</string>
4159 <string key="pickTFTPFolder:">id</string>
4160 <string key="putFile:">id</string>
4161 <string key="showPreferences:">id</string>
4162 </dictionary>
4163 <dictionary class="NSMutableDictionary" key="actionInfosByName">
4164 <object class="IBActionInfo" key="abortXfer:">
4165 <string key="name">abortXfer:</string>
4166 <string key="candidateClassName">id</string>
4167 </object>
4168 <object class="IBActionInfo" key="getFile:">
4169 <string key="name">getFile:</string>
4170 <string key="candidateClassName">id</string>
4171 </object>
4172 <object class="IBActionInfo" key="pickLogFile:">
4173 <string key="name">pickLogFile:</string>
4174 <string key="candidateClassName">id</string>
4175 </object>
4176 <object class="IBActionInfo" key="pickTFTPFolder:">
4177 <string key="name">pickTFTPFolder:</string>
4178 <string key="candidateClassName">id</string>
4179 </object>
4180 <object class="IBActionInfo" key="putFile:">
4181 <string key="name">putFile:</string>
4182 <string key="candidateClassName">id</string>
4183 </object>
4184 <object class="IBActionInfo" key="showPreferences:">
4185 <string key="name">showPreferences:</string>
4186 <string key="candidateClassName">id</string>
4187 </object>
4188 </dictionary>
4189 <dictionary class="NSMutableDictionary" key="outlets">
4190 <string key="logger">NSTextView</string>
4191 <string key="preferencesWindow">NSWindow</string>
4192 <string key="theDefaults">NSUserDefaultsController</string>
4193 <string key="toolbar">NSToolbar</string>
4194 <string key="window">NSWindow</string>
4195 <string key="xfersView">NSTableView</string>
4196 </dictionary>
4197 <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
4198 <object class="IBToOneOutletInfo" key="logger">
4199 <string key="name">logger</string>
4200 <string key="candidateClassName">NSTextView</string>
4201 </object>
4202 <object class="IBToOneOutletInfo" key="preferencesWindow">
4203 <string key="name">preferencesWindow</string>
4204 <string key="candidateClassName">NSWindow</string>
4205 </object>
4206 <object class="IBToOneOutletInfo" key="theDefaults">
4207 <string key="name">theDefaults</string>
4208 <string key="candidateClassName">NSUserDefaultsController</string>
4209 </object>
4210 <object class="IBToOneOutletInfo" key="toolbar">
4211 <string key="name">toolbar</string>
4212 <string key="candidateClassName">NSToolbar</string>
4213 </object>
4214 <object class="IBToOneOutletInfo" key="window">
4215 <string key="name">window</string>
4216 <string key="candidateClassName">NSWindow</string>
4217 </object>
4218 <object class="IBToOneOutletInfo" key="xfersView">
4219 <string key="name">xfersView</string>
4220 <string key="candidateClassName">NSTableView</string>
4221 </object>
4222 </dictionary>
4223 <object class="IBClassDescriptionSource" key="sourceIdentifier">
4224 <string key="majorKey">IBProjectSource</string>
4225 <string key="minorKey">./Classes/PumpKIN.h</string>
4226 </object>
4227 </object>
4228 </array>
4229 </object>
4230 <int key="IBDocument.localizationMode">0</int>
4231 <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
4232 <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
4233 <int key="IBDocument.defaultPropertyAccessControl">3</int>
4234 <dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
4235 <string key="NSMenuCheckmark">{11, 11}</string>
4236 <string key="NSMenuMixedState">{10, 3}</string>
4237 <string key="NSPathTemplate">{13, 10}</string>
4238 <string key="NSSwitch">{15, 15}</string>
4239 <string key="abort">{32, 32}</string>
4240 <string key="get">{32, 32}</string>
4241 <string key="put">{32, 32}</string>
4242 </dictionary>
4243 </data>
4244 <classes>
4245 <class name="IBCustomFormatter">
4246 <fallbacks>
4247 <name>NSFormatter</name>
4248 </fallbacks>
4249 </class>
4250 </classes>
4251</archive>
diff --git a/pumpkin/ReceiveXFer.h b/pumpkin/ReceiveXFer.h
new file mode 100644
index 0000000..f62fcdc
--- a/dev/null
+++ b/pumpkin/ReceiveXFer.h
@@ -0,0 +1,8 @@
1
2#import "XFer.h"
3
4@interface ReceiveXFer : XFer
5
6-(ReceiveXFer*)initWithPeer:(struct sockaddr_in *)sin andPacket:(TFTPPacket*)p;
7-(ReceiveXFer*)initWithLocalFile:(NSString *)lf peerAddress:(const struct sockaddr_in *)pa remoteFile:(NSString *)rf xferType:(NSString *)xt blockSize:(uint16_t)bs andTimeout:(int)to;
8@end
diff --git a/pumpkin/ReceiveXFer.m b/pumpkin/ReceiveXFer.m
new file mode 100644
index 0000000..33e9604
--- a/dev/null
+++ b/pumpkin/ReceiveXFer.m
@@ -0,0 +1,168 @@
1#import "ReceiveXFer.h"
2#import "StringsAttached.h"
3#import "ConfirmRequest.h"
4
5@implementation ReceiveXFer
6
7- (ReceiveXFer*)initWithLocalFile:(NSString *)lf peerAddress:(const struct sockaddr_in *)pa remoteFile:(NSString *)rf xferType :(NSString *)xt blockSize:(uint16_t)bs andTimeout:(int)to{
8 if(!(self = [super init])) return self;
9 xferPrefix = @"⬇";
10 retryTimeout = to;
11 localFile = lf;
12 memmove(&peer,pa,sizeof(peer));
13 [[NSFileManager defaultManager] createFileAtPath:localFile contents:nil attributes:nil];
14 if(!(theFile = [[NSFileHandle fileHandleForWritingAtPath:localFile] retain])) {
15 [pumpkin log:@"Failed to create '%@', transfer aborted.", localFile];
16 return self;
17 }
18 [self createSocket];
19 NSMutableDictionary *o = [NSMutableDictionary dictionaryWithCapacity:4];
20 [o setValue:[NSString stringWithFormat:@"%u",bs] forKey:@"blksize"];
21 [o setValue:@"" forKey:@"tsize"];
22 [o setValue:[NSString stringWithFormat:@"%d",(int)retryTimeout] forKey:@"timeout"];
23 state = xferStateConnecting;
24 [self queuePacket:[TFTPPacket packetRRQWithFile:xferFilename=rf xferType:xferType=xt andOptions:o]];
25 [self appear];
26 return self;
27}
28
29- (ReceiveXFer*)initWithPeer:(struct sockaddr_in *)sin andPacket:(TFTPPacket *)p {
30 if(!(self = [super initWithPeer:sin andPacket:p])) return self;
31 xferPrefix = @"⬇";
32 xferFilename=[p.rqFilename retain]; xferType=[p.rqType retain];
33 [pumpkin log:@"'%@' of type '%@' is coming from %@", xferFilename, xferType, [NSString stringWithSocketAddress:&peer]];
34
35 [self createSocket];
36 [self appear];
37
38 if(![self makeLocalFileName:xferFilename])
39 return self;
40
41 switch([[pumpkin.theDefaults.values valueForKey:@"wrqBehavior"] intValue]) {
42 case onWRQDeny: [self goOnWithVerdict:verdictDeny]; break;
43 case onWRQTake: [self goOnWithVerdict:verdictAllow]; break;
44 case onWRQPromptIfExists:
45 if(![[NSFileManager defaultManager] fileExistsAtPath:localFile]) {
46 [self goOnWithVerdict:verdictAllow];
47 break;
48 }
49 case onWRQPrompt:
50 [ConfirmRequest confirmationWithXfer:self];
51 break;
52 }
53 return self;
54}
55-(void)goOnWithVerdict:(int)verdict {
56 if(!(verdict==verdictAllow || verdict==verdictRename)) {
57 [self queuePacket:[TFTPPacket packetErrorWithCode:tftpErrAccessViolation andMessage:@"Access denied"]];
58 return;
59 }
60 NSFileManager *fm = [NSFileManager defaultManager];
61 if(verdict==verdictRename) {
62 int i;
63 for(i=1;i>0;++i) {
64 if(![self makeLocalFileName:[NSString stringWithFormat:@"%@ (%d)",xferFilename,i]])
65 return;
66 if(![fm fileExistsAtPath:localFile]) break;
67 [localFile release],localFile=nil;
68 }
69 if(!localFile) {
70 [self queuePacket:[TFTPPacket packetErrorWithCode:tftpErrFileExists andMessage:@"Couldn't find a name for a file"]];
71 return;
72 }
73 }
74 [pumpkin log:@"Receiving '%@'",localFile];
75 [fm createFileAtPath:localFile contents:nil attributes:nil];
76 if(!(theFile = [[NSFileHandle fileHandleForWritingAtPath:localFile] retain])) {
77 [self queuePacket:[TFTPPacket packetErrorWithErrno:errno andFallback:@"couldn't write to file"]];
78 return;
79 }
80 xferSize=0;
81 NSMutableDictionary *o = [NSMutableDictionary dictionaryWithCapacity:4];
82 [initialPacket.rqOptions enumerateKeysAndObjectsUsingBlock:^(NSString* k,NSString *v,BOOL *s) {
83 if([k isEqualToString:@"blksize"]) {
84 [o setValue:[NSString stringWithFormat:@"%u",blockSize=v.intValue] forKey:@"blksize"];
85 }else if([k isEqualToString:@"tsize"]) {
86 [o setValue:[NSString stringWithFormat:@"%lld",xferSize=v.longLongValue] forKey:@"tsize"];
87 }else if([k isEqualToString:@"timeout"]) {
88 [o setValue:[NSString stringWithFormat:@"%d",v.intValue] forKey:@"timeout"];
89 retryTimeout = v.intValue;
90 }else
91 [pumpkin log:@"Unknown option '%@' with value '%@'. Ignoring.",k,v];
92 }];
93 if(xferSize) {
94 long xb = (xferSize/blockSize)+1;
95 if(xb>UINT16_MAX) {
96 [self queuePacket:[TFTPPacket packetErrorWithCode:tftpErrUndefined andMessage:[NSString stringWithFormat:@"file seems to be too big (%lld bytes) and would take %ld blocks to be transferred with the block size of %d bytes", xferSize, xb,blockSize]] ];
97 return;
98 }
99 xferBlocks = xb;
100 }
101 state = xferStateXfer;
102 if([o count]) {
103 [self queuePacket:[TFTPPacket packetOACKWithOptions:o]];
104 }else{
105 [self queuePacket:[TFTPPacket packetACKWithBlock:acked=0]];
106 }
107 [self updateView];
108}
109
110-(void)eatTFTPPacket:(TFTPPacket *)p from:(struct sockaddr_in *)sin {
111 if(state==xferStateConnecting) {
112 peer.sin_port = sin->sin_port;
113 [self updateView];
114 }else if(![self isPeer:sin]) {
115 [pumpkin log:@"Packet from unexpected source (%@) received",[NSString stringWithSocketAddress:sin]];
116 return;
117 }
118 switch(p.op) {
119 case tftpOpDATA:
120 {
121 NSData *d=p.rqData;;
122 @try {
123 if(p.block > (acked+1))
124 [pumpkin log:@"While transferring %@ block %d seems to immediately follow block %d",xferFilename,p.block,acked];
125 [theFile seekToFileOffset:(p.block-1)*blockSize];
126 [theFile writeData:d];
127 [theFile truncateFileAtOffset:(p.block-1)*blockSize+d.length];
128 }@catch (NSException *e) {
129 [self queuePacket:[TFTPPacket packetErrorWithCode:tftpErrUndefined andMessage:e.reason]];
130 break;
131 }
132 [self queuePacket:[TFTPPacket packetACKWithBlock: acked=p.block]];
133 [self updateView];
134 if(d.length<blockSize)
135 state = xferStateShutdown;
136 }
137 break;
138 case tftpOpOACK:
139 {
140 __block BOOL a=NO;
141 [p.rqOptions enumerateKeysAndObjectsUsingBlock:^(NSString *k,NSString *v,BOOL *s) {
142 if([k isEqualToString:@"blksize"])
143 blockSize = v.intValue;
144 else if([k isEqualToString:@"tsize"])
145 xferSize = v.longLongValue;
146 else if([k isEqualToString:@"timeout"])
147 retryTimeout = v.intValue;
148 else{
149 [pumpkin log:@"Totally unknown option %@ acknowledged by remote.",k];
150 a=YES;
151 }
152 }];
153 if(a) {
154 [self abort];
155 break;
156 }
157 [self queuePacket:[TFTPPacket packetACKWithBlock:0]];
158 state = xferStateXfer;
159 [self updateView];
160 }
161 break;
162 default:
163 [pumpkin log:@"Totaly unexpected opcode %d received",p.op];
164 break;
165 }
166}
167
168@end
diff --git a/pumpkin/SendXFer.h b/pumpkin/SendXFer.h
new file mode 100644
index 0000000..787a1b9
--- a/dev/null
+++ b/pumpkin/SendXFer.h
@@ -0,0 +1,16 @@
1#import <Cocoa/Cocoa.h>
2#import "TFTPPacket.h"
3#import "PumpKIN.h"
4#import "XFer.h"
5
6#include <netinet/in.h>
7
8@interface SendXFer : XFer {
9}
10
11-(SendXFer*)initWithPeer:(struct sockaddr_in *)sin andPacket:(TFTPPacket*)p;
12-(SendXFer*)initWithLocalFile:(NSString *)lf peerAddress:(const struct sockaddr_in *)pa remoteFile:(NSString *)rf xferType:(NSString *)xt blockSize:(uint16_t)bs andTimeout:(int)to;
13
14-(void)xfer;
15
16@end
diff --git a/pumpkin/SendXFer.m b/pumpkin/SendXFer.m
new file mode 100644
index 0000000..9a1d85b
--- a/dev/null
+++ b/pumpkin/SendXFer.m
@@ -0,0 +1,156 @@
1#import "SendXFer.h"
2#import "StringsAttached.h"
3#import "ConfirmRequest.h"
4
5@implementation SendXFer
6
7-(SendXFer*)initWithLocalFile:(NSString *)lf peerAddress:(const struct sockaddr_in *)pa remoteFile:(NSString *)rf xferType:(NSString *)xt blockSize:(uint16_t)bs andTimeout:(int)to {
8 if(!(self = [super init])) return self;
9 xferPrefix = @"⬆";
10 retryTimeout = to;
11 localFile = lf;
12 memmove(&peer,pa,sizeof(peer));
13 if(!(theFile = [[NSFileHandle fileHandleForReadingAtPath:localFile] retain])) {
14 [pumpkin log:@"Failed to open '%@', transfer aborted.",localFile];
15 return self;
16 }
17
18 long xb = ((xferSize=[theFile seekToEndOfFile])/blockSize)+1;
19 if(xb > UINT16_MAX) {
20 [pumpkin log:@"file is too big (%lld bytes) and will take %ld blocks to be sent with block size of %d bytes",xferSize,xb,blockSize];
21 return self;
22 }
23 xferBlocks = xb;
24
25 [self createSocket];
26 NSMutableDictionary *o = [NSMutableDictionary dictionaryWithCapacity:4];
27 [o setValue:[NSString stringWithFormat:@"%u",bs] forKey:@"blksize"];
28 [o setValue:[NSString stringWithFormat:@"%llu",xferSize] forKey:@"tsize"];
29 [o setValue:[NSString stringWithFormat:@"%d",(int)retryTimeout] forKey:@"timeout"];
30 state = xferStateConnecting;
31 [self queuePacket:[TFTPPacket packetWRQWithFile:xferFilename=rf xferType:xferType=xt andOptions:o]];
32 [self appear];
33 return self;
34}
35
36-(SendXFer*)initWithPeer:(struct sockaddr_in *)sin andPacket:(TFTPPacket*)p {
37 if(!(self = [super initWithPeer:sin andPacket:p])) return self;
38 xferPrefix = @"⬆";
39 xferFilename = [p.rqFilename retain]; xferType = [p.rqType retain];
40 [pumpkin log:@"'%@' of type '%@' is requested from %@",
41 xferFilename, xferType, [NSString stringWithSocketAddress:&peer] ];
42
43 [self createSocket];
44 [self appear];
45
46 if(![self makeLocalFileName:xferFilename])
47 return self;
48
49 switch([[pumpkin.theDefaults.values valueForKey:@"rrqBehavior"] intValue]) {
50 case onRRQDeny: [self goOnWithVerdict:verdictDeny]; break;
51 case onRRQGive: [self goOnWithVerdict:verdictAllow]; break;
52 default:
53 [ConfirmRequest confirmationWithXfer:self];
54 break;
55 }
56 return self;
57}
58-(void)goOnWithVerdict:(int)verdict {
59 if(verdict!=verdictAllow) {
60 [self queuePacket:[TFTPPacket packetErrorWithCode:tftpErrAccessViolation andMessage:@"Access denied"]];
61 return;
62 }
63 if(!(theFile = [[NSFileHandle fileHandleForReadingAtPath:localFile] retain])) {
64 [self queuePacket:[TFTPPacket packetErrorWithErrno:errno andFallback:@"couldn't open file"]];
65 return;
66 }
67 xferSize = [theFile seekToEndOfFile];
68 NSMutableDictionary *o = [NSMutableDictionary dictionaryWithCapacity:4];
69 [[initialPacket rqOptions] enumerateKeysAndObjectsUsingBlock:^(NSString* k, NSString* v, BOOL *stop) {
70 if([k isEqualToString:@"blksize"]) {
71 [o setValue:[NSString stringWithFormat:@"%u",blockSize=v.intValue] forKey:@"blksize"];
72 }else if([k isEqualToString:@"tsize"]) {
73 [o setValue:[NSString stringWithFormat:@"%lld",xferSize] forKey:@"tsize"];
74 }else if([k isEqualToString:@"timeout"]) {
75 [o setValue:[NSString stringWithFormat:@"%d",v.intValue] forKey:@"timeout"];
76 retryTimeout = v.intValue;
77 }else
78 [pumpkin log:@"Unknown option '%@' with value '%@'. Ignoring.",k,v];
79 }];
80 long xb = (xferSize/blockSize)+1;
81 if(xb > UINT16_MAX) {
82 [self queuePacket:[TFTPPacket packetErrorWithCode:tftpErrUndefined andMessage:[NSString stringWithFormat:@"file is too big (%lld bytes) and will take %ld blocks to be sent with block size of %d bytes",xferSize,xb,blockSize]]];
83 return;
84 }
85 xferBlocks = xb;
86 state = xferStateXfer;
87 if(o.count) {
88 [self queuePacket:[TFTPPacket packetOACKWithOptions:o]];
89 }else{
90 [self xfer];
91 }
92}
93
94- (void) xfer {
95 NSAssert(theFile,@"no file!");
96 [theFile seekToFileOffset:acked*blockSize];
97 [self queuePacket:[TFTPPacket packetDataWithBlock:acked+1 andData:[theFile readDataOfLength:blockSize]]];
98}
99
100- (void) eatTFTPPacket:(TFTPPacket*)p from:(struct sockaddr_in*)sin{
101 if(state==xferStateConnecting) {
102 peer.sin_port = sin->sin_port;
103 [self updateView];
104 }else if(![self isPeer:sin]) {
105 [pumpkin log:@"Packet from unexpected source (%@) recevied",[NSString stringWithSocketAddress:sin]];
106 return;
107 }
108 switch(p.op) {
109 case tftpOpACK:
110 if(state==xferStateShutdown || ( (acked=p.block)==xferBlocks && (state=xferStateShutdown) ) ) {
111 CFSocketEnableCallBacks(sockie, kCFSocketWriteCallBack);
112 return;
113 }
114 [self updateView];
115 [self xfer];
116 break;
117 case tftpOpERROR:
118 [pumpkin log:@"Error %u:%@",p.rqCode, p.rqMessage];
119 [self updateView];
120 [self disappear];
121 return;
122 case tftpOpOACK:
123 if(acked) {
124 [pumpkin log:@"It's a bit too late to acknowledge options, ignoring OACK packet"];
125 break;
126 }
127 {
128 __block BOOL a=NO;
129 [p.rqOptions enumerateKeysAndObjectsUsingBlock:^(NSString *k,NSString *v,BOOL *s) {
130 if([k isEqualToString:@"blksize"])
131 blockSize = v.intValue;
132 else if([k isEqualToString:@"tsize"]) {
133 }else if([k isEqualToString:@"timeout"])
134 retryTimeout = v.intValue;
135 else{
136 [pumpkin log:@"Totally unknown option '%@' with value '%@' acknowledged by peer",k,v];
137 a=YES;
138 }
139 }];
140 if(a) {
141 [self abort];
142 break;
143 }
144 state = xferStateXfer;
145 [self updateView];
146 [self xfer];
147 }
148 break;
149 default:
150 [pumpkin log:@"Totaly unexpected opcode %d received",p.op];
151 break;
152 }
153}
154
155
156@end
diff --git a/pumpkin/StringsAttached.h b/pumpkin/StringsAttached.h
new file mode 100644
index 0000000..fa73ae0
--- a/dev/null
+++ b/pumpkin/StringsAttached.h
@@ -0,0 +1,11 @@
1
2#import <Foundation/Foundation.h>
3#include <netinet/in.h>
4
5@interface NSString (StringsAttached)
6
7+ stringWithSocketAddress:(const struct sockaddr_in*)sin;
8+ stringWithHostAddress:(const struct sockaddr_in*)sin;
9+ stringWithPortNumber:(const struct sockaddr_in*)sin;
10
11@end
diff --git a/pumpkin/StringsAttached.m b/pumpkin/StringsAttached.m
new file mode 100644
index 0000000..8ad5868
--- a/dev/null
+++ b/pumpkin/StringsAttached.m
@@ -0,0 +1,19 @@
1
2#import "StringsAttached.h"
3#include <arpa/inet.h>
4
5@implementation NSString (StringsAttached)
6
7+ stringWithSocketAddress:(const struct sockaddr_in*)sin {
8 return [NSString stringWithFormat:@"%@:%u",[NSString stringWithHostAddress:sin],ntohs(sin->sin_port)];
9}
10+ stringWithHostAddress:(const struct sockaddr_in*)sin {
11 char tmp[32];
12 addr2ascii(sin->sin_family,&sin->sin_addr,sizeof(sin->sin_addr),tmp);
13 return @(tmp);
14}
15+ (id)stringWithPortNumber:(const struct sockaddr_in *)sin {
16 return [NSString stringWithFormat:@"%u",ntohs(sin->sin_port)];
17}
18
19@end
diff --git a/pumpkin/TFTPPacket.h b/pumpkin/TFTPPacket.h
new file mode 100644
index 0000000..a46d5bc
--- a/dev/null
+++ b/pumpkin/TFTPPacket.h
@@ -0,0 +1,87 @@
1
2#import <Cocoa/Cocoa.h>
3#include <stdint.h>
4
5enum TFTPOp {
6 tftpOpRRQ=1, tftpOpWRQ=2,
7 tftpOpDATA=3,
8 tftpOpACK=4,
9 tftpOpERROR=5,
10 tftpOpOACK=6
11};
12
13enum TFTPError {
14 tftpErrUndefined=0,
15 tftpErrNotFound=1,
16 tftpErrAccessViolation=2,
17 tftpErrDiskFull=3,
18 tftpErrIllegalOp=4,
19 tftpErrUnknownTID=5,
20 tftpErrFileExists=6,
21 tftpErrNoUser=7,
22 tftpErrOption=8
23};
24
25#pragma pack(push,1)
26struct AnyTFTPPacket {
27 uint16_t op;
28 union {
29 struct {
30 char data[1];
31 } any;
32 struct {
33 char data[1];
34 } rq;
35 struct {
36 char data[1];
37 } rrq;
38 struct {
39 char data[1];
40 } wrq;
41 struct {
42 uint16_t block;
43 char data[1];
44 } data;
45 struct {
46 uint16_t block;
47 } ack;
48 struct {
49 uint16_t code;
50 char data[1];
51 } err;
52 struct {
53 char data[1];
54 } oack;
55 };
56};
57#pragma pack(pop)
58
59@interface TFTPPacket : NSObject {
60 NSData *data;
61 struct AnyTFTPPacket *packet;
62}
63
64@property (readonly) enum TFTPOp op;
65@property (readonly) NSString* rqFilename;
66@property (readonly) NSString* rqType;
67@property (readonly) NSDictionary* rqOptions;
68@property (readonly) NSData *data;
69@property (readonly) uint16_t block;
70@property (readonly) NSData *rqData;
71@property (readonly) uint16_t rqCode;
72@property (readonly) NSString* rqMessage;
73
74-(TFTPPacket*)initWithData:(NSData*)d;
75
76+(TFTPPacket*)packetWithData:(NSData*)d;
77+(TFTPPacket*)packetWithBytesNoCopy:(void*)b andLength:(size_t)l;
78
79+(TFTPPacket*)packetErrorWithCode:(enum TFTPError)c andMessage:(NSString*)m;
80+(TFTPPacket*)packetErrorWithErrno:(int)en andFallback:(NSString*)fb;
81+(TFTPPacket*)packetOACKWithOptions:(NSDictionary*)o;
82+(TFTPPacket*)packetDataWithBlock:(uint16_t)b andData:(NSData*)d;
83+(TFTPPacket*)packetACKWithBlock:(uint16_t)b;
84+(TFTPPacket*)packetRRQWithFile:(NSString*)f xferType:(NSString*)t andOptions:(NSDictionary*)o;
85+(TFTPPacket*)packetWRQWithFile:(NSString*)f xferType:(NSString*)t andOptions:(NSDictionary*)o;
86
87@end
diff --git a/pumpkin/TFTPPacket.m b/pumpkin/TFTPPacket.m
new file mode 100644
index 0000000..73f5995
--- a/dev/null
+++ b/pumpkin/TFTPPacket.m
@@ -0,0 +1,203 @@
1
2#import "TFTPPacket.h"
3
4@interface NSDictionary (TFTPOptions)
5
6- (size_t)tftpBytesLength;
7- (size_t)tftpGetBytes:(char*)p maxLength:(size_t)ml;
8
9@end
10@implementation NSDictionary (TFTPOptions)
11
12- (size_t)tftpBytesLength {
13 __block size_t rv = 0;
14 [self enumerateKeysAndObjectsUsingBlock:^(id k,id v,BOOL *s) {
15 rv += [k lengthOfBytesUsingEncoding:NSUTF8StringEncoding]+[v lengthOfBytesUsingEncoding:NSUTF8StringEncoding]+2;
16 }];
17 return rv;
18}
19
20- (size_t)tftpGetBytes:(char*)p maxLength:(size_t)ml {
21 __block char *_p = p;
22 __block size_t rl = ml;
23 __block size_t rv = 0;
24 [self enumerateKeysAndObjectsUsingBlock:^(NSString *k,NSString *v,BOOL *s) {
25 NSUInteger l;
26 [k getBytes:_p maxLength:rl usedLength:&l encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0,k.length) remainingRange:NULL];
27 _p+=l; *_p++=0; rl-=l+1; rv+=l+1;
28 [v getBytes:_p maxLength:rl usedLength:&l encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0,v.length) remainingRange:NULL];
29 _p+=l; *_p++=0; rl-=l+1; rv+=l+1;
30 }];
31 return rv;
32}
33
34@end
35
36@implementation TFTPPacket
37@synthesize data;
38
39-(BOOL) isRQOp {
40 return self.op==tftpOpRRQ || self.op==tftpOpWRQ;
41}
42-(BOOL) isOptionsOp {
43 return self.isRQOp || self.op==tftpOpOACK;
44}
45-(BOOL) isBlockOp {
46 return self.op==tftpOpDATA || self.op==tftpOpACK;
47}
48
49-(enum TFTPOp)op {
50 NSAssert(data.length,@"no data");
51 return (enum TFTPOp)ntohs(packet->op);
52}
53-(NSString*)rqFilename {
54 NSAssert( self.isRQOp, @"Wrong TFTP opcode for rq filename retrieval");
55 if(!memchr(packet->rq.data, 0, [data length]-sizeof(packet->op))) return nil;
56 return @(packet->rq.data);
57}
58-(NSString*)rqType {
59 NSAssert( self.isRQOp, @"Wrong TFTP opcode for rq type retrieval");
60 const char *z = (const char*)memchr(packet->rq.data,0, data.length-sizeof(packet->op));
61 if(!z) return nil;
62 if(!memchr(z+1,0,data.length-sizeof(packet->op)-(z-packet->rq.data))) return nil;
63 return @(z+1);
64}
65-(NSDictionary*)rqOptions {
66 enum TFTPOp op = self.op;
67 NSAssert( self.isOptionsOp, @"Wrong TFTP opcode for options retrieval");
68 const char *p = packet->any.data, *p1 = (const char*)packet + data.length;
69 if(op==tftpOpRRQ || op==tftpOpWRQ) {
70 p = (const char *)memchr(p,0,p1-p);
71 if(!p) return nil;
72 p = (const char *)memchr(p+1,0,p1-p);
73 if(!p) return nil;
74 ++p;
75 }
76 NSMutableDictionary *rv = [NSMutableDictionary dictionaryWithCapacity:8];
77 while(p<p1) {
78 const char *on = p;
79 p = (const char *)memchr(p,0,p1-p);
80 if(!p) break;
81 const char *ov = ++p;
82 p = (const char *)memchr(p,0,p1-p);
83 if(!p) break;
84 ++p;
85 rv[[@(on) lowercaseString]] = @(ov);
86 }
87 return rv;
88}
89-(uint16_t)block {
90 NSAssert( self.isBlockOp, @"Wrong TFTP opcode for block number retrieval");
91 return ntohs(*(uint16_t*)&packet->data);
92}
93-(NSData*)rqData {
94 NSAssert( self.op==tftpOpDATA, @"Can't get data from the request that doesn't have it");
95 return [NSData dataWithBytes:packet->data.data length:data.length-sizeof(packet->op)-sizeof(packet->data.block)];
96}
97-(uint16_t)rqCode {
98 NSAssert(self.op==tftpOpERROR,@"Wrong TFTP opcode for error code retrieval");
99 return ntohs(packet->err.code);
100}
101-(NSString*)rqMessage {
102 NSAssert(self.op==tftpOpERROR,@"Wrong TFTP opcode for error message retrieval");
103 return @(packet->err.data);
104}
105
106-(TFTPPacket*)initWithData:(NSData *)d {
107 if(!(self = [super init])) return self;
108 packet = (struct AnyTFTPPacket*)(data = [d retain]).bytes;
109 return self;
110}
111
112
113+(TFTPPacket*)packetWithData:(NSData*)d {
114 return [[[self alloc] initWithData:d] autorelease];
115}
116+(TFTPPacket*)packetWithBytesNoCopy:(void*)b andLength:(size_t)l {
117 return [[[self alloc] initWithData:[NSData dataWithBytesNoCopy:b length:l]] autorelease];
118}
119
120+(TFTPPacket*)packetErrorWithCode:(enum TFTPError)c andMessage:(NSString*)m {
121 NSUInteger ml = [m lengthOfBytesUsingEncoding:NSUTF8StringEncoding], bb;
122 struct AnyTFTPPacket *b = (struct AnyTFTPPacket*)malloc(bb = sizeof(b->op)+sizeof(b->err.code)+ml+1);
123 if(!b) return nil;
124 b->op = htons(tftpOpERROR);
125 b->err.code = ntohs(c);
126 [m getBytes:b->err.data maxLength:ml usedLength:NULL encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0,m.length) remainingRange:NULL];
127 b->err.data[ml]=0;
128 return [self packetWithBytesNoCopy:b andLength:bb];
129}
130+(TFTPPacket*)packetErrorWithErrno:(int)en andFallback:(NSString *)fb{
131 switch(en) {
132 case EACCES:
133 return [self packetErrorWithCode:tftpErrAccessViolation andMessage:@"acess violation"];
134 case ENOENT:
135 return [self packetErrorWithCode:tftpErrNotFound andMessage:@"not found"];
136 }
137 return [self packetErrorWithCode:tftpErrUndefined andMessage:fb];
138}
139
140+(TFTPPacket*)packetXRQWithOp:(enum TFTPOp)op file:(NSString*)f xferType:(NSString*)t andOptions:(NSDictionary*)o {
141 NSAssert(f && t && o,@"Something is amiss in packetXRQWithOp");
142 __block size_t dl = o.tftpBytesLength
143 +[f lengthOfBytesUsingEncoding:NSUTF8StringEncoding]
144 +[t lengthOfBytesUsingEncoding:NSUTF8StringEncoding]
145 +2;
146 size_t pl = dl;
147 struct AnyTFTPPacket *b = (struct AnyTFTPPacket*)malloc(pl+=sizeof(b->op));
148 if(!b) return nil;
149 b->op = htons(op);
150 __block char *p = b->rrq.data;
151 NSUInteger l;
152 [f getBytes:p maxLength:dl usedLength:&l encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0,f.length) remainingRange:NULL];
153 p+=l; *p++=0; dl-=l+1;
154 [t getBytes:p maxLength:dl usedLength:&l encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0,t.length) remainingRange:NULL];
155 p+=l; *p++=0; dl-=l+1;
156 l = [o tftpGetBytes:p maxLength:dl];
157 p+=l; dl-=l;
158 NSAssert1(dl==0,@"packet of the wrong size, remaining count: %lu",dl);
159 return [self packetWithBytesNoCopy:b andLength:pl];
160}
161
162+(TFTPPacket*)packetRRQWithFile:(NSString *)f xferType:(NSString *)t andOptions:(NSDictionary *)o {
163 return [self packetXRQWithOp:tftpOpRRQ file:f xferType:t andOptions:o];
164}
165+(TFTPPacket*)packetWRQWithFile:(NSString *)f xferType:(NSString *)t andOptions:(NSDictionary *)o {
166 return [self packetXRQWithOp:tftpOpWRQ file:f xferType:t andOptions:o];
167}
168
169+(TFTPPacket*)packetOACKWithOptions:(NSDictionary*)o {
170 __block NSUInteger pl = [o tftpBytesLength];
171 __block NSUInteger rc = pl;
172 __block struct AnyTFTPPacket *b = (struct AnyTFTPPacket*)malloc(pl+=sizeof(b->op));
173 if(!b) return nil;
174 b->op = htons(tftpOpOACK);
175 __block char *p = b->oack.data;
176 rc -= [o tftpGetBytes:p maxLength:pl];
177 NSAssert1(rc==0,@"packet of the wrong size, remaining count: %lu",rc);
178 return [self packetWithBytesNoCopy:b andLength:pl];
179}
180+(TFTPPacket*)packetDataWithBlock:(uint16_t)b andData:(NSData*)d {
181 NSUInteger pl;
182 struct AnyTFTPPacket *p = (struct AnyTFTPPacket*)malloc(pl=sizeof(p->op)+sizeof(p->data.block)+d.length);
183 if(!p) return nil;
184 p->op = htons(tftpOpDATA);
185 p->data.block = htons(b);
186 [d getBytes:p->data.data length:d.length];
187 return [self packetWithBytesNoCopy:p andLength:pl];
188}
189+(TFTPPacket*)packetACKWithBlock:(uint16_t)b {
190 NSUInteger pl;
191 struct AnyTFTPPacket *p = (struct AnyTFTPPacket*)malloc(pl=sizeof(p->op)+sizeof(p->ack.block));
192 if(!p) return nil;
193 p->op = htons(tftpOpACK);
194 p->ack.block = htons(b);
195 return [self packetWithBytesNoCopy:p andLength:pl];
196}
197
198-(void)dealloc {
199 [data release];
200 [super dealloc];
201}
202
203@end
diff --git a/pumpkin/XFer.h b/pumpkin/XFer.h
new file mode 100644
index 0000000..ffe7fc1
--- a/dev/null
+++ b/pumpkin/XFer.h
@@ -0,0 +1,68 @@
1
2#import <Foundation/Foundation.h>
3#import "PumpKIN.h"
4#include <netinet/in.h>
5#import "TFTPPacket.h"
6
7enum XFerState {
8 xferStateNone = 0,
9 xferStateConnecting,
10 xferStateXfer,
11 xferStateShutdown
12};
13
14@interface XFer : NSObject {
15 struct sockaddr_in peer;
16 PumpKIN *pumpkin;
17 CFSocketRef sockie;
18 CFRunLoopSourceRef runloopSource;
19 NSFileHandle *theFile;
20 uint16_t blockSize;
21 uint16_t acked;
22 unsigned long long xferSize;
23 uint16_t xferBlocks;
24 enum XFerState state;
25 NSString *xferType;
26 NSString *xferFilename;
27 NSTimeInterval retryTimeout;
28 NSTimeInterval giveupTimeout;
29 TFTPPacket *lastPacket;
30 NSTimer *retryTimer;
31 NSTimer *giveupTimer;
32 TFTPPacket *initialPacket;
33 NSString *xferPrefix;
34
35 NSString *localFile;
36
37 NSMutableArray *queue;
38}
39@property (readonly) struct sockaddr_in *peer;
40@property (readonly) TFTPPacket *initialPacket;
41@property (readonly) NSString *xferFilename;
42@property (readonly) NSString *localFile;
43@property (readonly) NSString *xferPrefix;
44
45- (id) init;
46- (id) initWithPeer:(struct sockaddr_in *)sin andPacket:(TFTPPacket*)p;
47
48- (BOOL) createSocket;
49- (void) callbackWithType:(CFSocketCallBackType)t addr:(CFDataRef)a data:(const void *)d;
50- (void) queuePacket:(TFTPPacket*)p;
51
52- (void) eatTFTPPacket:(TFTPPacket*)p from:(struct sockaddr_in*)sin;
53
54- (id) cellValueForColumn:(NSString*)ci;
55
56- (void) updateView;
57- (void) appear;
58- (void) disappear;
59
60- (BOOL) isPeer:(struct sockaddr_in*)sin;
61
62- (void) abort;
63
64- (void) goOnWithVerdict:(int)verdict;
65
66- (BOOL) makeLocalFileName:(NSString*)xf;
67
68@end
diff --git a/pumpkin/XFer.m b/pumpkin/XFer.m
new file mode 100644
index 0000000..6803ade
--- a/dev/null
+++ b/pumpkin/XFer.m
@@ -0,0 +1,205 @@
1
2#import "XFer.h"
3#import "TFTPPacket.h"
4#import "StringsAttached.h"
5
6static void cbXfer(CFSocketRef sockie,CFSocketCallBackType cbt,CFDataRef cba,
7 const void *cbd,void *i) {
8 [(XFer*)i callbackWithType:cbt addr:cba data:cbd];
9}
10
11@implementation XFer
12@synthesize initialPacket;
13@synthesize xferFilename;
14@synthesize localFile;
15@synthesize xferPrefix;
16
17- (id) init {
18 if(!(self = [super init])) return self;
19 blockSize = 512;
20 sockie = NULL;
21 theFile = nil;
22 acked = 0;
23 xferSize = 0; xferBlocks = 0;
24 xferType = nil; xferFilename = nil;
25 state = xferStateNone;
26 pumpkin = NSApplication.sharedApplication.delegate;
27 queue = [[NSMutableArray alloc]initWithCapacity:4];
28 localFile = nil;
29 retryTimeout = 3;
30 giveupTimeout = [[[[NSUserDefaultsController sharedUserDefaultsController] values] valueForKey:@"giveUpTimeout"] intValue];
31 lastPacket = nil; retryTimer = nil;
32 giveupTimer = nil;
33 initialPacket = nil;
34 return self;
35
36}
37
38- (id) initWithPeer:(struct sockaddr_in *)sin andPacket:(TFTPPacket*)p {
39 if(!(self=[self init])) return self;
40 memmove(&peer,sin,sizeof(peer));
41 initialPacket = [p retain];
42 return self;
43}
44
45- (struct sockaddr_in*)peer { return &peer; }
46
47- (BOOL) makeLocalFileName:(NSString *)xf {
48 NSString *fn = [xf stringByReplacingOccurrencesOfString:@"\\" withString:@"/"];
49 if([fn hasPrefix:@"../"] || [fn hasSuffix:@"/.."] || [fn rangeOfString:@"/../"].location!=NSNotFound) {
50 [self queuePacket:[TFTPPacket packetErrorWithCode:tftpErrAccessViolation andMessage:@"bad path"]];
51 return NO;
52 }
53 localFile = [[[pumpkin.theDefaults.values valueForKey:@"tftpRoot"] stringByAppendingPathComponent:fn] retain];
54 return YES;
55}
56
57- (void) retryTimeout {
58 [self queuePacket:lastPacket]; [lastPacket release]; lastPacket = nil;
59}
60- (void) giveUp {
61 [pumpkin log:@"Connection timeout for '%@'",xferFilename];
62 [self abort];
63}
64- (void) renewHope {
65 if(giveupTimer) {
66 [giveupTimer invalidate]; [giveupTimer release];
67 }
68 giveupTimer = [[NSTimer scheduledTimerWithTimeInterval:giveupTimeout target:self selector:@selector(giveUp) userInfo:nil repeats:NO] retain];
69}
70
71- (void) callbackWithType:(CFSocketCallBackType)t addr:(CFDataRef)a data:(const void *)d {
72 if(!giveupTimer) [self renewHope];
73 if(retryTimer) {
74 [retryTimer release]; [retryTimer invalidate]; retryTimer = nil;
75 }
76 switch (t) {
77 case kCFSocketWriteCallBack:
78 if(queue.count) {
79 TFTPPacket *p = queue[0];
80 CFSocketError r = CFSocketSendData(sockie, (CFDataRef)[NSData dataWithBytesNoCopy:&peer length:sizeof(peer) freeWhenDone:NO], (CFDataRef)[NSData dataWithData:p.data], 0);
81 if(r!=kCFSocketSuccess)
82 [pumpkin log:@"Failed to send data, error %d",errno];
83 if(!(p.op==tftpOpDATA || p.op==tftpOpERROR)) {
84 if(lastPacket) [lastPacket release];
85 lastPacket = [p retain];
86 if(retryTimer) {
87 [retryTimer invalidate]; [retryTimer release];
88 }
89 retryTimer = [[NSTimer scheduledTimerWithTimeInterval:retryTimeout target:self selector:@selector(retryTimeout) userInfo:nil repeats:NO] retain];
90 }else{
91 [lastPacket release]; lastPacket = nil;
92 }
93 [queue removeObjectAtIndex:0];
94 if([queue count] || state==xferStateShutdown)
95 CFSocketEnableCallBacks(sockie, kCFSocketWriteCallBack);
96 }else if(state==xferStateShutdown) {
97 [pumpkin log:@"%@ Transfer of '%@' finished.",xferPrefix,xferFilename];
98 [self disappear];
99 }
100 break;
101 case kCFSocketDataCallBack:
102 [self renewHope];
103 [self eatTFTPPacket:[TFTPPacket packetWithData:(NSData*)d] from:(struct sockaddr_in*)CFDataGetBytePtr(a)];
104 break;
105 default:
106 NSLog(@"unhandled %lu callback",t);
107 break;
108 }
109}
110
111- (BOOL) createSocket {
112 CFSocketContext ctx;
113 ctx.version=0; ctx.info=self; ctx.retain=0; ctx.release=0; ctx.copyDescription=0;
114 sockie = CFSocketCreate(kCFAllocatorDefault, PF_INET, SOCK_DGRAM, IPPROTO_UDP,
115 kCFSocketReadCallBack|kCFSocketWriteCallBack|kCFSocketDataCallBack,
116 cbXfer, &ctx);
117 if(!sockie) return NO;
118 struct sockaddr_in a; memset(&a, 0, sizeof(a));
119 a.sin_family = AF_INET;
120 if(CFSocketSetAddress(sockie, (CFDataRef)[NSData dataWithBytesNoCopy:&a length:sizeof(a) freeWhenDone:NO])
121 !=kCFSocketSuccess) {
122 [pumpkin log:@"failed to set socket address"];
123 return NO;
124 }
125 runloopSource = CFSocketCreateRunLoopSource(kCFAllocatorDefault, sockie, 0);
126 CFRunLoopAddSource(CFRunLoopGetCurrent(), runloopSource, kCFRunLoopDefaultMode);
127 return YES;
128}
129
130- (void) queuePacket:(TFTPPacket*)p {
131 [queue addObject:p];
132 CFSocketEnableCallBacks(sockie, kCFSocketWriteCallBack|kCFSocketReadCallBack);
133 if(p.op==tftpOpERROR) state = xferStateShutdown;
134}
135
136- (void) goOnWithVerdict:(int)verdict {
137 NSAssert(false,@"unimplemented goOnWithVerdict");
138}
139
140- (void) eatTFTPPacket:(TFTPPacket*)p from:(struct sockaddr_in*)sin {
141 NSAssert(false,@"unimplemented eatTFTPPacket");
142}
143-(void) abort {
144 [self queuePacket:[TFTPPacket packetErrorWithCode:tftpErrUndefined andMessage:@"transfer cancelled"]];
145}
146
147- (id) cellValueForColumn:(NSString*)ci {
148 if([ci isEqualToString:@"fileName"]) {
149 return [NSString stringWithFormat:@"%@ %@",xferPrefix,xferFilename];
150 }else if([ci isEqualToString:@"xferType"]) {
151 return xferType;
152 }else if([ci isEqualToString:@"peerAddress"]) {
153 switch (state) {
154 case xferStateConnecting: return [NSString stringWithHostAddress:&peer];
155 default: return [NSString stringWithSocketAddress:&peer];
156 }
157 }else if([ci isEqualToString:@"ackBytes"]) {
158 return [NSString stringWithFormat:@"%u",acked*blockSize];
159 }else if([ci isEqualToString:@"xferSize"]) {
160 return xferSize?[NSString stringWithFormat:@"%llu",xferSize]:nil;
161 }
162 return nil;
163}
164
165- (void) updateView {
166 [pumpkin updateXfers];
167}
168- (void) appear {
169 [pumpkin registerXfer:self];
170}
171- (void) disappear {
172 if(retryTimer) {
173 [retryTimer invalidate]; [retryTimer release]; retryTimer = nil;
174 }
175 if(giveupTimer) {
176 [giveupTimer invalidate]; [giveupTimer release]; retryTimer = nil;
177 }
178 [pumpkin unregisterXfer:self];
179}
180
181- (BOOL) isPeer:(struct sockaddr_in*)sin {
182 return sin->sin_len==peer.sin_len && !memcmp(sin,&peer,sin->sin_len);
183}
184
185-(void)dealloc {
186 if(runloopSource) {
187 CFRunLoopSourceInvalidate(runloopSource);
188 CFRelease(runloopSource);
189 }
190 if(sockie) {
191 CFSocketInvalidate(sockie);
192 CFRelease(sockie);
193 }
194 [queue release];
195 if(theFile) [theFile release];
196 if(xferFilename) [xferFilename release];
197 if(xferType) [xferType release];
198 if(lastPacket) [lastPacket release];
199 if(initialPacket) [initialPacket release];
200 if(localFile) [localFile release];
201 [super dealloc];
202}
203
204
205@end
diff --git a/pumpkin/XFersViewDatasource.h b/pumpkin/XFersViewDatasource.h
new file mode 100644
index 0000000..3225e1b
--- a/dev/null
+++ b/pumpkin/XFersViewDatasource.h
@@ -0,0 +1,11 @@
1
2@interface XFersViewDatasource : NSObject <NSTableViewDataSource> {
3 NSMutableArray *xfers;
4}
5
6- (id)initWithXfers:(NSMutableArray*)x;
7
8- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex;
9- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView;
10
11@end
diff --git a/pumpkin/XFersViewDatasource.m b/pumpkin/XFersViewDatasource.m
new file mode 100644
index 0000000..1f7c689
--- a/dev/null
+++ b/pumpkin/XFersViewDatasource.m
@@ -0,0 +1,24 @@
1
2#import "XFersViewDatasource.h"
3#import "XFer.h"
4
5@implementation XFersViewDatasource
6
7- (id)initWithXfers:(NSMutableArray*)x {
8 if(!(self = [super init])) return self;
9 xfers = [x retain];
10 return self;
11}
12- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex {
13 return [xfers[rowIndex] cellValueForColumn:aTableColumn.identifier];
14}
15- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView {
16 return xfers.count;
17}
18
19- (void) dealloc {
20 [xfers release];
21 [super dealloc];
22}
23
24@end
diff --git a/pumpkin/abort.icns b/pumpkin/abort.icns
new file mode 100644
index 0000000..cd688ca
--- a/dev/null
+++ b/pumpkin/abort.icns
Binary files differ
diff --git a/pumpkin/en.lproj/InfoPlist.strings b/pumpkin/en.lproj/InfoPlist.strings
new file mode 100644
index 0000000..5495781
--- a/dev/null
+++ b/pumpkin/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
1/* Localized versions of Info.plist keys */
2CFBundleDisplayName = "PumpKIN"; \ No newline at end of file
diff --git a/pumpkin/get.icns b/pumpkin/get.icns
new file mode 100644
index 0000000..c0120da
--- a/dev/null
+++ b/pumpkin/get.icns
Binary files differ
diff --git a/pumpkin/klever-background.png b/pumpkin/klever-background.png
new file mode 100644
index 0000000..42bb1e5
--- a/dev/null
+++ b/pumpkin/klever-background.png
Binary files differ
diff --git a/pumpkin/main.m b/pumpkin/main.m
new file mode 100644
index 0000000..27f298f
--- a/dev/null
+++ b/pumpkin/main.m
@@ -0,0 +1,6 @@
1#import <Cocoa/Cocoa.h>
2
3int main(int argc, char *argv[])
4{
5 return NSApplicationMain(argc, (const char **)argv);
6}
diff --git a/pumpkin/pumpkin-Info.plist b/pumpkin/pumpkin-Info.plist
new file mode 100644
index 0000000..a921bb4
--- a/dev/null
+++ b/pumpkin/pumpkin-Info.plist
@@ -0,0 +1,38 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3<plist version="1.0">
4<dict>
5 <key>CFBundleDevelopmentRegion</key>
6 <string>en</string>
7 <key>CFBundleDisplayName</key>
8 <string>pumpkin</string>
9 <key>CFBundleExecutable</key>
10 <string>${EXECUTABLE_NAME}</string>
11 <key>CFBundleIconFile</key>
12 <string>pumpkin</string>
13 <key>CFBundleIdentifier</key>
14 <string>net.klever.kin.${PRODUCT_NAME:rfc1034identifier}</string>
15 <key>CFBundleInfoDictionaryVersion</key>
16 <string>6.0</string>
17 <key>CFBundleName</key>
18 <string>${PRODUCT_NAME}</string>
19 <key>CFBundlePackageType</key>
20 <string>APPL</string>
21 <key>CFBundleShortVersionString</key>
22 <string>0.0</string>
23 <key>CFBundleSignature</key>
24 <string>????</string>
25 <key>CFBundleVersion</key>
26 <string>1</string>
27 <key>LSApplicationCategoryType</key>
28 <string>public.app-category.utilities</string>
29 <key>LSMinimumSystemVersion</key>
30 <string>${MACOSX_DEPLOYMENT_TARGET}</string>
31 <key>NSHumanReadableCopyright</key>
32 <string>Copyright © 2012 Klever Group. All rights reserved.</string>
33 <key>NSMainNibFile</key>
34 <string>PumpKIN</string>
35 <key>NSPrincipalClass</key>
36 <string>NSApplication</string>
37</dict>
38</plist>
diff --git a/pumpkin/pumpkin-Prefix.pch b/pumpkin/pumpkin-Prefix.pch
new file mode 100644
index 0000000..8976de1
--- a/dev/null
+++ b/pumpkin/pumpkin-Prefix.pch
@@ -0,0 +1,7 @@
1//
2// Prefix header for all source files of the 'PumpKIN' target in the 'PumpKIN' project
3//
4
5#ifdef __OBJC__
6 #import <Cocoa/Cocoa.h>
7#endif
diff --git a/pumpkin/pumpkin-defaults.plist b/pumpkin/pumpkin-defaults.plist
new file mode 100644
index 0000000..511140f
--- a/dev/null
+++ b/pumpkin/pumpkin-defaults.plist
@@ -0,0 +1,28 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3<plist version="1.0">
4<dict>
5 <key>bindPort</key>
6 <integer>69</integer>
7 <key>bindAddress</key>
8 <string>0.0.0.0</string>
9 <key>remotePort</key>
10 <integer>69</integer>
11 <key>blockSize</key>
12 <integer>512</integer>
13 <key>xferType</key>
14 <string>octet</string>
15 <key>timeout</key>
16 <integer>10</integer>
17 <key>rrqBehavior</key>
18 <integer>1</integer>
19 <key>wrqBehavior</key>
20 <integer>2</integer>
21 <key>confirmationTimeout</key>
22 <string>30</string>
23 <key>giveUpTimeout</key>
24 <integer>120</integer>
25 <key>listen</key>
26 <true/>
27</dict>
28</plist>
diff --git a/pumpkin/put.icns b/pumpkin/put.icns
new file mode 100644
index 0000000..5d62867
--- a/dev/null
+++ b/pumpkin/put.icns
Binary files differ
diff --git a/res/down.ico b/res/down.ico
deleted file mode 100644
index 433e718..0000000
--- a/res/down.ico
+++ b/dev/null
Binary files differ
diff --git a/res/failed.wav b/res/failed.wav
deleted file mode 100644
index 6d38550..0000000
--- a/res/failed.wav
+++ b/dev/null
Binary files differ
diff --git a/res/finished.wav b/res/finished.wav
deleted file mode 100644
index d8a0dc4..0000000
--- a/res/finished.wav
+++ b/dev/null
Binary files differ
diff --git a/res/pumpkin.ico b/res/pumpkin.ico
deleted file mode 100644
index a48bab9..0000000
--- a/res/pumpkin.ico
+++ b/dev/null
Binary files differ
diff --git a/res/pumpkin.rc2 b/res/pumpkin.rc2
deleted file mode 100644
index 3471fab..0000000
--- a/res/pumpkin.rc2
+++ b/dev/null
@@ -1,13 +0,0 @@
1//
2// PUMPKIN.RC2 - resources Microsoft Visual C++ does not edit directly
3//
4
5#ifdef APSTUDIO_INVOKED
6 #error this file is not editable by Microsoft Visual C++
7#endif //APSTUDIO_INVOKED
8
9
10/////////////////////////////////////////////////////////////////////////////
11// Add manually edited resources here...
12
13/////////////////////////////////////////////////////////////////////////////
diff --git a/res/remove.ico b/res/remove.ico
deleted file mode 100644
index 8e4473d..0000000
--- a/res/remove.ico
+++ b/dev/null
Binary files differ
diff --git a/res/ring.wav b/res/ring.wav
deleted file mode 100644
index 44b6ce2..0000000
--- a/res/ring.wav
+++ b/dev/null
Binary files differ
diff --git a/res/rrq.ico b/res/rrq.ico
deleted file mode 100644
index 4396eb3..0000000
--- a/res/rrq.ico
+++ b/dev/null
Binary files differ
diff --git a/res/up.ico b/res/up.ico
deleted file mode 100644
index 32f684b..0000000
--- a/res/up.ico
+++ b/dev/null
Binary files differ
diff --git a/res/wrq.ico b/res/wrq.ico
deleted file mode 100644
index 4e32659..0000000
--- a/res/wrq.ico
+++ b/dev/null
Binary files differ
diff --git a/resource.h b/resource.h
deleted file mode 100755
index 2c2fa02..0000000
--- a/resource.h
+++ b/dev/null
@@ -1,174 +0,0 @@
1//{{NO_DEPENDENCIES}}
2// Microsoft Developer Studio generated include file.
3// Used by PumpKIN.rc
4//
5#define IDM_ABOUTBOX 0x0010
6#define IDD_ABOUTBOX 100
7#define IDS_ABOUTBOX 101
8#define IDC_TRAYICON 101
9#define IDD_PUMPKIN_DIALOG 102
10#define IDS_FMT_BYTES 102
11#define IDP_SOCKETS_INIT_FAILED 103
12#define IDS_TFTP_ERROR_ACCESS 104
13#define IDS_TFTP_ERROR_NOTFOUND 105
14#define IDS_TFTP_ERROR_DIRFULL 106
15#define IDD_PROPS_SERVER 106
16#define IDS_TFTP_ERROR_SHARING 107
17#define IDD_PROPS_NETWORK 107
18#define IDS_TFTP_ERROR_DISKFULL 108
19#define IDS_TFTP_ERROR_UNDEFINED 109
20#define IDS_LOG_START 110
21#define IDS_LOG_LISTENRECEIVEERROR 111
22#define IDS_LOG_LISTENACCEPTERROR 112
23#define IDS_LOG_RRQSERVE 113
24#define IDS_LOG_LISTENOPCODE 114
25#define IDS_LOG_XFERUDPSEND 115
26#define IDS_LOG_XFERRECEIVE 116
27#define IDS_LOG_XFERSEND 117
28#define IDS_LOG_XFERUDPRECEIVE 118
29#define IDS_LOG_XFERSOURCETID 119
30#define IDS_LOG_SENTTFTPERROR 120
31#define IDS_LOG_GOTTFTPERROR 121
32#define IDS_LOG_XFEROPCODE 122
33#define IDS_LOG_XFERRRQFINISHED 123
34#define IDS_TITLE_OPTIONS 124
35#define IDS_LOG_WRQSERVE 125
36#define IDS_TFTP_ERROR_FAILEDTORENAME 126
37#define IDS_RENAME_TITLE 127
38#define IDR_MAINFRAME 128
39#define IDS_LOG_TIMEDOUT 128
40#define IDS_CONFIRMEXIT_TITLE 129
41#define IDI_RRQ 129
42#define IDS_CONFIRMEXIT_TEXT 130
43#define IDI_WRQ 130
44#define IDD_CONFIRM_RRQ 131
45#define IDS_LOG_XFERWRQFINISHED 131
46#define IDD_CONFIRM_WRQ 132
47#define IDB_BACKGROUND 132
48#define IDS_LOG_XFERABORTED 132
49#define IDS_TITLE_PUTREQUEST 133
50#define IDS_TITLE_GETREQUEST 134
51#define IDR_WAVE_RING 135
52#define IDS_TALKHEADING 135
53#define IDS_WTALKHEADING 135
54#define IDR_WAVE_FINISHED 136
55#define IDS_TITLE_BROWSEFILE 136
56#define IDD_REQUEST 137
57#define IDS_LOG_RESOLVEFAILED 137
58#define IDS_LOG_FAILEDLOCALFILE 138
59#define IDD_PROPS_SOUNDS 138
60#define IDS_LOG_FAILEDTOOPEN 139
61#define IDM_POPUPS 140
62#define IDS_OTALXHEADING 140
63#define IDS_REGISTRYKEY 141
64#define IDS_KLEVERNET_URL 142
65#define IDR_WAVE_ABORTED 142
66#define IDS_LOGTIMEFORMAT 143
67#define IDS_DROPFILES_TITLE 144
68#define IDS_NOMULTIPLEDROP_TEXT 145
69#define IDI_BROWSE 145
70#define IDS_LOG_REQUESTING 146
71#define IDS_LOG_SENDING 147
72#define IDS_WTALKAT 148
73#define IDS_OTALXAT 149
74#define IDI_PLAY 149
75#define IDS_TFTP_ERROR_TSIZE 150
76#define IDD_PROPS_ACL 150
77#define IDS_TFTP_ERROR_BSIZE 151
78#define IDS_TFTP_ERROR_TOUT 152
79#define IDI_UP 152
80#define IDS_SELECT_TFTPROOT 153
81#define IDI_DOWN 153
82#define IDS_FILTER_WAV 154
83#define IDI_REMOVE 154
84#define IDS_TITLE_WAV 155
85#define IDS_BOX_CANTBIND 156
86#define IDS_NO_XFER_OP 157
87#define IDS_INVALID_IP 158
88#define IDS_INVALID_NETMASK 159
89#define IDS_INVALID_RULE 160
90#define IDS_LOG_LOGERROR 161
91#define IDS_TFTP_ERROR_TOOBIG 162
92#define IDS_LOG_DENYING 163
93#define IDC_KLEVERNET 1000
94#define IDC_CONNECTIONS 1001
95#define IDC_LOG 1003
96#define IDC_GET 1004
97#define IDC_PUT 1005
98#define IDC_ABORT 1006
99#define IDC_EXIT 1007
100#define IDC_TFTPROOT 1008
101#define IDC_TFTPSUBDIRS 1009
102#define IDC_RRQ_GIVEALL 1010
103#define IDC_RRQ_ALWAYSCONFIRM 1011
104#define IDC_RRQ_DENYALL 1012
105#define IDC_WRQ_TAKEALL 1013
106#define IDC_WRQ_PROMPTEXISTING 1014
107#define IDC_WRQ_ALWAYSCONFIRM 1015
108#define IDC_WRQ_DENYALL 1016
109#define IDC_PROMPTTIMEOUT 1017
110#define IDC_LISTENPORT 1018
111#define IDC_LISTENSPIN 1019
112#define IDC_SPEAKPORT 1020
113#define IDC_SPEAKSPIN 1021
114#define IDC_MAXUDPSIZE 1022
115#define IDC_MAXUDPSPIN 1023
116#define IDC_TIMEOUT 1024
117#define IDC_TIMESPIN 1025
118#define IDC_OPTIONS 1026
119#define IDC_BLOCKSIZE 1026
120#define IDC_BSIZESPIN 1027
121#define IDC_HOST 1028
122#define IDC_FILE 1029
123#define IDC_RENAME 1030
124#define IDC_REMOTEFILE 1030
125#define IDC_RESUME 1031
126#define IDC_REFRESH 1032
127#define IDC_BROWSE 1034
128#define IDC_TALKS 1035
129#define IDC_LOCALFILE 1036
130#define IDC_TYPE 1037
131#define IDC_BSIZE 1039
132#define IDC_RING 1041
133#define IDC_RING_BROWSE 1042
134#define IDC_RING_PLAY 1043
135#define IDC_ACL_LIST 1043
136#define IDC_FINISHED 1044
137#define IDC_ACL_UP 1044
138#define IDC_FINISHED_BROWSE 1045
139#define IDC_ACL_DOWN 1045
140#define IDC_FINISHED_PLAY 1046
141#define IDC_ACL_REMOVE 1046
142#define IDC_ABORTED 1047
143#define IDC_ACL_ADDR 1047
144#define IDC_ABORTED_BROWSE 1048
145#define IDC_ACL_RULE 1048
146#define IDC_ABORTED_PLAY 1049
147#define IDC_ACL_NETMASK 1049
148#define IDC_ACL_ADD 1050
149#define IDC_ACL_XFER 1051
150#define IDC_ACL_REPLACE 1052
151#define IDC_LISTENING 1052
152#define IDC_LOGFILE 1053
153#define IDC_LOGFILE_BROWSE 1054
154#define IDC_LISTENADDRESS 1055
155#define ID_TRAY_HELP 32771
156#define ID_TRAY_ABOUTPUMPKIN 32772
157#define ID_TRAY_EXIT 32773
158#define ID_TRAY_SENDFILE 32774
159#define ID_TRAY_FETCHFILE 32775
160#define ID_TRAY_OPTIONS 32776
161#define ID_TRAY_SHOWPUMPKINWINDOW 32777
162#define ID_TRAY_OPENFILESFOLDER 32778
163#define ID_TRAY_LISTEN 32780
164
165// Next default values for new objects
166//
167#ifdef APSTUDIO_INVOKED
168#ifndef APSTUDIO_READONLY_SYMBOLS
169#define _APS_NEXT_RESOURCE_VALUE 156
170#define _APS_NEXT_COMMAND_VALUE 32781
171#define _APS_NEXT_CONTROL_VALUE 1056
172#define _APS_NEXT_SYMED_VALUE 102
173#endif
174#endif
diff --git a/shared-code/BTreendex.h b/shared-code/BTreendex.h
deleted file mode 100644
index 88109ab..0000000
--- a/shared-code/BTreendex.h
+++ b/dev/null
@@ -1,595 +0,0 @@
1 #ifndef__BTREENDEX_H
2 #define__BTREENDEX_H
3
4#include "Dynamide.h"
5
6namespace Klever {
7
8template<class key,class value,int treeOrder,int cluster>
9 class CBTreendex : public CObject{
10public:
11 typedef LONG CBTPageRef;
12 struct CBTRecordRef {
13 CBTPageRef m_Page;
14 INT m_Offset;
15 CBTRecordRef(CBTPageRef page=-1,INT offset=-1) : m_Page(page), m_Offset(offset) {}
16 };
17 class CBTRecord : public CObject {
18 public:
19 CBTPageRef m_ptrLeft;
20 CBTPageRef m_ptrRight;
21 key m_Key;
22 value m_Value;
23 CBTRecord() : m_ptrLeft(-1), m_ptrRight(-1) {}
24 CBTRecord(key& _key,value& _value,CBTPageRef left=-1,CBTPageRef right=-1) : m_Key(_key), m_Value(_value), m_ptrLeft(left), m_ptrRight(right) {}
25 CBTRecord(CBTRecord& r) : m_Key(r.m_Key), m_Value(r.m_Value), m_ptrLeft(r.m_ptrLeft), m_ptrRight(r.m_ptrRight) {}
26
27 CBTRecord& operator=(CBTRecord& r) {m_Key=r.m_Key, m_Value=r.m_Value, m_ptrLeft=r.m_ptrLeft, m_ptrRight=r.m_ptrRight;return *this;}
28
29 void Serialize(CArchive& ar) {
30 if(ar.IsStoring()){
31 ar << m_ptrLeft;
32 ar << m_ptrRight;
33 }else{
34 ar >> m_ptrLeft;
35 ar >> m_ptrRight;
36 }
37 SerializeElements(ar,&m_Key,1);
38 SerializeElements(ar,&m_Value,1);
39 }
40 };
41 class CBTPage : public CArray<CBTRecord,CBTRecord&> {
42 public:
43 void Serialize(CArchive& ar) {
44 int nCount = -1;
45 if(ar.IsStoring()){
46 nCount = GetSize();
47 ar << nCount;
48 }else{
49 nCount = 0;
50 ar >> nCount;
51 RemoveAll();
52 SetSize(nCount);
53 }
54 for(int tmp=0;tmp<nCount;tmp++)
55 ElementAt(tmp).Serialize(ar);
56 }
57 };
58 typedef CDynamide<256,cluster> CBTDyna;
59 typedef CBTDyna::CDynaFile CBTDynaFile;
60 typedef CArray<CBTRecordRef,CBTRecordRef&> CBTRStack;
61
62 CBTDyna m_BT;
63 struct_btCrap {
64 BOOL m_bRootSet;
65 CBTPageRef m_Root;
66 } *m_BTCrap;
67 BOOL m_bRO;
68 CBTRStack m_btStack;
69 CBTPage m_stackTop;
70
71 CBTreendex() {}
72 ~CBTreendex() { Close(); }
73 BOOL Attach(CFile* file,BOOL bAutodelete) {
74 m_bRO = FALSE;
75 if(!m_BT.Attach(file,bAutodelete))
76 return FALSE;
77 return Attach();
78 }
79 BOOL Open(LPCTSTR file,BOOL bReadOnly) {
80 if(!m_BT.Open(file,bReadOnly))
81 return FALSE;
82 m_bRO = bReadOnly;
83 return Attach();
84 }
85 BOOL Create(LPCTSTR file) {
86 try{
87 CFile* f = new CFile(file,CFile::modeCreate|CFile::modeReadWrite|CFile::shareDenyRead|CFile::shareDenyWrite|CFile::typeBinary);
88 ASSERT(f);
89 return Attach(f,TRUE);
90 }catch(CException* e){
91 e->Delete();
92 return FALSE;
93 }
94 }
95 BOOL Attach() {
96 ASSERT(m_BT.IsOpened());
97 m_BTCrap = (_btCrap*)m_BT.m_FB.crap;
98 if(!m_BTCrap->m_bRootSet){
99 m_BTCrap->m_Root = AllocatePage();
100 if(m_BTCrap->m_Root<0)
101 return FALSE;
102 m_BTCrap->m_bRootSet = TRUE;
103 m_BT.Write1stBlock();
104 }
105 return TRUE;
106 }
107 BOOL Close() {
108 m_BT.Close();
109 return TRUE;
110 }
111 BOOL IsOpened() {
112 return m_BT.IsOpened();
113 }
114
115 BOOL Lookup(key& _key,value& value) {
116 if(!IsOpened())
117 return FALSE;
118 ASSERT(m_BTCrap->m_bRootSet);
119 if(!SeekToPage(_key))
120 return FALSE;
121 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
122 if(rr.m_Offset<0)
123 return FALSE;
124 ASSERT(rr.m_Offset<m_stackTop.GetSize());
125 if(_key != m_stackTop[rr.m_Offset].m_Key)
126 return FALSE;
127 value = m_stackTop[rr.m_Offset].m_Value;
128 return TRUE;
129 }
130 BOOL Add(key& _key,value& _value) {
131 if(!IsOpened())
132 return FALSE;
133 ASSERT(m_BTCrap->m_bRootSet);
134 if(!SeekToPage(_key))
135 return FALSE;
136 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
137 CBTRecord nuRecord(_key,_value);
138 if(rr.m_Offset<0){
139 if(m_stackTop.GetSize())
140 nuRecord.m_ptrLeft = m_stackTop[m_stackTop.GetUpperBound()].m_ptrRight;
141 }else if(rr.m_Offset==0){
142 nuRecord.m_ptrRight = m_stackTop[0].m_ptrLeft;
143 }else{
144 nuRecord.m_ptrLeft = m_stackTop[rr.m_Offset-1].m_ptrRight;
145 nuRecord.m_ptrRight = m_stackTop[rr.m_Offset].m_ptrLeft;
146 }
147 // ASSERT(rr.m_Offset==0 || (m_stackTop[rr.m_Offset-1].m_Key<_key && m_stackTop[rr.m_Offset-1].m_ptrRight<0));
148 // ASSERT(rr.m_Offset<0 || m_stackTop[rr.m_Offset].m_Key>=_key && m_stackTop[rr.m_Offset].m_ptrLeft<0);
149 if(rr.m_Offset>=0 && m_stackTop[rr.m_Offset].m_Key==_key){
150 // Exact match found - just replace.
151 m_stackTop[rr.m_Offset].m_Value = _value;
152 if(!SavePage(rr.m_Page,m_stackTop))
153 return FALSE;
154 return TRUE;
155 }
156 // Split the page and propagate the split if needed..
157 // Insert new element at rr.m_Offset..
158 BOOL nuisnew = TRUE;
159 for(int sp=m_btStack.GetUpperBound();sp>=0;sp--){
160 CBTPageRef opr = m_btStack[sp].m_Page;
161 int iAt = m_btStack[sp].m_Offset;
162 CBTPage op;
163 VERIFY(LoadPage(opr,op));
164 if(iAt<0)
165 iAt = op.GetSize();
166 else{
167 if(op[iAt].m_Key<nuRecord.m_Key)
168 iAt++;
169 ASSERT(iAt==op.GetSize() || op[iAt].m_Key > nuRecord.m_Key);
170 }
171 op.InsertAt(iAt,nuRecord);
172 if(iAt>0)
173 op[iAt-1].m_ptrRight=nuRecord.m_ptrLeft;
174 if(iAt<op.GetUpperBound())
175 op[iAt+1].m_ptrLeft=nuRecord.m_ptrRight;
176 if(op.GetSize()<=treeOrder*2){
177 // This isn't causing overflow
178 VERIFY(SavePage(opr,op));
179 return TRUE;
180 }
181 TRACE0("Split\n");
182 ASSERT(op.GetSize()==(treeOrder*2+1));
183 CBTPageRef npr = AllocatePage();
184 ASSERT(npr>=0);
185 CBTPage np;
186 ASSERT(LoadPage(npr,np));
187 ASSERT(!np.GetSize());
188 nuRecord = op[treeOrder];
189 if(iAt==treeOrder){
190 // We're inserting central element! - drop out the stack top if this is still new one
191 for(int tmp=0;tmp<treeOrder;tmp++)
192 np.InsertAt(tmp,op[tmp]);
193 op.RemoveAt(0,treeOrder+1);
194 nuRecord.m_ptrLeft = npr;
195 nuRecord.m_ptrRight = opr;
196 if(nuisnew)
197 m_btStack.RemoveAt(m_btStack.GetUpperBound());
198 }else{
199 if(iAt<treeOrder){
200 // We're inserting in the left subtree.
201 // Make newpage the right one and forget it.
202 for(int tmp=0;tmp<treeOrder;tmp++)
203 np.InsertAt(tmp,op[tmp+treeOrder+1]);
204 op.RemoveAt(treeOrder,treeOrder+1);
205 nuRecord.m_ptrLeft = opr;
206 nuRecord.m_ptrRight = npr;
207 }else{
208 // We're inserting in the right subtree.
209 // Make newpage the left one, forget it, but also adjust offset in the stack
210 for(int tmp=0;tmp<treeOrder;tmp++)
211 np.InsertAt(tmp,op[tmp]);
212 op.RemoveAt(0,treeOrder+1);
213 nuRecord.m_ptrLeft = npr;
214 nuRecord.m_ptrRight = opr;
215 m_btStack[sp].m_Offset-=treeOrder+1;
216 }
217 // Note that we're not inserting new element anymore.
218 nuisnew = FALSE;
219 }
220 // Do, excessive sanity checks and save pages
221 ASSERT(op.GetSize());
222 ASSERT(np.GetSize());
223 VERIFY(SavePage(opr,op));
224 VERIFY(SavePage(npr,np));
225 }
226 // Here we have root page overflow, which means that we're simply putting new
227 // record in this brand new root page and also inserting this page on the bottom of the stack
228 CBTPageRef nuroot = AllocatePage();
229 ASSERT(nuroot>=0);
230 CBTPage nurpa;
231 ASSERT(LoadPage(nuroot,nurpa));
232 ASSERT(!nurpa.GetSize());
233 nurpa.Add(nuRecord);
234 VERIFY(SavePage(nuroot,nurpa));
235 m_btStack.InsertAt(0,CBTRecordRef(nuroot,0));
236 m_BTCrap->m_Root = nuroot;
237 m_BT.Write1stBlock();
238 return TRUE;
239 }
240 BOOL Delete(key& _key) {
241 if(!IsOpened())
242 return FALSE;
243 ASSERT(m_BTCrap->m_bRootSet);
244 value _value;
245 if(!Lookup(_key,_value))
246 return FALSE;
247 // Found key, check if it's a leaf
248 {
249 CBTRecordRef* rr = &m_btStack[m_btStack.GetUpperBound()];
250 int rrIdx = m_btStack.GetUpperBound();
251 if(m_stackTop[rr->m_Offset].m_ptrLeft>=0){
252 ASSERT(m_stackTop[rr->m_Offset].m_ptrRight>=0);
253 // It isn't - scan for the _next_ key and do dirty deeds
254 m_btStack.Add(CBTRecordRef(m_stackTop[rr->m_Offset].m_ptrRight,0));
255 for(;;){
256 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
257 if(!LoadPage(rr.m_Page,m_stackTop))
258 return FALSE;
259 if(m_stackTop[0].m_ptrLeft<0)
260 break;
261 m_btStack.Add(CBTRecordRef(m_stackTop[0].m_ptrLeft,0));
262 }
263 // We have a leaf node here, replace victim with the first element and kill it.
264 CBTPage uppage;
265 rr = &m_btStack[rrIdx];
266 if(!LoadPage(rr->m_Page,uppage))
267 return FALSE;
268 uppage[rr->m_Offset].m_Key=m_stackTop[0].m_Key; uppage[rr->m_Offset].m_Value=m_stackTop[0].m_Value;
269 m_stackTop.RemoveAt(0);
270 if(!(SavePage(rr->m_Page,uppage) && SavePage(m_btStack[m_btStack.GetUpperBound()].m_Page,m_stackTop)))
271 return FALSE;
272 }else{
273 ASSERT(m_stackTop[rr->m_Offset].m_ptrRight<0);
274 m_stackTop.RemoveAt(rr->m_Offset);
275 if(!SavePage(rr->m_Page,m_stackTop))
276 return FALSE;
277 }
278 }
279 // We have a page to check for underflow at the top of the stack now.
280 for(;;){
281 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
282 if(!LoadPage(rr.m_Page,m_stackTop))
283 return FALSE;
284 if(m_stackTop.GetSize()>=treeOrder || m_btStack.GetSize()==1)
285 return TRUE;
286 CBTRecordRef& rr1 = m_btStack[m_btStack.GetUpperBound()-1];
287 CBTPage daddy;
288 if(!LoadPage(rr1.m_Page,daddy))
289 return FALSE;
290 CBTPageRef nPage = daddy[rr1.m_Offset].m_ptrRight;
291 BOOL bRight=TRUE;
292 if(nPage<0 || nPage==rr.m_Page){
293 nPage = daddy[rr1.m_Offset].m_ptrLeft;
294 bRight = FALSE;
295 }
296 ASSERT(nPage>=0 && nPage!=rr.m_Page);
297 CBTPage neighbor;
298 if(!LoadPage(nPage,neighbor))
299 return FALSE;
300 // Here we have possibly two cases:
301 // 1. Neighboring page can share some data with use, then do share and leave
302 // 2. Neighboring page is of treeorder in size, then merge and propagate
303 if(neighbor.GetSize()>treeOrder){
304 TRACE0("Redistributing..\n");
305 // Borrow some data from there.
306 int toBorrow = neighbor.GetSize()-treeOrder;
307 toBorrow=toBorrow/2+1;
308 ASSERT(toBorrow);
309 if(bRight)
310 m_stackTop.Add(CBTRecord(daddy[rr1.m_Offset].m_Key,daddy[rr1.m_Offset].m_Value,m_stackTop[m_stackTop.GetUpperBound()].m_ptrRight,neighbor[0].m_ptrLeft));
311 else
312 m_stackTop.InsertAt(0,CBTRecord(daddy[rr1.m_Offset].m_Key,daddy[rr1.m_Offset].m_Value,neighbor[neighbor.GetUpperBound()].m_ptrRight,m_stackTop[0].m_ptrLeft));
313 for(toBorrow--;toBorrow;toBorrow--){
314 if(bRight){
315 m_stackTop.Add(neighbor[0]);
316 neighbor.RemoveAt(0);
317 }else{
318 m_stackTop.InsertAt(0,neighbor[neighbor.GetUpperBound()]);
319 neighbor.RemoveAt(neighbor.GetUpperBound());
320 }
321 }
322 daddy[rr1.m_Offset].m_Key = neighbor[bRight?0:neighbor.GetUpperBound()].m_Key; daddy[rr1.m_Offset].m_Value = neighbor[bRight?0:neighbor.GetUpperBound()].m_Value;
323 neighbor.RemoveAt(bRight?0:neighbor.GetUpperBound());
324 if(!(SavePage(rr1.m_Page,daddy) && SavePage(nPage,neighbor) && SavePage(rr.m_Page,m_stackTop)))
325 return FALSE;
326 rr.m_Offset = -1;// *** Point to the next??
327 return TRUE;
328 }
329 TRACE0("Merging..\n");
330 // We need to merge pages here..
331 // We will merge them at stacktop, then we'll discard neighbor guy..
332 if(bRight)
333 m_stackTop.Add(CBTRecord(daddy[rr1.m_Offset].m_Key,daddy[rr1.m_Offset].m_Value,m_stackTop[m_stackTop.GetUpperBound()].m_ptrRight,neighbor[0].m_ptrLeft));
334 else
335 m_stackTop.InsertAt(0,CBTRecord(daddy[rr1.m_Offset].m_Key,daddy[rr1.m_Offset].m_Value,neighbor[neighbor.GetUpperBound()].m_ptrRight,m_stackTop[0].m_ptrLeft));
336 if(bRight){
337 while(neighbor.GetSize()){
338 m_stackTop.Add(neighbor[0]);
339 neighbor.RemoveAt(0);
340 }
341 }else{
342 while(neighbor.GetSize()){
343 m_stackTop.InsertAt(0,neighbor[neighbor.GetUpperBound()]);
344 neighbor.RemoveAt(neighbor.GetUpperBound());
345 }
346 }
347 if(rr1.m_Offset>0)
348 daddy[rr1.m_Offset-1].m_ptrRight=rr.m_Page;
349 if(rr1.m_Offset<daddy.GetUpperBound())
350 daddy[rr1.m_Offset+1].m_ptrLeft=rr.m_Page;
351 daddy.RemoveAt(rr1.m_Offset);
352 if(!(SavePage(rr1.m_Page,daddy) && SavePage(rr.m_Page,m_stackTop)))
353 return FALSE;
354 VERIFY(DeallocatePage(nPage));
355 m_btStack.RemoveAt(m_btStack.GetUpperBound());
356 }
357 return FALSE;
358 }
359 BOOL GoFirst() {
360 if(!IsOpened())
361 return FALSE;
362 ASSERT(m_BTCrap->m_bRootSet);
363 m_btStack.RemoveAll();
364 m_btStack.Add(CBTRecordRef(m_BTCrap->m_Root,-1));
365 for(;;){
366 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
367 if(!LoadPage(rr.m_Page,m_stackTop))
368 return FALSE;
369 if(!m_stackTop.GetSize()){
370 ASSERT(m_btStack.GetSize()==1);
371 return FALSE;
372 }
373 rr.m_Offset = 0;
374 if(m_stackTop[rr.m_Offset].m_ptrLeft<0)
375 return TRUE;
376 m_btStack.Add(CBTRecordRef(m_stackTop[rr.m_Offset].m_ptrLeft,-1));
377 }
378 }
379 BOOL GoLast() {
380 if(!IsOpened())
381 return FALSE;
382 ASSERT(m_BTCrap->m_bRootSet);
383 m_btStack.RemoveAll();
384 m_btStack.Add(CBTRecordRef(m_BTCrap->m_Root,-1));
385 for(;;){
386 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
387 if(!LoadPage(rr.m_Page,m_stackTop))
388 return FALSE;
389 if(!m_stackTop.GetSize()){
390 ASSERT(m_btStack.GetSize()==1);
391 return FALSE;
392 }
393 rr.m_Offset = m_stackTop.GetUpperBound();
394 if(m_stackTop[rr.m_Offset].m_ptrRight<0)
395 return TRUE;
396 m_btStack.Add(CBTRecordRef(m_stackTop[rr.m_Offset++].m_ptrRight,-1));
397 }
398 }
399 BOOL GoNext() {
400 if(!IsOpened())
401 return FALSE;
402 if(!(m_btStack.GetSize() && m_btStack[m_btStack.GetUpperBound()].m_Offset>=0))
403 return FALSE;
404 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
405 if(!LoadPage(rr.m_Page,m_stackTop))
406 return FALSE;
407 ASSERT(rr.m_Offset<m_stackTop.GetSize());
408 if(m_stackTop[rr.m_Offset].m_ptrRight>=0){
409 // Advance pointer in this page and dive into subtree
410 // going left and left until we have nowhere to go.
411 // TRACE1("Dive into page %lu",m_stackTop[rr.m_Offset].m_ptrRight);
412 m_btStack.Add(CBTRecordRef(m_stackTop[rr.m_Offset++].m_ptrRight,0));
413 for(;;){
414 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
415 ASSERT(rr.m_Offset==0);
416 if(!LoadPage(rr.m_Page,m_stackTop))
417 return FALSE;
418 if(m_stackTop[rr.m_Offset].m_ptrLeft<0)
419 break;
420 // TRACE1(", %lu",m_stackTop[rr.m_Offset].m_ptrLeft);
421 m_btStack.Add(CBTRecordRef(m_stackTop[rr.m_Offset].m_ptrLeft,0));
422 }
423 // TRACE0("\n");
424 return TRUE;
425 }else if(rr.m_Offset<m_stackTop.GetUpperBound()){
426 rr.m_Offset++;
427 return TRUE;
428 }
429 // We're at the end of page go up until we're done or we have data.
430 m_btStack.RemoveAt(m_btStack.GetUpperBound());
431 // TRACE0("Go up");
432 while(m_btStack.GetSize()){
433 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
434 if(!LoadPage(rr.m_Page,m_stackTop))
435 return FALSE;
436 if(rr.m_Offset<m_stackTop.GetSize()){
437 // TRACE0("\n");
438 return TRUE;
439 }
440 // TRACE0(", up");
441 m_btStack.RemoveAt(m_btStack.GetUpperBound());
442 }
443 // TRACE0("\nBtree is done\n");
444 return FALSE;
445 }
446 BOOL GoPrev() {
447 if(!IsOpened())
448 return FALSE;
449 if(!(m_btStack.GetSize() && m_btStack[m_btStack.GetUpperBound()].m_Offset>=0))
450 return FALSE;
451 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
452 if(!LoadPage(rr.m_Page,m_stackTop))
453 return FALSE;
454 ASSERT(rr.m_Offset<m_stackTop.GetSize());
455 if(m_stackTop[rr.m_Offset].m_ptrLeft>=0){
456 // Dive in and go right and right from the rightmost until
457 // we have nowhere to go.
458 m_btStack.Add(CBTRecordRef(m_stackTop[rr.m_Offset].m_ptrLeft,-1));
459 for(;;){
460 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
461 if(!LoadPage(rr.m_Page,m_stackTop))
462 return FALSE;
463 rr.m_Offset = m_stackTop.GetUpperBound();
464 if(m_stackTop[rr.m_Offset].m_ptrRight<0)
465 return TRUE;
466 m_btStack.Add(CBTRecordRef(m_stackTop[rr.m_Offset++].m_ptrRight,-1));
467 }
468 return TRUE;
469 }else if(rr.m_Offset>0){
470 rr.m_Offset--;
471 return TRUE;
472 }
473 // We're at the leftmost element in page - go up and left until we're
474 // done or we have data.
475 m_btStack.RemoveAt(m_btStack.GetUpperBound());
476 while(m_btStack.GetSize()){
477 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
478 if(!LoadPage(rr.m_Page,m_stackTop))
479 return FALSE;
480 rr.m_Offset--;
481 if(rr.m_Offset>=0)
482 return TRUE;
483 m_btStack.RemoveAt(m_btStack.GetUpperBound());
484 }
485 // No more data - we were at the first element in tree.
486 return FALSE;
487 }
488 BOOL GetThis(key& _key,value& _value) {
489 if(!IsOpened())
490 return FALSE;
491 // *** MORE CHECKING
492 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
493 if(!LoadPage(rr.m_Page,m_stackTop))
494 return FALSE;
495 _key = m_stackTop[rr.m_Offset].m_Key;
496 _value = m_stackTop[rr.m_Offset].m_Value;
497 return TRUE;
498 }
499
500 BOOL SeekToPage(const key& _key) {
501 ASSERT(IsOpened());
502 ASSERT(m_BTCrap->m_bRootSet);
503 m_btStack.RemoveAll();
504 m_btStack.Add(CBTRecordRef(m_BTCrap->m_Root,-1));
505 for(;;){
506 CBTRecordRef& rr = m_btStack[m_btStack.GetUpperBound()];
507 if(!LoadPage(rr.m_Page,m_stackTop))
508 return FALSE;
509 ASSERT(m_stackTop.GetSize() || !m_btStack.GetUpperBound());
510 if(!m_stackTop.GetSize()){
511 rr.m_Offset=-1;
512 return TRUE;
513 }
514 for(rr.m_Offset=0;rr.m_Offset<m_stackTop.GetSize();rr.m_Offset++){
515 if(_key == m_stackTop[rr.m_Offset].m_Key)
516 return TRUE;
517 if(_key < m_stackTop[rr.m_Offset].m_Key){
518 ASSERT(rr.m_Offset==0 || m_stackTop[rr.m_Offset].m_ptrLeft==m_stackTop[rr.m_Offset-1].m_ptrRight);
519 if(m_stackTop[rr.m_Offset].m_ptrLeft<0)
520 return TRUE;
521 m_btStack.Add(CBTRecordRef(m_stackTop[rr.m_Offset].m_ptrLeft,-1));
522 break;
523 }
524 if(rr.m_Offset==m_stackTop.GetUpperBound()){
525 if(m_stackTop[rr.m_Offset].m_ptrRight<0){
526 rr.m_Offset=-1;
527 return TRUE;
528 }
529 m_btStack.Add(CBTRecordRef(m_stackTop[rr.m_Offset].m_ptrRight,-1));
530 break;
531 }
532 }
533 }
534 }
535
536 BOOL LoadPage(CBTPageRef ref,CBTPage& page) {
537 CFile* pageFile = m_BT.OpenFile(ref);
538 if(!pageFile)
539 return FALSE;
540 BOOL rv = TRUE;
541 try{
542 CArchive ar(pageFile,CArchive::load);
543 page.Serialize(ar);
544 if(m_bRO)
545 page.FreeExtra();// ** ???
546 ar.Close();
547 }catch(CException* e){
548 e->Delete();
549 rv = FALSE;
550 }
551 delete pageFile;
552 return rv;
553 }
554 BOOL SavePage(CBTPageRef ref,CBTPage& page) {
555 CFile* pageFile = m_BT.OpenFile(ref);
556 if(!pageFile)
557 return FALSE;
558 BOOL rv = TRUE;
559 try{
560 CArchive ar(pageFile,CArchive::store);
561 page.Serialize(ar);
562 ar.Close();
563 }catch(CException* e){
564 e->Delete();
565 rv = FALSE;
566 }
567 delete pageFile;
568 return rv;
569 }
570 CBTPageRef AllocatePage() {
571 CBTDynaFile* pageFile = m_BT.CreateFile();
572 if(!pageFile)
573 return -1;
574 CBTPage nothing;
575 CBTPageRef rv = pageFile->GetFile();
576 try{
577 CArchive ar(pageFile,CArchive::store);
578 nothing.Serialize(ar);
579 ar.Close();
580 }catch(CException* e){
581 e->Delete();
582 rv = -1;
583 }
584 delete pageFile;
585 return rv;
586 }
587 BOOL DeallocatePage(CBTPageRef ref) {
588 return m_BT.DeleteFile(ref);
589 }
590
591};
592
593};
594
595 #endif// __BTREENDEX_H
diff --git a/shared-code/BellsNWhistles.h b/shared-code/BellsNWhistles.h
deleted file mode 100644
index 1de77ae..0000000
--- a/shared-code/BellsNWhistles.h
+++ b/dev/null
@@ -1,146 +0,0 @@
1 #ifndef__BELLSNWHISTLES_H
2#define __BELLSNWHISTLES_H
3
4 class CBellsNWhistles{
5public:
6 class CBang {
7 public:
8 CString m_codeName;
9 enum_bangType {
10 bangNone, bangSpeaker, bangSystem, bangResource,
11 bangWaveform
12 }m_type;
13 BOOL m_bLoop;
14 union{
15 UINT system;
16 LPCTSTR resource;
17 LPCTSTR wave;
18
19 LPCTSTR str;
20 UINT id;
21 };
22 CString m_strWave;
23 CBang() : m_type(bangNone), m_bLoop(FALSE) {}
24 };
25 typedef CTypedPtrMap<CMapStringToPtr,CString,CBang*> CBangs;
26 structCBelling {
27 LPCSTR snd;
28 HMODULE hm;
29 DWORD flags;
30 CBelling(LPCSTR snd,HMODULE hm,DWORD flags) : snd(snd), hm(hm),
31 flags(flags) {}
32 CBelling(CBelling& s) : snd(s.snd), hm(s.hm), flags(s.flags) {}
33 CBelling& operator=(CBelling& s) {
34 snd=s.snd; hm=s.hm; flags=s.flags;
35 return *this;
36 }
37 };
38 typedef CBelling* Whistling;
39
40 CBangs m_bangs;
41
42 ~CBellsNWhistles() {
43 POSITION p = m_bangs.GetStartPosition();
44 while(p){
45 CString s; CBang* b;
46 m_bangs.GetNextAssoc(p,s,b);
47 delete b;
48 }
49 m_bangs.RemoveAll();
50 }
51
52 BOOL AssignSound(LPCTSTR codeName,LPCTSTR id,CBang::_bangType type=CBang::bangWaveform) {
53 CString cn = codeName;
54 cn.MakeLower();
55 CBang* b;
56 if(!m_bangs.Lookup(cn,b)) {
57 b = new CBang;
58 b->m_codeName=cn;
59 m_bangs[cn]=b;
60 }
61 b->m_type=type;
62 b->str = id;
63 if(type==CBang::bangWaveform){
64 b->m_strWave=id; b->str = b->m_strWave;
65 }
66 return TRUE;
67 }
68 BOOL AssignSound(LPCTSTR codeName,UINT nID,CBang::_bangType type=CBang::bangResource) {
69 CString cn = codeName;
70 cn.MakeLower();
71 CBang* b;
72 if(!m_bangs.Lookup(cn,b)) {
73 b = new CBang;
74 b->m_codeName=cn;
75 m_bangs[cn]=b;
76 }
77 b->m_type=type;
78 b->id = nID;
79 ASSERT(type!=CBang::bangWaveform);
80 return TRUE;
81 }
82 BOOL UnassignSound(LPCTSTR codeName) {
83 CString cn = codeName;
84 cn.MakeLower();
85 CBang* b;
86 if(m_bangs.Lookup(cn,b)) {
87 m_bangs.RemoveKey(cn);
88 delete b;
89 return TRUE;
90 }
91 return FALSE;
92 }
93
94 Whistling StartSound(LPCTSTR codeName) {
95 Whistling* rv = NULL;
96 CString cn = codeName;
97 CBang* b;
98 if(!m_bangs.Lookup(cn,b)){
99 ::PlaySound(cn,AfxGetInstanceHandle(),SND_ASYNC|SND_NODEFAULT|SND_NOWAIT|SND_FILENAME);
100 return NULL;
101 }
102 UINT flags = SND_ASYNC|SND_NODEFAULT|SND_NOWAIT;
103 LPCSTR snd = NULL;
104 switch(b->m_type){
105 case CBang::bangNone: return NULL;
106 case CBang::bangSpeaker: MessageBeep(0xFFFFFFFF); return NULL;
107 case CBang::bangSystem: MessageBeep(b->system); return NULL;
108 case CBang::bangResource:
109 snd = b->resource;
110 flags|=SND_RESOURCE; break;
111 case CBang::bangWaveform:
112 snd = b->wave;
113 flags|=SND_FILENAME; break;
114#ifdef _DEBUG
115 default:
116 ASSERT(FALSE); return NULL;
117#endif
118 }
119 if(b->m_bLoop)
120 flags|=SND_LOOP;
121 HMODULE hm = AfxGetInstanceHandle();
122 if(!::PlaySound(snd,hm,flags))
123 return NULL;
124 return b->m_bLoop?new CBelling(snd,hm,flags):NULL;
125 }
126 BOOL StopSound(Whistling whistle) {
127 if(!whistle)
128 return FALSE;
129 ::PlaySound(whistle->snd,whistle->hm,whistle->flags|SND_PURGE);
130 delete whistle;
131 return TRUE;
132 }
133 UINT FillInCombo(CComboBox* combo) {
134 POSITION p = m_bangs.GetStartPosition();
135 UINT rv = 0;
136 while(p) {
137 CString s;
138 CBang* b;
139 m_bangs.GetNextAssoc(p,s,b);
140 combo->AddString(s);
141 }
142 return rv;
143 }
144};
145
146 #endif// _BELLSNWHISTLES_H \ No newline at end of file
diff --git a/shared-code/BitSet.h b/shared-code/BitSet.h
deleted file mode 100644
index cf36e3b..0000000
--- a/shared-code/BitSet.h
+++ b/dev/null
@@ -1,105 +0,0 @@
1 #ifndef__BITSET_H
2#define __BITSET_H
3
4namespace Klever {
5
6 class CBitSet: public CObject {
7public:
8 CWordArray m_Bits;
9 ULONG m_BitsInSet;
10 enum{
11 bitsPerWord = sizeof(WORD)*8
12 };
13
14 CBitSet(ULONG size = 0) : m_BitsInSet(0) { SetSize(size); }
15 CBitSet(CBitSet& o) : m_BitsInSet(0) { CopyFrom(o); }
16
17 void SetSize(ULONG size,BOOL bFillOnes=FALSE) {
18 UINT os = m_Bits.GetSize();
19 UINT ns = (size+bitsPerWord-1)/bitsPerWord;
20 if(os==ns){
21 if(os){
22 if(bFillOnes)
23 m_Bits[m_BitsInSet/bitsPerWord]|=(~(WORD)0)<<(m_BitsInSet%bitsPerWord);
24 else
25 m_Bits[m_BitsInSet/bitsPerWord]&=~((~(WORD)0)<<(m_BitsInSet%bitsPerWord));
26 }
27 m_BitsInSet=size;
28 }else{
29 // *?* ASSERT((!os) || (((os-1)*bitsPerWord)<=m_BitsInSet && m_BitsInSet<(os*bitsPerWord)));
30 if(os<ns){
31 m_Bits.SetSize(ns);
32 if(bFillOnes)
33 m_Bits[m_BitsInSet/bitsPerWord]|=(~(WORD)0)<<(m_BitsInSet%bitsPerWord);
34 else
35 m_Bits[m_BitsInSet/bitsPerWord]&=~((~(WORD)0)<<(m_BitsInSet%bitsPerWord));
36 WORD* ws = m_Bits.GetData();
37 ASSERT(ws);
38 memset(&ws[os],bFillOnes?0xFF:0,(ns-os)*sizeof(WORD));
39 m_BitsInSet=size;
40 }else{
41 m_Bits.SetSize(ns);
42 m_BitsInSet=size;
43 }
44 }
45 }
46 BOOL BitSet(UINT bit,BOOL bGrow=TRUE) { return SetBit(bit,TRUE,bGrow); }
47 BOOL BitClear(UINT bit,BOOL bGrow=TRUE) { return SetBit(bit,FALSE,bGrow); }
48 BOOL SetBit(UINT bit,BOOL state,BOOL bGrow=TRUE) {
49 if(m_BitsInSet<=bit){
50 if(!bGrow)
51 return FALSE;
52 SetSize(bit+1);
53 }
54 WORD mask = ((WORD)1)<<(bit%bitsPerWord);
55 if(state)
56 m_Bits[bit/bitsPerWord]|=mask;
57 else
58 m_Bits[bit/bitsPerWord]&=~mask;
59 return TRUE;
60 }
61 BOOL IsSet(UINT bit) {
62 if(m_BitsInSet<=bit)
63 return FALSE;
64 return (m_Bits[bit/bitsPerWord]&(((WORD)1)<<(bit%bitsPerWord)))!=0;
65 }
66 void Invert() {
67 for(int i=m_Bits.GetUpperBound();i>=0;i--)
68 m_Bits[i]=~m_Bits[i];
69 }
70 CBitSet& operator&=(CBitSet& o) {
71 if(o.m_BitsInSet<m_BitsInSet)
72 SetSize(o.m_BitsInSet);
73 for(int i=m_Bits.GetUpperBound();i>=0;i--)
74 m_Bits[i]&=o.m_Bits[i];
75 return *this;
76 }
77 CBitSet& operator|=(CBitSet& o) {
78 if(o.m_BitsInSet>m_BitsInSet)
79 SetSize(o.m_BitsInSet);
80 for(int i=o.m_Bits.GetUpperBound();i>=0;i--)
81 m_Bits[i]|=o.m_Bits[i];
82 return *this;
83 }
84 CBitSet& operator=(CBitSet& o) {
85 CopyFrom(o);
86 return *this;
87 }
88 void CopyFrom(CBitSet& o) {
89 m_BitsInSet=o.m_BitsInSet;
90 m_Bits.Copy(o.m_Bits);
91 }
92 void Serialize(CArchive& ar) {
93 if(ar.IsStoring()){
94 ar << m_BitsInSet;
95 m_Bits.Serialize(ar);
96 }else{
97 ar >> m_BitsInSet;
98 m_Bits.Serialize(ar);
99 }
100 }
101};
102
103};
104
105#endif // __BITSET_H
diff --git a/shared-code/Dynamide.h b/shared-code/Dynamide.h
deleted file mode 100644
index 32c93f7..0000000
--- a/shared-code/Dynamide.h
+++ b/dev/null
@@ -1,443 +0,0 @@
1#ifndef __DYNAMIDE_H
2#define __DYNAMIDE_H
3
4#include "LRUCache.h"
5
6namespace Klever {
7
8template<int fbSize,int bSize>
9class CDynamide : public CObject {
10 structfirstBlock {
11 LONGfreeFile;
12 BYTEcrap[fbSize-sizeof(LONG)];
13 };
14 structtheBlock {
15 LONGnext;
16 BYTEdata[bSize-sizeof(LONG)];
17 };
18public:
19 static firstBlock FirstBlock;
20 static theBlock TheBlock;
21private:
22 classCDynaCache : public CLRUCache<DWORD,DWORD,theBlock> {
23 public:
24 CFile* m_File;
25 BOOL m_bAutodelete;
26 CDynaCache(CFile* file,BOOL bAutodelete=TRUE) : CLRUCache<DWORD,DWORD,theBlock>(64) {
27 m_File=file;
28 m_bAutodelete=bAutodelete;
29 }
30 virtual ~CDynaCache() {
31 Flush();
32 if(m_bAutodelete){
33 m_File->Close();
34 delete m_File;
35 }
36 }
37 virtual BOOL _ReadIn(DWORD idx,theBlock* data) {
38 LONG p = sizeof(firstBlock)+idx*sizeof(theBlock);
39 LONG s = m_File->Seek(p,CFile::begin);
40 if(p==s){
41 UINT rb = m_File->Read(data,sizeof(*data));
42 if(rb==sizeof(*data))
43 return TRUE;
44 if(rb)
45 return FALSE;
46 memset(data,0,sizeof(*data));
47 data->next=-1;
48 try{
49 m_File->Write(data,sizeof(*data));
50 }catch(CException* e){
51 e->Delete();
52 return FALSE;
53 }
54 }else{
55 LONG togo = p-s;
56 ASSERT(togo>0);
57 ASSERT(!(togo%sizeof(theBlock)));
58 memset(data,0,sizeof(*data));
59 data->next=-1;
60 while(togo>=0){
61 try{
62 m_File->Write(data,sizeof(*data));
63 }catch(CException* e){
64 e->Delete();
65 return FALSE;
66 }
67 }
68 }
69 return TRUE;
70 }
71 virtual BOOL _WriteOut(DWORD idx,theBlock* data) {
72 LONG p = sizeof(firstBlock)+idx*sizeof(theBlock);
73 LONG s = m_File->Seek(p,CFile::begin);
74 if(p!=s)
75 return FALSE;
76 try{
77 m_File->Write(data,sizeof(*data));
78 }catch(CException* e){
79 e->Delete();
80 return FALSE;
81 }
82 return TRUE;
83 }
84 DWORD AllocateNode() {
85 LONG l = m_File->GetLength();
86 ASSERT(!((l-sizeof(firstBlock))%sizeof(theBlock)));
87 m_File->SetLength(l+sizeof(theBlock));
88 return (l-sizeof(firstBlock))/sizeof(theBlock);
89 }
90 BOOL Read1stBlock(firstBlock* fb) {
91 m_File->SeekToBegin();
92 UINT rb = m_File->Read(fb,sizeof(*fb));
93 if(rb==sizeof(*fb))
94 return TRUE;
95 if(rb)
96 return FALSE;
97 memset(fb,0,sizeof(*fb));
98 fb->freeFile = -1;
99 try{
100 m_File->Write(fb,sizeof(*fb));
101 }catch(CException* e){
102 e->Delete();
103 return FALSE;
104 }
105 return TRUE;
106 }
107 BOOL Write1stBlock(firstBlock* fb) {
108 m_File->SeekToBegin();
109 try{
110 m_File->Write(fb,sizeof(*fb));
111 }catch(CException* e){
112 e->Delete();
113 return FALSE;
114 }
115 return TRUE;
116 }
117 };
118public:
119 class CDynaFile : public CFile{
120 public:
121 CDynamide<fbSize,bSize>* m_Daddy;
122 CArray<LONG,LONG> m_Blocks;
123 LONG m_Position;
124
125 CDynaFile(CDynamide<fbSize,bSize>* daddy) : m_Daddy(NULL) { AttachToDaddy(daddy); }
126 virtual ~CDynaFile() { Close(); DetachFromDaddy(); }
127
128 void AttachToDaddy(CDynamide<fbSize,bSize>* daddy) {
129 ASSERT(!m_Daddy);
130 ASSERT(daddy);
131 m_Daddy=daddy;
132 m_Daddy->AttachDynaFile(this);
133 }
134 void DetachFromDaddy() {
135 ASSERT(m_Daddy);
136 ASSERT(!IsOpened());
137 m_Daddy->DetachDynaFile(this);
138 m_Daddy=NULL;
139 }
140
141 BOOL Create() {
142 if(IsOpened())
143 return FALSE;
144 m_Blocks.SetAtGrow(0,m_Daddy->Allocate());
145 ASSERT(m_Blocks[0]>=0);
146 m_Position=0;
147 return TRUE;
148 }
149 BOOL Open(LONG fb) {
150 if(IsOpened())
151 return FALSE;
152 ASSERT(fb>=0);
153 theBlock* b;
154 do{
155 m_Blocks.Add(fb);
156 b = m_Daddy->m_File->GetCached(fb);
157 ASSERT(b);
158 fb=b->next;
159 if(m_Blocks[m_Blocks.GetUpperBound()]==fb)
160 return FALSE;
161 }while(fb>=0);
162 m_Position=0;
163 return TRUE;
164 }
165
166 LONG GetFile() {
167 if(!IsOpened())
168 return -1;
169 return m_Blocks[0];
170 }
171 virtual DWORD GetPosition() const {
172 if(!IsOpened())
173 return 0;
174 if(m_Position<0)
175 return 0;
176 if(m_Position>GetLength())
177 return GetLength();
178 return m_Position;
179 }
180 virtual CString GetFileName() {
181 CString rv;
182 if(IsOpened())
183 rv.Format("0x%08lX",m_Blocks[0]);
184 else
185 rv.Format("None");
186 return rv;
187 }
188 virtual CString GetFileTitle() { return GetFileName(); }
189 virtual CString GetFilePath() { return GetFileName(); }
190 virtual void SetFilePath(LPCTSTR lpszNewName) { ASSERT(FALSE); }
191
192 virtual BOOL Open(LPCTSTR lpszFileName, UINT nOpenFlags, CFileException* pError = NULL) { ASSERT(FALSE); return FALSE; }
193 virtual CFile* Duplicate() { ASSERT(FALSE); return NULL; }
194
195 virtual LONG Seek(LONG lOff, UINT nFrom) {
196 if(!IsOpened())
197 return -1;
198 switch(nFrom){
199 case CFile::begin:
200 m_Position=lOff;
201 break;
202 case CFile::current:
203 m_Position+=lOff;
204 break;
205 case CFile::end:
206 m_Position=GetLength()+lOff;
207 break;
208 default:
209 ASSERT(FALSE);
210 return -1;
211 }
212 if(m_Position<0)
213 m_Position=0;
214 if(m_Position>GetLength())
215 m_Position=GetLength();
216 return m_Position;
217 }
218 virtual void SetLength(DWORD dwNewLen) {
219 if(!IsOpened())
220 return;
221 if(dwNewLen<GetLength()){
222 dwNewLen=dwNewLen+sizeof(TheBlock.data);
223 dwNewLen-=dwNewLen%sizeof(TheBlock.data);
224 while(dwNewLen<GetLength() && m_Blocks.GetSize()>1){
225 LONG mb = m_Blocks[m_Blocks.GetUpperBound()];
226 LONG mb1 = m_Blocks[m_Blocks.GetUpperBound()-1];
227 theBlock* b = m_Daddy->m_File->GetCached(mb1);
228 ASSERT(b);
229 ASSERT(b->next==mb);
230 b->next=-1;
231 m_Daddy->m_File->MakeDirty(mb1);
232 m_Daddy->Deallocate(mb);
233 m_Blocks.SetSize(m_Blocks.GetSize()-1);
234 }
235 }else{
236 while(dwNewLen>GetLength()){
237 LONG mb = m_Blocks[m_Blocks.GetUpperBound()];
238 LONG newBlock = m_Daddy->Allocate();
239 ASSERT(newBlock>=0);
240 theBlock* b = m_Daddy->m_File->GetCached(mb);
241 ASSERT(b);
242 ASSERT(b->next<0);
243 b->next=newBlock;
244 m_Daddy->m_File->MakeDirty(mb);
245 m_Blocks.Add(newBlock);
246 }
247 }
248 }
249 virtual DWORD GetLength() const {
250 return ((long)m_Blocks.GetSize())*((long)sizeof(TheBlock.data));
251 }
252
253 virtual UINT Read(void* lpBuf, UINT nCount) {
254 UINT rv = 0;
255 ASSERT(m_Position>=0 && m_Position<=GetLength());
256 LPBYTE data = (LPBYTE)lpBuf;
257 while(nCount && m_Position<GetLength()){
258 UINT bn = m_Position/sizeof(TheBlock.data);
259 UINT bo = m_Position%sizeof(TheBlock.data);
260 theBlock* b = m_Daddy->m_File->GetCached(m_Blocks[bn]);
261 ASSERT(b);
262 UINT bc = min(nCount,sizeof(TheBlock.data)-bo);
263 memmove(data,&b->data[bo],bc);
264 nCount-=bc;
265 data=&data[bc];
266 rv+=bc;
267 m_Position+=bc;
268 }
269 return rv;
270 }
271 virtual void Write(const void* lpBuf, UINT nCount) {
272 ASSERT(m_Position>=0 && m_Position<=GetLength());
273 LPBYTE data = (LPBYTE)lpBuf;
274 while(nCount){
275 UINT bn = m_Position/sizeof(TheBlock.data);
276 UINT bo = m_Position%sizeof(TheBlock.data);
277 while(bn>=m_Blocks.GetSize()){
278 LONG mb = m_Blocks[m_Blocks.GetUpperBound()];
279 LONG newBlock = m_Daddy->Allocate();
280 ASSERT(newBlock>=0);
281 theBlock* b = m_Daddy->m_File->GetCached(mb);
282 ASSERT(b);
283 ASSERT(b->next<0);
284 b->next=newBlock;
285 m_Daddy->m_File->MakeDirty(mb);
286 m_Blocks.Add(newBlock);
287 }
288 theBlock* b = m_Daddy->m_File->GetCached(m_Blocks[bn]);
289 ASSERT(b);
290 UINT bc = min(nCount,sizeof(TheBlock.data)-bo);
291 memmove(&b->data[bo],data,bc);
292 m_Daddy->m_File->MakeDirty(m_Blocks[bn]);
293 nCount-=bc;
294 data=&data[bc];
295 m_Position+=bc;
296 }
297 }
298
299 virtual void LockRange(DWORD dwPos, DWORD dwCount) { ASSERT(FALSE); }
300 virtual void UnlockRange(DWORD dwPos, DWORD dwCount) { ASSERT(FALSE); }
301
302 virtual void Abort() { ASSERT(FALSE); }
303 virtual void Flush() {
304 m_Daddy->m_File->Flush();
305 }
306 virtual void Close() {
307 m_Blocks.RemoveAll();
308 }
309
310 BOOL IsOpened() const { return m_Blocks.GetSize()!=0; }
311 };
312
313 CDynaCache* m_File;
314 firstBlock m_FB;
315
316 CDynamide() : m_File(NULL) {}
317 ~CDynamide() { Close(); }
318
319 BOOL AttachDynaFile(CDynaFile* f) {
320 //ASSERT(!m_Files.Find(f));
321 //m_Files.AddHead(f);
322 return TRUE;
323 }
324 BOOL DetachDynaFile(CDynaFile* f) {
325 //POSITION p = m_Files.Find(f);
326 //ASSERT(p);
327 //m_Files.RemoveAt(p);
328 return TRUE;
329 }
330
331 BOOL Open(LPCTSTR file,BOOL bRO=FALSE) {
332 Close();
333 try{
334 CFile* f = new CFile(file,CFile::typeBinary|(bRO?CFile::modeRead|CFile::shareDenyWrite:CFile::modeReadWrite|CFile::shareDenyRead));
335 return Attach(f,TRUE);
336 }catch(CException* e){
337 e->Delete();
338 return FALSE;
339 }
340 }
341 BOOL Create(LPCTSTR file) {
342 Close();
343 try{
344 CFile* f = new CFile(file,CFile::typeBinary|CFile::modeCreate|CFile::modeReadWrite|CFile::shareDenyRead);
345 return Attach(f,TRUE);
346 }catch(CException* e){
347 e->Delete();
348 return FALSE;
349 }
350 }
351 BOOL Attach(CFile* file,BOOL bAutodelete=TRUE) {
352 if(IsOpened())
353 return FALSE;
354 m_File = new CDynaCache(file,bAutodelete);
355 if(!m_File->Read1stBlock(&m_FB)){
356 memset(&m_FB,0,sizeof(m_FB));
357 m_FB.freeFile=-1;
358 VERIFY(m_File->Write1stBlock(&m_FB));
359 }
360 return IsOpened();
361 }
362 // CFile* Detach();
363 BOOL Close() {
364 if(!IsOpened())
365 return FALSE;
366 m_File->Write1stBlock(&m_FB);
367 delete m_File;
368 m_File=NULL;
369 return TRUE;
370 }
371 BOOL IsOpened() {
372 return m_File != NULL;
373 }
374 BOOL Write1stBlock(void) {
375 if(!IsOpened())
376 return FALSE;
377 VERIFY(m_File->Write1stBlock(&m_FB));
378 return TRUE;
379 }
380
381 CDynaFile* CreateFile() {
382 CDynaFile* rv = new CDynaFile(this);
383 if(rv->Create())
384 return rv;
385 delete rv;
386 return NULL;
387 }
388 CDynaFile* OpenFile(LONG fb) {
389 CDynaFile* rv = new CDynaFile(this);
390 if(rv->Open(fb))
391 return rv;
392 delete rv;
393 return NULL;
394 }
395 BOOL DeleteFile(LONG fb) {
396 while(fb>=0){
397 theBlock* b = m_File->GetCached(fb);
398 LONG nb = b->next;
399 Deallocate(fb);
400 fb=nb;
401 }
402 return TRUE;
403 }
404
405 LONG Allocate() {
406 if(!IsOpened())
407 return -1;
408 if(m_FB.freeFile<0){
409 LONG rv = m_File->AllocateNode();
410 theBlock *b = m_File->GetCached(rv);
411 b->next=-1;
412 m_File->MakeDirty(rv);
413 return rv;
414 }
415 LONG rv = m_FB.freeFile;
416 theBlock *b = m_File->GetCached(rv);
417 m_FB.freeFile=b->next;
418 b->next=-1;
419 m_File->MakeDirty(rv);
420 m_File->Write1stBlock(&m_FB);
421 return rv;
422 }
423 BOOL Deallocate(LONG bk) {
424 if(!IsOpened())
425 return FALSE;
426 theBlock* b = m_File->GetCached(bk);
427 ASSERT(b);
428 if(m_FB.freeFile<0){
429 b->next=-1;
430 m_FB.freeFile=bk;
431 }else{
432 b->next=m_FB.freeFile;
433 m_FB.freeFile=bk;
434 }
435 m_File->MakeDirty(bk);
436 m_File->Write1stBlock(&m_FB);
437 return TRUE;
438 }
439};
440
441};
442
443#endif // __DYNAMIDE_H
diff --git a/shared-code/FindIFace.h b/shared-code/FindIFace.h
deleted file mode 100644
index 8dec8c4..0000000
--- a/shared-code/FindIFace.h
+++ b/dev/null
@@ -1,125 +0,0 @@
1 #ifndef__FINDIFACE_H
2 #define__FINDIFACE_H
3
4#include "SNMPeer.h"
5#include "SNMPExtDLL.h"
6#include "SNMPOIDs.h"
7
8namespace Klever {
9
10inline BOOL FindIFace(in_addr& target,in_addr& source)
11{
12 DEFINE_OID(ipRouteDest, OIDipRouteDest);
13 DEFINE_OID(ipRouteMask, OIDipRouteMask);
14 DEFINE_OID(ipRouteIfIndex,OIDipRouteIfIndex);
15 DEFINE_OID(ipRouteMetric1,OIDipRouteMetric1);
16 DEFINE_OID(ipAdEntIfIndex,OIDipAdEntIfIndex);
17 DEFINE_OID(ipAdEntAddr, OIDipAdEntAddr);
18 struct _route{
19 int iface;
20 int metric;
21 DWORD nm;
22 }routes[16];
23int nRoutes = 0;
24CSNMPVarBindList vbl;
25 vbl.AddTail(CSNMPVarBind(CASNAny(CASNAny::typeASNOID,ipRouteDest,sizeof(ipRouteDest))));
26 vbl.AddTail(CSNMPVarBind(CASNAny(CASNAny::typeASNOID,ipRouteMask,sizeof(ipRouteMask))));
27 vbl.AddTail(CSNMPVarBind(CASNAny(CASNAny::typeASNOID,ipRouteIfIndex,sizeof(ipRouteIfIndex))));
28 vbl.AddTail(CSNMPVarBind(CASNAny(CASNAny::typeASNOID,ipRouteMetric1,sizeof(ipRouteMetric1))));
29CSNMPExtDLL snmp("INETMIB1");
30 while(nRoutes<(sizeof(routes)/sizeof(routes[0]))){
31 if(
32 snmp.Request(CASNAny::typeASNGetNextRequest,vbl,vbl)
33 && vbl.GetCount() == 4
34 ){
35 POSITION p = vbl.GetHeadPosition();
36 _route r = {-1,-1};
37 in_addr d, m;
38 BOOL bD = FALSE, bM = FALSE;
39 while(p){
40 CSNMPVarBind& vb = vbl.GetNext(p);
41 if(
42 vb.IsName(ipRouteDest,sizeof(ipRouteDest))
43 && vb.value.type==CASNAny::typeASNIP
44 ){
45 d.s_addr=vb.value.value.ip.s_addr; bD = TRUE;
46 }else if(
47 vb.IsName(ipRouteMask,sizeof(ipRouteMask))
48 && vb.value.type==CASNAny::typeASNIP
49 ){
50 m.s_addr=vb.value.value.ip.s_addr; bM = TRUE;
51 }else if(
52 vb.IsName(ipRouteIfIndex,sizeof(ipRouteIfIndex))
53 && vb.value.type==CASNAny::typeASNInteger
54 ){
55 r.iface=vb.value.value.number;
56 }else if(
57 vb.IsName(ipRouteMetric1,sizeof(ipRouteMetric1))
58 && vb.value.type==CASNAny::typeASNInteger
59 ){
60 r.metric=vb.value.value.number;
61 }else
62 break;
63 }
64 if(r.iface<0 || r.metric<0 || (!bD) || (!bM))
65 break;
66 if((target.s_addr&m.s_addr)==(d.s_addr&m.s_addr)){
67 r.nm=htonl(m.s_addr);
68 memmove(&routes[nRoutes++],&r,sizeof(routes[0]));
69 }
70 }else
71 break;
72 }
73 if(!nRoutes)
74 return FALSE;
75int rn = 0;
76 if(nRoutes>1){
77 for(int tmp=1;tmp<nRoutes;tmp++)
78 if(
79 routes[tmp].metric<routes[rn].metric
80 || routes[tmp].nm>routes[rn].nm
81 )
82 rn = tmp;
83 }
84int iface = routes[rn].iface;
85 vbl.RemoveAll();
86 vbl.AddTail(CSNMPVarBind(CASNAny(CASNAny::typeASNOID,ipAdEntAddr,sizeof(ipAdEntAddr))));
87 vbl.AddTail(CSNMPVarBind(CASNAny(CASNAny::typeASNOID,ipAdEntIfIndex,sizeof(ipAdEntIfIndex))));
88 for(;;){
89 if(
90 snmp.Request(CASNAny::typeASNGetNextRequest,vbl,vbl)
91 && vbl.GetCount()==2
92 ){
93 in_addr a; a.s_addr = INADDR_NONE;
94 int ifn = -1;
95 POSITION p = vbl.GetHeadPosition();
96 while(p){
97 CSNMPVarBind& vb = vbl.GetNext(p);
98 if(
99 vb.IsName(ipAdEntAddr,sizeof(ipAdEntAddr))
100 && vb.value.type==CASNAny::typeASNIP
101 ){
102 a.s_addr=vb.value.value.ip.s_addr;
103 }else if(
104 vb.IsName(ipAdEntIfIndex,sizeof(ipAdEntIfIndex))
105 && vb.value.type==CASNAny::typeASNInteger
106 ){
107 ifn = vb.value.value.number;
108 }else
109 break;
110 }
111 if(ifn<0)
112 break;
113 if(ifn==iface){
114 source.s_addr=a.s_addr;
115 return TRUE;
116 }
117 }else
118 break;
119 }
120 return FALSE;
121}
122
123};
124
125 #endif// __FINDIFACE_H
diff --git a/shared-code/LRUCache.h b/shared-code/LRUCache.h
deleted file mode 100644
index 569e829..0000000
--- a/shared-code/LRUCache.h
+++ b/dev/null
@@ -1,113 +0,0 @@
1 #ifndef__LRUCACHE_H
2 #define__LRUCACHE_H
3
4namespace Klever {
5
6template<class IDX,class ARGIDX,class DATA>
7class CLRUCache : public CObject {
8public:
9 struct CacheEntry{
10 enum cacheState{
11 cacheClean, cacheDirty, cacheEmpty
12 };
13 cacheStatem_State;
14 UINT m_hits;
15
16 IDX m_idx;
17 DATA* m_pData;
18
19 CacheEntry() { m_State=cacheEmpty; VERIFY(m_pData=new DATA); m_hits=0; }
20 virtual ~CacheEntry() { delete m_pData; }
21 };
22 typedef CMap<IDX,ARGIDX,CacheEntry*,CacheEntry*> CCacheMap;
23 typedef CList<CacheEntry*,CacheEntry*> CCacheList;
24
25 CCacheList m_Cache;
26 CCacheMap m_Map;
27
28 CLRUCache(UINT cacheSize){
29 for(int tmp=0;tmp<cacheSize;tmp++){
30 CacheEntry* p = new CacheEntry;
31 m_Cache.AddTail(p);
32 }
33 }
34 virtual ~CLRUCache(){
35 Flush();
36 POSITION p = m_Cache.GetHeadPosition();
37 while(p){
38 CacheEntry* c = m_Cache.GetNext(p);
39 delete c;
40 }
41 }
42
43 DATA* GetCached(ARGIDX idx,BOOL bLoad=TRUE) {
44 CacheEntry* rv;
45 if(m_Map.Lookup(idx,rv)){
46 rv->m_hits++;
47 PopUp(rv);
48 return rv->m_pData;
49 }
50 if(!bLoad)
51 return NULL;
52 rv = m_Cache.GetTail();
53 ASSERT(rv);
54 switch(rv->m_State){
55 case CacheEntry::cacheDirty:
56 FlushEntry(rv);
57 case CacheEntry::cacheClean:
58 m_Map.RemoveKey(rv->m_idx);
59 rv->m_State=CacheEntry::cacheEmpty;
60 case CacheEntry::cacheEmpty:
61 break;
62 default:
63 ASSERT(FALSE);
64 }
65 if(!_ReadIn(idx,rv->m_pData))
66 return NULL;
67 rv->m_hits=1;
68 rv->m_State=CacheEntry::cacheClean;
69 rv->m_idx=idx;
70 m_Map[idx]=rv;
71 PopUp(rv);
72 return rv->m_pData;
73 }
74 BOOL MakeDirty(ARGIDX idx) {
75 CacheEntry* pEntry;
76 if(m_Map.Lookup(idx,pEntry)){
77 ASSERT(pEntry->m_State==CacheEntry::cacheClean || pEntry->m_State==CacheEntry::cacheDirty);
78 pEntry->m_State=CacheEntry::cacheDirty;
79 return TRUE;
80 }
81 return FALSE;
82 }
83 BOOL Flush() {
84 POSITION p = m_Cache.GetHeadPosition();
85 while(p){
86 CacheEntry* pEntry = m_Cache.GetNext(p);
87 ASSERT(pEntry);
88 FlushEntry(pEntry);
89 }
90 return TRUE;
91 }
92 BOOL FlushEntry(CacheEntry* pEntry) {
93 if(pEntry->m_State==CacheEntry::cacheDirty){
94 BOOL rv = _WriteOut(pEntry->m_idx,pEntry->m_pData);
95 if(rv)
96 pEntry->m_State=CacheEntry::cacheClean;
97 }
98 return FALSE;
99 }
100 void PopUp(CacheEntry* pEntry) {
101 POSITION p = m_Cache.Find(pEntry);
102 ASSERT(p);
103 m_Cache.RemoveAt(p);
104 VERIFY(m_Cache.AddHead(pEntry));
105 }
106
107 virtualBOOL _ReadIn(ARGIDX idx,DATA* data) = 0;
108 virtual BOOL _WriteOut(ARGIDX idx,DATA* data) = 0;
109};
110
111};
112
113 #endif// __LRUCACHE_H
diff --git a/shared-code/RegEx.cpp b/shared-code/RegEx.cpp
deleted file mode 100644
index b7bab62..0000000
--- a/shared-code/RegEx.cpp
+++ b/dev/null
@@ -1,1697 +0,0 @@
1#include "../stdafx.h"
2#include "RegEx.h"
3
4 #defineisWordableChar(c) (isalnum(c) || (c)=='_')
5
6BOOL CRegEx::Compile(LPCTSTR regex,int flags)
7{
8 ASSERT(!((flags&regExtended) && (flags&regLiteral)));
9 m_Matches.RemoveAll();
10 m_Strip.RemoveAll();
11 m_Strip.SetSize(0,15);
12 m_Pattern=regex;
13 m_ParsePointer=0;
14 m_Error=0;
15 m_Sets.RemoveAll();
16 m_Flags=flags;
17 m_iFlags=0;
18 m_BOLs=m_EOLs=0;
19 m_Subexps = 0;
20 m_Categories=1;// 0 is 'everything else'
21 m_bBackRefs=FALSE;
22 memset(m_Category,0,sizeof(m_Category));
23
24 // Go ahead.
25 m_Error || m_Strip.Add(CSop(CSop::opEnd));
26 if(flags&regExtended){
27 ParseERE();
28 }else if(flags&regLiteral){
29 ParseLiteral();
30 }else{
31 ParseBRE();
32 }
33 m_Error || m_Strip.Add(CSop(CSop::opEnd));
34 Categorize();
35 m_Strip.FreeExtra();
36 FigureMust();
37 m_Pluses=CountPluses();
38 if(m_iFlags&iflagsBad){
39 m_Error || (m_Error=regeAssert);
40 // ??? point to nuls? ;-)
41 }
42 // We may wish to free some memory here if we're erroneous (ie. m_Error..)
43 m_ParseParens.RemoveAll();
44#ifdef _DEBUG
45 if(m_Error){
46 CString tmp;
47 tmp.Format("RE: ParseError: %d\n",m_Error);
48 TRACE0(tmp);
49 }
50 //DumpStrip(afxDump);
51#endif
52 return (m_bCompiled=(!m_Error));
53}
54
55BOOL CRegEx::Match(LPCTSTR src,int flags)
56{
57 if(!m_bCompiled)
58 return FALSE;
59 if(m_iFlags&iflagsBad)
60 return FALSE;
61 m_Input=src;
62 m_mFlags=flags;
63 m_mPointer=m_Input;
64 m_mBegin=m_Input;
65 m_mEnd=&m_mBegin[m_Input.GetLength()];
66 ASSERT(m_mPointer<=m_mEnd);
67 m_Matches.RemoveAll();
68 if(!m_Must.IsEmpty()){
69 if(m_Input.Find(m_Must)<0)
70 return FALSE;
71 }
72 // Go ahead..
73int stripLen = m_Strip.GetSize();
74 m_mLastPos.SetSize(0);
75 for(int tmp=0;tmp<stripLen;tmp++)
76 m_Strip[tmp].m_MatchData=0;
77LPCTSTR beginp = m_mBegin;
78LPCTSTR endp;
79 for(;;){
80 endp = MatchFast(beginp);
81 if(!endp)
82 return FALSE;
83 if((m_mFlags&regNoSubExpressions) && !m_bBackRefs)
84 break;
85 ASSERT(m_cOldP);
86 for(;;){
87 endp = MatchSlow(m_cOldP,m_mEnd,1,stripLen-1);
88 if(endp)
89 break;
90 ASSERT(m_cOldP<m_mEnd);
91 m_cOldP++;
92 }
93 if((m_mFlags&regOneMatch) && !m_bBackRefs)
94 break;
95 // Oh, his, we want the subexpression..
96 m_Matches.SetSize(m_Subexps+1);
97 LPCTSTR dp;
98 if(!m_bBackRefs && !(m_mFlags&regBackRefs)){
99 dp = MatchDissect(m_cOldP,endp,1,stripLen-1);
100 }else{
101 if(m_Pluses>0 && !m_mLastPos.GetSize())
102 m_mLastPos.SetSize(m_Pluses);
103 dp = MatchBackRef(m_cOldP,endp,1,stripLen-1,0);
104 }
105 if(dp)
106 break;
107 // Uh.. oh.. we couldn't find a subexpression-level match
108 ASSERT(m_bBackRefs);
109 ASSERT(m_Pluses==0 || m_mLastPos.GetSize());
110 for(;;){
111 if(dp || endp <= m_cOldP)
112 break;// defeat.. ?
113 endp = MatchSlow(m_cOldP,endp-1,1,stripLen-1);
114 if(!endp)
115 break;// defeat.. ?
116 // Try it on a shorter possibility..
117#ifdef _DEBUG
118 for(tmp=1;tmp<=m_Subexps;tmp++)
119 ASSERT(m_Matches[tmp].m_Begin<0 && m_Matches[tmp].m_End<0);
120#endif
121 dp = MatchBackRef(m_cOldP,endp,1,stripLen-1,0);
122 }
123 ASSERT((!dp) || dp==endp);
124 if(dp)// Found a shorter one..
125 break;
126 // Despite initial appearances, there is no match here
127 beginp = m_cOldP+1;
128 ASSERT(beginp<=m_mEnd);
129 }
130 // Fill in the detail if so requested..
131 if(!(m_mFlags&regNoSubExpressions)){
132 if(!m_Matches.GetSize())
133 m_Matches.SetSize(1);
134 m_Matches[0].m_Begin=m_cOldP-m_mBegin;
135 m_Matches[0].m_End=endp-m_mBegin;
136 }
137 m_mLastPos.RemoveAll();
138 return TRUE;
139}
140
141CString CRegEx::Replace(LPCTSTR src,LPCTSTR rep,int flags)
142{
143 // ***
144 return CString();
145}
146
147void CRegEx::ParseERE(int stop)
148{
149UCHAR c;
150BOOL first=TRUE;
151int prevF, prevB;
152 for(;;){
153 int co = m_Strip.GetSize();
154 while(m_ParsePointer < m_Pattern.GetLength() && ((c=m_Pattern[m_ParsePointer])!='|') && c!=stop)
155 ParseEREexp();
156 if(m_Strip.GetSize()==co){
157 m_Error || (m_Error=regeEmpty);
158 // ??? point to nuls?
159 }
160 if(m_ParsePointer>=m_Pattern.GetLength() || m_Pattern[m_ParsePointer]!='|')
161 break;
162 else
163 m_ParsePointer++;
164 if(first){
165 StripInsert(co,CSop(CSop::opChoice0,m_Strip.GetSize()-co+1));
166 prevF = prevB = co;
167 first=FALSE;
168 }
169 m_Error || m_Strip.Add(CSop(CSop::opOr0,m_Strip.GetSize()-prevB));
170 prevB = m_Strip.GetSize()-1;
171 m_Error || (m_Strip[prevF].m_Operand=m_Strip.GetSize()-prevF);
172 prevF = m_Strip.GetSize();
173 m_Error || m_Strip.Add(CSop(CSop::opOr1,0));// offset isn't really right.. very so..
174 }
175 if(!first){
176 m_Error || (m_Strip[prevF].m_Operand=m_Strip.GetSize()-prevF);
177 m_Error || m_Strip.Add(CSop(CSop::opChoice1,m_Strip.GetSize()-prevB));
178 }
179 ASSERT(m_ParsePointer >= m_Pattern.GetLength() || m_Pattern[m_ParsePointer]==stop);
180}
181
182void CRegEx::ParseEREexp()
183{
184 ASSERT(m_ParsePointer < m_Pattern.GetLength());
185UCHAR c = m_Pattern[m_ParsePointer++];
186int pos = m_Strip.GetSize();
187int subno;
188int count, count2;
189BOOL wascaret=FALSE;
190 switch(c){
191 case '(':
192 if(!(m_ParsePointer<m_Pattern.GetLength())){
193 TRACE0("RE: '(' at the end of the pattern\n");
194 if(!m_Error)
195 m_Error = regeParen;
196 // ??? point to nuls?
197 }
198 m_Subexps++;
199 subno=m_Subexps;
200 m_ParseParens.SetAtGrow(m_Subexps,CParenthesis(m_Strip.GetSize()));
201 m_Error || m_Strip.Add(CSop(CSop::opLeftParen,subno));
202 if(m_ParsePointer>=m_Pattern.GetLength() || m_Pattern[m_ParsePointer]!=')')
203 ParseERE(')');
204 VERIFY(m_ParseParens[m_Subexps].m_End = m_Strip.GetSize());
205 m_Error || m_Strip.Add(CSop(CSop::opRightParen,subno));
206 if(m_ParsePointer >= m_Pattern.GetLength() || m_Pattern[m_ParsePointer++]!=')'){
207 TRACE0("RE: No matching ')'\n");
208 if(!m_Error)
209 m_Error = regeParen;
210 // ??? point to nuls?
211 }
212 break;
213 case '^':
214 m_Error || m_Strip.Add(CSop(CSop::opBOL));
215 m_iFlags|=iflagsUseBOL;
216 m_BOLs++;
217 wascaret=TRUE;
218 break;
219 case '$':
220 m_Error || m_Strip.Add(CSop(CSop::opEOL));
221 m_iFlags|=iflagsUseEOL;
222 m_EOLs++;
223 break;
224 case '|':
225 TRACE0("RE: '|' outside of expression\n");
226 if(!m_Error)
227 m_Error = regeEmpty;
228 // ??? point to nuls?
229 break;
230 case '*':
231 case '+':
232 case '?':
233 TRACE0("RE: '*'/'+'/'?' with no previous expression\n");
234 if(!m_Error)
235 m_Error = regeBadRepeat;
236 // ??? point to nuls?
237 break;
238 case '.':
239 if(m_Flags&regNewLine)
240 EmitNonNewLineAny();
241 else
242 m_Error || m_Strip.Add(CSop(CSop::opAny));
243 break;
244 case '[':
245 ParseBracket();
246 break;
247 case '\\':
248 if(m_ParsePointer >= m_Pattern.GetLength()){
249 TRACE0("RE: '\\' at the end of the pattern\n");
250 if(!m_Error)
251 m_Error = regeEscape;
252 // ??? point to nuls?
253 }else{
254 c = m_Pattern[m_ParsePointer++];
255 EmitOrdinary(c);
256 }
257 break;
258 case '{':
259 if(m_ParsePointer >= m_Pattern.GetLength() || !isdigit(m_Pattern[m_ParsePointer])){
260 TRACE0("RE: '{' with no repeat count\n");
261 if(!m_Error)
262 m_Error = regeBadRepeat;
263 // ??? point to nuls?
264 }
265 // Fallthrough..
266 default:
267 EmitOrdinary(c);
268 break;
269 }
270 if(m_ParsePointer >= m_Pattern.GetLength())
271 return;
272 c = m_Pattern[m_ParsePointer];
273 // Call a '{' repetition if followed by a digit
274 if (!(c=='*' || c=='+' || c=='?' || ( c=='{' && (m_ParsePointer+1) < m_Pattern.GetLength() && isdigit(m_Pattern[m_ParsePointer+1])) ))
275 return; // No repetitor - done.
276 m_ParsePointer++;
277 if(wascaret){
278 TRACE0("RE: repetitive '^' detected\n");
279 if(!m_Error)
280 m_Error = regeBadRepeat;
281 // ??? point to nuls?
282 }
283 switch(c){
284 case '*':// Implemeted as +?
285 // + expression
286 StripInsert(pos,CSop(CSop::opPlus0,m_Strip.GetSize()-pos+1));
287 m_Error || m_Strip.Add(CSop(CSop::opPlus1,m_Strip.GetSize()-pos));
288 // ? expression
289 StripInsert(pos,CSop(CSop::opQuest0,m_Strip.GetSize()-pos+1));
290 m_Error || m_Strip.Add(CSop(CSop::opQuest1,m_Strip.GetSize()-pos));
291 break;
292 case '+':
293 // + expression
294 StripInsert(pos,CSop(CSop::opPlus0,m_Strip.GetSize()-pos+1));
295 m_Error || m_Strip.Add(CSop(CSop::opPlus1,m_Strip.GetSize()-pos));
296 break;
297 case '?':
298 // Kludge - emit y? as (y|) until subtle bug gets fixed :-)
299 StripInsert(pos,CSop(CSop::opChoice0,m_Strip.GetSize()-pos+1));
300 m_Error || m_Strip.Add(CSop(CSop::opOr0,m_Strip.GetSize()-pos));
301 m_Error || (m_Strip[pos].m_Operand=m_Strip.GetSize()-pos);
302 m_Error || m_Strip.Add(CSop(CSop::opOr1,1));
303 m_Error || m_Strip.Add(CSop(CSop::opChoice1,2));
304 break;
305 case '{':
306 count = ParseCount();
307 if(m_ParsePointer < m_Pattern.GetLength() && m_Pattern[m_ParsePointer]==','){
308 m_ParsePointer++;
309 if(isdigit(m_Pattern[m_ParsePointer])){ // HHH Personally, I doubt it is always available
310 count2=ParseCount();
311 if(!(count<=count2)){
312 TRACE0("RE: Disbalanced counts in '{}' repeater\n");
313 m_Error || (m_Error=regeBadBrace);
314 // ??? point to nuls?
315 }
316 }else // Single number with comma
317 count2=256; // Infinity
318 }else // Single number
319 count2=count;
320 EmitRepeat(pos,count,count2);
321 if(m_ParsePointer >= m_Pattern.GetLength() || m_Pattern[m_ParsePointer]!='}'){
322 // No '}'..
323 TRACE0("RE: No immediately following '}' of '{' expression\n");
324 while(m_ParsePointer < m_Pattern.GetLength() && m_Pattern[m_ParsePointer]!='}')
325 m_ParsePointer++;
326 if(m_ParsePointer >= m_Pattern.GetLength()){
327 TRACE0("RE: No closing '}' found\n");
328 m_Error || (m_Error=regeBrace);
329 }else
330 m_Error || (m_Error=regeBadBrace);
331 // ??? point to nuls?
332 }else
333 m_ParsePointer++;
334 break;
335 }
336 if(m_ParsePointer >= m_Pattern.GetLength())
337 return;
338 c = m_Pattern[m_ParsePointer];
339 if(!(c=='*' || c=='+' || c=='?' || (c=='{' && (m_ParsePointer+1)<m_Pattern.GetLength() && isdigit(m_Pattern[m_ParsePointer+1]))))
340 return;
341 TRACE0("RE: Double repeater\n");
342 m_Error || (m_Error=regeBadRepeat);
343 // ??? point to nuls?
344}
345
346void CRegEx::StripInsert(int pos,CSop& sop)
347{
348 if(m_Error)
349 return;
350int sn = m_Strip.GetSize();
351 m_Strip.InsertAt(pos,sop);
352 for(int tmp=1;tmp<m_ParseParens.GetSize();tmp++){
353 if(m_ParseParens[tmp].m_Begin>=pos)
354 m_ParseParens[tmp].m_Begin++;
355 if(m_ParseParens[tmp].m_End>=pos)
356 m_ParseParens[tmp].m_End++;
357 }
358}
359
360void CRegEx::EmitOrdinary(UCHAR c)
361{
362 if(m_Flags&regIgnoreCase && isalpha(c) && (tolower(c) !=toupper(c))){
363 // Emit both cases
364 CString savePattern = m_Pattern;
365 int savePointer = m_ParsePointer;
366 m_Pattern=c;
367 m_Pattern+=']';
368 m_ParsePointer=0;
369 ParseBracket();
370 m_Pattern=savePattern;
371 m_ParsePointer=savePointer;
372 }else{
373 m_Error || m_Strip.Add(CSop(CSop::opChar,c));
374 if(!m_Category[(BYTE)c])
375 m_Category[(BYTE)c]=m_Categories++;
376 }
377}
378
379void CRegEx::EmitNonNewLineAny()
380{
381 // Kludges're going on and on..
382CString savePattern = m_Pattern;
383int savePointer = m_ParsePointer;
384 m_Pattern="^\n]";
385 m_ParsePointer=0;
386 ParseBracket();
387 m_Pattern=savePattern;
388 m_ParsePointer=savePointer;
389}
390
391int CRegEx::ParseCount()
392{
393BOOL nonEmpty=FALSE;
394int rv = 0;
395UCHAR c;
396 while(m_ParsePointer < m_Pattern.GetLength() && isdigit(c=m_Pattern[m_ParsePointer]) && rv <=255){
397 rv = rv*10 + c-'0';
398 nonEmpty=TRUE;
399 m_ParsePointer++;
400 }
401 if(rv>255 || !nonEmpty){
402 m_Error || (m_Error=regeBadBrace);
403 // ??? point to nuls?
404 }
405 return rv;
406}
407
408void CRegEx::ParseBracket()
409{
410 // Dept. of truly sickening special case kludges
411 if((m_ParsePointer+5) < m_Pattern.GetLength() && !m_Pattern.Mid(m_ParsePointer,6).Compare("[:<]]")){
412 m_Error || m_Strip.Add(CSop(CSop::opBOW));
413 m_ParsePointer+=6;
414 return;
415 }
416 if((m_ParsePointer+5) < m_Pattern.GetLength() && !m_Pattern.Mid(m_ParsePointer,6).Compare("[:>]]")){
417 m_Error || m_Strip.Add(CSop(CSop::opEOW));
418 m_ParsePointer+=6;
419 return;
420 }
421BOOL invert=TRUE;
422 if(m_ParsePointer < m_Pattern.GetLength() && m_Pattern[m_ParsePointer]=='^')
423 m_ParsePointer++;
424 else
425 invert=FALSE;
426CSet cset;
427 if(m_ParsePointer < m_Pattern.GetLength()){
428 switch(m_Pattern[m_ParsePointer]){
429 case ']':
430 case '-':
431 cset.Add(m_Pattern[m_ParsePointer]);
432 m_ParsePointer++;
433 break;
434 }
435 }
436 while(m_ParsePointer < m_Pattern.GetLength() && m_Pattern[m_ParsePointer]!=']' && !((m_ParsePointer+1)<m_Pattern.GetLength() && !m_Pattern.Mid(m_ParsePointer,2).Compare("-]")))
437 ParseBracketTerm(cset);
438 if(m_ParsePointer < m_Pattern.GetLength() && m_Pattern[m_ParsePointer]=='-'){
439 m_ParsePointer++;
440 cset.Add('-');
441 }
442 if(m_ParsePointer < m_Pattern.GetLength() && m_Pattern[m_ParsePointer]==']')
443 m_ParsePointer++;
444 else{
445 m_Error || (m_Error=regeBracket);
446 // ??? point to nuls?
447 return;
448 }
449 if(m_Flags&regIgnoreCase){
450 for(int tmp=CSet::size-1;tmp>=0;tmp--){
451 if(cset.IsIn(tmp) && isalpha(tmp) && (toupper(tmp)!=tolower(tmp)))
452 cset.Add(isupper(tmp)?tolower(tmp):toupper(tmp));
453 }
454 /*
455 if(!cset->m_Multis.IsEmpty())
456 cset.CollatingCase();
457 */
458 }
459 if(invert){
460 for(int tmp=CSet::size-1;tmp>=0;tmp--)
461 if(cset.IsIn(tmp))
462 cset.Sub(tmp);
463 else
464 cset.Add(tmp);
465 if(m_Flags&regNewLine)
466 cset.Sub('\n');
467 /*
468 if(!cset.m_Multis.IsEmpty())
469 cset.CollatingInvert();
470 */
471 }
472UCHAR c = cset.GetOnly();
473 if(c){
474 EmitOrdinary(c);
475 }else
476 m_Error || m_Strip.Add(CSop(CSop::opAnyOf,StoreSet(cset)));
477}
478
479void CRegEx::CSet::Add(UCHAR c)
480{
481 m_Set[(BYTE)c]=TRUE;
482 m_Hash+=c;
483}
484
485BOOL CRegEx::CSet::IsIn(UCHAR c)
486{
487 return m_Set[(BYTE)c];
488}
489
490void CRegEx::CSet::Sub(UCHAR c)
491{
492 m_Set[(BYTE)c]=FALSE;
493 m_Hash-=c;
494}
495
496UCHAR CRegEx::CSet::GetOnly()
497{
498int rv = 0;
499UCHAR only = 0;
500 for(int tmp=0;tmp<size;tmp++){
501 rv+=m_Set[tmp]?(only=tmp,1):0;
502 }
503 return (rv==1)?only:0;
504}
505
506int CRegEx::StoreSet(CSet& cset)
507{
508 for(int tmp=0;tmp<m_Sets.GetSize();tmp++)
509 if(m_Sets[tmp]==cset)
510 return tmp;
511 return m_Sets.Add(cset);
512}
513
514void CRegEx::ParseBracketTerm(CSet& cset)
515{
516UCHAR c;
517 switch((m_ParsePointer<m_Pattern.GetLength())?m_Pattern[m_ParsePointer]:0){
518 case '[':
519 c = ((m_ParsePointer+1)<m_Pattern.GetLength())?m_Pattern[m_ParsePointer+1]:0;
520 break;
521 case '-':
522 m_Error || (m_Error=regeRange);
523 // ??? point to nuls?
524 return;
525 default:
526 c = 0;
527 break;
528 }
529 switch(c){
530 case ':':// Character class
531 m_ParsePointer+=2;
532 if(m_ParsePointer>=m_Pattern.GetLength()){
533 m_Error || (m_Error=regeBracket);
534 // ??? point to nuls?
535 }
536 c = m_Pattern[m_ParsePointer];
537 if(c== '-' || c==']'){
538 m_Error || (m_Error=regeCType);
539 // ??? point to nuls?
540 }
541 ParseBracketCClass(cset);
542 if(m_ParsePointer>=m_Pattern.GetLength()){
543 m_Error || (m_Error=regeBracket);
544 // ??? point to nuls?
545 }
546 if((m_ParsePointer+1)>=m_Pattern.GetLength() || (m_Pattern.Mid(m_ParsePointer,2).Compare(":]"))){
547 m_Error || (m_Error=regeCType);
548 // ??? point to nuls?
549 }else
550 m_ParsePointer+=2;
551 break;
552 case '=':// Equivalence class
553 m_ParsePointer+=2;
554 if(m_ParsePointer >= m_Pattern.GetLength()){
555 m_Error || (m_Error=regeBracket);
556 // ??? point to nuls?
557 }
558 c = m_Pattern[m_ParsePointer];
559 if(c== '-' || c==']'){
560 m_Error || (m_Error=regeCollate);
561 // ??? point to nuls?
562 }
563 ParseBracketEClass(cset);
564 if((m_ParsePointer+1)>=m_Pattern.GetLength() || (m_Pattern.Mid(m_ParsePointer,2).Compare("=]"))){
565 m_Error || (m_Error=regeCollate);
566 // ??? point to nuls?
567 }else
568 m_ParsePointer+=2;
569 break;
570 default:// Symbol, character or range
571 {
572 UCHAR start, finish;
573 start = ParseBracketSymbol();
574 if((m_ParsePointer<m_Pattern.GetLength() && m_Pattern[m_ParsePointer]=='-') /*&& (m_ParsePointer+1)<m_Pattern.GetLength() && m_Pattern[m_ParsePointer+1]==']'*/){
575 // I believe the expression above is seetwo..
576 // range.
577 m_ParsePointer++;
578 if(m_ParsePointer<m_Pattern.GetLength() && m_Pattern[m_ParsePointer]=='-'){
579 m_ParsePointer++;
580 finish='-';
581 }else
582 finish=ParseBracketSymbol();
583 }else
584 finish=start;
585 if(((BYTE)start)>((BYTE)finish)){
586 m_Error || (m_Error=regeRange);
587 // ??? point to nuls?
588 }
589 for(int tmp=start;tmp<=(BYTE)finish;tmp++)
590 cset.Add(tmp);
591 }
592 break;
593 }
594}
595
596void CRegEx::ParseBracketCClass(CSet& cset)
597{
598 static struct{
599 char *className;
600 char *classChars;
601 }cc[] = {
602 {"alnum","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
603 {"alpha","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"},
604 {"blank"," \t"},
605 {"cntrl","\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37\177"},
606 {"digit","0123456789"},
607 {"graph","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"},
608 {"lower","abcdefghijklmnopqrstuvwxyz"},
609 {"print","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ "},
610 {"punct","!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"},
611 {"space","\t\n\v\f\r "},
612 {"upper","ABCDEFGHIJKLMNOPQRSTUVWXYZ"},
613 {"xdigit","0123456789ABCDEFabcdef"}
614};
615CString cclass;
616UCHAR c;
617 while(m_ParsePointer < m_Pattern.GetLength() && isalpha(c=m_Pattern[m_ParsePointer])){
618 cclass+=c;
619 m_ParsePointer++;
620 }
621char *classChars = NULL;
622 for(int tmp=0;tmp<(sizeof(cc)/sizeof(cc[0]));tmp++){
623 if(!cclass.CompareNoCase(cc[tmp].className)){
624 classChars=cc[tmp].classChars;
625 break;
626 }
627 }
628 if(!classChars){
629 m_Error || (m_Error=regeCType);
630 // ??? point to nuls?
631 return;
632 }
633 while(*classChars)
634 cset.Add(*(classChars++));
635 // --- multis
636}
637
638void CRegEx::ParseBracketEClass(CSet& cset)
639{
640 cset.Add(ParseBracketCollatingElement('='));;
641}
642
643UCHAR CRegEx::ParseBracketCollatingElement(UCHAR term)
644{
645 static struct{
646 char *entityName;
647 char entity;
648 }cc[] = { {"NUL",'\0'},{"SOH",'\001'},{"STX",'\002'},{"ETX",'\003'},{"EOT",'\004'},{"ENQ",'\005'},{"ACK",'\006'},{"BEL",'\007'},{"alert",'\007'},{"BS",'\010'},{"backspace",'\b'},{"HT",'\011'},{"tab",'\t'},{"LF",'\012'},{"newline",'\n'},{"VT",'\013'},{"vertical-tab",'\v'},{"FF",'\014'},{"form-feed",'\f'},{"CR",'\015'},{"carriage-return",'\r'},{"SO",'\016'},{"SI",'\017'},{"DLE",'\020'},{"DC1",'\021'},{"DC2",'\022'},{"DC3",'\023'},{"DC4",'\024'},{"NAK",'\025'},{"SYN",'\026'},{"ETB",'\027'},{"CAN",'\030'},{"EM",'\031'},{"SUB",'\032'},{"ESC",'\033'},{"IS4",'\034'},{"FS",'\034'},{"IS3",'\035'},{"GS",'\035'},{"IS2",'\036'},{"RS",'\036'},{"IS1",'\037'},{"US",'\037'},{"space",' '},{"exclamation-mark",'!'},{"quotation-mark",'"'},{"number-sign",'#'},{"dollar-sign",'$'},{"percent-sign",'%'},{"ampersand",'&'},{"apostrophe",'\''},{"left-parenthesis",'('},{"right-parenthesis",')'},{"asterisk",'*'},{"plus-sign",'+'},{"comma",','},{"hyphen",'-'},{"hyphen-minus",'-'},{"period",'.'},{"full-stop",'.'},{"slash",'/'},{"solidus",'/'},{"zero",'0'},{"one",'1'},{"two",'2'},{"three",'3'},{"four",'4'},{"five",'5'},{"six",'6'},{"seven",'7'},{"eight",'8'},{"nine",'9'},{"colon",':'},{"semicolon",';'},{"less-than-sign",'<'},{"equals-sign",'='},{"greater-than-sign",'>'},{"question-mark",'?'},{"commercial-at",'@'},{"left-square-bracket",'['},{"backslash",'\\'},{"reverse-solidus",'\\'},{"right-square-bracket",']'},{"circumflex",'^'},{"circumflex-accent",'^'},{"underscore",'_'},{"low-line",'_'},{"grave-accent",'`'},{"left-brace",'{'},{"left-curly-bracket",'{'},{"vertical-line",'|'},{"right-brace",'}'},{"right-curly-bracket",'}'},{"tilde",'~'},{"DEL",'\177'} };
649CString seeTwo;
650 seeTwo=term;
651 seeTwo+=']';
652CString entityName;
653 while(m_ParsePointer<m_Pattern.GetLength() && !((m_ParsePointer+1)<m_Pattern.GetLength() && !m_Pattern.Mid(m_ParsePointer,2).Compare(seeTwo)))
654 entityName+=m_Pattern[m_ParsePointer++];
655 if(m_ParsePointer>=m_Pattern.GetLength()){
656 m_Error || (m_Error=regeBracket);
657 // ??? point to nuls?
658 return 0;
659 }
660 for(int tmp=0;tmp<(sizeof(cc)/sizeof(cc[0]));tmp++)
661 if(!entityName.CompareNoCase(cc[tmp].entityName))
662 return cc[tmp].entity;
663 if(entityName.GetLength()==1)
664 return entityName[0];
665 m_Error || (m_Error=regeCollate);
666 // ??? point to nuls?
667 return 0;
668}
669
670UCHAR CRegEx::ParseBracketSymbol()
671{
672 if(m_ParsePointer>=m_Pattern.GetLength()){
673 m_Error || (m_Error=regeBracket);
674 // ??? point to nuls?
675 }
676 if((m_ParsePointer+1)<m_Pattern.GetLength() && !m_Pattern.Mid(m_ParsePointer,2).Compare("[."))
677 m_ParsePointer+=2;
678 else
679 return m_Pattern[m_ParsePointer++];
680 // Collating symbol
681UCHAR rv = ParseBracketCollatingElement('.');
682 if((m_ParsePointer+1)<m_Pattern.GetLength() && !m_Pattern.Mid(m_ParsePointer,2).Compare("[."))
683 m_ParsePointer+=2;
684 else{
685 m_Error || (m_Error=regeCollate);
686 // ??? point to nuls?
687 }
688 return rv;
689}
690
691void CRegEx::EmitRepeat(int pos,int from,int to)
692{
693 if(m_Error)
694 return;
695 ASSERT(from<=to);
696int finish = m_Strip.GetSize();
697int copy;
698 #defineN 2
699#define INF 3
700#define REP(f,t) ((f)*8+(t))
701#define MAP(n) (((n)<=1)?(n):((n)==256)?INF:N)
702 switch(REP(MAP(from),MAP(to))){
703 case REP(0,0):// must be user doing ths??
704 m_Strip.SetSize(pos);
705 break;
706 case REP(0,1):// as in '?'
707 case REP(0,N):// as in '{1,n}?'
708 case REP(0,INF):// as in '{1,}?'
709 // Kludge - emit y? as (y|) until something gets fixed..
710 StripInsert(pos,CSop(CSop::opChoice0,pos));
711 EmitRepeat(pos+1,1,to);
712 m_Error || m_Strip.Add(CSop(CSop::opOr0,m_Strip.GetSize()-pos));
713 m_Error || (m_Strip[pos].m_Operand=m_Strip.GetSize()-pos);
714 m_Error || m_Strip.Add(CSop(CSop::opOr1,1));
715 m_Error || m_Strip.Add(CSop(CSop::opChoice1,2));
716 break;
717 case REP(1,1):
718 break;
719 case REP(1,N):// as in 'x?x{1,n-1}'
720 // Kludge again..
721 StripInsert(pos,CSop(CSop::opChoice0,pos));
722 m_Error || m_Strip.Add(CSop(CSop::opOr0,m_Strip.GetSize()-pos));
723 m_Error || (m_Strip[pos].m_Operand=m_Strip.GetSize()-pos);
724 m_Error || m_Strip.Add(CSop(CSop::opOr1,1));
725 m_Error || m_Strip.Add(CSop(CSop::opChoice1,2));
726 copy = StripDuplicate(pos+1,finish+1);
727 ASSERT(copy==(finish+4));
728 EmitRepeat(copy,1,to-1);
729 break;
730 case REP(1,INF): // as in '+'
731 StripInsert(pos,CSop(CSop::opPlus0,pos));
732 m_Error || m_Strip.Add(CSop(CSop::opPlus1,m_Strip.GetSize()-pos));
733 break;
734 case REP(N,N):// as in 'xx{from-1,to-1}'
735 copy = StripDuplicate(pos,finish);
736 EmitRepeat(copy,from-1,to-1);
737 break;
738 case REP(N,INF): // as in 'xx{n-1,}'
739 copy = StripDuplicate(pos,finish);
740 EmitRepeat(copy,from-1,to);
741 break;
742#ifndef NDEBUG
743 default:
744 ASSERT(FALSE);
745 break;
746#endif
747 }
748#undef MAP
749#undef REP
750#undef INF
751#undef N
752}
753
754int CRegEx::StripDuplicate(int from,int to)
755{
756int rv = m_Strip.GetSize();
757 ASSERT(from<=to);
758 if(from==to)
759 return rv;
760 // Maybe should be optimized for copying the whole thing.
761 for(int tmp=from;tmp<to;tmp++)
762 m_Strip.Add(m_Strip[tmp]);
763 return rv;
764}
765
766void CRegEx::Categorize()
767{
768 if(m_Error)
769 return;
770 for(int tmp=0;tmp<(sizeof(m_Category)/sizeof(m_Category[0]));tmp++)
771 if((!m_Category[tmp]) && IsInSets(tmp)){
772 int cat = m_Categories++;
773 m_Category[tmp]=cat;
774 for(int c=tmp+1;c<(sizeof(m_Category)/sizeof(m_Category[0]));c++)
775 if((!m_Category[c]) && IsInSameSets(tmp,c))
776 m_Category[c]=cat;
777 }
778}
779
780BOOL CRegEx::IsInSets(UCHAR c)
781{
782 for(int tmp=0;tmp<m_Sets.GetSize();tmp++)
783 if(m_Sets[tmp].IsIn(c))
784 return TRUE;
785 return FALSE;
786}
787
788BOOL CRegEx::IsInSameSets(UCHAR c1,UCHAR c2)
789{
790 for(int tmp=0;tmp<m_Sets.GetSize();tmp++)
791 if(m_Sets[tmp].IsIn(c1)!=m_Sets[tmp].IsIn(c2))
792 return FALSE;
793 return TRUE;
794}
795
796void CRegEx::FigureMust()
797{
798 if(m_Error)
799 return;
800 m_Must.Empty();
801int stripLen = m_Strip.GetSize();
802int seqStart, seqLength = 0;
803int mustStart, mustLength = 0;
804 for(int tmp=1;tmp<stripLen;tmp++){
805 switch(m_Strip[tmp].m_Operator){
806 case CSop::opChar:
807 if(!seqLength)
808 seqStart=tmp;
809 seqLength++;
810 break;
811 case CSop::opPlus0:
812 case CSop::opLeftParen:
813 case CSop::opRightParen:
814 break;// Break, since they don't break the sequence
815 case CSop::opQuest0:
816 case CSop::opChoice0:
817 // These ones we skip.
818 do{
819 tmp+=m_Strip[tmp].m_Operand;
820 // I still think it could be ASSERTed..
821 if(m_Strip[tmp].m_Operator!=CSop::opQuest1 && m_Strip[tmp].m_Operator!=CSop::opChoice1 && m_Strip[tmp].m_Operator!=CSop::opOr1){
822 m_iFlags|=iflagsBad;
823 return;
824 }
825 }while(m_Strip[tmp].m_Operator!=CSop::opQuest1 && m_Strip[tmp].m_Operator!=CSop::opChoice1);
826 // Fallthrough..
827 default:
828 // End of sequence
829 if(seqLength>mustLength){
830 mustStart=seqStart;
831 mustLength=seqLength;
832 }
833 seqLength=0;
834 break;
835 }
836 }// Hmm.. originally it's meant to be do while not opEnd..
837 if(!mustLength)
838 return;
839 // Turn into string, but, wait, personally I'm sure it could be put in the main loop.. or maybe not..
840 for(tmp=0;tmp<seqLength;tmp++){
841 while(m_Strip[seqStart+tmp].m_Operator!=CSop::opChar)
842 ASSERT(tmp<seqLength);
843 m_Must+=m_Strip[tmp].m_Operand;
844 }
845}
846
847int CRegEx::CountPluses()
848{
849 if(m_Error)
850 return 0;
851int stripLen = m_Strip.GetSize();
852int rv = 0;
853int nest = 0;
854 for(int tmp=0;tmp<stripLen;tmp++){
855 switch(m_Strip[tmp].m_Operator){
856 case CSop::opPlus0:
857 nest++;
858 break;
859 case CSop::opPlus1:
860 if(nest>rv)
861 rv = nest;
862 nest--;
863 break;
864 }
865 }// Again, originally we were supposed to scan till opEnd..
866 if(nest)
867 m_iFlags|=iflagsBad;// Could this be an ASSERTion?
868 return rv;
869}
870
871void CRegEx::ParseLiteral()
872{
873 if(!m_Pattern.GetLength()){
874 m_Error || (m_Error=regeEmpty);
875 // ??? point to nuls?
876 }
877 while(m_ParsePointer < m_Pattern.GetLength())
878 EmitOrdinary(m_Pattern[m_ParsePointer++]);
879}
880
881void CRegEx::ParseBRE(int stopa,int stopb)
882{
883int start = m_Strip.GetSize();
884BOOL first=TRUE;
885BOOL wasDollar=FALSE;
886 if(m_ParsePointer<m_Pattern.GetLength() && m_Pattern[m_ParsePointer]=='^'){
887 m_ParsePointer++;
888 m_Error || m_Strip.Add(CSop(CSop::opBOL,0));
889 m_iFlags|=iflagsUseBOL;
890 m_BOLs++;
891 }
892CString stopstr;
893 if(stopa){
894 stopstr+=stopa;
895 if(stopb)
896 stopstr+=stopb;
897 }
898 while(m_ParsePointer < m_Pattern.GetLength() && !((m_ParsePointer+1)<m_Pattern.GetLength() && !m_Pattern.Mid(m_ParsePointer,2).Compare(stopstr))){
899 wasDollar = ParseBREexp(first);
900 first=FALSE;
901 }
902 if(wasDollar){// Trailing anchor that was..
903 m_Strip.SetSize(m_Strip.GetSize()-1);
904 m_Error || m_Strip.Add(CSop(CSop::opEOL,0));
905 m_iFlags|=iflagsUseEOL;
906 m_EOLs++;
907 }
908 if(m_Strip.GetSize()==start){
909 m_Error || (m_Error=regeEmpty);
910 // ??? point to nuls?
911 }
912}
913
914BOOL CRegEx::ParseBREexp(BOOL ordinaryStar)
915{
916int subno;
917int pos = m_Strip.GetSize();
918 ASSERT(m_ParsePointer<m_Pattern.GetLength());
919int c = m_Pattern[m_ParsePointer++];
920 if(c=='\\'){
921 if(m_ParsePointer>=m_Pattern.GetLength()){
922 m_Error || (m_Error=regeEscape);
923 // ??? point to nuls
924 }else
925 c = 0x100|m_Pattern[m_ParsePointer++];
926 }
927 switch(c){
928 case '.':
929 if(m_Flags&regNewLine)
930 EmitNonNewLineAny();
931 else
932 m_Error || m_Strip.Add(CSop(CSop::opAny,0));
933 break;
934 case '[':
935 ParseBracket();
936 break;
937 case 0x100|'{':
938 m_Error || (m_Error=regeBadRepeat);
939 // ??? point to nuls?
940 break;
941 case 0x100|'(':
942 m_Subexps++;
943 subno=m_Subexps;
944 m_ParseParens.SetAtGrow(m_Subexps,CParenthesis(m_Strip.GetSize()));
945 m_Error || m_Strip.Add(CSop(CSop::opLeftParen,subno));
946 if(m_ParsePointer<m_Pattern.GetLength() && !((m_ParsePointer+1)<m_Pattern.GetLength() && !m_Pattern.Mid(m_ParsePointer,2).Compare("\\)")))
947 ParseBRE('\\',')');
948 VERIFY(m_ParseParens[m_Subexps].m_End = m_Strip.GetSize());
949 m_Error || m_Strip.Add(CSop(CSop::opRightParen,subno));
950 if((m_ParsePointer+1) < m_Pattern.GetLength() && !m_Pattern.Mid(m_ParsePointer,2).Compare("\\)"))
951 m_ParsePointer+=2;
952 else{
953 m_Error || (m_Error=regeParen);
954 // ??? point to nuls?
955 }
956 break;
957 case 0x100|')':
958 case 0x100|'}':
959 // Can this possibly happen?!
960 m_Error || (m_Error=regeParen);
961 // ??? point to nuls?
962 break;
963 case 0x100|'1':
964 case 0x100|'2':
965 case 0x100|'3':
966 case 0x100|'4':
967 case 0x100|'5':
968 case 0x100|'6':
969 case 0x100|'7':
970 case 0x100|'8':
971 case 0x100|'9':
972 {
973 int i = (c&0xFF)-'0';
974 if(i < m_ParseParens.GetSize() && m_ParseParens[i].m_End){
975 m_Error || m_Strip.Add(CSop(CSop::opBackRef0,i));
976 ASSERT(m_ParseParens[i].m_Begin);
977 ASSERT(m_Strip[m_ParseParens[i].m_Begin].m_Operator==CSop::opLeftParen);
978 ASSERT(m_Strip[m_ParseParens[i].m_End].m_Operator==CSop::opRightParen);
979 StripDuplicate(m_ParseParens[i].m_Begin+1,m_ParseParens[i].m_End);
980 m_Error || m_Strip.Add(CSop(CSop::opBackRef1,i));
981 }else{
982 m_Error || (m_Error=regeSubReg);
983 // ??? point to nuls?
984 }
985 m_bBackRefs=TRUE;
986 }
987 break;
988 case '*':
989 if(!ordinaryStar){
990 m_Error || (m_Error=regeBadRepeat);
991 // ??? point to nuls?
992 }
993 // Fallthrough..
994 default:
995 EmitOrdinary(c&0xFF);
996 break;
997 }
998 if(m_ParsePointer<m_Pattern.GetLength() && m_Pattern[m_ParsePointer]=='*'){
999 m_ParsePointer++;
1000 // as in '+?'
1001 StripInsert(pos,CSop(CSop::opPlus0,m_Strip.GetSize()-pos+1));
1002 m_Error || m_Strip.Add(CSop(CSop::opPlus1,m_Strip.GetSize()-pos));
1003 StripInsert(pos,CSop(CSop::opQuest0,m_Strip.GetSize()-pos+1));
1004 m_Error || m_Strip.Add(CSop(CSop::opQuest1,m_Strip.GetSize()-pos));
1005 }else if ((m_ParsePointer+1)<m_Pattern.GetLength() && !m_Pattern.Mid(m_ParsePointer,2).Compare("\\{")){
1006 m_ParsePointer+=2;
1007 int count = ParseCount();
1008 int count2;
1009 if(m_ParsePointer<m_Pattern.GetLength() && m_Pattern[m_ParsePointer]==','){
1010 m_ParsePointer++;
1011 if(m_ParsePointer<m_Pattern.GetLength() && isdigit(m_Pattern[m_ParsePointer])){
1012 count2=ParseCount();
1013 if(count>count2){
1014 m_Error || (m_Error=regeBadBrace);
1015 // ??? poin to nuls?
1016 }
1017 }else // Single number with comma
1018 count2=256;
1019 }else // Single number
1020 count2=count;
1021 EmitRepeat(pos,count,count2);
1022 if((m_ParsePointer+1)>=m_Pattern.GetLength() || m_Pattern.Mid(m_ParsePointer,2).Compare("\\}")){
1023 while(m_ParsePointer<m_Pattern.GetLength() && !((m_ParsePointer+1)<m_Pattern.GetLength() && !m_Pattern.Mid(m_ParsePointer,2).Compare("\\}")))
1024 m_ParsePointer++;
1025 if(m_ParsePointer>=m_Pattern.GetLength()){
1026 m_Error || (m_Error=regeBrace);
1027 // ??? point to nuls?
1028 }
1029 m_Error || (m_Error=regeBadBrace);
1030 }else
1031 m_ParsePointer+=2;
1032 }else if(c=='$')
1033 return TRUE;
1034 return FALSE;
1035}
1036
1037CRegEx::CRegEx()
1038{
1039 m_bCompiled=FALSE;
1040}
1041
1042LPCTSTR CRegEx::MatchFast(LPCTSTR begin)
1043{
1044 MatchStatesClear(CSop::stCurrent);
1045 m_Strip[1].m_MatchData|=CSop::stCurrent;
1046int stripLen = m_Strip.GetSize();
1047 MatchStep(1,stripLen-1,CSop::stCurrent,charNothing,CSop::stCurrent);
1048 MatchStatesCopy(CSop::stFresh,CSop::stCurrent);
1049LPCTSTR coldp = NULL;
1050LPCTSTR p = begin;
1051int c = (begin==m_mBegin)?charOut:((int)(BYTE)m_mPointer[-1]);
1052 for(;;){
1053 // next character..
1054 int lastc = c;
1055 c = (p==m_mEnd)?charOut:(int)*(BYTE*)p;
1056 if(MatchStatesEqual(CSop::stCurrent,CSop::stFresh))
1057 coldp=p;
1058 // Is there an EOL and/or BOL between lastc and c? - they ask..
1059 intflagc=0;
1060 inti = 0;
1061 if((lastc=='\n' && m_Flags&regNewLine) || (lastc==charOut && !(m_mFlags&regNotBOL))){
1062 flagc=charBOL;
1063 i=m_BOLs;
1064 }
1065 if((c=='\n' && m_Flags&regNewLine) || (c==charOut && !(m_mFlags&regNotEOL))){
1066 flagc=(flagc==charBOL)?charBOLEOL:charEOL;
1067 i+=m_EOLs;
1068 }
1069 if(i){
1070 for(;i>0;i--)
1071 MatchStep(1,stripLen-1,CSop::stCurrent,flagc,CSop::stCurrent);
1072 }
1073 // What about a word boundary? - they wonder..
1074 if((flagc==charBOL || (lastc!=charOut && !isWordableChar(c))) && (c!=charOut && isWordableChar(c)))
1075 flagc = charBOW;
1076 if((lastc!=charOut && isWordableChar(lastc)) && (flagc==charEOL || (c!=charOut && !isWordableChar(c))))
1077 flagc = charEOW;
1078 if(flagc==charBOW || flagc==charEOW){
1079 MatchStep(1,stripLen-1,CSop::stCurrent,flagc,CSop::stCurrent);
1080 }
1081 // Are we done? Now WE wonder..
1082 if((m_Strip[stripLen-1].m_MatchData&CSop::stCurrent) || p==m_mEnd)
1083 break;// They insist I need to note break out.. Okay, I do..
1084 // Nope, we're not done. We have to face this character..
1085 MatchStatesCopy(CSop::stTemp,CSop::stCurrent);
1086 MatchStatesCopy(CSop::stCurrent,CSop::stFresh);
1087 ASSERT(c!=charOut);
1088 MatchStep(1,stripLen-1,CSop::stTemp,c,CSop::stCurrent);
1089 p++;
1090 }
1091 ASSERT(coldp);
1092 m_cOldP=coldp;// *** I believe this variable can be changed 'in-place'
1093 if(m_Strip[stripLen-1].m_MatchData&CSop::stCurrent)
1094 return &p[1];
1095 else
1096 return NULL;
1097}
1098
1099void CRegEx::MatchStatesClear(BYTE mask)
1100{
1101int stripLen = m_Strip.GetSize();
1102 for(int tmp=0;tmp<stripLen;tmp++)
1103 m_Strip[tmp].m_MatchData&=~mask;
1104}
1105
1106void CRegEx::MatchStep(int from,int to,BYTE maskBefore,int charCode,BYTE maskAfter)
1107{
1108BOOL i;
1109int look;
1110int here = from;
1111 for(int pc=from;pc!=to;pc++,here++){
1112 CSop s=m_Strip[pc];
1113 switch(s.m_Operator){
1114 case CSop::opEnd:
1115 ASSERT(pc==(to-1));
1116 break;
1117 case CSop::opChar:
1118 // Only characters can match..
1119 ASSERT((charCode<charOut) || charCode!=s.m_Operand);
1120 if(charCode==s.m_Operand)
1121 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskBefore)?maskAfter:0;
1122 break;
1123 case CSop::opBOL:
1124 if(charCode==charBOL || charCode==charBOLEOL)
1125 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskBefore)?maskAfter:0;
1126 break;
1127 case CSop::opEOL:
1128 if(charCode==charEOL || charCode==charBOLEOL)
1129 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskBefore)?maskAfter:0;
1130 break;
1131 case CSop::opBOW:
1132 if(charCode==charBOW)
1133 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskBefore)?maskAfter:0;
1134 break;
1135 case CSop::opEOW:
1136 if(charCode==charEOW)
1137 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskBefore)?maskAfter:0;
1138 break;
1139 case CSop::opAny:
1140 if(charCode<charOut)
1141 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskBefore)?maskAfter:0;
1142 break;
1143 case CSop::opAnyOf:
1144 if(charCode<charOut && m_Sets[s.m_Operand].m_Set[charCode])
1145 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskBefore)?maskAfter:0;
1146 break;
1147 case CSop::opBackRef0:// Ignored here..
1148 case CSop::opBackRef1:
1149 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1150 break;
1151 case CSop::opPlus0:
1152 // Forward, this is just an empty, comment says..
1153 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1154 break;
1155 case CSop::opPlus1:
1156 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1157 i =(m_Strip[here-s.m_Operand].m_MatchData&maskAfter)!=0;
1158 m_Strip[here-s.m_Operand].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1159 if(!i && (m_Strip[here-s.m_Operand].m_MatchData&maskAfter)){
1160 // oho, must reconsider loop body, comment says.. what's so 'oho' about it?
1161 pc-=s.m_Operand+1;
1162 here=pc;
1163 }
1164 break;
1165 case CSop::opQuest0:
1166 // two branches, both forward..
1167 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1168 m_Strip[here+s.m_Operand].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1169 break;
1170 case CSop::opQuest1:
1171 // just an empty.. aren't we tired of justanempties?
1172 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1173 break;
1174 case CSop::opLeftParen: // they say it's not significan there..
1175 case CSop::opRightParen:
1176 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1177 break;
1178 case CSop::opChoice0:// mark the first two branches..
1179 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1180 ASSERT(m_Strip[pc+s.m_Operand].m_Operator==CSop::opOr1);
1181 m_Strip[here+s.m_Operand].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1182 break;
1183 case CSop::opOr0:// done a branch, find the end of choice..
1184 if(m_Strip[here].m_MatchData&maskAfter){
1185 for(look=1;(s=m_Strip[pc+look]).m_Operator!=CSop::opChoice1;look+=s.m_Operand)
1186 ASSERT(s.m_Operator==CSop::opOr1);
1187 m_Strip[here+look].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1188 }
1189 break;
1190 case CSop::opOr1: // Propagate Choice's marking..
1191 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1192 if(m_Strip[pc+s.m_Operand].m_Operator!=CSop::opChoice1){
1193 ASSERT(m_Strip[pc+s.m_Operand].m_Operator==CSop::opOr1);
1194 m_Strip[here+s.m_Operand].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1195 }
1196 break;
1197 case CSop::opChoice1: // Just empty.. :-)..
1198 m_Strip[here+1].m_MatchData|=(m_Strip[here].m_MatchData&maskAfter)?maskAfter:0;
1199 break;
1200#ifdef _DEBUG
1201 default:
1202 ASSERT(FALSE);
1203 break;
1204#endif
1205 }
1206 }
1207}
1208
1209void CRegEx::MatchStatesCopy(BYTE dst,BYTE src)
1210{
1211int stripLen = m_Strip.GetSize();
1212 for(int tmp=0;tmp<stripLen;tmp++){
1213 // I believe this can be optimized, easily..
1214 m_Strip[tmp].m_MatchData&=~dst;
1215 m_Strip[tmp].m_MatchData|=(m_Strip[tmp].m_MatchData&src)?dst:0;
1216 }
1217}
1218
1219BOOL CRegEx::MatchStatesEqual(BYTE m1,BYTE m2)
1220{
1221int stripLen = m_Strip.GetSize();
1222 for(int tmp=0;tmp<stripLen;tmp++){
1223 BYTE mm = m_Strip[tmp].m_MatchData;
1224 if(((mm&m1) && (mm&m2)) || !(mm&(m1|m2)))
1225 continue;
1226 return FALSE;
1227 }
1228 return TRUE;
1229}
1230
1231LPCTSTR CRegEx::MatchSlow(LPCTSTR begin,LPCTSTR end,int from,int to)
1232{
1233 MatchStatesClear(CSop::stCurrent);
1234 m_Strip[from].m_MatchData|=CSop::stCurrent;
1235 MatchStep(from,to,CSop::stCurrent,charNothing,CSop::stCurrent);
1236LPCTSTR mp = NULL;
1237int c = (m_mBegin==m_mPointer)?charOut:(int)(BYTE)begin[-1];
1238LPCTSTR p = begin;
1239 for(;;){
1240 // next character..
1241 int lastc = c;
1242 c = (p==m_mEnd)?charOut:(int)*(BYTE*)p;
1243 // Now we start to wonder if there is an EOL and/or BOL between lastc and c
1244 int flagc = 0;
1245 int i = 0;
1246 if((lastc=='\n' && m_Flags&regNewLine) || (lastc==charOut && !(m_mFlags&regNotBOL))){
1247 flagc = charBOL;
1248 i = m_BOLs;
1249 }
1250 if((c=='\n' && m_Flags&regNewLine) || (c==charOut && !(m_mFlags&regNotEOL))){
1251 flagc = (flagc==charBOL)?charBOLEOL:charEOL;
1252 i+=m_EOLs;
1253 }
1254 if(i){
1255 for(;i>0;i--)
1256 MatchStep(from,to,CSop::stCurrent,flagc,CSop::stCurrent);
1257 }
1258 // Now we wonder about word boundaries..
1259 if((flagc==charBOL || (lastc!=charOut && !isWordableChar(lastc))) && (c!=charOut && isWordableChar(c)))
1260 flagc=charBOW;
1261 if((lastc!=charOut && isWordableChar(lastc)) && (flagc==charEOL || (c!=charOut && !isWordableChar(c))))
1262 flagc=charEOW;
1263 if(flagc==charBOW || flagc==charEOW){
1264 MatchStep(from,to,CSop::stCurrent,flagc,CSop::stCurrent);
1265 }
1266 // Are we done we all wonder??
1267 if(m_Strip[to].m_MatchData&CSop::stCurrent)
1268 mp=p;
1269 if(MatchStatesEqual(CSop::stCurrent,CSop::stEmpty) || p==end)
1270 break;// Again, we're obliged to note break out. We do.
1271 // Sucks.. we have to face this character..
1272 MatchStatesCopy(CSop::stTemp,CSop::stCurrent);
1273 MatchStatesCopy(CSop::stCurrent,CSop::stEmpty);
1274 ASSERT(c!=charOut);
1275 MatchStep(from,to,CSop::stTemp,c,CSop::stCurrent);
1276 MatchStep(from,to,CSop::stCurrent,charNothing,CSop::stCurrent);
1277 p++;
1278 }
1279 return mp;
1280}
1281
1282LPCTSTR CRegEx::MatchDissect(LPCTSTR begin,LPCTSTR end,int from,int to)
1283{
1284LPCTSTR sp = begin, dp;
1285LPCTSTR stp, rest, tail, ssp, oldssp, sep;
1286int ssub, esub;
1287int es;
1288int i;
1289 for(int ss=from;ss<to;ss = es){
1290 // Identify end of SubRE
1291 es = ss;
1292 switch(m_Strip[es].m_Operator){
1293 case CSop::opPlus0:
1294 case CSop::opQuest0:
1295 es+=m_Strip[es].m_Operand;
1296 break;
1297 case CSop::opChoice0:
1298 while(m_Strip[es].m_Operator!=CSop::opChoice1)
1299 es+=m_Strip[es].m_Operand;
1300 break;
1301 }
1302 es++;
1303 // Figure out what it matched
1304 switch(m_Strip[ss].m_Operator){
1305 case CSop::opEnd:
1306 ASSERT(FALSE);
1307 break;
1308 case CSop::opChar:
1309 sp++;
1310 break;
1311 case CSop::opBOL:
1312 case CSop::opEOL:
1313 case CSop::opBOW:
1314 case CSop::opEOW:
1315 break;
1316 case CSop::opAny:
1317 case CSop::opAnyOf:
1318 sp++;
1319 break;
1320 case CSop::opBackRef0:
1321 case CSop::opBackRef1:
1322 ASSERT(FALSE);
1323 break;
1324 // Cases where lenght of match is hard to find..
1325 case CSop::opQuest0:
1326 stp=end;
1327 for(;;){
1328 // How long could this one be??
1329 rest = MatchSlow(sp,stp,ss,es);
1330 ASSERT(rest);// It did match.. It should've..
1331 // Could the rest match the rest? (good question)
1332 tail = MatchSlow(rest,end,es,to);
1333 if(tail==end)
1334 break;// yup.
1335 // nope, try a shorter match for this one..
1336 stp=rest-1;
1337 ASSERT(stp>=sp);// It did work.. It should've..
1338 }
1339 ssub=ss+1;
1340 esub=es-1;
1341 // Did innards match?
1342 if(MatchSlow(sp,rest,ssub,esub)){
1343 dp = MatchDissect(sp,rest,ssub,esub);
1344 ASSERT(dp==rest);
1345 }else// nope..
1346 ASSERT(sp==rest);
1347 sp = rest;
1348 break;
1349 case CSop::opPlus0:
1350 stp=end;
1351 for(;;){
1352 // How long could this one be??
1353 rest = MatchSlow(sp,stp,ss,es);
1354 ASSERT(rest);// It did.. It should've..
1355 // Could the rest match the rest?
1356 tail = MatchSlow(rest,end,es,to);
1357 if(tail==end)
1358 break;// yup.
1359 // nope..
1360 stp=rest-1;
1361 ASSERT(stp>=sp);// It should've worked, we believe..
1362 }
1363 ssub=ss+1;
1364 esub=es-1;
1365 ssp=sp;
1366 oldssp=ssp;
1367 for(;;){// Find last match of innards..
1368 sep = MatchSlow(ssp,rest,ssub,esub);
1369 if((!sep) || sep==ssp)
1370 break; // Failed or matched nothin'
1371 oldssp=ssp;
1372 ssp=sep;
1373 }
1374 if(!sep){
1375 // Last successfull..
1376 sep=ssp;
1377 ssp=oldssp;
1378 }
1379 ASSERT(sep=rest);// Must exhaust substring they say..
1380 VERIFY(MatchSlow(ssp,sep,ssub,esub)==rest);// Assert or verify - that is the question..
1381 dp = MatchDissect(ssp,sep,ssub,esub);
1382 ASSERT(dp==sep);
1383 sp=rest;
1384 break;
1385 case CSop::opChoice0:
1386 stp = end;
1387 for(;;){
1388 // how long..
1389 rest = MatchSlow(sp,stp,ss,es);
1390 ASSERT(rest);
1391 // Could it..
1392 tail = MatchSlow(rest,end,es,to);
1393 if(tail==end)
1394 break;// y
1395 // n
1396 stp = rest-1;
1397 ASSERT(stp>=sp);
1398 }
1399 ssub=ss+1;
1400 esub=ss+m_Strip[ss].m_Operand-1;
1401 ASSERT(m_Strip[esub].m_Operator==CSop::opOr0);
1402 for(;;){// Find first matching branch..
1403 if(MatchSlow(sp,rest,ssub,esub)==rest)
1404 break;
1405 // this one missed, try next..
1406 ASSERT(m_Strip[esub].m_Operator==CSop::opOr0);
1407 esub++;
1408 ASSERT(m_Strip[esub].m_Operator==CSop::opOr1);
1409 ssub=esub+1;
1410 esub+=m_Strip[esub].m_Operand;
1411 if(m_Strip[esub].m_Operator==CSop::opOr1)
1412 esub--;
1413 else
1414 ASSERT(m_Strip[esub].m_Operator==CSop::opChoice1);
1415 }
1416 dp = MatchDissect(sp,rest,ssub,esub);
1417 ASSERT(dp==rest);
1418 sp=rest;
1419 break;
1420 case CSop::opPlus1:
1421 case CSop::opQuest1:
1422 case CSop::opOr0:
1423 case CSop::opOr1:
1424 case CSop::opChoice1:
1425 ASSERT(FALSE);
1426 break;
1427 case CSop::opLeftParen:
1428 i = m_Strip[ss].m_Operand;
1429 ASSERT(0<i && i<=m_Subexps);
1430 m_Matches[i].m_Begin=sp-m_mBegin;
1431 break;
1432 case CSop::opRightParen:
1433 i = m_Strip[ss].m_Operand;
1434 ASSERT(0<i && i<=m_Subexps);
1435 m_Matches[i].m_End=sp-m_mBegin;
1436 break;
1437#ifdef _DEBUG
1438 default:// Uh.. oh..
1439 ASSERT(FALSE);
1440 break;
1441#endif
1442 }
1443 }
1444 ASSERT(sp==end);
1445 return sp;
1446}
1447
1448LPCTSTR CRegEx::MatchBackRef(LPCTSTR begin,LPCTSTR end,int from,int to,int level)
1449{
1450LPCTSTR sp = begin;
1451BOOL hard = FALSE;
1452 // Get as far as we can as long as it's easy
1453 for(int ss=from;!hard && ss<to;ss++){
1454 CSop s = m_Strip[ss];
1455 switch(s.m_Operator){
1456 case CSop::opChar:
1457 if(sp==end || *sp++ != s.m_Operand)
1458 return NULL;
1459 break;
1460 case CSop::opAny:
1461 if(sp==end)
1462 return NULL;
1463 sp++;// I'm sure this ++ could be embedded in previous expression..
1464 break;
1465 case CSop::opAnyOf:
1466 if(sp==end || !m_Sets[s.m_Operand].IsIn(*sp++))
1467 return NULL;
1468 break;
1469 case CSop::opBOL:
1470 if(!((sp==m_mBegin && !(m_mFlags&regNotBOL)) || (sp<m_mEnd && *(sp-1)=='\n' && (m_Flags&regNewLine))))
1471 return NULL;
1472 break;
1473 case CSop::opEOL:
1474 if(!((sp==m_mEnd && !(m_mFlags&regNotEOL)) || (sp<m_mEnd && *sp=='\n' && (m_Flags&regNewLine))))
1475 return NULL;
1476 break;
1477 case CSop::opBOW:
1478 if(!(((sp==m_mBegin && !(m_mFlags&regNotBOL)) || (sp<m_mEnd && *(sp-1)=='\n' && (m_Flags&regNewLine)) || (sp>m_mBegin && !isWordableChar(*(sp-1)))) && (sp<m_mEnd && isWordableChar(*sp))))
1479 return NULL;
1480 break;
1481 case CSop::opEOW:
1482 if(!(((sp==m_mEnd && !(m_mFlags&regNotEOL)) || (sp<m_mEnd && *sp=='\n' && (m_Flags&regNewLine)) || (sp<m_mEnd && !isWordableChar(*sp))) && (sp>m_mBegin && isWordableChar(*(sp-1)))))
1483 return NULL;
1484 break;
1485 case CSop::opQuest1:
1486 break;
1487 case CSop::opOr0:// Matches null, but needs to skip
1488 ss++;
1489 s = m_Strip[ss];
1490 do{
1491 ASSERT(s.m_Operator==CSop::opOr1);
1492 ss+=s.m_Operand;
1493 }while((s=m_Strip[ss]).m_Operator!=CSop::opChoice1);
1494 // Now we should note that ss++ gets us past the Choice1..
1495 break;
1496 default:
1497 // Have to make a choice..
1498 hard=TRUE;
1499 break;
1500 }
1501 }
1502 if(!hard){// That was it..
1503 if(sp!=end)
1504 return NULL;
1505 return sp;
1506 }
1507 ss--;// Adjust for ther for's final increment..
1508 // Hard stuff.. is going on and on..
1509CSop s = m_Strip[ss];
1510int i, len, offsave;
1511int ssub,esub;
1512LPCTSTR ssp, dp;
1513 switch(s.m_Operator){
1514 case CSop::opBackRef0:// The vilest depths they say.. If I only knew what the 'viles' stands for..
1515 i = s.m_Operand;
1516 ASSERT(0<i && i<=m_Subexps);
1517 if(m_Matches[i].m_End<0)
1518 return NULL;
1519 ASSERT(m_Matches[i].m_Begin>=0);
1520 len = m_Matches[i].GetLength();
1521 ASSERT((end-m_mBegin)>=len);
1522 if(sp>end-len)
1523 return NULL;// Not enough left to match..
1524 ssp = m_mBegin+m_Matches[i].m_Begin;
1525 if(memcmp(sp,ssp,len))
1526 return NULL;
1527 while(m_Strip[ss]!=CSop(CSop::opBackRef1,i))
1528 ss++;
1529 return MatchBackRef(sp+len,end,ss+1,to,level-1);
1530 break;
1531 case CSop::opQuest0:// to null or not they wonder..
1532 dp = MatchBackRef(sp,end,ss+1,to,level);
1533 if(dp)
1534 return dp;// not..
1535 return MatchBackRef(sp,end,ss+s.m_Operand+1,to,level-1);
1536 break;
1537 case CSop::opPlus0:
1538 ASSERT(m_mLastPos.GetSize());
1539 ASSERT(level+1 <= m_Pluses);
1540 m_mLastPos[level+1]=sp;
1541 return MatchBackRef(sp,end,ss+1,to,level+1);
1542 break;
1543 case CSop::opPlus1:
1544 if(sp == m_mLastPos[level])// Last pass matched null
1545 return MatchBackRef(sp,end,ss+1,to,level-1);
1546 // Try another pass..
1547 m_mLastPos[level]=sp;
1548 dp = MatchBackRef(sp,end,ss-s.m_Operand+1,to,level);
1549 if(dp)
1550 return dp;
1551 return MatchBackRef(sp,end,ss+1,to,level-1);
1552 break;
1553 case CSop::opChoice0:// find the right one, ifany
1554 ssub = ss+1;
1555 esub = ss+s.m_Operand-1;
1556 ASSERT(m_Strip[esub].m_Operator==CSop::opOr0);
1557 for(;;){// Find first matching branch.
1558 dp = MatchBackRef(sp,end,ssub,esub,level);
1559 if(dp)
1560 return dp;
1561 // This one missed, try next one..
1562 if(m_Strip[esub].m_Operator==CSop::opChoice1)
1563 return NULL;// There is none..
1564 esub++;
1565 ASSERT(m_Strip[esub].m_Operator==CSop::opOr1);
1566 ssub=esub+1;
1567 esub+=m_Strip[esub].m_Operand;
1568 if(m_Strip[esub].m_Operator==CSop::opOr1)
1569 esub--;
1570 else
1571 ASSERT(m_Strip[esub].m_Operator==CSop::opChoice1);
1572 }
1573 break;
1574 case CSop::opLeftParen:// Must undo assignment if rest fails..
1575 i = s.m_Operand;
1576 ASSERT(0<i && i<=m_Subexps);
1577 offsave = m_Matches[i].m_Begin;
1578 m_Matches[i].m_Begin = sp-m_mBegin;
1579 dp = MatchBackRef(sp,end,ss+1,to,level);
1580 if(dp)
1581 return dp;
1582 m_Matches[i].m_Begin=offsave;
1583 return NULL;
1584 break;
1585 case CSop::opRightParen: // Must undo assignment if rest fails..
1586 i = s.m_Operand;
1587 ASSERT(0<i && i<=m_Subexps);
1588 offsave = m_Matches[i].m_End;
1589 m_Matches[i].m_End = sp-m_mBegin;
1590 dp = MatchBackRef(sp,end,ss+1,to,level);
1591 if(dp)
1592 return dp;
1593 m_Matches[i].m_End = offsave;
1594 return NULL;
1595 break;
1596 #ifdef_DEBUG
1597 default:
1598 ASSERT(FALSE);
1599 break;
1600#endif
1601 }
1602 ASSERT(FALSE);
1603 return NULL;// Anyway - we can never get here..
1604}
1605
1606 #ifdef_DEBUG
1607void CRegEx::CSop::Dump(CDumpContext& dc)
1608{
1609 switch(m_Operator){
1610 case opEnd:
1611 dc << "end";
1612 break;
1613 case opChar:
1614 dc << "char('" << (char)m_Operand << "')";
1615 break;
1616 case opBOL:
1617 dc << "BOL";
1618 break;
1619 case opEOL:
1620 dc << "EOL";
1621 break;
1622 case opAny:
1623 dc << "any";
1624 break;
1625 case opAnyOf:
1626 dc << "anyOf(" << m_Operand << ")";
1627 break;
1628 case opBackRef0:
1629 dc << "[ backref(" << m_Operand << ")";
1630 break;
1631 case opBackRef1:
1632 dc << "] backref(" << m_Operand << ")";
1633 break;
1634 case opPlus0:
1635 dc << "[ + (" << m_Operand << ")";
1636 break;
1637 case opPlus1:
1638 dc << "] + (" << m_Operand << ")";
1639 break;
1640 case opQuest0:
1641 dc << "[ ? (" << m_Operand << ")";
1642 break;
1643 case opQuest1:
1644 dc << "] ? (" << m_Operand << ")";
1645 break;
1646 case opLeftParen:
1647 dc << "[ ( (" << m_Operand << ")";
1648 break;
1649 case opRightParen:
1650 dc << "] ) (" << m_Operand << ")";
1651 break;
1652 case opChoice0:
1653 dc << "[ choice (" << m_Operand << ")";
1654 break;
1655 case opOr0:
1656 dc << "[ | (" << m_Operand << ")";
1657 break;
1658 case opOr1:
1659 dc << "] | (" << m_Operand << ")";
1660 break;
1661 case opChoice1:
1662 dc << "] choice (" << m_Operand << ")";
1663 break;
1664 case opBOW:
1665 dc << "BOW";
1666 break;
1667 case opEOW:
1668 dc << "EOW";
1669 break;
1670 }
1671}
1672void CRegEx::DumpStrip(CDumpContext& dc)
1673{
1674 for(int tmp=0;tmp<m_Strip.GetSize();tmp++)
1675 dc << tmp << ": " << m_Strip[tmp] << ";\n";
1676}
1677#endif
1678
1679
1680CString CRegEx::GetMatch(int match)
1681{
1682CString rv;
1683 if(!m_Matches.GetSize())
1684 return rv;
1685 ASSERT(m_Matches[0].m_Begin<m_Input.GetLength() && m_Matches[0].m_End<=m_Input.GetLength());
1686 if(match==matchPreMatch)
1687 return m_Input.Left(m_Matches[0].m_Begin);
1688 if(match==matchPostMatch)
1689 return m_Input.Mid(m_Matches[0].m_End);
1690 if(match<0 || match >= m_Matches.GetSize())
1691 return rv;
1692 if(m_Matches[match].m_Begin<0 || m_Matches[match].m_End<0)
1693 return rv;
1694 ASSERT(m_Matches[match].m_Begin<m_Input.GetLength() && m_Matches[match].m_End<=m_Input.GetLength());
1695 rv = m_Input.Mid(m_Matches[match].m_Begin,m_Matches[match].m_End-m_Matches[match].m_Begin);
1696 return rv;
1697}
diff --git a/shared-code/RegEx.h b/shared-code/RegEx.h
deleted file mode 100644
index 2534768..0000000
--- a/shared-code/RegEx.h
+++ b/dev/null
@@ -1,158 +0,0 @@
1#ifndef __REGEX_H
2#define __REGEX_H
3
4 class CRegEx{
5public:
6 CString GetMatch(int match=0);
7 CString m_Input;
8 struct CMatch{
9 CMatch() : m_Begin(-1), m_End(-1) {}
10 int GetLength() { return m_End-m_Begin; }
11 int m_Begin;
12 int m_End;
13 };
14 typedefCArray<CMatch,CMatch&> CMatchBox;
15 enum{
16 matchMatch = 0,
17 matchPreMatch = -1,
18 matchPostMatch = -2
19 };
20 CMatchBox m_Matches;
21 enum{
22 charOut = 256,
23 charBOL, charEOL, charBOLEOL, charNothing, charBOW, charEOW,
24 charMaxCode = charEOW,
25 charNNChars = (charMaxCode-255)
26 };
27 int m_mFlags;
28 enum{
29 regeSuccess = 0,
30 regeNoMatch = 1, regeBadPattern, regeCollate, regeCType, regeEscape, regeSubReg, regeBracket,
31 regeParen, regeBrace, regeBadBrace, regeRange, regeSpace, regeBadRepeat, regeEmpty, regeAssert,
32 regeInvArg
33 };
34 int m_Error;
35 CRegEx();
36 BOOL m_bCompiled;
37 CString m_Pattern;
38 BOOL m_bBackRefs;
39 int m_Pluses;
40 CString m_Must;
41 BYTE m_Category[CHAR_MAX-CHAR_MIN+1];
42 int m_Categories;
43 int m_EOLs;
44 int m_BOLs;
45 int m_iFlags;
46 int m_Subexps;
47 struct CSop {
48 void Dump(CDumpContext& dc);
49 CSop(){}
50 CSop(BYTE op,DWORD opnd=0) : m_Operator(op), m_Operand(opnd) {}
51 BOOL operator==(CSop& other) {return m_Operator==other.m_Operator && m_Operand==other.m_Operand;}
52 BOOL operator!=(CSop& other) { return !((*this)==other);}
53 enum{
54 opEnd = 1, opChar, opBOL, opEOL, opAny, opAnyOf, opBackRef0, opBackRef1,
55 opPlus0, opPlus1, opQuest0, opQuest1, opLeftParen, opRightParen, opChoice0,
56 opOr0, opOr1, opChoice1, opBOW, opEOW
57 };
58 BYTE m_Operator;
59 DWORD m_Operand;
60 enum{
61 stCurrent = 1, stFresh = 2, stTemp = 4, stEmpty = 8
62 };
63 BYTE m_MatchData;
64 };
65 typedef CArray<CSop,CSop&> CStrip;
66 CStrip m_Strip;
67 int m_Flags;
68 struct CSet{
69 CSet() : m_Hash(0) { memset(m_Set,0,sizeof(m_Set)); }
70 CSet(CSet& src) { (*this)=src; }
71 CSet& operator=(CSet& src) { memmove(this,&src,sizeof(*this)); return *this; }
72 BOOL operator==(CSet& other) { if(m_Hash!=other.m_Hash)return FALSE;return !memcmp(m_Set,other.m_Set,sizeof(m_Set)); }
73 enum{
74 size = (CHAR_MAX-CHAR_MIN+1)
75 };
76 BOOL m_Set[size];
77 BYTE m_Hash;
78 public:
79 UCHAR GetOnly();
80 void Sub(UCHAR c);
81 BOOL IsIn(UCHAR c);
82 void Add(UCHAR c);
83 };
84 typedef CArray<CSet,CSet&> CSets;
85 CSets m_Sets;
86 enum{
87 // Compile flags
88 regBasic = 0, regExtended = 1,
89 regIgnoreCase = 2,
90 regNoSubExpressions = 4,// Also works for matching.
91 regNewLine = 16,
92 regLiteral = 32,
93 // Match Flags
94 regNotBOL = 1,
95 regNotEOL = 2,
96 regOneMatch=64,
97 regBackRefs=128,
98 // iFlags
99 iflagsUseBOL=1, iflagsUseEOL=2, iflagsBad=4
100 };
101 CString Replace(LPCTSTR src,LPCTSTR rep,int flags=0);
102 BOOL Match(LPCTSTR src,int flags=0);
103 BOOL Compile(LPCTSTR regex,int flags=0);
104private:
105 #ifdef_DEBUG
106 void DumpStrip(CDumpContext& dc);
107#endif
108 LPCTSTR MatchBackRef(LPCTSTR begin,LPCTSTR end,int from,int to,int level);
109 typedef CArray<LPCTSTR,LPCTSTR> CStrPtrArray;
110 CStrPtrArray m_mLastPos;
111 LPCTSTR MatchDissect(LPCTSTR begin,LPCTSTR end,int from,int to);
112 LPCTSTR MatchSlow(LPCTSTR begin,LPCTSTR end,int from,int to);
113 LPCTSTR m_cOldP;
114 BOOL MatchStatesEqual(BYTE m1,BYTE m2);
115 LPCTSTR m_mBegin;
116 void MatchStatesCopy(BYTE dst,BYTE src);
117 void MatchStep(int from,int to,BYTE maskBefore,int charCode,BYTE maskAfter);
118 void MatchStatesClear(BYTE mask);
119 LPCTSTR MatchFast(LPCTSTR begin);
120 LPCTSTR m_mEnd;
121 LPCTSTR m_mPointer;
122 BOOL ParseBREexp(BOOL ordinaryStar);
123 void ParseBRE(int stopa=0,int stopb=0);
124 void ParseLiteral();
125 int CountPluses();
126 void FigureMust();
127 BOOL IsInSameSets(UCHAR c1,UCHAR c2);
128 BOOL IsInSets(UCHAR c);
129 void Categorize();
130 int StripDuplicate(int from,int to);
131 void EmitRepeat(int pos,int from,int to);
132 UCHAR ParseBracketSymbol();
133 UCHAR ParseBracketCollatingElement(UCHAR term);
134 void ParseBracketEClass(CSet& cset);
135 void ParseBracketCClass(CSet& cset);
136 void ParseBracketTerm(CSet& cset);
137 int StoreSet(CSet& cset);
138 void ParseBracket();
139 int ParseCount();
140 void EmitNonNewLineAny();
141 void EmitOrdinary(UCHAR c);
142 void StripInsert(int pos,CSop& sop);
143 void ParseEREexp();
144 void ParseERE(int stop=0);
145 struct CParenthesis{
146 long m_Begin;
147 long m_End;
148 CParenthesis(long b=0,long e=0) : m_Begin(b), m_End(e) {}
149 };
150 typedef CArray<CParenthesis,CParenthesis&> CParens;
151 CParens m_ParseParens;
152 int m_ParsePointer;
153};
154 #ifdef_DEBUG
155inline CDumpContext& operator<<(CDumpContext& dc, CRegEx::CSop& sop) { sop.Dump(dc); return dc; }
156#endif
157
158#endif // __REGEX_H \ No newline at end of file
diff --git a/shared-code/SNMPExtDll.h b/shared-code/SNMPExtDll.h
deleted file mode 100644
index 14c920d..0000000
--- a/shared-code/SNMPExtDll.h
+++ b/dev/null
@@ -1,252 +0,0 @@
1 #ifndef__SNMPEXTDLL_H
2#define __SNMPEXTDLL_H
3
4#include "snmpeer.h"
5
6#include <snmp.h>
7
8namespace Klever {
9
10 class CSNMPExtDLL : public CSNMPeer{
11public:
12 HINSTANCE m_hInstance;
13 HANDLE m_hEvent;
14 AsnObjectIdentifier m_OID;
15 BOOL (SNMP_FUNC_TYPE *m_extInit)(DWORD dw,HANDLE h,AsnObjectIdentifier* aoid);
16 BOOL (SNMP_FUNC_TYPE *m_extQuery)(BYTE b,RFC1157VarBindList* rvbl,AsnInteger* ai1,AsnInteger* ai2);
17 BOOL (SNMP_FUNC_TYPE *m_extTrap)(AsnObjectIdentifier*,AsnNetworkAddress*,AsnInteger*,AsnInteger*,AsnTimeticks*,RFC1157VarBindList*);
18
19 HINSTANCE m_hSNMPAPI;
20 void (SNMP_FUNC_TYPE *m_snmpOIDFree)(AsnObjectIdentifier*);
21 LPVOID (SNMP_FUNC_TYPE *m_snmpAlloc)(UINT);
22 void (SNMP_FUNC_TYPE *m_snmpFree)(LPVOID);
23 void (SNMP_FUNC_TYPE *m_snmpVBLFree)(RFC1157VarBindList* vbl);
24 void InitSNMP() {
25 m_hSNMPAPI = ::LoadLibraryEx("SNMPAPI",NULL,0);
26 if(!m_hSNMPAPI)
27 return;
28 *(FARPROC*)&m_snmpOIDFree = ::GetProcAddress(m_hSNMPAPI,"SnmpUtilOidFree");
29 *(FARPROC*)&m_snmpAlloc = ::GetProcAddress(m_hSNMPAPI,"SnmpUtilMemAlloc");
30 *(FARPROC*)&m_snmpFree = ::GetProcAddress(m_hSNMPAPI,"SnmpUtilMemFree");
31 *(FARPROC*)&m_snmpVBLFree = ::GetProcAddress(m_hSNMPAPI,"SnmpUtilVarBindListFree");
32 if(
33 (m_snmpFree && !m_snmpAlloc) ||
34 (m_snmpAlloc && !m_snmpFree)
35 )
36 DeinitSNMP();
37 }
38 void DeinitSNMP() {
39 if(!m_hSNMPAPI)
40 return;
41 ::FreeLibrary(m_hSNMPAPI);
42 m_hSNMPAPI=NULL;
43 }
44 void SNMPFreeOID(AsnObjectIdentifier* oid) {
45 if(m_hSNMPAPI && m_snmpOIDFree)
46 (*m_snmpOIDFree)(oid);
47 else
48 ::GlobalFree((HGLOBAL)oid->ids);
49 }
50 LPVOID SNMPAlloc(UINT size) {
51 if(m_hSNMPAPI && m_snmpAlloc)
52 return (*m_snmpAlloc)(size);
53 else
54 return ::GlobalAlloc(GMEM_FIXED,size);
55 }
56 void SNMPFree(LPVOID addr) {
57 if(m_hSNMPAPI && m_snmpFree)
58 (*m_snmpFree)(addr);
59 else
60 :: GlobalFree((HGLOBAL)addr);
61 }
62 void SNMPFreeVBL(RFC1157VarBindList& vbl) {
63 if(m_hSNMPAPI && m_snmpVBLFree)
64 (*m_snmpVBLFree)(&vbl);
65 else{
66 for(UINT tmp=0;tmp<vbl.len;tmp++) {
67 SNMPFree(vbl.list[tmp].name.ids);
68 switch(vbl.list[tmp].value.asnType){
69 case ASN_OCTETSTRING:
70 case ASN_SEQUENCE:
71 case ASN_RFC1155_IPADDRESS:
72 case ASN_RFC1155_OPAQUE:
73 // case ASN_RFC1213_DISPSTRING:
74 if(vbl.list[tmp].value.asnValue.arbitrary.dynamic)
75 SNMPFree(vbl.list[tmp].value.asnValue.arbitrary.stream);
76 break;
77 case ASN_OBJECTIDENTIFIER:
78 SNMPFree(vbl.list[tmp].value.asnValue.object.ids);
79 break;
80 default:
81 break;
82 }
83 }
84 SNMPFree(vbl.list);
85 }
86 }
87
88 BOOL SNMPBuildVBL(RFC1157VarBindList& vbl,CSNMPVarBindList& in) {
89 vbl.len = in.GetCount();
90 vbl.list = (RFC1157VarBind*)SNMPAlloc(sizeof(RFC1157VarBind)*vbl.len);
91 POSITION p = in.GetHeadPosition();
92 UINT ptr = 0;
93 while(p){
94 CSNMPVarBind& vb = in.GetNext(p);
95 ASSERT(ptr<vbl.len);
96 SNMPBuildVB(vbl.list[ptr++],vb);
97 }
98 return TRUE;
99 }
100 BOOL SNMPBuildVB(RFC1157VarBind& vb,CSNMPVarBind& in) {
101 ASSERT(in.name.type==CASNAny::typeASNOID);
102 return SNMPBuildOID(vb.name,in.name.value.oid) && SNMPBuildAA(vb.value,in.value);
103 }
104 BOOL SNMPBuildAA(AsnAny& aa,CASNAny& in) {
105 aa.asnType=in.type;
106 switch(in.type) {
107 case CASNAny::typeASNInteger:
108 aa.asnValue.number=in.value.number; break;
109 case CASNAny::typeASNOctetString:
110 // case CASNAny::typeASNDispString:
111 SNMPBuildOS(aa.asnValue.string,in.value.string); break;
112 case CASNAny::typeASNNull:
113 break;
114 case CASNAny::typeASNOID:
115 SNMPBuildOID(aa.asnValue.object,in.value.oid); break;
116 case CASNAny::typeASNSequence:
117 // case CASNAny::typeASNSequenceOf:
118 SNMPBuildOS(aa.asnValue.sequence,in.value.sequence); break;
119 case CASNAny::typeASNIP:
120 SNMPBuildFLOS(aa.asnValue.address,(LPBYTE)&in.value.ip,sizeof(in.value.ip)); break;
121 case CASNAny::typeASNCounter:
122 aa.asnValue.counter = in.value.counter; break;
123 case CASNAny::typeASNGauge:
124 aa.asnValue.gauge = in.value.gauge; break;
125 case CASNAny::typeASNTicks:
126 aa.asnValue.ticks = in.value.ticks; break;
127 case CASNAny::typeASNOpaque:
128 ASSERT(in.storeType==CASNAny::storeDynamic);
129 SNMPBuildOS(aa.asnValue.arbitrary,in.value.data); break;
130 break;
131 default:
132 ASSERT(FALSE);
133 return FALSE;
134 }
135 return TRUE;
136 }
137 BOOL SNMPBuildOS(AsnOctetString& os,CASNAny::asnOctetString& in) {
138 return SNMPBuildFLOS(os,in.data,in.size);
139 }
140 BOOL SNMPBuildOID(AsnObjectIdentifier& oid,CASNAny::asnOID& in) {
141 oid.idLength = in.size/sizeof(UINT);
142 ASSERT(!(in.size%sizeof(UINT)));
143 VERIFY(oid.ids = (UINT*)SNMPAlloc(in.size));
144 memmove(oid.ids,in.data,in.size);
145 return TRUE;
146 }
147 BOOL SNMPBuildFLOS(AsnOctetString& os,LPBYTE data,UINT size) {
148 os.length = size;
149 VERIFY(os.stream = (BYTE*)SNMPAlloc(os.length));
150 os.dynamic=TRUE;
151 memmove(os.stream,data,size);
152 return TRUE;
153 }
154 BOOL SNMPParseVBL(RFC1157VarBindList& vbl,CSNMPVarBindList& ou) {
155 for(UINT tmp=0;tmp<vbl.len;tmp++){
156 CSNMPVarBind vb;
157 SNMPParseVB(vbl.list[tmp],vb);
158 ou.AddTail(vb);
159 }
160 return TRUE;
161 }
162 BOOL SNMPParseVB(RFC1157VarBind& vb,CSNMPVarBind& ou) {
163 ou.name.Set(CASNAny::typeASNOID,(LPBYTE)vb.name.ids,vb.name.idLength*sizeof(UINT));
164 return SNMPParseAA(vb.value,ou.value);
165 }
166 BOOL SNMPParseAA(AsnAny& aa,CASNAny& ou) {
167 switch(aa.asnType){
168 case ASN_INTEGER:
169 ou.Set(CASNAny::typeASNInteger,aa.asnValue.number); break;
170 case ASN_OCTETSTRING:
171 // case ASN_RFC1213_DISPSTRING:
172 ou.Set(CASNAny::typeASNOctetString,aa.asnValue.string.stream,aa.asnValue.string.length); break;
173 case ASN_OBJECTIDENTIFIER:
174 ou.Set(CASNAny::typeASNOID,(LPBYTE)aa.asnValue.object.ids,aa.asnValue.object.idLength);
175 SNMPParseOID(aa.asnValue.object,ou.value.oid); break;
176 case ASN_SEQUENCE:
177 ou.Set(CASNAny::typeASNSequence,aa.asnValue.sequence.stream,aa.asnValue.sequence.length); break;
178 case ASN_RFC1155_IPADDRESS:
179 SNMPParseIP(aa.asnValue.address,ou); break;
180 case ASN_RFC1155_COUNTER:
181 ou.Set(CASNAny::typeASNCounter,(LONG)aa.asnValue.counter); break;
182 case ASN_RFC1155_GAUGE:
183 ou.Set(CASNAny::typeASNGauge,(LONG)aa.asnValue.gauge); break;
184 case ASN_RFC1155_TIMETICKS:
185 ou.Set(CASNAny::typeASNTicks,(LONG)aa.asnValue.ticks); break;
186 case ASN_RFC1155_OPAQUE:
187 ou.Set(CASNAny::typeASNOpaque,aa.asnValue.arbitrary.stream,aa.asnValue.arbitrary.length); break;
188 case ASN_NULL:
189 ou.Free(); break;
190 default:
191 ASSERT(FALSE);
192 return FALSE;
193 }
194 return TRUE;
195 }
196 BOOL SNMPParseOID(AsnObjectIdentifier& oid,CASNAny::asnOID& ou) {
197 ASSERT(ou.size==(oid.idLength*sizeof(UINT)));
198 memmove(ou.data,oid.ids,ou.size);
199 return TRUE;
200 }
201 BOOL SNMPParseIP(AsnIPAddress& ip,CASNAny& ou) {
202 in_addr i;
203 if(ip.length>sizeof(i))
204 return FALSE;
205 i.s_addr=0;
206 memmove(&i,ip.stream,ip.length);
207 ou.Set(i);
208 return TRUE;
209 }
210
211
212 CSNMPExtDLL(LPCTSTR dllName) : m_hInstance(NULL) { InitSNMP(); Init(dllName); }
213 ~CSNMPExtDLL() { Deinit(); DeinitSNMP(); }
214
215 BOOL Init(LPCTSTR dllName) {
216 Deinit();
217 m_hInstance = ::LoadLibraryEx(dllName,NULL,0);
218 if(!m_hInstance)
219 return FALSE;
220 *(FARPROC*)&m_extInit = ::GetProcAddress(m_hInstance,"SnmpExtensionInit");
221 *(FARPROC*)&m_extQuery = ::GetProcAddress(m_hInstance,"SnmpExtensionQuery");
222 *(FARPROC*)&m_extTrap = ::GetProcAddress(m_hInstance,"SnmpExtensionTrap");
223 if(!(m_extInit && m_extQuery && m_extTrap)){
224 Deinit();
225 return FALSE;
226 }
227 if(!((*m_extInit)(GetCurrentTime(),&m_hEvent,&m_OID))){
228 Deinit();
229 return FALSE;
230 }
231 return TRUE;
232 }
233 void Deinit() {
234 if(!m_hInstance)
235 return;
236 ::FreeLibrary(m_hInstance);
237 }
238 virtual BOOL Request(BYTE type,CSNMPVarBindList& in,CSNMPVarBindList& ou) {
239 RFC1157VarBindList vbl;
240 SNMPBuildVBL(vbl,in);
241 AsnInteger errorStatus, errorIndex;
242 (*m_extQuery)(type,&vbl,&errorStatus,&errorIndex);
243 ou.RemoveAll();
244 SNMPParseVBL(vbl,ou);
245 SNMPFreeVBL(vbl);
246 return TRUE;
247 }
248};
249
250};
251
252 #endif// __SNMPEXTDLL_H
diff --git a/shared-code/SNMPOIDs.h b/shared-code/SNMPOIDs.h
deleted file mode 100644
index 68ee659..0000000
--- a/shared-code/SNMPOIDs.h
+++ b/dev/null
@@ -1,221 +0,0 @@
1 #ifndef__SNMPOIDS_H
2 #define__SNMPOIDS_H
3
4 #define DEFINE_OID(name,oid)static UINT name[] = oid
5
6 // MIB-II OIDs
7
8#define OIDccitt {0}
9#define OIDnull {0,0}
10#define OIDiso {1}
11#define OIDorg {1,3}
12#define OIDdod {1,3,6}
13#define OIDinternet {1,3,6,1}
14#define OIDdirectory {1,3,6,1,1}
15#define OIDmgmt {1,3,6,1,2}
16#define OIDmib_2 {1,3,6,1,2,1}
17#define OIDsystem {1,3,6,1,2,1,1}
18#define OIDsysDescr {1,3,6,1,2,1,1,1}
19#define OIDsysObjectID {1,3,6,1,2,1,1,2}
20#define OIDsysUpTime {1,3,6,1,2,1,1,3}
21#define OIDsysContact {1,3,6,1,2,1,1,4}
22#define OIDsysName {1,3,6,1,2,1,1,5}
23#define OIDsysLocation {1,3,6,1,2,1,1,6}
24#define OIDsysServices {1,3,6,1,2,1,1,7}
25#define OIDtransmission {1,3,6,1,2,1,10}
26#define OIDsnmp {1,3,6,1,2,1,11}
27#define OIDsnmpInPkts {1,3,6,1,2,1,11,1}
28#define OIDsnmpInBadValues {1,3,6,1,2,1,11,10}
29#define OIDsnmpInReadOnlys {1,3,6,1,2,1,11,11}
30#define OIDsnmpInGenErrs {1,3,6,1,2,1,11,12}
31#define OIDsnmpInTotalReqVars {1,3,6,1,2,1,11,13}
32#define OIDsnmpInTotalSetVars {1,3,6,1,2,1,11,14}
33#define OIDsnmpInGetRequests {1,3,6,1,2,1,11,15}
34#define OIDsnmpInGetNexts {1,3,6,1,2,1,11,16}
35#define OIDsnmpInSetRequests {1,3,6,1,2,1,11,17}
36#define OIDsnmpInGetResponses {1,3,6,1,2,1,11,18}
37#define OIDsnmpInTraps {1,3,6,1,2,1,11,19}
38#define OIDsnmpOutPkts {1,3,6,1,2,1,11,2}
39#define OIDsnmpOutTooBigs {1,3,6,1,2,1,11,20}
40#define OIDsnmpOutNoSuchNames {1,3,6,1,2,1,11,21}
41#define OIDsnmpOutBadValues {1,3,6,1,2,1,11,22}
42#define OIDsnmpOutGenErrs {1,3,6,1,2,1,11,24}
43#define OIDsnmpOutGetRequests {1,3,6,1,2,1,11,25}
44#define OIDsnmpOutGetNexts {1,3,6,1,2,1,11,26}
45#define OIDsnmpOutSetRequests {1,3,6,1,2,1,11,27}
46#define OIDsnmpOutGetResponses {1,3,6,1,2,1,11,28}
47#define OIDsnmpOutTraps {1,3,6,1,2,1,11,29}
48#define OIDsnmpInBadVersions {1,3,6,1,2,1,11,3}
49#define OIDsnmpEnableAuthenTraps {1,3,6,1,2,1,11,30}
50#define OIDsnmpInBadCommunityNames {1,3,6,1,2,1,11,4}
51#define OIDsnmpInBadCommunityUses {1,3,6,1,2,1,11,5}
52#define OIDsnmpInASNParseErrs {1,3,6,1,2,1,11,6}
53#define OIDsnmpInTooBigs {1,3,6,1,2,1,11,8}
54#define OIDsnmpInNoSuchNames {1,3,6,1,2,1,11,9}
55#define OIDinterfaces {1,3,6,1,2,1,2}
56#define OIDifNumber {1,3,6,1,2,1,2,1}
57#define OIDifTable {1,3,6,1,2,1,2,2}
58#define OIDifEntry {1,3,6,1,2,1,2,2,1}
59#define OIDifIndex {1,3,6,1,2,1,2,2,1,1}
60#define OIDifInOctets {1,3,6,1,2,1,2,2,1,10}
61#define OIDifInUcastPkts {1,3,6,1,2,1,2,2,1,11}
62#define OIDifInNUcastPkts {1,3,6,1,2,1,2,2,1,12}
63#define OIDifInDiscards {1,3,6,1,2,1,2,2,1,13}
64#define OIDifInErrors {1,3,6,1,2,1,2,2,1,14}
65#define OIDifInUnknownProtos {1,3,6,1,2,1,2,2,1,15}
66#define OIDifOutOctets {1,3,6,1,2,1,2,2,1,16}
67#define OIDifOutUcastPkts {1,3,6,1,2,1,2,2,1,17}
68#define OIDifOutNUcastPkts {1,3,6,1,2,1,2,2,1,18}
69#define OIDifOutDiscards {1,3,6,1,2,1,2,2,1,19}
70#define OIDifDescr {1,3,6,1,2,1,2,2,1,2}
71#define OIDifOutErrors {1,3,6,1,2,1,2,2,1,20}
72#define OIDifOutQLen {1,3,6,1,2,1,2,2,1,21}
73#define OIDifSpecific {1,3,6,1,2,1,2,2,1,22}
74#define OIDifType {1,3,6,1,2,1,2,2,1,3}
75#define OIDifMtu {1,3,6,1,2,1,2,2,1,4}
76#define OIDifSpeed {1,3,6,1,2,1,2,2,1,5}
77#define OIDifPhysAddress {1,3,6,1,2,1,2,2,1,6}
78#define OIDifAdminStatus {1,3,6,1,2,1,2,2,1,7}
79#define OIDifOperStatus {1,3,6,1,2,1,2,2,1,8}
80#define OIDifLastChange {1,3,6,1,2,1,2,2,1,9}
81#define OIDat {1,3,6,1,2,1,3}
82#define OIDatTable {1,3,6,1,2,1,3,1}
83#define OIDatEntry {1,3,6,1,2,1,3,1,1}
84#define OIDatIfIndex {1,3,6,1,2,1,3,1,1,1}
85#define OIDatPhysAddress {1,3,6,1,2,1,3,1,1,2}
86#define OIDatNetAddress {1,3,6,1,2,1,3,1,1,3}
87#define OIDip {1,3,6,1,2,1,4}
88#define OIDipForwarding {1,3,6,1,2,1,4,1}
89#define OIDipOutRequests {1,3,6,1,2,1,4,10}
90#define OIDipOutDiscards {1,3,6,1,2,1,4,11}
91#define OIDipOutNoRoutes {1,3,6,1,2,1,4,12}
92#define OIDipReasmTimeout {1,3,6,1,2,1,4,13}
93#define OIDipReasmReqds {1,3,6,1,2,1,4,14}
94#define OIDipReasmOKs {1,3,6,1,2,1,4,15}
95#define OIDipReasmFails {1,3,6,1,2,1,4,16}
96#define OIDipFragOKs {1,3,6,1,2,1,4,17}
97#define OIDipFragFails {1,3,6,1,2,1,4,18}
98#define OIDipFragCreates {1,3,6,1,2,1,4,19}
99#define OIDipDefaultTTL {1,3,6,1,2,1,4,2}
100#define OIDipAddrTable {1,3,6,1,2,1,4,20}
101#define OIDipAddrEntry {1,3,6,1,2,1,4,20,1}
102#define OIDipAdEntAddr {1,3,6,1,2,1,4,20,1,1}
103#define OIDipAdEntIfIndex {1,3,6,1,2,1,4,20,1,2}
104#define OIDipAdEntNetMask {1,3,6,1,2,1,4,20,1,3}
105#define OIDipAdEntBcastAddr {1,3,6,1,2,1,4,20,1,4}
106#define OIDipAdEntReasmMaxSize {1,3,6,1,2,1,4,20,1,5}
107#define OIDipRouteTable {1,3,6,1,2,1,4,21}
108#define OIDipRouteEntry {1,3,6,1,2,1,4,21,1}
109#define OIDipRouteDest {1,3,6,1,2,1,4,21,1,1}
110#define OIDipRouteAge {1,3,6,1,2,1,4,21,1,10}
111#define OIDipRouteMask {1,3,6,1,2,1,4,21,1,11}
112#define OIDipRouteMetric5 {1,3,6,1,2,1,4,21,1,12}
113#define OIDipRouteInfo {1,3,6,1,2,1,4,21,1,13}
114#define OIDipRouteIfIndex {1,3,6,1,2,1,4,21,1,2}
115#define OIDipRouteMetric1 {1,3,6,1,2,1,4,21,1,3}
116#define OIDipRouteMetric2 {1,3,6,1,2,1,4,21,1,4}
117#define OIDipRouteMetric3 {1,3,6,1,2,1,4,21,1,5}
118#define OIDipRouteMetric4 {1,3,6,1,2,1,4,21,1,6}
119#define OIDipRouteNextHop {1,3,6,1,2,1,4,21,1,7}
120#define OIDipRouteType {1,3,6,1,2,1,4,21,1,8}
121#define OIDipRouteProto {1,3,6,1,2,1,4,21,1,9}
122#define OIDipNetToMediaTable {1,3,6,1,2,1,4,22}
123#define OIDipNetToMediaEntry {1,3,6,1,2,1,4,22,1}
124#define OIDipNetToMediaIfIndex {1,3,6,1,2,1,4,22,1,1}
125#define OIDipNetToMediaPhysAddress {1,3,6,1,2,1,4,22,1,2}
126#define OIDipNetToMediaNetAddress {1,3,6,1,2,1,4,22,1,3}
127#define OIDipNetToMediaType {1,3,6,1,2,1,4,22,1,4}
128#define OIDipRoutingDiscards {1,3,6,1,2,1,4,23}
129#define OIDipInReceives {1,3,6,1,2,1,4,3}
130#define OIDipInHdrErrors {1,3,6,1,2,1,4,4}
131#define OIDipInAddrErrors {1,3,6,1,2,1,4,5}
132#define OIDipForwDatagrams {1,3,6,1,2,1,4,6}
133#define OIDipInUnknownProtos {1,3,6,1,2,1,4,7}
134#define OIDipInDiscards {1,3,6,1,2,1,4,8}
135#define OIDipInDelivers {1,3,6,1,2,1,4,9}
136#define OIDicmp {1,3,6,1,2,1,5}
137#define OIDicmpInMsgs {1,3,6,1,2,1,5,1}
138#define OIDicmpInTimestamps {1,3,6,1,2,1,5,10}
139#define OIDicmpInTimestampReps {1,3,6,1,2,1,5,11}
140#define OIDicmpInAddrMasks {1,3,6,1,2,1,5,12}
141#define OIDicmpInAddrMaskReps {1,3,6,1,2,1,5,13}
142#define OIDicmpOutMsgs {1,3,6,1,2,1,5,14}
143#define OIDicmpOutErrors {1,3,6,1,2,1,5,15}
144#define OIDicmpOutDestUnreachs {1,3,6,1,2,1,5,16}
145#define OIDicmpOutTimeExcds {1,3,6,1,2,1,5,17}
146#define OIDicmpOutParmProbs {1,3,6,1,2,1,5,18}
147#define OIDicmpOutSrcQuenchs {1,3,6,1,2,1,5,19}
148#define OIDicmpInErrors {1,3,6,1,2,1,5,2}
149#define OIDicmpOutRedirects {1,3,6,1,2,1,5,20}
150#define OIDicmpOutEchos {1,3,6,1,2,1,5,21}
151#define OIDicmpOutEchoReps {1,3,6,1,2,1,5,22}
152#define OIDicmpOutTimestamps {1,3,6,1,2,1,5,23}
153#define OIDicmpOutTimestampReps {1,3,6,1,2,1,5,24}
154#define OIDicmpOutAddrMasks {1,3,6,1,2,1,5,25}
155#define OIDicmpOutAddrMaskReps {1,3,6,1,2,1,5,26}
156#define OIDicmpInDestUnreachs {1,3,6,1,2,1,5,3}
157#define OIDicmpInTimeExcds {1,3,6,1,2,1,5,4}
158#define OIDicmpInParmProbs {1,3,6,1,2,1,5,5}
159#define OIDicmpInSrcQuenchs {1,3,6,1,2,1,5,6}
160#define OIDicmpInRedirects {1,3,6,1,2,1,5,7}
161#define OIDicmpInEchos {1,3,6,1,2,1,5,8}
162#define OIDicmpInEchoReps {1,3,6,1,2,1,5,9}
163#define OIDtcp {1,3,6,1,2,1,6}
164#define OIDtcpRtoAlgorithm {1,3,6,1,2,1,6,1}
165#define OIDtcpInSegs {1,3,6,1,2,1,6,10}
166#define OIDtcpOutSegs {1,3,6,1,2,1,6,11}
167#define OIDtcpRetransSegs {1,3,6,1,2,1,6,12}
168#define OIDtcpConnTable {1,3,6,1,2,1,6,13}
169#define OIDtcpConnEntry {1,3,6,1,2,1,6,13,1}
170#define OIDtcpConnState {1,3,6,1,2,1,6,13,1,1}
171#define OIDtcpConnLocalAddress {1,3,6,1,2,1,6,13,1,2}
172#define OIDtcpConnLocalPort {1,3,6,1,2,1,6,13,1,3}
173#define OIDtcpConnRemAddress {1,3,6,1,2,1,6,13,1,4}
174#define OIDtcpConnRemPort {1,3,6,1,2,1,6,13,1,5}
175#define OIDtcpInErrs {1,3,6,1,2,1,6,14}
176#define OIDtcpOutRsts {1,3,6,1,2,1,6,15}
177#define OIDtcpRtoMin {1,3,6,1,2,1,6,2}
178#define OIDtcpRtoMax {1,3,6,1,2,1,6,3}
179#define OIDtcpMaxConn {1,3,6,1,2,1,6,4}
180#define OIDtcpActiveOpens {1,3,6,1,2,1,6,5}
181#define OIDtcpPassiveOpens {1,3,6,1,2,1,6,6}
182#define OIDtcpAttemptFails {1,3,6,1,2,1,6,7}
183#define OIDtcpEstabResets {1,3,6,1,2,1,6,8}
184#define OIDtcpCurrEstab {1,3,6,1,2,1,6,9}
185#define OIDudp {1,3,6,1,2,1,7}
186#define OIDudpInDatagrams {1,3,6,1,2,1,7,1}
187#define OIDudpNoPorts {1,3,6,1,2,1,7,2}
188#define OIDudpInErrors {1,3,6,1,2,1,7,3}
189#define OIDudpOutDatagrams {1,3,6,1,2,1,7,4}
190#define OIDudpTable {1,3,6,1,2,1,7,5}
191#define OIDudpEntry {1,3,6,1,2,1,7,5,1}
192#define OIDudpLocalAddress {1,3,6,1,2,1,7,5,1,1}
193#define OIDudpLocalPort {1,3,6,1,2,1,7,5,1,2}
194#define OIDegp {1,3,6,1,2,1,8}
195#define OIDegpInMsgs {1,3,6,1,2,1,8,1}
196#define OIDegpInErrors {1,3,6,1,2,1,8,2}
197#define OIDegpOutMsgs {1,3,6,1,2,1,8,3}
198#define OIDegpOutErrors {1,3,6,1,2,1,8,4}
199#define OIDegpNeighTable {1,3,6,1,2,1,8,5}
200#define OIDegpNeighEntry {1,3,6,1,2,1,8,5,1}
201#define OIDegpNeighState {1,3,6,1,2,1,8,5,1,1}
202#define OIDegpNeighStateUps {1,3,6,1,2,1,8,5,1,10}
203#define OIDegpNeighStateDowns {1,3,6,1,2,1,8,5,1,11}
204#define OIDegpNeighIntervalHello {1,3,6,1,2,1,8,5,1,12}
205#define OIDegpNeighIntervalPoll {1,3,6,1,2,1,8,5,1,13}
206#define OIDegpNeighMode {1,3,6,1,2,1,8,5,1,14}
207#define OIDegpNeighEventTrigger {1,3,6,1,2,1,8,5,1,15}
208#define OIDegpNeighAddr {1,3,6,1,2,1,8,5,1,2}
209#define OIDegpNeighAs {1,3,6,1,2,1,8,5,1,3}
210#define OIDegpNeighInMsgs {1,3,6,1,2,1,8,5,1,4}
211#define OIDegpNeighInErrs {1,3,6,1,2,1,8,5,1,5}
212#define OIDegpNeighOutMsgs {1,3,6,1,2,1,8,5,1,6}
213#define OIDegpNeighOutErrs {1,3,6,1,2,1,8,5,1,7}
214#define OIDegpNeighInErrMsgs {1,3,6,1,2,1,8,5,1,8}
215#define OIDegpNeighOutErrMsgs {1,3,6,1,2,1,8,5,1,9}
216#define OIDegpAs {1,3,6,1,2,1,8,6}
217#define OIDexperimental {1,3,6,1,3}
218#define OIDprivate {1,3,6,1,4}
219#define OIDenterprises {1,3,6,1,4,1}
220
221 #endif// __SNMPOIDS_H \ No newline at end of file
diff --git a/shared-code/SNMPeer.h b/shared-code/SNMPeer.h
deleted file mode 100644
index 68f2efe..0000000
--- a/shared-code/SNMPeer.h
+++ b/dev/null
@@ -1,286 +0,0 @@
1 #ifndef__SNMPEER_H
2#define __SNMPEER_H
3
4namespace Klever {
5
6 class CASNAny{
7public:
8 enum{
9 asnCls = 0xC0,
10 asnClsUniversal = 0x00,
11 asnClsApplication = 0x40,
12 asnClsContextSpecific = 0x80,
13 asnClsPrivate = 0xC0,
14 asnConstructed = 0x20,
15 asnPrimitive = 0x00,
16 asnTag = 0x1F,
17 // ASN.1 Primitive Tags
18 asnTagInteger = 0x02,
19 asnTagOctetString = 0x04,
20 asnTagNull = 0x05,
21 asnTagOID = 0x06,
22 // ASN.1 Constructed Tags
23 asnTagSequence = 0x10,
24 // RFC1155 Primitive Tags
25 asnTagIP = 0x00,
26 asnTagCounter = 0x01,
27 asnTagGauge = 0x02,
28 asnTagTicks = 0x03,
29 asnTagOpaque = 0x04,
30 // RFC1213 alias
31 asnTagDispString = 0x04,// (ASN.1 Octet string)
32 // RFC1157 Constructed Tags
33 asnTagGetRequest = 0x00,
34 asnTagGetNextRequest = 0x01,
35 asnTagGetResponse = 0x02,
36 asnTagSetRequest = 0x03,
37 asnTagTrap = 0x04
38 };
39 enum{
40 typeASNInteger = (asnClsUniversal|asnPrimitive|asnTagInteger),
41 typeASNOctetString = (asnClsUniversal|asnPrimitive|asnTagOctetString),
42 typeASNNull = (asnClsUniversal|asnPrimitive|asnTagNull),
43 typeASNOID = (asnClsUniversal|asnPrimitive|asnTagOID),
44
45 typeASNSequence = (asnClsUniversal|asnConstructed|asnTagSequence),
46 typeASNSequenceOf = (asnClsUniversal|asnConstructed|asnTagSequence),
47
48 typeASNIP = (asnClsApplication|asnPrimitive|asnTagIP),
49 typeASNCounter = (asnClsApplication|asnPrimitive|asnTagCounter),
50 typeASNGauge = (asnClsApplication|asnPrimitive|asnTagGauge),
51 typeASNTicks = (asnClsApplication|asnPrimitive|asnTagTicks),
52 typeASNOpaque = (asnClsApplication|asnPrimitive|asnTagOpaque),
53 typeASNDispString = (asnClsUniversal|asnPrimitive|asnTagOctetString),
54
55 typeASNGetRequest = (asnClsContextSpecific|asnConstructed|asnTagGetRequest),
56 typeASNGetNextRequest = (asnClsContextSpecific|asnConstructed|asnTagGetNextRequest),
57 typeASNGetResponse = (asnClsContextSpecific|asnConstructed|asnTagGetResponse),
58 typeASNSetRequest = (asnClsContextSpecific|asnConstructed|asnTagSetRequest),
59 typeASNTrap = (asnClsContextSpecific|asnConstructed|asnTagTrap)
60 };
61
62 typedefLONG asnInteger;
63 typedef LARGE_INTEGER asnInteger64;
64 typedefDWORD asnCounter;
65 typedef ULARGE_INTEGER asnCounter64;
66 typedef DWORD asnGauge;
67 typedef ULARGE_INTEGER asnGauge64;
68 typedefDWORD asnTicks;
69 typedef ULARGE_INTEGER asnTicks64;
70 struct asnDynamic{
71 UINT size;
72 LPBYTE data;
73 BOOL Allocate(UINT size) {
74 BOOL rv = Free();
75 if(size)
76 rv=rv&&(data=new BYTE[size]);
77 if(rv)
78 asnDynamic::size=size;
79 return rv;
80 }
81 BOOL Set(LPBYTE data,UINT size) {
82 BOOL rv = Allocate(size);
83 if(rv && size)
84 memmove(asnDynamic::data,data,size);
85 return rv;
86 }
87 BOOL Free() {
88 if(!size)
89 return TRUE;
90 delete data;
91 size=0;
92 data=0;
93 return TRUE;
94 }
95 void Clean() {
96 size=0;
97 data=0;
98 }
99 BOOL Copy(asnDynamic& src) {
100 BOOL rv = Free();
101 if(rv){
102 if(src.size)
103 rv=rv&&(data = new BYTE[src.size]);
104 if(rv){
105 if(size=src.size)
106 memmove(data,src.data,size);
107 }
108 }
109 return rv;
110 }
111 };
112 typedefasnDynamic asnOctetString;
113 typedef asnDynamic asnOID;
114 typedef in_addr asnIP;
115 typedef asnDynamic asnSequence;
116
117 BYTE type;
118 enum _storeType{
119 storeDynamic,
120 storeStatic
121 }storeType;
122 union{
123 asnInteger number;
124 asnInteger64 number64;
125 asnOctetString string;
126 asnOID oid;
127 asnSequence sequence;
128 asnIP ip;
129 asnCounter counter;
130 asnCounter64 counter64;
131 asnGauge gauge;
132 asnGauge64 gauge64;
133 asnTicks ticks;
134 asnTicks64 ticks64;
135 asnDynamic data;
136 } value;
137
138 CASNAny() : type(typeASNNull), storeType(storeStatic) { value.data.Clean(); }
139 CASNAny(CASNAny& src) : type(typeASNNull), storeType(storeStatic) { value.data.Clean();Copy(src); }
140 CASNAny(BYTE type) : type(type), storeType(storeStatic) { value.data.Clean(); }
141 CASNAny(BYTE type,LONG number) : type(typeASNNull), storeType(storeStatic) { value.data.Clean();Set(type,number); }
142 CASNAny(BYTE type,LONGLONG number) : type(typeASNNull), storeType(storeStatic) { value.data.Clean();Set(type,number); }
143 CASNAny(BYTE type,LPCTSTR string) : type(typeASNNull), storeType(storeStatic) { value.data.Clean();Set(type,string); }
144 CASNAny(BYTE type,LPBYTE data,UINT length) : type(typeASNNull), storeType(storeStatic) { value.data.Clean();Set(type,data,length); }
145 CASNAny(BYTE type,UINT* data,UINT size) : type(typeASNNull), storeType(storeStatic) { value.data.Clean();Set(type,(LPBYTE)data,size); }
146 CASNAny(in_addr& ip) : type(typeASNNull), storeType(storeStatic) { value.data.Clean();Set(ip); }
147 ~CASNAny() { Free(); }
148
149 BOOL Set(BYTE type) {
150 BOOL rv = Free();
151 CASNAny::type=type;
152 return rv;
153 }
154 BOOL Set(BYTE type,LONG number) {
155 BOOL rv = Free();
156 CASNAny::type=type;
157 value.number=number;
158 storeType=storeStatic;
159 return rv;
160 }
161 BOOL Set(BYTE type,LONGLONG number) {
162 BOOL rv = Free();
163 CASNAny::type=type;
164 value.number64.QuadPart = number;
165 storeType=storeStatic;
166 return rv;
167 }
168 BOOL Set(BYTE type,LPCTSTR string) {
169 BOOL rv = Free();
170 CASNAny::type=type;
171 rv=rv&&value.string.Set((LPBYTE)string,strlen(string)+1);
172 if(rv){
173 value.string.size--;
174 storeType=storeDynamic;
175 }
176 return rv;
177 }
178 BOOL Set(BYTE type,LPBYTE data,UINT length) {
179 BOOL rv = Free();
180 CASNAny::type=type;
181 rv=rv&&value.data.Set(data,length);
182 if(rv)
183 storeType=storeDynamic;
184 return rv;
185 }
186 BOOL Set(in_addr& ip) {
187 BOOL rv = Free();
188 memmove(&value.ip,&ip,sizeof(value.ip));
189 type=typeASNIP;
190 storeType=storeStatic;
191 return rv;
192 }
193 BOOL Free() {
194 if(storeType==storeDynamic)
195 value.data.Free();
196 else{
197 memset(&value,0,sizeof(value));
198 value.data.Clean();
199 }
200 storeType=storeStatic;
201 type=typeASNNull;
202 return TRUE;
203 }
204 BOOL Copy(CASNAny& src) {
205 BOOL rv = Free();
206 if(src.storeType==storeDynamic){
207 rv=rv&&value.data.Copy(src.value.data);
208 if(rv){
209 type=src.type;
210 storeType=src.storeType;
211 }
212 }else{
213 memmove(this,&src,sizeof(*this));
214 }
215 return rv;
216 }
217 CASNAny& operator=(CASNAny& src) {
218 VERIFY(Copy(src));
219 return *this;
220 }
221
222 // High Level
223 CString GetString() {
224 ASSERT(storeType==storeDynamic);
225 CString rv;
226 LPTSTR b = rv.GetBuffer(value.data.size+1);
227 ASSERT(b);
228 b[value.data.size]=0;
229 memmove(b,value.data.data,value.data.size);
230 rv.ReleaseBuffer();
231 return rv;
232 }
233};
234
235
236 class CSNMPVarBind{
237public:
238 CASNAny name;
239 CASNAny value;
240
241 CSNMPVarBind() {}
242 CSNMPVarBind(CASNAny& name,CASNAny& value) : name(name), value(value) {}
243 CSNMPVarBind(CASNAny& name) : name(name) {}
244 CSNMPVarBind(CSNMPVarBind& src) { Copy(src); }
245 BOOL Copy(CSNMPVarBind& src) {
246 name.Copy(src.name);
247 value.Copy(src.value);
248 return TRUE;
249 }
250 CSNMPVarBind& operator=(CSNMPVarBind& src) {
251 Copy(src);
252 return *this;
253 }
254 // High level
255 BOOL IsName(UINT* prefix,UINT prefixSize,BOOL bExact=FALSE) {
256 if(name.type!=CASNAny::typeASNOID)
257 return FALSE;
258 if(name.value.oid.size<prefixSize)
259 return FALSE;
260 if(bExact && (name.value.oid.size!=prefixSize))
261 return FALSE;
262 return !memcmp(prefix,name.value.oid.data,prefixSize);
263 }
264};
265
266 class CSNMPVarBindList: public CList<CSNMPVarBind,CSNMPVarBind&> {
267public:
268 CSNMPVarBind* GetVarBind(UINT* prefix,UINT prefixSize,BOOL bExact=FALSE) {
269 POSITION p = GetHeadPosition();
270 while(p){
271 CSNMPVarBind& vb = GetNext(p);
272 if(vb.IsName(prefix,prefixSize,bExact))
273 return &vb;
274 }
275 return NULL;
276 }
277};
278
279 class CSNMPeer{
280public:
281 virtual BOOL Request(BYTE type,CSNMPVarBindList& in,CSNMPVarBindList& ou) = 0;
282};
283
284};
285
286 #endif// __SNMPEER_H
diff --git a/shared-code/install.h b/shared-code/install.h
deleted file mode 100644
index 8c55ca9..0000000
--- a/shared-code/install.h
+++ b/dev/null
@@ -1,370 +0,0 @@
1 #defineWIN32_LEAN_AND_MEAN
2#define VC_EXTRALEAN
3#define WIN32_EXTRALEAN
4#include <windows.h>
5#include <shlobj.h>
6#include <winver.h>
7#include <crtdbg.h>
8#include <string.h>
9#include <stdio.h>
10
11extern "C" WINSHELLAPI void WINAPI SHFree( LPVOID);
12
13 template<class T> class Smart{
14public:
15 T *pT;
16
17 Smart() : pT(NULL) {}
18 Smart(int cb) : pT(new T[cb]) {}
19 Smart(T* p) : pT(p) {}
20 ~Smart() { if(pT)delete pT; }
21
22 Smart& operator=(T* p) { if(pT)delete pT; pT=p; return *this; }
23 operator T* () { return pT; }
24
25 //T& operator[](int ndx) { return pT[ndx]; }
26
27 T* Detach() { T* rv = pT; pT=NULL; return rv; }
28};
29 typedefSmart<char> STRING;
30
31 #define APPEND_SLASH(str) if((str)[strlen(str)-1]!='\\')strcat(str,"\\")
32
33HINSTANCE theInstance;
34
35LPSTR strFETCH_REG_KEY(HKEY hRoot,LPCSTR subKey,LPCSTR val)
36{
37HKEY hkey;
38 if(RegOpenKeyEx(hRoot,subKey,0,KEY_QUERY_VALUE,&hkey)!=ERROR_SUCCESS)
39 return NULL;
40DWORD kType,cb=0;
41STRING rv;
42 if(RegQueryValueEx(hkey,val,NULL,&kType,NULL,&cb)==ERROR_SUCCESS && kType==REG_SZ){
43 rv= new char[cb];
44 _ASSERT(rv!=NULL);
45 if(RegQueryValueEx(hkey,val,NULL,&kType,(LPBYTE)(LPSTR)rv,&cb)!=ERROR_SUCCESS)
46 rv=NULL;
47 }
48 RegCloseKey(hkey);
49 return rv.Detach();
50}
51
52BOOL strSET_REG_KEY(HKEY hRoot,LPCSTR subKey,LPCSTR valName,LPCSTR val)
53{
54HKEY hkey;
55DWORD dw;
56 if(RegCreateKeyEx(hRoot,subKey,0,REG_NONE,REG_OPTION_NON_VOLATILE,KEY_READ|KEY_WRITE,NULL,&hkey,&dw)!=ERROR_SUCCESS)
57 return FALSE;
58BOOL rv = (RegSetValueEx(hkey,valName,0,REG_SZ,(LPBYTE)val,strlen(val)+1)==ERROR_SUCCESS);
59 RegCloseKey(hkey);
60 return rv;
61}
62
63void MAKE_PATH(LPCSTR path)
64{
65STRING tmp(strlen(path)+1);
66LPCSTR t0=path;
67LPSTR t1=tmp;
68 while(*t0){
69 if((*t0)=='\\'){
70 *t1=0;
71 CreateDirectory(tmp,NULL);
72 }
73 *(t1++)=*(t0++);
74 }
75 *t1=0;
76 CreateDirectory(tmp,NULL);
77}
78
79BOOL ADDMENU(LPCSTR menu,LPCSTR item,LPCSTR path,LPCSTR program)
80{
81STRING stm = strFETCH_REG_KEY(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders","Programs");
82 if(!stm)
83 return FALSE;
84int pil = 1+strlen(path)+1+strlen(program)+1+1;
85STRING pi(pil);
86 strcpy(pi,path);
87 APPEND_SLASH(pi);
88 strcat(pi,program);
89int ipl = strlen(stm)+1+strlen(menu)+1+strlen(item)+4+1;
90STRING ip(ipl);
91 memmove(ip,stm,strlen(stm)+1);
92 APPEND_SLASH(ip);
93 strcat(ip,menu);
94 MAKE_PATH(ip);
95 APPEND_SLASH(ip);
96 strcat(ip,item);
97 strcat(ip,".lnk");
98IShellLink* sl = NULL;
99IPersistFile* pf = NULL;
100BOOL rv = FALSE;
101 do{
102 HRESULT hrv = CoCreateInstance(CLSID_ShellLink,NULL,CLSCTX_INPROC_SERVER,IID_IShellLink,(LPVOID*)&sl);
103 if(!SUCCEEDED(hrv))
104 break;
105 sl->SetDescription(item);
106 sl->SetPath(pi);
107 hrv = sl->QueryInterface(IID_IPersistFile,(LPVOID*)&pf);
108 if(!SUCCEEDED(hrv))
109 break;
110 WORD wsz[MAX_PATH];
111 MultiByteToWideChar(CP_ACP,0,ip,-1,wsz,MAX_PATH);
112 hrv = pf->Save(wsz,TRUE);
113 if(SUCCEEDED(hrv))
114 rv=TRUE;
115 }while(FALSE);
116 if(pf)
117 pf->Release();
118 if(sl)
119 sl->Release();
120 return rv;
121}
122
123FILE* CREATE_INF_FILE(LPCSTR path,LPCSTR file)
124{
125STRING fn(strlen(path)+1+strlen(file)+1);
126 strcpy(fn,path);
127 APPEND_SLASH(fn);
128 strcat(fn,file);
129 return fopen(fn,"wt");
130}
131
132BOOL INSTALLFILE(LPCSTR res,LPCSTR path,LPCSTR file)
133{
134STRING temp(MAX_PATH);
135 if(!GetTempPath(MAX_PATH,temp)) return FALSE;
136STRING tf(MAX_PATH);
137 if(!GetTempFileName(temp,"KGI",0,tf)) return FALSE;
138HRSRC hrsrc = FindResource(NULL,res,MAKEINTRESOURCE(RT_RCDATA));
139 if(!hrsrc) return FALSE;
140DWORD sor = SizeofResource(NULL,hrsrc);
141 if(!sor) return FALSE;
142HGLOBAL hglobal = LoadResource(NULL,hrsrc);
143 if(!hglobal) return FALSE;
144LPVOID lpv = LockResource(hglobal);
145 if(!lpv) return FALSE;
146HANDLE hf = CreateFile(tf,GENERIC_READ|GENERIC_WRITE,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_TEMPORARY,NULL);
147 if(!hf) return FALSE;
148DWORD written = 0;
149 if(!WriteFile(hf,lpv,sor,&written,NULL) || written!=sor){
150 CloseHandle(hf);
151 return FALSE;
152 }
153 CloseHandle(hf);
154STRING toKill(strlen(tf)+1);
155 strcpy(toKill,tf);
156 for(int tmp=strlen(tf)-1;tmp>0 && ((tf[tmp])!='\\');tmp--);
157 if(tf[tmp]=='\\')
158 tf[tmp++]=0;
159STRING nothing(_MAX_PATH);
160UINT nothingLength=_MAX_PATH;
161 if(VerInstallFile(0,&tf[tmp],(LPSTR)file,tf,(LPSTR)path,NULL,nothing,&nothingLength)){
162 DeleteFile(toKill);
163 return FALSE;
164 }
165 DeleteFile(toKill);
166 return TRUE;
167}
168
169LPCSTR pdTitle, pdPrompt;
170char pdPath[_MAX_PATH];
171BOOL CALLBACK pathDlgProc(HWND hwnd,UINT uMsg,WPARAM wP,LPARAM lP)
172{
173 switch(uMsg){
174 case WM_INITDIALOG:
175 SetWindowText(hwnd,pdTitle);
176 SetDlgItemText(hwnd,IDC_PROMPT,pdPrompt);
177 SetDlgItemText(hwnd,IDC_PATH,pdPath);
178 SetWindowPos(hwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
179 return 1;
180 case WM_COMMAND:
181 switch(LOWORD(wP)){ // ID
182 case IDC_BROWSE:
183 switch(HIWORD(wP)){
184 case BN_CLICKED:
185 {
186 BROWSEINFO bi;
187 memset(&bi,0,sizeof(bi));
188 bi.hwndOwner=hwnd;
189 bi.pszDisplayName=pdPath;
190 bi.lpszTitle="Select Folder..";
191 bi.ulFlags=BIF_RETURNONLYFSDIRS;
192 LPITEMIDLIST lpidl=SHBrowseForFolder(&bi);
193 if(lpidl){
194 SHGetPathFromIDList(lpidl,pdPath);
195 SHFree(lpidl);
196 SetDlgItemText(hwnd,IDC_PATH,pdPath);
197 }
198 }
199 return 1;
200 }
201 break;
202 case IDOK:
203 switch(HIWORD(wP)){
204 case BN_CLICKED:
205 if(GetDlgItemText(hwnd,IDC_PATH,pdPath,sizeof(pdPath)))
206 EndDialog(hwnd,IDOK);
207 else
208 // *** Error message
209 EndDialog(hwnd,IDCANCEL);
210 return 1;
211 }
212 break;
213 case IDCANCEL:
214 switch(HIWORD(wP)){
215 case BN_CLICKED:
216 EndDialog(hwnd,IDCANCEL);
217 return 1;
218 }
219 break;
220 };
221 break;
222 }
223 return 0;
224}
225
226LPSTR REQUESTPATH(LPCSTR title,LPCSTR prompt,LPCSTR defPath)
227{
228 pdTitle=title;pdPrompt=prompt;
229 strcpy(pdPath,defPath);
230 if(DialogBox(NULL,MAKEINTRESOURCE(IDD_PATH),NULL/*Parent*/,(DLGPROC)&pathDlgProc)!=IDOK)
231 return NULL;
232STRING rv(strlen(pdPath)+1);
233 strcpy(rv,pdPath);
234 return rv.Detach();
235}
236
237HKEY uninstallKey(LPCSTR regKey) {
238 STRING rk(100+strlen(regKey)+1);
239 sprintf(rk,"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%s",regKey);
240 HKEY rv = NULL;
241 DWORD dw;
242 if(RegCreateKeyEx(HKEY_LOCAL_MACHINE,rk,0,REG_NONE,REG_OPTION_NON_VOLATILE,KEY_READ|KEY_WRITE,NULL,&rv,&dw)!=ERROR_SUCCESS)
243 return NULL;
244 return rv;
245}
246
247BOOL REG_UNINSTALL_COMMAND(LPCSTR regKey,LPCSTR dName,LPCSTR iPath,LPCSTR iFile,LPCSTR iSection)
248{
249 HKEY hKey = uninstallKey(regKey);
250 if(!hKey)
251 return FALSE;
252 BOOL rv=FALSE;
253 do{
254 if(RegSetValueEx(hKey,"DisplayName",0,REG_SZ,(LPBYTE)dName,strlen(dName)+1)!=ERROR_SUCCESS)
255 break;
256 STRING us(50+strlen(iPath)+1+strlen(iFile)+strlen(iSection)+1);
257 strcpy(us,"RunDll32 setupapi.dll,InstallHinfSection ");
258 strcat(us,iSection);
259 strcat(us," 132 ");
260 strcat(us,iPath);
261 APPEND_SLASH(us);
262 strcat(us,iFile);
263 if(RegSetValueEx(hKey,"UninstallString",0,REG_SZ,(LPBYTE)(LPCSTR)us,strlen(us)+1)!=ERROR_SUCCESS)
264 break;
265 rv=TRUE;
266 }while(FALSE);
267 RegCloseKey(hKey);
268 return rv;
269}
270BOOL REG_UNINSTALL_ICON(LPCSTR regKey,LPCSTR path,LPCSTR file,int n) {
271 HKEY hKey = uninstallKey(regKey);
272 if(!hKey)
273 return FALSE;
274 STRING uis(strlen(path)+1+strlen(file)+7);
275 strcpy(uis,path);
276 APPEND_SLASH(uis);
277 strcat(uis,file);
278 char tmp[8];
279 sprintf(tmp,";%d",n);
280 strcat(uis,tmp);
281 BOOL rv = TRUE;
282 if(RegSetValueEx(hKey,"DisplayIcon",0,REG_SZ,(LPBYTE)(LPCSTR)uis,strlen(uis)+1)!=ERROR_SUCCESS)
283 rv = FALSE;
284 RegCloseKey(hKey);
285 return rv;
286}
287BOOL REG_UNINSTALL_COMMENT(LPCSTR regKey,LPCSTR comment) {
288 HKEY hKey = uninstallKey(regKey);
289 if(!hKey)
290 return FALSE;
291 BOOL rv = TRUE;
292 if(RegSetValueEx(hKey,"lComment",0,REG_SZ,(LPBYTE)comment,strlen(comment)+1)!=ERROR_SUCCESS)
293 rv = FALSE;
294 RegCloseKey(hKey);
295 return rv;
296}
297BOOL REG_UNINSTALL_VERSION(LPCSTR regKey,LPCSTR version) {
298 HKEY hKey = uninstallKey(regKey);
299 if(!hKey)
300 return FALSE;
301 BOOL rv = TRUE;
302 if(RegSetValueEx(hKey,"DisplayVersion",0,REG_SZ,(LPBYTE)version,strlen(version)+1)!=ERROR_SUCCESS)
303 rv = FALSE;
304 RegCloseKey(hKey);
305 return rv;
306}
307BOOL REG_UNINSTALL_LOCATION(LPCSTR regKey,LPCSTR location) {
308 HKEY hKey = uninstallKey(regKey);
309 if(!hKey)
310 return FALSE;
311 BOOL rv = TRUE;
312 if(RegSetValueEx(hKey,"InstallLocation",0,REG_SZ,(LPBYTE)location,strlen(location)+1)!=ERROR_SUCCESS)
313 rv = FALSE;
314 RegCloseKey(hKey);
315 return rv;
316}
317BOOL REG_UNINSTALL_PUBLISHER(LPCSTR regKey,LPCSTR publisher) {
318 HKEY hKey = uninstallKey(regKey);
319 if(!hKey)
320 return FALSE;
321 BOOL rv = TRUE;
322 if(RegSetValueEx(hKey,"Publisher",0,REG_SZ,(LPBYTE)publisher,strlen(publisher)+1)!=ERROR_SUCCESS)
323 rv = FALSE;
324 RegCloseKey(hKey);
325 return rv;
326}
327BOOL REG_UNINSTALL_URLS(LPCSTR regKey,LPCSTR about,LPCSTR update) {
328 HKEY hKey = uninstallKey(regKey);
329 if(!hKey)
330 return FALSE;
331 BOOL rv = TRUE;
332 if(RegSetValueEx(hKey,"URLInfoAbout",0,REG_SZ,(LPBYTE)about,strlen(about)+1)!=ERROR_SUCCESS)
333 rv = FALSE;
334 if(RegSetValueEx(hKey,"URLUpdateInfo",0,REG_SZ,(LPBYTE)update,strlen(update)+1)!=ERROR_SUCCESS)
335 rv = FALSE;
336 RegCloseKey(hKey);
337 return rv;
338}
339
340 #defineINF_FILE_HEADER(i) fprintf(i,"[Version]\nSignature=\"$CHICAGO$\"\n\n")
341#define INF_FILE_SECTION(i,s) fprintf(i,"\n[%s]\n",s)
342 #defineINF_UNINSTALL_REG(i,p) fprintf(i,"HKLM,Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%s\nHKLM,Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%s,DisplayName\nHKLM,Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%s,UninstallString\n",p,p,p)
343#define INF_MENU_GROUP(i,n,m) fprintf(i,"setup.ini, progman.groups,,\"group%d=%s\"\n",n,m)
344#define INF_MENU_ITEM(i,n,m) fprintf(i,"setup.ini, group%d,, \"\"\"%s\"\"\"\n",n,m);
345#define INF_REMOVE_ROOT(i,g,r) fprintf(i,"HKLM,Software\\Microsoft\\Windows\\CurrentVersion\\DeleteFiles\\%s,,,\"%s\"\n",g,r)
346#define INF_REMOVE_FILE(i,g,f) fprintf(i,"HKLM,Software\\Microsoft\\Windows\\CurrentVersion\\DeleteFiles\\%s,%s,,\"%s\"\n",g,f,f)
347#define INF_REMOVE_HELP_FILE(i,g,f) {INF_REMOVE_FILE(i,g,f".hlp");INF_REMOVE_FILE(i,g,f".cnt");INF_REMOVE_FILE(i,g,f".GID");INF_REMOVE_FILE(i,g,f".FTS");}
348
349LPSTR GET_SHORT_PATH(LPCSTR path)
350{
351char tmp;
352DWORD len = GetShortPathName(path,&tmp,1);
353 if(!len)
354 return NULL;
355STRING rv(len+1);
356 if(!GetShortPathName(path,rv,len+1))
357 return NULL;
358 return rv.Detach();
359}
360
361BOOL Install(void);
362
363int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE,LPSTR,int)
364{
365 theInstance=hInstance;
366 CoInitialize(NULL);
367 Install();
368 CoUninitialize();
369 return 0;
370}
diff --git a/shared-code/ip_icmp.h b/shared-code/ip_icmp.h
deleted file mode 100644
index acaf7e9..0000000
--- a/shared-code/ip_icmp.h
+++ b/dev/null
@@ -1,91 +0,0 @@
1#ifndef IP_ICMPHEADER
2
3#define IP_ICMPHEADER
4
5struct icmp {
6 BYTE icmp_type;
7 BYTE icmp_code;
8 WORD icmp_cksum;
9 WORD icmp_id;
10 WORD icmp_seq;
11 char icmp_data[1];
12};
13
14#define SIZE_ICMP_HDR 8
15#define SIZE_TIME_DATA 8
16
17struct ip {
18 BYTE ip_hl:4, /* header length */
19 ip_v:4; /* version */
20 BYTE ip_tos; /* type of service */
21 short ip_len; /* total length */
22 u_short ip_id; /* identification */
23 short ip_off; /* fragment offset field */
24 BYTE ip_ttl; /* time to live */
25 BYTE ip_p; /* protocol */
26 u_short ip_sum; /* checksum */
27 struct in_addr ip_src,ip_dst; /* source and dest address */
28};
29
30#define ICMP_ECHOREPLY 0 /* echo reply */
31#define ICMP_UNREACH 3 /* dest unreachable, codes: */
32#define ICMP_UNREACH_NET 0 /* bad net */
33#define ICMP_UNREACH_HOST 1 /* bad host */
34#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */
35#define ICMP_UNREACH_PORT 3 /* bad port */
36#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */
37#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */
38#define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */
39#define ICMP_REDIRECT 5 /* shorter route, codes: */
40#define ICMP_REDIRECT_NET 0 /* for network */
41#define ICMP_REDIRECT_HOST 1 /* for host */
42#define ICMP_REDIRECT_TOSNET 2 /* for tos and net */
43#define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */
44#define ICMP_ECHO 8 /* echo service */
45#define ICMP_TIMXCEED 11 /* time exceeded, code: */
46#define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */
47#define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */
48#define ICMP_PARAMPROB 12 /* ip header bad */
49#define ICMP_TSTAMP 13 /* timestamp request */
50#define ICMP_TSTAMPREPLY 14 /* timestamp reply */
51#define ICMP_IREQ 15 /* information request */
52#define ICMP_IREQREPLY 16 /* information reply */
53#define ICMP_MASKREQ 17 /* address mask request */
54#define ICMP_MASKREPLY 18 /* address mask reply */
55
56#define ICMP_MAXTYPE 18
57
58#define ICMP_MINLEN 8 /* abs minimum */
59#define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */
60#define ICMP_MASKLEN 12 /* address mask */
61#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */
62#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
63
64#define STNORM 0
65
66/* Definition of the lowest telnet byte following an IAC byte */
67#define LOW_TEL_OPT 236
68
69#define TEL_EOF 236
70#define SUSP 237
71#define ABORT 238
72
73#define SE 240
74#define NOP 241
75#define DM 242
76#define BREAK 243
77#define IP 244
78#define AO 245
79#define AYT 246
80#define EC 247
81#define EL 248
82#define GOAHEAD 249
83#define SB 250
84#define WILL 251
85#define WONT 252
86#define DO 253
87#define DONT 254
88#define IAC 255
89
90#endif
91
diff --git a/shared-code/kHelpers.h b/shared-code/kHelpers.h
deleted file mode 100644
index 209c6b0..0000000
--- a/shared-code/kHelpers.h
+++ b/dev/null
@@ -1,159 +0,0 @@
1 #ifndef__KHELPERS_H
2#define __KHELPERS_H
3
4#include <shlobj.h>
5
6extern "C" WINSHELLAPI void WINAPI SHFree( LPVOID);
7
8namespace Klever {
9
10 inline BOOL BrowseForFolder(CString& folder,LPCTSTR title=NULL,CWnd* pParent=NULL) {
11 BROWSEINFO bi;
12 memset(&bi,0,sizeof(bi));
13 if(pParent)
14 bi.hwndOwner=pParent->GetSafeHwnd();
15 CString rv;
16 bi.pszDisplayName=rv.GetBuffer(MAX_PATH);
17 bi.lpszTitle=title;
18 bi.ulFlags=BIF_RETURNONLYFSDIRS;
19 LPITEMIDLIST lpidl = SHBrowseForFolder(&bi);
20 if(lpidl){
21 SHGetPathFromIDList(lpidl,bi.pszDisplayName);
22 SHFree(lpidl);
23 rv.ReleaseBuffer();
24 folder=rv;
25 return TRUE;
26 }
27 rv.ReleaseBuffer();
28 return FALSE;
29 }
30 inline BOOL BrowseForFolder(CString& folder,UINT idTitle,CWnd* pParent=NULL) {
31 CString title;
32 VERIFY(title.LoadString(idTitle));
33 return BrowseForFolder(folder,title,pParent);
34 }
35 inline CString GluePathAndFile(LPCTSTR path,LPCTSTR file) {
36 CString rv = path;
37 while((!rv.IsEmpty()) && rv[rv.GetLength()-1]=='\\')
38 rv=rv.Left(rv.GetLength()-1);
39 rv+='\\';
40 while(*file && *file=='\\')
41 file++;
42 rv+=file;
43 return rv;
44 }
45 inline UINT TokenizeString(CStringList& rv,LPCTSTR string,LPCTSTR delimiter) {
46 CString s = string;
47 int found;
48 int delength = strlen(delimiter);
49 int rvc = 0;
50 while((found=s.Find(delimiter))>=0){
51 rv.AddTail(s.Left(found));
52 rvc++;
53 s=s.Mid(found+delength);
54 }
55 if(!s.IsEmpty()){
56 rv.AddTail(s);
57 rvc++;
58 }
59 return rvc;
60 }
61 inline BOOL LogRecord(LPCTSTR logFile,LPCTSTR logRecord) {
62 try{
63 CFile f(logFile,CFile::modeCreate|CFile::modeNoTruncate|CFile::modeReadWrite|CFile::shareDenyWrite);
64 f.SeekToEnd();
65 CString s = CTime::GetCurrentTime().Format("[%c] ")+logRecord+"\r\n";
66 f.Write((LPCTSTR)s,s.GetLength());
67 }catch(CException* e){
68 e->Delete();
69 return FALSE;
70 }
71 return TRUE;
72 }
73 inline BOOL ReadString(CFile* file,CString& rv) {
74 rv.Empty();
75 int nBuffer = 256;
76 TCHAR* ch = rv.GetBuffer(nBuffer);
77 int nPos = 0;
78 BOOL bRV = FALSE;
79 for(;;){
80 TCHAR c;
81 try{
82 if(file->Read(&c,sizeof(c))!=sizeof(c))
83 break;
84 bRV=TRUE;
85 }catch(CException* e){
86 e->Delete();
87 TRACE0("Exception in ReadString\n");
88 return FALSE;
89 }
90 if(nPos>=(nBuffer-1)){
91 rv.ReleaseBuffer();
92 ch = rv.GetBuffer(nBuffer=nBuffer+256);
93 ASSERT(ch);
94 }
95 if(c=='\n')
96 break;
97 ch[nPos++]=c;
98 }
99 ch[nPos]=0;
100 for(;;){
101 nPos--;
102 if(nPos<0)
103 break;
104 if(ch[nPos]!='\r')
105 break;
106 ch[nPos]=0;
107 }
108 rv.ReleaseBuffer();
109 rv.FreeExtra();
110 return bRV;
111 }
112
113 inline int LoadStringList(CStringList& list,LPCTSTR section) {
114 CString n;
115 list.RemoveAll();
116 CWinApp* app = AfxGetApp();
117 ASSERT(app);
118 for(int tmp=0;;tmp++){
119 n.Format("%d",tmp);
120 CString str = app->GetProfileString(section,n,NULL);
121 if(str.IsEmpty())
122 break;
123 list.AddTail(str);
124 }
125 return tmp;
126 }
127 inline int SaveStringList(CStringList& list,LPCTSTR section) {
128 CString n;
129 CWinApp* app = AfxGetApp();
130 ASSERT(app);
131 POSITION p = list.GetHeadPosition();
132 for(int tmp=0;p;tmp++){
133 n.Format("%d",tmp);
134 app->WriteProfileString(section,n,list.GetNext(p));
135 }
136 n.Format("%d",tmp);
137 app->WriteProfileString(section,n,NULL);
138 return tmp;
139 }
140
141 inline BOOL WriteProfileString(LPCTSTR section,LPCTSTR entry,LPCTSTR str) {
142 CWinApp* app = AfxGetApp();
143 return app->WriteProfileBinary(section,entry,(LPBYTE)str,strlen(str)+1);
144 }
145 inline CString GetProfileString(LPCTSTR section,LPCTSTR entry,LPCTSTR defval) {
146 CWinApp* app = AfxGetApp();
147 LPBYTE pData;
148 UINT nCount;
149 CString rv = defval;
150 if(app->GetProfileBinary(section,entry,&pData,&nCount)){
151 rv = (LPCTSTR)pData;
152 delete pData;
153 }
154 return rv;
155 }
156
157};
158
159#endif // __KHELPERS_H
diff --git a/shared-code/kICMP.cpp b/shared-code/kICMP.cpp
deleted file mode 100644
index 09a8f94..0000000
--- a/shared-code/kICMP.cpp
+++ b/dev/null
@@ -1,300 +0,0 @@
1#include "../stdafx.h"
2#include "kICMP.h"
3
4CICMP::_mechanismus CICMP::m_mechanismus = CICMP::_icmpUndetermined;
5
6BOOL CICMPDll::Initialize()
7{
8 if(m_hICMP!=INVALID_HANDLE_VALUE || m_hICMPDLL)
9 Deinitialize();
10 m_hICMPDLL = ::LoadLibraryEx("ICMP",NULL,0);
11 if(!m_hICMPDLL)
12 return FALSE;
13 *(FARPROC*)&m_icmpCF = ::GetProcAddress(m_hICMPDLL,"IcmpCreateFile");
14 *(FARPROC*)&m_icmpSE = ::GetProcAddress(m_hICMPDLL,"IcmpSendEcho");
15 *(FARPROC*)&m_icmpCH = ::GetProcAddress(m_hICMPDLL,"IcmpCloseHandle");
16 if(!(m_icmpCF && m_icmpSE && m_icmpCH)){
17 Deinitialize(); return FALSE;
18 }
19 m_hICMP = (*m_icmpCF)();
20 if(m_hICMP==INVALID_HANDLE_VALUE){
21 Deinitialize(); return FALSE;
22 }
23 TRACE0("ICMP-DLL Initialized\n");
24 return TRUE;
25}
26void CICMPDll::Deinitialize()
27{
28 if(m_hICMPDLL){
29 if(m_hICMP!=INVALID_HANDLE_VALUE && m_icmpCH)
30 (*m_icmpCH)(m_hICMP);
31 ::FreeLibrary(m_hICMPDLL); m_hICMPDLL = NULL;
32 m_icmpCF = NULL;
33 m_icmpSE = NULL;
34 m_icmpCH = NULL;
35 }
36 m_hICMP=INVALID_HANDLE_VALUE;
37 if(m_sizeOut && m_bsOut){
38 delete m_bsOut;
39 m_bsOut = NULL; m_sizeOut = 0;
40 }
41 if(m_sizeIn && m_bsIn){
42 delete m_bsIn;
43 m_bsIn = NULL; m_sizeIn = 0;
44 }
45}
46
47LONG CICMPDll::Ping(const in_addr host,const UINT packetSize,
48 const UINT timeOut,LPINT pStatus)
49{
50 if(!(m_hICMP && m_hICMPDLL && m_icmpSE)){
51 if(pStatus)
52 (*pStatus) = icmpNotInitialized;
53 return -1;
54 }
55 VERIFY(AdjustBuffers(packetSize));
56IPINFO ipi;
57 memset(&ipi,0,sizeof(ipi));
58 ipi.Ttl = 30;
59 for(UINT tmp=0;tmp<packetSize;tmp++)
60 m_bsOut[tmp]=tmp&0xFF;
61LPICMPECHO pRep = (LPICMPECHO)m_bsIn;
62 pRep->Status = 0xFFFFFFFFl;
63 if((*m_icmpSE)(m_hICMP,host.s_addr,m_bsOut,packetSize,
64 &ipi,pRep,m_sizeIn,timeOut))
65 TRACE0("ICMP-SendEcho succeeded\n");
66 else
67 TRACE0("ICMP-SendEcho failed\n");
68LONG lrv = -1;
69INT rv = ipUnknown;
70 switch(pRep->Status){
71 case IP_SUCCESS:
72 lrv = pRep->RTTime; rv = ipSuccess;
73 break;
74 case IP_BUF_TOO_SMALL: rv = ipBuffTooSmall; break;
75 case IP_DEST_NET_UNREACHABLE: rv = ipDestNetUnreachable; break;
76 case IP_DEST_HOST_UNREACHABLE: rv = ipDestHostUnreachable; break;
77 case IP_DEST_PROT_UNREACHABLE: rv = ipDestProtUnreachable; break;
78 case IP_DEST_PORT_UNREACHABLE: rv = ipDestPortUnreachable; break;
79 case IP_NO_RESOURCES: rv = ipNoResources; break;
80 case IP_BAD_OPTION: rv = ipBadOption; break;
81 case IP_HW_ERROR: rv = ipHWError; break;
82 case IP_PACKET_TOO_BIG: rv = ipPacketTooBig; break;
83 case IP_REQ_TIMED_OUT: rv = ipTimeOut; break;
84 case IP_BAD_REQ: rv = ipBadRequest; break;
85 case IP_BAD_ROUTE: rv = ipBadRoute; break;
86 case IP_TTL_EXPIRED_TRANSIT: rv = ipTTLExpiredInTransit; break;
87 case IP_TTL_EXPIRED_REASSEM: rv = ipTTLExpiredInReasm; break;
88 case IP_PARAM_PROBLEM: rv = ipParamProblem; break;
89 case IP_SOURCE_QUENCH: rv = ipSourceQuench; break;
90 case IP_OPTION_TOO_BIG: rv = ipOptionTooBig; break;
91 case IP_BAD_DESTINATION: rv = ipBadDest; break;
92 }
93 if(pStatus)
94 (*pStatus)=rv;
95 return lrv;
96}
97
98BOOL CICMPDll::AdjustBuffers(UINT packetSize)
99{
100 if(!packetSize)
101 packetSize=1;
102 if(packetSize>m_sizeOut){
103 if(m_sizeOut && m_bsOut)
104 delete m_bsOut;
105 m_bsOut = new BYTE[m_sizeOut=packetSize];
106 if(!m_bsOut)
107 return FALSE;
108 }
109UINT sin = sizeof(ICMPECHO)+SIZE_ICMP_HDR+packetSize;
110 if(sin>m_sizeIn){
111 if(m_sizeIn && m_bsIn)
112 delete m_bsIn;
113 m_bsIn = new BYTE[m_sizeIn=sin];
114 if(!m_bsIn)
115 return FALSE;
116 }
117 return TRUE;
118}
119
120
121WORD CICMPWS::m_icmpSeq = 0;
122
123BOOL CICMPWS::Initialize()
124{
125 if(m_socket!=INVALID_SOCKET)
126 Deinitialize();
127 m_socket = socket(AF_INET,SOCK_RAW,1/*ICMP*/);
128 if(m_socket==INVALID_SOCKET)
129 return FALSE;
130 TRACE0("ICMP-WS Initialized\n");
131 return TRUE;
132}
133void CICMPWS::Deinitialize()
134{
135 if(m_socket!=INVALID_SOCKET){
136 closesocket(m_socket);
137 m_socket=INVALID_SOCKET;
138 }
139 if(m_sizeOut && m_bsOut){
140 delete m_bsOut;
141 m_bsOut = NULL; m_sizeOut = 0;
142 }
143 if(m_sizeIn && m_bsIn){
144 delete m_bsIn;
145 m_bsIn = NULL; m_sizeIn = 0;
146 }
147}
148LONG CICMPWS::Ping(const in_addr host,const UINT packetSize,
149 const UINT timeOut,LPINT pStatus)
150{
151 if(m_socket==INVALID_SOCKET){
152 if(pStatus)
153 (*pStatus)=icmpNotInitialized;
154 }
155 VERIFY(AdjustBuffers(packetSize));
156icmp* pPacket = (icmp*)m_bsOut;
157 memset(pPacket,0,m_sizeOut);
158 pPacket->icmp_type = ICMP_ECHO;
159 pPacket->icmp_seq = m_icmpSeq++;
160 pPacket->icmp_id = (WORD)(::GetCurrentThreadId()&0xFFFF);
161 for(UINT tmp=0;tmp<packetSize;tmp++)
162 pPacket->icmp_data[tmp]=tmp&0xFF;
163 pPacket->icmp_cksum = cksum(pPacket,SIZE_ICMP_HDR+packetSize);
164sockaddr_in to;
165 memset(&to,0,sizeof(to));
166 to.sin_addr.s_addr = host.s_addr;
167 to.sin_family = AF_INET;
168 if(sendto(m_socket,(char*)pPacket,SIZE_ICMP_HDR+packetSize,0,
169 (SOCKADDR*)&to,sizeof(to)) != (int)(SIZE_ICMP_HDR+packetSize)){
170 TRACE1("sendto: %lu\n",WSAGetLastError());
171 if(pStatus)
172 (*pStatus)=icmpSocketError;
173 return -1;
174 }
175DWORD sentTime = ::GetTickCount();
176sockaddr_in from;
177 memset(&from,0,sizeof(from));
178 from.sin_family=AF_INET;
179 from.sin_addr.s_addr=INADDR_ANY;
180fd_set fds;
181 FD_ZERO(&fds);
182 FD_SET(m_socket,&fds);
183long lrv = -1;
184INT rv = ipTimeOut;
185 for(;;){
186 DWORD ct = ::GetTickCount();
187 if((ct-sentTime)>=timeOut){
188 TRACE0("Timeout\n");
189 break;
190 }
191 timeval tv = {
192 (timeOut-ct+sentTime)/1000,
193 (timeOut-ct+sentTime)%1000
194 };// tv_sec, tv_usec (secs,microsecs)
195 if(!select(m_socket,&fds,NULL,NULL,&tv)){
196 TRACE1("select: %d\n",WSAGetLastError());
197 break;
198 }
199 DWORD rtime = ::GetTickCount();
200 ASSERT(FD_ISSET(m_socket,&fds));
201 int fl = sizeof(from);
202 int rb = recvfrom(m_socket,(char*)m_bsIn,m_sizeIn,0,(SOCKADDR*)&from,&fl);
203 ip* pIP = (ip*)m_bsIn;
204 icmp* pICMP = (icmp*)&m_bsIn[sizeof(ip)];
205 if(pICMP->icmp_id!=pPacket->icmp_id)
206 continue;
207 if(pICMP->icmp_seq!=pPacket->icmp_seq)
208 continue;
209 if(from.sin_addr.s_addr!=host.s_addr)
210 continue;
211 if(pICMP->icmp_type==ICMP_ECHOREPLY){
212 lrv=rtime-sentTime;
213 rv=ipSuccess;
214 break;
215 }
216 rv = ipUnknown;// ***
217 break;
218 }
219 if(pStatus)
220 (*pStatus)=rv;
221 return lrv;
222}
223
224BOOL CICMPWS::AdjustBuffers(UINT packetSize)
225{
226 if(!packetSize)
227 packetSize=0;
228UINT osize = packetSize+SIZE_ICMP_HDR;
229 if(m_sizeOut<osize){
230 if(m_sizeOut && m_bsOut)
231 delete m_bsOut;
232 m_bsOut = new BYTE[m_sizeOut=osize];
233 if(!m_bsOut)
234 return FALSE;
235 }
236UINT isize = osize+sizeof(ip);
237 if(m_sizeIn<isize){
238 if(m_sizeIn && m_bsIn)
239 delete m_bsIn;
240 m_bsIn = new BYTE[m_sizeIn=isize];
241 if(!m_bsIn)
242 return FALSE;
243 }
244 return TRUE;
245}
246
247WORD CICMPWS::cksum(LPVOID data,int count)
248{
249long lSum = 0;
250WORD *pData = (WORD*)data;
251 while(count>0){
252 if(count>1){
253 lSum+=*(pData++);
254 count-=2;
255 }else{
256 lSum+=((WORD)*(BYTE*)pData)&0xFF;
257 count--;
258 }
259 }
260 lSum = (lSum&0xFFFF)+(lSum>>16);
261 lSum += (lSum>>16);
262 return (~lSum)&0xFFFF;
263}
264
265CICMP* CICMP::CreateICMP()
266{
267 if(m_mechanismus==_icmpUndetermined)
268 GuessMechanismus();
269 switch(m_mechanismus){
270 case _icmpWinsock:
271 return new CICMPWS;
272 break;
273 case _icmpDLL:
274 return new CICMPDll;
275 break;
276 }
277 return NULL;
278}
279
280void CICMP::GuessMechanismus()
281{
282 m_mechanismus=_icmpUndetermined;
283SOCKET testSocket = socket(AF_INET,SOCK_RAW,1);
284 if(testSocket!=INVALID_SOCKET){
285 closesocket(testSocket);
286 m_mechanismus=_icmpWinsock;
287 }else{
288 HINSTANCE hICMP = ::LoadLibraryEx("ICMP",NULL,0);
289 if(!hICMP)
290 return;
291 BOOL isThere = (
292 ::GetProcAddress(hICMP,"IcmpCreateFile")
293 && ::GetProcAddress(hICMP,"IcmpSendEcho")
294 && ::GetProcAddress(hICMP,"IcmpCloseHandle")
295 );
296 ::FreeLibrary(hICMP);
297 if(isThere)
298 m_mechanismus=_icmpDLL;
299 }
300} \ No newline at end of file
diff --git a/shared-code/kICMP.h b/shared-code/kICMP.h
deleted file mode 100644
index 7a5ceaa..0000000
--- a/shared-code/kICMP.h
+++ b/dev/null
@@ -1,80 +0,0 @@
1 #ifndef__KICMP_H
2#define __KICMP_H
3
4class CICMP {
5 enum _mechanismus {
6 _icmpUndetermined = -1,
7 _icmpWinsock = 0, _icmpDLL
8 };
9static _mechanismus m_mechanismus;
10static void GuessMechanismus();
11public:
12static
13 CICMP* CreateICMP();
14
15 enum {
16 ipSuccess = 0,
17 ipBuffTooSmall, ipDestNetUnreachable, ipDestHostUnreachable,
18 ipDestProtUnreachable, ipDestPortUnreachable, ipNoResources,
19 ipBadOption, ipHWError, ipPacketTooBig, ipTimeOut, ipBadRequest,
20 ipBadRoute, ipTTLExpiredInTransit, ipTTLExpiredInReasm,
21 ipParamProblem, ipSourceQuench, ipOptionTooBig, ipBadDest,
22 ipUnknown = -1,
23 icmpNotInitialized = -2,
24 icmpSocketError = -3
25 };
26
27 virtual BOOL Initialize() = 0;
28 virtual void Deinitialize() = 0;
29
30 virtual LONG Ping(const in_addr host,const UINT packetSize=0,
31 const UINT timeOut=10000,LPINT pStatus=NULL) = 0;
32};
33
34class CICMPDll : public CICMP {
35 HANDLE(WINAPI *m_icmpCF)(VOID);
36 BOOL(WINAPI *m_icmpSE)(HANDLE,ULONG,LPVOID,WORD,
37 PIPINFO,LPVOID,DWORD,DWORD);
38 BOOL(WINAPI *m_icmpCH)(HANDLE);
39public:
40 HINSTANCE m_hICMPDLL;
41 HANDLE m_hICMP;
42 LPBYTE m_bsIn, m_bsOut;
43 UINT m_sizeIn, m_sizeOut;
44
45 CICMPDll() : m_hICMP(INVALID_HANDLE_VALUE), m_hICMPDLL(NULL),
46 m_bsIn(NULL), m_bsOut(NULL), m_sizeIn(0), m_sizeOut(0) {}
47 virtual ~CICMPDll() { Deinitialize(); }
48
49 virtual BOOL Initialize();
50 virtual void Deinitialize();
51
52 virtual LONG Ping(const in_addr host,const UINT packetSize=0,
53 const UINT timeOut=10000,LPINT pStatus=NULL);
54
55 BOOL AdjustBuffers(UINT packetSize=0);
56};
57
58class CICMPWS : public CICMP {
59static
60 WORD m_icmpSeq;
61public:
62 SOCKET m_socket;
63 LPBYTE m_bsIn, m_bsOut;
64 UINT m_sizeIn, m_sizeOut;
65
66 CICMPWS() : m_socket(INVALID_SOCKET), m_bsIn(NULL), m_bsOut(NULL),
67 m_sizeIn(0), m_sizeOut(0) {}
68 virtual ~CICMPWS() { Deinitialize(); }
69
70 virtual BOOL Initialize();
71 virtual void Deinitialize();
72
73 virtual LONG Ping(const in_addr host,const UINT packetSize=0,
74 const UINT timeOut=10000,LPINT pStatus=NULL);
75
76 BOOL AdjustBuffers(UINT packetSize=0);
77 WORD cksum(LPVOID data,int count);
78};
79
80#endif // __KICMP_H \ No newline at end of file
diff --git a/shared-code/kinhelp.xsl b/shared-code/kinhelp.xsl
deleted file mode 100644
index 0bb384a..0000000
--- a/shared-code/kinhelp.xsl
+++ b/dev/null
@@ -1,250 +0,0 @@
1<?xml version="1.0"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 >
5 <xsl:output
6 method="text"
7 encoding="us-ascii"/>
8 <xsl:strip-space elements="*"/>
9
10 <xsl:template match="winhelp">
11 <xsl:text>{\rtf1\ansi</xsl:text>
12 <xsl:text>&#xA;@{\footnote</xsl:text>
13 <xsl:text>&#xA;THIS FILE WAS AUTOMATICALLY GENERATED FROM XML DOCUMENT.</xsl:text>
14 <xsl:text>&#xA;DO NOT MODIFY THIS FILE DIRECTLY. EDIT XML DOCUMENT INSTEAD</xsl:text>
15 <xsl:text>&#xA;}&#xA;</xsl:text>
16 <xsl:call-template name="fonttbl"/>
17 <xsl:call-template name="colortbl"/>
18 <xsl:apply-templates/>
19 <xsl:text>}</xsl:text>
20 </xsl:template>
21
22 <xsl:template match="topic">
23 <xsl:text>&#xA;\pard\plain</xsl:text>
24 <xsl:if test="descendant::*[ (@scroll='no') and
25 count(preceding-sibling::*[not(@scroll='no') and (name()!='a' and @name)])=0] ">
26 <xsl:text>\keepn</xsl:text>
27 </xsl:if>
28 <xsl:if test="@id">
29 <xsl:text>&#xA;#{\footnote </xsl:text>
30 <xsl:value-of select="@id"/>
31 <xsl:text>}</xsl:text>
32 </xsl:if>
33 <xsl:if test="@title">
34 <xsl:text>&#xA;${\footnote </xsl:text>
35 <xsl:value-of select="@title"/>
36 <xsl:text>}</xsl:text>
37 </xsl:if>
38 <xsl:if test="@keywords">
39 <xsl:text>&#xA;K{\footnote </xsl:text>
40 <xsl:value-of select="@keywords"/>
41 <xsl:text>}</xsl:text>
42 </xsl:if>
43 <xsl:apply-templates/>
44 <xsl:text>&#xA;\page&#xA;</xsl:text>
45 </xsl:template>
46
47 <xsl:template match="a[@name]">
48 <xsl:text>{#{\footnote </xsl:text>
49 <xsl:value-of select="@name"/>
50 <xsl:text>}}</xsl:text>
51 </xsl:template>
52 <xsl:template match="a[@href]">
53 <xsl:call-template name="hyperref">
54 <xsl:with-param name="href" select="@href"/>
55 <xsl:with-param name="inset"><xsl:apply-templates/></xsl:with-param>
56 </xsl:call-template>
57 </xsl:template>
58 <xsl:template name="hyperref">
59 <xsl:param name="href"/>
60 <xsl:param name="inset"/>
61 <xsl:choose>
62 <xsl:when test="starts-with($href,'http:') or starts-with($href,'mailto:') or
63 starts-with($href,'ftp:')">
64 <xsl:text>{\uldb </xsl:text>
65 <xsl:value-of select="$inset"/>
66 <xsl:text>}{\v %!ExecFile("</xsl:text>
67 <xsl:value-of select="$href"/>
68 <xsl:text>")}</xsl:text>
69 </xsl:when>
70 <xsl:when test="starts-with($href,'#')">
71 <xsl:text>{\uldb </xsl:text>
72 <xsl:value-of select="$inset"/>
73 <xsl:text>}{\v </xsl:text>
74 <xsl:value-of select="substring($href,2)"/>
75 <xsl:text>}</xsl:text>
76 </xsl:when>
77 <xsl:otherwise>
78 <xsl:message>Warining: Unqualified hyper-reference. Using as help-internal</xsl:message>
79 <xsl:text>{\uldb </xsl:text>
80 <xsl:value-of select="$inset"/>
81 <xsl:text>}{\v </xsl:text>
82 <xsl:value-of select="$href"/>
83 <xsl:text>}</xsl:text>
84 </xsl:otherwise>
85 </xsl:choose>
86 </xsl:template>
87
88 <xsl:template match="heading">
89 <xsl:text>&#xA;</xsl:text>
90 <xsl:if test="@scroll!='no'">
91 <xsl:text>\pard </xsl:text>
92 </xsl:if>
93 <xsl:text>{ \f1\fs18\b\sb120 </xsl:text>
94 <xsl:apply-templates/>
95 <xsl:text>}</xsl:text>
96 </xsl:template>
97
98 <xsl:template match="p">
99 <xsl:text>&#xA;\par\sa120\sb120\qj</xsl:text>
100 <xsl:if test="@scroll!='no'">
101 <xsl:text>\pard</xsl:text>
102 </xsl:if>
103 <xsl:text> \f1\fs18\sb120 </xsl:text>
104 <xsl:apply-templates/>
105 </xsl:template>
106
107 <xsl:template match="note">
108 <xsl:text>&#xA;\par\sa120\sb120\qj\f1\fs16 </xsl:text>
109 <xsl:apply-templates/>
110 </xsl:template>
111
112 <xsl:template match="dedication">
113 <xsl:text>&#xA;\par\sa120\sb120\qr\f1\fs16 </xsl:text>
114 <xsl:apply-templates/>
115 </xsl:template>
116
117 <xsl:template match="image">
118 <xsl:text>\{bmct </xsl:text>
119 <xsl:value-of select="@source"/>
120 <xsl:text>\}</xsl:text>
121 </xsl:template>
122
123 <xsl:template match="newsfor">
124 <xsl:text>&#xA;\par\pard\plain\f1\fs24\qc\cf2\b </xsl:text>
125 <xsl:value-of select="@version"/>
126 <xsl:text> - </xsl:text>
127 <xsl:value-of select="@date"/>
128 <xsl:apply-templates/>
129 </xsl:template>
130 <xsl:template match="ni">
131 <xsl:text>&#xA;\par\pard\plain\fi0\li0\f1\fs18 \bullet </xsl:text>
132 <xsl:apply-templates/>
133 </xsl:template>
134
135 <xsl:template match="b">
136 <xsl:text>{\b </xsl:text>
137 <xsl:apply-templates/>
138 <xsl:text>}</xsl:text>
139 </xsl:template>
140 <xsl:template match="i">
141 <xsl:text>{\i </xsl:text>
142 <xsl:apply-templates/>
143 <xsl:text>}</xsl:text>
144 </xsl:template>
145 <xsl:template match="u">
146 <xsl:text>{\ul </xsl:text>
147 <xsl:apply-templates/>
148 <xsl:text>}</xsl:text>
149 </xsl:template>
150 <xsl:template match="strike">
151 <xsl:text>{\strike </xsl:text>
152 <xsl:apply-templates/>
153 <xsl:text>}</xsl:text>
154 </xsl:template>
155
156 <xsl:template match="kin">
157 <xsl:choose>
158 <xsl:when test="@href">
159 <xsl:call-template name="hyperref">
160 <xsl:with-param name="href" select="@href"/>
161 <xsl:with-param name="inset"><xsl:text>{\b </xsl:text><xsl:apply-templates/><xsl:text>}</xsl:text></xsl:with-param>
162 </xsl:call-template>
163 </xsl:when>
164 <xsl:otherwise>
165 <xsl:text>{\b </xsl:text>
166 <xsl:apply-templates/>
167 <xsl:text>}</xsl:text>
168 </xsl:otherwise>
169 </xsl:choose>
170 </xsl:template>
171 <xsl:template match="product">
172 <xsl:choose>
173 <xsl:when test="@href">
174 <xsl:call-template name="hyperref">
175 <xsl:with-param name="href" select="@href"/>
176 <xsl:with-param name="inset"><xsl:text>{\b\cf6 </xsl:text><xsl:apply-templates/><xsl:text>}</xsl:text></xsl:with-param>
177 </xsl:call-template>
178 </xsl:when>
179 <xsl:otherwise>
180 <xsl:text>{\b\cf6 </xsl:text>
181 <xsl:apply-templates/>
182 <xsl:text>}</xsl:text>
183 </xsl:otherwise>
184 </xsl:choose>
185 </xsl:template>
186 <xsl:template match="term">
187 <xsl:text>{\i </xsl:text>
188 <xsl:apply-templates/>
189 <xsl:text>}</xsl:text>
190 </xsl:template>
191
192 <xsl:template match="rfc">
193 <xsl:call-template name="hyperref">
194 <xsl:with-param name="href" select="concat('http://www.rfc-editor.org/rfc/rfc',@num,'.txt')"/>
195 <xsl:with-param name="inset" select="concat('{\b RFC',@num,'}')"/>
196 </xsl:call-template>
197 </xsl:template>
198
199 <xsl:template match="license">
200 <xsl:text>&#xA;{</xsl:text>
201 <xsl:text>&#xA;\par\pard\plain\sb360\sa120 \f1\fs16 Copyright (c) </xsl:text>
202 <xsl:value-of select="@years"/>
203 <xsl:text> {\uldb\cf0 Klever Group (http://www.klever.net/)}{\v %!ExecFile("http://www.klever.net/")}</xsl:text>
204 <xsl:text>&#xA;\par\qj\sb120\sa120</xsl:text>
205 <xsl:text>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</xsl:text>
206 <xsl:text>&#xA;\par The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</xsl:text>
207 <xsl:text>&#xA;\par \sa360 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</xsl:text>
208 <xsl:text>&#xA;}</xsl:text>
209 </xsl:template>
210 <xsl:template match="credits">
211 <xsl:text>&#xA;\par \sa0\sb120\ql \f1\fs16 Author: {\b\uldb\cf11 Michael Krelin ({\i hacker@klever.net})}{\v %!ExecFile("mailto:hacker@klever.net")}</xsl:text>
212 <xsl:text>&#xA;\par \sa0\sb0 Fan mail send to {\i\uldb gefilte@klever.net}{\v %!ExecFile("mailto:gefilte@klever.net")}</xsl:text>
213 </xsl:template>
214
215 <xsl:template match="ul">
216 <xsl:text>\pard</xsl:text>
217 <xsl:apply-templates/>
218 <xsl:text>\pard</xsl:text>
219 </xsl:template>
220 <xsl:template match="li">
221 <!-- TODO: could be done better, but you never know with winhelp.. -->
222 <xsl:variable name="li" select=" count(ancestor::ul) "/>
223 <xsl:text>&#xA;\par \fi0\li</xsl:text><xsl:value-of
224 select="0"/><xsl:text> \bullet </xsl:text>
225 <xsl:apply-templates/>
226 </xsl:template>
227
228 <xsl:template match="topic/text()">
229 <!-- maybe only omit spaces? -->
230 </xsl:template>
231 <xsl:template match="ul/text()">
232 </xsl:template>
233
234 <xsl:template name="colortbl">
235 <xsl:text>{\colortbl;
236 \red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;
237 \red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
238 \red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;
239 \red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
240 </xsl:text>
241 </xsl:template>
242 <xsl:template name="fonttbl">
243 <xsl:text>{\fonttbl</xsl:text>
244 <xsl:text>{\f0\froman Times New Roman;}</xsl:text>
245 <xsl:text>{\f1\fswiss Arial;}</xsl:text>
246 <xsl:text>{\f3\froman Symbol;}</xsl:text>
247 <xsl:text>}</xsl:text>
248 </xsl:template>
249
250</xsl:stylesheet>
diff --git a/shared-code/ms_icmp.h b/shared-code/ms_icmp.h
deleted file mode 100644
index 32d97f5..0000000
--- a/shared-code/ms_icmp.h
+++ b/dev/null
@@ -1,77 +0,0 @@
1/*------------------------------------------------------------------
2* Filename: MS_ICMP.H
3*
4* Description: Prototypes of Microsoft's ICMP.DLL functions for
5* access to Internet Control Message Protocol (their stacks do
6* not support the standard Berkeley Sockets raw socket API).
7* Use this to do "ping" or "traceroute," although beware that
8* Microsoft discourages its use.
9*/
10
11
12/* Note 2: For the most part, you can refer to RFC 791 for detials on
13* how to fill in values for the IP option information structure. */
14typedef struct ip_option_information {
15 u_char Ttl; /* Time To Live (used for traceroute) */
16 u_char Tos; /* Type Of Service (usually 0) */
17 u_char Flags; /* IP header flags (usually 0) */
18 u_char OptionsSize; /* Size of options data (usually 0, max 40) */
19 u_char FAR *OptionsData;/* Options data buffer */
20 }IPINFO, *PIPINFO, FAR *LPIPINFO;
21
22/* Note 1: The Reply Buffer will have an array of ICMP_ECHO_REPLY
23* structures, followed by options and the data in ICMP echo reply
24* datagram received. You must have room for at least one ICMP
25* echo reply structure, plus 8 bytes for an ICMP header. */
26typedef struct icmp_echo_reply {
27 u_long Address; /* source address */
28 u_long Status; /* IP status value (see below) */
29 u_long RTTime; /* Round Trip Time in milliseconds */
30 u_short DataSize; /* reply data size */
31 u_short Reserved; /* */
32 void FAR *Data; /* reply data buffer */
33 typedef struct ip_option_information Options; /* reply options */
34 }ICMPECHO, *PICMPECHO, FAR *LPICMPECHO;
35
36#define IP_STATUS_BASE 11000
37#define IP_SUCCESS 0
38#define IP_BUF_TOO_SMALL (IP_STATUS_BASE + 1)
39#define IP_DEST_NET_UNREACHABLE (IP_STATUS_BASE + 2)
40#define IP_DEST_HOST_UNREACHABLE (IP_STATUS_BASE + 3)
41#define IP_DEST_PROT_UNREACHABLE (IP_STATUS_BASE + 4)
42#define IP_DEST_PORT_UNREACHABLE (IP_STATUS_BASE + 5)
43#define IP_NO_RESOURCES (IP_STATUS_BASE + 6)
44#define IP_BAD_OPTION (IP_STATUS_BASE + 7)
45#define IP_HW_ERROR (IP_STATUS_BASE + 8)
46#define IP_PACKET_TOO_BIG (IP_STATUS_BASE + 9)
47#define IP_REQ_TIMED_OUT (IP_STATUS_BASE + 10)
48#define IP_BAD_REQ (IP_STATUS_BASE + 11)
49#define IP_BAD_ROUTE (IP_STATUS_BASE + 12)
50#define IP_TTL_EXPIRED_TRANSIT (IP_STATUS_BASE + 13)
51#define IP_TTL_EXPIRED_REASSEM (IP_STATUS_BASE + 14)
52#define IP_PARAM_PROBLEM (IP_STATUS_BASE + 15)
53#define IP_SOURCE_QUENCH (IP_STATUS_BASE + 16)
54#define IP_OPTION_TOO_BIG (IP_STATUS_BASE + 17)
55#define IP_BAD_DESTINATION (IP_STATUS_BASE + 18)
56#define IP_ADDR_DELETED (IP_STATUS_BASE + 19)
57#define IP_SPEC_MTU_CHANGE (IP_STATUS_BASE + 20)
58#define IP_MTU_CHANGE (IP_STATUS_BASE + 21)
59#define IP_UNLOAD (IP_STATUS_BASE + 22)
60#define IP_GENERAL_FAILURE (IP_STATUS_BASE + 50)
61#define MAX_IP_STATUS IP_GENERAL_FAILURE
62#define IP_PENDING (IP_STATUS_BASE + 255)
63
64
65HANDLE WINAPI PASCAL IcmpCreateFile(VOID); /* INVALID_HANDLE_VALUE on error */
66BOOL WINAPI PASCAL IcmpCloseHandle(HANDLE IcmpHandle); /* FALSE on error */
67DWORD WINAPI PASCAL IcmpSendEcho(
68 HANDLE IcmpHandle, /* handle returned from IcmpCreateFile() */
69 u_long DestAddress, /* destination IP address (in network order) */
70 LPVOID RequestData, /* pointer to buffer to send */
71 WORD RequestSize, /* length of data in buffer */
72 LPIPINFO RequestOptns, /* see Note 2 below */
73 LPVOID ReplyBuffer, /* see Note 1 below */
74 DWORD ReplySize, /* length of reply (must allow at least 1 reply) */
75 DWORD Timeout /* time in milliseconds to wait for reply */
76);
77
diff --git a/shared-data/browse-icon.ico b/shared-data/browse-icon.ico
deleted file mode 100644
index d2d1b3c..0000000
--- a/shared-data/browse-icon.ico
+++ b/dev/null
Binary files differ
diff --git a/shared-data/install-icon.ico b/shared-data/install-icon.ico
deleted file mode 100644
index 23e86a6..0000000
--- a/shared-data/install-icon.ico
+++ b/dev/null
Binary files differ
diff --git a/shared-data/klever-background.bmp b/shared-data/klever-background.bmp
deleted file mode 100644
index e4d87ec..0000000
--- a/shared-data/klever-background.bmp
+++ b/dev/null
Binary files differ
diff --git a/shared-data/play-icon.ico b/shared-data/play-icon.ico
deleted file mode 100644
index 3d2a11e..0000000
--- a/shared-data/play-icon.ico
+++ b/dev/null
Binary files differ
diff --git a/stdafx.cpp b/stdafx.cpp
deleted file mode 100644
index 45b4220..0000000
--- a/stdafx.cpp
+++ b/dev/null
@@ -1,6 +0,0 @@
1// stdafx.cpp : source file that includes just the standard includes
2 //PumpKIN.pch will be the pre-compiled header
3 //stdafx.obj will contain the pre-compiled type information
4
5#include "stdafx.h"
6
diff --git a/stdafx.h b/stdafx.h
deleted file mode 100644
index b2d650d..0000000
--- a/stdafx.h
+++ b/dev/null
@@ -1,27 +0,0 @@
1// stdafx.h : include file for standard system include files,
2// or project specific include files that are used frequently, but
3// are changed infrequently
4//
5
6 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
7
8#include <afxwin.h> // MFC core and standard components
9#include <afxext.h> // MFC extensions
10#ifndef _AFX_NO_AFXCMN_SUPPORT
11 #include <afxcmn.h> // MFC support for Windows 95 Common Controls
12#endif // _AFX_NO_AFXCMN_SUPPORT
13
14#include <afxtempl.h>
15
16 #include <afxsock.h> // MFC socket extensions
17#include <MMSystem.h>
18// CG: The following line was added by the Windows Multimedia component.
19#pragma comment(lib, "winmm.lib")
20
21 enum{
22 WM_RESOLVED = WM_USER,
23 WM_TRAYICON
24};
25
26#include "shared-code/kHelpers.h"
27#include "shared-code/BellsNWhistles.h" \ No newline at end of file