Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
ClientProxy1_0 Class Reference

Proxy for client implementing protocol version 1.0. More...

#include <ClientProxy1_0.h>

Inheritance diagram for ClientProxy1_0:
Collaboration diagram for ClientProxy1_0:

Classes

struct  ClientClipboard

Public Member Functions

 ClientProxy1_0 (const std::string &name, deskflow::IStream *adoptedStream, IEventQueue *events)
 ClientProxy1_0 (ClientProxy1_0 const &)=delete
 ClientProxy1_0 (ClientProxy1_0 &&)=delete
 ~ClientProxy1_0 () override
ClientProxy1_0operator= (ClientProxy1_0 const &)=delete
ClientProxy1_0operator= (ClientProxy1_0 &&)=delete
bool getClipboard (ClipboardID id, IClipboard *) const override
 Get clipboard.
void getShape (int32_t &x, int32_t &y, int32_t &width, int32_t &height) const override
 Get screen shape.
void getCursorPos (int32_t &x, int32_t &y) const override
 Get cursor position.
void enter (int32_t xAbs, int32_t yAbs, uint32_t seqNum, KeyModifierMask mask, bool forScreensaver) override
 Enter screen.
bool leave () override
 Leave screen.
void setClipboard (ClipboardID, const IClipboard *) override
 Set clipboard.
void grabClipboard (ClipboardID) override
 Grab clipboard.
void setClipboardDirty (ClipboardID, bool) override
 Mark clipboard dirty.
void keyDown (KeyID, KeyModifierMask, KeyButton, const std::string &) override
 Notify of key press.
void keyRepeat (KeyID, KeyModifierMask, int32_t count, KeyButton, const std::string &) override
 Notify of key repeat.
void keyUp (KeyID, KeyModifierMask, KeyButton) override
 Notify of key release.
void mouseDown (ButtonID) override
 Notify of mouse press.
void mouseUp (ButtonID) override
 Notify of mouse release.
void mouseMove (int32_t xAbs, int32_t yAbs) override
 Notify of mouse motion.
void mouseRelativeMove (int32_t xRel, int32_t yRel) override
 Notify of mouse motion.
void mouseWheel (int32_t xDelta, int32_t yDelta) override
 Notify of mouse wheel motion.
void screensaver (bool activate) override
 Notify of screen saver change.
void resetOptions () override
 Notify of options changes.
void setOptions (const OptionsList &options) override
 Notify of options changes.
void sendDragInfo (uint32_t fileCount, const char *info, size_t size) override
void fileChunkSending (uint8_t mark, char *data, size_t dataSize) override
std::string getSecureInputApp () const override
void secureInputNotification (const std::string &app) const override
Public Member Functions inherited from ClientProxy
 ClientProxy (const std::string &name, deskflow::IStream *adoptedStream)
 ClientProxy (ClientProxy const &)=delete
 ClientProxy (ClientProxy &&)=delete
 ~ClientProxy () override
ClientProxyoperator= (ClientProxy const &)=delete
ClientProxyoperator= (ClientProxy &&)=delete
void close (const char *msg) const
 Disconnect.
deskflow::IStreamgetStream () const override
 Get stream.
void * getEventTarget () const override
 Get event target.
Public Member Functions inherited from BaseClientProxy
 BaseClientProxy (const std::string &name)
 ~BaseClientProxy () override=default
void setJumpCursorPos (int32_t x, int32_t y)
 Save cursor position.
void getJumpCursorPos (int32_t &x, int32_t &y) const
 Get cursor position.
virtual bool isPrimary () const
 Get cursor position.
std::string getName () const override
 Get client name.
Public Member Functions inherited from IClient
Public Member Functions inherited from IScreen
Public Member Functions inherited from IInterface
virtual ~IInterface ()=default
 Interface destructor does nothing.

Protected Member Functions

virtual bool parseHandshakeMessage (const uint8_t *code)
virtual bool parseMessage (const uint8_t *code)
virtual void resetHeartbeatRate ()
virtual void setHeartbeatRate (double rate, double alarm)
virtual void resetHeartbeatTimer ()
virtual void addHeartbeatTimer ()
virtual void removeHeartbeatTimer ()
virtual bool recvClipboard ()

Protected Attributes

ClientClipboard m_clipboard [kClipboardEnd]

Detailed Description

Proxy for client implementing protocol version 1.0.

Constructor & Destructor Documentation

◆ ClientProxy1_0() [1/3]

