plptools
Loading...
Searching...
No Matches
rfsvfactory.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 Matt J. Gumbley <matt@gumbley.demon.co.uk>
6 * Copyright (C) 1999-2001 Fritz Elfert <felfert@to.com>
7 * Copyright (C) 2026 Jason Morley <hello@jbmorley.co.uk>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
21 *
22 */
23#pragma once
24
25#include <cstddef>
26
27#include "connectionerror.h"
28#include "rfsv.h"
29
30class TCPSocket;
31
36class RFSVFactory final {
37
38public:
39
46 RFSVFactory(const std::string &host, int port);
47
52
61 RFSV* create(bool, Enum<ConnectionError> *error = nullptr);
62
63private:
64 std::string host_;
65 int port_;
66};
Wrapper class featuring range-checking and string representation of enumerated values.
Definition: Enum.h:135
A factory for automatically instantiating the correct RFSV protocol variant depending on the connecte...
Definition: rfsvfactory.h:36
std::string host_
Definition: rfsvfactory.h:64
RFSV * create(bool, Enum< ConnectionError > *error=nullptr)
Creates a new RFSV instance.
Definition: rfsvfactory.cc:36
~RFSVFactory()
Delete the RFSVFactory, cleaning up any resources.
Definition: rfsvfactory.cc:34
Access remote file services of a Psion.
Definition: rfsv.h:79
A class for dealing with sockets.
Definition: tcpsocket.h:37
static void error(int line)
Definition: sismain.cpp:44