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 STATE_REGISTRY_ERRORS_H 17 #define STATE_REGISTRY_ERRORS_H 18 19 #include <errors.h> 20 21 namespace OHOS { 22 namespace Telephony { 23 constexpr int64_t TELEPHONY_DATA_STORAGE = 0x10; 24 // Error code for telephony data storage 25 constexpr ErrCode CORE_DATA_STORAGE_ERR_OFFSET = ErrCodeOffset(SUBSYS_TELEPONY, TELEPHONY_DATA_STORAGE); 26 const int VERSION_NO_CHANGE = -2; 27 const int DATA_STORAGE_ERROR = -1; 28 const int DATA_STORAGE_SUCCESS = 0; 29 enum class LoadProFileErrorType { 30 OPEN_FILE_ERROR = CORE_DATA_STORAGE_ERR_OFFSET, 31 CLOSE_FILE_ERROR, 32 LOAD_FILE_ERROR, 33 FILE_PARSER_ERROR, 34 ITEM_SIZE_IS_NULL, 35 SAVE_APN_VERSION_FAIL, 36 TEL_PROFILE_UTIL_IS_NULL, 37 PDP_PROFILE_VERSION_IS_NULL, 38 PDP_PROFILE_VERSION_IS_OLD, 39 OPERATOR_IS_NULL, 40 RESET_APN_FAIL, 41 DELETE_THIRTY_DATA_FAIL, 42 SET_CARD_FAIL, 43 REALPATH_FAIL 44 }; 45 } // namespace Telephony 46 } // namespace OHOS 47 #endif // STATE_REGISTRY_ERRORS_H