ClientProxy1_0::ClientProxy1_0 ( const std::string & name,
deskflow::IStream * adoptedStream,
IEventQueue * events )

◆ ClientProxy1_0() [2/3]

ClientProxy1_0::ClientProxy1_0 ( ClientProxy1_0 const & )
delete

◆ ClientProxy1_0() [3/3]

ClientProxy1_0::ClientProxy1_0 ( ClientProxy1_0 && )
delete

◆ ~ClientProxy1_0()

ClientProxy1_0::~ClientProxy1_0 ( )
override

Member Function Documentation

◆ addHeartbeatTimer()

void ClientProxy1_0::addHeartbeatTimer ( )
protectedvirtual

Reimplemented in ClientProxy1_3.

◆ enter()

void ClientProxy1_0::enter ( int32_t xAbs,
int32_t yAbs,
uint32_t seqNum,
KeyModifierMask mask,
bool forScreensaver )
overridevirtual

Enter screen.

Enter the screen. The cursor should be warped to xAbs,yAbs. mask is the expected toggle button state and the client should update its state to match. forScreensaver is true iff the screen is being entered because the screen saver is starting. Subsequent clipboard events should report seqNum.

Implements ClientProxy.

◆ fileChunkSending()

void ClientProxy1_0::fileChunkSending ( uint8_t mark,
char * data,
size_t dataSize )
overridevirtual

Implements ClientProxy.

Reimplemented in ClientProxy1_5.

◆ getClipboard()

bool ClientProxy1_0::getClipboard ( ClipboardID id,
IClipboard *  ) const
overridevirtual

Get clipboard.

Save the contents of the clipboard indicated by id and return true iff successful.

Implements ClientProxy.

◆ getCursorPos()

void ClientProxy1_0::getCursorPos ( int32_t & x,
int32_t & y ) const
overridevirtual

Get cursor position.

Return the current position of the cursor in x and y.

Implements ClientProxy.

◆ getSecureInputApp()

std::string ClientProxy1_0::getSecureInputApp ( ) const
overridevirtual

Implements BaseClientProxy.

◆ getShape()

void ClientProxy1_0::getShape ( int32_t & x,
int32_t & y,
int32_t & width,
int32_t & height ) const
overridevirtual

Get screen shape.

Return the position of the upper-left corner of the screen in x and y and the size of the screen in width and height.

Implements ClientProxy.

◆ grabClipboard()

void ClientProxy1_0::grabClipboard ( ClipboardID )
overridevirtual

Grab clipboard.

Grab (i.e. take ownership of) the client's clipboard. Since this is called when another client takes ownership of the clipboard it implies that the client's clipboard is out of date.

Implements ClientProxy.

◆ keyDown()

void ClientProxy1_0::keyDown ( KeyID id,
KeyModifierMask ,
KeyButton ,
const std::string &  )
overridevirtual

Notify of key press.

Synthesize key events to generate a press of key id. If possible match the given modifier mask. The KeyButton identifies the physical key on the server that generated this key down. The client must ensure that a key up or key repeat that uses the same KeyButton will synthesize an up or repeat for the same client key synthesized by keyDown().

Implements ClientProxy.

Reimplemented in ClientProxy1_1, ClientProxy1_4, and ClientProxy1_8.

◆ keyRepeat()

void ClientProxy1_0::keyRepeat ( KeyID id,
KeyModifierMask ,
int32_t count,
KeyButton ,
const std::string & lang )
overridevirtual

Notify of key repeat.

Synthesize key events to generate a press and release of key id count times. If possible match the given modifier mask.

Implements ClientProxy.

Reimplemented in ClientProxy1_1, and ClientProxy1_4.

◆ keyUp()

void ClientProxy1_0::keyUp ( KeyID id,
KeyModifierMask ,
KeyButton  )
overridevirtual

Notify of key release.

Synthesize key events to generate a release of key id. If possible match the given modifier mask.

Implements ClientProxy.

Reimplemented in ClientProxy1_1, and ClientProxy1_4.

◆ leave()

bool ClientProxy1_0::leave ( )
overridevirtual

Leave screen.

Leave the screen. Return false iff the user may not leave the client's screen (because, for example, a button is down).

Implements ClientProxy.

◆ mouseDown()

void ClientProxy1_0::mouseDown ( ButtonID id)
overridevirtual

Notify of mouse press.

Synthesize mouse events to generate a press of mouse button id.

Implements ClientProxy.

◆ mouseMove()

void ClientProxy1_0::mouseMove ( int32_t xAbs,
int32_t yAbs )
overridevirtual

