FreeRDP
|
This is the FreeRDP settings module. More...
#include <winpr/timezone.h>
#include <winpr/wlog.h>
#include <freerdp/api.h>
#include <freerdp/config.h>
#include <freerdp/types.h>
#include <freerdp/redirection.h>
#include <freerdp/settings_types_private.h>
#include <freerdp/settings_keys.h>
#include <freerdp/settings_types.h>
#include <freerdp/crypto/certificate.h>
#include <freerdp/crypto/privatekey.h>
Go to the source code of this file.
Macros | |
#define | FREERDP_SETTINGS_SERVER_MODE 0x00000001 |
#define | FREERDP_SETTINGS_REMOTE_MODE 0x00000002 |
Functions | |
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_free (rdpSettings *settings) |
Free a settings struct with all data in it. 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 ADDIN_ARGV * | freerdp_addin_argv_new (size_t argc, const char *argv[]) |
FREERDP_API ADDIN_ARGV * | freerdp_addin_argv_clone (const ADDIN_ARGV *args) |
FREERDP_API void | freerdp_addin_argv_free (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_DEVICE * | freerdp_device_collection_find (rdpSettings *settings, const char *name) |
FREERDP_API RDPDR_DEVICE * | freerdp_device_collection_find_type (rdpSettings *settings, UINT32 type) |
FREERDP_API void | freerdp_device_free (RDPDR_DEVICE *device) |
FREERDP_API RDPDR_DEVICE * | freerdp_device_new (UINT32 Type, size_t count, const char *args[]) |
FREERDP_API RDPDR_DEVICE * | freerdp_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_ARGV * | freerdp_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_ARGV * | freerdp_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, <old value><separator> is created 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) |
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 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 | |
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 Copyright 2016 Armin Novak ndre .more au@g mail. comarmin Copyright 2023 Armin Novak .nov ak@gm ail. comanova Copyright 2023 Thincast Technologies GmbH k@th incas t.co m
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:
The lifetime of the settings is as follows:
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)
Definition in file include/freerdp/settings.h.
#define FREERDP_SETTINGS_SERVER_MODE 0x00000001 |
rdpSettings creation flags
Definition at line 78 of file include/freerdp/settings.h.
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.
settings | the settings to remove the device from |
device | the device to remove |
Definition at line 240 of file common/settings.c.
FREERDP_API char* freerdp_rail_support_flags_to_string | ( | UINT32 | flags, |
char * | buffer, | ||
size_t | length | ||
) |
Returns a stringified representation of RAIL support flags.
flags | The flags to stringify |
buffer | A pointer to the string buffer to write to |
length | The size of the string buffer |
Definition at line 1951 of file common/settings.c.
FREERDP_API const char* freerdp_rdp_version_string | ( | UINT32 | version | ) |
Returns a stringified representation of the RDP protocol version.
version | The RDP protocol version number. |
Definition at line 2011 of file common/settings.c.
FREERDP_API const char* freerdp_rdpdr_dtyp_string | ( | UINT32 | type | ) |
Returns a string representation of RDPDR_DTYP_*.
type | The integer of the RDPDR_DTYP_* to stringify |
Definition at line 2101 of file common/settings.c.
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 1008 of file common/settings.c.
References freerdp_settings_set_uint32().
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> is created
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
separator | The separator string to use. May be NULL (no separator) |
param | The value to append |
Definition at line 2192 of file common/settings.c.
References freerdp_settings_get_string(), and freerdp_settings_set_string_len().
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.
settings | the settings instance to check |
Definition at line 2212 of file common/settings.c.
FREERDP_API rdpSettings* freerdp_settings_clone | ( | const rdpSettings * | settings | ) |
Creates a deep copy of settings.
settings | A pointer to a settings struct to copy. May be NULL (returns NULL) |
Definition at line 1156 of file core/settings.c.
References freerdp_settings_copy(), and freerdp_settings_free().
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
dst | A pointer for the settings to copy data to. May be NULL (fails copy) |
src | A pointer to the settings to copy. May be NULL (fails copy) |
Definition at line 1101 of file core/settings.c.
Referenced by freerdp_settings_clone().
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
dst | A pointer for the settings to copy data to. May be NULL (fails copy) |
src | A pointer to the settings to copy. May be NULL (fails copy) |
id | The settings identifier to copy |
Definition at line 421 of file settings_str.c.
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().
FREERDP_API void freerdp_settings_dump | ( | wLog * | log, |
DWORD | level, | ||
const rdpSettings * | settings | ||
) |
Dumps the contents of a settings struct to a WLog logger.
log | The logger to write to, must not be NULL |
level | The WLog level to use for the log entries |
settings | A pointer to the settings to dump. May be NULL. |
Definition at line 242 of file settings_str.c.
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().
FREERDP_API void freerdp_settings_free | ( | rdpSettings * | settings | ) |
Free a settings struct with all data in it.
settings | A pointer to the settings to free, May be NULL |
Definition at line 852 of file core/settings.c.
Referenced by freerdp_settings_clone().
FREERDP_API BOOL freerdp_settings_get_bool | ( | const rdpSettings * | settings, |
FreeRDP_Settings_Keys_Bool | id | ||
) |
Returns a boolean settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
Definition at line 54 of file settings_getters.c.
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:.
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
settings | the settings to check |
Definition at line 1805 of file common/settings.c.
FREERDP_API INT16 freerdp_settings_get_int16 | ( | const rdpSettings * | settings, |
FreeRDP_Settings_Keys_Int16 | id | ||
) |
Returns a INT16 settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
Definition at line 1574 of file settings_getters.c.
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().
FREERDP_API INT32 freerdp_settings_get_int32 | ( | const rdpSettings * | settings, |
FreeRDP_Settings_Keys_Int32 | id | ||
) |
Returns a INT32 settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
Definition at line 2534 of file settings_getters.c.
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().
FREERDP_API INT64 freerdp_settings_get_int64 | ( | const rdpSettings * | settings, |
FreeRDP_Settings_Keys_Int64 | id | ||
) |
Returns a INT64 settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
Definition at line 2633 of file settings_getters.c.
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().
FREERDP_API SSIZE_T freerdp_settings_get_key_for_name | ( | const char * | value | ) |
Get a key index for the name string of that key.
value | A key name string like FreeRDP_ServerMode |
Definition at line 340 of file settings_str.c.
FREERDP_API const char* freerdp_settings_get_name_for_key | ( | SSIZE_T | key | ) |
Returns the type name for a key.
key | the key number to stringify |
Definition at line 410 of file settings_str.c.
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().
FREERDP_API const void* freerdp_settings_get_pointer | ( | const rdpSettings * | settings, |
FreeRDP_Settings_Keys_Pointer | id | ||
) |
Returns a immutable pointer settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
Definition at line 1289 of file common/settings.c.
References freerdp_settings_get_pointer_writable().
Referenced by freerdp_settings_copy_item(), freerdp_settings_dump(), and freerdp_settings_print_diff().
FREERDP_API void* freerdp_settings_get_pointer_writable | ( | rdpSettings * | settings, |
FreeRDP_Settings_Keys_Pointer | id | ||
) |
Returns a mutable pointer settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
Definition at line 3949 of file settings_getters.c.
References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().
Referenced by freerdp_settings_get_pointer().
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.
settings | The settings to query, must not be NULL. |
Definition at line 1820 of file common/settings.c.
FREERDP_API const char* freerdp_settings_get_string | ( | const rdpSettings * | settings, |
FreeRDP_Settings_Keys_String | id | ||
) |
Returns a immutable string settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
Definition at line 2672 of file settings_getters.c.
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().
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.
settings | A pointer to the settings struct to use |
id | The settings identifier |
Definition at line 2090 of file common/settings.c.
References freerdp_settings_get_string().
FREERDP_API char* freerdp_settings_get_string_writable | ( | rdpSettings * | settings, |
FreeRDP_Settings_Keys_String | id | ||
) |
Returns a string settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
Definition at line 2982 of file settings_getters.c.
References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().
FREERDP_API SSIZE_T freerdp_settings_get_type_for_key | ( | SSIZE_T | key | ) |
Get a key type for the key index.
key | The key index like FreeRDP_ServerMode |
Definition at line 399 of file settings_str.c.
Referenced by freerdp_settings_copy_item(), and freerdp_settings_get_type_name_for_key().
FREERDP_API SSIZE_T freerdp_settings_get_type_for_name | ( | const char * | value | ) |
Get a key type for the name string of that key.
value | A key name string like FreeRDP_ServerMode |
Definition at line 353 of file settings_str.c.
FREERDP_API const char* freerdp_settings_get_type_name_for_key | ( | SSIZE_T | key | ) |
Returns the type name for a key.
key | the key number to stringify |
Definition at line 366 of file settings_str.c.
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().
FREERDP_API const char* freerdp_settings_get_type_name_for_type | ( | SSIZE_T | type | ) |
Returns the type name for a type.
type | the type to stringify |
Definition at line 372 of file settings_str.c.
Referenced by freerdp_settings_get_type_name_for_key().
FREERDP_API UINT16 freerdp_settings_get_uint16 | ( | const rdpSettings * | settings, |
FreeRDP_Settings_Keys_UInt16 | id | ||
) |
Returns a UINT16 settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
Definition at line 1444 of file settings_getters.c.
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().
FREERDP_API UINT32 freerdp_settings_get_uint32 | ( | const rdpSettings * | settings, |
FreeRDP_Settings_Keys_UInt32 | id | ||
) |
Returns a UINT32 settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
Definition at line 1613 of file settings_getters.c.
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:.
FREERDP_API UINT64 freerdp_settings_get_uint64 | ( | const rdpSettings * | settings, |
FreeRDP_Settings_Keys_UInt64 | id | ||
) |
Returns a UINT64 settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
Definition at line 2587 of file settings_getters.c.
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().
FREERDP_API rdpSettings* freerdp_settings_new | ( | DWORD | flags | ) |
creates a new setting struct
flags | Flags for creation, use FREERDP_SETTINGS_SERVER_MODE for server settings, 0 for client. |
Definition at line 384 of file core/settings.c.
References FREERDP_SETTINGS_SERVER_MODE.
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.
log | The logger to write to, must not be NULL. |
level | The WLog level to use for the log entries. |
src | A pointer to the settings to dump. May be NULL. |
other | A pointer to the settings to dump. May be NULL. |
Definition at line 94 of file settings_str.c.
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().
FREERDP_API BOOL freerdp_settings_set_bool | ( | rdpSettings * | settings, |
FreeRDP_Settings_Keys_Bool | id, | ||
BOOL | param | ||
) |
Sets a BOOL settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
param | The value to set. |
Definition at line 648 of file settings_getters.c.
References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().
Referenced by freerdp_settings_copy_item().
FREERDP_API BOOL freerdp_settings_set_int16 | ( | rdpSettings * | settings, |
FreeRDP_Settings_Keys_Int16 | id, | ||
INT16 | param | ||
) |
Sets a INT16 settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
param | The value to set. |
Definition at line 1589 of file settings_getters.c.
References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().
Referenced by freerdp_settings_copy_item().
FREERDP_API BOOL freerdp_settings_set_int32 | ( | rdpSettings * | settings, |
FreeRDP_Settings_Keys_Int32 | id, | ||
INT32 | param | ||
) |
Sets a INT32 settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
param | The value to set. |
Definition at line 2555 of file settings_getters.c.
References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().
Referenced by freerdp_settings_copy_item().
FREERDP_API BOOL freerdp_settings_set_int64 | ( | rdpSettings * | settings, |
FreeRDP_Settings_Keys_Int64 | id, | ||
INT64 | param | ||
) |
Sets a INT64 settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
param | The value to set. |
Definition at line 2648 of file settings_getters.c.
References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().
Referenced by freerdp_settings_copy_item().
FREERDP_API BOOL freerdp_settings_set_pointer | ( | rdpSettings * | settings, |
FreeRDP_Settings_Keys_Pointer | id, | ||
const void * | data | ||
) |
Set a pointer to value data.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to update |
data | The data to set (direct update, no copy created, previous value overwritten) |
Definition at line 4057 of file settings_getters.c.
References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().
Referenced by freerdp_settings_copy_item().
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.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to update |
data | The data to set (copy created, previous value freed) |
Definition at line 1301 of file common/settings.c.
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.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
param | The value to set. If NULL removes the old entry, otherwise a copy is created. |
Definition at line 3616 of file settings_getters.c.
Referenced by freerdp_settings_copy_item().
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.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
param | The value to set. If NULL removes the old entry, otherwise a copy is created. |
Definition at line 2050 of file common/settings.c.
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.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
param | The value to set. If NULL removes the old entry, otherwise a copy is created. |
length | The length of the WCHAR string in number of WCHAR characters |
Definition at line 2067 of file common/settings.c.
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.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
param | The value to set. If NULL allocates an empty string buffer of len size, otherwise a copy is created. |
len | The length of param, 0 to remove the old entry. |
Definition at line 3610 of file settings_getters.c.
Referenced by freerdp_settings_append_string().
FREERDP_API BOOL freerdp_settings_set_uint16 | ( | rdpSettings * | settings, |
FreeRDP_Settings_Keys_UInt16 | id, | ||
UINT16 | param | ||
) |
Sets a UINT16 settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
param | The value to set. |
Definition at line 1498 of file settings_getters.c.
References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().
Referenced by freerdp_settings_copy_item().
FREERDP_API BOOL freerdp_settings_set_uint32 | ( | rdpSettings * | settings, |
FreeRDP_Settings_Keys_UInt32 | id, | ||
UINT32 | param | ||
) |
Sets a UINT32 settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
param | The value to set. |
Definition at line 2006 of file settings_getters.c.
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().
FREERDP_API BOOL freerdp_settings_set_uint64 | ( | rdpSettings * | settings, |
FreeRDP_Settings_Keys_UInt64 | id, | ||
UINT64 | param | ||
) |
Sets a UINT64 settings value.
settings | A pointer to the settings to query, must not be NULL. |
id | The key to query |
param | The value to set. |
Definition at line 2605 of file settings_getters.c.
References freerdp_settings_get_name_for_key(), and freerdp_settings_get_type_name_for_key().
Referenced by freerdp_settings_copy_item().
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.
settings | A pointer to the settings to use |
capsFlags | A pointer to the capablity flags, must have capsCount fields |
capsData | A pointer array to the RAW capability data, must have capsCount fields |
capsSizes | A pointer to an array of RAW capability sizes, must have capsCount fields |
capsCount | The number of capabilities contained in the RAW data |
serverReceivedCaps | Indicates if the parser should assume to be a server or client instance |
Definition at line 1986 of file common/settings.c.
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 2167 of file common/settings.c.