Class Index | File Index

Classes


Class Guacamole.Client


Defined in: Client.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Guacamole protocol client.
Field Summary
Field Attributes Field Name and Description
<inner>  
All audio channels currentl in use by the client.
<inner>  
The underlying Guacamole display.
<inner>  
All available layers and buffers
<inner>  
All current objects.
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.
 
createClipboardStream(mimetype, name)
Opens a new clipboard object for writing, having the given mimetype.
 
createFileStream(mimetype, filename)
Opens a new file for writing, having the given index, mimetype and filename.
 
createObjectOutputStream(index, mimetype, name)
Creates a new output stream associated with the given object and having the given mimetype and name.
 
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.
<inner>  
Returns the audio channel having the given index, creating a new channel if necessary.
 
Returns the underlying display of this Guacamole.Client.
<inner>  
getLayer(index)
Returns the layer with the given index, creating it if necessary.
 
Requests read access to the input stream having the given name.
 
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
 
onclipboard(stream, mimetype)
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.
 
onfilesystem(object, name)
Fired when a filesystem object is created.
 
onname(name)
Fired when the remote client sends a name update.
 
onpipe(stream, mimetype, name)
Fired when a pipe stream is created.
 
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 Guacamole.Tunnel, automatically handles incoming and outgoing Guacamole instructions via the provided tunnel, updating its display using one or more canvas elements.
Parameters:
{Guacamole.Tunnel} tunnel
The tunnel to use to send and receive Guacamole instructions.
Field Detail
<inner> {Object.} audioChannels
All audio channels currentl in use by the client. Initially, this will be empty, but channels may be allocated by the server upon request.

<inner> display
The underlying Guacamole display.

<inner> layers
All available layers and buffers

<inner> {Guacamole.Object[]} objects
All current objects. The index of each object is dictated by the Guacamole server.
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} createClipboardStream(mimetype, name)
Opens a new clipboard object for writing, having the given mimetype.
Parameters:
{String} mimetype
The mimetype of the data being sent.
{String} name
The name of the pipe.
Returns:
{Guacamole.OutputStream} The created file stream.

{Guacamole.OutputStream} createFileStream(mimetype, filename)
Opens a new file for writing, having the given index, mimetype and filename.
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} createObjectOutputStream(index, mimetype, name)
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 dictated by the object itself.
Parameters:
{Number} index
The index of the object for which the output stream is being created.
{String} mimetype
The mimetype of the data which will be sent to the output stream.
{String} name
The defined name of an output stream within the given object.
Returns:
{Guacamole.OutputStream} An output stream which will write blobs to the named output stream of the given object.

{Guacamole.OutputStream} createPipeStream(mimetype, name)
Opens a new pipe for writing, having the given name and mimetype.
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.

<inner> {Guacamole.AudioChannel} getAudioChannel(index)
Returns the audio channel having the given index, creating a new channel if necessary.
Parameters:
{Number} index
The index of the audio channel to retrieve.
Returns:
{Guacamole.AudioChannel} The audio channel having the given index.

{Guacamole.Display} getDisplay()
Returns the underlying display of this Guacamole.Client. The display contains an Element which can be added to the DOM, causing the display to become visible.
Returns:
{Guacamole.Display} The underlying display of this Guacamole.Client.

<inner> {Guacamole.Display.VisibleLayer|Guacamole.Layer} getLayer(index)
Returns the layer with the given index, creating it if necessary. Positive indices refer to visible layers, an index of zero refers to the default layer, and negative indices refer to buffers.
Parameters:
{Number} index
The index of the layer to retrieve.
Returns:
{Guacamole.Display.VisibleLayer|Guacamole.Layer} The layer having the given index.

requestObjectInputStream(index, name)
Requests read access to the input stream having the given name. If successful, a new input stream will be created.
Parameters:
{Number} index
The index of the object from which the input stream is being requested.
{String} name
The name of the input stream to request.

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.
Deprecated:
Use createClipboardStream() instead.
Event Detail
onclipboard(stream, mimetype)
Fired when the clipboard of the remote client is changing.
Parameters:
{Guacamole.InputStream} stream
The stream that will receive clipboard data from the server.
{String} mimetype
The mimetype of the data which will be received.

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.

onfilesystem(object, name)
Fired when a filesystem object is created. The object provided to this event handler will contain its own event handlers and functions for requesting and handling data.
Parameters:
{Guacamole.Object} object
The created filesystem object.
{String} name
The name of the filesystem.

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.

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 Tue Sep 08 2015 22:31:29 GMT-0700 (PDT)