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 NET_CONN_CONSTANTS_H 17 #define NET_CONN_CONSTANTS_H 18 19 namespace OHOS { 20 namespace NetManagerStandard { 21 enum NetConnResultCode { 22 NET_CONN_SUCCESS = 0, 23 NET_CONN_ERR_GET_REMOTE_OBJECT_FAILED = (-1), 24 NET_CONN_ERR_INPUT_NULL_PTR = (-2), 25 NET_CONN_ERR_INVALID_SUPPLIER_ID = (-3), 26 NET_CONN_ERR_INVALID_PARAMETER = (-4), 27 NET_CONN_ERR_NET_TYPE_NOT_FOUND = (-5), 28 NET_CONN_ERR_NO_ANY_NET_TYPE = (-6), 29 NET_CONN_ERR_NO_REGISTERED = (-7), 30 NET_CONN_ERR_NETID_NOT_FOUND = (-8), 31 NET_CONN_ERR_PERMISSION_CHECK_FAILED = (-9), 32 NET_CONN_ERR_SAME_CALLBACK = (-10), 33 NET_CONN_ERR_CALLBACK_NOT_FOUND = (-11), 34 NET_CONN_ERR_REQ_ID_NOT_FOUND = (-12), 35 NET_CONN_ERR_NO_DEFAULT_NET = (-13), 36 NET_CONN_ERR_INTERNAL_ERROR = (-1000) 37 }; 38 39 enum NetDetectionResultCode { 40 NET_DETECTION_FAIL = 0, 41 NET_DETECTION_SUCCESS, 42 NET_DETECTION_CAPTIVE_PORTAL, 43 }; 44 } // namespace NetManagerStandard 45 } // namespace OHOS 46 #endif // NET_CONN_CONSTANTS_H