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#pragma once
23
24#include "config.h"
25
26#include <memory>
27#include <vector>
28
29#include "rfsv.h"
30#include "Enum.h"
31
32class RPCS;
33class BufferStore;
34class BufferArray;
35
36class FTP {
37public:
38 FTP();
39 ~FTP();
40 int session(RFSV &rfsv, RPCS &rpcs, rclip &clipboard, std::vector<char *> argv);
41
42private:
43 std::vector<char *> getCommand();
44 void initReadline(void);
45 int putClipText(RFSV &a, rclip &rc, const char *data);
46 int getClipData(RFSV &a, rclip &rc, const char *file);
47 bool checkClipConnection(RFSV &a, rclip &rc);
48
49 // utilities
50 void resetUnixWd();
51 void usage();
52
53 char defDrive[9];
54 char *localDir;
55};
An array of BufferStores.
Definition: bufferarray.h:30
A generic container for an array of bytes.
Definition: bufferstore.h:36
Definition: ftp.h:36
std::vector< char * > getCommand()
Definition: ftp.cc:1383
~FTP()
Definition: ftp.cc:100
int session(RFSV &rfsv, RPCS &rpcs, rclip &clipboard, std::vector< char * > argv)
Definition: ftp.cc:538
int putClipText(RFSV &a, rclip &rc, const char *data)
Definition: ftp.cc:383
void initReadline(void)
Definition: ftp.cc:1375
FTP()
Definition: ftp.cc:96
void resetUnixWd()
Definition: ftp.cc:91
bool checkClipConnection(RFSV &a, rclip &rc)
Definition: ftp.cc:313
int getClipData(RFSV &a, rclip &rc, const char *file)
Definition: ftp.cc:433
void usage()
Definition: ftp.cc:104
char * localDir
Definition: ftp.h:54
char defDrive[9]
Definition: ftp.h:53
Access remote file services of a Psion.
Definition: rfsv.h:79
Remote procedure call services via PLP.
Definition: rpcs.h:52
Remote ClipBoard services via PLP.
Definition: rclip.h:44
static RFSV * a
Definition: main.cc:55