FreeRDP
rdpSettings

This is the FreeRDP settings module. More...

Data Structures

struct  TARGET_NET_ADDRESS
 
struct  ARC_CS_PRIVATE_PACKET
 
struct  ARC_SC_PRIVATE_PACKET
 
struct  ADDIN_ARGV
 
struct  rdp_ext_set
 
struct  BITMAP_CACHE_CELL_INFO
 
struct  BITMAP_CACHE_V2_CELL_INFO
 
struct  GLYPH_CACHE_DEFINITION
 
struct  MONITOR_DEF
 
struct  MONITOR_ATTRIBUTES
 
struct  rdpMonitor
 
struct  RDPDR_DEVICE
 
struct  RDPDR_DRIVE
 
struct  RDPDR_PRINTER
 
struct  RDPDR_SMARTCARD
 
struct  RDPDR_SERIAL
 
struct  RDPDR_PARALLEL
 
struct  rdpSettings
 

Macros

#define FREERDP_SETTINGS_SERVER_MODE   0x00000001
 
#define FREERDP_SETTINGS_REMOTE_MODE   0x00000002
 
#define SURFCMDS_SET_SURFACE_BITS   0x00000002 /** @since version 3.7.0 */
 
#define SURFCMDS_FRAME_MARKER   0x00000010 /** @since version 3.7.0 */
 
#define SURFCMDS_STREAM_SURFACE_BITS   0x00000040 /** @since version 3.7.0 */
 
#define RAIL_LEVEL_SUPPORTED   0x00000001
 
#define RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED   0x00000002
 
#define RAIL_LEVEL_SHELL_INTEGRATION_SUPPORTED   0x00000004
 
#define RAIL_LEVEL_LANGUAGE_IME_SYNC_SUPPORTED   0x00000008
 
#define RAIL_LEVEL_SERVER_TO_CLIENT_IME_SYNC_SUPPORTED   0x00000010
 
#define RAIL_LEVEL_HIDE_MINIMIZED_APPS_SUPPORTED   0x00000020
 
#define RAIL_LEVEL_WINDOW_CLOAKING_SUPPORTED   0x00000040
 
#define RAIL_LEVEL_HANDSHAKE_EX_SUPPORTED   0x00000080
 
#define PERF_FLAG_NONE   0x00000000
 
#define PERF_DISABLE_WALLPAPER   0x00000001
 
#define PERF_DISABLE_FULLWINDOWDRAG   0x00000002
 
#define PERF_DISABLE_MENUANIMATIONS   0x00000004
 
#define PERF_DISABLE_THEMING   0x00000008
 
#define PERF_DISABLE_CURSOR_SHADOW   0x00000020
 
#define PERF_DISABLE_CURSORSETTINGS   0x00000040
 
#define PERF_ENABLE_FONT_SMOOTHING   0x00000080
 
#define PERF_ENABLE_DESKTOP_COMPOSITION   0x00000100
 
#define CONNECTION_TYPE_INVALID
 
#define CONNECTION_TYPE_MODEM   0x01
 
#define CONNECTION_TYPE_BROADBAND_LOW   0x02
 
#define CONNECTION_TYPE_SATELLITE   0x03
 
#define CONNECTION_TYPE_BROADBAND_HIGH   0x04
 
#define CONNECTION_TYPE_WAN   0x05
 
#define CONNECTION_TYPE_LAN   0x06
 
#define CONNECTION_TYPE_AUTODETECT   0x07
 
#define CS_CORE   0xC001
 
#define CS_SECURITY   0xC002
 
#define CS_NET   0xC003
 
#define CS_CLUSTER   0xC004
 
#define CS_MONITOR   0xC005
 
#define CS_MCS_MSGCHANNEL   0xC006
 
#define CS_MONITOR_EX   0xC008
 
#define CS_UNUSED1   0xC00C
 
#define CS_MULTITRANSPORT   0xC00A
 
#define SC_CORE   0x0C01
 
#define SC_SECURITY   0x0C02
 
#define SC_NET   0x0C03
 
#define SC_MCS_MSGCHANNEL   0x0C04
 
#define SC_MULTITRANSPORT   0x0C08
 
#define RNS_UD_COLOR_4BPP   0xCA00
 
#define RNS_UD_COLOR_8BPP   0xCA01
 
#define RNS_UD_COLOR_16BPP_555   0xCA02
 
#define RNS_UD_COLOR_16BPP_565   0xCA03
 
#define RNS_UD_COLOR_24BPP   0xCA04
 
#define RNS_UD_SAS_DEL   0xAA03
 
#define RNS_UD_24BPP_SUPPORT   0x0001
 
#define RNS_UD_16BPP_SUPPORT   0x0002
 
#define RNS_UD_15BPP_SUPPORT   0x0004
 
#define RNS_UD_32BPP_SUPPORT   0x0008
 
#define AUDIO_MODE_REDIRECT   0 /* Bring to this computer */
 
#define AUDIO_MODE_PLAY_ON_SERVER   1 /* Leave at remote computer */
 
#define AUDIO_MODE_NONE   2 /* Do not play */
 
#define RNS_UD_CS_SUPPORT_ERRINFO_PDU   0x0001
 
#define RNS_UD_CS_WANT_32BPP_SESSION   0x0002
 
#define RNS_UD_CS_SUPPORT_STATUSINFO_PDU   0x0004
 
#define RNS_UD_CS_STRONG_ASYMMETRIC_KEYS   0x0008
 
#define RNS_UD_CS_RELATIVE_MOUSE_INPUT   0x0010
 
#define RNS_UD_CS_VALID_CONNECTION_TYPE   0x0020
 
#define RNS_UD_CS_SUPPORT_MONITOR_LAYOUT_PDU   0x0040
 
#define RNS_UD_CS_SUPPORT_NETCHAR_AUTODETECT   0x0080
 
#define RNS_UD_CS_SUPPORT_DYNVC_GFX_PROTOCOL   0x0100
 
#define RNS_UD_CS_SUPPORT_DYNAMIC_TIME_ZONE   0x0200
 
#define RNS_UD_CS_SUPPORT_HEARTBEAT_PDU   0x0400
 
#define RNS_UD_CS_SUPPORT_SKIP_CHANNELJOIN   0x0800
 
#define RNS_UD_SC_EDGE_ACTIONS_SUPPORTED_V1   0x00000001
 
#define RNS_UD_SC_DYNAMIC_DST_SUPPORTED   0x00000002
 
#define RNS_UD_SC_EDGE_ACTIONS_SUPPORTED_V2   0x00000004
 
#define RNS_UD_SC_SKIP_CHANNELJOIN_SUPPORTED   0x00000008
 
#define REDIRECTION_SUPPORTED   0x00000001
 
#define REDIRECTED_SESSIONID_FIELD_VALID   0x00000002
 
#define REDIRECTED_SMARTCARD   0x00000040
 
#define ServerSessionRedirectionVersionMask   0x0000003c
 
#define REDIRECTION_VERSION1   0x00
 
#define REDIRECTION_VERSION2   0x01
 
#define REDIRECTION_VERSION3   0x02
 
#define REDIRECTION_VERSION4   0x03
 
#define REDIRECTION_VERSION5   0x04
 
#define REDIRECTION_VERSION6   0x05
 
#define MONITOR_PRIMARY   0x00000001
 
#define ENCRYPTION_METHOD_NONE   0x00000000
 
#define ENCRYPTION_METHOD_40BIT   0x00000001
 
#define ENCRYPTION_METHOD_128BIT   0x00000002
 
#define ENCRYPTION_METHOD_56BIT   0x00000008
 
#define ENCRYPTION_METHOD_FIPS   0x00000010
 
#define ENCRYPTION_LEVEL_NONE   0x00000000
 
#define ENCRYPTION_LEVEL_LOW   0x00000001
 
#define ENCRYPTION_LEVEL_CLIENT_COMPATIBLE   0x00000002
 
#define ENCRYPTION_LEVEL_HIGH   0x00000003
 
#define ENCRYPTION_LEVEL_FIPS   0x00000004
 
#define TRANSPORT_TYPE_UDP_FECR   0x00000001
 
#define TRANSPORT_TYPE_UDP_FECL   0x00000004
 
#define TRANSPORT_TYPE_UDP_PREFERRED   0x00000100
 
#define SOFTSYNC_TCP_TO_UDP   0x00000200
 
#define CHANNEL_OPTION_INITIALIZED   0x80000000
 
#define CHANNEL_OPTION_ENCRYPT_RDP   0x40000000
 
#define CHANNEL_OPTION_ENCRYPT_SC   0x20000000
 
#define CHANNEL_OPTION_ENCRYPT_CS   0x10000000
 
#define CHANNEL_OPTION_PRI_HIGH   0x08000000
 
#define CHANNEL_OPTION_PRI_MED   0x04000000
 
#define CHANNEL_OPTION_PRI_LOW   0x02000000
 
#define CHANNEL_OPTION_COMPRESS_RDP   0x00800000
 
#define CHANNEL_OPTION_COMPRESS   0x00400000
 
#define CHANNEL_OPTION_SHOW_PROTOCOL   0x00200000
 
#define CHANNEL_REMOTE_CONTROL_PERSISTENT   0x00100000
 
#define VCCAPS_NO_COMPR   0x00000000
 
#define VCCAPS_COMPR_SC   0x00000001
 
#define VCCAPS_COMPR_CS_8K   0x00000002
 
#define LARGE_POINTER_FLAG_96x96   0x00000001
 
#define LARGE_POINTER_FLAG_384x384   0x00000002
 
#define AUTO_RECONNECT_VERSION_1   0x00000001
 
#define MSTSC_COOKIE_MAX_LENGTH   9
 
#define DEFAULT_COOKIE_MAX_LENGTH   0xFF
 
#define TS_CAPS_PROTOCOLVERSION   0x200 /** @since version 3.6.0 */
 
#define NEG_DSTBLT_INDEX   0x00
 
#define NEG_PATBLT_INDEX   0x01
 
#define NEG_SCRBLT_INDEX   0x02
 
#define NEG_MEMBLT_INDEX   0x03
 
#define NEG_MEM3BLT_INDEX   0x04
 
#define NEG_ATEXTOUT_INDEX   0x05
 
#define NEG_AEXTTEXTOUT_INDEX   0x06 /* Must be ignored */
 
#define NEG_DRAWNINEGRID_INDEX   0x07 /* Must be ignored */
 
#define NEG_LINETO_INDEX   0x08
 
#define NEG_MULTI_DRAWNINEGRID_INDEX   0x09
 
#define NEG_OPAQUE_RECT_INDEX   0x0A /* Must be ignored */
 
#define NEG_SAVEBITMAP_INDEX   0x0B
 
#define NEG_WTEXTOUT_INDEX   0x0C /* Must be ignored */
 
#define NEG_MEMBLT_V2_INDEX   0x0D /* Must be ignored */
 
#define NEG_MEM3BLT_V2_INDEX   0x0E /* Must be ignored */
 
#define NEG_MULTIDSTBLT_INDEX   0x0F
 
#define NEG_MULTIPATBLT_INDEX   0x10
 
#define NEG_MULTISCRBLT_INDEX   0x11
 
#define NEG_MULTIOPAQUERECT_INDEX   0x12
 
#define NEG_FAST_INDEX_INDEX   0x13
 
#define NEG_POLYGON_SC_INDEX   0x14
 
#define NEG_POLYGON_CB_INDEX   0x15
 
#define NEG_POLYLINE_INDEX   0x16
 
#define NEG_UNUSED23_INDEX   0x17 /* Must be ignored */
 
#define NEG_FAST_GLYPH_INDEX   0x18
 
#define NEG_ELLIPSE_SC_INDEX   0x19
 
#define NEG_ELLIPSE_CB_INDEX   0x1A
 
#define NEG_GLYPH_INDEX_INDEX   0x1B
 
#define NEG_GLYPH_WEXTTEXTOUT_INDEX   0x1C /* Must be ignored */
 
#define NEG_GLYPH_WLONGTEXTOUT_INDEX   0x1D /* Must be ignored */
 
#define NEG_GLYPH_WLONGEXTTEXTOUT_INDEX   0x1E /* Must be ignored */
 
#define NEG_UNUSED31_INDEX   0x1F /* Must be ignored */
 
#define GLYPH_SUPPORT_NONE   0x0000
 
#define GLYPH_SUPPORT_PARTIAL   0x0001
 
#define GLYPH_SUPPORT_FULL   0x0002
 
#define GLYPH_SUPPORT_ENCODE   0x0003
 
#define TSC_PROXY_MODE_NONE_DIRECT   0x0
 
#define TSC_PROXY_MODE_DIRECT   0x1
 
#define TSC_PROXY_MODE_DETECT   0x2
 
#define TSC_PROXY_MODE_DEFAULT   0x3
 
#define TSC_PROXY_MODE_NONE_DETECT   0x4
 
#define TSC_PROXY_CREDS_MODE_USERPASS   0x0
 
#define TSC_PROXY_CREDS_MODE_SMARTCARD   0x1
 
#define TSC_PROXY_CREDS_MODE_ANY   0x2
 
#define KEYBOARD_HOOK_LOCAL   0
 
#define KEYBOARD_HOOK_REMOTE   1
 
#define KEYBOARD_HOOK_FULLSCREEN_ONLY   2
 
#define LOGON_MSG_DISCONNECT_REFUSED   0xFFFFFFF9
 
#define LOGON_MSG_NO_PERMISSION   0xFFFFFFFA
 
#define LOGON_MSG_BUMP_OPTIONS   0xFFFFFFFB
 
#define LOGON_MSG_RECONNECT_OPTIONS   0xFFFFFFFC
 
#define LOGON_MSG_SESSION_TERMINATE   0xFFFFFFFD
 
#define LOGON_MSG_SESSION_CONTINUE   0xFFFFFFFE
 
#define LOGON_FAILED_BAD_PASSWORD   0x00000000
 
#define LOGON_FAILED_UPDATE_PASSWORD   0x00000001
 
#define LOGON_FAILED_OTHER   0x00000002
 
#define LOGON_WARNING   0x00000003
 
#define STATUS_FINDING_DESTINATION   0x00000401
 
#define STATUS_LOADING_DESTINATION   0x00000402
 
#define STATUS_BRINGING_SESSION_ONLINE   0x00000403
 
#define STATUS_REDIRECTING_TO_DESTINATION   0x00000404
 
#define STATUS_VM_LOADING   0x00000501
 
#define STATUS_VM_WAKING   0x00000502
 
#define STATUS_VM_BOOTING   0x00000503
 
#define PACKET_COMPR_TYPE_8K   0x00
 
#define PACKET_COMPR_TYPE_64K   0x01
 
#define PACKET_COMPR_TYPE_RDP6   0x02
 
#define PACKET_COMPR_TYPE_RDP61   0x03
 
#define PACKET_COMPR_TYPE_RDP8   0x04
 
#define ORIENTATION_LANDSCAPE   0
 
#define ORIENTATION_PORTRAIT   90
 
#define ORIENTATION_LANDSCAPE_FLIPPED   180
 
#define ORIENTATION_PORTRAIT_FLIPPED   270
 
#define CLIPRDR_FLAG_LOCAL_TO_REMOTE   0x01
 
#define CLIPRDR_FLAG_LOCAL_TO_REMOTE_FILES   0x02
 
#define CLIPRDR_FLAG_REMOTE_TO_LOCAL   0x10
 
#define CLIPRDR_FLAG_REMOTE_TO_LOCAL_FILES   0x20
 
#define CLIPRDR_FLAG_DEFAULT_MASK
 
#define RDPDR_DTYP_SERIAL   0x00000001
 
#define RDPDR_DTYP_PARALLEL   0x00000002
 
#define RDPDR_DTYP_PRINT   0x00000004
 
#define RDPDR_DTYP_FILESYSTEM   0x00000008
 
#define RDPDR_DTYP_SMARTCARD   0x00000020
 
#define PROXY_TYPE_NONE   0
 
#define PROXY_TYPE_HTTP   1
 
#define PROXY_TYPE_SOCKS   2
 
#define PROXY_TYPE_IGNORE   0xFFFF
 
#define THREADING_FLAGS_DISABLE_THREADS   0x00000001
 
#define FREERDP_SETTINGS_SERVER_MODE   0x00000001
 
#define SETTINGS_DEPRECATED(x)   WINPR_DEPRECATED(x)
 

Enumerations

enum  RDP_VERSION {
  RDP_VERSION_4 = 0x00080001 , RDP_VERSION_5_PLUS = 0x00080004 , RDP_VERSION_10_0 = 0x00080005 , RDP_VERSION_10_1 = 0x00080006 ,
  RDP_VERSION_10_2 = 0x00080007 , RDP_VERSION_10_3 = 0x00080008 , RDP_VERSION_10_4 = 0x00080009 , RDP_VERSION_10_5 = 0x0008000a ,
  RDP_VERSION_10_6 = 0x0008000b , RDP_VERSION_10_7 = 0x0008000C , RDP_VERSION_10_8 = 0x0008000D , RDP_VERSION_10_9 = 0x0008000E ,
  RDP_VERSION_10_10 = 0x0008000F , RDP_VERSION_10_11 = 0x00080010 , RDP_VERSION_10_12 = 0x00080011
}
 
enum  rdp_settings_type {
  RDP_SETTINGS_TYPE_BOOL , RDP_SETTINGS_TYPE_UINT16 , RDP_SETTINGS_TYPE_INT16 , RDP_SETTINGS_TYPE_UINT32 ,
  RDP_SETTINGS_TYPE_INT32 , RDP_SETTINGS_TYPE_UINT64 , RDP_SETTINGS_TYPE_INT64 , RDP_SETTINGS_TYPE_STRING ,
  RDP_SETTINGS_TYPE_POINTER
}
 

Functions

FREERDP_API void freerdp_settings_free (rdpSettings *settings)
 Free a settings struct with all data in it. More...
 
FREERDP_API rdpSettings * freerdp_settings_new (DWORD flags)
 creates a new setting struct More...
 
FREERDP_API rdpSettings * freerdp_settings_clone (const rdpSettings *settings)
 Creates a deep copy of settings. More...
 
FREERDP_API BOOL freerdp_settings_copy (rdpSettings *dst, const rdpSettings *src)
 Deep copies settings from src to dst. More...
 
FREERDP_API BOOL freerdp_settings_copy_item (rdpSettings *dst, const rdpSettings *src, SSIZE_T id)
 copies one setting identified by id from src to dst More...
 
FREERDP_API void freerdp_settings_dump (wLog *log, DWORD level, const rdpSettings *settings)
 Dumps the contents of a settings struct to a WLog logger. More...
 
FREERDP_API BOOL freerdp_settings_print_diff (wLog *log, DWORD level, const rdpSettings *src, const rdpSettings *other)
 Dumps the difference between two settings structs to a WLog. More...
 
FREERDP_API void freerdp_addin_argv_free (ADDIN_ARGV *args)
 
FREERDP_API ADDIN_ARGVfreerdp_addin_argv_new (size_t argc, const char *const argv[])
 
FREERDP_API ADDIN_ARGVfreerdp_addin_argv_clone (const ADDIN_ARGV *args)
 
FREERDP_API BOOL freerdp_addin_argv_add_argument (ADDIN_ARGV *args, const char *argument)
 
FREERDP_API BOOL freerdp_addin_argv_add_argument_ex (ADDIN_ARGV *args, const char *argument, size_t len)
 
FREERDP_API BOOL freerdp_addin_argv_del_argument (ADDIN_ARGV *args, const char *argument)
 
FREERDP_API int freerdp_addin_set_argument (ADDIN_ARGV *args, const char *argument)
 
FREERDP_API int freerdp_addin_replace_argument (ADDIN_ARGV *args, const char *previous, const char *argument)
 
FREERDP_API int freerdp_addin_set_argument_value (ADDIN_ARGV *args, const char *option, const char *value)
 
FREERDP_API int freerdp_addin_replace_argument_value (ADDIN_ARGV *args, const char *previous, const char *option, const char *value)
 
FREERDP_API BOOL freerdp_device_collection_add (rdpSettings *settings, RDPDR_DEVICE *device)
 
FREERDP_API BOOL freerdp_device_collection_del (rdpSettings *settings, const RDPDR_DEVICE *device)
 Removed a device from the settings, returns ownership of the allocated device to caller. More...
 
FREERDP_API RDPDR_DEVICEfreerdp_device_collection_find (rdpSettings *settings, const char *name)
 
FREERDP_API RDPDR_DEVICEfreerdp_device_collection_find_type (rdpSettings *settings, UINT32 type)
 
FREERDP_API void freerdp_device_free (RDPDR_DEVICE *device)
 
FREERDP_API RDPDR_DEVICEfreerdp_device_new (UINT32 Type, size_t count, const char *const args[])
 
FREERDP_API RDPDR_DEVICEfreerdp_device_clone (const RDPDR_DEVICE *device)
 
FREERDP_API BOOL freerdp_device_equal (const RDPDR_DEVICE *one, const RDPDR_DEVICE *other)
 
FREERDP_API void freerdp_device_collection_free (rdpSettings *settings)
 
FREERDP_API BOOL freerdp_static_channel_collection_add (rdpSettings *settings, ADDIN_ARGV *channel)
 
FREERDP_API BOOL freerdp_static_channel_collection_del (rdpSettings *settings, const char *name)
 
FREERDP_API ADDIN_ARGVfreerdp_static_channel_collection_find (rdpSettings *settings, const char *name)
 
FREERDP_API void freerdp_static_channel_collection_free (rdpSettings *settings)
 
FREERDP_API BOOL freerdp_dynamic_channel_collection_add (rdpSettings *settings, ADDIN_ARGV *channel)
 
FREERDP_API BOOL freerdp_dynamic_channel_collection_del (rdpSettings *settings, const char *name)
 
FREERDP_API ADDIN_ARGVfreerdp_dynamic_channel_collection_find (const rdpSettings *settings, const char *name)
 
FREERDP_API void freerdp_dynamic_channel_collection_free (rdpSettings *settings)
 
FREERDP_API void freerdp_capability_buffer_free (rdpSettings *settings)
 
FREERDP_API BOOL freerdp_capability_buffer_copy (rdpSettings *settings, const rdpSettings *src)
 
FREERDP_API void freerdp_server_license_issuers_free (rdpSettings *settings)
 
FREERDP_API BOOL freerdp_server_license_issuers_copy (rdpSettings *settings, char **addresses, UINT32 count)
 
FREERDP_API void freerdp_target_net_addresses_free (rdpSettings *settings)
 
FREERDP_API BOOL freerdp_target_net_addresses_copy (rdpSettings *settings, char **addresses, UINT32 count)
 
FREERDP_API void freerdp_performance_flags_make (rdpSettings *settings)
 
FREERDP_API void freerdp_performance_flags_split (rdpSettings *settings)
 
FREERDP_API BOOL freerdp_set_gateway_usage_method (rdpSettings *settings, UINT32 GatewayUsageMethod)
 
FREERDP_API void freerdp_update_gateway_usage_method (rdpSettings *settings, UINT32 GatewayEnabled, UINT32 GatewayBypassLocal)
 
FREERDP_API BOOL freerdp_settings_are_valid (const rdpSettings *settings)
 Returns TRUE if settings are in a valid state, FALSE otherwise. More...
 
FREERDP_API BOOL freerdp_settings_get_bool (const rdpSettings *settings, FreeRDP_Settings_Keys_Bool id)
 Returns a boolean settings value. More...
 
FREERDP_API BOOL freerdp_settings_set_bool (rdpSettings *settings, FreeRDP_Settings_Keys_Bool id, BOOL param)
 Sets a BOOL settings value. More...
 
FREERDP_API INT16 freerdp_settings_get_int16 (const rdpSettings *settings, FreeRDP_Settings_Keys_Int16 id)
 Returns a INT16 settings value. More...
 
FREERDP_API BOOL freerdp_settings_set_int16 (rdpSettings *settings, FreeRDP_Settings_Keys_Int16 id, INT16 param)
 Sets a INT16 settings value. More...
 
FREERDP_API UINT16 freerdp_settings_get_uint16 (const rdpSettings *settings, FreeRDP_Settings_Keys_UInt16 id)
 Returns a UINT16 settings value. More...
 
FREERDP_API BOOL freerdp_settings_set_uint16 (rdpSettings *settings, FreeRDP_Settings_Keys_UInt16 id, UINT16 param)
 Sets a UINT16 settings value. More...
 
FREERDP_API INT32 freerdp_settings_get_int32 (const rdpSettings *settings, FreeRDP_Settings_Keys_Int32 id)
 Returns a INT32 settings value. More...
 
FREERDP_API BOOL freerdp_settings_set_int32 (rdpSettings *settings, FreeRDP_Settings_Keys_Int32 id, INT32 param)
 Sets a INT32 settings value. More...
 
FREERDP_API UINT32 freerdp_settings_get_uint32 (const rdpSettings *settings, FreeRDP_Settings_Keys_UInt32 id)
 Returns a UINT32 settings value. More...
 
FREERDP_API BOOL freerdp_settings_set_uint32 (rdpSettings *settings, FreeRDP_Settings_Keys_UInt32 id, UINT32 param)
 Sets a UINT32 settings value. More...
 
FREERDP_API INT64 freerdp_settings_get_int64 (const rdpSettings *settings, FreeRDP_Settings_Keys_Int64 id)
 Returns a INT64 settings value. More...
 
FREERDP_API BOOL freerdp_settings_set_int64 (rdpSettings *settings, FreeRDP_Settings_Keys_Int64 id, INT64 param)
 Sets a INT64 settings value. More...
 
FREERDP_API UINT64 freerdp_settings_get_uint64 (const rdpSettings *settings, FreeRDP_Settings_Keys_UInt64 id)
 Returns a UINT64 settings value. More...
 
FREERDP_API BOOL freerdp_settings_set_uint64 (rdpSettings *settings, FreeRDP_Settings_Keys_UInt64 id, UINT64 param)
 Sets a UINT64 settings value. More...
 
FREERDP_API const char * freerdp_settings_get_string (const rdpSettings *settings, FreeRDP_Settings_Keys_String id)
 Returns a immutable string settings value. More...
 
FREERDP_API char * freerdp_settings_get_string_writable (rdpSettings *settings, FreeRDP_Settings_Keys_String id)
 Returns a string settings value. More...
 
FREERDP_API BOOL freerdp_settings_set_string_len (rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *param, size_t len)
 Sets a string settings value. The param is copied. More...
 
FREERDP_API BOOL freerdp_settings_set_string (rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *param)
 Sets a string settings value. The param is copied. More...
 
FREERDP_API BOOL freerdp_settings_append_string (rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *separator, const char *param)
 appends a string to a settings value. The param is copied. If the initial value of the setting was not empty, More...
 
FREERDP_API BOOL freerdp_settings_set_string_from_utf16 (rdpSettings *settings, FreeRDP_Settings_Keys_String id, const WCHAR *param)
 Sets a string settings value. The param is converted to UTF-8 and the copy stored. More...
 
FREERDP_API BOOL freerdp_settings_set_string_from_utf16N (rdpSettings *settings, FreeRDP_Settings_Keys_String id, const WCHAR *param, size_t length)
 Sets a string settings value. The param is converted to UTF-8 and the copy stored. More...
 
FREERDP_API WCHAR * freerdp_settings_get_string_as_utf16 (const rdpSettings *settings, FreeRDP_Settings_Keys_String id, size_t *pCharLen)
 Return an allocated UTF16 string. More...
 
FREERDP_API const void * freerdp_settings_get_pointer (const rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id)
 Returns a immutable pointer settings value. More...
 
FREERDP_API void * freerdp_settings_get_pointer_writable (rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id)
 Returns a mutable pointer settings value. More...
 
FREERDP_API BOOL freerdp_settings_set_pointer (rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id, const void *data)
 Set a pointer to value data. More...
 
FREERDP_API BOOL freerdp_settings_set_pointer_len (rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id, const void *data, size_t len)
 Set a pointer to value data. More...
 
FREERDP_API const void * freerdp_settings_get_pointer_array (const rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id, size_t offset)
 
FREERDP_API void * freerdp_settings_get_pointer_array_writable (const rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id, size_t offset)
 
FREERDP_API BOOL freerdp_settings_set_pointer_array (rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id, size_t offset, const void *data)
 

to value \b value

Set a setting Both, key and value are provided as strings and parsed internally.

The value will be checked internally:

  • Integer types must be within boundaries
  • BOOL must be any of {'true', 'false', 'on', 'off', '0', '1'} (case insensitive)
  • Strings are passed on as is
  • Pointers are also passed as is
Parameters
settingsThe settings instance to set the value, must not be NULL
nameThe name of the settings key (like 'FreeRDP_Domain', same as output of freerdp_settings_get_name_for_key ) Must not be NULL
valueThe value of the setting. Must not be NULL
Note
If the function fails check wLog output for details
Since
version 3.0.0
Returns
TRUE in case of success, FALSE otherwise.
FREERDP_API BOOL freerdp_settings_set_value_for_name (rdpSettings *settings, const char *name, const char *value)
 
FREERDP_API SSIZE_T freerdp_settings_get_key_for_name (const char *value)
 Get a key index for the name string of that key. More...
 
FREERDP_API SSIZE_T freerdp_settings_get_type_for_name (const char *value)
 Get a key type for the name string of that key. More...
 
FREERDP_API SSIZE_T freerdp_settings_get_type_for_key (SSIZE_T key)
 Get a key type for the key index. More...
 
FREERDP_API const char * freerdp_settings_get_type_name_for_key (SSIZE_T key)
 Returns the type name for a key. More...
 
FREERDP_API const char * freerdp_settings_get_type_name_for_type (SSIZE_T type)
 Returns the type name for a type. More...
 
FREERDP_API const char * freerdp_settings_get_name_for_key (SSIZE_T key)
 Returns the type name for a key. More...
 
FREERDP_API UINT32 freerdp_settings_get_codecs_flags (const rdpSettings *settings)
 helper function to get a mask of supported codec flags. More...
 
FREERDP_API BOOL freerdp_settings_update_from_caps (rdpSettings *settings, const BYTE *capsFlags, const BYTE **capsData, const UINT32 *capsSizes, UINT32 capsCount, BOOL serverReceivedCaps)
 Parse capability data and apply to settings. More...
 
FREERDP_API const char * freerdp_settings_get_server_name (const rdpSettings *settings)
 A helper function to return the correct server name. More...
 
FREERDP_API const char * freerdp_rail_support_flags_to_string (UINT32 flags, char *buffer, size_t length)
 Returns a stringified representation of RAIL support flags. More...
 
FREERDP_API const char * freerdp_rdp_version_string (UINT32 version)
 Returns a stringified representation of the RDP protocol version. More...
 
FREERDP_API const char * freerdp_rdpdr_dtyp_string (UINT32 type)
 Returns a string representation of RDPDR_DTYP_*. More...
 
