libfreerdp-core: add server-side capabilities callback
This commit is contained in:
parent
949fc88989
commit
0ed4709167
@ -33,6 +33,7 @@ typedef boolean (*psPeerInitialize)(freerdp_peer* client);
|
||||
typedef boolean (*psPeerGetFileDescriptor)(freerdp_peer* client, void** rfds, int* rcount);
|
||||
typedef boolean (*psPeerCheckFileDescriptor)(freerdp_peer* client);
|
||||
typedef void (*psPeerDisconnect)(freerdp_peer* client);
|
||||
typedef boolean (*psPeerCapabilities)(freerdp_peer* client);
|
||||
typedef boolean (*psPeerPostConnect)(freerdp_peer* client);
|
||||
typedef boolean (*psPeerActivate)(freerdp_peer* client);
|
||||
|
||||
@ -58,6 +59,7 @@ struct rdp_freerdp_peer
|
||||
psPeerCheckFileDescriptor CheckFileDescriptor;
|
||||
psPeerDisconnect Disconnect;
|
||||
|
||||
psPeerCapabilities Capabilities;
|
||||
psPeerPostConnect PostConnect;
|
||||
psPeerActivate Activate;
|
||||
|
||||
|
@ -561,9 +561,6 @@ boolean rdp_server_accept_client_info(rdpRdp* rdp, STREAM* s)
|
||||
|
||||
rdp->state = CONNECTION_STATE_LICENSE;
|
||||
|
||||
if (!rdp_send_demand_active(rdp))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -217,6 +217,9 @@ static boolean peer_recv_callback(rdpTransport* transport, STREAM* s, void* extr
|
||||
case CONNECTION_STATE_MCS_CHANNEL_JOIN:
|
||||
if (!rdp_server_accept_client_info(client->context->rdp, s))
|
||||
return false;
|
||||
IFCALL(client->Capabilities, client);
|
||||
if (!rdp_send_demand_active(client->context->rdp))
|
||||
return false;
|
||||
break;
|
||||
|
||||
case CONNECTION_STATE_LICENSE:
|
||||
|
@ -301,6 +301,11 @@ void xf_peer_dump_rfx(freerdp_peer* client)
|
||||
}
|
||||
}
|
||||
|
||||
boolean xf_peer_capabilities(freerdp_peer* client)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean xf_peer_post_connect(freerdp_peer* client)
|
||||
{
|
||||
xfInfo* xfi;
|
||||
@ -427,6 +432,7 @@ void* xf_peer_main_loop(void* arg)
|
||||
client->settings->nla_security = false;
|
||||
client->settings->rfx_codec = true;
|
||||
|
||||
client->Capabilities = xf_peer_capabilities;
|
||||
client->PostConnect = xf_peer_post_connect;
|
||||
client->Activate = xf_peer_activate;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user