GUAC-791: Fix type expressions to comply with JSDoc 3.

This commit is contained in:
Michael Jumper
2015-12-14 13:53:00 -08:00
parent 91f8f5b06b
commit 2959513d95
18 changed files with 132 additions and 132 deletions

View File

@@ -129,7 +129,7 @@ Guacamole.RawAudioPlayer = function RawAudioPlayer(stream, mimetype) {
* The format of audio this player will decode. * The format of audio this player will decode.
* *
* @private * @private
* @type Guacamole.RawAudioPlayer._Format * @type {Guacamole.RawAudioPlayer._Format}
*/ */
var format = Guacamole.RawAudioPlayer._Format.parse(mimetype); var format = Guacamole.RawAudioPlayer._Format.parse(mimetype);
@@ -138,7 +138,7 @@ Guacamole.RawAudioPlayer = function RawAudioPlayer(stream, mimetype) {
* Web Audio API is not supported. * Web Audio API is not supported.
* *
* @private * @private
* @type AudioContext * @type {AudioContext}
*/ */
var context = (function getAudioContext() { var context = (function getAudioContext() {
@@ -167,7 +167,7 @@ Guacamole.RawAudioPlayer = function RawAudioPlayer(stream, mimetype) {
* resolution. * resolution.
* *
* @private * @private
* @type Number * @type {Number}
*/ */
var nextPacketTime = context.currentTime; var nextPacketTime = context.currentTime;
@@ -176,7 +176,7 @@ Guacamole.RawAudioPlayer = function RawAudioPlayer(stream, mimetype) {
* provided with this Guacamole.RawAudioPlayer was created. * provided with this Guacamole.RawAudioPlayer was created.
* *
* @private * @private
* @type Guacamole.ArrayBufferReader * @type {Guacamole.ArrayBufferReader}
*/ */
var reader = new Guacamole.ArrayBufferReader(stream); var reader = new Guacamole.ArrayBufferReader(stream);
@@ -188,7 +188,7 @@ Guacamole.RawAudioPlayer = function RawAudioPlayer(stream, mimetype) {
* *
* @private * @private
* @constant * @constant
* @type Number * @type {Number}
*/ */
var MIN_SPLIT_SIZE = 0.02; var MIN_SPLIT_SIZE = 0.02;
@@ -198,7 +198,7 @@ Guacamole.RawAudioPlayer = function RawAudioPlayer(stream, mimetype) {
* roughly one third of a second. * roughly one third of a second.
* *
* @private * @private
* @type Number * @type {Number}
*/ */
var maxLatency = 0.3; var maxLatency = 0.3;
@@ -218,7 +218,7 @@ Guacamole.RawAudioPlayer = function RawAudioPlayer(stream, mimetype) {
* sample, and will be 128 for 8-bit audio and 32768 for 16-bit audio. * sample, and will be 128 for 8-bit audio and 32768 for 16-bit audio.
* *
* @private * @private
* @type Number * @type {Number}
*/ */
var maxSampleValue = (format.bytesPerSample === 1) ? 128 : 32768; var maxSampleValue = (format.bytesPerSample === 1) ? 128 : 32768;
@@ -230,7 +230,7 @@ Guacamole.RawAudioPlayer = function RawAudioPlayer(stream, mimetype) {
* no further modifications can be made to that packet. * no further modifications can be made to that packet.
* *
* @private * @private
* @type SampleArray[] * @type {SampleArray[]}
*/ */
var packetQueue = []; var packetQueue = [];
@@ -493,21 +493,21 @@ Guacamole.RawAudioPlayer._Format = function _Format(template) {
* The number of bytes in each sample of audio data. This value is * The number of bytes in each sample of audio data. This value is
* independent of the number of channels. * independent of the number of channels.
* *
* @type Number * @type {Number}
*/ */
this.bytesPerSample = template.bytesPerSample; this.bytesPerSample = template.bytesPerSample;
/** /**
* The number of audio channels (ie: 1 for mono, 2 for stereo). * The number of audio channels (ie: 1 for mono, 2 for stereo).
* *
* @type Number * @type {Number}
*/ */
this.channels = template.channels; this.channels = template.channels;
/** /**
* The number of samples per second, per channel. * The number of samples per second, per channel.
* *
* @type Number * @type {Number}
*/ */
this.rate = template.rate; this.rate = template.rate;

View File

@@ -81,7 +81,7 @@ Guacamole.Client = function(tunnel) {
* All audio players currently in use by the client. Initially, this will * All audio players currently in use by the client. Initially, this will
* be empty, but audio players may be allocated by the server upon request. * be empty, but audio players may be allocated by the server upon request.
* *
* @type Object.<Number, Guacamole.AudioPlayer> * @type {Object.<Number, Guacamole.AudioPlayer>}
*/ */
var audioPlayers = {}; var audioPlayers = {};
@@ -89,7 +89,7 @@ Guacamole.Client = function(tunnel) {
* All video players currently in use by the client. Initially, this will * All video players currently in use by the client. Initially, this will
* be empty, but video players may be allocated by the server upon request. * be empty, but video players may be allocated by the server upon request.
* *
* @type Object.<Number, Guacamole.VideoPlayer> * @type {Object.<Number, Guacamole.VideoPlayer>}
*/ */
var videoPlayers = {}; var videoPlayers = {};
@@ -103,7 +103,7 @@ Guacamole.Client = function(tunnel) {
* All current objects. The index of each object is dictated by the * All current objects. The index of each object is dictated by the
* Guacamole server. * Guacamole server.
* *
* @type Guacamole.Object[] * @type {Guacamole.Object[]}
*/ */
var objects = []; var objects = [];

View File

@@ -43,7 +43,7 @@ Guacamole.DataURIReader = function(stream, mimetype) {
/** /**
* Current data URI. * Current data URI.
* *
* @type String * @type {String}
*/ */
var uri = 'data:' + mimetype + ';base64,'; var uri = 'data:' + mimetype + ';base64,';

View File

@@ -82,7 +82,7 @@ Guacamole.Display = function() {
* the relative location within the image of the mouse cursor at which * the relative location within the image of the mouse cursor at which
* each click occurs. * each click occurs.
* *
* @type Number * @type {Number}
*/ */
this.cursorHotspotX = 0; this.cursorHotspotX = 0;
@@ -91,7 +91,7 @@ Guacamole.Display = function() {
* the relative location within the image of the mouse cursor at which * the relative location within the image of the mouse cursor at which
* each click occurs. * each click occurs.
* *
* @type Number * @type {Number}
*/ */
this.cursorHotspotY = 0; this.cursorHotspotY = 0;
@@ -101,7 +101,7 @@ Guacamole.Display = function() {
* the location of the cursor image within the Guacamole display, as * the location of the cursor image within the Guacamole display, as
* last set by moveCursor(). * last set by moveCursor().
* *
* @type Number * @type {Number}
*/ */
this.cursorX = 0; this.cursorX = 0;
@@ -111,7 +111,7 @@ Guacamole.Display = function() {
* the location of the cursor image within the Guacamole display, as * the location of the cursor image within the Guacamole display, as
* last set by moveCursor(). * last set by moveCursor().
* *
* @type Number * @type {Number}
*/ */
this.cursorY = 0; this.cursorY = 0;
@@ -143,7 +143,7 @@ Guacamole.Display = function() {
* front of the queue (FIFO). These tasks will eventually be grouped * front of the queue (FIFO). These tasks will eventually be grouped
* into a Frame. * into a Frame.
* @private * @private
* @type Task[] * @type {Task[]}
*/ */
var tasks = []; var tasks = [];
@@ -151,7 +151,7 @@ Guacamole.Display = function() {
* The queue of all frames. Each frame is a pairing of an array of tasks * The queue of all frames. Each frame is a pairing of an array of tasks
* and a callback which must be called when the frame is rendered. * and a callback which must be called when the frame is rendered.
* @private * @private
* @type Frame[] * @type {Frame[]}
*/ */
var frames = []; var frames = [];
@@ -251,7 +251,7 @@ Guacamole.Display = function() {
/** /**
* Whether this Task is blocked. * Whether this Task is blocked.
* *
* @type boolean * @type {boolean}
*/ */
this.blocked = blocked; this.blocked = blocked;
@@ -1141,7 +1141,7 @@ Guacamole.Display.VisibleLayer = function(width, height) {
* to the Guacamole protocol, and not relevant at this level. * to the Guacamole protocol, and not relevant at this level.
* *
* @private * @private
* @type Number * @type {Number}
*/ */
this.__unique_id = Guacamole.Display.VisibleLayer.__next_id++; this.__unique_id = Guacamole.Display.VisibleLayer.__next_id++;
@@ -1154,20 +1154,20 @@ Guacamole.Display.VisibleLayer = function(width, height) {
/** /**
* X coordinate of the upper-left corner of this layer container within * X coordinate of the upper-left corner of this layer container within
* its parent, in pixels. * its parent, in pixels.
* @type Number * @type {Number}
*/ */
this.x = 0; this.x = 0;
/** /**
* Y coordinate of the upper-left corner of this layer container within * Y coordinate of the upper-left corner of this layer container within
* its parent, in pixels. * its parent, in pixels.
* @type Number * @type {Number}
*/ */
this.y = 0; this.y = 0;
/** /**
* Z stacking order of this layer relative to other sibling layers. * Z stacking order of this layer relative to other sibling layers.
* @type Number * @type {Number}
*/ */
this.z = 0; this.z = 0;
@@ -1177,13 +1177,13 @@ Guacamole.Display.VisibleLayer = function(width, height) {
* three values being the first row, and the last three values being the * three values being the first row, and the last three values being the
* second row. There are six values total. * second row. There are six values total.
* *
* @type Number[] * @type {Number[]}
*/ */
this.matrix = [1, 0, 0, 1, 0, 0]; this.matrix = [1, 0, 0, 1, 0, 0];
/** /**
* The parent layer container of this layer, if any. * The parent layer container of this layer, if any.
* @type Guacamole.Display.VisibleLayer * @type {Guacamole.Display.VisibleLayer}
*/ */
this.parent = null; this.parent = null;
@@ -1382,6 +1382,6 @@ Guacamole.Display.VisibleLayer = function(width, height) {
* the layer, which exists at the protocol/client level only. * the layer, which exists at the protocol/client level only.
* *
* @private * @private
* @type Number * @type {Number}
*/ */
Guacamole.Display.VisibleLayer.__next_id = 0; Guacamole.Display.VisibleLayer.__next_id = 0;

View File

@@ -40,7 +40,7 @@ Guacamole.InputStream = function(client, index) {
/** /**
* The index of this stream. * The index of this stream.
* @type Number * @type {Number}
*/ */
this.index = index; this.index = index;

View File

@@ -36,13 +36,13 @@ Guacamole.IntegerPool = function() {
/** /**
* Array of available integers. * Array of available integers.
* @type Number[] * @type {Number[]}
*/ */
var pool = []; var pool = [];
/** /**
* The next integer to return if no more integers remain. * The next integer to return if no more integers remain.
* @type Number * @type {Number}
*/ */
this.next_int = 0; this.next_int = 0;

View File

@@ -38,7 +38,7 @@ Guacamole.JSONReader = function guacamoleJSONReader(stream) {
* Reference to this Guacamole.JSONReader. * Reference to this Guacamole.JSONReader.
* *
* @private * @private
* @type Guacamole.JSONReader * @type {Guacamole.JSONReader}
*/ */
var guacReader = this; var guacReader = this;
@@ -46,7 +46,7 @@ Guacamole.JSONReader = function guacamoleJSONReader(stream) {
* Wrapped Guacamole.StringReader. * Wrapped Guacamole.StringReader.
* *
* @private * @private
* @type Guacamole.StringReader * @type {Guacamole.StringReader}
*/ */
var stringReader = new Guacamole.StringReader(stream); var stringReader = new Guacamole.StringReader(stream);
@@ -54,7 +54,7 @@ Guacamole.JSONReader = function guacamoleJSONReader(stream) {
* All JSON read thus far. * All JSON read thus far.
* *
* @private * @private
* @type String * @type {String}
*/ */
var json = ''; var json = '';

View File

@@ -77,14 +77,14 @@ Guacamole.Keyboard = function(element) {
* An arbitrary timestamp in milliseconds, indicating this event's * An arbitrary timestamp in milliseconds, indicating this event's
* position in time relative to other events. * position in time relative to other events.
* *
* @type Number * @type {Number}
*/ */
this.timestamp = new Date().getTime(); this.timestamp = new Date().getTime();
/** /**
* Whether the default action of this key event should be prevented. * Whether the default action of this key event should be prevented.
* *
* @type Boolean * @type {Boolean}
*/ */
this.defaultPrevented = false; this.defaultPrevented = false;
@@ -93,7 +93,7 @@ Guacamole.Keyboard = function(element) {
* by a best-effort guess using available event properties and keyboard * by a best-effort guess using available event properties and keyboard
* state. * state.
* *
* @type Number * @type {Number}
*/ */
this.keysym = null; this.keysym = null;
@@ -102,7 +102,7 @@ Guacamole.Keyboard = function(element) {
* If false, the keysym may still be valid, but it's only a best guess, * If false, the keysym may still be valid, but it's only a best guess,
* and future key events may be a better source of information. * and future key events may be a better source of information.
* *
* @type Boolean * @type {Boolean}
*/ */
this.reliable = false; this.reliable = false;
@@ -145,7 +145,7 @@ Guacamole.Keyboard = function(element) {
/** /**
* The JavaScript key code of the key pressed. * The JavaScript key code of the key pressed.
* *
* @type Number * @type {Number}
*/ */
this.keyCode = keyCode; this.keyCode = keyCode;
@@ -153,7 +153,7 @@ Guacamole.Keyboard = function(element) {
* The legacy DOM3 "keyIdentifier" of the key pressed, as defined at: * The legacy DOM3 "keyIdentifier" of the key pressed, as defined at:
* http://www.w3.org/TR/2009/WD-DOM-Level-3-Events-20090908/#events-Events-KeyboardEvent * http://www.w3.org/TR/2009/WD-DOM-Level-3-Events-20090908/#events-Events-KeyboardEvent
* *
* @type String * @type {String}
*/ */
this.keyIdentifier = keyIdentifier; this.keyIdentifier = keyIdentifier;
@@ -161,7 +161,7 @@ Guacamole.Keyboard = function(element) {
* The standard name of the key pressed, as defined at: * The standard name of the key pressed, as defined at:
* http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent * http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent
* *
* @type String * @type {String}
*/ */
this.key = key; this.key = key;
@@ -170,7 +170,7 @@ Guacamole.Keyboard = function(element) {
* defined at: * defined at:
* http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent * http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent
* *
* @type Number * @type {Number}
*/ */
this.location = location; this.location = location;
@@ -228,7 +228,7 @@ Guacamole.Keyboard = function(element) {
* The Unicode codepoint of the character that would be typed by the * The Unicode codepoint of the character that would be typed by the
* key pressed. * key pressed.
* *
* @type Number * @type {Number}
*/ */
this.charCode = charCode; this.charCode = charCode;
@@ -268,7 +268,7 @@ Guacamole.Keyboard = function(element) {
/** /**
* The JavaScript key code of the key released. * The JavaScript key code of the key released.
* *
* @type Number * @type {Number}
*/ */
this.keyCode = keyCode; this.keyCode = keyCode;
@@ -276,7 +276,7 @@ Guacamole.Keyboard = function(element) {
* The legacy DOM3 "keyIdentifier" of the key released, as defined at: * The legacy DOM3 "keyIdentifier" of the key released, as defined at:
* http://www.w3.org/TR/2009/WD-DOM-Level-3-Events-20090908/#events-Events-KeyboardEvent * http://www.w3.org/TR/2009/WD-DOM-Level-3-Events-20090908/#events-Events-KeyboardEvent
* *
* @type String * @type {String}
*/ */
this.keyIdentifier = keyIdentifier; this.keyIdentifier = keyIdentifier;
@@ -284,7 +284,7 @@ Guacamole.Keyboard = function(element) {
* The standard name of the key released, as defined at: * The standard name of the key released, as defined at:
* http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent * http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent
* *
* @type String * @type {String}
*/ */
this.key = key; this.key = key;
@@ -293,7 +293,7 @@ Guacamole.Keyboard = function(element) {
* defined at: * defined at:
* http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent * http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent
* *
* @type Number * @type {Number}
*/ */
this.location = location; this.location = location;
@@ -313,7 +313,7 @@ Guacamole.Keyboard = function(element) {
* An array of recorded events, which can be instances of the private * An array of recorded events, which can be instances of the private
* KeydownEvent, KeypressEvent, and KeyupEvent classes. * KeydownEvent, KeypressEvent, and KeyupEvent classes.
* *
* @type (KeydownEvent|KeypressEvent|KeyupEvent)[] * @type {KeyEvent[]}
*/ */
var eventLog = []; var eventLog = [];
@@ -549,7 +549,7 @@ Guacamole.Keyboard = function(element) {
* fired. This object maps keycodes to keysyms. * fired. This object maps keycodes to keysyms.
* *
* @private * @private
* @type Object.<Number, Number> * @type {Object.<Number, Number>}
*/ */
var recentKeysym = {}; var recentKeysym = {};
@@ -1086,31 +1086,31 @@ Guacamole.Keyboard.ModifierState = function() {
/** /**
* Whether shift is currently pressed. * Whether shift is currently pressed.
* @type Boolean * @type {Boolean}
*/ */
this.shift = false; this.shift = false;
/** /**
* Whether ctrl is currently pressed. * Whether ctrl is currently pressed.
* @type Boolean * @type {Boolean}
*/ */
this.ctrl = false; this.ctrl = false;
/** /**
* Whether alt is currently pressed. * Whether alt is currently pressed.
* @type Boolean * @type {Boolean}
*/ */
this.alt = false; this.alt = false;
/** /**
* Whether meta (apple key) is currently pressed. * Whether meta (apple key) is currently pressed.
* @type Boolean * @type {Boolean}
*/ */
this.meta = false; this.meta = false;
/** /**
* Whether hyper (windows key) is currently pressed. * Whether hyper (windows key) is currently pressed.
* @type Boolean * @type {Boolean}
*/ */
this.hyper = false; this.hyper = false;

View File

@@ -210,20 +210,20 @@ Guacamole.Layer = function(width, height) {
* layer.autosize = true; * layer.autosize = true;
* }); * });
* *
* @type Boolean * @type {Boolean}
* @default false * @default false
*/ */
this.autosize = false; this.autosize = false;
/** /**
* The current width of this layer. * The current width of this layer.
* @type Number * @type {Number}
*/ */
this.width = width; this.width = width;
/** /**
* The current height of this layer. * The current height of this layer.
* @type Number * @type {Number}
*/ */
this.height = height; this.height = height;

View File

@@ -66,7 +66,7 @@ Guacamole.Mouse = function(element) {
* mouse events fire. This state object is also passed in as a parameter to * mouse events fire. This state object is also passed in as a parameter to
* the handler of any mouse events. * the handler of any mouse events.
* *
* @type Guacamole.Mouse.State * @type {Guacamole.Mouse.State}
*/ */
this.currentState = new Guacamole.Mouse.State( this.currentState = new Guacamole.Mouse.State(
0, 0, 0, 0,
@@ -336,7 +336,7 @@ Guacamole.Mouse = function(element) {
* coordinates. * coordinates.
* *
* @private * @private
* @type Boolean * @type {Boolean}
*/ */
var CSS3_CURSOR_SUPPORTED = (function() { var CSS3_CURSOR_SUPPORTED = (function() {
@@ -419,31 +419,31 @@ Guacamole.Mouse.State = function(x, y, left, middle, right, up, down) {
/** /**
* The current X position of the mouse pointer. * The current X position of the mouse pointer.
* @type Number * @type {Number}
*/ */
this.x = x; this.x = x;
/** /**
* The current Y position of the mouse pointer. * The current Y position of the mouse pointer.
* @type Number * @type {Number}
*/ */
this.y = y; this.y = y;
/** /**
* Whether the left mouse button is currently pressed. * Whether the left mouse button is currently pressed.
* @type Boolean * @type {Boolean}
*/ */
this.left = left; this.left = left;
/** /**
* Whether the middle mouse button is currently pressed. * Whether the middle mouse button is currently pressed.
* @type Boolean * @type {Boolean}
*/ */
this.middle = middle; this.middle = middle;
/** /**
* Whether the right mouse button is currently pressed. * Whether the right mouse button is currently pressed.
* @type Boolean * @type {Boolean}
*/ */
this.right = right; this.right = right;
@@ -451,7 +451,7 @@ Guacamole.Mouse.State = function(x, y, left, middle, right, up, down) {
* Whether the up mouse button is currently pressed. This is the fourth * Whether the up mouse button is currently pressed. This is the fourth
* mouse button, associated with upward scrolling of the mouse scroll * mouse button, associated with upward scrolling of the mouse scroll
* wheel. * wheel.
* @type Boolean * @type {Boolean}
*/ */
this.up = up; this.up = up;
@@ -459,7 +459,7 @@ Guacamole.Mouse.State = function(x, y, left, middle, right, up, down) {
* Whether the down mouse button is currently pressed. This is the fifth * Whether the down mouse button is currently pressed. This is the fifth
* mouse button, associated with downward scrolling of the mouse scroll * mouse button, associated with downward scrolling of the mouse scroll
* wheel. * wheel.
* @type Boolean * @type {Boolean}
*/ */
this.down = down; this.down = down;
@@ -542,7 +542,7 @@ Guacamole.Mouse.Touchpad = function(element) {
* mouse events fire. This state object is also passed in as a parameter to * mouse events fire. This state object is also passed in as a parameter to
* the handler of any mouse events. * the handler of any mouse events.
* *
* @type Guacamole.Mouse.State * @type {Guacamole.Mouse.State}
*/ */
this.currentState = new Guacamole.Mouse.State( this.currentState = new Guacamole.Mouse.State(
0, 0, 0, 0,
@@ -843,7 +843,7 @@ Guacamole.Mouse.Touchscreen = function(element) {
* mouse events fire. This state object is also passed in as a parameter to * mouse events fire. This state object is also passed in as a parameter to
* the handler of any mouse events. * the handler of any mouse events.
* *
* @type Guacamole.Mouse.State * @type {Guacamole.Mouse.State}
*/ */
this.currentState = new Guacamole.Mouse.State( this.currentState = new Guacamole.Mouse.State(
0, 0, 0, 0,

View File

@@ -39,18 +39,16 @@ Guacamole.Object = function guacamoleObject(client, index) {
* Reference to this Guacamole.Object. * Reference to this Guacamole.Object.
* *
* @private * @private
* @type Guacamole.Object * @type {Guacamole.Object}
*/ */
var guacObject = this; var guacObject = this;
/** /**
* The callbacks associated with all pending input stream requests, if the * Map of stream name to corresponding queue of callbacks. The queue of
* default onbody handling is in use. * callbacks is guaranteed to be in order of request.
* *
* @private * @private
* @type Object.<String, Function[]> * @type {Object.<String, Function[]>}
* Map of stream name to corresponding queue of callbacks. The queue of
* callbacks is guaranteed to be in order of request.
*/ */
var bodyCallbacks = {}; var bodyCallbacks = {};
@@ -112,7 +110,7 @@ Guacamole.Object = function guacamoleObject(client, index) {
/** /**
* The index of this object. * The index of this object.
* *
* @type Number * @type {Number}
*/ */
this.index = index; this.index = index;
@@ -200,7 +198,7 @@ Guacamole.Object = function guacamoleObject(client, index) {
* the root stream MUST be a JSON map of stream name to mimetype. * the root stream MUST be a JSON map of stream name to mimetype.
* *
* @constant * @constant
* @type String * @type {String}
*/ */
Guacamole.Object.ROOT_STREAM = '/'; Guacamole.Object.ROOT_STREAM = '/';
@@ -210,6 +208,6 @@ Guacamole.Object.ROOT_STREAM = '/';
* have this mimetype. * have this mimetype.
* *
* @constant * @constant
* @type String * @type {String}
*/ */
Guacamole.Object.STREAM_INDEX_MIMETYPE = 'application/vnd.glyptodon.guacamole.stream-index+json'; Guacamole.Object.STREAM_INDEX_MIMETYPE = 'application/vnd.glyptodon.guacamole.stream-index+json';

View File

@@ -36,7 +36,7 @@ Guacamole.OnScreenKeyboard = function(layout) {
/** /**
* Reference to this Guacamole.OnScreenKeyboard. * Reference to this Guacamole.OnScreenKeyboard.
* *
* @type Guacamole.OnScreenKeyboard * @type {Guacamole.OnScreenKeyboard}
*/ */
var osk = this; var osk = this;
@@ -46,7 +46,7 @@ Guacamole.OnScreenKeyboard = function(layout) {
* released. * released.
* *
* @private * @private
* @type Object.<String, Number> * @type {Object.<String, Number>}
*/ */
var modifierKeysyms = {}; var modifierKeysyms = {};
@@ -55,7 +55,7 @@ Guacamole.OnScreenKeyboard = function(layout) {
* pressed, it may not be in this map at all, but all pressed keys will * pressed, it may not be in this map at all, but all pressed keys will
* have a corresponding mapping to true. * have a corresponding mapping to true.
* *
* @type Object.<String, Boolean> * @type {Object.<String, Boolean>}
*/ */
var pressed = {}; var pressed = {};
@@ -66,7 +66,7 @@ Guacamole.OnScreenKeyboard = function(layout) {
* experience rounding error due to unit conversions. * experience rounding error due to unit conversions.
* *
* @private * @private
* @type ScaledElement[] * @type {ScaledElement[]}
*/ */
var scaledElements = []; var scaledElements = [];
@@ -133,7 +133,7 @@ Guacamole.OnScreenKeyboard = function(layout) {
* while non-zero, mouse events will have no effect. * while non-zero, mouse events will have no effect.
* *
* @private * @private
* @type Number * @type {Number}
*/ */
var ignoreMouse = 0; var ignoreMouse = 0;
@@ -175,7 +175,7 @@ Guacamole.OnScreenKeyboard = function(layout) {
* The width of this ScaledElement, in arbitrary units, relative to * The width of this ScaledElement, in arbitrary units, relative to
* other ScaledElements. * other ScaledElements.
* *
* @type Number * @type {Number}
*/ */
this.width = width; this.width = width;
@@ -183,7 +183,7 @@ Guacamole.OnScreenKeyboard = function(layout) {
* The height of this ScaledElement, in arbitrary units, relative to * The height of this ScaledElement, in arbitrary units, relative to
* other ScaledElements. * other ScaledElements.
* *
* @type Number * @type {Number}
*/ */
this.height = height; this.height = height;
@@ -396,7 +396,7 @@ Guacamole.OnScreenKeyboard = function(layout) {
* The number of mousemove events to require before re-enabling mouse * The number of mousemove events to require before re-enabling mouse
* event handling after receiving a touch event. * event handling after receiving a touch event.
* *
* @type Number * @type {Number}
*/ */
this.touchMouseThreshold = 3; this.touchMouseThreshold = 3;
@@ -419,7 +419,7 @@ Guacamole.OnScreenKeyboard = function(layout) {
/** /**
* The keyboard layout provided at time of construction. * The keyboard layout provided at time of construction.
* *
* @type Guacamole.OnScreenKeyboard.Layout * @type {Guacamole.OnScreenKeyboard.Layout}
*/ */
this.layout = new Guacamole.OnScreenKeyboard.Layout(layout); this.layout = new Guacamole.OnScreenKeyboard.Layout(layout);
@@ -535,7 +535,7 @@ Guacamole.OnScreenKeyboard = function(layout) {
* Map of all key names to their corresponding set of keys. Each key name * Map of all key names to their corresponding set of keys. Each key name
* may correspond to multiple keys due to the effect of modifiers. * may correspond to multiple keys due to the effect of modifiers.
* *
* @type Object.<String, Guacamole.OnScreenKeyboard.Key[]> * @type {Object.<String, Guacamole.OnScreenKeyboard.Key[]>}
*/ */
this.keys = getKeys(layout.keys); this.keys = getKeys(layout.keys);
@@ -793,7 +793,7 @@ Guacamole.OnScreenKeyboard.Layout = function(template) {
* informational purposes only, but it is recommend to conform to the * informational purposes only, but it is recommend to conform to the
* [language code]_[country code] format. * [language code]_[country code] format.
* *
* @type String * @type {String}
*/ */
this.language = template.language; this.language = template.language;
@@ -801,7 +801,7 @@ Guacamole.OnScreenKeyboard.Layout = function(template) {
* The type of keyboard layout, such as "qwerty". This property is for * The type of keyboard layout, such as "qwerty". This property is for
* informational purposes only, and does not conform to any standard. * informational purposes only, and does not conform to any standard.
* *
* @type String * @type {String}
*/ */
this.type = template.type; this.type = template.type;
@@ -811,7 +811,7 @@ Guacamole.OnScreenKeyboard.Layout = function(template) {
* implicitly. In all cases, the name property of the key object will be * implicitly. In all cases, the name property of the key object will be
* taken from the name given in the mapping. * taken from the name given in the mapping.
* *
* @type Object.<String, Number|String|Guacamole.OnScreenKeyboard.Key|Guacamole.OnScreenKeyboard.Key[]> * @type {Object.<String, Number|String|Guacamole.OnScreenKeyboard.Key|Guacamole.OnScreenKeyboard.Key[]>}
*/ */
this.keys = template.keys; this.keys = template.keys;
@@ -824,7 +824,7 @@ Guacamole.OnScreenKeyboard.Layout = function(template) {
* numbers present will be transformed into gaps of that size, scaled * numbers present will be transformed into gaps of that size, scaled
* according to the same units as each key. * according to the same units as each key.
* *
* @type Object * @type {Object}
*/ */
this.layout = template.layout; this.layout = template.layout;
@@ -834,7 +834,7 @@ Guacamole.OnScreenKeyboard.Layout = function(template) {
* the same units. The conversion factor between these units and pixels is * the same units. The conversion factor between these units and pixels is
* derived later via a call to resize() on the Guacamole.OnScreenKeyboard. * derived later via a call to resize() on the Guacamole.OnScreenKeyboard.
* *
* @type Number * @type {Number}
*/ */
this.width = template.width; this.width = template.width;
@@ -844,7 +844,7 @@ Guacamole.OnScreenKeyboard.Layout = function(template) {
* overall size of the keyboard. If not defined here, the width of each * overall size of the keyboard. If not defined here, the width of each
* key will default to 1. * key will default to 1.
* *
* @type Object.<String, Number> * @type {Object.<String, Number>}
*/ */
this.keyWidths = template.keyWidths || {}; this.keyWidths = template.keyWidths || {};
@@ -872,7 +872,7 @@ Guacamole.OnScreenKeyboard.Key = function(template, name) {
/** /**
* The unique name identifying this key within the keyboard layout. * The unique name identifying this key within the keyboard layout.
* *
* @type String * @type {String}
*/ */
this.name = name || template.name; this.name = name || template.name;
@@ -880,7 +880,7 @@ Guacamole.OnScreenKeyboard.Key = function(template, name) {
* The human-readable title that will be displayed to the user within the * The human-readable title that will be displayed to the user within the
* key. If not provided, this will be derived from the key name. * key. If not provided, this will be derived from the key name.
* *
* @type String * @type {String}
*/ */
this.title = template.title || this.name; this.title = template.title || this.name;
@@ -889,7 +889,7 @@ Guacamole.OnScreenKeyboard.Key = function(template, name) {
* not provided, this will be derived from the title if the title is a * not provided, this will be derived from the title if the title is a
* single character. * single character.
* *
* @type Number * @type {Number}
*/ */
this.keysym = template.keysym || (function deriveKeysym(title) { this.keysym = template.keysym || (function deriveKeysym(title) {
@@ -918,7 +918,7 @@ Guacamole.OnScreenKeyboard.Key = function(template, name) {
* the "shift" modifier, for example. By default, the key will affect no * the "shift" modifier, for example. By default, the key will affect no
* modifiers. * modifiers.
* *
* @type String * @type {String}
*/ */
this.modifier = template.modifier; this.modifier = template.modifier;
@@ -929,7 +929,7 @@ Guacamole.OnScreenKeyboard.Key = function(template, name) {
* is named "shift" within the layout. By default, the key will require * is named "shift" within the layout. By default, the key will require
* no modifiers. * no modifiers.
* *
* @type String[] * @type {String[]}
*/ */
this.requires = template.requires || []; this.requires = template.requires || [];

View File

@@ -39,7 +39,7 @@ Guacamole.OutputStream = function(client, index) {
/** /**
* The index of this stream. * The index of this stream.
* @type Number * @type {Number}
*/ */
this.index = index; this.index = index;

View File

@@ -42,7 +42,7 @@ Guacamole.Status = function(code, message) {
/** /**
* The Guacamole status code. * The Guacamole status code.
* @see Guacamole.Status.Code * @see Guacamole.Status.Code
* @type Number * @type {Number}
*/ */
this.code = code; this.code = code;
@@ -52,7 +52,7 @@ Guacamole.Status = function(code, message) {
* for debugging purposes only. For user feedback, it is better to translate * for debugging purposes only. For user feedback, it is better to translate
* the Guacamole status code into a message. * the Guacamole status code into a message.
* *
* @type String * @type {String}
*/ */
this.message = message; this.message = message;
@@ -75,28 +75,28 @@ Guacamole.Status.Code = {
/** /**
* The operation succeeded. * The operation succeeded.
* *
* @type Number * @type {Number}
*/ */
"SUCCESS": 0x0000, "SUCCESS": 0x0000,
/** /**
* The requested operation is unsupported. * The requested operation is unsupported.
* *
* @type Number * @type {Number}
*/ */
"UNSUPPORTED": 0x0100, "UNSUPPORTED": 0x0100,
/** /**
* The operation could not be performed due to an internal failure. * The operation could not be performed due to an internal failure.
* *
* @type Number * @type {Number}
*/ */
"SERVER_ERROR": 0x0200, "SERVER_ERROR": 0x0200,
/** /**
* The operation could not be performed as the server is busy. * The operation could not be performed as the server is busy.
* *
* @type Number * @type {Number}
*/ */
"SERVER_BUSY": 0x0201, "SERVER_BUSY": 0x0201,
@@ -104,7 +104,7 @@ Guacamole.Status.Code = {
* The operation was unsuccessful due to an error or otherwise unexpected * The operation was unsuccessful due to an error or otherwise unexpected
* condition of the upstream server. * condition of the upstream server.
* *
* @type Number * @type {Number}
*/ */
"UPSTREAM_TIMEOUT": 0x0202, "UPSTREAM_TIMEOUT": 0x0202,
@@ -112,7 +112,7 @@ Guacamole.Status.Code = {
* The operation could not be performed because the upstream server is not * The operation could not be performed because the upstream server is not
* responding. * responding.
* *
* @type Number * @type {Number}
*/ */
"UPSTREAM_ERROR": 0x0203, "UPSTREAM_ERROR": 0x0203,
@@ -120,7 +120,7 @@ Guacamole.Status.Code = {
* The operation could not be performed as the requested resource does not * The operation could not be performed as the requested resource does not
* exist. * exist.
* *
* @type Number * @type {Number}
*/ */
"RESOURCE_NOT_FOUND": 0x0204, "RESOURCE_NOT_FOUND": 0x0204,
@@ -128,14 +128,14 @@ Guacamole.Status.Code = {
* The operation could not be performed as the requested resource is * The operation could not be performed as the requested resource is
* already in use. * already in use.
* *
* @type Number * @type {Number}
*/ */
"RESOURCE_CONFLICT": 0x0205, "RESOURCE_CONFLICT": 0x0205,
/** /**
* The operation could not be performed because bad parameters were given. * The operation could not be performed because bad parameters were given.
* *
* @type Number * @type {Number}
*/ */
"CLIENT_BAD_REQUEST": 0x0300, "CLIENT_BAD_REQUEST": 0x0300,
@@ -143,7 +143,7 @@ Guacamole.Status.Code = {
* Permission was denied to perform the operation, as the user is not yet * Permission was denied to perform the operation, as the user is not yet
* authorized (not yet logged in, for example). * authorized (not yet logged in, for example).
* *
* @type Number * @type {Number}
*/ */
"CLIENT_UNAUTHORIZED": 0x0301, "CLIENT_UNAUTHORIZED": 0x0301,
@@ -151,28 +151,28 @@ Guacamole.Status.Code = {
* Permission was denied to perform the operation, and this permission will * Permission was denied to perform the operation, and this permission will
* not be granted even if the user is authorized. * not be granted even if the user is authorized.
* *
* @type Number * @type {Number}
*/ */
"CLIENT_FORBIDDEN": 0x0303, "CLIENT_FORBIDDEN": 0x0303,
/** /**
* The client took too long to respond. * The client took too long to respond.
* *
* @type Number * @type {Number}
*/ */
"CLIENT_TIMEOUT": 0x0308, "CLIENT_TIMEOUT": 0x0308,
/** /**
* The client sent too much data. * The client sent too much data.
* *
* @type Number * @type {Number}
*/ */
"CLIENT_OVERRUN": 0x030D, "CLIENT_OVERRUN": 0x030D,
/** /**
* The client sent data of an unsupported or unexpected type. * The client sent data of an unsupported or unexpected type.
* *
* @type Number * @type {Number}
*/ */
"CLIENT_BAD_TYPE": 0x030F, "CLIENT_BAD_TYPE": 0x030F,
@@ -180,7 +180,7 @@ Guacamole.Status.Code = {
* The operation failed because the current client is already using too * The operation failed because the current client is already using too
* many resources. * many resources.
* *
* @type Number * @type {Number}
*/ */
"CLIENT_TOO_MANY": 0x031D "CLIENT_TOO_MANY": 0x031D

View File

@@ -42,20 +42,20 @@ Guacamole.StringReader = function(stream) {
/** /**
* Wrapped Guacamole.ArrayBufferReader. * Wrapped Guacamole.ArrayBufferReader.
* @private * @private
* @type Guacamole.ArrayBufferReader * @type {Guacamole.ArrayBufferReader}
*/ */
var array_reader = new Guacamole.ArrayBufferReader(stream); var array_reader = new Guacamole.ArrayBufferReader(stream);
/** /**
* The number of bytes remaining for the current codepoint. * The number of bytes remaining for the current codepoint.
* *
* @type Number * @type {Number}
*/ */
var bytes_remaining = 0; var bytes_remaining = 0;
/** /**
* The current codepoint value, as calculated from bytes read so far. * The current codepoint value, as calculated from bytes read so far.
* @type Number * @type {Number}
*/ */
var codepoint = 0; var codepoint = 0;

View File

@@ -41,7 +41,7 @@ Guacamole.StringWriter = function(stream) {
/** /**
* Wrapped Guacamole.ArrayBufferWriter. * Wrapped Guacamole.ArrayBufferWriter.
* @private * @private
* @type Guacamole.ArrayBufferWriter * @type {Guacamole.ArrayBufferWriter}
*/ */
var array_writer = new Guacamole.ArrayBufferWriter(stream); var array_writer = new Guacamole.ArrayBufferWriter(stream);

View File

@@ -51,15 +51,16 @@ Guacamole.Tunnel = function() {
* Send the given message through the tunnel to the service on the other * Send the given message through the tunnel to the service on the other
* side. All messages are guaranteed to be received in the order sent. * side. All messages are guaranteed to be received in the order sent.
* *
* @param {...} elements The elements of the message to send to the * @param {...*} elements
* service on the other side of the tunnel. * The elements of the message to send to the service on the other side
* of the tunnel.
*/ */
this.sendMessage = function(elements) {}; this.sendMessage = function(elements) {};
/** /**
* The current state of this tunnel. * The current state of this tunnel.
* *
* @type Number * @type {Number}
*/ */
this.state = Guacamole.Tunnel.State.CONNECTING; this.state = Guacamole.Tunnel.State.CONNECTING;
@@ -68,7 +69,7 @@ Guacamole.Tunnel = function() {
* milliseconds. If data is not received within this amount of time, * milliseconds. If data is not received within this amount of time,
* the tunnel is closed with an error. The default value is 15000. * the tunnel is closed with an error. The default value is 15000.
* *
* @type Number * @type {Number}
*/ */
this.receiveTimeout = 15000; this.receiveTimeout = 15000;
@@ -110,14 +111,14 @@ Guacamole.Tunnel.State = {
* A connection is in pending. It is not yet known whether connection was * A connection is in pending. It is not yet known whether connection was
* successful. * successful.
* *
* @type Number * @type {Number}
*/ */
"CONNECTING": 0, "CONNECTING": 0,
/** /**
* Connection was successful, and data is being received. * Connection was successful, and data is being received.
* *
* @type Number * @type {Number}
*/ */
"OPEN": 1, "OPEN": 1,
@@ -126,7 +127,7 @@ Guacamole.Tunnel.State = {
* tunnel may have been explicitly closed by either side, or an error may * tunnel may have been explicitly closed by either side, or an error may
* have occurred. * have occurred.
* *
* @type Number * @type {Number}
*/ */
"CLOSED": 2 "CLOSED": 2
@@ -832,9 +833,10 @@ Guacamole.WebSocketTunnel.prototype = new Guacamole.Tunnel();
* *
* @constructor * @constructor
* @augments Guacamole.Tunnel * @augments Guacamole.Tunnel
* @param {...} tunnel_chain The tunnels to use, in order of priority. * @param {...*} tunnelChain
* The tunnels to use, in order of priority.
*/ */
Guacamole.ChainedTunnel = function(tunnel_chain) { Guacamole.ChainedTunnel = function(tunnelChain) {
/** /**
* Reference to this chained tunnel. * Reference to this chained tunnel.
@@ -861,7 +863,7 @@ Guacamole.ChainedTunnel = function(tunnel_chain) {
* has yet been committed. * has yet been committed.
* *
* @private * @private
* @type Guacamole.Tunnel * @type {Guacamole.Tunnel}
*/ */
var committedTunnel = null; var committedTunnel = null;

View File

@@ -28,6 +28,6 @@ var Guacamole = Guacamole || {};
* used in downstream applications as a sanity check that the proper version * used in downstream applications as a sanity check that the proper version
* of the APIs is being used (in case an older version is cached, for example). * of the APIs is being used (in case an older version is cached, for example).
* *
* @type String * @type {String}
*/ */
Guacamole.API_VERSION = "0.9.5"; Guacamole.API_VERSION = "0.9.5";