mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-495: Remove setClipboard() function of Guacamole.Client, deprecated since 0.9.1 (05a7c87
).
This commit is contained in:
@@ -350,31 +350,6 @@ Guacamole.Client = function(tunnel) {
|
|||||||
tunnel.sendMessage("mouse", Math.floor(mouseState.x), Math.floor(mouseState.y), buttonMask);
|
tunnel.sendMessage("mouse", Math.floor(mouseState.x), Math.floor(mouseState.y), buttonMask);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the clipboard of the remote client to the given text data.
|
|
||||||
*
|
|
||||||
* @deprecated Use createClipboardStream() instead.
|
|
||||||
* @param {String} data The data to send as the clipboard contents.
|
|
||||||
*/
|
|
||||||
this.setClipboard = function(data) {
|
|
||||||
|
|
||||||
// Do not send requests if not connected
|
|
||||||
if (!isConnected())
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Open stream
|
|
||||||
var stream = guac_client.createClipboardStream("text/plain");
|
|
||||||
var writer = new Guacamole.StringWriter(stream);
|
|
||||||
|
|
||||||
// Send text chunks
|
|
||||||
for (var i=0; i<data.length; i += 4096)
|
|
||||||
writer.sendText(data.substring(i, i+4096));
|
|
||||||
|
|
||||||
// Close stream
|
|
||||||
writer.sendEnd();
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allocates an available stream index and creates a new
|
* Allocates an available stream index and creates a new
|
||||||
* Guacamole.OutputStream using that index, associating the resulting
|
* Guacamole.OutputStream using that index, associating the resulting
|
||||||
|
Reference in New Issue
Block a user