diff --git a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp index 536ac205454862..a81de5670f24c2 100644 --- a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp +++ b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp @@ -208,6 +208,10 @@ bool emberAfGeneralCommissioningClusterArmFailSafeCallback(app::CommandHandler * return true; } +#ifndef CHIP_CONFIG_TNC_ACCEPTED_ACKNOWLEDGEMENTS +#error "Failed to set CHIP_CONFIG_TNC_ACCEPTED_ACKNOWLEDGEMENTS" +#endif + bool emberAfGeneralCommissioningClusterCommissioningCompleteCallback( app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::CommissioningComplete::DecodableType & commandData) diff --git a/src/include/platform/CHIPDeviceConfig.h b/src/include/platform/CHIPDeviceConfig.h index 785b47656dd5a3..a0f4e83f09a194 100644 --- a/src/include/platform/CHIPDeviceConfig.h +++ b/src/include/platform/CHIPDeviceConfig.h @@ -1507,6 +1507,24 @@ static_assert(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MIN <= CHIP_DEVICE // -------------------- Miscellaneous -------------------- +// ----------------------- Terms and Conditions ----------------------- + +#ifndef CHIP_CONFIG_TNC_ACCEPTED_ACKNOWLEDGEMENTS +#define CHIP_CONFIG_TNC_ACCEPTED_ACKNOWLEDGEMENTS 0 +#endif + +#ifndef CHIP_CONFIG_TNC_ACCEPTED_VERSION +#define CHIP_CONFIG_TNC_ACCEPTED_VERSION 0 +#endif + +#ifndef CHIP_CONFIG_TNC_REQUIRED_ACKNOWLEDGEMENTS +#define CHIP_CONFIG_TNC_REQUIRED_ACKNOWLEDGEMENTS 0 +#endif + +#ifndef CHIP_CONFIG_TNC_REQUIRED_VERSION +#define CHIP_CONFIG_TNC_REQUIRED_VERSION 0 +#endif + /** * CHIP_DEVICE_CONFIG_ENABLE_AUTOMATIC_CASE_RETRIES * diff --git a/src/lib/core/BUILD.gn b/src/lib/core/BUILD.gn index eaecf859ac1993..d944be14ee510a 100644 --- a/src/lib/core/BUILD.gn +++ b/src/lib/core/BUILD.gn @@ -69,6 +69,10 @@ buildconfig_header("chip_buildconfig") { "CHIP_CONFIG_TLV_VALIDATE_CHAR_STRING_ON_WRITE=${chip_tlv_validate_char_string_on_write}", "CHIP_CONFIG_TLV_VALIDATE_CHAR_STRING_ON_READ=${chip_tlv_validate_char_string_on_read}", "CHIP_CONFIG_COMMAND_SENDER_BUILTIN_SUPPORT_FOR_BATCHED_COMMANDS=${chip_enable_sending_batch_commands}", + "CHIP_CONFIG_TNC_ACCEPTED_ACKNOWLEDGEMENTS=${chip_tnc_accepted_acknowledgements}", + "CHIP_CONFIG_TNC_ACCEPTED_VERSION=${chip_tnc_accepted_version}", + "CHIP_CONFIG_TNC_REQUIRED_ACKNOWLEDGEMENTS=${chip_tnc_required_acknowledgements}", + "CHIP_CONFIG_TNC_REQUIRED_VERSION=${chip_tnc_required_version}", ] visibility = [ ":chip_config_header" ] diff --git a/src/platform/device.gni b/src/platform/device.gni index 01358d4880f876..6181a33114c613 100644 --- a/src/platform/device.gni +++ b/src/platform/device.gni @@ -225,6 +225,13 @@ declare_args() { build_tv_casting_common_a = false } +declare_args() { + chip_tnc_accepted_acknowledgements = 0 + chip_tnc_accepted_version = 0 + chip_tnc_required_acknowledgements = 0 + chip_tnc_required_version = 0 +} + assert(!chip_disable_platform_kvs || chip_device_platform == "darwin", "Can only disable KVS on some platforms")