| 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 #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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |