Added layer to set instruction.

This commit is contained in:
Michael Jumper 2012-03-13 12:06:11 -07:00
parent e3c3eea764
commit fa27d7b11e
2 changed files with 7 additions and 4 deletions

View File

@ -344,12 +344,13 @@ int guac_protocol_send_error(guac_socket* socket, const char* error);
* returned, and guac_error is set appropriately.
*
* @param socket The guac_socket connection to use.
* @param layer The layer to set the parameter of.
* @param name The name of the parameter to set.
* @param value The value to set the parameter to.
* @return Zero on success, non-zero on error.
*/
int guac_protocol_send_set(guac_socket* socket, const char* name,
const char* value);
int guac_protocol_send_set(guac_socket* socket, const guac_layer* layer,
const char* name, const char* value);
/**
* Sends a select instruction over the given guac_socket connection.

View File

@ -888,11 +888,13 @@ int guac_protocol_send_reset(guac_socket* socket, const guac_layer* layer) {
}
int guac_protocol_send_set(guac_socket* socket, const char* name,
const char* value) {
int guac_protocol_send_set(guac_socket* socket, const guac_layer* layer,
const char* name, const char* value) {
return
guac_socket_write_string(socket, "3.set,")
|| __guac_socket_write_length_int(socket, layer->index)
|| guac_socket_write_string(socket, ",")
|| __guac_socket_write_length_string(socket, name)
|| guac_socket_write_string(socket, ",")
|| __guac_socket_write_length_string(socket, value)