Class Index | File Index

Classes


Class Guacamole.Client


Defined in: Client.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Guacamole protocol client.
Method Summary
Method Attributes Method Name and Description
 
connect(data)
Connects the underlying tunnel of this Guacamole.Client, passing the given arbitrary data to the tunnel during the connection process.
 
createFileStream(mimetype, filename)
Opens a new file for writing, having the given index, mimetype and filename.
 
createPipeStream(mimetype, name)
Opens a new pipe for writing, having the given name and mimetype.
 
Sends a disconnect instruction to the server and closes the tunnel.
 
endStream(index)
Marks a currently-open stream as complete.
 
Returns a canvas element containing the entire display, with all child layers composited within.
 
Returns an element containing the display of this Guacamole.Client.
 
Returns the height of the display.
 
Returns the scale of the display.
 
Returns the width of the display.
 
scale(scale)
Sets the scale of the client display element such that it renders at a relatively smaller or larger size, without affecting the true resolution of the display.
 
sendAck(index, message, code)
Acknowledge receipt of a blob on the stream with the given index.
 
sendBlob(index, data)
Given the index of a file, writes a blob of data to that file.
 
sendKeyEvent(pressed, keysym)
Sends a key event having the given properties as if the user pressed or released a key.
 
sendMouseState(mouseState)
Sends a mouse event having the properties provided by the given mouse state.
 
sendSize(width, height)
Sends the current size of the screen.
 
Sets the clipboard of the remote client to the given text data.
Event Summary
Event Attributes Event Name and Description
 
Fired when the clipboard of the remote client is changing.
 
onerror(status)
Fired when an error is reported by the remote client, and the connection is being closed.
 
onfile(stream, mimetype, filename)
Fired when a file stream is created.
 
onname(name)
Fired when the remote client sends a name update.
 
onpipe(stream, mimetype, name)
Fired when a pipe stream is created.
 
onresize(width, height)
Fired when the default layer (and thus the entire Guacamole display) is resized.
 
Fired whenever the state of this Guacamole.Client changes.
 
onsync(timestamp)
Fired whenever a sync instruction is received from the server, indicating that the server is finished processing any input from the client and has sent any results.
Class Detail
Guacamole.Client(tunnel)
Guacamole protocol client. Given a display element and Guacamole.Tunnel, automatically handles incoming and outgoing Guacamole instructions via the provided tunnel, updating the display using one or more canvas elements.
Parameters:
{Guacamole.Tunnel} tunnel
The tunnel to use to send and receive Guacamole instructions.
Method Detail
connect(data)
Connects the underlying tunnel of this Guacamole.Client, passing the given arbitrary data to the tunnel during the connection process.
Parameters:
data
Arbitrary connection data to be sent to the underlying tunnel during the connection process.
Throws:
{Guacamole.Status}
If an error occurs during connection.

{Guacamole.OutputStream} createFileStream(mimetype, filename)
Opens a new file for writing, having the given index, mimetype and filename. The stream to associate with this file must already exist.
Parameters:
{String} mimetype
The mimetype of the file being sent.
{String} filename
The filename of the file being sent.
Returns:
{Guacamole.OutputStream} The created file stream.

{Guacamole.OutputStream} createPipeStream(mimetype, name)
Opens a new pipe for writing, having the given name and mimetype. The stream to associate with this pipe must already exist.
Parameters:
{String} mimetype
The mimetype of the data being sent.
{String} name
The name of the pipe.
Returns:
{Guacamole.OutputStream} The created file stream.

disconnect()
Sends a disconnect instruction to the server and closes the tunnel.

endStream(index)
Marks a currently-open stream as complete.
Parameters:
{Number} index
The index of the stream to end.

{HTMLCanvasElement} flatten()
Returns a canvas element containing the entire display, with all child layers composited within.
Returns:
{HTMLCanvasElement} A new canvas element containing a copy of the display.

{Element} getDisplay()
Returns an element containing the display of this Guacamole.Client. Adding the element returned by this function to an element in the body of a document will cause the client's display to be visible.
Returns:
{Element} An element containing ths display of this Guacamole.Client.

{Number} getHeight()
Returns the height of the display.
Returns:
{Number} The height of the display.

{Number} getScale()
Returns the scale of the display.
Returns:
{Number} The scale of the display.

{Number} getWidth()
Returns the width of the display.
Returns:
{Number} The width of the display.

scale(scale)
Sets the scale of the client display element such that it renders at a relatively smaller or larger size, without affecting the true resolution of the display.
Parameters:
{Number} scale
The scale to resize to, where 1.0 is normal size (1:1 scale).

sendAck(index, message, code)
Acknowledge receipt of a blob on the stream with the given index.
Parameters:
{Number} index
The index of the stream associated with the received blob.
{String} message
A human-readable message describing the error or status.
{Number} code
The error code, if any, or 0 for success.

sendBlob(index, data)
Given the index of a file, writes a blob of data to that file.
Parameters:
{Number} index
The index of the file to write to.
{String} data
Base64-encoded data to write to the file.

sendKeyEvent(pressed, keysym)
Sends a key event having the given properties as if the user pressed or released a key.
Parameters:
{Boolean} pressed
Whether the key is pressed (true) or released (false).
{Number} keysym
The keysym of the key being pressed or released.

sendMouseState(mouseState)
Sends a mouse event having the properties provided by the given mouse state.
Parameters:
{Guacamole.Mouse.State} mouseState
The state of the mouse to send in the mouse event.

sendSize(width, height)
Sends the current size of the screen.
Parameters:
{Number} width
The width of the screen.
{Number} height
The height of the screen.

setClipboard(data)
Sets the clipboard of the remote client to the given text data.
Parameters:
{String} data
The data to send as the clipboard contents.
Event Detail
onclipboard(data)
Fired when the clipboard of the remote client is changing.
Parameters:
{String} data
The new text data of the remote clipboard.

onerror(status)
Fired when an error is reported by the remote client, and the connection is being closed.
Parameters:
{Guacamole.Status} status
A status object which describes the error.

onfile(stream, mimetype, filename)
Fired when a file stream is created. The stream provided to this event handler will contain its own event handlers for received data.
Parameters:
{Guacamole.InputStream} stream
The stream that will receive data from the server.
{String} mimetype
The mimetype of the file received.
{String} filename
The name of the file received.

onname(name)
Fired when the remote client sends a name update.
Parameters:
{String} name
The new name of this client.

onpipe(stream, mimetype, name)
Fired when a pipe stream is created. The stream provided to this event handler will contain its own event handlers for received data;
Parameters:
{Guacamole.InputStream} stream
The stream that will receive data from the server.
{String} mimetype
The mimetype of the data which will be received.
{String} name
The name of the pipe.

onresize(width, height)
Fired when the default layer (and thus the entire Guacamole display) is resized.
Parameters:
{Number} width
The new width of the Guacamole display.
{Number} height
The new height of the Guacamole display.

onstatechange(state)
Fired whenever the state of this Guacamole.Client changes.
Parameters:
{Number} state
The new state of the client.

onsync(timestamp)
Fired whenever a sync instruction is received from the server, indicating that the server is finished processing any input from the client and has sent any results.
Parameters:
{Number} timestamp
The timestamp associated with the sync instruction.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Mar 28 2014 20:51:45 GMT-0700 (PDT)