-
Notifications
You must be signed in to change notification settings - Fork 2
/
RemoteMachine.h
76 lines (64 loc) · 1.8 KB
/
RemoteMachine.h
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
#ifndef __REMOTEMACHINE
#define __REMOTEMACHINE
// wxWindows includes
#include <wx/datetime.h>
#include <wx/string.h>
#include <wx/protocol/ftp.h>
#include "RestartingFTP.h"
// Statsgen Includes
#define MAX_CONNECTION_ATTEMPTS 1
class RemoteMachine
{
public:
RemoteMachine(wxString &IDIn);
virtual ~RemoteMachine();
bool MakeDir(wxString &baseDirectory,wxString &newDirectory);
bool PutFile(wxString &remoteDirectory,
wxString &localFilename);
bool PutFile(wxString &remoteDirectory,
wxString &localFilename,
int maxSeverity);
bool PutFile(wxString &remoteDirectory,
wxString &localFilename,
wxInputStream *localFileStream,
wxString &remoteFilename,
int maxSeverity);
bool GetRemoteFile(
wxString &remoteDirectory,
wxString &remoteFilename,
wxString &localDirectory);
bool GetRemoteFileRestart(
wxString &remoteDirectory,
wxString &remoteFilename,
wxString &localDirectory,
bool restartDownload,
long maxLogfileSize);
long GetRemoteFileSize(
wxString &remoteDirectory,
wxString &remoteFilename);
bool GetRemoteDirectoryListing(wxString &remoteDirectory,
wxString &remoteWildcard,
wxArrayString &remoteFiles);
bool DownloadFileList(wxString &remoteDirectory,
wxString &remoteWildcard,
wxString &localDirectory);
bool ChangeDirectory(wxString &fullPath);
bool Connect(RestartingFTP &ftpConnection);
void Disconnect();
void MaxErrorSeverity(int severity);
wxString GetLastErrorMessage();
public:
wxString ID;
wxString IPAddress;
wxString FTPUsername;
wxString FTPPassword;
int FTPPort;
bool FTPPassive;
int FTPRetries;
private:
// RestartingFTP ftpConnection;
RestartingFTP *staticFTPConnection;
int maxErrorSeverity;
wxString lastErrorMessage;
};
#endif