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 MOCK_NETWORKVPN_SERVICE_STUB_TEST_H 17 #define MOCK_NETWORKVPN_SERVICE_STUB_TEST_H 18 19 #include "i_netfirewall_service.h" 20 #include "netfirewall_stub.h" 21 22 namespace OHOS { 23 namespace NetManagerStandard { 24 class MockNetFirewallServiceStub : public NetFirewallStub { 25 public: SetNetFirewallPolicy(const int32_t userId,const sptr<NetFirewallPolicy> & status)26 int32_t SetNetFirewallPolicy(const int32_t userId, const sptr<NetFirewallPolicy> &status) override 27 { 28 return 0; 29 } 30 GetNetFirewallPolicy(const int32_t userId,sptr<NetFirewallPolicy> & status)31 int32_t GetNetFirewallPolicy(const int32_t userId, sptr<NetFirewallPolicy> &status) override 32 { 33 return 0; 34 } 35 AddNetFirewallRule(const sptr<NetFirewallRule> & rule,int32_t & result)36 int32_t AddNetFirewallRule(const sptr<NetFirewallRule> &rule, int32_t &result) override 37 { 38 return 0; 39 } 40 UpdateNetFirewallRule(const sptr<NetFirewallRule> & rule)41 int32_t UpdateNetFirewallRule(const sptr<NetFirewallRule> &rule) override 42 { 43 return 0; 44 } 45 DeleteNetFirewallRule(const int32_t userId,const int32_t ruleId)46 int32_t DeleteNetFirewallRule(const int32_t userId, const int32_t ruleId) override 47 { 48 return 0; 49 } 50 GetNetFirewallRules(const int32_t userId,const sptr<RequestParam> & requestParam,sptr<FirewallRulePage> & info)51 int32_t GetNetFirewallRules(const int32_t userId, const sptr<RequestParam> &requestParam, 52 sptr<FirewallRulePage> &info) override 53 { 54 return 0; 55 } 56 GetNetFirewallRule(const int32_t userId,const int32_t ruleId,sptr<NetFirewallRule> & rule)57 int32_t GetNetFirewallRule(const int32_t userId, const int32_t ruleId, sptr<NetFirewallRule> &rule) override 58 { 59 return 0; 60 } 61 GetInterceptRecords(const int32_t userId,const sptr<RequestParam> & requestParam,sptr<InterceptRecordPage> & info)62 int32_t GetInterceptRecords(const int32_t userId, const sptr<RequestParam> &requestParam, 63 sptr<InterceptRecordPage> &info) override 64 { 65 return 0; 66 } 67 }; 68 } // namespace NetManagerStandard 69 } // namespace OHOS 70 #endif // MOCK_NETWORKVPN_SERVICE_STUB_TEST_H 71