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 #ifndef REMOTING_PROTOCOL_TRANSPORT_H_ | 5 #ifndef REMOTING_PROTOCOL_TRANSPORT_H_ |
6 #define REMOTING_PROTOCOL_TRANSPORT_H_ | 6 #define REMOTING_PROTOCOL_TRANSPORT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 virtual ~Transport() {} | 78 virtual ~Transport() {} |
79 | 79 |
80 // Starts transport session. Both parameters must outlive Transport. | 80 // Starts transport session. Both parameters must outlive Transport. |
81 virtual void Start(EventHandler* event_handler, | 81 virtual void Start(EventHandler* event_handler, |
82 Authenticator* authenticator) = 0; | 82 Authenticator* authenticator) = 0; |
83 | 83 |
84 // Called to process incoming transport message. Returns false if | 84 // Called to process incoming transport message. Returns false if |
85 // |transport_info| is in invalid format. | 85 // |transport_info| is in invalid format. |
86 virtual bool ProcessTransportInfo(buzz::XmlElement* transport_info) = 0; | 86 virtual bool ProcessTransportInfo(buzz::XmlElement* transport_info) = 0; |
87 | 87 |
88 // Channel factory for the session that creates raw ICE channels. | |
89 virtual DatagramChannelFactory* GetDatagramChannelFactory() = 0; | |
90 | |
91 // Channel factory for the session that creates stream channels. | 88 // Channel factory for the session that creates stream channels. |
92 virtual StreamChannelFactory* GetStreamChannelFactory() = 0; | 89 virtual StreamChannelFactory* GetStreamChannelFactory() = 0; |
93 | 90 |
94 // Returns a factory that creates multiplexed channels over a single stream | 91 // Returns a factory that creates multiplexed channels over a single stream |
95 // channel. | 92 // channel. |
96 virtual StreamChannelFactory* GetMultiplexedChannelFactory() = 0; | 93 virtual StreamChannelFactory* GetMultiplexedChannelFactory() = 0; |
97 | 94 |
98 private: | 95 private: |
99 DISALLOW_COPY_AND_ASSIGN(Transport); | 96 DISALLOW_COPY_AND_ASSIGN(Transport); |
100 }; | 97 }; |
101 | 98 |
102 class TransportFactory { | 99 class TransportFactory { |
103 public: | 100 public: |
104 TransportFactory() { } | 101 TransportFactory() { } |
105 virtual ~TransportFactory() { } | 102 virtual ~TransportFactory() { } |
106 | 103 |
107 // Creates a new Transport. The factory must outlive the session. | 104 // Creates a new Transport. The factory must outlive the session. |
108 virtual scoped_ptr<Transport> CreateTransport() = 0; | 105 virtual scoped_ptr<Transport> CreateTransport() = 0; |
109 | 106 |
110 private: | 107 private: |
111 DISALLOW_COPY_AND_ASSIGN(TransportFactory); | 108 DISALLOW_COPY_AND_ASSIGN(TransportFactory); |
112 }; | 109 }; |
113 | 110 |
114 } // namespace protocol | 111 } // namespace protocol |
115 } // namespace remoting | 112 } // namespace remoting |
116 | 113 |
117 #endif // REMOTING_PROTOCOL_TRANSPORT_H_ | 114 #endif // REMOTING_PROTOCOL_TRANSPORT_H_ |
OLD | NEW |