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 creation of the channel |name| for previous | |
94 // CreateStreamChannel() and CreateDatagramChannel() calls. Can be | |
Wez
2011/11/15 22:29:13
Wording is a little confusing. I'd suggest:
"Can
Sergey Ulanov
2011/11/16 00:01:33
Done. Thanks for suggestion.
| |
95 // called to cancel channel creation before it is finished. Call is | |
96 // no-op if the channel is not being created. | |
97 virtual void CancelChannelCreation(const std::string& name) = 0; | |
98 | |
93 // TODO(sergeyu): Remove these methods, and use CreateChannel() | 99 // TODO(sergeyu): Remove these methods, and use CreateChannel() |
94 // instead. | 100 // instead. |
95 virtual net::Socket* control_channel() = 0; | 101 virtual net::Socket* control_channel() = 0; |
96 virtual net::Socket* event_channel() = 0; | 102 virtual net::Socket* event_channel() = 0; |
97 | 103 |
98 // JID of the other side. | 104 // JID of the other side. |
99 virtual const std::string& jid() = 0; | 105 virtual const std::string& jid() = 0; |
100 | 106 |
101 // Configuration of the protocol that was sent or received in the | 107 // Configuration of the protocol that was sent or received in the |
102 // session-initiate jingle message. Returned pointer is valid until | 108 // session-initiate jingle message. Returned pointer is valid until |
(...skipping 25 matching lines...) Expand all Loading... | |
128 virtual void Close() = 0; | 134 virtual void Close() = 0; |
129 | 135 |
130 private: | 136 private: |
131 DISALLOW_COPY_AND_ASSIGN(Session); | 137 DISALLOW_COPY_AND_ASSIGN(Session); |
132 }; | 138 }; |
133 | 139 |
134 } // namespace protocol | 140 } // namespace protocol |
135 } // namespace remoting | 141 } // namespace remoting |
136 | 142 |
137 #endif // REMOTING_PROTOCOL_SESSION_H_ | 143 #endif // REMOTING_PROTOCOL_SESSION_H_ |
OLD | NEW |