diff --git a/src/protocols/rdp/client.c b/src/protocols/rdp/client.c index 9aaa0c7b..e97ea1df 100644 --- a/src/protocols/rdp/client.c +++ b/src/protocols/rdp/client.c @@ -156,7 +156,13 @@ int __guac_receive_channel_data(freerdp* rdp_inst, int channelId, UINT8* data, i #ifdef HAVE_FREERDP_EVENT_PUBSUB /** - * Called whenever a channel connects. + * Called whenever a channel connects via the PubSub event system within + * FreeRDP. + * + * @param context The rdpContext associated with the active RDP session. + * @param e Event-specific arguments, mainly the name of the channel, and a + * reference to the associated plugin loaded for that channel by + * FreeRDP. */ static void guac_rdp_channel_connected(rdpContext* context, ChannelConnectedEventArgs* e) { diff --git a/src/protocols/rdp/rdp_disp.h b/src/protocols/rdp/rdp_disp.h index 7bf92aec..a63d3a99 100644 --- a/src/protocols/rdp/rdp_disp.h +++ b/src/protocols/rdp/rdp_disp.h @@ -64,11 +64,15 @@ typedef struct guac_rdp_disp { /** * Allocates a new display update module, which will ultimately control the * display update channel once conected. + * + * @return A new display update module. */ guac_rdp_disp* guac_rdp_disp_alloc(); /** * Frees the given display update module. + * + * @param disp The display update module to free. */ void guac_rdp_disp_free(guac_rdp_disp* disp); @@ -76,6 +80,8 @@ void guac_rdp_disp_free(guac_rdp_disp* disp); * Loads the "disp" plugin for FreeRDP. It is still up to external code to * detect when the "disp" channel is connected, and update the guac_rdp_disp * with a call to guac_rdp_disp_connect(). + * + * @param context The rdpContext associated with the active RDP session. */ void guac_rdp_disp_load_plugin(rdpContext* context); @@ -83,13 +89,32 @@ void guac_rdp_disp_load_plugin(rdpContext* context); * Stores the given DispClientContext within the given guac_rdp_disp, such that * display updates can be properly sent. Until this is called, changes to the * display size will be deferred. + * + * @param guac_disp The display update module to associate with the connected + * display update channel. + * @param disp The DispClientContext associated by FreeRDP with the connected + * display update channel. */ void guac_rdp_disp_connect(guac_rdp_disp* guac_disp, DispClientContext* disp); /** * Requests a display size update, which may then be sent immediately to the * RDP server. If an update was recently sent, this update may be delayed until - * the RDP server has had time to settle. + * the RDP server has had time to settle. The width/height values provided may + * be automatically altered to comply with the restrictions imposed by the + * display update channel. + * + * @param disp The display update module which should maintain the requested + * size, sending the corresponding display update request when + * appropriate. + * @param context The rdpContext associated with the active RDP session. + * @param width The desired display width, in pixels. Due to the restrictions + * of the RDP display update channel, this will be contrained to + * the range of 200 through 8192 inclusive, and rounded down to + * the nearest even number. + * @param height The desired display height, in pixels. Due to the restrictions + * of the RDP display update channel, this will be contrained to + * the range of 200 through 8192 inclusive. */ void guac_rdp_disp_set_size(guac_rdp_disp* disp, rdpContext* context, int width, int height); @@ -98,6 +123,9 @@ void guac_rdp_disp_set_size(guac_rdp_disp* disp, rdpContext* context, * Sends an actual display update request to the RDP server based on previous * calls to guac_rdp_disp_set_size(). If an update was recently sent, the * update may be delayed until a future call to this function. + * + * @param disp The display update module which should track the update request. + * @param context The rdpContext associated with the active RDP session. */ void guac_rdp_disp_update_size(guac_rdp_disp* disp, rdpContext* context);