wifi: Add method implementations in IWifiRttController

Hookup the legacy HAL functions to the corresponding HIDL methods in
WifiRttController and perform the necessary struct conversions.

Bug: 31991232
Test: Compiles
Change-Id: I7bd8bd7e7af2230699c079f1ad8e0a8b1e496026
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index b940200..e3e41c3 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -1431,6 +1431,23 @@
   return true;
 }
 
+bool convertHidlVectorOfRttConfigToLegacy(
+    const std::vector<RttConfig>& hidl_configs,
+    std::vector<legacy_hal::wifi_rtt_config>* legacy_configs) {
+  if (!legacy_configs) {
+    return false;
+  }
+  legacy_configs->clear();
+  for (const auto& hidl_config : hidl_configs) {
+    legacy_hal::wifi_rtt_config legacy_config;
+    if (!convertHidlRttConfigToLegacy(hidl_config, &legacy_config)) {
+      return false;
+    }
+    legacy_configs->push_back(legacy_config);
+  }
+  return true;
+}
+
 bool convertHidlRttLciInformationToLegacy(
     const RttLciInformation& hidl_info,
     legacy_hal::wifi_lci_information* legacy_info) {
@@ -1596,6 +1613,23 @@
   }
   return true;
 }
+
+bool convertLegacyVectorOfRttResultToHidl(
+    const std::vector<const legacy_hal::wifi_rtt_result*>& legacy_results,
+    std::vector<RttResult>* hidl_results) {
+  if (!hidl_results) {
+    return false;
+  }
+  hidl_results->clear();
+  for (const auto legacy_result : legacy_results) {
+    RttResult hidl_result;
+    if (!convertLegacyRttResultToHidl(*legacy_result, &hidl_result)) {
+      return false;
+    }
+    hidl_results->push_back(hidl_result);
+  }
+  return true;
+}
 }  // namespace hidl_struct_util
 }  // namespace implementation
 }  // namespace V1_0