FREERDP_API const char * freerdp_encryption_level_string (UINT32 EncryptionLevel)
 
FREERDP_API const char * freerdp_encryption_methods_string (UINT32 EncryptionLevel, char *buffer, size_t size)
 
FREERDP_API const char * freerdp_supported_color_depths_string (UINT16 mask, char *buffer, size_t size)
 returns a string representation of RNS_UD_XXBPP_SUPPORT values More...
 
FREERDP_API char * freerdp_settings_get_config_path (void)
 return the configuration directory for the library More...
 

Detailed Description

This is the FreeRDP settings module.

FreeRDP: A Remote Desktop Protocol Implementation RDP Settings

Copyright 2009-2011 Jay Sorg Copyright 2010-2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2016 Armin Novak armin.nosp@m..nov.nosp@m.ak@gm.nosp@m.ail..nosp@m.com Copyright 2023 Armin Novak anova.nosp@m.k@th.nosp@m.incas.nosp@m.t.co.nosp@m.m Copyright 2023 Thincast Technologies GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Settings are used to store configuration data for an RDP connection. There are 3 different settings for each client and server:

  1. The initial connection supplied by the user
  2. The settings sent from client or server during capability exchange
  3. The settings merged from the capability exchange and the initial configuration.

The lifetime of the settings is as follows:

  1. Initial configuration is saved and will be valid for the whole application lifecycle
  2. The client or server settings from the other end are valid from capability exchange until the connection is ended (disconnect/redirect/...)
  3. The merged settings are created from the initial configuration and server settings and have the same lifetime, until the connection ends

So, when accessing the settings always ensure to know which one you are operating on! (this is especially important for the proxy where you have a RDP client and RDP server in the same application context)

FreeRDP: A Remote Desktop Protocol Implementation RDP Settings

Copyright 2009-2011 Jay Sorg Copyright 2010-2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2016 Armin Novak armin.nosp@m..nov.nosp@m.ak@gm.nosp@m.ail..nosp@m.com Copyright 2023 Armin Novak anova.nosp@m.k@th.nosp@m.incas.nosp@m.t.co.nosp@m.m Copyright 2023 Thincast Technologies GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

FreeRDP: A Remote Desktop Protocol Implementation Internal settings header for functions not exported

Copyright 2018 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyright 2018 Thincast Technologies GmbH

Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Data Structure Documentation

◆ TARGET_NET_ADDRESS

struct TARGET_NET_ADDRESS

Definition at line 290 of file settings_types.h.

Data Fields
LPWSTR Address
UINT32 Length

◆ ARC_CS_PRIVATE_PACKET

struct ARC_CS_PRIVATE_PACKET

Definition at line 342 of file settings_types.h.

Data Fields
UINT32 cbLen
UINT32 logonId
BYTE securityVerifier[16]
UINT32 version

◆ ARC_SC_PRIVATE_PACKET

struct ARC_SC_PRIVATE_PACKET

Definition at line 351 of file settings_types.h.

Data Fields
BYTE arcRandomBits[16]
UINT32 cbLen
UINT32 logonId
UINT32 version

◆ ADDIN_ARGV

struct ADDIN_ARGV

Definition at line 361 of file settings_types.h.

Data Fields
int argc
char ** argv

◆ rdp_ext_set

struct rdp_ext_set

Definition at line 369 of file settings_types.h.

Data Fields
void * data
char name[256]

◆ BITMAP_CACHE_CELL_INFO

struct BITMAP_CACHE_CELL_INFO

Definition at line 377 of file settings_types.h.

Data Fields
UINT16 maxSize
UINT16 numEntries

◆ BITMAP_CACHE_V2_CELL_INFO

struct BITMAP_CACHE_V2_CELL_INFO

Definition at line 383 of file settings_types.h.

Data Fields
UINT32 numEntries
BOOL persistent

◆ GLYPH_CACHE_DEFINITION

struct GLYPH_CACHE_DEFINITION

Definition at line 391 of file settings_types.h.

Data Fields
UINT16 cacheEntries
UINT16 cacheMaximumCellSize

◆ MONITOR_DEF

struct MONITOR_DEF

Definition at line 399 of file settings_types.h.

Data Fields
INT32 bottom
UINT32 flags
INT32 left
INT32 right
INT32 top

◆ MONITOR_ATTRIBUTES

struct MONITOR_ATTRIBUTES

Definition at line 408 of file settings_types.h.

Data Fields
UINT32 desktopScaleFactor
UINT32 deviceScaleFactor
UINT32 orientation
UINT32 physicalHeight
UINT32 physicalWidth

◆ rdpMonitor

struct rdpMonitor

Definition at line 417 of file settings_types.h.

Collaboration diagram for rdpMonitor:
Data Fields
MONITOR_ATTRIBUTES attributes
INT32 height
UINT32 is_primary
UINT32 orig_screen
INT32 width
INT32 x
INT32 y

◆ RDPDR_DEVICE

struct RDPDR_DEVICE

Definition at line 435 of file settings_types.h.

Data Fields
UINT32 Id
char * Name
UINT32 Type

◆ RDPDR_DRIVE

struct RDPDR_DRIVE

Definition at line 442 of file settings_types.h.

Collaboration diagram for RDPDR_DRIVE:
Data Fields
BOOL automount
RDPDR_DEVICE device
char * Path

◆ RDPDR_PRINTER

struct RDPDR_PRINTER

Definition at line 449 of file settings_types.h.

Collaboration diagram for RDPDR_PRINTER:
Data Fields
RDPDR_DEVICE device
char * DriverName
BOOL IsDefault

◆ RDPDR_SMARTCARD

struct RDPDR_SMARTCARD

Definition at line 456 of file settings_types.h.

Collaboration diagram for RDPDR_SMARTCARD:
Data Fields
RDPDR_DEVICE device

◆ RDPDR_SERIAL

struct RDPDR_SERIAL

Definition at line 461 of file settings_types.h.

Collaboration diagram for RDPDR_SERIAL:
Data Fields
RDPDR_DEVICE device
char * Driver
char * Path
char * Permissive

◆ RDPDR_PARALLEL

struct RDPDR_PARALLEL

Definition at line 469 of file settings_types.h.

Collaboration diagram for RDPDR_PARALLEL:
Data Fields
RDPDR_DEVICE device
char * Path

Macro Definition Documentation

◆ CLIPRDR_FLAG_DEFAULT_MASK

#define CLIPRDR_FLAG_DEFAULT_MASK
Value:
(CLIPRDR_FLAG_LOCAL_TO_REMOTE | CLIPRDR_FLAG_LOCAL_TO_REMOTE_FILES | \
CLIPRDR_FLAG_REMOTE_TO_LOCAL | CLIPRDR_FLAG_REMOTE_TO_LOCAL_FILES)

Definition at line 337 of file settings_types.h.

◆ CONNECTION_TYPE_INVALID

#define CONNECTION_TYPE_INVALID
Value:
0x00

Definition at line 74 of file settings_types.h.

◆ FREERDP_SETTINGS_SERVER_MODE [1/2]

#define FREERDP_SETTINGS_SERVER_MODE   0x00000001

rdpSettings creation flags

Definition at line 80 of file include/freerdp/settings.h.

◆ FREERDP_SETTINGS_SERVER_MODE [2/2]

#define FREERDP_SETTINGS_SERVER_MODE   0x00000001

rdpSettings creation flags

Definition at line 499 of file settings_types.h.

Function Documentation

◆ freerdp_device_collection_del()

FREERDP_API BOOL freerdp_device_collection_del ( rdpSettings *  settings,
const RDPDR_DEVICE device 
)

Removed a device from the settings, returns ownership of the allocated device to caller.

Parameters
settingsthe settings to remove the device from
devicethe device to remove
Since
version 3.4.0
Returns
TRUE if the device was removed, FALSE if device was not found or is NULL

Definition at line 240 of file common/settings.c.

241 {
242  WINPR_ASSERT(settings);
243 
244  if (!device)
245  return FALSE;
246 
247  const UINT32 count = settings->DeviceCount;
248  for (size_t x = 0; x < count; x++)
249  {
250  const RDPDR_DEVICE* cur = settings->DeviceArray[x];
251  if (cur == device)
252  {
253  for (size_t y = x + 1; y < count; y++)
254  {
255  RDPDR_DEVICE* next = settings->DeviceArray[y];
256  settings->DeviceArray[y - 1] = next;
257  }
258  settings->DeviceArray[count - 1] = NULL;
259  settings->DeviceCount--;
260  return TRUE;
261  }
262  }
263 
264  return FALSE;
265 }

◆ freerdp_rail_support_flags_to_string()

FREERDP_API const char* freerdp_rail_support_flags_to_string ( UINT32  flags,
char *  buffer,
size_t  length 
)

Returns a stringified representation of RAIL support flags.

Parameters
flagsThe flags to stringify
bufferA pointer to the string buffer to write to
lengthThe size of the string buffer
Returns
A pointer to buffer for success, NULL otherwise

Definition at line 1990 of file common/settings.c.

1991 {
1992  const UINT32 mask =
1993  RAIL_LEVEL_SUPPORTED | RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED |
1994  RAIL_LEVEL_SHELL_INTEGRATION_SUPPORTED | RAIL_LEVEL_LANGUAGE_IME_SYNC_SUPPORTED |
1995  RAIL_LEVEL_SERVER_TO_CLIENT_IME_SYNC_SUPPORTED | RAIL_LEVEL_HIDE_MINIMIZED_APPS_SUPPORTED |
1996  RAIL_LEVEL_WINDOW_CLOAKING_SUPPORTED | RAIL_LEVEL_HANDSHAKE_EX_SUPPORTED;
1997 
1998  if (flags & RAIL_LEVEL_SUPPORTED)
1999  winpr_str_append("RAIL_LEVEL_SUPPORTED", buffer, length, "|");
2000  if (flags & RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED)
2001  winpr_str_append("RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED", buffer, length, "|");
2002  if (flags & RAIL_LEVEL_SHELL_INTEGRATION_SUPPORTED)
2003  winpr_str_append("RAIL_LEVEL_SHELL_INTEGRATION_SUPPORTED", buffer, length, "|");
2004  if (flags & RAIL_LEVEL_LANGUAGE_IME_SYNC_SUPPORTED)
2005  winpr_str_append("RAIL_LEVEL_LANGUAGE_IME_SYNC_SUPPORTED", buffer, length, "|");
2006  if (flags & RAIL_LEVEL_SERVER_TO_CLIENT_IME_SYNC_SUPPORTED)
2007  winpr_str_append("RAIL_LEVEL_SERVER_TO_CLIENT_IME_SYNC_SUPPORTED", buffer, length, "|");
2008  if (flags & RAIL_LEVEL_HIDE_MINIMIZED_APPS_SUPPORTED)
2009  winpr_str_append("RAIL_LEVEL_HIDE_MINIMIZED_APPS_SUPPORTED", buffer, length, "|");
2010  if (flags & RAIL_LEVEL_WINDOW_CLOAKING_SUPPORTED)
2011  winpr_str_append("RAIL_LEVEL_WINDOW_CLOAKING_SUPPORTED", buffer, length, "|");
2012  if (flags & RAIL_LEVEL_HANDSHAKE_EX_SUPPORTED)
2013  winpr_str_append("RAIL_LEVEL_HANDSHAKE_EX_SUPPORTED", buffer, length, "|");
2014  if (flags & RAIL_LEVEL_LANGUAGE_IME_SYNC_SUPPORTED)
2015  winpr_str_append("RAIL_LEVEL_LANGUAGE_IME_SYNC_SUPPORTED", buffer, length, "|");
2016  if ((flags & ~mask) != 0)
2017  {
2018  char tbuffer[64] = { 0 };
2019  (void)_snprintf(tbuffer, sizeof(tbuffer), "RAIL_FLAG_UNKNOWN 0x%08" PRIx32, flags & mask);
2020  winpr_str_append(tbuffer, buffer, length, "|");
2021  }
2022  return buffer;
2023 }

◆ freerdp_rdp_version_string()

FREERDP_API const char* freerdp_rdp_version_string ( UINT32  version)

Returns a stringified representation of the RDP protocol version.

Parameters
versionThe RDP protocol version number.
Returns
A string representation of the protocol version as "RDP_VERSION_10_11" or "RDP_VERSION_UNKNOWN" for invalid/unknown versions

Definition at line 2050 of file common/settings.c.

2051 {
2052  switch (version)
2053  {
2054  case RDP_VERSION_4:
2055  return "RDP_VERSION_4";
2056  case RDP_VERSION_5_PLUS:
2057  return "RDP_VERSION_5_PLUS";
2058  case RDP_VERSION_10_0:
2059  return "RDP_VERSION_10_0";
2060  case RDP_VERSION_10_1:
2061  return "RDP_VERSION_10_1";
2062  case RDP_VERSION_10_2:
2063  return "RDP_VERSION_10_2";
2064  case RDP_VERSION_10_3:
2065  return "RDP_VERSION_10_3";
2066  case RDP_VERSION_10_4:
2067  return "RDP_VERSION_10_4";
2068  case RDP_VERSION_10_5:
2069  return "RDP_VERSION_10_5";
2070  case RDP_VERSION_10_6:
2071  return "RDP_VERSION_10_6";
2072  case RDP_VERSION_10_7:
2073  return "RDP_VERSION_10_7";
2074  case RDP_VERSION_10_8:
2075  return "RDP_VERSION_10_8";
2076  case RDP_VERSION_10_9:
2077  return "RDP_VERSION_10_9";
2078  case RDP_VERSION_10_10:
2079  return "RDP_VERSION_10_10";
2080  case RDP_VERSION_10_11:
2081  return "RDP_VERSION_10_11";
2082  case RDP_VERSION_10_12:
2083  return "RDP_VERSION_10_12";
2084  default:
2085  return "RDP_VERSION_UNKNOWN";
2086  }
2087 }

◆ freerdp_rdpdr_dtyp_string()

FREERDP_API const char* freerdp_rdpdr_dtyp_string ( UINT32  type)

Returns a string representation of RDPDR_DTYP_*.

Parameters
typeThe integer of the RDPDR_DTYP_* to stringify
Returns
A string representation of the RDPDR_DTYP_* or "RDPDR_DTYP_UNKNOWN"

Definition at line 2140 of file common/settings.c.

2141 {
2142  switch (type)
2143  {
2144  case RDPDR_DTYP_FILESYSTEM:
2145  return "RDPDR_DTYP_FILESYSTEM";
2146  case RDPDR_DTYP_PARALLEL:
2147  return "RDPDR_DTYP_PARALLEL";
2148  case RDPDR_DTYP_PRINT:
2149  return "RDPDR_DTYP_PRINT";
2150  case RDPDR_DTYP_SERIAL:
2151  return "RDPDR_DTYP_SERIAL";
2152  case RDPDR_DTYP_SMARTCARD:
2153  return "RDPDR_DTYP_SMARTCARD";
2154  default:
2155  return "RDPDR_DTYP_UNKNOWN";
2156  }
2157 }

◆ freerdp_set_gateway_usage_method()

FREERDP_API BOOL freerdp_set_gateway_usage_method ( rdpSettings *  settings,
UINT32  GatewayUsageMethod 
)

This corresponds to "Automatically detect RD Gateway server settings", which means the client attempts to use gateway group policy settings http://technet.microsoft.com/en-us/library/cc770601.aspx

Definition at line 1023 of file common/settings.c.

1024 {
1025  if (!freerdp_settings_set_uint32(settings, FreeRDP_GatewayUsageMethod, GatewayUsageMethod))
1026  return FALSE;
1027 
1028  if (GatewayUsageMethod == TSC_PROXY_MODE_NONE_DIRECT)
1029  {
1030  if (!freerdp_settings_set_bool(settings, FreeRDP_GatewayEnabled, FALSE) ||
1031  !freerdp_settings_set_bool(settings, FreeRDP_GatewayBypassLocal, FALSE))
1032  return FALSE;
1033  }
1034  else if (GatewayUsageMethod == TSC_PROXY_MODE_DIRECT)
1035  {
1036  if (!freerdp_settings_set_bool(settings, FreeRDP_GatewayEnabled, TRUE) ||
1037  !freerdp_settings_set_bool(settings, FreeRDP_GatewayBypassLocal, FALSE))
1038  return FALSE;
1039  }
1040  else if (GatewayUsageMethod == TSC_PROXY_MODE_DETECT)
1041  {
1042  if (!freerdp_settings_set_bool(settings, FreeRDP_GatewayEnabled, TRUE) ||
1043  !freerdp_settings_set_bool(settings, FreeRDP_GatewayBypassLocal, TRUE))
1044  return FALSE;
1045  }
1046  else if (GatewayUsageMethod == TSC_PROXY_MODE_DEFAULT)
1047  {
1053  if (!freerdp_settings_set_bool(settings, FreeRDP_GatewayEnabled, FALSE) ||
1054  !freerdp_settings_set_bool(settings, FreeRDP_GatewayBypassLocal, FALSE))
1055  return FALSE;
1056  }
1057  else if (GatewayUsageMethod == TSC_PROXY_MODE_NONE_DETECT)
1058  {
1059  if (!freerdp_settings_set_bool(settings, FreeRDP_GatewayEnabled, FALSE) ||
1060  !freerdp_settings_set_bool(settings, FreeRDP_GatewayBypassLocal, FALSE))
1061  return FALSE;
1062  }
1063 
1064  return TRUE;
1065 }
FREERDP_API BOOL freerdp_settings_set_uint32(rdpSettings *settings, FreeRDP_Settings_Keys_UInt32 id, UINT32 param)
Sets a UINT32 settings value.
FREERDP_API BOOL freerdp_settings_set_bool(rdpSettings *settings, FreeRDP_Settings_Keys_Bool id, BOOL param)
Sets a BOOL settings value.

References freerdp_settings_set_uint32().

Here is the call graph for this function:

◆ freerdp_settings_append_string()

FREERDP_API BOOL freerdp_settings_append_string ( rdpSettings *  settings,
FreeRDP_Settings_Keys_String  id,
const char *  separator,
const char *  param 
)

appends a string to a settings value. The param is copied. If the initial value of the setting was not empty,

<old value><separator><param>

is created

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
separatorThe separator string to use. May be NULL (no separator)
paramThe value to append
Returns
TRUE for success, FALSE for failure

Definition at line 2231 of file common/settings.c.

2233 {
2234  const char* old = freerdp_settings_get_string(settings, id);
2235 
2236  size_t len = 0;
2237  char* str = NULL;
2238 
2239  if (!old)
2240  winpr_asprintf(&str, &len, "%s", param);
2241  else if (!separator)
2242  winpr_asprintf(&str, &len, "%s%s", old, param);
2243  else
2244  winpr_asprintf(&str, &len, "%s%s%s", old, separator, param);
2245 
2246  const BOOL rc = freerdp_settings_set_string_len(settings, id, str, len);
2247  free(str);
2248  return rc;
2249 }
FREERDP_API const char * freerdp_settings_get_string(const rdpSettings *settings, FreeRDP_Settings_Keys_String id)
Returns a immutable string settings value.
FREERDP_API BOOL freerdp_settings_set_string_len(rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *param, size_t len)
Sets a string settings value. The param is copied.

References freerdp_settings_get_string(), and freerdp_settings_set_string_len().

Here is the call graph for this function:

◆ freerdp_settings_are_valid()

FREERDP_API BOOL freerdp_settings_are_valid ( const rdpSettings *  settings)

Returns TRUE if settings are in a valid state, FALSE otherwise.

This function is meant to replace tideous return checks for freerdp_settings_set_* with a single check after these calls.

Parameters
settingsthe settings instance to check
Returns
TRUE if valid, FALSE otherwise

Definition at line 2251 of file common/settings.c.

2252 {
2253  return settings != NULL;
2254 }

◆ freerdp_settings_clone()

FREERDP_API rdpSettings* freerdp_settings_clone ( const rdpSettings *  settings)

Creates a deep copy of settings.

Parameters
settingsA pointer to a settings struct to copy. May be NULL (returns NULL)
Returns
A newly allocated copy of settings or NULL

Definition at line 1559 of file core/settings.c.

1560 {
1561  rdpSettings* _settings = (rdpSettings*)calloc(1, sizeof(rdpSettings));
1562 
1563  if (!freerdp_settings_copy(_settings, settings))
1564  goto out_fail;
1565 
1566  return _settings;
1567 out_fail:
1568  WINPR_PRAGMA_DIAG_PUSH
1569  WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
1570  freerdp_settings_free(_settings);
1571  WINPR_PRAGMA_DIAG_POP
1572  return NULL;
1573 }
void freerdp_settings_free(rdpSettings *settings)
Free a settings struct with all data in it.
BOOL freerdp_settings_copy(rdpSettings *_settings, const rdpSettings *settings)
Deep copies settings from src to dst.

References freerdp_settings_copy(), and freerdp_settings_free().

Here is the call graph for this function:

◆ freerdp_settings_copy()

FREERDP_API BOOL freerdp_settings_copy ( rdpSettings *  dst,
const rdpSettings *  src 
)

Deep copies settings from src to dst.

The function frees up all allocated data in dst before copying the data from src

Parameters
dstA pointer for the settings to copy data to. May be NULL (fails copy)
srcA pointer to the settings to copy. May be NULL (fails copy)
Returns
TRUE for success, FALSE for failure.

Definition at line 1503 of file core/settings.c.

1504 {
1505  BOOL rc = 0;
1506 
1507  if (!settings || !_settings)
1508  return FALSE;
1509 
1510  /* This is required to free all non string buffers */
1511  freerdp_settings_free_internal(_settings);
1512  /* This copies everything except allocated non string buffers. reset all allocated buffers to
1513  * NULL to fix issues during cleanup */
1514  rc = freerdp_settings_clone_keys(_settings, settings);
1515 
1516  _settings->LoadBalanceInfo = NULL;
1517  _settings->ServerRandom = NULL;
1518  _settings->ClientRandom = NULL;
1519  _settings->ServerCertificate = NULL;
1520  _settings->RdpServerCertificate = NULL;
1521  _settings->RdpServerRsaKey = NULL;
1522  _settings->ChannelDefArray = NULL;
1523  _settings->MonitorDefArray = NULL;
1524  _settings->MonitorIds = NULL;
1525  _settings->OrderSupport = NULL;
1526  _settings->BitmapCacheV2CellInfo = NULL;
1527  _settings->GlyphCache = NULL;
1528  _settings->FragCache = NULL;
1529  _settings->ClientAutoReconnectCookie = NULL;
1530  _settings->ServerAutoReconnectCookie = NULL;
1531  _settings->ClientTimeZone = NULL;
1532  _settings->RedirectionPassword = NULL;
1533  _settings->RedirectionTsvUrl = NULL;
1534  _settings->TargetNetAddresses = NULL;
1535  _settings->TargetNetPorts = NULL;
1536  _settings->RedirectionGuid = NULL;
1537  _settings->DeviceArray = NULL;
1538  _settings->StaticChannelArray = NULL;
1539  _settings->DynamicChannelArray = NULL;
1540  _settings->ReceivedCapabilities = NULL;
1541  _settings->ReceivedCapabilityData = NULL;
1542  _settings->ReceivedCapabilityDataSizes = NULL;
1543 
1544  _settings->ServerLicenseProductIssuersCount = 0;
1545  _settings->ServerLicenseProductIssuers = NULL;
1546 
1547  if (!rc)
1548  goto out_fail;
1549 
1550  /* Begin copying */
1551  if (!freerdp_settings_int_buffer_copy(_settings, settings))
1552  goto out_fail;
1553  return TRUE;
1554 out_fail:
1555  freerdp_settings_free_internal(_settings);
1556  return FALSE;
1557 }

Referenced by freerdp_settings_clone().

Here is the caller graph for this function:

◆ freerdp_settings_copy_item()

FREERDP_API BOOL freerdp_settings_copy_item ( rdpSettings *  dst,
const rdpSettings *  src,
SSIZE_T  id 
)

copies one setting identified by id from src to dst

The function frees up all allocated data in dst before copying the data from src

Parameters
dstA pointer for the settings to copy data to. May be NULL (fails copy)
srcA pointer to the settings to copy. May be NULL (fails copy)
idThe settings identifier to copy
Returns
TRUE for success, FALSE for failure.

Definition at line 429 of file settings_str.c.

430 {
431  WINPR_ASSERT(dst);
432  WINPR_ASSERT(src);
433 
434  const SSIZE_T key = freerdp_settings_get_type_for_key(id);
435  switch (key)
436  {
437  case FREERDP_SETTINGS_TYPE_BOOL:
438  {
439  const BOOL val = freerdp_settings_get_bool(src, (FreeRDP_Settings_Keys_Bool)id);
440  return freerdp_settings_set_bool(dst, (FreeRDP_Settings_Keys_Bool)id, val);
441  }
442  case FREERDP_SETTINGS_TYPE_INT16:
443  {
444  const INT16 val = freerdp_settings_get_int16(src, (FreeRDP_Settings_Keys_Int16)id);
445  return freerdp_settings_set_int16(dst, (FreeRDP_Settings_Keys_Int16)id, val);
446  }
447  case FREERDP_SETTINGS_TYPE_INT32:
448  {
449  const INT32 val = freerdp_settings_get_int32(src, (FreeRDP_Settings_Keys_Int32)id);
450  return freerdp_settings_set_int32(dst, (FreeRDP_Settings_Keys_Int32)id, val);
451  }
452  case FREERDP_SETTINGS_TYPE_INT64:
453  {
454  const INT64 val = freerdp_settings_get_int64(src, (FreeRDP_Settings_Keys_Int64)id);
455  return freerdp_settings_set_int64(dst, (FreeRDP_Settings_Keys_Int64)id, val);
456  }
457  case FREERDP_SETTINGS_TYPE_UINT16:
458  {
459  const UINT16 val = freerdp_settings_get_uint16(src, (FreeRDP_Settings_Keys_UInt16)id);
460  return freerdp_settings_set_uint16(dst, (FreeRDP_Settings_Keys_UInt16)id, val);
461  }
462  case FREERDP_SETTINGS_TYPE_UINT32:
463  {
464  const UINT32 val = freerdp_settings_get_uint32(src, (FreeRDP_Settings_Keys_UInt32)id);
465  return freerdp_settings_set_uint32(dst, (FreeRDP_Settings_Keys_UInt32)id, val);
466  }
467  case FREERDP_SETTINGS_TYPE_UINT64:
468  {
469  const UINT64 val = freerdp_settings_get_uint64(src, (FreeRDP_Settings_Keys_UInt64)id);
470  return freerdp_settings_set_uint64(dst, (FreeRDP_Settings_Keys_UInt64)id, val);
471  }
472  case FREERDP_SETTINGS_TYPE_STRING:
473  {
474  const char* val = freerdp_settings_get_string(src, (FreeRDP_Settings_Keys_String)id);
475  return freerdp_settings_set_string(dst, (FreeRDP_Settings_Keys_String)id, val);
476  }
477  case FREERDP_SETTINGS_TYPE_POINTER:
478  {
479  const void* val = freerdp_settings_get_pointer(src, (FreeRDP_Settings_Keys_Pointer)id);
480  return freerdp_settings_set_pointer(dst, (FreeRDP_Settings_Keys_Pointer)id, val);
481  }
482  default:
483  return FALSE;
484  }
485 }
FREERDP_API UINT32 freerdp_settings_get_uint32(const rdpSettings *settings, FreeRDP_Settings_Keys_UInt32 id)
Returns a UINT32 settings value.
FREERDP_API BOOL freerdp_settings_set_string(rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *param)
Sets a string settings value. The param is copied.
FREERDP_API BOOL freerdp_settings_get_bool(const rdpSettings *settings, FreeRDP_Settings_Keys_Bool id)
Returns a boolean settings value.
FREERDP_API const void * freerdp_settings_get_pointer(const rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id)
Returns a immutable pointer settings value.
FREERDP_API INT64 freerdp_settings_get_int64(const rdpSettings *settings, FreeRDP_Settings_Keys_Int64 id)
Returns a INT64 settings value.
SSIZE_T freerdp_settings_get_type_for_key(SSIZE_T key)
Get a key type for the key index.
Definition: settings_str.c:407
FREERDP_API UINT64 freerdp_settings_get_uint64(const rdpSettings *settings, FreeRDP_Settings_Keys_UInt64 id)
Returns a UINT64 settings value.
FREERDP_API BOOL freerdp_settings_set_int32(rdpSettings *settings, FreeRDP_Settings_Keys_Int32 id, INT32 param)
Sets a INT32 settings value.
FREERDP_API UINT16 freerdp_settings_get_uint16(const rdpSettings *settings, FreeRDP_Settings_Keys_UInt16 id)
Returns a UINT16 settings value.
FREERDP_API BOOL freerdp_settings_set_uint64(rdpSettings *settings, FreeRDP_Settings_Keys_UInt64 id, UINT64 param)
Sets a UINT64 settings value.
FREERDP_API BOOL freerdp_settings_set_int16(rdpSettings *settings, FreeRDP_Settings_Keys_Int16 id, INT16 param)
Sets a INT16 settings value.
FREERDP_API BOOL freerdp_settings_set_int64(rdpSettings *settings, FreeRDP_Settings_Keys_Int64 id, INT64 param)
Sets a INT64 settings value.
FREERDP_API BOOL freerdp_settings_set_pointer(rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id, const void *data)
Set a pointer to value data.
FREERDP_API INT32 freerdp_settings_get_int32(const rdpSettings *settings, FreeRDP_Settings_Keys_Int32 id)
Returns a INT32 settings value.
FREERDP_API BOOL freerdp_settings_set_uint16(rdpSettings *settings, FreeRDP_Settings_Keys_UInt16 id, UINT16 param)
Sets a UINT16 settings value.
FREERDP_API INT16 freerdp_settings_get_int16(const rdpSettings *settings, FreeRDP_Settings_Keys_Int16 id)
Returns a INT16 settings value.

References freerdp_settings_get_bool(), freerdp_settings_get_int16(), freerdp_settings_get_int32(), freerdp_settings_get_int64(), freerdp_settings_get_pointer(), freerdp_settings_get_string(), freerdp_settings_get_type_for_key(), freerdp_settings_get_uint16(), freerdp_settings_get_uint32(), freerdp_settings_get_uint64(), freerdp_settings_set_bool(), freerdp_settings_set_int16(), freerdp_settings_set_int32(), freerdp_settings_set_int64(), freerdp_settings_set_pointer(), freerdp_settings_set_string(), freerdp_settings_set_uint16(), freerdp_settings_set_uint32(), and freerdp_settings_set_uint64().

Here is the call graph for this function:

◆ freerdp_settings_dump()

FREERDP_API void freerdp_settings_dump ( wLog *  log,
DWORD  level,
const rdpSettings *  settings 
)

