FreeRDP
settings_getters.c File Reference
#include "../core/settings.h"
#include <winpr/assert.h>
#include <freerdp/settings.h>
#include <freerdp/log.h>

Macros

#define TAG   FREERDP_TAG("common.settings")
 

Functions

static void free_string (char **current, BOOL cleanup)
 
static BOOL alloc_empty_string (char **current, const char *next, size_t next_len)
 
static BOOL update_string_copy_ (char **current, const char *next, size_t next_len, BOOL cleanup)
 
static BOOL update_string_ (char **current, char *next, size_t next_len)
 
BOOL freerdp_settings_get_bool (const rdpSettings *settings, FreeRDP_Settings_Keys_Bool id)
 Returns a boolean settings value. More...
 
BOOL freerdp_settings_set_bool (rdpSettings *settings, FreeRDP_Settings_Keys_Bool id, BOOL val)
 Sets a BOOL settings value. More...
 
UINT16 freerdp_settings_get_uint16 (const rdpSettings *settings, FreeRDP_Settings_Keys_UInt16 id)
 Returns a UINT16 settings value. More...
 
BOOL freerdp_settings_set_uint16 (rdpSettings *settings, FreeRDP_Settings_Keys_UInt16 id, UINT16 val)
 Sets a UINT16 settings value. More...
 
INT16 freerdp_settings_get_int16 (const rdpSettings *settings, FreeRDP_Settings_Keys_Int16 id)
 Returns a INT16 settings value. More...
 
BOOL freerdp_settings_set_int16 (rdpSettings *settings, FreeRDP_Settings_Keys_Int16 id, INT16 val)
 Sets a INT16 settings value. More...
 
UINT32 freerdp_settings_get_uint32 (const rdpSettings *settings, FreeRDP_Settings_Keys_UInt32 id)
 Returns a UINT32 settings value. More...
 
BOOL freerdp_settings_set_uint32 (rdpSettings *settings, FreeRDP_Settings_Keys_UInt32 id, UINT32 val)
 Sets a UINT32 settings value. More...
 
INT32 freerdp_settings_get_int32 (const rdpSettings *settings, FreeRDP_Settings_Keys_Int32 id)
 Returns a INT32 settings value. More...
 
BOOL freerdp_settings_set_int32 (rdpSettings *settings, FreeRDP_Settings_Keys_Int32 id, INT32 val)
 Sets a INT32 settings value. More...
 
UINT64 freerdp_settings_get_uint64 (const rdpSettings *settings, FreeRDP_Settings_Keys_UInt64 id)
 Returns a UINT64 settings value. More...
 
BOOL freerdp_settings_set_uint64 (rdpSettings *settings, FreeRDP_Settings_Keys_UInt64 id, UINT64 val)
 Sets a UINT64 settings value. More...
 
INT64 freerdp_settings_get_int64 (const rdpSettings *settings, FreeRDP_Settings_Keys_Int64 id)
 Returns a INT64 settings value. More...
 
BOOL freerdp_settings_set_int64 (rdpSettings *settings, FreeRDP_Settings_Keys_Int64 id, INT64 val)
 Sets a INT64 settings value. More...
 
const char * freerdp_settings_get_string (const rdpSettings *settings, FreeRDP_Settings_Keys_String id)
 Returns a immutable string settings value. More...
 
char * freerdp_settings_get_string_writable (rdpSettings *settings, FreeRDP_Settings_Keys_String id)
 Returns a string settings value. More...
 
BOOL freerdp_settings_set_string_ (rdpSettings *settings, FreeRDP_Settings_Keys_String id, char *val, size_t len)
 
BOOL freerdp_settings_set_string_len (rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *val, size_t len)
 Sets a string settings value. The param is copied. More...
 
BOOL freerdp_settings_set_string (rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *val)
 Sets a string settings value. The param is copied. More...
 
BOOL freerdp_settings_set_string_copy_ (rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *val, size_t len, BOOL cleanup)
 
void * freerdp_settings_get_pointer_writable (rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id)
 Returns a mutable pointer settings value. More...
 
BOOL freerdp_settings_set_pointer (rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id, const void *val)
 Set a pointer to value data. More...
 

Macro Definition Documentation

◆ TAG

#define TAG   FREERDP_TAG("common.settings")

Function Documentation

◆ alloc_empty_string()

static BOOL alloc_empty_string ( char **  current,
const char *  next,
size_t  next_len 
)
static
Here is the caller graph for this function:

◆ free_string()

static void free_string ( char **  current,
BOOL  cleanup 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_bool()

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
Here is the call graph for this function:

◆ freerdp_settings_get_int16()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_int32()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_int64()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_pointer_writable()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_string()

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
Here is the call graph for this function:

◆ freerdp_settings_get_string_writable()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_uint16()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_get_uint32()

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
Here is the call graph for this function:

◆ freerdp_settings_get_uint64()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_bool()

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
Here is the call graph for this function:

◆ freerdp_settings_set_int16()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_int32()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_int64()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_pointer()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_string()

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
Here is the call graph for this function:

◆ freerdp_settings_set_string_()

BOOL freerdp_settings_set_string_ ( rdpSettings *  settings,
FreeRDP_Settings_Keys_String  id,
char *  val,
size_t  len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_string_copy_()

BOOL freerdp_settings_set_string_copy_ ( rdpSettings *  settings,
FreeRDP_Settings_Keys_String  id,
const char *  val,
size_t  len,
BOOL  cleanup 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_string_len()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_uint16()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_set_uint32()

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
Here is the call graph for this function:

◆ freerdp_settings_set_uint64()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_string_()

static BOOL update_string_ ( char **  current,
char *  next,
size_t  next_len 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_string_copy_()

static BOOL update_string_copy_ ( char **  current,
const char *  next,
size_t  next_len,
BOOL  cleanup 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: