Deskflow 1.22.0.197
Keyboard and mouse sharing utility
|
Deskflow server. More...
#include <Server.h>
Classes | |
class | KeyboardBroadcastInfo |
Keyboard broadcast data. More... | |
class | LockCursorToScreenInfo |
Lock cursor to screen data. More... | |
class | ScreenConnectedInfo |
Screen connected data. More... | |
class | SwitchInDirectionInfo |
Switch in direction data. More... | |
class | SwitchToScreenInfo |
Switch to screen data. More... |
Public Member Functions | |
Server (ServerConfig &config, PrimaryClient *primaryClient, deskflow::Screen *screen, IEventQueue *events, deskflow::ServerArgs const &args) | |
Server (Server const &)=delete | |
Server (Server &&)=delete | |
~Server () override | |
Server & | operator= (Server const &)=delete |
Server & | operator= (Server &&)=delete |
manipulators | |
bool | setConfig (const ServerConfig &) |
Set configuration. | |
void | adoptClient (BaseClientProxy *client) |
Add a client. | |
void | disconnect () |
Disconnect clients. | |
void | setListener (ClientListener *p) |
Store ClientListener pointer. |
accessors | |
std::string | protocolString () const |
Get the network protocol. | |
uint32_t | getNumClients () const |
Get number of connected clients. | |
void | getClients (std::vector< std::string > &list) const |
Get the list of connected clients. |
Deskflow server.
This class implements the top-level server algorithms for deskflow.
Server::Server | ( | ServerConfig & | config, |
PrimaryClient * | primaryClient, | ||
deskflow::Screen * | screen, | ||
IEventQueue * | events, | ||
deskflow::ServerArgs const & | args ) |
Start the server with the configuration config
and the primary client (local screen) primaryClient
. The client retains ownership of primaryClient
.
|
delete |
|
delete |
|
override |
void Server::adoptClient | ( | BaseClientProxy * | client | ) |
Add a client.
Adds client
to the server. The client is adopted and will be destroyed when the client disconnects or is disconnected.
void Server::disconnect | ( | ) |
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.
void Server::getClients | ( | std::vector< std::string > & | list | ) | const |
Get the list of connected clients.
Set the list
to the names of the currently connected clients.
uint32_t Server::getNumClients | ( | ) | const |
Get number of connected clients.
Returns the number of connected clients, including the server itself.
std::string Server::protocolString | ( | ) | const |
Get the network protocol.
Returns the network protocol used by the server.
bool Server::setConfig | ( | const ServerConfig & | config | ) |
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.
|
inline |
Store ClientListener pointer.