Lines Matching refs:that
88 var that = this._connection;
95 that.connect_callback = callback;
96 that.connected = false;
97 that.authenticated = false;
98 that.disconnecting = false;
99 that.errors = 0;
101 that.domain = domain || that.domain;
102 that.wait = wait || that.wait;
103 that.hold = hold || that.hold;
106 var body = that._buildBody().attrs({
107 to: that.domain,
109 wait: that.wait,
110 hold: that.hold,
117 that._changeConnectStatus(Strophe.Status.CONNECTING, null);
119 that._requests.push(
121 that._onRequestStateChange.bind(
122 that, this._register_cb.bind(this)),
124 that._throttledRequestHandler();
138 var that = this._connection;
141 that.connected = true;
146 if (that.xmlInput !== Strophe.Connection.prototype.xmlInput) {
147 that.xmlInput(bodyWrap);
149 if (that.rawInput !== Strophe.Connection.prototype.rawInput) {
150 that.rawInput(Strophe.serialize(bodyWrap));
163 that._changeConnectStatus(Strophe.Status.CONNFAIL, cond);
165 that._changeConnectStatus(Strophe.Status.CONNFAIL, "unknown");
172 if (!that.sid) {
173 that.sid = bodyWrap.getAttribute("sid");
175 if (!that.stream_id) {
176 that.stream_id = bodyWrap.getAttribute("authid");
180 if (wind) { that.window = parseInt(wind, 10); }
182 if (hold) { that.hold = parseInt(hold, 10); }
184 if (wait) { that.wait = parseInt(wait, 10); }
193 var body = that._buildBody();
194 that._requests.push(
196 that._onRequestStateChange.bind(
197 that, this._register_cb.bind(this)),
199 that._throttledRequestHandler();
216 that._changeConnectStatus(Strophe.Status.REGIFAIL, null);
221 that._changeConnectStatus(Strophe.Status.REGISTERING, null);
222 that._addSysHandler(this._get_register_cb.bind(this),
224 that.send($iq({type: "get"}).c("query",
238 var i, query, field, that = this._connection;
242 that._changeConnectStatus(Strophe.Status.REGIFAIL, "unknown");
260 that._changeConnectStatus(Strophe.Status.REGISTER, null);
273 var i, name, query, fields, that = this._connection;
284 that._changeConnectStatus(Strophe.Status.SUBMITTING, null);
285 that._addSysHandler(this._submit_cb.bind(this),
287 that.send(query);
300 var i, query, field, error = null, that = this._connection;
321 that._changeConnectStatus(Strophe.Status.SBMTFAIL, "unknown");
333 that.jid = this.fields.username + "@" + that.domain;
334 that.pass = this.fields.password;
339 that._changeConnectStatus(Strophe.Status.REGISTERED, null);
342 that._changeConnectStatus(Strophe.Status.SBMTFAIL, error);
358 var auth_str, hashed_auth_str, that = this._connection;
360 if (Strophe.getNodeFromJid(that.jid) === null &&
362 that._changeConnectStatus(Strophe.Status.AUTHENTICATING, null);
363 that._sasl_success_handler = that._addSysHandler(
364 that._sasl_success_cb.bind(that), null,
366 that._sasl_failure_handler = that._addSysHandler(
367 that._sasl_failure_cb.bind(that), null,
370 that.send($build("auth", {
374 } else if (Strophe.getNodeFromJid(that.jid) === null) {
377 that._changeConnectStatus(Strophe.Status.CONNFAIL,
379 that.disconnect();
381 that._changeConnectStatus(Strophe.Status.AUTHENTICATING, null);
382 that._sasl_challenge_handler = that._addSysHandler(
383 that._sasl_challenge1_cb.bind(that), null,
385 that._sasl_failure_handler = that._addSysHandler(
386 that._sasl_failure_cb.bind(that), null,
389 that.send($build("auth", {
396 auth_str = Strophe.getBareJidFromJid(that.jid);
398 auth_str = auth_str + Strophe.getNodeFromJid(that.jid);
400 auth_str = auth_str + that.pass;
402 that._changeConnectStatus(Strophe.Status.AUTHENTICATING, null);
403 that._sasl_success_handler = that._addSysHandler(
404 that._sasl_success_cb.bind(that), null,
406 that._sasl_failure_handler = that._addSysHandler(
407 that._sasl_failure_cb.bind(that), null,
411 that.send($build("auth", {
416 that._changeConnectStatus(Strophe.Status.AUTHENTICATING, null);
417 that._addSysHandler(that._auth1_cb.bind(that), null, null,
420 that.send($iq({
422 to: that.domain,
426 }).c("username", {}).t(Strophe.getNodeFromJid(that.jid)).tree());