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