17777dab0Sopenharmony_ci/*
27777dab0Sopenharmony_ci * Copyright (c) 2023-2024 Huawei Device Co., Ltd.
37777dab0Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
47777dab0Sopenharmony_ci * you may not use this file except in compliance with the License.
57777dab0Sopenharmony_ci * You may obtain a copy of the License at
67777dab0Sopenharmony_ci *
77777dab0Sopenharmony_ci *    http://www.apache.org/licenses/LICENSE-2.0
87777dab0Sopenharmony_ci *
97777dab0Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
107777dab0Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
117777dab0Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127777dab0Sopenharmony_ci * See the License for the specific language governing permissions and
137777dab0Sopenharmony_ci * limitations under the License.
147777dab0Sopenharmony_ci */
157777dab0Sopenharmony_ci
167777dab0Sopenharmony_ci#ifndef NATIVE_NET_CONN_API_H
177777dab0Sopenharmony_ci#define NATIVE_NET_CONN_API_H
187777dab0Sopenharmony_ci
197777dab0Sopenharmony_ci/**
207777dab0Sopenharmony_ci * @addtogroup NetConnection
217777dab0Sopenharmony_ci * @{
227777dab0Sopenharmony_ci *
237777dab0Sopenharmony_ci * @brief Provide C interface for the data network connection module of network management.
247777dab0Sopenharmony_ci *
257777dab0Sopenharmony_ci * @since 11
267777dab0Sopenharmony_ci * @version 1.0
277777dab0Sopenharmony_ci */
287777dab0Sopenharmony_ci
297777dab0Sopenharmony_ci/**
307777dab0Sopenharmony_ci * @file net_connection.h
317777dab0Sopenharmony_ci *
327777dab0Sopenharmony_ci * @brief Provide C interface for the data network connection module of network management.
337777dab0Sopenharmony_ci *
347777dab0Sopenharmony_ci * @kit NetworkKit
357777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
367777dab0Sopenharmony_ci * @library libnet_connection.so
377777dab0Sopenharmony_ci * @since 11
387777dab0Sopenharmony_ci * @version 1.0
397777dab0Sopenharmony_ci */
407777dab0Sopenharmony_ci
417777dab0Sopenharmony_ci#include <netdb.h>
427777dab0Sopenharmony_ci
437777dab0Sopenharmony_ci#include "net_connection_type.h"
447777dab0Sopenharmony_ci
457777dab0Sopenharmony_ci#ifdef __cplusplus
467777dab0Sopenharmony_ciextern "C" {
477777dab0Sopenharmony_ci#endif
487777dab0Sopenharmony_ci
497777dab0Sopenharmony_ci/**
507777dab0Sopenharmony_ci * @brief Checks whether a default activated data network is available.
517777dab0Sopenharmony_ci *
527777dab0Sopenharmony_ci * @param hasDefaultNet Pointer to the result that specifies whether a default activated data network is available.
537777dab0Sopenharmony_ci * @return 0 - Success. 201 - Missing permissions.
547777dab0Sopenharmony_ci *         401 - Parameter error. 2100002 - Unable to connect to service.
557777dab0Sopenharmony_ci *         2100003 - Internal error.
567777dab0Sopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO
577777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
587777dab0Sopenharmony_ci * @since 11
597777dab0Sopenharmony_ci * @version 1.0
607777dab0Sopenharmony_ci */
617777dab0Sopenharmony_ciint32_t OH_NetConn_HasDefaultNet(int32_t *hasDefaultNet);
627777dab0Sopenharmony_ci
637777dab0Sopenharmony_ci/**
647777dab0Sopenharmony_ci * @brief Obtains the default activated data network.
657777dab0Sopenharmony_ci *
667777dab0Sopenharmony_ci * @param netHandle Pointer to the network handle that contains the network ID.
677777dab0Sopenharmony_ci * @return 0 - Success. 201 - Missing permissions.
687777dab0Sopenharmony_ci *         401 - Parameter error. 2100002 - Unable to connect to service.
697777dab0Sopenharmony_ci *         2100003 - Internal error.
707777dab0Sopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO
717777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
727777dab0Sopenharmony_ci * @since 11
737777dab0Sopenharmony_ci * @version 1.0
747777dab0Sopenharmony_ci */
757777dab0Sopenharmony_ciint32_t OH_NetConn_GetDefaultNet(NetConn_NetHandle *netHandle);
767777dab0Sopenharmony_ci
777777dab0Sopenharmony_ci/**
787777dab0Sopenharmony_ci * @brief Checks whether metering is enabled for the default data network.
797777dab0Sopenharmony_ci *
807777dab0Sopenharmony_ci * @param isMetered Pointer to the result that specifies whether metering is enabled.
817777dab0Sopenharmony_ci * @return 0 - Success. 201 - Missing permissions.
827777dab0Sopenharmony_ci *         401 - Parameter error. 2100002 - Unable to connect to service.
837777dab0Sopenharmony_ci *         2100003 - Internal error.
847777dab0Sopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO
857777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
867777dab0Sopenharmony_ci * @since 11
877777dab0Sopenharmony_ci * @version 1.0
887777dab0Sopenharmony_ci */
897777dab0Sopenharmony_ciint32_t OH_NetConn_IsDefaultNetMetered(int32_t *isMetered);
907777dab0Sopenharmony_ci
917777dab0Sopenharmony_ci/**
927777dab0Sopenharmony_ci * @brief Obtains the connection properties of a data network.
937777dab0Sopenharmony_ci *
947777dab0Sopenharmony_ci * @param netHandle Pointer to the network handle that contains the network ID.
957777dab0Sopenharmony_ci * @param prop Pointer to the connection properties.
967777dab0Sopenharmony_ci * @return 0 - Success. 201 - Missing permissions.
977777dab0Sopenharmony_ci *         401 - Parameter error. 2100002 - Unable to connect to service.
987777dab0Sopenharmony_ci *         2100003 - Internal error.
997777dab0Sopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO
1007777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
1017777dab0Sopenharmony_ci * @since 11
1027777dab0Sopenharmony_ci * @version 1.0
1037777dab0Sopenharmony_ci */
1047777dab0Sopenharmony_ciint32_t OH_NetConn_GetConnectionProperties(NetConn_NetHandle *netHandle, NetConn_ConnectionProperties *prop);
1057777dab0Sopenharmony_ci
1067777dab0Sopenharmony_ci/**
1077777dab0Sopenharmony_ci * @brief Obtains the capabilities of a data network.
1087777dab0Sopenharmony_ci *
1097777dab0Sopenharmony_ci * @param netHandle Pointer to the network handle that contains the network ID.
1107777dab0Sopenharmony_ci * @param netCapacities Pointer to the network capabilities.
1117777dab0Sopenharmony_ci * @return 0 - Success. 201 - Missing permissions.
1127777dab0Sopenharmony_ci *         401 - Parameter error. 2100002 - Unable to connect to service.
1137777dab0Sopenharmony_ci *         2100003 - Internal error.
1147777dab0Sopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO
1157777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
1167777dab0Sopenharmony_ci * @since 11
1177777dab0Sopenharmony_ci * @version 1.0
1187777dab0Sopenharmony_ci */
1197777dab0Sopenharmony_ciint32_t OH_NetConn_GetNetCapabilities(NetConn_NetHandle *netHandle, NetConn_NetCapabilities *netCapabilities);
1207777dab0Sopenharmony_ci
1217777dab0Sopenharmony_ci/**
1227777dab0Sopenharmony_ci * @brief Obtains the default http proxy.
1237777dab0Sopenharmony_ci *
1247777dab0Sopenharmony_ci * @param httpProxy Pointer to the HTTP proxy.
1257777dab0Sopenharmony_ci * @return 0 - Success. 201 - Missing permissions.
1267777dab0Sopenharmony_ci *         401 - Parameter error. 2100002 - Unable to connect to service.
1277777dab0Sopenharmony_ci *         2100003 - Internal error.
1287777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
1297777dab0Sopenharmony_ci * @since 11
1307777dab0Sopenharmony_ci * @version 1.0
1317777dab0Sopenharmony_ci */
1327777dab0Sopenharmony_ciint32_t OH_NetConn_GetDefaultHttpProxy(NetConn_HttpProxy *httpProxy);
1337777dab0Sopenharmony_ci
1347777dab0Sopenharmony_ci/**
1357777dab0Sopenharmony_ci * @brief Get DNS result with netId.
1367777dab0Sopenharmony_ci *
1377777dab0Sopenharmony_ci * @param host The host name to query.
1387777dab0Sopenharmony_ci * @param serv Service name.
1397777dab0Sopenharmony_ci * @param hint Pointer to the addrinfo structure.
1407777dab0Sopenharmony_ci * @param res Store DNS query results and return them in a linked list format.
1417777dab0Sopenharmony_ci * @param netId DNS query netId, 0 is used for default netid query.
1427777dab0Sopenharmony_ci * @return 0 - Success. 201 - Missing permissions.
1437777dab0Sopenharmony_ci *         401 - Parameter error. 2100002 - Unable to connect to service.
1447777dab0Sopenharmony_ci *         2100003 - Internal error.
1457777dab0Sopenharmony_ci * @permission ohos.permission.INTERNET
1467777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
1477777dab0Sopenharmony_ci * @since 11
1487777dab0Sopenharmony_ci * @version 1.0
1497777dab0Sopenharmony_ci */
1507777dab0Sopenharmony_ciint32_t OH_NetConn_GetAddrInfo(char *host, char *serv, struct addrinfo *hint, struct addrinfo **res, int32_t netId);
1517777dab0Sopenharmony_ci
1527777dab0Sopenharmony_ci/**
1537777dab0Sopenharmony_ci * @brief Free DNS result.
1547777dab0Sopenharmony_ci *
1557777dab0Sopenharmony_ci * @param res DNS query result chain header.
1567777dab0Sopenharmony_ci * @return 0 - Success. 201 - Missing permissions.
1577777dab0Sopenharmony_ci *         401 - Parameter error. 2100002 - Unable to connect to service.
1587777dab0Sopenharmony_ci *         2100003 - Internal error.
1597777dab0Sopenharmony_ci * @permission ohos.permission.INTERNET
1607777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
1617777dab0Sopenharmony_ci * @since 11
1627777dab0Sopenharmony_ci * @version 1.0
1637777dab0Sopenharmony_ci */
1647777dab0Sopenharmony_ciint32_t OH_NetConn_FreeDnsResult(struct addrinfo *res);
1657777dab0Sopenharmony_ci
1667777dab0Sopenharmony_ci/**
1677777dab0Sopenharmony_ci * @brief Queries all activated data networks.
1687777dab0Sopenharmony_ci *
1697777dab0Sopenharmony_ci * @param netHandleList Network handle that stores the network ID list.
1707777dab0Sopenharmony_ci * @return 0 - Success. 201 - Missing permissions.
1717777dab0Sopenharmony_ci *         401 - Parameter error. 2100002 - Unable to connect to service.
1727777dab0Sopenharmony_ci *         2100003 - Internal error.
1737777dab0Sopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO
1747777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
1757777dab0Sopenharmony_ci * @since 11
1767777dab0Sopenharmony_ci * @version 1.0
1777777dab0Sopenharmony_ci */
1787777dab0Sopenharmony_ciint32_t OH_NetConn_GetAllNets(NetConn_NetHandleList *netHandleList);
1797777dab0Sopenharmony_ci
1807777dab0Sopenharmony_ci/**
1817777dab0Sopenharmony_ci * @brief Registers a custom DNS resolver.
1827777dab0Sopenharmony_ci *
1837777dab0Sopenharmony_ci * @param resolver Pointer to the custom DNS resolver.
1847777dab0Sopenharmony_ci * @return 0 - Success. 201 - Missing permissions.
1857777dab0Sopenharmony_ci *         401 - Parameter error. 2100002 - Unable to connect to service.
1867777dab0Sopenharmony_ci *         2100003 - Internal error.
1877777dab0Sopenharmony_ci * @permission ohos.permission.INTERNET
1887777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
1897777dab0Sopenharmony_ci * @deprecated since 13
1907777dab0Sopenharmony_ci * @useinstead OH_NetConn_RegisterDnsResolver
1917777dab0Sopenharmony_ci * @since 11
1927777dab0Sopenharmony_ci * @version 1.0
1937777dab0Sopenharmony_ci */
1947777dab0Sopenharmony_ciint32_t OHOS_NetConn_RegisterDnsResolver(OH_NetConn_CustomDnsResolver resolver);
1957777dab0Sopenharmony_ci
1967777dab0Sopenharmony_ci/**
1977777dab0Sopenharmony_ci * @brief Unregisters a custom DNS resolver.
1987777dab0Sopenharmony_ci *
1997777dab0Sopenharmony_ci * @return 0 - Success. 201 - Missing permissions.
2007777dab0Sopenharmony_ci *         401 - Parameter error. 2100002 - Unable to connect to service.
2017777dab0Sopenharmony_ci *         2100003 - Internal error.
2027777dab0Sopenharmony_ci * @permission ohos.permission.INTERNET
2037777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
2047777dab0Sopenharmony_ci * @deprecated since 13
2057777dab0Sopenharmony_ci * @useinstead OH_NetConn_UnregisterDnsResolver
2067777dab0Sopenharmony_ci * @since 11
2077777dab0Sopenharmony_ci * @version 1.0
2087777dab0Sopenharmony_ci */
2097777dab0Sopenharmony_ciint32_t OHOS_NetConn_UnregisterDnsResolver(void);
2107777dab0Sopenharmony_ci
2117777dab0Sopenharmony_ci/**
2127777dab0Sopenharmony_ci * @brief Registers a custom DNS resolver.
2137777dab0Sopenharmony_ci *
2147777dab0Sopenharmony_ci * @param resolver Pointer to the custom DNS resolver.
2157777dab0Sopenharmony_ci * @return Returns the result code.
2167777dab0Sopenharmony_ci *         {@link NETMANAGER_EXT_SUCCESS} if the operation is successful.
2177777dab0Sopenharmony_ci *         {@link NETMANAGER_ERR_PERMISSION_DENIED} Missing permissions, add permission.
2187777dab0Sopenharmony_ci *         {@link NETMANAGER_ERR_PARAMETER_ERROR} Parameter error. Please enter a correct parameter.
2197777dab0Sopenharmony_ci * @permission ohos.permission.INTERNET
2207777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
2217777dab0Sopenharmony_ci * @since 13
2227777dab0Sopenharmony_ci * @version 1.0
2237777dab0Sopenharmony_ci */
2247777dab0Sopenharmony_ciint32_t OH_NetConn_RegisterDnsResolver(OH_NetConn_CustomDnsResolver resolver);
2257777dab0Sopenharmony_ci
2267777dab0Sopenharmony_ci/**
2277777dab0Sopenharmony_ci * @brief Unregisters a custom DNS resolver.
2287777dab0Sopenharmony_ci *
2297777dab0Sopenharmony_ci * @return 0 - Success. 201 - Missing permissions.
2307777dab0Sopenharmony_ci *         401 - Parameter error. 2100002 - Unable to connect to service.
2317777dab0Sopenharmony_ci *         2100003 - Internal error.
2327777dab0Sopenharmony_ci * @permission ohos.permission.INTERNET
2337777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
2347777dab0Sopenharmony_ci * @since 13
2357777dab0Sopenharmony_ci * @version 1.0
2367777dab0Sopenharmony_ci */
2377777dab0Sopenharmony_ciint32_t OH_NetConn_UnregisterDnsResolver(void);
2387777dab0Sopenharmony_ci
2397777dab0Sopenharmony_ci/**
2407777dab0Sopenharmony_ci * @brief Binds a socket to the specific network.
2417777dab0Sopenharmony_ci *
2427777dab0Sopenharmony_ci * @param socketFd Socket constructed by user.
2437777dab0Sopenharmony_ci * @param netHandle Pointer to the network handle that contains the network ID.
2447777dab0Sopenharmony_ci * @return 0 - Success.
2457777dab0Sopenharmony_ci *         401 - Parameter error.
2467777dab0Sopenharmony_ci *         2100002 - Unable to connect to service.
2477777dab0Sopenharmony_ci *         2100003 - Internal error.
2487777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
2497777dab0Sopenharmony_ci * @since 12
2507777dab0Sopenharmony_ci * @version 1.0
2517777dab0Sopenharmony_ci */
2527777dab0Sopenharmony_ciint32_t OH_NetConn_BindSocket(int32_t socketFd, NetConn_NetHandle *netHandle);
2537777dab0Sopenharmony_ci
2547777dab0Sopenharmony_ci/**
2557777dab0Sopenharmony_ci * @brief Sets http proxy information to current application.
2567777dab0Sopenharmony_ci *
2577777dab0Sopenharmony_ci * @param httpProxy Information about the proxy that needs to be set.
2587777dab0Sopenharmony_ci * @return 0 - Success.
2597777dab0Sopenharmony_ci *         401 - Parameter error.
2607777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
2617777dab0Sopenharmony_ci * @since 12
2627777dab0Sopenharmony_ci * @version 1.0
2637777dab0Sopenharmony_ci */
2647777dab0Sopenharmony_ciint32_t OH_NetConn_SetAppHttpProxy(NetConn_HttpProxy *httpProxy);
2657777dab0Sopenharmony_ci
2667777dab0Sopenharmony_ci/**
2677777dab0Sopenharmony_ci * @brief Registers callback to listen for changes to the application-level http proxy.
2687777dab0Sopenharmony_ci *
2697777dab0Sopenharmony_ci * @param appHttpProxyChange Callback that need to be registered to listen for changes to the http proxy.
2707777dab0Sopenharmony_ci * @param callbackId Callback id returned after registration, associated with a registered callback.
2717777dab0Sopenharmony_ci * @return 0 - Success.
2727777dab0Sopenharmony_ci *         401 - Parameter error.
2737777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
2747777dab0Sopenharmony_ci * @since 12
2757777dab0Sopenharmony_ci * @version 1.0
2767777dab0Sopenharmony_ci */
2777777dab0Sopenharmony_ciint32_t OH_NetConn_RegisterAppHttpProxyCallback(OH_NetConn_AppHttpProxyChange appHttpProxyChange, uint32_t *callbackId);
2787777dab0Sopenharmony_ci
2797777dab0Sopenharmony_ci/**
2807777dab0Sopenharmony_ci * @brief Unregisters a callback function that listens for application-level proxy changes.
2817777dab0Sopenharmony_ci *
2827777dab0Sopenharmony_ci * @param callbackId Id of the callback function that needs to be deregistered.
2837777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
2847777dab0Sopenharmony_ci * @since 12
2857777dab0Sopenharmony_ci * @version 1.0
2867777dab0Sopenharmony_ci */
2877777dab0Sopenharmony_civoid OH_NetConn_UnregisterAppHttpProxyCallback(uint32_t callbackId);
2887777dab0Sopenharmony_ci
2897777dab0Sopenharmony_ci/**
2907777dab0Sopenharmony_ci * @brief Registers callback, used to monitor specific network status.
2917777dab0Sopenharmony_ci *
2927777dab0Sopenharmony_ci * @param netSpecifier specifier information.
2937777dab0Sopenharmony_ci * @param callback The callback needed to be registered.
2947777dab0Sopenharmony_ci * @param timeout The timeout period in milliseconds.
2957777dab0Sopenharmony_ci * @param callbackId out param, corresponding to a registered callback.
2967777dab0Sopenharmony_ci * @return 0 - Success.
2977777dab0Sopenharmony_ci *         201 - Permission denied.
2987777dab0Sopenharmony_ci *         401 - Parameter error.
2997777dab0Sopenharmony_ci *         2100002 - Failed to connect to the service.
3007777dab0Sopenharmony_ci *         2100003 - System internal error.
3017777dab0Sopenharmony_ci *         2101008 - The callback already exists.
3027777dab0Sopenharmony_ci *         2101022 - The number of requests exceeded the maximum allowed.
3037777dab0Sopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO
3047777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
3057777dab0Sopenharmony_ci * @since 12
3067777dab0Sopenharmony_ci * @version 1.0
3077777dab0Sopenharmony_ci */
3087777dab0Sopenharmony_ciint32_t OH_NetConn_RegisterNetConnCallback(NetConn_NetSpecifier *specifier, NetConn_NetConnCallback *netConnCallback,
3097777dab0Sopenharmony_ci                                           uint32_t timeout, uint32_t *callbackId);
3107777dab0Sopenharmony_ci
3117777dab0Sopenharmony_ci/**
3127777dab0Sopenharmony_ci * @brief Registers a callback to listen default network's status changed.
3137777dab0Sopenharmony_ci *
3147777dab0Sopenharmony_ci * @param callback The callback needed to be registered.
3157777dab0Sopenharmony_ci * @param callbackId out param, corresponding to a registered callback.
3167777dab0Sopenharmony_ci * @return 0 - Success.
3177777dab0Sopenharmony_ci *         201 - Permission denied.
3187777dab0Sopenharmony_ci *         401 - Parameter error.
3197777dab0Sopenharmony_ci *         2100002 - Failed to connect to the service.
3207777dab0Sopenharmony_ci *         2100003 - System internal error.
3217777dab0Sopenharmony_ci *         2101008 - The callback already exists.
3227777dab0Sopenharmony_ci *         2101022 - The number of requests exceeded the maximum allowed.
3237777dab0Sopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO
3247777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
3257777dab0Sopenharmony_ci * @since 12
3267777dab0Sopenharmony_ci * @version 1.0
3277777dab0Sopenharmony_ci */
3287777dab0Sopenharmony_ciint32_t OH_NetConn_RegisterDefaultNetConnCallback(NetConn_NetConnCallback *netConnCallback, uint32_t *callbackId);
3297777dab0Sopenharmony_ci
3307777dab0Sopenharmony_ci/**
3317777dab0Sopenharmony_ci * @brief Unregisters network status callback.
3327777dab0Sopenharmony_ci *
3337777dab0Sopenharmony_ci * @param callBackId the id corresponding to a registered callback.
3347777dab0Sopenharmony_ci * @return 0 - Success.
3357777dab0Sopenharmony_ci *         201 - Permission denied.
3367777dab0Sopenharmony_ci *         401 - Parameter error.
3377777dab0Sopenharmony_ci *         2100002 - Failed to connect to the service.
3387777dab0Sopenharmony_ci *         2100003 - System internal error.
3397777dab0Sopenharmony_ci *         2101007 - The callback does not exists.
3407777dab0Sopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO
3417777dab0Sopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Core
3427777dab0Sopenharmony_ci * @since 12
3437777dab0Sopenharmony_ci * @version 1.0
3447777dab0Sopenharmony_ci */
3457777dab0Sopenharmony_ciint32_t OH_NetConn_UnregisterNetConnCallback(uint32_t callBackId);
3467777dab0Sopenharmony_ci
3477777dab0Sopenharmony_ci#ifdef __cplusplus
3487777dab0Sopenharmony_ci}
3497777dab0Sopenharmony_ci#endif
3507777dab0Sopenharmony_ci
3517777dab0Sopenharmony_ci/** @} */
3527777dab0Sopenharmony_ci#endif /* NATIVE_NET_CONN_API_H */
353