| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/jingle_glue/jingle_signaling_connector.h" | 5 #include "remoting/jingle_glue/jingle_signaling_connector.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "third_party/libjingle/source/talk/p2p/base/sessionmanager.h" | 9 #include "third_party/libjingle/source/talk/p2p/base/sessionmanager.h" |
| 10 #include "third_party/libjingle/source/talk/xmpp/constants.h" | 10 #include "third_party/libjingle/source/talk/xmpp/constants.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 session_manager_->SignalRequestSignaling.connect( | 41 session_manager_->SignalRequestSignaling.connect( |
| 42 session_manager_, &cricket::SessionManager::OnSignalingReady); | 42 session_manager_, &cricket::SessionManager::OnSignalingReady); |
| 43 } | 43 } |
| 44 | 44 |
| 45 JingleSignalingConnector::~JingleSignalingConnector() { | 45 JingleSignalingConnector::~JingleSignalingConnector() { |
| 46 signal_strategy_->RemoveListener(this); | 46 signal_strategy_->RemoveListener(this); |
| 47 STLDeleteContainerPairSecondPointers(pending_requests_.begin(), | 47 STLDeleteContainerPairSecondPointers(pending_requests_.begin(), |
| 48 pending_requests_.end()); | 48 pending_requests_.end()); |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool JingleSignalingConnector::OnIncomingStanza( | 51 void JingleSignalingConnector::OnSignalStrategyStateChange( |
| 52 SignalStrategy::State state) { |
| 53 } |
| 54 |
| 55 bool JingleSignalingConnector::OnSignalStrategyIncomingStanza( |
| 52 const buzz::XmlElement* stanza) { | 56 const buzz::XmlElement* stanza) { |
| 53 if (session_manager_->IsSessionMessage(stanza)) { | 57 if (session_manager_->IsSessionMessage(stanza)) { |
| 54 session_manager_->OnIncomingMessage(stanza); | 58 session_manager_->OnIncomingMessage(stanza); |
| 55 return true; | 59 return true; |
| 56 } | 60 } |
| 57 | 61 |
| 58 if (stanza->Name() == buzz::QN_IQ) { | 62 if (stanza->Name() == buzz::QN_IQ) { |
| 59 std::string type = stanza->Attr(buzz::QN_TYPE); | 63 std::string type = stanza->Attr(buzz::QN_TYPE); |
| 60 std::string id = stanza->Attr(buzz::QN_ID); | 64 std::string id = stanza->Attr(buzz::QN_ID); |
| 61 if ((type == "error" || type == "result") && !id.empty()) { | 65 if ((type == "error" || type == "result") && !id.empty()) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 102 |
| 99 // Save the outgoing request for OnIncomingResponse(). | 103 // Save the outgoing request for OnIncomingResponse(). |
| 100 pending_requests_[id] = new buzz::XmlElement(*stanza); | 104 pending_requests_[id] = new buzz::XmlElement(*stanza); |
| 101 } | 105 } |
| 102 } | 106 } |
| 103 | 107 |
| 104 signal_strategy_->SendStanza(stanza_copy.release()); | 108 signal_strategy_->SendStanza(stanza_copy.release()); |
| 105 } | 109 } |
| 106 | 110 |
| 107 } // namespace remoting | 111 } // namespace remoting |
| OLD | NEW |