/* * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include #include #include #include // clang-format off #include PATH(android/hardware/audio/CORE_TYPES_FILE_VERSION/types.h) #include PATH(android/hardware/audio/common/COMMON_TYPES_FILE_VERSION/types.h) // clang-format on enum { PARAM_FACTORY_NAME, PARAM_DEVICE_NAME }; using DeviceParameter = std::tuple; // Nesting a tuple in another tuple allows to use GTest Combine function to generate // all combinations of devices and configs. #if MAJOR_VERSION <= 6 enum { PARAM_DEVICE, PARAM_CONFIG, PARAM_FLAGS }; enum { INDEX_INPUT, INDEX_OUTPUT }; using DeviceConfigParameter = std::tuple< DeviceParameter, android::hardware::audio::common::COMMON_TYPES_CPP_VERSION::AudioConfig, std::variant>; #elif MAJOR_VERSION >= 7 enum { PARAM_DEVICE, PARAM_PORT_NAME, PARAM_ATTACHED_DEV_ADDR, PARAM_CONFIG, PARAM_FLAGS }; using DeviceConfigParameter = std::tuple>; #endif