blob: 47ae9d79eeb5b118a2680eb8c01cc0e50c88cef9 [file] [log] [blame]
Mathias Agopian006ba852009-06-01 15:27:46 -07001/*
Mathias Agopian9857d992013-04-01 15:17:55 -07002 * Copyright 2007 The Android Open Source Project
Mathias Agopian006ba852009-06-01 15:27:46 -07003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Mathias Agopian9857d992013-04-01 15:17:55 -070017#ifndef ANDROID_PIXELFLINGER_ERRORS_H
18#define ANDROID_PIXELFLINGER_ERRORS_H
Mathias Agopian006ba852009-06-01 15:27:46 -070019
20#include <sys/types.h>
21#include <errno.h>
22
23namespace android {
Mathias Agopian9857d992013-04-01 15:17:55 -070024namespace tinyutils {
Mathias Agopian006ba852009-06-01 15:27:46 -070025
26// use this type to return error codes
27typedef int32_t status_t;
28
29/*
30 * Error codes.
31 * All error codes are negative values.
32 */
33
34enum {
Mathias Agopian006ba852009-06-01 15:27:46 -070035 NO_ERROR = 0, // No errors.
Mathias Agopian006ba852009-06-01 15:27:46 -070036 NO_MEMORY = -ENOMEM,
Mathias Agopian006ba852009-06-01 15:27:46 -070037 BAD_VALUE = -EINVAL,
Mathias Agopian006ba852009-06-01 15:27:46 -070038 BAD_INDEX = -EOVERFLOW,
Mathias Agopian9857d992013-04-01 15:17:55 -070039 NAME_NOT_FOUND = -ENOENT,
Mathias Agopian006ba852009-06-01 15:27:46 -070040};
41
42
Mathias Agopian9857d992013-04-01 15:17:55 -070043} // namespace tinyutils
44} // namespace android
Mathias Agopian006ba852009-06-01 15:27:46 -070045
46// ---------------------------------------------------------------------------
47
Mathias Agopian9857d992013-04-01 15:17:55 -070048#endif // ANDROID_PIXELFLINGER_ERRORS_H