From 75805e4cab5a56f61a9df588f1ab4f892285fe1e Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 24 Sep 2018 01:33:11 -0700 Subject: [PATCH] GUACAMOLE-629: Add support for creating argument value streams using the "argv" instruction. --- .../src/main/webapp/modules/Client.js | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/guacamole-common-js/src/main/webapp/modules/Client.js b/guacamole-common-js/src/main/webapp/modules/Client.js index 85e934645..e947b7030 100644 --- a/guacamole-common-js/src/main/webapp/modules/Client.js +++ b/guacamole-common-js/src/main/webapp/modules/Client.js @@ -447,6 +447,31 @@ Guacamole.Client = function(tunnel) { }; + /** + * Opens a new argument value stream for writing, having the given + * parameter name and mimetype, requesting that the connection parameter + * with the given name be updated to the value described by the contents + * of the following stream. The instruction necessary to create this stream + * will automatically be sent. + * + * @param {String} mimetype + * The mimetype of the data being sent. + * + * @param {String} name + * The name of the connection parameter to attempt to update. + * + * @return {Guacamole.OutputStream} + * The created argument value stream. + */ + this.createArgumentValueStream = function createArgumentValueStream(mimetype, name) { + + // Allocate and associate stream with argument value metadata + var stream = guac_client.createOutputStream(); + tunnel.sendMessage("argv", stream.index, mimetype, name); + return stream; + + }; + /** * Creates a new output stream associated with the given object and having * the given mimetype and name. The legality of a mimetype and name is