1 /* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef android_hardware_automotive_vehicle_V2_0_impl_ProtoMessageConverter_H_ 18 #define android_hardware_automotive_vehicle_V2_0_impl_ProtoMessageConverter_H_ 19 20 #include <android/hardware/automotive/vehicle/2.0/types.h> 21 22 #include "VehicleHalProto.pb.h" 23 24 namespace android { 25 namespace hardware { 26 namespace automotive { 27 namespace vehicle { 28 namespace V2_0 { 29 30 namespace impl { 31 32 namespace proto_msg_converter { 33 34 // VehiclePropConfig 35 36 void toProto(vhal_proto::VehiclePropConfig* protoCfg, const VehiclePropConfig& cfg); 37 38 void fromProto(VehiclePropConfig* cfg, const vhal_proto::VehiclePropConfig& protoCfg); 39 40 // VehiclePropValue 41 42 void toProto(vhal_proto::VehiclePropValue* protoVal, const VehiclePropValue& val); 43 44 void fromProto(VehiclePropValue* val, const vhal_proto::VehiclePropValue& protoVal); 45 46 } // namespace proto_msg_converter 47 48 } // namespace impl 49 50 } // namespace V2_0 51 } // namespace vehicle 52 } // namespace automotive 53 } // namespace hardware 54 } // namespace android 55 56 #endif // android_hardware_automotive_vehicle_V2_0_impl_VehicleHalEmulator_H_ 57