GUACAMOLE-629: Merge allow client to receive connection parameter values via "argv" streams.

This commit is contained in:
Virtually Nick
2019-07-30 17:29:50 -04:00
committed by GitHub

View File

@@ -649,6 +649,23 @@ Guacamole.Client = function(tunnel) {
*/
this.onvideo = null;
/**
* Fired when the current value of a connection parameter is being exposed
* by the server.
*
* @event
* @param {Guacamole.InputStream} stream
* The stream that will receive connection parameter data from the
* server.
*
* @param {String} mimetype
* The mimetype of the data which will be received.
*
* @param {String} name
* The name of the connection parameter whose value is being exposed.
*/
this.onargv = null;
/**
* Fired when the clipboard of the remote client is changing.
*
@@ -846,6 +863,24 @@ Guacamole.Client = function(tunnel) {
},
"argv": function(parameters) {
var stream_index = parseInt(parameters[0]);
var mimetype = parameters[1];
var name = parameters[2];
// Create stream
if (guac_client.onargv) {
var stream = streams[stream_index] = new Guacamole.InputStream(guac_client, stream_index);
guac_client.onargv(stream, mimetype, name);
}
// Otherwise, unsupported
else
guac_client.sendAck(stream_index, "Receiving argument values unsupported", 0x0100);
},
"audio": function(parameters) {
var stream_index = parseInt(parameters[0]);