Add GatewayMessageType to public API
This commit is contained in:
parent
2fe8e762d2
commit
174f3257c9
@ -645,7 +645,7 @@ static BOOL wf_present_gateway_message(freerdp* instance, UINT32 type, BOOL isDi
|
||||
return TRUE;
|
||||
|
||||
/* special handling for consent messages (show modal dialog) */
|
||||
if (type == 1 && isConsentMandatory)
|
||||
if (type == GATEWAY_MESSAGE_CONSENT && isConsentMandatory)
|
||||
{
|
||||
int mbRes;
|
||||
WCHAR* msg;
|
||||
|
@ -668,7 +668,7 @@ BOOL client_cli_present_gateway_message(freerdp* instance, UINT32 type, BOOL isD
|
||||
const WCHAR* message)
|
||||
{
|
||||
char answer;
|
||||
const char* msgType = (type == 1) ? "Consent message" : "Service message";
|
||||
const char* msgType = (type == GATEWAY_MESSAGE_CONSENT) ? "Consent message" : "Service message";
|
||||
|
||||
if (!isDisplayMandatory && !isConsentMandatory)
|
||||
return TRUE;
|
||||
|
@ -70,6 +70,10 @@ extern "C"
|
||||
#define VERIFY_CERT_FLAG_MISMATCH 0x80
|
||||
#define VERIFY_CERT_FLAG_MATCH_LEGACY_SHA1 0x100
|
||||
|
||||
/* Message types used by gateway messaging callback */
|
||||
#define GATEWAY_MESSAGE_CONSENT 1
|
||||
#define GATEWAY_MESSAGE_SERVICE 2
|
||||
|
||||
typedef BOOL (*pContextNew)(freerdp* instance, rdpContext* context);
|
||||
typedef void (*pContextFree)(freerdp* instance, rdpContext* context);
|
||||
|
||||
@ -183,6 +187,7 @@ extern "C"
|
||||
typedef BOOL (*pReceiveChannelData)(freerdp* instance, UINT16 channelId, const BYTE* data,
|
||||
size_t size, UINT32 flags, size_t totalSize);
|
||||
|
||||
/* type can be one of the GATEWAY_MESSAGE_ type defines */
|
||||
typedef BOOL (*pPresentGatewayMessage)(freerdp* instance, UINT32 type, BOOL isDisplayMandatory,
|
||||
BOOL isConsentMandatory, size_t length,
|
||||
const WCHAR* message);
|
||||
|
@ -775,7 +775,7 @@ static BOOL rdg_process_tunnel_response_optional(rdpRdg* rdg, wStream* s, UINT16
|
||||
}
|
||||
|
||||
return IFCALLRESULT(TRUE, context->instance->PresentGatewayMessage, context->instance,
|
||||
TSG_ASYNC_MESSAGE_CONSENT_MESSAGE, TRUE, TRUE, msgLenBytes, msg);
|
||||
GATEWAY_MESSAGE_CONSENT, TRUE, TRUE, msgLenBytes, msg);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@ -1441,7 +1441,7 @@ static BOOL rdg_process_service_message(rdpRdg* rdg, wStream* s)
|
||||
}
|
||||
|
||||
return IFCALLRESULT(TRUE, context->instance->PresentGatewayMessage, context->instance,
|
||||
TSG_ASYNC_MESSAGE_SERVICE_MESSAGE, TRUE, FALSE, msgLenBytes, msg);
|
||||
GATEWAY_MESSAGE_SERVICE, TRUE, FALSE, msgLenBytes, msg);
|
||||
}
|
||||
|
||||
static BOOL rdg_process_unknown_packet(rdpRdg* rdg, int type)
|
||||
|
@ -1335,7 +1335,7 @@ static BOOL TsProxyMakeTunnelCallReadResponse(rdpTsg* tsg, RPC_PDU* pdu)
|
||||
if (tsg->rpc && tsg->rpc->context && tsg->rpc->context->instance)
|
||||
{
|
||||
rc = IFCALLRESULT(TRUE, tsg->rpc->context->instance->PresentGatewayMessage,
|
||||
tsg->rpc->context->instance, SwitchValue,
|
||||
tsg->rpc->context->instance, GATEWAY_MESSAGE_CONSENT,
|
||||
packetStringMessage.isDisplayMandatory != 0,
|
||||
packetStringMessage.isConsentMandatory != 0,
|
||||
packetStringMessage.msgBytes, packetStringMessage.msgBuffer);
|
||||
@ -1356,7 +1356,7 @@ static BOOL TsProxyMakeTunnelCallReadResponse(rdpTsg* tsg, RPC_PDU* pdu)
|
||||
if (tsg->rpc && tsg->rpc->context && tsg->rpc->context->instance)
|
||||
{
|
||||
rc = IFCALLRESULT(TRUE, tsg->rpc->context->instance->PresentGatewayMessage,
|
||||
tsg->rpc->context->instance, SwitchValue,
|
||||
tsg->rpc->context->instance, GATEWAY_MESSAGE_SERVICE,
|
||||
packetStringMessage.isDisplayMandatory != 0,
|
||||
packetStringMessage.isConsentMandatory != 0,
|
||||
packetStringMessage.msgBytes, packetStringMessage.msgBuffer);
|
||||
|
Loading…
Reference in New Issue
Block a user