# Copyright (c) 2020 Project CHIP Authors
#
# 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_overrides/chip.gni")
import("${chip_root}/build/chip/buildconfig_header.gni")
import("${chip_root}/src/lib/core/core.gni")
import("${chip_root}/src/platform/device.gni")
import("common_flags.gni")
import("icd/icd.gni")

declare_args() {
  # Enable strict schema checks.
  enable_im_pretty_print =
      is_debug && (current_os == "linux" || current_os == "mac" ||
                   current_os == "ios" || current_os == "android")

  # Logging verbosity control for Access Control implementation
  #
  # If set to > 0, it is desired to get additional logging on all
  # access control checks for better debugging ability.
  #
  # If set to > 1, it is desired to log every single check
  chip_access_control_policy_logging_verbosity = 0
  if (is_debug && (current_os == "linux" || current_os == "mac")) {
    chip_access_control_policy_logging_verbosity = 2
  }

  chip_enable_session_resumption = true

  # By default, the resources used by each fabric is unlimited if they are allocated on heap. This flag is for checking the resource usage even when they are allocated on heap to increase code coverage in integration tests.
  chip_im_force_fabric_quota_check = false

  # Allow building ota-requestor-app with a non-spec-compliant floor
  # (i.e. smaller than 2 minutes) for action delays.
  non_spec_compliant_ota_action_delay_floor = -1

  # enable time sync client for use in `time-synchronization-server` (if linked)
  # TODO: this should probably be migrated to be time-synchronization-server specific
  #       if the cluster build targets are decoupled as stand-alone units.
  time_sync_enable_tsc_feature = 1

  # Systems that can spare a bit of RAM for InteractionModelEngine/delegate
  # pointers should do so (allows InteractionModelEngine decoupling and less usage
  # of global pointers)
  chip_im_static_global_interaction_model_engine =
      current_os != "linux" && current_os != "mac" && current_os != "ios" &&
      current_os != "android"
}

buildconfig_header("app_buildconfig") {
  header = "AppBuildConfig.h"
  header_dir = "app"

  defines = [
    "CHIP_CONFIG_IM_PRETTY_PRINT=${enable_im_pretty_print}",
    "CHIP_CONFIG_IM_FORCE_FABRIC_QUOTA_CHECK=${chip_im_force_fabric_quota_check}",
    "CHIP_CONFIG_ENABLE_SESSION_RESUMPTION=${chip_enable_session_resumption}",
    "CHIP_CONFIG_ACCESS_CONTROL_POLICY_LOGGING_VERBOSITY=${chip_access_control_policy_logging_verbosity}",
    "CHIP_CONFIG_PERSIST_SUBSCRIPTIONS=${chip_persist_subscriptions}",
    "CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION=${chip_subscription_timeout_resumption}",
    "CHIP_CONFIG_ENABLE_READ_CLIENT=${chip_enable_read_client}",
    "CHIP_CONFIG_STATIC_GLOBAL_INTERACTION_MODEL_ENGINE=${chip_im_static_global_interaction_model_engine}",
    "TIME_SYNC_ENABLE_TSC_FEATURE=${time_sync_enable_tsc_feature}",
    "NON_SPEC_COMPLIANT_OTA_ACTION_DELAY_FLOOR=${non_spec_compliant_ota_action_delay_floor}",
    "CHIP_DEVICE_CONFIG_DYNAMIC_SERVER=${chip_build_controller_dynamic_server}",
    "CHIP_CONFIG_ENABLE_BUSY_HANDLING_FOR_OPERATIONAL_SESSION_SETUP=${chip_enable_busy_handling_for_operational_session_setup}",
    "CHIP_CONFIG_DATA_MODEL_EXTRA_LOGGING=${chip_data_model_extra_logging}",
  ]

  visibility = [ ":app_config" ]
}

source_set("app_config") {
  sources = [ "AppConfig.h" ]

  deps = [ ":app_buildconfig" ]
}

