GUAC-614: Migrate VNC to simpler stream API.

This commit is contained in:
Michael Jumper 2014-04-10 13:40:22 -07:00
parent 1dd2982f06
commit 18407fdc37
4 changed files with 6 additions and 18 deletions

View File

@ -23,6 +23,7 @@
#include "config.h"
#include "client.h"
#include "clipboard.h"
#include "guac_clipboard.h"
#include "guac_dot_cursor.h"
#include "guac_handlers.h"
@ -350,9 +351,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
/* Only handle mouse/keyboard/clipboard if not read-only */
client->mouse_handler = vnc_guac_client_mouse_handler;
client->key_handler = vnc_guac_client_key_handler;
client->clipboard_handler = vnc_guac_client_clipboard_handler;
client->blob_handler = vnc_guac_client_blob_handler;
client->end_handler = vnc_guac_client_end_handler;
client->clipboard_handler = guac_vnc_clipboard_handler;
/* If not read-only but cursor is remote, set a dot cursor */
if (guac_client_data->remote_cursor)

View File

@ -33,6 +33,10 @@ int guac_vnc_clipboard_handler(guac_client* client, guac_stream* stream,
vnc_guac_client_data* client_data = (vnc_guac_client_data*) client->data;
guac_common_clipboard_reset(client_data->clipboard, mimetype);
/* Set handlers for clipboard stream */
stream->blob_handler = guac_vnc_clipboard_blob_handler;
stream->end_handler = guac_vnc_clipboard_end_handler;
return 0;
}

View File

@ -98,18 +98,6 @@ int vnc_guac_client_key_handler(guac_client* client, int keysym, int pressed) {
return 0;
}
int vnc_guac_client_clipboard_handler(guac_client* client, guac_stream* stream, char* mimetype) {
return guac_vnc_clipboard_handler(client, stream, mimetype);
}
int vnc_guac_client_blob_handler(guac_client* client, guac_stream* stream, void* data, int length) {
return guac_vnc_clipboard_blob_handler(client, stream, data, length);
}
int vnc_guac_client_end_handler(guac_client* client, guac_stream* stream) {
return guac_vnc_clipboard_end_handler(client, stream);
}
int vnc_guac_client_free_handler(guac_client* client) {
vnc_guac_client_data* guac_client_data = (vnc_guac_client_data*) client->data;

View File

@ -31,9 +31,6 @@
int vnc_guac_client_handle_messages(guac_client* client);
int vnc_guac_client_mouse_handler(guac_client* client, int x, int y, int mask);
int vnc_guac_client_key_handler(guac_client* client, int keysym, int pressed);
int vnc_guac_client_clipboard_handler(guac_client* client, guac_stream* stream, char* mimetype);
int vnc_guac_client_blob_handler(guac_client* client, guac_stream* stream, void* data, int length);
int vnc_guac_client_end_handler(guac_client* client, guac_stream* stream);
int vnc_guac_client_free_handler(guac_client* client);
#endif