OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SYNC_NOTIFIER_SYNC_NOTIFIER_STATE_H_ |
| 6 #define SYNC_NOTIFIER_SYNC_NOTIFIER_STATE_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "jingle/notifier/listener/push_client_observer.h" |
| 10 |
| 11 namespace sync_notifier { |
| 12 |
| 13 enum SyncNotifierState { |
| 14 // Notifications can be sent and received freely. |
| 15 NOTIFICATIONS_ON, |
| 16 // No notifications can be sent or received. This is a transient state. |
| 17 NOTIFICATIONS_OFF, |
| 18 // Credentials were rejected, so no notifications can be sent or |
| 19 // received. This state persists until a successful connection with |
| 20 // updated auth credentials. |
| 21 CREDENTIALS_REJECTED |
| 22 }; |
| 23 |
| 24 const char* SyncNotifierStateToString( |
| 25 SyncNotifierState sync_notifier_state); |
| 26 |
| 27 SyncNotifierState PushClientStateToSyncNotifierState( |
| 28 notifier::PushClientState push_client_state); |
| 29 |
| 30 } // namespace sync_notifier |
| 31 |
| 32 #endif // SYNC_NOTIFIER_SYNC_NOTIFIER_STATE_H_ |
OLD | NEW |