Skip to content

Commit

Permalink
Move EventLoggingTypes.h and EventHeader.h to be seen by GN (#32416)
Browse files Browse the repository at this point in the history
* Move EventHeader and EventLoggingTypes into MessageDef because that seems to be the pimary use

* Fix compile and lints

* Restyle
  • Loading branch information
andy31415 authored Mar 4, 2024
1 parent 0b4caea commit 5c59934
Show file tree
Hide file tree
Showing 26 changed files with 56 additions and 30 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ jobs:
--known-failure app/CommandHandlerInterface.h \
--known-failure app/CommandSenderLegacyCallback.h \
--known-failure app/data-model/ListLargeSystemExtensions.h \
--known-failure app/EventHeader.h \
--known-failure app/EventLoggingTypes.h \
--known-failure app/ReadHandler.h \
--known-failure app/ReadPrepareParams.h \
--known-failure app/reporting/tests/MockReportScheduler.cpp \
Expand Down
2 changes: 1 addition & 1 deletion examples/chip-tool/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static_library("chip-tool-utils") {
"commands/storage/StorageManagementCommand.cpp",
]

deps = []
deps = [ "${chip_root}/src/app/MessageDef:events" ]

if (config_use_interactive_mode) {
sources += [ "commands/interactive/InteractiveCommands.cpp" ]
Expand Down
2 changes: 1 addition & 1 deletion examples/chip-tool/commands/clusters/DataModelLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <app-common/zap-generated/cluster-objects.h>
#include <app/ConcreteAttributePath.h>
#include <app/ConcreteCommandPath.h>
#include <app/EventHeader.h>
#include <app/MessageDef/EventHeader.h>
#include <app/MessageDef/StatusIB.h>
#include <app/data-model/DecodableList.h>
#include <commands/common/RemoteDataModelLogger.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/chip-tool/commands/common/RemoteDataModelLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <app/ConcreteAttributePath.h>
#include <app/ConcreteCommandPath.h>
#include <app/EventHeader.h>
#include <app/MessageDef/EventHeader.h>
#include <app/MessageDef/StatusIB.h>
#include <crypto/CHIPCryptoPAL.h>
#include <lib/dnssd/Resolver.h>
Expand Down
19 changes: 15 additions & 4 deletions src/access/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,26 @@

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

source_set("types") {
sources = [
"AuthMode.h",
"Privilege.h",
"RequestPath.h",
"SubjectDescriptor.h",
]

public_deps = [
"${chip_root}/src/lib/core",
"${chip_root}/src/lib/core:types",
]
}

static_library("access") {
output_name = "libaccess"

sources = [
"AccessControl.cpp",
"AccessControl.h",
"AuthMode.h",
"Privilege.h",
"RequestPath.h",
"SubjectDescriptor.h",
"examples/ExampleAccessControlDelegate.cpp",
"examples/ExampleAccessControlDelegate.h",
"examples/PermissiveAccessControlDelegate.cpp",
Expand All @@ -33,6 +43,7 @@ static_library("access") {
cflags = [ "-Wconversion" ]

public_deps = [
":types",
"${chip_root}/src/lib/core",
"${chip_root}/src/lib/core:types",
"${chip_root}/src/lib/support",
Expand Down
2 changes: 2 additions & 0 deletions src/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ static_library("interaction-model") {
"reporting/reporting.h",
]

deps = [ "${chip_root}/src/app/MessageDef:events" ]

public_deps = [
":app_config",
":constants",
Expand Down
2 changes: 1 addition & 1 deletion src/app/EventManagement.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
#pragma once

#include "EventLoggingDelegate.h"
#include "EventLoggingTypes.h"
#include <access/SubjectDescriptor.h>
#include <app/MessageDef/EventDataIB.h>
#include <app/MessageDef/EventLoggingTypes.h>
#include <app/MessageDef/StatusIB.h>
#include <app/util/basic-types.h>
#include <lib/core/TLVCircularBuffer.h>
Expand Down
13 changes: 13 additions & 0 deletions src/app/MessageDef/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
# limitations under the License.
import("//build_overrides/chip.gni")

source_set("events") {
sources = [
"EventHeader.h",
"EventLoggingTypes.h",
]

deps = [
"${chip_root}/src/access:types",
"${chip_root}/src/app:paths",
]
}

source_set("MessageDef") {
sources = [
"ArrayBuilder.cpp",
Expand Down Expand Up @@ -112,6 +124,7 @@ source_set("MessageDef") {
]

deps = [
":events",
"${chip_root}/src/app:app_config",
"${chip_root}/src/app:constants",
"${chip_root}/src/app:paths",
Expand Down
4 changes: 2 additions & 2 deletions src/app/MessageDef/EventDataIB.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include "StructBuilder.h"
#include "StructParser.h"
#include <app/AppConfig.h>
#include <app/EventHeader.h>
#include <app/EventLoggingTypes.h>
#include <app/MessageDef/EventHeader.h>
#include <app/MessageDef/EventLoggingTypes.h>
#include <app/util/basic-types.h>
#include <lib/core/CHIPCore.h>
#include <lib/core/TLV.h>
Expand Down
3 changes: 2 additions & 1 deletion src/app/EventHeader.h → src/app/MessageDef/EventHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@

#pragma once

#include "ConcreteEventPath.h"
#include "EventLoggingTypes.h"

#include <app/ConcreteEventPath.h>
#include <app/util/basic-types.h>

namespace chip {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/app/ReadClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include <app/AppConfig.h>
#include <app/AttributePathParams.h>
#include <app/ConcreteAttributePath.h>
#include <app/EventHeader.h>
#include <app/EventPathParams.h>
#include <app/MessageDef/EventHeader.h>
#include <app/MessageDef/ReadRequestMessage.h>
#include <app/MessageDef/StatusIB.h>
#include <app/MessageDef/StatusResponseMessage.h>
Expand Down
1 change: 1 addition & 0 deletions src/app/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static_library("cluster-objects") {
public_deps = [
":ids",
"${chip_root}/src/app:paths",
"${chip_root}/src/app/MessageDef:events",
"${chip_root}/src/app/data-model",
"${chip_root}/src/app/util:types",
"${chip_root}/src/lib/core",
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/TestEventLogging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

#include <access/SubjectDescriptor.h>
#include <app/EventLoggingDelegate.h>
#include <app/EventLoggingTypes.h>
#include <app/EventManagement.h>
#include <app/InteractionModelEngine.h>
#include <app/MessageDef/EventLoggingTypes.h>
#include <app/tests/AppTestContext.h>
#include <lib/core/CHIPCore.h>
#include <lib/core/ErrorStr.h>
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/TestEventLoggingNoUTCTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

#include <access/SubjectDescriptor.h>
#include <app/EventLoggingDelegate.h>
#include <app/EventLoggingTypes.h>
#include <app/EventManagement.h>
#include <app/InteractionModelEngine.h>
#include <app/MessageDef/EventLoggingTypes.h>
#include <app/tests/AppTestContext.h>
#include <lib/core/CHIPCore.h>
#include <lib/core/ErrorStr.h>
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/TestEventOverflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
*/

#include <app/EventLoggingDelegate.h>
#include <app/EventLoggingTypes.h>
#include <app/EventManagement.h>
#include <app/InteractionModelEngine.h>
#include <app/MessageDef/EventLoggingTypes.h>
#include <app/tests/AppTestContext.h>
#include <lib/core/CHIPCore.h>
#include <lib/core/ErrorStr.h>
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/TestFabricScopedEventLogging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

#include <access/SubjectDescriptor.h>
#include <app/EventLoggingDelegate.h>
#include <app/EventLoggingTypes.h>
#include <app/EventManagement.h>
#include <app/InteractionModelEngine.h>
#include <app/MessageDef/EventLoggingTypes.h>
#include <app/tests/AppTestContext.h>
#include <lib/core/CHIPCore.h>
#include <lib/core/ErrorStr.h>
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/integration/MockEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

#include "MockEvents.h"
#include "common.h"
#include <app/EventLoggingTypes.h>
#include <app/EventManagement.h>
#include <app/MessageDef/EventLoggingTypes.h>
#include <lib/core/ErrorStr.h>
#include <platform/CHIPDeviceLayer.h>
#include <protocols/secure_channel/PASESession.h>
Expand Down
2 changes: 1 addition & 1 deletion src/app/zap-templates/templates/app/cluster-objects.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <app/data-model/List.h>
#include <app/data-model/NullObject.h>
#include <app/ConcreteAttributePath.h>
#include <app/EventLoggingTypes.h>
#include <app/MessageDef/EventLoggingTypes.h>
#include <app/util/basic-types.h>
#include <lib/core/ClusterEnums.h>
#include <lib/support/BitMask.h>
Expand Down
2 changes: 1 addition & 1 deletion src/controller/java/AndroidCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <controller/java/CHIPAttributeTLVValueDecoder.h>
#include <controller/java/CHIPEventTLVValueDecoder.h>
#endif
#include <app/EventLoggingTypes.h>
#include <app/MessageDef/EventLoggingTypes.h>
#include <jni.h>
#include <lib/core/ErrorStr.h>
#include <lib/support/CHIPJNIError.h>
Expand Down
4 changes: 2 additions & 2 deletions src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
#include <app/ConcreteCommandPath.h>
#include <app/ConcreteEventPath.h>
#include <app/DeviceProxy.h>
#include <app/EventHeader.h>
#include <app/EventLoggingTypes.h>
#include <app/EventPathParams.h>
#include <app/MessageDef/EventHeader.h>
#include <app/MessageDef/EventLoggingTypes.h>
#include <lib/core/CHIPVendorIdentifiers.hpp>
#include <lib/core/TLVTags.h>
#include <system/SystemPacketBuffer.h>
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <app/BufferedReadCallback.h>
#include <app/ClusterStateCache.h>
#include <app/ConcreteAttributePath.h>
#include <app/EventHeader.h>
#include <app/MessageDef/EventHeader.h>
#include <app/MessageDef/StatusIB.h>
#include <app/ReadClient.h>
#include <app/ReadPrepareParams.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#import <Foundation/Foundation.h>

#include <app/ConcreteAttributePath.h>
#include <app/EventLoggingTypes.h>
#include <app/MessageDef/EventLoggingTypes.h>
#include <lib/core/CHIPError.h>
#include <lib/core/TLV.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include <app-common/zap-generated/ids/Attributes.h>
#include <app-common/zap-generated/ids/Events.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/EventHeader.h>
#include <app/EventLoggingTypes.h>
#include <app/MessageDef/EventHeader.h>
#include <app/MessageDef/EventLoggingTypes.h>
#include <lib/support/TypeTraits.h>

using namespace chip;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5c59934

Please sign in to comment.