#include <freerdp/utils/args.h>
#include <freerdp/utils/passphrase.h>
+void local_freerdp_device_collection_add(rdpSettings* settings, RDPDR_DEVICE* device)
+{
+ if (settings->DeviceArraySize < (settings->DeviceCount + 1))
+ {
+ settings->DeviceArraySize *= 2;
+ settings->DeviceArray = (RDPDR_DEVICE**) realloc(settings->DeviceArray, settings->DeviceArraySize);
+ }
+
+ settings->DeviceArray[settings->DeviceCount++] = device;
+}
+
void freerdp_parse_hostname(rdpSettings* settings, char* hostname)
{
char* p;
&& (p[1] == 0 || (p[1] == ':' && !strchr(p + 2, ':'))))
{
/* Either "[...]" or "[...]:..." with at most one : after the brackets */
- settings->hostname = _strdup(hostname + 1);
+ settings->ServerHostname = _strdup(hostname + 1);
- if ((p = strchr((char*)settings->hostname, ']')))
+ if ((p = strchr((char*) settings->ServerHostname, ']')))
{
*p = 0;
if (p[1] == ':')
- settings->port = atoi(p + 2);
+ settings->ServerPort = atoi(p + 2);
}
}
else
{
/* Port number is cut off and used if exactly one : in the string */
- settings->hostname = _strdup(hostname);
+ settings->ServerHostname = _strdup(hostname);
- if ((p = strchr((char*)settings->hostname, ':')) && !strchr(p + 1, ':'))
+ if ((p = strchr((char*)settings->ServerHostname, ':')) && !strchr(p + 1, ':'))
{
*p = 0;
- settings->port = atoi(p + 1);
+ settings->ServerPort = atoi(p + 1);
}
}
}
if (p)
{
- settings->connection_file = _strdup(argv[index]);
+ settings->ConnectionFile = _strdup(argv[index]);
index++;
continue;
}
"\n"
"Usage: %s [file] [options] server:port\n"
" -0: connect to console session\n"
- " -a: set color depth in bit, default is 16\n"
+ " -a: set color depth in bits, default is 16\n"
" -c: shell working directory\n"
" -D: hide window decorations\n"
" -T: window title\n"
printf("missing color depth\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->color_depth = atoi(argv[index]);
+ settings->ColorDepth = atoi(argv[index]);
}
else if (strcmp("-u", argv[index]) == 0)
{
printf("missing username\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->username = _strdup(argv[index]);
+ settings->Username = _strdup(argv[index]);
}
else if (strcmp("-p", argv[index]) == 0)
{
printf("missing password\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->password = _strdup(argv[index]);
- settings->autologon = 1;
+ settings->Password = _strdup(argv[index]);
+ settings->AutoLogonEnabled = TRUE;
/*
* Overwrite original password which could be revealed by a simple "ps aux" command.
printf("missing domain\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->domain = _strdup(argv[index]);
+ settings->Domain = _strdup(argv[index]);
}
else if (strcmp("-s", argv[index]) == 0)
{
printf("missing shell\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->shell = _strdup(argv[index]);
+ settings->AlternateShell = _strdup(argv[index]);
}
else if (strcmp("-c", argv[index]) == 0)
{
printf("missing directory\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->directory = _strdup(argv[index]);
+ settings->ShellWorkingDirectory = _strdup(argv[index]);
}
else if (strcmp("-g", argv[index]) == 0)
{
if (strncmp("workarea", argv[index], 1) == 0)
{
- settings->workarea = TRUE;
+ settings->Workarea = TRUE;
}
else
{
- settings->width = (UINT16) strtol(argv[index], &p, 10);
+ settings->DesktopWidth = (UINT16) strtol(argv[index], &p, 10);
if (*p == 'x')
{
- settings->height = (UINT16) strtol(p + 1, &p, 10);
+ settings->DesktopHeight = (UINT16) strtol(p + 1, &p, 10);
}
if (*p == '%')
{
- settings->percent_screen = settings->width;
- if (settings->percent_screen <= 0 || settings->percent_screen > 100)
+ settings->PercentScreen = settings->DesktopWidth;
+
+ if (settings->PercentScreen <= 0 || settings->PercentScreen > 100)
{
printf("invalid geometry percentage\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
else if (strcmp("-f", argv[index]) == 0)
{
- settings->fullscreen = TRUE;
+ settings->Fullscreen = TRUE;
}
else if (strcmp("-D", argv[index]) == 0)
{
- settings->decorations = FALSE;
+ settings->Decorations = FALSE;
}
else if (strcmp("-T", argv[index]) == 0)
{
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->window_title = _strdup(argv[index]);
+ settings->WindowTitle = _strdup(argv[index]);
}
else if (strcmp("-t", argv[index]) == 0)
{
printf("missing port number\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->port = atoi(argv[index]);
+ settings->ServerPort = atoi(argv[index]);
}
else if (strcmp("-k", argv[index]) == 0)
{
printf("missing keyboard layout id\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
- sscanf(argv[index], "%X", &(settings->kbd_layout));
+ sscanf(argv[index], "%X", &(settings->KeyboardLayout));
}
else if (strcmp("-K", argv[index]) == 0)
{
- settings->grab_keyboard = FALSE;
+ settings->GrabKeyboard = FALSE;
}
else if (strcmp("-n", argv[index]) == 0)
{
printf("missing client hostname\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
- strncpy(settings->client_hostname, argv[index], 31);
- settings->client_hostname[31] = 0;
+ strncpy(settings->ClientHostname, argv[index], 31);
+ settings->ClientHostname[31] = 0;
}
else if (strcmp("-o", argv[index]) == 0)
{
- settings->console_audio = TRUE;
+ settings->RemoteConsoleAudio = TRUE;
}
else if (strcmp("-0", argv[index]) == 0)
{
- settings->console_session = TRUE;
+ settings->ConsoleSession = TRUE;
}
else if (strcmp("-z", argv[index]) == 0)
{
- settings->compression = TRUE;
- }
- else if (strcmp("--ntlm", argv[index]) == 0)
- {
- index++;
-
- settings->ntlm_version = atoi(argv[index]);
-
- if (settings->ntlm_version != 2)
- settings->ntlm_version = 1;
+ settings->CompressionEnabled = TRUE;
}
else if (strcmp("--no-glyph-cache", argv[index]) == 0)
{
- settings->glyphSupportLevel = GLYPH_SUPPORT_NONE;
+ settings->GlyphSupportLevel = GLYPH_SUPPORT_NONE;
}
else if (strcmp("--no-osb", argv[index]) == 0)
{
- settings->offscreen_bitmap_cache = FALSE;
+ settings->OffscreenSupportLevel = FALSE;
}
else if (strcmp("--no-bmp-cache", argv[index]) == 0)
{
- settings->bitmap_cache = FALSE;
+ settings->BitmapCacheEnabled = FALSE;
}
else if (strcmp("--no-auth", argv[index]) == 0)
{
- settings->authentication = FALSE;
+ settings->Authentication = FALSE;
}
else if (strcmp("--authonly", argv[index]) == 0)
{
- settings->authentication_only = TRUE;
+ settings->AuthenticationOnly = TRUE;
}
else if (strcmp("--from-stdin", argv[index]) == 0)
{
- settings->from_stdin = TRUE;
+ settings->CredentialsFromStdin = TRUE;
}
else if (strcmp("--ignore-certificate", argv[index]) == 0)
{
- settings->ignore_certificate = TRUE;
+ settings->IgnoreCertificate = TRUE;
}
else if (strcmp("--certificate-name", argv[index]) == 0)
{
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->certificate_name = _strdup(argv[index]);
+ settings->CertificateName = _strdup(argv[index]);
}
else if (strcmp("--no-fastpath", argv[index]) == 0)
{
- settings->fastpath_input = FALSE;
- settings->fastpath_output = FALSE;
+ settings->FastPathInput = FALSE;
+ settings->FastPathOutput = FALSE;
}
else if (strcmp("--gdi", argv[index]) == 0)
{
}
if (strncmp("sw", argv[index], 1) == 0) /* software */
{
- settings->sw_gdi = TRUE;
+ settings->SoftwareGdi = TRUE;
}
else if (strncmp("hw", argv[index], 1) == 0) /* hardware */
{
- settings->sw_gdi = FALSE;
+ settings->SoftwareGdi = FALSE;
}
else
{
printf("missing codec name\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->bitmap_cache_v3 = TRUE;
+ settings->BitmapCacheV3Enabled = TRUE;
if (strcmp("rfx", argv[index]) == 0)
{
printf("setting rfx\n");
- settings->v3_codec_id = CODEC_ID_REMOTEFX;
- settings->rfx_codec = TRUE;
+ settings->BitmapCacheV3CodecId = CODEC_ID_REMOTEFX;
+ settings->RemoteFxCodec = TRUE;
}
else if (strcmp("nsc", argv[index]) == 0)
{
printf("setting codec nsc\n");
- settings->v3_codec_id = CODEC_ID_NSCODEC;
- settings->ns_codec = TRUE;
+ settings->BitmapCacheV3CodecId = CODEC_ID_NSCODEC;
+ settings->NSCodec = TRUE;
}
#ifdef WITH_JPEG
else if (strcmp("jpeg", argv[index]) == 0)
{
printf("setting codec jpeg\n");
- settings->v3_codec_id = CODEC_ID_JPEG;
+ settings->BitmapCacheV3CodecId = CODEC_ID_JPEG;
settings->jpeg_codec = TRUE;
if (settings->jpeg_quality == 0)
settings->jpeg_quality = 75;
#endif
else if (strcmp("--rfx", argv[index]) == 0)
{
- settings->rfx_codec = TRUE;
- settings->fastpath_output = TRUE;
- settings->color_depth = 32;
- settings->performance_flags = PERF_FLAG_NONE;
- settings->large_pointer = TRUE;
+ settings->RemoteFxCodec = TRUE;
+ settings->FastPathOutput = TRUE;
+ settings->ColorDepth = 32;
+ settings->PerformanceFlags = PERF_FLAG_NONE;
+ settings->LargePointerFlag = TRUE;
}
else if (strcmp("--rfx-mode", argv[index]) == 0)
{
}
if (argv[index][0] == 'v') /* video */
{
- settings->rfx_codec_mode = 0x00;
+ settings->RemoteFxCodecMode = 0x00;
}
else if (argv[index][0] == 'i') /* image */
{
- settings->rfx_codec_mode = 0x02;
+ settings->RemoteFxCodecMode = 0x02;
}
else
{
printf("missing frame acknowledge number\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->frame_acknowledge = atoi(argv[index]);
+ settings->FrameAcknowledge = atoi(argv[index]);
}
else if (strcmp("--nsc", argv[index]) == 0)
{
- settings->ns_codec = TRUE;
+ settings->NSCodec = TRUE;
}
else if (strcmp("--dump-rfx", argv[index]) == 0)
{
printf("missing file name\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->dump_rfx_file = _strdup(argv[index]);
- settings->dump_rfx = TRUE;
- settings->rfx_codec_only = TRUE;
+ settings->DumpRemoteFxFile = _strdup(argv[index]);
+ settings->DumpRemoteFx = TRUE;
+ settings->RemoteFxOnly = TRUE;
}
else if (strcmp("--play-rfx", argv[index]) == 0)
{
printf("missing file name\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->play_rfx_file = _strdup(argv[index]);
- settings->play_rfx = TRUE;
+ settings->PlayRemoteFxFile = _strdup(argv[index]);
+ settings->PlayRemoteFx = TRUE;
}
else if (strcmp("--fonts", argv[index]) == 0)
{
- settings->smooth_fonts = TRUE;
+ settings->AllowFontSmoothing = TRUE;
}
else if (strcmp("--disable-wallpaper", argv[index]) == 0)
{
- settings->disable_wallpaper = TRUE;
+ settings->DisableWallpaper = TRUE;
}
else if (strcmp("--disable-full-window-drag", argv[index]) == 0)
{
- settings->disable_full_window_drag = TRUE;
+ settings->DisableFullWindowDrag = TRUE;
}
else if (strcmp("--disable-menu-animations", argv[index]) == 0)
{
- settings->disable_menu_animations = TRUE;
+ settings->DisableMenuAnims = TRUE;
}
else if (strcmp("--disable-theming", argv[index]) == 0)
{
- settings->disable_theming = TRUE;
+ settings->DisableThemes = TRUE;
}
else if (strcmp("--composition", argv[index]) == 0)
{
- settings->desktop_composition = TRUE;
+ settings->AllowDesktopComposition = TRUE;
}
else if (strcmp("--no-motion", argv[index]) == 0)
{
- settings->mouse_motion = FALSE;
+ settings->MouseMotion = FALSE;
}
else if (strcmp("--app", argv[index]) == 0)
{
- settings->remote_app = TRUE;
- settings->rail_langbar_supported = TRUE;
- settings->workarea = TRUE;
- settings->performance_flags = PERF_DISABLE_WALLPAPER | PERF_DISABLE_FULLWINDOWDRAG;
+ settings->RemoteApplicationMode = TRUE;
+ settings->RemoteAppLanguageBarSupported = TRUE;
+ settings->Workarea = TRUE;
+ settings->PerformanceFlags = PERF_DISABLE_WALLPAPER | PERF_DISABLE_FULLWINDOWDRAG;
}
else if (strcmp("-x", argv[index]) == 0)
{
}
if (argv[index][0] == 'm') /* modem */
{
- settings->performance_flags = PERF_DISABLE_WALLPAPER |
+ settings->PerformanceFlags = PERF_DISABLE_WALLPAPER |
PERF_DISABLE_FULLWINDOWDRAG | PERF_DISABLE_MENUANIMATIONS |
PERF_DISABLE_THEMING;
- settings->connection_type = CONNECTION_TYPE_MODEM;
+ settings->ConnectionType = CONNECTION_TYPE_MODEM;
}
else if (argv[index][0] == 'b') /* broadband */
{
- settings->performance_flags = PERF_DISABLE_WALLPAPER;
- settings->connection_type = CONNECTION_TYPE_BROADBAND_HIGH;
+ settings->PerformanceFlags = PERF_DISABLE_WALLPAPER;
+ settings->ConnectionType = CONNECTION_TYPE_BROADBAND_HIGH;
}
else if (argv[index][0] == 'l') /* lan */
{
- settings->performance_flags = PERF_FLAG_NONE;
- settings->connection_type = CONNECTION_TYPE_LAN;
+ settings->PerformanceFlags = PERF_FLAG_NONE;
+ settings->ConnectionType = CONNECTION_TYPE_LAN;
}
else
{
- settings->performance_flags = strtol(argv[index], 0, 16);
+ settings->PerformanceFlags = strtol(argv[index], 0, 16);
}
}
else if (strcmp("-X", argv[index]) == 0)
return FREERDP_ARGS_PARSE_FAILURE;
}
- settings->parent_window_xid = strtol(argv[index], NULL, 0);
+ settings->ParentWindowId = strtol(argv[index], NULL, 0);
- if (settings->parent_window_xid == 0)
+ if (settings->ParentWindowId == 0)
{
printf("invalid parent window XID\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
else if (strcmp("--no-rdp", argv[index]) == 0)
{
- settings->rdp_security = FALSE;
+ settings->RdpSecurity = FALSE;
}
else if (strcmp("--no-tls", argv[index]) == 0)
{
- settings->tls_security = FALSE;
+ settings->TlsSecurity = FALSE;
}
else if (strcmp("--no-nla", argv[index]) == 0)
{
- settings->nla_security = FALSE;
+ settings->NlaSecurity = FALSE;
}
else if (strcmp("--sec", argv[index]) == 0)
{
}
if (strncmp("rdp", argv[index], 1) == 0) /* Standard RDP */
{
- settings->rdp_security = TRUE;
- settings->tls_security = FALSE;
- settings->nla_security = FALSE;
- settings->encryption = TRUE;
- settings->encryption_method = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
- settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
+ settings->RdpSecurity = TRUE;
+ settings->TlsSecurity = FALSE;
+ settings->NlaSecurity = FALSE;
+ settings->DisableEncryption = TRUE;
+ settings->EncryptionMethods = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
+ settings->EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
}
else if (strncmp("tls", argv[index], 1) == 0) /* TLS */
{
- settings->rdp_security = FALSE;
- settings->tls_security = TRUE;
- settings->nla_security = FALSE;
+ settings->RdpSecurity = FALSE;
+ settings->TlsSecurity = TRUE;
+ settings->NlaSecurity = FALSE;
}
else if (strncmp("nla", argv[index], 1) == 0) /* NLA */
{
- settings->rdp_security = FALSE;
- settings->tls_security = FALSE;
- settings->nla_security = TRUE;
+ settings->RdpSecurity = FALSE;
+ settings->TlsSecurity = FALSE;
+ settings->NlaSecurity = TRUE;
}
else
{
}
else if (strcmp("--no-nego", argv[index]) == 0)
{
- settings->security_layer_negotiation = FALSE;
+ settings->NegotiateSecurityLayer = FALSE;
}
else if (strcmp("--tsg", argv[index]) == 0)
{
- settings->ts_gateway = TRUE;
+ settings->GatewayUsageMethod = TRUE;
index++;
if (index == argc)
{
printf("missing TSG username\n");
return -1;
}
- settings->tsg_username = _strdup(argv[index]);
+ settings->GatewayUsername = _strdup(argv[index]);
index++;
if (index == argc)
{
printf("missing TSG password\n");
return -1;
}
- settings->tsg_password = _strdup(argv[index]);
+ settings->GatewayPassword = _strdup(argv[index]);
index++;
if (index == argc)
{
printf("missing TSG server\n");
return -1;
}
- settings->tsg_hostname = _strdup(argv[index]);
+ settings->GatewayHostname = _strdup(argv[index]);
}
else if (strcmp("--plugin", argv[index]) == 0)
{
index++;
t = index;
+
if (index == argc)
{
printf("missing plugin name\n");
return FREERDP_ARGS_PARSE_FAILURE;
}
+
plugin_data = NULL;
+
if (strstr(argv[t], "rdpsnd"))
- settings->audio_playback = TRUE;
+ settings->AudioPlayback = TRUE;
+
if (index < argc - 1 && strcmp("--data", argv[index + 1]) == 0)
{
index += 2;
i = 0;
+
while (index < argc && strcmp("--", argv[index]) != 0)
{
if (plugin_data == NULL)
plugin_data = (RDP_PLUGIN_DATA*) realloc(plugin_data, sizeof(RDP_PLUGIN_DATA) * (i + 2));
if (strstr(argv[t], "drdynvc") && strstr(argv[index], "audin"))
- settings->audio_capture = TRUE;
+ settings->AudioCapture = TRUE;
plugin_data[i].size = sizeof(RDP_PLUGIN_DATA);
plugin_data[i].data[0] = NULL;
index++;
i++;
}
+
+ if (strstr(argv[t], "rdpdr"))
+ {
+ RDP_PLUGIN_DATA* data = plugin_data;
+
+ while (data && data->size > 0)
+ {
+ if (strcmp(data->data[0], "drive") == 0)
+ {
+ RDPDR_DRIVE* drive;
+
+ drive = (RDPDR_DRIVE*) malloc(sizeof(RDPDR_DRIVE));
+ ZeroMemory(drive, sizeof(RDPDR_DRIVE));
+
+ drive->Type = RDPDR_DTYP_FILESYSTEM;
+ drive->Name = _strdup(data->data[1]);
+ drive->Path = _strdup(data->data[2]);
+
+ local_freerdp_device_collection_add(settings, (RDPDR_DEVICE*) drive);
+ }
+ else if (strcmp(data->data[0], "printer") == 0)
+ {
+ RDPDR_PRINTER* printer;
+
+ printer = (RDPDR_PRINTER*) malloc(sizeof(RDPDR_PRINTER));
+ ZeroMemory(printer, sizeof(RDPDR_PRINTER));
+
+ printer->Type = RDPDR_DTYP_PRINT;
+ printer->Name = _strdup(data->data[1]);
+
+ if (data->data[2])
+ printer->DriverName = _strdup(data->data[2]);
+
+ local_freerdp_device_collection_add(settings, (RDPDR_DEVICE*) printer);
+ }
+ else if (strcmp(data->data[0], "smartcard") == 0)
+ {
+ RDPDR_SMARTCARD* smartcard;
+
+ smartcard = (RDPDR_SMARTCARD*) malloc(sizeof(RDPDR_SMARTCARD));
+ ZeroMemory(smartcard, sizeof(RDPDR_SMARTCARD));
+
+ smartcard->Type = RDPDR_DTYP_SMARTCARD;
+ smartcard->Name = _strdup(data->data[1]);
+ smartcard->Path = _strdup(data->data[2]);
+
+ local_freerdp_device_collection_add(settings, (RDPDR_DEVICE*) smartcard);
+ }
+ else if (strcmp(data->data[0], "serial") == 0)
+ {
+ RDPDR_SERIAL* serial;
+
+ serial = (RDPDR_SERIAL*) malloc(sizeof(RDPDR_SERIAL));
+ ZeroMemory(serial, sizeof(RDPDR_SERIAL));
+
+ serial->Type = RDPDR_DTYP_SERIAL;
+ serial->Name = _strdup(data->data[1]);
+ serial->Path = _strdup(data->data[2]);
+
+ local_freerdp_device_collection_add(settings, (RDPDR_DEVICE*) serial);
+ }
+ else if (strcmp(data->data[0], "parallel") == 0)
+ {
+ RDPDR_PARALLEL* parallel;
+
+ parallel = (RDPDR_PARALLEL*) malloc(sizeof(RDPDR_PARALLEL));
+ ZeroMemory(parallel, sizeof(RDPDR_PARALLEL));
+
+ parallel->Type = RDPDR_DTYP_PARALLEL;
+ parallel->Name = _strdup(data->data[1]);
+ parallel->Path = _strdup(data->data[2]);
+
+ local_freerdp_device_collection_add(settings, (RDPDR_DEVICE*) parallel);
+ }
+ else
+ {
+ printf("WARNING: unknown device type: %s\n", (char*) data->data[0]);
+
+ if (strcmp(data->data[0], "disk") == 0)
+ printf("Maybe you meant \"drive\" instead of \"disk\"?\n");
+ else if (strcmp(data->data[0], "scard") == 0)
+ printf("Maybe you meant \"smartcard\" instead of \"scard\"?\n");
+ }
+
+ data = (RDP_PLUGIN_DATA*) (((BYTE*) data) + data->size);
+ }
+
+ plugin_data = (RDP_PLUGIN_DATA*) settings;
+ }
}
if (plugin_callback != NULL)
}
else if (strcmp("--no-salted-checksum", argv[index]) == 0)
{
- settings->salted_checksum = FALSE;
+ settings->SaltedChecksum = FALSE;
}
else if (strcmp("--pcid", argv[index]) == 0)
{
printf("missing preconnection id value\n");
return -1;
}
- settings->send_preconnection_pdu = TRUE;
- settings->preconnection_id = atoi(argv[index]);
+ settings->SendPreconnectionPdu = TRUE;
+ settings->PreconnectionId = atoi(argv[index]);
}
else if (strcmp("--pcb", argv[index]) == 0)
{
printf("missing preconnection blob value\n");
return -1;
}
- settings->send_preconnection_pdu = TRUE;
- settings->preconnection_blob = _strdup(argv[index]);
+ settings->SendPreconnectionPdu = TRUE;
+ settings->PreconnectionBlob = _strdup(argv[index]);
}
else if (strcmp("--version", argv[index]) == 0)
{
followed will be parsed for the next session. */
index++;
- if (settings->smooth_fonts)
- settings->performance_flags |= PERF_ENABLE_FONT_SMOOTHING;
+ if (settings->AllowFontSmoothing)
+ settings->PerformanceFlags |= PERF_ENABLE_FONT_SMOOTHING;
- if (settings->desktop_composition)
- settings->performance_flags |= PERF_ENABLE_DESKTOP_COMPOSITION;
+ if (settings->AllowDesktopComposition)
+ settings->PerformanceFlags |= PERF_ENABLE_DESKTOP_COMPOSITION;
- if (settings->disable_wallpaper)
- settings->performance_flags |= PERF_DISABLE_WALLPAPER;
+ if (settings->DisableWallpaper)
+ settings->PerformanceFlags |= PERF_DISABLE_WALLPAPER;
- if (settings->disable_full_window_drag)
- settings->performance_flags |= PERF_DISABLE_FULLWINDOWDRAG;
+ if (settings->DisableFullWindowDrag)
+ settings->PerformanceFlags |= PERF_DISABLE_FULLWINDOWDRAG;
- if (settings->disable_menu_animations)
- settings->performance_flags |= PERF_DISABLE_MENUANIMATIONS;
+ if (settings->DisableMenuAnims)
+ settings->PerformanceFlags |= PERF_DISABLE_MENUANIMATIONS;
- if (settings->disable_theming)
- settings->performance_flags |= PERF_DISABLE_THEMING;
+ if (settings->DisableThemes)
+ settings->PerformanceFlags |= PERF_DISABLE_THEMING;
break; /* post process missing arguments */
You can prompt for username, password, domain and hostname to avoid disclosing
these settings to ps. */
- if (settings->from_stdin)
+ if (settings->CredentialsFromStdin)
{
/* username */
- if (NULL == settings->username)
+ if (NULL == settings->Username)
{
char input[512];
input[0] = '\0';
printf("username: ");
if (scanf("%511s%*c", input) > 0)
{
- settings->username = _strdup(input);
+ settings->Username = _strdup(input);
}
}
/* password */
- if (NULL == settings->password)
+ if (NULL == settings->Password)
{
- settings->password = malloc(512 * sizeof(char));
+ settings->Password = malloc(512 * sizeof(char));
if (isatty(STDIN_FILENO))
{
- freerdp_passphrase_read("password: ", settings->password, 512, settings->from_stdin);
+ freerdp_passphrase_read("password: ", settings->Password, 512, settings->CredentialsFromStdin);
}
else
{
printf("password: ");
- if (scanf("%511s%*c", settings->password) <= 0)
+ if (scanf("%511s%*c", settings->Password) <= 0)
{
- free(settings->password);
- settings->password = NULL;
+ free(settings->Password);
+ settings->Password = NULL;
}
}
}
/* domain */
- if (NULL == settings->domain)
+ if (NULL == settings->Domain)
{
char input[512];
input[0] = '\0';
at the get go */
if (input[0] != '\0' && !(input[0] == '.' && input[1] == '\0'))
{
- settings->domain = _strdup(input);
+ settings->Domain = _strdup(input);
}
}
if (feof(stdin))
}
}
/* hostname */
- if (NULL == settings->hostname)
+ if (settings->ServerHostname == NULL)
{
char input[512];
input[0] = '\0';
}
/* Must have a hostname. Do you? */
- if ((settings->hostname == NULL) && (settings->connection_file == NULL))
+ if ((settings->ServerHostname == NULL) && (settings->ConnectionFile == NULL))
{
printf("missing server name\n");
return FREERDP_ARGS_PARSE_FAILURE;