OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "remoting/jingle_glue/relay_port_allocator.h" |
| 6 |
| 7 #include "remoting/jingle_glue/jingle_info_task.h" |
| 8 #include "talk/xmpp/xmppclient.h" |
| 9 |
| 10 namespace remoting { |
| 11 |
| 12 void RelayPortAllocator::OnJingleInfo( |
| 13 const std::string & token, |
| 14 const std::vector<std::string> & relay_hosts, |
| 15 const std::vector<talk_base::SocketAddress> & stun_hosts) { |
| 16 this->SetRelayToken(token); |
| 17 this->SetStunHosts(stun_hosts); |
| 18 this->SetRelayHosts(relay_hosts); |
| 19 } |
| 20 |
| 21 void RelayPortAllocator::SetJingleInfo(buzz::XmppClient* client) { |
| 22 // The JingleInfoTask is freed by the task-runner. |
| 23 JingleInfoTask* jit = new JingleInfoTask(client); |
| 24 jit->SignalJingleInfo.connect(this, &RelayPortAllocator::OnJingleInfo); |
| 25 jit->Start(); |
| 26 jit->RefreshJingleInfoNow(); |
| 27 } |
| 28 |
| 29 } // namespace remoting |
OLD | NEW |