source_set("paths") {
  sources = [
    "AttributePathParams.h",
    "CommandPathParams.h",
    "CommandPathRegistry.h",
    "ConcreteAttributePath.h",
    "ConcreteClusterPath.h",
    "ConcreteCommandPath.h",
    "ConcreteEventPath.h",
    "DataVersionFilter.h",
    "EventPathParams.h",
  ]

  # This source sets also depends on basic-types.h that is not in any dependency we can use
  public_deps = [
    ":app_config",
    "${chip_root}/src/app/util:types",
    "${chip_root}/src/lib/core",
    "${chip_root}/src/lib/core:types",
  ]
}

source_set("global-attributes") {
  sources = [ "GlobalAttributes.h" ]

  # This also depends on zap-generated code which is currently impossible to split out
  # as a dependency
  public_deps = [
    ":app_config",
    "${chip_root}/src/app/common:ids",
    "${chip_root}/src/lib/support",
  ]
}

source_set("subscription-info-provider") {
  sources = [ "SubscriptionsInfoProvider.h" ]

  public_deps = [ "${chip_root}/src/lib/core" ]
}

config("config-controller-dynamic-server") {
  defines = [
    "CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1",
    "CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT=1",
  ]
}

source_set("constants") {
  sources = [
    "InteractionModelTimeout.h",
    "SpecificationDefinedRevisions.h",
  ]
  public_deps = [
    "${chip_root}/src/lib/core",
    "${chip_root}/src/system",
  ]
}

source_set("test-event-trigger") {
  sources = [ "TestEventTriggerDelegate.h" ]
}

# interaction-model is a static-library because it currently requires global functions (app/util/...) that are stubbed in different test files that depend on the app static_library
# which in tern depens on the interaction-model.
# Using source_set prevents the unit test to build correctly.
static_library("interaction-model") {
  sources = [
    "CASEClient.cpp",
    "CASEClient.h",
    "CASEClientPool.h",
    "CASESessionManager.cpp",
    "CASESessionManager.h",
    "CommandSender.cpp",
    "CommandSender.h",
    "DeviceProxy.cpp",
    "DeviceProxy.h",
    "InteractionModelDelegatePointers.cpp",
    "InteractionModelDelegatePointers.h",
    "InteractionModelEngine.cpp",
    "InteractionModelEngine.h",
    "InteractionModelHelper.h",
    "OperationalSessionSetup.cpp",
    "OperationalSessionSetup.h",
    "OperationalSessionSetupPool.h",
    "PendingResponseTracker.h",
    "PendingResponseTrackerImpl.cpp",
    "PendingResponseTrackerImpl.h",
    "ReadClient.h",  # TODO: cpp is only included conditionally. Needs logic
                     # fixing
    "ReadPrepareParams.h",
    "SubscriptionResumptionStorage.h",
    "TimedHandler.cpp",
    "TimedHandler.h",
    "TimedRequest.cpp",
    "TimedRequest.h",
    "WriteClient.cpp",
    "WriteClient.h",
    "reporting/Engine.cpp",
    "reporting/Engine.h",
    "reporting/ReportScheduler.h",
    "reporting/ReportSchedulerImpl.cpp",
    "reporting/ReportSchedulerImpl.h",
    "reporting/SynchronizedReportSchedulerImpl.cpp",
    "reporting/SynchronizedReportSchedulerImpl.h",

    # TODO: reporting header is part of interaction-model, however actual implementation depends
    #       on generated code as subscriptions depend on attribute data versioning to determine
    #       when "data changed" reports should be sent.
    #
    #       This breaks having `.h` and `.cpp` based off the same compilation unit and
    #       should ideally be cleaned up.
    "reporting/reporting.h",
  ]

  deps = [ "${chip_root}/src/app:events" ]

  # Temporary dependency: codegen data provider instance should be provided
  # by the application
  deps += [ "${chip_root}/src/app/codegen-data-model-provider:instance-header" ]

  public_deps = [
    ":app_config",
    ":command-handler-impl",
    ":constants",
    ":paths",
    ":subscription-info-provider",
    "${chip_root}/src/app/MessageDef",
    "${chip_root}/src/app/data-model-provider",
    "${chip_root}/src/app/icd/server:icd-server-config",
    "${chip_root}/src/app/icd/server:manager",
    "${chip_root}/src/app/icd/server:observer",
    "${chip_root}/src/app/util:af-types",
    "${chip_root}/src/app/util:callbacks",
    "${chip_root}/src/lib/address_resolve",
    "${chip_root}/src/lib/support",
    "${chip_root}/src/lib/support:static-support",
    "${chip_root}/src/protocols/interaction_model",
    "${chip_root}/src/protocols/secure_channel",
    "${chip_root}/src/system",
  ]

  public_configs = [ "${chip_root}/src:includes" ]

  if (chip_enable_read_client) {
    sources += [ "ReadClient.cpp" ]
  }

  if (chip_persist_subscriptions) {
    sources += [
      "SimpleSubscriptionResumptionStorage.cpp",
      "SimpleSubscriptionResumptionStorage.h",
      "SubscriptionResumptionSessionEstablisher.cpp",
      "SubscriptionResumptionSessionEstablisher.h",
    ]
  }

  if (chip_build_controller_dynamic_server) {
    sources += [
      "clusters/ota-provider/ota-provider.cpp",
      "dynamic_server/AccessControl.cpp",
      "dynamic_server/AccessControl.h",
    ]

    # DynamicDispatcher is actually an ember-override that takes over
    # util/attribute-storage.cpp and util/attribute-table.cpp functions.
    #
    # We likely should formalize and change this with a proper DataModel::Provider that
    # is consistent instead
    sources += [
      "${chip_root}/src/app/util/ember-global-attribute-access-interface.cpp",
      "${chip_root}/src/app/util/ember-io-storage.cpp",
      "dynamic_server/DynamicDispatcher.cpp",
    ]

    public_deps += [
      ":global-attributes",
      "${chip_root}/src/access",
      "${chip_root}/src/access:provider-impl",
      "${chip_root}/src/app/common:attribute-type",
    ]

    public_configs += [ ":config-controller-dynamic-server" ]
  }
}

