1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 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 16 #ifndef INTERFACES_INNERKITS_COMMON_GRAPHIC_COMMON_C_H 17 #define INTERFACES_INNERKITS_COMMON_GRAPHIC_COMMON_C_H 18 19 // GraphicStandard Error, number just find fast, it may change 20 const int LOWERROR_MAX = 1000; 21 const int LOWERROR_FAILURE = 999; 22 const int LOWERROR_INVALID = 998; 23 enum GSError { 24 GSERROR_OK = 0, 25 26 // 400 BAD_REQUEST 27 GSERROR_INVALID_ARGUMENTS = 40001000, 28 29 // 403 FORBIDDEN 30 GSERROR_NO_PERMISSION = 40301000, 31 32 // 404 NOT_FOUND 33 GSERROR_CONNOT_CONNECT_SAMGR = 40401000, 34 GSERROR_CONNOT_CONNECT_SERVER = 40402000, 35 GSERROR_CONNOT_CONNECT_WESTON = 40403000, 36 37 // 406 NOT_ACCEPTABLE 38 GSERROR_NO_BUFFER = 40601000, 39 GSERROR_NO_ENTRY = 40602000, 40 GSERROR_OUT_OF_RANGE = 40603000, 41 GSERROR_NO_SCREEN = 40604000, 42 43 // 412 PRECONDITION_FAILED 44 GSERROR_INVALID_OPERATING = 41201000, 45 GSERROR_NO_CONSUMER = 41202000, 46 GSERROR_NOT_INIT = 41203000, 47 GSERROR_TYPE_ERROR = 41204000, 48 GSERROR_DESTROYED_OBJECT = 41205000, 49 50 // 500 INTERNAL ERROR 51 GSERROR_API_FAILED = 50001000, 52 GSERROR_INTERNAL = 50002000, 53 GSERROR_NO_MEM = 50003000, 54 GSERROR_PROXY_NOT_INCLUDE = 50004000, 55 GSERROR_SERVER_ERROR = 50005000, 56 GSERROR_ANIMATION_RUNNING = 50006000, 57 58 // 501 NOT_IMPLEMENTED 59 GSERROR_NOT_IMPLEMENT = 50101000, 60 GSERROR_NOT_SUPPORT = 50102000, 61 62 // 504 GATEWAY ERROR 63 GSERROR_BINDER = 50401000, 64 65 SURFACE_ERROR_OK = GSERROR_OK, 66 SURFACE_ERROR_ERROR = GSERROR_INTERNAL, 67 SURFACE_ERROR_BINDER_ERROR = GSERROR_BINDER, 68 SURFACE_ERROR_NULLPTR = GSERROR_INVALID_ARGUMENTS, 69 SURFACE_ERROR_NO_ENTRY = GSERROR_NO_ENTRY, 70 SURFACE_ERROR_INVALID_OPERATING = GSERROR_INVALID_OPERATING, 71 SURFACE_ERROR_NO_BUFFER = GSERROR_NO_BUFFER, 72 SURFACE_ERROR_INVALID_PARAM = GSERROR_INVALID_ARGUMENTS, 73 SURFACE_ERROR_INIT = GSERROR_INTERNAL, 74 SURFACE_ERROR_NOMEM = GSERROR_NO_MEM, 75 SURFACE_ERROR_API_FAILED = GSERROR_API_FAILED, 76 SURFACE_ERROR_NOT_SUPPORT = GSERROR_NOT_SUPPORT, 77 SURFACE_ERROR_OUT_OF_RANGE = GSERROR_OUT_OF_RANGE, 78 SURFACE_ERROR_TYPE_ERROR = GSERROR_TYPE_ERROR, 79 SURFACE_ERROR_NO_CONSUMER = GSERROR_NO_CONSUMER, 80 }; 81 82 #endif // INTERFACES_INNERKITS_COMMON_GRAPHIC_COMMON_H 83