From 2485842d1539ec683cda186d18afbd8fdb1f51f7 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 23 Jan 2023 17:40:42 -0500 Subject: [PATCH] Align naming in Media Playback cluster XML with the spec. (#24509) * Align naming in Media Playback cluster XML with the spec. * Auto-update ZAP files. * Regenerate generated code. --- .../all-clusters-common/all-clusters-app.zap | 4 +- .../all-clusters-minimal-app.matter | 2 +- .../all-clusters-minimal-app.zap | 4 +- .../thermostat-common/thermostat.zap | 2 +- .../AppMediaPlaybackManager.cpp | 2 +- examples/tv-app/android/java/AppImpl.cpp | 12 +- .../android/java/MediaPlaybackManager.cpp | 2 +- examples/tv-app/linux/AppImpl.cpp | 12 +- .../media-playback/MediaPlaybackManager.h | 2 +- examples/tv-app/tv-common/tv-app.matter | 8 +- examples/tv-app/tv-common/tv-app.zap | 8 +- .../tv-casting-common/include/MediaPlayback.h | 2 +- .../tv-casting-common/src/MediaPlayback.cpp | 2 +- .../tv-casting-common/tv-casting-app.matter | 2 +- .../tv-casting-common/tv-casting-app.zap | 2 +- .../media-playback-server.cpp | 4 +- .../tests/suites/TV_MediaPlaybackCluster.yaml | 58 ++++---- .../Test_TC_MEDIAPLAYBACK_6_1.yaml | 2 +- .../chip/media-playback-cluster.xml | 18 +-- .../data_model/controller-clusters.matter | 8 +- .../data_model/controller-clusters.zap | 4 +- .../CHIPAttributeTLVValueDecoder.cpp | 19 +-- .../zap-generated/CHIPInvokeCallbacks.cpp | 22 +-- .../chip/devicecontroller/ChipClusters.java | 10 +- .../chip/devicecontroller/ChipStructs.java | 6 +- .../devicecontroller/ClusterInfoMapping.java | 22 ++- .../python/chip/clusters/CHIPClusters.py | 2 +- .../python/chip/clusters/Objects.py | 12 +- .../CHIP/templates/MTRBaseClusters-src.zapt | 2 +- .../CHIP/templates/MTRClusters-src.zapt | 2 +- .../CHIP/templates/availability.yaml | 16 ++ .../MTRAttributeTLVValueDecoder.mm | 4 +- .../CHIP/zap-generated/MTRBaseClusters.h | 23 ++- .../CHIP/zap-generated/MTRBaseClusters.mm | 44 +++--- .../CHIP/zap-generated/MTRCallbackBridge.h | 6 +- .../CHIP/zap-generated/MTRCallbackBridge.mm | 7 +- .../CHIP/zap-generated/MTRClusterConstants.h | 4 +- .../CHIP/zap-generated/MTRClusters.h | 18 +-- .../CHIP/zap-generated/MTRClusters.mm | 43 +++--- .../zap-generated/MTRCommandPayloadsObjc.h | 9 +- .../zap-generated/MTRCommandPayloadsObjc.mm | 7 +- .../CHIP/zap-generated/MTRStructsObjc.h | 11 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 7 +- .../app-common/zap-generated/callback.h | 10 +- .../zap-generated/cluster-objects.cpp | 8 +- .../zap-generated/cluster-objects.h | 22 +-- .../app-common/zap-generated/ids/Commands.h | 4 +- .../zap-generated/cluster/Commands.h | 12 +- .../cluster/ComplexArgumentParser.cpp | 8 +- .../cluster/ComplexArgumentParser.h | 4 +- .../cluster/logging/DataModelLogger.cpp | 8 +- .../cluster/logging/DataModelLogger.h | 2 +- .../chip-tool/zap-generated/test/Commands.h | 29 ++-- .../zap-generated/cluster/Commands.h | 43 +++--- .../zap-generated/test/Commands.h | 140 ++++++++++-------- 55 files changed, 397 insertions(+), 349 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index eb9b669469f49f..55c4fc3a4174cc 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -18311,7 +18311,7 @@ "outgoing": 1 }, { - "name": "StopPlayback", + "name": "Stop", "code": 2, "mfgCode": null, "source": "client", @@ -18455,7 +18455,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "PlaybackPosition", + "type": "PlaybackPositionStruct", "included": 0, "storageOption": "External", "singleton": 0, diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index be2a9057302f06..4465d1dd13e8a4 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -2639,7 +2639,7 @@ server cluster MediaPlayback = 1286 { command Play(): PlaybackResponse = 0; command Pause(): PlaybackResponse = 1; - command StopPlayback(): PlaybackResponse = 2; + command Stop(): PlaybackResponse = 2; } server cluster MediaInput = 1287 { diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index eab740cb31a262..5d194ad1dc9e01 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -17811,7 +17811,7 @@ "outgoing": 1 }, { - "name": "StopPlayback", + "name": "Stop", "code": 2, "mfgCode": null, "source": "client", @@ -17965,7 +17965,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "PlaybackPosition", + "type": "PlaybackPositionStruct", "included": 0, "storageOption": "External", "singleton": 0, diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 6857e8151289ee..724bf8984810c5 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -13401,7 +13401,7 @@ "outgoing": 1 }, { - "name": "StopPlayback", + "name": "Stop", "code": 2, "mfgCode": null, "source": "client", diff --git a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp index ba92b95e0ede64..ef9934090f1c16 100644 --- a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp +++ b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp @@ -170,7 +170,7 @@ Commands::PlaybackResponse::Type AppMediaPlaybackManager::HandleMediaRequest(Med CHIP_ERROR AppMediaPlaybackManager::HandleGetSampledPosition(AttributeValueEncoder & aEncoder) { - Structs::PlaybackPosition::Type response; + Structs::PlaybackPositionStruct::Type response; response.updatedAt = 0; response.position = Nullable(0); diff --git a/examples/tv-app/android/java/AppImpl.cpp b/examples/tv-app/android/java/AppImpl.cpp index e8d1c4c282dbd2..43eec9e4516fd2 100644 --- a/examples/tv-app/android/java/AppImpl.cpp +++ b/examples/tv-app/android/java/AppImpl.cpp @@ -196,12 +196,12 @@ constexpr CommandId contentLauncherOutgoingCommands[] = { }; // TODO: Sort out when the optional commands here should be listed. constexpr CommandId mediaPlaybackIncomingCommands[] = { - app::Clusters::MediaPlayback::Commands::Play::Id, app::Clusters::MediaPlayback::Commands::Pause::Id, - app::Clusters::MediaPlayback::Commands::StopPlayback::Id, app::Clusters::MediaPlayback::Commands::StartOver::Id, - app::Clusters::MediaPlayback::Commands::Previous::Id, app::Clusters::MediaPlayback::Commands::Next::Id, - app::Clusters::MediaPlayback::Commands::Rewind::Id, app::Clusters::MediaPlayback::Commands::FastForward::Id, - app::Clusters::MediaPlayback::Commands::SkipForward::Id, app::Clusters::MediaPlayback::Commands::SkipBackward::Id, - app::Clusters::MediaPlayback::Commands::Seek::Id, kInvalidCommandId, + app::Clusters::MediaPlayback::Commands::Play::Id, app::Clusters::MediaPlayback::Commands::Pause::Id, + app::Clusters::MediaPlayback::Commands::Stop::Id, app::Clusters::MediaPlayback::Commands::StartOver::Id, + app::Clusters::MediaPlayback::Commands::Previous::Id, app::Clusters::MediaPlayback::Commands::Next::Id, + app::Clusters::MediaPlayback::Commands::Rewind::Id, app::Clusters::MediaPlayback::Commands::FastForward::Id, + app::Clusters::MediaPlayback::Commands::SkipForward::Id, app::Clusters::MediaPlayback::Commands::SkipBackward::Id, + app::Clusters::MediaPlayback::Commands::Seek::Id, kInvalidCommandId, }; constexpr CommandId mediaPlaybackOutgoingCommands[] = { app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id, diff --git a/examples/tv-app/android/java/MediaPlaybackManager.cpp b/examples/tv-app/android/java/MediaPlaybackManager.cpp index 49c5fb0024807b..9783d1ffdc4f48 100644 --- a/examples/tv-app/android/java/MediaPlaybackManager.cpp +++ b/examples/tv-app/android/java/MediaPlaybackManager.cpp @@ -292,7 +292,7 @@ Commands::PlaybackResponse::Type MediaPlaybackManager::HandleMediaRequest(MediaP CHIP_ERROR MediaPlaybackManager::HandleGetSampledPosition(AttributeValueEncoder & aEncoder) { - Structs::PlaybackPosition::Type response; + Structs::PlaybackPositionStruct::Type response; response.updatedAt = 0; response.position = Nullable(0); diff --git a/examples/tv-app/linux/AppImpl.cpp b/examples/tv-app/linux/AppImpl.cpp index 6b0a306a78ac02..a23f939ba92671 100644 --- a/examples/tv-app/linux/AppImpl.cpp +++ b/examples/tv-app/linux/AppImpl.cpp @@ -354,12 +354,12 @@ constexpr CommandId contentLauncherOutgoingCommands[] = { }; // TODO: Sort out when the optional commands here should be listed. constexpr CommandId mediaPlaybackIncomingCommands[] = { - app::Clusters::MediaPlayback::Commands::Play::Id, app::Clusters::MediaPlayback::Commands::Pause::Id, - app::Clusters::MediaPlayback::Commands::StopPlayback::Id, app::Clusters::MediaPlayback::Commands::StartOver::Id, - app::Clusters::MediaPlayback::Commands::Previous::Id, app::Clusters::MediaPlayback::Commands::Next::Id, - app::Clusters::MediaPlayback::Commands::Rewind::Id, app::Clusters::MediaPlayback::Commands::FastForward::Id, - app::Clusters::MediaPlayback::Commands::SkipForward::Id, app::Clusters::MediaPlayback::Commands::SkipBackward::Id, - app::Clusters::MediaPlayback::Commands::Seek::Id, kInvalidCommandId, + app::Clusters::MediaPlayback::Commands::Play::Id, app::Clusters::MediaPlayback::Commands::Pause::Id, + app::Clusters::MediaPlayback::Commands::Stop::Id, app::Clusters::MediaPlayback::Commands::StartOver::Id, + app::Clusters::MediaPlayback::Commands::Previous::Id, app::Clusters::MediaPlayback::Commands::Next::Id, + app::Clusters::MediaPlayback::Commands::Rewind::Id, app::Clusters::MediaPlayback::Commands::FastForward::Id, + app::Clusters::MediaPlayback::Commands::SkipForward::Id, app::Clusters::MediaPlayback::Commands::SkipBackward::Id, + app::Clusters::MediaPlayback::Commands::Seek::Id, kInvalidCommandId, }; constexpr CommandId mediaPlaybackOutgoingCommands[] = { app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id, diff --git a/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.h b/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.h index ec02313fe9442a..9c0f8ce52f80e7 100644 --- a/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.h +++ b/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.h @@ -24,7 +24,7 @@ using chip::app::AttributeValueEncoder; using chip::app::CommandResponseHelper; using MediaPlaybackDelegate = chip::app::Clusters::MediaPlayback::Delegate; using PlaybackResponseType = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Type; -using PlaybackPositionType = chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::Type; +using PlaybackPositionType = chip::app::Clusters::MediaPlayback::Structs::PlaybackPositionStruct::Type; class MediaPlaybackManager : public MediaPlaybackDelegate { diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index eaf575cea6b9b8..ca639621a7719e 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1676,15 +1676,15 @@ server cluster MediaPlayback = 1286 { kVariableSpeed = 0x2; } - struct PlaybackPosition { - int64u updatedAt = 0; + struct PlaybackPositionStruct { + epoch_us updatedAt = 0; nullable int64u position = 1; } readonly attribute PlaybackStateEnum currentState = 0; readonly attribute nullable epoch_us startTime = 1; readonly attribute nullable int64u duration = 2; - readonly attribute nullable PlaybackPosition sampledPosition = 3; + readonly attribute nullable PlaybackPositionStruct sampledPosition = 3; readonly attribute single playbackSpeed = 4; readonly attribute nullable int64u seekRangeEnd = 5; readonly attribute nullable int64u seekRangeStart = 6; @@ -1713,7 +1713,7 @@ server cluster MediaPlayback = 1286 { command Play(): PlaybackResponse = 0; command Pause(): PlaybackResponse = 1; - command StopPlayback(): PlaybackResponse = 2; + command Stop(): PlaybackResponse = 2; command StartOver(): PlaybackResponse = 3; command Previous(): PlaybackResponse = 4; command Next(): PlaybackResponse = 5; diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index d078283993818d..99e1dcc39bc8f9 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -8039,7 +8039,7 @@ "outgoing": 0 }, { - "name": "StopPlayback", + "name": "Stop", "code": 2, "mfgCode": null, "source": "client", @@ -8183,7 +8183,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "PlaybackPosition", + "type": "PlaybackPositionStruct", "included": 1, "storageOption": "External", "singleton": 0, @@ -11129,7 +11129,7 @@ "outgoing": 1 }, { - "name": "StopPlayback", + "name": "Stop", "code": 2, "mfgCode": null, "source": "client", @@ -11291,7 +11291,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "PlaybackPosition", + "type": "PlaybackPositionStruct", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/tv-casting-app/tv-casting-common/include/MediaPlayback.h b/examples/tv-casting-app/tv-casting-common/include/MediaPlayback.h index c4d540fb353464..8a0c9c55326caa 100644 --- a/examples/tv-casting-app/tv-casting-common/include/MediaPlayback.h +++ b/examples/tv-casting-app/tv-casting-common/include/MediaPlayback.h @@ -41,7 +41,7 @@ class PauseCommand : public MediaCommandBase responseCallback); }; -class StopPlaybackCommand : public MediaCommandBase { public: diff --git a/examples/tv-casting-app/tv-casting-common/src/MediaPlayback.cpp b/examples/tv-casting-app/tv-casting-common/src/MediaPlayback.cpp index d8c023a9fac70f..419ef729616d5a 100644 --- a/examples/tv-casting-app/tv-casting-common/src/MediaPlayback.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/MediaPlayback.cpp @@ -35,7 +35,7 @@ CHIP_ERROR PauseCommand::Invoke(std::function responseCallback CHIP_ERROR StopPlaybackCommand::Invoke(std::function responseCallback) { - MediaPlayback::Commands::StopPlayback::Type request; + MediaPlayback::Commands::Stop::Type request; return MediaCommandBase::Invoke(request, responseCallback); } diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 1b7a708078e1c3..33e13245f8cc82 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -1785,7 +1785,7 @@ client cluster MediaPlayback = 1286 { command Play(): PlaybackResponse = 0; command Pause(): PlaybackResponse = 1; - command StopPlayback(): PlaybackResponse = 2; + command Stop(): PlaybackResponse = 2; command StartOver(): PlaybackResponse = 3; command Previous(): PlaybackResponse = 4; command Next(): PlaybackResponse = 5; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index 8242d2ca19e34c..c4cc88410da944 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -12573,7 +12573,7 @@ "outgoing": 1 }, { - "name": "StopPlayback", + "name": "Stop", "code": 2, "mfgCode": null, "source": "client", diff --git a/src/app/clusters/media-playback-server/media-playback-server.cpp b/src/app/clusters/media-playback-server/media-playback-server.cpp index c4ae274e393ac7..8957e9b68f64cc 100644 --- a/src/app/clusters/media-playback-server/media-playback-server.cpp +++ b/src/app/clusters/media-playback-server/media-playback-server.cpp @@ -275,8 +275,8 @@ bool emberAfMediaPlaybackClusterPauseCallback(app::CommandHandler * command, con return true; } -bool emberAfMediaPlaybackClusterStopPlaybackCallback(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath, - const Commands::StopPlayback::DecodableType & commandData) +bool emberAfMediaPlaybackClusterStopCallback(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath, + const Commands::Stop::DecodableType & commandData) { CHIP_ERROR err = CHIP_NO_ERROR; EndpointId endpoint = commandPath.mEndpointId; diff --git a/src/app/tests/suites/TV_MediaPlaybackCluster.yaml b/src/app/tests/suites/TV_MediaPlaybackCluster.yaml index fe8d54b4562770..8ba1fd423eab61 100644 --- a/src/app/tests/suites/TV_MediaPlaybackCluster.yaml +++ b/src/app/tests/suites/TV_MediaPlaybackCluster.yaml @@ -50,7 +50,7 @@ tests: command: "readAttribute" attribute: "SampledPosition" response: - value: { updatedAt: 0, position: 0 } + value: { UpdatedAt: 0, Position: 0 } - label: "Read attribute playback speed" command: "readAttribute" @@ -74,111 +74,111 @@ tests: command: "play" response: values: - - name: "data" + - name: "Data" value: "data response" - - name: "status" + - name: "Status" value: 0 - label: "Media Playback Pause Command" command: "pause" response: values: - - name: "data" + - name: "Data" value: "data response" - - name: "status" + - name: "Status" value: 0 - label: "Media Playback Stop Command" - command: "stopPlayback" + command: "Stop" response: values: - - name: "data" + - name: "Data" value: "data response" - - name: "status" + - name: "Status" value: 0 - label: "Media Playback Start Over Command" command: "startOver" response: values: - - name: "data" + - name: "Data" value: "data response" - - name: "status" + - name: "Status" value: 0 - label: "Media Playback Previous Command" command: "previous" response: values: - - name: "data" + - name: "Data" value: "data response" - - name: "status" + - name: "Status" value: 0 - label: "Media Playback Next Command" command: "next" response: values: - - name: "data" + - name: "Data" value: "data response" - - name: "status" + - name: "Status" value: 0 - label: "Media Playback Rewind Command" command: "rewind" response: values: - - name: "data" + - name: "Data" value: "data response" - - name: "status" + - name: "Status" value: 0 - label: "Media Playback Fast Forward Command" command: "fastForward" response: values: - - name: "data" + - name: "Data" value: "data response" - - name: "status" + - name: "Status" value: 0 - label: "Media Playback Skip Forward Command" command: "skipForward" arguments: values: - - name: "deltaPositionMilliseconds" + - name: "DeltaPositionMilliseconds" value: 500 response: values: - - name: "data" + - name: "Data" value: "data response" - - name: "status" + - name: "Status" value: 0 - label: "Read attribute position after skip forward" command: "readAttribute" attribute: "SampledPosition" response: - value: { updatedAt: 0, position: 500 } + value: { UpdatedAt: 0, Position: 500 } - label: "Media Playback Skip Backward Command" command: "skipBackward" arguments: values: - - name: "deltaPositionMilliseconds" + - name: "DeltaPositionMilliseconds" value: 100 response: values: - - name: "data" + - name: "Data" value: "data response" - - name: "status" + - name: "Status" value: 0 - label: "Read attribute position after skip backward" command: "readAttribute" attribute: "SampledPosition" response: - value: { updatedAt: 0, position: 400 } + value: { UpdatedAt: 0, Position: 400 } - label: "Media Playback Seek Command" command: "seek" @@ -188,13 +188,13 @@ tests: value: 1000 response: values: - - name: "data" + - name: "Data" value: "data response" - - name: "status" + - name: "Status" value: 0 - label: "Read attribute position after seek" command: "readAttribute" attribute: "SampledPosition" response: - value: { updatedAt: 0, position: 1000 } + value: { UpdatedAt: 0, Position: 1000 } diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_1.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_1.yaml index f0b4856c84ea12..43c06224dd237d 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_1.yaml @@ -102,7 +102,7 @@ tests: - label: "Sends a Stop command" PICS: MEDIAPLAYBACK.S.C02.Rsp - command: "StopPlayback" + command: "Stop" response: values: - name: "status" diff --git a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml index aad4a93ee93810..952e9d71e48f86 100644 --- a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml @@ -29,7 +29,7 @@ limitations under the License. CurrentState StartTime Duration - SampledPosition + SampledPosition PlaybackSpeed SeekRangeEnd SeekRangeStart @@ -43,7 +43,7 @@ limitations under the License. Upon receipt, this SHALL pause media. - + Upon receipt, this SHALL stop media. User experience is context-specific. This will often navigate the user back to the location where media was originally launched. @@ -69,12 +69,12 @@ limitations under the License. Upon receipt, this SHALL Skip forward in the media by the given number of seconds, using the data as follows: - + Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: - + @@ -84,16 +84,16 @@ limitations under the License. This command SHALL be generated in response to various Playback Request commands. - - + + - + - - + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 60e698e735b075..68ea4c464f03a0 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3628,15 +3628,15 @@ client cluster MediaPlayback = 1286 { kVariableSpeed = 0x2; } - struct PlaybackPosition { - int64u updatedAt = 0; + struct PlaybackPositionStruct { + epoch_us updatedAt = 0; nullable int64u position = 1; } readonly attribute PlaybackStateEnum currentState = 0; readonly attribute nullable epoch_us startTime = 1; readonly attribute nullable int64u duration = 2; - readonly attribute nullable PlaybackPosition sampledPosition = 3; + readonly attribute nullable PlaybackPositionStruct sampledPosition = 3; readonly attribute single playbackSpeed = 4; readonly attribute nullable int64u seekRangeEnd = 5; readonly attribute nullable int64u seekRangeStart = 6; @@ -3665,7 +3665,7 @@ client cluster MediaPlayback = 1286 { command Play(): PlaybackResponse = 0; command Pause(): PlaybackResponse = 1; - command StopPlayback(): PlaybackResponse = 2; + command Stop(): PlaybackResponse = 2; command StartOver(): PlaybackResponse = 3; command Previous(): PlaybackResponse = 4; command Next(): PlaybackResponse = 5; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index f338ccc7199788..e6c618f2b64f29 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -15657,7 +15657,7 @@ "outgoing": 1 }, { - "name": "StopPlayback", + "name": "Stop", "code": 2, "mfgCode": null, "source": "client", @@ -15835,7 +15835,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "PlaybackPosition", + "type": "PlaybackPositionStruct", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 558a00b9be4bb4..51d3c59e6894ef 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -15305,24 +15305,25 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_position); } - jclass playbackPositionStructClass_1; + jclass playbackPositionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterPlaybackPosition", playbackPositionStructClass_1); + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterPlaybackPositionStruct", + playbackPositionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterPlaybackPosition"); + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterPlaybackPositionStruct"); return nullptr; } - jmethodID playbackPositionStructCtor_1 = - env->GetMethodID(playbackPositionStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Long;)V"); - if (playbackPositionStructCtor_1 == nullptr) + jmethodID playbackPositionStructStructCtor_1 = + env->GetMethodID(playbackPositionStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Long;)V"); + if (playbackPositionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterPlaybackPosition constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterPlaybackPositionStruct constructor"); return nullptr; } - value = - env->NewObject(playbackPositionStructClass_1, playbackPositionStructCtor_1, value_updatedAt, value_position); + value = env->NewObject(playbackPositionStructStructClass_1, playbackPositionStructStructCtor_1, value_updatedAt, + value_position); } return value; } diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index c4e378729f17ee..5feb3d40023799 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -3449,25 +3449,25 @@ void CHIPMediaPlaybackClusterPlaybackResponseCallback::CallbackFn( &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject status; - std::string statusClassName = "java/lang/Integer"; - std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - static_cast(dataResponse.status), status); - jobject data; + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + static_cast(dataResponse.status), Status); + jobject Data; if (!dataResponse.data.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, data); + chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); } else { - jobject dataInsideOptional; - dataInsideOptional = + jobject DataInsideOptional; + DataInsideOptional = env->NewStringUTF(std::string(dataResponse.data.Value().data(), dataResponse.data.Value().size()).c_str()); - chip::JniReferences::GetInstance().CreateOptional(dataInsideOptional, data); + chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); } - env->CallVoidMethod(javaCallbackRef, javaMethod, status, data); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); } CHIPKeypadInputClusterSendKeyResponseCallback::CHIPKeypadInputClusterSendKeyResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 88e372366460e8..c63bec1f373636 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -19699,13 +19699,13 @@ public void pause(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { pause(chipClusterPtr, callback, timedInvokeTimeoutMs); } - public void stopPlayback(PlaybackResponseCallback callback) { - stopPlayback(chipClusterPtr, callback, null); + public void stop(PlaybackResponseCallback callback) { + stop(chipClusterPtr, callback, null); } - public void stopPlayback(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + public void stop(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { - stopPlayback(chipClusterPtr, callback, timedInvokeTimeoutMs); + stop(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void startOver(PlaybackResponseCallback callback) { @@ -19793,7 +19793,7 @@ private native void pause( PlaybackResponseCallback Callback, @Nullable Integer timedInvokeTimeoutMs); - private native void stopPlayback( + private native void stop( long chipClusterPtr, PlaybackResponseCallback Callback, @Nullable Integer timedInvokeTimeoutMs); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java index 9325e2240ce0b0..8a0b02f2d33d16 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -1478,11 +1478,11 @@ public String toString() { } } - public static class MediaPlaybackClusterPlaybackPosition { + public static class MediaPlaybackClusterPlaybackPositionStruct { public Long updatedAt; public @Nullable Long position; - public MediaPlaybackClusterPlaybackPosition(Long updatedAt, @Nullable Long position) { + public MediaPlaybackClusterPlaybackPositionStruct(Long updatedAt, @Nullable Long position) { this.updatedAt = updatedAt; this.position = position; } @@ -1490,7 +1490,7 @@ public MediaPlaybackClusterPlaybackPosition(Long updatedAt, @Nullable Long posit @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("MediaPlaybackClusterPlaybackPosition {\n"); + output.append("MediaPlaybackClusterPlaybackPositionStruct {\n"); output.append("\tupdatedAt: "); output.append(updatedAt); output.append("\n"); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 126eb19c10fa80..20b3fd2a8d4248 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -5747,12 +5747,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Optional data) { + public void onSuccess(Integer Status, Optional Data) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "Optional"); - responseValues.put(dataResponseValue, data); + CommandResponseInfo StatusResponseValue = new CommandResponseInfo("Status", "Integer"); + responseValues.put(StatusResponseValue, Status); + CommandResponseInfo DataResponseValue = new CommandResponseInfo("Data", "Optional"); + responseValues.put(DataResponseValue, Data); callback.onSuccess(responseValues); } @@ -11377,19 +11377,17 @@ public Map> getCommandMap() { () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), mediaPlaybackpauseCommandParams); mediaPlaybackClusterInteractionInfoMap.put("pause", mediaPlaybackpauseInteractionInfo); - Map mediaPlaybackstopPlaybackCommandParams = + Map mediaPlaybackstopCommandParams = new LinkedHashMap(); - InteractionInfo mediaPlaybackstopPlaybackInteractionInfo = + InteractionInfo mediaPlaybackstopInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.MediaPlaybackCluster) cluster) - .stopPlayback( - (ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback); + .stop((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback); }, () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), - mediaPlaybackstopPlaybackCommandParams); - mediaPlaybackClusterInteractionInfoMap.put( - "stopPlayback", mediaPlaybackstopPlaybackInteractionInfo); + mediaPlaybackstopCommandParams); + mediaPlaybackClusterInteractionInfoMap.put("stop", mediaPlaybackstopInteractionInfo); Map mediaPlaybackstartOverCommandParams = new LinkedHashMap(); InteractionInfo mediaPlaybackstartOverInteractionInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 29194fac493145..e5d920f8722c44 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -5976,7 +5976,7 @@ class ChipClusters: }, 0x00000002: { "commandId": 0x00000002, - "commandName": "StopPlayback", + "commandName": "Stop", "args": { }, }, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 25371f43e125e7..cbbd3c8467d112 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -23052,7 +23052,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentState", Tag=0x00000000, Type=MediaPlayback.Enums.PlaybackStateEnum), ClusterObjectFieldDescriptor(Label="startTime", Tag=0x00000001, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="duration", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="sampledPosition", Tag=0x00000003, Type=typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPosition]), + ClusterObjectFieldDescriptor(Label="sampledPosition", Tag=0x00000003, Type=typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]), ClusterObjectFieldDescriptor(Label="playbackSpeed", Tag=0x00000004, Type=typing.Optional[float32]), ClusterObjectFieldDescriptor(Label="seekRangeEnd", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="seekRangeStart", Tag=0x00000006, Type=typing.Union[None, Nullable, uint]), @@ -23066,7 +23066,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: currentState: 'MediaPlayback.Enums.PlaybackStateEnum' = None startTime: 'typing.Union[None, Nullable, uint]' = None duration: 'typing.Union[None, Nullable, uint]' = None - sampledPosition: 'typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPosition]' = None + sampledPosition: 'typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]' = None playbackSpeed: 'typing.Optional[float32]' = None seekRangeEnd: 'typing.Union[None, Nullable, uint]' = None seekRangeStart: 'typing.Union[None, Nullable, uint]' = None @@ -23110,7 +23110,7 @@ class MediaPlaybackFeature(IntFlag): class Structs: @dataclass - class PlaybackPosition(ClusterObject): + class PlaybackPositionStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( @@ -23154,7 +23154,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass - class StopPlayback(ClusterCommand): + class Stop(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0506 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True @@ -23365,9 +23365,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPosition]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]) - value: 'typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPosition]' = None + value: 'typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]' = None @dataclass class PlaybackSpeed(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt index cc75078bc69730..b403e63a866eba 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt @@ -267,7 +267,7 @@ reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value {{#unless (hasArguments)}} - (void){{asLowerCamelCase command}}WithCompletionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler { - [self {{asLowerCamelCase name}}WithParams:nil completionHandler:completionHandler]; + [self {{asLowerCamelCase command}}WithParams:nil completionHandler:completionHandler]; } {{/unless}} {{/unless}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt index d20a01129d4603..aa25ea19b76a0a 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt @@ -253,7 +253,7 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID {{#unless (hasArguments)}} - (void){{asLowerCamelCase command}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler { - [self {{asLowerCamelCase name}}WithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; + [self {{asLowerCamelCase command}}WithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } {{/unless}} {{/unless}} diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index c42888fc9fed4f..48c8e27d455d65 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -4832,6 +4832,8 @@ - StayAwakeRequest ContentLauncher: - LauncherResponse + MediaPlayback: + - Stop command fields: UnitTesting: TestSpecificResponse: @@ -5066,6 +5068,8 @@ - FabricDescriptorStruct DoorLock: - CredentialStruct + MediaPlayback: + - PlaybackPositionStruct TargetNavigator: - TargetInfoStruct MediaInput: @@ -5197,6 +5201,10 @@ CredentialStruct: - credentialType - credentialIndex + MediaPlayback: + PlaybackPositionStruct: + - updatedAt + - position TargetNavigator: TargetInfoStruct: - identifier @@ -5697,6 +5705,8 @@ commands: ContentLauncher: - LaunchResponse + MediaPlayback: + - StopPlayback command fields: Groups: AddGroup: @@ -5764,6 +5774,8 @@ - FabricDescriptor DoorLock: - DlCredential + MediaPlayback: + - PlaybackPosition TargetNavigator: - TargetInfo MediaInput: @@ -5992,6 +6004,8 @@ AnnounceOTAProvider: AnnounceOtaProvider ContentLauncher: LauncherResponse: LaunchResponse + MediaPlayback: + Stop: StopPlayback command fields: OTASoftwareUpdateProvider: QueryImage: @@ -6053,6 +6067,8 @@ FabricDescriptorStruct: FabricDescriptor DoorLock: CredentialStruct: DlCredential + MediaPlayback: + PlaybackPositionStruct: PlaybackPosition TargetNavigator: TargetInfoStruct: TargetInfo MediaInput: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index a9993337d47d12..e796c95ab2bd3d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -13248,11 +13248,11 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & if (*aError != CHIP_NO_ERROR) { return nil; } - MTRMediaPlaybackClusterPlaybackPosition * _Nullable value; + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [MTRMediaPlaybackClusterPlaybackPosition new]; + value = [MTRMediaPlaybackClusterPlaybackPositionStruct new]; value.updatedAt = [NSNumber numberWithUnsignedLongLong:cppValue.Value().updatedAt]; if (cppValue.Value().position.IsNull()) { value.position = nil; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 5fe30a42c0be1a..92ba3b37009c35 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -12403,16 +12403,16 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)pauseWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** - * Command StopPlayback + * Command Stop * * Upon receipt, this SHALL stop media. User experience is context-specific. This will often navigate the user back to the location * where media was originally launched. */ -- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)stopPlaybackWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)stopWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * Command StartOver * @@ -12528,16 +12528,16 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, +- (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSampledPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + completion:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion @@ -38780,12 +38780,11 @@ typedef NS_ENUM(uint8_t, MTRFaultInjectionFaultType) { NSError * _Nullable error))completionHandler NS_SWIFT_UNAVAILABLE("Unavailable to avoid ambiguity in trailing closure or async calls") API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use stopPlaybackWithParams:completion:"); + MTR_NEWLY_DEPRECATED("Please use stopWithParams:completion:"); - (void)stopPlaybackWithCompletionHandler: (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler NS_SWIFT_UNAVAILABLE("Unavailable to avoid ambiguity in trailing closure or async calls") - API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use stopPlaybackWithCompletion:"); + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))MTR_NEWLY_DEPRECATED("Please use stopWithCompletion:"); - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params completionHandler: (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 83024c42f42e10..d5facf0800aadd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -85295,14 +85295,14 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params std::move(*bridge).DispatchAction(self.device); } -- (void)stopPlaybackWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)stopWithCompletion:(void (^)( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self stopPlaybackWithParams:nil completion:completion]; + [self stopWithParams:nil completion:completion]; } -- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -85314,7 +85314,7 @@ - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nul Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - MediaPlayback::Commands::StopPlayback::Type request; + MediaPlayback::Commands::Stop::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); @@ -85763,31 +85763,31 @@ + (void)readAttributeDurationWithClusterStateCache:(MTRClusterStateCacheContaine }); } -- (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, +- (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, + MTRMediaPlaybackClusterPlaybackPositionStruct, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSampledPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + completion:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))completion { auto * bridge = new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(queue, completion); @@ -86197,11 +86197,11 @@ - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nul completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self stopPlaybackWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self stopWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - (void)stopPlaybackWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler @@ -86445,7 +86445,7 @@ - (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(MTRMediaPlay NSError * _Nullable error))completionHandler { [self readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error) { + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; @@ -86466,8 +86466,8 @@ - (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)mi } [self subscribeAttributeSampledPositionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^( - MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error) { + reportHandler:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, + NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; @@ -86481,7 +86481,7 @@ + (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContain [self readAttributeSampledPositionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue - completion:^(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + completion:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler( diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index 49e5bd8fa9936f..760646ec1a0886 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -996,7 +996,8 @@ typedef void (*TargetNavigatorAcceptedCommandListListAttributeCallback)( typedef void (*TargetNavigatorAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*MediaPlaybackSampledPositionStructAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); + void *, + const chip::app::DataModel::Nullable &); typedef void (*MediaPlaybackGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*MediaPlaybackAcceptedCommandListListAttributeCallback)( @@ -9001,7 +9002,8 @@ class MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge static void OnSuccessFn( void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & + value); }; class MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index e3df110bf64b3d..5e8b7a4f02bf19 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -8975,13 +8975,14 @@ } void MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & + value) { - MTRMediaPlaybackClusterPlaybackPosition * _Nullable objCValue; + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable objCValue; if (value.IsNull()) { objCValue = nil; } else { - objCValue = [MTRMediaPlaybackClusterPlaybackPosition new]; + objCValue = [MTRMediaPlaybackClusterPlaybackPositionStruct new]; objCValue.updatedAt = [NSNumber numberWithUnsignedLongLong:value.Value().updatedAt]; if (value.Value().position.IsNull()) { objCValue.position = nil; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index fa2adffcc6eb9f..2e3e1436c800aa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -6402,7 +6402,7 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTR_NEWLY_DEPRECATED("Please use MTRCommandIDTypeClusterMediaPlaybackCommandPauseID") = 0x00000001, MTRClusterMediaPlaybackCommandStopPlaybackID API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRCommandIDTypeClusterMediaPlaybackCommandStopPlaybackID") + MTR_NEWLY_DEPRECATED("Please use MTRCommandIDTypeClusterMediaPlaybackCommandStopID") = 0x00000002, MTRClusterMediaPlaybackCommandStartOverID API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_NEWLY_DEPRECATED("Please use MTRCommandIDTypeClusterMediaPlaybackCommandStartOverID") @@ -6435,7 +6435,7 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { // Cluster MediaPlayback commands MTRCommandIDTypeClusterMediaPlaybackCommandPlayID MTR_NEWLY_AVAILABLE = 0x00000000, MTRCommandIDTypeClusterMediaPlaybackCommandPauseID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRCommandIDTypeClusterMediaPlaybackCommandStopPlaybackID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterMediaPlaybackCommandStopID MTR_NEWLY_AVAILABLE = 0x00000002, MTRCommandIDTypeClusterMediaPlaybackCommandStartOverID MTR_NEWLY_AVAILABLE = 0x00000003, MTRCommandIDTypeClusterMediaPlaybackCommandPreviousID MTR_NEWLY_AVAILABLE = 0x00000004, MTRCommandIDTypeClusterMediaPlaybackCommandNextID MTR_NEWLY_AVAILABLE = 0x00000005, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 2422a10a522d05..12f84c7355d797 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -4847,15 +4847,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs +- (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)stopWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)stopPlaybackWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs @@ -8328,14 +8328,14 @@ MTR_NEWLY_DEPRECATED("Please use MTRClusterUnitTesting") NSError * _Nullable error))completionHandler NS_SWIFT_UNAVAILABLE("Unavailable to avoid ambiguity in trailing closure or async calls") API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use stopPlaybackWithParams:expectedValues:expectedValueInterval:completion:"); + MTR_NEWLY_DEPRECATED("Please use stopWithParams:expectedValues:expectedValueInterval:completion:"); - (void)stopPlaybackWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler NS_SWIFT_UNAVAILABLE("Unavailable to avoid ambiguity in trailing closure or async calls") API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use stopPlaybackWithExpectedValues:expectedValueInterval:completion:"); + MTR_NEWLY_DEPRECATED("Please use stopWithExpectedValues:expectedValueInterval:completion:"); - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 23daf4ddd4adf2..f2f731745a93f5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -22752,25 +22752,22 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params } } -- (void)stopPlaybackWithExpectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - [self stopPlaybackWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completion:completion]; -} -- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params - expectedValues:(NSArray *> *)expectedValues +- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, - (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandStopPlaybackID]; + [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + NSString * logPrefix = + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandStopID]; // Make a copy of params before we go async. params = [params copy]; NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; @@ -22798,7 +22795,7 @@ - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nul Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - MediaPlayback::Commands::StopPlayback::Type request; + MediaPlayback::Commands::Stop::Type request; if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } @@ -23586,13 +23583,13 @@ - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nul completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self stopPlaybackWithParams:params - expectedValues:expectedDataValueDictionaries - expectedValueInterval:expectedValueIntervalMs - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self stopWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - (void)stopPlaybackWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 1037a02486f9d8..23a862fa7e59fb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -5698,8 +5698,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaPlaybackClusterStopPlaybackParams : NSObject +MTR_NEWLY_AVAILABLE +@interface MTRMediaPlaybackClusterStopParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5726,6 +5726,11 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +MTR_NEWLY_DEPRECATED("Please use MTRMediaPlaybackClusterStopParams") +@interface MTRMediaPlaybackClusterStopPlaybackParams : MTRMediaPlaybackClusterStopParams +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRMediaPlaybackClusterStartOverParams : NSObject /** diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 933017ccb3ad54..8f2146cfd44e6c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -6521,7 +6521,7 @@ - (NSString *)description } @end -@implementation MTRMediaPlaybackClusterStopPlaybackParams +@implementation MTRMediaPlaybackClusterStopParams - (instancetype)init { if (self = [super init]) { @@ -6533,7 +6533,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMediaPlaybackClusterStopPlaybackParams alloc] init]; + auto other = [[MTRMediaPlaybackClusterStopParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -6547,6 +6547,9 @@ - (NSString *)description return descriptionString; } +@end + +@implementation MTRMediaPlaybackClusterStopPlaybackParams @end @implementation MTRMediaPlaybackClusterStartOverParams - (instancetype)init diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index d3d1062fc74d11..fd75353c45bda5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -810,10 +810,15 @@ MTR_NEWLY_DEPRECATED("Please use MTRTargetNavigatorClusterTargetInfoStruct") @interface MTRTargetNavigatorClusterTargetInfo : MTRTargetNavigatorClusterTargetInfoStruct @end +MTR_NEWLY_AVAILABLE +@interface MTRMediaPlaybackClusterPlaybackPositionStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull updatedAt MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable position MTR_NEWLY_AVAILABLE; +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRMediaPlaybackClusterPlaybackPosition : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull updatedAt API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable position API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_NEWLY_DEPRECATED("Please use MTRMediaPlaybackClusterPlaybackPositionStruct") +@interface MTRMediaPlaybackClusterPlaybackPosition : MTRMediaPlaybackClusterPlaybackPositionStruct @end MTR_NEWLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 2a72744a7cefd0..b1f83fabd0e5f0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -3352,7 +3352,7 @@ - (NSString *)description @implementation MTRTargetNavigatorClusterTargetInfo : MTRTargetNavigatorClusterTargetInfoStruct @end -@implementation MTRMediaPlaybackClusterPlaybackPosition +@implementation MTRMediaPlaybackClusterPlaybackPositionStruct - (instancetype)init { if (self = [super init]) { @@ -3366,7 +3366,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRMediaPlaybackClusterPlaybackPosition alloc] init]; + auto other = [[MTRMediaPlaybackClusterPlaybackPositionStruct alloc] init]; other.updatedAt = self.updatedAt; other.position = self.position; @@ -3383,6 +3383,9 @@ - (NSString *)description @end +@implementation MTRMediaPlaybackClusterPlaybackPosition : MTRMediaPlaybackClusterPlaybackPositionStruct +@end + @implementation MTRMediaInputClusterInputInfoStruct - (instancetype)init { diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 614ffc4f060dde..4ce8009b89a0c5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -8607,11 +8607,11 @@ bool emberAfMediaPlaybackClusterPauseCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::MediaPlayback::Commands::Pause::DecodableType & commandData); /** - * @brief Media Playback Cluster StopPlayback Command callback (from client) + * @brief Media Playback Cluster Stop Command callback (from client) */ -bool emberAfMediaPlaybackClusterStopPlaybackCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::MediaPlayback::Commands::StopPlayback::DecodableType & commandData); +bool emberAfMediaPlaybackClusterStopCallback(chip::app::CommandHandler * commandObj, + const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::MediaPlayback::Commands::Stop::DecodableType & commandData); /** * @brief Media Playback Cluster StartOver Command callback (from client) */ @@ -8658,7 +8658,7 @@ bool emberAfMediaPlaybackClusterSkipBackwardCallback( * @brief Media Playback Cluster PlaybackResponse Command callback (from server) */ bool emberAfMediaPlaybackClusterPlaybackResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - uint8_t status, chip::CharSpan data); + uint8_t Status, chip::CharSpan Data); /** * @brief Media Playback Cluster Seek Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 8fb162dd021a0a..a715ea0599925a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -15833,7 +15833,7 @@ namespace Events {} // namespace Events } // namespace TargetNavigator namespace MediaPlayback { namespace Structs { -namespace PlaybackPosition { +namespace PlaybackPositionStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; @@ -15876,7 +15876,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -} // namespace PlaybackPosition +} // namespace PlaybackPositionStruct } // namespace Structs namespace Commands { @@ -15946,7 +15946,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } } // namespace Pause. -namespace StopPlayback { +namespace Stop { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; @@ -15978,7 +15978,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(reader.ExitContainer(outer)); return CHIP_NO_ERROR; } -} // namespace StopPlayback. +} // namespace Stop. namespace StartOver { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 1dc98560443b86..98082544acbb23 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -21055,7 +21055,7 @@ struct TypeInfo } // namespace TargetNavigator namespace MediaPlayback { namespace Structs { -namespace PlaybackPosition { +namespace PlaybackPositionStruct { enum class Fields { kUpdatedAt = 0, @@ -21077,7 +21077,7 @@ struct Type using DecodableType = Type; -} // namespace PlaybackPosition +} // namespace PlaybackPositionStruct } // namespace Structs namespace Commands { @@ -21093,10 +21093,10 @@ struct Type; struct DecodableType; } // namespace Pause -namespace StopPlayback { +namespace Stop { struct Type; struct DecodableType; -} // namespace StopPlayback +} // namespace Stop namespace StartOver { struct Type; @@ -21202,7 +21202,7 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Pause -namespace StopPlayback { +namespace Stop { enum class Fields { }; @@ -21211,7 +21211,7 @@ struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StopPlayback::Id; } + static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21224,12 +21224,12 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::StopPlayback::Id; } + static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace StopPlayback +}; // namespace Stop namespace StartOver { enum class Fields { @@ -21544,11 +21544,11 @@ struct TypeInfo namespace SampledPosition { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; + using Type = chip::app::DataModel::Nullable; using DecodableType = - chip::app::DataModel::Nullable; + chip::app::DataModel::Nullable; using DecodableArgType = - const chip::app::DataModel::Nullable &; + const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SampledPosition::Id; } diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 9c9e6f3473eaea..4bf91f56d5eab0 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -904,9 +904,9 @@ namespace Pause { static constexpr CommandId Id = 0x00000001; } // namespace Pause -namespace StopPlayback { +namespace Stop { static constexpr CommandId Id = 0x00000002; -} // namespace StopPlayback +} // namespace Stop namespace StartOver { static constexpr CommandId Id = 0x00000003; diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 4051bae0f97a94..9b0ef2a23d5ac5 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -6097,7 +6097,7 @@ class TargetNavigatorNavigateTarget : public ClusterCommand | Commands: | | | * Play | 0x00 | | * Pause | 0x01 | -| * StopPlayback | 0x02 | +| * Stop | 0x02 | | * StartOver | 0x03 | | * Previous | 0x04 | | * Next | 0x05 | @@ -6183,12 +6183,12 @@ class MediaPlaybackPause : public ClusterCommand }; /* - * Command StopPlayback + * Command Stop */ -class MediaPlaybackStopPlayback : public ClusterCommand +class MediaPlaybackStop : public ClusterCommand { public: - MediaPlaybackStopPlayback(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-playback", credsIssuerConfig) + MediaPlaybackStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) { ClusterCommand::AddArguments(); } @@ -6208,7 +6208,7 @@ class MediaPlaybackStopPlayback : public ClusterCommand } private: - chip::app::Clusters::MediaPlayback::Commands::StopPlayback::Type mRequest; + chip::app::Clusters::MediaPlayback::Commands::Stop::Type mRequest; }; /* @@ -12256,7 +12256,7 @@ void registerClusterMediaPlayback(Commands & commands, CredentialIssuerCommands make_unique(Id, credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index b38f06ba93c3e0..e7e282ba2aa46d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -1584,15 +1584,15 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::ContentLauncher::Struc ComplexArgumentParser::Finalize(request.externalIDList); } CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::Type & request, + chip::app::Clusters::MediaPlayback::Structs::PlaybackPositionStruct::Type & request, Json::Value & value) { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("PlaybackPosition.updatedAt", "updatedAt", value.isMember("updatedAt"))); + ComplexArgumentParser::EnsureMemberExist("PlaybackPositionStruct.updatedAt", "updatedAt", value.isMember("updatedAt"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("PlaybackPosition.position", "position", value.isMember("position"))); + ComplexArgumentParser::EnsureMemberExist("PlaybackPositionStruct.position", "position", value.isMember("position"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "updatedAt"); @@ -1604,7 +1604,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, return CHIP_NO_ERROR; } -void ComplexArgumentParser::Finalize(chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::Type & request) +void ComplexArgumentParser::Finalize(chip::app::Clusters::MediaPlayback::Structs::PlaybackPositionStruct::Type & request) { ComplexArgumentParser::Finalize(request.updatedAt); ComplexArgumentParser::Finalize(request.position); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index be0a39f9e8655a..869e45bf7d13eb 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -191,10 +191,10 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ContentLauncher Json::Value & value); static void Finalize(chip::app::Clusters::ContentLauncher::Structs::ParameterStruct::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::Type & request, +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::MediaPlayback::Structs::PlaybackPositionStruct::Type & request, Json::Value & value); -static void Finalize(chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::Type & request); +static void Finalize(chip::app::Clusters::MediaPlayback::Structs::PlaybackPositionStruct::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 8f1c1b5cc84c2d..8a54494c5140e2 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -1681,8 +1681,9 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::DecodableType & value) +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::MediaPlayback::Structs::PlaybackPositionStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { @@ -8638,7 +8639,8 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("Duration", 1, value); } case MediaPlayback::Attributes::SampledPosition::Id: { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SampledPosition", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index ccdc7b796812a8..d1adb75145fe63 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -106,7 +106,7 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentLauncher::Structs::ParameterStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::DecodableType & value); + const chip::app::Clusters::MediaPlayback::Structs::PlaybackPositionStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 717e41133222cf..20a7f1aa805102 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -33212,8 +33212,8 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand LogStep(9, "Sends a Stop command"); VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::StopPlayback::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::StopPlayback::Id, value, + chip::app::Clusters::MediaPlayback::Commands::Stop::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Stop::Id, value, chip::NullOptional ); @@ -33377,7 +33377,8 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); } @@ -33397,7 +33398,8 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); } @@ -33675,7 +33677,8 @@ class Test_TC_MEDIAPLAYBACK_6_3Suite : public TestCommand case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); } @@ -55167,7 +55170,8 @@ class TV_MediaPlaybackClusterSuite : public TestCommand case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); VerifyOrReturn(CheckValue("sampledPosition.Value().updatedAt", value.Value().updatedAt, 0ULL)); @@ -55294,7 +55298,8 @@ class TV_MediaPlaybackClusterSuite : public TestCommand case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); VerifyOrReturn(CheckValue("sampledPosition.Value().updatedAt", value.Value().updatedAt, 0ULL)); @@ -55315,7 +55320,8 @@ class TV_MediaPlaybackClusterSuite : public TestCommand case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); VerifyOrReturn(CheckValue("sampledPosition.Value().updatedAt", value.Value().updatedAt, 0ULL)); @@ -55336,7 +55342,8 @@ class TV_MediaPlaybackClusterSuite : public TestCommand case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); VerifyOrReturn(CheckValue("sampledPosition.Value().updatedAt", value.Value().updatedAt, 0ULL)); @@ -55428,8 +55435,8 @@ class TV_MediaPlaybackClusterSuite : public TestCommand case 10: { LogStep(10, "Media Playback Stop Command"); ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::StopPlayback::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Commands::StopPlayback::Id, value, + chip::app::Clusters::MediaPlayback::Commands::Stop::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Commands::Stop::Id, value, chip::NullOptional ); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 75a065ab0f382f..5c1a0baefe529e 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -69630,7 +69630,7 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu | Commands: | | | * Play | 0x00 | | * Pause | 0x01 | -| * StopPlayback | 0x02 | +| * Stop | 0x02 | | * StartOver | 0x03 | | * Previous | 0x04 | | * Next | 0x05 | @@ -69747,12 +69747,12 @@ class MediaPlaybackPause : public ClusterCommand { }; /* - * Command StopPlayback + * Command Stop */ -class MediaPlaybackStopPlayback : public ClusterCommand { +class MediaPlaybackStop : public ClusterCommand { public: - MediaPlaybackStopPlayback() - : ClusterCommand("stop-playback") + MediaPlaybackStop() + : ClusterCommand("stop") { ClusterCommand::AddArguments(); } @@ -69765,25 +69765,24 @@ class MediaPlaybackStopPlayback : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterStopPlaybackParams alloc] init]; + __auto_type * params = [[MTRMediaPlaybackClusterStopParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopPlaybackWithParams:params - completion:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster stopWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -70389,7 +70388,7 @@ class ReadMediaPlaybackSampledPosition : public ReadAttribute { endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error) { + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback SampledPosition read Error", error); @@ -70430,7 +70429,7 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error) { + reportHandler:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); SetCommandExitStatus(error); }]; @@ -100126,7 +100125,7 @@ void registerClusterMediaPlayback(Commands & commands) make_unique(Id), // make_unique(), // make_unique(), // - make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index fc64a87691276d..ff2f91facc4c13 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -43750,7 +43750,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -43798,7 +43798,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -43856,7 +43856,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -43907,15 +43907,14 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopPlaybackWithCompletion:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster stopWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Sends a Stop command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -44253,7 +44252,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -44301,7 +44300,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -44360,7 +44359,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -44394,7 +44393,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -44430,7 +44429,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -44469,7 +44468,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -44498,7 +44497,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the SampledPosition attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44533,7 +44532,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -44562,7 +44561,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the SampledPosition attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44800,7 +44799,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -44827,7 +44826,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -44856,7 +44855,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the SampledPosition attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44931,7 +44930,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 5U)); + VerifyOrReturn(CheckValue("Status", actualValue, 5U)); } NextTest(); @@ -45302,7 +45301,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -45375,7 +45374,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -45458,7 +45457,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -45517,7 +45516,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -45587,7 +45586,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -45633,7 +45632,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -74826,7 +74825,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute position Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -74834,9 +74833,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); - VerifyOrReturn(CheckValue("updatedAt", ((MTRMediaPlaybackClusterPlaybackPosition *) actualValue).updatedAt, 0ULL)); - VerifyOrReturn(CheckValueNonNull("position", ((MTRMediaPlaybackClusterPlaybackPosition *) actualValue).position)); - VerifyOrReturn(CheckValue("position", ((MTRMediaPlaybackClusterPlaybackPosition *) actualValue).position, 0ULL)); + VerifyOrReturn( + CheckValue("UpdatedAt", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).updatedAt, 0ULL)); + VerifyOrReturn( + CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); + VerifyOrReturn( + CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 0ULL)); } NextTest(); @@ -74934,12 +74936,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); } NextTest(); @@ -74963,12 +74965,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); } NextTest(); @@ -74985,20 +74987,19 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopPlaybackWithCompletion:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster stopWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Media Playback Stop Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); } NextTest(); @@ -75023,12 +75024,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); } NextTest(); @@ -75053,12 +75054,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); } NextTest(); @@ -75082,12 +75083,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); } NextTest(); @@ -75111,12 +75112,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); } NextTest(); @@ -75141,12 +75142,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); } NextTest(); @@ -75174,12 +75175,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); } NextTest(); @@ -75197,7 +75198,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute position after skip forward Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75205,9 +75206,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); - VerifyOrReturn(CheckValue("updatedAt", ((MTRMediaPlaybackClusterPlaybackPosition *) actualValue).updatedAt, 0ULL)); - VerifyOrReturn(CheckValueNonNull("position", ((MTRMediaPlaybackClusterPlaybackPosition *) actualValue).position)); - VerifyOrReturn(CheckValue("position", ((MTRMediaPlaybackClusterPlaybackPosition *) actualValue).position, 500ULL)); + VerifyOrReturn( + CheckValue("UpdatedAt", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).updatedAt, 0ULL)); + VerifyOrReturn( + CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); + VerifyOrReturn( + CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 500ULL)); } NextTest(); @@ -75235,12 +75239,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); } NextTest(); @@ -75258,7 +75262,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute position after skip backward Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75266,9 +75270,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); - VerifyOrReturn(CheckValue("updatedAt", ((MTRMediaPlaybackClusterPlaybackPosition *) actualValue).updatedAt, 0ULL)); - VerifyOrReturn(CheckValueNonNull("position", ((MTRMediaPlaybackClusterPlaybackPosition *) actualValue).position)); - VerifyOrReturn(CheckValue("position", ((MTRMediaPlaybackClusterPlaybackPosition *) actualValue).position, 400ULL)); + VerifyOrReturn( + CheckValue("UpdatedAt", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).updatedAt, 0ULL)); + VerifyOrReturn( + CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); + VerifyOrReturn( + CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 400ULL)); } NextTest(); @@ -75295,12 +75302,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } { id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + VerifyOrReturn(CheckValueAsString("Data", actualValue, @"data response")); } NextTest(); @@ -75318,7 +75325,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute position after seek Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75326,9 +75333,12 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); - VerifyOrReturn(CheckValue("updatedAt", ((MTRMediaPlaybackClusterPlaybackPosition *) actualValue).updatedAt, 0ULL)); - VerifyOrReturn(CheckValueNonNull("position", ((MTRMediaPlaybackClusterPlaybackPosition *) actualValue).position)); - VerifyOrReturn(CheckValue("position", ((MTRMediaPlaybackClusterPlaybackPosition *) actualValue).position, 1000ULL)); + VerifyOrReturn( + CheckValue("UpdatedAt", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).updatedAt, 0ULL)); + VerifyOrReturn( + CheckValueNonNull("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position)); + VerifyOrReturn( + CheckValue("Position", ((MTRMediaPlaybackClusterPlaybackPositionStruct *) actualValue).position, 1000ULL)); } NextTest();