From fd9ddb1939e6d235bc1ad4616971045d5f97ace8 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 2 Feb 2024 20:16:04 -0500 Subject: [PATCH] Add SessionParameters to gn. (#31876) * Move SessionParameters inside messaging configurations * Add extra dependency * Restyle --- src/lib/dnssd/BUILD.gn | 2 +- src/messaging/BUILD.gn | 14 ++++++++++---- .../SessionParameters.h | 0 src/protocols/secure_channel/CASESession.cpp | 2 +- src/protocols/secure_channel/PASESession.cpp | 2 +- src/protocols/secure_channel/PairingSession.h | 2 +- src/transport/Session.h | 2 +- 7 files changed, 15 insertions(+), 9 deletions(-) rename src/{protocols/secure_channel => messaging}/SessionParameters.h (100%) diff --git a/src/lib/dnssd/BUILD.gn b/src/lib/dnssd/BUILD.gn index 584a30b9fc680a..1561a395aa28f9 100644 --- a/src/lib/dnssd/BUILD.gn +++ b/src/lib/dnssd/BUILD.gn @@ -27,7 +27,7 @@ static_library("dnssd") { "${chip_root}/src/crypto", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", - "${chip_root}/src/messaging:messaging_mrp_config", + "${chip_root}/src/messaging:configurations", ] sources = [ diff --git a/src/messaging/BUILD.gn b/src/messaging/BUILD.gn index b2c053f70a28c6..a170d625111a06 100644 --- a/src/messaging/BUILD.gn +++ b/src/messaging/BUILD.gn @@ -33,10 +33,16 @@ if (chip_config_resolve_peer_on_first_transmit_failure != "") { defines += [ "CHIP_CONFIG_RESOLVE_PEER_ON_FIRST_TRANSMIT_FAILURE=${chip_config_resolve_peer_on_first_transmit_failure}" ] } -source_set("messaging_mrp_config") { - sources = [ "ReliableMessageProtocolConfig.h" ] +source_set("configurations") { + sources = [ + "ReliableMessageProtocolConfig.h", + "SessionParameters.h", + ] - public_deps = [ "${chip_root}/src/system" ] + public_deps = [ + "${chip_root}/src/lib/core", + "${chip_root}/src/system", + ] } static_library("messaging") { @@ -67,7 +73,7 @@ static_library("messaging") { cflags = [ "-Wconversion" ] public_deps = [ - ":messaging_mrp_config", + ":configurations", "${chip_root}/src/app/icd/server:icd-server-config", "${chip_root}/src/crypto", "${chip_root}/src/inet", diff --git a/src/protocols/secure_channel/SessionParameters.h b/src/messaging/SessionParameters.h similarity index 100% rename from src/protocols/secure_channel/SessionParameters.h rename to src/messaging/SessionParameters.h diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 1d6cb27138a496..ee8feaefb5f93d 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -37,11 +37,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include diff --git a/src/protocols/secure_channel/PASESession.cpp b/src/protocols/secure_channel/PASESession.cpp index 980a30de79ec1e..95fb9c89c7432e 100644 --- a/src/protocols/secure_channel/PASESession.cpp +++ b/src/protocols/secure_channel/PASESession.cpp @@ -39,9 +39,9 @@ #include #include #include +#include #include #include -#include #include #include #include diff --git a/src/protocols/secure_channel/PairingSession.h b/src/protocols/secure_channel/PairingSession.h index ffbb6d9966485d..e8849822de57e1 100644 --- a/src/protocols/secure_channel/PairingSession.h +++ b/src/protocols/secure_channel/PairingSession.h @@ -28,9 +28,9 @@ #include #include #include +#include #include #include -#include #include #include #include diff --git a/src/transport/Session.h b/src/transport/Session.h index f211a610386bf2..0b6048d5c077c0 100644 --- a/src/transport/Session.h +++ b/src/transport/Session.h @@ -25,8 +25,8 @@ #include #include #include +#include #include -#include #include namespace chip {