source_set("events") {
  sources = [
    "EventHeader.h",
    "EventLoggingDelegate.h",
    "EventLoggingTypes.h",
  ]

  deps = [
    ":paths",
    "${chip_root}/src/access:types",
    "${chip_root}/src/lib/core",
  ]
}

static_library("attribute-access") {
  sources = [
    "AttributeAccessInterface.h",
    "AttributeAccessInterfaceCache.h",
    "AttributeAccessInterfaceRegistry.cpp",
    "AttributeAccessInterfaceRegistry.h",
    "AttributeEncodeState.h",
    "AttributeReportBuilder.cpp",
    "AttributeReportBuilder.h",
    "AttributeValueDecoder.h",
    "AttributeValueEncoder.cpp",
    "AttributeValueEncoder.h",
  ]

  deps = [
    ":paths",
    "${chip_root}/src/access:types",
    "${chip_root}/src/app/MessageDef",
    "${chip_root}/src/app/data-model",
    "${chip_root}/src/app/util:af-types",
    "${chip_root}/src/lib/core",
    "${chip_root}/src/lib/support",
  ]
}

source_set("required-privileges") {
  sources = [ "RequiredPrivilege.h" ]

  public_deps = [
    ":paths",
    "${chip_root}/src/access:types",
  ]

  if (chip_build_controller_dynamic_server) {
    sources += [
      "util/privilege-storage.cpp",
      "util/privilege-storage.h",
    ]

    public_deps += [
      ":global-attributes",
      "${chip_root}/src/access",
      "${chip_root}/src/app/dynamic_server:mock-codegen-includes",
    ]

    public_configs = [ ":config-controller-dynamic-server" ]
  }
}

source_set("status-response") {
  sources = [
    "StatusResponse.cpp",
    "StatusResponse.h",
  ]
  public_deps = [
    ":constants",
    "${chip_root}/src/app/MessageDef",
    "${chip_root}/src/messaging",
  ]
}

