20 #ifndef FREERDP_LIB_CORE_CONNECTION_H
21 #define FREERDP_LIB_CORE_CONNECTION_H
28 #include "activation.h"
31 #include <freerdp/settings.h>
32 #include <freerdp/api.h>
34 enum CLIENT_CONNECTION_STATE
37 CLIENT_STATE_PRECONNECT_PASSED,
38 CLIENT_STATE_POSTCONNECT_PASSED
41 FREERDP_LOCAL BOOL rdp_client_connect(rdpRdp* rdp);
42 FREERDP_LOCAL BOOL rdp_client_disconnect(rdpRdp* rdp);
43 FREERDP_LOCAL BOOL rdp_client_disconnect_and_clear(rdpRdp* rdp);
44 FREERDP_LOCAL BOOL rdp_client_reconnect(rdpRdp* rdp);
45 FREERDP_LOCAL BOOL rdp_client_redirect(rdpRdp* rdp);
47 FREERDP_LOCAL BOOL rdp_client_skip_mcs_channel_join(rdpRdp* rdp);
48 FREERDP_LOCAL BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp,
wStream* s);
49 FREERDP_LOCAL BOOL rdp_client_connect_auto_detect(rdpRdp* rdp,
wStream* s);
51 FREERDP_LOCAL state_run_t rdp_client_connect_license(rdpRdp* rdp,
wStream* s);
52 FREERDP_LOCAL state_run_t rdp_client_connect_demand_active(rdpRdp* rdp,
wStream* s);
53 FREERDP_LOCAL state_run_t rdp_client_connect_confirm_active(rdpRdp* rdp,
wStream* s);
54 FREERDP_LOCAL state_run_t rdp_client_connect_finalize(rdpRdp* rdp);
55 FREERDP_LOCAL BOOL rdp_client_transition_to_state(rdpRdp* rdp, CONNECTION_STATE state);
57 FREERDP_LOCAL CONNECTION_STATE rdp_get_state(
const rdpRdp* rdp);
58 FREERDP_LOCAL
const char* rdp_state_string(CONNECTION_STATE state);
59 FREERDP_LOCAL BOOL rdp_is_active_state(
const rdpRdp* rdp);
61 FREERDP_LOCAL BOOL rdp_server_accept_nego(rdpRdp* rdp,
wStream* s);
62 FREERDP_LOCAL BOOL rdp_server_accept_mcs_connect_initial(rdpRdp* rdp,
wStream* s);
63 FREERDP_LOCAL BOOL rdp_server_accept_mcs_erect_domain_request(rdpRdp* rdp,
wStream* s);
64 FREERDP_LOCAL BOOL rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp,
wStream* s);
65 FREERDP_LOCAL BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp,
wStream* s);
66 FREERDP_LOCAL BOOL rdp_server_accept_confirm_active(rdpRdp* rdp,
wStream* s, UINT16 pduLength);
67 FREERDP_LOCAL BOOL rdp_server_establish_keys(rdpRdp* rdp,
wStream* s);
68 FREERDP_LOCAL BOOL rdp_server_reactivate(rdpRdp* rdp);
69 FREERDP_LOCAL BOOL rdp_server_transition_to_state(rdpRdp* rdp, CONNECTION_STATE state);
70 FREERDP_LOCAL
const char* rdp_get_state_string(
const rdpRdp* rdp);
72 FREERDP_LOCAL
const char* rdp_client_connection_state_string(
int state);
74 FREERDP_LOCAL BOOL rdp_channels_from_mcs(rdpSettings* settings,
const rdpRdp* rdp);
76 FREERDP_LOCAL BOOL rdp_handle_message_channel(rdpRdp* rdp,
wStream* s, UINT16 channelId,
78 FREERDP_LOCAL BOOL rdp_handle_optional_rdp_decryption(rdpRdp* rdp,
wStream* s, UINT16* length,
79 UINT16* pSecurityFlags);