| 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_STREAM_CONNECTOR_H_ | 5 #ifndef REMOTING_PROTOCOL_JINGLE_STREAM_CONNECTOR_H_ |
| 6 #define REMOTING_PROTOCOL_JINGLE_STREAM_CONNECTOR_H_ | 6 #define REMOTING_PROTOCOL_JINGLE_STREAM_CONNECTOR_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "net/base/completion_callback.h" | 9 #include "net/base/completion_callback.h" |
| 10 #include "remoting/protocol/channel_authenticator.h" | 10 #include "remoting/protocol/channel_authenticator.h" |
| 11 #include "remoting/protocol/jingle_channel_connector.h" | 11 #include "remoting/protocol/jingle_channel_connector.h" |
| 12 #include "remoting/protocol/session.h" | 12 #include "remoting/protocol/session.h" |
| 13 | 13 |
| 14 namespace cricket { | 14 namespace cricket { |
| 15 class TransportChannel; | 15 class TransportChannel; |
| 16 } // namespace cricket | 16 } // namespace cricket |
| 17 | 17 |
| 18 namespace jingle_glue { | 18 namespace jingle_glue { |
| 19 class TransportChannelSocketAdapter; | 19 class TransportChannelSocketAdapter; |
| 20 } // namespace jingle_glue | 20 } // namespace jingle_glue |
| 21 | 21 |
| 22 namespace net { | 22 namespace net { |
| 23 class CertVerifier; | 23 class CertVerifier; |
| 24 class StreamSocket; | 24 class StreamSocket; |
| 25 class SSLClientSocket; | 25 class SSLSocket; |
| 26 class SSLServerSocket; | |
| 27 } // namespace net | 26 } // namespace net |
| 28 | 27 |
| 29 namespace remoting { | 28 namespace remoting { |
| 30 namespace protocol { | 29 namespace protocol { |
| 31 | 30 |
| 32 class JingleSession; | 31 class JingleSession; |
| 33 | 32 |
| 34 // JingleStreamConnector creates the named datagram channel in the supplied | 33 // JingleStreamConnector creates the named datagram channel in the supplied |
| 35 // JingleSession, and uses PseudoTcp to turn it into a stream channel. Within | 34 // JingleSession, and uses PseudoTcp to turn it into a stream channel. Within |
| 36 // the stream channel SSL is used to secure the protocol stream. Finally, the | 35 // the stream channel SSL is used to secure the protocol stream. Finally, the |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 JingleSession* session_; | 68 JingleSession* session_; |
| 70 std::string name_; | 69 std::string name_; |
| 71 Session::StreamChannelCallback callback_; | 70 Session::StreamChannelCallback callback_; |
| 72 | 71 |
| 73 bool initiator_; | 72 bool initiator_; |
| 74 std::string local_cert_; | 73 std::string local_cert_; |
| 75 std::string remote_cert_; | 74 std::string remote_cert_; |
| 76 crypto::RSAPrivateKey* local_private_key_; | 75 crypto::RSAPrivateKey* local_private_key_; |
| 77 | 76 |
| 78 cricket::TransportChannel* raw_channel_; | 77 cricket::TransportChannel* raw_channel_; |
| 79 scoped_ptr<net::StreamSocket> socket_; | 78 scoped_ptr<net::StreamSocket> tcp_socket_; |
| 80 | 79 scoped_ptr<net::SSLSocket> socket_; |
| 81 // TODO(wez): Ugly up-casts needed so we can fetch SSL keying material. | |
| 82 net::SSLClientSocket* ssl_client_socket_; | |
| 83 net::SSLServerSocket* ssl_server_socket_; | |
| 84 | 80 |
| 85 // Used to verify the certificate received in SSLClientSocket. | 81 // Used to verify the certificate received in SSLClientSocket. |
| 86 scoped_ptr<net::CertVerifier> cert_verifier_; | 82 scoped_ptr<net::CertVerifier> cert_verifier_; |
| 87 | 83 |
| 88 scoped_ptr<ChannelAuthenticator> authenticator_; | 84 scoped_ptr<ChannelAuthenticator> authenticator_; |
| 89 | 85 |
| 90 // Callback called by the TCP and SSL layers. | 86 // Callback called by the TCP and SSL layers. |
| 91 net::OldCompletionCallbackImpl<JingleStreamConnector> tcp_connect_callback_; | 87 net::OldCompletionCallbackImpl<JingleStreamConnector> tcp_connect_callback_; |
| 92 net::OldCompletionCallbackImpl<JingleStreamConnector> ssl_connect_callback_; | 88 net::OldCompletionCallbackImpl<JingleStreamConnector> ssl_connect_callback_; |
| 93 | 89 |
| 94 DISALLOW_COPY_AND_ASSIGN(JingleStreamConnector); | 90 DISALLOW_COPY_AND_ASSIGN(JingleStreamConnector); |
| 95 }; | 91 }; |
| 96 | 92 |
| 97 } // namespace protocol | 93 } // namespace protocol |
| 98 } // namespace remoting | 94 } // namespace remoting |
| 99 | 95 |
| 100 #endif // REMOTING_PROTOCOL_JINGLE_STREAM_CONNECTOR_H_ | 96 #endif // REMOTING_PROTOCOL_JINGLE_STREAM_CONNECTOR_H_ |
| OLD | NEW |