Skip to content

Commit

Permalink
Remove the now-unused CHIPClusters WriteAttribute* APIs. (#12646)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Jan 12, 2022
1 parent dd63c24 commit 8304739
Show file tree
Hide file tree
Showing 19 changed files with 2 additions and 6,324 deletions.
6 changes: 2 additions & 4 deletions src/app/chip_data_model.gni
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,8 @@ template("chip_data_model") {
}

if (_use_tests_apis) {
sources += [
"${invoker.zap_pregenerated_dir}/tests/CHIPClustersTest.cpp",
"${invoker.zap_pregenerated_dir}/tests/CHIPClustersTest.h",
]
sources +=
[ "${invoker.zap_pregenerated_dir}/tests/CHIPClustersTest.h" ]
}
}

Expand Down
5 changes: 0 additions & 5 deletions src/app/tests/suites/templates/templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
"path": "../../../zap-templates/templates/app/tests/CHIPClustersTest.zapt",
"name": "Tests C++ API Header",
"output": "tests/CHIPClustersTest.h"
},
{
"path": "../../../zap-templates/templates/app/tests/CHIPClusters-src.zapt",
"name": "Tests C++ API",
"output": "tests/CHIPClustersTest.cpp"
}
]
}
12 changes: 0 additions & 12 deletions src/app/zap-templates/templates/app/CHIPClusters-src.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,6 @@ CHIP_ERROR {{asUpperCamelCase parent.name}}Cluster::ReadAttribute{{asUpperCamelC
return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback,{{#if isList}}{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}ListAttributeFilter{{else}}BasicAttributeFilter<{{chipCallback.name}}AttributeCallback>{{/if}});
}

{{#if isWritableAttribute}}
{{#unless isList}}
CHIP_ERROR {{asUpperCamelCase parent.name}}Cluster::WriteAttribute{{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, {{chipType}} value)
{
app::WriteClientHandle handle;
ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate()));
ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(chip::app::AttributePathParams(mEndpoint, mClusterId, {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::Id), value));
return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback);
}

{{/unless}}
{{/if}}
{{#if isReportableAttribute}}
{{#unless isList}}
CHIP_ERROR {{asUpperCamelCase parent.name}}Cluster::SubscribeAttribute{{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval)
Expand Down
5 changes: 0 additions & 5 deletions src/app/zap-templates/templates/app/CHIPClusters.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ public:
{{#chip_server_cluster_attributes}}
{{#unless (isStrEqual chipCallback.name "Unsupported")}}
CHIP_ERROR ReadAttribute{{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback);
{{#if isWritableAttribute}}
{{#unless isList}}
CHIP_ERROR WriteAttribute{{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, {{chipType}} value);
{{/unless}}
{{/if}}
{{#if isReportableAttribute}}
{{#unless isList}}
CHIP_ERROR SubscribeAttribute{{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval);
Expand Down
41 changes: 0 additions & 41 deletions src/app/zap-templates/templates/app/tests/CHIPClusters-src.zapt

This file was deleted.

10 changes: 0 additions & 10 deletions src/app/zap-templates/templates/app/tests/CHIPClustersTest.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ class DLL_EXPORT {{asUpperCamelCase name}}ClusterTest : public {{asUpperCamelCas
public:
{{asUpperCamelCase name}}ClusterTest() : {{asUpperCamelCase name}}Cluster() {}
~{{asUpperCamelCase name}}ClusterTest() {}

{{#chip_server_cluster_attributes}}
{{#unless isWritableAttribute}}
{{#unless isList}}
{{#unless isStruct}}
CHIP_ERROR WriteAttribute{{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, {{chipType}} value);
{{/unless}}
{{/unless}}
{{/unless}}
{{/chip_server_cluster_attributes}}
};

{{/chip_client_clusters}}
Expand Down
4 changes: 0 additions & 4 deletions src/darwin/Framework/CHIP.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
objects = {

/* Begin PBXBuildFile section */
1E16A8FE26B9876900683C53 /* CHIPClustersTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E16A8FD26B9876900683C53 /* CHIPClustersTest.cpp */; };
1E16A90226B98AB700683C53 /* CHIPTestClustersObjc.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1E16A8FA26B9835700683C53 /* CHIPTestClustersObjc.mm */; };
1E16A90326B98AF100683C53 /* CHIPTestClustersObjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E16A8F926B9835600683C53 /* CHIPTestClustersObjc.h */; settings = {ATTRIBUTES = (Public, ); }; };
1E857306265519720050A4D9 /* CHIPClientCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E857305265519720050A4D9 /* CHIPClientCallbacks.cpp */; };
Expand Down Expand Up @@ -101,7 +100,6 @@
/* Begin PBXFileReference section */
1E16A8F926B9835600683C53 /* CHIPTestClustersObjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CHIPTestClustersObjc.h; path = "zap-generated/CHIPTestClustersObjc.h"; sourceTree = "<group>"; };
1E16A8FA26B9835700683C53 /* CHIPTestClustersObjc.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CHIPTestClustersObjc.mm; path = "zap-generated/CHIPTestClustersObjc.mm"; sourceTree = "<group>"; };
1E16A8FD26B9876900683C53 /* CHIPClustersTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CHIPClustersTest.cpp; path = "../../../../zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp"; sourceTree = "<group>"; };
1E857305265519720050A4D9 /* CHIPClientCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CHIPClientCallbacks.cpp; path = "../../../../zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp"; sourceTree = "<group>"; };
1E857307265519AE0050A4D9 /* callback-stub.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "callback-stub.cpp"; path = "../../../../zzz_generated/controller-clusters/zap-generated/callback-stub.cpp"; sourceTree = "<group>"; };
1E857309265519AE0050A4D9 /* CHIPClusters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CHIPClusters.cpp; path = "../../../../zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -209,7 +207,6 @@
isa = PBXGroup;
children = (
2F79A67626CE6672006377B0 /* im-client-callbacks.cpp */,
1E16A8FD26B9876900683C53 /* CHIPClustersTest.cpp */,
2FD775542695557E00FF4B12 /* error-mapping.cpp */,
1E85731926551A490050A4D9 /* af-event.cpp */,
1E85731B26551A490050A4D9 /* af-main-common.cpp */,
Expand Down Expand Up @@ -524,7 +521,6 @@
1E85732526551A490050A4D9 /* message.cpp in Sources */,
B2E0D7B3245B0B5C003C5B48 /* CHIPError.mm in Sources */,
1E85732726551A490050A4D9 /* client-api.cpp in Sources */,
1E16A8FE26B9876900683C53 /* CHIPClustersTest.cpp in Sources */,
1E85730C265519AE0050A4D9 /* callback-stub.cpp in Sources */,
1E857310265519AE0050A4D9 /* IMClusterCommandHandler.cpp in Sources */,
1ED276E026C57CF000547A89 /* CHIPCallbackBridge.mm in Sources */,
Expand Down
Loading

0 comments on commit 8304739

Please sign in to comment.