Dumps the contents of a settings struct to a WLog logger.

Parameters
logThe logger to write to, must not be NULL
levelThe WLog level to use for the log entries
settingsA pointer to the settings to dump. May be NULL.

Definition at line 246 of file settings_str.c.

247 {
248  WINPR_ASSERT(log);
249  WINPR_ASSERT(settings);
250 
251  for (size_t x = 0; x < ARRAYSIZE(settings_map); x++)
252  {
253  const struct settings_str_entry* cur = &settings_map[x];
254  switch (cur->type)
255  {
256  case FREERDP_SETTINGS_TYPE_BOOL: /* bool */
257  {
258  BOOL sval =
259  freerdp_settings_get_bool(settings, (FreeRDP_Settings_Keys_Bool)cur->id);
260  WLog_Print(log, level, "%s [BOOL]: %s", cur->str, sval ? "TRUE" : "FALSE");
261  }
262  break;
263  case FREERDP_SETTINGS_TYPE_UINT16: /* UINT16 */
264  {
265  UINT16 sval =
266  freerdp_settings_get_uint16(settings, (FreeRDP_Settings_Keys_UInt16)cur->id);
267  WLog_Print(log, level, "%s [UINT16]: %" PRIu16, cur->str, sval);
268  }
269  break;
270  case FREERDP_SETTINGS_TYPE_INT16: /* INT16 */
271  {
272  INT16 sval =
273  freerdp_settings_get_int16(settings, (FreeRDP_Settings_Keys_Int16)cur->id);
274  WLog_Print(log, level, "%s [INT16]: %" PRId16, cur->str, sval);
275  }
276  break;
277  case FREERDP_SETTINGS_TYPE_UINT32: /* UINT32 */
278  {
279  UINT32 sval =
280  freerdp_settings_get_uint32(settings, (FreeRDP_Settings_Keys_UInt32)cur->id);
281  WLog_Print(log, level, "%s [UINT32]: %" PRIu32, cur->str, sval);
282  }
283  break;
284  case FREERDP_SETTINGS_TYPE_INT32: /* INT32 */
285  {
286  INT32 sval =
287  freerdp_settings_get_int32(settings, (FreeRDP_Settings_Keys_Int32)cur->id);
288  WLog_Print(log, level, "%s [INT32]: %" PRId32, cur->str, sval);
289  }
290  break;
291  case FREERDP_SETTINGS_TYPE_UINT64: /* UINT64 */
292  {
293  UINT64 sval =
294  freerdp_settings_get_uint64(settings, (FreeRDP_Settings_Keys_UInt64)cur->id);
295  WLog_Print(log, level, "%s [UINT64]: %" PRIu64, cur->str, sval);
296  }
297  break;
298  case FREERDP_SETTINGS_TYPE_INT64: /* INT64 */
299  {
300  INT64 sval =
301  freerdp_settings_get_int64(settings, (FreeRDP_Settings_Keys_Int64)cur->id);
302  WLog_Print(log, level, "%s [INT64]: %" PRId64, cur->str, sval);
303  }
304  break;
305  case FREERDP_SETTINGS_TYPE_STRING: /* strings */
306  {
307  const char* sval =
308  freerdp_settings_get_string(settings, (FreeRDP_Settings_Keys_String)cur->id);
309  WLog_Print(log, level, "%s [STRING]: '%s'", cur->str, sval);
310  }
311  break;
312  case FREERDP_SETTINGS_TYPE_POINTER: /* pointer */
313  {
314  const void* sval =
315  freerdp_settings_get_pointer(settings, (FreeRDP_Settings_Keys_Pointer)cur->id);
316  WLog_Print(log, level, "%s [POINTER]: '%p'", cur->str, sval);
317  }
318  break;
319  default:
320  break;
321  }
322  }
323 }
Definition: settings_str.h:27

References freerdp_settings_get_bool(), freerdp_settings_get_int16(), freerdp_settings_get_int32(), freerdp_settings_get_int64(), freerdp_settings_get_pointer(), freerdp_settings_get_string(), freerdp_settings_get_uint16(), freerdp_settings_get_uint32(), and freerdp_settings_get_uint64().

Here is the call graph for this function:

◆ freerdp_settings_free()

FREERDP_API void freerdp_settings_free ( rdpSettings *  settings)

Free a settings struct with all data in it.

Parameters
settingsA pointer to the settings to free, May be NULL

Definition at line 1302 of file core/settings.c.

1303 {
1304  if (!settings)
1305  return;
1306 
1307  freerdp_settings_free_internal(settings);
1308  free(settings);
1309 }

Referenced by freerdp_settings_clone().

Here is the caller graph for this function:

◆ freerdp_settings_get_bool()

FREERDP_API BOOL freerdp_settings_get_bool ( const rdpSettings *  settings,
FreeRDP_Settings_Keys_Bool  id 
)

Returns a boolean settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
Returns
the value of the boolean key

Definition at line 54 of file settings_getters.c.

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_GatewayAvdUseTenantid:
244  return settings->GatewayAvdUseTenantid;
245 
246  case FreeRDP_GatewayBypassLocal:
247  return settings->GatewayBypassLocal;
248 
249  case FreeRDP_GatewayEnabled:
250  return settings->GatewayEnabled;
251 
252  case FreeRDP_GatewayHttpExtAuthSspiNtlm:
253  return settings->GatewayHttpExtAuthSspiNtlm;
254 
255  case FreeRDP_GatewayHttpTransport:
256  return settings->GatewayHttpTransport;
257 
258  case FreeRDP_GatewayHttpUseWebsockets:
259  return settings->GatewayHttpUseWebsockets;
260 
261  case FreeRDP_GatewayIgnoreRedirectionPolicy:
262  return settings->GatewayIgnoreRedirectionPolicy;
263 
264  case FreeRDP_GatewayRpcTransport:
265  return settings->GatewayRpcTransport;
266 
267  case FreeRDP_GatewayUdpTransport:
268  return settings->GatewayUdpTransport;
269 
270  case FreeRDP_GatewayUseSameCredentials:
271  return settings->GatewayUseSameCredentials;
272 
273  case FreeRDP_GfxAVC444:
274  return settings->GfxAVC444;
275 
276  case FreeRDP_GfxAVC444v2:
277  return settings->GfxAVC444v2;
278 
279  case FreeRDP_GfxH264:
280  return settings->GfxH264;
281 
282  case FreeRDP_GfxPlanar:
283  return settings->GfxPlanar;
284 
285  case FreeRDP_GfxProgressive:
286  return settings->GfxProgressive;
287 
288  case FreeRDP_GfxProgressiveV2:
289  return settings->GfxProgressiveV2;
290 
291  case FreeRDP_GfxSendQoeAck:
292  return settings->GfxSendQoeAck;
293 
294  case FreeRDP_GfxSmallCache:
295  return settings->GfxSmallCache;
296 
297  case FreeRDP_GfxSuspendFrameAck:
298  return settings->GfxSuspendFrameAck;
299 
300  case FreeRDP_GfxThinClient:
301  return settings->GfxThinClient;
302 
303  case FreeRDP_GrabKeyboard:
304  return settings->GrabKeyboard;
305 
306  case FreeRDP_GrabMouse:
307  return settings->GrabMouse;
308 
309  case FreeRDP_HasExtendedMouseEvent:
310  return settings->HasExtendedMouseEvent;
311 
312  case FreeRDP_HasHorizontalWheel:
313  return settings->HasHorizontalWheel;
314 
315  case FreeRDP_HasMonitorAttributes:
316  return settings->HasMonitorAttributes;
317 
318  case FreeRDP_HasQoeEvent:
319  return settings->HasQoeEvent;
320 
321  case FreeRDP_HasRelativeMouseEvent:
322  return settings->HasRelativeMouseEvent;
323 
324  case FreeRDP_HiDefRemoteApp:
325  return settings->HiDefRemoteApp;
326 
327  case FreeRDP_IPv6Enabled:
328  return settings->IPv6Enabled;
329 
330  case FreeRDP_IgnoreCertificate:
331  return settings->IgnoreCertificate;
332 
333  case FreeRDP_IgnoreInvalidDevices:
334  return settings->IgnoreInvalidDevices;
335 
336  case FreeRDP_JpegCodec:
337  return settings->JpegCodec;
338 
339  case FreeRDP_KerberosRdgIsProxy:
340  return settings->KerberosRdgIsProxy;
341 
342  case FreeRDP_ListMonitors:
343  return settings->ListMonitors;
344 
345  case FreeRDP_LocalConnection:
346  return settings->LocalConnection;
347 
348  case FreeRDP_LogonErrors:
349  return settings->LogonErrors;
350 
351  case FreeRDP_LogonNotify:
352  return settings->LogonNotify;
353 
354  case FreeRDP_LongCredentialsSupported:
355  return settings->LongCredentialsSupported;
356 
357  case FreeRDP_LyncRdpMode:
358  return settings->LyncRdpMode;
359 
360  case FreeRDP_MaximizeShell:
361  return settings->MaximizeShell;
362 
363  case FreeRDP_MouseAttached:
364  return settings->MouseAttached;
365 
366  case FreeRDP_MouseHasWheel:
367  return settings->MouseHasWheel;
368 
369  case FreeRDP_MouseMotion:
370  return settings->MouseMotion;
371 
372  case FreeRDP_MouseUseRelativeMove:
373  return settings->MouseUseRelativeMove;
374 
375  case FreeRDP_MstscCookieMode:
376  return settings->MstscCookieMode;
377 
378  case FreeRDP_MultiTouchGestures:
379  return settings->MultiTouchGestures;
380 
381  case FreeRDP_MultiTouchInput:
382  return settings->MultiTouchInput;
383 
384  case FreeRDP_NSCodec:
385  return settings->NSCodec;
386 
387  case FreeRDP_NSCodecAllowDynamicColorFidelity:
388  return settings->NSCodecAllowDynamicColorFidelity;
389 
390  case FreeRDP_NSCodecAllowSubsampling:
391  return settings->NSCodecAllowSubsampling;
392 
393  case FreeRDP_NegotiateSecurityLayer:
394  return settings->NegotiateSecurityLayer;
395 
396  case FreeRDP_NetworkAutoDetect:
397  return settings->NetworkAutoDetect;
398 
399  case FreeRDP_NlaSecurity:
400  return settings->NlaSecurity;
401 
402  case FreeRDP_NoBitmapCompressionHeader:
403  return settings->NoBitmapCompressionHeader;
404 
405  case FreeRDP_OldLicenseBehaviour:
406  return settings->OldLicenseBehaviour;
407 
408  case FreeRDP_PasswordIsSmartcardPin:
409  return settings->PasswordIsSmartcardPin;
410 
411  case FreeRDP_PercentScreenUseHeight:
412  return settings->PercentScreenUseHeight;
413 
414  case FreeRDP_PercentScreenUseWidth:
415  return settings->PercentScreenUseWidth;
416 
417  case FreeRDP_PlayRemoteFx:
418  return settings->PlayRemoteFx;
419 
420  case FreeRDP_PreferIPv6OverIPv4:
421  return settings->PreferIPv6OverIPv4;
422 
423  case FreeRDP_PrintReconnectCookie:
424  return settings->PrintReconnectCookie;
425 
426  case FreeRDP_PromptForCredentials:
427  return settings->PromptForCredentials;
428 
429  case FreeRDP_RdpSecurity:
430  return settings->RdpSecurity;
431 
432  case FreeRDP_RdstlsSecurity:
433  return settings->RdstlsSecurity;
434 
435  case FreeRDP_RedirectClipboard:
436  return settings->RedirectClipboard;
437 
438  case FreeRDP_RedirectDrives:
439  return settings->RedirectDrives;
440 
441  case FreeRDP_RedirectHomeDrive:
442  return settings->RedirectHomeDrive;
443 
444  case FreeRDP_RedirectParallelPorts:
445  return settings->RedirectParallelPorts;
446 
447  case FreeRDP_RedirectPrinters:
448  return settings->RedirectPrinters;
449 
450  case FreeRDP_RedirectSerialPorts:
451  return settings->RedirectSerialPorts;
452 
453  case FreeRDP_RedirectSmartCards:
454  return settings->RedirectSmartCards;
455 
456  case FreeRDP_RedirectWebAuthN:
457  return settings->RedirectWebAuthN;
458 
459  case FreeRDP_RefreshRect:
460  return settings->RefreshRect;
461 
462  case FreeRDP_RemdeskVirtualChannel:
463  return settings->RemdeskVirtualChannel;
464 
465  case FreeRDP_RemoteAppLanguageBarSupported:
466  return settings->RemoteAppLanguageBarSupported;
467 
468  case FreeRDP_RemoteApplicationMode:
469  return settings->RemoteApplicationMode;
470 
471  case FreeRDP_RemoteAssistanceMode:
472  return settings->RemoteAssistanceMode;
473 
474  case FreeRDP_RemoteAssistanceRequestControl:
475  return settings->RemoteAssistanceRequestControl;
476 
477  case FreeRDP_RemoteConsoleAudio:
478  return settings->RemoteConsoleAudio;
479 
480  case FreeRDP_RemoteCredentialGuard:
481  return settings->RemoteCredentialGuard;
482 
483  case FreeRDP_RemoteFxCodec:
484  return settings->RemoteFxCodec;
485 
486  case FreeRDP_RemoteFxImageCodec:
487  return settings->RemoteFxImageCodec;
488 
489  case FreeRDP_RemoteFxOnly:
490  return settings->RemoteFxOnly;
491 
492  case FreeRDP_RestrictedAdminModeRequired:
493  return settings->RestrictedAdminModeRequired;
494 
495  case FreeRDP_SaltedChecksum:
496  return settings->SaltedChecksum;
497 
498  case FreeRDP_SendPreconnectionPdu:
499  return settings->SendPreconnectionPdu;
500 
501  case FreeRDP_ServerLicenseRequired:
502  return settings->ServerLicenseRequired;
503 
504  case FreeRDP_ServerMode:
505  return settings->ServerMode;
506 
507  case FreeRDP_SmartSizing:
508  return settings->SmartSizing;
509 
510  case FreeRDP_SmartcardEmulation:
511  return settings->SmartcardEmulation;
512 
513  case FreeRDP_SmartcardLogon:
514  return settings->SmartcardLogon;
515 
516  case FreeRDP_SoftwareGdi:
517  return settings->SoftwareGdi;
518 
519  case FreeRDP_SoundBeepsEnabled:
520  return settings->SoundBeepsEnabled;
521 
522  case FreeRDP_SpanMonitors:
523  return settings->SpanMonitors;
524 
525  case FreeRDP_SupportAsymetricKeys:
526  return settings->SupportAsymetricKeys;
527 
528  case FreeRDP_SupportDisplayControl:
529  return settings->SupportDisplayControl;
530 
531  case FreeRDP_SupportDynamicChannels:
532  return settings->SupportDynamicChannels;
533 
534  case FreeRDP_SupportDynamicTimeZone:
535  return settings->SupportDynamicTimeZone;
536 
537  case FreeRDP_SupportEchoChannel:
538  return settings->SupportEchoChannel;
539 
540  case FreeRDP_SupportEdgeActionV1:
541  return settings->SupportEdgeActionV1;
542 
543  case FreeRDP_SupportEdgeActionV2:
544  return settings->SupportEdgeActionV2;
545 
546  case FreeRDP_SupportErrorInfoPdu:
547  return settings->SupportErrorInfoPdu;
548 
549  case FreeRDP_SupportGeometryTracking:
550  return settings->SupportGeometryTracking;
551 
552  case FreeRDP_SupportGraphicsPipeline:
553  return settings->SupportGraphicsPipeline;
554 
555  case FreeRDP_SupportHeartbeatPdu:
556  return settings->SupportHeartbeatPdu;
557 
558  case FreeRDP_SupportMonitorLayoutPdu:
559  return settings->SupportMonitorLayoutPdu;
560 
561  case FreeRDP_SupportMultitransport:
562  return settings->SupportMultitransport;
563 
564  case FreeRDP_SupportSSHAgentChannel:
565  return settings->SupportSSHAgentChannel;
566 
567  case FreeRDP_SupportSkipChannelJoin:
568  return settings->SupportSkipChannelJoin;
569 
570  case FreeRDP_SupportStatusInfoPdu:
571  return settings->SupportStatusInfoPdu;
572 
573  case FreeRDP_SupportVideoOptimized:
574  return settings->SupportVideoOptimized;
575 
576  case FreeRDP_SuppressOutput:
577  return settings->SuppressOutput;
578 
579  case FreeRDP_SurfaceCommandsEnabled:
580  return settings->SurfaceCommandsEnabled;
581 
582  case FreeRDP_SurfaceFrameMarkerEnabled:
583  return settings->SurfaceFrameMarkerEnabled;
584 
585  case FreeRDP_SuspendInput:
586  return settings->SuspendInput;
587 
588  case FreeRDP_SynchronousDynamicChannels:
589  return settings->SynchronousDynamicChannels;
590 
591  case FreeRDP_SynchronousStaticChannels:
592  return settings->SynchronousStaticChannels;
593 
594  case FreeRDP_TcpKeepAlive:
595  return settings->TcpKeepAlive;
596 
597  case FreeRDP_TlsSecurity:
598  return settings->TlsSecurity;
599 
600  case FreeRDP_ToggleFullscreen:
601  return settings->ToggleFullscreen;
602 
603  case FreeRDP_TransportDump:
604  return settings->TransportDump;
605 
606  case FreeRDP_TransportDumpReplay:
607  return settings->TransportDumpReplay;
608 
609  case FreeRDP_TransportDumpReplayNodelay:
610  return settings->TransportDumpReplayNodelay;
611 
612  case FreeRDP_UnicodeInput:
613  return settings->UnicodeInput;
614 
615  case FreeRDP_UnmapButtons:
616  return settings->UnmapButtons;
617 
618  case FreeRDP_UseCommonStdioCallbacks:
619  return settings->UseCommonStdioCallbacks;
620 
621  case FreeRDP_UseMultimon:
622  return settings->UseMultimon;
623 
624  case FreeRDP_UseRdpSecurityLayer:
625  return settings->UseRdpSecurityLayer;
626 
627  case FreeRDP_UsingSavedCredentials:
628  return settings->UsingSavedCredentials;
629 
630  case FreeRDP_VideoDisable:
631  return settings->VideoDisable;
632 
633  case FreeRDP_VmConnectMode:
634  return settings->VmConnectMode;
635 
636  case FreeRDP_WaitForOutputBufferFlush:
637  return settings->WaitForOutputBufferFlush;
638 
639  case FreeRDP_Workarea:
640  return settings->Workarea;
641 
642  default:
643  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
646  WINPR_ASSERT(FALSE);
647  return FALSE;
648  }
649 }
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
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

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item(), freerdp_settings_dump(), freerdp_settings_print_diff(), and AppDelegate::rdpConnectError:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_codecs_flags()

FREERDP_API UINT32 freerdp_settings_get_codecs_flags ( const rdpSettings *  settings)

helper function to get a mask of supported codec flags.

This function checks various settings to create a mask of supported codecs FreeRDP_CodecFlags defines the codecs

Parameters
settingsthe settings to check
Returns
a mask of supported codecs

Definition at line 1844 of file common/settings.c.

1845 {
1846  UINT32 flags = FREERDP_CODEC_ALL;
1847  if (settings->RemoteFxCodec == FALSE)
1848  {
1849  flags &= ~FREERDP_CODEC_REMOTEFX;
1850  }
1851  if (settings->NSCodec == FALSE)
1852  {
1853  flags &= ~FREERDP_CODEC_NSCODEC;
1854  }
1855  /*TODO: check other codecs flags */
1856  return flags;
1857 }

◆ freerdp_settings_get_config_path()

FREERDP_API char* freerdp_settings_get_config_path ( void  )

return the configuration directory for the library

Returns
The current configuration path or NULL
Since
version 3.6.0

Definition at line 792 of file core/settings.c.

793 {
794  char* path = NULL;
795  /* For default FreeRDP continue using same config directory
796  * as in old releases.
797  * Custom builds use <Vendor>/<Product> as config folder. */
798 #if !defined(WITH_FULL_CONFIG_PATH)
799  if (_stricmp(FREERDP_VENDOR_STRING, FREERDP_PRODUCT_STRING) == 0)
800  return freerdp_settings_get_legacy_config_path();
801 #endif
802 
803  char* base = GetKnownSubPath(KNOWN_PATH_XDG_CONFIG_HOME, FREERDP_VENDOR_STRING);
804  if (base)
805  path = GetCombinedPath(base, FREERDP_PRODUCT_STRING);
806  free(base);
807 
808  return path;
809 }

◆ freerdp_settings_get_int16()

FREERDP_API INT16 freerdp_settings_get_int16 ( const rdpSettings *  settings,
FreeRDP_Settings_Keys_Int16  id 
)

Returns a INT16 settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
Returns
the value of the INT16 key

Definition at line 1581 of file settings_getters.c.

