# Copyright (C) 2023 Huawei Device Co., Ltd.
# 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.

import("//build/ohos.gni")
import("//build/ohos/ndk/ndk.gni")

ohos_ndk_headers("ohaudio_header") {
  dest_dir = "$ndk_headers_out_dir/ohaudio"
  sources = [
    "audio_capturer/native_audiocapturer.h",
    "audio_manager/native_audio_debugging_manager.h",
    "audio_manager/native_audio_device_enhance_manager.h",
    "audio_manager/native_audio_manager.h",
    "audio_manager/native_audio_resource_manager.h",
    "audio_manager/native_audio_routing_manager.h",
    "audio_manager/native_audio_session_manager.h",
    "audio_manager/native_audio_stream_manager.h",
    "audio_manager/native_audio_volume_manager.h",
    "audio_renderer/native_audiorenderer.h",
    "common/native_audio_common.h",
    "common/native_audio_device_base.h",
    "common/native_audio_session_base.h",
    "common/native_audiostream_base.h",
    "common/native_audiostreambuilder.h",
  ]
}

ohos_ndk_library("libohaudio_ndk") {
  output_name = "ohaudio"
  output_extension = "so"
  ndk_description_file = "./ohaudio.ndk.json"
  system_capability = "SystemCapability.Multimedia.Audio.Core"
  system_capability_headers = [
    "ohaudio/native_audiostream_base.h",
    "ohaudio/native_audiostreambuilder.h",
    "ohaudio/native_audiorenderer.h",
    "ohaudio/native_audiocapturer.h",
    "ohaudio/native_audio_manager.h",
    "ohaudio/native_audio_routing_manager.h",
    "ohaudio/native_audio_common.h",
    "ohaudio/native_audio_device_base.h",
    "ohaudio/native_audio_debugging_manager.h",
    "ohaudio/native_audio_device_enhance_manager.h",
    "ohaudio/native_audio_session_manager.h",
    "ohaudio/native_audio_stream_manager.h",
    "ohaudio/native_audio_volume_manager.h",
    "ohaudio/native_audio_resource_manager.h",
    "ohaudio/native_audio_session_base.h",
  ]
}