source_set("command-handler-interface") {
  sources = [
    "CommandHandler.cpp",
    "CommandHandler.h",
    "CommandHandlerExchangeInterface.h",
    "CommandHandlerInterface.h",
    "CommandHandlerInterfaceRegistry.cpp",
    "CommandHandlerInterfaceRegistry.h",
  ]

  public_deps = [
    ":paths",
    "${chip_root}/src/access:types",
    "${chip_root}/src/app/data-model",
    "${chip_root}/src/lib/core",
    "${chip_root}/src/lib/support",
    "${chip_root}/src/messaging",
    "${chip_root}/src/protocols/interaction_model",
  ]
}

source_set("command-handler-impl") {
  sources = [
    "CommandHandlerImpl.cpp",
    "CommandHandlerImpl.h",
  ]

  public_deps = [
    ":command-handler-interface",
    ":paths",
    ":required-privileges",
    ":status-response",
    "${chip_root}/src/access:types",
    "${chip_root}/src/app/MessageDef",
    "${chip_root}/src/app/data-model",
    "${chip_root}/src/app/data-model-provider",
    "${chip_root}/src/app/util:callbacks",
    "${chip_root}/src/lib/support",
    "${chip_root}/src/messaging",
  ]
}

source_set("attribute-persistence") {
  sources = [ "SafeAttributePersistenceProvider.h" ]

  public_deps = [
    ":paths",
    "${chip_root}/src/app/data-model:nullable",
    "${chip_root}/src/app/util:types",
    "${chip_root}/src/lib/support",
    "${chip_root}/src/lib/support:span",
  ]
}

# Note to developpers, instead of continuously adding files in the app librabry, it is recommand to create smaller source_sets that app can depend on.
# This way, we can have a better understanding of dependencies and other componenets can depend on the different source_sets without needing to depend on the entire app library.
static_library("app") {
  output_name = "libCHIPDataModel"

  sources = [
    "AttributePathExpandIterator.cpp",
    "AttributePathExpandIterator.h",
    "AttributePathExpandIterator.h",
    "ChunkedWriteCallback.cpp",
    "ChunkedWriteCallback.h",
    "CommandResponseHelper.h",
    "CommandResponseSender.cpp",
    "EventLogging.h",
    "EventManagement.cpp",
    "EventManagement.h",
    "FailSafeContext.cpp",
    "FailSafeContext.h",
    "GenericEventManagementTestEventTriggerHandler.cpp",
    "GenericEventManagementTestEventTriggerHandler.h",
    "OTAUserConsentCommon.h",
    "ReadHandler.cpp",
    "TimerDelegates.cpp",
    "TimerDelegates.h",
    "WriteHandler.cpp",

    # TODO: the following items cannot be included due to interaction-model circularity
    #       (app depending on im and im including these headers):
    #       Name with _ so that linter does not recognize it
    # "CommandResponseSender._h"
    # "ReadHandler._h",
    # "WriteHandler._h"
  ]

  public_deps = [
    ":app_config",
    ":attribute-access",
    ":constants",
    ":global-attributes",
    ":interaction-model",
    "${chip_root}/src/app/data-model",
    "${chip_root}/src/app/data-model-provider",
    "${chip_root}/src/app/icd/server:icd-server-config",
    "${chip_root}/src/app/util:callbacks",
    "${chip_root}/src/lib/address_resolve",
    "${chip_root}/src/lib/support",
    "${chip_root}/src/messaging",
    "${chip_root}/src/protocols/interaction_model",
    "${chip_root}/src/system",
  ]

  if (chip_enable_read_client) {
    sources += [
      "BufferedReadCallback.cpp",
      "BufferedReadCallback.h",
      "ClusterStateCache.cpp",
      "ClusterStateCache.h",
    ]
  }

  if (chip_enable_icd_server) {
    public_deps += [
      "${chip_root}/src/app/icd/server:manager",
      "${chip_root}/src/app/icd/server:notifier",
    ]
  }

  cflags = [ "-Wconversion" ]

  public_configs = [ "${chip_root}/src:includes" ]
}
