24 #include <winpr/assert.h>
25 #include <winpr/cast.h>
27 #include <freerdp/config.h>
29 #include <freerdp/freerdp.h>
30 #include <freerdp/gdi/gdi.h>
31 #include <freerdp/client/cmdline.h>
33 #include <freerdp/server/proxy/proxy_log.h>
34 #include <freerdp/channels/drdynvc.h>
35 #include <freerdp/channels/encomsp.h>
36 #include <freerdp/channels/rdpdr.h>
37 #include <freerdp/channels/rdpsnd.h>
38 #include <freerdp/channels/cliprdr.h>
39 #include <freerdp/channels/channels.h>
41 #include "pf_client.h"
42 #include "pf_channel.h"
43 #include <freerdp/server/proxy/proxy_context.h>
44 #include "pf_update.h"
46 #include <freerdp/server/proxy/proxy_config.h>
47 #include "proxy_modules.h"
49 #include "channels/pf_channel_rdpdr.h"
50 #include "channels/pf_channel_smartcard.h"
52 #define TAG PROXY_TAG("client")
54 static void channel_data_free(
void* obj);
55 static BOOL proxy_server_reactivate(rdpContext* ps,
const rdpContext* pc)
60 if (!pf_context_copy_settings(ps->settings, pc->settings))
67 WINPR_ASSERT(ps->update);
68 if (!ps->update->DesktopResize(ps))
74 static void pf_client_on_error_info(
void* ctx,
const ErrorInfoEventArgs* e)
76 pClientContext* pc = (pClientContext*)ctx;
77 pServerContext* ps = NULL;
80 WINPR_ASSERT(pc->pdata);
85 if (e->code == ERRINFO_NONE)
88 PROXY_LOG_WARN(TAG, pc,
"received ErrorInfo PDU. code=0x%08" PRIu32
", message: %s", e->code,
89 freerdp_get_error_info_string(e->code));
92 freerdp_set_error_info(ps->context.rdp, e->code);
93 freerdp_send_error_info(ps->context.rdp);
96 static void pf_client_on_activated(
void* ctx,
const ActivatedEventArgs* e)
98 pClientContext* pc = (pClientContext*)ctx;
99 pServerContext* ps = NULL;
100 freerdp_peer* peer = NULL;
103 WINPR_ASSERT(pc->pdata);
108 peer = ps->context.peer;
110 WINPR_ASSERT(peer->context);
112 PROXY_LOG_INFO(TAG, pc,
"client activated, registering server input callbacks");
115 pf_server_register_input_callbacks(peer->context->input);
116 pf_server_register_update_callbacks(peer->context->update);
119 static BOOL pf_client_load_rdpsnd(pClientContext* pc)
121 rdpContext* context = (rdpContext*)pc;
122 pServerContext* ps = NULL;
123 const proxyConfig* config = NULL;
126 WINPR_ASSERT(pc->pdata);
129 config = pc->pdata->config;
130 WINPR_ASSERT(config);
136 if (!freerdp_static_channel_collection_find(context->settings, RDPSND_CHANNEL_NAME))
138 const char* params[2] = { RDPSND_CHANNEL_NAME,
"sys:fake" };
140 if (!freerdp_client_add_static_channel(context->settings, ARRAYSIZE(params), params))
147 static BOOL pf_client_use_peer_load_balance_info(pClientContext* pc)
149 pServerContext* ps = NULL;
150 rdpSettings* settings = NULL;
151 DWORD lb_info_len = 0;
152 const char* lb_info = NULL;
155 WINPR_ASSERT(pc->pdata);
158 settings = pc->context.settings;
159 WINPR_ASSERT(settings);
161 lb_info = freerdp_nego_get_routing_token(&ps->context, &lb_info_len);
169 static BOOL str_is_empty(
const char* str)
173 if (strlen(str) == 0)
178 static BOOL pf_client_use_proxy_smartcard_auth(
const rdpSettings* settings)
187 if (str_is_empty(key))
190 if (str_is_empty(cert))
196 static BOOL freerdp_client_load_static_channel_addin(rdpChannels* channels, rdpSettings* settings,
197 const char* name,
void* data)
199 PVIRTUALCHANNELENTRY entry = NULL;
200 PVIRTUALCHANNELENTRY lentry = freerdp_load_channel_addin_entry(
201 name, NULL, NULL, FREERDP_ADDIN_CHANNEL_STATIC | FREERDP_ADDIN_CHANNEL_ENTRYEX);
202 PVIRTUALCHANNELENTRYEX entryEx = WINPR_FUNC_PTR_CAST(lentry, PVIRTUALCHANNELENTRYEX);
204 entry = freerdp_load_channel_addin_entry(name, NULL, NULL, FREERDP_ADDIN_CHANNEL_STATIC);
208 if (freerdp_channels_client_load_ex(channels, settings, entryEx, data) == 0)
210 WLog_INFO(TAG,
"loading channelEx %s", name);
216 if (freerdp_channels_client_load(channels, settings, entry, data) == 0)
218 WLog_INFO(TAG,
"loading channel %s", name);
226 static BOOL pf_client_pre_connect(freerdp* instance)
228 pClientContext* pc = NULL;
229 pServerContext* ps = NULL;
230 const proxyConfig* config = NULL;
231 rdpSettings* settings = NULL;
233 WINPR_ASSERT(instance);
234 pc = (pClientContext*)instance->context;
236 WINPR_ASSERT(pc->pdata);
239 WINPR_ASSERT(ps->pdata);
240 config = ps->pdata->config;
241 WINPR_ASSERT(config);
242 settings = instance->context->settings;
243 WINPR_ASSERT(settings);
256 ZeroMemory(OrderSupport, 32);
258 if (WTSVirtualChannelManagerIsChannelJoined(ps->vcm, DRDYNVC_SVC_CHANNEL_NAME))
272 config->DeviceRedirection) ||
274 config->DisplayControl) ||
278 if (config->RemoteApp)
280 if (WTSVirtualChannelManagerIsChannelJoined(ps->vcm, RAIL_SVC_CHANNEL_NAME))
287 if (config->DeviceRedirection)
289 if (WTSVirtualChannelManagerIsChannelJoined(ps->vcm, RDPDR_SVC_CHANNEL_NAME))
300 config->DisplayControl))
303 if (WTSVirtualChannelManagerIsChannelJoined(ps->vcm, ENCOMSP_SVC_CHANNEL_NAME))
309 if (config->Clipboard)
311 if (WTSVirtualChannelManagerIsChannelJoined(ps->vcm, CLIPRDR_SVC_CHANNEL_NAME))
321 PubSub_SubscribeErrorInfo(instance->context->pubSub, pf_client_on_error_info);
322 PubSub_SubscribeActivated(instance->context->pubSub, pf_client_on_activated);
323 if (!pf_client_use_peer_load_balance_info(pc))
326 return pf_modules_run_hook(pc->pdata->module, HOOK_TYPE_CLIENT_PRE_CONNECT, pc->pdata, pc);
337 static BOOL updateBackIdFn(
const void* key,
void* value,
void* arg)
339 pServerStaticChannelContext* current = (pServerStaticChannelContext*)value;
340 UpdateBackIdArgs* updateArgs = (UpdateBackIdArgs*)arg;
342 if (strcmp(updateArgs->name, current->channel_name) != 0)
345 current->back_channel_id = updateArgs->backId;
346 if (!HashTable_Insert(updateArgs->ps->channelsByBackId, ¤t->back_channel_id, current))
348 WLog_ERR(TAG,
"error inserting channel in channelsByBackId table");
353 static BOOL pf_client_update_back_id(pServerContext* ps,
const char* name, UINT32 backId)
355 UpdateBackIdArgs res = { ps, name, backId };
357 return HashTable_Foreach(ps->channelsByFrontId, updateBackIdFn, &res) == FALSE;
360 static BOOL pf_client_load_channels(freerdp* instance)
362 pClientContext* pc = NULL;
363 pServerContext* ps = NULL;
364 const proxyConfig* config = NULL;
365 rdpSettings* settings = NULL;
367 WINPR_ASSERT(instance);
368 pc = (pClientContext*)instance->context;
370 WINPR_ASSERT(pc->pdata);
373 WINPR_ASSERT(ps->pdata);
374 config = ps->pdata->config;
375 WINPR_ASSERT(config);
376 settings = instance->context->settings;
377 WINPR_ASSERT(settings);
382 PROXY_LOG_INFO(TAG, pc,
"Loading addins");
384 if (!pf_client_load_rdpsnd(pc))
386 PROXY_LOG_ERR(TAG, pc,
"Failed to load rdpsnd client");
390 if (!pf_utils_is_passthrough(config))
392 if (!freerdp_client_load_addins(instance->context->channels, settings))
394 PROXY_LOG_ERR(TAG, pc,
"Failed to load addins");
400 if (!pf_channel_rdpdr_client_new(pc))
402 #if defined(WITH_PROXY_EMULATE_SMARTCARD)
403 if (!pf_channel_smartcard_client_new(pc))
407 if (!freerdp_channels_from_mcs(settings, &ps->context))
413 settings, FreeRDP_ChannelDefArray, 0);
415 UINT32
id = MCS_GLOBAL_CHANNEL_ID + 1;
417 WINPR_ASSERT(channels || (size == 0));
425 dev.channel_name = cur->name;
426 dev.flags = cur->options;
429 if (!pf_modules_run_filter(pc->pdata->module,
430 FILTER_TYPE_CLIENT_PASSTHROUGH_CHANNEL_CREATE, pc->pdata,
433 const size_t s = size - MIN(size, x + 1);
439 if (!pf_client_update_back_id(ps, cur->name,
id++))
441 WLog_ERR(TAG,
"unable to update backid for channel %s", cur->name);
452 return pf_modules_run_hook(pc->pdata->module, HOOK_TYPE_CLIENT_LOAD_CHANNELS, pc->pdata, pc);
455 static BOOL pf_client_receive_channel_data_hook(freerdp* instance, UINT16 channelId,
456 const BYTE* xdata,
size_t xsize, UINT32 flags,
459 pClientContext* pc = NULL;
460 pServerContext* ps = NULL;
461 proxyData* pdata = NULL;
462 pServerStaticChannelContext* channel = NULL;
463 UINT64 channelId64 = channelId;
465 WINPR_ASSERT(instance);
466 WINPR_ASSERT(xdata || (xsize == 0));
468 pc = (pClientContext*)instance->context;
470 WINPR_ASSERT(pc->pdata);
478 channel = HashTable_GetItemValue(ps->channelsByBackId, &channelId64);
482 WINPR_ASSERT(channel->onBackData);
483 switch (channel->onBackData(pdata, channel, xdata, xsize, flags, totalSize))
485 case PF_CHANNEL_RESULT_PASS:
489 if (channel->front_channel_id == 0)
492 return ps->context.peer->SendChannelPacket(
493 ps->context.peer, WINPR_ASSERTING_INT_CAST(UINT16, channel->front_channel_id),
494 totalSize, flags, xdata, xsize);
495 case PF_CHANNEL_RESULT_DROP:
497 case PF_CHANNEL_RESULT_ERROR:
503 static BOOL pf_client_on_server_heartbeat(freerdp* instance, BYTE period, BYTE count1, BYTE count2)
505 pClientContext* pc = NULL;
506 pServerContext* ps = NULL;
508 WINPR_ASSERT(instance);
509 pc = (pClientContext*)instance->context;
511 WINPR_ASSERT(pc->pdata);
515 return freerdp_heartbeat_send_heartbeat_pdu(ps->context.peer, period, count1, count2);
523 return Queue_Enqueue(pc->cached_server_channel_data, ev);
526 static BOOL sendQueuedChannelData(pClientContext* pc)
536 Queue_Lock(pc->cached_server_channel_data);
537 while (rc && (ev = Queue_Dequeue(pc->cached_server_channel_data)))
539 UINT16 channelId = 0;
540 WINPR_ASSERT(pc->context.instance);
542 channelId = freerdp_channels_get_id_by_name(pc->context.instance, ev->channel_name);
544 if ((channelId == 0) || (channelId == UINT16_MAX))
548 WINPR_ASSERT(pc->context.instance->SendChannelPacket);
549 rc = pc->context.instance->SendChannelPacket(pc->context.instance, channelId,
550 ev->total_size, ev->flags, ev->data,
553 channel_data_free(ev);
556 Queue_Unlock(pc->cached_server_channel_data);
571 static BOOL pf_client_post_connect(freerdp* instance)
573 rdpContext* context = NULL;
574 rdpSettings* settings = NULL;
575 rdpUpdate* update = NULL;
576 rdpContext* ps = NULL;
577 pClientContext* pc = NULL;
578 const proxyConfig* config = NULL;
580 WINPR_ASSERT(instance);
581 context = instance->context;
582 WINPR_ASSERT(context);
583 settings = context->settings;
584 WINPR_ASSERT(settings);
585 update = context->update;
586 WINPR_ASSERT(update);
587 pc = (pClientContext*)context;
589 WINPR_ASSERT(pc->pdata);
590 ps = (rdpContext*)pc->pdata->ps;
592 config = pc->pdata->config;
593 WINPR_ASSERT(config);
595 if (!pf_modules_run_hook(pc->pdata->module, HOOK_TYPE_CLIENT_POST_CONNECT, pc->pdata, pc))
598 if (!gdi_init(instance, PIXEL_FORMAT_BGRA32))
603 pf_client_register_update_callbacks(update);
606 pc->client_receive_channel_data_original = instance->ReceiveChannelData;
607 instance->ReceiveChannelData = pf_client_receive_channel_data_hook;
609 instance->heartbeat->ServerHeartbeat = pf_client_on_server_heartbeat;
611 pc->connected = TRUE;
614 sendQueuedChannelData(pc);
621 return proxy_server_reactivate(ps, context);
627 static void pf_client_post_disconnect(freerdp* instance)
629 pClientContext* pc = NULL;
630 proxyData* pdata = NULL;
635 if (!instance->context)
638 pc = (pClientContext*)instance->context;
643 #if defined(WITH_PROXY_EMULATE_SMARTCARD)
644 pf_channel_smartcard_client_free(pc);
647 pf_channel_rdpdr_client_free(pc);
649 pc->connected = FALSE;
650 pf_modules_run_hook(pc->pdata->module, HOOK_TYPE_CLIENT_POST_DISCONNECT, pc->pdata, pc);
652 PubSub_UnsubscribeErrorInfo(instance->context->pubSub, pf_client_on_error_info);
656 if (!pc->allow_next_conn_failure)
657 proxy_data_abort_connect(pdata);
660 static BOOL pf_client_redirect(freerdp* instance)
662 pClientContext* pc = NULL;
663 proxyData* pdata = NULL;
668 if (!instance->context)
671 pc = (pClientContext*)instance->context;
676 #if defined(WITH_PROXY_EMULATE_SMARTCARD)
677 pf_channel_smartcard_client_reset(pc);
679 pf_channel_rdpdr_client_reset(pc);
681 return pf_modules_run_hook(pc->pdata->module, HOOK_TYPE_CLIENT_REDIRECT, pc->pdata, pc);
690 static BOOL pf_client_should_retry_without_nla(pClientContext* pc)
692 rdpSettings* settings = NULL;
693 const proxyConfig* config = NULL;
696 WINPR_ASSERT(pc->pdata);
697 settings = pc->context.settings;
698 WINPR_ASSERT(settings);
699 config = pc->pdata->config;
700 WINPR_ASSERT(config);
702 if (!config->ClientAllowFallbackToTls ||
706 return config->ClientTlsSecurity || config->ClientRdpSecurity;
709 static BOOL pf_client_set_security_settings(pClientContext* pc)
712 WINPR_ASSERT(pc->pdata);
713 rdpSettings* settings = pc->context.settings;
714 WINPR_ASSERT(settings);
715 const proxyConfig* config = pc->pdata->config;
716 WINPR_ASSERT(config);
725 if (pf_client_use_proxy_smartcard_auth(settings))
741 static BOOL pf_client_connect_without_nla(pClientContext* pc)
743 freerdp* instance = NULL;
744 rdpSettings* settings = NULL;
747 instance = pc->context.instance;
748 WINPR_ASSERT(instance);
750 if (!freerdp_context_reset(instance))
753 settings = pc->context.settings;
754 WINPR_ASSERT(settings);
765 pc->allow_next_conn_failure = FALSE;
766 return freerdp_connect(instance);
769 static BOOL pf_client_connect(freerdp* instance)
771 pClientContext* pc = NULL;
772 rdpSettings* settings = NULL;
776 WINPR_ASSERT(instance);
777 pc = (pClientContext*)instance->context;
779 settings = instance->context->settings;
780 WINPR_ASSERT(settings);
782 PROXY_LOG_INFO(TAG, pc,
"connecting using client info: Username: %s, Domain: %s",
786 if (!pf_client_set_security_settings(pc))
789 if (pf_client_should_retry_without_nla(pc))
790 retry = pc->allow_next_conn_failure = TRUE;
792 PROXY_LOG_INFO(TAG, pc,
"connecting using security settings: rdp=%d, tls=%d, nla=%d",
797 if (!freerdp_connect(instance))
799 if (!pf_modules_run_hook(pc->pdata->module, HOOK_TYPE_CLIENT_LOGIN_FAILURE, pc->pdata, pc))
805 PROXY_LOG_ERR(TAG, pc,
"failed to connect with NLA. retrying to connect without NLA");
806 if (!pf_client_connect_without_nla(pc))
808 PROXY_LOG_ERR(TAG, pc,
"pf_client_connect_without_nla failed!");
815 pc->allow_next_conn_failure = FALSE;
824 static DWORD WINAPI pf_client_thread_proc(pClientContext* pc)
826 freerdp* instance = NULL;
827 proxyData* pdata = NULL;
830 HANDLE handles[MAXIMUM_WAIT_OBJECTS] = { 0 };
834 instance = pc->context.instance;
835 WINPR_ASSERT(instance);
846 handles[nCount++] = pdata->abort_event;
848 if (!pf_modules_run_hook(pdata->module, HOOK_TYPE_CLIENT_INIT_CONNECT, pdata, pc))
850 proxy_data_abort_connect(pdata);
854 if (!pf_client_connect(instance))
856 proxy_data_abort_connect(pdata);
859 handles[nCount++] = Queue_Event(pc->cached_server_channel_data);
861 while (!freerdp_shall_disconnect_context(instance->context))
863 UINT32 tmp = freerdp_get_event_handles(instance->context, &handles[nCount],
864 ARRAYSIZE(handles) - nCount);
868 PROXY_LOG_ERR(TAG, pc,
"freerdp_get_event_handles failed!");
872 status = WaitForMultipleObjects(nCount + tmp, handles, FALSE, INFINITE);
874 if (status == WAIT_FAILED)
876 WLog_ERR(TAG,
"WaitForMultipleObjects failed with %" PRIu32
"", status);
881 if (status == WAIT_OBJECT_0)
884 if (freerdp_shall_disconnect_context(instance->context))
887 if (proxy_data_shall_disconnect(pdata))
890 if (!freerdp_check_event_handles(instance->context))
892 if (freerdp_get_last_error(instance->context) == FREERDP_ERROR_SUCCESS)
893 WLog_ERR(TAG,
"Failed to check FreeRDP event handles");
897 sendQueuedChannelData(pc);
900 freerdp_disconnect(instance);
903 pf_modules_run_hook(pdata->module, HOOK_TYPE_CLIENT_UNINIT_CONNECT, pdata, pc);
908 static int pf_logon_error_info(freerdp* instance, UINT32 data, UINT32 type)
910 const char* str_data = freerdp_get_logon_error_info_data(data);
911 const char* str_type = freerdp_get_logon_error_info_type(type);
913 if (!instance || !instance->context)
916 WLog_INFO(TAG,
"Logon Error Info %s [%s]", str_data, str_type);
920 static void pf_client_context_free(freerdp* instance, rdpContext* context)
922 pClientContext* pc = (pClientContext*)context;
923 WINPR_UNUSED(instance);
928 pc->sendChannelData = NULL;
929 Queue_Free(pc->cached_server_channel_data);
930 Stream_Free(pc->remote_pem, TRUE);
931 free(pc->remote_hostname);
932 free(pc->computerName.v);
933 HashTable_Free(pc->interceptContextMap);
936 static int pf_client_verify_X509_certificate(freerdp* instance,
const BYTE* data,
size_t length,
937 const char* hostname, UINT16 port, DWORD flags)
939 pClientContext* pc = NULL;
941 WINPR_ASSERT(instance);
943 WINPR_ASSERT(length > 0);
944 WINPR_ASSERT(hostname);
946 pc = (pClientContext*)instance->context;
949 if (!Stream_EnsureCapacity(pc->remote_pem, length))
951 Stream_SetPosition(pc->remote_pem, 0);
953 free(pc->remote_hostname);
954 pc->remote_hostname = NULL;
957 Stream_Write(pc->remote_pem, data, length);
960 pc->remote_hostname = _strdup(hostname);
961 pc->remote_port = port;
962 pc->remote_flags = flags;
964 Stream_SealLength(pc->remote_pem);
965 if (!pf_modules_run_hook(pc->pdata->module, HOOK_TYPE_CLIENT_VERIFY_X509, pc->pdata, pc))
970 void channel_data_free(
void* obj)
983 cnv.cpv = dst->channel_name;
989 static void* channel_data_copy(
const void* obj)
1006 if (src->channel_name)
1008 dst->channel_name = _strdup(src->channel_name);
1009 if (!dst->channel_name)
1012 dst->data = malloc(src->data_len);
1016 cnv.cpv = dst->data;
1017 memcpy(cnv.pv, src->data, src->data_len);
1021 channel_data_free(dst);
1025 static BOOL pf_client_client_new(freerdp* instance, rdpContext* context)
1028 pClientContext* pc = (pClientContext*)context;
1030 if (!instance || !context)
1033 instance->LoadChannels = pf_client_load_channels;
1034 instance->PreConnect = pf_client_pre_connect;
1035 instance->PostConnect = pf_client_post_connect;
1036 instance->PostDisconnect = pf_client_post_disconnect;
1037 instance->Redirect = pf_client_redirect;
1038 instance->LogonErrorInfo = pf_logon_error_info;
1039 instance->VerifyX509Certificate = pf_client_verify_X509_certificate;
1041 pc->remote_pem = Stream_New(NULL, 4096);
1042 if (!pc->remote_pem)
1045 pc->sendChannelData = pf_client_send_channel_data;
1046 pc->cached_server_channel_data = Queue_New(TRUE, -1, -1);
1047 if (!pc->cached_server_channel_data)
1049 obj = Queue_Object(pc->cached_server_channel_data);
1051 obj->fnObjectNew = channel_data_copy;
1052 obj->fnObjectFree = channel_data_free;
1054 pc->interceptContextMap = HashTable_New(FALSE);
1055 if (!pc->interceptContextMap)
1058 if (!HashTable_SetupForStringData(pc->interceptContextMap, FALSE))
1061 obj = HashTable_ValueObject(pc->interceptContextMap);
1063 obj->fnObjectFree = intercept_context_entry_free;
1068 static int pf_client_client_stop(rdpContext* context)
1070 pClientContext* pc = (pClientContext*)context;
1071 proxyData* pdata = NULL;
1075 WINPR_ASSERT(pdata);
1077 PROXY_LOG_DBG(TAG, pc,
"aborting client connection");
1078 proxy_data_abort_connect(pdata);
1079 freerdp_abort_connect_context(context);
1084 int RdpClientEntry(RDP_CLIENT_ENTRY_POINTS* pEntryPoints)
1086 WINPR_ASSERT(pEntryPoints);
1088 ZeroMemory(pEntryPoints,
sizeof(RDP_CLIENT_ENTRY_POINTS));
1089 pEntryPoints->Version = RDP_CLIENT_INTERFACE_VERSION;
1090 pEntryPoints->Size =
sizeof(RDP_CLIENT_ENTRY_POINTS_V1);
1091 pEntryPoints->ContextSize =
sizeof(pClientContext);
1093 pEntryPoints->ClientNew = pf_client_client_new;
1094 pEntryPoints->ClientFree = pf_client_context_free;
1095 pEntryPoints->ClientStop = pf_client_client_stop;
1102 DWORD WINAPI pf_client_start(LPVOID arg)
1105 pClientContext* pc = (pClientContext*)arg;
1108 if (freerdp_client_start(&pc->context) == 0)
1109 rc = pf_client_thread_proc(pc);
1110 freerdp_client_stop(&pc->context);
FREERDP_API UINT32 freerdp_settings_get_uint32(const rdpSettings *settings, FreeRDP_Settings_Keys_UInt32 id)
Returns a UINT32 settings value.
FREERDP_API BOOL freerdp_settings_set_string(rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *param)
Sets a string settings value. The param is copied.
FREERDP_API BOOL freerdp_settings_get_bool(const rdpSettings *settings, FreeRDP_Settings_Keys_Bool id)
Returns a boolean settings value.
FREERDP_API const char * freerdp_settings_get_string(const rdpSettings *settings, FreeRDP_Settings_Keys_String id)
Returns a immutable string settings value.
FREERDP_API BOOL freerdp_settings_set_pointer_len(rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id, const void *data, size_t len)
Set a pointer to value data.
FREERDP_API BOOL freerdp_settings_set_uint32(rdpSettings *settings, FreeRDP_Settings_Keys_UInt32 id, UINT32 param)
Sets a UINT32 settings value.
FREERDP_API BOOL freerdp_settings_set_bool(rdpSettings *settings, FreeRDP_Settings_Keys_Bool id, BOOL param)
Sets a BOOL settings value.
FREERDP_API void * freerdp_settings_get_pointer_writable(rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id)
Returns a mutable pointer settings value.
This struct contains function pointer to initialize/free objects.