Notify of mouse motion.

Synthesize mouse events to generate mouse motion to the absolute screen position xAbs,yAbs.

Implements ClientProxy.

◆ mouseRelativeMove()

void ClientProxy1_0::mouseRelativeMove ( int32_t xRel,
int32_t yRel )
overridevirtual

Notify of mouse motion.

Synthesize mouse events to generate mouse motion by the relative amount xRel,yRel.

Implements ClientProxy.

Reimplemented in ClientProxy1_2.

◆ mouseUp()

void ClientProxy1_0::mouseUp ( ButtonID id)
overridevirtual

Notify of mouse release.

Synthesize mouse events to generate a release of mouse button id.

Implements ClientProxy.

◆ mouseWheel()

void ClientProxy1_0::mouseWheel ( int32_t xDelta,
int32_t yDelta )
overridevirtual

Notify of mouse wheel motion.

Synthesize mouse events to generate mouse wheel motion of xDelta and yDelta. Deltas are positive for motion away from the user or to the right and negative for motion towards the user or to the left. Each wheel click should generate a delta of +/-120.

Implements ClientProxy.

Reimplemented in ClientProxy1_3.

◆ operator=() [1/2]

ClientProxy1_0 & ClientProxy1_0::operator= ( ClientProxy1_0 && )
delete

◆ operator=() [2/2]

ClientProxy1_0 & ClientProxy1_0::operator= ( ClientProxy1_0 const & )
delete

◆ parseHandshakeMessage()

bool ClientProxy1_0::parseHandshakeMessage ( const uint8_t * code)
protectedvirtual

◆ parseMessage()

bool ClientProxy1_0::parseMessage ( const uint8_t * code)
protectedvirtual

Reimplemented in ClientProxy1_3, and ClientProxy1_5.

◆ recvClipboard()

bool ClientProxy1_0::recvClipboard ( )
protectedvirtual

Reimplemented in ClientProxy1_6.

◆ removeHeartbeatTimer()

void ClientProxy1_0::removeHeartbeatTimer ( )
protectedvirtual

Reimplemented in ClientProxy1_3.

◆ resetHeartbeatRate()

void ClientProxy1_0::resetHeartbeatRate ( )
protectedvirtual

Reimplemented in ClientProxy1_3.

◆ resetHeartbeatTimer()

void ClientProxy1_0::resetHeartbeatTimer ( )
protectedvirtual

Reimplemented in ClientProxy1_3.

◆ resetOptions()

void ClientProxy1_0::resetOptions ( )
overridevirtual

Notify of options changes.

Reset all options to their default values.

Implements ClientProxy.

◆ screensaver()

void ClientProxy1_0::screensaver ( bool activate)
overridevirtual

Notify of screen saver change.

Implements ClientProxy.

◆ secureInputNotification()

void ClientProxy1_0::secureInputNotification ( const std::string & app) const
overridevirtual

Implements ClientProxy.

Reimplemented in ClientProxy1_7.

◆ sendDragInfo()

void ClientProxy1_0::sendDragInfo ( uint32_t fileCount,
const char * info,
size_t size )
overridevirtual

Implements ClientProxy.

Reimplemented in ClientProxy1_5.

◆ setClipboard()

void ClientProxy1_0::setClipboard ( ClipboardID ,
const IClipboard *  )
overridevirtual

Set clipboard.

Update the client's clipboard. This implies that the client's clipboard is now up to date. If the client's clipboard was already known to be up to date then this may do nothing. data has marshalled clipboard data.

Implements ClientProxy.

Reimplemented in ClientProxy1_6.

◆ setClipboardDirty()

void ClientProxy1_0::setClipboardDirty ( ClipboardID ,
bool dirty )
overridevirtual

Mark clipboard dirty.

Mark the client's clipboard as dirty (out of date) or clean (up to date).

Implements ClientProxy.

◆ setHeartbeatRate()

void ClientProxy1_0::setHeartbeatRate ( double rate,
double alarm )
protectedvirtual

Reimplemented in ClientProxy1_3.

◆ setOptions()

void ClientProxy1_0::setOptions ( const OptionsList & options)
overridevirtual

Notify of options changes.

Set options to given values. Ignore unknown options and don't modify our options that aren't given in options.

Implements ClientProxy.

Member Data Documentation

◆ m_clipboard

ClientClipboard ClientProxy1_0::m_clipboard[kClipboardEnd]
protected

The documentation for this class was generated from the following files: