mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-1172: Comply with newly-adopted JavaScript coding style.
This commit is contained in:
@@ -320,7 +320,7 @@ Guacamole.Client = function(tunnel) {
|
||||
* An output stream which will write blobs to the named output stream
|
||||
* of the given object.
|
||||
*/
|
||||
this.createObjectOutputStream = function(index, mimetype, name) {
|
||||
this.createObjectOutputStream = function createObjectOutputStream(index, mimetype, name) {
|
||||
|
||||
// Allocate index
|
||||
var streamIndex = stream_indices.next();
|
||||
@@ -331,7 +331,7 @@ Guacamole.Client = function(tunnel) {
|
||||
|
||||
// Override sendEnd() of stream to automatically free index
|
||||
var oldEnd = stream.sendEnd;
|
||||
stream.sendEnd = function() {
|
||||
stream.sendEnd = function freeStreamIndex() {
|
||||
oldEnd();
|
||||
stream_indices.free(streamIndex);
|
||||
delete output_streams[streamIndex];
|
||||
@@ -353,7 +353,7 @@ Guacamole.Client = function(tunnel) {
|
||||
* @param {String} name
|
||||
* The name of the input stream to request.
|
||||
*/
|
||||
this.requestObjectInputStream = function(index, name) {
|
||||
this.requestObjectInputStream = function requestObjectInputStream(index, name) {
|
||||
|
||||
// Do not send requests if not connected
|
||||
if (!isConnected())
|
||||
@@ -645,7 +645,7 @@ Guacamole.Client = function(tunnel) {
|
||||
|
||||
},
|
||||
|
||||
"body": function(parameters) {
|
||||
"body" : function handleBody(parameters) {
|
||||
|
||||
// Get object
|
||||
var objectIndex = parseInt(parameters[0]);
|
||||
@@ -863,7 +863,7 @@ Guacamole.Client = function(tunnel) {
|
||||
|
||||
},
|
||||
|
||||
"filesystem": function(parameters) {
|
||||
"filesystem" : function handleFilesystem(parameters) {
|
||||
|
||||
var objectIndex = parseInt(parameters[0]);
|
||||
var name = parameters[1];
|
||||
@@ -1118,7 +1118,7 @@ Guacamole.Client = function(tunnel) {
|
||||
|
||||
},
|
||||
|
||||
"undefine": function(parameters) {
|
||||
"undefine" : function handleUndefine(parameters) {
|
||||
|
||||
// Get object
|
||||
var objectIndex = parseInt(parameters[0]);
|
||||
|
@@ -32,7 +32,7 @@ var Guacamole = Guacamole || {};
|
||||
* @param {Guacamole.InputStream} stream
|
||||
* The stream that JSON will be read from.
|
||||
*/
|
||||
Guacamole.JSONReader = function(stream) {
|
||||
Guacamole.JSONReader = function guacamoleJSONReader(stream) {
|
||||
|
||||
/**
|
||||
* Reference to this Guacamole.JSONReader.
|
||||
@@ -64,7 +64,7 @@ Guacamole.JSONReader = function(stream) {
|
||||
* @return {Number}
|
||||
* The current length of this Guacamole.JSONReader.
|
||||
*/
|
||||
this.getLength = function() {
|
||||
this.getLength = function getLength() {
|
||||
return json.length;
|
||||
};
|
||||
|
||||
@@ -76,7 +76,7 @@ Guacamole.JSONReader = function(stream) {
|
||||
* The contents of this Guacamole.JSONReader, as parsed from the JSON
|
||||
* contents of the input stream.
|
||||
*/
|
||||
this.getJSON = function() {
|
||||
this.getJSON = function getJSON() {
|
||||
return JSON.parse(json);
|
||||
};
|
||||
|
||||
@@ -93,7 +93,7 @@ Guacamole.JSONReader = function(stream) {
|
||||
};
|
||||
|
||||
// Simply call onend when end received
|
||||
stringReader.onend = function() {
|
||||
stringReader.onend = function onend() {
|
||||
if (guacReader.onend)
|
||||
guacReader.onend();
|
||||
};
|
||||
|
@@ -33,7 +33,7 @@ var Guacamole = Guacamole || {};
|
||||
* @param {Number} index
|
||||
* The index of this object.
|
||||
*/
|
||||
Guacamole.Object = function(client, index) {
|
||||
Guacamole.Object = function guacamoleObject(client, index) {
|
||||
|
||||
/**
|
||||
* Reference to this Guacamole.Object.
|
||||
@@ -163,7 +163,7 @@ Guacamole.Object = function(client, index) {
|
||||
* and its mimetype as its two only arguments. If the onbody handler of
|
||||
* this object is overridden, this callback will not be invoked.
|
||||
*/
|
||||
this.requestInputStream = function(name, bodyCallback) {
|
||||
this.requestInputStream = function requestInputStream(name, bodyCallback) {
|
||||
|
||||
// Queue body callback if provided
|
||||
if (bodyCallback)
|
||||
@@ -189,7 +189,7 @@ Guacamole.Object = function(client, index) {
|
||||
* An output stream which will write blobs to the named output stream
|
||||
* of this object.
|
||||
*/
|
||||
this.createOutputStream = function(mimetype, name) {
|
||||
this.createOutputStream = function createOutputStream(mimetype, name) {
|
||||
return client.createObjectOutputStream(guacObject.index, mimetype, name);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user