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

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

Issue 8046018: Parse termination reason and propagate the error to the Session interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 2 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/jingle_messages.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/task.h" 9 #include "base/task.h"
10 #include "crypto/rsa_private_key.h" 10 #include "crypto/rsa_private_key.h"
(...skipping 10 matching lines...) Expand all
21 class JingleSessionManager; 21 class JingleSessionManager;
22 22
23 // Implements protocol::Session that work over libjingle session (the 23 // Implements protocol::Session that work over libjingle session (the
24 // cricket::Session object is passed to Init() method). Created 24 // cricket::Session object is passed to Init() method). Created
25 // by JingleSessionManager for incoming and outgoing connections. 25 // by JingleSessionManager for incoming and outgoing connections.
26 class JingleSession : public protocol::Session, 26 class JingleSession : public protocol::Session,
27 public sigslot::has_slots<> { 27 public sigslot::has_slots<> {
28 public: 28 public:
29 // Session interface. 29 // Session interface.
30 virtual void SetStateChangeCallback(StateChangeCallback* callback) OVERRIDE; 30 virtual void SetStateChangeCallback(StateChangeCallback* callback) OVERRIDE;
31 virtual Error error() OVERRIDE;
31 virtual void CreateStreamChannel( 32 virtual void CreateStreamChannel(
32 const std::string& name, 33 const std::string& name,
33 const StreamChannelCallback& callback) OVERRIDE; 34 const StreamChannelCallback& callback) OVERRIDE;
34 virtual void CreateDatagramChannel( 35 virtual void CreateDatagramChannel(
35 const std::string& name, 36 const std::string& name,
36 const DatagramChannelCallback& callback) OVERRIDE; 37 const DatagramChannelCallback& callback) OVERRIDE;
37 virtual net::Socket* control_channel() OVERRIDE; 38 virtual net::Socket* control_channel() OVERRIDE;
38 virtual net::Socket* event_channel() OVERRIDE; 39 virtual net::Socket* event_channel() OVERRIDE;
39 virtual const std::string& jid() OVERRIDE; 40 virtual const std::string& jid() OVERRIDE;
40 virtual const CandidateSessionConfig* candidate_config() OVERRIDE; 41 virtual const CandidateSessionConfig* candidate_config() OVERRIDE;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // Public key of the peer. 144 // Public key of the peer.
144 std::string peer_public_key_; 145 std::string peer_public_key_;
145 146
146 // Shared secret to use in channel authentication. This is currently only 147 // Shared secret to use in channel authentication. This is currently only
147 // used in IT2Me. 148 // used in IT2Me.
148 std::string shared_secret_; 149 std::string shared_secret_;
149 150
150 State state_; 151 State state_;
151 scoped_ptr<StateChangeCallback> state_change_callback_; 152 scoped_ptr<StateChangeCallback> state_change_callback_;
152 153
154 Error error_;
155
153 bool closing_; 156 bool closing_;
154 157
155 // JID of the other side. Set when the connection is initialized, 158 // JID of the other side. Set when the connection is initialized,
156 // and never changed after that. 159 // and never changed after that.
157 std::string jid_; 160 std::string jid_;
158 161
159 // The corresponding libjingle session. 162 // The corresponding libjingle session.
160 cricket::Session* cricket_session_; 163 cricket::Session* cricket_session_;
161 164
162 SessionConfig config_; 165 SessionConfig config_;
(...skipping 14 matching lines...) Expand all
177 ScopedRunnableMethodFactory<JingleSession> task_factory_; 180 ScopedRunnableMethodFactory<JingleSession> task_factory_;
178 181
179 DISALLOW_COPY_AND_ASSIGN(JingleSession); 182 DISALLOW_COPY_AND_ASSIGN(JingleSession);
180 }; 183 };
181 184
182 } // namespace protocol 185 } // namespace protocol
183 186
184 } // namespace remoting 187 } // namespace remoting
185 188
186 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_H_ 189 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/protocol/jingle_messages.cc ('k') | remoting/protocol/jingle_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698