| OLD | NEW |
| 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_SESSION_H_ | 5 #ifndef REMOTING_PROTOCOL_SESSION_H_ |
| 6 #define REMOTING_PROTOCOL_SESSION_H_ | 6 #define REMOTING_PROTOCOL_SESSION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "remoting/protocol/errors.h" | 10 #include "remoting/protocol/errors.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // JID of the other side. | 81 // JID of the other side. |
| 82 virtual const std::string& jid() = 0; | 82 virtual const std::string& jid() = 0; |
| 83 | 83 |
| 84 // Protocol configuration. Can be called only after session has been accepted. | 84 // Protocol configuration. Can be called only after session has been accepted. |
| 85 // Returned pointer is valid until connection is closed. | 85 // Returned pointer is valid until connection is closed. |
| 86 virtual const SessionConfig& config() = 0; | 86 virtual const SessionConfig& config() = 0; |
| 87 | 87 |
| 88 // Returns Transport that can be used to create transport channels. | 88 // Returns Transport that can be used to create transport channels. |
| 89 virtual Transport* GetTransport() = 0; | 89 virtual Transport* GetTransport() = 0; |
| 90 | 90 |
| 91 // Channel factory for QUIC-based channels. Returns nullptr when QUIC is | |
| 92 // disabled for the session. | |
| 93 virtual StreamChannelFactory* GetQuicChannelFactory() = 0; | |
| 94 | |
| 95 // Closes connection. Callbacks are guaranteed not to be called after this | 91 // Closes connection. Callbacks are guaranteed not to be called after this |
| 96 // method returns. |error| specifies the error code in case when the session | 92 // method returns. |error| specifies the error code in case when the session |
| 97 // is being closed due to an error. | 93 // is being closed due to an error. |
| 98 virtual void Close(ErrorCode error) = 0; | 94 virtual void Close(ErrorCode error) = 0; |
| 99 | 95 |
| 100 private: | 96 private: |
| 101 DISALLOW_COPY_AND_ASSIGN(Session); | 97 DISALLOW_COPY_AND_ASSIGN(Session); |
| 102 }; | 98 }; |
| 103 | 99 |
| 104 } // namespace protocol | 100 } // namespace protocol |
| 105 } // namespace remoting | 101 } // namespace remoting |
| 106 | 102 |
| 107 #endif // REMOTING_PROTOCOL_SESSION_H_ | 103 #endif // REMOTING_PROTOCOL_SESSION_H_ |
| OLD | NEW |