Vitaly Buka | 6fed053 | 2015-05-14 16:57:23 -0700 | [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_COMMANDS_USER_ROLE_H_ |
| 6 | #define BUFFET_COMMANDS_USER_ROLE_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | #include <chromeos/errors/error.h> |
| 10 | |
| 11 | namespace buffet { |
| 12 | |
| 13 | enum class UserRole { |
| 14 | kViewer, |
| 15 | kUser, |
| 16 | kManager, |
| 17 | kOwner, |
| 18 | }; |
| 19 | |
| 20 | std::string ToString(UserRole role); |
| 21 | |
| 22 | bool FromString(const std::string& str, |
| 23 | UserRole* role, |
| 24 | chromeos::ErrorPtr* error); |
| 25 | |
| 26 | } // namespace buffet |
| 27 | |
| 28 | #endif // BUFFET_COMMANDS_USER_ROLE_H_ |