Chromium Code Reviews| Index: remoting/jingle_glue/signal_strategy.h |
| diff --git a/remoting/jingle_glue/signal_strategy.h b/remoting/jingle_glue/signal_strategy.h |
| index 89712670ae73b4733f2718bf04f686ca44e89a07..e3573b2c44b1b3009178650cec0b4b001cb84e3a 100644 |
| --- a/remoting/jingle_glue/signal_strategy.h |
| +++ b/remoting/jingle_glue/signal_strategy.h |
| @@ -30,6 +30,12 @@ class SignalStrategy { |
| DISCONNECTED, |
| }; |
| + enum Error { |
| + NO_ERROR, |
| + AUTHENTICATION_FAILED, |
| + NETWORK_ERROR, |
| + }; |
| + |
| // Callback interface for signaling event. Event handlers are not |
| // allowed to destroy SignalStrategy, but may add or remove other |
| // listeners. |
| @@ -37,7 +43,8 @@ class SignalStrategy { |
| public: |
| virtual ~Listener() {} |
| - // Called after state of the connection has changed. |
| + // Called after state of the connection has changed. |error| is |
| + // specified state is set to DISCONNECTED. |
|
simonmorris
2012/05/11 19:57:25
There's no |error| now. Maybe something like "If t
Sergey Ulanov
2012/05/11 20:48:05
Done.
|
| virtual void OnSignalStrategyStateChange(State state) {} |
| // Must return true if the stanza was handled, false |
| @@ -63,6 +70,9 @@ class SignalStrategy { |
| // Returns current state. |
| virtual State GetState() const = 0; |
| + // Returns the last error. Set when state changes to DISCONNECT. |
| + virtual Error GetError() const = 0; |
| + |
| // Returns local JID or an empty string when not connected. |
| virtual std::string GetLocalJid() const = 0; |