Skip to content

Commit

Permalink
wip: integrating checks into general commissioning server
Browse files Browse the repository at this point in the history
  • Loading branch information
swan-amazon committed May 2, 2024
1 parent 1a7dad5 commit 154ad8f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 18 additions & 0 deletions src/include/platform/CHIPDeviceConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
4 changes: 4 additions & 0 deletions src/lib/core/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down
7 changes: 7 additions & 0 deletions src/platform/device.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 154ad8f

Please sign in to comment.