GUAC-1389: Rely on API definition for handler.

This commit is contained in:
Michael Jumper 2016-03-14 18:27:52 -07:00
parent 7c2766b34b
commit fa43a94e02
5 changed files with 11 additions and 39 deletions

View File

@ -29,15 +29,8 @@
* Handler which is invoked when the SSH client needs to be disconnected (if * Handler which is invoked when the SSH client needs to be disconnected (if
* connected) and freed. This can happen if initialization fails, or all users * connected) and freed. This can happen if initialization fails, or all users
* have left the connection. * have left the connection.
*
* @param client
* The client associated with the SSH client to be freed.
*
* @return
* Zero on success, non-zero if an error occurs preventing the client from
* being entirely freed.
*/ */
int guac_ssh_client_free_handler(guac_client* client); guac_client_free_handler guac_ssh_client_free_handler;
#endif #endif

View File

@ -29,21 +29,19 @@
#include <guacamole/stream.h> #include <guacamole/stream.h>
/** /**
* Handler for inbound clipboard data. * Handler for inbound clipboard streams.
*/ */
int guac_ssh_clipboard_handler(guac_user* user, guac_stream* stream, guac_user_clipboard_handler guac_ssh_clipboard_handler;
char* mimetype);
/** /**
* Handler for stream data related to clipboard. * Handler for data received along clipboard streams.
*/ */
int guac_ssh_clipboard_blob_handler(guac_user* user, guac_stream* stream, guac_user_blob_handler guac_ssh_clipboard_blob_handler;
void* data, int length);
/** /**
* Handler for end-of-stream related to clipboard. * Handler for end-of-stream related to clipboard.
*/ */
int guac_ssh_clipboard_end_handler(guac_user* user, guac_stream* stream); guac_user_end_handler guac_ssh_clipboard_end_handler;
#endif #endif

View File

@ -30,17 +30,17 @@
/** /**
* Handler for Guacamole user mouse events. * Handler for Guacamole user mouse events.
*/ */
int guac_ssh_user_mouse_handler(guac_user* user, int x, int y, int mask); guac_user_mouse_handler guac_ssh_user_mouse_handler;
/** /**
* Handler for Guacamole user key events. * Handler for Guacamole user key events.
*/ */
int guac_ssh_user_key_handler(guac_user* user, int keysym, int pressed); guac_user_key_handler guac_ssh_user_key_handler;
/** /**
* Handler for Guacamole user size events. * Handler for Guacamole user size events.
*/ */
int guac_ssh_user_size_handler(guac_user* user, int width, int height); guac_user_size_handler guac_ssh_user_size_handler;
#endif #endif

View File

@ -34,27 +34,8 @@
* Handles an incoming stream from a Guacamole "file" instruction, saving the * Handles an incoming stream from a Guacamole "file" instruction, saving the
* contents of that stream to the file having the given name within the * contents of that stream to the file having the given name within the
* upload directory set by guac_sftp_set_upload_path(). * upload directory set by guac_sftp_set_upload_path().
*
* @param user
* The user receiving the uploaded file.
*
* @param stream
* The stream through which the uploaded file data will be received.
*
* @param mimetype
* The mimetype of the data being received.
*
* @param filename
* The filename of the file to write to. This filename will always be taken
* relative to the upload path set by
* guac_common_ssh_sftp_set_upload_path().
*
* @return
* Zero if the incoming stream has been handled successfully, non-zero on
* failure.
*/ */
int guac_sftp_file_handler(guac_user* user, guac_stream* stream, guac_user_file_handler guac_sftp_file_handler;
char* mimetype, char* filename);
/** /**
* Initiates an SFTP file download to the user via the Guacamole "file" * Initiates an SFTP file download to the user via the Guacamole "file"

View File

@ -30,7 +30,7 @@
/** /**
* Handler for joining users. * Handler for joining users.
*/ */
int guac_ssh_user_join_handler(guac_user* user, int argc, char** argv); guac_user_join_handler guac_ssh_user_join_handler;
#endif #endif