20 #ifndef FREERDP_CLIENT_RDP_FILE_H
21 #define FREERDP_CLIENT_RDP_FILE_H
23 #include <freerdp/api.h>
24 #include <freerdp/types.h>
25 #include <freerdp/settings.h>
28 #define RDP_FILE_FLAG_PARSE_INT_RELAXED 1
35 typedef struct rdp_file rdpFile;
36 typedef BOOL (*rdp_file_fkt_parse)(
void* context,
const char* key,
char type,
41 FREERDP_API
void freerdp_client_rdp_file_set_callback_context(rdpFile* file,
void* context);
43 FREERDP_API BOOL freerdp_client_parse_rdp_file(rdpFile* file,
const char* name);
44 FREERDP_API BOOL freerdp_client_parse_rdp_file_ex(rdpFile* file,
const char* name,
45 rdp_file_fkt_parse parse);
46 FREERDP_API BOOL freerdp_client_parse_rdp_file_buffer(rdpFile* file,
const BYTE* buffer,
48 FREERDP_API BOOL freerdp_client_parse_rdp_file_buffer_ex(rdpFile* file,
const BYTE* buffer,
49 size_t size, rdp_file_fkt_parse parse);
50 FREERDP_API BOOL freerdp_client_populate_settings_from_rdp_file(
const rdpFile* file,
51 rdpSettings* settings);
53 FREERDP_API BOOL freerdp_client_populate_rdp_file_from_settings(rdpFile* file,
54 const rdpSettings* settings);
55 FREERDP_API BOOL freerdp_client_write_rdp_file(
const rdpFile* file,
const char* name,
57 FREERDP_API
size_t freerdp_client_write_rdp_file_buffer(
const rdpFile* file,
char* buffer,
60 FREERDP_API
int freerdp_client_rdp_file_set_string_option(rdpFile* file,
const char* name,
62 FREERDP_API
const char* freerdp_client_rdp_file_get_string_option(
const rdpFile* file,
65 FREERDP_API
int freerdp_client_rdp_file_set_integer_option(rdpFile* file,
const char* name,
67 FREERDP_API
int freerdp_client_rdp_file_get_integer_option(
const rdpFile* file,
70 FREERDP_API
void freerdp_client_rdp_file_free(rdpFile* file);
72 WINPR_ATTR_MALLOC(freerdp_client_rdp_file_free, 1)
73 FREERDP_API rdpFile* freerdp_client_rdp_file_new(
void);
75 WINPR_ATTR_MALLOC(freerdp_client_rdp_file_free, 1)
76 FREERDP_API rdpFile* freerdp_client_rdp_file_new_ex(DWORD flags);