xref: /haiku/src/apps/codycam/FileUploadClient.h (revision 1f52c921e27aa442370e1bd4adc021acf2b78b64)
1 /*
2  * Copyright 1998-1999 Be, Inc. All Rights Reserved.
3  * Copyright 2003-2019 Haiku, Inc. All rights reserved.
4  * Distributed under the terms of the MIT License.
5  */
6 #ifndef FILE_UPLOAD_CLIENT_H
7 #define FILE_UPLOAD_CLIENT_H
8 
9 
10 #include <stdio.h>
11 #include <string>
12 
13 using std::string;
14 
15 
16 class FileUploadClient {
17 public:
18 								FileUploadClient();
19 	virtual						~FileUploadClient();
20 
21 	enum ftp_mode {
22 		binary_mode,
23 		ascii_mode
24 	};
25 
26 	virtual bool				Connect(const string& server,
27 									const string& login,
28 									const string& passwd);
29 
30 	virtual bool				PutFile(const string& local,
31 									const string& remote,
32 									ftp_mode mode = binary_mode);
33 
34 	virtual bool				GetFile(const string& remote,
35 									const string& local,
36 									ftp_mode mode = binary_mode);
37 
38 	virtual bool				MoveFile(const string& oldPath,
39 									const string& newPath);
40 	virtual bool				ChangeDir(const string& dir);
41 	virtual bool				PrintWorkingDir(string& dir);
42 	virtual bool				ListDirContents(string& listing);
43 	virtual bool				Chmod(const string& path, const string& mod);
44 
45 	virtual void				SetPassive(bool on);
46 };
47 
48 #endif	// FILE_UPLOAD_CLIENT_H
49