Sfoglia il codice sorgente

Removes unused parameters, adds documentation.

dev1
Boris Grozev 10 anni fa
parent
commit
f212f63bac
2 ha cambiato i file con 17 aggiunte e 11 eliminazioni
  1. 15
    9
      modules/xmpp/JingleSessionPC.js
  2. 2
    2
      modules/xmpp/strophe.jingle.js

+ 15
- 9
modules/xmpp/JingleSessionPC.js Vedi File

@@ -860,7 +860,11 @@ JingleSessionPC.prototype.sendTerminate = function (reason, text) {
860 860
     }
861 861
 };
862 862
 
863
-JingleSessionPC.prototype.addSource = function (elem, fromJid) {
863
+/**
864
+ * Handles a Jingle source-add message for this Jingle session.
865
+ * @param elem An array of Jingle "content" elements.
866
+ */
867
+JingleSessionPC.prototype.addSource = function (elem) {
864 868
 
865 869
     var self = this;
866 870
     // FIXME: dirty waiting
@@ -869,7 +873,7 @@ JingleSessionPC.prototype.addSource = function (elem, fromJid) {
869 873
         logger.warn("addSource - localDescription not ready yet")
870 874
         setTimeout(function()
871 875
             {
872
-                self.addSource(elem, fromJid);
876
+                self.addSource(elem);
873 877
             },
874 878
             200
875 879
         );
@@ -942,16 +946,18 @@ JingleSessionPC.prototype.addSource = function (elem, fromJid) {
942 946
     });
943 947
 };
944 948
 
945
-JingleSessionPC.prototype.removeSource = function (elem, fromJid) {
949
+/**
950
+ * Handles a Jingle source-remove message for this Jingle session.
951
+ * @param elem An array of Jingle "content" elements.
952
+ */
953
+JingleSessionPC.prototype.removeSource = function (elem) {
946 954
 
947 955
     var self = this;
948 956
     // FIXME: dirty waiting
949
-    if (!this.peerconnection.localDescription)
950
-    {
951
-        logger.warn("removeSource - localDescription not ready yet")
952
-        setTimeout(function()
953
-            {
954
-                self.removeSource(elem, fromJid);
957
+    if (!this.peerconnection.localDescription) {
958
+        logger.warn("removeSource - localDescription not ready yet");
959
+        setTimeout(function() {
960
+                self.removeSource(elem);
955 961
             },
956 962
             200
957 963
         );

+ 2
- 2
modules/xmpp/strophe.jingle.js Vedi File

@@ -172,11 +172,11 @@ module.exports = function(XMPP, eventEmitter) {
172 172
                     break;
173 173
                 case 'addsource': // FIXME: proprietary, un-jingleish
174 174
                 case 'source-add': // FIXME: proprietary
175
-                    sess.addSource($(iq).find('>jingle>content'), fromJid);
175
+                    sess.addSource($(iq).find('>jingle>content'));
176 176
                     break;
177 177
                 case 'removesource': // FIXME: proprietary, un-jingleish
178 178
                 case 'source-remove': // FIXME: proprietary
179
-                    sess.removeSource($(iq).find('>jingle>content'), fromJid);
179
+                    sess.removeSource($(iq).find('>jingle>content'));
180 180
                     break;
181 181
                 default:
182 182
                     logger.warn('jingle action not implemented', action);

Loading…
Annulla
Salva