1 /* 2 * Copyright (c) 2024 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 OHOS_MOCK_NET_CONN_MANAGER_H 17 #define OHOS_MOCK_NET_CONN_MANAGER_H 18 19 #define NETMANAGER (0) 20 #include "net_all_capabilities.h" 21 #include "net_conn_client.h" 22 23 namespace OHOS { 24 using namespace NetManagerStandard; 25 namespace Wifi { 26 class NetConnClient { 27 public: 28 static NetConnClient &GetInstance(); 29 30 int32_t UnregisterNetSupplier(uint32_t supplierId); 31 32 int32_t RegisterNetSupplierCallback(uint32_t supplierId, const sptr<NetSupplierCallbackBase> &callback); 33 34 int32_t UpdateNetSupplierInfo(uint32_t supplierId, const sptr<NetSupplierInfo> &netSupplierInfo); 35 36 int32_t UpdateNetLinkInfo(uint32_t supplierId, const sptr<NetLinkInfo> &netLinkInfo); 37 38 int32_t RegisterNetDetectionCallback(int32_t netId, const sptr<INetDetectionCallback> &callback); 39 40 int32_t UnRegisterNetDetectionCallback(int32_t netId, const sptr<INetDetectionCallback> &callback); 41 42 int32_t GetAllNets(std::list<sptr<NetHandle>> &netList); 43 44 int32_t GetNetCapabilities(const NetHandle &netHandle, NetAllCapabilities &netAllCap); 45 46 int32_t NetDetection(const NetHandle &netHandle); 47 48 int32_t RegisterNetInterfaceCallback(const sptr<INetInterfaceStateCallback> &callback); 49 }; 50 } // namespace NetManagerStandard 51 } // namespace OHOS 52 53 #endif // NET_CONN_MANAGER_H 54