1 /* 2 * Copyright (C) 2025-2025 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 #ifndef DIA_ERROR_CODE_H 16 #define DIA_ERROR_CODE_H 17 18 namespace OHOS::Security::DIA { 19 20 enum DIAErrCode { 21 DIA_SUCCESS = 0, 22 DIA_FAILURE = 1, 23 24 /* error for common config 1000 - 1100 */ 25 DIA_ERR_CONFIG_SIPRAM = 1000, // 配置参数错误 26 DIA_ERR_CONFIG_CALLBACK = 1001, // 回调参数错误 27 DIA_ERR_DATA_ILEGEL = 1002, // 参数不合法 28 DIA_ERR_INVLAID_PARAM = 1003, // 参数无效 29 DIA_ERR_PERMISSION_DENIED = 1004, // 权限不足 30 DIA_ERR_MALLOC = 1005, // 内存分配失败 31 32 /* error for information handle 1100 - 1200 */ 33 DIA_ERR_IH_ABNORMAL_DATA = 1100, // 检测数据错误 34 DIA_ERR_IH_DETECT = 1101, // 检测失败 35 DIA_ERR_IH_GET_RESULT = 1102, // 获取结果失败 36 DIA_ERR_IH_FAILURE = 1103, // 识别脱敏错误 37 DIA_ERR_IH_ANONYMIZE = 1104, // 脱敏错误 38 DIA_ERR_IH_TEXTIDENTIFY = 1105, // 文本识别错误 39 DIA_ERR_IH_DIFFERENTIAL_PRIVACY = 1106, // 匿名统计错误 40 DIA_ERR_IH_INPUT_SIZE = 1107, // 输入数据超过1000个错误 41 DIA_ERR_IH_INPUT_LEN = 1108, // 输入数据长度超过4096 42 DIA_ERR_IH_DP_ANONYMIZE = 1109, // 匿名统计脱敏失败 43 }; 44 } 45 46 #endif // DIA_ERROR_CODE_H