1 // Copyright (C) 2019 The Android Open Source Project 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #pragma once 16 17 #include <iostream> 18 19 #define NO_ERROR 0 20 #define ERROR_BAD_USAGE -1 21 #define ERROR_CANT_FIND_FILE -2 22 #define ERROR_NO_DEV_PROTO -3 23 #define ERROR_CANT_READ_PROTO -4 24 #define ERROR_CANT_UNCOMPRESS_PROTO -5 25 #define ERROR_GETTING_ANNOTATION -6 26 #define ERROR_GETTING_FIDELITYPARAMS -7 27 #define ERROR_ANNOTATION_TOO_COMPLEX -8 28 #define ERROR_ANNOTATION_ONLY_ENUMS -9 29 #define ERROR_FIDELITYPARAMS_TOO_COMPLEX -10 30 #define ERROR_FIDELITYPARAMS_BAD_TYPE -11 31 #define ERROR_GETTING_SETTINGS -12 32 #define ERROR_BAD_MAX_INSTRUMENTATION_KEYS -13 33 #define ERROR_BAD_ANNOTATION_ENUM_SIZE -14 34 #define ERROR_NO_DEV_FIDELITYPARAMS -15 35 #define ERROR(CODE, MSG) { std::cerr << MSG << std::endl; return CODE; } 36