blob: b00ed50aca3980193e61d03fc7386e0d42d0bd6a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
//---------------------------------------------------------------------------
#ifndef StatusFrmH
#define StatusFrmH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
//#include <NMFtp.hpp>
#include "MainFrm.h"
//#include "IdBaseComponent.hpp"
//#include "IdComponent.hpp"
//#include "IdFTP.hpp"
//#include "IdTCPClient.hpp"
//#include "IdTCPConnection.hpp"
//---------------------------------------------------------------------------
class TFTPCon {
public:
string Host;
string Username;
string Password;
bool Passive;
string cwd;
};
class TStatusForm : public TForm
{
__published: // IDE-managed Components
TPanel *Panel1;
TPanel *Panel2;
TButton *Button1;
TPanel *statusBar;
TPanel *Panel3;
TPanel *actionBar;
void __fastcall FormShow(TObject *Sender);
void __fastcall Cleanup(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
void __fastcall Button1Click(TObject *Sender);
// void __fastcall ftpConWork(TObject *Sender, TWorkMode AWorkMode,
// const int AWorkCount);
private: // User declarations
class TFTPThread : public TThread {
bool abort;
InstallSourceTab *ist;
string src;
string dest;
string buffer;
string buffer2;
string suffix;
bool dirTransfer;
bool passive;
protected:
void __fastcall Execute();
public:
// TNMFTP *FTPLink;
__fastcall TFTPThread(InstallSourceTab *iist, const char *isrc, const char *idest, bool idirTransfer = false, bool CreateSuspended = false, bool ipassive = false, const char *suffix = "");
__fastcall TFTPThread::~TFTPThread();
void __fastcall FTPLinkPacketRecvd(TObject *Sender);
void __fastcall CreateFTPObject(void);
void __fastcall PreConnect(void);
void __fastcall PreDownload1(void);
void __fastcall PreDownload2(void);
// void __fastcall Cleanup(void);
} *ftpThread;
public: // User declarations
TFTPCon *ftpCon;
long currentByteCount;
long currentFileSize;
InstallSourceTab *ist;
string src;
string dest;
string suffix;
bool dirTransfer;
bool passive;
bool abort;
void __fastcall UpdateBytes();
__fastcall TStatusForm(TComponent* Owner);
__fastcall ~TStatusForm();
};
//---------------------------------------------------------------------------
extern PACKAGE TStatusForm *StatusForm;
//---------------------------------------------------------------------------
#endif
|