1 /* 2 * Copyright (C) 2021 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 #pragma once 18 19 #include <aidl/android/hardware/health/BatteryCapacityLevel.h> 20 #include <aidl/android/hardware/health/DiskStats.h> 21 #include <aidl/android/hardware/health/HealthInfo.h> 22 #include <aidl/android/hardware/health/StorageInfo.h> 23 #include <android/hardware/health/2.0/types.h> 24 #include <android/hardware/health/2.1/types.h> 25 #include <limits> 26 27 namespace android::h2a { 28 29 __attribute__((warn_unused_result)) bool translate( 30 const ::android::hardware::health::V2_0::StorageInfo& in, 31 aidl::android::hardware::health::StorageInfo* out); 32 __attribute__((warn_unused_result)) bool translate( 33 const ::android::hardware::health::V2_0::DiskStats& in, 34 aidl::android::hardware::health::DiskStats* out); 35 __attribute__((warn_unused_result)) bool translate( 36 const ::android::hardware::health::V2_0::HealthInfo& in, 37 aidl::android::hardware::health::HealthInfo* out); 38 __attribute__((warn_unused_result)) bool translate( 39 const ::android::hardware::health::V2_1::HealthInfo& in, 40 aidl::android::hardware::health::HealthInfo* out); 41 42 } // namespace android::h2a 43