FreeRDP
connection.h
1 
20 #ifndef FREERDP_LIB_CORE_CONNECTION_H
21 #define FREERDP_LIB_CORE_CONNECTION_H
22 
23 #include "rdp.h"
24 #include "tpkt.h"
25 #include "tpdu.h"
26 #include "nego.h"
27 #include "mcs.h"
28 #include "activation.h"
29 #include "state.h"
30 
31 #include <freerdp/settings.h>
32 #include <freerdp/api.h>
33 
34 enum CLIENT_CONNECTION_STATE
35 {
36  CLIENT_STATE_INITIAL,
37  CLIENT_STATE_PRECONNECT_PASSED,
38  CLIENT_STATE_POSTCONNECT_PASSED
39 };
40 
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);
46 
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);
50 
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);
56 
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);
60 
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);
71 
72 FREERDP_LOCAL const char* rdp_client_connection_state_string(int state);
73 
74 FREERDP_LOCAL BOOL rdp_channels_from_mcs(rdpSettings* settings, const rdpRdp* rdp);
75 
76 FREERDP_LOCAL BOOL rdp_handle_message_channel(rdpRdp* rdp, wStream* s, UINT16 channelId,
77  UINT16 length);
78 FREERDP_LOCAL BOOL rdp_handle_optional_rdp_decryption(rdpRdp* rdp, wStream* s, UINT16* length,
79  UINT16* pSecurityFlags);
80 
81 #endif /* FREERDP_LIB_CORE_CONNECTION_H */