FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
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
36typedef enum
37{
38 AUTH_SUCCESS,
39 AUTH_SKIP,
40 AUTH_NO_CREDENTIALS,
41 AUTH_CANCELLED,
42 AUTH_FAILED
43} auth_status;
44
45auth_status utils_authenticate_gateway(freerdp* instance, rdp_auth_reason reason);
46auth_status utils_authenticate(freerdp* instance, rdp_auth_reason reason, BOOL override);
47
48HANDLE utils_get_abort_event(rdpRdp* rdp);
49BOOL utils_abort_event_is_set(const rdpRdp* rdp);
50BOOL utils_reset_abort(rdpRdp* rdp);
51BOOL utils_abort_connect(rdpRdp* rdp);
52BOOL utils_sync_credentials(rdpSettings* settings, BOOL toGateway);
53BOOL utils_persist_credentials(rdpSettings* settings, const rdpSettings* current);
54
55BOOL utils_str_is_empty(const char* str);
56BOOL utils_str_copy(const char* value, char** dst);
57
58const char* utils_is_vsock(const char* hostname);
59
60BOOL utils_apply_gateway_policy(wLog* log, rdpContext* context, UINT32 flags, const char* module);
61char* utils_redir_flags_to_string(UINT32 flags, char* buffer, size_t size);
62
63BOOL utils_reload_channels(rdpContext* context);
64
65#endif /* FREERDP_LIB_CORE_UTILS_H */