• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_ERR_PERMISSION_ERR = -3;
29 const int DATA_STORAGE_SUCCESS = 0;
30 enum class LoadProFileErrorType {
31     OPEN_FILE_ERROR = CORE_DATA_STORAGE_ERR_OFFSET,
32     CLOSE_FILE_ERROR,
33     LOAD_FILE_ERROR,
34     FILE_PARSER_ERROR,
35     ITEM_SIZE_IS_NULL,
36     SAVE_APN_VERSION_FAIL,
37     TEL_PROFILE_UTIL_IS_NULL,
38     PDP_PROFILE_VERSION_IS_NULL,
39     PDP_PROFILE_VERSION_IS_OLD,
40     OPERATOR_IS_NULL,
41     RESET_APN_FAIL,
42     DELETE_THIRTY_DATA_FAIL,
43     SET_CARD_FAIL,
44     REALPATH_FAIL
45 };
46 } // namespace Telephony
47 } // namespace OHOS
48 #endif // STATE_REGISTRY_ERRORS_H