Christopher Wiley | c900e48 | 2015-02-15 15:42:04 -0800 | [diff] [blame] | 1 | // Copyright 2015 The Chromium OS 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 BUFFET_REGISTRATION_STATUS_H_ |
| 6 | #define BUFFET_REGISTRATION_STATUS_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | namespace buffet { |
| 11 | |
| 12 | // See the DBus interface XML file for complete descriptions of these states. |
| 13 | enum class RegistrationStatus { |
| 14 | kOffline, // We have credentials but are offline. |
| 15 | kCloudError, // We're online, but can't talk to cloud services. |
| 16 | kUnregistered, // We have no credentials. |
| 17 | kRegistering, // We've just been given credentials. |
| 18 | kRegistered, // We're registered and online. |
Nathan Bullock | 24d189f | 2015-02-26 13:09:18 -0500 | [diff] [blame] | 19 | kInvalidCredentials, // Our registration has been revoked. |
Christopher Wiley | c900e48 | 2015-02-15 15:42:04 -0800 | [diff] [blame] | 20 | }; |
| 21 | |
| 22 | std::string StatusToString(RegistrationStatus status); |
| 23 | |
| 24 | } // namespace buffet |
| 25 | |
| 26 | #endif // BUFFET_REGISTRATION_STATUS_H_ |