FreeRDP
utils.h
1 
21 #ifndef FREERDP_LIB_CORE_UTILS_H
22 #define FREERDP_LIB_CORE_UTILS_H
23 
24 #include <winpr/winpr.h>
25 #include <freerdp/freerdp.h>
26 
27 /* HTTP tunnel redir flags. */
28 #define HTTP_TUNNEL_REDIR_ENABLE_ALL 0x80000000
29 #define HTTP_TUNNEL_REDIR_DISABLE_ALL 0x40000000
30 #define HTTP_TUNNEL_REDIR_DISABLE_DRIVE 0x1
31 #define HTTP_TUNNEL_REDIR_DISABLE_PRINTER 0x2
32 #define HTTP_TUNNEL_REDIR_DISABLE_PORT 0x4
33 #define HTTP_TUNNEL_REDIR_DISABLE_CLIPBOARD 0x8
34 #define HTTP_TUNNEL_REDIR_DISABLE_PNP 0x10
35 
36 typedef enum
37 {
38  AUTH_SUCCESS,
39  AUTH_SKIP,
40  AUTH_NO_CREDENTIALS,
41  AUTH_CANCELLED,
42  AUTH_FAILED
43 } auth_status;
44 
45 auth_status utils_authenticate_gateway(freerdp* instance, rdp_auth_reason reason);
46 auth_status utils_authenticate(freerdp* instance, rdp_auth_reason reason, BOOL override);
47 
48 HANDLE utils_get_abort_event(rdpRdp* rdp);
49 BOOL utils_abort_event_is_set(const rdpRdp* rdp);
50 BOOL utils_reset_abort(rdpRdp* rdp);
51 BOOL utils_abort_connect(rdpRdp* rdp);
52 BOOL utils_sync_credentials(rdpSettings* settings, BOOL toGateway);
53 
54 BOOL utils_str_is_empty(const char* str);
55 BOOL utils_str_copy(const char* value, char** dst);
56 
57 const char* utils_is_vsock(const char* hostname);
58 
59 BOOL utils_apply_gateway_policy(wLog* log, rdpContext* context, UINT32 flags, const char* module);
60 char* utils_redir_flags_to_string(UINT32 flags, char* buffer, size_t size);
61 
62 BOOL utils_reload_channels(rdpContext* context);
63 
64 #endif /* FREERDP_LIB_CORE_UTILS_H */