Added dispose instruction.

This commit is contained in:
Michael Jumper 2012-02-20 12:41:23 -08:00
parent 124460b5d9
commit 28e2d41e16
2 changed files with 21 additions and 0 deletions

View File

@ -240,6 +240,18 @@ int guac_protocol_send_size(guac_socket* socket, const guac_layer* layer,
int guac_protocol_send_move(guac_socket* socket, const guac_layer* layer,
const guac_layer* parent, int x, int y, int z);
/**
* Sends a dispose instruction over the given guac_socket connection.
*
* If an error occurs sending the instruction, a non-zero value is
* returned, and guac_error is set appropriately.
*
* @param socket The guac_socket connection to use.
* @param layer The layer to dispose.
* @return Zero on success, non-zero on error.
*/
int guac_protocol_send_dispose(guac_socket* socket, const guac_layer* layer);
/**
* Sends a copy instruction over the given guac_socket connection.
*

View File

@ -142,6 +142,15 @@ int guac_protocol_send_move(guac_socket* socket, const guac_layer* layer,
}
int guac_protocol_send_dispose(guac_socket* socket, const guac_layer* layer) {
return
guac_socket_write_string(socket, "7.dispose,")
|| __guac_socket_write_length_int(socket, layer->index)
|| guac_socket_write_string(socket, ";");
}
int guac_protocol_send_clipboard(guac_socket* socket, const char* data) {
return