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 #include "remoting/protocol/fake_session.h" | 5 #include "remoting/protocol/fake_session.h" |
6 | 6 |
7 namespace remoting { | 7 namespace remoting { |
8 namespace protocol { | 8 namespace protocol { |
9 | 9 |
10 const char kTestJid[] = "host1@gmail.com/chromoting123"; | 10 const char kTestJid[] = "host1@gmail.com/chromoting123"; |
11 | 11 |
12 FakeTransport::FakeTransport() {} | 12 FakeTransport::FakeTransport() {} |
13 FakeTransport::~FakeTransport() {} | 13 FakeTransport::~FakeTransport() {} |
14 | 14 |
15 void FakeTransport::Start(EventHandler* event_handler, | 15 void FakeTransport::Start(EventHandler* event_handler, |
16 Authenticator* authenticator) { | 16 Authenticator* authenticator) { |
17 NOTREACHED(); | 17 NOTREACHED(); |
18 } | 18 } |
19 | 19 |
20 bool FakeTransport::ProcessTransportInfo( | 20 bool FakeTransport::ProcessTransportInfo( |
21 buzz::XmlElement* transport_info) { | 21 buzz::XmlElement* transport_info) { |
22 NOTREACHED(); | 22 NOTREACHED(); |
23 return true; | 23 return true; |
24 } | 24 } |
25 | 25 |
26 DatagramChannelFactory* FakeTransport::GetDatagramChannelFactory() { | |
27 NOTIMPLEMENTED(); | |
28 return nullptr; | |
29 } | |
30 | |
31 FakeStreamChannelFactory* FakeTransport::GetStreamChannelFactory() { | 26 FakeStreamChannelFactory* FakeTransport::GetStreamChannelFactory() { |
32 return &channel_factory_; | 27 return &channel_factory_; |
33 } | 28 } |
34 | 29 |
35 FakeStreamChannelFactory* FakeTransport::GetMultiplexedChannelFactory() { | 30 FakeStreamChannelFactory* FakeTransport::GetMultiplexedChannelFactory() { |
36 return &channel_factory_; | 31 return &channel_factory_; |
37 } | 32 } |
38 | 33 |
39 FakeSession::FakeSession() | 34 FakeSession::FakeSession() |
40 : event_handler_(nullptr), | 35 : event_handler_(nullptr), |
(...skipping 17 matching lines...) Expand all Loading... |
58 } | 53 } |
59 | 54 |
60 const SessionConfig& FakeSession::config() { | 55 const SessionConfig& FakeSession::config() { |
61 return *config_; | 56 return *config_; |
62 } | 57 } |
63 | 58 |
64 FakeTransport* FakeSession::GetTransport() { | 59 FakeTransport* FakeSession::GetTransport() { |
65 return &transport_; | 60 return &transport_; |
66 } | 61 } |
67 | 62 |
68 FakeStreamChannelFactory* FakeSession::GetQuicChannelFactory() { | |
69 return transport_.GetStreamChannelFactory(); | |
70 } | |
71 | |
72 void FakeSession::Close(ErrorCode error) { | 63 void FakeSession::Close(ErrorCode error) { |
73 closed_ = true; | 64 closed_ = true; |
74 error_ = error; | 65 error_ = error; |
75 } | 66 } |
76 | 67 |
77 } // namespace protocol | 68 } // namespace protocol |
78 } // namespace remoting | 69 } // namespace remoting |
OLD | NEW |