From 56c8c4f740dc3982fc91d07bb495f6fee4618b8c Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 29 Jan 2014 15:58:04 -0800 Subject: [PATCH] Add arguments for RemoteApp name and command. --- src/protocols/rdp/client.c | 14 ++++++++++++++ src/protocols/rdp/rdp_settings.h | 10 ++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/protocols/rdp/client.c b/src/protocols/rdp/client.c index 293c69a4..02e2e504 100644 --- a/src/protocols/rdp/client.c +++ b/src/protocols/rdp/client.c @@ -90,6 +90,8 @@ const char* GUAC_CLIENT_ARGS[] = { "security", "ignore-cert", "disable-auth", + "remote-app-name", + "remote-app-command", NULL }; @@ -114,6 +116,8 @@ enum RDP_ARGS_IDX { IDX_SECURITY, IDX_IGNORE_CERT, IDX_DISABLE_AUTH, + IDX_REMOTE_APP_NAME, + IDX_REMOTE_APP_COMMAND, RDP_ARGS_COUNT }; @@ -510,6 +514,16 @@ int guac_client_init(guac_client* client, int argc, char** argv) { if (argv[IDX_INITIAL_PROGRAM][0] != '\0') settings->initial_program = strdup(argv[IDX_INITIAL_PROGRAM]); + /* RemoteApp name */ + settings->remote_app_name = NULL; + if (argv[IDX_REMOTE_APP_NAME][0] != '\0') + settings->remote_app_name = strdup(argv[IDX_REMOTE_APP_NAME]); + + /* RemoteApp command */ + settings->remote_app_command = NULL; + if (argv[IDX_REMOTE_APP_COMMAND][0] != '\0') + settings->remote_app_command = strdup(argv[IDX_REMOTE_APP_COMMAND]); + /* Session color depth */ settings->color_depth = RDP_DEFAULT_DEPTH; if (argv[IDX_COLOR_DEPTH][0] != '\0') diff --git a/src/protocols/rdp/rdp_settings.h b/src/protocols/rdp/rdp_settings.h index 978d7ff2..f0f0a160 100644 --- a/src/protocols/rdp/rdp_settings.h +++ b/src/protocols/rdp/rdp_settings.h @@ -181,6 +181,16 @@ typedef struct guac_rdp_settings { */ int disable_authentication; + /** + * The name of the application to launch, if RemoteApp is in use. + */ + char* remote_app_name; + + /** + * The command to use to launch the application, if RemoteApp is in use. + */ + char* remote_app_command; + } guac_rdp_settings; /**