Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: remoting/protocol/jingle_session_manager.h

Issue 98173006: Fix LibjingleTransportFactory to refresh STUN/Relay. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef REMOTING_PROTOCOL_JINGLE_SESSION_MANAGER_H_ 5 #ifndef REMOTING_PROTOCOL_JINGLE_SESSION_MANAGER_H_
6 #define REMOTING_PROTOCOL_JINGLE_SESSION_MANAGER_H_ 6 #define REMOTING_PROTOCOL_JINGLE_SESSION_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 12 matching lines...) Expand all
23 class XmlElement; 23 class XmlElement;
24 } // namespace buzz 24 } // namespace buzz
25 25
26 namespace talk_base { 26 namespace talk_base {
27 class SocketAddress; 27 class SocketAddress;
28 } // namespace talk_base 28 } // namespace talk_base
29 29
30 namespace remoting { 30 namespace remoting {
31 31
32 class IqSender; 32 class IqSender;
33 class JingleInfoRequest;
34 33
35 namespace protocol { 34 namespace protocol {
36 35
37 class JingleSession; 36 class JingleSession;
38 class TransportFactory; 37 class TransportFactory;
39 38
40 // JingleSessionManager and JingleSession implement the subset of the 39 // JingleSessionManager and JingleSession implement the subset of the
41 // Jingle protocol used in Chromoting. JingleSessionManager provides 40 // Jingle protocol used in Chromoting. JingleSessionManager provides
42 // the protocol::SessionManager interface for accepting incoming and 41 // the protocol::SessionManager interface for accepting incoming and
43 // creating outgoing sessions. 42 // creating outgoing sessions.
44 class JingleSessionManager : public SessionManager, 43 class JingleSessionManager : public SessionManager,
45 public SignalStrategy::Listener { 44 public SignalStrategy::Listener {
46 public: 45 public:
47 // When |fetch_stun_relay_config| is set to true then 46 // When |fetch_stun_relay_config| is set to true then
48 // JingleSessionManager will also try to query configuration of STUN 47 // JingleSessionManager will also try to query configuration of STUN
rmsousa 2013/12/13 22:10:40 Nit: clean up comment
Sergey Ulanov 2013/12/13 23:54:34 Done.
49 // and Relay servers from the signaling server. 48 // and Relay servers from the signaling server.
50 // 49 //
51 // TODO(sergeyu): Move NAT-traversal config fetching to a separate 50 // TODO(sergeyu): Move NAT-traversal config fetching to a separate
52 // class. 51 // class.
53 explicit JingleSessionManager( 52 explicit JingleSessionManager(scoped_ptr<TransportFactory> transport_factory);
54 scoped_ptr<TransportFactory> transport_factory,
55 bool fetch_stun_relay_config);
56 virtual ~JingleSessionManager(); 53 virtual ~JingleSessionManager();
57 54
58 // SessionManager interface. 55 // SessionManager interface.
59 virtual void Init(SignalStrategy* signal_strategy, 56 virtual void Init(SignalStrategy* signal_strategy,
60 SessionManager::Listener* listener) OVERRIDE; 57 SessionManager::Listener* listener) OVERRIDE;
61 virtual scoped_ptr<Session> Connect( 58 virtual scoped_ptr<Session> Connect(
62 const std::string& host_jid, 59 const std::string& host_jid,
63 scoped_ptr<Authenticator> authenticator, 60 scoped_ptr<Authenticator> authenticator,
64 scoped_ptr<CandidateSessionConfig> config) OVERRIDE; 61 scoped_ptr<CandidateSessionConfig> config) OVERRIDE;
65 virtual void Close() OVERRIDE; 62 virtual void Close() OVERRIDE;
(...skipping 26 matching lines...) Expand all
92 scoped_ptr<TransportFactory> transport_factory_; 89 scoped_ptr<TransportFactory> transport_factory_;
93 bool fetch_stun_relay_config_; 90 bool fetch_stun_relay_config_;
94 91
95 SignalStrategy* signal_strategy_; 92 SignalStrategy* signal_strategy_;
96 scoped_ptr<AuthenticatorFactory> authenticator_factory_; 93 scoped_ptr<AuthenticatorFactory> authenticator_factory_;
97 scoped_ptr<IqSender> iq_sender_; 94 scoped_ptr<IqSender> iq_sender_;
98 SessionManager::Listener* listener_; 95 SessionManager::Listener* listener_;
99 96
100 bool ready_; 97 bool ready_;
101 98
102 scoped_ptr<JingleInfoRequest> jingle_info_request_;
103
104 SessionsMap sessions_; 99 SessionsMap sessions_;
105 100
106 DISALLOW_COPY_AND_ASSIGN(JingleSessionManager); 101 DISALLOW_COPY_AND_ASSIGN(JingleSessionManager);
107 }; 102 };
108 103
109 } // namespace protocol 104 } // namespace protocol
110 } // namespace remoting 105 } // namespace remoting
111 106
112 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_MANAGER_H_ 107 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698