plptools
Loading...
Searching...
No Matches
deviceendpoint.h
Go to the documentation of this file.
1
/*
2
* This file is part of plptools.
3
*
4
* Copyright (c) 2026 Jason Morley <hello@jbmorley.co.uk>
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 "config.h"
23
24
#include <memory>
25
#include <string>
26
27
#include "
connectionerror.h
"
28
#include "
Enum.h
"
29
#include "
device.h
"
30
31
class
rclip
;
32
class
RFSV
;
33
class
RPCS
;
34
35
class
DeviceEndpoint
{
36
public
:
37
38
static
std::unique_ptr<DeviceEndpoint>
connect
(
const
std::string host,
int
port,
Enum<ConnectionError>
*
error
);
39
49
std::string
id
()
const
;
50
51
bool
hasPersistentId
()
const
;
52
62
Enum<RFSV::errs>
getName
(std::string &name)
const
;
63
71
Enum<RFSV::errs>
setName
(
const
std::string &name);
72
73
const
std::unique_ptr<RFSV>
rfsv_
;
74
const
std::unique_ptr<RPCS>
rpcs_
;
75
const
std::unique_ptr<rclip>
clip_
;
76
77
private
:
78
79
DeviceEndpoint
(
const
std::string &
id
,
80
bool
hasPersistentConfiguration,
81
std::unique_ptr<RFSV> rfsv,
82
std::unique_ptr<RPCS> rpcs,
83
std::unique_ptr<rclip> clip);
84
85
const
std::string
id_
;
86
bool
hasPersistentConfiguration_
;
87
};
Enum.h
DeviceEndpoint
Definition:
deviceendpoint.h:35
DeviceEndpoint::rfsv_
const std::unique_ptr< RFSV > rfsv_
Definition:
deviceendpoint.h:73
DeviceEndpoint::rpcs_
const std::unique_ptr< RPCS > rpcs_
Definition:
deviceendpoint.h:74
DeviceEndpoint::hasPersistentConfiguration_
bool hasPersistentConfiguration_
Definition:
deviceendpoint.h:86
DeviceEndpoint::id
std::string id() const
Device identifier.
Definition:
deviceendpoint.cc:83
DeviceEndpoint::id_
const std::string id_
Definition:
deviceendpoint.h:85
DeviceEndpoint::hasPersistentId
bool hasPersistentId() const
Definition:
deviceendpoint.cc:87
DeviceEndpoint::setName
Enum< RFSV::errs > setName(const std::string &name)
Set the device name.
Definition:
deviceendpoint.cc:117
DeviceEndpoint::connect
static std::unique_ptr< DeviceEndpoint > connect(const std::string host, int port, Enum< ConnectionError > *error)
Definition:
deviceendpoint.cc:34
DeviceEndpoint::clip_
const std::unique_ptr< rclip > clip_
Definition:
deviceendpoint.h:75
DeviceEndpoint::getName
Enum< RFSV::errs > getName(std::string &name) const
Get the device name.
Definition:
deviceendpoint.cc:91
Enum
Wrapper class featuring range-checking and string representation of enumerated values.
Definition:
Enum.h:135
RFSV
Access remote file services of a Psion.
Definition:
rfsv.h:79
RPCS
Remote procedure call services via PLP.
Definition:
rpcs.h:52
rclip
Remote ClipBoard services via PLP.
Definition:
rclip.h:44
connectionerror.h
device.h
error
static void error(int line)
Definition:
sismain.cpp:44
lib
deviceendpoint.h
Generated by
1.9.5