1582 {
1583  WINPR_ASSERT(settings);
1584 
1585  switch (id)
1586  {
1587  default:
1588  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
1591  WINPR_ASSERT(FALSE);
1592  return 0;
1593  }
1594 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item(), freerdp_settings_dump(), and freerdp_settings_print_diff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_int32()

FREERDP_API INT32 freerdp_settings_get_int32 ( const rdpSettings *  settings,
FreeRDP_Settings_Keys_Int32  id 
)

Returns a INT32 settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
Returns
the value of the INT32 key

Definition at line 2541 of file settings_getters.c.

2542 {
2543  WINPR_ASSERT(settings);
2544 
2545  switch (id)
2546  {
2547  case FreeRDP_XPan:
2548  return settings->XPan;
2549 
2550  case FreeRDP_YPan:
2551  return settings->YPan;
2552 
2553  default:
2554  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2557  WINPR_ASSERT(FALSE);
2558  return 0;
2559  }
2560 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item(), freerdp_settings_dump(), and freerdp_settings_print_diff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_int64()

FREERDP_API INT64 freerdp_settings_get_int64 ( const rdpSettings *  settings,
FreeRDP_Settings_Keys_Int64  id 
)

Returns a INT64 settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
Returns
the value of the INT64 key

Definition at line 2640 of file settings_getters.c.

2641 {
2642  WINPR_ASSERT(settings);
2643 
2644  switch (id)
2645  {
2646  default:
2647  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2650  WINPR_ASSERT(FALSE);
2651  return 0;
2652  }
2653 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item(), freerdp_settings_dump(), and freerdp_settings_print_diff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_key_for_name()

FREERDP_API SSIZE_T freerdp_settings_get_key_for_name ( const char *  value)

Get a key index for the name string of that key.

Parameters
valueA key name string like FreeRDP_ServerMode
Returns
The key index or -1 in case of an error (e.g. name does not exist)

Definition at line 348 of file settings_str.c.

349 {
350  WINPR_ASSERT(value);
351 
352  for (size_t x = 0; x < ARRAYSIZE(settings_map); x++)
353  {
354  const struct settings_str_entry* cur = &settings_map[x];
355  if (strcmp(value, cur->str) == 0)
356  return cur->id;
357  }
358  return -1;
359 }

◆ freerdp_settings_get_name_for_key()

FREERDP_API const char* freerdp_settings_get_name_for_key ( SSIZE_T  key)

Returns the type name for a key.

Parameters
keythe key number to stringify
Returns
the name of the key or NULL

Definition at line 418 of file settings_str.c.

419 {
420  for (size_t x = 0; x < ARRAYSIZE(settings_map); x++)
421  {
422  const struct settings_str_entry* cur = &settings_map[x];
423  if (cur->id == key)
424  return cur->str;
425  }
426  return NULL;
427 }

Referenced by freerdp_settings_get_bool(), freerdp_settings_get_int16(), freerdp_settings_get_int32(), freerdp_settings_get_int64(), freerdp_settings_get_pointer_writable(), freerdp_settings_get_string(), freerdp_settings_get_string_writable(), freerdp_settings_get_uint16(), freerdp_settings_get_uint32(), freerdp_settings_get_uint64(), freerdp_settings_set_bool(), freerdp_settings_set_int16(), freerdp_settings_set_int32(), freerdp_settings_set_int64(), freerdp_settings_set_pointer(), freerdp_settings_set_uint16(), freerdp_settings_set_uint32(), and freerdp_settings_set_uint64().

Here is the caller graph for this function:

◆ freerdp_settings_get_pointer()

FREERDP_API const void* freerdp_settings_get_pointer ( const rdpSettings *  settings,
FreeRDP_Settings_Keys_Pointer  id 
)

Returns a immutable pointer settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
Returns
the immutable pointer value

Definition at line 1327 of file common/settings.c.

1329 {
1330  union
1331  {
1332  const rdpSettings* pc;
1333  rdpSettings* p;
1334  } cnv;
1335  cnv.pc = settings;
1336  return freerdp_settings_get_pointer_writable(cnv.p, id);
1337 }
FREERDP_API void * freerdp_settings_get_pointer_writable(rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id)
Returns a mutable pointer settings value.

References freerdp_settings_get_pointer_writable().

Referenced by freerdp_settings_copy_item(), freerdp_settings_dump(), and freerdp_settings_print_diff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_pointer_writable()

FREERDP_API void* freerdp_settings_get_pointer_writable ( rdpSettings *  settings,
FreeRDP_Settings_Keys_Pointer  id 
)

Returns a mutable pointer settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
Returns
the mutable pointer value

Definition at line 3981 of file settings_getters.c.

3982 {
3983  WINPR_ASSERT(settings);
3984 
3985  switch (id)
3986  {
3987  case FreeRDP_BitmapCacheV2CellInfo:
3988  return (void*)settings->BitmapCacheV2CellInfo;
3989 
3990  case FreeRDP_ChannelDefArray:
3991  return (void*)settings->ChannelDefArray;
3992 
3993  case FreeRDP_ClientAutoReconnectCookie:
3994  return (void*)settings->ClientAutoReconnectCookie;
3995 
3996  case FreeRDP_ClientRandom:
3997  return (void*)settings->ClientRandom;
3998 
3999  case FreeRDP_ClientTimeZone:
4000  return (void*)settings->ClientTimeZone;
4001 
4002  case FreeRDP_DeviceArray:
4003  return (void*)settings->DeviceArray;
4004 
4005  case FreeRDP_DynamicChannelArray:
4006  return (void*)settings->DynamicChannelArray;
4007 
4008  case FreeRDP_FragCache:
4009  return (void*)settings->FragCache;
4010 
4011  case FreeRDP_GlyphCache:
4012  return (void*)settings->GlyphCache;
4013 
4014  case FreeRDP_LoadBalanceInfo:
4015  return (void*)settings->LoadBalanceInfo;
4016 
4017  case FreeRDP_MonitorDefArray:
4018  return (void*)settings->MonitorDefArray;
4019 
4020  case FreeRDP_MonitorIds:
4021  return (void*)settings->MonitorIds;
4022 
4023  case FreeRDP_OrderSupport:
4024  return (void*)settings->OrderSupport;
4025 
4026  case FreeRDP_Password51:
4027  return (void*)settings->Password51;
4028 
4029  case FreeRDP_RdpServerCertificate:
4030  return (void*)settings->RdpServerCertificate;
4031 
4032  case FreeRDP_RdpServerRsaKey:
4033  return (void*)settings->RdpServerRsaKey;
4034 
4035  case FreeRDP_ReceivedCapabilities:
4036  return (void*)settings->ReceivedCapabilities;
4037 
4038  case FreeRDP_ReceivedCapabilityData:
4039  return (void*)settings->ReceivedCapabilityData;
4040 
4041  case FreeRDP_ReceivedCapabilityDataSizes:
4042  return (void*)settings->ReceivedCapabilityDataSizes;
4043 
4044  case FreeRDP_RedirectionGuid:
4045  return (void*)settings->RedirectionGuid;
4046 
4047  case FreeRDP_RedirectionPassword:
4048  return (void*)settings->RedirectionPassword;
4049 
4050  case FreeRDP_RedirectionTargetCertificate:
4051  return (void*)settings->RedirectionTargetCertificate;
4052 
4053  case FreeRDP_RedirectionTsvUrl:
4054  return (void*)settings->RedirectionTsvUrl;
4055 
4056  case FreeRDP_ServerAutoReconnectCookie:
4057  return (void*)settings->ServerAutoReconnectCookie;
4058 
4059  case FreeRDP_ServerCertificate:
4060  return (void*)settings->ServerCertificate;
4061 
4062  case FreeRDP_ServerLicenseProductIssuers:
4063  return (void*)settings->ServerLicenseProductIssuers;
4064 
4065  case FreeRDP_ServerRandom:
4066  return (void*)settings->ServerRandom;
4067 
4068  case FreeRDP_StaticChannelArray:
4069  return (void*)settings->StaticChannelArray;
4070 
4071  case FreeRDP_TargetNetAddresses:
4072  return (void*)settings->TargetNetAddresses;
4073 
4074  case FreeRDP_TargetNetPorts:
4075  return (void*)settings->TargetNetPorts;
4076 
4077  case FreeRDP_instance:
4078  return settings->instance;
4079 
4080  default:
4081  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
4084  WINPR_ASSERT(FALSE);
4085  return NULL;
4086  }
4087 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_get_pointer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_server_name()

FREERDP_API const char* freerdp_settings_get_server_name ( const rdpSettings *  settings)

A helper function to return the correct server name.

The server name might be in key FreeRDP_ServerHostname or if used in FreeRDP_UserSpecifiedServerName. This function returns the correct name to use.

Parameters
settingsThe settings to query, must not be NULL.
Returns
A string pointer or NULL in case of failure.

Definition at line 1859 of file common/settings.c.

1860 {
1861  WINPR_ASSERT(settings);
1862  const char* hostname = settings->ServerHostname;
1863 
1864  if (settings->UserSpecifiedServerName)
1865  hostname = settings->UserSpecifiedServerName;
1866 
1867  return hostname;
1868 }

◆ freerdp_settings_get_string()

FREERDP_API const char* freerdp_settings_get_string ( const rdpSettings *  settings,
FreeRDP_Settings_Keys_String  id 
)

Returns a immutable string settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
Returns
the immutable string pointer

Definition at line 2679 of file settings_getters.c.

2681 {
2682  WINPR_ASSERT(settings);
2683 
2684  switch (id)
2685  {
2686  case FreeRDP_AadServerHostname:
2687  return settings->AadServerHostname;
2688 
2689  case FreeRDP_AcceptedCert:
2690  return settings->AcceptedCert;
2691 
2692  case FreeRDP_ActionScript:
2693  return settings->ActionScript;
2694 
2695  case FreeRDP_AllowedTlsCiphers:
2696  return settings->AllowedTlsCiphers;
2697 
2698  case FreeRDP_AlternateShell:
2699  return settings->AlternateShell;
2700 
2701  case FreeRDP_AssistanceFile:
2702  return settings->AssistanceFile;
2703 
2704  case FreeRDP_AuthenticationPackageList:
2705  return settings->AuthenticationPackageList;
2706 
2707  case FreeRDP_AuthenticationServiceClass:
2708  return settings->AuthenticationServiceClass;
2709 
2710  case FreeRDP_BitmapCachePersistFile:
2711  return settings->BitmapCachePersistFile;
2712 
2713  case FreeRDP_CardName:
2714  return settings->CardName;
2715 
2716  case FreeRDP_CertificateAcceptedFingerprints:
2717  return settings->CertificateAcceptedFingerprints;
2718 
2719  case FreeRDP_CertificateName:
2720  return settings->CertificateName;
2721 
2722  case FreeRDP_ClientAddress:
2723  return settings->ClientAddress;
2724 
2725  case FreeRDP_ClientDir:
2726  return settings->ClientDir;
2727 
2728  case FreeRDP_ClientHostname:
2729  return settings->ClientHostname;
2730 
2731  case FreeRDP_ClientProductId:
2732  return settings->ClientProductId;
2733 
2734  case FreeRDP_ClipboardUseSelection:
2735  return settings->ClipboardUseSelection;
2736 
2737  case FreeRDP_ComputerName:
2738  return settings->ComputerName;
2739 
2740  case FreeRDP_ConfigPath:
2741  return settings->ConfigPath;
2742 
2743  case FreeRDP_ConnectionFile:
2744  return settings->ConnectionFile;
2745 
2746  case FreeRDP_ContainerName:
2747  return settings->ContainerName;
2748 
2749  case FreeRDP_CspName:
2750  return settings->CspName;
2751 
2752  case FreeRDP_CurrentPath:
2753  return settings->CurrentPath;
2754 
2755  case FreeRDP_Domain:
2756  return settings->Domain;
2757 
2758  case FreeRDP_DrivesToRedirect:
2759  return settings->DrivesToRedirect;
2760 
2761  case FreeRDP_DumpRemoteFxFile:
2762  return settings->DumpRemoteFxFile;
2763 
2764  case FreeRDP_DynamicDSTTimeZoneKeyName:
2765  return settings->DynamicDSTTimeZoneKeyName;
2766 
2767  case FreeRDP_GatewayAcceptedCert:
2768  return settings->GatewayAcceptedCert;
2769 
2770  case FreeRDP_GatewayAccessToken:
2771  return settings->GatewayAccessToken;
2772 
2773  case FreeRDP_GatewayAvdAadtenantid:
2774  return settings->GatewayAvdAadtenantid;
2775 
2776  case FreeRDP_GatewayAvdActivityhint:
2777  return settings->GatewayAvdActivityhint;
2778 
2779  case FreeRDP_GatewayAvdArmpath:
2780  return settings->GatewayAvdArmpath;
2781 
2782  case FreeRDP_GatewayAvdClientID:
2783  return settings->GatewayAvdClientID;
2784 
2785  case FreeRDP_GatewayAvdDiagnosticserviceurl:
2786  return settings->GatewayAvdDiagnosticserviceurl;
2787 
2788  case FreeRDP_GatewayAvdGeo:
2789  return settings->GatewayAvdGeo;
2790 
2791  case FreeRDP_GatewayAvdHubdiscoverygeourl:
2792  return settings->GatewayAvdHubdiscoverygeourl;
2793 
2794  case FreeRDP_GatewayAvdWvdEndpointPool:
2795  return settings->GatewayAvdWvdEndpointPool;
2796 
2797  case FreeRDP_GatewayAzureActiveDirectory:
2798  return settings->GatewayAzureActiveDirectory;
2799 
2800  case FreeRDP_GatewayDomain:
2801  return settings->GatewayDomain;
2802 
2803  case FreeRDP_GatewayHostname:
2804  return settings->GatewayHostname;
2805 
2806  case FreeRDP_GatewayHttpExtAuthBearer:
2807  return settings->GatewayHttpExtAuthBearer;
2808 
2809  case FreeRDP_GatewayPassword:
2810  return settings->GatewayPassword;
2811 
2812  case FreeRDP_GatewayUrl:
2813  return settings->GatewayUrl;
2814 
2815  case FreeRDP_GatewayUsername:
2816  return settings->GatewayUsername;
2817 
2818  case FreeRDP_HomePath:
2819  return settings->HomePath;
2820 
2821  case FreeRDP_ImeFileName:
2822  return settings->ImeFileName;
2823 
2824  case FreeRDP_KerberosArmor:
2825  return settings->KerberosArmor;
2826 
2827  case FreeRDP_KerberosCache:
2828  return settings->KerberosCache;
2829 
2830  case FreeRDP_KerberosKdcUrl:
2831  return settings->KerberosKdcUrl;
2832 
2833  case FreeRDP_KerberosKeytab:
2834  return settings->KerberosKeytab;
2835 
2836  case FreeRDP_KerberosLifeTime:
2837  return settings->KerberosLifeTime;
2838 
2839  case FreeRDP_KerberosRealm:
2840  return settings->KerberosRealm;
2841 
2842  case FreeRDP_KerberosRenewableLifeTime:
2843  return settings->KerberosRenewableLifeTime;
2844 
2845  case FreeRDP_KerberosStartTime:
2846  return settings->KerberosStartTime;
2847 
2848  case FreeRDP_KeyboardPipeName:
2849  return settings->KeyboardPipeName;
2850 
2851  case FreeRDP_KeyboardRemappingList:
2852  return settings->KeyboardRemappingList;
2853 
2854  case FreeRDP_NtlmSamFile:
2855  return settings->NtlmSamFile;
2856 
2857  case FreeRDP_Password:
2858  return settings->Password;
2859 
2860  case FreeRDP_PasswordHash:
2861  return settings->PasswordHash;
2862 
2863  case FreeRDP_Pkcs11Module:
2864  return settings->Pkcs11Module;
2865 
2866  case FreeRDP_PkinitAnchors:
2867  return settings->PkinitAnchors;
2868 
2869  case FreeRDP_PlayRemoteFxFile:
2870  return settings->PlayRemoteFxFile;
2871 
2872  case FreeRDP_PreconnectionBlob:
2873  return settings->PreconnectionBlob;
2874 
2875  case FreeRDP_ProxyHostname:
2876  return settings->ProxyHostname;
2877 
2878  case FreeRDP_ProxyPassword:
2879  return settings->ProxyPassword;
2880 
2881  case FreeRDP_ProxyUsername:
2882  return settings->ProxyUsername;
2883 
2884  case FreeRDP_RDP2TCPArgs:
2885  return settings->RDP2TCPArgs;
2886 
2887  case FreeRDP_ReaderName:
2888  return settings->ReaderName;
2889 
2890  case FreeRDP_RedirectionAcceptedCert:
2891  return settings->RedirectionAcceptedCert;
2892 
2893  case FreeRDP_RedirectionDomain:
2894  return settings->RedirectionDomain;
2895 
2896  case FreeRDP_RedirectionTargetFQDN:
2897  return settings->RedirectionTargetFQDN;
2898 
2899  case FreeRDP_RedirectionTargetNetBiosName:
2900  return settings->RedirectionTargetNetBiosName;
2901 
2902  case FreeRDP_RedirectionUsername:
2903  return settings->RedirectionUsername;
2904 
2905  case FreeRDP_RemoteApplicationCmdLine:
2906  return settings->RemoteApplicationCmdLine;
2907 
2908  case FreeRDP_RemoteApplicationFile:
2909  return settings->RemoteApplicationFile;
2910 
2911  case FreeRDP_RemoteApplicationGuid:
2912  return settings->RemoteApplicationGuid;
2913 
2914  case FreeRDP_RemoteApplicationIcon:
2915  return settings->RemoteApplicationIcon;
2916 
2917  case FreeRDP_RemoteApplicationName:
2918  return settings->RemoteApplicationName;
2919 
2920  case FreeRDP_RemoteApplicationProgram:
2921  return settings->RemoteApplicationProgram;
2922 
2923  case FreeRDP_RemoteApplicationWorkingDir:
2924  return settings->RemoteApplicationWorkingDir;
2925 
2926  case FreeRDP_RemoteAssistancePassStub:
2927  return settings->RemoteAssistancePassStub;
2928 
2929  case FreeRDP_RemoteAssistancePassword:
2930  return settings->RemoteAssistancePassword;
2931 
2932  case FreeRDP_RemoteAssistanceRCTicket:
2933  return settings->RemoteAssistanceRCTicket;
2934 
2935  case FreeRDP_RemoteAssistanceSessionId:
2936  return settings->RemoteAssistanceSessionId;
2937 
2938  case FreeRDP_ServerHostname:
2939  return settings->ServerHostname;
2940 
2941  case FreeRDP_ServerLicenseCompanyName:
2942  return settings->ServerLicenseCompanyName;
2943 
2944  case FreeRDP_ServerLicenseProductName:
2945  return settings->ServerLicenseProductName;
2946 
2947  case FreeRDP_ShellWorkingDirectory:
2948  return settings->ShellWorkingDirectory;
2949 
2950  case FreeRDP_SmartcardCertificate:
2951  return settings->SmartcardCertificate;
2952 
2953  case FreeRDP_SmartcardPrivateKey:
2954  return settings->SmartcardPrivateKey;
2955 
2956  case FreeRDP_SspiModule:
2957  return settings->SspiModule;
2958 
2959  case FreeRDP_TargetNetAddress:
2960  return settings->TargetNetAddress;
2961 
2962  case FreeRDP_TerminalDescriptor:
2963  return settings->TerminalDescriptor;
2964 
2965  case FreeRDP_TlsSecretsFile:
2966  return settings->TlsSecretsFile;
2967 
2968  case FreeRDP_TransportDumpFile:
2969  return settings->TransportDumpFile;
2970 
2971  case FreeRDP_UserSpecifiedServerName:
2972  return settings->UserSpecifiedServerName;
2973 
2974  case FreeRDP_Username:
2975  return settings->Username;
2976 
2977  case FreeRDP_WinSCardModule:
2978  return settings->WinSCardModule;
2979 
2980  case FreeRDP_WindowTitle:
2981  return settings->WindowTitle;
2982 
2983  case FreeRDP_WmClass:
2984  return settings->WmClass;
2985 
2986  default:
2987  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2990  WINPR_ASSERT(FALSE);
2991  return NULL;
2992  }
2993 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_append_string(), freerdp_settings_copy_item(), freerdp_settings_dump(), freerdp_settings_get_string_as_utf16(), and freerdp_settings_print_diff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_string_as_utf16()

FREERDP_API WCHAR* freerdp_settings_get_string_as_utf16 ( const rdpSettings *  settings,
FreeRDP_Settings_Keys_String  id,
size_t *  pCharLen 
)

Return an allocated UTF16 string.

Parameters
settingsA pointer to the settings struct to use
idThe settings identifier
Returns
An allocated, '\0' terminated WCHAR string or NULL

Definition at line 2129 of file common/settings.c.

2131 {
2132  const char* str = freerdp_settings_get_string(settings, id);
2133  if (pCharLen)
2134  *pCharLen = 0;
2135  if (!str)
2136  return NULL;
2137  return ConvertUtf8ToWCharAlloc(str, pCharLen);
2138 }

References freerdp_settings_get_string().

Here is the call graph for this function:

◆ freerdp_settings_get_string_writable()

FREERDP_API char* freerdp_settings_get_string_writable ( rdpSettings *  settings,
FreeRDP_Settings_Keys_String  id 
)

Returns a string settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
Returns
the string pointer

Definition at line 2995 of file settings_getters.c.

2996 {
2997  WINPR_ASSERT(settings);
2998 
2999  switch (id)
3000  {
3001  case FreeRDP_AadServerHostname:
3002  return settings->AadServerHostname;
3003 
3004  case FreeRDP_AcceptedCert:
3005  return settings->AcceptedCert;
3006 
3007  case FreeRDP_ActionScript:
3008  return settings->ActionScript;
3009 
3010  case FreeRDP_AllowedTlsCiphers:
3011  return settings->AllowedTlsCiphers;
3012 
3013  case FreeRDP_AlternateShell:
3014  return settings->AlternateShell;
3015 
3016  case FreeRDP_AssistanceFile:
3017  return settings->AssistanceFile;
3018 
3019  case FreeRDP_AuthenticationPackageList:
3020  return settings->AuthenticationPackageList;
3021 
3022  case FreeRDP_AuthenticationServiceClass:
3023  return settings->AuthenticationServiceClass;
3024 
3025  case FreeRDP_BitmapCachePersistFile:
3026  return settings->BitmapCachePersistFile;
3027 
3028  case FreeRDP_CardName:
3029  return settings->CardName;
3030 
3031  case FreeRDP_CertificateAcceptedFingerprints:
3032  return settings->CertificateAcceptedFingerprints;
3033 
3034  case FreeRDP_CertificateName:
3035  return settings->CertificateName;
3036 
3037  case FreeRDP_ClientAddress:
3038  return settings->ClientAddress;
3039 
3040  case FreeRDP_ClientDir:
3041  return settings->ClientDir;
3042 
3043  case FreeRDP_ClientHostname:
3044  return settings->ClientHostname;
3045 
3046  case FreeRDP_ClientProductId:
3047  return settings->ClientProductId;
3048 
3049  case FreeRDP_ClipboardUseSelection:
3050  return settings->ClipboardUseSelection;
3051 
3052  case FreeRDP_ComputerName:
3053  return settings->ComputerName;
3054 
3055  case FreeRDP_ConfigPath:
3056  return settings->ConfigPath;
3057 
3058  case FreeRDP_ConnectionFile:
3059  return settings->ConnectionFile;
3060 
3061  case FreeRDP_ContainerName:
3062  return settings->ContainerName;
3063 
3064  case FreeRDP_CspName:
3065  return settings->CspName;
3066 
3067  case FreeRDP_CurrentPath:
3068  return settings->CurrentPath;
3069 
3070  case FreeRDP_Domain:
3071  return settings->Domain;
3072 
3073  case FreeRDP_DrivesToRedirect:
3074  return settings->DrivesToRedirect;
3075 
3076  case FreeRDP_DumpRemoteFxFile:
3077  return settings->DumpRemoteFxFile;
3078 
3079  case FreeRDP_DynamicDSTTimeZoneKeyName:
3080  return settings->DynamicDSTTimeZoneKeyName;
3081 
3082  case FreeRDP_GatewayAcceptedCert:
3083  return settings->GatewayAcceptedCert;
3084 
3085  case FreeRDP_GatewayAccessToken:
3086  return settings->GatewayAccessToken;
3087 
3088  case FreeRDP_GatewayAvdAadtenantid:
3089  return settings->GatewayAvdAadtenantid;
3090 
3091  case FreeRDP_GatewayAvdActivityhint:
3092  return settings->GatewayAvdActivityhint;
3093 
3094  case FreeRDP_GatewayAvdArmpath:
3095  return settings->GatewayAvdArmpath;
3096 
3097  case FreeRDP_GatewayAvdClientID:
3098  return settings->GatewayAvdClientID;
3099 
3100  case FreeRDP_GatewayAvdDiagnosticserviceurl:
3101  return settings->GatewayAvdDiagnosticserviceurl;
3102 
3103  case FreeRDP_GatewayAvdGeo:
3104  return settings->GatewayAvdGeo;
3105 
3106  case FreeRDP_GatewayAvdHubdiscoverygeourl:
3107  return settings->GatewayAvdHubdiscoverygeourl;
3108 
3109  case FreeRDP_GatewayAvdWvdEndpointPool:
3110  return settings->GatewayAvdWvdEndpointPool;
3111 
3112  case FreeRDP_GatewayAzureActiveDirectory:
3113  return settings->GatewayAzureActiveDirectory;
3114 
3115  case FreeRDP_GatewayDomain:
3116  return settings->GatewayDomain;
3117 
3118  case FreeRDP_GatewayHostname:
3119  return settings->GatewayHostname;
3120 
3121  case FreeRDP_GatewayHttpExtAuthBearer:
3122  return settings->GatewayHttpExtAuthBearer;
3123 
3124  case FreeRDP_GatewayPassword:
3125  return settings->GatewayPassword;
3126 
3127  case FreeRDP_GatewayUrl:
3128  return settings->GatewayUrl;
3129 
3130  case FreeRDP_GatewayUsername:
3131  return settings->GatewayUsername;
3132 
3133  case FreeRDP_HomePath:
3134  return settings->HomePath;
3135 
3136  case FreeRDP_ImeFileName:
3137  return settings->ImeFileName;
3138 
3139  case FreeRDP_KerberosArmor:
3140  return settings->KerberosArmor;
3141 
3142  case FreeRDP_KerberosCache:
3143  return settings->KerberosCache;
3144 
3145  case FreeRDP_KerberosKdcUrl:
3146  return settings->KerberosKdcUrl;
3147 
3148  case FreeRDP_KerberosKeytab:
3149  return settings->KerberosKeytab;
3150 
3151  case FreeRDP_KerberosLifeTime:
3152  return settings->KerberosLifeTime;
3153 
3154  case FreeRDP_KerberosRealm:
3155  return settings->KerberosRealm;
3156 
3157  case FreeRDP_KerberosRenewableLifeTime:
3158  return settings->KerberosRenewableLifeTime;
3159 
3160  case FreeRDP_KerberosStartTime:
3161  return settings->KerberosStartTime;
3162 
3163  case FreeRDP_KeyboardPipeName:
3164  return settings->KeyboardPipeName;
3165 
3166  case FreeRDP_KeyboardRemappingList:
3167  return settings->KeyboardRemappingList;
3168 
3169  case FreeRDP_NtlmSamFile:
3170  return settings->NtlmSamFile;
3171 
3172  case FreeRDP_Password:
3173  return settings->Password;
3174 
3175  case FreeRDP_PasswordHash:
3176  return settings->PasswordHash;
3177 
3178  case FreeRDP_Pkcs11Module:
3179  return settings->Pkcs11Module;
3180 
3181  case FreeRDP_PkinitAnchors:
3182  return settings->PkinitAnchors;
3183 
3184  case FreeRDP_PlayRemoteFxFile:
3185  return settings->PlayRemoteFxFile;
3186 
3187  case FreeRDP_PreconnectionBlob:
3188  return settings->PreconnectionBlob;
3189 
3190  case FreeRDP_ProxyHostname:
3191  return settings->ProxyHostname;
3192 
3193  case FreeRDP_ProxyPassword:
3194  return settings->ProxyPassword;
3195 
3196  case FreeRDP_ProxyUsername:
3197  return settings->ProxyUsername;
3198 
3199  case FreeRDP_RDP2TCPArgs:
3200  return settings->RDP2TCPArgs;
3201 
3202  case FreeRDP_ReaderName:
3203  return settings->ReaderName;
3204 
3205  case FreeRDP_RedirectionAcceptedCert:
3206  return settings->RedirectionAcceptedCert;
3207 
3208  case FreeRDP_RedirectionDomain:
3209  return settings->RedirectionDomain;
3210 
3211  case FreeRDP_RedirectionTargetFQDN:
3212  return settings->RedirectionTargetFQDN;
3213 
3214  case FreeRDP_RedirectionTargetNetBiosName:
3215  return settings->RedirectionTargetNetBiosName;
3216 
3217  case FreeRDP_RedirectionUsername:
3218  return settings->RedirectionUsername;
3219 
3220  case FreeRDP_RemoteApplicationCmdLine:
3221  return settings->RemoteApplicationCmdLine;
3222 
3223  case FreeRDP_RemoteApplicationFile:
3224  return settings->RemoteApplicationFile;
3225 
3226  case FreeRDP_RemoteApplicationGuid:
3227  return settings->RemoteApplicationGuid;
3228 
3229  case FreeRDP_RemoteApplicationIcon:
3230  return settings->RemoteApplicationIcon;
3231 
3232  case FreeRDP_RemoteApplicationName:
3233  return settings->RemoteApplicationName;
3234 
3235  case FreeRDP_RemoteApplicationProgram:
3236  return settings->RemoteApplicationProgram;
3237 
3238  case FreeRDP_RemoteApplicationWorkingDir:
3239  return settings->RemoteApplicationWorkingDir;
3240 
3241  case FreeRDP_RemoteAssistancePassStub:
3242  return settings->RemoteAssistancePassStub;
3243 
3244  case FreeRDP_RemoteAssistancePassword:
3245  return settings->RemoteAssistancePassword;
3246 
3247  case FreeRDP_RemoteAssistanceRCTicket:
3248  return settings->RemoteAssistanceRCTicket;
3249 
3250  case FreeRDP_RemoteAssistanceSessionId:
3251  return settings->RemoteAssistanceSessionId;
3252 
3253  case FreeRDP_ServerHostname:
3254  return settings->ServerHostname;
3255 
3256  case FreeRDP_ServerLicenseCompanyName:
3257  return settings->ServerLicenseCompanyName;
3258 
3259  case FreeRDP_ServerLicenseProductName:
3260  return settings->ServerLicenseProductName;
3261 
3262  case FreeRDP_ShellWorkingDirectory:
3263  return settings->ShellWorkingDirectory;
3264 
3265  case FreeRDP_SmartcardCertificate:
3266  return settings->SmartcardCertificate;
3267 
3268  case FreeRDP_SmartcardPrivateKey:
3269  return settings->SmartcardPrivateKey;
3270 
3271  case FreeRDP_SspiModule:
3272  return settings->SspiModule;
3273 
3274  case FreeRDP_TargetNetAddress:
3275  return settings->TargetNetAddress;
3276 
3277  case FreeRDP_TerminalDescriptor:
3278  return settings->TerminalDescriptor;
3279 
3280  case FreeRDP_TlsSecretsFile:
3281  return settings->TlsSecretsFile;
3282 
3283  case FreeRDP_TransportDumpFile:
3284  return settings->TransportDumpFile;
3285 
3286  case FreeRDP_UserSpecifiedServerName:
3287  return settings->UserSpecifiedServerName;
3288 
3289  case FreeRDP_Username:
3290  return settings->Username;
3291 
3292  case FreeRDP_WinSCardModule:
3293  return settings->WinSCardModule;
3294 
3295  case FreeRDP_WindowTitle:
3296  return settings->WindowTitle;
3297 
3298  case FreeRDP_WmClass:
3299  return settings->WmClass;
3300 
3301  default:
3302  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
3305  WINPR_ASSERT(FALSE);
3306  return NULL;
3307  }
3308 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Here is the call graph for this function:

◆ freerdp_settings_get_type_for_key()

FREERDP_API SSIZE_T freerdp_settings_get_type_for_key ( SSIZE_T  key)

Get a key type for the key index.

Parameters
keyThe key index like FreeRDP_ServerMode
Returns
The key type (e.g. FREERDP_SETTINGS_TYPE_BOOL) or -1 in case of an error (e.g. name does not exist)

Definition at line 407 of file settings_str.c.

408 {
409  for (size_t x = 0; x < ARRAYSIZE(settings_map); x++)
410  {
411  const struct settings_str_entry* cur = &settings_map[x];
412  if (cur->id == key)
413  return cur->type;
414  }
415  return -1;
416 }

Referenced by freerdp_settings_copy_item(), and freerdp_settings_get_type_name_for_key().

Here is the caller graph for this function:

◆ freerdp_settings_get_type_for_name()

FREERDP_API SSIZE_T freerdp_settings_get_type_for_name ( const char *  value)

Get a key type for the name string of that key.

Parameters
valueA key name string like FreeRDP_ServerMode
Returns
The key type (e.g. FREERDP_SETTINGS_TYPE_BOOL) or -1 in case of an error (e.g. name does not exist)

Definition at line 361 of file settings_str.c.

362 {
363  WINPR_ASSERT(value);
364 
365  for (size_t x = 0; x < ARRAYSIZE(settings_map); x++)
366  {
367  const struct settings_str_entry* cur = &settings_map[x];
368  if (strcmp(value, cur->str) == 0)
369  return cur->type;
370  }
371  return -1;
372 }

◆ freerdp_settings_get_type_name_for_key()

FREERDP_API const char* freerdp_settings_get_type_name_for_key ( SSIZE_T  key)

Returns the type name for a key.

Parameters
keythe key number to stringify
Returns
the type name of the key or FREERDP_SETTINGS_TYPE_UNKNOWN

Definition at line 374 of file settings_str.c.

375 {
376  const SSIZE_T type = freerdp_settings_get_type_for_key(key);
378 }
const char * freerdp_settings_get_type_name_for_type(SSIZE_T type)
Returns the type name for a type.
Definition: settings_str.c:380

References freerdp_settings_get_type_for_key(), and freerdp_settings_get_type_name_for_type().

Referenced by freerdp_settings_get_bool(), freerdp_settings_get_int16(), freerdp_settings_get_int32(), freerdp_settings_get_int64(), freerdp_settings_get_pointer_writable(), freerdp_settings_get_string(), freerdp_settings_get_string_writable(), freerdp_settings_get_uint16(), freerdp_settings_get_uint32(), freerdp_settings_get_uint64(), freerdp_settings_set_bool(), freerdp_settings_set_int16(), freerdp_settings_set_int32(), freerdp_settings_set_int64(), freerdp_settings_set_pointer(), freerdp_settings_set_uint16(), freerdp_settings_set_uint32(), and freerdp_settings_set_uint64().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_type_name_for_type()

FREERDP_API const char* freerdp_settings_get_type_name_for_type ( SSIZE_T  type)

Returns the type name for a type.

Parameters
typethe type to stringify
Returns
the name of the key or FREERDP_SETTINGS_TYPE_UNKNOWN

Definition at line 380 of file settings_str.c.

381 {
382  switch (type)
383  {
384  case FREERDP_SETTINGS_TYPE_BOOL:
385  return "FREERDP_SETTINGS_TYPE_BOOL";
386  case FREERDP_SETTINGS_TYPE_UINT16:
387  return "FREERDP_SETTINGS_TYPE_UINT16";
388  case FREERDP_SETTINGS_TYPE_INT16:
389  return "FREERDP_SETTINGS_TYPE_INT16";
390  case FREERDP_SETTINGS_TYPE_UINT32:
391  return "FREERDP_SETTINGS_TYPE_UINT32";
392  case FREERDP_SETTINGS_TYPE_INT32:
393  return "FREERDP_SETTINGS_TYPE_INT32";
394  case FREERDP_SETTINGS_TYPE_UINT64:
395  return "FREERDP_SETTINGS_TYPE_UINT64";
396  case FREERDP_SETTINGS_TYPE_INT64:
397  return "FREERDP_SETTINGS_TYPE_INT64";
398  case FREERDP_SETTINGS_TYPE_STRING:
399  return "FREERDP_SETTINGS_TYPE_STRING";
400  case FREERDP_SETTINGS_TYPE_POINTER:
401  return "FREERDP_SETTINGS_TYPE_POINTER";
402  default:
403  return "FREERDP_SETTINGS_TYPE_UNKNOWN";
404  }
405 }

Referenced by freerdp_settings_get_type_name_for_key().

Here is the caller graph for this function:

◆ freerdp_settings_get_uint16()

FREERDP_API UINT16 freerdp_settings_get_uint16 ( const rdpSettings *  settings,
FreeRDP_Settings_Keys_UInt16  id 
)

Returns a UINT16 settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
Returns
the value of the UINT16 key

Definition at line 1451 of file settings_getters.c.

1452 {
1453  WINPR_ASSERT(settings);
1454 
1455  switch (id)
1456  {
1457  case FreeRDP_CapsGeneralCompressionLevel:
1458  return settings->CapsGeneralCompressionLevel;
1459 
1460  case FreeRDP_CapsGeneralCompressionTypes:
1461  return settings->CapsGeneralCompressionTypes;
1462 
1463  case FreeRDP_CapsProtocolVersion:
1464  return settings->CapsProtocolVersion;
1465 
1466  case FreeRDP_CapsRemoteUnshareFlag:
1467  return settings->CapsRemoteUnshareFlag;
1468 
1469  case FreeRDP_CapsUpdateCapabilityFlag:
1470  return settings->CapsUpdateCapabilityFlag;
1471 
1472  case FreeRDP_DesktopOrientation:
1473  return settings->DesktopOrientation;
1474 
1475  case FreeRDP_OrderSupportFlags:
1476  return settings->OrderSupportFlags;
1477 
1478  case FreeRDP_OrderSupportFlagsEx:
1479  return settings->OrderSupportFlagsEx;
1480 
1481  case FreeRDP_ProxyPort:
1482  return settings->ProxyPort;
1483 
1484  case FreeRDP_SupportedColorDepths:
1485  return settings->SupportedColorDepths;
1486 
1487  case FreeRDP_TLSMaxVersion:
1488  return settings->TLSMaxVersion;
1489 
1490  case FreeRDP_TLSMinVersion:
1491  return settings->TLSMinVersion;
1492 
1493  case FreeRDP_TextANSICodePage:
1494  return settings->TextANSICodePage;
1495 
1496  default:
1497  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
1500  WINPR_ASSERT(FALSE);
1501  return 0;
1502  }
1503 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item(), freerdp_settings_dump(), and freerdp_settings_print_diff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_uint32()

FREERDP_API UINT32 freerdp_settings_get_uint32 ( const rdpSettings *  settings,
FreeRDP_Settings_Keys_UInt32  id 
)

Returns a UINT32 settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
Returns
the value of the UINT32 key

Definition at line 1620 of file settings_getters.c.

1621 {
1622  WINPR_ASSERT(settings);
1623 
1624  switch (id)
1625  {
1626  case FreeRDP_AcceptedCertLength:
1627  return settings->AcceptedCertLength;
1628 
1629  case FreeRDP_AuthenticationLevel:
1630  return settings->AuthenticationLevel;
1631 
1632  case FreeRDP_AutoReconnectMaxRetries:
1633  return settings->AutoReconnectMaxRetries;
1634 
1635  case FreeRDP_BitmapCacheV2NumCells:
1636  return settings->BitmapCacheV2NumCells;
1637 
1638  case FreeRDP_BitmapCacheV3CodecId:
1639  return settings->BitmapCacheV3CodecId;
1640 
1641  case FreeRDP_BitmapCacheVersion:
1642  return settings->BitmapCacheVersion;
1643 
1644  case FreeRDP_BrushSupportLevel:
1645  return settings->BrushSupportLevel;
1646 
1647  case FreeRDP_ChannelCount:
1648  return settings->ChannelCount;
1649 
1650  case FreeRDP_ChannelDefArraySize:
1651  return settings->ChannelDefArraySize;
1652 
1653  case FreeRDP_ClientBuild:
1654  return settings->ClientBuild;
1655 
1656  case FreeRDP_ClientRandomLength:
1657  return settings->ClientRandomLength;
1658 
1659  case FreeRDP_ClientSessionId:
1660  return settings->ClientSessionId;
1661 
1662  case FreeRDP_ClipboardFeatureMask:
1663  return settings->ClipboardFeatureMask;
1664 
1665  case FreeRDP_ClusterInfoFlags:
1666  return settings->ClusterInfoFlags;
1667 
1668  case FreeRDP_ColorDepth:
1669  return settings->ColorDepth;
1670 
1671  case FreeRDP_ColorPointerCacheSize:
1672  return settings->ColorPointerCacheSize;
1673 
1674  case FreeRDP_CompDeskSupportLevel:
1675  return settings->CompDeskSupportLevel;
1676 
1677  case FreeRDP_CompressionLevel:
1678  return settings->CompressionLevel;
1679 
1680  case FreeRDP_ConnectionType:
1681  return settings->ConnectionType;
1682 
1683  case FreeRDP_CookieMaxLength:
1684  return settings->CookieMaxLength;
1685 
1686  case FreeRDP_DesktopHeight:
1687  return settings->DesktopHeight;
1688 
1689  case FreeRDP_DesktopPhysicalHeight:
1690  return settings->DesktopPhysicalHeight;
1691 
1692  case FreeRDP_DesktopPhysicalWidth:
1693  return settings->DesktopPhysicalWidth;
1694 
1695  case FreeRDP_DesktopPosX:
1696  return settings->DesktopPosX;
1697 
1698  case FreeRDP_DesktopPosY:
1699  return settings->DesktopPosY;
1700 
1701  case FreeRDP_DesktopScaleFactor:
1702  return settings->DesktopScaleFactor;
1703 
1704  case FreeRDP_DesktopWidth:
1705  return settings->DesktopWidth;
1706 
1707  case FreeRDP_DeviceArraySize:
1708  return settings->DeviceArraySize;
1709 
1710  case FreeRDP_DeviceCount:
1711  return settings->DeviceCount;
1712 
1713  case FreeRDP_DeviceScaleFactor:
1714  return settings->DeviceScaleFactor;
1715 
1716  case FreeRDP_DrawNineGridCacheEntries:
1717  return settings->DrawNineGridCacheEntries;
1718 
1719  case FreeRDP_DrawNineGridCacheSize:
1720  return settings->DrawNineGridCacheSize;
1721 
1722  case FreeRDP_DynamicChannelArraySize:
1723  return settings->DynamicChannelArraySize;
1724 
1725  case FreeRDP_DynamicChannelCount:
1726  return settings->DynamicChannelCount;
1727 
1728  case FreeRDP_EarlyCapabilityFlags:
1729  return settings->EarlyCapabilityFlags;
1730 
1731  case FreeRDP_EncryptionLevel:
1732  return settings->EncryptionLevel;
1733 
1734  case FreeRDP_EncryptionMethods:
1735  return settings->EncryptionMethods;
1736 
1737  case FreeRDP_ExtEncryptionMethods:
1738  return settings->ExtEncryptionMethods;
1739 
1740  case FreeRDP_FakeMouseMotionInterval:
1741  return settings->FakeMouseMotionInterval;
1742 
1743  case FreeRDP_Floatbar:
1744  return settings->Floatbar;
1745 
1746  case FreeRDP_ForceIPvX:
1747  return settings->ForceIPvX;
1748 
1749  case FreeRDP_FrameAcknowledge:
1750  return settings->FrameAcknowledge;
1751 
1752  case FreeRDP_GatewayAcceptedCertLength:
1753  return settings->GatewayAcceptedCertLength;
1754 
1755  case FreeRDP_GatewayCredentialsSource:
1756  return settings->GatewayCredentialsSource;
1757 
1758  case FreeRDP_GatewayPort:
1759  return settings->GatewayPort;
1760 
1761  case FreeRDP_GatewayUsageMethod:
1762  return settings->GatewayUsageMethod;
1763 
1764  case FreeRDP_GfxCapsFilter:
1765  return settings->GfxCapsFilter;
1766 
1767  case FreeRDP_GlyphSupportLevel:
1768  return settings->GlyphSupportLevel;
1769 
1770  case FreeRDP_JpegCodecId:
1771  return settings->JpegCodecId;
1772 
1773  case FreeRDP_JpegQuality:
1774  return settings->JpegQuality;
1775 
1776  case FreeRDP_KeySpec:
1777  return settings->KeySpec;
1778 
1779  case FreeRDP_KeyboardCodePage:
1780  return settings->KeyboardCodePage;
1781 
1782  case FreeRDP_KeyboardFunctionKey:
1783  return settings->KeyboardFunctionKey;
1784 
1785  case FreeRDP_KeyboardHook:
1786  return settings->KeyboardHook;
1787 
1788  case FreeRDP_KeyboardLayout:
1789  return settings->KeyboardLayout;
1790 
1791  case FreeRDP_KeyboardSubType:
1792  return settings->KeyboardSubType;
1793 
1794  case FreeRDP_KeyboardType:
1795  return settings->KeyboardType;
1796 
1797  case FreeRDP_LargePointerFlag:
1798  return settings->LargePointerFlag;
1799 
1800  case FreeRDP_LoadBalanceInfoLength:
1801  return settings->LoadBalanceInfoLength;
1802 
1803  case FreeRDP_MonitorAttributeFlags:
1804  return settings->MonitorAttributeFlags;
1805 
1806  case FreeRDP_MonitorCount:
1807  return settings->MonitorCount;
1808 
1809  case FreeRDP_MonitorDefArraySize:
1810  return settings->MonitorDefArraySize;
1811 
1812  case FreeRDP_MonitorFlags:
1813  return settings->MonitorFlags;
1814 
1815  case FreeRDP_MonitorLocalShiftX:
1816  return settings->MonitorLocalShiftX;
1817 
1818  case FreeRDP_MonitorLocalShiftY:
1819  return settings->MonitorLocalShiftY;
1820 
1821  case FreeRDP_MultifragMaxRequestSize:
1822  return settings->MultifragMaxRequestSize;
1823 
1824  case FreeRDP_MultitransportFlags:
1825  return settings->MultitransportFlags;
1826 
1827  case FreeRDP_NSCodecColorLossLevel:
1828  return settings->NSCodecColorLossLevel;
1829 
1830  case FreeRDP_NSCodecId:
1831  return settings->NSCodecId;
1832 
1833  case FreeRDP_NegotiationFlags:
1834  return settings->NegotiationFlags;
1835 
1836  case FreeRDP_NumMonitorIds:
1837  return settings->NumMonitorIds;
1838 
1839  case FreeRDP_OffscreenCacheEntries:
1840  return settings->OffscreenCacheEntries;
1841 
1842  case FreeRDP_OffscreenCacheSize:
1843  return settings->OffscreenCacheSize;
1844 
1845  case FreeRDP_OffscreenSupportLevel:
1846  return settings->OffscreenSupportLevel;
1847 
1848  case FreeRDP_OsMajorType:
1849  return settings->OsMajorType;
1850 
1851  case FreeRDP_OsMinorType:
1852  return settings->OsMinorType;
1853 
1854  case FreeRDP_Password51Length:
1855  return settings->Password51Length;
1856 
1857  case FreeRDP_PduSource:
1858  return settings->PduSource;
1859 
1860  case FreeRDP_PercentScreen:
1861  return settings->PercentScreen;
1862 
1863  case FreeRDP_PerformanceFlags:
1864  return settings->PerformanceFlags;
1865 
1866  case FreeRDP_PointerCacheSize:
1867  return settings->PointerCacheSize;
1868 
1869  case FreeRDP_PreconnectionId:
1870  return settings->PreconnectionId;
1871 
1872  case FreeRDP_ProxyType:
1873  return settings->ProxyType;
1874 
1875  case FreeRDP_RdpVersion:
1876  return settings->RdpVersion;
1877 
1878  case FreeRDP_ReceivedCapabilitiesSize:
1879  return settings->ReceivedCapabilitiesSize;
1880 
1881  case FreeRDP_RedirectedSessionId:
1882  return settings->RedirectedSessionId;
1883 
1884  case FreeRDP_RedirectionAcceptedCertLength:
1885  return settings->RedirectionAcceptedCertLength;
1886 
1887  case FreeRDP_RedirectionFlags:
1888  return settings->RedirectionFlags;
1889 
1890  case FreeRDP_RedirectionGuidLength:
1891  return settings->RedirectionGuidLength;
1892 
1893  case FreeRDP_RedirectionPasswordLength:
1894  return settings->RedirectionPasswordLength;
1895 
1896  case FreeRDP_RedirectionPreferType:
1897  return settings->RedirectionPreferType;
1898 
1899  case FreeRDP_RedirectionTsvUrlLength:
1900  return settings->RedirectionTsvUrlLength;
1901 
1902  case FreeRDP_RemoteAppNumIconCacheEntries:
1903  return settings->RemoteAppNumIconCacheEntries;
1904 
1905  case FreeRDP_RemoteAppNumIconCaches:
1906  return settings->RemoteAppNumIconCaches;
1907 
1908  case FreeRDP_RemoteApplicationExpandCmdLine:
1909  return settings->RemoteApplicationExpandCmdLine;
1910 
1911  case FreeRDP_RemoteApplicationExpandWorkingDir:
1912  return settings->RemoteApplicationExpandWorkingDir;
1913 
1914  case FreeRDP_RemoteApplicationSupportLevel:
1915  return settings->RemoteApplicationSupportLevel;
1916 
1917  case FreeRDP_RemoteApplicationSupportMask:
1918  return settings->RemoteApplicationSupportMask;
1919 
1920  case FreeRDP_RemoteFxCaptureFlags:
1921  return settings->RemoteFxCaptureFlags;
1922 
1923  case FreeRDP_RemoteFxCodecId:
1924  return settings->RemoteFxCodecId;
1925 
1926  case FreeRDP_RemoteFxCodecMode:
1927  return settings->RemoteFxCodecMode;
1928 
1929  case FreeRDP_RemoteFxRlgrMode:
1930  return settings->RemoteFxRlgrMode;
1931 
1932  case FreeRDP_RemoteWndSupportLevel:
1933  return settings->RemoteWndSupportLevel;
1934 
1935  case FreeRDP_RequestedProtocols:
1936  return settings->RequestedProtocols;
1937 
1938  case FreeRDP_SelectedProtocol:
1939  return settings->SelectedProtocol;
1940 
1941  case FreeRDP_ServerCertificateLength:
1942  return settings->ServerCertificateLength;
1943 
1944  case FreeRDP_ServerLicenseProductIssuersCount:
1945  return settings->ServerLicenseProductIssuersCount;
1946 
1947  case FreeRDP_ServerLicenseProductVersion:
1948  return settings->ServerLicenseProductVersion;
1949 
1950  case FreeRDP_ServerPort:
1951  return settings->ServerPort;
1952 
1953  case FreeRDP_ServerRandomLength:
1954  return settings->ServerRandomLength;
1955 
1956  case FreeRDP_ShareId:
1957  return settings->ShareId;
1958 
1959  case FreeRDP_SmartSizingHeight:
1960  return settings->SmartSizingHeight;
1961 
1962  case FreeRDP_SmartSizingWidth:
1963  return settings->SmartSizingWidth;
1964 
1965  case FreeRDP_StaticChannelArraySize:
1966  return settings->StaticChannelArraySize;
1967 
1968  case FreeRDP_StaticChannelCount:
1969  return settings->StaticChannelCount;
1970 
1971  case FreeRDP_SurfaceCommandsSupported:
1972  return settings->SurfaceCommandsSupported;
1973 
1974  case FreeRDP_TargetNetAddressCount:
1975  return settings->TargetNetAddressCount;
1976 
1977  case FreeRDP_TcpAckTimeout:
1978  return settings->TcpAckTimeout;
1979 
1980  case FreeRDP_TcpConnectTimeout:
1981  return settings->TcpConnectTimeout;
1982 
1983  case FreeRDP_TcpKeepAliveDelay:
1984  return settings->TcpKeepAliveDelay;
1985 
1986  case FreeRDP_TcpKeepAliveInterval:
1987  return settings->TcpKeepAliveInterval;
1988 
1989  case FreeRDP_TcpKeepAliveRetries:
1990  return settings->TcpKeepAliveRetries;
1991 
1992  case FreeRDP_ThreadingFlags:
1993  return settings->ThreadingFlags;
1994 
1995  case FreeRDP_TlsSecLevel:
1996  return settings->TlsSecLevel;
1997 
1998  case FreeRDP_VCChunkSize:
1999  return settings->VCChunkSize;
2000 
2001  case FreeRDP_VCFlags:
2002  return settings->VCFlags;
2003 
2004  default:
2005  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2008  WINPR_ASSERT(FALSE);
2009  return 0;
2010  }
2011 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item(), freerdp_settings_dump(), freerdp_settings_print_diff(), and AppDelegate::rdpConnectError:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_uint64()

FREERDP_API UINT64 freerdp_settings_get_uint64 ( const rdpSettings *  settings,
FreeRDP_Settings_Keys_UInt64  id 
)

Returns a UINT64 settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
Returns
the value of the UINT64 key

Definition at line 2594 of file settings_getters.c.

2595 {
2596  WINPR_ASSERT(settings);
2597 
2598  switch (id)
2599  {
2600  case FreeRDP_ParentWindowId:
2601  return settings->ParentWindowId;
2602 
2603  default:
2604  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2607  WINPR_ASSERT(FALSE);
2608  return 0;
2609  }
2610 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item(), freerdp_settings_dump(), and freerdp_settings_print_diff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_new()

FREERDP_API rdpSettings* freerdp_settings_new ( DWORD  flags)

creates a new setting struct

Parameters
flagsFlags for creation, use FREERDP_SETTINGS_SERVER_MODE for server settings, 0 for client.
Returns
A newly allocated settings struct or NULL

Definition at line 811 of file core/settings.c.

812 {
813  char* issuers[] = { "FreeRDP", "FreeRDP-licenser" };
814  const BOOL server = (flags & FREERDP_SETTINGS_SERVER_MODE) != 0 ? TRUE : FALSE;
815  const BOOL remote = (flags & FREERDP_SETTINGS_REMOTE_MODE) != 0 ? TRUE : FALSE;
816  rdpSettings* settings = (rdpSettings*)calloc(1, sizeof(rdpSettings));
817 
818  if (!settings)
819  return NULL;
820 
821  if (!server && !remote)
822  {
823  if (!freerdp_settings_set_string(settings, FreeRDP_GatewayAvdClientID,
824  "a85cf173-4192-42f8-81fa-777a763e6e2c"))
825  goto out_fail;
826  if (!freerdp_settings_set_string(settings, FreeRDP_GatewayAzureActiveDirectory,
827  "login.microsoftonline.com"))
828  goto out_fail;
829  if (!freerdp_settings_set_string(settings, FreeRDP_GatewayAvdAadtenantid, "common"))
830  goto out_fail;
831  if (!freerdp_settings_set_bool(settings, FreeRDP_GatewayAvdUseTenantid, FALSE))
832  goto out_fail;
833  if (!freerdp_settings_set_uint32(settings, FreeRDP_DesktopPhysicalWidth, 1000))
834  goto out_fail;
835  if (!freerdp_settings_set_uint32(settings, FreeRDP_DesktopPhysicalHeight, 1000))
836  goto out_fail;
837  if (!freerdp_settings_set_uint16(settings, FreeRDP_DesktopOrientation,
838  ORIENTATION_LANDSCAPE))
839  goto out_fail;
840  if (!freerdp_settings_set_uint32(settings, FreeRDP_DeviceScaleFactor, 100))
841  goto out_fail;
842  if (!freerdp_settings_set_uint32(settings, FreeRDP_DesktopScaleFactor, 100))
843  goto out_fail;
844  }
845  if (!freerdp_settings_set_uint32(settings, FreeRDP_SurfaceCommandsSupported,
846  SURFCMDS_SET_SURFACE_BITS | SURFCMDS_STREAM_SURFACE_BITS |
847  SURFCMDS_FRAME_MARKER))
848  goto out_fail;
849 
850  if (!freerdp_settings_set_uint32(settings, FreeRDP_RemoteFxRlgrMode, RLGR3))
851  goto out_fail;
852 
853  if (!freerdp_settings_set_uint16(settings, FreeRDP_CapsProtocolVersion,
854  TS_CAPS_PROTOCOLVERSION))
855  goto out_fail;
856 
857  if (!freerdp_settings_set_uint32(settings, FreeRDP_ClipboardFeatureMask,
858  CLIPRDR_FLAG_DEFAULT_MASK))
859  goto out_fail;
860  if (!freerdp_settings_set_string(settings, FreeRDP_ServerLicenseCompanyName, "FreeRDP"))
861  goto out_fail;
862  if (!freerdp_settings_set_string(settings, FreeRDP_ServerLicenseProductName,
863  "FreeRDP-licensing-server"))
864  goto out_fail;
865  if (!freerdp_settings_set_uint32(settings, FreeRDP_ServerLicenseProductVersion, 1))
866  goto out_fail;
867  if (!freerdp_server_license_issuers_copy(settings, issuers, ARRAYSIZE(issuers)))
868  goto out_fail;
869 
870  if (!freerdp_settings_set_uint16(settings, FreeRDP_SupportedColorDepths,
871  RNS_UD_32BPP_SUPPORT | RNS_UD_24BPP_SUPPORT |
872  RNS_UD_16BPP_SUPPORT | RNS_UD_15BPP_SUPPORT))
873  goto out_fail;
874 
875  if (!freerdp_settings_set_bool(settings, FreeRDP_UnicodeInput, TRUE) ||
876  !freerdp_settings_set_bool(settings, FreeRDP_HasHorizontalWheel, TRUE) ||
877  !freerdp_settings_set_bool(settings, FreeRDP_HasExtendedMouseEvent, TRUE) ||
878  !freerdp_settings_set_bool(settings, FreeRDP_HasQoeEvent, TRUE) ||
879  !freerdp_settings_set_bool(settings, FreeRDP_HasRelativeMouseEvent, TRUE) ||
880  !freerdp_settings_set_bool(settings, FreeRDP_HiDefRemoteApp, TRUE) ||
882  settings, FreeRDP_RemoteApplicationSupportMask,
883  RAIL_LEVEL_SUPPORTED | RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED |
884  RAIL_LEVEL_SHELL_INTEGRATION_SUPPORTED | RAIL_LEVEL_LANGUAGE_IME_SYNC_SUPPORTED |
885  RAIL_LEVEL_SERVER_TO_CLIENT_IME_SYNC_SUPPORTED |
886  RAIL_LEVEL_HIDE_MINIMIZED_APPS_SUPPORTED | RAIL_LEVEL_WINDOW_CLOAKING_SUPPORTED |
887  RAIL_LEVEL_HANDSHAKE_EX_SUPPORTED) ||
888  !freerdp_settings_set_uint16(settings, FreeRDP_TextANSICodePage, CP_UTF8) ||
889  !freerdp_settings_set_uint16(settings, FreeRDP_OrderSupportFlags,
890  NEGOTIATE_ORDER_SUPPORT | ZERO_BOUNDS_DELTA_SUPPORT |
891  COLOR_INDEX_SUPPORT) ||
892  !freerdp_settings_set_bool(settings, FreeRDP_SupportHeartbeatPdu, TRUE) ||
893  !freerdp_settings_set_bool(settings, FreeRDP_ServerMode, server) ||
894  !freerdp_settings_set_bool(settings, FreeRDP_WaitForOutputBufferFlush, TRUE) ||
895  !freerdp_settings_set_uint32(settings, FreeRDP_ClusterInfoFlags, REDIRECTION_SUPPORTED) ||
896  !freerdp_settings_set_uint32(settings, FreeRDP_DesktopWidth, 1024) ||
897  !freerdp_settings_set_uint32(settings, FreeRDP_DesktopHeight, 768) ||
898  !freerdp_settings_set_bool(settings, FreeRDP_Workarea, FALSE) ||
899  !freerdp_settings_set_bool(settings, FreeRDP_Fullscreen, FALSE) ||
900  !freerdp_settings_set_bool(settings, FreeRDP_GrabKeyboard, TRUE) ||
901  !freerdp_settings_set_bool(settings, FreeRDP_Decorations, TRUE) ||
902  !freerdp_settings_set_uint32(settings, FreeRDP_RdpVersion, RDP_VERSION_10_12) ||
903  !freerdp_settings_set_uint32(settings, FreeRDP_ColorDepth, 32) ||
904  !freerdp_settings_set_bool(settings, FreeRDP_AadSecurity, FALSE) ||
905  !freerdp_settings_set_bool(settings, FreeRDP_ExtSecurity, FALSE) ||
906  !freerdp_settings_set_bool(settings, FreeRDP_NlaSecurity, TRUE) ||
907  !freerdp_settings_set_bool(settings, FreeRDP_TlsSecurity, TRUE) ||
908  !freerdp_settings_set_bool(settings, FreeRDP_RdpSecurity, TRUE) ||
909  !freerdp_settings_set_bool(settings, FreeRDP_RdstlsSecurity, FALSE) ||
910  !freerdp_settings_set_bool(settings, FreeRDP_NegotiateSecurityLayer, TRUE) ||
911  !freerdp_settings_set_bool(settings, FreeRDP_RestrictedAdminModeRequired, FALSE) ||
912  !freerdp_settings_set_bool(settings, FreeRDP_MstscCookieMode, FALSE) ||
913  !freerdp_settings_set_uint32(settings, FreeRDP_CookieMaxLength,
914  DEFAULT_COOKIE_MAX_LENGTH) ||
915  !freerdp_settings_set_uint32(settings, FreeRDP_ClientBuild,
916  18363) || /* Windows 10, Version 1909 */
917  !freerdp_settings_set_uint32(settings, FreeRDP_KeyboardType, 4) ||
918  !freerdp_settings_set_uint32(settings, FreeRDP_KeyboardSubType, 0) ||
919  !freerdp_settings_set_uint32(settings, FreeRDP_KeyboardFunctionKey, 12) ||
920  !freerdp_settings_set_uint32(settings, FreeRDP_KeyboardLayout, 0) ||
921  !freerdp_settings_set_uint32(settings, FreeRDP_KeyboardHook,
922  KEYBOARD_HOOK_FULLSCREEN_ONLY) ||
923  !freerdp_settings_set_bool(settings, FreeRDP_UseRdpSecurityLayer, FALSE) ||
924  !freerdp_settings_set_bool(settings, FreeRDP_SaltedChecksum, TRUE) ||
925  !freerdp_settings_set_uint32(settings, FreeRDP_ServerPort, 3389) ||
926  !freerdp_settings_set_uint32(settings, FreeRDP_GatewayPort, 443) ||
927  !freerdp_settings_set_bool(settings, FreeRDP_DesktopResize, TRUE) ||
928  !freerdp_settings_set_bool(settings, FreeRDP_ToggleFullscreen, TRUE) ||
929  !freerdp_settings_set_uint32(settings, FreeRDP_DesktopPosX, UINT32_MAX) ||
930  !freerdp_settings_set_uint32(settings, FreeRDP_DesktopPosY, UINT32_MAX) ||
931  !freerdp_settings_set_bool(settings, FreeRDP_SoftwareGdi, TRUE) ||
932  !freerdp_settings_set_bool(settings, FreeRDP_UnmapButtons, FALSE) ||
933  !freerdp_settings_set_uint32(settings, FreeRDP_PerformanceFlags, PERF_FLAG_NONE) ||
934  !freerdp_settings_set_bool(settings, FreeRDP_AllowFontSmoothing, TRUE) ||
935  !freerdp_settings_set_bool(settings, FreeRDP_AllowDesktopComposition, FALSE) ||
936  !freerdp_settings_set_bool(settings, FreeRDP_DisableWallpaper, FALSE) ||
937  !freerdp_settings_set_bool(settings, FreeRDP_DisableFullWindowDrag, TRUE) ||
938  !freerdp_settings_set_bool(settings, FreeRDP_DisableMenuAnims, TRUE) ||
939  !freerdp_settings_set_bool(settings, FreeRDP_DisableThemes, FALSE) ||
940  !freerdp_settings_set_uint32(settings, FreeRDP_ConnectionType,
941  CONNECTION_TYPE_AUTODETECT) ||
942  !freerdp_settings_set_bool(settings, FreeRDP_NetworkAutoDetect, TRUE) ||
943  !freerdp_settings_set_uint32(settings, FreeRDP_EncryptionMethods, ENCRYPTION_METHOD_NONE) ||
944  !freerdp_settings_set_uint32(settings, FreeRDP_EncryptionLevel, ENCRYPTION_LEVEL_NONE) ||
945  !freerdp_settings_set_bool(settings, FreeRDP_FIPSMode, FALSE) ||
946  !freerdp_settings_set_bool(settings, FreeRDP_CompressionEnabled, TRUE) ||
947  !freerdp_settings_set_bool(settings, FreeRDP_LogonNotify, TRUE) ||
948  !freerdp_settings_set_uint32(settings, FreeRDP_BrushSupportLevel, BRUSH_COLOR_FULL) ||
949  !freerdp_settings_set_uint32(settings, FreeRDP_CompressionLevel, PACKET_COMPR_TYPE_RDP61) ||
950  !freerdp_settings_set_bool(settings, FreeRDP_Authentication, TRUE) ||
951  !freerdp_settings_set_bool(settings, FreeRDP_AuthenticationOnly, FALSE) ||
952  !freerdp_settings_set_bool(settings, FreeRDP_CredentialsFromStdin, FALSE) ||
953  !freerdp_settings_set_bool(settings, FreeRDP_DisableCredentialsDelegation, FALSE) ||
954  !freerdp_settings_set_uint32(settings, FreeRDP_AuthenticationLevel, 2) ||
955  !freerdp_settings_set_uint32(settings, FreeRDP_ChannelCount, 0) ||
956  !freerdp_settings_set_bool(settings, FreeRDP_CertificateCallbackPreferPEM, FALSE) ||
957  !freerdp_settings_set_uint32(settings, FreeRDP_KeySpec, AT_KEYEXCHANGE))
958  goto out_fail;
959 
960  if (!freerdp_settings_set_pointer_len(settings, FreeRDP_ChannelDefArray, NULL,
961  CHANNEL_MAX_COUNT))
962  goto out_fail;
963 
964  if (!freerdp_settings_set_bool(settings, FreeRDP_SupportMonitorLayoutPdu, FALSE))
965  goto out_fail;
966 
967  if (!freerdp_settings_set_uint32(settings, FreeRDP_MonitorCount, 0))
968  goto out_fail;
969 
970  if (!freerdp_settings_set_pointer_len(settings, FreeRDP_MonitorDefArray, NULL, 32))
971  goto out_fail;
972 
973  if (!freerdp_settings_set_uint32(settings, FreeRDP_MonitorLocalShiftX, 0))
974  goto out_fail;
975 
976  if (!freerdp_settings_set_uint32(settings, FreeRDP_MonitorLocalShiftY, 0))
977  goto out_fail;
978 
979  if (!freerdp_settings_set_pointer_len(settings, FreeRDP_MonitorIds, NULL, 0))
980  goto out_fail;
981 
982  if (!freerdp_settings_set_uint32(settings, FreeRDP_MultitransportFlags,
983  TRANSPORT_TYPE_UDP_FECR))
984  goto out_fail;
985  if (!freerdp_settings_set_bool(settings, FreeRDP_SupportMultitransport, TRUE))
986  goto out_fail;
987 
988  if (!settings_init_computer_name(settings))
989  goto out_fail;
990 
991  if (!freerdp_settings_set_pointer_len(settings, FreeRDP_RdpServerCertificate, NULL, 1))
992  goto out_fail;
993 
994  if (!freerdp_capability_buffer_allocate(settings, 32))
995  goto out_fail;
996 
997  {
998  char tmp[32] = { 0 };
999  if (!freerdp_settings_set_string_len(settings, FreeRDP_ClientProductId, tmp, sizeof(tmp)))
1000  goto out_fail;
1001  }
1002 
1003  /* [MS-RDPBCGR] 2.2.7.1.5 Pointer Capability Set (TS_POINTER_CAPABILITYSET)
1004  *
1005  * if we are in server mode send a reasonable large cache size,
1006  * if we are in client mode just set the value to the maximum we want to
1007  * support and during capability exchange that size will be limited to the
1008  * sizes the server supports
1009  *
1010  * We have chosen 128 cursors in cache which is at worst 128 * 576kB (384x384 pixel cursor with
1011  * 32bit color depth)
1012  * */
1013  if (freerdp_settings_get_bool(settings, FreeRDP_ServerMode))
1014  {
1015  if (!freerdp_settings_set_uint32(settings, FreeRDP_PointerCacheSize, 25) ||
1016  !freerdp_settings_set_uint32(settings, FreeRDP_ColorPointerCacheSize, 25))
1017  goto out_fail;
1018  }
1019  else
1020  {
1021  if (!freerdp_settings_set_uint32(settings, FreeRDP_PointerCacheSize, 128) ||
1022  !freerdp_settings_set_uint32(settings, FreeRDP_ColorPointerCacheSize, 128))
1023  goto out_fail;
1024  }
1025 
1026  if (!freerdp_settings_set_uint32(settings, FreeRDP_LargePointerFlag,
1027  (LARGE_POINTER_FLAG_96x96 | LARGE_POINTER_FLAG_384x384)) ||
1028  !freerdp_settings_set_bool(settings, FreeRDP_SoundBeepsEnabled, TRUE) ||
1029  !freerdp_settings_set_bool(settings, FreeRDP_DrawGdiPlusEnabled, FALSE) ||
1030  !freerdp_settings_set_bool(settings, FreeRDP_DrawAllowSkipAlpha, TRUE) ||
1031  !freerdp_settings_set_bool(settings, FreeRDP_DrawAllowColorSubsampling, FALSE) ||
1032  !freerdp_settings_set_bool(settings, FreeRDP_DrawAllowDynamicColorFidelity, TRUE) ||
1033  !freerdp_settings_set_bool(settings, FreeRDP_FrameMarkerCommandEnabled, TRUE) ||
1034  !freerdp_settings_set_bool(settings, FreeRDP_SurfaceFrameMarkerEnabled, TRUE) ||
1035  !freerdp_settings_set_bool(settings, FreeRDP_AllowCacheWaitingList, TRUE) ||
1036  !freerdp_settings_set_uint32(settings, FreeRDP_BitmapCacheV2NumCells, 5))
1037  goto out_fail;
1038  settings->BitmapCacheV2CellInfo =
1040 
1041  if (!settings->BitmapCacheV2CellInfo)
1042  goto out_fail;
1043 
1044  {
1045  BITMAP_CACHE_V2_CELL_INFO cache = { 0 };
1046  cache.numEntries = 600;
1047  if (!freerdp_settings_set_pointer_array(settings, FreeRDP_BitmapCacheV2CellInfo, 0,
1048  &cache) ||
1049  !freerdp_settings_set_pointer_array(settings, FreeRDP_BitmapCacheV2CellInfo, 1, &cache))
1050  goto out_fail;
1051  cache.numEntries = 2048;
1052  if (!freerdp_settings_set_pointer_array(settings, FreeRDP_BitmapCacheV2CellInfo, 2,
1053  &cache) ||
1054  !freerdp_settings_set_pointer_array(settings, FreeRDP_BitmapCacheV2CellInfo, 4, &cache))
1055  goto out_fail;
1056  cache.numEntries = 4096;
1057  if (!freerdp_settings_set_pointer_array(settings, FreeRDP_BitmapCacheV2CellInfo, 3, &cache))
1058  goto out_fail;
1059  }
1060  if (!freerdp_settings_set_bool(settings, FreeRDP_NoBitmapCompressionHeader, TRUE) ||
1061  !freerdp_settings_set_bool(settings, FreeRDP_RefreshRect, TRUE) ||
1062  !freerdp_settings_set_bool(settings, FreeRDP_SuppressOutput, TRUE) ||
1063  !freerdp_settings_set_uint32(settings, FreeRDP_GlyphSupportLevel, GLYPH_SUPPORT_NONE))
1064  goto out_fail;
1065  settings->GlyphCache = calloc(10, sizeof(GLYPH_CACHE_DEFINITION));
1066 
1067  if (!settings->GlyphCache)
1068  goto out_fail;
1069 
1070  settings->FragCache = calloc(1, sizeof(GLYPH_CACHE_DEFINITION));
1071 
1072  if (!settings->FragCache)
1073  goto out_fail;
1074 
1075  for (size_t x = 0; x < 10; x++)
1076  {
1077  GLYPH_CACHE_DEFINITION cache = { 0 };
1078  cache.cacheEntries = 254;
1079  switch (x)
1080  {
1081  case 0:
1082  case 1:
1083  cache.cacheMaximumCellSize = 4;
1084  break;
1085  case 2:
1086  case 3:
1087  cache.cacheMaximumCellSize = 8;
1088  break;
1089  case 4:
1090  cache.cacheMaximumCellSize = 16;
1091  break;
1092  case 5:
1093  cache.cacheMaximumCellSize = 32;
1094  break;
1095  case 6:
1096  cache.cacheMaximumCellSize = 64;
1097  break;
1098  case 7:
1099  cache.cacheMaximumCellSize = 128;
1100  break;
1101  case 8:
1102  cache.cacheMaximumCellSize = 256;
1103  break;
1104  case 9:
1105  cache.cacheMaximumCellSize = 256;
1106  break;
1107  default:
1108  goto out_fail;
1109  }
1110 
1111  if (!freerdp_settings_set_pointer_array(settings, FreeRDP_GlyphCache, x, &cache))
1112  goto out_fail;
1113  }
1114  {
1115  GLYPH_CACHE_DEFINITION cache = { 0 };
1116  cache.cacheEntries = 256;
1117  cache.cacheMaximumCellSize = 256;
1118  if (!freerdp_settings_set_pointer_array(settings, FreeRDP_FragCache, 0, &cache))
1119  goto out_fail;
1120  }
1121  if (!freerdp_settings_set_uint32(settings, FreeRDP_OffscreenSupportLevel, 0) ||
1122  !freerdp_settings_set_uint32(settings, FreeRDP_OffscreenCacheSize, 7680) ||
1123  !freerdp_settings_set_uint32(settings, FreeRDP_OffscreenCacheEntries, 2000) ||
1124  !freerdp_settings_set_uint32(settings, FreeRDP_DrawNineGridCacheSize, 2560) ||
1125  !freerdp_settings_set_uint32(settings, FreeRDP_DrawNineGridCacheEntries, 256) ||
1126  !freerdp_settings_set_string(settings, FreeRDP_ClientDir, client_dll) ||
1127  !freerdp_settings_get_string(settings, FreeRDP_ClientDir) ||
1128  !freerdp_settings_set_uint32(settings, FreeRDP_RemoteWndSupportLevel,
1129  WINDOW_LEVEL_SUPPORTED | WINDOW_LEVEL_SUPPORTED_EX) ||
1130  !freerdp_settings_set_uint32(settings, FreeRDP_RemoteAppNumIconCaches, 3) ||
1131  !freerdp_settings_set_uint32(settings, FreeRDP_RemoteAppNumIconCacheEntries, 12) ||
1132  !freerdp_settings_set_uint32(settings, FreeRDP_VCChunkSize,
1133  (server && !remote) ? CHANNEL_CHUNK_MAX_LENGTH
1134  : CHANNEL_CHUNK_LENGTH) ||
1135  /* [MS-RDPBCGR] 2.2.7.2.7 Large Pointer Capability Set (TS_LARGE_POINTER_CAPABILITYSET)
1136  requires at least this size */
1137  !freerdp_settings_set_uint32(settings, FreeRDP_MultifragMaxRequestSize,
1138  server ? 0 : 608299) ||
1139  !freerdp_settings_set_bool(settings, FreeRDP_GatewayUseSameCredentials, FALSE) ||
1140  !freerdp_settings_set_bool(settings, FreeRDP_GatewayBypassLocal, FALSE) ||
1141  !freerdp_settings_set_bool(settings, FreeRDP_GatewayRpcTransport, TRUE) ||
1142  !freerdp_settings_set_bool(settings, FreeRDP_GatewayHttpTransport, TRUE) ||
1143  !freerdp_settings_set_bool(settings, FreeRDP_GatewayUdpTransport, TRUE) ||
1144  !freerdp_settings_set_bool(settings, FreeRDP_GatewayHttpUseWebsockets, TRUE) ||
1145  !freerdp_settings_set_bool(settings, FreeRDP_GatewayHttpExtAuthSspiNtlm, FALSE) ||
1146  !freerdp_settings_set_bool(settings, FreeRDP_GatewayArmTransport, FALSE) ||
1147  !freerdp_settings_set_bool(settings, FreeRDP_FastPathInput, TRUE) ||
1148  !freerdp_settings_set_bool(settings, FreeRDP_FastPathOutput, TRUE) ||
1149  !freerdp_settings_set_bool(settings, FreeRDP_LongCredentialsSupported, TRUE) ||
1150  !freerdp_settings_set_uint32(settings, FreeRDP_FrameAcknowledge, 2) ||
1151  !freerdp_settings_set_bool(settings, FreeRDP_MouseMotion, TRUE) ||
1152  !freerdp_settings_set_uint32(settings, FreeRDP_NSCodecColorLossLevel, 3) ||
1153  !freerdp_settings_set_bool(settings, FreeRDP_NSCodecAllowSubsampling, TRUE) ||
1154  !freerdp_settings_set_bool(settings, FreeRDP_NSCodecAllowDynamicColorFidelity, TRUE) ||
1155  !freerdp_settings_set_bool(settings, FreeRDP_AutoReconnectionEnabled, FALSE) ||
1156  !freerdp_settings_set_uint32(settings, FreeRDP_AutoReconnectMaxRetries, 20) ||
1157  !freerdp_settings_set_bool(settings, FreeRDP_GfxThinClient, FALSE) ||
1158  !freerdp_settings_set_bool(settings, FreeRDP_GfxSmallCache, TRUE) ||
1159  !freerdp_settings_set_bool(settings, FreeRDP_GfxProgressive, FALSE) ||
1160  !freerdp_settings_set_bool(settings, FreeRDP_GfxProgressiveV2, FALSE) ||
1161  !freerdp_settings_set_bool(settings, FreeRDP_GfxPlanar, TRUE) ||
1162  !freerdp_settings_set_bool(settings, FreeRDP_GfxH264, FALSE) ||
1163  !freerdp_settings_set_bool(settings, FreeRDP_GfxAVC444, FALSE) ||
1164  !freerdp_settings_set_bool(settings, FreeRDP_GfxSendQoeAck, FALSE))
1165  goto out_fail;
1166  {
1167  ARC_CS_PRIVATE_PACKET cookie = { 0 };
1168  if (!freerdp_settings_set_pointer_len(settings, FreeRDP_ClientAutoReconnectCookie, &cookie,
1169  1))
1170  goto out_fail;
1171  }
1172  {
1173  ARC_SC_PRIVATE_PACKET cookie = { 0 };
1174  if (!freerdp_settings_set_pointer_len(settings, FreeRDP_ServerAutoReconnectCookie, &cookie,
1175  1))
1176  goto out_fail;
1177  }
1178 
1179  settings->ClientTimeZone = (LPTIME_ZONE_INFORMATION)calloc(1, sizeof(TIME_ZONE_INFORMATION));
1180 
1181  if (!settings->ClientTimeZone)
1182  goto out_fail;
1183 
1184  if (!settings->ServerMode)
1185  {
1186  DYNAMIC_TIME_ZONE_INFORMATION dynamic = { 0 };
1187  TIME_ZONE_INFORMATION* tz =
1188  freerdp_settings_get_pointer_writable(settings, FreeRDP_ClientTimeZone);
1189  WINPR_ASSERT(tz);
1190 
1191  GetTimeZoneInformation(tz);
1192  GetDynamicTimeZoneInformation(&dynamic);
1193 
1194  if (!freerdp_settings_set_string_from_utf16N(settings, FreeRDP_DynamicDSTTimeZoneKeyName,
1195  dynamic.TimeZoneKeyName,
1196  ARRAYSIZE(dynamic.TimeZoneKeyName)))
1197  goto out_fail;
1198 
1199  if (!freerdp_settings_set_bool(settings, FreeRDP_DynamicDaylightTimeDisabled,
1200  dynamic.DynamicDaylightTimeDisabled))
1201  goto out_fail;
1202  }
1203 
1204  if (!freerdp_settings_set_bool(settings, FreeRDP_TcpKeepAlive, TRUE) ||
1205  !freerdp_settings_set_uint32(settings, FreeRDP_TcpKeepAliveRetries, 3) ||
1206  !freerdp_settings_set_uint32(settings, FreeRDP_TcpKeepAliveDelay, 5) ||
1207  !freerdp_settings_set_uint32(settings, FreeRDP_TcpKeepAliveInterval, 2) ||
1208  !freerdp_settings_set_uint32(settings, FreeRDP_TcpAckTimeout, 9000) ||
1209  !freerdp_settings_set_uint32(settings, FreeRDP_TcpConnectTimeout, 15000))
1210  goto out_fail;
1211 
1212  if (!freerdp_settings_get_bool(settings, FreeRDP_ServerMode))
1213  {
1214  BOOL rc = FALSE;
1215  char* path = NULL;
1216  if (!freerdp_settings_set_bool(settings, FreeRDP_RedirectClipboard, TRUE))
1217  goto out_fail;
1218  /* these values are used only by the client part */
1219  path = GetKnownPath(KNOWN_PATH_HOME);
1220  rc = freerdp_settings_set_string(settings, FreeRDP_HomePath, path);
1221  free(path);
1222 
1223  if (!rc || !freerdp_settings_get_string(settings, FreeRDP_HomePath))
1224  goto out_fail;
1225 
1226  char* config = freerdp_settings_get_config_path();
1227  rc = freerdp_settings_set_string(settings, FreeRDP_ConfigPath, config);
1228  if (rc)
1229  {
1230  char* action = GetCombinedPath(config, "action.sh");
1231  rc = freerdp_settings_set_string(settings, FreeRDP_ActionScript, action);
1232  free(action);
1233  }
1234 
1235  free(config);
1236  if (!rc)
1237  goto out_fail;
1238  }
1239 
1240  settings_load_hkey_local_machine(settings);
1241 
1242  if (!freerdp_settings_set_bool(settings, FreeRDP_SmartcardLogon, FALSE))
1243  goto out_fail;
1244  if (!freerdp_settings_set_uint32(settings, FreeRDP_TlsSecLevel, 1))
1245  goto out_fail;
1246  settings->OrderSupport = calloc(1, 32);
1247 
1248  if (!freerdp_settings_set_uint16(settings, FreeRDP_TLSMinVersion, TLS1_VERSION))
1249  goto out_fail;
1250  if (!freerdp_settings_set_uint16(settings, FreeRDP_TLSMaxVersion, 0))
1251  goto out_fail;
1252 
1253  if (!settings->OrderSupport)
1254  goto out_fail;
1255 
1256  if (!freerdp_settings_set_default_order_support(settings))
1257  goto out_fail;
1258 
1259  const BOOL enable = freerdp_settings_get_bool(settings, FreeRDP_ServerMode);
1260 
1261  {
1262  const FreeRDP_Settings_Keys_Bool keys[] = { FreeRDP_SupportGraphicsPipeline,
1263  FreeRDP_SupportStatusInfoPdu,
1264  FreeRDP_SupportErrorInfoPdu,
1265  FreeRDP_SupportAsymetricKeys };
1266 
1267  for (size_t x = 0; x < ARRAYSIZE(keys); x++)
1268  {
1269  if (!freerdp_settings_set_bool(settings, keys[x], enable))
1270  goto out_fail;
1271  }
1272  }
1273 
1274  if (!freerdp_settings_set_bool(settings, FreeRDP_SupportDynamicTimeZone, TRUE))
1275  goto out_fail;
1276  if (!freerdp_settings_set_bool(settings, FreeRDP_SupportSkipChannelJoin, TRUE))
1277  goto out_fail;
1278 
1279  return settings;
1280 out_fail:
1281  WINPR_PRAGMA_DIAG_PUSH
1282  WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
1283  freerdp_settings_free(settings);
1284  WINPR_PRAGMA_DIAG_POP
1285  return NULL;
1286 }
FREERDP_API BOOL freerdp_settings_set_string_from_utf16N(rdpSettings *settings, FreeRDP_Settings_Keys_String id, const WCHAR *param, size_t length)
Sets a string settings value. The param is converted to UTF-8 and the copy stored.
FREERDP_API BOOL freerdp_settings_set_pointer_len(rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id, const void *data, size_t len)
Set a pointer to value data.
char * freerdp_settings_get_config_path(void)
return the configuration directory for the library
#define FREERDP_SETTINGS_SERVER_MODE

References FREERDP_SETTINGS_SERVER_MODE.

◆ freerdp_settings_print_diff()

FREERDP_API BOOL freerdp_settings_print_diff ( wLog *  log,
DWORD  level,
const rdpSettings *  src,
const rdpSettings *  other 
)

Dumps the difference between two settings structs to a WLog.

Parameters
logThe logger to write to, must not be NULL.
levelThe WLog level to use for the log entries.
srcA pointer to the settings to dump. May be NULL.
otherA pointer to the settings to dump. May be NULL.
Returns
TRUE if not equal, FALSE otherwise

Definition at line 96 of file settings_str.c.

98 {
99  BOOL rc = FALSE;
100 
101  WINPR_ASSERT(log);
102  WINPR_ASSERT(settings);
103  WINPR_ASSERT(other);
104 
105  for (size_t x = 0; x < ARRAYSIZE(settings_map); x++)
106  {
107  const struct settings_str_entry* cur = &settings_map[x];
108  switch (cur->type)
109  {
110  case FREERDP_SETTINGS_TYPE_BOOL: /* bool */
111  {
112  BOOL sval =
113  freerdp_settings_get_bool(settings, (FreeRDP_Settings_Keys_Bool)cur->id);
114  BOOL cval = freerdp_settings_get_bool(other, (FreeRDP_Settings_Keys_Bool)cur->id);
115  if (sval != cval)
116  {
117  rc = TRUE;
118  WLog_Print(log, level, "%s [BOOL]: %s -> %s", cur->str, sval ? "TRUE" : "FALSE",
119  cval ? "TRUE" : "FALSE");
120  }
121  }
122  break;
123  case FREERDP_SETTINGS_TYPE_UINT16: /* UINT16 */
124  {
125  UINT16 sval =
126  freerdp_settings_get_uint16(settings, (FreeRDP_Settings_Keys_UInt16)cur->id);
127  UINT16 cval =
128  freerdp_settings_get_uint16(other, (FreeRDP_Settings_Keys_UInt16)cur->id);
129  if (sval != cval)
130  {
131  rc = TRUE;
132  WLog_Print(log, level, "%s [UINT16]: %" PRIu16 " -> %" PRIu16, cur->str, sval,
133  cval);
134  }
135  }
136  break;
137  case FREERDP_SETTINGS_TYPE_INT16: /* INT16 */
138  {
139  INT16 sval =
140  freerdp_settings_get_int16(settings, (FreeRDP_Settings_Keys_Int16)cur->id);
141  INT16 cval =
142  freerdp_settings_get_int16(other, (FreeRDP_Settings_Keys_Int16)cur->id);
143  if (sval != cval)
144  {
145  rc = TRUE;
146  WLog_Print(log, level, "%s [INT16]: %" PRId16 " -> %" PRId16, cur->str, sval,
147  cval);
148  }
149  }
150  break;
151  case FREERDP_SETTINGS_TYPE_UINT32: /* UINT32 */
152  {
153  UINT32 sval =
154  freerdp_settings_get_uint32(settings, (FreeRDP_Settings_Keys_UInt32)cur->id);
155  UINT32 cval =
156  freerdp_settings_get_uint32(other, (FreeRDP_Settings_Keys_UInt32)cur->id);
157  if (sval != cval)
158  {
159  rc = TRUE;
160  WLog_Print(log, level, "%s [UINT32]: %" PRIu32 " -> %" PRIu32, cur->str, sval,
161  cval);
162  }
163  }
164  break;
165  case FREERDP_SETTINGS_TYPE_INT32: /* INT32 */
166  {
167  INT32 sval =
168  freerdp_settings_get_int32(settings, (FreeRDP_Settings_Keys_Int32)cur->id);
169  INT32 cval =
170  freerdp_settings_get_int32(other, (FreeRDP_Settings_Keys_Int32)cur->id);
171  if (sval != cval)
172  {
173  rc = TRUE;
174  WLog_Print(log, level, "%s [INT32]: %" PRId32 " -> %" PRId32, cur->str, sval,
175  cval);
176  }
177  }
178  break;
179  case FREERDP_SETTINGS_TYPE_UINT64: /* UINT64 */
180  {
181  UINT64 sval =
182  freerdp_settings_get_uint64(settings, (FreeRDP_Settings_Keys_UInt64)cur->id);
183  UINT64 cval =
184  freerdp_settings_get_uint64(other, (FreeRDP_Settings_Keys_UInt64)cur->id);
185  if (sval != cval)
186  {
187  rc = TRUE;
188  WLog_Print(log, level, "%s [UINT64]: %" PRIu64 " -> %" PRIu64, cur->str, sval,
189  cval);
190  }
191  }
192  break;
193  case FREERDP_SETTINGS_TYPE_INT64: /* INT64 */
194  {
195  INT64 sval =
196  freerdp_settings_get_int64(settings, (FreeRDP_Settings_Keys_Int64)cur->id);
197  INT64 cval =
198  freerdp_settings_get_int64(other, (FreeRDP_Settings_Keys_Int64)cur->id);
199  if (sval != cval)
200  {
201  rc = TRUE;
202  WLog_Print(log, level, "%s [INT64]: %" PRId64 " -> %" PRId64, cur->str, sval,
203  cval);
204  }
205  }
206  break;
207  case FREERDP_SETTINGS_TYPE_STRING: /* strings */
208  {
209  const char* sval =
210  freerdp_settings_get_string(settings, (FreeRDP_Settings_Keys_String)cur->id);
211  const char* cval =
212  freerdp_settings_get_string(other, (FreeRDP_Settings_Keys_String)cur->id);
213  if (sval != cval)
214  {
215  if (!sval || !cval || (strcmp(sval, cval) != 0))
216  {
217  rc = TRUE;
218  WLog_Print(log, level, "%s [STRING]: '%s' -> '%s'", cur->str, sval, cval);
219  }
220  }
221  }
222  break;
223  case FREERDP_SETTINGS_TYPE_POINTER: /* pointer */
224  {
225  const void* sval =
226  freerdp_settings_get_pointer(settings, (FreeRDP_Settings_Keys_Pointer)cur->id);
227  const void* cval =
228  freerdp_settings_get_pointer(other, (FreeRDP_Settings_Keys_Pointer)cur->id);
229  if (sval != cval)
230  {
231  if ((sval && !cval) || (!sval && cval))
232  {
233  rc = TRUE;
234  WLog_Print(log, level, "%s [POINTER]: '%p' -> '%p'", cur->str, sval, cval);
235  }
236  }
237  }
238  break;
239  default:
240  break;
241  }
242  }
243  return rc;
244 }

References freerdp_settings_get_bool(), freerdp_settings_get_int16(), freerdp_settings_get_int32(), freerdp_settings_get_int64(), freerdp_settings_get_pointer(), freerdp_settings_get_string(), freerdp_settings_get_uint16(), freerdp_settings_get_uint32(), and freerdp_settings_get_uint64().

Here is the call graph for this function:

◆ freerdp_settings_set_bool()

FREERDP_API BOOL freerdp_settings_set_bool ( rdpSettings *  settings,
FreeRDP_Settings_Keys_Bool  id,
BOOL  param 
)

Sets a BOOL settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
paramThe value to set.
Returns
TRUE for success, FALSE for failure

Definition at line 651 of file settings_getters.c.

652 {
653  union
654  {
655  void* v;
656  const void* cv;
657  BOOL c;
658  const BOOL cc;
659  } cnv;
660  WINPR_ASSERT(settings);
661 
662  cnv.c = val;
663 
664  switch (id)
665  {
666  case FreeRDP_AadSecurity:
667  settings->AadSecurity = cnv.c;
668  break;
669 
670  case FreeRDP_AllowCacheWaitingList:
671  settings->AllowCacheWaitingList = cnv.c;
672  break;
673 
674  case FreeRDP_AllowDesktopComposition:
675  settings->AllowDesktopComposition = cnv.c;
676  break;
677 
678  case FreeRDP_AllowFontSmoothing:
679  settings->AllowFontSmoothing = cnv.c;
680  break;
681 
682  case FreeRDP_AllowUnanouncedOrdersFromServer:
683  settings->AllowUnanouncedOrdersFromServer = cnv.c;
684  break;
685 
686  case FreeRDP_AltSecFrameMarkerSupport:
687  settings->AltSecFrameMarkerSupport = cnv.c;
688  break;
689 
690  case FreeRDP_AsyncChannels:
691  settings->AsyncChannels = cnv.c;
692  break;
693 
694  case FreeRDP_AsyncUpdate:
695  settings->AsyncUpdate = cnv.c;
696  break;
697 
698  case FreeRDP_AudioCapture:
699  settings->AudioCapture = cnv.c;
700  break;
701 
702  case FreeRDP_AudioPlayback:
703  settings->AudioPlayback = cnv.c;
704  break;
705 
706  case FreeRDP_Authentication:
707  settings->Authentication = cnv.c;
708  break;
709 
710  case FreeRDP_AuthenticationOnly:
711  settings->AuthenticationOnly = cnv.c;
712  break;
713 
714  case FreeRDP_AutoAcceptCertificate:
715  settings->AutoAcceptCertificate = cnv.c;
716  break;
717 
718  case FreeRDP_AutoDenyCertificate:
719  settings->AutoDenyCertificate = cnv.c;
720  break;
721 
722  case FreeRDP_AutoLogonEnabled:
723  settings->AutoLogonEnabled = cnv.c;
724  break;
725 
726  case FreeRDP_AutoReconnectionEnabled:
727  settings->AutoReconnectionEnabled = cnv.c;
728  break;
729 
730  case FreeRDP_AutoReconnectionPacketSupported:
731  settings->AutoReconnectionPacketSupported = cnv.c;
732  break;
733 
734  case FreeRDP_BitmapCacheEnabled:
735  settings->BitmapCacheEnabled = cnv.c;
736  break;
737 
738  case FreeRDP_BitmapCachePersistEnabled:
739  settings->BitmapCachePersistEnabled = cnv.c;
740  break;
741 
742  case FreeRDP_BitmapCacheV3Enabled:
743  settings->BitmapCacheV3Enabled = cnv.c;
744  break;
745 
746  case FreeRDP_BitmapCompressionDisabled:
747  settings->BitmapCompressionDisabled = cnv.c;
748  break;
749 
750  case FreeRDP_CertificateCallbackPreferPEM:
751  settings->CertificateCallbackPreferPEM = cnv.c;
752  break;
753 
754  case FreeRDP_CompressionEnabled:
755  settings->CompressionEnabled = cnv.c;
756  break;
757 
758  case FreeRDP_ConnectChildSession:
759  settings->ConnectChildSession = cnv.c;
760  break;
761 
762  case FreeRDP_ConsoleSession:
763  settings->ConsoleSession = cnv.c;
764  break;
765 
766  case FreeRDP_CredentialsFromStdin:
767  settings->CredentialsFromStdin = cnv.c;
768  break;
769 
770  case FreeRDP_DeactivateClientDecoding:
771  settings->DeactivateClientDecoding = cnv.c;
772  break;
773 
774  case FreeRDP_Decorations:
775  settings->Decorations = cnv.c;
776  break;
777 
778  case FreeRDP_DesktopResize:
779  settings->DesktopResize = cnv.c;
780  break;
781 
782  case FreeRDP_DeviceRedirection:
783  settings->DeviceRedirection = cnv.c;
784  break;
785 
786  case FreeRDP_DisableCredentialsDelegation:
787  settings->DisableCredentialsDelegation = cnv.c;
788  break;
789 
790  case FreeRDP_DisableCtrlAltDel:
791  settings->DisableCtrlAltDel = cnv.c;
792  break;
793 
794  case FreeRDP_DisableCursorBlinking:
795  settings->DisableCursorBlinking = cnv.c;
796  break;
797 
798  case FreeRDP_DisableCursorShadow:
799  settings->DisableCursorShadow = cnv.c;
800  break;
801 
802  case FreeRDP_DisableFullWindowDrag:
803  settings->DisableFullWindowDrag = cnv.c;
804  break;
805 
806  case FreeRDP_DisableMenuAnims:
807  settings->DisableMenuAnims = cnv.c;
808  break;
809 
810  case FreeRDP_DisableRemoteAppCapsCheck:
811  settings->DisableRemoteAppCapsCheck = cnv.c;
812  break;
813 
814  case FreeRDP_DisableThemes:
815  settings->DisableThemes = cnv.c;
816  break;
817 
818  case FreeRDP_DisableWallpaper:
819  settings->DisableWallpaper = cnv.c;
820  break;
821 
822  case FreeRDP_DrawAllowColorSubsampling:
823  settings->DrawAllowColorSubsampling = cnv.c;
824  break;
825 
826  case FreeRDP_DrawAllowDynamicColorFidelity:
827  settings->DrawAllowDynamicColorFidelity = cnv.c;
828  break;
829 
830  case FreeRDP_DrawAllowSkipAlpha:
831  settings->DrawAllowSkipAlpha = cnv.c;
832  break;
833 
834  case FreeRDP_DrawGdiPlusCacheEnabled:
835  settings->DrawGdiPlusCacheEnabled = cnv.c;
836  break;
837 
838  case FreeRDP_DrawGdiPlusEnabled:
839  settings->DrawGdiPlusEnabled = cnv.c;
840  break;
841 
842  case FreeRDP_DrawNineGridEnabled:
843  settings->DrawNineGridEnabled = cnv.c;
844  break;
845 
846  case FreeRDP_DumpRemoteFx:
847  settings->DumpRemoteFx = cnv.c;
848  break;
849 
850  case FreeRDP_DynamicDaylightTimeDisabled:
851  settings->DynamicDaylightTimeDisabled = cnv.c;
852  break;
853 
854  case FreeRDP_DynamicResolutionUpdate:
855  settings->DynamicResolutionUpdate = cnv.c;
856  break;
857 
858  case FreeRDP_EmbeddedWindow:
859  settings->EmbeddedWindow = cnv.c;
860  break;
861 
862  case FreeRDP_EnableWindowsKey:
863  settings->EnableWindowsKey = cnv.c;
864  break;
865 
866  case FreeRDP_EncomspVirtualChannel:
867  settings->EncomspVirtualChannel = cnv.c;
868  break;
869 
870  case FreeRDP_ExtSecurity:
871  settings->ExtSecurity = cnv.c;
872  break;
873 
874  case FreeRDP_ExternalCertificateManagement:
875  settings->ExternalCertificateManagement = cnv.c;
876  break;
877 
878  case FreeRDP_FIPSMode:
879  settings->FIPSMode = cnv.c;
880  break;
881 
882  case FreeRDP_FastPathInput:
883  settings->FastPathInput = cnv.c;
884  break;
885 
886  case FreeRDP_FastPathOutput:
887  settings->FastPathOutput = cnv.c;
888  break;
889 
890  case FreeRDP_ForceEncryptedCsPdu:
891  settings->ForceEncryptedCsPdu = cnv.c;
892  break;
893 
894  case FreeRDP_ForceMultimon:
895  settings->ForceMultimon = cnv.c;
896  break;
897 
898  case FreeRDP_FrameMarkerCommandEnabled:
899  settings->FrameMarkerCommandEnabled = cnv.c;
900  break;
901 
902  case FreeRDP_Fullscreen:
903  settings->Fullscreen = cnv.c;
904  break;
905 
906  case FreeRDP_GatewayArmTransport:
907  settings->GatewayArmTransport = cnv.c;
908  break;
909 
910  case FreeRDP_GatewayAvdUseTenantid:
911  settings->GatewayAvdUseTenantid = cnv.c;
912  break;
913 
914  case FreeRDP_GatewayBypassLocal:
915  settings->GatewayBypassLocal = cnv.c;
916  break;
917 
918  case FreeRDP_GatewayEnabled:
919  settings->GatewayEnabled = cnv.c;
920  break;
921 
922  case FreeRDP_GatewayHttpExtAuthSspiNtlm:
923  settings->GatewayHttpExtAuthSspiNtlm = cnv.c;
924  break;
925 
926  case FreeRDP_GatewayHttpTransport:
927  settings->GatewayHttpTransport = cnv.c;
928  break;
929 
930  case FreeRDP_GatewayHttpUseWebsockets:
931  settings->GatewayHttpUseWebsockets = cnv.c;
932  break;
933 
934  case FreeRDP_GatewayIgnoreRedirectionPolicy:
935  settings->GatewayIgnoreRedirectionPolicy = cnv.c;
936  break;
937 
938  case FreeRDP_GatewayRpcTransport:
939  settings->GatewayRpcTransport = cnv.c;
940  break;
941 
942  case FreeRDP_GatewayUdpTransport:
943  settings->GatewayUdpTransport = cnv.c;
944  break;
945 
946  case FreeRDP_GatewayUseSameCredentials:
947  settings->GatewayUseSameCredentials = cnv.c;
948  break;
949 
950  case FreeRDP_GfxAVC444:
951  settings->GfxAVC444 = cnv.c;
952  break;
953 
954  case FreeRDP_GfxAVC444v2:
955  settings->GfxAVC444v2 = cnv.c;
956  break;
957 
958  case FreeRDP_GfxH264:
959  settings->GfxH264 = cnv.c;
960  break;
961 
962  case FreeRDP_GfxPlanar:
963  settings->GfxPlanar = cnv.c;
964  break;
965 
966  case FreeRDP_GfxProgressive:
967  settings->GfxProgressive = cnv.c;
968  break;
969 
970  case FreeRDP_GfxProgressiveV2:
971  settings->GfxProgressiveV2 = cnv.c;
972  break;
973 
974  case FreeRDP_GfxSendQoeAck:
975  settings->GfxSendQoeAck = cnv.c;
976  break;
977 
978  case FreeRDP_GfxSmallCache:
979  settings->GfxSmallCache = cnv.c;
980  break;
981 
982  case FreeRDP_GfxSuspendFrameAck:
983  settings->GfxSuspendFrameAck = cnv.c;
984  break;
985 
986  case FreeRDP_GfxThinClient:
987  settings->GfxThinClient = cnv.c;
988  break;
989 
990  case FreeRDP_GrabKeyboard:
991  settings->GrabKeyboard = cnv.c;
992  break;
993 
994  case FreeRDP_GrabMouse:
995  settings->GrabMouse = cnv.c;
996  break;
997 
998  case FreeRDP_HasExtendedMouseEvent:
999  settings->HasExtendedMouseEvent = cnv.c;
1000  break;
1001 
1002  case FreeRDP_HasHorizontalWheel:
1003  settings->HasHorizontalWheel = cnv.c;
1004  break;
1005 
1006  case FreeRDP_HasMonitorAttributes:
1007  settings->HasMonitorAttributes = cnv.c;
1008  break;
1009 
1010  case FreeRDP_HasQoeEvent:
1011  settings->HasQoeEvent = cnv.c;
1012  break;
1013 
1014  case FreeRDP_HasRelativeMouseEvent:
1015  settings->HasRelativeMouseEvent = cnv.c;
1016  break;
1017 
1018  case FreeRDP_HiDefRemoteApp:
1019  settings->HiDefRemoteApp = cnv.c;
1020  break;
1021 
1022  case FreeRDP_IPv6Enabled:
1023  settings->IPv6Enabled = cnv.c;
1024  break;
1025 
1026  case FreeRDP_IgnoreCertificate:
1027  settings->IgnoreCertificate = cnv.c;
1028  break;
1029 
1030  case FreeRDP_IgnoreInvalidDevices:
1031  settings->IgnoreInvalidDevices = cnv.c;
1032  break;
1033 
1034  case FreeRDP_JpegCodec:
1035  settings->JpegCodec = cnv.c;
1036  break;
1037 
1038  case FreeRDP_KerberosRdgIsProxy:
1039  settings->KerberosRdgIsProxy = cnv.c;
1040  break;
1041 
1042  case FreeRDP_ListMonitors:
1043  settings->ListMonitors = cnv.c;
1044  break;
1045 
1046  case FreeRDP_LocalConnection:
1047  settings->LocalConnection = cnv.c;
1048  break;
1049 
1050  case FreeRDP_LogonErrors:
1051  settings->LogonErrors = cnv.c;
1052  break;
1053 
1054  case FreeRDP_LogonNotify:
1055  settings->LogonNotify = cnv.c;
1056  break;
1057 
1058  case FreeRDP_LongCredentialsSupported:
1059  settings->LongCredentialsSupported = cnv.c;
1060  break;
1061 
1062  case FreeRDP_LyncRdpMode:
1063  settings->LyncRdpMode = cnv.c;
1064  break;
1065 
1066  case FreeRDP_MaximizeShell:
1067  settings->MaximizeShell = cnv.c;
1068  break;
1069 
1070  case FreeRDP_MouseAttached:
1071  settings->MouseAttached = cnv.c;
1072  break;
1073 
1074  case FreeRDP_MouseHasWheel:
1075  settings->MouseHasWheel = cnv.c;
1076  break;
1077 
1078  case FreeRDP_MouseMotion:
1079  settings->MouseMotion = cnv.c;
1080  break;
1081 
1082  case FreeRDP_MouseUseRelativeMove:
1083  settings->MouseUseRelativeMove = cnv.c;
1084  break;
1085 
1086  case FreeRDP_MstscCookieMode:
1087  settings->MstscCookieMode = cnv.c;
1088  break;
1089 
1090  case FreeRDP_MultiTouchGestures:
1091  settings->MultiTouchGestures = cnv.c;
1092  break;
1093 
1094  case FreeRDP_MultiTouchInput:
1095  settings->MultiTouchInput = cnv.c;
1096  break;
1097 
1098  case FreeRDP_NSCodec:
1099  settings->NSCodec = cnv.c;
1100  break;
1101 
1102  case FreeRDP_NSCodecAllowDynamicColorFidelity:
1103  settings->NSCodecAllowDynamicColorFidelity = cnv.c;
1104  break;
1105 
1106  case FreeRDP_NSCodecAllowSubsampling:
1107  settings->NSCodecAllowSubsampling = cnv.c;
1108  break;
1109 
1110  case FreeRDP_NegotiateSecurityLayer:
1111  settings->NegotiateSecurityLayer = cnv.c;
1112  break;
1113 
1114  case FreeRDP_NetworkAutoDetect:
1115  settings->NetworkAutoDetect = cnv.c;
1116  break;
1117 
1118  case FreeRDP_NlaSecurity:
1119  settings->NlaSecurity = cnv.c;
1120  break;
1121 
1122  case FreeRDP_NoBitmapCompressionHeader:
1123  settings->NoBitmapCompressionHeader = cnv.c;
1124  break;
1125 
1126  case FreeRDP_OldLicenseBehaviour:
1127  settings->OldLicenseBehaviour = cnv.c;
1128  break;
1129 
1130  case FreeRDP_PasswordIsSmartcardPin:
1131  settings->PasswordIsSmartcardPin = cnv.c;
1132  break;
1133 
1134  case FreeRDP_PercentScreenUseHeight:
1135  settings->PercentScreenUseHeight = cnv.c;
1136  break;
1137 
1138  case FreeRDP_PercentScreenUseWidth:
1139  settings->PercentScreenUseWidth = cnv.c;
1140  break;
1141 
1142  case FreeRDP_PlayRemoteFx:
1143  settings->PlayRemoteFx = cnv.c;
1144  break;
1145 
1146  case FreeRDP_PreferIPv6OverIPv4:
1147  settings->PreferIPv6OverIPv4 = cnv.c;
1148  break;
1149 
1150  case FreeRDP_PrintReconnectCookie:
1151  settings->PrintReconnectCookie = cnv.c;
1152  break;
1153 
1154  case FreeRDP_PromptForCredentials:
1155  settings->PromptForCredentials = cnv.c;
1156  break;
1157 
1158  case FreeRDP_RdpSecurity:
1159  settings->RdpSecurity = cnv.c;
1160  break;
1161 
1162  case FreeRDP_RdstlsSecurity:
1163  settings->RdstlsSecurity = cnv.c;
1164  break;
1165 
1166  case FreeRDP_RedirectClipboard:
1167  settings->RedirectClipboard = cnv.c;
1168  break;
1169 
1170  case FreeRDP_RedirectDrives:
1171  settings->RedirectDrives = cnv.c;
1172  break;
1173 
1174  case FreeRDP_RedirectHomeDrive:
1175  settings->RedirectHomeDrive = cnv.c;
1176  break;
1177 
1178  case FreeRDP_RedirectParallelPorts:
1179  settings->RedirectParallelPorts = cnv.c;
1180  break;
1181 
1182  case FreeRDP_RedirectPrinters:
1183  settings->RedirectPrinters = cnv.c;
1184  break;
1185 
1186  case FreeRDP_RedirectSerialPorts:
1187  settings->RedirectSerialPorts = cnv.c;
1188  break;
1189 
1190  case FreeRDP_RedirectSmartCards:
1191  settings->RedirectSmartCards = cnv.c;
1192  break;
1193 
1194  case FreeRDP_RedirectWebAuthN:
1195  settings->RedirectWebAuthN = cnv.c;
1196  break;
1197 
1198  case FreeRDP_RefreshRect:
1199  settings->RefreshRect = cnv.c;
1200  break;
1201 
1202  case FreeRDP_RemdeskVirtualChannel:
1203  settings->RemdeskVirtualChannel = cnv.c;
1204  break;
1205 
1206  case FreeRDP_RemoteAppLanguageBarSupported:
1207  settings->RemoteAppLanguageBarSupported = cnv.c;
1208  break;
1209 
1210  case FreeRDP_RemoteApplicationMode:
1211  settings->RemoteApplicationMode = cnv.c;
1212  break;
1213 
1214  case FreeRDP_RemoteAssistanceMode:
1215  settings->RemoteAssistanceMode = cnv.c;
1216  break;
1217 
1218  case FreeRDP_RemoteAssistanceRequestControl:
1219  settings->RemoteAssistanceRequestControl = cnv.c;
1220  break;
1221 
1222  case FreeRDP_RemoteConsoleAudio:
1223  settings->RemoteConsoleAudio = cnv.c;
1224  break;
1225 
1226  case FreeRDP_RemoteCredentialGuard:
1227  settings->RemoteCredentialGuard = cnv.c;
1228  break;
1229 
1230  case FreeRDP_RemoteFxCodec:
1231  settings->RemoteFxCodec = cnv.c;
1232  break;
1233 
1234  case FreeRDP_RemoteFxImageCodec:
1235  settings->RemoteFxImageCodec = cnv.c;
1236  break;
1237 
1238  case FreeRDP_RemoteFxOnly:
1239  settings->RemoteFxOnly = cnv.c;
1240  break;
1241 
1242  case FreeRDP_RestrictedAdminModeRequired:
1243  settings->RestrictedAdminModeRequired = cnv.c;
1244  break;
1245 
1246  case FreeRDP_SaltedChecksum:
1247  settings->SaltedChecksum = cnv.c;
1248  break;
1249 
1250  case FreeRDP_SendPreconnectionPdu:
1251  settings->SendPreconnectionPdu = cnv.c;
1252  break;
1253 
1254  case FreeRDP_ServerLicenseRequired:
1255  settings->ServerLicenseRequired = cnv.c;
1256  break;
1257 
1258  case FreeRDP_ServerMode:
1259  settings->ServerMode = cnv.c;
1260  break;
1261 
1262  case FreeRDP_SmartSizing:
1263  settings->SmartSizing = cnv.c;
1264  break;
1265 
1266  case FreeRDP_SmartcardEmulation:
1267  settings->SmartcardEmulation = cnv.c;
1268  break;
1269 
1270  case FreeRDP_SmartcardLogon:
1271  settings->SmartcardLogon = cnv.c;
1272  break;
1273 
1274  case FreeRDP_SoftwareGdi:
1275  settings->SoftwareGdi = cnv.c;
1276  break;
1277 
1278  case FreeRDP_SoundBeepsEnabled:
1279  settings->SoundBeepsEnabled = cnv.c;
1280  break;
1281 
1282  case FreeRDP_SpanMonitors:
1283  settings->SpanMonitors = cnv.c;
1284  break;
1285 
1286  case FreeRDP_SupportAsymetricKeys:
1287  settings->SupportAsymetricKeys = cnv.c;
1288  break;
1289 
1290  case FreeRDP_SupportDisplayControl:
1291  settings->SupportDisplayControl = cnv.c;
1292  break;
1293 
1294  case FreeRDP_SupportDynamicChannels:
1295  settings->SupportDynamicChannels = cnv.c;
1296  break;
1297 
1298  case FreeRDP_SupportDynamicTimeZone:
1299  settings->SupportDynamicTimeZone = cnv.c;
1300  break;
1301 
1302  case FreeRDP_SupportEchoChannel:
1303  settings->SupportEchoChannel = cnv.c;
1304  break;
1305 
1306  case FreeRDP_SupportEdgeActionV1:
1307  settings->SupportEdgeActionV1 = cnv.c;
1308  break;
1309 
1310  case FreeRDP_SupportEdgeActionV2:
1311  settings->SupportEdgeActionV2 = cnv.c;
1312  break;
1313 
1314  case FreeRDP_SupportErrorInfoPdu:
1315  settings->SupportErrorInfoPdu = cnv.c;
1316  break;
1317 
1318  case FreeRDP_SupportGeometryTracking:
1319  settings->SupportGeometryTracking = cnv.c;
1320  break;
1321 
1322  case FreeRDP_SupportGraphicsPipeline:
1323  settings->SupportGraphicsPipeline = cnv.c;
1324  break;
1325 
1326  case FreeRDP_SupportHeartbeatPdu:
1327  settings->SupportHeartbeatPdu = cnv.c;
1328  break;
1329 
1330  case FreeRDP_SupportMonitorLayoutPdu:
1331  settings->SupportMonitorLayoutPdu = cnv.c;
1332  break;
1333 
1334  case FreeRDP_SupportMultitransport:
1335  settings->SupportMultitransport = cnv.c;
1336  break;
1337 
1338  case FreeRDP_SupportSSHAgentChannel:
1339  settings->SupportSSHAgentChannel = cnv.c;
1340  break;
1341 
1342  case FreeRDP_SupportSkipChannelJoin:
1343  settings->SupportSkipChannelJoin = cnv.c;
1344  break;
1345 
1346  case FreeRDP_SupportStatusInfoPdu:
1347  settings->SupportStatusInfoPdu = cnv.c;
1348  break;
1349 
1350  case FreeRDP_SupportVideoOptimized:
1351  settings->SupportVideoOptimized = cnv.c;
1352  break;
1353 
1354  case FreeRDP_SuppressOutput:
1355  settings->SuppressOutput = cnv.c;
1356  break;
1357 
1358  case FreeRDP_SurfaceCommandsEnabled:
1359  settings->SurfaceCommandsEnabled = cnv.c;
1360  break;
1361 
1362  case FreeRDP_SurfaceFrameMarkerEnabled:
1363  settings->SurfaceFrameMarkerEnabled = cnv.c;
1364  break;
1365 
1366  case FreeRDP_SuspendInput:
1367  settings->SuspendInput = cnv.c;
1368  break;
1369 
1370  case FreeRDP_SynchronousDynamicChannels:
1371  settings->SynchronousDynamicChannels = cnv.c;
1372  break;
1373 
1374  case FreeRDP_SynchronousStaticChannels:
1375  settings->SynchronousStaticChannels = cnv.c;
1376  break;
1377 
1378  case FreeRDP_TcpKeepAlive:
1379  settings->TcpKeepAlive = cnv.c;
1380  break;
1381 
1382  case FreeRDP_TlsSecurity:
1383  settings->TlsSecurity = cnv.c;
1384  break;
1385 
1386  case FreeRDP_ToggleFullscreen:
1387  settings->ToggleFullscreen = cnv.c;
1388  break;
1389 
1390  case FreeRDP_TransportDump:
1391  settings->TransportDump = cnv.c;
1392  break;
1393 
1394  case FreeRDP_TransportDumpReplay:
1395  settings->TransportDumpReplay = cnv.c;
1396  break;
1397 
1398  case FreeRDP_TransportDumpReplayNodelay:
1399  settings->TransportDumpReplayNodelay = cnv.c;
1400  break;
1401 
1402  case FreeRDP_UnicodeInput:
1403  settings->UnicodeInput = cnv.c;
1404  break;
1405 
1406  case FreeRDP_UnmapButtons:
1407  settings->UnmapButtons = cnv.c;
1408  break;
1409 
1410  case FreeRDP_UseCommonStdioCallbacks:
1411  settings->UseCommonStdioCallbacks = cnv.c;
1412  break;
1413 
1414  case FreeRDP_UseMultimon:
1415  settings->UseMultimon = cnv.c;
1416  break;
1417 
1418  case FreeRDP_UseRdpSecurityLayer:
1419  settings->UseRdpSecurityLayer = cnv.c;
1420  break;
1421 
1422  case FreeRDP_UsingSavedCredentials:
1423  settings->UsingSavedCredentials = cnv.c;
1424  break;
1425 
1426  case FreeRDP_VideoDisable:
1427  settings->VideoDisable = cnv.c;
1428  break;
1429 
1430  case FreeRDP_VmConnectMode:
1431  settings->VmConnectMode = cnv.c;
1432  break;
1433 
1434  case FreeRDP_WaitForOutputBufferFlush:
1435  settings->WaitForOutputBufferFlush = cnv.c;
1436  break;
1437 
1438  case FreeRDP_Workarea:
1439  settings->Workarea = cnv.c;
1440  break;
1441 
1442  default:
1443  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
1446  return FALSE;
1447  }
1448  return TRUE;
1449 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_int16()

FREERDP_API BOOL freerdp_settings_set_int16 ( rdpSettings *  settings,
FreeRDP_Settings_Keys_Int16  id,
INT16  param 
)

Sets a INT16 settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
paramThe value to set.
Returns
TRUE for success, FALSE for failure

Definition at line 1596 of file settings_getters.c.

1597 {
1598  union
1599  {
1600  void* v;
1601  const void* cv;
1602  INT16 c;
1603  const INT16 cc;
1604  } cnv;
1605  WINPR_ASSERT(settings);
1606 
1607  cnv.c = val;
1608 
1609  switch (id)
1610  {
1611  default:
1612  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
1615  return FALSE;
1616  }
1617  return TRUE;
1618 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_int32()

FREERDP_API BOOL freerdp_settings_set_int32 ( rdpSettings *  settings,
FreeRDP_Settings_Keys_Int32  id,
INT32  param 
)

Sets a INT32 settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
paramThe value to set.
Returns
TRUE for success, FALSE for failure

Definition at line 2562 of file settings_getters.c.

2563 {
2564  union
2565  {
2566  void* v;
2567  const void* cv;
2568  INT32 c;
2569  const INT32 cc;
2570  } cnv;
2571  WINPR_ASSERT(settings);
2572 
2573  cnv.c = val;
2574 
2575  switch (id)
2576  {
2577  case FreeRDP_XPan:
2578  settings->XPan = cnv.c;
2579  break;
2580 
2581  case FreeRDP_YPan:
2582  settings->YPan = cnv.c;
2583  break;
2584 
2585  default:
2586  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2589  return FALSE;
2590  }
2591  return TRUE;
2592 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_int64()

FREERDP_API BOOL freerdp_settings_set_int64 ( rdpSettings *  settings,
FreeRDP_Settings_Keys_Int64  id,
INT64  param 
)

Sets a INT64 settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
paramThe value to set.
Returns
TRUE for success, FALSE for failure

Definition at line 2655 of file settings_getters.c.

2656 {
2657  union
2658  {
2659  void* v;
2660  const void* cv;
2661  INT64 c;
2662  const INT64 cc;
2663  } cnv;
2664  WINPR_ASSERT(settings);
2665 
2666  cnv.c = val;
2667 
2668  switch (id)
2669  {
2670  default:
2671  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2674  return FALSE;
2675  }
2676  return TRUE;
2677 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_pointer()

FREERDP_API BOOL freerdp_settings_set_pointer ( rdpSettings *  settings,
FreeRDP_Settings_Keys_Pointer  id,
const void *  data 
)

Set a pointer to value data.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to update
dataThe data to set (direct update, no copy created, previous value overwritten)
Returns
TRUE for success, FALSE for failure

Definition at line 4089 of file settings_getters.c.

4091 {
4092  union
4093  {
4094  void* v;
4095  const void* cv;
4096  } cnv;
4097  WINPR_ASSERT(settings);
4098 
4099  cnv.cv = val;
4100 
4101  switch (id)
4102  {
4103  case FreeRDP_BitmapCacheV2CellInfo:
4104  settings->BitmapCacheV2CellInfo = (BITMAP_CACHE_V2_CELL_INFO*)cnv.v;
4105  break;
4106 
4107  case FreeRDP_ChannelDefArray:
4108  settings->ChannelDefArray = (CHANNEL_DEF*)cnv.v;
4109  break;
4110 
4111  case FreeRDP_ClientAutoReconnectCookie:
4112  settings->ClientAutoReconnectCookie = (ARC_CS_PRIVATE_PACKET*)cnv.v;
4113  break;
4114 
4115  case FreeRDP_ClientRandom:
4116  settings->ClientRandom = (BYTE*)cnv.v;
4117  break;
4118 
4119  case FreeRDP_ClientTimeZone:
4120  settings->ClientTimeZone = (TIME_ZONE_INFORMATION*)cnv.v;
4121  break;
4122 
4123  case FreeRDP_DeviceArray:
4124  settings->DeviceArray = (RDPDR_DEVICE**)cnv.v;
4125  break;
4126 
4127  case FreeRDP_DynamicChannelArray:
4128  settings->DynamicChannelArray = (ADDIN_ARGV**)cnv.v;
4129  break;
4130 
4131  case FreeRDP_FragCache:
4132  settings->FragCache = (GLYPH_CACHE_DEFINITION*)cnv.v;
4133  break;
4134 
4135  case FreeRDP_GlyphCache:
4136  settings->GlyphCache = (GLYPH_CACHE_DEFINITION*)cnv.v;
4137  break;
4138 
4139  case FreeRDP_LoadBalanceInfo:
4140  settings->LoadBalanceInfo = (BYTE*)cnv.v;
4141  break;
4142 
4143  case FreeRDP_MonitorDefArray:
4144  settings->MonitorDefArray = (rdpMonitor*)cnv.v;
4145  break;
4146 
4147  case FreeRDP_MonitorIds:
4148  settings->MonitorIds = (UINT32*)cnv.v;
4149  break;
4150 
4151  case FreeRDP_OrderSupport:
4152  settings->OrderSupport = (BYTE*)cnv.v;
4153  break;
4154 
4155  case FreeRDP_Password51:
4156  settings->Password51 = (BYTE*)cnv.v;
4157  break;
4158 
4159  case FreeRDP_RdpServerCertificate:
4160  settings->RdpServerCertificate = (rdpCertificate*)cnv.v;
4161  break;
4162 
4163  case FreeRDP_RdpServerRsaKey:
4164  settings->RdpServerRsaKey = (rdpPrivateKey*)cnv.v;
4165  break;
4166 
4167  case FreeRDP_ReceivedCapabilities:
4168  settings->ReceivedCapabilities = (BYTE*)cnv.v;
4169  break;
4170 
4171  case FreeRDP_ReceivedCapabilityData:
4172  settings->ReceivedCapabilityData = (BYTE**)cnv.v;
4173  break;
4174 
4175  case FreeRDP_ReceivedCapabilityDataSizes:
4176  settings->ReceivedCapabilityDataSizes = (UINT32*)cnv.v;
4177  break;
4178 
4179  case FreeRDP_RedirectionGuid:
4180  settings->RedirectionGuid = (BYTE*)cnv.v;
4181  break;
4182 
4183  case FreeRDP_RedirectionPassword:
4184  settings->RedirectionPassword = (BYTE*)cnv.v;
4185  break;
4186 
4187  case FreeRDP_RedirectionTargetCertificate:
4188  settings->RedirectionTargetCertificate = (rdpCertificate*)cnv.v;
4189  break;
4190 
4191  case FreeRDP_RedirectionTsvUrl:
4192  settings->RedirectionTsvUrl = (BYTE*)cnv.v;
4193  break;
4194 
4195  case FreeRDP_ServerAutoReconnectCookie:
4196  settings->ServerAutoReconnectCookie = (ARC_SC_PRIVATE_PACKET*)cnv.v;
4197  break;
4198 
4199  case FreeRDP_ServerCertificate:
4200  settings->ServerCertificate = (BYTE*)cnv.v;
4201  break;
4202 
4203  case FreeRDP_ServerLicenseProductIssuers:
4204  settings->ServerLicenseProductIssuers = (char**)cnv.v;
4205  break;
4206 
4207  case FreeRDP_ServerRandom:
4208  settings->ServerRandom = (BYTE*)cnv.v;
4209  break;
4210 
4211  case FreeRDP_StaticChannelArray:
4212  settings->StaticChannelArray = (ADDIN_ARGV**)cnv.v;
4213  break;
4214 
4215  case FreeRDP_TargetNetAddresses:
4216  settings->TargetNetAddresses = (char**)cnv.v;
4217  break;
4218 
4219  case FreeRDP_TargetNetPorts:
4220  settings->TargetNetPorts = (UINT32*)cnv.v;
4221  break;
4222 
4223  case FreeRDP_instance:
4224  settings->instance = cnv.v;
4225  break;
4226 
4227  default:
4228  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
4231  return FALSE;
4232  }
4233  return TRUE;
4234 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_pointer_len()

FREERDP_API BOOL freerdp_settings_set_pointer_len ( rdpSettings *  settings,
FreeRDP_Settings_Keys_Pointer  id,
const void *  data,
size_t  len 
)

Set a pointer to value data.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to update
dataThe data to set (copy created, previous value freed)
Returns
TRUE for success, FALSE for failure

Definition at line 1339 of file common/settings.c.

1341 {
1342  union
1343  {
1344  const void* cv;
1345  void* v;
1346  } cnv;
1347 
1348  cnv.cv = data;
1349  if (!settings)
1350  return FALSE;
1351 
1352  switch (id)
1353  {
1354  case FreeRDP_RdpServerCertificate:
1355  freerdp_certificate_free(settings->RdpServerCertificate);
1356 
1357  if (len > 1)
1358  {
1359  WLog_ERR(TAG, "FreeRDP_RdpServerCertificate::len must be 0 or 1");
1360  return FALSE;
1361  }
1362  settings->RdpServerCertificate = cnv.v;
1363  if (!settings->RdpServerCertificate && (len > 0))
1364  {
1365  settings->RdpServerCertificate = freerdp_certificate_new();
1366  if (!settings->RdpServerCertificate)
1367  return FALSE;
1368  }
1369  return TRUE;
1370  case FreeRDP_RdpServerRsaKey:
1371  freerdp_key_free(settings->RdpServerRsaKey);
1372  if (len > 1)
1373  {
1374  WLog_ERR(TAG, "FreeRDP_RdpServerRsaKey::len must be 0 or 1");
1375  return FALSE;
1376  }
1377  settings->RdpServerRsaKey = (rdpPrivateKey*)cnv.v;
1378  if (!settings->RdpServerRsaKey && (len > 0))
1379  {
1380  settings->RdpServerRsaKey = freerdp_key_new();
1381  if (!settings->RdpServerRsaKey)
1382  return FALSE;
1383  }
1384  return TRUE;
1385  case FreeRDP_RedirectionPassword:
1386  return freerdp_settings_set_pointer_len_(
1387  settings, id, FreeRDP_RedirectionPasswordLength, data, len, sizeof(char));
1388  case FreeRDP_RedirectionTsvUrl:
1389  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_RedirectionTsvUrlLength,
1390  data, len, sizeof(char));
1391  case FreeRDP_RedirectionTargetCertificate:
1392  freerdp_certificate_free(settings->RedirectionTargetCertificate);
1393 
1394  if (len > 1)
1395  {
1396  WLog_ERR(TAG, "FreeRDP_RedirectionTargetCertificate::len must be 0 or 1");
1397  return FALSE;
1398  }
1399  settings->RedirectionTargetCertificate = cnv.v;
1400  if (!settings->RedirectionTargetCertificate && (len > 0))
1401  {
1402  settings->RedirectionTargetCertificate = freerdp_certificate_new();
1403  if (!settings->RedirectionTargetCertificate)
1404  return FALSE;
1405  }
1406  return TRUE;
1407  case FreeRDP_RedirectionGuid:
1408  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_RedirectionGuidLength,
1409  data, len, sizeof(BYTE));
1410  case FreeRDP_LoadBalanceInfo:
1411  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_LoadBalanceInfoLength,
1412  data, len, sizeof(char));
1413  case FreeRDP_ServerRandom:
1414  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_ServerRandomLength, data,
1415  len, sizeof(char));
1416  case FreeRDP_ClientRandom:
1417  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_ClientRandomLength, data,
1418  len, sizeof(char));
1419  case FreeRDP_ServerCertificate:
1420  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_ServerCertificateLength,
1421  data, len, sizeof(char));
1422  case FreeRDP_TargetNetAddresses:
1423  if ((data == NULL) && (len == 0))
1424  {
1425  freerdp_target_net_addresses_free(settings);
1426  return TRUE;
1427  }
1428  WLog_WARN(
1429  TAG,
1430  "[BUG] FreeRDP_TargetNetAddresses must not be resized from outside the library!");
1431  return FALSE;
1432  case FreeRDP_ServerLicenseProductIssuers:
1433  if (data == NULL)
1434  freerdp_server_license_issuers_free(settings);
1435  return freerdp_settings_set_pointer_len_(settings, FreeRDP_ServerLicenseProductIssuers,
1436  FreeRDP_ServerLicenseProductIssuersCount, data,
1437  len, sizeof(char*));
1438  case FreeRDP_TargetNetPorts:
1439  if ((data == NULL) && (len == 0))
1440  {
1441  freerdp_target_net_addresses_free(settings);
1442  return TRUE;
1443  }
1444  WLog_WARN(TAG,
1445  "[BUG] FreeRDP_TargetNetPorts must not be resized from outside the library!");
1446  return FALSE;
1447  case FreeRDP_DeviceArray:
1448  if (data == NULL)
1449  freerdp_device_collection_free(settings);
1450  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_DeviceArraySize, data,
1451  len, sizeof(ADDIN_ARGV*));
1452  case FreeRDP_ChannelDefArray:
1453  if ((len > 0) && (len < CHANNEL_MAX_COUNT))
1454  WLog_WARN(TAG,
1455  "FreeRDP_ChannelDefArray::len expected to be >= %" PRIu32
1456  ", but have %" PRIu32,
1457  CHANNEL_MAX_COUNT, len);
1458  return freerdp_settings_set_pointer_len_(settings, FreeRDP_ChannelDefArray,
1459  FreeRDP_ChannelDefArraySize, data, len,
1460  sizeof(CHANNEL_DEF));
1461  case FreeRDP_MonitorDefArray:
1462  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_MonitorDefArraySize,
1463  data, len, sizeof(rdpMonitor));
1464  case FreeRDP_ClientAutoReconnectCookie:
1465  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_UINT32_UNUSED, data, len,
1466  sizeof(ARC_CS_PRIVATE_PACKET));
1467  case FreeRDP_ServerAutoReconnectCookie:
1468  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_UINT32_UNUSED, data, len,
1469  sizeof(ARC_SC_PRIVATE_PACKET));
1470  case FreeRDP_ClientTimeZone:
1471  if (len > 1)
1472  {
1473  WLog_ERR(TAG, "FreeRDP_ClientTimeZone::len must be 0 or 1");
1474  return FALSE;
1475  }
1476  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_UINT32_UNUSED, data, len,
1477  sizeof(TIME_ZONE_INFORMATION));
1478  case FreeRDP_BitmapCacheV2CellInfo:
1479  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_BitmapCacheV2NumCells,
1480  data, len, sizeof(BITMAP_CACHE_V2_CELL_INFO));
1481  case FreeRDP_GlyphCache:
1482  if ((len != 0) && (len != 10))
1483  {
1484  WLog_ERR(TAG, "FreeRDP_GlyphCache::len must be 0 or 10");
1485  return FALSE;
1486  }
1487  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_UINT32_UNUSED, data, len,
1488  sizeof(GLYPH_CACHE_DEFINITION));
1489  case FreeRDP_FragCache:
1490  if (len > 1)
1491  {
1492  WLog_ERR(TAG, "FreeRDP_FragCache::len must be 0 or 1");
1493  return FALSE;
1494  }
1495  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_UINT32_UNUSED, data, len,
1496  sizeof(GLYPH_CACHE_DEFINITION));
1497  case FreeRDP_StaticChannelArray:
1498  if (data == NULL)
1499  freerdp_static_channel_collection_free(settings);
1500  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_StaticChannelArraySize,
1501  data, len, sizeof(ADDIN_ARGV*));
1502  case FreeRDP_DynamicChannelArray:
1503  if (data == NULL)
1504  freerdp_dynamic_channel_collection_free(settings);
1505  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_DynamicChannelArraySize,
1506  data, len, sizeof(ADDIN_ARGV*));
1507  case FreeRDP_ReceivedCapabilityData:
1508  if (data == NULL)
1509  freerdp_capability_buffer_free(settings);
1510  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_ReceivedCapabilitiesSize,
1511  data, len, sizeof(BYTE*));
1512  case FreeRDP_ReceivedCapabilities:
1513  if (data == NULL)
1514  freerdp_capability_buffer_free(settings);
1515  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_ReceivedCapabilitiesSize,
1516  data, len, sizeof(char));
1517  case FreeRDP_OrderSupport:
1518  return freerdp_settings_set_pointer_len_(settings, id, FreeRDP_UINT32_UNUSED, data, len,
1519  sizeof(char));
1520 
1521  case FreeRDP_MonitorIds:
1522  return freerdp_settings_set_pointer_len_(
1523  settings, FreeRDP_MonitorIds, FreeRDP_NumMonitorIds, data, len, sizeof(UINT32));
1524 
1525  default:
1526  if ((data == NULL) && (len == 0))
1527  {
1528  freerdp_settings_set_pointer(settings, id, NULL);
1529  }
1530  else
1531  WLog_WARN(TAG, "Invalid id %" PRIuz, id);
1532  return FALSE;
1533  }
1534 }

