Browse Source

Changes reload methods to private

master
hristoterezov 9 years ago
parent
commit
5d1ac53aa8
3 changed files with 10 additions and 10 deletions
  1. 3
    3
      JitsiConference.js
  2. 2
    2
      JitsiConferenceEventManager.js
  3. 5
    5
      JitsiConnection.js

+ 3
- 3
JitsiConference.js View File

@@ -101,20 +101,20 @@ JitsiConference.prototype._init = function (options) {
101 101
  * Reloads the conference
102 102
  * @param options {object} options to be overriden
103 103
  */
104
-JitsiConference.prototype.reload = function (options) {
104
+JitsiConference.prototype._reload = function (options) {
105 105
     var roomState = this.room.exportState();
106 106
     if(!options)
107 107
         options = {};
108 108
     options.roomState = roomState;
109 109
     this.leave(true);
110
-    this.reinitialize(options);
110
+    this._reinitialize(options);
111 111
 }
112 112
 
113 113
 /**
114 114
  * Reinitializes JitsiConference instance
115 115
  * @param options {object} options to be overriden
116 116
  */
117
-JitsiConference.prototype.reinitialize = function (options) {
117
+JitsiConference.prototype._reinitialize = function (options) {
118 118
     this._init(options || {});
119 119
     this.eventManager.setupChatRoomListeners();
120 120
     this.eventManager.setupStatisticsListeners();

+ 2
- 2
JitsiConferenceEventManager.js View File

@@ -132,7 +132,7 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function () {
132 132
 
133 133
     conference.room.addListener(XMPPEvents.FOCUS_LEFT,
134 134
         function () {
135
-            if(!conference.connection.reload())
135
+            if(!conference.connection._reload())
136 136
                 conference.eventEmitter.emit(
137 137
                     JitsiConferenceEvents.CONFERENCE_FAILED,
138 138
                     JitsiConferenceErrors.FOCUS_LEFT);
@@ -140,7 +140,7 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function () {
140 140
 
141 141
     conference.room.addListener(XMPPEvents.ALLOCATE_FOCUS_MAX_RETRIES_ERROR,
142 142
         function () {
143
-            conference.connection.reload();
143
+            conference.connection._reload();
144 144
         });
145 145
 
146 146
     this.chatRoomForwarder.forward(XMPPEvents.CONNECTION_INTERRUPTED,

+ 5
- 5
JitsiConnection.js View File

@@ -28,7 +28,7 @@ function JitsiConnection(appID, token, options) {
28 28
             if(errType === JitsiConnectionErrors.OTHER_ERROR &&
29 29
                 (msg === "item-not-found" || msg === "host-unknown")) {
30 30
                     // FIXME: don't report the error if we are going to reload
31
-                    this.reload();
31
+                    this._reload();
32 32
                 }
33 33
         }.bind(this));
34 34
 }
@@ -60,7 +60,7 @@ JitsiConnection.prototype.attach = function (options) {
60 60
  * Reloads the JitsiConnection instance and all related conferences
61 61
  * @param options {object} options to be overriden
62 62
  */
63
-JitsiConnection.prototype.reload = function (options) {
63
+JitsiConnection.prototype._reload = function (options) {
64 64
     if(this.retryOnFail === 0)
65 65
         return false;
66 66
     this.retryOnFail--;
@@ -70,7 +70,7 @@ JitsiConnection.prototype.reload = function (options) {
70 70
         this.conferences[name].leave(true);
71 71
     }
72 72
     this.connectionEstablishedHandler =
73
-        this.reloadConferences.bind(this, states);
73
+        this._reloadConferences.bind(this, states);
74 74
     this.addEventListener(JitsiConnectionEvents.CONNECTION_ESTABLISHED,
75 75
         this.connectionEstablishedHandler);
76 76
     this.xmpp.reload(options || {});
@@ -81,13 +81,13 @@ JitsiConnection.prototype.reload = function (options) {
81 81
  * Reloads all conferences related to this JitsiConnection instance
82 82
  * @param states {object} the exported states per conference
83 83
  */
84
-JitsiConnection.prototype.reloadConferences = function (states) {
84
+JitsiConnection.prototype._reloadConferences = function (states) {
85 85
     this.removeEventListener(JitsiConnectionEvents.CONNECTION_ESTABLISHED,
86 86
         this.connectionEstablishedHandler);
87 87
     this.connectionEstablishedHandler = null;
88 88
     states = states || {};
89 89
     for(var name in this.conferences) {
90
-        this.conferences[name].reinitialize({connection: this,
90
+        this.conferences[name]._reinitialize({connection: this,
91 91
             roomState: states[name]});
92 92
     }
93 93
 }

Loading…
Cancel
Save