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 |
11 #include "webrtc/libjingle/xmpp/xmppclient.h" | 11 #include "webrtc/libjingle/xmpp/xmppclient.h" |
12 | 12 |
13 #include "webrtc/libjingle/xmpp/constants.h" | 13 #include "webrtc/libjingle/xmpp/constants.h" |
14 #include "webrtc/libjingle/xmpp/plainsaslhandler.h" | 14 #include "webrtc/libjingle/xmpp/plainsaslhandler.h" |
15 #include "webrtc/libjingle/xmpp/prexmppauth.h" | 15 #include "webrtc/libjingle/xmpp/prexmppauth.h" |
16 #include "webrtc/libjingle/xmpp/saslplainmechanism.h" | 16 #include "webrtc/libjingle/xmpp/saslplainmechanism.h" |
17 #include "webrtc/base/logging.h" | 17 #include "webrtc/base/logging.h" |
18 #include "webrtc/base/scoped_ptr.h" | |
19 #include "webrtc/base/sigslot.h" | 18 #include "webrtc/base/sigslot.h" |
20 #include "webrtc/base/stringutils.h" | 19 #include "webrtc/base/stringutils.h" |
21 #include "xmpptask.h" | 20 #include "xmpptask.h" |
22 | 21 |
23 namespace buzz { | 22 namespace buzz { |
24 | 23 |
25 class XmppClient::Private : | 24 class XmppClient::Private : |
26 public sigslot::has_slots<>, | 25 public sigslot::has_slots<>, |
27 public XmppSessionHandler, | 26 public XmppSessionHandler, |
28 public XmppOutputHandler { | 27 public XmppOutputHandler { |
(...skipping 12 matching lines...) Expand all Loading... |
41 virtual ~Private() { | 40 virtual ~Private() { |
42 // We need to disconnect from socket_ before engine_ is destructed (by | 41 // We need to disconnect from socket_ before engine_ is destructed (by |
43 // the auto-generated destructor code). | 42 // the auto-generated destructor code). |
44 ResetSocket(); | 43 ResetSocket(); |
45 } | 44 } |
46 | 45 |
47 // the owner | 46 // the owner |
48 XmppClient* const client_; | 47 XmppClient* const client_; |
49 | 48 |
50 // the two main objects | 49 // the two main objects |
51 rtc::scoped_ptr<AsyncSocket> socket_; | 50 std::unique_ptr<AsyncSocket> socket_; |
52 rtc::scoped_ptr<XmppEngine> engine_; | 51 std::unique_ptr<XmppEngine> engine_; |
53 rtc::scoped_ptr<PreXmppAuth> pre_auth_; | 52 std::unique_ptr<PreXmppAuth> pre_auth_; |
54 rtc::CryptString pass_; | 53 rtc::CryptString pass_; |
55 std::string auth_mechanism_; | 54 std::string auth_mechanism_; |
56 std::string auth_token_; | 55 std::string auth_token_; |
57 rtc::SocketAddress server_; | 56 rtc::SocketAddress server_; |
58 std::string proxy_host_; | 57 std::string proxy_host_; |
59 int proxy_port_; | 58 int proxy_port_; |
60 XmppEngine::Error pre_engine_error_; | 59 XmppEngine::Error pre_engine_error_; |
61 int pre_engine_subcode_; | 60 int pre_engine_subcode_; |
62 CaptchaChallenge captcha_challenge_; | 61 CaptchaChallenge captcha_challenge_; |
63 bool signal_closed_; | 62 bool signal_closed_; |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 void XmppClient::EnsureClosed() { | 414 void XmppClient::EnsureClosed() { |
416 if (!d_->signal_closed_) { | 415 if (!d_->signal_closed_) { |
417 d_->signal_closed_ = true; | 416 d_->signal_closed_ = true; |
418 delivering_signal_ = true; | 417 delivering_signal_ = true; |
419 SignalStateChange(XmppEngine::STATE_CLOSED); | 418 SignalStateChange(XmppEngine::STATE_CLOSED); |
420 delivering_signal_ = false; | 419 delivering_signal_ = false; |
421 } | 420 } |
422 } | 421 } |
423 | 422 |
424 } // namespace buzz | 423 } // namespace buzz |
OLD | NEW |