GUACAMOLE-33: Implement leave handlers for RDP, SSH, and telnet.

This commit is contained in:
Michael Jumper 2016-04-18 19:03:38 -07:00
parent 46b29edc5f
commit 82fd6a279b
6 changed files with 45 additions and 2 deletions

View File

@ -122,3 +122,12 @@ int guac_rdp_user_file_handler(guac_user* user, guac_stream* stream,
return 0; return 0;
} }
int guac_rdp_user_leave_handler(guac_user* user) {
guac_rdp_client* rdp_client = (guac_rdp_client*) user->client->data;
guac_common_cursor_remove_user(rdp_client->display->cursor, user);
return 0;
}

View File

@ -27,6 +27,11 @@
*/ */
guac_user_join_handler guac_rdp_user_join_handler; guac_user_join_handler guac_rdp_user_join_handler;
/**
* Handler for leaving users.
*/
guac_user_leave_handler guac_rdp_user_leave_handler;
/** /**
* Handler for received simple file uploads. This handler will automatically * Handler for received simple file uploads. This handler will automatically
* select between RDPDR and SFTP depending on which is available and which has * select between RDPDR and SFTP depending on which is available and which has

View File

@ -82,3 +82,12 @@ int guac_ssh_user_join_handler(guac_user* user, int argc, char** argv) {
} }
int guac_ssh_user_leave_handler(guac_user* user) {
guac_ssh_client* ssh_client = (guac_ssh_client*) user->client->data;
guac_common_cursor_remove_user(ssh_client->term->cursor, user);
return 0;
}

View File

@ -17,8 +17,8 @@
* under the License. * under the License.
*/ */
#ifndef GUAC_VNC_USER_H #ifndef GUAC_SSH_USER_H
#define GUAC_VNC_USER_H #define GUAC_SSH_USER_H
#include "config.h" #include "config.h"
@ -29,5 +29,10 @@
*/ */
guac_user_join_handler guac_ssh_user_join_handler; guac_user_join_handler guac_ssh_user_join_handler;
/**
* Handler for leaving users.
*/
guac_user_leave_handler guac_ssh_user_leave_handler;
#endif #endif

View File

@ -78,3 +78,13 @@ int guac_telnet_user_join_handler(guac_user* user, int argc, char** argv) {
} }
int guac_telnet_user_leave_handler(guac_user* user) {
guac_telnet_client* telnet_client =
(guac_telnet_client*) user->client->data;
guac_common_cursor_remove_user(telnet_client->term->cursor, user);
return 0;
}

View File

@ -29,5 +29,10 @@
*/ */
guac_user_join_handler guac_telnet_user_join_handler; guac_user_join_handler guac_telnet_user_join_handler;
/**
* Handler for leaving users.
*/
guac_user_leave_handler guac_telnet_user_leave_handler;
#endif #endif