• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "mock_netconn_client.h"
17 #include "wifi_log.h"
18 
19 namespace OHOS {
20 namespace Wifi {
21 
GetInstance()22 NetConnClient &NetConnClient::GetInstance()
23 {
24     static NetConnClient gNetConnClient;
25     return gNetConnClient;
26 }
27 
UnregisterNetSupplier(uint32_t supplierId)28 int32_t NetConnClient::UnregisterNetSupplier(uint32_t supplierId)
29 {
30     return NETMANAGER;
31 }
32 
RegisterNetSupplierCallback(uint32_t supplierId,const sptr<NetSupplierCallbackBase> & callback)33 int32_t NetConnClient::RegisterNetSupplierCallback(uint32_t supplierId, const sptr<NetSupplierCallbackBase> &callback)
34 {
35     return NETMANAGER;
36 }
37 
UpdateNetSupplierInfo(uint32_t supplierId,const sptr<NetSupplierInfo> & netSupplierInfo)38 int32_t NetConnClient::UpdateNetSupplierInfo(uint32_t supplierId, const sptr<NetSupplierInfo> &netSupplierInfo)
39 {
40     return NETMANAGER;
41 }
42 
UpdateNetLinkInfo(uint32_t supplierId,const sptr<NetLinkInfo> & netLinkInfo)43 int32_t NetConnClient::UpdateNetLinkInfo(uint32_t supplierId, const sptr<NetLinkInfo> &netLinkInfo)
44 {
45     return NETMANAGER;
46 }
47 
RegisterNetDetectionCallback(int32_t netId,const sptr<INetDetectionCallback> & callback)48 int32_t NetConnClient::RegisterNetDetectionCallback(int32_t netId, const sptr<INetDetectionCallback> &callback)
49 {
50     return NETMANAGER;
51 }
52 
UnRegisterNetDetectionCallback(int32_t netId,const sptr<INetDetectionCallback> & callback)53 int32_t NetConnClient::UnRegisterNetDetectionCallback(int32_t netId, const sptr<INetDetectionCallback> &callback)
54 {
55     return NETMANAGER;
56 }
57 
GetAllNets(std::list<sptr<NetHandle>> & netList)58 int32_t NetConnClient::GetAllNets(std::list<sptr<NetHandle>> &netList)
59 {
60     return NETMANAGER;
61 }
62 
GetNetCapabilities(const NetHandle & netHandle,NetAllCapabilities & netAllCap)63 int32_t NetConnClient::GetNetCapabilities(const NetHandle &netHandle, NetAllCapabilities &netAllCap)
64 {
65     return NETMANAGER;
66 }
67 
NetDetection(const NetHandle & netHandle)68 int32_t NetConnClient::NetDetection(const NetHandle &netHandle)
69 {
70     return NETMANAGER;
71 }
72 
RegisterNetInterfaceCallback(const sptr<INetInterfaceStateCallback> & callback)73 int32_t NetConnClient::RegisterNetInterfaceCallback(const sptr<INetInterfaceStateCallback> &callback)
74 {
75     return NETMANAGER;
76 }
77 } // namespace Wifi
78 } // namespace OHOS
79