diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index f7340a3fb3f00b..a4e87b7bacfc1c 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -66,6 +66,8 @@ static_library("chip-tool-utils") { # TODO - enable CommissionedListCommand once DNS Cache is implemented # "commands/pairing/CommissionedListCommand.cpp", # "commands/pairing/CommissionedListCommand.h", + "${chip_root}/src/controller/ExamplePersistentStorage.cpp", + "${chip_root}/src/controller/ExamplePersistentStorage.h", "commands/pairing/CloseSessionCommand.cpp", "commands/pairing/CloseSessionCommand.h", "commands/pairing/OpenCommissioningWindowCommand.cpp", @@ -75,7 +77,6 @@ static_library("chip-tool-utils") { "commands/payload/SetupPayloadParseCommand.cpp", "commands/payload/SetupPayloadVerhoeff.cpp", "commands/storage/StorageManagementCommand.cpp", - "config/PersistentStorage.cpp", ] deps = [] diff --git a/examples/chip-tool/commands/clusters/ModelCommand.h b/examples/chip-tool/commands/clusters/ModelCommand.h index 3a20da0e182f7c..8c9cd7b1e3586b 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.h +++ b/examples/chip-tool/commands/clusters/ModelCommand.h @@ -19,7 +19,7 @@ #pragma once #ifdef CONFIG_USE_LOCAL_STORAGE -#include "../../config/PersistentStorage.h" +#include #endif // CONFIG_USE_LOCAL_STORAGE #include "../common/CHIPCommand.h" diff --git a/examples/chip-tool/commands/common/CHIPCommand.h b/examples/chip-tool/commands/common/CHIPCommand.h index 009cfbdead1b19..1b5b3690ea3ee6 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.h +++ b/examples/chip-tool/commands/common/CHIPCommand.h @@ -19,7 +19,7 @@ #pragma once #ifdef CONFIG_USE_LOCAL_STORAGE -#include "../../config/PersistentStorage.h" +#include #endif // CONFIG_USE_LOCAL_STORAGE #include "Command.h" diff --git a/examples/chip-tool/commands/common/Commands.h b/examples/chip-tool/commands/common/Commands.h index a39c984954777e..57475b1c027087 100644 --- a/examples/chip-tool/commands/common/Commands.h +++ b/examples/chip-tool/commands/common/Commands.h @@ -19,7 +19,7 @@ #pragma once #ifdef CONFIG_USE_LOCAL_STORAGE -#include "../../config/PersistentStorage.h" +#include #endif // CONFIG_USE_LOCAL_STORAGE #include "Command.h" diff --git a/examples/chip-tool/commands/discover/DiscoverCommand.h b/examples/chip-tool/commands/discover/DiscoverCommand.h index fb0dc6bfd6d395..dadafc080639f2 100644 --- a/examples/chip-tool/commands/discover/DiscoverCommand.h +++ b/examples/chip-tool/commands/discover/DiscoverCommand.h @@ -18,8 +18,8 @@ #pragma once -#include "../../config/PersistentStorage.h" #include "../common/CHIPCommand.h" +#include class DiscoverCommand : public CHIPCommand { diff --git a/examples/chip-tool/commands/pairing/CommissionedListCommand.h b/examples/chip-tool/commands/pairing/CommissionedListCommand.h index 6d04f93b452f4e..ca63c553c409bd 100644 --- a/examples/chip-tool/commands/pairing/CommissionedListCommand.h +++ b/examples/chip-tool/commands/pairing/CommissionedListCommand.h @@ -18,8 +18,8 @@ #pragma once -#include "../../config/PersistentStorage.h" #include "../common/Command.h" +#include class CommissionedListCommand : public Command { diff --git a/examples/chip-tool/commands/storage/StorageManagementCommand.cpp b/examples/chip-tool/commands/storage/StorageManagementCommand.cpp index 767e11c66cddf4..b16aac917c9fab 100644 --- a/examples/chip-tool/commands/storage/StorageManagementCommand.cpp +++ b/examples/chip-tool/commands/storage/StorageManagementCommand.cpp @@ -16,7 +16,7 @@ * */ -#include "../../config/PersistentStorage.h" +#include #include "StorageManagementCommand.h" diff --git a/examples/tv-casting-app/tv-casting-common/BUILD.gn b/examples/tv-casting-app/tv-casting-common/BUILD.gn index 179fa86602367a..37572da1d394e4 100644 --- a/examples/tv-casting-app/tv-casting-common/BUILD.gn +++ b/examples/tv-casting-app/tv-casting-common/BUILD.gn @@ -43,6 +43,8 @@ chip_data_model("tv-casting-common") { "${chip_root}/examples/chip-tool/commands/common/Commands.cpp", "${chip_root}/examples/chip-tool/commands/common/Commands.h", "${chip_root}/examples/chip-tool/commands/common/CredentialIssuerCommands.h", + "${chip_root}/src/controller/ExamplePersistentStorage.cpp", + "${chip_root}/src/controller/ExamplePersistentStorage.h", "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp", "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp", "commands/clusters/ModelCommand.cpp", @@ -80,6 +82,7 @@ chip_data_model("tv-casting-common") { deps = [ "${chip_root}/src/app/tests/suites/commands/interaction_model", + "${chip_root}/third_party/inipp", "${chip_root}/third_party/jsoncpp", ] diff --git a/scripts/tools/check_includes_config.py b/scripts/tools/check_includes_config.py index 9cc5f519a94f24..511c8d8b56110c 100644 --- a/scripts/tools/check_includes_config.py +++ b/scripts/tools/check_includes_config.py @@ -152,4 +152,6 @@ # Not really for embedded consumers; uses std::queue to keep track # of a list of discovered things. 'src/controller/SetUpCodePairer.h': {'queue'}, + + 'src/controller/ExamplePersistentStorage.cpp': {'fstream'} } diff --git a/examples/chip-tool/config/PersistentStorage.cpp b/src/controller/ExamplePersistentStorage.cpp similarity index 99% rename from examples/chip-tool/config/PersistentStorage.cpp rename to src/controller/ExamplePersistentStorage.cpp index 62cf6efdfbd890..e4b8188780b816 100644 --- a/examples/chip-tool/config/PersistentStorage.cpp +++ b/src/controller/ExamplePersistentStorage.cpp @@ -15,7 +15,7 @@ * limitations under the License. * */ -#include "PersistentStorage.h" +#include "ExamplePersistentStorage.h" #include #include diff --git a/examples/chip-tool/config/PersistentStorage.h b/src/controller/ExamplePersistentStorage.h similarity index 100% rename from examples/chip-tool/config/PersistentStorage.h rename to src/controller/ExamplePersistentStorage.h diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index 3a2d40492f62fa..d7c68afd518800 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -49,7 +49,12 @@ shared_library("jni") { "zap-generated/CHIPReadCallbacks.cpp", "zap-generated/CHIPReadCallbacks.h", ] - + if (build_java_matter_controller) { + sources += [ + "${chip_root}/src/controller/ExamplePersistentStorage.cpp", + "${chip_root}/src/controller/ExamplePersistentStorage.h", + ] + } deps = [ "${chip_root}/src/controller/data_model", "${chip_root}/src/controller/data_model:java-jni-sources",