1 /* 2 * Copyright (c) 2024 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 TEL_CELLULAR_DATA_UTILS_H 17 #define TEL_CELLULAR_DATA_UTILS_H 18 19 #include <cstdint> 20 #include <string> 21 22 namespace OHOS { 23 namespace Telephony { 24 25 enum CJErrorCode { 26 /** 27 * The input parameter value is out of range. 28 */ 29 CJ_ERROR_TELEPHONY_ARGUMENT_ERROR = 8300001, 30 31 /** 32 * Operation failed. Cannot connect to service. 33 */ 34 CJ_ERROR_TELEPHONY_SERVICE_ERROR = 8300002, 35 36 /** 37 * System internal error. 38 */ 39 CJ_ERROR_TELEPHONY_SYSTEM_ERROR = 8300003, 40 41 /** 42 * Do not have sim card. 43 */ 44 CJ_ERROR_TELEPHONY_NO_SIM_CARD = 8300004, 45 46 /** 47 * Airplane mode is on. 48 */ 49 CJ_ERROR_TELEPHONY_AIRPLANE_MODE_ON = 8300005, 50 51 /** 52 * Network not in service. 53 */ 54 CJ_ERROR_TELEPHONY_NETWORK_NOT_IN_SERVICE = 8300006, 55 56 /** 57 * Unknown error code. 58 */ 59 CJ_ERROR_TELEPHONY_UNKNOW_ERROR = 8300999, 60 61 /** 62 * SIM card is not activated. 63 */ 64 CJ_ERROR_SIM_CARD_IS_NOT_ACTIVE = 8301001, 65 66 /** 67 * SIM card operation error. 68 */ 69 CJ_ERROR_SIM_CARD_OPERATION_ERROR = 8301002, 70 71 /** 72 * Operator config error. 73 */ 74 CJ_ERROR_OPERATOR_CONFIG_ERROR = 8301003, 75 76 /** 77 * Permission verification failed, usually the result returned by VerifyAccessToken. 78 */ 79 CJ_ERROR_TELEPHONY_PERMISSION_DENIED = 201, 80 81 /** 82 * Permission verification failed, application which is not a system application uses system API. 83 */ 84 CJ_ERROR_ILLEGAL_USE_OF_SYSTEM_API = 202, 85 }; 86 87 } 88 } 89 #endif