Proxy for client implementing protocol version 1.0. More...
#include <CClientProxy1_0.h>
Inherits CClientProxy.
Inherited by CClientProxy1_1.
Classes | |
struct | CClientClipboard |
Public Member Functions | |
CClientProxy1_0 (const CString &name, IStream *adoptedStream) | |
virtual bool | getClipboard (ClipboardID id, IClipboard *) const |
Get clipboard. | |
virtual void | getShape (SInt32 &x, SInt32 &y, SInt32 &width, SInt32 &height) const |
Get screen shape. | |
virtual void | getCursorPos (SInt32 &x, SInt32 &y) const |
Get cursor position. | |
virtual void | enter (SInt32 xAbs, SInt32 yAbs, UInt32 seqNum, KeyModifierMask mask, bool forScreensaver) |
Enter screen. | |
virtual bool | leave () |
Leave screen. | |
virtual void | setClipboard (ClipboardID, const IClipboard *) |
Set clipboard. | |
virtual void | grabClipboard (ClipboardID) |
Grab clipboard. | |
virtual void | setClipboardDirty (ClipboardID, bool) |
Mark clipboard dirty. | |
virtual void | keyDown (KeyID, KeyModifierMask, KeyButton) |
Notify of key press. | |
virtual void | keyRepeat (KeyID, KeyModifierMask, SInt32 count, KeyButton) |
Notify of key repeat. | |
virtual void | keyUp (KeyID, KeyModifierMask, KeyButton) |
Notify of key release. | |
virtual void | mouseDown (ButtonID) |
Notify of mouse press. | |
virtual void | mouseUp (ButtonID) |
Notify of mouse release. | |
virtual void | mouseMove (SInt32 xAbs, SInt32 yAbs) |
Notify of mouse motion. | |
virtual void | mouseRelativeMove (SInt32 xRel, SInt32 yRel) |
Notify of mouse motion. | |
virtual void | mouseWheel (SInt32 xDelta, SInt32 yDelta) |
Notify of mouse wheel motion. | |
virtual void | screensaver (bool activate) |
Notify of screen saver change. | |
virtual void | resetOptions () |
Notify of options changes. | |
virtual void | setOptions (const COptionsList &options) |
Notify of options changes. | |
Protected Member Functions | |
virtual bool | parseHandshakeMessage (const UInt8 *code) |
virtual bool | parseMessage (const UInt8 *code) |
virtual void | resetHeartbeatRate () |
virtual void | setHeartbeatRate (double rate, double alarm) |
virtual void | resetHeartbeatTimer () |
virtual void | addHeartbeatTimer () |
virtual void | removeHeartbeatTimer () |
Proxy for client implementing protocol version 1.0.
Definition at line 26 of file CClientProxy1_0.h.
void CClientProxy1_0::enter | ( | SInt32 | xAbs, | |
SInt32 | yAbs, | |||
UInt32 | seqNum, | |||
KeyModifierMask | mask, | |||
bool | forScreensaver | |||
) | [virtual] |
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 CClientProxy.
Definition at line 250 of file CClientProxy1_0.cpp.
References CBaseClientProxy::getName(), CClientProxy::getStream(), and CProtocolUtil::writef().
bool CClientProxy1_0::getClipboard | ( | ClipboardID | id, | |
IClipboard * | ||||
) | const [virtual] |
Get clipboard.
Save the contents of the clipboard indicated by id
and return true iff successful.
Implements CClientProxy.
Definition at line 226 of file CClientProxy1_0.cpp.
References IClipboard::copy().
void CClientProxy1_0::getCursorPos | ( | SInt32 & | x, | |
SInt32 & | y | |||
) | const [virtual] |
Get cursor position.
Return the current position of the cursor in x
and y
.
Implements CClientProxy.
Definition at line 242 of file CClientProxy1_0.cpp.
References CClientInfo::m_mx.
void CClientProxy1_0::getShape | ( | SInt32 & | x, | |
SInt32 & | y, | |||
SInt32 & | width, | |||
SInt32 & | height | |||
) | const [virtual] |
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 CClientProxy.
Definition at line 233 of file CClientProxy1_0.cpp.
References CClientInfo::m_w, and CClientInfo::m_x.
void CClientProxy1_0::grabClipboard | ( | ClipboardID | ) | [virtual] |
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 CClientProxy.
Definition at line 284 of file CClientProxy1_0.cpp.
References CBaseClientProxy::getName(), CClientProxy::getStream(), and CProtocolUtil::writef().
void CClientProxy1_0::keyDown | ( | KeyID | id, | |
KeyModifierMask | , | |||
KeyButton | ||||
) | [virtual] |
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 CClientProxy.
Reimplemented in CClientProxy1_1.
Definition at line 300 of file CClientProxy1_0.cpp.
References CBaseClientProxy::getName(), CClientProxy::getStream(), and CProtocolUtil::writef().
void CClientProxy1_0::keyRepeat | ( | KeyID | id, | |
KeyModifierMask | , | |||
SInt32 | count, | |||
KeyButton | ||||
) | [virtual] |
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 CClientProxy.
Reimplemented in CClientProxy1_1.
Definition at line 307 of file CClientProxy1_0.cpp.
References CBaseClientProxy::getName(), CClientProxy::getStream(), and CProtocolUtil::writef().
void CClientProxy1_0::keyUp | ( | KeyID | id, | |
KeyModifierMask | , | |||
KeyButton | ||||
) | [virtual] |
Notify of key release.
Synthesize key events to generate a release of key id
. If possible match the given modifier mask.
Implements CClientProxy.
Reimplemented in CClientProxy1_1.
Definition at line 315 of file CClientProxy1_0.cpp.
References CBaseClientProxy::getName(), CClientProxy::getStream(), and CProtocolUtil::writef().
bool CClientProxy1_0::leave | ( | ) | [virtual] |
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 CClientProxy.
Definition at line 259 of file CClientProxy1_0.cpp.
References CBaseClientProxy::getName(), CClientProxy::getStream(), and CProtocolUtil::writef().
void CClientProxy1_0::mouseDown | ( | ButtonID | id | ) | [virtual] |
Notify of mouse press.
Synthesize mouse events to generate a press of mouse button id
.
Implements CClientProxy.
Definition at line 322 of file CClientProxy1_0.cpp.
References CBaseClientProxy::getName(), CClientProxy::getStream(), and CProtocolUtil::writef().
void CClientProxy1_0::mouseMove | ( | SInt32 | xAbs, | |
SInt32 | yAbs | |||
) | [virtual] |
Notify of mouse motion.
Synthesize mouse events to generate mouse motion to the absolute screen position xAbs
,yAbs.
Implements CClientProxy.
Definition at line 336 of file CClientProxy1_0.cpp.
References CBaseClientProxy::getName(), CClientProxy::getStream(), and CProtocolUtil::writef().
void CClientProxy1_0::mouseRelativeMove | ( | SInt32 | xRel, | |
SInt32 | yRel | |||
) | [virtual] |
Notify of mouse motion.
Synthesize mouse events to generate mouse motion by the relative amount xRel
,yRel.
Implements CClientProxy.
Reimplemented in CClientProxy1_2.
Definition at line 343 of file CClientProxy1_0.cpp.
void CClientProxy1_0::mouseUp | ( | ButtonID | id | ) | [virtual] |
Notify of mouse release.
Synthesize mouse events to generate a release of mouse button id
.
Implements CClientProxy.
Definition at line 329 of file CClientProxy1_0.cpp.
References CBaseClientProxy::getName(), CClientProxy::getStream(), and CProtocolUtil::writef().
void CClientProxy1_0::mouseWheel | ( | SInt32 | xDelta, | |
SInt32 | yDelta | |||
) | [virtual] |
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 CClientProxy.
Reimplemented in CClientProxy1_3.
Definition at line 349 of file CClientProxy1_0.cpp.
References CBaseClientProxy::getName(), CClientProxy::getStream(), and CProtocolUtil::writef().
void CClientProxy1_0::resetOptions | ( | ) | [virtual] |
Notify of options changes.
Reset all options to their default values.
Implements CClientProxy.
Definition at line 364 of file CClientProxy1_0.cpp.
References CBaseClientProxy::getName(), CClientProxy::getStream(), and CProtocolUtil::writef().
void CClientProxy1_0::setClipboard | ( | ClipboardID | , | |
const IClipboard * | ||||
) | [virtual] |
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 CClientProxy.
Definition at line 269 of file CClientProxy1_0.cpp.
References IClipboard::copy(), CBaseClientProxy::getName(), CClientProxy::getStream(), and CProtocolUtil::writef().
void CClientProxy1_0::setClipboardDirty | ( | ClipboardID | , | |
bool | dirty | |||
) | [virtual] |
Mark clipboard dirty.
Mark the client's clipboard as dirty (out of date) or clean (up to date).
Implements CClientProxy.
Definition at line 294 of file CClientProxy1_0.cpp.
void CClientProxy1_0::setOptions | ( | const COptionsList & | options | ) | [virtual] |
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 CClientProxy.
Definition at line 376 of file CClientProxy1_0.cpp.
References CBaseClientProxy::getName(), CClientProxy::getStream(), and CProtocolUtil::writef().