Skip to content

Commit 3ebfbcf

Browse files
authored
Mass renames. (project-chip#33847)
1 parent 3058c4b commit 3ebfbcf

19 files changed

+38
-37
lines changed

src/BUILD.gn

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ if (chip_build_tests) {
5555
chip_test_group("tests") {
5656
deps = []
5757
tests = [
58-
"${chip_root}/src/app/codegen-interaction-model/tests",
59-
"${chip_root}/src/app/interaction-model/tests",
58+
"${chip_root}/src/app/codegen-data-model/tests",
59+
"${chip_root}/src/app/data-model-interface/tests",
6060
"${chip_root}/src/access/tests",
6161
"${chip_root}/src/crypto/tests",
6262
"${chip_root}/src/inet/tests",
File renamed without changes.

src/app/codegen-interaction-model/CodegenDataModel.cpp src/app/codegen-data-model/CodegenDataModel.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
#include <app/codegen-interaction-model/CodegenDataModel.h>
17+
#include <app/codegen-data-model/CodegenDataModel.h>
1818

1919
#include <app-common/zap-generated/attribute-type.h>
2020
#include <app/RequiredPrivilege.h>

src/app/codegen-interaction-model/CodegenDataModel.h src/app/codegen-data-model/CodegenDataModel.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
#pragma once
1818

19-
#include <app/interaction-model/Model.h>
19+
#include <app/data-model-interface/DataModel.h>
2020

2121
#include <app/util/af-types.h>
2222

@@ -35,7 +35,7 @@ namespace app {
3535
/// Given that this relies on global data at link time, there generally can be
3636
/// only one CodegenDataModel per application (you can create more instances,
3737
/// however they would share the exact same underlying data and storage).
38-
class CodegenDataModel : public chip::app::InteractionModel::Model
38+
class CodegenDataModel : public chip::app::InteractionModel::DataModel
3939
{
4040
private:
4141
/// Ember commands are stored as a `CommandId *` pointer that is either null (i.e. no commands)

src/app/codegen-interaction-model/model.gni src/app/codegen-data-model/model.gni

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ import("//build_overrides/chip.gni")
2525
# be cleanly built as a stand-alone and instead have to be imported as part of
2626
# a different data model or compilation unit.
2727
codegen_interaction_model_SOURCES = [
28-
"${chip_root}/src/app/codegen-interaction-model/CodegenDataModel.h",
29-
"${chip_root}/src/app/codegen-interaction-model/CodegenDataModel.cpp",
28+
"${chip_root}/src/app/codegen-data-model/CodegenDataModel.h",
29+
"${chip_root}/src/app/codegen-data-model/CodegenDataModel.cpp",
3030
]
3131

3232
codegen_interaction_model_PUBLIC_DEPS = [
3333
"${chip_root}/src/app/common:attribute-type",
34-
"${chip_root}/src/app/interaction-model",
34+
"${chip_root}/src/app/data-model-interface",
3535
]

src/app/codegen-interaction-model/tests/BUILD.gn src/app/codegen-data-model/tests/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
import("//build_overrides/chip.gni")
1515
import("${chip_root}/build/chip/chip_test_suite.gni")
16-
import("${chip_root}/src/app/codegen-interaction-model/model.gni")
16+
import("${chip_root}/src/app/codegen-data-model/model.gni")
1717

1818
source_set("mock_model") {
1919
sources = codegen_interaction_model_SOURCES

src/app/codegen-interaction-model/tests/TestCodegenModelViaMocks.cpp src/app/codegen-data-model/tests/TestCodegenModelViaMocks.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
#include <app/codegen-interaction-model/CodegenDataModel.h>
18+
#include <app/codegen-data-model/CodegenDataModel.h>
1919

2020
#include <app/util/mock/Constants.h>
2121
#include <app/util/mock/Functions.h>

src/app/interaction-model/BUILD.gn src/app/data-model-interface/BUILD.gn

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

16-
source_set("interaction-model") {
16+
source_set("data-model-interface") {
1717
sources = [
1818
"ActionContext.h",
1919
"Context.h",
20-
"Events.h",
20+
"DataModel.h",
21+
"DataModelChangeListener.h",
22+
"EventsGenerator.h",
2123
"InvokeResponder.h",
2224
"MetadataTypes.cpp",
2325
"MetadataTypes.h",
24-
"Model.h",
2526
"OperationTypes.h",
26-
"Paths.h",
2727
]
2828

2929
public_deps = [

src/app/interaction-model/Context.h src/app/data-model-interface/Context.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
*/
1717
#pragma once
1818

19-
#include <app/interaction-model/ActionContext.h>
20-
#include <app/interaction-model/Events.h>
21-
#include <app/interaction-model/Paths.h>
19+
#include <app/data-model-interface/ActionContext.h>
20+
#include <app/data-model-interface/DataModelChangeListener.h>
21+
#include <app/data-model-interface/EventsGenerator.h>
2222

2323
namespace chip {
2424
namespace app {
@@ -31,8 +31,8 @@ namespace InteractionModel {
3131
/// as well as fetching current state (via actionContext)
3232
struct InteractionModelContext
3333
{
34-
Events * events;
35-
Paths * paths;
34+
EventsGenerator * eventsGenerator;
35+
DataModelChangeListener * dataModelChangeListener;
3636
ActionContext * actionContext;
3737
};
3838

src/app/interaction-model/Model.h src/app/data-model-interface/DataModel.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
#include <app/AttributeValueDecoder.h>
2323
#include <app/AttributeValueEncoder.h>
2424

25-
#include <app/interaction-model/Context.h>
26-
#include <app/interaction-model/InvokeResponder.h>
27-
#include <app/interaction-model/MetadataTypes.h>
28-
#include <app/interaction-model/OperationTypes.h>
25+
#include <app/data-model-interface/Context.h>
26+
#include <app/data-model-interface/InvokeResponder.h>
27+
#include <app/data-model-interface/MetadataTypes.h>
28+
#include <app/data-model-interface/OperationTypes.h>
2929

3030
namespace chip {
3131
namespace app {
@@ -38,10 +38,10 @@ namespace InteractionModel {
3838
/// thread or equivalent
3939
/// - class is allowed to attempt to cache indexes/locations for faster
4040
/// lookups of things (e.g during iterations)
41-
class Model : public DataModelMetadataTree
41+
class DataModel : public DataModelMetadataTree
4242
{
4343
public:
44-
virtual ~Model() = default;
44+
virtual ~DataModel() = default;
4545

4646
// `context` pointers will be guaranteed valid until Shutdown is called()
4747
virtual CHIP_ERROR Startup(InteractionModelContext context)

src/app/interaction-model/Paths.h src/app/data-model-interface/DataModelChangeListener.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,19 @@ namespace chip {
2222
namespace app {
2323
namespace InteractionModel {
2424

25-
/// Notification listener for attribute changes.
25+
/// Notification listener for changes of the underlying data in a
26+
/// data model.
2627
///
2728
/// Used to notify that a specific attribute path (or several attributes
2829
/// via wildcards) have changed their underlying content.
2930
///
3031
/// Methods on this class MUST be called from within the matter
3132
/// main loop as they will likely trigger interaction model
3233
/// internal updates and subscription data reporting.
33-
class Paths
34+
class DataModelChangeListener
3435
{
3536
public:
36-
virtual ~Paths() = 0;
37+
virtual ~DataModelChangeListener() = 0;
3738

3839
/// Mark all attributes matching the given path (which may be a wildcard) dirty.
3940
///

src/app/interaction-model/Events.h src/app/data-model-interface/EventsGenerator.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ std::optional<EventNumber> GenerateEvent(G & generator, const T & aEventData, En
104104

105105
} // namespace internal
106106

107-
/// Exposes event access capabilities.
107+
/// Exposes event generation capabilities.
108108
///
109109
/// Allows callers to "generate events" which effectively notifies of an event having
110110
/// ocurred.
111-
class Events
111+
class EventsGenerator
112112
{
113113
public:
114-
virtual ~Events() = default;
114+
virtual ~EventsGenerator() = default;
115115

116116
/// Generates the given event.
117117
///

src/app/interaction-model/MetadataTypes.cpp src/app/data-model-interface/MetadataTypes.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
#include <app/interaction-model/MetadataTypes.h>
17+
#include <app/data-model-interface/MetadataTypes.h>
1818

1919
namespace chip {
2020
namespace app {

src/app/interaction-model/tests/BUILD.gn src/app/data-model-interface/tests/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ chip_test_suite("tests") {
2121

2222
cflags = [ "-Wconversion" ]
2323

24-
public_deps = [ "${chip_root}/src/app/interaction-model" ]
24+
public_deps = [ "${chip_root}/src/app/data-model-interface" ]
2525
}

src/app/interaction-model/tests/TestEventEmitting.cpp src/app/data-model-interface/tests/TestEventEmitting.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
*/
1818

1919
#include <app-common/zap-generated/cluster-objects.h>
20+
#include <app/data-model-interface/EventsGenerator.h>
2021
#include <app/data-model/Decode.h>
21-
#include <app/interaction-model/Events.h>
2222
#include <lib/support/CodeUtils.h>
2323

2424
#include <gtest/gtest.h>
@@ -36,7 +36,7 @@ constexpr uint32_t kFakeSoftwareVersion = 0x1234abcd;
3636

3737
/// Keeps the "last event" in-memory to allow tests to validate
3838
/// that event writing and encoding worked.
39-
class LogOnlyEvents : public Events
39+
class LogOnlyEvents : public EventsGenerator
4040
{
4141
public:
4242
CHIP_ERROR GenerateEvent(EventLoggingDelegate * eventContentWriter, const EventOptions & options,
@@ -96,7 +96,7 @@ class LogOnlyEvents : public Events
9696
TEST(TestInteractionModelEventEmitting, TestBasicType)
9797
{
9898
LogOnlyEvents logOnlyEvents;
99-
Events * events = &logOnlyEvents;
99+
EventsGenerator * events = &logOnlyEvents;
100100

101101
StartUpEventType event{ kFakeSoftwareVersion };
102102

@@ -131,7 +131,7 @@ TEST(TestInteractionModelEventEmitting, TestFabricScoped)
131131
static_assert(kTestFabricIndex != kUndefinedFabricIndex);
132132

133133
LogOnlyEvents logOnlyEvents;
134-
Events * events = &logOnlyEvents;
134+
EventsGenerator * events = &logOnlyEvents;
135135

136136
AccessControlEntryChangedType event;
137137
event.adminNodeID = chip::app::DataModel::MakeNullable(kTestNodeId);

0 commit comments

Comments
 (0)