#include <CServer.h>
Collaboration diagram for CServer:
accessors | |
UInt32 | getNumClients () const |
Get number of connected clients. | |
void | getClients (std::vector< CString > &list) const |
Get the list of connected clients. | |
CEvent::Type | getErrorEvent () |
Get error event type. | |
CEvent::Type | getConnectedEvent () |
Get connected event type. | |
CEvent::Type | getDisconnectedEvent () |
Get disconnected event type. | |
CEvent::Type | getSwitchToScreenEvent () |
Get switch to screen event type. | |
CEvent::Type | getSwitchInDirectionEvent () |
Get switch in direction event type. | |
CEvent::Type | getKeyboardBroadcastEvent () |
Get keyboard broadcast event type. | |
CEvent::Type | getLockCursorToScreenEvent () |
Get lock cursor event type. | |
Public Member Functions | |
CServer (const CConfig &config, CPrimaryClient *primaryClient) | |
manipulators | |
bool | setConfig (const CConfig &) |
Set configuration. | |
void | adoptClient (CBaseClientProxy *client) |
Add a client. | |
void | disconnect () |
Disconnect clients. |
This class implements the top-level server algorithms for synergy.
Definition at line 38 of file CServer.h.
|
Start the server with the configuration Definition at line 46 of file CServer.cpp. References CPrimaryClient::enable(), CPrimaryClient::getEventTarget(), getKeyboardBroadcastEvent(), getLockCursorToScreenEvent(), CBaseClientProxy::getName(), getSwitchInDirectionEvent(), getSwitchToScreenEvent(), CConfig::isScreen(), and setConfig(). |
|
Add a client.
Adds Definition at line 261 of file CServer.cpp. References getConnectedEvent(), CPrimaryClient::getEventTarget(), CBaseClientProxy::getName(), CConfig::isScreen(), and CBaseClientProxy::screensaver(). |
|
Disconnect clients. Disconnect clients. This tells them to disconnect but does not wait for them to actually do so. The server sends the disconnected event when they're all disconnected (or immediately if none are connected). The caller can also just destroy this object to force the disconnection. Definition at line 302 of file CServer.cpp. References getDisconnectedEvent(). |
|
Get the list of connected clients.
Set the Definition at line 321 of file CServer.cpp. Referenced by CServerTaskBarReceiver::updateStatus(). |
|
Get connected event type.
Returns the connected event type. This is sent when a client screen has connected. The event data is a Definition at line 338 of file CServer.cpp. References CEvent::registerTypeOnce(). Referenced by adoptClient(). |
|
Get disconnected event type. Returns the disconnected event type. This is sent when all the clients have disconnected. Definition at line 345 of file CServer.cpp. References CEvent::registerTypeOnce(). Referenced by disconnect(). |
|
Get error event type. Returns the error event type. This is sent when the server fails for some reason. Definition at line 331 of file CServer.cpp. References CEvent::registerTypeOnce(). |
|
Get keyboard broadcast event type.
Returns the keyboard broadcast event type. The server responds to this by turning on keyboard broadcasting or turning it off. The event data is a Definition at line 366 of file CServer.cpp. References CEvent::registerTypeOnce(). Referenced by CServer(). |
|
Get lock cursor event type.
Returns the lock cursor event type. The server responds to this by locking the cursor to the active screen or unlocking it. The event data is a Definition at line 373 of file CServer.cpp. References CEvent::registerTypeOnce(). Referenced by CServer(). |
|
Get number of connected clients. Returns the number of connected clients, including the server itself. Definition at line 315 of file CServer.cpp. |
|
Get switch in direction event type.
Returns the switch in direction event type. The server responds to this by switching screens. The event data is a Definition at line 359 of file CServer.cpp. References CEvent::registerTypeOnce(). Referenced by CServer(). |
|
Get switch to screen event type.
Returns the switch to screen event type. The server responds to this by switching screens. The event data is a Definition at line 352 of file CServer.cpp. References CEvent::registerTypeOnce(). Referenced by CServer(). |
|
Set configuration. Change the server's configuration. Returns true iff the new configuration was accepted (it must include the server's name). This will disconnect any clients no longer in the configuration. Definition at line 217 of file CServer.cpp. References CBaseClientProxy::getName(), CConfig::hasLockToScreenAction(), CConfig::isScreen(), and CPrimaryClient::reconfigure(). Referenced by CServer(). |