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
30
class
TCPSocket
;
31
36
class
RFSVFactory
final {
37
38
public
:
39
46
RFSVFactory
(
const
std::string &host,
int
port);
47
51
~RFSVFactory
();
52
61
RFSV
*
create
(
bool
,
Enum<ConnectionError>
*
error
=
nullptr
);
62
63
private
:
64
std::string
host_
;
65
int
port_
;
66
};
Enum
Wrapper class featuring range-checking and string representation of enumerated values.
Definition:
Enum.h:135
RFSVFactory
A factory for automatically instantiating the correct RFSV protocol variant depending on the connecte...
Definition:
rfsvfactory.h:36
RFSVFactory::host_
std::string host_
Definition:
rfsvfactory.h:64
RFSVFactory::port_
int port_
Definition:
rfsvfactory.h:65
RFSVFactory::create
RFSV * create(bool, Enum< ConnectionError > *error=nullptr)
Creates a new RFSV instance.
Definition:
rfsvfactory.cc:36
RFSVFactory::~RFSVFactory
~RFSVFactory()
Delete the RFSVFactory, cleaning up any resources.
Definition:
rfsvfactory.cc:34
RFSV
Access remote file services of a Psion.
Definition:
rfsv.h:79
TCPSocket
A class for dealing with sockets.
Definition:
tcpsocket.h:37
connectionerror.h
rfsv.h
error
static void error(int line)
Definition:
sismain.cpp:44
lib
rfsvfactory.h
Generated by
1.9.5