Public Member Functions

CClientProxy Class Reference

Generic proxy for client. More...

#include <CClientProxy.h>

Inherits CBaseClientProxy.

Inherited by CClientProxy1_0.

List of all members.

Public Member Functions

 CClientProxy (const CString &name, synergy::IStream *adoptedStream)
virtual void * getEventTarget () const
 Get event target.
virtual bool getClipboard (ClipboardID id, IClipboard *) const =0
 Get clipboard.
virtual void getShape (SInt32 &x, SInt32 &y, SInt32 &width, SInt32 &height) const =0
 Get screen shape.
virtual void getCursorPos (SInt32 &x, SInt32 &y) const =0
 Get cursor position.
virtual void enter (SInt32 xAbs, SInt32 yAbs, UInt32 seqNum, KeyModifierMask mask, bool forScreensaver)=0
 Enter screen.
virtual bool leave ()=0
 Leave screen.
virtual void setClipboard (ClipboardID, const IClipboard *)=0
 Set clipboard.
virtual void grabClipboard (ClipboardID)=0
 Grab clipboard.
virtual void setClipboardDirty (ClipboardID, bool)=0
 Mark clipboard dirty.
virtual void keyDown (KeyID, KeyModifierMask, KeyButton)=0
 Notify of key press.
virtual void keyRepeat (KeyID, KeyModifierMask, SInt32 count, KeyButton)=0
 Notify of key repeat.
virtual void keyUp (KeyID, KeyModifierMask, KeyButton)=0
 Notify of key release.
virtual void mouseDown (ButtonID)=0
 Notify of mouse press.
virtual void mouseUp (ButtonID)=0
 Notify of mouse release.
virtual void mouseMove (SInt32 xAbs, SInt32 yAbs)=0
 Notify of mouse motion.
virtual void mouseRelativeMove (SInt32 xRel, SInt32 yRel)=0
 Notify of mouse motion.
virtual void mouseWheel (SInt32 xDelta, SInt32 yDelta)=0
 Notify of mouse wheel motion.
virtual void screensaver (bool activate)=0
 Notify of screen saver change.
virtual void resetOptions ()=0
 Notify of options changes.
virtual void setOptions (const COptionsList &options)=0
 Notify of options changes.
virtual void gameDeviceButtons (GameDeviceID id, GameDeviceButton buttons)=0
 Notify of game device buttons changed.
virtual void gameDeviceSticks (GameDeviceID id, SInt16 x1, SInt16 y1, SInt16 x2, SInt16 y2)=0
 Notify of game device sticks changed.
virtual void gameDeviceTriggers (GameDeviceID id, UInt8 t1, UInt8 t2)=0
 Notify of game device trigger changes.
virtual void gameDeviceTimingReq ()=0
 Notify of game device timing request.
virtual void cryptoIv (const UInt8 *iv)=0
manipulators

void close (const char *msg)
 Disconnect.

accessors



synergy::IStreamgetStream () const
 Get stream.
static CEvent::Type getReadyEvent ()
 Get ready event type.
static CEvent::Type getDisconnectedEvent ()
 Get disconnect event type.
static CEvent::Type getClipboardChangedEvent ()
 Get clipboard changed event type.
static CEvent::Type getGameDeviceTimingRespEvent ()
 Get game device timing receive event type.

Detailed Description

Generic proxy for client.

Definition at line 29 of file CClientProxy.h.


Constructor & Destructor Documentation

CClientProxy::CClientProxy ( const CString &  name,
synergy::IStream adoptedStream 
)

name is the name of the client.

Definition at line 34 of file CClientProxy.cpp.


Member Function Documentation

void CClientProxy::close ( const char *  msg  ) 

Disconnect.

Ask the client to disconnect, using msg as the reason.

Definition at line 46 of file CClientProxy.cpp.

References synergy::IStream::flush(), CBaseClientProxy::getName(), getStream(), and CProtocolUtil::writef().

