Skip to content

Commit 5c59934

Browse files
authored
Move EventLoggingTypes.h and EventHeader.h to be seen by GN (project-chip#32416)
* Move EventHeader and EventLoggingTypes into MessageDef because that seems to be the pimary use * Fix compile and lints * Restyle
1 parent 0b4caea commit 5c59934

26 files changed

+56
-30
lines changed

.github/workflows/lint.yml

-2
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ jobs:
9797
--known-failure app/CommandHandlerInterface.h \
9898
--known-failure app/CommandSenderLegacyCallback.h \
9999
--known-failure app/data-model/ListLargeSystemExtensions.h \
100-
--known-failure app/EventHeader.h \
101-
--known-failure app/EventLoggingTypes.h \
102100
--known-failure app/ReadHandler.h \
103101
--known-failure app/ReadPrepareParams.h \
104102
--known-failure app/reporting/tests/MockReportScheduler.cpp \

examples/chip-tool/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static_library("chip-tool-utils") {
8686
"commands/storage/StorageManagementCommand.cpp",
8787
]
8888

89-
deps = []
89+
deps = [ "${chip_root}/src/app/MessageDef:events" ]
9090

9191
if (config_use_interactive_mode) {
9292
sources += [ "commands/interactive/InteractiveCommands.cpp" ]

examples/chip-tool/commands/clusters/DataModelLogger.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <app-common/zap-generated/cluster-objects.h>
2424
#include <app/ConcreteAttributePath.h>
2525
#include <app/ConcreteCommandPath.h>
26-
#include <app/EventHeader.h>
26+
#include <app/MessageDef/EventHeader.h>
2727
#include <app/MessageDef/StatusIB.h>
2828
#include <app/data-model/DecodableList.h>
2929
#include <commands/common/RemoteDataModelLogger.h>

examples/chip-tool/commands/common/RemoteDataModelLogger.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#include <app/ConcreteAttributePath.h>
2222
#include <app/ConcreteCommandPath.h>
23-
#include <app/EventHeader.h>
23+
#include <app/MessageDef/EventHeader.h>
2424
#include <app/MessageDef/StatusIB.h>
2525
#include <crypto/CHIPCryptoPAL.h>
2626
#include <lib/dnssd/Resolver.h>

src/access/BUILD.gn

+15-4
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,26 @@
1414

1515
import("//build_overrides/chip.gni")
1616

17+
source_set("types") {
18+
sources = [
19+
"AuthMode.h",
20+
"Privilege.h",
21+
"RequestPath.h",
22+
"SubjectDescriptor.h",
23+
]
24+
25+
public_deps = [
26+
"${chip_root}/src/lib/core",
27+
"${chip_root}/src/lib/core:types",
28+
]
29+
}
30+
1731
static_library("access") {
1832
output_name = "libaccess"
1933

2034
sources = [
2135
"AccessControl.cpp",
2236
"AccessControl.h",
23-
"AuthMode.h",
24-
"Privilege.h",
25-
"RequestPath.h",
26-
"SubjectDescriptor.h",
2737
"examples/ExampleAccessControlDelegate.cpp",
2838
"examples/ExampleAccessControlDelegate.h",
2939
"examples/PermissiveAccessControlDelegate.cpp",
@@ -33,6 +43,7 @@ static_library("access") {
3343
cflags = [ "-Wconversion" ]
3444

3545
public_deps = [
46+
":types",
3647
"${chip_root}/src/lib/core",
3748
"${chip_root}/src/lib/core:types",
3849
"${chip_root}/src/lib/support",

src/app/BUILD.gn

+2
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ static_library("interaction-model") {
192192
"reporting/reporting.h",
193193
]
194194

195+
deps = [ "${chip_root}/src/app/MessageDef:events" ]
196+
195197
public_deps = [
196198
":app_config",
197199
":constants",

src/app/EventManagement.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
#pragma once
2828

2929
#include "EventLoggingDelegate.h"
30-
#include "EventLoggingTypes.h"
3130
#include <access/SubjectDescriptor.h>
3231
#include <app/MessageDef/EventDataIB.h>
32+
#include <app/MessageDef/EventLoggingTypes.h>
3333
#include <app/MessageDef/StatusIB.h>
3434
#include <app/util/basic-types.h>
3535
#include <lib/core/TLVCircularBuffer.h>

src/app/MessageDef/BUILD.gn

+13
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@
1313
# limitations under the License.
1414
import("//build_overrides/chip.gni")
1515

16+
source_set("events") {
17+
sources = [
18+
"EventHeader.h",
19+
"EventLoggingTypes.h",
20+
]
21+
22+
deps = [
23+
"${chip_root}/src/access:types",
24+
"${chip_root}/src/app:paths",
25+
]
26+
}
27+
1628
source_set("MessageDef") {
1729
sources = [
1830
"ArrayBuilder.cpp",
@@ -112,6 +124,7 @@ source_set("MessageDef") {
112124
]
113125

114126
deps = [
127+
":events",
115128
"${chip_root}/src/app:app_config",
116129
"${chip_root}/src/app:constants",
117130
"${chip_root}/src/app:paths",

src/app/MessageDef/EventDataIB.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
#include "StructBuilder.h"
2828
#include "StructParser.h"
2929
#include <app/AppConfig.h>
30-
#include <app/EventHeader.h>
31-
#include <app/EventLoggingTypes.h>
30+
#include <app/MessageDef/EventHeader.h>
31+
#include <app/MessageDef/EventLoggingTypes.h>
3232
#include <app/util/basic-types.h>
3333
#include <lib/core/CHIPCore.h>
3434
#include <lib/core/TLV.h>

src/app/EventHeader.h src/app/MessageDef/EventHeader.h

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

1919
#pragma once
2020

21-
#include "ConcreteEventPath.h"
2221
#include "EventLoggingTypes.h"
22+
23+
#include <app/ConcreteEventPath.h>
2324
#include <app/util/basic-types.h>
2425

2526
namespace chip {
File renamed without changes.

src/app/ReadClient.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
#include <app/AppConfig.h>
2828
#include <app/AttributePathParams.h>
2929
#include <app/ConcreteAttributePath.h>
30-
#include <app/EventHeader.h>
3130
#include <app/EventPathParams.h>
31+
#include <app/MessageDef/EventHeader.h>
3232
#include <app/MessageDef/ReadRequestMessage.h>
3333
#include <app/MessageDef/StatusIB.h>
3434
#include <app/MessageDef/StatusResponseMessage.h>

src/app/common/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ static_library("cluster-objects") {
4848
public_deps = [
4949
":ids",
5050
"${chip_root}/src/app:paths",
51+
"${chip_root}/src/app/MessageDef:events",
5152
"${chip_root}/src/app/data-model",
5253
"${chip_root}/src/app/util:types",
5354
"${chip_root}/src/lib/core",

src/app/tests/TestEventLogging.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424

2525
#include <access/SubjectDescriptor.h>
2626
#include <app/EventLoggingDelegate.h>
27-
#include <app/EventLoggingTypes.h>
2827
#include <app/EventManagement.h>
2928
#include <app/InteractionModelEngine.h>
29+
#include <app/MessageDef/EventLoggingTypes.h>
3030
#include <app/tests/AppTestContext.h>
3131
#include <lib/core/CHIPCore.h>
3232
#include <lib/core/ErrorStr.h>

src/app/tests/TestEventLoggingNoUTCTime.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323

2424
#include <access/SubjectDescriptor.h>
2525
#include <app/EventLoggingDelegate.h>
26-
#include <app/EventLoggingTypes.h>
2726
#include <app/EventManagement.h>
2827
#include <app/InteractionModelEngine.h>
28+
#include <app/MessageDef/EventLoggingTypes.h>
2929
#include <app/tests/AppTestContext.h>
3030
#include <lib/core/CHIPCore.h>
3131
#include <lib/core/ErrorStr.h>

src/app/tests/TestEventOverflow.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
*/
2424

2525
#include <app/EventLoggingDelegate.h>
26-
#include <app/EventLoggingTypes.h>
2726
#include <app/EventManagement.h>
2827
#include <app/InteractionModelEngine.h>
28+
#include <app/MessageDef/EventLoggingTypes.h>
2929
#include <app/tests/AppTestContext.h>
3030
#include <lib/core/CHIPCore.h>
3131
#include <lib/core/ErrorStr.h>

src/app/tests/TestFabricScopedEventLogging.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424

2525
#include <access/SubjectDescriptor.h>
2626
#include <app/EventLoggingDelegate.h>
27-
#include <app/EventLoggingTypes.h>
2827
#include <app/EventManagement.h>
2928
#include <app/InteractionModelEngine.h>
29+
#include <app/MessageDef/EventLoggingTypes.h>
3030
#include <app/tests/AppTestContext.h>
3131
#include <lib/core/CHIPCore.h>
3232
#include <lib/core/ErrorStr.h>

src/app/tests/integration/MockEvents.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
#include "MockEvents.h"
2727
#include "common.h"
28-
#include <app/EventLoggingTypes.h>
2928
#include <app/EventManagement.h>
29+
#include <app/MessageDef/EventLoggingTypes.h>
3030
#include <lib/core/ErrorStr.h>
3131
#include <platform/CHIPDeviceLayer.h>
3232
#include <protocols/secure_channel/PASESession.h>

src/app/zap-templates/templates/app/cluster-objects.zapt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <app/data-model/List.h>
99
#include <app/data-model/NullObject.h>
1010
#include <app/ConcreteAttributePath.h>
11-
#include <app/EventLoggingTypes.h>
11+
#include <app/MessageDef/EventLoggingTypes.h>
1212
#include <app/util/basic-types.h>
1313
#include <lib/core/ClusterEnums.h>
1414
#include <lib/support/BitMask.h>

src/controller/java/AndroidCallbacks.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <controller/java/CHIPAttributeTLVValueDecoder.h>
2222
#include <controller/java/CHIPEventTLVValueDecoder.h>
2323
#endif
24-
#include <app/EventLoggingTypes.h>
24+
#include <app/MessageDef/EventLoggingTypes.h>
2525
#include <jni.h>
2626
#include <lib/core/ErrorStr.h>
2727
#include <lib/support/CHIPJNIError.h>

src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
#include <app/ConcreteCommandPath.h>
2424
#include <app/ConcreteEventPath.h>
2525
#include <app/DeviceProxy.h>
26-
#include <app/EventHeader.h>
27-
#include <app/EventLoggingTypes.h>
2826
#include <app/EventPathParams.h>
27+
#include <app/MessageDef/EventHeader.h>
28+
#include <app/MessageDef/EventLoggingTypes.h>
2929
#include <lib/core/CHIPVendorIdentifiers.hpp>
3030
#include <lib/core/TLVTags.h>
3131
#include <system/SystemPacketBuffer.h>

src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <app/BufferedReadCallback.h>
2323
#include <app/ClusterStateCache.h>
2424
#include <app/ConcreteAttributePath.h>
25-
#include <app/EventHeader.h>
25+
#include <app/MessageDef/EventHeader.h>
2626
#include <app/MessageDef/StatusIB.h>
2727
#include <app/ReadClient.h>
2828
#include <app/ReadPrepareParams.h>

src/darwin/Framework/CHIP/MTREventTLVValueDecoder_Internal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#import <Foundation/Foundation.h>
2222

2323
#include <app/ConcreteAttributePath.h>
24-
#include <app/EventLoggingTypes.h>
24+
#include <app/MessageDef/EventLoggingTypes.h>
2525
#include <lib/core/CHIPError.h>
2626
#include <lib/core/TLV.h>
2727

src/darwin/Framework/CHIP/templates/MTREventTLVValueDecoder-src.zapt

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#include <app-common/zap-generated/ids/Attributes.h>
1313
#include <app-common/zap-generated/ids/Events.h>
1414
#include <app-common/zap-generated/ids/Clusters.h>
15-
#include <app/EventHeader.h>
16-
#include <app/EventLoggingTypes.h>
15+
#include <app/MessageDef/EventHeader.h>
16+
#include <app/MessageDef/EventLoggingTypes.h>
1717
#include <lib/support/TypeTraits.h>
1818

1919
using namespace chip;

src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zzz_generated/app-common/app-common/zap-generated/cluster-objects.h

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)