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 COMMON_NETSYS_CONTROLLER_CALLBACK_TEST_H
17 #define COMMON_NETSYS_CONTROLLER_CALLBACK_TEST_H
18 
19 #include "net_manager_constants.h"
20 #include "net_mgr_log_wrapper.h"
21 #include "net_stats_constants.h"
22 #include "netsys_controller_callback.h"
23 
24 namespace OHOS {
25 namespace NetManagerStandard {
26 class NetsysControllerCallbackTestCb : public NetsysControllerCallback {
27 public:
OnInterfaceAddressUpdated(const std::string &,const std::string &,int,int)28     virtual int32_t OnInterfaceAddressUpdated(const std::string &, const std::string &, int, int)
29     {
30         return NETMANAGER_SUCCESS;
31     }
OnInterfaceAddressRemoved(const std::string &,const std::string &,int,int)32     virtual int32_t OnInterfaceAddressRemoved(const std::string &, const std::string &, int, int)
33     {
34         return NETMANAGER_SUCCESS;
35     }
OnInterfaceAdded(const std::string &)36     virtual int32_t OnInterfaceAdded(const std::string &)
37     {
38         return NETMANAGER_SUCCESS;
39     }
OnInterfaceRemoved(const std::string &)40     virtual int32_t OnInterfaceRemoved(const std::string &)
41     {
42         return NETMANAGER_SUCCESS;
43     }
OnInterfaceChanged(const std::string &,bool)44     virtual int32_t OnInterfaceChanged(const std::string &, bool)
45     {
46         return NETMANAGER_SUCCESS;
47     }
OnInterfaceLinkStateChanged(const std::string &,bool)48     virtual int32_t OnInterfaceLinkStateChanged(const std::string &, bool)
49     {
50         return NETMANAGER_SUCCESS;
51     }
OnRouteChanged(bool,const std::string &,const std::string &,const std::string &)52     virtual int32_t OnRouteChanged(bool, const std::string &, const std::string &, const std::string &)
53     {
54         return NETMANAGER_SUCCESS;
55     }
OnDhcpSuccess(NetsysControllerCallback::DhcpResult & dhcpResult)56     virtual int32_t OnDhcpSuccess(NetsysControllerCallback::DhcpResult &dhcpResult)
57     {
58         return NETMANAGER_SUCCESS;
59     }
OnBandwidthReachedLimit(const std::string & limitName,const std::string & iface)60     virtual int32_t OnBandwidthReachedLimit(const std::string &limitName, const std::string &iface)
61     {
62         return NETMANAGER_SUCCESS;
63     }
64 };
65 } // namespace NetManagerStandard
66 } // namespace OHOS
67 #endif // COMMON_NETSYS_CONTROLLER_CALLBACK_TEST_H
68