| Index: remoting/webapp/crd/js/wcs_adapter.js
|
| diff --git a/remoting/webapp/crd/js/wcs_adapter.js b/remoting/webapp/crd/js/wcs_adapter.js
|
| index 34a9b45e0f26365b0ba4e737b790f2c241b3f1c0..d68eaf91a81a4d228ee0113d2fd1525643658e6b 100644
|
| --- a/remoting/webapp/crd/js/wcs_adapter.js
|
| +++ b/remoting/webapp/crd/js/wcs_adapter.js
|
| @@ -25,7 +25,7 @@ remoting.WcsAdapter = function() {
|
| this.jid_ = '';
|
| /** @private */
|
| this.error_ = remoting.Error.NONE;
|
| -}
|
| +};
|
|
|
| /**
|
| * @param {function(remoting.SignalStrategy.State):void} onStateChangedCallback
|
| @@ -42,7 +42,7 @@ remoting.WcsAdapter.prototype.setStateChangedCallback = function(
|
| remoting.WcsAdapter.prototype.setIncomingStanzaCallback =
|
| function(onIncomingStanzaCallback) {
|
| this.onIncomingStanzaCallback_ = onIncomingStanzaCallback;
|
| -}
|
| +};
|
|
|
| /**
|
| * @param {string} server
|
| @@ -55,27 +55,32 @@ remoting.WcsAdapter.prototype.connect = function(server, username, authToken) {
|
| remoting.wcsSandbox.setOnIq(this.onIncomingStanza_.bind(this));
|
| remoting.wcsSandbox.connect(this.onWcsConnected_.bind(this),
|
| this.onError_.bind(this));
|
| -}
|
| +};
|
|
|
| /** @return {remoting.SignalStrategy.State} Current state */
|
| remoting.WcsAdapter.prototype.getState = function() {
|
| return this.state_;
|
| -}
|
| +};
|
|
|
| /** @return {remoting.Error} Error when in FAILED state. */
|
| remoting.WcsAdapter.prototype.getError = function() {
|
| return this.error_;
|
| -}
|
| +};
|
|
|
| /** @return {string} Current JID when in CONNECTED state. */
|
| remoting.WcsAdapter.prototype.getJid = function() {
|
| return this.jid_;
|
| -}
|
| +};
|
| +
|
| +/** @return {remoting.SignalStrategy.Type} The signal strategy type. */
|
| +remoting.WcsAdapter.prototype.getType = function() {
|
| + return remoting.SignalStrategy.Type.WCS;
|
| +};
|
|
|
| remoting.WcsAdapter.prototype.dispose = function() {
|
| this.setState_(remoting.SignalStrategy.State.CLOSED);
|
| remoting.wcsSandbox.setOnIq(null);
|
| -}
|
| +};
|
|
|
| /** @param {string} message */
|
| remoting.WcsAdapter.prototype.sendMessage = function(message) {
|
| @@ -95,13 +100,21 @@ remoting.WcsAdapter.prototype.sendMessage = function(message) {
|
|
|
| // Send the stanza.
|
| remoting.wcsSandbox.sendIq(message);
|
| -}
|
| +};
|
| +
|
| +/**
|
| + * @param {remoting.LogToServer} logToServer The LogToServer instance for the
|
| + * connection.
|
| + */
|
| +remoting.WcsAdapter.prototype.sendConnectionSetupResults =
|
| + function(logToServer) {
|
| +};
|
|
|
| /** @param {string} jid */
|
| remoting.WcsAdapter.prototype.onWcsConnected_ = function(jid) {
|
| this.jid_ = jid;
|
| this.setState_(remoting.SignalStrategy.State.CONNECTED);
|
| -}
|
| +};
|
|
|
| /** @param {string} stanza */
|
| remoting.WcsAdapter.prototype.onIncomingStanza_ = function(stanza) {
|
| @@ -122,13 +135,13 @@ remoting.WcsAdapter.prototype.onIncomingStanza_ = function(stanza) {
|
| if (this.onIncomingStanzaCallback_) {
|
| this.onIncomingStanzaCallback_(parsed);
|
| }
|
| -}
|
| +};
|
|
|
| /** @param {remoting.Error} error */
|
| remoting.WcsAdapter.prototype.onError_ = function(error) {
|
| this.error_ = error;
|
| this.setState_(remoting.SignalStrategy.State.FAILED);
|
| -}
|
| +};
|
|
|
| /**
|
| * @param {remoting.SignalStrategy.State} newState
|
|
|