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 9ac7cc4836d8eeb9ce51890647aca74f10f4fe24..e4cc313bd0eebc6c9f3b8198639048fac5b8bbf4 100644 |
--- a/remoting/webapp/crd/js/wcs_adapter.js |
+++ b/remoting/webapp/crd/js/wcs_adapter.js |
@@ -28,7 +28,7 @@ remoting.WcsAdapter = |
this.jid_ = ''; |
/** @private */ |
this.error_ = remoting.Error.NONE; |
-} |
+}; |
/** |
* @param {?function(Element):void} onIncomingStanzaCallback Callback to call on |
@@ -37,34 +37,39 @@ remoting.WcsAdapter = |
remoting.WcsAdapter.prototype.setIncomingStanzaCallback = |
function(onIncomingStanzaCallback) { |
this.onIncomingStanzaCallback_ = onIncomingStanzaCallback; |
-} |
+}; |
remoting.WcsAdapter.prototype.connect = function(server, 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) { |
@@ -84,13 +89,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) { |
@@ -111,13 +124,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 |