plptools
Loading...
Searching...
No Matches
psion.h
Go to the documentation of this file.
1/*
2 * This file is part of plptools.
3 *
4 * Copyright (C) 2002 Daniel Brahneborg <basic@chello.se>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * along with this program; if not, see <https://www.gnu.org/licenses/>.
18 *
19 */
20#pragma once
21
22#include <Enum.h>
23#include "rfsv.h"
24
25class TCPSocket;
26class RFSVFactory;
27class RPCSFactory;
28class RPCS;
29
33class Psion {
34public:
35
36 virtual ~Psion();
37
38 virtual bool connect();
39
40 virtual Enum<RFSV::errs> copyFromPsion(const char * const from, int fd,
41 cpCallback_t func);
42
43 virtual Enum<RFSV::errs> copyToPsion(const char * const from,
44 const char * const to,
45 void *, cpCallback_t func);
46
47 virtual Enum<RFSV::errs> devinfo(const char drive, Drive& plpDrive);
48
49 virtual Enum<RFSV::errs> devlist(uint32_t& devbits);
50
51 virtual Enum<RFSV::errs> dir(const char* dir, PlpDir& files);
52
53 virtual bool dirExists(const char* name);
54
55 virtual void disconnect();
56
57 virtual Enum<RFSV::errs> mkdir(const char* dir);
58
59 virtual void remove(const char* name);
60
61private:
62
65
66};
A class representing information about a Disk drive on the psion.
Definition: drive.h:51
Wrapper class featuring range-checking and string representation of enumerated values.
Definition: Enum.h:135
Semi smart proxy for communicating with a Psion.
Definition: psion.h:33
virtual Enum< RFSV::errs > copyToPsion(const char *const from, const char *const to, void *, cpCallback_t func)
Definition: psion.cpp:61
virtual Enum< RFSV::errs > dir(const char *dir, PlpDir &files)
Definition: psion.cpp:75
virtual Enum< RFSV::errs > copyFromPsion(const char *const from, int fd, cpCallback_t func)
Definition: psion.cpp:57
virtual Enum< RFSV::errs > devlist(uint32_t &devbits)
Definition: psion.cpp:69
virtual Enum< RFSV::errs > devinfo(const char drive, Drive &plpDrive)
Definition: psion.cpp:65
RFSV * rfsv_
Definition: psion.h:64
virtual void disconnect()
Definition: psion.cpp:91
virtual bool dirExists(const char *name)
Definition: psion.cpp:79
virtual void remove(const char *name)
Definition: psion.cpp:106
virtual ~Psion()
Definition: psion.cpp:40
RPCS * rpcs_
Definition: psion.h:63
virtual Enum< RFSV::errs > mkdir(const char *dir)
Definition: psion.cpp:102
virtual bool connect()
Definition: psion.cpp:44
A factory for automatically instantiating the correct RFSV protocol variant depending on the connecte...
Definition: rfsvfactory.h:36
Access remote file services of a Psion.
Definition: rfsv.h:79
A factory for automatically instantiating the correct protocol variant depending on the connected Psi...
Definition: rpcsfactory.h:33
Remote procedure call services via PLP.
Definition: rpcs.h:52
A class for dealing with sockets.
Definition: tcpsocket.h:37
int(* cpCallback_t)(void *, uint32_t)
Defines the callback procedure for progress indication of copy operations.
Definition: rfsv.h:45
std::deque< class PlpDirent > PlpDir
Definition: rfsv.h:34