# Copyright (c) 2025 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("../../multimodalinput_mini.gni")

config("property_name_mapper_public_config") {
  include_dirs = [
    "include",
    "${mmi_path}/intention/scheduler/component_manager/include",
  ]
}

ohos_shared_library("mmi_property_name_mapper") {
  sanitize = {
    cfi = true
    cfi_cross_dso = true
    debug = false
  }

  branch_protector_ret = "pac_ret"

  include_dirs = [
    "include",
    "${mmi_path}/intention/prototype/include"
  ]

  sources = [ "src/property_name_mapper_impl.cpp" ]

  configs = [ "${mmi_path}/common/anco/comm:mmi_anco_channel_config" ]

  defines = input_default_defines

  deps = [
    "${mmi_path}/common/anco/comm:anco_channel_interface",
    "${mmi_path}/frameworks/proxy:libmmi-common",
    "${mmi_path}/intention/prototype:input_service_prototype",
    "${mmi_path}/util:libmmi-util",
    "${mmi_path}/service:libmmi-server-common",
  ]

  external_deps = [
    "c_utils:utils",
    "cJSON:cjson",
    "hilog:libhilog",
    "ipc:ipc_single",
    "libinput:libinput-third-mmi",
    "preferences:native_preferences",
  ]

  part_name = "${mmi_part_name}"
  subsystem_name = "${mmi_subsystem_name}"
}

ohos_source_set("property_name_mapper") {
  sanitize = {
    cfi = true
    cfi_cross_dso = true
    debug = false
  }

  branch_protector_ret = "pac_ret"

  include_dirs = [
    "include",
    "${mmi_path}/service/common/timer_manager/include",
  ]

  sources = [ "src/property_name_mapper.cpp" ]

  configs = [ "${mmi_path}/common/anco/comm:mmi_anco_channel_config" ]

  public_configs = [ ":property_name_mapper_public_config" ]

  defines = input_default_defines

  deps = [
    "${mmi_path}/common/anco/comm:anco_channel_interface",
    "${mmi_path}/frameworks/proxy:libmmi-common",
    "${mmi_path}/intention/prototype:input_service_prototype",
    "${mmi_path}/intention/scheduler/component_manager:mmi_component_manager",
    "${mmi_path}/util:libmmi-util",
    "${mmi_path}/service:libmmi-server-common",
  ]

  external_deps = [
    "c_utils:utils",
    "hilog:libhilog",
    "ipc:ipc_single",
    "libinput:libinput-third-mmi",
    "preferences:native_preferences",
  ]

  part_name = "${mmi_part_name}"
  subsystem_name = "${mmi_subsystem_name}"
}