FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
settings_getters.c
1/* Generated by */
2
3#include "../core/settings.h"
4
5#include <winpr/assert.h>
6#include <freerdp/settings.h>
7#include <freerdp/log.h>
8
9#define TAG FREERDP_TAG("common.settings")
10
11static void free_string(char** current, BOOL cleanup)
12{
13 if (cleanup)
14 {
15 if (*current)
16 memset(*current, 0, strlen(*current));
17 free(*current);
18 (*current) = NULL;
19 }
20}
21
22static BOOL alloc_empty_string(char** current, const char* next, size_t next_len)
23{
24 if (!next && (next_len > 0))
25 {
26 *current = calloc(next_len, 1);
27 return (*current != NULL);
28 }
29 return FALSE;
30}
31
32static BOOL update_string_copy_(char** current, const char* next, size_t next_len, BOOL cleanup)
33{
34 free_string(current, cleanup);
35
36 if (alloc_empty_string(current, next, next_len))
37 return TRUE;
38
39 *current = (next ? strndup(next, next_len) : NULL);
40 return !next || (*current != NULL);
41}
42
43static BOOL update_string_(char** current, char* next, size_t next_len)
44{
45 free_string(current, TRUE);
46
47 if (alloc_empty_string(current, next, next_len))
48 return TRUE;
49
50 *current = next;
51 return !next || (*current != NULL);
52}
53
54BOOL freerdp_settings_get_bool(WINPR_ATTR_UNUSED const rdpSettings* settings,
55 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_Bool id)
56{
57 WINPR_ASSERT(settings);
58
59 switch (id)
60 {
61 case FreeRDP_AadSecurity:
62 return settings->AadSecurity;
63
64 case FreeRDP_AllowCacheWaitingList:
65 return settings->AllowCacheWaitingList;
66
67 case FreeRDP_AllowDesktopComposition:
68 return settings->AllowDesktopComposition;
69
70 case FreeRDP_AllowFontSmoothing:
71 return settings->AllowFontSmoothing;
72
73 case FreeRDP_AllowUnanouncedOrdersFromServer:
74 return settings->AllowUnanouncedOrdersFromServer;
75
76 case FreeRDP_AltSecFrameMarkerSupport:
77 return settings->AltSecFrameMarkerSupport;
78
79 case FreeRDP_AsyncChannels:
80 return settings->AsyncChannels;
81
82 case FreeRDP_AsyncUpdate:
83 return settings->AsyncUpdate;
84
85 case FreeRDP_AudioCapture:
86 return settings->AudioCapture;
87
88 case FreeRDP_AudioPlayback:
89 return settings->AudioPlayback;
90
91 case FreeRDP_Authentication:
92 return settings->Authentication;
93
94 case FreeRDP_AuthenticationOnly:
95 return settings->AuthenticationOnly;
96
97 case FreeRDP_AutoAcceptCertificate:
98 return settings->AutoAcceptCertificate;
99
100 case FreeRDP_AutoDenyCertificate:
101 return settings->AutoDenyCertificate;
102
103 case FreeRDP_AutoLogonEnabled:
104 return settings->AutoLogonEnabled;
105
106 case FreeRDP_AutoReconnectionEnabled:
107 return settings->AutoReconnectionEnabled;
108
109 case FreeRDP_AutoReconnectionPacketSupported:
110 return settings->AutoReconnectionPacketSupported;
111
112 case FreeRDP_BitmapCacheEnabled:
113 return settings->BitmapCacheEnabled;
114
115 case FreeRDP_BitmapCachePersistEnabled:
116 return settings->BitmapCachePersistEnabled;
117
118 case FreeRDP_BitmapCacheV3Enabled:
119 return settings->BitmapCacheV3Enabled;
120
121 case FreeRDP_BitmapCompressionDisabled:
122 return settings->BitmapCompressionDisabled;
123
124 case FreeRDP_CertificateCallbackPreferPEM:
125 return settings->CertificateCallbackPreferPEM;
126
127 case FreeRDP_CompressionEnabled:
128 return settings->CompressionEnabled;
129
130 case FreeRDP_ConnectChildSession:
131 return settings->ConnectChildSession;
132
133 case FreeRDP_ConsoleSession:
134 return settings->ConsoleSession;
135
136 case FreeRDP_CredentialsFromStdin:
137 return settings->CredentialsFromStdin;
138
139 case FreeRDP_DeactivateClientDecoding:
140 return settings->DeactivateClientDecoding;
141
142 case FreeRDP_Decorations:
143 return settings->Decorations;
144
145 case FreeRDP_DesktopResize:
146 return settings->DesktopResize;
147
148 case FreeRDP_DeviceRedirection:
149 return settings->DeviceRedirection;
150
151 case FreeRDP_DisableCredentialsDelegation:
152 return settings->DisableCredentialsDelegation;
153
154 case FreeRDP_DisableCtrlAltDel:
155 return settings->DisableCtrlAltDel;
156
157 case FreeRDP_DisableCursorBlinking:
158 return settings->DisableCursorBlinking;
159
160 case FreeRDP_DisableCursorShadow:
161 return settings->DisableCursorShadow;
162
163 case FreeRDP_DisableFullWindowDrag:
164 return settings->DisableFullWindowDrag;
165
166 case FreeRDP_DisableMenuAnims:
167 return settings->DisableMenuAnims;
168
169 case FreeRDP_DisableRemoteAppCapsCheck:
170 return settings->DisableRemoteAppCapsCheck;
171
172 case FreeRDP_DisableThemes:
173 return settings->DisableThemes;
174
175 case FreeRDP_DisableWallpaper:
176 return settings->DisableWallpaper;
177
178 case FreeRDP_DrawAllowColorSubsampling:
179 return settings->DrawAllowColorSubsampling;
180
181 case FreeRDP_DrawAllowDynamicColorFidelity:
182 return settings->DrawAllowDynamicColorFidelity;
183
184 case FreeRDP_DrawAllowSkipAlpha:
185 return settings->DrawAllowSkipAlpha;
186
187 case FreeRDP_DrawGdiPlusCacheEnabled:
188 return settings->DrawGdiPlusCacheEnabled;
189
190 case FreeRDP_DrawGdiPlusEnabled:
191 return settings->DrawGdiPlusEnabled;
192
193 case FreeRDP_DrawNineGridEnabled:
194 return settings->DrawNineGridEnabled;
195
196 case FreeRDP_DumpRemoteFx:
197 return settings->DumpRemoteFx;
198
199 case FreeRDP_DynamicDaylightTimeDisabled:
200 return settings->DynamicDaylightTimeDisabled;
201
202 case FreeRDP_DynamicResolutionUpdate:
203 return settings->DynamicResolutionUpdate;
204
205 case FreeRDP_EmbeddedWindow:
206 return settings->EmbeddedWindow;
207
208 case FreeRDP_EnableWindowsKey:
209 return settings->EnableWindowsKey;
210
211 case FreeRDP_EncomspVirtualChannel:
212 return settings->EncomspVirtualChannel;
213
214 case FreeRDP_ExtSecurity:
215 return settings->ExtSecurity;
216
217 case FreeRDP_ExternalCertificateManagement:
218 return settings->ExternalCertificateManagement;
219
220 case FreeRDP_FIPSMode:
221 return settings->FIPSMode;
222
223 case FreeRDP_FastPathInput:
224 return settings->FastPathInput;
225
226 case FreeRDP_FastPathOutput:
227 return settings->FastPathOutput;
228
229 case FreeRDP_ForceEncryptedCsPdu:
230 return settings->ForceEncryptedCsPdu;
231
232 case FreeRDP_ForceMultimon:
233 return settings->ForceMultimon;
234
235 case FreeRDP_FrameMarkerCommandEnabled:
236 return settings->FrameMarkerCommandEnabled;
237
238 case FreeRDP_Fullscreen:
239 return settings->Fullscreen;
240
241 case FreeRDP_GatewayArmTransport:
242 return settings->GatewayArmTransport;
243
244 case FreeRDP_GatewayAvdUseTenantid:
245 return settings->GatewayAvdUseTenantid;
246
247 case FreeRDP_GatewayBypassLocal:
248 return settings->GatewayBypassLocal;
249
250 case FreeRDP_GatewayEnabled:
251 return settings->GatewayEnabled;
252
253 case FreeRDP_GatewayHttpExtAuthSspiNtlm:
254 return settings->GatewayHttpExtAuthSspiNtlm;
255
256 case FreeRDP_GatewayHttpTransport:
257 return settings->GatewayHttpTransport;
258
259 case FreeRDP_GatewayHttpUseWebsockets:
260 return settings->GatewayHttpUseWebsockets;
261
262 case FreeRDP_GatewayIgnoreRedirectionPolicy:
263 return settings->GatewayIgnoreRedirectionPolicy;
264
265 case FreeRDP_GatewayRpcTransport:
266 return settings->GatewayRpcTransport;
267
268 case FreeRDP_GatewayUdpTransport:
269 return settings->GatewayUdpTransport;
270
271 case FreeRDP_GatewayUseSameCredentials:
272 return settings->GatewayUseSameCredentials;
273
274 case FreeRDP_GfxAVC444:
275 return settings->GfxAVC444;
276
277 case FreeRDP_GfxAVC444v2:
278 return settings->GfxAVC444v2;
279
280 case FreeRDP_GfxH264:
281 return settings->GfxH264;
282
283 case FreeRDP_GfxPlanar:
284 return settings->GfxPlanar;
285
286 case FreeRDP_GfxProgressive:
287 return settings->GfxProgressive;
288
289 case FreeRDP_GfxProgressiveV2:
290 return settings->GfxProgressiveV2;
291
292 case FreeRDP_GfxSendQoeAck:
293 return settings->GfxSendQoeAck;
294
295 case FreeRDP_GfxSmallCache:
296 return settings->GfxSmallCache;
297
298 case FreeRDP_GfxSuspendFrameAck:
299 return settings->GfxSuspendFrameAck;
300
301 case FreeRDP_GfxThinClient:
302 return settings->GfxThinClient;
303
304 case FreeRDP_GrabKeyboard:
305 return settings->GrabKeyboard;
306
307 case FreeRDP_GrabMouse:
308 return settings->GrabMouse;
309
310 case FreeRDP_HasExtendedMouseEvent:
311 return settings->HasExtendedMouseEvent;
312
313 case FreeRDP_HasHorizontalWheel:
314 return settings->HasHorizontalWheel;
315
316 case FreeRDP_HasMonitorAttributes:
317 return settings->HasMonitorAttributes;
318
319 case FreeRDP_HasQoeEvent:
320 return settings->HasQoeEvent;
321
322 case FreeRDP_HasRelativeMouseEvent:
323 return settings->HasRelativeMouseEvent;
324
325 case FreeRDP_HiDefRemoteApp:
326 return settings->HiDefRemoteApp;
327
328 case FreeRDP_IPv6Enabled:
329 return settings->IPv6Enabled;
330
331 case FreeRDP_IgnoreCertificate:
332 return settings->IgnoreCertificate;
333
334 case FreeRDP_IgnoreInvalidDevices:
335 return settings->IgnoreInvalidDevices;
336
337 case FreeRDP_JpegCodec:
338 return settings->JpegCodec;
339
340 case FreeRDP_KerberosRdgIsProxy:
341 return settings->KerberosRdgIsProxy;
342
343 case FreeRDP_ListMonitors:
344 return settings->ListMonitors;
345
346 case FreeRDP_LocalConnection:
347 return settings->LocalConnection;
348
349 case FreeRDP_LogonErrors:
350 return settings->LogonErrors;
351
352 case FreeRDP_LogonNotify:
353 return settings->LogonNotify;
354
355 case FreeRDP_LongCredentialsSupported:
356 return settings->LongCredentialsSupported;
357
358 case FreeRDP_LyncRdpMode:
359 return settings->LyncRdpMode;
360
361 case FreeRDP_MaximizeShell:
362 return settings->MaximizeShell;
363
364 case FreeRDP_MouseAttached:
365 return settings->MouseAttached;
366
367 case FreeRDP_MouseHasWheel:
368 return settings->MouseHasWheel;
369
370 case FreeRDP_MouseMotion:
371 return settings->MouseMotion;
372
373 case FreeRDP_MouseUseRelativeMove:
374 return settings->MouseUseRelativeMove;
375
376 case FreeRDP_MstscCookieMode:
377 return settings->MstscCookieMode;
378
379 case FreeRDP_MultiTouchGestures:
380 return settings->MultiTouchGestures;
381
382 case FreeRDP_MultiTouchInput:
383 return settings->MultiTouchInput;
384
385 case FreeRDP_NSCodec:
386 return settings->NSCodec;
387
388 case FreeRDP_NSCodecAllowDynamicColorFidelity:
389 return settings->NSCodecAllowDynamicColorFidelity;
390
391 case FreeRDP_NSCodecAllowSubsampling:
392 return settings->NSCodecAllowSubsampling;
393
394 case FreeRDP_NegotiateSecurityLayer:
395 return settings->NegotiateSecurityLayer;
396
397 case FreeRDP_NetworkAutoDetect:
398 return settings->NetworkAutoDetect;
399
400 case FreeRDP_NlaSecurity:
401 return settings->NlaSecurity;
402
403 case FreeRDP_NoBitmapCompressionHeader:
404 return settings->NoBitmapCompressionHeader;
405
406 case FreeRDP_OldLicenseBehaviour:
407 return settings->OldLicenseBehaviour;
408
409 case FreeRDP_PasswordIsSmartcardPin:
410 return settings->PasswordIsSmartcardPin;
411
412 case FreeRDP_PercentScreenUseHeight:
413 return settings->PercentScreenUseHeight;
414
415 case FreeRDP_PercentScreenUseWidth:
416 return settings->PercentScreenUseWidth;
417
418 case FreeRDP_PlayRemoteFx:
419 return settings->PlayRemoteFx;
420
421 case FreeRDP_PreferIPv6OverIPv4:
422 return settings->PreferIPv6OverIPv4;
423
424 case FreeRDP_PrintReconnectCookie:
425 return settings->PrintReconnectCookie;
426
427 case FreeRDP_PromptForCredentials:
428 return settings->PromptForCredentials;
429
430 case FreeRDP_RdpSecurity:
431 return settings->RdpSecurity;
432
433 case FreeRDP_RdstlsSecurity:
434 return settings->RdstlsSecurity;
435
436 case FreeRDP_RedirectClipboard:
437 return settings->RedirectClipboard;
438
439 case FreeRDP_RedirectDrives:
440 return settings->RedirectDrives;
441
442 case FreeRDP_RedirectHomeDrive:
443 return settings->RedirectHomeDrive;
444
445 case FreeRDP_RedirectParallelPorts:
446 return settings->RedirectParallelPorts;
447
448 case FreeRDP_RedirectPrinters:
449 return settings->RedirectPrinters;
450
451 case FreeRDP_RedirectSerialPorts:
452 return settings->RedirectSerialPorts;
453
454 case FreeRDP_RedirectSmartCards:
455 return settings->RedirectSmartCards;
456
457 case FreeRDP_RedirectWebAuthN:
458 return settings->RedirectWebAuthN;
459
460 case FreeRDP_RefreshRect:
461 return settings->RefreshRect;
462
463 case FreeRDP_RemdeskVirtualChannel:
464 return settings->RemdeskVirtualChannel;
465
466 case FreeRDP_RemoteAppLanguageBarSupported:
467 return settings->RemoteAppLanguageBarSupported;
468
469 case FreeRDP_RemoteApplicationMode:
470 return settings->RemoteApplicationMode;
471
472 case FreeRDP_RemoteAssistanceMode:
473 return settings->RemoteAssistanceMode;
474
475 case FreeRDP_RemoteAssistanceRequestControl:
476 return settings->RemoteAssistanceRequestControl;
477
478 case FreeRDP_RemoteConsoleAudio:
479 return settings->RemoteConsoleAudio;
480
481 case FreeRDP_RemoteCredentialGuard:
482 return settings->RemoteCredentialGuard;
483
484 case FreeRDP_RemoteFxCodec:
485 return settings->RemoteFxCodec;
486
487 case FreeRDP_RemoteFxImageCodec:
488 return settings->RemoteFxImageCodec;
489
490 case FreeRDP_RemoteFxOnly:
491 return settings->RemoteFxOnly;
492
493 case FreeRDP_RestrictedAdminModeRequired:
494 return settings->RestrictedAdminModeRequired;
495
496 case FreeRDP_SaltedChecksum:
497 return settings->SaltedChecksum;
498
499 case FreeRDP_SendPreconnectionPdu:
500 return settings->SendPreconnectionPdu;
501
502 case FreeRDP_ServerLicenseRequired:
503 return settings->ServerLicenseRequired;
504
505 case FreeRDP_ServerMode:
506 return settings->ServerMode;
507
508 case FreeRDP_SmartSizing:
509 return settings->SmartSizing;
510
511 case FreeRDP_SmartcardEmulation:
512 return settings->SmartcardEmulation;
513
514 case FreeRDP_SmartcardLogon:
515 return settings->SmartcardLogon;
516
517 case FreeRDP_SoftwareGdi:
518 return settings->SoftwareGdi;
519
520 case FreeRDP_SoundBeepsEnabled:
521 return settings->SoundBeepsEnabled;
522
523 case FreeRDP_SpanMonitors:
524 return settings->SpanMonitors;
525
526 case FreeRDP_SupportAsymetricKeys:
527 return settings->SupportAsymetricKeys;
528
529 case FreeRDP_SupportDisplayControl:
530 return settings->SupportDisplayControl;
531
532 case FreeRDP_SupportDynamicChannels:
533 return settings->SupportDynamicChannels;
534
535 case FreeRDP_SupportDynamicTimeZone:
536 return settings->SupportDynamicTimeZone;
537
538 case FreeRDP_SupportEchoChannel:
539 return settings->SupportEchoChannel;
540
541 case FreeRDP_SupportEdgeActionV1:
542 return settings->SupportEdgeActionV1;
543
544 case FreeRDP_SupportEdgeActionV2:
545 return settings->SupportEdgeActionV2;
546
547 case FreeRDP_SupportErrorInfoPdu:
548 return settings->SupportErrorInfoPdu;
549
550 case FreeRDP_SupportGeometryTracking:
551 return settings->SupportGeometryTracking;
552
553 case FreeRDP_SupportGraphicsPipeline:
554 return settings->SupportGraphicsPipeline;
555
556 case FreeRDP_SupportHeartbeatPdu:
557 return settings->SupportHeartbeatPdu;
558
559 case FreeRDP_SupportMonitorLayoutPdu:
560 return settings->SupportMonitorLayoutPdu;
561
562 case FreeRDP_SupportMultitransport:
563 return settings->SupportMultitransport;
564
565 case FreeRDP_SupportSSHAgentChannel:
566 return settings->SupportSSHAgentChannel;
567
568 case FreeRDP_SupportSkipChannelJoin:
569 return settings->SupportSkipChannelJoin;
570
571 case FreeRDP_SupportStatusInfoPdu:
572 return settings->SupportStatusInfoPdu;
573
574 case FreeRDP_SupportVideoOptimized:
575 return settings->SupportVideoOptimized;
576
577 case FreeRDP_SuppressOutput:
578 return settings->SuppressOutput;
579
580 case FreeRDP_SurfaceCommandsEnabled:
581 return settings->SurfaceCommandsEnabled;
582
583 case FreeRDP_SurfaceFrameMarkerEnabled:
584 return settings->SurfaceFrameMarkerEnabled;
585
586 case FreeRDP_SuspendInput:
587 return settings->SuspendInput;
588
589 case FreeRDP_SynchronousDynamicChannels:
590 return settings->SynchronousDynamicChannels;
591
592 case FreeRDP_SynchronousStaticChannels:
593 return settings->SynchronousStaticChannels;
594
595 case FreeRDP_TcpKeepAlive:
596 return settings->TcpKeepAlive;
597
598 case FreeRDP_TlsSecurity:
599 return settings->TlsSecurity;
600
601 case FreeRDP_ToggleFullscreen:
602 return settings->ToggleFullscreen;
603
604 case FreeRDP_TransportDump:
605 return settings->TransportDump;
606
607 case FreeRDP_TransportDumpReplay:
608 return settings->TransportDumpReplay;
609
610 case FreeRDP_TransportDumpReplayNodelay:
611 return settings->TransportDumpReplayNodelay;
612
613 case FreeRDP_UnicodeInput:
614 return settings->UnicodeInput;
615
616 case FreeRDP_UnmapButtons:
617 return settings->UnmapButtons;
618
619 case FreeRDP_UseCommonStdioCallbacks:
620 return settings->UseCommonStdioCallbacks;
621
622 case FreeRDP_UseMultimon:
623 return settings->UseMultimon;
624
625 case FreeRDP_UseRdpSecurityLayer:
626 return settings->UseRdpSecurityLayer;
627
628 case FreeRDP_UsingSavedCredentials:
629 return settings->UsingSavedCredentials;
630
631 case FreeRDP_VideoDisable:
632 return settings->VideoDisable;
633
634 case FreeRDP_VmConnectMode:
635 return settings->VmConnectMode;
636
637 case FreeRDP_WaitForOutputBufferFlush:
638 return settings->WaitForOutputBufferFlush;
639
640 case FreeRDP_Workarea:
641 return settings->Workarea;
642
643 default:
644 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
647 WINPR_ASSERT(FALSE);
648 return FALSE;
649 }
650}
651
652BOOL freerdp_settings_set_bool(WINPR_ATTR_UNUSED rdpSettings* settings,
653 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_Bool id, BOOL val)
654{
655 union
656 {
657 void* v;
658 const void* cv;
659 BOOL c;
660 const BOOL cc;
661 } cnv;
662 WINPR_ASSERT(settings);
663
664 cnv.c = val;
665
666 switch (id)
667 {
668 case FreeRDP_AadSecurity:
669 settings->AadSecurity = cnv.c;
670 break;
671
672 case FreeRDP_AllowCacheWaitingList:
673 settings->AllowCacheWaitingList = cnv.c;
674 break;
675
676 case FreeRDP_AllowDesktopComposition:
677 settings->AllowDesktopComposition = cnv.c;
678 break;
679
680 case FreeRDP_AllowFontSmoothing:
681 settings->AllowFontSmoothing = cnv.c;
682 break;
683
684 case FreeRDP_AllowUnanouncedOrdersFromServer:
685 settings->AllowUnanouncedOrdersFromServer = cnv.c;
686 break;
687
688 case FreeRDP_AltSecFrameMarkerSupport:
689 settings->AltSecFrameMarkerSupport = cnv.c;
690 break;
691
692 case FreeRDP_AsyncChannels:
693 settings->AsyncChannels = cnv.c;
694 break;
695
696 case FreeRDP_AsyncUpdate:
697 settings->AsyncUpdate = cnv.c;
698 break;
699
700 case FreeRDP_AudioCapture:
701 settings->AudioCapture = cnv.c;
702 break;
703
704 case FreeRDP_AudioPlayback:
705 settings->AudioPlayback = cnv.c;
706 break;
707
708 case FreeRDP_Authentication:
709 settings->Authentication = cnv.c;
710 break;
711
712 case FreeRDP_AuthenticationOnly:
713 settings->AuthenticationOnly = cnv.c;
714 break;
715
716 case FreeRDP_AutoAcceptCertificate:
717 settings->AutoAcceptCertificate = cnv.c;
718 break;
719
720 case FreeRDP_AutoDenyCertificate:
721 settings->AutoDenyCertificate = cnv.c;
722 break;
723
724 case FreeRDP_AutoLogonEnabled:
725 settings->AutoLogonEnabled = cnv.c;
726 break;
727
728 case FreeRDP_AutoReconnectionEnabled:
729 settings->AutoReconnectionEnabled = cnv.c;
730 break;
731
732 case FreeRDP_AutoReconnectionPacketSupported:
733 settings->AutoReconnectionPacketSupported = cnv.c;
734 break;
735
736 case FreeRDP_BitmapCacheEnabled:
737 settings->BitmapCacheEnabled = cnv.c;
738 break;
739
740 case FreeRDP_BitmapCachePersistEnabled:
741 settings->BitmapCachePersistEnabled = cnv.c;
742 break;
743
744 case FreeRDP_BitmapCacheV3Enabled:
745 settings->BitmapCacheV3Enabled = cnv.c;
746 break;
747
748 case FreeRDP_BitmapCompressionDisabled:
749 settings->BitmapCompressionDisabled = cnv.c;
750 break;
751
752 case FreeRDP_CertificateCallbackPreferPEM:
753 settings->CertificateCallbackPreferPEM = cnv.c;
754 break;
755
756 case FreeRDP_CompressionEnabled:
757 settings->CompressionEnabled = cnv.c;
758 break;
759
760 case FreeRDP_ConnectChildSession:
761 settings->ConnectChildSession = cnv.c;
762 break;
763
764 case FreeRDP_ConsoleSession:
765 settings->ConsoleSession = cnv.c;
766 break;
767
768 case FreeRDP_CredentialsFromStdin:
769 settings->CredentialsFromStdin = cnv.c;
770 break;
771
772 case FreeRDP_DeactivateClientDecoding:
773 settings->DeactivateClientDecoding = cnv.c;
774 break;
775
776 case FreeRDP_Decorations:
777 settings->Decorations = cnv.c;
778 break;
779
780 case FreeRDP_DesktopResize:
781 settings->DesktopResize = cnv.c;
782 break;
783
784 case FreeRDP_DeviceRedirection:
785 settings->DeviceRedirection = cnv.c;
786 break;
787
788 case FreeRDP_DisableCredentialsDelegation:
789 settings->DisableCredentialsDelegation = cnv.c;
790 break;
791
792 case FreeRDP_DisableCtrlAltDel:
793 settings->DisableCtrlAltDel = cnv.c;
794 break;
795
796 case FreeRDP_DisableCursorBlinking:
797 settings->DisableCursorBlinking = cnv.c;
798 break;
799
800 case FreeRDP_DisableCursorShadow:
801 settings->DisableCursorShadow = cnv.c;
802 break;
803
804 case FreeRDP_DisableFullWindowDrag:
805 settings->DisableFullWindowDrag = cnv.c;
806 break;
807
808 case FreeRDP_DisableMenuAnims:
809 settings->DisableMenuAnims = cnv.c;
810 break;
811
812 case FreeRDP_DisableRemoteAppCapsCheck:
813 settings->DisableRemoteAppCapsCheck = cnv.c;
814 break;
815
816 case FreeRDP_DisableThemes:
817 settings->DisableThemes = cnv.c;
818 break;
819
820 case FreeRDP_DisableWallpaper:
821 settings->DisableWallpaper = cnv.c;
822 break;
823
824 case FreeRDP_DrawAllowColorSubsampling:
825 settings->DrawAllowColorSubsampling = cnv.c;
826 break;
827
828 case FreeRDP_DrawAllowDynamicColorFidelity:
829 settings->DrawAllowDynamicColorFidelity = cnv.c;
830 break;
831
832 case FreeRDP_DrawAllowSkipAlpha:
833 settings->DrawAllowSkipAlpha = cnv.c;
834 break;
835
836 case FreeRDP_DrawGdiPlusCacheEnabled:
837 settings->DrawGdiPlusCacheEnabled = cnv.c;
838 break;
839
840 case FreeRDP_DrawGdiPlusEnabled:
841 settings->DrawGdiPlusEnabled = cnv.c;
842 break;
843
844 case FreeRDP_DrawNineGridEnabled:
845 settings->DrawNineGridEnabled = cnv.c;
846 break;
847
848 case FreeRDP_DumpRemoteFx:
849 settings->DumpRemoteFx = cnv.c;
850 break;
851
852 case FreeRDP_DynamicDaylightTimeDisabled:
853 settings->DynamicDaylightTimeDisabled = cnv.c;
854 break;
855
856 case FreeRDP_DynamicResolutionUpdate:
857 settings->DynamicResolutionUpdate = cnv.c;
858 break;
859
860 case FreeRDP_EmbeddedWindow:
861 settings->EmbeddedWindow = cnv.c;
862 break;
863
864 case FreeRDP_EnableWindowsKey:
865 settings->EnableWindowsKey = cnv.c;
866 break;
867
868 case FreeRDP_EncomspVirtualChannel:
869 settings->EncomspVirtualChannel = cnv.c;
870 break;
871
872 case FreeRDP_ExtSecurity:
873 settings->ExtSecurity = cnv.c;
874 break;
875
876 case FreeRDP_ExternalCertificateManagement:
877 settings->ExternalCertificateManagement = cnv.c;
878 break;
879
880 case FreeRDP_FIPSMode:
881 settings->FIPSMode = cnv.c;
882 break;
883
884 case FreeRDP_FastPathInput:
885 settings->FastPathInput = cnv.c;
886 break;
887
888 case FreeRDP_FastPathOutput:
889 settings->FastPathOutput = cnv.c;
890 break;
891
892 case FreeRDP_ForceEncryptedCsPdu:
893 settings->ForceEncryptedCsPdu = cnv.c;
894 break;
895
896 case FreeRDP_ForceMultimon:
897 settings->ForceMultimon = cnv.c;
898 break;
899
900 case FreeRDP_FrameMarkerCommandEnabled:
901 settings->FrameMarkerCommandEnabled = cnv.c;
902 break;
903
904 case FreeRDP_Fullscreen:
905 settings->Fullscreen = cnv.c;
906 break;
907
908 case FreeRDP_GatewayArmTransport:
909 settings->GatewayArmTransport = cnv.c;
910 break;
911
912 case FreeRDP_GatewayAvdUseTenantid:
913 settings->GatewayAvdUseTenantid = cnv.c;
914 break;
915
916 case FreeRDP_GatewayBypassLocal:
917 settings->GatewayBypassLocal = cnv.c;
918 break;
919
920 case FreeRDP_GatewayEnabled:
921 settings->GatewayEnabled = cnv.c;
922 break;
923
924 case FreeRDP_GatewayHttpExtAuthSspiNtlm:
925 settings->GatewayHttpExtAuthSspiNtlm = cnv.c;
926 break;
927
928 case FreeRDP_GatewayHttpTransport:
929 settings->GatewayHttpTransport = cnv.c;
930 break;
931
932 case FreeRDP_GatewayHttpUseWebsockets:
933 settings->GatewayHttpUseWebsockets = cnv.c;
934 break;
935
936 case FreeRDP_GatewayIgnoreRedirectionPolicy:
937 settings->GatewayIgnoreRedirectionPolicy = cnv.c;
938 break;
939
940 case FreeRDP_GatewayRpcTransport:
941 settings->GatewayRpcTransport = cnv.c;
942 break;
943
944 case FreeRDP_GatewayUdpTransport:
945 settings->GatewayUdpTransport = cnv.c;
946 break;
947
948 case FreeRDP_GatewayUseSameCredentials:
949 settings->GatewayUseSameCredentials = cnv.c;
950 break;
951
952 case FreeRDP_GfxAVC444:
953 settings->GfxAVC444 = cnv.c;
954 break;
955
956 case FreeRDP_GfxAVC444v2:
957 settings->GfxAVC444v2 = cnv.c;
958 break;
959
960 case FreeRDP_GfxH264:
961 settings->GfxH264 = cnv.c;
962 break;
963
964 case FreeRDP_GfxPlanar:
965 settings->GfxPlanar = cnv.c;
966 break;
967
968 case FreeRDP_GfxProgressive:
969 settings->GfxProgressive = cnv.c;
970 break;
971
972 case FreeRDP_GfxProgressiveV2:
973 settings->GfxProgressiveV2 = cnv.c;
974 break;
975
976 case FreeRDP_GfxSendQoeAck:
977 settings->GfxSendQoeAck = cnv.c;
978 break;
979
980 case FreeRDP_GfxSmallCache:
981 settings->GfxSmallCache = cnv.c;
982 break;
983
984 case FreeRDP_GfxSuspendFrameAck:
985 settings->GfxSuspendFrameAck = cnv.c;
986 break;
987
988 case FreeRDP_GfxThinClient:
989 settings->GfxThinClient = cnv.c;
990 break;
991
992 case FreeRDP_GrabKeyboard:
993 settings->GrabKeyboard = cnv.c;
994 break;
995
996 case FreeRDP_GrabMouse:
997 settings->GrabMouse = cnv.c;
998 break;
999
1000 case FreeRDP_HasExtendedMouseEvent:
1001 settings->HasExtendedMouseEvent = cnv.c;
1002 break;
1003
1004 case FreeRDP_HasHorizontalWheel:
1005 settings->HasHorizontalWheel = cnv.c;
1006 break;
1007
1008 case FreeRDP_HasMonitorAttributes:
1009 settings->HasMonitorAttributes = cnv.c;
1010 break;
1011
1012 case FreeRDP_HasQoeEvent:
1013 settings->HasQoeEvent = cnv.c;
1014 break;
1015
1016 case FreeRDP_HasRelativeMouseEvent:
1017 settings->HasRelativeMouseEvent = cnv.c;
1018 break;
1019
1020 case FreeRDP_HiDefRemoteApp:
1021 settings->HiDefRemoteApp = cnv.c;
1022 break;
1023
1024 case FreeRDP_IPv6Enabled:
1025 settings->IPv6Enabled = cnv.c;
1026 break;
1027
1028 case FreeRDP_IgnoreCertificate:
1029 settings->IgnoreCertificate = cnv.c;
1030 break;
1031
1032 case FreeRDP_IgnoreInvalidDevices:
1033 settings->IgnoreInvalidDevices = cnv.c;
1034 break;
1035
1036 case FreeRDP_JpegCodec:
1037 settings->JpegCodec = cnv.c;
1038 break;
1039
1040 case FreeRDP_KerberosRdgIsProxy:
1041 settings->KerberosRdgIsProxy = cnv.c;
1042 break;
1043
1044 case FreeRDP_ListMonitors:
1045 settings->ListMonitors = cnv.c;
1046 break;
1047
1048 case FreeRDP_LocalConnection:
1049 settings->LocalConnection = cnv.c;
1050 break;
1051
1052 case FreeRDP_LogonErrors:
1053 settings->LogonErrors = cnv.c;
1054 break;
1055
1056 case FreeRDP_LogonNotify:
1057 settings->LogonNotify = cnv.c;
1058 break;
1059
1060 case FreeRDP_LongCredentialsSupported:
1061 settings->LongCredentialsSupported = cnv.c;
1062 break;
1063
1064 case FreeRDP_LyncRdpMode:
1065 settings->LyncRdpMode = cnv.c;
1066 break;
1067
1068 case FreeRDP_MaximizeShell:
1069 settings->MaximizeShell = cnv.c;
1070 break;
1071
1072 case FreeRDP_MouseAttached:
1073 settings->MouseAttached = cnv.c;
1074 break;
1075
1076 case FreeRDP_MouseHasWheel:
1077 settings->MouseHasWheel = cnv.c;
1078 break;
1079
1080 case FreeRDP_MouseMotion:
1081 settings->MouseMotion = cnv.c;
1082 break;
1083
1084 case FreeRDP_MouseUseRelativeMove:
1085 settings->MouseUseRelativeMove = cnv.c;
1086 break;
1087
1088 case FreeRDP_MstscCookieMode:
1089 settings->MstscCookieMode = cnv.c;
1090 break;
1091
1092 case FreeRDP_MultiTouchGestures:
1093 settings->MultiTouchGestures = cnv.c;
1094 break;
1095
1096 case FreeRDP_MultiTouchInput:
1097 settings->MultiTouchInput = cnv.c;
1098 break;
1099
1100 case FreeRDP_NSCodec:
1101 settings->NSCodec = cnv.c;
1102 break;
1103
1104 case FreeRDP_NSCodecAllowDynamicColorFidelity:
1105 settings->NSCodecAllowDynamicColorFidelity = cnv.c;
1106 break;
1107
1108 case FreeRDP_NSCodecAllowSubsampling:
1109 settings->NSCodecAllowSubsampling = cnv.c;
1110 break;
1111
1112 case FreeRDP_NegotiateSecurityLayer:
1113 settings->NegotiateSecurityLayer = cnv.c;
1114 break;
1115
1116 case FreeRDP_NetworkAutoDetect:
1117 settings->NetworkAutoDetect = cnv.c;
1118 break;
1119
1120 case FreeRDP_NlaSecurity:
1121 settings->NlaSecurity = cnv.c;
1122 break;
1123
1124 case FreeRDP_NoBitmapCompressionHeader:
1125 settings->NoBitmapCompressionHeader = cnv.c;
1126 break;
1127
1128 case FreeRDP_OldLicenseBehaviour:
1129 settings->OldLicenseBehaviour = cnv.c;
1130 break;
1131
1132 case FreeRDP_PasswordIsSmartcardPin:
1133 settings->PasswordIsSmartcardPin = cnv.c;
1134 break;
1135
1136 case FreeRDP_PercentScreenUseHeight:
1137 settings->PercentScreenUseHeight = cnv.c;
1138 break;
1139
1140 case FreeRDP_PercentScreenUseWidth:
1141 settings->PercentScreenUseWidth = cnv.c;
1142 break;
1143
1144 case FreeRDP_PlayRemoteFx:
1145 settings->PlayRemoteFx = cnv.c;
1146 break;
1147
1148 case FreeRDP_PreferIPv6OverIPv4:
1149 settings->PreferIPv6OverIPv4 = cnv.c;
1150 break;
1151
1152 case FreeRDP_PrintReconnectCookie:
1153 settings->PrintReconnectCookie = cnv.c;
1154 break;
1155
1156 case FreeRDP_PromptForCredentials:
1157 settings->PromptForCredentials = cnv.c;
1158 break;
1159
1160 case FreeRDP_RdpSecurity:
1161 settings->RdpSecurity = cnv.c;
1162 break;
1163
1164 case FreeRDP_RdstlsSecurity:
1165 settings->RdstlsSecurity = cnv.c;
1166 break;
1167
1168 case FreeRDP_RedirectClipboard:
1169 settings->RedirectClipboard = cnv.c;
1170 break;
1171
1172 case FreeRDP_RedirectDrives:
1173 settings->RedirectDrives = cnv.c;
1174 break;
1175
1176 case FreeRDP_RedirectHomeDrive:
1177 settings->RedirectHomeDrive = cnv.c;
1178 break;
1179
1180 case FreeRDP_RedirectParallelPorts:
1181 settings->RedirectParallelPorts = cnv.c;
1182 break;
1183
1184 case FreeRDP_RedirectPrinters:
1185 settings->RedirectPrinters = cnv.c;
1186 break;
1187
1188 case FreeRDP_RedirectSerialPorts:
1189 settings->RedirectSerialPorts = cnv.c;
1190 break;
1191
1192 case FreeRDP_RedirectSmartCards:
1193 settings->RedirectSmartCards = cnv.c;
1194 break;
1195
1196 case FreeRDP_RedirectWebAuthN:
1197 settings->RedirectWebAuthN = cnv.c;
1198 break;
1199
1200 case FreeRDP_RefreshRect:
1201 settings->RefreshRect = cnv.c;
1202 break;
1203
1204 case FreeRDP_RemdeskVirtualChannel:
1205 settings->RemdeskVirtualChannel = cnv.c;
1206 break;
1207
1208 case FreeRDP_RemoteAppLanguageBarSupported:
1209 settings->RemoteAppLanguageBarSupported = cnv.c;
1210 break;
1211
1212 case FreeRDP_RemoteApplicationMode:
1213 settings->RemoteApplicationMode = cnv.c;
1214 break;
1215
1216 case FreeRDP_RemoteAssistanceMode:
1217 settings->RemoteAssistanceMode = cnv.c;
1218 break;
1219
1220 case FreeRDP_RemoteAssistanceRequestControl:
1221 settings->RemoteAssistanceRequestControl = cnv.c;
1222 break;
1223
1224 case FreeRDP_RemoteConsoleAudio:
1225 settings->RemoteConsoleAudio = cnv.c;
1226 break;
1227
1228 case FreeRDP_RemoteCredentialGuard:
1229 settings->RemoteCredentialGuard = cnv.c;
1230 break;
1231
1232 case FreeRDP_RemoteFxCodec:
1233 settings->RemoteFxCodec = cnv.c;
1234 break;
1235
1236 case FreeRDP_RemoteFxImageCodec:
1237 settings->RemoteFxImageCodec = cnv.c;
1238 break;
1239
1240 case FreeRDP_RemoteFxOnly:
1241 settings->RemoteFxOnly = cnv.c;
1242 break;
1243
1244 case FreeRDP_RestrictedAdminModeRequired:
1245 settings->RestrictedAdminModeRequired = cnv.c;
1246 break;
1247
1248 case FreeRDP_SaltedChecksum:
1249 settings->SaltedChecksum = cnv.c;
1250 break;
1251
1252 case FreeRDP_SendPreconnectionPdu:
1253 settings->SendPreconnectionPdu = cnv.c;
1254 break;
1255
1256 case FreeRDP_ServerLicenseRequired:
1257 settings->ServerLicenseRequired = cnv.c;
1258 break;
1259
1260 case FreeRDP_ServerMode:
1261 settings->ServerMode = cnv.c;
1262 break;
1263
1264 case FreeRDP_SmartSizing:
1265 settings->SmartSizing = cnv.c;
1266 break;
1267
1268 case FreeRDP_SmartcardEmulation:
1269 settings->SmartcardEmulation = cnv.c;
1270 break;
1271
1272 case FreeRDP_SmartcardLogon:
1273 settings->SmartcardLogon = cnv.c;
1274 break;
1275
1276 case FreeRDP_SoftwareGdi:
1277 settings->SoftwareGdi = cnv.c;
1278 break;
1279
1280 case FreeRDP_SoundBeepsEnabled:
1281 settings->SoundBeepsEnabled = cnv.c;
1282 break;
1283
1284 case FreeRDP_SpanMonitors:
1285 settings->SpanMonitors = cnv.c;
1286 break;
1287
1288 case FreeRDP_SupportAsymetricKeys:
1289 settings->SupportAsymetricKeys = cnv.c;
1290 break;
1291
1292 case FreeRDP_SupportDisplayControl:
1293 settings->SupportDisplayControl = cnv.c;
1294 break;
1295
1296 case FreeRDP_SupportDynamicChannels:
1297 settings->SupportDynamicChannels = cnv.c;
1298 break;
1299
1300 case FreeRDP_SupportDynamicTimeZone:
1301 settings->SupportDynamicTimeZone = cnv.c;
1302 break;
1303
1304 case FreeRDP_SupportEchoChannel:
1305 settings->SupportEchoChannel = cnv.c;
1306 break;
1307
1308 case FreeRDP_SupportEdgeActionV1:
1309 settings->SupportEdgeActionV1 = cnv.c;
1310 break;
1311
1312 case FreeRDP_SupportEdgeActionV2:
1313 settings->SupportEdgeActionV2 = cnv.c;
1314 break;
1315
1316 case FreeRDP_SupportErrorInfoPdu:
1317 settings->SupportErrorInfoPdu = cnv.c;
1318 break;
1319
1320 case FreeRDP_SupportGeometryTracking:
1321 settings->SupportGeometryTracking = cnv.c;
1322 break;
1323
1324 case FreeRDP_SupportGraphicsPipeline:
1325 settings->SupportGraphicsPipeline = cnv.c;
1326 break;
1327
1328 case FreeRDP_SupportHeartbeatPdu:
1329 settings->SupportHeartbeatPdu = cnv.c;
1330 break;
1331
1332 case FreeRDP_SupportMonitorLayoutPdu:
1333 settings->SupportMonitorLayoutPdu = cnv.c;
1334 break;
1335
1336 case FreeRDP_SupportMultitransport:
1337 settings->SupportMultitransport = cnv.c;
1338 break;
1339
1340 case FreeRDP_SupportSSHAgentChannel:
1341 settings->SupportSSHAgentChannel = cnv.c;
1342 break;
1343
1344 case FreeRDP_SupportSkipChannelJoin:
1345 settings->SupportSkipChannelJoin = cnv.c;
1346 break;
1347
1348 case FreeRDP_SupportStatusInfoPdu:
1349 settings->SupportStatusInfoPdu = cnv.c;
1350 break;
1351
1352 case FreeRDP_SupportVideoOptimized:
1353 settings->SupportVideoOptimized = cnv.c;
1354 break;
1355
1356 case FreeRDP_SuppressOutput:
1357 settings->SuppressOutput = cnv.c;
1358 break;
1359
1360 case FreeRDP_SurfaceCommandsEnabled:
1361 settings->SurfaceCommandsEnabled = cnv.c;
1362 break;
1363
1364 case FreeRDP_SurfaceFrameMarkerEnabled:
1365 settings->SurfaceFrameMarkerEnabled = cnv.c;
1366 break;
1367
1368 case FreeRDP_SuspendInput:
1369 settings->SuspendInput = cnv.c;
1370 break;
1371
1372 case FreeRDP_SynchronousDynamicChannels:
1373 settings->SynchronousDynamicChannels = cnv.c;
1374 break;
1375
1376 case FreeRDP_SynchronousStaticChannels:
1377 settings->SynchronousStaticChannels = cnv.c;
1378 break;
1379
1380 case FreeRDP_TcpKeepAlive:
1381 settings->TcpKeepAlive = cnv.c;
1382 break;
1383
1384 case FreeRDP_TlsSecurity:
1385 settings->TlsSecurity = cnv.c;
1386 break;
1387
1388 case FreeRDP_ToggleFullscreen:
1389 settings->ToggleFullscreen = cnv.c;
1390 break;
1391
1392 case FreeRDP_TransportDump:
1393 settings->TransportDump = cnv.c;
1394 break;
1395
1396 case FreeRDP_TransportDumpReplay:
1397 settings->TransportDumpReplay = cnv.c;
1398 break;
1399
1400 case FreeRDP_TransportDumpReplayNodelay:
1401 settings->TransportDumpReplayNodelay = cnv.c;
1402 break;
1403
1404 case FreeRDP_UnicodeInput:
1405 settings->UnicodeInput = cnv.c;
1406 break;
1407
1408 case FreeRDP_UnmapButtons:
1409 settings->UnmapButtons = cnv.c;
1410 break;
1411
1412 case FreeRDP_UseCommonStdioCallbacks:
1413 settings->UseCommonStdioCallbacks = cnv.c;
1414 break;
1415
1416 case FreeRDP_UseMultimon:
1417 settings->UseMultimon = cnv.c;
1418 break;
1419
1420 case FreeRDP_UseRdpSecurityLayer:
1421 settings->UseRdpSecurityLayer = cnv.c;
1422 break;
1423
1424 case FreeRDP_UsingSavedCredentials:
1425 settings->UsingSavedCredentials = cnv.c;
1426 break;
1427
1428 case FreeRDP_VideoDisable:
1429 settings->VideoDisable = cnv.c;
1430 break;
1431
1432 case FreeRDP_VmConnectMode:
1433 settings->VmConnectMode = cnv.c;
1434 break;
1435
1436 case FreeRDP_WaitForOutputBufferFlush:
1437 settings->WaitForOutputBufferFlush = cnv.c;
1438 break;
1439
1440 case FreeRDP_Workarea:
1441 settings->Workarea = cnv.c;
1442 break;
1443
1444 default:
1445 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
1448 return FALSE;
1449 }
1450 return TRUE;
1451}
1452
1453UINT16 freerdp_settings_get_uint16(WINPR_ATTR_UNUSED const rdpSettings* settings,
1454 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_UInt16 id)
1455{
1456 WINPR_ASSERT(settings);
1457
1458 switch (id)
1459 {
1460 case FreeRDP_CapsGeneralCompressionLevel:
1461 return settings->CapsGeneralCompressionLevel;
1462
1463 case FreeRDP_CapsGeneralCompressionTypes:
1464 return settings->CapsGeneralCompressionTypes;
1465
1466 case FreeRDP_CapsProtocolVersion:
1467 return settings->CapsProtocolVersion;
1468
1469 case FreeRDP_CapsRemoteUnshareFlag:
1470 return settings->CapsRemoteUnshareFlag;
1471
1472 case FreeRDP_CapsUpdateCapabilityFlag:
1473 return settings->CapsUpdateCapabilityFlag;
1474
1475 case FreeRDP_DesktopOrientation:
1476 return settings->DesktopOrientation;
1477
1478 case FreeRDP_OrderSupportFlags:
1479 return settings->OrderSupportFlags;
1480
1481 case FreeRDP_OrderSupportFlagsEx:
1482 return settings->OrderSupportFlagsEx;
1483
1484 case FreeRDP_ProxyPort:
1485 return settings->ProxyPort;
1486
1487 case FreeRDP_SupportedColorDepths:
1488 return settings->SupportedColorDepths;
1489
1490 case FreeRDP_TLSMaxVersion:
1491 return settings->TLSMaxVersion;
1492
1493 case FreeRDP_TLSMinVersion:
1494 return settings->TLSMinVersion;
1495
1496 case FreeRDP_TextANSICodePage:
1497 return settings->TextANSICodePage;
1498
1499 default:
1500 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
1503 WINPR_ASSERT(FALSE);
1504 return 0;
1505 }
1506}
1507
1508BOOL freerdp_settings_set_uint16(WINPR_ATTR_UNUSED rdpSettings* settings,
1509 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_UInt16 id, UINT16 val)
1510{
1511 union
1512 {
1513 void* v;
1514 const void* cv;
1515 UINT16 c;
1516 const UINT16 cc;
1517 } cnv;
1518 WINPR_ASSERT(settings);
1519
1520 cnv.c = val;
1521
1522 switch (id)
1523 {
1524 case FreeRDP_CapsGeneralCompressionLevel:
1525 settings->CapsGeneralCompressionLevel = cnv.c;
1526 break;
1527
1528 case FreeRDP_CapsGeneralCompressionTypes:
1529 settings->CapsGeneralCompressionTypes = cnv.c;
1530 break;
1531
1532 case FreeRDP_CapsProtocolVersion:
1533 settings->CapsProtocolVersion = cnv.c;
1534 break;
1535
1536 case FreeRDP_CapsRemoteUnshareFlag:
1537 settings->CapsRemoteUnshareFlag = cnv.c;
1538 break;
1539
1540 case FreeRDP_CapsUpdateCapabilityFlag:
1541 settings->CapsUpdateCapabilityFlag = cnv.c;
1542 break;
1543
1544 case FreeRDP_DesktopOrientation:
1545 settings->DesktopOrientation = cnv.c;
1546 break;
1547
1548 case FreeRDP_OrderSupportFlags:
1549 settings->OrderSupportFlags = cnv.c;
1550 break;
1551
1552 case FreeRDP_OrderSupportFlagsEx:
1553 settings->OrderSupportFlagsEx = cnv.c;
1554 break;
1555
1556 case FreeRDP_ProxyPort:
1557 settings->ProxyPort = cnv.c;
1558 break;
1559
1560 case FreeRDP_SupportedColorDepths:
1561 settings->SupportedColorDepths = cnv.c;
1562 break;
1563
1564 case FreeRDP_TLSMaxVersion:
1565 settings->TLSMaxVersion = cnv.c;
1566 break;
1567
1568 case FreeRDP_TLSMinVersion:
1569 settings->TLSMinVersion = cnv.c;
1570 break;
1571
1572 case FreeRDP_TextANSICodePage:
1573 settings->TextANSICodePage = cnv.c;
1574 break;
1575
1576 default:
1577 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
1580 return FALSE;
1581 }
1582 return TRUE;
1583}
1584
1585INT16 freerdp_settings_get_int16(WINPR_ATTR_UNUSED const rdpSettings* settings,
1586 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_Int16 id)
1587{
1588 WINPR_ASSERT(settings);
1589
1590 switch (id)
1591 {
1592 default:
1593 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
1596 WINPR_ASSERT(FALSE);
1597 return 0;
1598 }
1599}
1600
1601BOOL freerdp_settings_set_int16(WINPR_ATTR_UNUSED rdpSettings* settings,
1602 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_Int16 id, INT16 val)
1603{
1604 union
1605 {
1606 void* v;
1607 const void* cv;
1608 INT16 c;
1609 const INT16 cc;
1610 } cnv;
1611 WINPR_ASSERT(settings);
1612
1613 cnv.c = val;
1614
1615 switch (id)
1616 {
1617 default:
1618 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
1621 return FALSE;
1622 }
1623 return TRUE;
1624}
1625
1626UINT32 freerdp_settings_get_uint32(WINPR_ATTR_UNUSED const rdpSettings* settings,
1627 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_UInt32 id)
1628{
1629 WINPR_ASSERT(settings);
1630
1631 switch (id)
1632 {
1633 case FreeRDP_AcceptedCertLength:
1634 return settings->AcceptedCertLength;
1635
1636 case FreeRDP_AuthenticationLevel:
1637 return settings->AuthenticationLevel;
1638
1639 case FreeRDP_AutoReconnectMaxRetries:
1640 return settings->AutoReconnectMaxRetries;
1641
1642 case FreeRDP_BitmapCacheV2NumCells:
1643 return settings->BitmapCacheV2NumCells;
1644
1645 case FreeRDP_BitmapCacheV3CodecId:
1646 return settings->BitmapCacheV3CodecId;
1647
1648 case FreeRDP_BitmapCacheVersion:
1649 return settings->BitmapCacheVersion;
1650
1651 case FreeRDP_BrushSupportLevel:
1652 return settings->BrushSupportLevel;
1653
1654 case FreeRDP_ChannelCount:
1655 return settings->ChannelCount;
1656
1657 case FreeRDP_ChannelDefArraySize:
1658 return settings->ChannelDefArraySize;
1659
1660 case FreeRDP_ClientBuild:
1661 return settings->ClientBuild;
1662
1663 case FreeRDP_ClientRandomLength:
1664 return settings->ClientRandomLength;
1665
1666 case FreeRDP_ClientSessionId:
1667 return settings->ClientSessionId;
1668
1669 case FreeRDP_ClipboardFeatureMask:
1670 return settings->ClipboardFeatureMask;
1671
1672 case FreeRDP_ClusterInfoFlags:
1673 return settings->ClusterInfoFlags;
1674
1675 case FreeRDP_ColorDepth:
1676 return settings->ColorDepth;
1677
1678 case FreeRDP_ColorPointerCacheSize:
1679 return settings->ColorPointerCacheSize;
1680
1681 case FreeRDP_CompDeskSupportLevel:
1682 return settings->CompDeskSupportLevel;
1683
1684 case FreeRDP_CompressionLevel:
1685 return settings->CompressionLevel;
1686
1687 case FreeRDP_ConnectionType:
1688 return settings->ConnectionType;
1689
1690 case FreeRDP_CookieMaxLength:
1691 return settings->CookieMaxLength;
1692
1693 case FreeRDP_DesktopHeight:
1694 return settings->DesktopHeight;
1695
1696 case FreeRDP_DesktopPhysicalHeight:
1697 return settings->DesktopPhysicalHeight;
1698
1699 case FreeRDP_DesktopPhysicalWidth:
1700 return settings->DesktopPhysicalWidth;
1701
1702 case FreeRDP_DesktopPosX:
1703 return settings->DesktopPosX;
1704
1705 case FreeRDP_DesktopPosY:
1706 return settings->DesktopPosY;
1707
1708 case FreeRDP_DesktopScaleFactor:
1709 return settings->DesktopScaleFactor;
1710
1711 case FreeRDP_DesktopWidth:
1712 return settings->DesktopWidth;
1713
1714 case FreeRDP_DeviceArraySize:
1715 return settings->DeviceArraySize;
1716
1717 case FreeRDP_DeviceCount:
1718 return settings->DeviceCount;
1719
1720 case FreeRDP_DeviceScaleFactor:
1721 return settings->DeviceScaleFactor;
1722
1723 case FreeRDP_DrawNineGridCacheEntries:
1724 return settings->DrawNineGridCacheEntries;
1725
1726 case FreeRDP_DrawNineGridCacheSize:
1727 return settings->DrawNineGridCacheSize;
1728
1729 case FreeRDP_DynamicChannelArraySize:
1730 return settings->DynamicChannelArraySize;
1731
1732 case FreeRDP_DynamicChannelCount:
1733 return settings->DynamicChannelCount;
1734
1735 case FreeRDP_EarlyCapabilityFlags:
1736 return settings->EarlyCapabilityFlags;
1737
1738 case FreeRDP_EncryptionLevel:
1739 return settings->EncryptionLevel;
1740
1741 case FreeRDP_EncryptionMethods:
1742 return settings->EncryptionMethods;
1743
1744 case FreeRDP_ExtEncryptionMethods:
1745 return settings->ExtEncryptionMethods;
1746
1747 case FreeRDP_FakeMouseMotionInterval:
1748 return settings->FakeMouseMotionInterval;
1749
1750 case FreeRDP_Floatbar:
1751 return settings->Floatbar;
1752
1753 case FreeRDP_ForceIPvX:
1754 return settings->ForceIPvX;
1755
1756 case FreeRDP_FrameAcknowledge:
1757 return settings->FrameAcknowledge;
1758
1759 case FreeRDP_GatewayAcceptedCertLength:
1760 return settings->GatewayAcceptedCertLength;
1761
1762 case FreeRDP_GatewayCredentialsSource:
1763 return settings->GatewayCredentialsSource;
1764
1765 case FreeRDP_GatewayPort:
1766 return settings->GatewayPort;
1767
1768 case FreeRDP_GatewayUsageMethod:
1769 return settings->GatewayUsageMethod;
1770
1771 case FreeRDP_GfxCapsFilter:
1772 return settings->GfxCapsFilter;
1773
1774 case FreeRDP_GlyphSupportLevel:
1775 return settings->GlyphSupportLevel;
1776
1777 case FreeRDP_JpegCodecId:
1778 return settings->JpegCodecId;
1779
1780 case FreeRDP_JpegQuality:
1781 return settings->JpegQuality;
1782
1783 case FreeRDP_KeySpec:
1784 return settings->KeySpec;
1785
1786 case FreeRDP_KeyboardCodePage:
1787 return settings->KeyboardCodePage;
1788
1789 case FreeRDP_KeyboardFunctionKey:
1790 return settings->KeyboardFunctionKey;
1791
1792 case FreeRDP_KeyboardHook:
1793 return settings->KeyboardHook;
1794
1795 case FreeRDP_KeyboardLayout:
1796 return settings->KeyboardLayout;
1797
1798 case FreeRDP_KeyboardSubType:
1799 return settings->KeyboardSubType;
1800
1801 case FreeRDP_KeyboardType:
1802 return settings->KeyboardType;
1803
1804 case FreeRDP_LargePointerFlag:
1805 return settings->LargePointerFlag;
1806
1807 case FreeRDP_LoadBalanceInfoLength:
1808 return settings->LoadBalanceInfoLength;
1809
1810 case FreeRDP_MonitorAttributeFlags:
1811 return settings->MonitorAttributeFlags;
1812
1813 case FreeRDP_MonitorCount:
1814 return settings->MonitorCount;
1815
1816 case FreeRDP_MonitorDefArraySize:
1817 return settings->MonitorDefArraySize;
1818
1819 case FreeRDP_MonitorFlags:
1820 return settings->MonitorFlags;
1821
1822 case FreeRDP_MultifragMaxRequestSize:
1823 return settings->MultifragMaxRequestSize;
1824
1825 case FreeRDP_MultitransportFlags:
1826 return settings->MultitransportFlags;
1827
1828 case FreeRDP_NSCodecColorLossLevel:
1829 return settings->NSCodecColorLossLevel;
1830
1831 case FreeRDP_NSCodecId:
1832 return settings->NSCodecId;
1833
1834 case FreeRDP_NegotiationFlags:
1835 return settings->NegotiationFlags;
1836
1837 case FreeRDP_NumMonitorIds:
1838 return settings->NumMonitorIds;
1839
1840 case FreeRDP_OffscreenCacheEntries:
1841 return settings->OffscreenCacheEntries;
1842
1843 case FreeRDP_OffscreenCacheSize:
1844 return settings->OffscreenCacheSize;
1845
1846 case FreeRDP_OffscreenSupportLevel:
1847 return settings->OffscreenSupportLevel;
1848
1849 case FreeRDP_OsMajorType:
1850 return settings->OsMajorType;
1851
1852 case FreeRDP_OsMinorType:
1853 return settings->OsMinorType;
1854
1855 case FreeRDP_Password51Length:
1856 return settings->Password51Length;
1857
1858 case FreeRDP_PduSource:
1859 return settings->PduSource;
1860
1861 case FreeRDP_PercentScreen:
1862 return settings->PercentScreen;
1863
1864 case FreeRDP_PerformanceFlags:
1865 return settings->PerformanceFlags;
1866
1867 case FreeRDP_PointerCacheSize:
1868 return settings->PointerCacheSize;
1869
1870 case FreeRDP_PreconnectionId:
1871 return settings->PreconnectionId;
1872
1873 case FreeRDP_ProxyType:
1874 return settings->ProxyType;
1875
1876 case FreeRDP_RdpVersion:
1877 return settings->RdpVersion;
1878
1879 case FreeRDP_ReceivedCapabilitiesSize:
1880 return settings->ReceivedCapabilitiesSize;
1881
1882 case FreeRDP_RedirectedSessionId:
1883 return settings->RedirectedSessionId;
1884
1885 case FreeRDP_RedirectionAcceptedCertLength:
1886 return settings->RedirectionAcceptedCertLength;
1887
1888 case FreeRDP_RedirectionFlags:
1889 return settings->RedirectionFlags;
1890
1891 case FreeRDP_RedirectionGuidLength:
1892 return settings->RedirectionGuidLength;
1893
1894 case FreeRDP_RedirectionPasswordLength:
1895 return settings->RedirectionPasswordLength;
1896
1897 case FreeRDP_RedirectionPreferType:
1898 return settings->RedirectionPreferType;
1899
1900 case FreeRDP_RedirectionTsvUrlLength:
1901 return settings->RedirectionTsvUrlLength;
1902
1903 case FreeRDP_RemoteAppNumIconCacheEntries:
1904 return settings->RemoteAppNumIconCacheEntries;
1905
1906 case FreeRDP_RemoteAppNumIconCaches:
1907 return settings->RemoteAppNumIconCaches;
1908
1909 case FreeRDP_RemoteApplicationExpandCmdLine:
1910 return settings->RemoteApplicationExpandCmdLine;
1911
1912 case FreeRDP_RemoteApplicationExpandWorkingDir:
1913 return settings->RemoteApplicationExpandWorkingDir;
1914
1915 case FreeRDP_RemoteApplicationSupportLevel:
1916 return settings->RemoteApplicationSupportLevel;
1917
1918 case FreeRDP_RemoteApplicationSupportMask:
1919 return settings->RemoteApplicationSupportMask;
1920
1921 case FreeRDP_RemoteFxCaptureFlags:
1922 return settings->RemoteFxCaptureFlags;
1923
1924 case FreeRDP_RemoteFxCodecId:
1925 return settings->RemoteFxCodecId;
1926
1927 case FreeRDP_RemoteFxCodecMode:
1928 return settings->RemoteFxCodecMode;
1929
1930 case FreeRDP_RemoteFxRlgrMode:
1931 return settings->RemoteFxRlgrMode;
1932
1933 case FreeRDP_RemoteWndSupportLevel:
1934 return settings->RemoteWndSupportLevel;
1935
1936 case FreeRDP_RequestedProtocols:
1937 return settings->RequestedProtocols;
1938
1939 case FreeRDP_SelectedProtocol:
1940 return settings->SelectedProtocol;
1941
1942 case FreeRDP_ServerCertificateLength:
1943 return settings->ServerCertificateLength;
1944
1945 case FreeRDP_ServerLicenseProductIssuersCount:
1946 return settings->ServerLicenseProductIssuersCount;
1947
1948 case FreeRDP_ServerLicenseProductVersion:
1949 return settings->ServerLicenseProductVersion;
1950
1951 case FreeRDP_ServerPort:
1952 return settings->ServerPort;
1953
1954 case FreeRDP_ServerRandomLength:
1955 return settings->ServerRandomLength;
1956
1957 case FreeRDP_ShareId:
1958 return settings->ShareId;
1959
1960 case FreeRDP_SmartSizingHeight:
1961 return settings->SmartSizingHeight;
1962
1963 case FreeRDP_SmartSizingWidth:
1964 return settings->SmartSizingWidth;
1965
1966 case FreeRDP_StaticChannelArraySize:
1967 return settings->StaticChannelArraySize;
1968
1969 case FreeRDP_StaticChannelCount:
1970 return settings->StaticChannelCount;
1971
1972 case FreeRDP_SurfaceCommandsSupported:
1973 return settings->SurfaceCommandsSupported;
1974
1975 case FreeRDP_TargetNetAddressCount:
1976 return settings->TargetNetAddressCount;
1977
1978 case FreeRDP_TcpAckTimeout:
1979 return settings->TcpAckTimeout;
1980
1981 case FreeRDP_TcpConnectTimeout:
1982 return settings->TcpConnectTimeout;
1983
1984 case FreeRDP_TcpKeepAliveDelay:
1985 return settings->TcpKeepAliveDelay;
1986
1987 case FreeRDP_TcpKeepAliveInterval:
1988 return settings->TcpKeepAliveInterval;
1989
1990 case FreeRDP_TcpKeepAliveRetries:
1991 return settings->TcpKeepAliveRetries;
1992
1993 case FreeRDP_ThreadingFlags:
1994 return settings->ThreadingFlags;
1995
1996 case FreeRDP_TlsSecLevel:
1997 return settings->TlsSecLevel;
1998
1999 case FreeRDP_VCChunkSize:
2000 return settings->VCChunkSize;
2001
2002 case FreeRDP_VCFlags:
2003 return settings->VCFlags;
2004
2005#if !defined(WITHOUT_FREERDP_3x_DEPRECATED)
2006 // API Compatibility section, remove with FreeRDP 4.x
2007 case (FreeRDP_Settings_Keys_UInt32)FreeRDP_MonitorLocalShiftX:
2008 return (UINT32)settings->MonitorLocalShiftX;
2009
2010 // API Compatibility section, remove with FreeRDP 4.x
2011 case (FreeRDP_Settings_Keys_UInt32)FreeRDP_MonitorLocalShiftY:
2012 return (UINT32)settings->MonitorLocalShiftY;
2013
2014#endif
2015 default:
2016 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2019 WINPR_ASSERT(FALSE);
2020 return 0;
2021 }
2022}
2023
2024BOOL freerdp_settings_set_uint32(WINPR_ATTR_UNUSED rdpSettings* settings,
2025 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_UInt32 id, UINT32 val)
2026{
2027 union
2028 {
2029 void* v;
2030 const void* cv;
2031 UINT32 c;
2032 const UINT32 cc;
2033 } cnv;
2034 WINPR_ASSERT(settings);
2035
2036 cnv.c = val;
2037
2038 switch (id)
2039 {
2040 case FreeRDP_AcceptedCertLength:
2041 settings->AcceptedCertLength = cnv.c;
2042 break;
2043
2044 case FreeRDP_AuthenticationLevel:
2045 settings->AuthenticationLevel = cnv.c;
2046 break;
2047
2048 case FreeRDP_AutoReconnectMaxRetries:
2049 settings->AutoReconnectMaxRetries = cnv.c;
2050 break;
2051
2052 case FreeRDP_BitmapCacheV2NumCells:
2053 settings->BitmapCacheV2NumCells = cnv.c;
2054 break;
2055
2056 case FreeRDP_BitmapCacheV3CodecId:
2057 settings->BitmapCacheV3CodecId = cnv.c;
2058 break;
2059
2060 case FreeRDP_BitmapCacheVersion:
2061 settings->BitmapCacheVersion = cnv.c;
2062 break;
2063
2064 case FreeRDP_BrushSupportLevel:
2065 settings->BrushSupportLevel = cnv.c;
2066 break;
2067
2068 case FreeRDP_ChannelCount:
2069 settings->ChannelCount = cnv.c;
2070 break;
2071
2072 case FreeRDP_ChannelDefArraySize:
2073 settings->ChannelDefArraySize = cnv.c;
2074 break;
2075
2076 case FreeRDP_ClientBuild:
2077 settings->ClientBuild = cnv.c;
2078 break;
2079
2080 case FreeRDP_ClientRandomLength:
2081 settings->ClientRandomLength = cnv.c;
2082 break;
2083
2084 case FreeRDP_ClientSessionId:
2085 settings->ClientSessionId = cnv.c;
2086 break;
2087
2088 case FreeRDP_ClipboardFeatureMask:
2089 settings->ClipboardFeatureMask = cnv.c;
2090 break;
2091
2092 case FreeRDP_ClusterInfoFlags:
2093 settings->ClusterInfoFlags = cnv.c;
2094 break;
2095
2096 case FreeRDP_ColorDepth:
2097 settings->ColorDepth = cnv.c;
2098 break;
2099
2100 case FreeRDP_ColorPointerCacheSize:
2101 settings->ColorPointerCacheSize = cnv.c;
2102 break;
2103
2104 case FreeRDP_CompDeskSupportLevel:
2105 settings->CompDeskSupportLevel = cnv.c;
2106 break;
2107
2108 case FreeRDP_CompressionLevel:
2109 settings->CompressionLevel = cnv.c;
2110 break;
2111
2112 case FreeRDP_ConnectionType:
2113 settings->ConnectionType = cnv.c;
2114 break;
2115
2116 case FreeRDP_CookieMaxLength:
2117 settings->CookieMaxLength = cnv.c;
2118 break;
2119
2120 case FreeRDP_DesktopHeight:
2121 settings->DesktopHeight = cnv.c;
2122 break;
2123
2124 case FreeRDP_DesktopPhysicalHeight:
2125 settings->DesktopPhysicalHeight = cnv.c;
2126 break;
2127
2128 case FreeRDP_DesktopPhysicalWidth:
2129 settings->DesktopPhysicalWidth = cnv.c;
2130 break;
2131
2132 case FreeRDP_DesktopPosX:
2133 settings->DesktopPosX = cnv.c;
2134 break;
2135
2136 case FreeRDP_DesktopPosY:
2137 settings->DesktopPosY = cnv.c;
2138 break;
2139
2140 case FreeRDP_DesktopScaleFactor:
2141 settings->DesktopScaleFactor = cnv.c;
2142 break;
2143
2144 case FreeRDP_DesktopWidth:
2145 settings->DesktopWidth = cnv.c;
2146 break;
2147
2148 case FreeRDP_DeviceArraySize:
2149 settings->DeviceArraySize = cnv.c;
2150 break;
2151
2152 case FreeRDP_DeviceCount:
2153 settings->DeviceCount = cnv.c;
2154 break;
2155
2156 case FreeRDP_DeviceScaleFactor:
2157 settings->DeviceScaleFactor = cnv.c;
2158 break;
2159
2160 case FreeRDP_DrawNineGridCacheEntries:
2161 settings->DrawNineGridCacheEntries = cnv.c;
2162 break;
2163
2164 case FreeRDP_DrawNineGridCacheSize:
2165 settings->DrawNineGridCacheSize = cnv.c;
2166 break;
2167
2168 case FreeRDP_DynamicChannelArraySize:
2169 settings->DynamicChannelArraySize = cnv.c;
2170 break;
2171
2172 case FreeRDP_DynamicChannelCount:
2173 settings->DynamicChannelCount = cnv.c;
2174 break;
2175
2176 case FreeRDP_EarlyCapabilityFlags:
2177 settings->EarlyCapabilityFlags = cnv.c;
2178 break;
2179
2180 case FreeRDP_EncryptionLevel:
2181 settings->EncryptionLevel = cnv.c;
2182 break;
2183
2184 case FreeRDP_EncryptionMethods:
2185 settings->EncryptionMethods = cnv.c;
2186 break;
2187
2188 case FreeRDP_ExtEncryptionMethods:
2189 settings->ExtEncryptionMethods = cnv.c;
2190 break;
2191
2192 case FreeRDP_FakeMouseMotionInterval:
2193 settings->FakeMouseMotionInterval = cnv.c;
2194 break;
2195
2196 case FreeRDP_Floatbar:
2197 settings->Floatbar = cnv.c;
2198 break;
2199
2200 case FreeRDP_ForceIPvX:
2201 settings->ForceIPvX = cnv.c;
2202 break;
2203
2204 case FreeRDP_FrameAcknowledge:
2205 settings->FrameAcknowledge = cnv.c;
2206 break;
2207
2208 case FreeRDP_GatewayAcceptedCertLength:
2209 settings->GatewayAcceptedCertLength = cnv.c;
2210 break;
2211
2212 case FreeRDP_GatewayCredentialsSource:
2213 settings->GatewayCredentialsSource = cnv.c;
2214 break;
2215
2216 case FreeRDP_GatewayPort:
2217 settings->GatewayPort = cnv.c;
2218 break;
2219
2220 case FreeRDP_GatewayUsageMethod:
2221 settings->GatewayUsageMethod = cnv.c;
2222 break;
2223
2224 case FreeRDP_GfxCapsFilter:
2225 settings->GfxCapsFilter = cnv.c;
2226 break;
2227
2228 case FreeRDP_GlyphSupportLevel:
2229 settings->GlyphSupportLevel = cnv.c;
2230 break;
2231
2232 case FreeRDP_JpegCodecId:
2233 settings->JpegCodecId = cnv.c;
2234 break;
2235
2236 case FreeRDP_JpegQuality:
2237 settings->JpegQuality = cnv.c;
2238 break;
2239
2240 case FreeRDP_KeySpec:
2241 settings->KeySpec = cnv.c;
2242 break;
2243
2244 case FreeRDP_KeyboardCodePage:
2245 settings->KeyboardCodePage = cnv.c;
2246 break;
2247
2248 case FreeRDP_KeyboardFunctionKey:
2249 settings->KeyboardFunctionKey = cnv.c;
2250 break;
2251
2252 case FreeRDP_KeyboardHook:
2253 settings->KeyboardHook = cnv.c;
2254 break;
2255
2256 case FreeRDP_KeyboardLayout:
2257 settings->KeyboardLayout = cnv.c;
2258 break;
2259
2260 case FreeRDP_KeyboardSubType:
2261 settings->KeyboardSubType = cnv.c;
2262 break;
2263
2264 case FreeRDP_KeyboardType:
2265 settings->KeyboardType = cnv.c;
2266 break;
2267
2268 case FreeRDP_LargePointerFlag:
2269 settings->LargePointerFlag = cnv.c;
2270 break;
2271
2272 case FreeRDP_LoadBalanceInfoLength:
2273 settings->LoadBalanceInfoLength = cnv.c;
2274 break;
2275
2276 case FreeRDP_MonitorAttributeFlags:
2277 settings->MonitorAttributeFlags = cnv.c;
2278 break;
2279
2280 case FreeRDP_MonitorCount:
2281 settings->MonitorCount = cnv.c;
2282 break;
2283
2284 case FreeRDP_MonitorDefArraySize:
2285 settings->MonitorDefArraySize = cnv.c;
2286 break;
2287
2288 case FreeRDP_MonitorFlags:
2289 settings->MonitorFlags = cnv.c;
2290 break;
2291
2292 case FreeRDP_MultifragMaxRequestSize:
2293 settings->MultifragMaxRequestSize = cnv.c;
2294 break;
2295
2296 case FreeRDP_MultitransportFlags:
2297 settings->MultitransportFlags = cnv.c;
2298 break;
2299
2300 case FreeRDP_NSCodecColorLossLevel:
2301 settings->NSCodecColorLossLevel = cnv.c;
2302 break;
2303
2304 case FreeRDP_NSCodecId:
2305 settings->NSCodecId = cnv.c;
2306 break;
2307
2308 case FreeRDP_NegotiationFlags:
2309 settings->NegotiationFlags = cnv.c;
2310 break;
2311
2312 case FreeRDP_NumMonitorIds:
2313 settings->NumMonitorIds = cnv.c;
2314 break;
2315
2316 case FreeRDP_OffscreenCacheEntries:
2317 settings->OffscreenCacheEntries = cnv.c;
2318 break;
2319
2320 case FreeRDP_OffscreenCacheSize:
2321 settings->OffscreenCacheSize = cnv.c;
2322 break;
2323
2324 case FreeRDP_OffscreenSupportLevel:
2325 settings->OffscreenSupportLevel = cnv.c;
2326 break;
2327
2328 case FreeRDP_OsMajorType:
2329 settings->OsMajorType = cnv.c;
2330 break;
2331
2332 case FreeRDP_OsMinorType:
2333 settings->OsMinorType = cnv.c;
2334 break;
2335
2336 case FreeRDP_Password51Length:
2337 settings->Password51Length = cnv.c;
2338 break;
2339
2340 case FreeRDP_PduSource:
2341 settings->PduSource = cnv.c;
2342 break;
2343
2344 case FreeRDP_PercentScreen:
2345 settings->PercentScreen = cnv.c;
2346 break;
2347
2348 case FreeRDP_PerformanceFlags:
2349 settings->PerformanceFlags = cnv.c;
2350 break;
2351
2352 case FreeRDP_PointerCacheSize:
2353 settings->PointerCacheSize = cnv.c;
2354 break;
2355
2356 case FreeRDP_PreconnectionId:
2357 settings->PreconnectionId = cnv.c;
2358 break;
2359
2360 case FreeRDP_ProxyType:
2361 settings->ProxyType = cnv.c;
2362 break;
2363
2364 case FreeRDP_RdpVersion:
2365 settings->RdpVersion = cnv.c;
2366 break;
2367
2368 case FreeRDP_ReceivedCapabilitiesSize:
2369 return freerdp_capability_buffer_resize(settings, cnv.c);
2370
2371 case FreeRDP_RedirectedSessionId:
2372 settings->RedirectedSessionId = cnv.c;
2373 break;
2374
2375 case FreeRDP_RedirectionAcceptedCertLength:
2376 settings->RedirectionAcceptedCertLength = cnv.c;
2377 break;
2378
2379 case FreeRDP_RedirectionFlags:
2380 settings->RedirectionFlags = cnv.c;
2381 break;
2382
2383 case FreeRDP_RedirectionGuidLength:
2384 settings->RedirectionGuidLength = cnv.c;
2385 break;
2386
2387 case FreeRDP_RedirectionPasswordLength:
2388 settings->RedirectionPasswordLength = cnv.c;
2389 break;
2390
2391 case FreeRDP_RedirectionPreferType:
2392 settings->RedirectionPreferType = cnv.c;
2393 break;
2394
2395 case FreeRDP_RedirectionTsvUrlLength:
2396 settings->RedirectionTsvUrlLength = cnv.c;
2397 break;
2398
2399 case FreeRDP_RemoteAppNumIconCacheEntries:
2400 settings->RemoteAppNumIconCacheEntries = cnv.c;
2401 break;
2402
2403 case FreeRDP_RemoteAppNumIconCaches:
2404 settings->RemoteAppNumIconCaches = cnv.c;
2405 break;
2406
2407 case FreeRDP_RemoteApplicationExpandCmdLine:
2408 settings->RemoteApplicationExpandCmdLine = cnv.c;
2409 break;
2410
2411 case FreeRDP_RemoteApplicationExpandWorkingDir:
2412 settings->RemoteApplicationExpandWorkingDir = cnv.c;
2413 break;
2414
2415 case FreeRDP_RemoteApplicationSupportLevel:
2416 settings->RemoteApplicationSupportLevel = cnv.c;
2417 break;
2418
2419 case FreeRDP_RemoteApplicationSupportMask:
2420 settings->RemoteApplicationSupportMask = cnv.c;
2421 break;
2422
2423 case FreeRDP_RemoteFxCaptureFlags:
2424 settings->RemoteFxCaptureFlags = cnv.c;
2425 break;
2426
2427 case FreeRDP_RemoteFxCodecId:
2428 settings->RemoteFxCodecId = cnv.c;
2429 break;
2430
2431 case FreeRDP_RemoteFxCodecMode:
2432 settings->RemoteFxCodecMode = cnv.c;
2433 break;
2434
2435 case FreeRDP_RemoteFxRlgrMode:
2436 settings->RemoteFxRlgrMode = cnv.c;
2437 break;
2438
2439 case FreeRDP_RemoteWndSupportLevel:
2440 settings->RemoteWndSupportLevel = cnv.c;
2441 break;
2442
2443 case FreeRDP_RequestedProtocols:
2444 settings->RequestedProtocols = cnv.c;
2445 break;
2446
2447 case FreeRDP_SelectedProtocol:
2448 settings->SelectedProtocol = cnv.c;
2449 break;
2450
2451 case FreeRDP_ServerCertificateLength:
2452 settings->ServerCertificateLength = cnv.c;
2453 break;
2454
2455 case FreeRDP_ServerLicenseProductIssuersCount:
2456 settings->ServerLicenseProductIssuersCount = cnv.c;
2457 break;
2458
2459 case FreeRDP_ServerLicenseProductVersion:
2460 settings->ServerLicenseProductVersion = cnv.c;
2461 break;
2462
2463 case FreeRDP_ServerPort:
2464 settings->ServerPort = cnv.c;
2465 break;
2466
2467 case FreeRDP_ServerRandomLength:
2468 settings->ServerRandomLength = cnv.c;
2469 break;
2470
2471 case FreeRDP_ShareId:
2472 settings->ShareId = cnv.c;
2473 break;
2474
2475 case FreeRDP_SmartSizingHeight:
2476 settings->SmartSizingHeight = cnv.c;
2477 break;
2478
2479 case FreeRDP_SmartSizingWidth:
2480 settings->SmartSizingWidth = cnv.c;
2481 break;
2482
2483 case FreeRDP_StaticChannelArraySize:
2484 settings->StaticChannelArraySize = cnv.c;
2485 break;
2486
2487 case FreeRDP_StaticChannelCount:
2488 settings->StaticChannelCount = cnv.c;
2489 break;
2490
2491 case FreeRDP_SurfaceCommandsSupported:
2492 settings->SurfaceCommandsSupported = cnv.c;
2493 break;
2494
2495 case FreeRDP_TargetNetAddressCount:
2496 return freerdp_target_net_addresses_resize(settings, cnv.c);
2497
2498 case FreeRDP_TcpAckTimeout:
2499 settings->TcpAckTimeout = cnv.c;
2500 break;
2501
2502 case FreeRDP_TcpConnectTimeout:
2503 settings->TcpConnectTimeout = cnv.c;
2504 break;
2505
2506 case FreeRDP_TcpKeepAliveDelay:
2507 settings->TcpKeepAliveDelay = cnv.c;
2508 break;
2509
2510 case FreeRDP_TcpKeepAliveInterval:
2511 settings->TcpKeepAliveInterval = cnv.c;
2512 break;
2513
2514 case FreeRDP_TcpKeepAliveRetries:
2515 settings->TcpKeepAliveRetries = cnv.c;
2516 break;
2517
2518 case FreeRDP_ThreadingFlags:
2519 settings->ThreadingFlags = cnv.c;
2520 break;
2521
2522 case FreeRDP_TlsSecLevel:
2523 settings->TlsSecLevel = cnv.c;
2524 break;
2525
2526 case FreeRDP_VCChunkSize:
2527 settings->VCChunkSize = cnv.c;
2528 break;
2529
2530 case FreeRDP_VCFlags:
2531 settings->VCFlags = cnv.c;
2532 break;
2533
2534#if !defined(WITHOUT_FREERDP_3x_DEPRECATED)
2535 // API Compatibility section, remove with FreeRDP 4.x
2536 case FreeRDP_MonitorLocalShiftX:
2537 settings->MonitorLocalShiftX = (int32_t)cnv.c;
2538 break;
2539
2540 // API Compatibility section, remove with FreeRDP 4.x
2541 case FreeRDP_MonitorLocalShiftY:
2542 settings->MonitorLocalShiftY = (int32_t)cnv.c;
2543 break;
2544
2545#endif
2546 default:
2547 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2550 return FALSE;
2551 }
2552 return TRUE;
2553}
2554
2555INT32 freerdp_settings_get_int32(WINPR_ATTR_UNUSED const rdpSettings* settings,
2556 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_Int32 id)
2557{
2558 WINPR_ASSERT(settings);
2559
2560 switch (id)
2561 {
2562 case FreeRDP_MonitorLocalShiftX:
2563 return settings->MonitorLocalShiftX;
2564
2565 case FreeRDP_MonitorLocalShiftY:
2566 return settings->MonitorLocalShiftY;
2567
2568 case FreeRDP_XPan:
2569 return settings->XPan;
2570
2571 case FreeRDP_YPan:
2572 return settings->YPan;
2573
2574 default:
2575 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2578 WINPR_ASSERT(FALSE);
2579 return 0;
2580 }
2581}
2582
2583BOOL freerdp_settings_set_int32(WINPR_ATTR_UNUSED rdpSettings* settings,
2584 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_Int32 id, INT32 val)
2585{
2586 union
2587 {
2588 void* v;
2589 const void* cv;
2590 INT32 c;
2591 const INT32 cc;
2592 } cnv;
2593 WINPR_ASSERT(settings);
2594
2595 cnv.c = val;
2596
2597 switch (id)
2598 {
2599 case FreeRDP_MonitorLocalShiftX:
2600 settings->MonitorLocalShiftX = cnv.c;
2601 break;
2602
2603 case FreeRDP_MonitorLocalShiftY:
2604 settings->MonitorLocalShiftY = cnv.c;
2605 break;
2606
2607 case FreeRDP_XPan:
2608 settings->XPan = cnv.c;
2609 break;
2610
2611 case FreeRDP_YPan:
2612 settings->YPan = cnv.c;
2613 break;
2614
2615 default:
2616 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2619 return FALSE;
2620 }
2621 return TRUE;
2622}
2623
2624UINT64 freerdp_settings_get_uint64(WINPR_ATTR_UNUSED const rdpSettings* settings,
2625 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_UInt64 id)
2626{
2627 WINPR_ASSERT(settings);
2628
2629 switch (id)
2630 {
2631 case FreeRDP_MonitorOverrideFlags:
2632 return settings->MonitorOverrideFlags;
2633
2634 case FreeRDP_ParentWindowId:
2635 return settings->ParentWindowId;
2636
2637 default:
2638 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2641 WINPR_ASSERT(FALSE);
2642 return 0;
2643 }
2644}
2645
2646BOOL freerdp_settings_set_uint64(WINPR_ATTR_UNUSED rdpSettings* settings,
2647 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_UInt64 id, UINT64 val)
2648{
2649 union
2650 {
2651 void* v;
2652 const void* cv;
2653 UINT64 c;
2654 const UINT64 cc;
2655 } cnv;
2656 WINPR_ASSERT(settings);
2657
2658 cnv.c = val;
2659
2660 switch (id)
2661 {
2662 case FreeRDP_MonitorOverrideFlags:
2663 settings->MonitorOverrideFlags = cnv.c;
2664 break;
2665
2666 case FreeRDP_ParentWindowId:
2667 settings->ParentWindowId = cnv.c;
2668 break;
2669
2670 default:
2671 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2674 return FALSE;
2675 }
2676 return TRUE;
2677}
2678
2679INT64 freerdp_settings_get_int64(WINPR_ATTR_UNUSED const rdpSettings* settings,
2680 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_Int64 id)
2681{
2682 WINPR_ASSERT(settings);
2683
2684 switch (id)
2685 {
2686 default:
2687 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2690 WINPR_ASSERT(FALSE);
2691 return 0;
2692 }
2693}
2694
2695BOOL freerdp_settings_set_int64(WINPR_ATTR_UNUSED rdpSettings* settings,
2696 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_Int64 id, INT64 val)
2697{
2698 union
2699 {
2700 void* v;
2701 const void* cv;
2702 INT64 c;
2703 const INT64 cc;
2704 } cnv;
2705 WINPR_ASSERT(settings);
2706
2707 cnv.c = val;
2708
2709 switch (id)
2710 {
2711 default:
2712 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2715 return FALSE;
2716 }
2717 return TRUE;
2718}
2719
2720const char* freerdp_settings_get_string(WINPR_ATTR_UNUSED const rdpSettings* settings,
2721 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_String id)
2722{
2723 WINPR_ASSERT(settings);
2724
2725 switch (id)
2726 {
2727 case FreeRDP_AadServerHostname:
2728 return settings->AadServerHostname;
2729
2730 case FreeRDP_AcceptedCert:
2731 return settings->AcceptedCert;
2732
2733 case FreeRDP_ActionScript:
2734 return settings->ActionScript;
2735
2736 case FreeRDP_AllowedTlsCiphers:
2737 return settings->AllowedTlsCiphers;
2738
2739 case FreeRDP_AlternateShell:
2740 return settings->AlternateShell;
2741
2742 case FreeRDP_AssistanceFile:
2743 return settings->AssistanceFile;
2744
2745 case FreeRDP_AuthenticationPackageList:
2746 return settings->AuthenticationPackageList;
2747
2748 case FreeRDP_AuthenticationServiceClass:
2749 return settings->AuthenticationServiceClass;
2750
2751 case FreeRDP_BitmapCachePersistFile:
2752 return settings->BitmapCachePersistFile;
2753
2754 case FreeRDP_CardName:
2755 return settings->CardName;
2756
2757 case FreeRDP_CertificateAcceptedFingerprints:
2758 return settings->CertificateAcceptedFingerprints;
2759
2760 case FreeRDP_CertificateName:
2761 return settings->CertificateName;
2762
2763 case FreeRDP_ClientAddress:
2764 return settings->ClientAddress;
2765
2766 case FreeRDP_ClientDir:
2767 return settings->ClientDir;
2768
2769 case FreeRDP_ClientHostname:
2770 return settings->ClientHostname;
2771
2772 case FreeRDP_ClientProductId:
2773 return settings->ClientProductId;
2774
2775 case FreeRDP_ClipboardUseSelection:
2776 return settings->ClipboardUseSelection;
2777
2778 case FreeRDP_ComputerName:
2779 return settings->ComputerName;
2780
2781 case FreeRDP_ConfigPath:
2782 return settings->ConfigPath;
2783
2784 case FreeRDP_ConnectionFile:
2785 return settings->ConnectionFile;
2786
2787 case FreeRDP_ContainerName:
2788 return settings->ContainerName;
2789
2790 case FreeRDP_CspName:
2791 return settings->CspName;
2792
2793 case FreeRDP_CurrentPath:
2794 return settings->CurrentPath;
2795
2796 case FreeRDP_Domain:
2797 return settings->Domain;
2798
2799 case FreeRDP_DrivesToRedirect:
2800 return settings->DrivesToRedirect;
2801
2802 case FreeRDP_DumpRemoteFxFile:
2803 return settings->DumpRemoteFxFile;
2804
2805 case FreeRDP_DynamicDSTTimeZoneKeyName:
2806 return settings->DynamicDSTTimeZoneKeyName;
2807
2808 case FreeRDP_GatewayAcceptedCert:
2809 return settings->GatewayAcceptedCert;
2810
2811 case FreeRDP_GatewayAccessToken:
2812 return settings->GatewayAccessToken;
2813
2814 case FreeRDP_GatewayAvdAadtenantid:
2815 return settings->GatewayAvdAadtenantid;
2816
2817 case FreeRDP_GatewayAvdActivityhint:
2818 return settings->GatewayAvdActivityhint;
2819
2820 case FreeRDP_GatewayAvdArmpath:
2821 return settings->GatewayAvdArmpath;
2822
2823 case FreeRDP_GatewayAvdClientID:
2824 return settings->GatewayAvdClientID;
2825
2826 case FreeRDP_GatewayAvdDiagnosticserviceurl:
2827 return settings->GatewayAvdDiagnosticserviceurl;
2828
2829 case FreeRDP_GatewayAvdGeo:
2830 return settings->GatewayAvdGeo;
2831
2832 case FreeRDP_GatewayAvdHubdiscoverygeourl:
2833 return settings->GatewayAvdHubdiscoverygeourl;
2834
2835 case FreeRDP_GatewayAvdWvdEndpointPool:
2836 return settings->GatewayAvdWvdEndpointPool;
2837
2838 case FreeRDP_GatewayAzureActiveDirectory:
2839 return settings->GatewayAzureActiveDirectory;
2840
2841 case FreeRDP_GatewayDomain:
2842 return settings->GatewayDomain;
2843
2844 case FreeRDP_GatewayHostname:
2845 return settings->GatewayHostname;
2846
2847 case FreeRDP_GatewayHttpExtAuthBearer:
2848 return settings->GatewayHttpExtAuthBearer;
2849
2850 case FreeRDP_GatewayPassword:
2851 return settings->GatewayPassword;
2852
2853 case FreeRDP_GatewayUrl:
2854 return settings->GatewayUrl;
2855
2856 case FreeRDP_GatewayUsername:
2857 return settings->GatewayUsername;
2858
2859 case FreeRDP_HomePath:
2860 return settings->HomePath;
2861
2862 case FreeRDP_ImeFileName:
2863 return settings->ImeFileName;
2864
2865 case FreeRDP_KerberosArmor:
2866 return settings->KerberosArmor;
2867
2868 case FreeRDP_KerberosCache:
2869 return settings->KerberosCache;
2870
2871 case FreeRDP_KerberosKdcUrl:
2872 return settings->KerberosKdcUrl;
2873
2874 case FreeRDP_KerberosKeytab:
2875 return settings->KerberosKeytab;
2876
2877 case FreeRDP_KerberosLifeTime:
2878 return settings->KerberosLifeTime;
2879
2880 case FreeRDP_KerberosRealm:
2881 return settings->KerberosRealm;
2882
2883 case FreeRDP_KerberosRenewableLifeTime:
2884 return settings->KerberosRenewableLifeTime;
2885
2886 case FreeRDP_KerberosStartTime:
2887 return settings->KerberosStartTime;
2888
2889 case FreeRDP_KeyboardPipeName:
2890 return settings->KeyboardPipeName;
2891
2892 case FreeRDP_KeyboardRemappingList:
2893 return settings->KeyboardRemappingList;
2894
2895 case FreeRDP_NtlmSamFile:
2896 return settings->NtlmSamFile;
2897
2898 case FreeRDP_Password:
2899 return settings->Password;
2900
2901 case FreeRDP_PasswordHash:
2902 return settings->PasswordHash;
2903
2904 case FreeRDP_Pkcs11Module:
2905 return settings->Pkcs11Module;
2906
2907 case FreeRDP_PkinitAnchors:
2908 return settings->PkinitAnchors;
2909
2910 case FreeRDP_PlayRemoteFxFile:
2911 return settings->PlayRemoteFxFile;
2912
2913 case FreeRDP_PreconnectionBlob:
2914 return settings->PreconnectionBlob;
2915
2916 case FreeRDP_ProxyHostname:
2917 return settings->ProxyHostname;
2918
2919 case FreeRDP_ProxyPassword:
2920 return settings->ProxyPassword;
2921
2922 case FreeRDP_ProxyUsername:
2923 return settings->ProxyUsername;
2924
2925 case FreeRDP_RDP2TCPArgs:
2926 return settings->RDP2TCPArgs;
2927
2928 case FreeRDP_ReaderName:
2929 return settings->ReaderName;
2930
2931 case FreeRDP_RedirectionAcceptedCert:
2932 return settings->RedirectionAcceptedCert;
2933
2934 case FreeRDP_RedirectionDomain:
2935 return settings->RedirectionDomain;
2936
2937 case FreeRDP_RedirectionTargetFQDN:
2938 return settings->RedirectionTargetFQDN;
2939
2940 case FreeRDP_RedirectionTargetNetBiosName:
2941 return settings->RedirectionTargetNetBiosName;
2942
2943 case FreeRDP_RedirectionUsername:
2944 return settings->RedirectionUsername;
2945
2946 case FreeRDP_RemoteApplicationCmdLine:
2947 return settings->RemoteApplicationCmdLine;
2948
2949 case FreeRDP_RemoteApplicationFile:
2950 return settings->RemoteApplicationFile;
2951
2952 case FreeRDP_RemoteApplicationGuid:
2953 return settings->RemoteApplicationGuid;
2954
2955 case FreeRDP_RemoteApplicationIcon:
2956 return settings->RemoteApplicationIcon;
2957
2958 case FreeRDP_RemoteApplicationName:
2959 return settings->RemoteApplicationName;
2960
2961 case FreeRDP_RemoteApplicationProgram:
2962 return settings->RemoteApplicationProgram;
2963
2964 case FreeRDP_RemoteApplicationWorkingDir:
2965 return settings->RemoteApplicationWorkingDir;
2966
2967 case FreeRDP_RemoteAssistancePassStub:
2968 return settings->RemoteAssistancePassStub;
2969
2970 case FreeRDP_RemoteAssistancePassword:
2971 return settings->RemoteAssistancePassword;
2972
2973 case FreeRDP_RemoteAssistanceRCTicket:
2974 return settings->RemoteAssistanceRCTicket;
2975
2976 case FreeRDP_RemoteAssistanceSessionId:
2977 return settings->RemoteAssistanceSessionId;
2978
2979 case FreeRDP_ServerHostname:
2980 return settings->ServerHostname;
2981
2982 case FreeRDP_ServerLicenseCompanyName:
2983 return settings->ServerLicenseCompanyName;
2984
2985 case FreeRDP_ServerLicenseProductName:
2986 return settings->ServerLicenseProductName;
2987
2988 case FreeRDP_ShellWorkingDirectory:
2989 return settings->ShellWorkingDirectory;
2990
2991 case FreeRDP_SmartcardCertificate:
2992 return settings->SmartcardCertificate;
2993
2994 case FreeRDP_SmartcardPrivateKey:
2995 return settings->SmartcardPrivateKey;
2996
2997 case FreeRDP_SspiModule:
2998 return settings->SspiModule;
2999
3000 case FreeRDP_TargetNetAddress:
3001 return settings->TargetNetAddress;
3002
3003 case FreeRDP_TerminalDescriptor:
3004 return settings->TerminalDescriptor;
3005
3006 case FreeRDP_TlsSecretsFile:
3007 return settings->TlsSecretsFile;
3008
3009 case FreeRDP_TransportDumpFile:
3010 return settings->TransportDumpFile;
3011
3012 case FreeRDP_UserSpecifiedServerName:
3013 return settings->UserSpecifiedServerName;
3014
3015 case FreeRDP_Username:
3016 return settings->Username;
3017
3018 case FreeRDP_WinSCardModule:
3019 return settings->WinSCardModule;
3020
3021 case FreeRDP_WindowTitle:
3022 return settings->WindowTitle;
3023
3024 case FreeRDP_WmClass:
3025 return settings->WmClass;
3026
3027 default:
3028 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
3031 WINPR_ASSERT(FALSE);
3032 return NULL;
3033 }
3034}
3035
3036char* freerdp_settings_get_string_writable(rdpSettings* settings, FreeRDP_Settings_Keys_String id)
3037{
3038 WINPR_ASSERT(settings);
3039
3040 switch (id)
3041 {
3042 case FreeRDP_AadServerHostname:
3043 return settings->AadServerHostname;
3044
3045 case FreeRDP_AcceptedCert:
3046 return settings->AcceptedCert;
3047
3048 case FreeRDP_ActionScript:
3049 return settings->ActionScript;
3050
3051 case FreeRDP_AllowedTlsCiphers:
3052 return settings->AllowedTlsCiphers;
3053
3054 case FreeRDP_AlternateShell:
3055 return settings->AlternateShell;
3056
3057 case FreeRDP_AssistanceFile:
3058 return settings->AssistanceFile;
3059
3060 case FreeRDP_AuthenticationPackageList:
3061 return settings->AuthenticationPackageList;
3062
3063 case FreeRDP_AuthenticationServiceClass:
3064 return settings->AuthenticationServiceClass;
3065
3066 case FreeRDP_BitmapCachePersistFile:
3067 return settings->BitmapCachePersistFile;
3068
3069 case FreeRDP_CardName:
3070 return settings->CardName;
3071
3072 case FreeRDP_CertificateAcceptedFingerprints:
3073 return settings->CertificateAcceptedFingerprints;
3074
3075 case FreeRDP_CertificateName:
3076 return settings->CertificateName;
3077
3078 case FreeRDP_ClientAddress:
3079 return settings->ClientAddress;
3080
3081 case FreeRDP_ClientDir:
3082 return settings->ClientDir;
3083
3084 case FreeRDP_ClientHostname:
3085 return settings->ClientHostname;
3086
3087 case FreeRDP_ClientProductId:
3088 return settings->ClientProductId;
3089
3090 case FreeRDP_ClipboardUseSelection:
3091 return settings->ClipboardUseSelection;
3092
3093 case FreeRDP_ComputerName:
3094 return settings->ComputerName;
3095
3096 case FreeRDP_ConfigPath:
3097 return settings->ConfigPath;
3098
3099 case FreeRDP_ConnectionFile:
3100 return settings->ConnectionFile;
3101
3102 case FreeRDP_ContainerName:
3103 return settings->ContainerName;
3104
3105 case FreeRDP_CspName:
3106 return settings->CspName;
3107
3108 case FreeRDP_CurrentPath:
3109 return settings->CurrentPath;
3110
3111 case FreeRDP_Domain:
3112 return settings->Domain;
3113
3114 case FreeRDP_DrivesToRedirect:
3115 return settings->DrivesToRedirect;
3116
3117 case FreeRDP_DumpRemoteFxFile:
3118 return settings->DumpRemoteFxFile;
3119
3120 case FreeRDP_DynamicDSTTimeZoneKeyName:
3121 return settings->DynamicDSTTimeZoneKeyName;
3122
3123 case FreeRDP_GatewayAcceptedCert:
3124 return settings->GatewayAcceptedCert;
3125
3126 case FreeRDP_GatewayAccessToken:
3127 return settings->GatewayAccessToken;
3128
3129 case FreeRDP_GatewayAvdAadtenantid:
3130 return settings->GatewayAvdAadtenantid;
3131
3132 case FreeRDP_GatewayAvdActivityhint:
3133 return settings->GatewayAvdActivityhint;
3134
3135 case FreeRDP_GatewayAvdArmpath:
3136 return settings->GatewayAvdArmpath;
3137
3138 case FreeRDP_GatewayAvdClientID:
3139 return settings->GatewayAvdClientID;
3140
3141 case FreeRDP_GatewayAvdDiagnosticserviceurl:
3142 return settings->GatewayAvdDiagnosticserviceurl;
3143
3144 case FreeRDP_GatewayAvdGeo:
3145 return settings->GatewayAvdGeo;
3146
3147 case FreeRDP_GatewayAvdHubdiscoverygeourl:
3148 return settings->GatewayAvdHubdiscoverygeourl;
3149
3150 case FreeRDP_GatewayAvdWvdEndpointPool:
3151 return settings->GatewayAvdWvdEndpointPool;
3152
3153 case FreeRDP_GatewayAzureActiveDirectory:
3154 return settings->GatewayAzureActiveDirectory;
3155
3156 case FreeRDP_GatewayDomain:
3157 return settings->GatewayDomain;
3158
3159 case FreeRDP_GatewayHostname:
3160 return settings->GatewayHostname;
3161
3162 case FreeRDP_GatewayHttpExtAuthBearer:
3163 return settings->GatewayHttpExtAuthBearer;
3164
3165 case FreeRDP_GatewayPassword:
3166 return settings->GatewayPassword;
3167
3168 case FreeRDP_GatewayUrl:
3169 return settings->GatewayUrl;
3170
3171 case FreeRDP_GatewayUsername:
3172 return settings->GatewayUsername;
3173
3174 case FreeRDP_HomePath:
3175 return settings->HomePath;
3176
3177 case FreeRDP_ImeFileName:
3178 return settings->ImeFileName;
3179
3180 case FreeRDP_KerberosArmor:
3181 return settings->KerberosArmor;
3182
3183 case FreeRDP_KerberosCache:
3184 return settings->KerberosCache;
3185
3186 case FreeRDP_KerberosKdcUrl:
3187 return settings->KerberosKdcUrl;
3188
3189 case FreeRDP_KerberosKeytab:
3190 return settings->KerberosKeytab;
3191
3192 case FreeRDP_KerberosLifeTime:
3193 return settings->KerberosLifeTime;
3194
3195 case FreeRDP_KerberosRealm:
3196 return settings->KerberosRealm;
3197
3198 case FreeRDP_KerberosRenewableLifeTime:
3199 return settings->KerberosRenewableLifeTime;
3200
3201 case FreeRDP_KerberosStartTime:
3202 return settings->KerberosStartTime;
3203
3204 case FreeRDP_KeyboardPipeName:
3205 return settings->KeyboardPipeName;
3206
3207 case FreeRDP_KeyboardRemappingList:
3208 return settings->KeyboardRemappingList;
3209
3210 case FreeRDP_NtlmSamFile:
3211 return settings->NtlmSamFile;
3212
3213 case FreeRDP_Password:
3214 return settings->Password;
3215
3216 case FreeRDP_PasswordHash:
3217 return settings->PasswordHash;
3218
3219 case FreeRDP_Pkcs11Module:
3220 return settings->Pkcs11Module;
3221
3222 case FreeRDP_PkinitAnchors:
3223 return settings->PkinitAnchors;
3224
3225 case FreeRDP_PlayRemoteFxFile:
3226 return settings->PlayRemoteFxFile;
3227
3228 case FreeRDP_PreconnectionBlob:
3229 return settings->PreconnectionBlob;
3230
3231 case FreeRDP_ProxyHostname:
3232 return settings->ProxyHostname;
3233
3234 case FreeRDP_ProxyPassword:
3235 return settings->ProxyPassword;
3236
3237 case FreeRDP_ProxyUsername:
3238 return settings->ProxyUsername;
3239
3240 case FreeRDP_RDP2TCPArgs:
3241 return settings->RDP2TCPArgs;
3242
3243 case FreeRDP_ReaderName:
3244 return settings->ReaderName;
3245
3246 case FreeRDP_RedirectionAcceptedCert:
3247 return settings->RedirectionAcceptedCert;
3248
3249 case FreeRDP_RedirectionDomain:
3250 return settings->RedirectionDomain;
3251
3252 case FreeRDP_RedirectionTargetFQDN:
3253 return settings->RedirectionTargetFQDN;
3254
3255 case FreeRDP_RedirectionTargetNetBiosName:
3256 return settings->RedirectionTargetNetBiosName;
3257
3258 case FreeRDP_RedirectionUsername:
3259 return settings->RedirectionUsername;
3260
3261 case FreeRDP_RemoteApplicationCmdLine:
3262 return settings->RemoteApplicationCmdLine;
3263
3264 case FreeRDP_RemoteApplicationFile:
3265 return settings->RemoteApplicationFile;
3266
3267 case FreeRDP_RemoteApplicationGuid:
3268 return settings->RemoteApplicationGuid;
3269
3270 case FreeRDP_RemoteApplicationIcon:
3271 return settings->RemoteApplicationIcon;
3272
3273 case FreeRDP_RemoteApplicationName:
3274 return settings->RemoteApplicationName;
3275
3276 case FreeRDP_RemoteApplicationProgram:
3277 return settings->RemoteApplicationProgram;
3278
3279 case FreeRDP_RemoteApplicationWorkingDir:
3280 return settings->RemoteApplicationWorkingDir;
3281
3282 case FreeRDP_RemoteAssistancePassStub:
3283 return settings->RemoteAssistancePassStub;
3284
3285 case FreeRDP_RemoteAssistancePassword:
3286 return settings->RemoteAssistancePassword;
3287
3288 case FreeRDP_RemoteAssistanceRCTicket:
3289 return settings->RemoteAssistanceRCTicket;
3290
3291 case FreeRDP_RemoteAssistanceSessionId:
3292 return settings->RemoteAssistanceSessionId;
3293
3294 case FreeRDP_ServerHostname:
3295 return settings->ServerHostname;
3296
3297 case FreeRDP_ServerLicenseCompanyName:
3298 return settings->ServerLicenseCompanyName;
3299
3300 case FreeRDP_ServerLicenseProductName:
3301 return settings->ServerLicenseProductName;
3302
3303 case FreeRDP_ShellWorkingDirectory:
3304 return settings->ShellWorkingDirectory;
3305
3306 case FreeRDP_SmartcardCertificate:
3307 return settings->SmartcardCertificate;
3308
3309 case FreeRDP_SmartcardPrivateKey:
3310 return settings->SmartcardPrivateKey;
3311
3312 case FreeRDP_SspiModule:
3313 return settings->SspiModule;
3314
3315 case FreeRDP_TargetNetAddress:
3316 return settings->TargetNetAddress;
3317
3318 case FreeRDP_TerminalDescriptor:
3319 return settings->TerminalDescriptor;
3320
3321 case FreeRDP_TlsSecretsFile:
3322 return settings->TlsSecretsFile;
3323
3324 case FreeRDP_TransportDumpFile:
3325 return settings->TransportDumpFile;
3326
3327 case FreeRDP_UserSpecifiedServerName:
3328 return settings->UserSpecifiedServerName;
3329
3330 case FreeRDP_Username:
3331 return settings->Username;
3332
3333 case FreeRDP_WinSCardModule:
3334 return settings->WinSCardModule;
3335
3336 case FreeRDP_WindowTitle:
3337 return settings->WindowTitle;
3338
3339 case FreeRDP_WmClass:
3340 return settings->WmClass;
3341
3342 default:
3343 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
3346 WINPR_ASSERT(FALSE);
3347 return NULL;
3348 }
3349}
3350
3351BOOL freerdp_settings_set_string_(WINPR_ATTR_UNUSED rdpSettings* settings,
3352 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_String id,
3353 const char* val, size_t len)
3354{
3355 union
3356 {
3357 void* v;
3358 const void* cv;
3359 char* c;
3360 const char* cc;
3361 } cnv;
3362 WINPR_ASSERT(settings);
3363
3364 cnv.cc = val;
3365
3366 switch (id)
3367 {
3368 case FreeRDP_AadServerHostname:
3369 return update_string_(&settings->AadServerHostname, cnv.c, len);
3370
3371 case FreeRDP_AcceptedCert:
3372 return update_string_(&settings->AcceptedCert, cnv.c, len);
3373
3374 case FreeRDP_ActionScript:
3375 return update_string_(&settings->ActionScript, cnv.c, len);
3376
3377 case FreeRDP_AllowedTlsCiphers:
3378 return update_string_(&settings->AllowedTlsCiphers, cnv.c, len);
3379
3380 case FreeRDP_AlternateShell:
3381 return update_string_(&settings->AlternateShell, cnv.c, len);
3382
3383 case FreeRDP_AssistanceFile:
3384 return update_string_(&settings->AssistanceFile, cnv.c, len);
3385
3386 case FreeRDP_AuthenticationPackageList:
3387 return update_string_(&settings->AuthenticationPackageList, cnv.c, len);
3388
3389 case FreeRDP_AuthenticationServiceClass:
3390 return update_string_(&settings->AuthenticationServiceClass, cnv.c, len);
3391
3392 case FreeRDP_BitmapCachePersistFile:
3393 return update_string_(&settings->BitmapCachePersistFile, cnv.c, len);
3394
3395 case FreeRDP_CardName:
3396 return update_string_(&settings->CardName, cnv.c, len);
3397
3398 case FreeRDP_CertificateAcceptedFingerprints:
3399 return update_string_(&settings->CertificateAcceptedFingerprints, cnv.c, len);
3400
3401 case FreeRDP_CertificateName:
3402 return update_string_(&settings->CertificateName, cnv.c, len);
3403
3404 case FreeRDP_ClientAddress:
3405 return update_string_(&settings->ClientAddress, cnv.c, len);
3406
3407 case FreeRDP_ClientDir:
3408 return update_string_(&settings->ClientDir, cnv.c, len);
3409
3410 case FreeRDP_ClientHostname:
3411 return update_string_(&settings->ClientHostname, cnv.c, len);
3412
3413 case FreeRDP_ClientProductId:
3414 return update_string_(&settings->ClientProductId, cnv.c, len);
3415
3416 case FreeRDP_ClipboardUseSelection:
3417 return update_string_(&settings->ClipboardUseSelection, cnv.c, len);
3418
3419 case FreeRDP_ComputerName:
3420 return update_string_(&settings->ComputerName, cnv.c, len);
3421
3422 case FreeRDP_ConfigPath:
3423 return update_string_(&settings->ConfigPath, cnv.c, len);
3424
3425 case FreeRDP_ConnectionFile:
3426 return update_string_(&settings->ConnectionFile, cnv.c, len);
3427
3428 case FreeRDP_ContainerName:
3429 return update_string_(&settings->ContainerName, cnv.c, len);
3430
3431 case FreeRDP_CspName:
3432 return update_string_(&settings->CspName, cnv.c, len);
3433
3434 case FreeRDP_CurrentPath:
3435 return update_string_(&settings->CurrentPath, cnv.c, len);
3436
3437 case FreeRDP_Domain:
3438 return update_string_(&settings->Domain, cnv.c, len);
3439
3440 case FreeRDP_DrivesToRedirect:
3441 return update_string_(&settings->DrivesToRedirect, cnv.c, len);
3442
3443 case FreeRDP_DumpRemoteFxFile:
3444 return update_string_(&settings->DumpRemoteFxFile, cnv.c, len);
3445
3446 case FreeRDP_DynamicDSTTimeZoneKeyName:
3447 return update_string_(&settings->DynamicDSTTimeZoneKeyName, cnv.c, len);
3448
3449 case FreeRDP_GatewayAcceptedCert:
3450 return update_string_(&settings->GatewayAcceptedCert, cnv.c, len);
3451
3452 case FreeRDP_GatewayAccessToken:
3453 return update_string_(&settings->GatewayAccessToken, cnv.c, len);
3454
3455 case FreeRDP_GatewayAvdAadtenantid:
3456 return update_string_(&settings->GatewayAvdAadtenantid, cnv.c, len);
3457
3458 case FreeRDP_GatewayAvdActivityhint:
3459 return update_string_(&settings->GatewayAvdActivityhint, cnv.c, len);
3460
3461 case FreeRDP_GatewayAvdArmpath:
3462 return update_string_(&settings->GatewayAvdArmpath, cnv.c, len);
3463
3464 case FreeRDP_GatewayAvdClientID:
3465 return update_string_(&settings->GatewayAvdClientID, cnv.c, len);
3466
3467 case FreeRDP_GatewayAvdDiagnosticserviceurl:
3468 return update_string_(&settings->GatewayAvdDiagnosticserviceurl, cnv.c, len);
3469
3470 case FreeRDP_GatewayAvdGeo:
3471 return update_string_(&settings->GatewayAvdGeo, cnv.c, len);
3472
3473 case FreeRDP_GatewayAvdHubdiscoverygeourl:
3474 return update_string_(&settings->GatewayAvdHubdiscoverygeourl, cnv.c, len);
3475
3476 case FreeRDP_GatewayAvdWvdEndpointPool:
3477 return update_string_(&settings->GatewayAvdWvdEndpointPool, cnv.c, len);
3478
3479 case FreeRDP_GatewayAzureActiveDirectory:
3480 return update_string_(&settings->GatewayAzureActiveDirectory, cnv.c, len);
3481
3482 case FreeRDP_GatewayDomain:
3483 return update_string_(&settings->GatewayDomain, cnv.c, len);
3484
3485 case FreeRDP_GatewayHostname:
3486 return update_string_(&settings->GatewayHostname, cnv.c, len);
3487
3488 case FreeRDP_GatewayHttpExtAuthBearer:
3489 return update_string_(&settings->GatewayHttpExtAuthBearer, cnv.c, len);
3490
3491 case FreeRDP_GatewayPassword:
3492 return update_string_(&settings->GatewayPassword, cnv.c, len);
3493
3494 case FreeRDP_GatewayUrl:
3495 return update_string_(&settings->GatewayUrl, cnv.c, len);
3496
3497 case FreeRDP_GatewayUsername:
3498 return update_string_(&settings->GatewayUsername, cnv.c, len);
3499
3500 case FreeRDP_HomePath:
3501 return update_string_(&settings->HomePath, cnv.c, len);
3502
3503 case FreeRDP_ImeFileName:
3504 return update_string_(&settings->ImeFileName, cnv.c, len);
3505
3506 case FreeRDP_KerberosArmor:
3507 return update_string_(&settings->KerberosArmor, cnv.c, len);
3508
3509 case FreeRDP_KerberosCache:
3510 return update_string_(&settings->KerberosCache, cnv.c, len);
3511
3512 case FreeRDP_KerberosKdcUrl:
3513 return update_string_(&settings->KerberosKdcUrl, cnv.c, len);
3514
3515 case FreeRDP_KerberosKeytab:
3516 return update_string_(&settings->KerberosKeytab, cnv.c, len);
3517
3518 case FreeRDP_KerberosLifeTime:
3519 return update_string_(&settings->KerberosLifeTime, cnv.c, len);
3520
3521 case FreeRDP_KerberosRealm:
3522 return update_string_(&settings->KerberosRealm, cnv.c, len);
3523
3524 case FreeRDP_KerberosRenewableLifeTime:
3525 return update_string_(&settings->KerberosRenewableLifeTime, cnv.c, len);
3526
3527 case FreeRDP_KerberosStartTime:
3528 return update_string_(&settings->KerberosStartTime, cnv.c, len);
3529
3530 case FreeRDP_KeyboardPipeName:
3531 return update_string_(&settings->KeyboardPipeName, cnv.c, len);
3532
3533 case FreeRDP_KeyboardRemappingList:
3534 return update_string_(&settings->KeyboardRemappingList, cnv.c, len);
3535
3536 case FreeRDP_NtlmSamFile:
3537 return update_string_(&settings->NtlmSamFile, cnv.c, len);
3538
3539 case FreeRDP_Password:
3540 return update_string_(&settings->Password, cnv.c, len);
3541
3542 case FreeRDP_PasswordHash:
3543 return update_string_(&settings->PasswordHash, cnv.c, len);
3544
3545 case FreeRDP_Pkcs11Module:
3546 return update_string_(&settings->Pkcs11Module, cnv.c, len);
3547
3548 case FreeRDP_PkinitAnchors:
3549 return update_string_(&settings->PkinitAnchors, cnv.c, len);
3550
3551 case FreeRDP_PlayRemoteFxFile:
3552 return update_string_(&settings->PlayRemoteFxFile, cnv.c, len);
3553
3554 case FreeRDP_PreconnectionBlob:
3555 return update_string_(&settings->PreconnectionBlob, cnv.c, len);
3556
3557 case FreeRDP_ProxyHostname:
3558 return update_string_(&settings->ProxyHostname, cnv.c, len);
3559
3560 case FreeRDP_ProxyPassword:
3561 return update_string_(&settings->ProxyPassword, cnv.c, len);
3562
3563 case FreeRDP_ProxyUsername:
3564 return update_string_(&settings->ProxyUsername, cnv.c, len);
3565
3566 case FreeRDP_RDP2TCPArgs:
3567 return update_string_(&settings->RDP2TCPArgs, cnv.c, len);
3568
3569 case FreeRDP_ReaderName:
3570 return update_string_(&settings->ReaderName, cnv.c, len);
3571
3572 case FreeRDP_RedirectionAcceptedCert:
3573 return update_string_(&settings->RedirectionAcceptedCert, cnv.c, len);
3574
3575 case FreeRDP_RedirectionDomain:
3576 return update_string_(&settings->RedirectionDomain, cnv.c, len);
3577
3578 case FreeRDP_RedirectionTargetFQDN:
3579 return update_string_(&settings->RedirectionTargetFQDN, cnv.c, len);
3580
3581 case FreeRDP_RedirectionTargetNetBiosName:
3582 return update_string_(&settings->RedirectionTargetNetBiosName, cnv.c, len);
3583
3584 case FreeRDP_RedirectionUsername:
3585 return update_string_(&settings->RedirectionUsername, cnv.c, len);
3586
3587 case FreeRDP_RemoteApplicationCmdLine:
3588 return update_string_(&settings->RemoteApplicationCmdLine, cnv.c, len);
3589
3590 case FreeRDP_RemoteApplicationFile:
3591 return update_string_(&settings->RemoteApplicationFile, cnv.c, len);
3592
3593 case FreeRDP_RemoteApplicationGuid:
3594 return update_string_(&settings->RemoteApplicationGuid, cnv.c, len);
3595
3596 case FreeRDP_RemoteApplicationIcon:
3597 return update_string_(&settings->RemoteApplicationIcon, cnv.c, len);
3598
3599 case FreeRDP_RemoteApplicationName:
3600 return update_string_(&settings->RemoteApplicationName, cnv.c, len);
3601
3602 case FreeRDP_RemoteApplicationProgram:
3603 return update_string_(&settings->RemoteApplicationProgram, cnv.c, len);
3604
3605 case FreeRDP_RemoteApplicationWorkingDir:
3606 return update_string_(&settings->RemoteApplicationWorkingDir, cnv.c, len);
3607
3608 case FreeRDP_RemoteAssistancePassStub:
3609 return update_string_(&settings->RemoteAssistancePassStub, cnv.c, len);
3610
3611 case FreeRDP_RemoteAssistancePassword:
3612 return update_string_(&settings->RemoteAssistancePassword, cnv.c, len);
3613
3614 case FreeRDP_RemoteAssistanceRCTicket:
3615 return update_string_(&settings->RemoteAssistanceRCTicket, cnv.c, len);
3616
3617 case FreeRDP_RemoteAssistanceSessionId:
3618 return update_string_(&settings->RemoteAssistanceSessionId, cnv.c, len);
3619
3620 case FreeRDP_ServerHostname:
3621 return update_string_(&settings->ServerHostname, cnv.c, len);
3622
3623 case FreeRDP_ServerLicenseCompanyName:
3624 return update_string_(&settings->ServerLicenseCompanyName, cnv.c, len);
3625
3626 case FreeRDP_ServerLicenseProductName:
3627 return update_string_(&settings->ServerLicenseProductName, cnv.c, len);
3628
3629 case FreeRDP_ShellWorkingDirectory:
3630 return update_string_(&settings->ShellWorkingDirectory, cnv.c, len);
3631
3632 case FreeRDP_SmartcardCertificate:
3633 return update_string_(&settings->SmartcardCertificate, cnv.c, len);
3634
3635 case FreeRDP_SmartcardPrivateKey:
3636 return update_string_(&settings->SmartcardPrivateKey, cnv.c, len);
3637
3638 case FreeRDP_SspiModule:
3639 return update_string_(&settings->SspiModule, cnv.c, len);
3640
3641 case FreeRDP_TargetNetAddress:
3642 return update_string_(&settings->TargetNetAddress, cnv.c, len);
3643
3644 case FreeRDP_TerminalDescriptor:
3645 return update_string_(&settings->TerminalDescriptor, cnv.c, len);
3646
3647 case FreeRDP_TlsSecretsFile:
3648 return update_string_(&settings->TlsSecretsFile, cnv.c, len);
3649
3650 case FreeRDP_TransportDumpFile:
3651 return update_string_(&settings->TransportDumpFile, cnv.c, len);
3652
3653 case FreeRDP_UserSpecifiedServerName:
3654 return update_string_(&settings->UserSpecifiedServerName, cnv.c, len);
3655
3656 case FreeRDP_Username:
3657 return update_string_(&settings->Username, cnv.c, len);
3658
3659 case FreeRDP_WinSCardModule:
3660 return update_string_(&settings->WinSCardModule, cnv.c, len);
3661
3662 case FreeRDP_WindowTitle:
3663 return update_string_(&settings->WindowTitle, cnv.c, len);
3664
3665 case FreeRDP_WmClass:
3666 return update_string_(&settings->WmClass, cnv.c, len);
3667
3668 default:
3669 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
3672 return FALSE;
3673 }
3674 return TRUE;
3675}
3676
3677BOOL freerdp_settings_set_string_len(rdpSettings* settings, FreeRDP_Settings_Keys_String id,
3678 const char* val, size_t len)
3679{
3680 return freerdp_settings_set_string_copy_(settings, id, val, len, TRUE);
3681}
3682
3683BOOL freerdp_settings_set_string(rdpSettings* settings, FreeRDP_Settings_Keys_String id,
3684 const char* val)
3685{
3686 size_t len = 0;
3687 if (val)
3688 len = strlen(val);
3689 return freerdp_settings_set_string_copy_(settings, id, val, len, TRUE);
3690}
3691
3692BOOL freerdp_settings_set_string_copy_(WINPR_ATTR_UNUSED rdpSettings* settings,
3693 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_String id,
3694 const char* val, size_t len, BOOL cleanup)
3695{
3696 union
3697 {
3698 void* v;
3699 const void* cv;
3700 char* c;
3701 const char* cc;
3702 } cnv;
3703 WINPR_ASSERT(settings);
3704
3705 cnv.cc = val;
3706
3707 switch (id)
3708 {
3709 case FreeRDP_AadServerHostname:
3710 return update_string_copy_(&settings->AadServerHostname, cnv.cc, len, cleanup);
3711
3712 case FreeRDP_AcceptedCert:
3713 return update_string_copy_(&settings->AcceptedCert, cnv.cc, len, cleanup);
3714
3715 case FreeRDP_ActionScript:
3716 return update_string_copy_(&settings->ActionScript, cnv.cc, len, cleanup);
3717
3718 case FreeRDP_AllowedTlsCiphers:
3719 return update_string_copy_(&settings->AllowedTlsCiphers, cnv.cc, len, cleanup);
3720
3721 case FreeRDP_AlternateShell:
3722 return update_string_copy_(&settings->AlternateShell, cnv.cc, len, cleanup);
3723
3724 case FreeRDP_AssistanceFile:
3725 return update_string_copy_(&settings->AssistanceFile, cnv.cc, len, cleanup);
3726
3727 case FreeRDP_AuthenticationPackageList:
3728 return update_string_copy_(&settings->AuthenticationPackageList, cnv.cc, len, cleanup);
3729
3730 case FreeRDP_AuthenticationServiceClass:
3731 return update_string_copy_(&settings->AuthenticationServiceClass, cnv.cc, len, cleanup);
3732
3733 case FreeRDP_BitmapCachePersistFile:
3734 return update_string_copy_(&settings->BitmapCachePersistFile, cnv.cc, len, cleanup);
3735
3736 case FreeRDP_CardName:
3737 return update_string_copy_(&settings->CardName, cnv.cc, len, cleanup);
3738
3739 case FreeRDP_CertificateAcceptedFingerprints:
3740 return update_string_copy_(&settings->CertificateAcceptedFingerprints, cnv.cc, len,
3741 cleanup);
3742
3743 case FreeRDP_CertificateName:
3744 return update_string_copy_(&settings->CertificateName, cnv.cc, len, cleanup);
3745
3746 case FreeRDP_ClientAddress:
3747 return update_string_copy_(&settings->ClientAddress, cnv.cc, len, cleanup);
3748
3749 case FreeRDP_ClientDir:
3750 return update_string_copy_(&settings->ClientDir, cnv.cc, len, cleanup);
3751
3752 case FreeRDP_ClientHostname:
3753 return update_string_copy_(&settings->ClientHostname, cnv.cc, len, cleanup);
3754
3755 case FreeRDP_ClientProductId:
3756 return update_string_copy_(&settings->ClientProductId, cnv.cc, len, cleanup);
3757
3758 case FreeRDP_ClipboardUseSelection:
3759 return update_string_copy_(&settings->ClipboardUseSelection, cnv.cc, len, cleanup);
3760
3761 case FreeRDP_ComputerName:
3762 return update_string_copy_(&settings->ComputerName, cnv.cc, len, cleanup);
3763
3764 case FreeRDP_ConfigPath:
3765 return update_string_copy_(&settings->ConfigPath, cnv.cc, len, cleanup);
3766
3767 case FreeRDP_ConnectionFile:
3768 return update_string_copy_(&settings->ConnectionFile, cnv.cc, len, cleanup);
3769
3770 case FreeRDP_ContainerName:
3771 return update_string_copy_(&settings->ContainerName, cnv.cc, len, cleanup);
3772
3773 case FreeRDP_CspName:
3774 return update_string_copy_(&settings->CspName, cnv.cc, len, cleanup);
3775
3776 case FreeRDP_CurrentPath:
3777 return update_string_copy_(&settings->CurrentPath, cnv.cc, len, cleanup);
3778
3779 case FreeRDP_Domain:
3780 return update_string_copy_(&settings->Domain, cnv.cc, len, cleanup);
3781
3782 case FreeRDP_DrivesToRedirect:
3783 return update_string_copy_(&settings->DrivesToRedirect, cnv.cc, len, cleanup);
3784
3785 case FreeRDP_DumpRemoteFxFile:
3786 return update_string_copy_(&settings->DumpRemoteFxFile, cnv.cc, len, cleanup);
3787
3788 case FreeRDP_DynamicDSTTimeZoneKeyName:
3789 return update_string_copy_(&settings->DynamicDSTTimeZoneKeyName, cnv.cc, len, cleanup);
3790
3791 case FreeRDP_GatewayAcceptedCert:
3792 return update_string_copy_(&settings->GatewayAcceptedCert, cnv.cc, len, cleanup);
3793
3794 case FreeRDP_GatewayAccessToken:
3795 return update_string_copy_(&settings->GatewayAccessToken, cnv.cc, len, cleanup);
3796
3797 case FreeRDP_GatewayAvdAadtenantid:
3798 return update_string_copy_(&settings->GatewayAvdAadtenantid, cnv.cc, len, cleanup);
3799
3800 case FreeRDP_GatewayAvdActivityhint:
3801 return update_string_copy_(&settings->GatewayAvdActivityhint, cnv.cc, len, cleanup);
3802
3803 case FreeRDP_GatewayAvdArmpath:
3804 return update_string_copy_(&settings->GatewayAvdArmpath, cnv.cc, len, cleanup);
3805
3806 case FreeRDP_GatewayAvdClientID:
3807 return update_string_copy_(&settings->GatewayAvdClientID, cnv.cc, len, cleanup);
3808
3809 case FreeRDP_GatewayAvdDiagnosticserviceurl:
3810 return update_string_copy_(&settings->GatewayAvdDiagnosticserviceurl, cnv.cc, len,
3811 cleanup);
3812
3813 case FreeRDP_GatewayAvdGeo:
3814 return update_string_copy_(&settings->GatewayAvdGeo, cnv.cc, len, cleanup);
3815
3816 case FreeRDP_GatewayAvdHubdiscoverygeourl:
3817 return update_string_copy_(&settings->GatewayAvdHubdiscoverygeourl, cnv.cc, len,
3818 cleanup);
3819
3820 case FreeRDP_GatewayAvdWvdEndpointPool:
3821 return update_string_copy_(&settings->GatewayAvdWvdEndpointPool, cnv.cc, len, cleanup);
3822
3823 case FreeRDP_GatewayAzureActiveDirectory:
3824 return update_string_copy_(&settings->GatewayAzureActiveDirectory, cnv.cc, len,
3825 cleanup);
3826
3827 case FreeRDP_GatewayDomain:
3828 return update_string_copy_(&settings->GatewayDomain, cnv.cc, len, cleanup);
3829
3830 case FreeRDP_GatewayHostname:
3831 return update_string_copy_(&settings->GatewayHostname, cnv.cc, len, cleanup);
3832
3833 case FreeRDP_GatewayHttpExtAuthBearer:
3834 return update_string_copy_(&settings->GatewayHttpExtAuthBearer, cnv.cc, len, cleanup);
3835
3836 case FreeRDP_GatewayPassword:
3837 return update_string_copy_(&settings->GatewayPassword, cnv.cc, len, cleanup);
3838
3839 case FreeRDP_GatewayUrl:
3840 return update_string_copy_(&settings->GatewayUrl, cnv.cc, len, cleanup);
3841
3842 case FreeRDP_GatewayUsername:
3843 return update_string_copy_(&settings->GatewayUsername, cnv.cc, len, cleanup);
3844
3845 case FreeRDP_HomePath:
3846 return update_string_copy_(&settings->HomePath, cnv.cc, len, cleanup);
3847
3848 case FreeRDP_ImeFileName:
3849 return update_string_copy_(&settings->ImeFileName, cnv.cc, len, cleanup);
3850
3851 case FreeRDP_KerberosArmor:
3852 return update_string_copy_(&settings->KerberosArmor, cnv.cc, len, cleanup);
3853
3854 case FreeRDP_KerberosCache:
3855 return update_string_copy_(&settings->KerberosCache, cnv.cc, len, cleanup);
3856
3857 case FreeRDP_KerberosKdcUrl:
3858 return update_string_copy_(&settings->KerberosKdcUrl, cnv.cc, len, cleanup);
3859
3860 case FreeRDP_KerberosKeytab:
3861 return update_string_copy_(&settings->KerberosKeytab, cnv.cc, len, cleanup);
3862
3863 case FreeRDP_KerberosLifeTime:
3864 return update_string_copy_(&settings->KerberosLifeTime, cnv.cc, len, cleanup);
3865
3866 case FreeRDP_KerberosRealm:
3867 return update_string_copy_(&settings->KerberosRealm, cnv.cc, len, cleanup);
3868
3869 case FreeRDP_KerberosRenewableLifeTime:
3870 return update_string_copy_(&settings->KerberosRenewableLifeTime, cnv.cc, len, cleanup);
3871
3872 case FreeRDP_KerberosStartTime:
3873 return update_string_copy_(&settings->KerberosStartTime, cnv.cc, len, cleanup);
3874
3875 case FreeRDP_KeyboardPipeName:
3876 return update_string_copy_(&settings->KeyboardPipeName, cnv.cc, len, cleanup);
3877
3878 case FreeRDP_KeyboardRemappingList:
3879 return update_string_copy_(&settings->KeyboardRemappingList, cnv.cc, len, cleanup);
3880
3881 case FreeRDP_NtlmSamFile:
3882 return update_string_copy_(&settings->NtlmSamFile, cnv.cc, len, cleanup);
3883
3884 case FreeRDP_Password:
3885 return update_string_copy_(&settings->Password, cnv.cc, len, cleanup);
3886
3887 case FreeRDP_PasswordHash:
3888 return update_string_copy_(&settings->PasswordHash, cnv.cc, len, cleanup);
3889
3890 case FreeRDP_Pkcs11Module:
3891 return update_string_copy_(&settings->Pkcs11Module, cnv.cc, len, cleanup);
3892
3893 case FreeRDP_PkinitAnchors:
3894 return update_string_copy_(&settings->PkinitAnchors, cnv.cc, len, cleanup);
3895
3896 case FreeRDP_PlayRemoteFxFile:
3897 return update_string_copy_(&settings->PlayRemoteFxFile, cnv.cc, len, cleanup);
3898
3899 case FreeRDP_PreconnectionBlob:
3900 return update_string_copy_(&settings->PreconnectionBlob, cnv.cc, len, cleanup);
3901
3902 case FreeRDP_ProxyHostname:
3903 return update_string_copy_(&settings->ProxyHostname, cnv.cc, len, cleanup);
3904
3905 case FreeRDP_ProxyPassword:
3906 return update_string_copy_(&settings->ProxyPassword, cnv.cc, len, cleanup);
3907
3908 case FreeRDP_ProxyUsername:
3909 return update_string_copy_(&settings->ProxyUsername, cnv.cc, len, cleanup);
3910
3911 case FreeRDP_RDP2TCPArgs:
3912 return update_string_copy_(&settings->RDP2TCPArgs, cnv.cc, len, cleanup);
3913
3914 case FreeRDP_ReaderName:
3915 return update_string_copy_(&settings->ReaderName, cnv.cc, len, cleanup);
3916
3917 case FreeRDP_RedirectionAcceptedCert:
3918 return update_string_copy_(&settings->RedirectionAcceptedCert, cnv.cc, len, cleanup);
3919
3920 case FreeRDP_RedirectionDomain:
3921 return update_string_copy_(&settings->RedirectionDomain, cnv.cc, len, cleanup);
3922
3923 case FreeRDP_RedirectionTargetFQDN:
3924 return update_string_copy_(&settings->RedirectionTargetFQDN, cnv.cc, len, cleanup);
3925
3926 case FreeRDP_RedirectionTargetNetBiosName:
3927 return update_string_copy_(&settings->RedirectionTargetNetBiosName, cnv.cc, len,
3928 cleanup);
3929
3930 case FreeRDP_RedirectionUsername:
3931 return update_string_copy_(&settings->RedirectionUsername, cnv.cc, len, cleanup);
3932
3933 case FreeRDP_RemoteApplicationCmdLine:
3934 return update_string_copy_(&settings->RemoteApplicationCmdLine, cnv.cc, len, cleanup);
3935
3936 case FreeRDP_RemoteApplicationFile:
3937 return update_string_copy_(&settings->RemoteApplicationFile, cnv.cc, len, cleanup);
3938
3939 case FreeRDP_RemoteApplicationGuid:
3940 return update_string_copy_(&settings->RemoteApplicationGuid, cnv.cc, len, cleanup);
3941
3942 case FreeRDP_RemoteApplicationIcon:
3943 return update_string_copy_(&settings->RemoteApplicationIcon, cnv.cc, len, cleanup);
3944
3945 case FreeRDP_RemoteApplicationName:
3946 return update_string_copy_(&settings->RemoteApplicationName, cnv.cc, len, cleanup);
3947
3948 case FreeRDP_RemoteApplicationProgram:
3949 return update_string_copy_(&settings->RemoteApplicationProgram, cnv.cc, len, cleanup);
3950
3951 case FreeRDP_RemoteApplicationWorkingDir:
3952 return update_string_copy_(&settings->RemoteApplicationWorkingDir, cnv.cc, len,
3953 cleanup);
3954
3955 case FreeRDP_RemoteAssistancePassStub:
3956 return update_string_copy_(&settings->RemoteAssistancePassStub, cnv.cc, len, cleanup);
3957
3958 case FreeRDP_RemoteAssistancePassword:
3959 return update_string_copy_(&settings->RemoteAssistancePassword, cnv.cc, len, cleanup);
3960
3961 case FreeRDP_RemoteAssistanceRCTicket:
3962 return update_string_copy_(&settings->RemoteAssistanceRCTicket, cnv.cc, len, cleanup);
3963
3964 case FreeRDP_RemoteAssistanceSessionId:
3965 return update_string_copy_(&settings->RemoteAssistanceSessionId, cnv.cc, len, cleanup);
3966
3967 case FreeRDP_ServerHostname:
3968 return update_string_copy_(&settings->ServerHostname, cnv.cc, len, cleanup);
3969
3970 case FreeRDP_ServerLicenseCompanyName:
3971 return update_string_copy_(&settings->ServerLicenseCompanyName, cnv.cc, len, cleanup);
3972
3973 case FreeRDP_ServerLicenseProductName:
3974 return update_string_copy_(&settings->ServerLicenseProductName, cnv.cc, len, cleanup);
3975
3976 case FreeRDP_ShellWorkingDirectory:
3977 return update_string_copy_(&settings->ShellWorkingDirectory, cnv.cc, len, cleanup);
3978
3979 case FreeRDP_SmartcardCertificate:
3980 return update_string_copy_(&settings->SmartcardCertificate, cnv.cc, len, cleanup);
3981
3982 case FreeRDP_SmartcardPrivateKey:
3983 return update_string_copy_(&settings->SmartcardPrivateKey, cnv.cc, len, cleanup);
3984
3985 case FreeRDP_SspiModule:
3986 return update_string_copy_(&settings->SspiModule, cnv.cc, len, cleanup);
3987
3988 case FreeRDP_TargetNetAddress:
3989 return update_string_copy_(&settings->TargetNetAddress, cnv.cc, len, cleanup);
3990
3991 case FreeRDP_TerminalDescriptor:
3992 return update_string_copy_(&settings->TerminalDescriptor, cnv.cc, len, cleanup);
3993
3994 case FreeRDP_TlsSecretsFile:
3995 return update_string_copy_(&settings->TlsSecretsFile, cnv.cc, len, cleanup);
3996
3997 case FreeRDP_TransportDumpFile:
3998 return update_string_copy_(&settings->TransportDumpFile, cnv.cc, len, cleanup);
3999
4000 case FreeRDP_UserSpecifiedServerName:
4001 return update_string_copy_(&settings->UserSpecifiedServerName, cnv.cc, len, cleanup);
4002
4003 case FreeRDP_Username:
4004 return update_string_copy_(&settings->Username, cnv.cc, len, cleanup);
4005
4006 case FreeRDP_WinSCardModule:
4007 return update_string_copy_(&settings->WinSCardModule, cnv.cc, len, cleanup);
4008
4009 case FreeRDP_WindowTitle:
4010 return update_string_copy_(&settings->WindowTitle, cnv.cc, len, cleanup);
4011
4012 case FreeRDP_WmClass:
4013 return update_string_copy_(&settings->WmClass, cnv.cc, len, cleanup);
4014
4015 default:
4016 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
4019 return FALSE;
4020 }
4021 return TRUE;
4022}
4023
4024void* freerdp_settings_get_pointer_writable(rdpSettings* settings, FreeRDP_Settings_Keys_Pointer id)
4025{
4026 WINPR_ASSERT(settings);
4027
4028 switch (id)
4029 {
4030 case FreeRDP_BitmapCacheV2CellInfo:
4031 return (void*)settings->BitmapCacheV2CellInfo;
4032
4033 case FreeRDP_ChannelDefArray:
4034 return (void*)settings->ChannelDefArray;
4035
4036 case FreeRDP_ClientAutoReconnectCookie:
4037 return (void*)settings->ClientAutoReconnectCookie;
4038
4039 case FreeRDP_ClientRandom:
4040 return (void*)settings->ClientRandom;
4041
4042 case FreeRDP_ClientTimeZone:
4043 return (void*)settings->ClientTimeZone;
4044
4045 case FreeRDP_DeviceArray:
4046 return (void*)settings->DeviceArray;
4047
4048 case FreeRDP_DynamicChannelArray:
4049 return (void*)settings->DynamicChannelArray;
4050
4051 case FreeRDP_FragCache:
4052 return (void*)settings->FragCache;
4053
4054 case FreeRDP_GlyphCache:
4055 return (void*)settings->GlyphCache;
4056
4057 case FreeRDP_LoadBalanceInfo:
4058 return (void*)settings->LoadBalanceInfo;
4059
4060 case FreeRDP_MonitorDefArray:
4061 return (void*)settings->MonitorDefArray;
4062
4063 case FreeRDP_MonitorIds:
4064 return (void*)settings->MonitorIds;
4065
4066 case FreeRDP_OrderSupport:
4067 return (void*)settings->OrderSupport;
4068
4069 case FreeRDP_Password51:
4070 return (void*)settings->Password51;
4071
4072 case FreeRDP_RdpServerCertificate:
4073 return (void*)settings->RdpServerCertificate;
4074
4075 case FreeRDP_RdpServerRsaKey:
4076 return (void*)settings->RdpServerRsaKey;
4077
4078 case FreeRDP_ReceivedCapabilities:
4079 return (void*)settings->ReceivedCapabilities;
4080
4081 case FreeRDP_ReceivedCapabilityData:
4082 return (void*)settings->ReceivedCapabilityData;
4083
4084 case FreeRDP_ReceivedCapabilityDataSizes:
4085 return (void*)settings->ReceivedCapabilityDataSizes;
4086
4087 case FreeRDP_RedirectionGuid:
4088 return (void*)settings->RedirectionGuid;
4089
4090 case FreeRDP_RedirectionPassword:
4091 return (void*)settings->RedirectionPassword;
4092
4093 case FreeRDP_RedirectionTargetCertificate:
4094 return (void*)settings->RedirectionTargetCertificate;
4095
4096 case FreeRDP_RedirectionTsvUrl:
4097 return (void*)settings->RedirectionTsvUrl;
4098
4099 case FreeRDP_ServerAutoReconnectCookie:
4100 return (void*)settings->ServerAutoReconnectCookie;
4101
4102 case FreeRDP_ServerCertificate:
4103 return (void*)settings->ServerCertificate;
4104
4105 case FreeRDP_ServerLicenseProductIssuers:
4106 return (void*)settings->ServerLicenseProductIssuers;
4107
4108 case FreeRDP_ServerRandom:
4109 return (void*)settings->ServerRandom;
4110
4111 case FreeRDP_StaticChannelArray:
4112 return (void*)settings->StaticChannelArray;
4113
4114 case FreeRDP_TargetNetAddresses:
4115 return (void*)settings->TargetNetAddresses;
4116
4117 case FreeRDP_TargetNetPorts:
4118 return (void*)settings->TargetNetPorts;
4119
4120 case FreeRDP_instance:
4121 return settings->instance;
4122
4123 default:
4124 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
4127 WINPR_ASSERT(FALSE);
4128 return NULL;
4129 }
4130}
4131
4132BOOL freerdp_settings_set_pointer(WINPR_ATTR_UNUSED rdpSettings* settings,
4133 WINPR_ATTR_UNUSED FreeRDP_Settings_Keys_Pointer id,
4134 const void* val)
4135{
4136 union
4137 {
4138 void* v;
4139 const void* cv;
4140 } cnv;
4141 WINPR_ASSERT(settings);
4142
4143 cnv.cv = val;
4144
4145 switch (id)
4146 {
4147 case FreeRDP_BitmapCacheV2CellInfo:
4148 settings->BitmapCacheV2CellInfo = (BITMAP_CACHE_V2_CELL_INFO*)cnv.v;
4149 break;
4150
4151 case FreeRDP_ChannelDefArray:
4152 settings->ChannelDefArray = (CHANNEL_DEF*)cnv.v;
4153 break;
4154
4155 case FreeRDP_ClientAutoReconnectCookie:
4156 settings->ClientAutoReconnectCookie = (ARC_CS_PRIVATE_PACKET*)cnv.v;
4157 break;
4158
4159 case FreeRDP_ClientRandom:
4160 settings->ClientRandom = (BYTE*)cnv.v;
4161 break;
4162
4163 case FreeRDP_ClientTimeZone:
4164 settings->ClientTimeZone = (TIME_ZONE_INFORMATION*)cnv.v;
4165 break;
4166
4167 case FreeRDP_DeviceArray:
4168 settings->DeviceArray = (RDPDR_DEVICE**)cnv.v;
4169 break;
4170
4171 case FreeRDP_DynamicChannelArray:
4172 settings->DynamicChannelArray = (ADDIN_ARGV**)cnv.v;
4173 break;
4174
4175 case FreeRDP_FragCache:
4176 settings->FragCache = (GLYPH_CACHE_DEFINITION*)cnv.v;
4177 break;
4178
4179 case FreeRDP_GlyphCache:
4180 settings->GlyphCache = (GLYPH_CACHE_DEFINITION*)cnv.v;
4181 break;
4182
4183 case FreeRDP_LoadBalanceInfo:
4184 settings->LoadBalanceInfo = (BYTE*)cnv.v;
4185 break;
4186
4187 case FreeRDP_MonitorDefArray:
4188 settings->MonitorDefArray = (rdpMonitor*)cnv.v;
4189 break;
4190
4191 case FreeRDP_MonitorIds:
4192 settings->MonitorIds = (UINT32*)cnv.v;
4193 break;
4194
4195 case FreeRDP_OrderSupport:
4196 settings->OrderSupport = (BYTE*)cnv.v;
4197 break;
4198
4199 case FreeRDP_Password51:
4200 settings->Password51 = (BYTE*)cnv.v;
4201 break;
4202
4203 case FreeRDP_RdpServerCertificate:
4204 settings->RdpServerCertificate = (rdpCertificate*)cnv.v;
4205 break;
4206
4207 case FreeRDP_RdpServerRsaKey:
4208 settings->RdpServerRsaKey = (rdpPrivateKey*)cnv.v;
4209 break;
4210
4211 case FreeRDP_ReceivedCapabilities:
4212 settings->ReceivedCapabilities = (BYTE*)cnv.v;
4213 break;
4214
4215 case FreeRDP_ReceivedCapabilityData:
4216 settings->ReceivedCapabilityData = (BYTE**)cnv.v;
4217 break;
4218
4219 case FreeRDP_ReceivedCapabilityDataSizes:
4220 settings->ReceivedCapabilityDataSizes = (UINT32*)cnv.v;
4221 break;
4222
4223 case FreeRDP_RedirectionGuid:
4224 settings->RedirectionGuid = (BYTE*)cnv.v;
4225 break;
4226
4227 case FreeRDP_RedirectionPassword:
4228 settings->RedirectionPassword = (BYTE*)cnv.v;
4229 break;
4230
4231 case FreeRDP_RedirectionTargetCertificate:
4232 settings->RedirectionTargetCertificate = (rdpCertificate*)cnv.v;
4233 break;
4234
4235 case FreeRDP_RedirectionTsvUrl:
4236 settings->RedirectionTsvUrl = (BYTE*)cnv.v;
4237 break;
4238
4239 case FreeRDP_ServerAutoReconnectCookie:
4240 settings->ServerAutoReconnectCookie = (ARC_SC_PRIVATE_PACKET*)cnv.v;
4241 break;
4242
4243 case FreeRDP_ServerCertificate:
4244 settings->ServerCertificate = (BYTE*)cnv.v;
4245 break;
4246
4247 case FreeRDP_ServerLicenseProductIssuers:
4248 settings->ServerLicenseProductIssuers = (char**)cnv.v;
4249 break;
4250
4251 case FreeRDP_ServerRandom:
4252 settings->ServerRandom = (BYTE*)cnv.v;
4253 break;
4254
4255 case FreeRDP_StaticChannelArray:
4256 settings->StaticChannelArray = (ADDIN_ARGV**)cnv.v;
4257 break;
4258
4259 case FreeRDP_TargetNetAddresses:
4260 settings->TargetNetAddresses = (char**)cnv.v;
4261 break;
4262
4263 case FreeRDP_TargetNetPorts:
4264 settings->TargetNetPorts = (UINT32*)cnv.v;
4265 break;
4266
4267 case FreeRDP_instance:
4268 settings->instance = cnv.v;
4269 break;
4270
4271 default:
4272 WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
4275 return FALSE;
4276 }
4277 return TRUE;
4278}
FREERDP_API UINT32 freerdp_settings_get_uint32(const rdpSettings *settings, FreeRDP_Settings_Keys_UInt32 id)
Returns a UINT32 settings value.
BOOL freerdp_settings_set_string(rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *val)
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 INT64 freerdp_settings_get_int64(const rdpSettings *settings, FreeRDP_Settings_Keys_Int64 id)
Returns a INT64 settings value.
FREERDP_API UINT64 freerdp_settings_get_uint64(const rdpSettings *settings, FreeRDP_Settings_Keys_UInt64 id)
Returns a UINT64 settings value.
FREERDP_API BOOL freerdp_settings_set_int32(rdpSettings *settings, FreeRDP_Settings_Keys_Int32 id, INT32 param)
Sets a INT32 settings value.
FREERDP_API UINT16 freerdp_settings_get_uint16(const rdpSettings *settings, FreeRDP_Settings_Keys_UInt16 id)
Returns a UINT16 settings value.
void * freerdp_settings_get_pointer_writable(rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id)
Returns a mutable pointer settings value.
FREERDP_API BOOL freerdp_settings_set_uint64(rdpSettings *settings, FreeRDP_Settings_Keys_UInt64 id, UINT64 param)
Sets a UINT64 settings value.
FREERDP_API BOOL freerdp_settings_set_int16(rdpSettings *settings, FreeRDP_Settings_Keys_Int16 id, INT16 param)
Sets a INT16 settings value.
FREERDP_API BOOL freerdp_settings_set_int64(rdpSettings *settings, FreeRDP_Settings_Keys_Int64 id, INT64 param)
Sets a INT64 settings value.
FREERDP_API BOOL freerdp_settings_set_pointer(rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id, const void *data)
Set a pointer to value data.
FREERDP_API INT32 freerdp_settings_get_int32(const rdpSettings *settings, FreeRDP_Settings_Keys_Int32 id)
Returns a INT32 settings value.
FREERDP_API const char * freerdp_settings_get_type_name_for_key(SSIZE_T key)
Returns the type name for a key.
BOOL freerdp_settings_set_string_len(rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *val, size_t len)
Sets a string settings value. The param is copied.
FREERDP_API BOOL freerdp_settings_set_uint32(rdpSettings *settings, FreeRDP_Settings_Keys_UInt32 id, UINT32 param)
Sets a UINT32 settings value.
char * freerdp_settings_get_string_writable(rdpSettings *settings, FreeRDP_Settings_Keys_String id)
Returns a string settings value.
FREERDP_API const char * freerdp_settings_get_name_for_key(SSIZE_T key)
Returns the type name for a key.
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_uint16(rdpSettings *settings, FreeRDP_Settings_Keys_UInt16 id, UINT16 param)
Sets a UINT16 settings value.
FREERDP_API INT16 freerdp_settings_get_int16(const rdpSettings *settings, FreeRDP_Settings_Keys_Int16 id)
Returns a INT16 settings value.
FREERDP_API BOOL freerdp_settings_set_bool(rdpSettings *settings, FreeRDP_Settings_Keys_Bool id, BOOL param)
Sets a BOOL settings value.