Add drive-enabled option.

This commit is contained in:
Michael Jumper 2013-07-25 12:05:15 -07:00
parent 08eb5625fc
commit f07cd58707
3 changed files with 73 additions and 6 deletions

View File

@ -100,6 +100,7 @@ const char* GUAC_CLIENT_ARGS[] = {
"color-depth", "color-depth",
"disable-audio", "disable-audio",
"enable-printing", "enable-printing",
"enable-drive",
"console", "console",
"console-audio", "console-audio",
"server-layout", "server-layout",
@ -122,6 +123,7 @@ enum RDP_ARGS_IDX {
IDX_COLOR_DEPTH, IDX_COLOR_DEPTH,
IDX_DISABLE_AUDIO, IDX_DISABLE_AUDIO,
IDX_ENABLE_PRINTING, IDX_ENABLE_PRINTING,
IDX_ENABLE_DRIVE,
IDX_CONSOLE, IDX_CONSOLE,
IDX_CONSOLE_AUDIO, IDX_CONSOLE_AUDIO,
IDX_SERVER_LAYOUT, IDX_SERVER_LAYOUT,
@ -180,8 +182,9 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) {
} /* end if audio enabled */ } /* end if audio enabled */
/* If printing enabled, load rdpdr */ /* If RDPDR required, load it */
if (guac_client_data->settings.printing_enabled) { if (guac_client_data->settings.printing_enabled
|| guac_client_data->settings.drive_enabled) {
/* Load RDPDR plugin */ /* Load RDPDR plugin */
if (freerdp_channels_load_plugin(channels, instance->settings, if (freerdp_channels_load_plugin(channels, instance->settings,
@ -189,7 +192,7 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) {
guac_client_log_error(client, guac_client_log_error(client,
"Failed to load guacdr plugin."); "Failed to load guacdr plugin.");
} /* end if printing enabled */ }
/* Init color conversion structure */ /* Init color conversion structure */
clrconv = calloc(1, sizeof(CLRCONV)); clrconv = calloc(1, sizeof(CLRCONV));
@ -532,6 +535,10 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
guac_client_data->settings.printing_enabled = guac_client_data->settings.printing_enabled =
(strcmp(argv[IDX_ENABLE_PRINTING], "true") == 0); (strcmp(argv[IDX_ENABLE_PRINTING], "true") == 0);
/* Drive enable/disable */
guac_client_data->settings.drive_enabled =
(strcmp(argv[IDX_ENABLE_DRIVE], "true") == 0);
/* Store client data */ /* Store client data */
guac_client_data->rdp_inst = rdp_inst; guac_client_data->rdp_inst = rdp_inst;
guac_client_data->bounded = FALSE; guac_client_data->bounded = FALSE;

View File

@ -66,9 +66,64 @@ static void guac_rdpdr_device_fs_announce_handler(guac_rdpdr_device* device,
static void guac_rdpdr_device_fs_iorequest_handler(guac_rdpdr_device* device, static void guac_rdpdr_device_fs_iorequest_handler(guac_rdpdr_device* device,
wStream* input_stream, int file_id, int completion_id, int major_func, int minor_func) { wStream* input_stream, int file_id, int completion_id, int major_func, int minor_func) {
guac_client_log_error(device->rdpdr->client, switch (major_func) {
"Unknown filesystem I/O request function: 0x%x/0x%x",
major_func, minor_func); /* File open */
case IRP_MJ_CREATE:
break;
/* File close */
case IRP_MJ_CLOSE:
break;
/* File read */
case IRP_MJ_READ:
break;
/* File write */
case IRP_MJ_WRITE:
break;
case IRP_MJ_DEVICE_CONTROL:
guac_client_log_error(device->rdpdr->client,
"IRP_MJ_DEVICE_CONTROL unsupported");
break;
case IRP_MJ_QUERY_VOLUME_INFORMATION:
guac_client_log_error(device->rdpdr->client,
"IRP_MJ_QUERY_VOLUME_INFORMATION unsupported");
break;
case IRP_MJ_SET_VOLUME_INFORMATION:
guac_client_log_error(device->rdpdr->client,
"IRP_MJ_SET_VOLUME_INFORMATION unsupported");
break;
case IRP_MJ_QUERY_INFORMATION:
guac_client_log_error(device->rdpdr->client,
"IRP_MJ_QUERY_INFORMATION unsupported");
break;
case IRP_MJ_SET_INFORMATION:
guac_client_log_error(device->rdpdr->client,
"IRP_MJ_SET_INFORMATION unsupported");
break;
case IRP_MJ_DIRECTORY_CONTROL:
guac_client_log_error(device->rdpdr->client,
"IRP_MJ_DIRECTORY_CONTROL unsupported");
break;
case IRP_MJ_LOCK_CONTROL:
guac_client_log_error(device->rdpdr->client,
"IRP_MJ_LOCK_CONTROL unsupported");
break;
default:
guac_client_log_error(device->rdpdr->client,
"Unknown filesystem I/O request function: 0x%x/0x%x",
major_func, minor_func);
}
} }

View File

@ -145,6 +145,11 @@ typedef struct guac_rdp_settings {
*/ */
int printing_enabled; int printing_enabled;
/**
* Whether the virtual drive is enabled.
*/
int drive_enabled;
/** /**
* Whether this session is a console session. * Whether this session is a console session.
*/ */