Refactored settings getter/setter to stay compatible.

This commit is contained in:
Armin Novak 2019-05-08 14:35:25 +02:00
parent 6ac91924d5
commit 93bf375686
11 changed files with 280 additions and 193 deletions

View File

@ -251,7 +251,8 @@ BOOL freerdp_client_print_command_line_help_ex(int argc, char** argv,
printf(" %s connection.rdp /p:Pwd123! /f\n", name);
printf(" %s /u:CONTOSO\\JohnDoe /p:Pwd123! /v:rdp.contoso.com\n", name);
printf(" %s /u:JohnDoe /p:Pwd123! /w:1366 /h:768 /v:192.168.1.100:4489\n", name);
printf(" %s /u:JohnDoe /p:Pwd123! /vmconnect:C824F53E-95D2-46C6-9A18-23A5BB403532 /v:192.168.1.100\n", name);
printf(" %s /u:JohnDoe /p:Pwd123! /vmconnect:C824F53E-95D2-46C6-9A18-23A5BB403532 /v:192.168.1.100\n",
name);
printf("\n");
printf("Clipboard Redirection: +clipboard\n");
printf("\n");
@ -1165,7 +1166,6 @@ static int freerdp_detect_command_line_pre_filter(void* context, int index,
int argc, LPSTR* argv)
{
size_t length;
WINPR_UNUSED(context);
if (index == 1)
@ -1421,7 +1421,7 @@ static void activate_smartcard_logon_rdp(rdpSettings* settings)
{
settings->SmartcardLogon = TRUE;
/* TODO: why not? settings->UseRdpSecurityLayer = TRUE; */
freerdp_set_param_bool(settings, FreeRDP_PasswordIsSmartcardPin, TRUE);
freerdp_settings_set_bool(settings, FreeRDP_PasswordIsSmartcardPin, TRUE);
}
/**
@ -1547,7 +1547,6 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
CommandLineSwitchCase(arg, "v")
{
assert(arg->Value);
free(settings->ServerHostname);
settings->ServerHostname = NULL;
p = strchr(arg->Value, '[');
@ -1617,7 +1616,6 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
size_t count = 0;
char* cur = arg->Value;
assert(arg->Value);
settings->RedirectionPreferType = 0;
do
@ -1689,7 +1687,6 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
CommandLineSwitchCase(arg, "size")
{
assert(arg->Value);
p = strchr(arg->Value, 'x');
if (p)
@ -1968,7 +1965,6 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
if (arg->Flags & COMMAND_LINE_VALUE_PRESENT)
{
assert(arg->Value);
p = strchr(arg->Value, ':');
if (p)
@ -2013,7 +2009,6 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
{
char* atPtr;
assert(arg->Value);
/* value is [scheme://][user:password@]hostname:port */
p = strstr(arg->Value, "://");
@ -2555,7 +2550,6 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
if (arg->Flags & COMMAND_LINE_VALUE_PRESENT)
{
assert(arg->Value);
promptForPassword = (strncmp(arg->Value, "force", 6) == 0);
if (!promptForPassword)
@ -2593,7 +2587,6 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
CommandLineSwitchCase(arg, "tls-ciphers")
{
assert(arg->Value);
free(settings->AllowedTlsCiphers);
if (strcmp(arg->Value, "netmon") == 0)
@ -2754,7 +2747,6 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
CommandLineSwitchCase(arg, "codec-cache")
{
settings->BitmapCacheV3Enabled = TRUE;
assert(arg->Value);
if (strcmp(arg->Value, "rfx") == 0)
@ -2848,9 +2840,7 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
{
BYTE* base64 = NULL;
int length;
assert(arg->Value);
crypto_base64_decode((const char*)(arg->Value), (int) strlen(arg->Value),
&base64, &length);

View File

@ -641,7 +641,6 @@ BOOL freerdp_client_write_rdp_file(const rdpFile* file, const char* name, BOOL u
int status = 0;
WCHAR* unicodestr = NULL;
size = freerdp_client_write_rdp_file_buffer(file, NULL, 0);
buffer = (char*) calloc((size + 1), sizeof(char));
if (freerdp_client_write_rdp_file_buffer(file, buffer, size + 1) != size)
@ -658,6 +657,7 @@ BOOL freerdp_client_write_rdp_file(const rdpFile* file, const char* name, BOOL u
if (unicode)
{
int length;
if (size > INT_MAX)
{
free(buffer);
@ -740,7 +740,7 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
{
if (~((size_t) file->Domain))
{
if (!freerdp_set_param_string(settings, FreeRDP_Domain, file->Domain))
if (!freerdp_settings_set_string(settings, FreeRDP_Domain, file->Domain))
return FALSE;
}
@ -752,12 +752,12 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
if (!freerdp_parse_username(file->Username, &user, &domain))
return FALSE;
if (!freerdp_set_param_string(settings, FreeRDP_Username, user))
if (!freerdp_settings_set_string(settings, FreeRDP_Username, user))
return FALSE;
if (domain)
{
if (!freerdp_set_param_string(settings, FreeRDP_Domain, domain))
if (!freerdp_settings_set_string(settings, FreeRDP_Domain, domain))
return FALSE;
}
@ -767,7 +767,7 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
if (~((size_t)file->Password))
{
if (!freerdp_set_param_string(settings, FreeRDP_Password, file->Password))
if (!freerdp_settings_set_string(settings, FreeRDP_Password, file->Password))
return FALSE;
}
@ -779,75 +779,76 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
if (!freerdp_parse_hostname(file->FullAddress, &host, &port))
return FALSE;
if (!freerdp_set_param_string(settings, FreeRDP_ServerHostname, host))
if (!freerdp_settings_set_string(settings, FreeRDP_ServerHostname, host))
return FALSE;
free(host);
if (port > 0)
{
if (!freerdp_set_param_uint32(settings, FreeRDP_ServerPort, (UINT32) port))
if (!freerdp_settings_set_uint32(settings, FreeRDP_ServerPort, (UINT32) port))
return FALSE;
}
}
if (~file->ServerPort)
{
if (!freerdp_set_param_uint32(settings, FreeRDP_ServerPort, file->ServerPort))
if (!freerdp_settings_set_uint32(settings, FreeRDP_ServerPort, file->ServerPort))
return FALSE;
}
if (~file->DesktopWidth)
{
if (!freerdp_set_param_uint32(settings, FreeRDP_DesktopWidth, file->DesktopWidth))
if (!freerdp_settings_set_uint32(settings, FreeRDP_DesktopWidth, file->DesktopWidth))
return FALSE;
}
if (~file->DesktopHeight)
{
if (!freerdp_set_param_uint32(settings, FreeRDP_DesktopHeight, file->DesktopHeight))
if (!freerdp_settings_set_uint32(settings, FreeRDP_DesktopHeight, file->DesktopHeight))
return FALSE;
}
if (~file->SessionBpp)
{
if (!freerdp_set_param_uint32(settings, FreeRDP_ColorDepth, file->SessionBpp))
if (!freerdp_settings_set_uint32(settings, FreeRDP_ColorDepth, file->SessionBpp))
return FALSE;
}
if (~file->ConnectToConsole)
{
if (!freerdp_set_param_bool(settings, FreeRDP_ConsoleSession, file->ConnectToConsole))
if (!freerdp_settings_set_bool(settings, FreeRDP_ConsoleSession, file->ConnectToConsole))
return FALSE;
}
if (~file->AdministrativeSession)
{
if (!freerdp_set_param_bool(settings, FreeRDP_ConsoleSession, file->AdministrativeSession))
if (!freerdp_settings_set_bool(settings, FreeRDP_ConsoleSession, file->AdministrativeSession))
return FALSE;
}
if (~file->NegotiateSecurityLayer)
{
if (!freerdp_set_param_bool(settings, FreeRDP_NegotiateSecurityLayer, file->NegotiateSecurityLayer))
if (!freerdp_settings_set_bool(settings, FreeRDP_NegotiateSecurityLayer,
file->NegotiateSecurityLayer))
return FALSE;
}
if (~file->EnableCredSSPSupport)
{
if (!freerdp_set_param_bool(settings, FreeRDP_NlaSecurity, file->EnableCredSSPSupport))
if (!freerdp_settings_set_bool(settings, FreeRDP_NlaSecurity, file->EnableCredSSPSupport))
return FALSE;
}
if (~((size_t) file->AlternateShell))
{
if (!freerdp_set_param_string(settings, FreeRDP_AlternateShell, file->AlternateShell))
if (!freerdp_settings_set_string(settings, FreeRDP_AlternateShell, file->AlternateShell))
return FALSE;
}
if (~((size_t) file->ShellWorkingDirectory))
{
if (!freerdp_set_param_string(settings, FreeRDP_ShellWorkingDirectory,
if (!freerdp_settings_set_string(settings, FreeRDP_ShellWorkingDirectory,
file->ShellWorkingDirectory))
return FALSE;
}
@ -866,14 +867,14 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
* 1: The remote session will appear in a window.
* 2: The remote session will appear full screen.
*/
if (!freerdp_set_param_bool(settings, FreeRDP_Fullscreen,
if (!freerdp_settings_set_bool(settings, FreeRDP_Fullscreen,
(file->ScreenModeId == 2) ? TRUE : FALSE))
return FALSE;
}
if (~(file->SmartSizing))
{
if (!freerdp_set_param_bool(settings, FreeRDP_SmartSizing,
if (!freerdp_settings_set_bool(settings, FreeRDP_SmartSizing,
(file->SmartSizing == 1) ? TRUE : FALSE))
return FALSE;
}
@ -909,7 +910,7 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
if (~file->ConnectionType)
{
if (!freerdp_set_param_uint32(settings, FreeRDP_ConnectionType, file->ConnectionType))
if (!freerdp_settings_set_uint32(settings, FreeRDP_ConnectionType, file->ConnectionType))
return FALSE;
}
@ -917,25 +918,25 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
{
if (file->AudioMode == AUDIO_MODE_REDIRECT)
{
if (!freerdp_set_param_bool(settings, FreeRDP_AudioPlayback, TRUE))
if (!freerdp_settings_set_bool(settings, FreeRDP_AudioPlayback, TRUE))
return FALSE;
}
else if (file->AudioMode == AUDIO_MODE_PLAY_ON_SERVER)
{
if (!freerdp_set_param_bool(settings, FreeRDP_RemoteConsoleAudio, TRUE))
if (!freerdp_settings_set_bool(settings, FreeRDP_RemoteConsoleAudio, TRUE))
return FALSE;
}
else if (file->AudioMode == AUDIO_MODE_NONE)
{
if (!freerdp_set_param_bool(settings, FreeRDP_AudioPlayback, FALSE) ||
!freerdp_set_param_bool(settings, FreeRDP_RemoteConsoleAudio, FALSE))
if (!freerdp_settings_set_bool(settings, FreeRDP_AudioPlayback, FALSE) ||
!freerdp_settings_set_bool(settings, FreeRDP_RemoteConsoleAudio, FALSE))
return FALSE;
}
}
if (~file->Compression)
{
if (!freerdp_set_param_bool(settings, FreeRDP_CompressionEnabled, file->Compression))
if (!freerdp_settings_set_bool(settings, FreeRDP_CompressionEnabled, file->Compression))
return FALSE;
}
@ -947,21 +948,21 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
if (!freerdp_parse_hostname(file->GatewayHostname, &host, &port))
return FALSE;
if (!freerdp_set_param_string(settings, FreeRDP_GatewayHostname, host))
if (!freerdp_settings_set_string(settings, FreeRDP_GatewayHostname, host))
return FALSE;
free(host);
if (port > 0)
{
if (!freerdp_set_param_uint32(settings, FreeRDP_GatewayPort, (UINT32) port))
if (!freerdp_settings_set_uint32(settings, FreeRDP_GatewayPort, (UINT32) port))
return FALSE;
}
}
if (~((size_t) file->GatewayAccessToken))
{
if (!freerdp_set_param_string(settings, FreeRDP_GatewayAccessToken, file->GatewayAccessToken))
if (!freerdp_settings_set_string(settings, FreeRDP_GatewayAccessToken, file->GatewayAccessToken))
return FALSE;
}
@ -973,164 +974,166 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
if (~file->PromptCredentialOnce)
{
if (!freerdp_set_param_bool(settings, FreeRDP_GatewayUseSameCredentials,
if (!freerdp_settings_set_bool(settings, FreeRDP_GatewayUseSameCredentials,
file->PromptCredentialOnce))
return FALSE;
}
if (~file->RemoteApplicationMode)
{
if (!freerdp_set_param_bool(settings, FreeRDP_RemoteApplicationMode, file->RemoteApplicationMode))
if (!freerdp_settings_set_bool(settings, FreeRDP_RemoteApplicationMode,
file->RemoteApplicationMode))
return FALSE;
}
if (~((size_t) file->RemoteApplicationProgram))
{
if (!freerdp_set_param_string(settings, FreeRDP_RemoteApplicationProgram,
if (!freerdp_settings_set_string(settings, FreeRDP_RemoteApplicationProgram,
file->RemoteApplicationProgram))
return FALSE;
}
if (~((size_t) file->RemoteApplicationName))
{
if (!freerdp_set_param_string(settings, FreeRDP_RemoteApplicationName,
if (!freerdp_settings_set_string(settings, FreeRDP_RemoteApplicationName,
file->RemoteApplicationName))
return FALSE;
}
if (~((size_t) file->RemoteApplicationIcon))
{
if (!freerdp_set_param_string(settings, FreeRDP_RemoteApplicationIcon,
if (!freerdp_settings_set_string(settings, FreeRDP_RemoteApplicationIcon,
file->RemoteApplicationIcon))
return FALSE;
}
if (~((size_t) file->RemoteApplicationFile))
{
if (freerdp_set_param_string(settings, FreeRDP_RemoteApplicationGuid,
if (freerdp_settings_set_string(settings, FreeRDP_RemoteApplicationGuid,
file->RemoteApplicationGuid) != 0)
return FALSE;
}
if (~((size_t) file->RemoteApplicationCmdLine))
{
if (!freerdp_set_param_string(settings, FreeRDP_RemoteApplicationCmdLine,
if (!freerdp_settings_set_string(settings, FreeRDP_RemoteApplicationCmdLine,
file->RemoteApplicationCmdLine))
return FALSE;
}
if (~file->SpanMonitors)
{
if (!freerdp_set_param_bool(settings, FreeRDP_SpanMonitors, file->SpanMonitors))
if (!freerdp_settings_set_bool(settings, FreeRDP_SpanMonitors, file->SpanMonitors))
return FALSE;
}
if (~file->UseMultiMon)
{
if (!freerdp_set_param_bool(settings, FreeRDP_UseMultimon, file->UseMultiMon))
if (!freerdp_settings_set_bool(settings, FreeRDP_UseMultimon, file->UseMultiMon))
return FALSE;
}
if (~file->AllowFontSmoothing)
{
if (!freerdp_set_param_bool(settings, FreeRDP_AllowFontSmoothing, file->AllowFontSmoothing))
if (!freerdp_settings_set_bool(settings, FreeRDP_AllowFontSmoothing, file->AllowFontSmoothing))
return FALSE;
}
if (~file->DisableWallpaper)
{
if (!freerdp_set_param_bool(settings, FreeRDP_DisableWallpaper, file->DisableWallpaper))
if (!freerdp_settings_set_bool(settings, FreeRDP_DisableWallpaper, file->DisableWallpaper))
return FALSE;
}
if (~file->DisableFullWindowDrag)
{
if (!freerdp_set_param_bool(settings, FreeRDP_DisableFullWindowDrag, file->DisableFullWindowDrag))
if (!freerdp_settings_set_bool(settings, FreeRDP_DisableFullWindowDrag,
file->DisableFullWindowDrag))
return FALSE;
}
if (~file->DisableMenuAnims)
{
if (!freerdp_set_param_bool(settings, FreeRDP_DisableMenuAnims, file->DisableMenuAnims))
if (!freerdp_settings_set_bool(settings, FreeRDP_DisableMenuAnims, file->DisableMenuAnims))
return FALSE;
}
if (~file->DisableThemes)
{
if (!freerdp_set_param_bool(settings, FreeRDP_DisableThemes, file->DisableThemes))
if (!freerdp_settings_set_bool(settings, FreeRDP_DisableThemes, file->DisableThemes))
return FALSE;
}
if (~file->AllowDesktopComposition)
{
if (!freerdp_set_param_bool(settings, FreeRDP_AllowDesktopComposition,
if (!freerdp_settings_set_bool(settings, FreeRDP_AllowDesktopComposition,
file->AllowDesktopComposition))
return FALSE;
}
if (~file->BitmapCachePersistEnable)
{
if (!freerdp_set_param_bool(settings, FreeRDP_BitmapCachePersistEnabled,
if (!freerdp_settings_set_bool(settings, FreeRDP_BitmapCachePersistEnabled,
file->BitmapCachePersistEnable))
return FALSE;
}
if (~file->DisableRemoteAppCapsCheck)
{
if (!freerdp_set_param_bool(settings, FreeRDP_DisableRemoteAppCapsCheck,
if (!freerdp_settings_set_bool(settings, FreeRDP_DisableRemoteAppCapsCheck,
file->DisableRemoteAppCapsCheck))
return FALSE;
}
if (~file->AutoReconnectionEnabled)
{
if (!freerdp_set_param_bool(settings, FreeRDP_AutoReconnectionEnabled,
if (!freerdp_settings_set_bool(settings, FreeRDP_AutoReconnectionEnabled,
file->AutoReconnectionEnabled))
return FALSE;
}
if (~file->AutoReconnectMaxRetries)
{
if (!freerdp_set_param_uint32(settings, FreeRDP_AutoReconnectMaxRetries,
if (!freerdp_settings_set_uint32(settings, FreeRDP_AutoReconnectMaxRetries,
file->AutoReconnectMaxRetries))
return FALSE;
}
if (~file->RedirectSmartCards)
{
if (!freerdp_set_param_bool(settings, FreeRDP_RedirectSmartCards, file->RedirectSmartCards))
if (!freerdp_settings_set_bool(settings, FreeRDP_RedirectSmartCards, file->RedirectSmartCards))
return FALSE;
}
if (~file->RedirectClipboard)
{
if (!freerdp_set_param_bool(settings, FreeRDP_RedirectClipboard, file->RedirectClipboard))
if (!freerdp_settings_set_bool(settings, FreeRDP_RedirectClipboard, file->RedirectClipboard))
return FALSE;
}
if (~file->RedirectPrinters)
{
if (!freerdp_set_param_bool(settings, FreeRDP_RedirectPrinters, file->RedirectPrinters))
if (!freerdp_settings_set_bool(settings, FreeRDP_RedirectPrinters, file->RedirectPrinters))
return FALSE;
}
if (~file->RedirectDrives)
{
if (!freerdp_set_param_bool(settings, FreeRDP_RedirectDrives, file->RedirectDrives))
if (!freerdp_settings_set_bool(settings, FreeRDP_RedirectDrives, file->RedirectDrives))
return FALSE;
}
if (~file->RedirectPosDevices)
{
if (!freerdp_set_param_bool(settings, FreeRDP_RedirectSerialPorts, file->RedirectComPorts) ||
!freerdp_set_param_bool(settings, FreeRDP_RedirectParallelPorts, file->RedirectComPorts))
if (!freerdp_settings_set_bool(settings, FreeRDP_RedirectSerialPorts, file->RedirectComPorts) ||
!freerdp_settings_set_bool(settings, FreeRDP_RedirectParallelPorts, file->RedirectComPorts))
return FALSE;
}
if (~file->RedirectComPorts)
{
if (!freerdp_set_param_bool(settings, FreeRDP_RedirectSerialPorts, file->RedirectComPorts) ||
!freerdp_set_param_bool(settings, FreeRDP_RedirectParallelPorts, file->RedirectComPorts))
if (!freerdp_settings_set_bool(settings, FreeRDP_RedirectSerialPorts, file->RedirectComPorts) ||
!freerdp_settings_set_bool(settings, FreeRDP_RedirectParallelPorts, file->RedirectComPorts))
return FALSE;
}
@ -1165,7 +1168,7 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
* devicestoredirect:s:USB\VID_04A9&PID_30C1\6&4BD985D&0&2;,DynamicDevices
*
*/
freerdp_set_param_bool(settings, FreeRDP_RedirectDrives, TRUE);
freerdp_settings_set_bool(settings, FreeRDP_RedirectDrives, TRUE);
}
if (~((size_t) file->DrivesToRedirect))
@ -1178,21 +1181,21 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
*/
const BOOL empty = !file->DrivesToRedirect || (strlen(file->DrivesToRedirect) == 0);
if (!freerdp_set_param_bool(settings, FreeRDP_RedirectDrives, !empty))
if (!freerdp_settings_set_bool(settings, FreeRDP_RedirectDrives, !empty))
return FALSE;
}
if (~file->KeyboardHook)
{
if (!freerdp_set_param_uint32(settings, FreeRDP_KeyboardHook, file->KeyboardHook))
if (!freerdp_settings_set_uint32(settings, FreeRDP_KeyboardHook, file->KeyboardHook))
return FALSE;
}
if (~((size_t) file->PreconnectionBlob))
{
if (!freerdp_set_param_string(settings, FreeRDP_PreconnectionBlob, file->PreconnectionBlob) ||
!freerdp_set_param_bool(settings, FreeRDP_SendPreconnectionPdu, TRUE) ||
!freerdp_set_param_bool(settings, FreeRDP_VmConnectMode, TRUE))
if (!freerdp_settings_set_string(settings, FreeRDP_PreconnectionBlob, file->PreconnectionBlob) ||
!freerdp_settings_set_bool(settings, FreeRDP_SendPreconnectionPdu, TRUE) ||
!freerdp_settings_set_bool(settings, FreeRDP_VmConnectMode, TRUE))
return FALSE;
}

View File

@ -1576,31 +1576,50 @@ FREERDP_API BOOL freerdp_set_gateway_usage_method(rdpSettings* settings, UINT32
FREERDP_API void freerdp_update_gateway_usage_method(rdpSettings* settings, UINT32 GatewayEnabled,
UINT32 GatewayBypassLocal);
FREERDP_API BOOL freerdp_get_param_bool(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_set_param_bool(rdpSettings* settings, size_t id, BOOL param);
/* DEPRECATED:
* the functions freerdp_get_param_* and freerdp_set_param_* are deprecated.
* use freerdp_settings_get_* and freerdp_settings_set_* as a replacement!
*/
FREERDP_API BOOL freerdp_get_param_bool(rdpSettings* settings, int id);
FREERDP_API int freerdp_set_param_bool(rdpSettings* settings, int id, BOOL param);
FREERDP_API INT16 freerdp_get_param_int16(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_set_param_int16(rdpSettings* settings, size_t id, INT16 param);
FREERDP_API int freerdp_get_param_int(rdpSettings* settings, int id);
FREERDP_API int freerdp_set_param_int(rdpSettings* settings, int id, int param);
FREERDP_API UINT16 freerdp_get_param_uint16(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_set_param_uint16(rdpSettings* settings, size_t id, UINT16 param);
FREERDP_API UINT32 freerdp_get_param_uint32(rdpSettings* settings, int id);
FREERDP_API int freerdp_set_param_uint32(rdpSettings* settings, int id, UINT32 param);
FREERDP_API INT32 freerdp_get_param_int32(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_set_param_int32(rdpSettings* settings, size_t id, INT32 param);
FREERDP_API UINT64 freerdp_get_param_uint64(rdpSettings* settings, int id);
FREERDP_API int freerdp_set_param_uint64(rdpSettings* settings, int id, UINT64 param);
FREERDP_API UINT32 freerdp_get_param_uint32(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_set_param_uint32(rdpSettings* settings, size_t id, UINT32 param);
FREERDP_API char* freerdp_get_param_string(rdpSettings* settings, int id);
FREERDP_API int freerdp_set_param_string(rdpSettings* settings, int id, const char* param);
FREERDP_API INT64 freerdp_get_param_int64(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_set_param_int64(rdpSettings* settings, size_t id, INT64 param);
FREERDP_API BOOL freerdp_settings_get_bool(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_settings_set_bool(rdpSettings* settings, size_t id, BOOL param);
FREERDP_API UINT64 freerdp_get_param_uint64(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_set_param_uint64(rdpSettings* settings, size_t id, UINT64 param);
FREERDP_API INT16 freerdp_settings_get_int16(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_settings_set_int16(rdpSettings* settings, size_t id, INT16 param);
FREERDP_API const char* freerdp_get_param_string(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_set_param_string(rdpSettings* settings, size_t id, const char* param);
FREERDP_API UINT16 freerdp_settings_get_uint16(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_settings_set_uint16(rdpSettings* settings, size_t id, UINT16 param);
FREERDP_API const void* freerdp_get_param_pointer(rdpSettings* settings, size_t id);
FREERDP_API INT32 freerdp_settings_get_int32(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_settings_set_int32(rdpSettings* settings, size_t id, INT32 param);
FREERDP_API UINT32 freerdp_settings_get_uint32(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_settings_set_uint32(rdpSettings* settings, size_t id, UINT32 param);
FREERDP_API INT64 freerdp_settings_get_int64(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_settings_set_int64(rdpSettings* settings, size_t id, INT64 param);
FREERDP_API UINT64 freerdp_settings_get_uint64(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_settings_set_uint64(rdpSettings* settings, size_t id, UINT64 param);
FREERDP_API const char* freerdp_settings_get_string(rdpSettings* settings, size_t id);
FREERDP_API BOOL freerdp_settings_set_string(rdpSettings* settings, size_t id, const char* param);
FREERDP_API const void* freerdp_settings_get_pointer(rdpSettings* settings, size_t id);
#ifdef __cplusplus
}

View File

@ -1155,50 +1155,50 @@ BOOL freerdp_assistance_populate_settings_from_assistance_file(rdpAssistanceFile
rdpSettings* settings)
{
UINT32 i;
freerdp_set_param_bool(settings, FreeRDP_RemoteAssistanceMode, TRUE);
freerdp_settings_set_bool(settings, FreeRDP_RemoteAssistanceMode, TRUE);
if (!file->RASessionId || !file->MachineAddresses)
return FALSE;
if (!freerdp_set_param_string(settings, FreeRDP_RemoteAssistanceSessionId, file->RASessionId))
if (!freerdp_settings_set_string(settings, FreeRDP_RemoteAssistanceSessionId, file->RASessionId))
return FALSE;
if (file->RCTicket)
{
if (!freerdp_set_param_string(settings, FreeRDP_RemoteAssistanceRCTicket, file->RCTicket))
if (!freerdp_settings_set_string(settings, FreeRDP_RemoteAssistanceRCTicket, file->RCTicket))
return FALSE;
}
else
{
if (!freerdp_set_param_string(settings, FreeRDP_RemoteAssistanceRCTicket,
if (!freerdp_settings_set_string(settings, FreeRDP_RemoteAssistanceRCTicket,
file->ConnectionString2))
return FALSE;
}
if (file->PassStub)
{
if (!freerdp_set_param_string(settings, FreeRDP_RemoteAssistancePassStub, file->PassStub))
if (!freerdp_settings_set_string(settings, FreeRDP_RemoteAssistancePassStub, file->PassStub))
return FALSE;
}
if (!freerdp_set_param_string(settings, FreeRDP_ServerHostname, file->MachineAddresses[0]))
if (!freerdp_settings_set_string(settings, FreeRDP_ServerHostname, file->MachineAddresses[0]))
return FALSE;
if (!freerdp_set_param_string(settings, FreeRDP_AssistanceFile, file->filename))
if (!freerdp_settings_set_string(settings, FreeRDP_AssistanceFile, file->filename))
return FALSE;
if (!freerdp_set_param_string(settings, FreeRDP_RemoteAssistancePassword, file->password))
if (!freerdp_settings_set_string(settings, FreeRDP_RemoteAssistancePassword, file->password))
return FALSE;
if (file->Username)
{
if (!freerdp_set_param_string(settings, FreeRDP_Username, file->Username))
if (!freerdp_settings_set_string(settings, FreeRDP_Username, file->Username))
return FALSE;
}
settings->RemoteAssistanceMode = TRUE;
if (!freerdp_set_param_uint32(settings, FreeRDP_ServerPort, file->MachinePorts[0]))
if (!freerdp_settings_set_uint32(settings, FreeRDP_ServerPort, file->MachinePorts[0]))
return FALSE;
freerdp_target_net_addresses_free(settings);

View File

@ -697,25 +697,25 @@ void freerdp_performance_flags_split(rdpSettings* settings)
BOOL freerdp_set_gateway_usage_method(rdpSettings* settings, UINT32 GatewayUsageMethod)
{
if (!freerdp_set_param_uint32(settings, FreeRDP_GatewayUsageMethod, GatewayUsageMethod))
if (!freerdp_settings_set_uint32(settings, FreeRDP_GatewayUsageMethod, GatewayUsageMethod))
return FALSE;
if (GatewayUsageMethod == TSC_PROXY_MODE_NONE_DIRECT)
{
if (!freerdp_set_param_bool(settings, FreeRDP_GatewayEnabled, FALSE) ||
!freerdp_set_param_bool(settings, FreeRDP_GatewayBypassLocal, FALSE))
if (!freerdp_settings_set_bool(settings, FreeRDP_GatewayEnabled, FALSE) ||
!freerdp_settings_set_bool(settings, FreeRDP_GatewayBypassLocal, FALSE))
return FALSE;
}
else if (GatewayUsageMethod == TSC_PROXY_MODE_DIRECT)
{
if (!freerdp_set_param_bool(settings, FreeRDP_GatewayEnabled, TRUE) ||
!freerdp_set_param_bool(settings, FreeRDP_GatewayBypassLocal, FALSE))
if (!freerdp_settings_set_bool(settings, FreeRDP_GatewayEnabled, TRUE) ||
!freerdp_settings_set_bool(settings, FreeRDP_GatewayBypassLocal, FALSE))
return FALSE;
}
else if (GatewayUsageMethod == TSC_PROXY_MODE_DETECT)
{
if (!freerdp_set_param_bool(settings, FreeRDP_GatewayEnabled, TRUE) ||
!freerdp_set_param_bool(settings, FreeRDP_GatewayBypassLocal, TRUE))
if (!freerdp_settings_set_bool(settings, FreeRDP_GatewayEnabled, TRUE) ||
!freerdp_settings_set_bool(settings, FreeRDP_GatewayBypassLocal, TRUE))
return FALSE;
}
else if (GatewayUsageMethod == TSC_PROXY_MODE_DEFAULT)
@ -725,14 +725,14 @@ BOOL freerdp_set_gateway_usage_method(rdpSettings* settings, UINT32 GatewayUsage
* which means the client attempts to use gateway group policy settings
* http://technet.microsoft.com/en-us/library/cc770601.aspx
*/
if (!freerdp_set_param_bool(settings, FreeRDP_GatewayEnabled, FALSE) ||
!freerdp_set_param_bool(settings, FreeRDP_GatewayBypassLocal, FALSE))
if (!freerdp_settings_set_bool(settings, FreeRDP_GatewayEnabled, FALSE) ||
!freerdp_settings_set_bool(settings, FreeRDP_GatewayBypassLocal, FALSE))
return FALSE;
}
else if (GatewayUsageMethod == TSC_PROXY_MODE_NONE_DETECT)
{
if (!freerdp_set_param_bool(settings, FreeRDP_GatewayEnabled, FALSE) ||
!freerdp_set_param_bool(settings, FreeRDP_GatewayBypassLocal, FALSE))
if (!freerdp_settings_set_bool(settings, FreeRDP_GatewayEnabled, FALSE) ||
!freerdp_settings_set_bool(settings, FreeRDP_GatewayBypassLocal, FALSE))
return FALSE;
}
@ -753,3 +753,53 @@ void freerdp_update_gateway_usage_method(rdpSettings* settings, UINT32 GatewayEn
freerdp_set_gateway_usage_method(settings, GatewayUsageMethod);
}
BOOL freerdp_get_param_bool(rdpSettings* settings, int id)
{
return freerdp_settings_get_bool(settings, (size_t)id);
}
int freerdp_set_param_bool(rdpSettings* settings, int id, BOOL param)
{
return freerdp_settings_set_bool(settings, (size_t)id, param) ? 0 : -1;
}
int freerdp_get_param_int(rdpSettings* settings, int id)
{
return freerdp_settings_get_int32(settings, (size_t)id);
}
int freerdp_set_param_int(rdpSettings* settings, int id, int param)
{
return freerdp_settings_set_int32(settings, (size_t)id, param) ? 0 : -1;
}
UINT32 freerdp_get_param_uint32(rdpSettings* settings, int id)
{
return freerdp_settings_get_uint32(settings, (size_t)id);
}
int freerdp_set_param_uint32(rdpSettings* settings, int id, UINT32 param)
{
return freerdp_settings_set_uint32(settings, (size_t)id, param) ? 0 : -1;
}
UINT64 freerdp_get_param_uint64(rdpSettings* settings, int id)
{
return freerdp_settings_get_uint64(settings, (size_t)id);
}
int freerdp_set_param_uint64(rdpSettings* settings, int id, UINT64 param)
{
return freerdp_settings_set_uint64(settings, (size_t)id, param) ? 0 : -1;
}
char* freerdp_get_param_string(rdpSettings* settings, int id)
{
return (char*)freerdp_settings_get_string(settings, (size_t)id);
}
int freerdp_set_param_string(rdpSettings* settings, int id, const char* param)
{
return freerdp_settings_set_string(settings, (size_t)id, param) ? 0 : -1;
}

View File

@ -5,7 +5,7 @@
#define TAG FREERDP_TAG("common.settings")
BOOL freerdp_get_param_bool(rdpSettings* settings, size_t id)
BOOL freerdp_settings_get_bool(rdpSettings* settings, size_t id)
{
if (!settings)
return FALSE;
@ -498,7 +498,7 @@ BOOL freerdp_get_param_bool(rdpSettings* settings, size_t id)
}
}
BOOL freerdp_set_param_bool(rdpSettings* settings, size_t id, BOOL val)
BOOL freerdp_settings_set_bool(rdpSettings* settings, size_t id, BOOL val)
{
if (!settings)
return FALSE;
@ -1153,7 +1153,7 @@ BOOL freerdp_set_param_bool(rdpSettings* settings, size_t id, BOOL val)
return TRUE;
}
UINT16 freerdp_get_param_uint16(rdpSettings* settings, size_t id)
UINT16 freerdp_settings_get_uint16(rdpSettings* settings, size_t id)
{
if (!settings)
return FALSE;
@ -1172,7 +1172,7 @@ UINT16 freerdp_get_param_uint16(rdpSettings* settings, size_t id)
}
}
BOOL freerdp_set_param_uint16(rdpSettings* settings, size_t id, UINT16 val)
BOOL freerdp_settings_set_uint16(rdpSettings* settings, size_t id, UINT16 val)
{
if (!settings)
return FALSE;
@ -1195,7 +1195,7 @@ BOOL freerdp_set_param_uint16(rdpSettings* settings, size_t id, UINT16 val)
return TRUE;
}
INT16 freerdp_get_param_int16(rdpSettings* settings, size_t id)
INT16 freerdp_settings_get_int16(rdpSettings* settings, size_t id)
{
if (!settings)
return FALSE;
@ -1208,7 +1208,7 @@ INT16 freerdp_get_param_int16(rdpSettings* settings, size_t id)
}
}
BOOL freerdp_set_param_int16(rdpSettings* settings, size_t id, INT16 val)
BOOL freerdp_settings_set_int16(rdpSettings* settings, size_t id, INT16 val)
{
if (!settings)
return FALSE;
@ -1223,7 +1223,7 @@ BOOL freerdp_set_param_int16(rdpSettings* settings, size_t id, INT16 val)
return TRUE;
}
UINT32 freerdp_get_param_uint32(rdpSettings* settings, size_t id)
UINT32 freerdp_settings_get_uint32(rdpSettings* settings, size_t id)
{
if (!settings)
return FALSE;
@ -1425,6 +1425,9 @@ UINT32 freerdp_get_param_uint32(rdpSettings* settings, size_t id)
case FreeRDP_RemoteWndSupportLevel:
return settings->RemoteWndSupportLevel;
case FreeRDP_RemoteApplicationSupportLevel:
return settings->RemoteApplicationSupportLevel;
case FreeRDP_ReceivedCapabilitiesSize:
return settings->ReceivedCapabilitiesSize;
@ -1512,6 +1515,9 @@ UINT32 freerdp_get_param_uint32(rdpSettings* settings, size_t id)
case FreeRDP_JpegQuality:
return settings->JpegQuality;
case FreeRDP_GfxCapsFilter:
return settings->GfxCapsFilter;
case FreeRDP_BitmapCacheV3CodecId:
return settings->BitmapCacheV3CodecId;
@ -1545,7 +1551,7 @@ UINT32 freerdp_get_param_uint32(rdpSettings* settings, size_t id)
}
}
BOOL freerdp_set_param_uint32(rdpSettings* settings, size_t id, UINT32 val)
BOOL freerdp_settings_set_uint32(rdpSettings* settings, size_t id, UINT32 val)
{
if (!settings)
return FALSE;
@ -1812,6 +1818,10 @@ BOOL freerdp_set_param_uint32(rdpSettings* settings, size_t id, UINT32 val)
settings->RemoteWndSupportLevel = val;
break;
case FreeRDP_RemoteApplicationSupportLevel:
settings->RemoteApplicationSupportLevel = val;
break;
case FreeRDP_ReceivedCapabilitiesSize:
settings->ReceivedCapabilitiesSize = val;
break;
@ -1928,6 +1938,10 @@ BOOL freerdp_set_param_uint32(rdpSettings* settings, size_t id, UINT32 val)
settings->JpegQuality = val;
break;
case FreeRDP_GfxCapsFilter:
settings->GfxCapsFilter = val;
break;
case FreeRDP_BitmapCacheV3CodecId:
settings->BitmapCacheV3CodecId = val;
break;
@ -1972,7 +1986,7 @@ BOOL freerdp_set_param_uint32(rdpSettings* settings, size_t id, UINT32 val)
return TRUE;
}
INT32 freerdp_get_param_int32(rdpSettings* settings, size_t id)
INT32 freerdp_settings_get_int32(rdpSettings* settings, size_t id)
{
if (!settings)
return FALSE;
@ -1991,7 +2005,7 @@ INT32 freerdp_get_param_int32(rdpSettings* settings, size_t id)
}
}
BOOL freerdp_set_param_int32(rdpSettings* settings, size_t id, INT32 val)
BOOL freerdp_settings_set_int32(rdpSettings* settings, size_t id, INT32 val)
{
if (!settings)
return FALSE;
@ -2014,7 +2028,7 @@ BOOL freerdp_set_param_int32(rdpSettings* settings, size_t id, INT32 val)
return TRUE;
}
UINT64 freerdp_get_param_uint64(rdpSettings* settings, size_t id)
UINT64 freerdp_settings_get_uint64(rdpSettings* settings, size_t id)
{
if (!settings)
return FALSE;
@ -2030,7 +2044,7 @@ UINT64 freerdp_get_param_uint64(rdpSettings* settings, size_t id)
}
}
BOOL freerdp_set_param_uint64(rdpSettings* settings, size_t id, UINT64 val)
BOOL freerdp_settings_set_uint64(rdpSettings* settings, size_t id, UINT64 val)
{
if (!settings)
return FALSE;
@ -2049,7 +2063,7 @@ BOOL freerdp_set_param_uint64(rdpSettings* settings, size_t id, UINT64 val)
return TRUE;
}
INT64 freerdp_get_param_int64(rdpSettings* settings, size_t id)
INT64 freerdp_settings_get_int64(rdpSettings* settings, size_t id)
{
if (!settings)
return FALSE;
@ -2062,7 +2076,7 @@ INT64 freerdp_get_param_int64(rdpSettings* settings, size_t id)
}
}
BOOL freerdp_set_param_int64(rdpSettings* settings, size_t id, INT64 val)
BOOL freerdp_settings_set_int64(rdpSettings* settings, size_t id, INT64 val)
{
if (!settings)
return FALSE;
@ -2077,7 +2091,7 @@ BOOL freerdp_set_param_int64(rdpSettings* settings, size_t id, INT64 val)
return TRUE;
}
const char* freerdp_get_param_string(rdpSettings* settings, size_t id)
const char* freerdp_settings_get_string(rdpSettings* settings, size_t id)
{
if (!settings)
return FALSE;
@ -2279,7 +2293,7 @@ const char* freerdp_get_param_string(rdpSettings* settings, size_t id)
}
}
BOOL freerdp_set_param_string(rdpSettings* settings, size_t id, const char* val)
BOOL freerdp_settings_set_string(rdpSettings* settings, size_t id, const char* val)
{
if (!settings)
return FALSE;
@ -2609,7 +2623,7 @@ BOOL freerdp_set_param_string(rdpSettings* settings, size_t id, const char* val)
return TRUE;
}
const void* freerdp_get_param_pointer(rdpSettings* settings, size_t id)
const void* freerdp_settings_get_pointer(rdpSettings* settings, size_t id)
{
if (!settings)
return FALSE;

View File

@ -569,27 +569,35 @@ static int peer_recv_callback(rdpTransport* transport, wStream* s, void* extra)
case CONNECTION_STATE_LICENSING:
{
LicenseCallbackResult res;
if (!client->LicenseCallback)
{
WLog_ERR(TAG, "peer_recv_callback: LicenseCallback has been removed, assuming licensing is ok (please fix your app)");
WLog_ERR(TAG,
"peer_recv_callback: LicenseCallback has been removed, assuming licensing is ok (please fix your app)");
res = LICENSE_CB_COMPLETED;
}
else
res = client->LicenseCallback(client, s);
switch(res) {
switch (res)
{
case LICENSE_CB_INTERNAL_ERROR:
WLog_ERR(TAG, "peer_recv_callback: CONNECTION_STATE_LICENSING - callback internal error, aborting");
return -1;
case LICENSE_CB_ABORT:
return -1;
case LICENSE_CB_IN_PROGRESS:
break;
case LICENSE_CB_COMPLETED:
rdp_server_transition_to_state(rdp, CONNECTION_STATE_CAPABILITIES_EXCHANGE);
return peer_recv_callback(transport, NULL, extra);
default:
WLog_ERR(TAG, "peer_recv_callback: CONNECTION_STATE_LICENSING - unknown license callback result %d", (int)res);
WLog_ERR(TAG, "peer_recv_callback: CONNECTION_STATE_LICENSING - unknown license callback result %d",
(int)res);
break;
}
@ -680,7 +688,7 @@ static BOOL freerdp_peer_close(freerdp_peer* client)
if (!rdp_send_deactivate_all(client->context->rdp))
return FALSE;
if (freerdp_get_param_bool(client->settings, FreeRDP_SupportErrorInfoPdu))
if (freerdp_settings_get_bool(client->settings, FreeRDP_SupportErrorInfoPdu))
{
rdp_send_error_info(client->context->rdp);
}

View File

@ -33,9 +33,9 @@ int TestSettings(int argc, char* argv[])
for (x = 0; x < ARRAYSIZE(bool_list_indices); x++)
{
const size_t key = bool_list_indices[x];
const BOOL val = freerdp_get_param_bool(settings, key);
const BOOL val = freerdp_settings_get_bool(settings, key);
if (!freerdp_set_param_bool(settings, key, val))
if (!freerdp_settings_set_bool(settings, key, val))
goto fail;
}
@ -45,9 +45,9 @@ int TestSettings(int argc, char* argv[])
for (x = 0; x < ARRAYSIZE(int16_list_indices); x++)
{
const size_t key = int16_list_indices[x];
const INT16 val = freerdp_get_param_int16(settings, key);
const INT16 val = freerdp_settings_get_int16(settings, key);
if (!freerdp_set_param_int16(settings, key, val))
if (!freerdp_settings_set_int16(settings, key, val))
goto fail;
}
@ -57,9 +57,9 @@ int TestSettings(int argc, char* argv[])
for (x = 0; x < ARRAYSIZE(uint16_list_indices); x++)
{
const size_t key = uint16_list_indices[x];
const UINT16 val = freerdp_get_param_uint16(settings, key);
const UINT16 val = freerdp_settings_get_uint16(settings, key);
if (!freerdp_set_param_uint16(settings, key, val))
if (!freerdp_settings_set_uint16(settings, key, val))
goto fail;
}
@ -69,9 +69,9 @@ int TestSettings(int argc, char* argv[])
for (x = 0; x < ARRAYSIZE(uint32_list_indices); x++)
{
const size_t key = uint32_list_indices[x];
const UINT32 val = freerdp_get_param_uint32(settings, key);
const UINT32 val = freerdp_settings_get_uint32(settings, key);
if (!freerdp_set_param_uint32(settings, key, val))
if (!freerdp_settings_set_uint32(settings, key, val))
goto fail;
}
@ -81,9 +81,9 @@ int TestSettings(int argc, char* argv[])
for (x = 0; x < ARRAYSIZE(int32_list_indices); x++)
{
const size_t key = int32_list_indices[x];
const INT32 val = freerdp_get_param_int32(settings, key);
const INT32 val = freerdp_settings_get_int32(settings, key);
if (!freerdp_set_param_int32(settings, key, val))
if (!freerdp_settings_set_int32(settings, key, val))
goto fail;
}
@ -93,9 +93,9 @@ int TestSettings(int argc, char* argv[])
for (x = 0; x < ARRAYSIZE(uint64_list_indices); x++)
{
const size_t key = uint64_list_indices[x];
const UINT64 val = freerdp_get_param_uint64(settings, key);
const UINT64 val = freerdp_settings_get_uint64(settings, key);
if (!freerdp_set_param_uint64(settings, key, val))
if (!freerdp_settings_set_uint64(settings, key, val))
goto fail;
}
@ -105,9 +105,9 @@ int TestSettings(int argc, char* argv[])
for (x = 0; x < ARRAYSIZE(int64_list_indices); x++)
{
const size_t key = int64_list_indices[x];
const INT64 val = freerdp_get_param_int64(settings, key);
const INT64 val = freerdp_settings_get_int64(settings, key);
if (!freerdp_set_param_int64(settings, key, val))
if (!freerdp_settings_set_int64(settings, key, val))
goto fail;
}
@ -117,13 +117,14 @@ int TestSettings(int argc, char* argv[])
for (x = 0; x < ARRAYSIZE(string_list_indices); x++)
{
const size_t key = string_list_indices[x];
const char* val = "test-string";
const char val[] = "test-string";
const char* res;
if (!freerdp_set_param_string(settings, key, val))
if (!freerdp_settings_set_string(settings, key, val))
goto fail;
res = freerdp_get_param_string(settings, key);
res = freerdp_settings_get_string(settings, key);
if (strncmp(val, res, sizeof(val)) != 0)
goto fail;
}
@ -134,7 +135,7 @@ int TestSettings(int argc, char* argv[])
for (x = 0; x < ARRAYSIZE(pointer_list_indices); x++)
{
const size_t key = pointer_list_indices[x];
const void* val = freerdp_get_param_pointer(settings, key);
const void* val = freerdp_settings_get_pointer(settings, key);
}
#endif

View File

@ -241,6 +241,7 @@ static const size_t uint32_list_indices[] =
FreeRDP_RemoteAppNumIconCaches,
FreeRDP_RemoteAppNumIconCacheEntries,
FreeRDP_RemoteWndSupportLevel,
FreeRDP_RemoteApplicationSupportLevel,
FreeRDP_ReceivedCapabilitiesSize,
FreeRDP_OsMajorType,
FreeRDP_OsMinorType,
@ -270,6 +271,7 @@ static const size_t uint32_list_indices[] =
FreeRDP_NSCodecColorLossLevel,
FreeRDP_JpegCodecId,
FreeRDP_JpegQuality,
FreeRDP_GfxCapsFilter,
FreeRDP_BitmapCacheV3CodecId,
FreeRDP_DrawNineGridCacheSize,
FreeRDP_DrawNineGridCacheEntries,

View File

@ -43,7 +43,7 @@ def write_getter(f, entry_dict, entry_type, entry_name):
f.write('const ' + entry_type)
else:
f.write(entry_type)
f.write(' freerdp_get_param_' + entry_name.lower() + '(rdpSettings* settings, size_t id)\n')
f.write(' freerdp_settings_get_' + entry_name.lower() + '(rdpSettings* settings, size_t id)\n')
f.write('{\n')
f.write('\tif (!settings)\n')
f.write('\t\treturn FALSE;\n\n')
@ -73,7 +73,7 @@ def write_setter(f, entry_dict, entry_type, entry_name):
isPointer = 'pointer' in entry_name
values = get_values(entry_dict, entry_type)
f.write('BOOL freerdp_set_param_' + entry_name.lower() + '(rdpSettings* settings, size_t id, ')
f.write('BOOL freerdp_settings_set_' + entry_name.lower() + '(rdpSettings* settings, size_t id, ')
if isString or isPointer:
f.write('const ')
if not isPointer:

View File

@ -343,7 +343,7 @@ int shadow_server_parse_command_line(rdpShadowServer* server, int argc, char** a
}
CommandLineSwitchCase(arg, "sam-file")
{
freerdp_set_param_string(settings, FreeRDP_NtlmSamFile, arg->Value);
freerdp_settings_set_string(settings, FreeRDP_NtlmSamFile, arg->Value);
}
CommandLineSwitchDefault(arg)
{