| Index: sync/notifier/sync_notifier_state.h
|
| diff --git a/sync/notifier/sync_notifier_state.h b/sync/notifier/sync_notifier_state.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f6f100a8c685498ce4282e2bf32580b056bf0ba2
|
| --- /dev/null
|
| +++ b/sync/notifier/sync_notifier_state.h
|
| @@ -0,0 +1,32 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef SYNC_NOTIFIER_SYNC_NOTIFIER_STATE_H_
|
| +#define SYNC_NOTIFIER_SYNC_NOTIFIER_STATE_H_
|
| +#pragma once
|
| +
|
| +#include "jingle/notifier/listener/push_client_observer.h"
|
| +
|
| +namespace sync_notifier {
|
| +
|
| +enum SyncNotifierState {
|
| + // 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
|
| +};
|
| +
|
| +const char* SyncNotifierStateToString(
|
| + SyncNotifierState sync_notifier_state);
|
| +
|
| +SyncNotifierState PushClientStateToSyncNotifierState(
|
| + notifier::PushClientState push_client_state);
|
| +
|
| +} // namespace sync_notifier
|
| +
|
| +#endif // SYNC_NOTIFIER_SYNC_NOTIFIER_STATE_H_
|
|
|