• 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 #ifndef NET_CONN_CONSTANTS_H
16 #define NET_CONN_CONSTANTS_H
17 
18 #include "net_manager_constants.h"
19 
20 namespace OHOS {
21 namespace NetManagerStandard {
22 constexpr int32_t PRIMARY_USER_ID = 100;
23 enum NetConnResultCode {
24     NET_CONN_ERR_INVALID_SUPPLIER_ID = 2101002,
25     NET_CONN_ERR_NET_TYPE_NOT_FOUND = 2101003,
26     NET_CONN_ERR_NO_ANY_NET_TYPE = 2101004,
27     NET_CONN_ERR_NO_REGISTERED = 2101005,
28     NET_CONN_ERR_NETID_NOT_FOUND = 2101006,
29     NET_CONN_ERR_CALLBACK_NOT_FOUND = 2101007,
30     NET_CONN_ERR_SAME_CALLBACK = 2101008,
31     NET_CONN_ERR_REQ_ID_NOT_FOUND = 2101009,
32     NET_CONN_ERR_NO_DEFAULT_NET = 2101010,
33     NET_CONN_ERR_HTTP_PROXY_INVALID = 2101011,
34     NET_CONN_ERR_NO_HTTP_PROXY = 2101012,
35     NET_CONN_ERR_INVALID_NETWORK = 2101013,
36     NET_CONN_ERR_SERVICE_REQUEST_CONNECT_FAIL = 2101014,
37     NET_CONN_ERR_SERVICE_UPDATE_NET_LINK_INFO_FAIL = 2101015,
38     NET_CONN_ERR_NO_SUPPLIER = 2101016,
39     NET_CONN_ERR_NET_MONITOR_OPT_FAILED = 2101017,
40     NET_CONN_ERR_SERVICE_NO_REQUEST = 2101018,
41     NET_CONN_ERR_NO_ADDRESS = 2101019,
42     NET_CONN_ERR_NET_NOT_FIND_BESTNETWORK_FOR_REQUEST = 2101020,
43     NET_CONN_ERR_NET_NO_RESTRICT_BACKGROUND = 2101021,
44     NET_CONN_ERR_NET_OVER_MAX_REQUEST_NUM = 2101022,
45     NET_CONN_ERR_CREATE_DUMP_FAILED = 2101023,
46     NET_CONN_ERR_POLICY_DISABLED = 2101024,
47     NET_CONN_SUCCESS = NETMANAGER_SUCCESS,
48     NET_CONN_ERR_INPUT_NULL_PTR = -2,
49 };
50 
51 enum NetDetectionResultCode {
52     NET_DETECTION_FAIL = 0,
53     NET_DETECTION_SUCCESS,
54     NET_DETECTION_CAPTIVE_PORTAL,
55 };
56 } // namespace NetManagerStandard
57 } // namespace OHOS
58 #endif // NET_CONN_CONSTANTS_H