Lines Matching refs:d_
115 if (d_->socket_)
118 d_->socket_.reset(socket);
120 d_->socket_->SignalConnected.connect(d_.get(), &Private::OnSocketConnected);
121 d_->socket_->SignalRead.connect(d_.get(), &Private::OnSocketRead);
122 d_->socket_->SignalClosed.connect(d_.get(), &Private::OnSocketClosed);
124 d_->engine_.reset(XmppEngine::Create());
125 d_->engine_->SetSessionHandler(d_.get());
126 d_->engine_->SetOutputHandler(d_.get());
128 d_->engine_->SetRequestedResource(settings.resource());
130 d_->engine_->SetTls(settings.use_tls());
149 d_->engine_->SetTlsServer("", STR_TALK_GOOGLE_COM);
154 d_->engine_->SetLanguage(lang);
156 d_->engine_->SetUser(buzz::Jid(settings.user(), settings.host(), STR_EMPTY));
158 d_->pass_ = settings.pass();
159 d_->auth_mechanism_ = settings.auth_mechanism();
160 d_->auth_token_ = settings.auth_token();
161 d_->server_ = settings.server();
162 d_->proxy_host_ = settings.proxy_host();
163 d_->proxy_port_ = settings.proxy_port();
164 d_->allow_plain_ = settings.allow_plain();
165 d_->pre_auth_.reset(pre_auth);
171 if (!d_->engine_)
173 return d_->engine_->GetState();
180 if (!d_->engine_)
182 if (d_->pre_engine_error_ != XmppEngine::ERROR_NONE) {
184 *subcode = d_->pre_engine_subcode_;
186 return d_->pre_engine_error_;
188 return d_->engine_->GetError(subcode);
192 if (!d_->engine_) {
195 return d_->engine_->GetStreamError();
199 if (!d_->engine_)
201 return d_->captcha_challenge_;
205 if (!d_->engine_)
207 return d_->auth_mechanism_;
211 if (!d_->engine_)
213 return d_->auth_token_;
218 if (!d_->socket_) {
223 if (d_->pre_auth_) {
224 d_->pre_auth_->SignalAuthDone.connect(this, &XmppClient::OnAuthDone);
225 d_->pre_auth_->StartPreXmppAuth(
226 d_->engine_->GetUser(), d_->server_, d_->pass_,
227 d_->auth_mechanism_, d_->auth_token_);
228 d_->pass_.Clear(); // done with this;
232 d_->engine_->SetSaslHandler(new PlainSaslHandler(
233 d_->engine_->GetUser(), d_->pass_, d_->allow_plain_));
234 d_->pass_.Clear(); // done with this;
245 if (!d_->socket_) {
251 if (!d_->pre_auth_) {
252 d_->pre_engine_error_ = XmppEngine::ERROR_AUTH;
258 if (!d_->pre_auth_->IsAuthDone())
261 if (!d_->pre_auth_->IsAuthorized()) {
263 if (d_->pre_auth_->HadError()) {
264 d_->pre_engine_error_ = XmppEngine::ERROR_AUTH;
265 d_->pre_engine_subcode_ = d_->pre_auth_->GetError();
268 d_->pre_engine_error_ = XmppEngine::ERROR_UNAUTHORIZED;
269 d_->pre_engine_subcode_ = 0;
270 d_->captcha_challenge_ = d_->pre_auth_->GetCaptchaChallenge();
272 d_->pre_auth_.reset(NULL); // done with this
279 d_->auth_mechanism_ = d_->pre_auth_->GetAuthMechanism();
280 d_->auth_token_ = d_->pre_auth_->GetAuthToken();
283 d_->engine_->SetSaslHandler(d_->pre_auth_.release());
289 if (!d_->socket_) {
295 if (!d_->socket_->Connect(d_->server_)) {
306 (!d_->engine_ || d_->engine_->GetState() == XmppEngine::STATE_CLOSED))
312 if (!d_->socket_)
315 d_->engine_->Disconnect();
316 d_->ResetSocket();
324 d_.reset(new Private(this));
333 return d_->engine_->FullJid();
338 return d_->engine_->NextId();
342 return d_->engine_->SendStanza(stanza);
348 return d_->engine_->SendStanzaError(old_stanza, xse, message);
352 return d_->engine_->SendRaw(text);
356 return d_->engine_.get();
424 d_->engine_->AddStanzaHandler(task, level);
428 d_->engine_->RemoveStanzaHandler(task);
432 if (!d_->signal_closed_) {
433 d_->signal_closed_ = true;