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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 class EventHandler { | 60 class EventHandler { |
61 public: | 61 public: |
62 // Called to send a transport-info message. | 62 // Called to send a transport-info message. |
63 virtual void OnOutgoingTransportInfo( | 63 virtual void OnOutgoingTransportInfo( |
64 scoped_ptr<buzz::XmlElement> message) = 0; | 64 scoped_ptr<buzz::XmlElement> message) = 0; |
65 | 65 |
66 // Called when transport route changes. | 66 // Called when transport route changes. |
67 virtual void OnTransportRouteChange(const std::string& channel_name, | 67 virtual void OnTransportRouteChange(const std::string& channel_name, |
68 const TransportRoute& route) = 0; | 68 const TransportRoute& route) = 0; |
69 | 69 |
| 70 // Called when the transport is connected. |
| 71 virtual void OnTransportConnected() = 0; |
| 72 |
70 // Called when there is an error connecting the session. | 73 // Called when there is an error connecting the session. |
71 virtual void OnTransportError(ErrorCode error) = 0; | 74 virtual void OnTransportError(ErrorCode error) = 0; |
72 }; | 75 }; |
73 | 76 |
74 Transport() {} | 77 Transport() {} |
75 virtual ~Transport() {} | 78 virtual ~Transport() {} |
76 | 79 |
77 // Starts transport session. Both parameters must outlive Transport. | 80 // Starts transport session. Both parameters must outlive Transport. |
78 virtual void Start(EventHandler* event_handler, | 81 virtual void Start(EventHandler* event_handler, |
79 Authenticator* authenticator) = 0; | 82 Authenticator* authenticator) = 0; |
(...skipping 25 matching lines...) Expand all Loading... |
105 virtual scoped_ptr<Transport> CreateTransport() = 0; | 108 virtual scoped_ptr<Transport> CreateTransport() = 0; |
106 | 109 |
107 private: | 110 private: |
108 DISALLOW_COPY_AND_ASSIGN(TransportFactory); | 111 DISALLOW_COPY_AND_ASSIGN(TransportFactory); |
109 }; | 112 }; |
110 | 113 |
111 } // namespace protocol | 114 } // namespace protocol |
112 } // namespace remoting | 115 } // namespace remoting |
113 | 116 |
114 #endif // REMOTING_PROTOCOL_TRANSPORT_H_ | 117 #endif // REMOTING_PROTOCOL_TRANSPORT_H_ |
OLD | NEW |