| 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_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 "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // callback is called with NULL if connection failed for any reason. | 83 // callback is called with NULL if connection failed for any reason. |
| 84 // Ownership of the channel socket is given to the caller when the | 84 // Ownership of the channel socket is given to the caller when the |
| 85 // callback is called. All channels must be destroyed before the | 85 // callback is called. All channels must be destroyed before the |
| 86 // session is destroyed. Can be called only when in CONNECTING or | 86 // session is destroyed. Can be called only when in CONNECTING or |
| 87 // CONNECTED state. | 87 // CONNECTED state. |
| 88 virtual void CreateStreamChannel( | 88 virtual void CreateStreamChannel( |
| 89 const std::string& name, const StreamChannelCallback& callback) = 0; | 89 const std::string& name, const StreamChannelCallback& callback) = 0; |
| 90 virtual void CreateDatagramChannel( | 90 virtual void CreateDatagramChannel( |
| 91 const std::string& name, const DatagramChannelCallback& callback) = 0; | 91 const std::string& name, const DatagramChannelCallback& callback) = 0; |
| 92 | 92 |
| 93 // Cancels a pending CreateStreamChannel() or CreateDatagramChannel() |
| 94 // operation for the named channel. If the channel creation already |
| 95 // completed then cancelling it has no effect. |
| 96 virtual void CancelChannelCreation(const std::string& name) = 0; |
| 97 |
| 93 // TODO(sergeyu): Remove these methods, and use CreateChannel() | 98 // TODO(sergeyu): Remove these methods, and use CreateChannel() |
| 94 // instead. | 99 // instead. |
| 95 virtual net::Socket* control_channel() = 0; | 100 virtual net::Socket* control_channel() = 0; |
| 96 virtual net::Socket* event_channel() = 0; | 101 virtual net::Socket* event_channel() = 0; |
| 97 | 102 |
| 98 // JID of the other side. | 103 // JID of the other side. |
| 99 virtual const std::string& jid() = 0; | 104 virtual const std::string& jid() = 0; |
| 100 | 105 |
| 101 // Configuration of the protocol that was sent or received in the | 106 // Configuration of the protocol that was sent or received in the |
| 102 // session-initiate jingle message. Returned pointer is valid until | 107 // session-initiate jingle message. Returned pointer is valid until |
| (...skipping 25 matching lines...) Expand all Loading... |
| 128 virtual void Close() = 0; | 133 virtual void Close() = 0; |
| 129 | 134 |
| 130 private: | 135 private: |
| 131 DISALLOW_COPY_AND_ASSIGN(Session); | 136 DISALLOW_COPY_AND_ASSIGN(Session); |
| 132 }; | 137 }; |
| 133 | 138 |
| 134 } // namespace protocol | 139 } // namespace protocol |
| 135 } // namespace remoting | 140 } // namespace remoting |
| 136 | 141 |
| 137 #endif // REMOTING_PROTOCOL_SESSION_H_ | 142 #endif // REMOTING_PROTOCOL_SESSION_H_ |
| OLD | NEW |