Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: remoting/jingle_glue/signal_strategy.h

Issue 10378110: Verify that xmpp_login specified in the config matches auth token. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698