GUAC-1389: Use function types directly rather than re-documenting the parameters everywhere.

This commit is contained in:
Michael Jumper 2016-03-03 12:03:47 -08:00
parent 4c62b60f71
commit 58b545293f
5 changed files with 9 additions and 33 deletions

View File

@ -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

View File

@ -25,13 +25,9 @@
#include "config.h"
#include "guac_clipboard.h"
#include <guacamole/client.h>
#include <guacamole/stream.h>
#include <guacamole/user.h>
#include <rfb/rfbclient.h>
#include <rfb/rfbproto.h>
/**
* 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.

View File

@ -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

View File

@ -25,31 +25,13 @@
#include "config.h"
#include <guacamole/stream.h>
#include <guacamole/user.h>
/**
* 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

View File

@ -25,19 +25,17 @@
#include "config.h"
#include "guac_clipboard.h"
#include <guacamole/user.h>
/**
* 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