mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 21:51:23 +00:00
Rename functions appropriately.
This commit is contained in:
@@ -542,7 +542,7 @@ Guacamole.Client = function(tunnel) {
|
|||||||
* @param {String} mimetype The mimetype of the file being sent.
|
* @param {String} mimetype The mimetype of the file being sent.
|
||||||
* @param {String} filename The filename of the file being sent.
|
* @param {String} filename The filename of the file being sent.
|
||||||
*/
|
*/
|
||||||
this.openFile = function(index, mimetype, filename) {
|
this.beginFileStream = function(index, mimetype, filename) {
|
||||||
|
|
||||||
// Do not send requests if not connected
|
// Do not send requests if not connected
|
||||||
if (!isConnected())
|
if (!isConnected())
|
||||||
@@ -567,11 +567,11 @@ Guacamole.Client = function(tunnel) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marks a currently-open file as closed.
|
* Marks a currently-open stream as complete.
|
||||||
*
|
*
|
||||||
* @param {Number} index The index of the file to close.
|
* @param {Number} index The index of the stream to end.
|
||||||
*/
|
*/
|
||||||
this.closeFile = function(index) {
|
this.endStream = function(index) {
|
||||||
|
|
||||||
// Do not send requests if not connected
|
// Do not send requests if not connected
|
||||||
if (!isConnected())
|
if (!isConnected())
|
||||||
|
@@ -1067,7 +1067,7 @@ GuacUI.Client.attach = function(guac) {
|
|||||||
reader.onloadend = function() {
|
reader.onloadend = function() {
|
||||||
|
|
||||||
// Open file for writing
|
// Open file for writing
|
||||||
GuacUI.Client.attachedClient.openFile(index, file.type, file.name);
|
GuacUI.Client.attachedClient.beginFileStream(index, file.type, file.name);
|
||||||
|
|
||||||
var bytes = new Uint8Array(reader.result);
|
var bytes = new Uint8Array(reader.result);
|
||||||
var offset = 0;
|
var offset = 0;
|
||||||
@@ -1086,7 +1086,7 @@ GuacUI.Client.attach = function(guac) {
|
|||||||
if (offset < bytes.length)
|
if (offset < bytes.length)
|
||||||
window.setTimeout(continueUpload, 500);
|
window.setTimeout(continueUpload, 500);
|
||||||
else
|
else
|
||||||
GuacUI.Client.attachedClient.closeFile(index);
|
GuacUI.Client.attachedClient.endStream(index);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user