Skip to content

Commit 660c928

Browse files
andy31415andreilitvin
andauthoredApr 4, 2024
Move declarations from af.h into the corresponding storage/table/... headers (project-chip#32776)
* move emberAfLocateAttributeMetadata to attribute-storage.h as it is implemented in attribute-storage.cpp * Move more methods * Global endpoints extern should not exist * move more things * restyle * Move the last bits from af.h into the corresponding headers. Remove af.h (this will cause compile issues) * Remove all references to af.h * Restyle and zap regen * All-clusters now compiles on linux * Fix ota requester compile * Make tests compile * Restyle * Fix lint.yml: af.h does not exist anymore * Fix door lock compile * Ensure everything using emberAfEndpointEnableDisable includes endpoint-config-api * Fix emberAfContainsServer include needs * Include attribute-storage.h whenever kEmberinvalidEndpointIndex is defined * Include attribute-storage.h whenever kEmberinvalidEndpointIndex is used * Fix linter * Another lint cleanup * Fix all includes referencing EnabledEndpointsWithServerCluster * Restyle * Fix andorid tv compile * Fix linter complain: application basic delegate was already stl-bound, add string as well * Fix Attributes.h using emberAfWriteAttribute * Fix dependencies on AccountLogingManager ... needs config to access SERVER_ENDPOINT_COUNT * Add a lot of includes for std::string where std::string is used * Fix checkincludes * Fix one more build * Zap regen ... some string adds were in generated code * make android compile: fix dynamic server dependencies on attribute-storage.h * Refactor a bit to make gn linter happy * Restyle * Split out attribute-storage/table into a -detail and non-detail header * Restyle * Fix lint typo * Make tv app compile: need dynamic endpoints defines accessible * Restyle * Remove code from storage-detail * Fix code again: FIXED_ENDPOINT_COUNT must be defined, so config has to be included * More includes to make compile work. At least now boufallolab compiles * Fix linux builds ... apparently mock attribute storage is a copy & paste ... this is probably not good... * Direct include of endpoint_config in attribute-storage.h * Minor comment update: alignment and fix typo * Some code review comments --------- Co-authored-by: Andrei Litvin <andreilitvin@google.com>
1 parent 4cfde10 commit 660c928

File tree

382 files changed

+876
-613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

382 files changed

+876
-613
lines changed
 

‎.github/workflows/lint.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,12 @@ jobs:
101101
--known-failure app/reporting/tests/MockReportScheduler.cpp \
102102
--known-failure app/reporting/tests/MockReportScheduler.h \
103103
--known-failure app/TestEventTriggerDelegate.h \
104-
--known-failure app/util/af.h \
105104
--known-failure app/util/attribute-storage.cpp \
106105
--known-failure app/util/attribute-storage.h \
106+
--known-failure app/util/attribute-storage-detail.h \
107107
--known-failure app/util/attribute-table.cpp \
108108
--known-failure app/util/attribute-table.h \
109+
--known-failure app/util/attribute-table-detail.h \
109110
--known-failure app/util/binding-table.cpp \
110111
--known-failure app/util/binding-table.h \
111112
--known-failure app/util/config.h \
@@ -253,7 +254,7 @@ jobs:
253254
- name: Check for use of 'emberAfReadAttribute' instead of the type-safe getters
254255
if: always()
255256
run: |
256-
git grep -I -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0
257+
git grep -I -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/attribute-table.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0
257258
258259
# git grep exits with 0 if it finds a match, but we want
259260
# to fail (exit nonzero) on match. And we want to exclude this file,
@@ -263,7 +264,7 @@ jobs:
263264
- name: Check for use of 'emberAfWriteAttribute' instead of the type-safe setters
264265
if: always()
265266
run: |
266-
git grep -I -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0
267+
git grep -I -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0
267268
268269
# Run ruff python linter
269270
- name: Check for errors using ruff Python linter

‎examples/air-purifier-app/ameba/main/DeviceCallbacks.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <app-common/zap-generated/ids/Clusters.h>
3030
#include <app/CommandHandler.h>
3131
#include <app/server/Dnssd.h>
32-
#include <app/util/af.h>
3332
#include <app/util/basic-types.h>
3433
#include <app/util/util.h>
3534
#include <lib/dnssd/Advertiser.h>

0 commit comments

Comments
 (0)