◆ freerdp_settings_set_string()

FREERDP_API BOOL freerdp_settings_set_string ( rdpSettings *  settings,
FreeRDP_Settings_Keys_String  id,
const char *  param 
)

Sets a string settings value. The param is copied.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
paramThe value to set. If NULL removes the old entry, otherwise a copy is created.
Returns
TRUE for success, FALSE for failure

Definition at line 3641 of file settings_getters.c.

3643 {
3644  size_t len = 0;
3645  if (val)
3646  len = strlen(val);
3647  return freerdp_settings_set_string_copy_(settings, id, val, len, TRUE);
3648 }

Referenced by freerdp_settings_copy_item().

Here is the caller graph for this function:

◆ freerdp_settings_set_string_from_utf16()

FREERDP_API BOOL freerdp_settings_set_string_from_utf16 ( rdpSettings *  settings,
FreeRDP_Settings_Keys_String  id,
const WCHAR *  param 
)

Sets a string settings value. The param is converted to UTF-8 and the copy stored.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
paramThe value to set. If NULL removes the old entry, otherwise a copy is created.
Returns
TRUE for success, FALSE for failure

Definition at line 2089 of file common/settings.c.

2091 {
2092  WINPR_ASSERT(settings);
2093 
2094  if (!param)
2095  return freerdp_settings_set_string_copy_(settings, id, NULL, 0, TRUE);
2096 
2097  size_t len = 0;
2098 
2099  char* str = ConvertWCharToUtf8Alloc(param, &len);
2100  if (!str && (len != 0))
2101  return FALSE;
2102 
2103  return freerdp_settings_set_string_(settings, id, str, len);
2104 }

