GuacLite
view release on metacpan or search on metacpan
share/public/guaclite.js view on Meta::CPAN
touchState.angle, touchState.force);
};
/**
* Allocates an available stream index and creates a new
* Guacamole.OutputStream using that index, associating the resulting
* stream with this Guacamole.Client. Note that this stream will not yet
* exist as far as the other end of the Guacamole connection is concerned.
* Streams exist within the Guacamole protocol only when referenced by an
* instruction which creates the stream, such as a "clipboard", "file", or
* "pipe" instruction.
*
* @returns {!Guacamole.OutputStream}
* A new Guacamole.OutputStream with a newly-allocated index and
* associated with this Guacamole.Client.
*/
this.createOutputStream = function createOutputStream() {
// Allocate index
var index = stream_indices.next();
share/public/guaclite.js view on Meta::CPAN
this.createPipeStream = function(mimetype, name) {
// Allocate and associate stream with pipe metadata
var stream = guac_client.createOutputStream();
tunnel.sendMessage("pipe", stream.index, mimetype, name);
return stream;
};
/**
* Opens a new clipboard object for writing, having the given mimetype. 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 pipe.
* @return {!Guacamole.OutputStream} The created file stream.
*/
this.createClipboardStream = function(mimetype) {
// Allocate and associate stream with clipboard metadata
var stream = guac_client.createOutputStream();
tunnel.sendMessage("clipboard", stream.index, mimetype);
return stream;
};
/**
* 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.
share/public/guaclite.js view on Meta::CPAN
*
* @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.
*
* @event
* @param {Guacamole.InputStream} stream The stream that will receive
* clipboard data from the server.
* @param {String} mimetype The mimetype of the data which will be received.
*/
this.onclipboard = null;
/**
* Fired when a file stream is created. The stream provided to this event
* handler will contain its own event handlers for received data.
*
* @event
* @param {Guacamole.InputStream} stream The stream that will receive data
* from the server.
* @param {String} mimetype The mimetype of the file received.
* @param {String} filename The name of the file received.
share/public/guaclite.js view on Meta::CPAN
},
"clip": function(parameters) {
var layer = getLayer(parseInt(parameters[0]));
display.clip(layer);
},
"clipboard": function(parameters) {
var stream_index = parseInt(parameters[0]);
var mimetype = parameters[1];
// Create stream
if (guac_client.onclipboard) {
var stream = streams[stream_index] = new Guacamole.InputStream(guac_client, stream_index);
guac_client.onclipboard(stream, mimetype);
}
// Otherwise, unsupported
else
guac_client.sendAck(stream_index, "Clipboard unsupported", 0x0100);
},
"close": function(parameters) {
( run in 0.541 second using v1.01-cache-2.11-cpan-2398b32b56e )