| 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..065127224180dd823fb61aa58d5b81e66ff0dc6a 100644
|
| --- a/remoting/jingle_glue/signal_strategy.h
|
| +++ b/remoting/jingle_glue/signal_strategy.h
|
| @@ -30,6 +30,12 @@ class SignalStrategy {
|
| DISCONNECTED,
|
| };
|
|
|
| + enum Error {
|
| + OK,
|
| + 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,9 @@ class SignalStrategy {
|
| public:
|
| virtual ~Listener() {}
|
|
|
| - // Called after state of the connection has changed.
|
| + // Called after state of the connection has changed. If the state
|
| + // is DISCONNECTED, then GetError() can be used to get the reason
|
| + // for the disconnection.
|
| virtual void OnSignalStrategyStateChange(State state) {}
|
|
|
| // Must return true if the stanza was handled, false
|
| @@ -63,6 +71,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;
|
|
|
|
|