#include <CClient.h>
Inherits IClient.
Inheritance diagram for CClient:
accessors | |
bool | isConnected () const |
Test if connected. | |
bool | isConnecting () const |
Test if connecting. | |
CNetworkAddress | getServerAddress () const |
Get address of server. | |
CEvent::Type | getConnectedEvent () |
Get connected event type. | |
CEvent::Type | getConnectionFailedEvent () |
Get connection failed event type. | |
CEvent::Type | getDisconnectedEvent () |
Get disconnected event type. | |
Public Member Functions | |
CClient (const CString &name, const CNetworkAddress &address, ISocketFactory *socketFactory, IStreamFilterFactory *streamFilterFactory, CScreen *screen) | |
virtual void * | getEventTarget () const |
Get event target. | |
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. | |
virtual CString | getName () const |
Get client name. | |
manipulators | |
void | connect () |
Connect to server. | |
void | disconnect (const char *msg) |
Disconnect. | |
void | handshakeComplete () |
Notify of handshake complete. |
This class implements the top-level client algorithms for synergy.
Definition at line 34 of file CClient.h.
|
This client will attempt to connect to the server using Definition at line 41 of file CClient.cpp. References getEventTarget(). |
|
Connect to server. Starts an attempt to connect to the server. This is ignored if the client is trying to connect or is already connected. Definition at line 88 of file CClient.cpp. References IDataSocket::connect(), IStreamFilterFactory::create(), ISocketFactory::create(), CNetworkAddress::getAddress(), CNetworkAddress::getHostname(), CNetworkAddress::getPort(), and CNetworkAddress::resolve(). |
|
Disconnect. Disconnects from the server with an optional error message. Definition at line 143 of file CClient.cpp. References getDisconnectedEvent(). |
|
Enter screen.
Enter the screen. The cursor should be warped to Implements IClient. Definition at line 230 of file CClient.cpp. References CScreen::enter(), and CScreen::mouseMove(). |
|
Get clipboard.
Save the contents of the clipboard indicated by Implements IClient. Definition at line 212 of file CClient.cpp. References CScreen::getClipboard(). |
|
Get connected event type. Returns the connected event type. This is sent when the client has successfully connected to the server. Definition at line 185 of file CClient.cpp. References CEvent::registerTypeOnce(). Referenced by handshakeComplete(). |
|
Get connection failed event type. Returns the connection failed event type. This is sent when the server fails for some reason. The event data is a CFailInfo*. Definition at line 192 of file CClient.cpp. References CEvent::registerTypeOnce(). |
|
Get cursor position.
Return the current position of the cursor in Implements IClient. Definition at line 224 of file CClient.cpp. References CScreen::getCursorPos(). |
|
Get disconnected event type. Returns the disconnected event type. This is sent when the client has disconnected from the server (and only after having successfully connected). Definition at line 199 of file CClient.cpp. References CEvent::registerTypeOnce(). Referenced by disconnect(). |
|
Get event target. Returns the target used for events created by this object. Implements IClient. Definition at line 206 of file CClient.cpp. References CScreen::getEventTarget(). Referenced by CClient(). |
|
Get client name. Return the client's name. Implements IClient. Definition at line 344 of file CClient.cpp. |
|
Get address of server. Returns the address of the server the client is connected (or wants to connect) to. Definition at line 179 of file CClient.cpp. Referenced by CClientTaskBarReceiver::updateStatus(). |
|
Get screen shape.
Return the position of the upper-left corner of the screen in Implements IClient. Definition at line 218 of file CClient.cpp. References CScreen::getShape(). |
|
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 IClient. Definition at line 263 of file CClient.cpp. References CScreen::grabClipboard(). |
|
Notify of handshake complete. Notifies the client that the connection handshake has completed. Definition at line 159 of file CClient.cpp. References CScreen::enable(), and getConnectedEvent(). |
|
Test if connected. Returns true iff the client is successfully connected to the server. Definition at line 167 of file CClient.cpp. Referenced by CClientTaskBarReceiver::updateStatus(). |
|
Test if connecting. Returns true iff the client is currently attempting to connect to the server. Definition at line 173 of file CClient.cpp. Referenced by CClientTaskBarReceiver::updateStatus(). |
|
Notify of key press.
Synthesize key events to generate a press of key Implements IClient. Definition at line 277 of file CClient.cpp. References CScreen::keyDown(). |
|
Notify of key repeat.
Synthesize key events to generate a press and release of key Implements IClient. Definition at line 283 of file CClient.cpp. References CScreen::keyRepeat(). |
|
Notify of key release.
Synthesize key events to generate a release of key Implements IClient. Definition at line 290 of file CClient.cpp. References CScreen::keyUp(). |
|
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 IClient. Definition at line 238 of file CClient.cpp. References CScreen::leave(). |
|
Notify of mouse press.
Synthesize mouse events to generate a press of mouse button Implements IClient. Definition at line 296 of file CClient.cpp. References CScreen::mouseDown(). |
|
Notify of mouse motion.
Synthesize mouse events to generate mouse motion to the absolute screen position Implements IClient. Definition at line 308 of file CClient.cpp. References CScreen::mouseMove(). |
|
Notify of mouse motion.
Synthesize mouse events to generate mouse motion by the relative amount Implements IClient. Definition at line 314 of file CClient.cpp. References CScreen::mouseRelativeMove(). |
|
Notify of mouse release.
Synthesize mouse events to generate a release of mouse button Implements IClient. Definition at line 302 of file CClient.cpp. References CScreen::mouseUp(). |
|
Notify of mouse wheel motion.
Synthesize mouse events to generate mouse wheel motion of Implements IClient. Definition at line 320 of file CClient.cpp. References CScreen::mouseWheel(). |
|
Notify of options changes. Reset all options to their default values. Implements IClient. Definition at line 332 of file CClient.cpp. References CScreen::resetOptions(). |
|
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. Implements IClient. Definition at line 255 of file CClient.cpp. References CScreen::setClipboard(). |
|
Mark clipboard dirty. Mark the client's clipboard as dirty (out of date) or clean (up to date). Implements IClient. Definition at line 271 of file CClient.cpp. |
|
Notify of options changes.
Set options to given values. Ignore unknown options and don't modify our options that aren't given in Implements IClient. Definition at line 338 of file CClient.cpp. References CScreen::setOptions(). |