OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMEOS_BINDER_STATUS_H_ | 5 #ifndef CHROMEOS_BINDER_STATUS_H_ |
6 #define CHROMEOS_BINDER_STATUS_H_ | 6 #define CHROMEOS_BINDER_STATUS_H_ |
7 | 7 |
8 #include <errno.h> | 8 #include <errno.h> |
9 | 9 #include <stdint.h> |
10 #include "base/basictypes.h" | |
11 | 10 |
12 namespace binder { | 11 namespace binder { |
13 | 12 |
14 // Status code. | 13 // Status code. |
15 // Using the same values as used by libbinder. | 14 // Using the same values as used by libbinder. |
16 enum class Status : int32 { | 15 enum class Status : int32_t { |
17 OK = 0, | 16 OK = 0, |
18 | 17 |
19 UNKNOWN_ERROR = INT32_MIN, | 18 UNKNOWN_ERROR = INT32_MIN, |
20 | 19 |
21 NO_MEMORY = -ENOMEM, | 20 NO_MEMORY = -ENOMEM, |
22 INVALID_OPERATION = -ENOSYS, | 21 INVALID_OPERATION = -ENOSYS, |
23 BAD_VALUE = -EINVAL, | 22 BAD_VALUE = -EINVAL, |
24 BAD_TYPE = (UNKNOWN_ERROR + 1), | 23 BAD_TYPE = (UNKNOWN_ERROR + 1), |
25 NAME_NOT_FOUND = -ENOENT, | 24 NAME_NOT_FOUND = -ENOENT, |
26 PERMISSION_DENIED = -EPERM, | 25 PERMISSION_DENIED = -EPERM, |
27 NO_INIT = -ENODEV, | 26 NO_INIT = -ENODEV, |
28 ALREADY_EXISTS = -EEXIST, | 27 ALREADY_EXISTS = -EEXIST, |
29 DEAD_OBJECT = -EPIPE, | 28 DEAD_OBJECT = -EPIPE, |
30 FAILED_TRANSACTION = (UNKNOWN_ERROR + 2), | 29 FAILED_TRANSACTION = (UNKNOWN_ERROR + 2), |
31 BAD_INDEX = -EOVERFLOW, | 30 BAD_INDEX = -EOVERFLOW, |
32 NOT_ENOUGH_DATA = -ENODATA, | 31 NOT_ENOUGH_DATA = -ENODATA, |
33 WOULD_BLOCK = -EWOULDBLOCK, | 32 WOULD_BLOCK = -EWOULDBLOCK, |
34 TIMED_OUT = -ETIMEDOUT, | 33 TIMED_OUT = -ETIMEDOUT, |
35 UNKNOWN_TRANSACTION = -EBADMSG, | 34 UNKNOWN_TRANSACTION = -EBADMSG, |
36 FDS_NOT_ALLOWED = (UNKNOWN_ERROR + 7), | 35 FDS_NOT_ALLOWED = (UNKNOWN_ERROR + 7), |
37 UNEXPECTED_NULL = (UNKNOWN_ERROR + 8), | 36 UNEXPECTED_NULL = (UNKNOWN_ERROR + 8), |
38 }; | 37 }; |
39 | 38 |
40 } // namespace binder | 39 } // namespace binder |
41 | 40 |
42 #endif // CHROMEOS_BINDER_STATUS_H_ | 41 #endif // CHROMEOS_BINDER_STATUS_H_ |
OLD | NEW |