1 /*
2  * Copyright (c) 2023 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 #include "firewall_rule_serializer.h"
16 
17 namespace OHOS {
18 namespace EDM {
Deserialize(const std::string & jsonString,IPTABLES::FirewallRuleParcel & dataObj)19 bool FirewallRuleSerializer::Deserialize(const std::string &jsonString, IPTABLES::FirewallRuleParcel &dataObj)
20 {
21     return true;
22 }
23 
Serialize(const IPTABLES::FirewallRuleParcel & dataObj,std::string & jsonString)24 bool FirewallRuleSerializer::Serialize(const IPTABLES::FirewallRuleParcel &dataObj, std::string &jsonString)
25 {
26     return true;
27 }
28 
GetPolicy(MessageParcel & data,IPTABLES::FirewallRuleParcel & result)29 bool FirewallRuleSerializer::GetPolicy(MessageParcel &data, IPTABLES::FirewallRuleParcel &result)
30 {
31     return IPTABLES::FirewallRuleParcel::Unmarshalling(data, result);
32 }
33 
WritePolicy(MessageParcel & reply,IPTABLES::FirewallRuleParcel & result)34 bool FirewallRuleSerializer::WritePolicy(MessageParcel &reply, IPTABLES::FirewallRuleParcel &result)
35 {
36     return result.Marshalling(reply);
37 }
38 
MergePolicy(std::vector<IPTABLES::FirewallRuleParcel> & data,IPTABLES::FirewallRuleParcel & result)39 bool FirewallRuleSerializer::MergePolicy(std::vector<IPTABLES::FirewallRuleParcel> &data,
40     IPTABLES::FirewallRuleParcel &result)
41 {
42     return true;
43 }
44 } // namespace EDM
45 } // namespace OHOS