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 "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
|
||||
*
|
||||
@ -37,6 +54,27 @@ static UINT
|
||||
wlf_encomsp_participant_created(EncomspClientContext* context,
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -773,11 +773,10 @@ xf_encomsp_participant_created(EncomspClientContext* context,
|
||||
if (!settings)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
#if 0 // TODO
|
||||
request = freerdp_settings_get_bool(settings, FreeRDP_RequestControl);
|
||||
if (request && (participantCreated->Flags & ENCOMSP_MAY_VIEW) && !(participantCreated->Flags & ENCOMSP_MAY_INTERACT))
|
||||
xf_toggle_control(xfc);
|
||||
#endif
|
||||
request = freerdp_settings_get_bool(settings, FreeRDP_RemoteAssistanceRequestControl);
|
||||
if (request && (participantCreated->Flags & ENCOMSP_MAY_VIEW) &&
|
||||
!(participantCreated->Flags & ENCOMSP_MAY_INTERACT))
|
||||
xf_toggle_control(xfc);
|
||||
|
||||
return CHANNEL_RC_OK;
|
||||
}
|
||||
|
@ -2893,6 +2893,12 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
||||
else
|
||||
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")
|
||||
{
|
||||
settings->AsyncInput = enable;
|
||||
|
@ -46,6 +46,8 @@ static const COMMAND_LINE_ARGUMENT_A args[] = {
|
||||
"Remote application workspace path" },
|
||||
{ "assistance", COMMAND_LINE_VALUE_REQUIRED, "<password>", NULL, NULL, -1, NULL,
|
||||
"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,
|
||||
"Asynchronous channels (experimental)" },
|
||||
{ "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_RemdeskVirtualChannel (1030)
|
||||
#define FreeRDP_LyncRdpMode (1031)
|
||||
#define FreeRDP_RemoteAssistanceRequestControl (1032)
|
||||
#define FreeRDP_TlsSecurity (1088)
|
||||
#define FreeRDP_NlaSecurity (1089)
|
||||
#define FreeRDP_RdpSecurity (1090)
|
||||
@ -1063,15 +1064,16 @@ struct rdp_settings
|
||||
UINT64 padding1024[1024 - 969]; /* 969 */
|
||||
|
||||
/* Remote Assistance */
|
||||
ALIGN64 BOOL RemoteAssistanceMode; /* 1024 */
|
||||
ALIGN64 char* RemoteAssistanceSessionId; /* 1025 */
|
||||
ALIGN64 char* RemoteAssistancePassStub; /* 1026 */
|
||||
ALIGN64 char* RemoteAssistancePassword; /* 1027 */
|
||||
ALIGN64 char* RemoteAssistanceRCTicket; /* 1028 */
|
||||
ALIGN64 BOOL EncomspVirtualChannel; /* 1029 */
|
||||
ALIGN64 BOOL RemdeskVirtualChannel; /* 1030 */
|
||||
ALIGN64 BOOL LyncRdpMode; /* 1031 */
|
||||
UINT64 padding1088[1088 - 1032]; /* 1032 */
|
||||
ALIGN64 BOOL RemoteAssistanceMode; /* 1024 */
|
||||
ALIGN64 char* RemoteAssistanceSessionId; /* 1025 */
|
||||
ALIGN64 char* RemoteAssistancePassStub; /* 1026 */
|
||||
ALIGN64 char* RemoteAssistancePassword; /* 1027 */
|
||||
ALIGN64 char* RemoteAssistanceRCTicket; /* 1028 */
|
||||
ALIGN64 BOOL EncomspVirtualChannel; /* 1029 */
|
||||
ALIGN64 BOOL RemdeskVirtualChannel; /* 1030 */
|
||||
ALIGN64 BOOL LyncRdpMode; /* 1031 */
|
||||
ALIGN64 BOOL RemoteAssistanceRequestControl; /* 1032 */
|
||||
UINT64 padding1088[1088 - 1033]; /* 1033 */
|
||||
|
||||
/**
|
||||
* X.224 Connection Request/Confirm
|
||||
|
@ -165,6 +165,9 @@ BOOL freerdp_settings_get_bool(const rdpSettings* settings, size_t id)
|
||||
case FreeRDP_LyncRdpMode:
|
||||
return settings->LyncRdpMode;
|
||||
|
||||
case FreeRDP_RemoteAssistanceRequestControl:
|
||||
return settings->RemoteAssistanceRequestControl;
|
||||
|
||||
case FreeRDP_TlsSecurity:
|
||||
return settings->TlsSecurity;
|
||||
|
||||
@ -715,6 +718,10 @@ BOOL freerdp_settings_set_bool(rdpSettings* settings, size_t id, BOOL val)
|
||||
settings->LyncRdpMode = val;
|
||||
break;
|
||||
|
||||
case FreeRDP_RemoteAssistanceRequestControl:
|
||||
settings->RemoteAssistanceRequestControl = val;
|
||||
break;
|
||||
|
||||
case FreeRDP_TlsSecurity:
|
||||
settings->TlsSecurity = val;
|
||||
break;
|
||||
|
@ -54,6 +54,7 @@ static const size_t bool_list_indices[] = {
|
||||
FreeRDP_EncomspVirtualChannel,
|
||||
FreeRDP_RemdeskVirtualChannel,
|
||||
FreeRDP_LyncRdpMode,
|
||||
FreeRDP_RemoteAssistanceRequestControl,
|
||||
FreeRDP_TlsSecurity,
|
||||
FreeRDP_NlaSecurity,
|
||||
FreeRDP_RdpSecurity,
|
||||
|
Loading…
Reference in New Issue
Block a user