Add file upload stubs.
This commit is contained in:
parent
c70efcea4d
commit
5004986563
@ -298,6 +298,11 @@ BOOL rdp_freerdp_post_connect(freerdp* instance) {
|
||||
client->key_handler = rdp_guac_client_key_handler;
|
||||
client->clipboard_handler = rdp_guac_client_clipboard_handler;
|
||||
|
||||
/* File transfer handlers */
|
||||
client->file_handler = rdp_guac_client_file_handler;
|
||||
client->blob_handler = rdp_guac_client_blob_handler;
|
||||
client->end_handler = rdp_guac_client_end_handler;
|
||||
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
|
@ -491,3 +491,32 @@ int rdp_guac_client_clipboard_handler(guac_client* client, char* data) {
|
||||
|
||||
}
|
||||
|
||||
int rdp_guac_client_file_handler(guac_client* client, guac_stream* stream,
|
||||
char* mimetype, char* filename) {
|
||||
guac_client_log_info(client, "STUB: stream %i allocated for file %s (%s)",
|
||||
stream->index, filename, mimetype);
|
||||
guac_protocol_send_ack(client->socket, stream, "OK (STREAM BEGIN)",
|
||||
GUAC_PROTOCOL_STATUS_SUCCESS);
|
||||
guac_socket_flush(client->socket);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rdp_guac_client_blob_handler(guac_client* client, guac_stream* stream,
|
||||
void* data, int length) {
|
||||
guac_client_log_info(client, "STUB: stream %i received %i bytes",
|
||||
stream->index, length);
|
||||
guac_protocol_send_ack(client->socket, stream, "OK (DATA WRITTEN)",
|
||||
GUAC_PROTOCOL_STATUS_SUCCESS);
|
||||
guac_socket_flush(client->socket);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rdp_guac_client_end_handler(guac_client* client, guac_stream* stream) {
|
||||
guac_client_log_info(client, "STUB: stream %i closed",
|
||||
stream->index);
|
||||
guac_protocol_send_ack(client->socket, stream, "OK (STREAM END)",
|
||||
GUAC_PROTOCOL_STATUS_SUCCESS);
|
||||
guac_socket_flush(client->socket);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
#define _GUAC_RDP_GUAC_HANDLERS_H
|
||||
|
||||
#include <guacamole/client.h>
|
||||
#include <guacamole/stream.h>
|
||||
|
||||
int rdp_guac_client_free_handler(guac_client* client);
|
||||
int rdp_guac_client_handle_messages(guac_client* client);
|
||||
@ -46,5 +47,13 @@ int rdp_guac_client_mouse_handler(guac_client* client, int x, int y, int mask);
|
||||
int rdp_guac_client_key_handler(guac_client* client, int keysym, int pressed);
|
||||
int rdp_guac_client_clipboard_handler(guac_client* client, char* data);
|
||||
|
||||
int rdp_guac_client_file_handler(guac_client* client, guac_stream* stream,
|
||||
char* mimetype, char* filename);
|
||||
|
||||
int rdp_guac_client_blob_handler(guac_client* client, guac_stream* stream,
|
||||
void* data, int length);
|
||||
|
||||
int rdp_guac_client_end_handler(guac_client* client, guac_stream* stream);
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user