◆ freerdp_settings_set_string_from_utf16N()

FREERDP_API BOOL freerdp_settings_set_string_from_utf16N ( rdpSettings *  settings,
FreeRDP_Settings_Keys_String  id,
const WCHAR *  param,
size_t  length 
)

Sets a string settings value. The param is converted to UTF-8 and the copy stored.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
paramThe value to set. If NULL removes the old entry, otherwise a copy is created.
lengthThe length of the WCHAR string in number of WCHAR characters
Returns
TRUE for success, FALSE for failure

Definition at line 2106 of file common/settings.c.

2108 {
2109  size_t len = 0;
2110 
2111  WINPR_ASSERT(settings);
2112 
2113  if (!param)
2114  return freerdp_settings_set_string_copy_(settings, id, NULL, length, TRUE);
2115 
2116  char* str = ConvertWCharNToUtf8Alloc(param, length, &len);
2117  if (!str && (length != 0))
2118  {
2119  /* If the input string is an empty string, but length > 0
2120  * consider the conversion a success */
2121  const size_t wlen = _wcsnlen(param, length);
2122  if (wlen != 0)
2123  return FALSE;
2124  }
2125 
2126  return freerdp_settings_set_string_(settings, id, str, len);
2127 }

◆ freerdp_settings_set_string_len()

