Index: jingle/notifier/listener/push_client_observer.h |
diff --git a/jingle/notifier/listener/push_client_observer.h b/jingle/notifier/listener/push_client_observer.h |
index 0fe7d467295746bca2689611847c06a7cd4575eb..2aed2e24f6e33c3bc48b74d5bdf20484c0791071 100644 |
--- a/jingle/notifier/listener/push_client_observer.h |
+++ b/jingle/notifier/listener/push_client_observer.h |
@@ -9,6 +9,17 @@ |
namespace notifier { |
+enum PushClientState { |
+ // Notifications can be sent and received freely. |
+ NOTIFICATIONS_ON, |
+ // No notifications can be sent or received. This is a transient state. |
+ NOTIFICATIONS_OFF, |
+ // Credentials were rejected, so no notifications can be sent or |
+ // received. This state persists until a successful connection with |
+ // updated auth credentials. |
+ CREDENTIALS_REJECTED |
+}; |
+ |
// A PushClientObserver is notified whenever an incoming notification |
// is received or when the state of the push client changes. |
class PushClientObserver { |
@@ -16,11 +27,9 @@ class PushClientObserver { |
virtual ~PushClientObserver(); |
public: |
- // Called when the state of the push client changes. If |
- // |notifications_enabled| is true, that means notifications can be |
- // sent and received freely. If it is false, that means no |
- // notifications can be sent or received. |
- virtual void OnNotificationStateChange(bool notifications_enabled) = 0; |
+ // Called when the state of the push client changes. |
+ virtual void OnPushClientStateChange( |
+ PushClientState push_client_state) = 0; |
// Called when a notification is received. The details of the |
// notification are in |notification|. |