virtual void CClientProxy::enter ( SInt32  xAbs,
SInt32  yAbs,
UInt32  seqNum,
KeyModifierMask  mask,
bool  forScreensaver 
) [pure 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 CBaseClientProxy.

Implemented in CClientProxy1_0.

virtual void CClientProxy::gameDeviceButtons ( GameDeviceID  id,
GameDeviceButton  buttons 
) [pure virtual]

Notify of game device buttons changed.

Synthesize game device button states.

Implements CBaseClientProxy.

Implemented in CClientProxy1_0, and CClientProxy1_4.

virtual void CClientProxy::gameDeviceSticks ( GameDeviceID  id,
SInt16  x1,
SInt16  y1,
SInt16  x2,
SInt16  y2 
) [pure virtual]

Notify of game device sticks changed.

Synthesize game device stick states.

Implements CBaseClientProxy.

Implemented in CClientProxy1_0, and CClientProxy1_4.

virtual void CClientProxy::gameDeviceTimingReq (  )  [pure virtual]

Notify of game device timing request.

Causes a game device timing response when state is next faked.

Implements CBaseClientProxy.

Implemented in CClientProxy1_0, and CClientProxy1_4.

virtual void CClientProxy::gameDeviceTriggers ( GameDeviceID  id,
UInt8  t1,
UInt8  t2 
) [pure virtual]

Notify of game device trigger changes.

Synthesize game device trigger states.

Implements CBaseClientProxy.

Implemented in CClientProxy1_0, and CClientProxy1_4.

virtual bool CClientProxy::getClipboard ( ClipboardID  id,
IClipboard  
) const [pure virtual]

Get clipboard.

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

Implements CBaseClientProxy.

Implemented in CClientProxy1_0.

CEvent::Type CClientProxy::getClipboardChangedEvent (  )  [static]

Get clipboard changed event type.

Returns the clipboard changed event type. This is sent whenever the contents of the clipboard has changed. The data is a pointer to a IScreen::CClipboardInfo.

Definition at line 76 of file CClientProxy.cpp.

virtual void CClientProxy::getCursorPos ( SInt32 &  x,
SInt32 &  y 
) const [pure virtual]

Get cursor position.

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

Implements CBaseClientProxy.

Implemented in CClientProxy1_0.

CEvent::Type CClientProxy::getDisconnectedEvent (  )  [static]

Get disconnect event type.

Returns the disconnect event type. This is sent when the client disconnects or is disconnected. The target is getEventTarget().

Definition at line 69 of file CClientProxy.cpp.

Referenced by CServer::adoptClient(), and CClientListener::getNextClient().

void * CClientProxy::getEventTarget (  )  const [virtual]

Get event target.

Returns the target used for events created by this object.

Implements CBaseClientProxy.

Definition at line 90 of file CClientProxy.cpp.

CEvent::Type CClientProxy::getGameDeviceTimingRespEvent (  )  [static]

Get game device timing receive event type.

Returns the game device timing receive event type. This is set whenever the server receives to a timing event response from a client.

Definition at line 83 of file CClientProxy.cpp.

CEvent::Type CClientProxy::getReadyEvent (  )  [static]

Get ready event type.

Returns the ready event type. This is sent when the client has completed the initial handshake. Until it is sent, the client is not fully connected.

Definition at line 62 of file CClientProxy.cpp.

virtual void CClientProxy::getShape ( SInt32 &  x,
SInt32 &  y,
SInt32 &  width,
SInt32 &  height 
) const [pure 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 CBaseClientProxy.

Implemented in CClientProxy1_0.

synergy::IStream * CClientProxy::getStream (  )  const
virtual void CClientProxy::grabClipboard ( ClipboardID   )  [pure 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 CBaseClientProxy.

Implemented in CClientProxy1_0.

virtual void CClientProxy::keyDown ( KeyID  id,
KeyModifierMask  ,
KeyButton   
) [pure 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 CBaseClientProxy.

Implemented in CClientProxy1_0, CClientProxy1_1, and CClientProxy1_4.

virtual void CClientProxy::keyRepeat ( KeyID  id,
KeyModifierMask  ,
SInt32  count,
KeyButton   
) [pure 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 CBaseClientProxy.

Implemented in CClientProxy1_0, CClientProxy1_1, and CClientProxy1_4.

virtual void CClientProxy::keyUp ( KeyID  id,
KeyModifierMask  ,
KeyButton   
) [pure virtual]

Notify of key release.

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

Implements CBaseClientProxy.

Implemented in CClientProxy1_0, CClientProxy1_1, and CClientProxy1_4.

virtual bool CClientProxy::leave (  )  [pure 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 CBaseClientProxy.

Implemented in CClientProxy1_0.

virtual void CClientProxy::mouseDown ( ButtonID  id  )  [pure virtual]

Notify of mouse press.

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

Implements CBaseClientProxy.

Implemented in CClientProxy1_0.

virtual void CClientProxy::mouseMove ( SInt32  xAbs,
SInt32  yAbs 
) [pure virtual]

Notify of mouse motion.

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

Implements CBaseClientProxy.

Implemented in CClientProxy1_0.

virtual void CClientProxy::mouseRelativeMove ( SInt32  xRel,
SInt32  yRel 
) [pure virtual]

Notify of mouse motion.

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

Implements CBaseClientProxy.

Implemented in CClientProxy1_0, and CClientProxy1_2.

virtual void CClientProxy::mouseUp ( ButtonID  id  )  [pure virtual]

Notify of mouse release.

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

Implements CBaseClientProxy.

Implemented in CClientProxy1_0.

virtual void CClientProxy::mouseWheel ( SInt32  xDelta,
SInt32  yDelta 
) [pure 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 CBaseClientProxy.

Implemented in CClientProxy1_0, and CClientProxy1_3.

virtual void CClientProxy::resetOptions (  )  [pure virtual]

Notify of options changes.

Reset all options to their default values.

Implements CBaseClientProxy.

Implemented in CClientProxy1_0.

virtual void CClientProxy::setClipboard ( ClipboardID  ,
const IClipboard  
) [pure 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 CBaseClientProxy.

Implemented in CClientProxy1_0.

virtual void CClientProxy::setClipboardDirty ( ClipboardID  ,
bool  dirty 
) [pure virtual]

Mark clipboard dirty.

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

Implements CBaseClientProxy.

Implemented in CClientProxy1_0.

virtual void CClientProxy::setOptions ( const COptionsList &  options  )  [pure 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 CBaseClientProxy.

Implemented in CClientProxy1_0.


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