Added new command line swith for automatich assistance control.
This commit is contained in:
parent
2691532061
commit
c5e261e066
@ -28,6 +28,23 @@
|
|||||||
#include "wlf_disp.h"
|
#include "wlf_disp.h"
|
||||||
#include "wlfreerdp.h"
|
#include "wlfreerdp.h"
|
||||||
|
|
||||||
|
BOOL encomsp_toggle_control(EncomspClientContext* encomsp, BOOL control)
|
||||||
|
{
|
||||||
|
ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU pdu;
|
||||||
|
|
||||||
|
if (!encomsp)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
pdu.ParticipantId = 0;
|
||||||
|
pdu.Flags = ENCOMSP_REQUEST_VIEW;
|
||||||
|
|
||||||
|
if (control)
|
||||||
|
pdu.Flags |= ENCOMSP_REQUEST_INTERACT;
|
||||||
|
|
||||||
|
encomsp->ChangeParticipantControlLevel(encomsp, &pdu);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function description
|
* Function description
|
||||||
*
|
*
|
||||||
@ -37,6 +54,27 @@ static UINT
|
|||||||
wlf_encomsp_participant_created(EncomspClientContext* context,
|
wlf_encomsp_participant_created(EncomspClientContext* context,
|
||||||
const ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated)
|
const ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated)
|
||||||
{
|
{
|
||||||
|
wlfContext* wlf;
|
||||||
|
rdpSettings* settings;
|
||||||
|
BOOL request;
|
||||||
|
|
||||||
|
if (!context || !context->custom || !participantCreated)
|
||||||
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
|
wlf = (wlfContext*)context->custom;
|
||||||
|
settings = wlf->context.settings;
|
||||||
|
|
||||||
|
if (!settings)
|
||||||
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
|
request = freerdp_settings_get_bool(settings, FreeRDP_RemoteAssistanceRequestControl);
|
||||||
|
if (request && (participantCreated->Flags & ENCOMSP_MAY_VIEW) &&
|
||||||
|
!(participantCreated->Flags & ENCOMSP_MAY_INTERACT))
|
||||||
|
{
|
||||||
|
if (!encomsp_toggle_control(context, TRUE))
|
||||||
|
return ERROR_INTERNAL_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
return CHANNEL_RC_OK;
|
return CHANNEL_RC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -773,11 +773,10 @@ xf_encomsp_participant_created(EncomspClientContext* context,
|
|||||||
if (!settings)
|
if (!settings)
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
#if 0 // TODO
|
request = freerdp_settings_get_bool(settings, FreeRDP_RemoteAssistanceRequestControl);
|
||||||
request = freerdp_settings_get_bool(settings, FreeRDP_RequestControl);
|
if (request && (participantCreated->Flags & ENCOMSP_MAY_VIEW) &&
|
||||||
if (request && (participantCreated->Flags & ENCOMSP_MAY_VIEW) && !(participantCreated->Flags & ENCOMSP_MAY_INTERACT))
|
!(participantCreated->Flags & ENCOMSP_MAY_INTERACT))
|
||||||
xf_toggle_control(xfc);
|
xf_toggle_control(xfc);
|
||||||
#endif
|
|
||||||
|
|
||||||
return CHANNEL_RC_OK;
|
return CHANNEL_RC_OK;
|
||||||
}
|
}
|
||||||
|
@ -2893,6 +2893,12 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
|||||||
else
|
else
|
||||||
settings->MaxTimeInCheckLoop = (UINT32)val;
|
settings->MaxTimeInCheckLoop = (UINT32)val;
|
||||||
}
|
}
|
||||||
|
CommandLineSwitchCase(arg, "auto-request-control")
|
||||||
|
{
|
||||||
|
if (!freerdp_settings_set_bool(settings, FreeRDP_RemoteAssistanceRequestControl,
|
||||||
|
enable))
|
||||||
|
return COMMAND_LINE_ERROR;
|
||||||
|
}
|
||||||
CommandLineSwitchCase(arg, "async-input")
|
CommandLineSwitchCase(arg, "async-input")
|
||||||
{
|
{
|
||||||
settings->AsyncInput = enable;
|
settings->AsyncInput = enable;
|
||||||
|
@ -46,6 +46,8 @@ static const COMMAND_LINE_ARGUMENT_A args[] = {
|
|||||||
"Remote application workspace path" },
|
"Remote application workspace path" },
|
||||||
{ "assistance", COMMAND_LINE_VALUE_REQUIRED, "<password>", NULL, NULL, -1, NULL,
|
{ "assistance", COMMAND_LINE_VALUE_REQUIRED, "<password>", NULL, NULL, -1, NULL,
|
||||||
"Remote assistance password" },
|
"Remote assistance password" },
|
||||||
|
{ "auto-request-control", COMMAND_LINE_VALUE_FLAG, "", NULL, NULL, -1, NULL,
|
||||||
|
"Automatically request remote assistance input control" },
|
||||||
{ "async-channels", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL,
|
{ "async-channels", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL,
|
||||||
"Asynchronous channels (experimental)" },
|
"Asynchronous channels (experimental)" },
|
||||||
{ "async-input", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL,
|
{ "async-input", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL,
|
||||||
|
@ -633,6 +633,7 @@ typedef struct _RDPDR_PARALLEL RDPDR_PARALLEL;
|
|||||||
#define FreeRDP_EncomspVirtualChannel (1029)
|
#define FreeRDP_EncomspVirtualChannel (1029)
|
||||||
#define FreeRDP_RemdeskVirtualChannel (1030)
|
#define FreeRDP_RemdeskVirtualChannel (1030)
|
||||||
#define FreeRDP_LyncRdpMode (1031)
|
#define FreeRDP_LyncRdpMode (1031)
|
||||||
|
#define FreeRDP_RemoteAssistanceRequestControl (1032)
|
||||||
#define FreeRDP_TlsSecurity (1088)
|
#define FreeRDP_TlsSecurity (1088)
|
||||||
#define FreeRDP_NlaSecurity (1089)
|
#define FreeRDP_NlaSecurity (1089)
|
||||||
#define FreeRDP_RdpSecurity (1090)
|
#define FreeRDP_RdpSecurity (1090)
|
||||||
@ -1071,7 +1072,8 @@ struct rdp_settings
|
|||||||
ALIGN64 BOOL EncomspVirtualChannel; /* 1029 */
|
ALIGN64 BOOL EncomspVirtualChannel; /* 1029 */
|
||||||
ALIGN64 BOOL RemdeskVirtualChannel; /* 1030 */
|
ALIGN64 BOOL RemdeskVirtualChannel; /* 1030 */
|
||||||
ALIGN64 BOOL LyncRdpMode; /* 1031 */
|
ALIGN64 BOOL LyncRdpMode; /* 1031 */
|
||||||
UINT64 padding1088[1088 - 1032]; /* 1032 */
|
ALIGN64 BOOL RemoteAssistanceRequestControl; /* 1032 */
|
||||||
|
UINT64 padding1088[1088 - 1033]; /* 1033 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* X.224 Connection Request/Confirm
|
* X.224 Connection Request/Confirm
|
||||||
|
@ -165,6 +165,9 @@ BOOL freerdp_settings_get_bool(const rdpSettings* settings, size_t id)
|
|||||||
case FreeRDP_LyncRdpMode:
|
case FreeRDP_LyncRdpMode:
|
||||||
return settings->LyncRdpMode;
|
return settings->LyncRdpMode;
|
||||||
|
|
||||||
|
case FreeRDP_RemoteAssistanceRequestControl:
|
||||||
|
return settings->RemoteAssistanceRequestControl;
|
||||||
|
|
||||||
case FreeRDP_TlsSecurity:
|
case FreeRDP_TlsSecurity:
|
||||||
return settings->TlsSecurity;
|
return settings->TlsSecurity;
|
||||||
|
|
||||||
@ -715,6 +718,10 @@ BOOL freerdp_settings_set_bool(rdpSettings* settings, size_t id, BOOL val)
|
|||||||
settings->LyncRdpMode = val;
|
settings->LyncRdpMode = val;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case FreeRDP_RemoteAssistanceRequestControl:
|
||||||
|
settings->RemoteAssistanceRequestControl = val;
|
||||||
|
break;
|
||||||
|
|
||||||
case FreeRDP_TlsSecurity:
|
case FreeRDP_TlsSecurity:
|
||||||
settings->TlsSecurity = val;
|
settings->TlsSecurity = val;
|
||||||
break;
|
break;
|
||||||
|
@ -54,6 +54,7 @@ static const size_t bool_list_indices[] = {
|
|||||||
FreeRDP_EncomspVirtualChannel,
|
FreeRDP_EncomspVirtualChannel,
|
||||||
FreeRDP_RemdeskVirtualChannel,
|
FreeRDP_RemdeskVirtualChannel,
|
||||||
FreeRDP_LyncRdpMode,
|
FreeRDP_LyncRdpMode,
|
||||||
|
FreeRDP_RemoteAssistanceRequestControl,
|
||||||
FreeRDP_TlsSecurity,
|
FreeRDP_TlsSecurity,
|
||||||
FreeRDP_NlaSecurity,
|
FreeRDP_NlaSecurity,
|
||||||
FreeRDP_RdpSecurity,
|
FreeRDP_RdpSecurity,
|
||||||
|
Loading…
Reference in New Issue
Block a user