| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 void XmppClient::Private::WriteOutput(const char* bytes, size_t len) { | 387 void XmppClient::Private::WriteOutput(const char* bytes, size_t len) { |
| 388 //#if !defined(NDEBUG) | 388 //#if !defined(NDEBUG) |
| 389 client_->SignalLogOutput(bytes, static_cast<int>(len)); | 389 client_->SignalLogOutput(bytes, static_cast<int>(len)); |
| 390 //#endif | 390 //#endif |
| 391 | 391 |
| 392 socket_->Write(bytes, len); | 392 socket_->Write(bytes, len); |
| 393 // TODO: deal with error information | 393 // TODO: deal with error information |
| 394 } | 394 } |
| 395 | 395 |
| 396 void XmppClient::Private::StartTls(const std::string& domain) { | 396 void XmppClient::Private::StartTls(const std::string& domain) { |
| 397 #if defined(FEATURE_ENABLE_SSL) | |
| 398 socket_->StartTls(domain); | 397 socket_->StartTls(domain); |
| 399 #endif | |
| 400 } | 398 } |
| 401 | 399 |
| 402 void XmppClient::Private::CloseConnection() { | 400 void XmppClient::Private::CloseConnection() { |
| 403 socket_->Close(); | 401 socket_->Close(); |
| 404 } | 402 } |
| 405 | 403 |
| 406 void XmppClient::AddXmppTask(XmppTask* task, XmppEngine::HandlerLevel level) { | 404 void XmppClient::AddXmppTask(XmppTask* task, XmppEngine::HandlerLevel level) { |
| 407 d_->engine_->AddStanzaHandler(task, level); | 405 d_->engine_->AddStanzaHandler(task, level); |
| 408 } | 406 } |
| 409 | 407 |
| 410 void XmppClient::RemoveXmppTask(XmppTask* task) { | 408 void XmppClient::RemoveXmppTask(XmppTask* task) { |
| 411 d_->engine_->RemoveStanzaHandler(task); | 409 d_->engine_->RemoveStanzaHandler(task); |
| 412 } | 410 } |
| 413 | 411 |
| 414 void XmppClient::EnsureClosed() { | 412 void XmppClient::EnsureClosed() { |
| 415 if (!d_->signal_closed_) { | 413 if (!d_->signal_closed_) { |
| 416 d_->signal_closed_ = true; | 414 d_->signal_closed_ = true; |
| 417 delivering_signal_ = true; | 415 delivering_signal_ = true; |
| 418 SignalStateChange(XmppEngine::STATE_CLOSED); | 416 SignalStateChange(XmppEngine::STATE_CLOSED); |
| 419 delivering_signal_ = false; | 417 delivering_signal_ = false; |
| 420 } | 418 } |
| 421 } | 419 } |
| 422 | 420 |
| 423 } // namespace buzz | 421 } // namespace buzz |
| OLD | NEW |