FREERDP_API BOOL freerdp_settings_set_string_len ( rdpSettings *  settings,
FreeRDP_Settings_Keys_String  id,
const char *  param,
size_t  len 
)

Sets a string settings value. The param is copied.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
paramThe value to set. If NULL allocates an empty string buffer of len size, otherwise a copy is created.
lenThe length of param, 0 to remove the old entry.
Returns
TRUE for success, FALSE for failure

Definition at line 3635 of file settings_getters.c.

3637 {
3638  return freerdp_settings_set_string_copy_(settings, id, val, len, TRUE);
3639 }

Referenced by freerdp_settings_append_string().

Here is the caller graph for this function:

◆ freerdp_settings_set_uint16()

FREERDP_API BOOL freerdp_settings_set_uint16 ( rdpSettings *  settings,
FreeRDP_Settings_Keys_UInt16  id,
UINT16  param 
)

Sets a UINT16 settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
paramThe value to set.
Returns
TRUE for success, FALSE for failure

Definition at line 1505 of file settings_getters.c.

1506 {
1507  union
1508  {
1509  void* v;
1510  const void* cv;
1511  UINT16 c;
1512  const UINT16 cc;
1513  } cnv;
1514  WINPR_ASSERT(settings);
1515 
1516  cnv.c = val;
1517 
1518  switch (id)
1519  {
1520  case FreeRDP_CapsGeneralCompressionLevel:
1521  settings->CapsGeneralCompressionLevel = cnv.c;
1522  break;
1523 
1524  case FreeRDP_CapsGeneralCompressionTypes:
1525  settings->CapsGeneralCompressionTypes = cnv.c;
1526  break;
1527 
1528  case FreeRDP_CapsProtocolVersion:
1529  settings->CapsProtocolVersion = cnv.c;
1530  break;
1531 
1532  case FreeRDP_CapsRemoteUnshareFlag:
1533  settings->CapsRemoteUnshareFlag = cnv.c;
1534  break;
1535 
1536  case FreeRDP_CapsUpdateCapabilityFlag:
1537  settings->CapsUpdateCapabilityFlag = cnv.c;
1538  break;
1539 
1540  case FreeRDP_DesktopOrientation:
1541  settings->DesktopOrientation = cnv.c;
1542  break;
1543 
1544  case FreeRDP_OrderSupportFlags:
1545  settings->OrderSupportFlags = cnv.c;
1546  break;
1547 
1548  case FreeRDP_OrderSupportFlagsEx:
1549  settings->OrderSupportFlagsEx = cnv.c;
1550  break;
1551 
1552  case FreeRDP_ProxyPort:
1553  settings->ProxyPort = cnv.c;
1554  break;
1555 
1556  case FreeRDP_SupportedColorDepths:
1557  settings->SupportedColorDepths = cnv.c;
1558  break;
1559 
1560  case FreeRDP_TLSMaxVersion:
1561  settings->TLSMaxVersion = cnv.c;
1562  break;
1563 
1564  case FreeRDP_TLSMinVersion:
1565  settings->TLSMinVersion = cnv.c;
1566  break;
1567 
1568  case FreeRDP_TextANSICodePage:
1569  settings->TextANSICodePage = cnv.c;
1570  break;
1571 
1572  default:
1573  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
1576  return FALSE;
1577  }
1578  return TRUE;
1579 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_uint32()

FREERDP_API BOOL freerdp_settings_set_uint32 ( rdpSettings *  settings,
FreeRDP_Settings_Keys_UInt32  id,
UINT32  param 
)

Sets a UINT32 settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
paramThe value to set.
Returns
TRUE for success, FALSE for failure

Definition at line 2013 of file settings_getters.c.

2014 {
2015  union
2016  {
2017  void* v;
2018  const void* cv;
2019  UINT32 c;
2020  const UINT32 cc;
2021  } cnv;
2022  WINPR_ASSERT(settings);
2023 
2024  cnv.c = val;
2025 
2026  switch (id)
2027  {
2028  case FreeRDP_AcceptedCertLength:
2029  settings->AcceptedCertLength = cnv.c;
2030  break;
2031 
2032  case FreeRDP_AuthenticationLevel:
2033  settings->AuthenticationLevel = cnv.c;
2034  break;
2035 
2036  case FreeRDP_AutoReconnectMaxRetries:
2037  settings->AutoReconnectMaxRetries = cnv.c;
2038  break;
2039 
2040  case FreeRDP_BitmapCacheV2NumCells:
2041  settings->BitmapCacheV2NumCells = cnv.c;
2042  break;
2043 
2044  case FreeRDP_BitmapCacheV3CodecId:
2045  settings->BitmapCacheV3CodecId = cnv.c;
2046  break;
2047 
2048  case FreeRDP_BitmapCacheVersion:
2049  settings->BitmapCacheVersion = cnv.c;
2050  break;
2051 
2052  case FreeRDP_BrushSupportLevel:
2053  settings->BrushSupportLevel = cnv.c;
2054  break;
2055 
2056  case FreeRDP_ChannelCount:
2057  settings->ChannelCount = cnv.c;
2058  break;
2059 
2060  case FreeRDP_ChannelDefArraySize:
2061  settings->ChannelDefArraySize = cnv.c;
2062  break;
2063 
2064  case FreeRDP_ClientBuild:
2065  settings->ClientBuild = cnv.c;
2066  break;
2067 
2068  case FreeRDP_ClientRandomLength:
2069  settings->ClientRandomLength = cnv.c;
2070  break;
2071 
2072  case FreeRDP_ClientSessionId:
2073  settings->ClientSessionId = cnv.c;
2074  break;
2075 
2076  case FreeRDP_ClipboardFeatureMask:
2077  settings->ClipboardFeatureMask = cnv.c;
2078  break;
2079 
2080  case FreeRDP_ClusterInfoFlags:
2081  settings->ClusterInfoFlags = cnv.c;
2082  break;
2083 
2084  case FreeRDP_ColorDepth:
2085  settings->ColorDepth = cnv.c;
2086  break;
2087 
2088  case FreeRDP_ColorPointerCacheSize:
2089  settings->ColorPointerCacheSize = cnv.c;
2090  break;
2091 
2092  case FreeRDP_CompDeskSupportLevel:
2093  settings->CompDeskSupportLevel = cnv.c;
2094  break;
2095 
2096  case FreeRDP_CompressionLevel:
2097  settings->CompressionLevel = cnv.c;
2098  break;
2099 
2100  case FreeRDP_ConnectionType:
2101  settings->ConnectionType = cnv.c;
2102  break;
2103 
2104  case FreeRDP_CookieMaxLength:
2105  settings->CookieMaxLength = cnv.c;
2106  break;
2107 
2108  case FreeRDP_DesktopHeight:
2109  settings->DesktopHeight = cnv.c;
2110  break;
2111 
2112  case FreeRDP_DesktopPhysicalHeight:
2113  settings->DesktopPhysicalHeight = cnv.c;
2114  break;
2115 
2116  case FreeRDP_DesktopPhysicalWidth:
2117  settings->DesktopPhysicalWidth = cnv.c;
2118  break;
2119 
2120  case FreeRDP_DesktopPosX:
2121  settings->DesktopPosX = cnv.c;
2122  break;
2123 
2124  case FreeRDP_DesktopPosY:
2125  settings->DesktopPosY = cnv.c;
2126  break;
2127 
2128  case FreeRDP_DesktopScaleFactor:
2129  settings->DesktopScaleFactor = cnv.c;
2130  break;
2131 
2132  case FreeRDP_DesktopWidth:
2133  settings->DesktopWidth = cnv.c;
2134  break;
2135 
2136  case FreeRDP_DeviceArraySize:
2137  settings->DeviceArraySize = cnv.c;
2138  break;
2139 
2140  case FreeRDP_DeviceCount:
2141  settings->DeviceCount = cnv.c;
2142  break;
2143 
2144  case FreeRDP_DeviceScaleFactor:
2145  settings->DeviceScaleFactor = cnv.c;
2146  break;
2147 
2148  case FreeRDP_DrawNineGridCacheEntries:
2149  settings->DrawNineGridCacheEntries = cnv.c;
2150  break;
2151 
2152  case FreeRDP_DrawNineGridCacheSize:
2153  settings->DrawNineGridCacheSize = cnv.c;
2154  break;
2155 
2156  case FreeRDP_DynamicChannelArraySize:
2157  settings->DynamicChannelArraySize = cnv.c;
2158  break;
2159 
2160  case FreeRDP_DynamicChannelCount:
2161  settings->DynamicChannelCount = cnv.c;
2162  break;
2163 
2164  case FreeRDP_EarlyCapabilityFlags:
2165  settings->EarlyCapabilityFlags = cnv.c;
2166  break;
2167 
2168  case FreeRDP_EncryptionLevel:
2169  settings->EncryptionLevel = cnv.c;
2170  break;
2171 
2172  case FreeRDP_EncryptionMethods:
2173  settings->EncryptionMethods = cnv.c;
2174  break;
2175 
2176  case FreeRDP_ExtEncryptionMethods:
2177  settings->ExtEncryptionMethods = cnv.c;
2178  break;
2179 
2180  case FreeRDP_FakeMouseMotionInterval:
2181  settings->FakeMouseMotionInterval = cnv.c;
2182  break;
2183 
2184  case FreeRDP_Floatbar:
2185  settings->Floatbar = cnv.c;
2186  break;
2187 
2188  case FreeRDP_ForceIPvX:
2189  settings->ForceIPvX = cnv.c;
2190  break;
2191 
2192  case FreeRDP_FrameAcknowledge:
2193  settings->FrameAcknowledge = cnv.c;
2194  break;
2195 
2196  case FreeRDP_GatewayAcceptedCertLength:
2197  settings->GatewayAcceptedCertLength = cnv.c;
2198  break;
2199 
2200  case FreeRDP_GatewayCredentialsSource:
2201  settings->GatewayCredentialsSource = cnv.c;
2202  break;
2203 
2204  case FreeRDP_GatewayPort:
2205  settings->GatewayPort = cnv.c;
2206  break;
2207 
2208  case FreeRDP_GatewayUsageMethod:
2209  settings->GatewayUsageMethod = cnv.c;
2210  break;
2211 
2212  case FreeRDP_GfxCapsFilter:
2213  settings->GfxCapsFilter = cnv.c;
2214  break;
2215 
2216  case FreeRDP_GlyphSupportLevel:
2217  settings->GlyphSupportLevel = cnv.c;
2218  break;
2219 
2220  case FreeRDP_JpegCodecId:
2221  settings->JpegCodecId = cnv.c;
2222  break;
2223 
2224  case FreeRDP_JpegQuality:
2225  settings->JpegQuality = cnv.c;
2226  break;
2227 
2228  case FreeRDP_KeySpec:
2229  settings->KeySpec = cnv.c;
2230  break;
2231 
2232  case FreeRDP_KeyboardCodePage:
2233  settings->KeyboardCodePage = cnv.c;
2234  break;
2235 
2236  case FreeRDP_KeyboardFunctionKey:
2237  settings->KeyboardFunctionKey = cnv.c;
2238  break;
2239 
2240  case FreeRDP_KeyboardHook:
2241  settings->KeyboardHook = cnv.c;
2242  break;
2243 
2244  case FreeRDP_KeyboardLayout:
2245  settings->KeyboardLayout = cnv.c;
2246  break;
2247 
2248  case FreeRDP_KeyboardSubType:
2249  settings->KeyboardSubType = cnv.c;
2250  break;
2251 
2252  case FreeRDP_KeyboardType:
2253  settings->KeyboardType = cnv.c;
2254  break;
2255 
2256  case FreeRDP_LargePointerFlag:
2257  settings->LargePointerFlag = cnv.c;
2258  break;
2259 
2260  case FreeRDP_LoadBalanceInfoLength:
2261  settings->LoadBalanceInfoLength = cnv.c;
2262  break;
2263 
2264  case FreeRDP_MonitorAttributeFlags:
2265  settings->MonitorAttributeFlags = cnv.c;
2266  break;
2267 
2268  case FreeRDP_MonitorCount:
2269  settings->MonitorCount = cnv.c;
2270  break;
2271 
2272  case FreeRDP_MonitorDefArraySize:
2273  settings->MonitorDefArraySize = cnv.c;
2274  break;
2275 
2276  case FreeRDP_MonitorFlags:
2277  settings->MonitorFlags = cnv.c;
2278  break;
2279 
2280  case FreeRDP_MonitorLocalShiftX:
2281  settings->MonitorLocalShiftX = cnv.c;
2282  break;
2283 
2284  case FreeRDP_MonitorLocalShiftY:
2285  settings->MonitorLocalShiftY = cnv.c;
2286  break;
2287 
2288  case FreeRDP_MultifragMaxRequestSize:
2289  settings->MultifragMaxRequestSize = cnv.c;
2290  break;
2291 
2292  case FreeRDP_MultitransportFlags:
2293  settings->MultitransportFlags = cnv.c;
2294  break;
2295 
2296  case FreeRDP_NSCodecColorLossLevel:
2297  settings->NSCodecColorLossLevel = cnv.c;
2298  break;
2299 
2300  case FreeRDP_NSCodecId:
2301  settings->NSCodecId = cnv.c;
2302  break;
2303 
2304  case FreeRDP_NegotiationFlags:
2305  settings->NegotiationFlags = cnv.c;
2306  break;
2307 
2308  case FreeRDP_NumMonitorIds:
2309  settings->NumMonitorIds = cnv.c;
2310  break;
2311 
2312  case FreeRDP_OffscreenCacheEntries:
2313  settings->OffscreenCacheEntries = cnv.c;
2314  break;
2315 
2316  case FreeRDP_OffscreenCacheSize:
2317  settings->OffscreenCacheSize = cnv.c;
2318  break;
2319 
2320  case FreeRDP_OffscreenSupportLevel:
2321  settings->OffscreenSupportLevel = cnv.c;
2322  break;
2323 
2324  case FreeRDP_OsMajorType:
2325  settings->OsMajorType = cnv.c;
2326  break;
2327 
2328  case FreeRDP_OsMinorType:
2329  settings->OsMinorType = cnv.c;
2330  break;
2331 
2332  case FreeRDP_Password51Length:
2333  settings->Password51Length = cnv.c;
2334  break;
2335 
2336  case FreeRDP_PduSource:
2337  settings->PduSource = cnv.c;
2338  break;
2339 
2340  case FreeRDP_PercentScreen:
2341  settings->PercentScreen = cnv.c;
2342  break;
2343 
2344  case FreeRDP_PerformanceFlags:
2345  settings->PerformanceFlags = cnv.c;
2346  break;
2347 
2348  case FreeRDP_PointerCacheSize:
2349  settings->PointerCacheSize = cnv.c;
2350  break;
2351 
2352  case FreeRDP_PreconnectionId:
2353  settings->PreconnectionId = cnv.c;
2354  break;
2355 
2356  case FreeRDP_ProxyType:
2357  settings->ProxyType = cnv.c;
2358  break;
2359 
2360  case FreeRDP_RdpVersion:
2361  settings->RdpVersion = cnv.c;
2362  break;
2363 
2364  case FreeRDP_ReceivedCapabilitiesSize:
2365  settings->ReceivedCapabilitiesSize = cnv.c;
2366  break;
2367 
2368  case FreeRDP_RedirectedSessionId:
2369  settings->RedirectedSessionId = cnv.c;
2370  break;
2371 
2372  case FreeRDP_RedirectionAcceptedCertLength:
2373  settings->RedirectionAcceptedCertLength = cnv.c;
2374  break;
2375 
2376  case FreeRDP_RedirectionFlags:
2377  settings->RedirectionFlags = cnv.c;
2378  break;
2379 
2380  case FreeRDP_RedirectionGuidLength:
2381  settings->RedirectionGuidLength = cnv.c;
2382  break;
2383 
2384  case FreeRDP_RedirectionPasswordLength:
2385  settings->RedirectionPasswordLength = cnv.c;
2386  break;
2387 
2388  case FreeRDP_RedirectionPreferType:
2389  settings->RedirectionPreferType = cnv.c;
2390  break;
2391 
2392  case FreeRDP_RedirectionTsvUrlLength:
2393  settings->RedirectionTsvUrlLength = cnv.c;
2394  break;
2395 
2396  case FreeRDP_RemoteAppNumIconCacheEntries:
2397  settings->RemoteAppNumIconCacheEntries = cnv.c;
2398  break;
2399 
2400  case FreeRDP_RemoteAppNumIconCaches:
2401  settings->RemoteAppNumIconCaches = cnv.c;
2402  break;
2403 
2404  case FreeRDP_RemoteApplicationExpandCmdLine:
2405  settings->RemoteApplicationExpandCmdLine = cnv.c;
2406  break;
2407 
2408  case FreeRDP_RemoteApplicationExpandWorkingDir:
2409  settings->RemoteApplicationExpandWorkingDir = cnv.c;
2410  break;
2411 
2412  case FreeRDP_RemoteApplicationSupportLevel:
2413  settings->RemoteApplicationSupportLevel = cnv.c;
2414  break;
2415 
2416  case FreeRDP_RemoteApplicationSupportMask:
2417  settings->RemoteApplicationSupportMask = cnv.c;
2418  break;
2419 
2420  case FreeRDP_RemoteFxCaptureFlags:
2421  settings->RemoteFxCaptureFlags = cnv.c;
2422  break;
2423 
2424  case FreeRDP_RemoteFxCodecId:
2425  settings->RemoteFxCodecId = cnv.c;
2426  break;
2427 
2428  case FreeRDP_RemoteFxCodecMode:
2429  settings->RemoteFxCodecMode = cnv.c;
2430  break;
2431 
2432  case FreeRDP_RemoteFxRlgrMode:
2433  settings->RemoteFxRlgrMode = cnv.c;
2434  break;
2435 
2436  case FreeRDP_RemoteWndSupportLevel:
2437  settings->RemoteWndSupportLevel = cnv.c;
2438  break;
2439 
2440  case FreeRDP_RequestedProtocols:
2441  settings->RequestedProtocols = cnv.c;
2442  break;
2443 
2444  case FreeRDP_SelectedProtocol:
2445  settings->SelectedProtocol = cnv.c;
2446  break;
2447 
2448  case FreeRDP_ServerCertificateLength:
2449  settings->ServerCertificateLength = cnv.c;
2450  break;
2451 
2452  case FreeRDP_ServerLicenseProductIssuersCount:
2453  settings->ServerLicenseProductIssuersCount = cnv.c;
2454  break;
2455 
2456  case FreeRDP_ServerLicenseProductVersion:
2457  settings->ServerLicenseProductVersion = cnv.c;
2458  break;
2459 
2460  case FreeRDP_ServerPort:
2461  settings->ServerPort = cnv.c;
2462  break;
2463 
2464  case FreeRDP_ServerRandomLength:
2465  settings->ServerRandomLength = cnv.c;
2466  break;
2467 
2468  case FreeRDP_ShareId:
2469  settings->ShareId = cnv.c;
2470  break;
2471 
2472  case FreeRDP_SmartSizingHeight:
2473  settings->SmartSizingHeight = cnv.c;
2474  break;
2475 
2476  case FreeRDP_SmartSizingWidth:
2477  settings->SmartSizingWidth = cnv.c;
2478  break;
2479 
2480  case FreeRDP_StaticChannelArraySize:
2481  settings->StaticChannelArraySize = cnv.c;
2482  break;
2483 
2484  case FreeRDP_StaticChannelCount:
2485  settings->StaticChannelCount = cnv.c;
2486  break;
2487 
2488  case FreeRDP_SurfaceCommandsSupported:
2489  settings->SurfaceCommandsSupported = cnv.c;
2490  break;
2491 
2492  case FreeRDP_TargetNetAddressCount:
2493  settings->TargetNetAddressCount = cnv.c;
2494  break;
2495 
2496  case FreeRDP_TcpAckTimeout:
2497  settings->TcpAckTimeout = cnv.c;
2498  break;
2499 
2500  case FreeRDP_TcpConnectTimeout:
2501  settings->TcpConnectTimeout = cnv.c;
2502  break;
2503 
2504  case FreeRDP_TcpKeepAliveDelay:
2505  settings->TcpKeepAliveDelay = cnv.c;
2506  break;
2507 
2508  case FreeRDP_TcpKeepAliveInterval:
2509  settings->TcpKeepAliveInterval = cnv.c;
2510  break;
2511 
2512  case FreeRDP_TcpKeepAliveRetries:
2513  settings->TcpKeepAliveRetries = cnv.c;
2514  break;
2515 
2516  case FreeRDP_ThreadingFlags:
2517  settings->ThreadingFlags = cnv.c;
2518  break;
2519 
2520  case FreeRDP_TlsSecLevel:
2521  settings->TlsSecLevel = cnv.c;
2522  break;
2523 
2524  case FreeRDP_VCChunkSize:
2525  settings->VCChunkSize = cnv.c;
2526  break;
2527 
2528  case FreeRDP_VCFlags:
2529  settings->VCFlags = cnv.c;
2530  break;
2531 
2532  default:
2533  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2536  return FALSE;
2537  }
2538  return TRUE;
2539 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_set_gateway_usage_method(), and freerdp_settings_copy_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_uint64()

FREERDP_API BOOL freerdp_settings_set_uint64 ( rdpSettings *  settings,
FreeRDP_Settings_Keys_UInt64  id,
UINT64  param 
)

Sets a UINT64 settings value.

Parameters
settingsA pointer to the settings to query, must not be NULL.
idThe key to query
paramThe value to set.
Returns
TRUE for success, FALSE for failure

Definition at line 2612 of file settings_getters.c.

2613 {
2614  union
2615  {
2616  void* v;
2617  const void* cv;
2618  UINT64 c;
2619  const UINT64 cc;
2620  } cnv;
2621  WINPR_ASSERT(settings);
2622 
2623  cnv.c = val;
2624 
2625  switch (id)
2626  {
2627  case FreeRDP_ParentWindowId:
2628  settings->ParentWindowId = cnv.c;
2629  break;
2630 
2631  default:
2632  WLog_ERR(TAG, "Invalid key index %" PRIuz " [%s|%s]", id,
2635  return FALSE;
2636  }
2637  return TRUE;
2638 }

References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().

Referenced by freerdp_settings_copy_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_update_from_caps()

FREERDP_API BOOL freerdp_settings_update_from_caps ( rdpSettings *  settings,
const BYTE *  capsFlags,
const BYTE **  capsData,
const UINT32 *  capsSizes,
UINT32  capsCount,
BOOL  serverReceivedCaps 
)

Parse capability data and apply to settings.

The capability message is stored in raw form in the settings, the data parsed and applied to the settings.

Parameters
settingsA pointer to the settings to use
capsFlagsA pointer to the capability flags, must have capsCount fields
capsDataA pointer array to the RAW capability data, must have capsCount fields
capsSizesA pointer to an array of RAW capability sizes, must have capsCount fields
capsCountThe number of capabilities contained in the RAW data
serverReceivedCapsIndicates if the parser should assume to be a server or client instance
Returns
TRUE for success, FALSE in case of an error

Definition at line 2025 of file common/settings.c.

2028 {
2029  WINPR_ASSERT(settings);
2030  WINPR_ASSERT(capsFlags || (capsCount == 0));
2031  WINPR_ASSERT(capsData || (capsCount == 0));
2032  WINPR_ASSERT(capsSizes || (capsCount == 0));
2033  WINPR_ASSERT(capsCount <= UINT16_MAX);
2034 
2035  for (UINT32 x = 0; x < capsCount; x++)
2036  {
2037  if (capsFlags[x])
2038  {
2039  wStream buffer;
2040  wStream* sub = Stream_StaticConstInit(&buffer, capsData[x], capsSizes[x]);
2041 
2042  if (!rdp_read_capability_set(sub, (UINT16)x, settings, serverReceivedCaps))
2043  return FALSE;
2044  }
2045  }
2046 
2047  return TRUE;
2048 }

◆ freerdp_supported_color_depths_string()

FREERDP_API const char* freerdp_supported_color_depths_string ( UINT16  mask,
char *  buffer,
size_t  size 
)

returns a string representation of RNS_UD_XXBPP_SUPPORT values

return A string reprenentation of the bitmask.

Definition at line 2206 of file common/settings.c.

2207 {
2208  const UINT32 invalid = mask & ~(RNS_UD_32BPP_SUPPORT | RNS_UD_24BPP_SUPPORT |
2209  RNS_UD_16BPP_SUPPORT | RNS_UD_15BPP_SUPPORT);
2210 
2211  if (mask & RNS_UD_32BPP_SUPPORT)
2212  winpr_str_append("RNS_UD_32BPP_SUPPORT", buffer, size, "|");
2213  if (mask & RNS_UD_24BPP_SUPPORT)
2214  winpr_str_append("RNS_UD_24BPP_SUPPORT", buffer, size, "|");
2215  if (mask & RNS_UD_16BPP_SUPPORT)
2216  winpr_str_append("RNS_UD_16BPP_SUPPORT", buffer, size, "|");
2217  if (mask & RNS_UD_15BPP_SUPPORT)
2218  winpr_str_append("RNS_UD_15BPP_SUPPORT", buffer, size, "|");
2219 
2220  if (invalid != 0)
2221  {
2222  char str[32] = { 0 };
2223  (void)_snprintf(str, sizeof(str), "RNS_UD_INVALID[0x%04" PRIx32 "]", invalid);
2224  winpr_str_append(str, buffer, size, "|");
2225  }
2226  char hex[32] = { 0 };
2227  (void)_snprintf(hex, sizeof(hex), "[0x%04" PRIx16 "]", mask);
2228  return buffer;
2229 }