|
FreeRDP-WebConnect WebSockets gateway
1.0.0.167
|
This class serves as a wrapper around the main FreeRDP API. More...
#include <RDP.hpp>
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 ¶ms) |
| 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. | |
| wsgate::RDP::RDP | ( | wspp::wshandler * | h | ) |
Constructor.
| h | The WebSockets handler to be used for communication with the client. |
| bool wsgate::RDP::CheckFileDescriptor | ( | ) |
Wraps the corresponding FreeRDP API call.
| bool wsgate::RDP::Connect | ( | std::string | host, |
| std::string | user, | ||
| std::string | domain, | ||
| std::string | pass, | ||
| const WsRdpParams & | params | ||
| ) |
Initiates the actual RDP session.
| host | The RDP host to connect to. |
| user | The user name to be used for the RDP session. |
| domain | The domain name to be used for the RDP session. |
| pass | The password to be used for the RDP session. |
| params | Additional parameters for the RDP session. |
| bool wsgate::RDP::Disconnect | ( | ) |
Actively terminates a session.
| cursor wsgate::RDP::GetCursor | ( | uint32_t | cid | ) |
Retrieves a custom cursor tuple by ID.
| cid | Unique cursor ID (valid for current session). |
| void wsgate::RDP::OnWsMessage | ( | const std::string & | data | ) |
Handler for incoming WebSockets messages.
Called from the WebSockets codec, whenever the client sent a message.
| data | The binary payload of the incoming message. |
| void wsgate::RDP::SetError | ( | std::string | msg | ) |
Sets the error message for the last error.
| msg | The message. |