# 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_CHECK_DIE_ON_FAILURE=${chip_data_model_check_die_on_failure}",
    "CHIP_CONFIG_DATA_MODEL_EXTRA_LOGGING=${chip_data_model_extra_logging}",
  ]

  if (chip_use_data_model_interface == "disabled") {
    defines += [
      "CHIP_CONFIG_USE_DATA_MODEL_INTERFACE=0",
      "CHIP_CONFIG_USE_EMBER_DATA_MODEL=1",
    ]
  } else if (chip_use_data_model_interface == "check") {
    defines += [
      "CHIP_CONFIG_USE_DATA_MODEL_INTERFACE=1",
      "CHIP_CONFIG_USE_EMBER_DATA_MODEL=1",
    ]
  } else {
    # only one of disabled/check/enabled must be used
    assert(chip_use_data_model_interface == "enabled",
           "chip_use_data_model_interface must use a supported value")

    defines += [
      "CHIP_CONFIG_USE_DATA_MODEL_INTERFACE=1",
      "CHIP_CONFIG_USE_EMBER_DATA_MODEL=0",
    ]
  }

  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/Read.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_use_data_model_interface == "disabled") {
    sources += [
      "reporting/Read-Ember.cpp",
      "reporting/Read-Ember.h",
    ]
  } else if (chip_use_data_model_interface == "check") {
    sources += [
      "reporting/Read-Checked.cpp",
      "reporting/Read-Checked.h",
      "reporting/Read-DataModel.cpp",
      "reporting/Read-DataModel.h",
      "reporting/Read-Ember.cpp",
      "reporting/Read-Ember.h",
    ]
    public_deps += [ "${chip_root}/src/app/data-model-provider" ]
  } else {  # enabled
    sources += [
      "reporting/Read-DataModel.cpp",
      "reporting/Read-DataModel.h",
    ]
    public_deps += [ "${chip_root}/src/app/data-model-provider" ]
  }

  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/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",
  ]
}

# 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.h",
    "AttributePersistenceProvider.h",
    "ChunkedWriteCallback.cpp",
    "ChunkedWriteCallback.h",
    "CommandResponseHelper.h",
    "CommandResponseSender.cpp",
    "DefaultAttributePersistenceProvider.cpp",
    "DefaultAttributePersistenceProvider.h",
    "DeferredAttributePersistenceProvider.cpp",
    "DeferredAttributePersistenceProvider.h",
    "EventLogging.h",
    "EventManagement.cpp",
    "EventManagement.h",
    "FailSafeContext.cpp",
    "FailSafeContext.h",
    "GenericEventManagementTestEventTriggerHandler.cpp",
    "GenericEventManagementTestEventTriggerHandler.h",
    "OTAUserConsentCommon.h",
    "ReadHandler.cpp",
    "SafeAttributePersistenceProvider.h",
    "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/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_use_data_model_interface == "disabled") {
    sources += [
      "AttributePathExpandIterator-Ember.cpp",
      "AttributePathExpandIterator-Ember.h",
      "AttributePathExpandIterator.h",
    ]
  } else if (chip_use_data_model_interface == "check") {
    sources += [
      "AttributePathExpandIterator-Checked.cpp",
      "AttributePathExpandIterator-Checked.h",
      "AttributePathExpandIterator-DataModel.cpp",
      "AttributePathExpandIterator-DataModel.h",
      "AttributePathExpandIterator-Ember.cpp",
      "AttributePathExpandIterator-Ember.h",
      "AttributePathExpandIterator.h",
    ]
    public_deps += [ "${chip_root}/src/app/data-model-provider" ]
  } else {  # enabled
    sources += [
      "AttributePathExpandIterator-DataModel.cpp",
      "AttributePathExpandIterator-DataModel.h",
      "AttributePathExpandIterator.h",
    ]
    public_deps += [ "${chip_root}/src/app/data-model-provider" ]
  }

  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" ]
}
