BTRFS: Implement BTree::Path and change _Find.
[haiku.git] / src / apps / codycam / SpawningUploadClient.h
blobb2e1c6078566bf13b327224ea335b61e027edc33
1 #ifndef SPAWNING_UPLOAD_CLIENT_H
2 #define SPAWNING_UPLOAD_CLIENT_H
4 #include "FileUploadClient.h"
6 #include <OS.h>
7 #include <stdio.h>
8 #include <string>
11 class SpawningUploadClient : public FileUploadClient {
12 public:
13 SpawningUploadClient();
14 virtual ~SpawningUploadClient();
16 virtual bool Connect(const string& server, const string& login,
17 const string& passwd);
19 virtual bool PutFile(const string& local, const string& remote,
20 ftp_mode mode = binary_mode);
22 virtual bool GetFile(const string& remote, const string& local,
23 ftp_mode mode = binary_mode);
25 virtual bool MoveFile(const string& oldPath, const string& newPath);
26 virtual bool ChangeDir(const string& dir);
27 virtual bool PrintWorkingDir(string& dir);
28 virtual bool ListDirContents(string& listing);
29 virtual bool Chmod(const string& path, const string& mod);
31 virtual void SetPassive(bool on);
33 protected:
34 status_t SetCommandLine(const char *command);
35 ssize_t SendCommand(const char *cmd);
36 ssize_t ReadReply(BString *to);
37 virtual status_t ParseReply();
38 int getpty(char *pty, char *tty);
40 int InputPipe() const { return fPty; };
41 int OutputPipe() const { return fPty; };
43 private:
44 bool SpawnCommand();
45 string fCommand;
46 pid_t fCommandPid;
47 int fPty;
50 #endif // SPAWNING_UPLOAD_CLIENT_H