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

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

Issue 9271026: Add JingleSession::OnRouteChange(), and pass IP endpoint information to a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and fix nits. Created 8 years, 11 months 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
« no previous file with comments | « remoting/protocol/fake_session.cc ('k') | remoting/protocol/jingle_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef REMOTING_PROTOCOL_JINGLE_SESSION_H_ 5 #ifndef REMOTING_PROTOCOL_JINGLE_SESSION_H_
6 #define REMOTING_PROTOCOL_JINGLE_SESSION_H_ 6 #define REMOTING_PROTOCOL_JINGLE_SESSION_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "net/base/completion_callback.h" 10 #include "net/base/completion_callback.h"
(...skipping 12 matching lines...) Expand all
23 // cricket::Session object is passed to Init() method). Created 23 // cricket::Session object is passed to Init() method). Created
24 // by JingleSessionManager for incoming and outgoing connections. 24 // by JingleSessionManager for incoming and outgoing connections.
25 class JingleSession : public protocol::Session, 25 class JingleSession : public protocol::Session,
26 public sigslot::has_slots<> { 26 public sigslot::has_slots<> {
27 public: 27 public:
28 virtual ~JingleSession(); 28 virtual ~JingleSession();
29 29
30 // Session interface. 30 // Session interface.
31 virtual void SetStateChangeCallback( 31 virtual void SetStateChangeCallback(
32 const StateChangeCallback& callback) OVERRIDE; 32 const StateChangeCallback& callback) OVERRIDE;
33 virtual void SetRouteChangeCallback(
34 const RouteChangeCallback& callback) OVERRIDE;
33 virtual Error error() OVERRIDE; 35 virtual Error error() OVERRIDE;
34 virtual void CreateStreamChannel( 36 virtual void CreateStreamChannel(
35 const std::string& name, 37 const std::string& name,
36 const StreamChannelCallback& callback) OVERRIDE; 38 const StreamChannelCallback& callback) OVERRIDE;
37 virtual void CreateDatagramChannel( 39 virtual void CreateDatagramChannel(
38 const std::string& name, 40 const std::string& name,
39 const DatagramChannelCallback& callback) OVERRIDE; 41 const DatagramChannelCallback& callback) OVERRIDE;
40 virtual void CancelChannelCreation(const std::string& name) OVERRIDE; 42 virtual void CancelChannelCreation(const std::string& name) OVERRIDE;
41 virtual const std::string& jid() OVERRIDE; 43 virtual const std::string& jid() OVERRIDE;
42 virtual const CandidateSessionConfig* candidate_config() OVERRIDE; 44 virtual const CandidateSessionConfig* candidate_config() OVERRIDE;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 99
98 void AddChannelConnector(const std::string& name, 100 void AddChannelConnector(const std::string& name,
99 JingleChannelConnector* connector); 101 JingleChannelConnector* connector);
100 102
101 // Called by JingleChannelConnector when it has finished connecting 103 // Called by JingleChannelConnector when it has finished connecting
102 // the channel, to remove itself from the table of pending connectors. The 104 // the channel, to remove itself from the table of pending connectors. The
103 // connector assumes responsibility for destroying itself after this call. 105 // connector assumes responsibility for destroying itself after this call.
104 void OnChannelConnectorFinished(const std::string& name, 106 void OnChannelConnectorFinished(const std::string& name,
105 JingleChannelConnector* connector); 107 JingleChannelConnector* connector);
106 108
109 void OnRouteChange(cricket::TransportChannel* channel,
110 const cricket::Candidate& candidate);
111
107 const cricket::ContentInfo* GetContentInfo() const; 112 const cricket::ContentInfo* GetContentInfo() const;
108 113
109 void SetState(State new_state); 114 void SetState(State new_state);
110 115
111 static scoped_ptr<cricket::SessionDescription> CreateSessionDescription( 116 static scoped_ptr<cricket::SessionDescription> CreateSessionDescription(
112 scoped_ptr<CandidateSessionConfig> candidate_config, 117 scoped_ptr<CandidateSessionConfig> candidate_config,
113 scoped_ptr<buzz::XmlElement> authenticator_message); 118 scoped_ptr<buzz::XmlElement> authenticator_message);
114 119
115 // JingleSessionManager that created this session. Guaranteed to 120 // JingleSessionManager that created this session. Guaranteed to
116 // exist throughout the lifetime of the session. 121 // exist throughout the lifetime of the session.
117 JingleSessionManager* jingle_session_manager_; 122 JingleSessionManager* jingle_session_manager_;
118 123
119 scoped_ptr<Authenticator> authenticator_; 124 scoped_ptr<Authenticator> authenticator_;
120 125
121 State state_; 126 State state_;
122 StateChangeCallback state_change_callback_; 127 StateChangeCallback state_change_callback_;
128 RouteChangeCallback route_change_callback_;
123 129
124 Error error_; 130 Error error_;
125 131
126 bool closing_; 132 bool closing_;
127 133
128 // JID of the other side. Set when the connection is initialized, 134 // JID of the other side. Set when the connection is initialized,
129 // and never changed after that. 135 // and never changed after that.
130 std::string jid_; 136 std::string jid_;
131 137
132 // The corresponding libjingle session. 138 // The corresponding libjingle session.
(...skipping 16 matching lines...) Expand all
149 base::WeakPtrFactory<JingleSession> weak_factory_; 155 base::WeakPtrFactory<JingleSession> weak_factory_;
150 156
151 DISALLOW_COPY_AND_ASSIGN(JingleSession); 157 DISALLOW_COPY_AND_ASSIGN(JingleSession);
152 }; 158 };
153 159
154 } // namespace protocol 160 } // namespace protocol
155 161
156 } // namespace remoting 162 } // namespace remoting
157 163
158 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_H_ 164 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/protocol/fake_session.cc ('k') | remoting/protocol/jingle_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698