plptools
Loading...
Searching...
No Matches
ftp.h
Go to the documentation of this file.
1/*
2 * This file is part of plptools.
3 *
4 * Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com>
5 * Copyright (C) 1999-2001 Fritz Elfert <felfert@to.com>
6 * Copyright (C) 2025 Reuben Thomas <rrt@sc3d.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * along with this program; if not, see <https://www.gnu.org/licenses/>.
20 *
21 */
22#ifndef _ftp_h_
23#define _ftp_h_
24
25#include "config.h"
26
27#include <vector>
28
29#include "rfsv.h"
30#include "Enum.h"
31
32class rpcs;
33class bufferStore;
34class bufferArray;
35
36class ftp {
37 public:
38 ftp();
39 ~ftp();
40 int session(rfsv & a, rpcs & r, rclip & rc, TCPSocket & rclipSocket, std::vector<char *> argv);
41 bool canClip;
42
43 private:
44 std::vector<char *> getCommand();
45 void initReadline(void);
46 int putClipText(rpcs & r, rfsv & a, rclip & rc, TCPSocket & rclipSocket, const char *data);
47 int getClipData(rpcs & r, rfsv & a, rclip & rc, TCPSocket & rclipSocket, const char *file);
48 bool checkClipConnection(rfsv &a, rclip & rc, TCPSocket & rclipSocket);
49
50 // utilities
51 void resetUnixWd();
52 void usage();
53
54 char defDrive[9];
55 char *localDir;
56};
57
58#endif
A class for dealing with sockets.
Definition: tcpsocket.h:38
An array of bufferStores.
Definition: bufferarray.h:31
A generic container for an array of bytes.
Definition: bufferstore.h:37
Definition: ftp.h:36
bool canClip
Definition: ftp.h:41
std::vector< char * > getCommand()
Definition: ftp.cc:1479
void initReadline(void)
Definition: ftp.cc:1469
int putClipText(rpcs &r, rfsv &a, rclip &rc, TCPSocket &rclipSocket, const char *data)
Definition: ftp.cc:406
bool checkClipConnection(rfsv &a, rclip &rc, TCPSocket &rclipSocket)
Definition: ftp.cc:328
char * localDir
Definition: ftp.h:55
void resetUnixWd()
Definition: ftp.cc:89
char defDrive[9]
Definition: ftp.h:54
void usage()
Definition: ftp.cc:105
int getClipData(rpcs &r, rfsv &a, rclip &rc, TCPSocket &rclipSocket, const char *file)
Definition: ftp.cc:534
int session(rfsv &a, rpcs &r, rclip &rc, TCPSocket &rclipSocket, std::vector< char * > argv)
Definition: ftp.cc:640
~ftp()
Definition: ftp.cc:100
ftp()
Definition: ftp.cc:95
Remote ClipBoard services via PLP.
Definition: rclip.h:43
Access remote file services of a Psion.
Definition: rfsv.h:75
Remote procedure call services via PLP.
Definition: rpcs.h:51
static rpcs * r
Definition: main.cc:56
static rfsv * a
Definition: main.cc:53