| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SIGNALING_SIGNAL_STRATEGY_H_ | 5 #ifndef REMOTING_SIGNALING_SIGNAL_STRATEGY_H_ |
| 6 #define REMOTING_SIGNALING_SIGNAL_STRATEGY_H_ | 6 #define REMOTING_SIGNALING_SIGNAL_STRATEGY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 // Connection is closed due to an error or because Disconnect() | 28 // Connection is closed due to an error or because Disconnect() |
| 29 // was called. | 29 // was called. |
| 30 DISCONNECTED, | 30 DISCONNECTED, |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 enum Error { | 33 enum Error { |
| 34 OK, | 34 OK, |
| 35 AUTHENTICATION_FAILED, | 35 AUTHENTICATION_FAILED, |
| 36 NETWORK_ERROR, | 36 NETWORK_ERROR, |
| 37 PROTOCOL_ERROR, |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 // Callback interface for signaling event. Event handlers are not | 40 // Callback interface for signaling event. Event handlers are not |
| 40 // allowed to destroy SignalStrategy, but may add or remove other | 41 // allowed to destroy SignalStrategy, but may add or remove other |
| 41 // listeners. | 42 // listeners. |
| 42 class Listener { | 43 class Listener { |
| 43 public: | 44 public: |
| 44 virtual ~Listener() {} | 45 virtual ~Listener() {} |
| 45 | 46 |
| 46 // Called after state of the connection has changed. If the state | 47 // Called after state of the connection has changed. If the state |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // request. | 93 // request. |
| 93 virtual std::string GetNextId() = 0; | 94 virtual std::string GetNextId() = 0; |
| 94 | 95 |
| 95 private: | 96 private: |
| 96 DISALLOW_COPY_AND_ASSIGN(SignalStrategy); | 97 DISALLOW_COPY_AND_ASSIGN(SignalStrategy); |
| 97 }; | 98 }; |
| 98 | 99 |
| 99 } // namespace remoting | 100 } // namespace remoting |
| 100 | 101 |
| 101 #endif // REMOTING_SIGNALING_SIGNAL_STRATEGY_H_ | 102 #endif // REMOTING_SIGNALING_SIGNAL_STRATEGY_H_ |
| OLD | NEW |