FreeRDP-WebConnect WebSockets gateway  1.0.0.167
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
wsgate::RDP Class Reference

This class serves as a wrapper around the main FreeRDP API. More...

#include <RDP.hpp>

List of all members.

Public Types

enum  State {
  STATE_INITIAL,
  STATE_CONNECT,
  STATE_CONNECTED,
  STATE_CLOSED
}
 Our connection states.
typedef boost::tuple< time_t,
std::string > 
cursor
 Map for storing cursor images of this session.
typedef std::map< uint32_t,
cursor
CursorMap

Public Member Functions

 RDP (wspp::wshandler *h)
 Constructor.
virtual ~RDP ()
 Destructor.
void SetError (std::string msg)
 Sets the error message for the last error.
bool Connect (std::string host, std::string user, std::string domain, std::string pass, const WsRdpParams &params)
 Initiates the actual RDP session.
bool Disconnect ()
 Actively terminates a session.
bool CheckFileDescriptor ()
 Wraps the corresponding FreeRDP API call.
void OnWsMessage (const std::string &data)
 Handler for incoming WebSockets messages.
cursor GetCursor (uint32_t cid)
 Retrieves a custom cursor tuple by ID.

Detailed Description

This class serves as a wrapper around the main FreeRDP API.

Definition at line 37 of file RDP.hpp.


Constructor & Destructor Documentation

wsgate::RDP::RDP ( wspp::wshandler h)

Constructor.

Parameters:
hThe WebSockets handler to be used for communication with the client.

Member Function Documentation

bool wsgate::RDP::CheckFileDescriptor ( )

Wraps the corresponding FreeRDP API call.

Returns:
true on success.
bool wsgate::RDP::Connect ( std::string  host,
std::string  user,
std::string  domain,
std::string  pass,
const WsRdpParams params 
)

Initiates the actual RDP session.

Parameters:
hostThe RDP host to connect to.
userThe user name to be used for the RDP session.
domainThe domain name to be used for the RDP session.
passThe password to be used for the RDP session.
paramsAdditional parameters for the RDP session.
Returns:
true on success.
bool wsgate::RDP::Disconnect ( )

Actively terminates a session.

Returns:
true on success.
cursor wsgate::RDP::GetCursor ( uint32_t  cid)

Retrieves a custom cursor tuple by ID.

Parameters:
cidUnique cursor ID (valid for current session).
Returns:
A tuple, containing the creation time and PNG-encoded RGBA image or a tuple containing 0 and an empty String, if no cursor image is defined for the given Id.
void wsgate::RDP::OnWsMessage ( const std::string &  data)

Handler for incoming WebSockets messages.

Called from the WebSockets codec, whenever the client sent a message.

Parameters:
dataThe binary payload of the incoming message.
void wsgate::RDP::SetError ( std::string  msg)

Sets the error message for the last error.

Parameters:
msgThe message.

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