repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / codycam / SftpClient.h
blobd9b17ead80bef375ef0d0cbd72ab7ba62e113b30
1 #ifndef SFTP_CLIENT_H
2 #define SFTP_CLIENT_H
5 #include <stdio.h>
6 #include <string>
8 #include <Catalog.h>
9 #include <File.h>
10 #include <Locale.h>
12 #include "SpawningUploadClient.h"
15 #undef B_TRANSLATION_CONTEXT
16 #define B_TRANSLATION_CONTEXT "SftpClient"
19 using std::string;
22 class SftpClient : public SpawningUploadClient {
23 public:
24 SftpClient();
25 virtual ~SftpClient();
27 virtual bool Connect(const string& server,
28 const string& login,
29 const string& passwd);
31 bool PutFile(const string& local,
32 const string& remote,
33 ftp_mode mode = binary_mode);
35 bool GetFile(const string& remote,
36 const string& local,
37 ftp_mode mode = binary_mode);
39 bool MoveFile(const string& oldPath,
40 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);
48 private:
49 const char* _GetLongReadText() const;
50 const char* _GetReadText() const;
51 const char* _GetReplyText() const;
54 #endif // SFTP_CLIENT_H