FreeRDP
core/settings.c File Reference
#include <freerdp/config.h>
#include <freerdp/crypto/certificate.h>
#include <ctype.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/path.h>
#include <winpr/sysinfo.h>
#include <winpr/registry.h>
#include <freerdp/settings.h>
#include <freerdp/build-config.h>
#include "../crypto/certificate.h"
#include "../crypto/privatekey.h"
#include "capabilities.h"
#include "settings.h"

Macros

#define TAG   FREERDP_TAG("settings")
 
#define SERVER_KEY   "Software\\" FREERDP_VENDOR_STRING "\\" FREERDP_PRODUCT_STRING "\\Server"
 
#define CLIENT_KEY   "Software\\" FREERDP_VENDOR_STRING "\\" FREERDP_PRODUCT_STRING "\\Client"
 
#define BITMAP_CACHE_KEY   CLIENT_KEY "\\BitmapCacheV2"
 
#define GLYPH_CACHE_KEY   CLIENT_KEY "\\GlyphCache"
 
#define POINTER_CACHE_KEY   CLIENT_KEY "\\PointerCache"
 

Functions

static BOOL settings_reg_query_dword_val (HKEY hKey, const TCHAR *sub, DWORD *value)
 
static BOOL settings_reg_query_word_val (HKEY hKey, const TCHAR *sub, UINT16 *value)
 
static BOOL settings_reg_query_bool_val (HKEY hKey, const TCHAR *sub, BOOL *value)
 
static BOOL settings_reg_query_dword (rdpSettings *settings, size_t id, HKEY hKey, const TCHAR *sub)
 
static BOOL settings_reg_query_bool (rdpSettings *settings, size_t id, HKEY hKey, const TCHAR *sub)
 
static void settings_client_load_hkey_local_machine (rdpSettings *settings)
 
static void settings_server_load_hkey_local_machine (rdpSettings *settings)
 
static void settings_load_hkey_local_machine (rdpSettings *settings)
 
static BOOL settings_get_computer_name (rdpSettings *settings)
 
BOOL freerdp_settings_set_default_order_support (rdpSettings *settings)
 
BOOL freerdp_capability_buffer_allocate (rdpSettings *settings, UINT32 count)
 
rdpSettings * freerdp_settings_new (DWORD flags)
 creates a new setting struct More...
 
static void freerdp_settings_free_internal (rdpSettings *settings)
 
void freerdp_settings_free (rdpSettings *settings)
 Free a settings struct with all data in it. More...
 
static BOOL freerdp_settings_int_buffer_copy (rdpSettings *_settings, const rdpSettings *settings)
 
BOOL freerdp_settings_copy (rdpSettings *_settings, const rdpSettings *settings)
 Deep copies settings from src to dst. More...
 
rdpSettings * freerdp_settings_clone (const rdpSettings *settings)
 Creates a deep copy of settings. More...
 

Variables

static const char client_dll [] = "C:\\Windows\\System32\\mstscax.dll"
 

Macro Definition Documentation

◆ BITMAP_CACHE_KEY

#define BITMAP_CACHE_KEY   CLIENT_KEY "\\BitmapCacheV2"

◆ CLIENT_KEY

#define CLIENT_KEY   "Software\\" FREERDP_VENDOR_STRING "\\" FREERDP_PRODUCT_STRING "\\Client"

◆ GLYPH_CACHE_KEY

#define GLYPH_CACHE_KEY   CLIENT_KEY "\\GlyphCache"

◆ POINTER_CACHE_KEY

#define POINTER_CACHE_KEY   CLIENT_KEY "\\PointerCache"

◆ SERVER_KEY

#define SERVER_KEY   "Software\\" FREERDP_VENDOR_STRING "\\" FREERDP_PRODUCT_STRING "\\Server"

◆ TAG

#define TAG   FREERDP_TAG("settings")

FreeRDP: A Remote Desktop Protocol Implementation RDP Settings

Copyright 2009-2011 Jay Sorg 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.

Function Documentation

◆ freerdp_capability_buffer_allocate()

BOOL freerdp_capability_buffer_allocate ( rdpSettings *  settings,
UINT32  count 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_clone()

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

◆ freerdp_settings_copy()

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

◆ freerdp_settings_free()

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

◆ freerdp_settings_free_internal()

static void freerdp_settings_free_internal ( rdpSettings *  settings)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_int_buffer_copy()

static BOOL freerdp_settings_int_buffer_copy ( rdpSettings *  _settings,
const rdpSettings *  settings 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_settings_new()

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

◆ freerdp_settings_set_default_order_support()

BOOL freerdp_settings_set_default_order_support ( rdpSettings *  settings)

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.

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

◆ settings_client_load_hkey_local_machine()

static void settings_client_load_hkey_local_machine ( rdpSettings *  settings)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ settings_get_computer_name()

static BOOL settings_get_computer_name ( rdpSettings *  settings)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ settings_load_hkey_local_machine()

static void settings_load_hkey_local_machine ( rdpSettings *  settings)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ settings_reg_query_bool()

static BOOL settings_reg_query_bool ( rdpSettings *  settings,
size_t  id,
HKEY  hKey,
const TCHAR sub 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ settings_reg_query_bool_val()

static BOOL settings_reg_query_bool_val ( HKEY  hKey,
const TCHAR sub,
BOOL *  value 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ settings_reg_query_dword()

static BOOL settings_reg_query_dword ( rdpSettings *  settings,
size_t  id,
HKEY  hKey,
const TCHAR sub 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ settings_reg_query_dword_val()

static BOOL settings_reg_query_dword_val ( HKEY  hKey,
const TCHAR sub,
DWORD *  value 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ settings_reg_query_word_val()

static BOOL settings_reg_query_word_val ( HKEY  hKey,
const TCHAR sub,
UINT16 value 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ settings_server_load_hkey_local_machine()

static void settings_server_load_hkey_local_machine ( rdpSettings *  settings)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ client_dll

const char client_dll[] = "C:\\Windows\\System32\\mstscax.dll"
static