1 /* 2 * Copyright (C) Texas Instruments - http://www.ti.com/ 3 * 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 17 #ifndef TI_UTILS_STATUS_H 18 #define TI_UTILS_STATUS_H 19 20 #include <utils/Errors.h> 21 22 #include "UtilsCommon.h" 23 24 25 26 27 namespace Ti { 28 29 30 31 32 typedef int status_t; 33 34 #define TI_CAMERA_DEFINE_STATUS_CODE(x) x = android::x, 35 enum { 36 TI_CAMERA_DEFINE_STATUS_CODE(OK) 37 TI_CAMERA_DEFINE_STATUS_CODE(NO_ERROR) 38 TI_CAMERA_DEFINE_STATUS_CODE(UNKNOWN_ERROR) 39 TI_CAMERA_DEFINE_STATUS_CODE(NO_MEMORY) 40 TI_CAMERA_DEFINE_STATUS_CODE(INVALID_OPERATION) 41 TI_CAMERA_DEFINE_STATUS_CODE(BAD_VALUE) 42 TI_CAMERA_DEFINE_STATUS_CODE(BAD_TYPE) 43 TI_CAMERA_DEFINE_STATUS_CODE(NAME_NOT_FOUND) 44 TI_CAMERA_DEFINE_STATUS_CODE(PERMISSION_DENIED) 45 TI_CAMERA_DEFINE_STATUS_CODE(NO_INIT) 46 TI_CAMERA_DEFINE_STATUS_CODE(ALREADY_EXISTS) 47 TI_CAMERA_DEFINE_STATUS_CODE(DEAD_OBJECT) 48 TI_CAMERA_DEFINE_STATUS_CODE(FAILED_TRANSACTION) 49 TI_CAMERA_DEFINE_STATUS_CODE(JPARKS_BROKE_IT) 50 TI_CAMERA_DEFINE_STATUS_CODE(BAD_INDEX) 51 TI_CAMERA_DEFINE_STATUS_CODE(NOT_ENOUGH_DATA) 52 TI_CAMERA_DEFINE_STATUS_CODE(WOULD_BLOCK) 53 TI_CAMERA_DEFINE_STATUS_CODE(TIMED_OUT) 54 TI_CAMERA_DEFINE_STATUS_CODE(UNKNOWN_TRANSACTION) 55 TI_CAMERA_DEFINE_STATUS_CODE(FDS_NOT_ALLOWED) 56 }; 57 #undef TI_CAMERA_DEFINE_STATUS_CODE 58 59 60 61 62 } // namespace Ti 63 64 65 66 67 #endif // TI_UTILS_STATUS_H 68