• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 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 codes
25 constexpr int OPERATION_ERROR = -1;
26 constexpr int OPERATION_OK = 0;
27 constexpr int RDB_OBJECT_EMPTY = -2;
28 constexpr int PARAMETER_EMPTY = -3;
29 
30 // Error code for telephony data storage
31 constexpr ErrCode CORE_DATA_STORAGE_ERR_OFFSET = ErrCodeOffset(SUBSYS_TELEPONY, TELEPHONY_DATA_STORAGE);
32 const int VERSION_NO_CHANGE = -2;
33 const int DATA_STORAGE_ERROR = -1;
34 const int DATA_STORAGE_ERR_PERMISSION_ERR = -3;
35 const int DATA_STORAGE_SUCCESS = 0;
36 enum class LoadProFileErrorType {
37     OPEN_FILE_ERROR = CORE_DATA_STORAGE_ERR_OFFSET,
38     CLOSE_FILE_ERROR,
39     LOAD_FILE_ERROR,
40     FILE_PARSER_ERROR,
41     ITEM_SIZE_IS_NULL,
42     SAVE_APN_VERSION_FAIL,
43     TEL_PROFILE_UTIL_IS_NULL,
44     PDP_PROFILE_VERSION_IS_NULL,
45     PDP_PROFILE_VERSION_IS_OLD,
46     OPERATOR_IS_NULL,
47     RESET_APN_FAIL,
48     DELETE_THIRTY_DATA_FAIL,
49     SET_CARD_FAIL,
50     REALPATH_FAIL
51 };
52 } // namespace Telephony
53 } // namespace OHOS
54 #endif // STATE_REGISTRY_ERRORS_H