From 58b545293f72b595345c2ed0342670c4e304f432 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 3 Mar 2016 12:03:47 -0800 Subject: [PATCH] GUAC-1389: Use function types directly rather than re-documenting the parameters everywhere. --- src/protocols/vnc/client.h | 2 +- src/protocols/vnc/clipboard.h | 10 +++------- src/protocols/vnc/input.h | 4 ++-- src/protocols/vnc/sftp.h | 20 +------------------- src/protocols/vnc/user.h | 6 ++---- 5 files changed, 9 insertions(+), 33 deletions(-) diff --git a/src/protocols/vnc/client.h b/src/protocols/vnc/client.h index d7ac99c7..36f5870e 100644 --- a/src/protocols/vnc/client.h +++ b/src/protocols/vnc/client.h @@ -51,7 +51,7 @@ /** * Handler which frees all data associated with the guac_client. */ -int guac_vnc_client_free_handler(guac_client* client); +guac_client_free_handler guac_vnc_client_free_handler; #endif diff --git a/src/protocols/vnc/clipboard.h b/src/protocols/vnc/clipboard.h index 66a2372b..f6ee59eb 100644 --- a/src/protocols/vnc/clipboard.h +++ b/src/protocols/vnc/clipboard.h @@ -25,13 +25,9 @@ #include "config.h" -#include "guac_clipboard.h" - #include -#include #include #include -#include /** * Sets the encoding of clipboard data exchanged with the VNC server to the @@ -55,17 +51,17 @@ int guac_vnc_set_clipboard_encoding(guac_client* client, /** * Handler for inbound clipboard data from Guacamole users. */ -int guac_vnc_clipboard_handler(guac_user* user, guac_stream* stream, char* mimetype); +guac_user_clipboard_handler guac_vnc_clipboard_handler; /** * Handler for stream data related to clipboard. */ -int guac_vnc_clipboard_blob_handler(guac_user* user, guac_stream* stream, void* data, int length); +guac_user_blob_handler guac_vnc_clipboard_blob_handler; /** * Handler for end-of-stream related to clipboard. */ -int guac_vnc_clipboard_end_handler(guac_user* user, guac_stream* stream); +guac_user_end_handler guac_vnc_clipboard_end_handler; /** * Handler for clipboard data received via VNC. diff --git a/src/protocols/vnc/input.h b/src/protocols/vnc/input.h index d1923351..9205bd24 100644 --- a/src/protocols/vnc/input.h +++ b/src/protocols/vnc/input.h @@ -31,12 +31,12 @@ /** * Handler for Guacamole user mouse events. */ -int guac_vnc_user_mouse_handler(guac_user* user, int x, int y, int mask); +guac_user_mouse_handler guac_vnc_user_mouse_handler; /** * Handler for Guacamole user key events. */ -int guac_vnc_user_key_handler(guac_user* user, int keysym, int pressed); +guac_user_key_handler guac_vnc_user_key_handler; #endif diff --git a/src/protocols/vnc/sftp.h b/src/protocols/vnc/sftp.h index 8c140b4e..816707cd 100644 --- a/src/protocols/vnc/sftp.h +++ b/src/protocols/vnc/sftp.h @@ -25,31 +25,13 @@ #include "config.h" -#include #include /** * Handles an incoming stream from a Guacamole "file" instruction, saving the * contents of that stream to the file having the given name. - * - * @param user - * The user uploading the 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. - * - * @return - * Zero if the incoming stream has been handled successfully, non-zero on - * failure. */ -int guac_vnc_sftp_file_handler(guac_user* user, guac_stream* stream, - char* mimetype, char* filename); +guac_user_file_handler guac_vnc_sftp_file_handler; #endif diff --git a/src/protocols/vnc/user.h b/src/protocols/vnc/user.h index c290bae1..d1cac984 100644 --- a/src/protocols/vnc/user.h +++ b/src/protocols/vnc/user.h @@ -25,19 +25,17 @@ #include "config.h" -#include "guac_clipboard.h" - #include /** * Handler for joining users. */ -int guac_vnc_user_join_handler(guac_user* user, int argc, char** argv); +guac_user_join_handler guac_vnc_user_join_handler; /** * Handler for leaving users. */ -int guac_vnc_user_leave_handler(guac_user* user); +guac_user_leave_handler guac_vnc_user_leave_handler; #endif