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