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_FAKE_SESSION_H_ | 5 #ifndef REMOTING_PROTOCOL_FAKE_SESSION_H_ |
6 #define REMOTING_PROTOCOL_FAKE_SESSION_H_ | 6 #define REMOTING_PROTOCOL_FAKE_SESSION_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 virtual Session::Error error() OVERRIDE; | 144 virtual Session::Error error() OVERRIDE; |
145 | 145 |
146 virtual void CreateStreamChannel( | 146 virtual void CreateStreamChannel( |
147 const std::string& name, const StreamChannelCallback& callback) OVERRIDE; | 147 const std::string& name, const StreamChannelCallback& callback) OVERRIDE; |
148 virtual void CreateDatagramChannel( | 148 virtual void CreateDatagramChannel( |
149 const std::string& name, | 149 const std::string& name, |
150 const DatagramChannelCallback& callback) OVERRIDE; | 150 const DatagramChannelCallback& callback) OVERRIDE; |
151 virtual void CancelChannelCreation(const std::string& name) OVERRIDE; | 151 virtual void CancelChannelCreation(const std::string& name) OVERRIDE; |
152 | 152 |
153 virtual FakeSocket* control_channel() OVERRIDE; | |
154 virtual FakeSocket* event_channel() OVERRIDE; | |
155 | |
156 virtual const std::string& jid() OVERRIDE; | 153 virtual const std::string& jid() OVERRIDE; |
157 | 154 |
158 virtual const CandidateSessionConfig* candidate_config() OVERRIDE; | 155 virtual const CandidateSessionConfig* candidate_config() OVERRIDE; |
159 virtual const SessionConfig& config() OVERRIDE; | 156 virtual const SessionConfig& config() OVERRIDE; |
160 virtual void set_config(const SessionConfig& config) OVERRIDE; | 157 virtual void set_config(const SessionConfig& config) OVERRIDE; |
161 | 158 |
162 virtual const std::string& initiator_token() OVERRIDE; | 159 virtual const std::string& initiator_token() OVERRIDE; |
163 virtual void set_initiator_token(const std::string& initiator_token) OVERRIDE; | 160 virtual void set_initiator_token(const std::string& initiator_token) OVERRIDE; |
164 virtual const std::string& receiver_token() OVERRIDE; | 161 virtual const std::string& receiver_token() OVERRIDE; |
165 virtual void set_receiver_token(const std::string& receiver_token) OVERRIDE; | 162 virtual void set_receiver_token(const std::string& receiver_token) OVERRIDE; |
166 | 163 |
167 virtual void set_shared_secret(const std::string& secret) OVERRIDE; | 164 virtual void set_shared_secret(const std::string& secret) OVERRIDE; |
168 virtual const std::string& shared_secret() OVERRIDE; | 165 virtual const std::string& shared_secret() OVERRIDE; |
169 | 166 |
170 virtual void Close() OVERRIDE; | 167 virtual void Close() OVERRIDE; |
171 | 168 |
172 public: | 169 public: |
173 StateChangeCallback callback_; | 170 StateChangeCallback callback_; |
174 scoped_ptr<const CandidateSessionConfig> candidate_config_; | 171 scoped_ptr<const CandidateSessionConfig> candidate_config_; |
175 SessionConfig config_; | 172 SessionConfig config_; |
176 MessageLoop* message_loop_; | 173 MessageLoop* message_loop_; |
177 FakeSocket control_channel_; | |
178 FakeSocket event_channel_; | |
179 | 174 |
180 std::map<std::string, FakeSocket*> stream_channels_; | 175 std::map<std::string, FakeSocket*> stream_channels_; |
181 std::map<std::string, FakeUdpSocket*> datagram_channels_; | 176 std::map<std::string, FakeUdpSocket*> datagram_channels_; |
182 | 177 |
183 std::string initiator_token_; | 178 std::string initiator_token_; |
184 std::string receiver_token_; | 179 std::string receiver_token_; |
185 | 180 |
186 std::string shared_secret_; | 181 std::string shared_secret_; |
187 | 182 |
188 std::string jid_; | 183 std::string jid_; |
189 | 184 |
190 Session::Error error_; | 185 Session::Error error_; |
191 bool closed_; | 186 bool closed_; |
192 | 187 |
193 DISALLOW_COPY_AND_ASSIGN(FakeSession); | 188 DISALLOW_COPY_AND_ASSIGN(FakeSession); |
194 }; | 189 }; |
195 | 190 |
196 } // namespace protocol | 191 } // namespace protocol |
197 } // namespace remoting | 192 } // namespace remoting |
198 | 193 |
199 #endif // REMOTING_PROTOCOL_FAKE_SESSION_H_ | 194 #endif // REMOTING_PROTOCOL_FAKE_SESSION_H_ |
OLD | NEW |