9 #include <NetworkKit.h>
10 #include "FileUploadClient.h"
16 * Definitions for the TELNET protocol. Snarfed from the BSD source.
26 class FtpClient
: public FileUploadClient
{
31 bool Connect(const string
& server
, const string
& login
,
32 const string
& passwd
);
34 bool PutFile(const string
& local
, const string
& remote
,
35 ftp_mode mode
= binary_mode
);
37 bool GetFile(const string
& remote
, const string
& local
,
38 ftp_mode mode
= binary_mode
);
40 bool MoveFile(const string
& oldPath
, const string
& newPath
);
41 bool ChangeDir(const string
& dir
);
42 bool PrintWorkingDir(string
& dir
);
43 bool ListDirContents(string
& listing
);
44 bool Chmod(const string
& path
, const string
& mod
);
46 void SetPassive(bool on
);
55 bool _TestState(unsigned long state
);
56 void _SetState(unsigned long state
);
57 void _ClearState(unsigned long state
);
59 bool _SendRequest(const string
& cmd
);
60 bool _GetReply(string
& outString
, int& outCode
, int& codeType
);
61 bool _GetReplyLine(string
& line
);
62 bool _OpenDataConnection();
63 bool _AcceptDataConnection();
66 BNetEndpoint
* fControl
;
71 #endif // FTP_CLIENT_H