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/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 enum class TransportRole { | 33 enum class TransportRole { |
34 SERVER, | 34 SERVER, |
35 CLIENT, | 35 CLIENT, |
36 }; | 36 }; |
37 | 37 |
38 struct TransportRoute { | 38 struct TransportRoute { |
39 enum RouteType { | 39 enum RouteType { |
40 DIRECT, | 40 DIRECT, |
41 STUN, | 41 STUN, |
42 RELAY, | 42 RELAY, |
| 43 ROUTE_TYPE_MAX = RELAY, |
43 }; | 44 }; |
44 | 45 |
45 // Helper method to get string representation of the type. | 46 // Helper method to get string representation of the type. |
46 static std::string GetTypeString(RouteType type); | 47 static std::string GetTypeString(RouteType type); |
47 | 48 |
48 TransportRoute(); | 49 TransportRoute(); |
49 ~TransportRoute(); | 50 ~TransportRoute(); |
50 | 51 |
51 RouteType type; | 52 RouteType type; |
52 net::IPEndPoint remote_address; | 53 net::IPEndPoint remote_address; |
(...skipping 15 matching lines...) Expand all Loading... |
68 virtual void Start( | 69 virtual void Start( |
69 Authenticator* authenticator, | 70 Authenticator* authenticator, |
70 SendTransportInfoCallback send_transport_info_callback) = 0; | 71 SendTransportInfoCallback send_transport_info_callback) = 0; |
71 virtual bool ProcessTransportInfo(buzz::XmlElement* transport_info) = 0; | 72 virtual bool ProcessTransportInfo(buzz::XmlElement* transport_info) = 0; |
72 }; | 73 }; |
73 | 74 |
74 } // namespace protocol | 75 } // namespace protocol |
75 } // namespace remoting | 76 } // namespace remoting |
76 | 77 |
77 #endif // REMOTING_PROTOCOL_TRANSPORT_H_ | 78 #endif // REMOTING_PROTOCOL_TRANSPORT_H_ |
OLD | NEW |