Skip to content

Commit d618ccb

Browse files
authored
Remove dependency between DataModel::Provider and CommandHandlerInterface (#37747)
This splits out the CHI to be separate from command handlers and keep the command handler as a stand-alone item.
1 parent d09d176 commit d618ccb

File tree

5 files changed

+24
-3
lines changed

5 files changed

+24
-3
lines changed

src/app/AttributePathExpandIterator.h

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <lib/core/DataModelTypes.h>
2626
#include <lib/support/LinkedList.h>
2727
#include <lib/support/Span.h>
28+
#include <messaging/ExchangeContext.h>
2829

2930
#include <limits>
3031

src/app/BUILD.gn

+18-1
Original file line numberDiff line numberDiff line change
@@ -362,20 +362,37 @@ source_set("status-response") {
362362
]
363363
}
364364

365-
source_set("command-handler-interface") {
365+
source_set("command-handler") {
366366
sources = [
367367
"CommandHandler.cpp",
368368
"CommandHandler.h",
369+
]
370+
371+
public_deps = [
372+
":paths",
373+
"${chip_root}/src/access:types",
374+
"${chip_root}/src/app/data-model",
375+
"${chip_root}/src/lib/core",
376+
"${chip_root}/src/lib/support",
377+
"${chip_root}/src/messaging",
378+
"${chip_root}/src/protocols/interaction_model",
379+
]
380+
}
381+
382+
source_set("command-handler-interface") {
383+
sources = [
369384
"CommandHandlerExchangeInterface.h",
370385
"CommandHandlerInterface.h",
371386
"CommandHandlerInterfaceRegistry.cpp",
372387
"CommandHandlerInterfaceRegistry.h",
373388
]
374389

375390
public_deps = [
391+
":command-handler",
376392
":paths",
377393
"${chip_root}/src/access:types",
378394
"${chip_root}/src/app/data-model",
395+
"${chip_root}/src/app/data-model-provider",
379396
"${chip_root}/src/lib/core",
380397
"${chip_root}/src/lib/support",
381398
"${chip_root}/src/messaging",

src/app/CommandHandler.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
*/
1818
#pragma once
1919

20-
#include <app/CommandHandlerExchangeInterface.h>
20+
#include <access/SubjectDescriptor.h>
2121
#include <app/ConcreteCommandPath.h>
2222
#include <app/data-model/EncodableToTLV.h>
2323
#include <app/data-model/Encode.h>
2424
#include <lib/core/CHIPCore.h>
2525
#include <lib/support/CodeUtils.h>
2626
#include <lib/support/IntrusiveList.h>
2727
#include <lib/support/logging/CHIPLogging.h>
28+
#include <messaging/ExchangeContext.h>
2829
#include <protocols/interaction_model/StatusCode.h>
2930

3031
namespace chip {

src/app/CommandHandlerImpl.h

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
#include <app/CommandHandler.h>
2020

21+
#include <app/CommandHandlerExchangeInterface.h>
22+
#include <app/CommandHandlerInterface.h>
2123
#include <app/CommandPathRegistry.h>
2224
#include <app/MessageDef/InvokeRequestMessage.h>
2325
#include <app/MessageDef/InvokeResponseMessage.h>

src/app/data-model-provider/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ source_set("data-model-provider") {
4545
public_deps = [
4646
":metadata",
4747
"${chip_root}/src/app:attribute-access",
48-
"${chip_root}/src/app:command-handler-interface",
48+
"${chip_root}/src/app:command-handler",
4949
"${chip_root}/src/app:events",
5050
"${chip_root}/src/app:paths",
5151
"${chip_root}/src/app/MessageDef",

0 commit comments

Comments
 (0)