plptools
Loading...
Searching...
No Matches
rclip.h
Go to the documentation of this file.
1/*
2 * This file is part of plptools.
3 *
4 * Copyright (C) 1999-2001 Fritz Elfert <felfert@to.com>
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#ifndef _RCLIP_H_
21#define _RCLIP_H_
22
23#include "rfsv.h"
24#include "Enum.h"
25
26class TCPSocket;
27class bufferStore;
28class bufferArray;
29
43class rclip {
44public:
51
55 ~rclip();
56
61 void reset();
62
69 void reconnect();
70
78
89
101
113
125
135
136protected:
140 enum commands {
143 RCLIP_LISTEN = 0x04
144 };
145
151
156
170 bool sendCommand(enum commands cc);
172 const char *getConnectName();
173
174};
175
176#endif
Wrapper class featuring range-checking and string representation of enumerated values.
Definition: Enum.h:136
A class for dealing with sockets.
Definition: tcpsocket.h:38
An array of bufferStores.
Definition: bufferarray.h:31
A generic container for an array of bytes.
Definition: bufferstore.h:37
Remote ClipBoard services via PLP.
Definition: rclip.h:43
Enum< rfsv::errs > status
The current status of the connection.
Definition: rclip.h:155
Enum< rfsv::errs > getResponse(bufferStore &data)
Definition: rclip.cc:186
Enum< rfsv::errs > waitNotify()
Send listen request and wait for notification.
Definition: rclip.cc:143
bool sendCommand(enum commands cc)
Sends a command to the remote side.
Definition: rclip.cc:85
const char * getConnectName()
Definition: rclip.cc:76
void reconnect()
Attempts to re-establish a remote connection by first closing the socket, then connecting again to th...
Definition: rclip.cc:46
~rclip()
Destructor.
Definition: rclip.cc:37
Enum< rfsv::errs > sendListen()
Send listen request.
Definition: rclip.cc:116
commands
The possible commands.
Definition: rclip.h:140
@ RCLIP_LISTEN
Definition: rclip.h:143
@ RCLIP_INIT
Definition: rclip.h:141
@ RCLIP_NOTIFY
Definition: rclip.h:142
Enum< rfsv::errs > checkNotify()
Check for clipboard notification.
Definition: rclip.cc:124
Enum< rfsv::errs > getStatus()
Retrieves the current status of the connection.
Definition: rclip.cc:70
void reset()
Initializes a connection to the remote machine.
Definition: rclip.cc:54
TCPSocket * skt
The socket, used for communication with ncpd.
Definition: rclip.h:150
Enum< rfsv::errs > notify()
Send a notification to the Psion.
Definition: rclip.cc:156
Enum< rfsv::errs > initClipbd()
Send initialization frame.
Definition: rclip.cc:169