|
plptools
|
Remote ClipBoard services via PLP. More...
#include <rclip.h>

Public Member Functions | |
| rclip (TCPSocket *skt) | |
| Constructs a new rclip object. More... | |
| ~rclip () | |
| Destructor. More... | |
| void | reset () |
| Initializes a connection to the remote machine. More... | |
| void | reconnect () |
| Attempts to re-establish a remote connection by first closing the socket, then connecting again to the ncpd daemon and finally calling reset. More... | |
| Enum< rfsv::errs > | getStatus () |
| Retrieves the current status of the connection. More... | |
| Enum< rfsv::errs > | initClipbd () |
| Send initialization frame. More... | |
| Enum< rfsv::errs > | sendListen () |
| Send listen request. More... | |
| Enum< rfsv::errs > | checkNotify () |
| Check for clipboard notification. More... | |
| Enum< rfsv::errs > | waitNotify () |
| Send listen request and wait for notification. More... | |
| Enum< rfsv::errs > | notify () |
| Send a notification to the Psion. More... | |
Protected Types | |
| enum | commands { RCLIP_INIT = 0x00 , RCLIP_NOTIFY = 0x08 , RCLIP_LISTEN = 0x04 } |
| The possible commands. More... | |
Protected Member Functions | |
| bool | sendCommand (enum commands cc) |
| Sends a command to the remote side. More... | |
| Enum< rfsv::errs > | getResponse (bufferStore &data) |
| const char * | getConnectName () |
Protected Attributes | |
| TCPSocket * | skt |
| The socket, used for communication with ncpd. More... | |
| Enum< rfsv::errs > | status |
| The current status of the connection. More... | |
Remote ClipBoard services via PLP.
This class implements access to the remote clipboard notification feature of the Psion. The Psion uses the file 'C:\System\Data\Clpboard.cbd' for storing the content of its clipboard. This file can be accessed like any other regular file on the Psion using the rfsv implementation. This class handles notification about changes of this file. There are two methods of notification implemented. Using waitNotify , a blocking method can be used and using sendListen followed by checkNotify , a polling approach (usable for GUI programs) can be implemented.
|
protected |
| rclip::rclip | ( | TCPSocket * | skt | ) |
| Enum< rfsv::errs > rclip::checkNotify | ( | ) |
Check for clipboard notification.
If the Psion has sent a notification, this method returns rfsv::E_PSI_GEN_NONE . If there is no notification pending, this method returns rfsv::E_PSI_FILE_EOF All other return values are to be treated as errors
|
protected |
| Enum< rfsv::errs > rclip::getStatus | ( | void | ) |
| Enum< rfsv::errs > rclip::initClipbd | ( | ) |
| Enum< rfsv::errs > rclip::notify | ( | ) |
| void rclip::reconnect | ( | void | ) |
| void rclip::reset | ( | void | ) |
|
protected |
Sends a command to the remote side.
If communication fails, a reconnect is triggered and a second attempt to transmit the request is attempted. If that second attempt fails, the function returns an error an sets rpcs::status to E_PSI_FILE_DISC.
| cc | The command to execute on the remote side. |
| Enum< rfsv::errs > rclip::sendListen | ( | ) |
Send listen request.
Calling this method arms the Psion's clipboard server. After that, every change of the Psion's clipboard file will be signaled. To poll the signal, subsequent calls to checkNotify should be made.
| Enum< rfsv::errs > rclip::waitNotify | ( | ) |
Send listen request and wait for notification.
This method is the blocking version of the two above methods. It first sends a listen request and then blocks until a notification has sent by the Psion or an error occured.
|
protected |
|
protected |