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