libfreerdp-core: add server-side capabilities callback

This commit is contained in:
Marc-André Moreau 2011-12-14 15:08:09 -05:00
parent 949fc88989
commit 0ed4709167
4 changed files with 11 additions and 3 deletions

View File

@ -33,6 +33,7 @@ typedef boolean (*psPeerInitialize)(freerdp_peer* client);
typedef boolean (*psPeerGetFileDescriptor)(freerdp_peer* client, void** rfds, int* rcount); typedef boolean (*psPeerGetFileDescriptor)(freerdp_peer* client, void** rfds, int* rcount);
typedef boolean (*psPeerCheckFileDescriptor)(freerdp_peer* client); typedef boolean (*psPeerCheckFileDescriptor)(freerdp_peer* client);
typedef void (*psPeerDisconnect)(freerdp_peer* client); typedef void (*psPeerDisconnect)(freerdp_peer* client);
typedef boolean (*psPeerCapabilities)(freerdp_peer* client);
typedef boolean (*psPeerPostConnect)(freerdp_peer* client); typedef boolean (*psPeerPostConnect)(freerdp_peer* client);
typedef boolean (*psPeerActivate)(freerdp_peer* client); typedef boolean (*psPeerActivate)(freerdp_peer* client);
@ -58,6 +59,7 @@ struct rdp_freerdp_peer
psPeerCheckFileDescriptor CheckFileDescriptor; psPeerCheckFileDescriptor CheckFileDescriptor;
psPeerDisconnect Disconnect; psPeerDisconnect Disconnect;
psPeerCapabilities Capabilities;
psPeerPostConnect PostConnect; psPeerPostConnect PostConnect;
psPeerActivate Activate; psPeerActivate Activate;

View File

@ -561,9 +561,6 @@ boolean rdp_server_accept_client_info(rdpRdp* rdp, STREAM* s)
rdp->state = CONNECTION_STATE_LICENSE; rdp->state = CONNECTION_STATE_LICENSE;
if (!rdp_send_demand_active(rdp))
return false;
return true; return true;
} }

View File

@ -217,6 +217,9 @@ static boolean peer_recv_callback(rdpTransport* transport, STREAM* s, void* extr
case CONNECTION_STATE_MCS_CHANNEL_JOIN: case CONNECTION_STATE_MCS_CHANNEL_JOIN:
if (!rdp_server_accept_client_info(client->context->rdp, s)) if (!rdp_server_accept_client_info(client->context->rdp, s))
return false; return false;
IFCALL(client->Capabilities, client);
if (!rdp_send_demand_active(client->context->rdp))
return false;
break; break;
case CONNECTION_STATE_LICENSE: case CONNECTION_STATE_LICENSE:

View File

@ -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) boolean xf_peer_post_connect(freerdp_peer* client)
{ {
xfInfo* xfi; xfInfo* xfi;
@ -427,6 +432,7 @@ void* xf_peer_main_loop(void* arg)
client->settings->nla_security = false; client->settings->nla_security = false;
client->settings->rfx_codec = true; client->settings->rfx_codec = true;
client->Capabilities = xf_peer_capabilities;
client->PostConnect = xf_peer_post_connect; client->PostConnect = xf_peer_post_connect;
client->Activate = xf_peer_activate; client->Activate = xf_peer_activate;