From debbc2e9dbc2c883e430092b3851b519d23a4626 Mon Sep 17 00:00:00 2001 From: Hasty Granbery Date: Mon, 20 May 2024 08:41:05 -0700 Subject: [PATCH 1/2] [Media] ZAP template XML sync with spec [Media] ZAP template XML sync with spec --- .../data-model/chip/account-login-cluster.xml | 5 +- .../chip/application-basic-cluster.xml | 1 + .../chip/application-launcher-cluster.xml | 3 +- .../zcl/data-model/chip/channel-cluster.xml | 96 ++++++------- .../chip/content-app-observer-cluster.xml | 13 +- .../chip/content-control-cluster.xml | 127 +++++++++++++++--- .../chip/content-launch-cluster.xml | 74 +++++----- .../data-model/chip/keypad-input-cluster.xml | 4 +- .../zcl/data-model/chip/low-power-cluster.xml | 2 + .../data-model/chip/media-input-cluster.xml | 1 + .../chip/media-playback-cluster.xml | 37 ++--- .../chip/target-navigator-cluster.xml | 10 +- 12 files changed, 235 insertions(+), 138 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml index baf74dc3c2e1da..0f7afa6c296a3e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml @@ -45,14 +45,15 @@ limitations under the License. - + This message is sent in response to the GetSetupPIN Request, and contains the Setup PIN code, or null when the accounts identified in the request does not match the active account of the running Content App. - + This event can be used by the Content App to indicate that the current user has logged out. In response to this event, the Fabric Admin SHALL remove access to this Content App by the specified Node. If no Node is provided, then the Fabric Admin SHALL remove access to all non-Admin Nodes. + diff --git a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml index e6331f698fd423..0be8345a8a11e9 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml @@ -23,6 +23,7 @@ limitations under the License. APPLICATION_BASIC_CLUSTER true true + This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. VendorName VendorID diff --git a/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml index 8aaca6201074dd..391b27e98cef86 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml @@ -23,6 +23,7 @@ limitations under the License. APPLICATION_LAUNCHER_CLUSTER true true + This cluster provides an interface for launching content on a media player device such as a TV or Speaker. @@ -50,7 +51,7 @@ limitations under the License. - + This command SHALL be generated in response to LaunchApp commands. diff --git a/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml index 25ec7b7062f97a..8701ddfe02e19c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml @@ -69,35 +69,35 @@ limitations under the License. This command retrieves the program guide. It accepts several filter parameters to return specific schedule and program information from a content app. The command shall receive in response a ProgramGuideResponse. - - - - - - - + + + + + + + - + This command is a response to the GetProgramGuide command. - - + + Record a specific program or series when it goes live. This functionality enables DVR recording features. - - - - + + + + Cancel recording for a specific program or series. - - - - + + + + @@ -123,50 +123,50 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - - + + + @@ -201,10 +201,10 @@ limitations under the License. - + - + diff --git a/src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml index 6e241c7b5c3cd0..d0150bd02a41f5 100644 --- a/src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml @@ -23,19 +23,20 @@ limitations under the License. CONTENT_APP_OBSERVER_CLUSTER true true + This cluster provides an interface for sending targeted commands to an Observer of a Content App on a Video Player device such as a Streaming Media Player, Smart TV or Smart Screen. The cluster server for Content App Observer is implemented by an endpoint that communicates with a Content App, such as a Casting Video Client. The cluster client for Content App Observer is implemented by a Content App endpoint. A Content App is informed of the NodeId of an Observer when a binding is set on the Content App. The Content App can then send the ContentAppMessage to the Observer (server cluster), and the Observer responds with a ContentAppMessageResponse. Upon receipt, the data field MAY be parsed and interpreted. Message encoding is specific to the Content App. A Content App MAY when possible read attributes from the Basic Information Cluster on the Observer and use this to determine the Message encoding. - - + + - + This command SHALL be generated in response to ContentAppMessage command. - - - + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml index 06468c114c42dc..f463cf6534618a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml @@ -16,6 +16,16 @@ limitations under the License. --> + + + + + + + + + + Media Content Control @@ -25,6 +35,7 @@ limitations under the License. true This cluster is used for managing the content control (including "parental control") settings on a media device such as a TV, or Set-top Box. + @@ -48,71 +59,151 @@ limitations under the License. OnDemandRatingThreshold ScheduledContentRatings ScheduledContentRatingThreshold - ScreenDailyTime - RemainingScreenTime - BlockUnrated - - + ScreenDailyTime + RemainingScreenTime + BlockUnrated + BlockChannelList + BlockApplicationList + BlockContentTimeWindow + + The purpose of this command is to update the PIN used for protecting configuration of the content control settings. Upon success, the old PIN SHALL no longer work. The PIN is used to ensure that only the Node (or User) with the PIN code can make changes to the Content Control settings, for example, turn off Content Controls or modify the ScreenDailyTime. The PIN is composed of a numeric string of up to 6 human readable characters (displayable) . Upon receipt of this command, the media device SHALL check if the OldPIN field of this command is the same as the current PIN. If the PINs are the same, then the PIN code SHALL be set to NewPIN. Otherwise a response with InvalidPINCode error status SHALL be returned. The media device MAY provide a default PIN to the User via an out of band mechanism. For security reasons, it is recommended that a client encourage the user to update the PIN from its default value when performing configuration of the Content Control settings exposed by this cluster. The ResetPIN command can also be used to obtain the default PIN. - - + + + - + The purpose of this command is to reset the PIN. If this command is executed successfully, a ResetPINResponse command with a new PIN SHALL be returned. + - + This command SHALL be generated in response to a ResetPIN command. The data for this command SHALL be as follows: - + The purpose of this command is to turn on the Content Control feature on a media device. On receipt of the Enable command, the media device SHALL set the Enabled attribute to TRUE. + - + The purpose of this command is to turn off the Content Control feature on a media device. On receipt of the Disable command, the media device SHALL set the Enabled attribute to FALSE. + The purpose of this command is to add the extra screen time for the user. If a client with Operate privilege invokes this command, the media device SHALL check whether the PINCode passed in the command matches the current PINCode value. If these match, then the RemainingScreenTime attribute SHALL be increased by the specified BonusTime value. If the PINs do not match, then a response with InvalidPINCode error status SHALL be returned, and no changes SHALL be made to RemainingScreenTime. If a client with Manage privilege or greater invokes this command, the media device SHALL ignore the PINCode field and directly increase the RemainingScreenTime attribute by the specified BonusTime value. A server that does not support the PM feature SHALL respond with InvalidPINCode to clients that only have Operate privilege unless: It has been provided with the PIN value to expect via an out of band mechanism, and The client has provided a PINCode that matches the expected PIN value. - - + + The purpose of this command is to set the ScreenDailyTime attribute. On receipt of the SetScreenDailyTime command, the media device SHALL set the ScreenDailyTime attribute to the ScreenTime value. - + + The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the BlockUnratedContent command, the media device SHALL set the BlockUnrated attribute to TRUE. + The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the UnblockUnratedContent command, the media device SHALL set the BlockUnrated attribute to FALSE. + The purpose of this command is to set the OnDemandRatingThreshold attribute. On receipt of the SetOnDemandRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the OnDemandRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. - + + The purpose of this command is to set ScheduledContentRatingThreshold attribute. On receipt of the SetScheduledContentRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the ScheduledContentRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. - + + + + + + The purpose of this command is to set BlockChannelList attribute. + + + + + + The purpose of this command is to remove channels from the BlockChannelList attribute. + + + + + + The purpose of this command is to set applications to the BlockApplicationList attribute. + + + + + + The purpose of this command is to remove applications from the BlockApplicationList attribute. + + + + + + The purpose of this command is to set the BlockContentTimeWindow attribute. + + + + + + The purpose of this command is to remove the selected time windows from the BlockContentTimeWindow attribute. + + This event SHALL be generated when the RemainingScreenTime equals 0. + + + This event SHALL be generated when entering a period of blocked content as configured in the BlockContentTimeWindow attribute. + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml index 3c59ae1f9c90ad..095c23e8b5c9d2 100644 --- a/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml @@ -24,11 +24,9 @@ limitations under the License. true true This cluster provides an interface for launching content on a media player device such as a TV or Speaker. - - - AcceptHeader - SupportedStreamingProtocols - + + AcceptHeader + SupportedStreamingProtocols Upon receipt, this SHALL launch the specified content with optional search criteria. @@ -40,9 +38,10 @@ limitations under the License. Upon receipt, this SHALL launch content from the specified URL. - - - + + + + @@ -60,9 +59,9 @@ limitations under the License. - + - + @@ -79,21 +78,21 @@ limitations under the License. - - - - - + + + + + - - - - - - + + + + + + @@ -129,23 +128,23 @@ limitations under the License. - - - + + + - - - + + + - - - + + + @@ -177,12 +176,11 @@ limitations under the License. - - - - - - - - + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml index b43ace5c0c8383..8fbf2e6a846370 100644 --- a/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml @@ -23,8 +23,8 @@ limitations under the License. KEYPAD_INPUT_CLUSTER true true + This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. - @@ -42,7 +42,7 @@ limitations under the License. - + This command SHALL be generated in response to a SendKey Request command. diff --git a/src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml index c1cc5b38ede202..b1b8ce1a136de2 100644 --- a/src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml @@ -23,9 +23,11 @@ limitations under the License. LOW_POWER_CLUSTER true true + This cluster provides an interface for managing low power mode on a device. This command shall put the device into low power mode. + diff --git a/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml index 597b285cc1b5dd..06a1ecc5499f79 100644 --- a/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml @@ -24,6 +24,7 @@ limitations under the License. true true + This cluster provides an interface for controlling the Input Selector on a media device such as a TV. 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 a77b8fa4befb4c..14e95d935e8418 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 @@ -105,10 +105,10 @@ limitations under the License. Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: - + - + This command SHALL be generated in response to various Playback Request commands. @@ -116,13 +116,13 @@ limitations under the License. Upon receipt, the server SHALL set the active Audio Track to the one identified by the TrackID in the Track catalog for the streaming media. If the TrackID does not exist in the Track catalog, OR does not correspond to the streaming media OR no media is being streamed at the time of receipt of this command, the server will return an error status of INVALID_ARGUMENT. - - + + Upon receipt, the server SHALL set the active Text Track to the one identified by the TrackID in the Track catalog for the streaming media. If the TrackID does not exist in the Track catalog, OR does not correspond to the streaming media OR no media is being streamed at the time of receipt of this command, the server SHALL return an error status of INVALID_ARGUMENT. - + @@ -131,28 +131,29 @@ limitations under the License. If supported, this event SHALL be generated when there is a change in any of the supported attributes of the Media Playback cluster. - - - - - - - - - + + + + + + + + + - - + + - - + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml index bc665905df1eb2..e17e0430ab4d24 100644 --- a/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml @@ -34,17 +34,17 @@ limitations under the License. - + This command SHALL be generated in response to NavigateTarget commands. - + This field SHALL indicate the updated target list as defined by the TargetList attribute if there is a change in the list of targets. Otherwise this field can be omitted from the event. - - - + + + From 89215034a23a23dcb112219ea51027c2cdeeca32 Mon Sep 17 00:00:00 2001 From: Hasty Granbery Date: Mon, 20 May 2024 13:09:11 -0700 Subject: [PATCH 2/2] [Media] Codegen from ZAP xml --- .../all-clusters-app.matter | 2 +- .../all-clusters-minimal-app.matter | 145 +-- ...ootnode_basicvideoplayer_0ff86e943b.matter | 109 +- .../placeholder/linux/apps/app1/config.matter | 288 +++-- .../placeholder/linux/apps/app2/config.matter | 288 +++-- examples/tv-app/tv-common/tv-app.matter | 270 ++-- .../zap-generated/MCAttributeObjects.mm | 224 ++-- .../zap-generated/MCCommandPayloads.h | 3 +- .../zap-generated/MCCommandPayloads.mm | 315 ++++- .../tv-casting-common/tv-casting-app.matter | 270 ++-- .../all-clusters-app/app-templates/access.h | 3 + .../data_model/controller-clusters.matter | 270 ++-- .../chip/devicecontroller/ChipClusters.java | 287 ++++- .../devicecontroller/ChipEventStructs.java | 149 ++- .../chip/devicecontroller/ChipStructs.java | 528 ++++++-- .../devicecontroller/ClusterIDMapping.java | 118 +- .../devicecontroller/ClusterInfoMapping.java | 213 +++- .../devicecontroller/ClusterReadMapping.java | 33 + .../AccountLoginClusterLoggedOutEvent.kt | 8 +- .../MediaPlaybackClusterStateChangedEvent.kt | 103 +- ...argetNavigatorClusterTargetUpdatedEvent.kt | 70 +- .../chip/devicecontroller/cluster/files.gni | 4 + .../structs/ChannelClusterProgramStruct.kt | 10 +- .../ContentControlClusterAppInfoStruct.kt | 56 + ...ContentControlClusterBlockChannelStruct.kt | 93 ++ .../ContentControlClusterTimePeriodStruct.kt | 69 + .../ContentControlClusterTimeWindowStruct.kt | 86 ++ ...auncherClusterPlaybackPreferencesStruct.kt | 96 +- ...entLauncherClusterTrackPreferenceStruct.kt | 66 +- ...diaPlaybackClusterTrackAttributesStruct.kt | 39 +- .../MediaPlaybackClusterTrackStruct.kt | 21 +- .../cluster/clusters/ChannelCluster.kt | 42 +- .../clusters/ContentAppObserverCluster.kt | 8 +- .../cluster/clusters/ContentControlCluster.kt | 544 +++++++- .../clusters/ContentLauncherCluster.kt | 6 + .../cluster/clusters/MediaPlaybackCluster.kt | 6 +- .../AccountLoginClusterLoggedOutEvent.kt | 8 +- .../MediaPlaybackClusterStateChangedEvent.kt | 106 +- ...argetNavigatorClusterTargetUpdatedEvent.kt | 71 +- .../java/matter/controller/cluster/files.gni | 4 + .../structs/ChannelClusterProgramStruct.kt | 10 +- .../ContentControlClusterAppInfoStruct.kt | 56 + ...ContentControlClusterBlockChannelStruct.kt | 93 ++ .../ContentControlClusterTimePeriodStruct.kt | 69 + .../ContentControlClusterTimeWindowStruct.kt | 86 ++ ...auncherClusterPlaybackPreferencesStruct.kt | 96 +- ...entLauncherClusterTrackPreferenceStruct.kt | 66 +- ...diaPlaybackClusterTrackAttributesStruct.kt | 39 +- .../MediaPlaybackClusterTrackStruct.kt | 21 +- .../CHIPAttributeTLVValueDecoder.cpp | 682 +++++++--- .../CHIPEventTLVValueDecoder.cpp | 383 ++++-- .../python/chip/clusters/CHIPClusters.py | 61 + .../python/chip/clusters/Objects.py | 421 ++++-- .../MTRAttributeSpecifiedCheck.mm | 9 + .../MTRAttributeTLVValueDecoder.mm | 352 +++-- .../CHIP/zap-generated/MTRBaseClusters.h | 80 +- .../CHIP/zap-generated/MTRBaseClusters.mm | 276 +++- .../CHIP/zap-generated/MTRClusterConstants.h | 10 + .../CHIP/zap-generated/MTRClusterNames.mm | 12 + .../CHIP/zap-generated/MTRClusters.h | 20 +- .../CHIP/zap-generated/MTRClusters.mm | 201 ++- .../zap-generated/MTRCommandPayloadsObjc.h | 204 ++- .../zap-generated/MTRCommandPayloadsObjc.mm | 1136 ++++++++++++++--- .../MTRCommandPayloads_Internal.h | 36 + .../zap-generated/MTRCommandTimedCheck.mm | 12 + .../zap-generated/MTREventTLVValueDecoder.mm | 138 +- .../CHIP/zap-generated/MTRStructsObjc.h | 75 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 256 +++- .../app-common/zap-generated/callback.h | 36 + .../app-common/zap-generated/cluster-enums.h | 20 +- .../zap-generated/cluster-objects.cpp | 531 +++++++- .../zap-generated/cluster-objects.h | 609 +++++++-- .../app-common/zap-generated/ids/Attributes.h | 12 + .../app-common/zap-generated/ids/Commands.h | 24 + .../app-common/zap-generated/ids/Events.h | 4 + .../zap-generated/cluster/Commands.h | 322 ++++- .../cluster/ComplexArgumentParser.cpp | 260 +++- .../cluster/ComplexArgumentParser.h | 30 +- .../cluster/logging/DataModelLogger.cpp | 236 +++- .../cluster/logging/DataModelLogger.h | 21 +- .../zap-generated/cluster/Commands.h | 1057 +++++++++++++-- 81 files changed, 10709 insertions(+), 2384 deletions(-) create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterAppInfoStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterBlockChannelStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterTimePeriodStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterTimeWindowStruct.kt create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterAppInfoStruct.kt create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterBlockChannelStruct.kt create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterTimePeriodStruct.kt create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterTimeWindowStruct.kt diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 2c54d75c7e6b06..de9fbd830408a2 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -6494,7 +6494,7 @@ cluster WakeOnLan = 1283 { /** This cluster provides an interface for managing low power mode on a device. */ cluster LowPower = 1288 { - revision 1; // NOTE: Default/not specifically set + revision 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; 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 0c9569504c7846..36a9886f197e2c 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 @@ -4509,25 +4509,30 @@ cluster Channel = 1284 { kRecordProgram = 0x8; } - bitmap RecordingFlagBitmap : bitmap32 { + bitmap RecordingFlagBitmap : bitmap8 { kScheduled = 0x1; kRecordSeries = 0x2; kRecorded = 0x4; } - struct ProgramCastStruct { + struct AdditionalInfoStruct { char_string name = 0; - char_string role = 1; + char_string value = 1; + } + + struct ProgramCastStruct { + long_char_string<256> name = 0; + long_char_string<256> role = 1; } struct ProgramCategoryStruct { - char_string category = 0; - optional char_string subCategory = 1; + long_char_string<256> category = 0; + optional long_char_string<256> subCategory = 1; } struct SeriesInfoStruct { - char_string season = 0; - char_string episode = 1; + long_char_string<256> season = 0; + long_char_string<256> episode = 1; } struct ChannelInfoStruct { @@ -4541,31 +4546,31 @@ cluster Channel = 1284 { } struct ProgramStruct { - char_string identifier = 0; + char_string<255> identifier = 0; ChannelInfoStruct channel = 1; epoch_s startTime = 2; epoch_s endTime = 3; - char_string title = 4; - optional char_string subtitle = 5; - optional char_string description = 6; + char_string<255> title = 4; + optional char_string<255> subtitle = 5; + optional long_char_string<8192> description = 6; optional char_string audioLanguages[] = 7; optional char_string ratings[] = 8; - optional char_string thumbnailUrl = 9; - optional char_string posterArtUrl = 10; - optional char_string dvbiUrl = 11; - optional char_string releaseDate = 12; - optional char_string parentalGuidanceText = 13; + optional long_char_string<8192> thumbnailUrl = 9; + optional long_char_string<8192> posterArtUrl = 10; + optional long_char_string<8192> dvbiUrl = 11; + optional char_string<30> releaseDate = 12; + optional char_string<255> parentalGuidanceText = 13; optional RecordingFlagBitmap recordingFlag = 14; optional nullable SeriesInfoStruct seriesInfo = 15; optional ProgramCategoryStruct categoryList[] = 16; optional ProgramCastStruct castList[] = 17; - optional ProgramCastStruct externalIDList[] = 18; + optional AdditionalInfoStruct externalIDList[] = 18; } struct PageTokenStruct { optional int16u limit = 0; - optional char_string after = 1; - optional char_string before = 2; + optional long_char_string<8192> after = 1; + optional long_char_string<8192> before = 2; } struct ChannelPagingStruct { @@ -4573,11 +4578,6 @@ cluster Channel = 1284 { optional nullable PageTokenStruct nextToken = 1; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; - } - struct LineupInfoStruct { char_string operatorName = 0; optional char_string lineupName = 1; @@ -4614,13 +4614,13 @@ cluster Channel = 1284 { } request struct GetProgramGuideRequest { - optional epoch_s startTime = 0; - optional epoch_s endTime = 1; + epoch_s startTime = 0; + epoch_s endTime = 1; optional ChannelInfoStruct channelList[] = 2; - optional PageTokenStruct pageToken = 3; - optional RecordingFlagBitmap recordingFlag = 4; + optional nullable PageTokenStruct pageToken = 3; + optional nullable RecordingFlagBitmap recordingFlag = 4; optional AdditionalInfoStruct externalIDList[] = 5; - optional octet_string data = 6; + optional octet_string<8092> data = 6; } response struct ProgramGuideResponse = 5 { @@ -4629,17 +4629,17 @@ cluster Channel = 1284 { } request struct RecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } request struct CancelRecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ @@ -4672,9 +4672,9 @@ cluster TargetNavigator = 1285 { } info event TargetUpdated = 0 { - TargetInfoStruct targetList[] = 0; - int8u currentTarget = 1; - octet_string data = 2; + optional TargetInfoStruct targetList[] = 0; + optional int8u currentTarget = 1; + optional octet_string data = 2; } readonly attribute TargetInfoStruct targetList[] = 0; @@ -4751,12 +4751,13 @@ cluster MediaPlayback = 1286 { struct TrackAttributesStruct { char_string<32> languageCode = 0; - optional nullable char_string displayName = 1; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable long_char_string<256> displayName = 2; } struct TrackStruct { char_string<32> id = 0; - nullable TrackAttributesStruct trackAttributes = 1; + TrackAttributesStruct trackAttributes = 1; } struct PlaybackPositionStruct { @@ -4766,14 +4767,14 @@ cluster MediaPlayback = 1286 { info event StateChanged = 0 { PlaybackStateEnum currentState = 0; - EPOCH_US startTime = 1; - INT64U duration = 2; - PlaybackPositionStruct sampledPosition = 3; - single playbackSpeed = 4; - INT64U seekRangeEnd = 5; - INT64U seekRangeStart = 6; - optional OCTET_STRING data = 7; - boolean audioAdvanceUnmuted = 8; + optional epoch_us startTime = 1; + optional int64u duration = 2; + optional PlaybackPositionStruct sampledPosition = 3; + optional single playbackSpeed = 4; + optional int64u seekRangeEnd = 5; + optional int64u seekRangeStart = 6; + optional octet_string data = 7; + optional boolean audioAdvanceUnmuted = 8; } readonly attribute PlaybackStateEnum currentState = 0; @@ -4820,12 +4821,12 @@ cluster MediaPlayback = 1286 { } request struct ActivateAudioTrackRequest { - CHAR_STRING trackID = 0; - INT8U audioOutputIndex = 1; + char_string<32> trackID = 0; + optional nullable int8u audioOutputIndex = 1; } request struct ActivateTextTrackRequest { - CHAR_STRING trackID = 0; + char_string<32> trackID = 0; } /** Upon receipt, this SHALL play media. */ @@ -4860,7 +4861,7 @@ cluster MediaPlayback = 1286 { /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ cluster MediaInput = 1287 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum InputTypeEnum : enum8 { kInternal = 0; @@ -4918,7 +4919,7 @@ cluster MediaInput = 1287 { /** This cluster provides an interface for managing low power mode on a device. */ cluster LowPower = 1288 { - revision 1; // NOTE: Default/not specifically set + revision 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -4933,7 +4934,7 @@ cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ cluster KeypadInput = 1289 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum CECKeyCodeEnum : enum8 { kSelect = 0; @@ -5057,7 +5058,7 @@ cluster KeypadInput = 1289 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ContentLauncher = 1290 { - revision 1; + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -5116,9 +5117,9 @@ cluster ContentLauncher = 1290 { bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; - kAdvancedSeek = 0x3; - kTextTracks = 0x4; - kAudioTracks = 0x5; + kAdvancedSeek = 0x4; + kTextTracks = 0x8; + kAudioTracks = 0x10; } bitmap SupportedProtocolsBitmap : bitmap32 { @@ -5134,24 +5135,24 @@ cluster ContentLauncher = 1290 { struct TrackPreferenceStruct { char_string<32> languageCode = 0; - optional CharacteristicEnum characteristics[] = 1; - int8u audioOutputIndex = 2; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable int8u audioOutputIndex = 2; } struct PlaybackPreferencesStruct { - int64u playbackPosition = 0; - TrackPreferenceStruct textTrack = 1; - optional TrackPreferenceStruct audioTracks[] = 2; + optional nullable int64u playbackPosition = 0; + optional nullable TrackPreferenceStruct textTrack = 1; + optional nullable TrackPreferenceStruct audioTracks[] = 2; } struct AdditionalInfoStruct { - char_string<256> name = 0; - char_string<8192> value = 1; + long_char_string<256> name = 0; + long_char_string<8192> value = 1; } struct ParameterStruct { ParameterEnum type = 0; - char_string<1024> value = 1; + long_char_string<1024> value = 1; optional AdditionalInfoStruct externalIDList[] = 2; } @@ -5160,13 +5161,13 @@ cluster ContentLauncher = 1290 { } struct StyleInformationStruct { - optional char_string<8192> imageURL = 0; + optional long_char_string<8192> imageURL = 0; optional char_string<9> color = 1; optional DimensionStruct size = 2; } struct BrandingInformationStruct { - char_string<256> providerName = 0; + long_char_string<256> providerName = 0; optional StyleInformationStruct background = 1; optional StyleInformationStruct logo = 2; optional StyleInformationStruct progressBar = 3; @@ -5195,6 +5196,7 @@ cluster ContentLauncher = 1290 { char_string contentURL = 0; optional char_string displayString = 1; optional BrandingInformationStruct brandingInformation = 2; + optional PlaybackPreferencesStruct playbackPreferences = 3; } response struct LauncherResponse = 2 { @@ -5257,7 +5259,7 @@ cluster AudioOutput = 1291 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ApplicationLauncher = 1292 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum StatusEnum : enum8 { kSuccess = 0; @@ -5316,7 +5318,7 @@ cluster ApplicationLauncher = 1292 { /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ cluster ApplicationBasic = 1293 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum ApplicationStatusEnum : enum8 { kStopped = 0; @@ -5350,8 +5352,9 @@ cluster ApplicationBasic = 1293 { cluster AccountLogin = 1294 { revision 2; - critical event LoggedOut = 0 { + fabric_sensitive critical event access(read: administer) LoggedOut = 0 { optional node_id node = 0; + fabric_idx fabricIndex = 254; } readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index d8fb307e9d8579..57e65057ed3fff 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -1403,25 +1403,30 @@ cluster Channel = 1284 { kRecordProgram = 0x8; } - bitmap RecordingFlagBitmap : bitmap32 { + bitmap RecordingFlagBitmap : bitmap8 { kScheduled = 0x1; kRecordSeries = 0x2; kRecorded = 0x4; } - struct ProgramCastStruct { + struct AdditionalInfoStruct { char_string name = 0; - char_string role = 1; + char_string value = 1; + } + + struct ProgramCastStruct { + long_char_string<256> name = 0; + long_char_string<256> role = 1; } struct ProgramCategoryStruct { - char_string category = 0; - optional char_string subCategory = 1; + long_char_string<256> category = 0; + optional long_char_string<256> subCategory = 1; } struct SeriesInfoStruct { - char_string season = 0; - char_string episode = 1; + long_char_string<256> season = 0; + long_char_string<256> episode = 1; } struct ChannelInfoStruct { @@ -1435,31 +1440,31 @@ cluster Channel = 1284 { } struct ProgramStruct { - char_string identifier = 0; + char_string<255> identifier = 0; ChannelInfoStruct channel = 1; epoch_s startTime = 2; epoch_s endTime = 3; - char_string title = 4; - optional char_string subtitle = 5; - optional char_string description = 6; + char_string<255> title = 4; + optional char_string<255> subtitle = 5; + optional long_char_string<8192> description = 6; optional char_string audioLanguages[] = 7; optional char_string ratings[] = 8; - optional char_string thumbnailUrl = 9; - optional char_string posterArtUrl = 10; - optional char_string dvbiUrl = 11; - optional char_string releaseDate = 12; - optional char_string parentalGuidanceText = 13; + optional long_char_string<8192> thumbnailUrl = 9; + optional long_char_string<8192> posterArtUrl = 10; + optional long_char_string<8192> dvbiUrl = 11; + optional char_string<30> releaseDate = 12; + optional char_string<255> parentalGuidanceText = 13; optional RecordingFlagBitmap recordingFlag = 14; optional nullable SeriesInfoStruct seriesInfo = 15; optional ProgramCategoryStruct categoryList[] = 16; optional ProgramCastStruct castList[] = 17; - optional ProgramCastStruct externalIDList[] = 18; + optional AdditionalInfoStruct externalIDList[] = 18; } struct PageTokenStruct { optional int16u limit = 0; - optional char_string after = 1; - optional char_string before = 2; + optional long_char_string<8192> after = 1; + optional long_char_string<8192> before = 2; } struct ChannelPagingStruct { @@ -1467,11 +1472,6 @@ cluster Channel = 1284 { optional nullable PageTokenStruct nextToken = 1; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; - } - struct LineupInfoStruct { char_string operatorName = 0; optional char_string lineupName = 1; @@ -1508,13 +1508,13 @@ cluster Channel = 1284 { } request struct GetProgramGuideRequest { - optional epoch_s startTime = 0; - optional epoch_s endTime = 1; + epoch_s startTime = 0; + epoch_s endTime = 1; optional ChannelInfoStruct channelList[] = 2; - optional PageTokenStruct pageToken = 3; - optional RecordingFlagBitmap recordingFlag = 4; + optional nullable PageTokenStruct pageToken = 3; + optional nullable RecordingFlagBitmap recordingFlag = 4; optional AdditionalInfoStruct externalIDList[] = 5; - optional octet_string data = 6; + optional octet_string<8092> data = 6; } response struct ProgramGuideResponse = 5 { @@ -1523,17 +1523,17 @@ cluster Channel = 1284 { } request struct RecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } request struct CancelRecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ @@ -1566,9 +1566,9 @@ cluster TargetNavigator = 1285 { } info event TargetUpdated = 0 { - TargetInfoStruct targetList[] = 0; - int8u currentTarget = 1; - octet_string data = 2; + optional TargetInfoStruct targetList[] = 0; + optional int8u currentTarget = 1; + optional octet_string data = 2; } readonly attribute TargetInfoStruct targetList[] = 0; @@ -1645,12 +1645,13 @@ cluster MediaPlayback = 1286 { struct TrackAttributesStruct { char_string<32> languageCode = 0; - optional nullable char_string displayName = 1; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable long_char_string<256> displayName = 2; } struct TrackStruct { char_string<32> id = 0; - nullable TrackAttributesStruct trackAttributes = 1; + TrackAttributesStruct trackAttributes = 1; } struct PlaybackPositionStruct { @@ -1660,14 +1661,14 @@ cluster MediaPlayback = 1286 { info event StateChanged = 0 { PlaybackStateEnum currentState = 0; - EPOCH_US startTime = 1; - INT64U duration = 2; - PlaybackPositionStruct sampledPosition = 3; - single playbackSpeed = 4; - INT64U seekRangeEnd = 5; - INT64U seekRangeStart = 6; - optional OCTET_STRING data = 7; - boolean audioAdvanceUnmuted = 8; + optional epoch_us startTime = 1; + optional int64u duration = 2; + optional PlaybackPositionStruct sampledPosition = 3; + optional single playbackSpeed = 4; + optional int64u seekRangeEnd = 5; + optional int64u seekRangeStart = 6; + optional octet_string data = 7; + optional boolean audioAdvanceUnmuted = 8; } readonly attribute PlaybackStateEnum currentState = 0; @@ -1714,12 +1715,12 @@ cluster MediaPlayback = 1286 { } request struct ActivateAudioTrackRequest { - CHAR_STRING trackID = 0; - INT8U audioOutputIndex = 1; + char_string<32> trackID = 0; + optional nullable int8u audioOutputIndex = 1; } request struct ActivateTextTrackRequest { - CHAR_STRING trackID = 0; + char_string<32> trackID = 0; } /** Upon receipt, this SHALL play media. */ @@ -1754,7 +1755,7 @@ cluster MediaPlayback = 1286 { /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ cluster MediaInput = 1287 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum InputTypeEnum : enum8 { kInternal = 0; @@ -1812,7 +1813,7 @@ cluster MediaInput = 1287 { /** This cluster provides an interface for managing low power mode on a device. */ cluster LowPower = 1288 { - revision 1; // NOTE: Default/not specifically set + revision 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1827,7 +1828,7 @@ cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ cluster KeypadInput = 1289 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum CECKeyCodeEnum : enum8 { kSelect = 0; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 978b5c4fdfcfcc..19c1d40500b91c 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -6380,25 +6380,30 @@ cluster Channel = 1284 { kRecordProgram = 0x8; } - bitmap RecordingFlagBitmap : bitmap32 { + bitmap RecordingFlagBitmap : bitmap8 { kScheduled = 0x1; kRecordSeries = 0x2; kRecorded = 0x4; } - struct ProgramCastStruct { + struct AdditionalInfoStruct { char_string name = 0; - char_string role = 1; + char_string value = 1; + } + + struct ProgramCastStruct { + long_char_string<256> name = 0; + long_char_string<256> role = 1; } struct ProgramCategoryStruct { - char_string category = 0; - optional char_string subCategory = 1; + long_char_string<256> category = 0; + optional long_char_string<256> subCategory = 1; } struct SeriesInfoStruct { - char_string season = 0; - char_string episode = 1; + long_char_string<256> season = 0; + long_char_string<256> episode = 1; } struct ChannelInfoStruct { @@ -6412,31 +6417,31 @@ cluster Channel = 1284 { } struct ProgramStruct { - char_string identifier = 0; + char_string<255> identifier = 0; ChannelInfoStruct channel = 1; epoch_s startTime = 2; epoch_s endTime = 3; - char_string title = 4; - optional char_string subtitle = 5; - optional char_string description = 6; + char_string<255> title = 4; + optional char_string<255> subtitle = 5; + optional long_char_string<8192> description = 6; optional char_string audioLanguages[] = 7; optional char_string ratings[] = 8; - optional char_string thumbnailUrl = 9; - optional char_string posterArtUrl = 10; - optional char_string dvbiUrl = 11; - optional char_string releaseDate = 12; - optional char_string parentalGuidanceText = 13; + optional long_char_string<8192> thumbnailUrl = 9; + optional long_char_string<8192> posterArtUrl = 10; + optional long_char_string<8192> dvbiUrl = 11; + optional char_string<30> releaseDate = 12; + optional char_string<255> parentalGuidanceText = 13; optional RecordingFlagBitmap recordingFlag = 14; optional nullable SeriesInfoStruct seriesInfo = 15; optional ProgramCategoryStruct categoryList[] = 16; optional ProgramCastStruct castList[] = 17; - optional ProgramCastStruct externalIDList[] = 18; + optional AdditionalInfoStruct externalIDList[] = 18; } struct PageTokenStruct { optional int16u limit = 0; - optional char_string after = 1; - optional char_string before = 2; + optional long_char_string<8192> after = 1; + optional long_char_string<8192> before = 2; } struct ChannelPagingStruct { @@ -6444,11 +6449,6 @@ cluster Channel = 1284 { optional nullable PageTokenStruct nextToken = 1; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; - } - struct LineupInfoStruct { char_string operatorName = 0; optional char_string lineupName = 1; @@ -6485,13 +6485,13 @@ cluster Channel = 1284 { } request struct GetProgramGuideRequest { - optional epoch_s startTime = 0; - optional epoch_s endTime = 1; + epoch_s startTime = 0; + epoch_s endTime = 1; optional ChannelInfoStruct channelList[] = 2; - optional PageTokenStruct pageToken = 3; - optional RecordingFlagBitmap recordingFlag = 4; + optional nullable PageTokenStruct pageToken = 3; + optional nullable RecordingFlagBitmap recordingFlag = 4; optional AdditionalInfoStruct externalIDList[] = 5; - optional octet_string data = 6; + optional octet_string<8092> data = 6; } response struct ProgramGuideResponse = 5 { @@ -6500,17 +6500,17 @@ cluster Channel = 1284 { } request struct RecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } request struct CancelRecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ @@ -6555,25 +6555,30 @@ cluster Channel = 1284 { kRecordProgram = 0x8; } - bitmap RecordingFlagBitmap : bitmap32 { + bitmap RecordingFlagBitmap : bitmap8 { kScheduled = 0x1; kRecordSeries = 0x2; kRecorded = 0x4; } - struct ProgramCastStruct { + struct AdditionalInfoStruct { char_string name = 0; - char_string role = 1; + char_string value = 1; + } + + struct ProgramCastStruct { + long_char_string<256> name = 0; + long_char_string<256> role = 1; } struct ProgramCategoryStruct { - char_string category = 0; - optional char_string subCategory = 1; + long_char_string<256> category = 0; + optional long_char_string<256> subCategory = 1; } struct SeriesInfoStruct { - char_string season = 0; - char_string episode = 1; + long_char_string<256> season = 0; + long_char_string<256> episode = 1; } struct ChannelInfoStruct { @@ -6587,31 +6592,31 @@ cluster Channel = 1284 { } struct ProgramStruct { - char_string identifier = 0; + char_string<255> identifier = 0; ChannelInfoStruct channel = 1; epoch_s startTime = 2; epoch_s endTime = 3; - char_string title = 4; - optional char_string subtitle = 5; - optional char_string description = 6; + char_string<255> title = 4; + optional char_string<255> subtitle = 5; + optional long_char_string<8192> description = 6; optional char_string audioLanguages[] = 7; optional char_string ratings[] = 8; - optional char_string thumbnailUrl = 9; - optional char_string posterArtUrl = 10; - optional char_string dvbiUrl = 11; - optional char_string releaseDate = 12; - optional char_string parentalGuidanceText = 13; + optional long_char_string<8192> thumbnailUrl = 9; + optional long_char_string<8192> posterArtUrl = 10; + optional long_char_string<8192> dvbiUrl = 11; + optional char_string<30> releaseDate = 12; + optional char_string<255> parentalGuidanceText = 13; optional RecordingFlagBitmap recordingFlag = 14; optional nullable SeriesInfoStruct seriesInfo = 15; optional ProgramCategoryStruct categoryList[] = 16; optional ProgramCastStruct castList[] = 17; - optional ProgramCastStruct externalIDList[] = 18; + optional AdditionalInfoStruct externalIDList[] = 18; } struct PageTokenStruct { optional int16u limit = 0; - optional char_string after = 1; - optional char_string before = 2; + optional long_char_string<8192> after = 1; + optional long_char_string<8192> before = 2; } struct ChannelPagingStruct { @@ -6619,11 +6624,6 @@ cluster Channel = 1284 { optional nullable PageTokenStruct nextToken = 1; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; - } - struct LineupInfoStruct { char_string operatorName = 0; optional char_string lineupName = 1; @@ -6660,13 +6660,13 @@ cluster Channel = 1284 { } request struct GetProgramGuideRequest { - optional epoch_s startTime = 0; - optional epoch_s endTime = 1; + epoch_s startTime = 0; + epoch_s endTime = 1; optional ChannelInfoStruct channelList[] = 2; - optional PageTokenStruct pageToken = 3; - optional RecordingFlagBitmap recordingFlag = 4; + optional nullable PageTokenStruct pageToken = 3; + optional nullable RecordingFlagBitmap recordingFlag = 4; optional AdditionalInfoStruct externalIDList[] = 5; - optional octet_string data = 6; + optional octet_string<8092> data = 6; } response struct ProgramGuideResponse = 5 { @@ -6675,17 +6675,17 @@ cluster Channel = 1284 { } request struct RecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } request struct CancelRecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ @@ -6718,9 +6718,9 @@ cluster TargetNavigator = 1285 { } info event TargetUpdated = 0 { - TargetInfoStruct targetList[] = 0; - int8u currentTarget = 1; - octet_string data = 2; + optional TargetInfoStruct targetList[] = 0; + optional int8u currentTarget = 1; + optional octet_string data = 2; } readonly attribute TargetInfoStruct targetList[] = 0; @@ -6762,9 +6762,9 @@ cluster TargetNavigator = 1285 { } info event TargetUpdated = 0 { - TargetInfoStruct targetList[] = 0; - int8u currentTarget = 1; - octet_string data = 2; + optional TargetInfoStruct targetList[] = 0; + optional int8u currentTarget = 1; + optional octet_string data = 2; } readonly attribute TargetInfoStruct targetList[] = 0; @@ -6841,12 +6841,13 @@ cluster MediaPlayback = 1286 { struct TrackAttributesStruct { char_string<32> languageCode = 0; - optional nullable char_string displayName = 1; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable long_char_string<256> displayName = 2; } struct TrackStruct { char_string<32> id = 0; - nullable TrackAttributesStruct trackAttributes = 1; + TrackAttributesStruct trackAttributes = 1; } struct PlaybackPositionStruct { @@ -6856,14 +6857,14 @@ cluster MediaPlayback = 1286 { info event StateChanged = 0 { PlaybackStateEnum currentState = 0; - EPOCH_US startTime = 1; - INT64U duration = 2; - PlaybackPositionStruct sampledPosition = 3; - single playbackSpeed = 4; - INT64U seekRangeEnd = 5; - INT64U seekRangeStart = 6; - optional OCTET_STRING data = 7; - boolean audioAdvanceUnmuted = 8; + optional epoch_us startTime = 1; + optional int64u duration = 2; + optional PlaybackPositionStruct sampledPosition = 3; + optional single playbackSpeed = 4; + optional int64u seekRangeEnd = 5; + optional int64u seekRangeStart = 6; + optional octet_string data = 7; + optional boolean audioAdvanceUnmuted = 8; } readonly attribute PlaybackStateEnum currentState = 0; @@ -6910,12 +6911,12 @@ cluster MediaPlayback = 1286 { } request struct ActivateAudioTrackRequest { - CHAR_STRING trackID = 0; - INT8U audioOutputIndex = 1; + char_string<32> trackID = 0; + optional nullable int8u audioOutputIndex = 1; } request struct ActivateTextTrackRequest { - CHAR_STRING trackID = 0; + char_string<32> trackID = 0; } /** Upon receipt, this SHALL play media. */ @@ -6999,12 +7000,13 @@ cluster MediaPlayback = 1286 { struct TrackAttributesStruct { char_string<32> languageCode = 0; - optional nullable char_string displayName = 1; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable long_char_string<256> displayName = 2; } struct TrackStruct { char_string<32> id = 0; - nullable TrackAttributesStruct trackAttributes = 1; + TrackAttributesStruct trackAttributes = 1; } struct PlaybackPositionStruct { @@ -7014,14 +7016,14 @@ cluster MediaPlayback = 1286 { info event StateChanged = 0 { PlaybackStateEnum currentState = 0; - EPOCH_US startTime = 1; - INT64U duration = 2; - PlaybackPositionStruct sampledPosition = 3; - single playbackSpeed = 4; - INT64U seekRangeEnd = 5; - INT64U seekRangeStart = 6; - optional OCTET_STRING data = 7; - boolean audioAdvanceUnmuted = 8; + optional epoch_us startTime = 1; + optional int64u duration = 2; + optional PlaybackPositionStruct sampledPosition = 3; + optional single playbackSpeed = 4; + optional int64u seekRangeEnd = 5; + optional int64u seekRangeStart = 6; + optional octet_string data = 7; + optional boolean audioAdvanceUnmuted = 8; } readonly attribute PlaybackStateEnum currentState = 0; @@ -7068,12 +7070,12 @@ cluster MediaPlayback = 1286 { } request struct ActivateAudioTrackRequest { - CHAR_STRING trackID = 0; - INT8U audioOutputIndex = 1; + char_string<32> trackID = 0; + optional nullable int8u audioOutputIndex = 1; } request struct ActivateTextTrackRequest { - CHAR_STRING trackID = 0; + char_string<32> trackID = 0; } /** Upon receipt, this SHALL play media. */ @@ -7108,7 +7110,7 @@ cluster MediaPlayback = 1286 { /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ cluster MediaInput = 1287 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum InputTypeEnum : enum8 { kInternal = 0; @@ -7166,7 +7168,7 @@ cluster MediaInput = 1287 { /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ cluster MediaInput = 1287 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum InputTypeEnum : enum8 { kInternal = 0; @@ -7224,7 +7226,7 @@ cluster MediaInput = 1287 { /** This cluster provides an interface for managing low power mode on a device. */ cluster LowPower = 1288 { - revision 1; // NOTE: Default/not specifically set + revision 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -7239,7 +7241,7 @@ cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ cluster KeypadInput = 1289 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum CECKeyCodeEnum : enum8 { kSelect = 0; @@ -7363,7 +7365,7 @@ cluster KeypadInput = 1289 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ cluster KeypadInput = 1289 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum CECKeyCodeEnum : enum8 { kSelect = 0; @@ -7487,7 +7489,7 @@ cluster KeypadInput = 1289 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ContentLauncher = 1290 { - revision 1; + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -7546,9 +7548,9 @@ cluster ContentLauncher = 1290 { bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; - kAdvancedSeek = 0x3; - kTextTracks = 0x4; - kAudioTracks = 0x5; + kAdvancedSeek = 0x4; + kTextTracks = 0x8; + kAudioTracks = 0x10; } bitmap SupportedProtocolsBitmap : bitmap32 { @@ -7564,24 +7566,24 @@ cluster ContentLauncher = 1290 { struct TrackPreferenceStruct { char_string<32> languageCode = 0; - optional CharacteristicEnum characteristics[] = 1; - int8u audioOutputIndex = 2; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable int8u audioOutputIndex = 2; } struct PlaybackPreferencesStruct { - int64u playbackPosition = 0; - TrackPreferenceStruct textTrack = 1; - optional TrackPreferenceStruct audioTracks[] = 2; + optional nullable int64u playbackPosition = 0; + optional nullable TrackPreferenceStruct textTrack = 1; + optional nullable TrackPreferenceStruct audioTracks[] = 2; } struct AdditionalInfoStruct { - char_string<256> name = 0; - char_string<8192> value = 1; + long_char_string<256> name = 0; + long_char_string<8192> value = 1; } struct ParameterStruct { ParameterEnum type = 0; - char_string<1024> value = 1; + long_char_string<1024> value = 1; optional AdditionalInfoStruct externalIDList[] = 2; } @@ -7590,13 +7592,13 @@ cluster ContentLauncher = 1290 { } struct StyleInformationStruct { - optional char_string<8192> imageURL = 0; + optional long_char_string<8192> imageURL = 0; optional char_string<9> color = 1; optional DimensionStruct size = 2; } struct BrandingInformationStruct { - char_string<256> providerName = 0; + long_char_string<256> providerName = 0; optional StyleInformationStruct background = 1; optional StyleInformationStruct logo = 2; optional StyleInformationStruct progressBar = 3; @@ -7625,6 +7627,7 @@ cluster ContentLauncher = 1290 { char_string contentURL = 0; optional char_string displayString = 1; optional BrandingInformationStruct brandingInformation = 2; + optional PlaybackPreferencesStruct playbackPreferences = 3; } response struct LauncherResponse = 2 { @@ -7640,7 +7643,7 @@ cluster ContentLauncher = 1290 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ContentLauncher = 1290 { - revision 1; + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -7699,9 +7702,9 @@ cluster ContentLauncher = 1290 { bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; - kAdvancedSeek = 0x3; - kTextTracks = 0x4; - kAudioTracks = 0x5; + kAdvancedSeek = 0x4; + kTextTracks = 0x8; + kAudioTracks = 0x10; } bitmap SupportedProtocolsBitmap : bitmap32 { @@ -7717,24 +7720,24 @@ cluster ContentLauncher = 1290 { struct TrackPreferenceStruct { char_string<32> languageCode = 0; - optional CharacteristicEnum characteristics[] = 1; - int8u audioOutputIndex = 2; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable int8u audioOutputIndex = 2; } struct PlaybackPreferencesStruct { - int64u playbackPosition = 0; - TrackPreferenceStruct textTrack = 1; - optional TrackPreferenceStruct audioTracks[] = 2; + optional nullable int64u playbackPosition = 0; + optional nullable TrackPreferenceStruct textTrack = 1; + optional nullable TrackPreferenceStruct audioTracks[] = 2; } struct AdditionalInfoStruct { - char_string<256> name = 0; - char_string<8192> value = 1; + long_char_string<256> name = 0; + long_char_string<8192> value = 1; } struct ParameterStruct { ParameterEnum type = 0; - char_string<1024> value = 1; + long_char_string<1024> value = 1; optional AdditionalInfoStruct externalIDList[] = 2; } @@ -7743,13 +7746,13 @@ cluster ContentLauncher = 1290 { } struct StyleInformationStruct { - optional char_string<8192> imageURL = 0; + optional long_char_string<8192> imageURL = 0; optional char_string<9> color = 1; optional DimensionStruct size = 2; } struct BrandingInformationStruct { - char_string<256> providerName = 0; + long_char_string<256> providerName = 0; optional StyleInformationStruct background = 1; optional StyleInformationStruct logo = 2; optional StyleInformationStruct progressBar = 3; @@ -7778,6 +7781,7 @@ cluster ContentLauncher = 1290 { char_string contentURL = 0; optional char_string displayString = 1; optional BrandingInformationStruct brandingInformation = 2; + optional PlaybackPreferencesStruct playbackPreferences = 3; } response struct LauncherResponse = 2 { @@ -7887,7 +7891,7 @@ cluster AudioOutput = 1291 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ApplicationLauncher = 1292 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum StatusEnum : enum8 { kSuccess = 0; @@ -7946,7 +7950,7 @@ cluster ApplicationLauncher = 1292 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ApplicationLauncher = 1292 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum StatusEnum : enum8 { kSuccess = 0; @@ -8005,7 +8009,7 @@ cluster ApplicationLauncher = 1292 { /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ cluster ApplicationBasic = 1293 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum ApplicationStatusEnum : enum8 { kStopped = 0; @@ -8037,7 +8041,7 @@ cluster ApplicationBasic = 1293 { /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ cluster ApplicationBasic = 1293 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum ApplicationStatusEnum : enum8 { kStopped = 0; @@ -8071,8 +8075,9 @@ cluster ApplicationBasic = 1293 { cluster AccountLogin = 1294 { revision 2; - critical event LoggedOut = 0 { + fabric_sensitive critical event access(read: administer) LoggedOut = 0 { optional node_id node = 0; + fabric_idx fabricIndex = 254; } readonly attribute command_id generatedCommandList[] = 65528; @@ -8112,8 +8117,9 @@ cluster AccountLogin = 1294 { cluster AccountLogin = 1294 { revision 2; - critical event LoggedOut = 0 { + fabric_sensitive critical event access(read: administer) LoggedOut = 0 { optional node_id node = 0; + fabric_idx fabricIndex = 254; } readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 1734e9d738f9b7..1e7a1776d1b6e0 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -6337,25 +6337,30 @@ cluster Channel = 1284 { kRecordProgram = 0x8; } - bitmap RecordingFlagBitmap : bitmap32 { + bitmap RecordingFlagBitmap : bitmap8 { kScheduled = 0x1; kRecordSeries = 0x2; kRecorded = 0x4; } - struct ProgramCastStruct { + struct AdditionalInfoStruct { char_string name = 0; - char_string role = 1; + char_string value = 1; + } + + struct ProgramCastStruct { + long_char_string<256> name = 0; + long_char_string<256> role = 1; } struct ProgramCategoryStruct { - char_string category = 0; - optional char_string subCategory = 1; + long_char_string<256> category = 0; + optional long_char_string<256> subCategory = 1; } struct SeriesInfoStruct { - char_string season = 0; - char_string episode = 1; + long_char_string<256> season = 0; + long_char_string<256> episode = 1; } struct ChannelInfoStruct { @@ -6369,31 +6374,31 @@ cluster Channel = 1284 { } struct ProgramStruct { - char_string identifier = 0; + char_string<255> identifier = 0; ChannelInfoStruct channel = 1; epoch_s startTime = 2; epoch_s endTime = 3; - char_string title = 4; - optional char_string subtitle = 5; - optional char_string description = 6; + char_string<255> title = 4; + optional char_string<255> subtitle = 5; + optional long_char_string<8192> description = 6; optional char_string audioLanguages[] = 7; optional char_string ratings[] = 8; - optional char_string thumbnailUrl = 9; - optional char_string posterArtUrl = 10; - optional char_string dvbiUrl = 11; - optional char_string releaseDate = 12; - optional char_string parentalGuidanceText = 13; + optional long_char_string<8192> thumbnailUrl = 9; + optional long_char_string<8192> posterArtUrl = 10; + optional long_char_string<8192> dvbiUrl = 11; + optional char_string<30> releaseDate = 12; + optional char_string<255> parentalGuidanceText = 13; optional RecordingFlagBitmap recordingFlag = 14; optional nullable SeriesInfoStruct seriesInfo = 15; optional ProgramCategoryStruct categoryList[] = 16; optional ProgramCastStruct castList[] = 17; - optional ProgramCastStruct externalIDList[] = 18; + optional AdditionalInfoStruct externalIDList[] = 18; } struct PageTokenStruct { optional int16u limit = 0; - optional char_string after = 1; - optional char_string before = 2; + optional long_char_string<8192> after = 1; + optional long_char_string<8192> before = 2; } struct ChannelPagingStruct { @@ -6401,11 +6406,6 @@ cluster Channel = 1284 { optional nullable PageTokenStruct nextToken = 1; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; - } - struct LineupInfoStruct { char_string operatorName = 0; optional char_string lineupName = 1; @@ -6442,13 +6442,13 @@ cluster Channel = 1284 { } request struct GetProgramGuideRequest { - optional epoch_s startTime = 0; - optional epoch_s endTime = 1; + epoch_s startTime = 0; + epoch_s endTime = 1; optional ChannelInfoStruct channelList[] = 2; - optional PageTokenStruct pageToken = 3; - optional RecordingFlagBitmap recordingFlag = 4; + optional nullable PageTokenStruct pageToken = 3; + optional nullable RecordingFlagBitmap recordingFlag = 4; optional AdditionalInfoStruct externalIDList[] = 5; - optional octet_string data = 6; + optional octet_string<8092> data = 6; } response struct ProgramGuideResponse = 5 { @@ -6457,17 +6457,17 @@ cluster Channel = 1284 { } request struct RecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } request struct CancelRecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ @@ -6512,25 +6512,30 @@ cluster Channel = 1284 { kRecordProgram = 0x8; } - bitmap RecordingFlagBitmap : bitmap32 { + bitmap RecordingFlagBitmap : bitmap8 { kScheduled = 0x1; kRecordSeries = 0x2; kRecorded = 0x4; } - struct ProgramCastStruct { + struct AdditionalInfoStruct { char_string name = 0; - char_string role = 1; + char_string value = 1; + } + + struct ProgramCastStruct { + long_char_string<256> name = 0; + long_char_string<256> role = 1; } struct ProgramCategoryStruct { - char_string category = 0; - optional char_string subCategory = 1; + long_char_string<256> category = 0; + optional long_char_string<256> subCategory = 1; } struct SeriesInfoStruct { - char_string season = 0; - char_string episode = 1; + long_char_string<256> season = 0; + long_char_string<256> episode = 1; } struct ChannelInfoStruct { @@ -6544,31 +6549,31 @@ cluster Channel = 1284 { } struct ProgramStruct { - char_string identifier = 0; + char_string<255> identifier = 0; ChannelInfoStruct channel = 1; epoch_s startTime = 2; epoch_s endTime = 3; - char_string title = 4; - optional char_string subtitle = 5; - optional char_string description = 6; + char_string<255> title = 4; + optional char_string<255> subtitle = 5; + optional long_char_string<8192> description = 6; optional char_string audioLanguages[] = 7; optional char_string ratings[] = 8; - optional char_string thumbnailUrl = 9; - optional char_string posterArtUrl = 10; - optional char_string dvbiUrl = 11; - optional char_string releaseDate = 12; - optional char_string parentalGuidanceText = 13; + optional long_char_string<8192> thumbnailUrl = 9; + optional long_char_string<8192> posterArtUrl = 10; + optional long_char_string<8192> dvbiUrl = 11; + optional char_string<30> releaseDate = 12; + optional char_string<255> parentalGuidanceText = 13; optional RecordingFlagBitmap recordingFlag = 14; optional nullable SeriesInfoStruct seriesInfo = 15; optional ProgramCategoryStruct categoryList[] = 16; optional ProgramCastStruct castList[] = 17; - optional ProgramCastStruct externalIDList[] = 18; + optional AdditionalInfoStruct externalIDList[] = 18; } struct PageTokenStruct { optional int16u limit = 0; - optional char_string after = 1; - optional char_string before = 2; + optional long_char_string<8192> after = 1; + optional long_char_string<8192> before = 2; } struct ChannelPagingStruct { @@ -6576,11 +6581,6 @@ cluster Channel = 1284 { optional nullable PageTokenStruct nextToken = 1; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; - } - struct LineupInfoStruct { char_string operatorName = 0; optional char_string lineupName = 1; @@ -6617,13 +6617,13 @@ cluster Channel = 1284 { } request struct GetProgramGuideRequest { - optional epoch_s startTime = 0; - optional epoch_s endTime = 1; + epoch_s startTime = 0; + epoch_s endTime = 1; optional ChannelInfoStruct channelList[] = 2; - optional PageTokenStruct pageToken = 3; - optional RecordingFlagBitmap recordingFlag = 4; + optional nullable PageTokenStruct pageToken = 3; + optional nullable RecordingFlagBitmap recordingFlag = 4; optional AdditionalInfoStruct externalIDList[] = 5; - optional octet_string data = 6; + optional octet_string<8092> data = 6; } response struct ProgramGuideResponse = 5 { @@ -6632,17 +6632,17 @@ cluster Channel = 1284 { } request struct RecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } request struct CancelRecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ @@ -6675,9 +6675,9 @@ cluster TargetNavigator = 1285 { } info event TargetUpdated = 0 { - TargetInfoStruct targetList[] = 0; - int8u currentTarget = 1; - octet_string data = 2; + optional TargetInfoStruct targetList[] = 0; + optional int8u currentTarget = 1; + optional octet_string data = 2; } readonly attribute TargetInfoStruct targetList[] = 0; @@ -6719,9 +6719,9 @@ cluster TargetNavigator = 1285 { } info event TargetUpdated = 0 { - TargetInfoStruct targetList[] = 0; - int8u currentTarget = 1; - octet_string data = 2; + optional TargetInfoStruct targetList[] = 0; + optional int8u currentTarget = 1; + optional octet_string data = 2; } readonly attribute TargetInfoStruct targetList[] = 0; @@ -6798,12 +6798,13 @@ cluster MediaPlayback = 1286 { struct TrackAttributesStruct { char_string<32> languageCode = 0; - optional nullable char_string displayName = 1; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable long_char_string<256> displayName = 2; } struct TrackStruct { char_string<32> id = 0; - nullable TrackAttributesStruct trackAttributes = 1; + TrackAttributesStruct trackAttributes = 1; } struct PlaybackPositionStruct { @@ -6813,14 +6814,14 @@ cluster MediaPlayback = 1286 { info event StateChanged = 0 { PlaybackStateEnum currentState = 0; - EPOCH_US startTime = 1; - INT64U duration = 2; - PlaybackPositionStruct sampledPosition = 3; - single playbackSpeed = 4; - INT64U seekRangeEnd = 5; - INT64U seekRangeStart = 6; - optional OCTET_STRING data = 7; - boolean audioAdvanceUnmuted = 8; + optional epoch_us startTime = 1; + optional int64u duration = 2; + optional PlaybackPositionStruct sampledPosition = 3; + optional single playbackSpeed = 4; + optional int64u seekRangeEnd = 5; + optional int64u seekRangeStart = 6; + optional octet_string data = 7; + optional boolean audioAdvanceUnmuted = 8; } readonly attribute PlaybackStateEnum currentState = 0; @@ -6867,12 +6868,12 @@ cluster MediaPlayback = 1286 { } request struct ActivateAudioTrackRequest { - CHAR_STRING trackID = 0; - INT8U audioOutputIndex = 1; + char_string<32> trackID = 0; + optional nullable int8u audioOutputIndex = 1; } request struct ActivateTextTrackRequest { - CHAR_STRING trackID = 0; + char_string<32> trackID = 0; } /** Upon receipt, this SHALL play media. */ @@ -6956,12 +6957,13 @@ cluster MediaPlayback = 1286 { struct TrackAttributesStruct { char_string<32> languageCode = 0; - optional nullable char_string displayName = 1; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable long_char_string<256> displayName = 2; } struct TrackStruct { char_string<32> id = 0; - nullable TrackAttributesStruct trackAttributes = 1; + TrackAttributesStruct trackAttributes = 1; } struct PlaybackPositionStruct { @@ -6971,14 +6973,14 @@ cluster MediaPlayback = 1286 { info event StateChanged = 0 { PlaybackStateEnum currentState = 0; - EPOCH_US startTime = 1; - INT64U duration = 2; - PlaybackPositionStruct sampledPosition = 3; - single playbackSpeed = 4; - INT64U seekRangeEnd = 5; - INT64U seekRangeStart = 6; - optional OCTET_STRING data = 7; - boolean audioAdvanceUnmuted = 8; + optional epoch_us startTime = 1; + optional int64u duration = 2; + optional PlaybackPositionStruct sampledPosition = 3; + optional single playbackSpeed = 4; + optional int64u seekRangeEnd = 5; + optional int64u seekRangeStart = 6; + optional octet_string data = 7; + optional boolean audioAdvanceUnmuted = 8; } readonly attribute PlaybackStateEnum currentState = 0; @@ -7025,12 +7027,12 @@ cluster MediaPlayback = 1286 { } request struct ActivateAudioTrackRequest { - CHAR_STRING trackID = 0; - INT8U audioOutputIndex = 1; + char_string<32> trackID = 0; + optional nullable int8u audioOutputIndex = 1; } request struct ActivateTextTrackRequest { - CHAR_STRING trackID = 0; + char_string<32> trackID = 0; } /** Upon receipt, this SHALL play media. */ @@ -7065,7 +7067,7 @@ cluster MediaPlayback = 1286 { /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ cluster MediaInput = 1287 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum InputTypeEnum : enum8 { kInternal = 0; @@ -7123,7 +7125,7 @@ cluster MediaInput = 1287 { /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ cluster MediaInput = 1287 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum InputTypeEnum : enum8 { kInternal = 0; @@ -7181,7 +7183,7 @@ cluster MediaInput = 1287 { /** This cluster provides an interface for managing low power mode on a device. */ cluster LowPower = 1288 { - revision 1; // NOTE: Default/not specifically set + revision 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -7196,7 +7198,7 @@ cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ cluster KeypadInput = 1289 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum CECKeyCodeEnum : enum8 { kSelect = 0; @@ -7320,7 +7322,7 @@ cluster KeypadInput = 1289 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ cluster KeypadInput = 1289 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum CECKeyCodeEnum : enum8 { kSelect = 0; @@ -7444,7 +7446,7 @@ cluster KeypadInput = 1289 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ContentLauncher = 1290 { - revision 1; + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -7503,9 +7505,9 @@ cluster ContentLauncher = 1290 { bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; - kAdvancedSeek = 0x3; - kTextTracks = 0x4; - kAudioTracks = 0x5; + kAdvancedSeek = 0x4; + kTextTracks = 0x8; + kAudioTracks = 0x10; } bitmap SupportedProtocolsBitmap : bitmap32 { @@ -7521,24 +7523,24 @@ cluster ContentLauncher = 1290 { struct TrackPreferenceStruct { char_string<32> languageCode = 0; - optional CharacteristicEnum characteristics[] = 1; - int8u audioOutputIndex = 2; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable int8u audioOutputIndex = 2; } struct PlaybackPreferencesStruct { - int64u playbackPosition = 0; - TrackPreferenceStruct textTrack = 1; - optional TrackPreferenceStruct audioTracks[] = 2; + optional nullable int64u playbackPosition = 0; + optional nullable TrackPreferenceStruct textTrack = 1; + optional nullable TrackPreferenceStruct audioTracks[] = 2; } struct AdditionalInfoStruct { - char_string<256> name = 0; - char_string<8192> value = 1; + long_char_string<256> name = 0; + long_char_string<8192> value = 1; } struct ParameterStruct { ParameterEnum type = 0; - char_string<1024> value = 1; + long_char_string<1024> value = 1; optional AdditionalInfoStruct externalIDList[] = 2; } @@ -7547,13 +7549,13 @@ cluster ContentLauncher = 1290 { } struct StyleInformationStruct { - optional char_string<8192> imageURL = 0; + optional long_char_string<8192> imageURL = 0; optional char_string<9> color = 1; optional DimensionStruct size = 2; } struct BrandingInformationStruct { - char_string<256> providerName = 0; + long_char_string<256> providerName = 0; optional StyleInformationStruct background = 1; optional StyleInformationStruct logo = 2; optional StyleInformationStruct progressBar = 3; @@ -7582,6 +7584,7 @@ cluster ContentLauncher = 1290 { char_string contentURL = 0; optional char_string displayString = 1; optional BrandingInformationStruct brandingInformation = 2; + optional PlaybackPreferencesStruct playbackPreferences = 3; } response struct LauncherResponse = 2 { @@ -7597,7 +7600,7 @@ cluster ContentLauncher = 1290 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ContentLauncher = 1290 { - revision 1; + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -7656,9 +7659,9 @@ cluster ContentLauncher = 1290 { bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; - kAdvancedSeek = 0x3; - kTextTracks = 0x4; - kAudioTracks = 0x5; + kAdvancedSeek = 0x4; + kTextTracks = 0x8; + kAudioTracks = 0x10; } bitmap SupportedProtocolsBitmap : bitmap32 { @@ -7674,24 +7677,24 @@ cluster ContentLauncher = 1290 { struct TrackPreferenceStruct { char_string<32> languageCode = 0; - optional CharacteristicEnum characteristics[] = 1; - int8u audioOutputIndex = 2; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable int8u audioOutputIndex = 2; } struct PlaybackPreferencesStruct { - int64u playbackPosition = 0; - TrackPreferenceStruct textTrack = 1; - optional TrackPreferenceStruct audioTracks[] = 2; + optional nullable int64u playbackPosition = 0; + optional nullable TrackPreferenceStruct textTrack = 1; + optional nullable TrackPreferenceStruct audioTracks[] = 2; } struct AdditionalInfoStruct { - char_string<256> name = 0; - char_string<8192> value = 1; + long_char_string<256> name = 0; + long_char_string<8192> value = 1; } struct ParameterStruct { ParameterEnum type = 0; - char_string<1024> value = 1; + long_char_string<1024> value = 1; optional AdditionalInfoStruct externalIDList[] = 2; } @@ -7700,13 +7703,13 @@ cluster ContentLauncher = 1290 { } struct StyleInformationStruct { - optional char_string<8192> imageURL = 0; + optional long_char_string<8192> imageURL = 0; optional char_string<9> color = 1; optional DimensionStruct size = 2; } struct BrandingInformationStruct { - char_string<256> providerName = 0; + long_char_string<256> providerName = 0; optional StyleInformationStruct background = 1; optional StyleInformationStruct logo = 2; optional StyleInformationStruct progressBar = 3; @@ -7735,6 +7738,7 @@ cluster ContentLauncher = 1290 { char_string contentURL = 0; optional char_string displayString = 1; optional BrandingInformationStruct brandingInformation = 2; + optional PlaybackPreferencesStruct playbackPreferences = 3; } response struct LauncherResponse = 2 { @@ -7844,7 +7848,7 @@ cluster AudioOutput = 1291 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ApplicationLauncher = 1292 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum StatusEnum : enum8 { kSuccess = 0; @@ -7903,7 +7907,7 @@ cluster ApplicationLauncher = 1292 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ApplicationLauncher = 1292 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum StatusEnum : enum8 { kSuccess = 0; @@ -7962,7 +7966,7 @@ cluster ApplicationLauncher = 1292 { /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ cluster ApplicationBasic = 1293 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum ApplicationStatusEnum : enum8 { kStopped = 0; @@ -7994,7 +7998,7 @@ cluster ApplicationBasic = 1293 { /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ cluster ApplicationBasic = 1293 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum ApplicationStatusEnum : enum8 { kStopped = 0; @@ -8028,8 +8032,9 @@ cluster ApplicationBasic = 1293 { cluster AccountLogin = 1294 { revision 2; - critical event LoggedOut = 0 { + fabric_sensitive critical event access(read: administer) LoggedOut = 0 { optional node_id node = 0; + fabric_idx fabricIndex = 254; } readonly attribute command_id generatedCommandList[] = 65528; @@ -8069,8 +8074,9 @@ cluster AccountLogin = 1294 { cluster AccountLogin = 1294 { revision 2; - critical event LoggedOut = 0 { + fabric_sensitive critical event access(read: administer) LoggedOut = 0 { optional node_id node = 0; + fabric_idx fabricIndex = 254; } readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 6238ccf626c677..ec2288edac187b 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -2174,25 +2174,30 @@ cluster Channel = 1284 { kRecordProgram = 0x8; } - bitmap RecordingFlagBitmap : bitmap32 { + bitmap RecordingFlagBitmap : bitmap8 { kScheduled = 0x1; kRecordSeries = 0x2; kRecorded = 0x4; } - struct ProgramCastStruct { + struct AdditionalInfoStruct { char_string name = 0; - char_string role = 1; + char_string value = 1; + } + + struct ProgramCastStruct { + long_char_string<256> name = 0; + long_char_string<256> role = 1; } struct ProgramCategoryStruct { - char_string category = 0; - optional char_string subCategory = 1; + long_char_string<256> category = 0; + optional long_char_string<256> subCategory = 1; } struct SeriesInfoStruct { - char_string season = 0; - char_string episode = 1; + long_char_string<256> season = 0; + long_char_string<256> episode = 1; } struct ChannelInfoStruct { @@ -2206,31 +2211,31 @@ cluster Channel = 1284 { } struct ProgramStruct { - char_string identifier = 0; + char_string<255> identifier = 0; ChannelInfoStruct channel = 1; epoch_s startTime = 2; epoch_s endTime = 3; - char_string title = 4; - optional char_string subtitle = 5; - optional char_string description = 6; + char_string<255> title = 4; + optional char_string<255> subtitle = 5; + optional long_char_string<8192> description = 6; optional char_string audioLanguages[] = 7; optional char_string ratings[] = 8; - optional char_string thumbnailUrl = 9; - optional char_string posterArtUrl = 10; - optional char_string dvbiUrl = 11; - optional char_string releaseDate = 12; - optional char_string parentalGuidanceText = 13; + optional long_char_string<8192> thumbnailUrl = 9; + optional long_char_string<8192> posterArtUrl = 10; + optional long_char_string<8192> dvbiUrl = 11; + optional char_string<30> releaseDate = 12; + optional char_string<255> parentalGuidanceText = 13; optional RecordingFlagBitmap recordingFlag = 14; optional nullable SeriesInfoStruct seriesInfo = 15; optional ProgramCategoryStruct categoryList[] = 16; optional ProgramCastStruct castList[] = 17; - optional ProgramCastStruct externalIDList[] = 18; + optional AdditionalInfoStruct externalIDList[] = 18; } struct PageTokenStruct { optional int16u limit = 0; - optional char_string after = 1; - optional char_string before = 2; + optional long_char_string<8192> after = 1; + optional long_char_string<8192> before = 2; } struct ChannelPagingStruct { @@ -2238,11 +2243,6 @@ cluster Channel = 1284 { optional nullable PageTokenStruct nextToken = 1; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; - } - struct LineupInfoStruct { char_string operatorName = 0; optional char_string lineupName = 1; @@ -2279,13 +2279,13 @@ cluster Channel = 1284 { } request struct GetProgramGuideRequest { - optional epoch_s startTime = 0; - optional epoch_s endTime = 1; + epoch_s startTime = 0; + epoch_s endTime = 1; optional ChannelInfoStruct channelList[] = 2; - optional PageTokenStruct pageToken = 3; - optional RecordingFlagBitmap recordingFlag = 4; + optional nullable PageTokenStruct pageToken = 3; + optional nullable RecordingFlagBitmap recordingFlag = 4; optional AdditionalInfoStruct externalIDList[] = 5; - optional octet_string data = 6; + optional octet_string<8092> data = 6; } response struct ProgramGuideResponse = 5 { @@ -2294,17 +2294,17 @@ cluster Channel = 1284 { } request struct RecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } request struct CancelRecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ @@ -2337,9 +2337,9 @@ cluster TargetNavigator = 1285 { } info event TargetUpdated = 0 { - TargetInfoStruct targetList[] = 0; - int8u currentTarget = 1; - octet_string data = 2; + optional TargetInfoStruct targetList[] = 0; + optional int8u currentTarget = 1; + optional octet_string data = 2; } readonly attribute TargetInfoStruct targetList[] = 0; @@ -2416,12 +2416,13 @@ cluster MediaPlayback = 1286 { struct TrackAttributesStruct { char_string<32> languageCode = 0; - optional nullable char_string displayName = 1; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable long_char_string<256> displayName = 2; } struct TrackStruct { char_string<32> id = 0; - nullable TrackAttributesStruct trackAttributes = 1; + TrackAttributesStruct trackAttributes = 1; } struct PlaybackPositionStruct { @@ -2431,14 +2432,14 @@ cluster MediaPlayback = 1286 { info event StateChanged = 0 { PlaybackStateEnum currentState = 0; - EPOCH_US startTime = 1; - INT64U duration = 2; - PlaybackPositionStruct sampledPosition = 3; - single playbackSpeed = 4; - INT64U seekRangeEnd = 5; - INT64U seekRangeStart = 6; - optional OCTET_STRING data = 7; - boolean audioAdvanceUnmuted = 8; + optional epoch_us startTime = 1; + optional int64u duration = 2; + optional PlaybackPositionStruct sampledPosition = 3; + optional single playbackSpeed = 4; + optional int64u seekRangeEnd = 5; + optional int64u seekRangeStart = 6; + optional octet_string data = 7; + optional boolean audioAdvanceUnmuted = 8; } readonly attribute PlaybackStateEnum currentState = 0; @@ -2485,12 +2486,12 @@ cluster MediaPlayback = 1286 { } request struct ActivateAudioTrackRequest { - CHAR_STRING trackID = 0; - INT8U audioOutputIndex = 1; + char_string<32> trackID = 0; + optional nullable int8u audioOutputIndex = 1; } request struct ActivateTextTrackRequest { - CHAR_STRING trackID = 0; + char_string<32> trackID = 0; } /** Upon receipt, this SHALL play media. */ @@ -2525,7 +2526,7 @@ cluster MediaPlayback = 1286 { /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ cluster MediaInput = 1287 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum InputTypeEnum : enum8 { kInternal = 0; @@ -2583,7 +2584,7 @@ cluster MediaInput = 1287 { /** This cluster provides an interface for managing low power mode on a device. */ cluster LowPower = 1288 { - revision 1; // NOTE: Default/not specifically set + revision 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -2598,7 +2599,7 @@ cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ cluster KeypadInput = 1289 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum CECKeyCodeEnum : enum8 { kSelect = 0; @@ -2722,7 +2723,7 @@ cluster KeypadInput = 1289 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ContentLauncher = 1290 { - revision 1; + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -2781,9 +2782,9 @@ cluster ContentLauncher = 1290 { bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; - kAdvancedSeek = 0x3; - kTextTracks = 0x4; - kAudioTracks = 0x5; + kAdvancedSeek = 0x4; + kTextTracks = 0x8; + kAudioTracks = 0x10; } bitmap SupportedProtocolsBitmap : bitmap32 { @@ -2799,24 +2800,24 @@ cluster ContentLauncher = 1290 { struct TrackPreferenceStruct { char_string<32> languageCode = 0; - optional CharacteristicEnum characteristics[] = 1; - int8u audioOutputIndex = 2; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable int8u audioOutputIndex = 2; } struct PlaybackPreferencesStruct { - int64u playbackPosition = 0; - TrackPreferenceStruct textTrack = 1; - optional TrackPreferenceStruct audioTracks[] = 2; + optional nullable int64u playbackPosition = 0; + optional nullable TrackPreferenceStruct textTrack = 1; + optional nullable TrackPreferenceStruct audioTracks[] = 2; } struct AdditionalInfoStruct { - char_string<256> name = 0; - char_string<8192> value = 1; + long_char_string<256> name = 0; + long_char_string<8192> value = 1; } struct ParameterStruct { ParameterEnum type = 0; - char_string<1024> value = 1; + long_char_string<1024> value = 1; optional AdditionalInfoStruct externalIDList[] = 2; } @@ -2825,13 +2826,13 @@ cluster ContentLauncher = 1290 { } struct StyleInformationStruct { - optional char_string<8192> imageURL = 0; + optional long_char_string<8192> imageURL = 0; optional char_string<9> color = 1; optional DimensionStruct size = 2; } struct BrandingInformationStruct { - char_string<256> providerName = 0; + long_char_string<256> providerName = 0; optional StyleInformationStruct background = 1; optional StyleInformationStruct logo = 2; optional StyleInformationStruct progressBar = 3; @@ -2860,6 +2861,7 @@ cluster ContentLauncher = 1290 { char_string contentURL = 0; optional char_string displayString = 1; optional BrandingInformationStruct brandingInformation = 2; + optional PlaybackPreferencesStruct playbackPreferences = 3; } response struct LauncherResponse = 2 { @@ -2922,7 +2924,7 @@ cluster AudioOutput = 1291 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ApplicationLauncher = 1292 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum StatusEnum : enum8 { kSuccess = 0; @@ -2981,7 +2983,7 @@ cluster ApplicationLauncher = 1292 { /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ cluster ApplicationBasic = 1293 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum ApplicationStatusEnum : enum8 { kStopped = 0; @@ -3015,8 +3017,9 @@ cluster ApplicationBasic = 1293 { cluster AccountLogin = 1294 { revision 2; - critical event LoggedOut = 0 { + fabric_sensitive critical event access(read: administer) LoggedOut = 0 { optional node_id node = 0; + fabric_idx fabricIndex = 254; } readonly attribute command_id generatedCommandList[] = 65528; @@ -3054,7 +3057,17 @@ cluster AccountLogin = 1294 { /** This cluster is used for managing the content control (including "parental control") settings on a media device such as a TV, or Set-top Box. */ provisional cluster ContentControl = 1295 { - revision 1; // NOTE: Default/not specifically set + revision 1; + + bitmap DayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + } bitmap Feature : bitmap32 { kScreenTime = 0x1; @@ -3064,14 +3077,42 @@ provisional cluster ContentControl = 1295 { kScheduledContentRating = 0x10; } + struct TimePeriodStruct { + int8u startHour = 0; + int8u startMinute = 1; + int8u endHour = 2; + int8u endMinute = 3; + } + + struct TimeWindowStruct { + nullable int16u timeWindowIndex = 0; + DayOfWeekBitmap dayOfWeek = 1; + TimePeriodStruct timePeriod[] = 2; + } + + struct AppInfoStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; + } + + struct BlockChannelStruct { + nullable int16u blockChannelIndex = 0; + int16u majorNumber = 1; + int16u minorNumber = 2; + optional char_string identifier = 3; + } + struct RatingNameStruct { - char_string ratingName = 0; - optional char_string ratingNameDesc = 1; + char_string<8> ratingName = 0; + optional char_string<64> ratingNameDesc = 1; } info event RemainingScreenTimeExpired = 0 { } + info event EnteringBlockContentTimeWindow = 1 { + } + readonly attribute boolean enabled = 0; readonly attribute optional RatingNameStruct onDemandRatings[] = 1; readonly attribute optional char_string<8> onDemandRatingThreshold = 2; @@ -3079,7 +3120,10 @@ provisional cluster ContentControl = 1295 { readonly attribute optional char_string<8> scheduledContentRatingThreshold = 4; readonly attribute optional elapsed_s screenDailyTime = 5; readonly attribute optional elapsed_s remainingScreenTime = 6; - readonly attribute boolean blockUnrated = 7; + readonly attribute optional boolean blockUnrated = 7; + readonly attribute optional BlockChannelStruct blockChannelList[] = 8; + readonly attribute optional AppInfoStruct blockApplicationList[] = 9; + readonly attribute optional TimeWindowStruct blockContentTimeWindow[] = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3088,8 +3132,8 @@ provisional cluster ContentControl = 1295 { readonly attribute int16u clusterRevision = 65533; request struct UpdatePINRequest { - optional char_string oldPIN = 0; - char_string newPIN = 1; + char_string<6> oldPIN = 0; + char_string<6> newPIN = 1; } response struct ResetPINResponse = 2 { @@ -3097,8 +3141,8 @@ provisional cluster ContentControl = 1295 { } request struct AddBonusTimeRequest { - optional char_string PINCode = 0; - optional elapsed_s bonusTime = 1; + optional char_string<6> PINCode = 0; + elapsed_s bonusTime = 1; } request struct SetScreenDailyTimeRequest { @@ -3106,38 +3150,74 @@ provisional cluster ContentControl = 1295 { } request struct SetOnDemandRatingThresholdRequest { - char_string rating = 0; + char_string<8> rating = 0; } request struct SetScheduledContentRatingThresholdRequest { - char_string rating = 0; + char_string<8> rating = 0; + } + + request struct AddBlockChannelsRequest { + BlockChannelStruct channels[] = 0; + } + + request struct RemoveBlockChannelsRequest { + int16u channelIndexes[] = 0; + } + + request struct AddBlockApplicationsRequest { + AppInfoStruct applications[] = 0; + } + + request struct RemoveBlockApplicationsRequest { + AppInfoStruct applications[] = 0; + } + + request struct SetBlockContentTimeWindowRequest { + TimeWindowStruct timeWindow = 0; + } + + request struct RemoveBlockContentTimeWindowRequest { + int16u timeWindowIndexes[] = 0; } /** The purpose of this command is to update the PIN used for protecting configuration of the content control settings. Upon success, the old PIN SHALL no longer work. The PIN is used to ensure that only the Node (or User) with the PIN code can make changes to the Content Control settings, for example, turn off Content Controls or modify the ScreenDailyTime. The PIN is composed of a numeric string of up to 6 human readable characters (displayable) . Upon receipt of this command, the media device SHALL check if the OldPIN field of this command is the same as the current PIN. If the PINs are the same, then the PIN code SHALL be set to NewPIN. Otherwise a response with InvalidPINCode error status SHALL be returned. The media device MAY provide a default PIN to the User via an out of band mechanism. For security reasons, it is recommended that a client encourage the user to update the PIN from its default value when performing configuration of the Content Control settings exposed by this cluster. The ResetPIN command can also be used to obtain the default PIN. */ - command UpdatePIN(UpdatePINRequest): DefaultSuccess = 0; + timed command access(invoke: manage) UpdatePIN(UpdatePINRequest): DefaultSuccess = 0; /** The purpose of this command is to reset the PIN. If this command is executed successfully, a ResetPINResponse command with a new PIN SHALL be returned. */ - command ResetPIN(): ResetPINResponse = 1; + timed command access(invoke: administer) ResetPIN(): ResetPINResponse = 1; /** The purpose of this command is to turn on the Content Control feature on a media device. On receipt of the Enable command, the media device SHALL set the Enabled attribute to TRUE. */ - command Enable(): DefaultSuccess = 3; + timed command access(invoke: manage) Enable(): DefaultSuccess = 3; /** The purpose of this command is to turn off the Content Control feature on a media device. On receipt of the Disable command, the media device SHALL set the Enabled attribute to FALSE. */ - command Disable(): DefaultSuccess = 4; + timed command access(invoke: manage) Disable(): DefaultSuccess = 4; /** The purpose of this command is to add the extra screen time for the user. If a client with Operate privilege invokes this command, the media device SHALL check whether the PINCode passed in the command matches the current PINCode value. If these match, then the RemainingScreenTime attribute SHALL be increased by the specified BonusTime value. If the PINs do not match, then a response with InvalidPINCode error status SHALL be returned, and no changes SHALL be made to RemainingScreenTime. If a client with Manage privilege or greater invokes this command, the media device SHALL ignore the PINCode field and directly increase the RemainingScreenTime attribute by the specified BonusTime value. A server that does not support the PM feature SHALL respond with InvalidPINCode to clients that only have Operate privilege unless: It has been provided with the PIN value to expect via an out of band mechanism, and The client has provided a PINCode that matches the expected PIN value. */ command AddBonusTime(AddBonusTimeRequest): DefaultSuccess = 5; /** The purpose of this command is to set the ScreenDailyTime attribute. On receipt of the SetScreenDailyTime command, the media device SHALL set the ScreenDailyTime attribute to the ScreenTime value. */ - command SetScreenDailyTime(SetScreenDailyTimeRequest): DefaultSuccess = 6; + command access(invoke: manage) SetScreenDailyTime(SetScreenDailyTimeRequest): DefaultSuccess = 6; /** The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the BlockUnratedContent command, the media device SHALL set the BlockUnrated attribute to TRUE. */ - command BlockUnratedContent(): DefaultSuccess = 7; + command access(invoke: manage) BlockUnratedContent(): DefaultSuccess = 7; /** The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the UnblockUnratedContent command, the media device SHALL set the BlockUnrated attribute to FALSE. */ - command UnblockUnratedContent(): DefaultSuccess = 8; + command access(invoke: manage) UnblockUnratedContent(): DefaultSuccess = 8; /** The purpose of this command is to set the OnDemandRatingThreshold attribute. On receipt of the SetOnDemandRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the OnDemandRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. */ - command SetOnDemandRatingThreshold(SetOnDemandRatingThresholdRequest): DefaultSuccess = 9; + command access(invoke: manage) SetOnDemandRatingThreshold(SetOnDemandRatingThresholdRequest): DefaultSuccess = 9; /** The purpose of this command is to set ScheduledContentRatingThreshold attribute. On receipt of the SetScheduledContentRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the ScheduledContentRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. */ - command SetScheduledContentRatingThreshold(SetScheduledContentRatingThresholdRequest): DefaultSuccess = 10; + command access(invoke: manage) SetScheduledContentRatingThreshold(SetScheduledContentRatingThresholdRequest): DefaultSuccess = 10; + /** The purpose of this command is to set BlockChannelList attribute. */ + command access(invoke: manage) AddBlockChannels(AddBlockChannelsRequest): DefaultSuccess = 11; + /** The purpose of this command is to remove channels from the BlockChannelList attribute. */ + command access(invoke: manage) RemoveBlockChannels(RemoveBlockChannelsRequest): DefaultSuccess = 12; + /** The purpose of this command is to set applications to the BlockApplicationList attribute. */ + command access(invoke: manage) AddBlockApplications(AddBlockApplicationsRequest): DefaultSuccess = 13; + /** The purpose of this command is to remove applications from the BlockApplicationList attribute. */ + command access(invoke: manage) RemoveBlockApplications(RemoveBlockApplicationsRequest): DefaultSuccess = 14; + /** The purpose of this command is to set the BlockContentTimeWindow attribute. */ + command access(invoke: manage) SetBlockContentTimeWindow(SetBlockContentTimeWindowRequest): DefaultSuccess = 15; + /** The purpose of this command is to remove the selected time windows from the BlockContentTimeWindow attribute. */ + command access(invoke: manage) RemoveBlockContentTimeWindow(RemoveBlockContentTimeWindowRequest): DefaultSuccess = 16; } /** This cluster provides an interface for sending targeted commands to an Observer of a Content App on a Video Player device such as a Streaming Media Player, Smart TV or Smart Screen. The cluster server for Content App Observer is implemented by an endpoint that communicates with a Content App, such as a Casting Video Client. The cluster client for Content App Observer is implemented by a Content App endpoint. A Content App is informed of the NodeId of an Observer when a binding is set on the Content App. The Content App can then send the ContentAppMessage to the Observer (server cluster), and the Observer responds with a ContentAppMessageResponse. */ provisional cluster ContentAppObserver = 1296 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum StatusEnum : enum8 { kSuccess = 0; @@ -3152,14 +3232,14 @@ provisional cluster ContentAppObserver = 1296 { readonly attribute int16u clusterRevision = 65533; request struct ContentAppMessageRequest { - optional char_string data = 0; - char_string encodingHint = 1; + long_char_string<500> data = 0; + optional char_string<100> encodingHint = 1; } response struct ContentAppMessageResponse = 1 { StatusEnum status = 0; - optional char_string data = 1; - optional char_string encodingHint = 2; + optional long_char_string<500> data = 1; + optional char_string<100> encodingHint = 2; } /** Upon receipt, the data field MAY be parsed and interpreted. Message encoding is specific to the Content App. A Content App MAY when possible read attributes from the Basic Information Cluster on the Observer and use this to determine the Message encoding. */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.mm index fc563f52649d95..b3bd03e674b6da 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.mm @@ -2893,30 +2893,50 @@ - (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aE *aError = err; return nil; } - if (_cppValue.Value().trackAttributes.IsNull()) { - value.trackAttributes = nil; - } else { - value.trackAttributes = [MCMediaPlaybackClusterTrackAttributesStruct new]; - value.trackAttributes.languageCode = AsString(_cppValue.Value().trackAttributes.Value().languageCode); - if (value.trackAttributes.languageCode == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - if (_cppValue.Value().trackAttributes.Value().displayName.HasValue()) { - if (_cppValue.Value().trackAttributes.Value().displayName.Value().IsNull()) { - value.trackAttributes.displayName = nil; - } else { - value.trackAttributes.displayName = AsString(_cppValue.Value().trackAttributes.Value().displayName.Value().Value()); - if (value.trackAttributes.displayName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + value.trackAttributes = [MCMediaPlaybackClusterTrackAttributesStruct new]; + value.trackAttributes.languageCode = AsString(_cppValue.Value().trackAttributes.languageCode); + if (value.trackAttributes.languageCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (_cppValue.Value().trackAttributes.characteristics.HasValue()) { + if (_cppValue.Value().trackAttributes.characteristics.Value().IsNull()) { + value.trackAttributes.characteristics = nil; + } else { + { // Scope for our temporary variables + auto * array_5 = [NSMutableArray new]; + auto iter_5 = _cppValue.Value().trackAttributes.characteristics.Value().Value().begin(); + while (iter_5.Next()) { + auto & entry_5 = iter_5.GetValue(); + NSNumber * newElement_5; + newElement_5 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_5)]; + [array_5 addObject:newElement_5]; + } + CHIP_ERROR err = iter_5.GetStatus(); + if (err != CHIP_NO_ERROR) { *aError = err; return nil; } + value.trackAttributes.characteristics = array_5; } - } else { + } + } else { + value.trackAttributes.characteristics = nil; + } + if (_cppValue.Value().trackAttributes.displayName.HasValue()) { + if (_cppValue.Value().trackAttributes.displayName.Value().IsNull()) { value.trackAttributes.displayName = nil; + } else { + value.trackAttributes.displayName = AsString(_cppValue.Value().trackAttributes.displayName.Value().Value()); + if (value.trackAttributes.displayName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } } + } else { + value.trackAttributes.displayName = nil; } } return value; @@ -2980,30 +3000,50 @@ - (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aE *aError = err; return nil; } - if (entry_1.trackAttributes.IsNull()) { - newElement_1.trackAttributes = nil; - } else { - newElement_1.trackAttributes = [MCMediaPlaybackClusterTrackAttributesStruct new]; - newElement_1.trackAttributes.languageCode = AsString(entry_1.trackAttributes.Value().languageCode); - if (newElement_1.trackAttributes.languageCode == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - if (entry_1.trackAttributes.Value().displayName.HasValue()) { - if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) { - newElement_1.trackAttributes.displayName = nil; - } else { - newElement_1.trackAttributes.displayName = AsString(entry_1.trackAttributes.Value().displayName.Value().Value()); - if (newElement_1.trackAttributes.displayName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + newElement_1.trackAttributes = [MCMediaPlaybackClusterTrackAttributesStruct new]; + newElement_1.trackAttributes.languageCode = AsString(entry_1.trackAttributes.languageCode); + if (newElement_1.trackAttributes.languageCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (entry_1.trackAttributes.characteristics.HasValue()) { + if (entry_1.trackAttributes.characteristics.Value().IsNull()) { + newElement_1.trackAttributes.characteristics = nil; + } else { + { // Scope for our temporary variables + auto * array_6 = [NSMutableArray new]; + auto iter_6 = entry_1.trackAttributes.characteristics.Value().Value().begin(); + while (iter_6.Next()) { + auto & entry_6 = iter_6.GetValue(); + NSNumber * newElement_6; + newElement_6 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_6)]; + [array_6 addObject:newElement_6]; + } + CHIP_ERROR err = iter_6.GetStatus(); + if (err != CHIP_NO_ERROR) { *aError = err; return nil; } + newElement_1.trackAttributes.characteristics = array_6; } - } else { + } + } else { + newElement_1.trackAttributes.characteristics = nil; + } + if (entry_1.trackAttributes.displayName.HasValue()) { + if (entry_1.trackAttributes.displayName.Value().IsNull()) { newElement_1.trackAttributes.displayName = nil; + } else { + newElement_1.trackAttributes.displayName = AsString(entry_1.trackAttributes.displayName.Value().Value()); + if (newElement_1.trackAttributes.displayName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } } + } else { + newElement_1.trackAttributes.displayName = nil; } [array_1 addObject:newElement_1]; } @@ -3070,30 +3110,50 @@ - (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aE *aError = err; return nil; } - if (_cppValue.Value().trackAttributes.IsNull()) { - value.trackAttributes = nil; - } else { - value.trackAttributes = [MCMediaPlaybackClusterTrackAttributesStruct new]; - value.trackAttributes.languageCode = AsString(_cppValue.Value().trackAttributes.Value().languageCode); - if (value.trackAttributes.languageCode == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - if (_cppValue.Value().trackAttributes.Value().displayName.HasValue()) { - if (_cppValue.Value().trackAttributes.Value().displayName.Value().IsNull()) { - value.trackAttributes.displayName = nil; - } else { - value.trackAttributes.displayName = AsString(_cppValue.Value().trackAttributes.Value().displayName.Value().Value()); - if (value.trackAttributes.displayName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + value.trackAttributes = [MCMediaPlaybackClusterTrackAttributesStruct new]; + value.trackAttributes.languageCode = AsString(_cppValue.Value().trackAttributes.languageCode); + if (value.trackAttributes.languageCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (_cppValue.Value().trackAttributes.characteristics.HasValue()) { + if (_cppValue.Value().trackAttributes.characteristics.Value().IsNull()) { + value.trackAttributes.characteristics = nil; + } else { + { // Scope for our temporary variables + auto * array_5 = [NSMutableArray new]; + auto iter_5 = _cppValue.Value().trackAttributes.characteristics.Value().Value().begin(); + while (iter_5.Next()) { + auto & entry_5 = iter_5.GetValue(); + NSNumber * newElement_5; + newElement_5 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_5)]; + [array_5 addObject:newElement_5]; + } + CHIP_ERROR err = iter_5.GetStatus(); + if (err != CHIP_NO_ERROR) { *aError = err; return nil; } + value.trackAttributes.characteristics = array_5; } - } else { + } + } else { + value.trackAttributes.characteristics = nil; + } + if (_cppValue.Value().trackAttributes.displayName.HasValue()) { + if (_cppValue.Value().trackAttributes.displayName.Value().IsNull()) { value.trackAttributes.displayName = nil; + } else { + value.trackAttributes.displayName = AsString(_cppValue.Value().trackAttributes.displayName.Value().Value()); + if (value.trackAttributes.displayName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } } + } else { + value.trackAttributes.displayName = nil; } } return value; @@ -3157,30 +3217,50 @@ - (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aE *aError = err; return nil; } - if (entry_1.trackAttributes.IsNull()) { - newElement_1.trackAttributes = nil; - } else { - newElement_1.trackAttributes = [MCMediaPlaybackClusterTrackAttributesStruct new]; - newElement_1.trackAttributes.languageCode = AsString(entry_1.trackAttributes.Value().languageCode); - if (newElement_1.trackAttributes.languageCode == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - if (entry_1.trackAttributes.Value().displayName.HasValue()) { - if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) { - newElement_1.trackAttributes.displayName = nil; - } else { - newElement_1.trackAttributes.displayName = AsString(entry_1.trackAttributes.Value().displayName.Value().Value()); - if (newElement_1.trackAttributes.displayName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + newElement_1.trackAttributes = [MCMediaPlaybackClusterTrackAttributesStruct new]; + newElement_1.trackAttributes.languageCode = AsString(entry_1.trackAttributes.languageCode); + if (newElement_1.trackAttributes.languageCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (entry_1.trackAttributes.characteristics.HasValue()) { + if (entry_1.trackAttributes.characteristics.Value().IsNull()) { + newElement_1.trackAttributes.characteristics = nil; + } else { + { // Scope for our temporary variables + auto * array_6 = [NSMutableArray new]; + auto iter_6 = entry_1.trackAttributes.characteristics.Value().Value().begin(); + while (iter_6.Next()) { + auto & entry_6 = iter_6.GetValue(); + NSNumber * newElement_6; + newElement_6 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_6)]; + [array_6 addObject:newElement_6]; + } + CHIP_ERROR err = iter_6.GetStatus(); + if (err != CHIP_NO_ERROR) { *aError = err; return nil; } + newElement_1.trackAttributes.characteristics = array_6; } - } else { + } + } else { + newElement_1.trackAttributes.characteristics = nil; + } + if (entry_1.trackAttributes.displayName.HasValue()) { + if (entry_1.trackAttributes.displayName.Value().IsNull()) { newElement_1.trackAttributes.displayName = nil; + } else { + newElement_1.trackAttributes.displayName = AsString(entry_1.trackAttributes.displayName.Value().Value()); + if (newElement_1.trackAttributes.displayName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } } + } else { + newElement_1.trackAttributes.displayName = nil; } [array_1 addObject:newElement_1]; } diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCCommandPayloads.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCCommandPayloads.h index 367bfc35906575..d471ea0d9e99f9 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCCommandPayloads.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCCommandPayloads.h @@ -170,7 +170,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MCMediaPlaybackClusterActivateAudioTrackParams : MCAbstractPayload @property (nonatomic, copy) NSString * _Nonnull trackID; -@property (nonatomic, copy) NSNumber * _Nonnull audioOutputIndex; +@property (nonatomic, copy) NSNumber * _Nullable audioOutputIndex; @end @interface MCMediaPlaybackClusterActivateTextTrackParams : MCAbstractPayload @@ -204,6 +204,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * _Nonnull contentURL; @property (nonatomic, copy) NSString * _Nullable displayString; @property (nonatomic, copy) MCContentLauncherClusterBrandingInformationStruct * _Nullable brandingInformation; +@property (nonatomic, copy) MCContentLauncherClusterPlaybackPreferencesStruct * _Nullable playbackPreferences; @end @interface MCContentLauncherClusterLauncherResponseParams : MCAbstractPayload diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCCommandPayloads.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCCommandPayloads.mm index fe0676d2f05af7..f41d094d7b6b92 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCCommandPayloads.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCCommandPayloads.mm @@ -1466,7 +1466,7 @@ - (instancetype)init _trackID = @""; - _audioOutputIndex = @(0); + _audioOutputIndex = nil; } return self; } @@ -1495,7 +1495,15 @@ - (NSString *)description cppStruct.trackID = AsCharSpan(self.trackID); } { - cppStruct.audioOutputIndex = self.audioOutputIndex.unsignedCharValue; + if (self.audioOutputIndex != nil) { + auto & definedValue_0 = cppStruct.audioOutputIndex.Emplace(); + if (self.audioOutputIndex == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = self.audioOutputIndex.unsignedCharValue; + } + } } return std::any(cppStruct); @@ -1781,82 +1789,129 @@ - (NSString *)description { if (self.playbackPreferences != nil) { auto & definedValue_0 = cppStruct.playbackPreferences.Emplace(); - definedValue_0.playbackPosition = self.playbackPreferences.playbackPosition.unsignedLongLongValue; - definedValue_0.textTrack.languageCode = AsCharSpan(self.playbackPreferences.textTrack.languageCode); - if (self.playbackPreferences.textTrack.characteristics != nil) { - auto & definedValue_3 = definedValue_0.textTrack.characteristics.Emplace(); - { - using ListType_4 = std::remove_reference_t; - using ListMemberType_4 = ListMemberTypeGetter::Type; - if (self.playbackPreferences.textTrack.characteristics.count != 0) { - auto * listHolder_4 = new ListHolder(self.playbackPreferences.textTrack.characteristics.count); - if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_4); - for (size_t i_4 = 0; i_4 < self.playbackPreferences.textTrack.characteristics.count; ++i_4) { - if (![self.playbackPreferences.textTrack.characteristics[i_4] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; + if (self.playbackPreferences.playbackPosition != nil) { + auto & definedValue_2 = definedValue_0.playbackPosition.Emplace(); + if (self.playbackPreferences.playbackPosition == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = self.playbackPreferences.playbackPosition.unsignedLongLongValue; + } + } + if (self.playbackPreferences.textTrack != nil) { + auto & definedValue_2 = definedValue_0.textTrack.Emplace(); + if (self.playbackPreferences.textTrack == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3.languageCode = AsCharSpan(self.playbackPreferences.textTrack.languageCode); + if (self.playbackPreferences.textTrack.characteristics != nil) { + auto & definedValue_5 = nonNullValue_3.characteristics.Emplace(); + if (self.playbackPreferences.textTrack.characteristics == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + { + using ListType_7 = std::remove_reference_t; + using ListMemberType_7 = ListMemberTypeGetter::Type; + if (self.playbackPreferences.textTrack.characteristics.count != 0) { + auto * listHolder_7 = new ListHolder(self.playbackPreferences.textTrack.characteristics.count); + if (listHolder_7 == nullptr || listHolder_7->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_7); + for (size_t i_7 = 0; i_7 < self.playbackPreferences.textTrack.characteristics.count; ++i_7) { + if (![self.playbackPreferences.textTrack.characteristics[i_7] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_7 = (NSNumber *) self.playbackPreferences.textTrack.characteristics[i_7]; + listHolder_7->mList[i_7] = static_castmList[i_7])>>(element_7.unsignedCharValue); + } + nonNullValue_6 = ListType_7(listHolder_7->mList, self.playbackPreferences.textTrack.characteristics.count); + } else { + nonNullValue_6 = ListType_7(); + } } - auto element_4 = (NSNumber *) self.playbackPreferences.textTrack.characteristics[i_4]; - listHolder_4->mList[i_4] = static_castmList[i_4])>>(element_4.unsignedCharValue); } - definedValue_3 = ListType_4(listHolder_4->mList, self.playbackPreferences.textTrack.characteristics.count); - } else { - definedValue_3 = ListType_4(); + } + if (self.playbackPreferences.textTrack.audioOutputIndex != nil) { + auto & definedValue_5 = nonNullValue_3.audioOutputIndex.Emplace(); + if (self.playbackPreferences.textTrack.audioOutputIndex == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + nonNullValue_6 = self.playbackPreferences.textTrack.audioOutputIndex.unsignedCharValue; + } } } } - definedValue_0.textTrack.audioOutputIndex = self.playbackPreferences.textTrack.audioOutputIndex.unsignedCharValue; if (self.playbackPreferences.audioTracks != nil) { auto & definedValue_2 = definedValue_0.audioTracks.Emplace(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - if (self.playbackPreferences.audioTracks.count != 0) { - auto * listHolder_3 = new ListHolder(self.playbackPreferences.audioTracks.count); - if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_3); - for (size_t i_3 = 0; i_3 < self.playbackPreferences.audioTracks.count; ++i_3) { - if (![self.playbackPreferences.audioTracks[i_3] isKindOfClass:[MCContentLauncherClusterTrackPreferenceStruct class]]) { - // Wrong kind of value. + if (self.playbackPreferences.audioTracks == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + { + using ListType_4 = std::remove_reference_t; + using ListMemberType_4 = ListMemberTypeGetter::Type; + if (self.playbackPreferences.audioTracks.count != 0) { + auto * listHolder_4 = new ListHolder(self.playbackPreferences.audioTracks.count); + if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_3 = (MCContentLauncherClusterTrackPreferenceStruct *) self.playbackPreferences.audioTracks[i_3]; - listHolder_3->mList[i_3].languageCode = AsCharSpan(element_3.languageCode); - if (element_3.characteristics != nil) { - auto & definedValue_5 = listHolder_3->mList[i_3].characteristics.Emplace(); - { - using ListType_6 = std::remove_reference_t; - using ListMemberType_6 = ListMemberTypeGetter::Type; - if (element_3.characteristics.count != 0) { - auto * listHolder_6 = new ListHolder(element_3.characteristics.count); - if (listHolder_6 == nullptr || listHolder_6->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_6); - for (size_t i_6 = 0; i_6 < element_3.characteristics.count; ++i_6) { - if (![element_3.characteristics[i_6] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; + listFreer.add(listHolder_4); + for (size_t i_4 = 0; i_4 < self.playbackPreferences.audioTracks.count; ++i_4) { + if (![self.playbackPreferences.audioTracks[i_4] isKindOfClass:[MCContentLauncherClusterTrackPreferenceStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_4 = (MCContentLauncherClusterTrackPreferenceStruct *) self.playbackPreferences.audioTracks[i_4]; + listHolder_4->mList[i_4].languageCode = AsCharSpan(element_4.languageCode); + if (element_4.characteristics != nil) { + auto & definedValue_6 = listHolder_4->mList[i_4].characteristics.Emplace(); + if (element_4.characteristics == nil) { + definedValue_6.SetNull(); + } else { + auto & nonNullValue_7 = definedValue_6.SetNonNull(); + { + using ListType_8 = std::remove_reference_t; + using ListMemberType_8 = ListMemberTypeGetter::Type; + if (element_4.characteristics.count != 0) { + auto * listHolder_8 = new ListHolder(element_4.characteristics.count); + if (listHolder_8 == nullptr || listHolder_8->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_8); + for (size_t i_8 = 0; i_8 < element_4.characteristics.count; ++i_8) { + if (![element_4.characteristics[i_8] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_8 = (NSNumber *) element_4.characteristics[i_8]; + listHolder_8->mList[i_8] = static_castmList[i_8])>>(element_8.unsignedCharValue); + } + nonNullValue_7 = ListType_8(listHolder_8->mList, element_4.characteristics.count); + } else { + nonNullValue_7 = ListType_8(); } - auto element_6 = (NSNumber *) element_3.characteristics[i_6]; - listHolder_6->mList[i_6] = static_castmList[i_6])>>(element_6.unsignedCharValue); } - definedValue_5 = ListType_6(listHolder_6->mList, element_3.characteristics.count); + } + } + if (element_4.audioOutputIndex != nil) { + auto & definedValue_6 = listHolder_4->mList[i_4].audioOutputIndex.Emplace(); + if (element_4.audioOutputIndex == nil) { + definedValue_6.SetNull(); } else { - definedValue_5 = ListType_6(); + auto & nonNullValue_7 = definedValue_6.SetNonNull(); + nonNullValue_7 = element_4.audioOutputIndex.unsignedCharValue; } } } - listHolder_3->mList[i_3].audioOutputIndex = element_3.audioOutputIndex.unsignedCharValue; + nonNullValue_3 = ListType_4(listHolder_4->mList, self.playbackPreferences.audioTracks.count); + } else { + nonNullValue_3 = ListType_4(); } - definedValue_2 = ListType_3(listHolder_3->mList, self.playbackPreferences.audioTracks.count); - } else { - definedValue_2 = ListType_3(); } } } @@ -1889,6 +1944,8 @@ - (instancetype)init _displayString = nil; _brandingInformation = nil; + + _playbackPreferences = nil; } return self; } @@ -1900,13 +1957,14 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.contentURL = self.contentURL; other.displayString = self.displayString; other.brandingInformation = self.brandingInformation; + other.playbackPreferences = self.playbackPreferences; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: contentURL:%@; displayString:%@; brandingInformation:%@; >", NSStringFromClass([self class]), _contentURL, _displayString, _brandingInformation]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: contentURL:%@; displayString:%@; brandingInformation:%@; playbackPreferences:%@; >", NSStringFromClass([self class]), _contentURL, _displayString, _brandingInformation, _playbackPreferences]; return descriptionString; } @@ -2014,6 +2072,137 @@ - (NSString *)description } } } + { + if (self.playbackPreferences != nil) { + auto & definedValue_0 = cppStruct.playbackPreferences.Emplace(); + if (self.playbackPreferences.playbackPosition != nil) { + auto & definedValue_2 = definedValue_0.playbackPosition.Emplace(); + if (self.playbackPreferences.playbackPosition == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = self.playbackPreferences.playbackPosition.unsignedLongLongValue; + } + } + if (self.playbackPreferences.textTrack != nil) { + auto & definedValue_2 = definedValue_0.textTrack.Emplace(); + if (self.playbackPreferences.textTrack == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3.languageCode = AsCharSpan(self.playbackPreferences.textTrack.languageCode); + if (self.playbackPreferences.textTrack.characteristics != nil) { + auto & definedValue_5 = nonNullValue_3.characteristics.Emplace(); + if (self.playbackPreferences.textTrack.characteristics == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + { + using ListType_7 = std::remove_reference_t; + using ListMemberType_7 = ListMemberTypeGetter::Type; + if (self.playbackPreferences.textTrack.characteristics.count != 0) { + auto * listHolder_7 = new ListHolder(self.playbackPreferences.textTrack.characteristics.count); + if (listHolder_7 == nullptr || listHolder_7->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_7); + for (size_t i_7 = 0; i_7 < self.playbackPreferences.textTrack.characteristics.count; ++i_7) { + if (![self.playbackPreferences.textTrack.characteristics[i_7] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_7 = (NSNumber *) self.playbackPreferences.textTrack.characteristics[i_7]; + listHolder_7->mList[i_7] = static_castmList[i_7])>>(element_7.unsignedCharValue); + } + nonNullValue_6 = ListType_7(listHolder_7->mList, self.playbackPreferences.textTrack.characteristics.count); + } else { + nonNullValue_6 = ListType_7(); + } + } + } + } + if (self.playbackPreferences.textTrack.audioOutputIndex != nil) { + auto & definedValue_5 = nonNullValue_3.audioOutputIndex.Emplace(); + if (self.playbackPreferences.textTrack.audioOutputIndex == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + nonNullValue_6 = self.playbackPreferences.textTrack.audioOutputIndex.unsignedCharValue; + } + } + } + } + if (self.playbackPreferences.audioTracks != nil) { + auto & definedValue_2 = definedValue_0.audioTracks.Emplace(); + if (self.playbackPreferences.audioTracks == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + { + using ListType_4 = std::remove_reference_t; + using ListMemberType_4 = ListMemberTypeGetter::Type; + if (self.playbackPreferences.audioTracks.count != 0) { + auto * listHolder_4 = new ListHolder(self.playbackPreferences.audioTracks.count); + if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_4); + for (size_t i_4 = 0; i_4 < self.playbackPreferences.audioTracks.count; ++i_4) { + if (![self.playbackPreferences.audioTracks[i_4] isKindOfClass:[MCContentLauncherClusterTrackPreferenceStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_4 = (MCContentLauncherClusterTrackPreferenceStruct *) self.playbackPreferences.audioTracks[i_4]; + listHolder_4->mList[i_4].languageCode = AsCharSpan(element_4.languageCode); + if (element_4.characteristics != nil) { + auto & definedValue_6 = listHolder_4->mList[i_4].characteristics.Emplace(); + if (element_4.characteristics == nil) { + definedValue_6.SetNull(); + } else { + auto & nonNullValue_7 = definedValue_6.SetNonNull(); + { + using ListType_8 = std::remove_reference_t; + using ListMemberType_8 = ListMemberTypeGetter::Type; + if (element_4.characteristics.count != 0) { + auto * listHolder_8 = new ListHolder(element_4.characteristics.count); + if (listHolder_8 == nullptr || listHolder_8->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_8); + for (size_t i_8 = 0; i_8 < element_4.characteristics.count; ++i_8) { + if (![element_4.characteristics[i_8] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_8 = (NSNumber *) element_4.characteristics[i_8]; + listHolder_8->mList[i_8] = static_castmList[i_8])>>(element_8.unsignedCharValue); + } + nonNullValue_7 = ListType_8(listHolder_8->mList, element_4.characteristics.count); + } else { + nonNullValue_7 = ListType_8(); + } + } + } + } + if (element_4.audioOutputIndex != nil) { + auto & definedValue_6 = listHolder_4->mList[i_4].audioOutputIndex.Emplace(); + if (element_4.audioOutputIndex == nil) { + definedValue_6.SetNull(); + } else { + auto & nonNullValue_7 = definedValue_6.SetNonNull(); + nonNullValue_7 = element_4.audioOutputIndex.unsignedCharValue; + } + } + } + nonNullValue_3 = ListType_4(listHolder_4->mList, self.playbackPreferences.audioTracks.count); + } else { + nonNullValue_3 = ListType_4(); + } + } + } + } + } + } return std::any(cppStruct); } 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 35a766e68307aa..1e61598d9f8bad 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 @@ -1636,25 +1636,30 @@ cluster Channel = 1284 { kRecordProgram = 0x8; } - bitmap RecordingFlagBitmap : bitmap32 { + bitmap RecordingFlagBitmap : bitmap8 { kScheduled = 0x1; kRecordSeries = 0x2; kRecorded = 0x4; } - struct ProgramCastStruct { + struct AdditionalInfoStruct { char_string name = 0; - char_string role = 1; + char_string value = 1; + } + + struct ProgramCastStruct { + long_char_string<256> name = 0; + long_char_string<256> role = 1; } struct ProgramCategoryStruct { - char_string category = 0; - optional char_string subCategory = 1; + long_char_string<256> category = 0; + optional long_char_string<256> subCategory = 1; } struct SeriesInfoStruct { - char_string season = 0; - char_string episode = 1; + long_char_string<256> season = 0; + long_char_string<256> episode = 1; } struct ChannelInfoStruct { @@ -1668,31 +1673,31 @@ cluster Channel = 1284 { } struct ProgramStruct { - char_string identifier = 0; + char_string<255> identifier = 0; ChannelInfoStruct channel = 1; epoch_s startTime = 2; epoch_s endTime = 3; - char_string title = 4; - optional char_string subtitle = 5; - optional char_string description = 6; + char_string<255> title = 4; + optional char_string<255> subtitle = 5; + optional long_char_string<8192> description = 6; optional char_string audioLanguages[] = 7; optional char_string ratings[] = 8; - optional char_string thumbnailUrl = 9; - optional char_string posterArtUrl = 10; - optional char_string dvbiUrl = 11; - optional char_string releaseDate = 12; - optional char_string parentalGuidanceText = 13; + optional long_char_string<8192> thumbnailUrl = 9; + optional long_char_string<8192> posterArtUrl = 10; + optional long_char_string<8192> dvbiUrl = 11; + optional char_string<30> releaseDate = 12; + optional char_string<255> parentalGuidanceText = 13; optional RecordingFlagBitmap recordingFlag = 14; optional nullable SeriesInfoStruct seriesInfo = 15; optional ProgramCategoryStruct categoryList[] = 16; optional ProgramCastStruct castList[] = 17; - optional ProgramCastStruct externalIDList[] = 18; + optional AdditionalInfoStruct externalIDList[] = 18; } struct PageTokenStruct { optional int16u limit = 0; - optional char_string after = 1; - optional char_string before = 2; + optional long_char_string<8192> after = 1; + optional long_char_string<8192> before = 2; } struct ChannelPagingStruct { @@ -1700,11 +1705,6 @@ cluster Channel = 1284 { optional nullable PageTokenStruct nextToken = 1; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; - } - struct LineupInfoStruct { char_string operatorName = 0; optional char_string lineupName = 1; @@ -1741,13 +1741,13 @@ cluster Channel = 1284 { } request struct GetProgramGuideRequest { - optional epoch_s startTime = 0; - optional epoch_s endTime = 1; + epoch_s startTime = 0; + epoch_s endTime = 1; optional ChannelInfoStruct channelList[] = 2; - optional PageTokenStruct pageToken = 3; - optional RecordingFlagBitmap recordingFlag = 4; + optional nullable PageTokenStruct pageToken = 3; + optional nullable RecordingFlagBitmap recordingFlag = 4; optional AdditionalInfoStruct externalIDList[] = 5; - optional octet_string data = 6; + optional octet_string<8092> data = 6; } response struct ProgramGuideResponse = 5 { @@ -1756,17 +1756,17 @@ cluster Channel = 1284 { } request struct RecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } request struct CancelRecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ @@ -1799,9 +1799,9 @@ cluster TargetNavigator = 1285 { } info event TargetUpdated = 0 { - TargetInfoStruct targetList[] = 0; - int8u currentTarget = 1; - octet_string data = 2; + optional TargetInfoStruct targetList[] = 0; + optional int8u currentTarget = 1; + optional octet_string data = 2; } readonly attribute TargetInfoStruct targetList[] = 0; @@ -1878,12 +1878,13 @@ cluster MediaPlayback = 1286 { struct TrackAttributesStruct { char_string<32> languageCode = 0; - optional nullable char_string displayName = 1; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable long_char_string<256> displayName = 2; } struct TrackStruct { char_string<32> id = 0; - nullable TrackAttributesStruct trackAttributes = 1; + TrackAttributesStruct trackAttributes = 1; } struct PlaybackPositionStruct { @@ -1893,14 +1894,14 @@ cluster MediaPlayback = 1286 { info event StateChanged = 0 { PlaybackStateEnum currentState = 0; - EPOCH_US startTime = 1; - INT64U duration = 2; - PlaybackPositionStruct sampledPosition = 3; - single playbackSpeed = 4; - INT64U seekRangeEnd = 5; - INT64U seekRangeStart = 6; - optional OCTET_STRING data = 7; - boolean audioAdvanceUnmuted = 8; + optional epoch_us startTime = 1; + optional int64u duration = 2; + optional PlaybackPositionStruct sampledPosition = 3; + optional single playbackSpeed = 4; + optional int64u seekRangeEnd = 5; + optional int64u seekRangeStart = 6; + optional octet_string data = 7; + optional boolean audioAdvanceUnmuted = 8; } readonly attribute PlaybackStateEnum currentState = 0; @@ -1947,12 +1948,12 @@ cluster MediaPlayback = 1286 { } request struct ActivateAudioTrackRequest { - CHAR_STRING trackID = 0; - INT8U audioOutputIndex = 1; + char_string<32> trackID = 0; + optional nullable int8u audioOutputIndex = 1; } request struct ActivateTextTrackRequest { - CHAR_STRING trackID = 0; + char_string<32> trackID = 0; } /** Upon receipt, this SHALL play media. */ @@ -1987,7 +1988,7 @@ cluster MediaPlayback = 1286 { /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ cluster MediaInput = 1287 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum InputTypeEnum : enum8 { kInternal = 0; @@ -2045,7 +2046,7 @@ cluster MediaInput = 1287 { /** This cluster provides an interface for managing low power mode on a device. */ cluster LowPower = 1288 { - revision 1; // NOTE: Default/not specifically set + revision 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -2060,7 +2061,7 @@ cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ cluster KeypadInput = 1289 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum CECKeyCodeEnum : enum8 { kSelect = 0; @@ -2184,7 +2185,7 @@ cluster KeypadInput = 1289 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ContentLauncher = 1290 { - revision 1; + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -2243,9 +2244,9 @@ cluster ContentLauncher = 1290 { bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; - kAdvancedSeek = 0x3; - kTextTracks = 0x4; - kAudioTracks = 0x5; + kAdvancedSeek = 0x4; + kTextTracks = 0x8; + kAudioTracks = 0x10; } bitmap SupportedProtocolsBitmap : bitmap32 { @@ -2261,24 +2262,24 @@ cluster ContentLauncher = 1290 { struct TrackPreferenceStruct { char_string<32> languageCode = 0; - optional CharacteristicEnum characteristics[] = 1; - int8u audioOutputIndex = 2; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable int8u audioOutputIndex = 2; } struct PlaybackPreferencesStruct { - int64u playbackPosition = 0; - TrackPreferenceStruct textTrack = 1; - optional TrackPreferenceStruct audioTracks[] = 2; + optional nullable int64u playbackPosition = 0; + optional nullable TrackPreferenceStruct textTrack = 1; + optional nullable TrackPreferenceStruct audioTracks[] = 2; } struct AdditionalInfoStruct { - char_string<256> name = 0; - char_string<8192> value = 1; + long_char_string<256> name = 0; + long_char_string<8192> value = 1; } struct ParameterStruct { ParameterEnum type = 0; - char_string<1024> value = 1; + long_char_string<1024> value = 1; optional AdditionalInfoStruct externalIDList[] = 2; } @@ -2287,13 +2288,13 @@ cluster ContentLauncher = 1290 { } struct StyleInformationStruct { - optional char_string<8192> imageURL = 0; + optional long_char_string<8192> imageURL = 0; optional char_string<9> color = 1; optional DimensionStruct size = 2; } struct BrandingInformationStruct { - char_string<256> providerName = 0; + long_char_string<256> providerName = 0; optional StyleInformationStruct background = 1; optional StyleInformationStruct logo = 2; optional StyleInformationStruct progressBar = 3; @@ -2322,6 +2323,7 @@ cluster ContentLauncher = 1290 { char_string contentURL = 0; optional char_string displayString = 1; optional BrandingInformationStruct brandingInformation = 2; + optional PlaybackPreferencesStruct playbackPreferences = 3; } response struct LauncherResponse = 2 { @@ -2384,7 +2386,7 @@ cluster AudioOutput = 1291 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ApplicationLauncher = 1292 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum StatusEnum : enum8 { kSuccess = 0; @@ -2443,7 +2445,7 @@ cluster ApplicationLauncher = 1292 { /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ cluster ApplicationBasic = 1293 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum ApplicationStatusEnum : enum8 { kStopped = 0; @@ -2477,8 +2479,9 @@ cluster ApplicationBasic = 1293 { cluster AccountLogin = 1294 { revision 2; - critical event LoggedOut = 0 { + fabric_sensitive critical event access(read: administer) LoggedOut = 0 { optional node_id node = 0; + fabric_idx fabricIndex = 254; } readonly attribute command_id generatedCommandList[] = 65528; @@ -2516,7 +2519,17 @@ cluster AccountLogin = 1294 { /** This cluster is used for managing the content control (including "parental control") settings on a media device such as a TV, or Set-top Box. */ provisional cluster ContentControl = 1295 { - revision 1; // NOTE: Default/not specifically set + revision 1; + + bitmap DayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + } bitmap Feature : bitmap32 { kScreenTime = 0x1; @@ -2526,14 +2539,42 @@ provisional cluster ContentControl = 1295 { kScheduledContentRating = 0x10; } + struct TimePeriodStruct { + int8u startHour = 0; + int8u startMinute = 1; + int8u endHour = 2; + int8u endMinute = 3; + } + + struct TimeWindowStruct { + nullable int16u timeWindowIndex = 0; + DayOfWeekBitmap dayOfWeek = 1; + TimePeriodStruct timePeriod[] = 2; + } + + struct AppInfoStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; + } + + struct BlockChannelStruct { + nullable int16u blockChannelIndex = 0; + int16u majorNumber = 1; + int16u minorNumber = 2; + optional char_string identifier = 3; + } + struct RatingNameStruct { - char_string ratingName = 0; - optional char_string ratingNameDesc = 1; + char_string<8> ratingName = 0; + optional char_string<64> ratingNameDesc = 1; } info event RemainingScreenTimeExpired = 0 { } + info event EnteringBlockContentTimeWindow = 1 { + } + readonly attribute boolean enabled = 0; readonly attribute optional RatingNameStruct onDemandRatings[] = 1; readonly attribute optional char_string<8> onDemandRatingThreshold = 2; @@ -2541,7 +2582,10 @@ provisional cluster ContentControl = 1295 { readonly attribute optional char_string<8> scheduledContentRatingThreshold = 4; readonly attribute optional elapsed_s screenDailyTime = 5; readonly attribute optional elapsed_s remainingScreenTime = 6; - readonly attribute boolean blockUnrated = 7; + readonly attribute optional boolean blockUnrated = 7; + readonly attribute optional BlockChannelStruct blockChannelList[] = 8; + readonly attribute optional AppInfoStruct blockApplicationList[] = 9; + readonly attribute optional TimeWindowStruct blockContentTimeWindow[] = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2550,8 +2594,8 @@ provisional cluster ContentControl = 1295 { readonly attribute int16u clusterRevision = 65533; request struct UpdatePINRequest { - optional char_string oldPIN = 0; - char_string newPIN = 1; + char_string<6> oldPIN = 0; + char_string<6> newPIN = 1; } response struct ResetPINResponse = 2 { @@ -2559,8 +2603,8 @@ provisional cluster ContentControl = 1295 { } request struct AddBonusTimeRequest { - optional char_string PINCode = 0; - optional elapsed_s bonusTime = 1; + optional char_string<6> PINCode = 0; + elapsed_s bonusTime = 1; } request struct SetScreenDailyTimeRequest { @@ -2568,38 +2612,74 @@ provisional cluster ContentControl = 1295 { } request struct SetOnDemandRatingThresholdRequest { - char_string rating = 0; + char_string<8> rating = 0; } request struct SetScheduledContentRatingThresholdRequest { - char_string rating = 0; + char_string<8> rating = 0; + } + + request struct AddBlockChannelsRequest { + BlockChannelStruct channels[] = 0; + } + + request struct RemoveBlockChannelsRequest { + int16u channelIndexes[] = 0; + } + + request struct AddBlockApplicationsRequest { + AppInfoStruct applications[] = 0; + } + + request struct RemoveBlockApplicationsRequest { + AppInfoStruct applications[] = 0; + } + + request struct SetBlockContentTimeWindowRequest { + TimeWindowStruct timeWindow = 0; + } + + request struct RemoveBlockContentTimeWindowRequest { + int16u timeWindowIndexes[] = 0; } /** The purpose of this command is to update the PIN used for protecting configuration of the content control settings. Upon success, the old PIN SHALL no longer work. The PIN is used to ensure that only the Node (or User) with the PIN code can make changes to the Content Control settings, for example, turn off Content Controls or modify the ScreenDailyTime. The PIN is composed of a numeric string of up to 6 human readable characters (displayable) . Upon receipt of this command, the media device SHALL check if the OldPIN field of this command is the same as the current PIN. If the PINs are the same, then the PIN code SHALL be set to NewPIN. Otherwise a response with InvalidPINCode error status SHALL be returned. The media device MAY provide a default PIN to the User via an out of band mechanism. For security reasons, it is recommended that a client encourage the user to update the PIN from its default value when performing configuration of the Content Control settings exposed by this cluster. The ResetPIN command can also be used to obtain the default PIN. */ - command UpdatePIN(UpdatePINRequest): DefaultSuccess = 0; + timed command access(invoke: manage) UpdatePIN(UpdatePINRequest): DefaultSuccess = 0; /** The purpose of this command is to reset the PIN. If this command is executed successfully, a ResetPINResponse command with a new PIN SHALL be returned. */ - command ResetPIN(): ResetPINResponse = 1; + timed command access(invoke: administer) ResetPIN(): ResetPINResponse = 1; /** The purpose of this command is to turn on the Content Control feature on a media device. On receipt of the Enable command, the media device SHALL set the Enabled attribute to TRUE. */ - command Enable(): DefaultSuccess = 3; + timed command access(invoke: manage) Enable(): DefaultSuccess = 3; /** The purpose of this command is to turn off the Content Control feature on a media device. On receipt of the Disable command, the media device SHALL set the Enabled attribute to FALSE. */ - command Disable(): DefaultSuccess = 4; + timed command access(invoke: manage) Disable(): DefaultSuccess = 4; /** The purpose of this command is to add the extra screen time for the user. If a client with Operate privilege invokes this command, the media device SHALL check whether the PINCode passed in the command matches the current PINCode value. If these match, then the RemainingScreenTime attribute SHALL be increased by the specified BonusTime value. If the PINs do not match, then a response with InvalidPINCode error status SHALL be returned, and no changes SHALL be made to RemainingScreenTime. If a client with Manage privilege or greater invokes this command, the media device SHALL ignore the PINCode field and directly increase the RemainingScreenTime attribute by the specified BonusTime value. A server that does not support the PM feature SHALL respond with InvalidPINCode to clients that only have Operate privilege unless: It has been provided with the PIN value to expect via an out of band mechanism, and The client has provided a PINCode that matches the expected PIN value. */ command AddBonusTime(AddBonusTimeRequest): DefaultSuccess = 5; /** The purpose of this command is to set the ScreenDailyTime attribute. On receipt of the SetScreenDailyTime command, the media device SHALL set the ScreenDailyTime attribute to the ScreenTime value. */ - command SetScreenDailyTime(SetScreenDailyTimeRequest): DefaultSuccess = 6; + command access(invoke: manage) SetScreenDailyTime(SetScreenDailyTimeRequest): DefaultSuccess = 6; /** The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the BlockUnratedContent command, the media device SHALL set the BlockUnrated attribute to TRUE. */ - command BlockUnratedContent(): DefaultSuccess = 7; + command access(invoke: manage) BlockUnratedContent(): DefaultSuccess = 7; /** The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the UnblockUnratedContent command, the media device SHALL set the BlockUnrated attribute to FALSE. */ - command UnblockUnratedContent(): DefaultSuccess = 8; + command access(invoke: manage) UnblockUnratedContent(): DefaultSuccess = 8; /** The purpose of this command is to set the OnDemandRatingThreshold attribute. On receipt of the SetOnDemandRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the OnDemandRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. */ - command SetOnDemandRatingThreshold(SetOnDemandRatingThresholdRequest): DefaultSuccess = 9; + command access(invoke: manage) SetOnDemandRatingThreshold(SetOnDemandRatingThresholdRequest): DefaultSuccess = 9; /** The purpose of this command is to set ScheduledContentRatingThreshold attribute. On receipt of the SetScheduledContentRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the ScheduledContentRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. */ - command SetScheduledContentRatingThreshold(SetScheduledContentRatingThresholdRequest): DefaultSuccess = 10; + command access(invoke: manage) SetScheduledContentRatingThreshold(SetScheduledContentRatingThresholdRequest): DefaultSuccess = 10; + /** The purpose of this command is to set BlockChannelList attribute. */ + command access(invoke: manage) AddBlockChannels(AddBlockChannelsRequest): DefaultSuccess = 11; + /** The purpose of this command is to remove channels from the BlockChannelList attribute. */ + command access(invoke: manage) RemoveBlockChannels(RemoveBlockChannelsRequest): DefaultSuccess = 12; + /** The purpose of this command is to set applications to the BlockApplicationList attribute. */ + command access(invoke: manage) AddBlockApplications(AddBlockApplicationsRequest): DefaultSuccess = 13; + /** The purpose of this command is to remove applications from the BlockApplicationList attribute. */ + command access(invoke: manage) RemoveBlockApplications(RemoveBlockApplicationsRequest): DefaultSuccess = 14; + /** The purpose of this command is to set the BlockContentTimeWindow attribute. */ + command access(invoke: manage) SetBlockContentTimeWindow(SetBlockContentTimeWindowRequest): DefaultSuccess = 15; + /** The purpose of this command is to remove the selected time windows from the BlockContentTimeWindow attribute. */ + command access(invoke: manage) RemoveBlockContentTimeWindow(RemoveBlockContentTimeWindowRequest): DefaultSuccess = 16; } /** This cluster provides an interface for sending targeted commands to an Observer of a Content App on a Video Player device such as a Streaming Media Player, Smart TV or Smart Screen. The cluster server for Content App Observer is implemented by an endpoint that communicates with a Content App, such as a Casting Video Client. The cluster client for Content App Observer is implemented by a Content App endpoint. A Content App is informed of the NodeId of an Observer when a binding is set on the Content App. The Content App can then send the ContentAppMessage to the Observer (server cluster), and the Observer responds with a ContentAppMessageResponse. */ provisional cluster ContentAppObserver = 1296 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum StatusEnum : enum8 { kSuccess = 0; @@ -2614,14 +2694,14 @@ provisional cluster ContentAppObserver = 1296 { readonly attribute int16u clusterRevision = 65533; request struct ContentAppMessageRequest { - optional char_string data = 0; - char_string encodingHint = 1; + long_char_string<500> data = 0; + optional char_string<100> encodingHint = 1; } response struct ContentAppMessageResponse = 1 { StatusEnum status = 0; - optional char_string data = 1; - optional char_string encodingHint = 2; + optional long_char_string<500> data = 1; + optional char_string<100> encodingHint = 2; } /** Upon receipt, the data field MAY be parsed and interpreted. Message encoding is specific to the Content App. A Content App MAY when possible read attributes from the Basic Information Cluster on the Observer and use this to determine the Message encoding. */ diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h index aab16a6d6ae567..2f3826acedea75 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h @@ -559,18 +559,21 @@ #define GENERATED_ACCESS_READ_EVENT__CLUSTER { \ 0x0000001F, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ 0x0000001F, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ + 0x0000050E, /* Cluster: Account Login, Event: LoggedOut, Privilege: administer */ \ } // Parallel array data (cluster, *event*, privilege) for read event #define GENERATED_ACCESS_READ_EVENT__EVENT { \ 0x00000000, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ 0x00000001, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ + 0x00000000, /* Cluster: Account Login, Event: LoggedOut, Privilege: administer */ \ } // Parallel array data (cluster, event, *privilege*) for read event #define GENERATED_ACCESS_READ_EVENT__PRIVILEGE { \ chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Account Login, Event: LoggedOut, Privilege: administer */ \ } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 4e99c7ebe5d260..451c5c5e8e5d38 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -7696,25 +7696,30 @@ cluster Channel = 1284 { kRecordProgram = 0x8; } - bitmap RecordingFlagBitmap : bitmap32 { + bitmap RecordingFlagBitmap : bitmap8 { kScheduled = 0x1; kRecordSeries = 0x2; kRecorded = 0x4; } - struct ProgramCastStruct { + struct AdditionalInfoStruct { char_string name = 0; - char_string role = 1; + char_string value = 1; + } + + struct ProgramCastStruct { + long_char_string<256> name = 0; + long_char_string<256> role = 1; } struct ProgramCategoryStruct { - char_string category = 0; - optional char_string subCategory = 1; + long_char_string<256> category = 0; + optional long_char_string<256> subCategory = 1; } struct SeriesInfoStruct { - char_string season = 0; - char_string episode = 1; + long_char_string<256> season = 0; + long_char_string<256> episode = 1; } struct ChannelInfoStruct { @@ -7728,31 +7733,31 @@ cluster Channel = 1284 { } struct ProgramStruct { - char_string identifier = 0; + char_string<255> identifier = 0; ChannelInfoStruct channel = 1; epoch_s startTime = 2; epoch_s endTime = 3; - char_string title = 4; - optional char_string subtitle = 5; - optional char_string description = 6; + char_string<255> title = 4; + optional char_string<255> subtitle = 5; + optional long_char_string<8192> description = 6; optional char_string audioLanguages[] = 7; optional char_string ratings[] = 8; - optional char_string thumbnailUrl = 9; - optional char_string posterArtUrl = 10; - optional char_string dvbiUrl = 11; - optional char_string releaseDate = 12; - optional char_string parentalGuidanceText = 13; + optional long_char_string<8192> thumbnailUrl = 9; + optional long_char_string<8192> posterArtUrl = 10; + optional long_char_string<8192> dvbiUrl = 11; + optional char_string<30> releaseDate = 12; + optional char_string<255> parentalGuidanceText = 13; optional RecordingFlagBitmap recordingFlag = 14; optional nullable SeriesInfoStruct seriesInfo = 15; optional ProgramCategoryStruct categoryList[] = 16; optional ProgramCastStruct castList[] = 17; - optional ProgramCastStruct externalIDList[] = 18; + optional AdditionalInfoStruct externalIDList[] = 18; } struct PageTokenStruct { optional int16u limit = 0; - optional char_string after = 1; - optional char_string before = 2; + optional long_char_string<8192> after = 1; + optional long_char_string<8192> before = 2; } struct ChannelPagingStruct { @@ -7760,11 +7765,6 @@ cluster Channel = 1284 { optional nullable PageTokenStruct nextToken = 1; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; - } - struct LineupInfoStruct { char_string operatorName = 0; optional char_string lineupName = 1; @@ -7801,13 +7801,13 @@ cluster Channel = 1284 { } request struct GetProgramGuideRequest { - optional epoch_s startTime = 0; - optional epoch_s endTime = 1; + epoch_s startTime = 0; + epoch_s endTime = 1; optional ChannelInfoStruct channelList[] = 2; - optional PageTokenStruct pageToken = 3; - optional RecordingFlagBitmap recordingFlag = 4; + optional nullable PageTokenStruct pageToken = 3; + optional nullable RecordingFlagBitmap recordingFlag = 4; optional AdditionalInfoStruct externalIDList[] = 5; - optional octet_string data = 6; + optional octet_string<8092> data = 6; } response struct ProgramGuideResponse = 5 { @@ -7816,17 +7816,17 @@ cluster Channel = 1284 { } request struct RecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } request struct CancelRecordProgramRequest { - char_string programIdentifier = 0; + char_string<255> programIdentifier = 0; boolean shouldRecordSeries = 1; - AdditionalInfoStruct externalIDList[] = 2; - octet_string data = 3; + optional AdditionalInfoStruct externalIDList[] = 2; + optional octet_string<8092> data = 3; } /** Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. */ @@ -7859,9 +7859,9 @@ cluster TargetNavigator = 1285 { } info event TargetUpdated = 0 { - TargetInfoStruct targetList[] = 0; - int8u currentTarget = 1; - octet_string data = 2; + optional TargetInfoStruct targetList[] = 0; + optional int8u currentTarget = 1; + optional octet_string data = 2; } readonly attribute TargetInfoStruct targetList[] = 0; @@ -7938,12 +7938,13 @@ cluster MediaPlayback = 1286 { struct TrackAttributesStruct { char_string<32> languageCode = 0; - optional nullable char_string displayName = 1; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable long_char_string<256> displayName = 2; } struct TrackStruct { char_string<32> id = 0; - nullable TrackAttributesStruct trackAttributes = 1; + TrackAttributesStruct trackAttributes = 1; } struct PlaybackPositionStruct { @@ -7953,14 +7954,14 @@ cluster MediaPlayback = 1286 { info event StateChanged = 0 { PlaybackStateEnum currentState = 0; - EPOCH_US startTime = 1; - INT64U duration = 2; - PlaybackPositionStruct sampledPosition = 3; - single playbackSpeed = 4; - INT64U seekRangeEnd = 5; - INT64U seekRangeStart = 6; - optional OCTET_STRING data = 7; - boolean audioAdvanceUnmuted = 8; + optional epoch_us startTime = 1; + optional int64u duration = 2; + optional PlaybackPositionStruct sampledPosition = 3; + optional single playbackSpeed = 4; + optional int64u seekRangeEnd = 5; + optional int64u seekRangeStart = 6; + optional octet_string data = 7; + optional boolean audioAdvanceUnmuted = 8; } readonly attribute PlaybackStateEnum currentState = 0; @@ -8007,12 +8008,12 @@ cluster MediaPlayback = 1286 { } request struct ActivateAudioTrackRequest { - CHAR_STRING trackID = 0; - INT8U audioOutputIndex = 1; + char_string<32> trackID = 0; + optional nullable int8u audioOutputIndex = 1; } request struct ActivateTextTrackRequest { - CHAR_STRING trackID = 0; + char_string<32> trackID = 0; } /** Upon receipt, this SHALL play media. */ @@ -8047,7 +8048,7 @@ cluster MediaPlayback = 1286 { /** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ cluster MediaInput = 1287 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum InputTypeEnum : enum8 { kInternal = 0; @@ -8105,7 +8106,7 @@ cluster MediaInput = 1287 { /** This cluster provides an interface for managing low power mode on a device. */ cluster LowPower = 1288 { - revision 1; // NOTE: Default/not specifically set + revision 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -8120,7 +8121,7 @@ cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ cluster KeypadInput = 1289 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum CECKeyCodeEnum : enum8 { kSelect = 0; @@ -8244,7 +8245,7 @@ cluster KeypadInput = 1289 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ContentLauncher = 1290 { - revision 1; + revision 2; enum CharacteristicEnum : enum8 { kForcedSubtitles = 0; @@ -8303,9 +8304,9 @@ cluster ContentLauncher = 1290 { bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; - kAdvancedSeek = 0x3; - kTextTracks = 0x4; - kAudioTracks = 0x5; + kAdvancedSeek = 0x4; + kTextTracks = 0x8; + kAudioTracks = 0x10; } bitmap SupportedProtocolsBitmap : bitmap32 { @@ -8321,24 +8322,24 @@ cluster ContentLauncher = 1290 { struct TrackPreferenceStruct { char_string<32> languageCode = 0; - optional CharacteristicEnum characteristics[] = 1; - int8u audioOutputIndex = 2; + optional nullable CharacteristicEnum characteristics[] = 1; + optional nullable int8u audioOutputIndex = 2; } struct PlaybackPreferencesStruct { - int64u playbackPosition = 0; - TrackPreferenceStruct textTrack = 1; - optional TrackPreferenceStruct audioTracks[] = 2; + optional nullable int64u playbackPosition = 0; + optional nullable TrackPreferenceStruct textTrack = 1; + optional nullable TrackPreferenceStruct audioTracks[] = 2; } struct AdditionalInfoStruct { - char_string<256> name = 0; - char_string<8192> value = 1; + long_char_string<256> name = 0; + long_char_string<8192> value = 1; } struct ParameterStruct { ParameterEnum type = 0; - char_string<1024> value = 1; + long_char_string<1024> value = 1; optional AdditionalInfoStruct externalIDList[] = 2; } @@ -8347,13 +8348,13 @@ cluster ContentLauncher = 1290 { } struct StyleInformationStruct { - optional char_string<8192> imageURL = 0; + optional long_char_string<8192> imageURL = 0; optional char_string<9> color = 1; optional DimensionStruct size = 2; } struct BrandingInformationStruct { - char_string<256> providerName = 0; + long_char_string<256> providerName = 0; optional StyleInformationStruct background = 1; optional StyleInformationStruct logo = 2; optional StyleInformationStruct progressBar = 3; @@ -8382,6 +8383,7 @@ cluster ContentLauncher = 1290 { char_string contentURL = 0; optional char_string displayString = 1; optional BrandingInformationStruct brandingInformation = 2; + optional PlaybackPreferencesStruct playbackPreferences = 3; } response struct LauncherResponse = 2 { @@ -8444,7 +8446,7 @@ cluster AudioOutput = 1291 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ cluster ApplicationLauncher = 1292 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum StatusEnum : enum8 { kSuccess = 0; @@ -8503,7 +8505,7 @@ cluster ApplicationLauncher = 1292 { /** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ cluster ApplicationBasic = 1293 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum ApplicationStatusEnum : enum8 { kStopped = 0; @@ -8537,8 +8539,9 @@ cluster ApplicationBasic = 1293 { cluster AccountLogin = 1294 { revision 2; - critical event LoggedOut = 0 { + fabric_sensitive critical event access(read: administer) LoggedOut = 0 { optional node_id node = 0; + fabric_idx fabricIndex = 254; } readonly attribute command_id generatedCommandList[] = 65528; @@ -8576,7 +8579,17 @@ cluster AccountLogin = 1294 { /** This cluster is used for managing the content control (including "parental control") settings on a media device such as a TV, or Set-top Box. */ provisional cluster ContentControl = 1295 { - revision 1; // NOTE: Default/not specifically set + revision 1; + + bitmap DayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + } bitmap Feature : bitmap32 { kScreenTime = 0x1; @@ -8586,14 +8599,42 @@ provisional cluster ContentControl = 1295 { kScheduledContentRating = 0x10; } + struct TimePeriodStruct { + int8u startHour = 0; + int8u startMinute = 1; + int8u endHour = 2; + int8u endMinute = 3; + } + + struct TimeWindowStruct { + nullable int16u timeWindowIndex = 0; + DayOfWeekBitmap dayOfWeek = 1; + TimePeriodStruct timePeriod[] = 2; + } + + struct AppInfoStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; + } + + struct BlockChannelStruct { + nullable int16u blockChannelIndex = 0; + int16u majorNumber = 1; + int16u minorNumber = 2; + optional char_string identifier = 3; + } + struct RatingNameStruct { - char_string ratingName = 0; - optional char_string ratingNameDesc = 1; + char_string<8> ratingName = 0; + optional char_string<64> ratingNameDesc = 1; } info event RemainingScreenTimeExpired = 0 { } + info event EnteringBlockContentTimeWindow = 1 { + } + readonly attribute boolean enabled = 0; readonly attribute optional RatingNameStruct onDemandRatings[] = 1; readonly attribute optional char_string<8> onDemandRatingThreshold = 2; @@ -8601,7 +8642,10 @@ provisional cluster ContentControl = 1295 { readonly attribute optional char_string<8> scheduledContentRatingThreshold = 4; readonly attribute optional elapsed_s screenDailyTime = 5; readonly attribute optional elapsed_s remainingScreenTime = 6; - readonly attribute boolean blockUnrated = 7; + readonly attribute optional boolean blockUnrated = 7; + readonly attribute optional BlockChannelStruct blockChannelList[] = 8; + readonly attribute optional AppInfoStruct blockApplicationList[] = 9; + readonly attribute optional TimeWindowStruct blockContentTimeWindow[] = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -8610,8 +8654,8 @@ provisional cluster ContentControl = 1295 { readonly attribute int16u clusterRevision = 65533; request struct UpdatePINRequest { - optional char_string oldPIN = 0; - char_string newPIN = 1; + char_string<6> oldPIN = 0; + char_string<6> newPIN = 1; } response struct ResetPINResponse = 2 { @@ -8619,8 +8663,8 @@ provisional cluster ContentControl = 1295 { } request struct AddBonusTimeRequest { - optional char_string PINCode = 0; - optional elapsed_s bonusTime = 1; + optional char_string<6> PINCode = 0; + elapsed_s bonusTime = 1; } request struct SetScreenDailyTimeRequest { @@ -8628,38 +8672,74 @@ provisional cluster ContentControl = 1295 { } request struct SetOnDemandRatingThresholdRequest { - char_string rating = 0; + char_string<8> rating = 0; } request struct SetScheduledContentRatingThresholdRequest { - char_string rating = 0; + char_string<8> rating = 0; + } + + request struct AddBlockChannelsRequest { + BlockChannelStruct channels[] = 0; + } + + request struct RemoveBlockChannelsRequest { + int16u channelIndexes[] = 0; + } + + request struct AddBlockApplicationsRequest { + AppInfoStruct applications[] = 0; + } + + request struct RemoveBlockApplicationsRequest { + AppInfoStruct applications[] = 0; + } + + request struct SetBlockContentTimeWindowRequest { + TimeWindowStruct timeWindow = 0; + } + + request struct RemoveBlockContentTimeWindowRequest { + int16u timeWindowIndexes[] = 0; } /** The purpose of this command is to update the PIN used for protecting configuration of the content control settings. Upon success, the old PIN SHALL no longer work. The PIN is used to ensure that only the Node (or User) with the PIN code can make changes to the Content Control settings, for example, turn off Content Controls or modify the ScreenDailyTime. The PIN is composed of a numeric string of up to 6 human readable characters (displayable) . Upon receipt of this command, the media device SHALL check if the OldPIN field of this command is the same as the current PIN. If the PINs are the same, then the PIN code SHALL be set to NewPIN. Otherwise a response with InvalidPINCode error status SHALL be returned. The media device MAY provide a default PIN to the User via an out of band mechanism. For security reasons, it is recommended that a client encourage the user to update the PIN from its default value when performing configuration of the Content Control settings exposed by this cluster. The ResetPIN command can also be used to obtain the default PIN. */ - command UpdatePIN(UpdatePINRequest): DefaultSuccess = 0; + timed command access(invoke: manage) UpdatePIN(UpdatePINRequest): DefaultSuccess = 0; /** The purpose of this command is to reset the PIN. If this command is executed successfully, a ResetPINResponse command with a new PIN SHALL be returned. */ - command ResetPIN(): ResetPINResponse = 1; + timed command access(invoke: administer) ResetPIN(): ResetPINResponse = 1; /** The purpose of this command is to turn on the Content Control feature on a media device. On receipt of the Enable command, the media device SHALL set the Enabled attribute to TRUE. */ - command Enable(): DefaultSuccess = 3; + timed command access(invoke: manage) Enable(): DefaultSuccess = 3; /** The purpose of this command is to turn off the Content Control feature on a media device. On receipt of the Disable command, the media device SHALL set the Enabled attribute to FALSE. */ - command Disable(): DefaultSuccess = 4; + timed command access(invoke: manage) Disable(): DefaultSuccess = 4; /** The purpose of this command is to add the extra screen time for the user. If a client with Operate privilege invokes this command, the media device SHALL check whether the PINCode passed in the command matches the current PINCode value. If these match, then the RemainingScreenTime attribute SHALL be increased by the specified BonusTime value. If the PINs do not match, then a response with InvalidPINCode error status SHALL be returned, and no changes SHALL be made to RemainingScreenTime. If a client with Manage privilege or greater invokes this command, the media device SHALL ignore the PINCode field and directly increase the RemainingScreenTime attribute by the specified BonusTime value. A server that does not support the PM feature SHALL respond with InvalidPINCode to clients that only have Operate privilege unless: It has been provided with the PIN value to expect via an out of band mechanism, and The client has provided a PINCode that matches the expected PIN value. */ command AddBonusTime(AddBonusTimeRequest): DefaultSuccess = 5; /** The purpose of this command is to set the ScreenDailyTime attribute. On receipt of the SetScreenDailyTime command, the media device SHALL set the ScreenDailyTime attribute to the ScreenTime value. */ - command SetScreenDailyTime(SetScreenDailyTimeRequest): DefaultSuccess = 6; + command access(invoke: manage) SetScreenDailyTime(SetScreenDailyTimeRequest): DefaultSuccess = 6; /** The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the BlockUnratedContent command, the media device SHALL set the BlockUnrated attribute to TRUE. */ - command BlockUnratedContent(): DefaultSuccess = 7; + command access(invoke: manage) BlockUnratedContent(): DefaultSuccess = 7; /** The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the UnblockUnratedContent command, the media device SHALL set the BlockUnrated attribute to FALSE. */ - command UnblockUnratedContent(): DefaultSuccess = 8; + command access(invoke: manage) UnblockUnratedContent(): DefaultSuccess = 8; /** The purpose of this command is to set the OnDemandRatingThreshold attribute. On receipt of the SetOnDemandRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the OnDemandRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. */ - command SetOnDemandRatingThreshold(SetOnDemandRatingThresholdRequest): DefaultSuccess = 9; + command access(invoke: manage) SetOnDemandRatingThreshold(SetOnDemandRatingThresholdRequest): DefaultSuccess = 9; /** The purpose of this command is to set ScheduledContentRatingThreshold attribute. On receipt of the SetScheduledContentRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the ScheduledContentRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. */ - command SetScheduledContentRatingThreshold(SetScheduledContentRatingThresholdRequest): DefaultSuccess = 10; + command access(invoke: manage) SetScheduledContentRatingThreshold(SetScheduledContentRatingThresholdRequest): DefaultSuccess = 10; + /** The purpose of this command is to set BlockChannelList attribute. */ + command access(invoke: manage) AddBlockChannels(AddBlockChannelsRequest): DefaultSuccess = 11; + /** The purpose of this command is to remove channels from the BlockChannelList attribute. */ + command access(invoke: manage) RemoveBlockChannels(RemoveBlockChannelsRequest): DefaultSuccess = 12; + /** The purpose of this command is to set applications to the BlockApplicationList attribute. */ + command access(invoke: manage) AddBlockApplications(AddBlockApplicationsRequest): DefaultSuccess = 13; + /** The purpose of this command is to remove applications from the BlockApplicationList attribute. */ + command access(invoke: manage) RemoveBlockApplications(RemoveBlockApplicationsRequest): DefaultSuccess = 14; + /** The purpose of this command is to set the BlockContentTimeWindow attribute. */ + command access(invoke: manage) SetBlockContentTimeWindow(SetBlockContentTimeWindowRequest): DefaultSuccess = 15; + /** The purpose of this command is to remove the selected time windows from the BlockContentTimeWindow attribute. */ + command access(invoke: manage) RemoveBlockContentTimeWindow(RemoveBlockContentTimeWindowRequest): DefaultSuccess = 16; } /** This cluster provides an interface for sending targeted commands to an Observer of a Content App on a Video Player device such as a Streaming Media Player, Smart TV or Smart Screen. The cluster server for Content App Observer is implemented by an endpoint that communicates with a Content App, such as a Casting Video Client. The cluster client for Content App Observer is implemented by a Content App endpoint. A Content App is informed of the NodeId of an Observer when a binding is set on the Content App. The Content App can then send the ContentAppMessage to the Observer (server cluster), and the Observer responds with a ContentAppMessageResponse. */ provisional cluster ContentAppObserver = 1296 { - revision 1; // NOTE: Default/not specifically set + revision 1; enum StatusEnum : enum8 { kSuccess = 0; @@ -8674,14 +8754,14 @@ provisional cluster ContentAppObserver = 1296 { readonly attribute int16u clusterRevision = 65533; request struct ContentAppMessageRequest { - optional char_string data = 0; - char_string encodingHint = 1; + long_char_string<500> data = 0; + optional char_string<100> encodingHint = 1; } response struct ContentAppMessageResponse = 1 { StatusEnum status = 0; - optional char_string data = 1; - optional char_string encodingHint = 2; + optional long_char_string<500> data = 1; + optional char_string<100> encodingHint = 2; } /** Upon receipt, the data field MAY be parsed and interpreted. Message encoding is specific to the Content App. A Content App MAY when possible read attributes from the Basic Information Cluster on the Observer and use this to determine the Message encoding. */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 2e64d37cd62b11..6bb079e8975164 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -53180,20 +53180,20 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void getProgramGuide(ProgramGuideResponseCallback callback, Optional startTime, Optional endTime, Optional> channelList, Optional pageToken, Optional recordingFlag, Optional> externalIDList, Optional data) { + public void getProgramGuide(ProgramGuideResponseCallback callback, Long startTime, Long endTime, Optional> channelList, @Nullable Optional pageToken, @Nullable Optional recordingFlag, Optional> externalIDList, Optional data) { getProgramGuide(callback, startTime, endTime, channelList, pageToken, recordingFlag, externalIDList, data, 0); } - public void getProgramGuide(ProgramGuideResponseCallback callback, Optional startTime, Optional endTime, Optional> channelList, Optional pageToken, Optional recordingFlag, Optional> externalIDList, Optional data, int timedInvokeTimeoutMs) { + public void getProgramGuide(ProgramGuideResponseCallback callback, Long startTime, Long endTime, Optional> channelList, @Nullable Optional pageToken, @Nullable Optional recordingFlag, Optional> externalIDList, Optional data, int timedInvokeTimeoutMs) { final long commandId = 4L; ArrayList elements = new ArrayList<>(); final long startTimeFieldID = 0L; - BaseTLVType startTimetlvValue = startTime.map((nonOptionalstartTime) -> new UIntType(nonOptionalstartTime)).orElse(new EmptyType()); + BaseTLVType startTimetlvValue = new UIntType(startTime); elements.add(new StructElement(startTimeFieldID, startTimetlvValue)); final long endTimeFieldID = 1L; - BaseTLVType endTimetlvValue = endTime.map((nonOptionalendTime) -> new UIntType(nonOptionalendTime)).orElse(new EmptyType()); + BaseTLVType endTimetlvValue = new UIntType(endTime); elements.add(new StructElement(endTimeFieldID, endTimetlvValue)); final long channelListFieldID = 2L; @@ -53201,11 +53201,11 @@ public void getProgramGuide(ProgramGuideResponseCallback callback, Optionalmap((nonOptionalpageToken) -> nonOptionalpageToken.encodeTlv()).orElse(new EmptyType()); + BaseTLVType pageTokentlvValue = pageToken != null ? pageToken.map((nonOptionalpageToken) -> nonOptionalpageToken.encodeTlv()).orElse(new EmptyType()) : new NullType(); elements.add(new StructElement(pageTokenFieldID, pageTokentlvValue)); final long recordingFlagFieldID = 4L; - BaseTLVType recordingFlagtlvValue = recordingFlag.map((nonOptionalrecordingFlag) -> new UIntType(nonOptionalrecordingFlag)).orElse(new EmptyType()); + BaseTLVType recordingFlagtlvValue = recordingFlag != null ? recordingFlag.map((nonOptionalrecordingFlag) -> new UIntType(nonOptionalrecordingFlag)).orElse(new EmptyType()) : new NullType(); elements.add(new StructElement(recordingFlagFieldID, recordingFlagtlvValue)); final long externalIDListFieldID = 5L; @@ -53241,11 +53241,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void recordProgram(DefaultClusterCallback callback, String programIdentifier, Boolean shouldRecordSeries, ArrayList externalIDList, byte[] data) { + public void recordProgram(DefaultClusterCallback callback, String programIdentifier, Boolean shouldRecordSeries, Optional> externalIDList, Optional data) { recordProgram(callback, programIdentifier, shouldRecordSeries, externalIDList, data, 0); } - public void recordProgram(DefaultClusterCallback callback, String programIdentifier, Boolean shouldRecordSeries, ArrayList externalIDList, byte[] data, int timedInvokeTimeoutMs) { + public void recordProgram(DefaultClusterCallback callback, String programIdentifier, Boolean shouldRecordSeries, Optional> externalIDList, Optional data, int timedInvokeTimeoutMs) { final long commandId = 6L; ArrayList elements = new ArrayList<>(); @@ -53258,11 +53258,11 @@ public void recordProgram(DefaultClusterCallback callback, String programIdentif elements.add(new StructElement(shouldRecordSeriesFieldID, shouldRecordSeriestlvValue)); final long externalIDListFieldID = 2L; - BaseTLVType externalIDListtlvValue = ArrayType.generateArrayType(externalIDList, (elementexternalIDList) -> elementexternalIDList.encodeTlv()); + BaseTLVType externalIDListtlvValue = externalIDList.map((nonOptionalexternalIDList) -> ArrayType.generateArrayType(nonOptionalexternalIDList, (elementnonOptionalexternalIDList) -> elementnonOptionalexternalIDList.encodeTlv())).orElse(new EmptyType()); elements.add(new StructElement(externalIDListFieldID, externalIDListtlvValue)); final long dataFieldID = 3L; - BaseTLVType datatlvValue = new ByteArrayType(data); + BaseTLVType datatlvValue = data.map((nonOptionaldata) -> new ByteArrayType(nonOptionaldata)).orElse(new EmptyType()); elements.add(new StructElement(dataFieldID, datatlvValue)); StructType commandArgs = new StructType(elements); @@ -53273,11 +53273,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void cancelRecordProgram(DefaultClusterCallback callback, String programIdentifier, Boolean shouldRecordSeries, ArrayList externalIDList, byte[] data) { + public void cancelRecordProgram(DefaultClusterCallback callback, String programIdentifier, Boolean shouldRecordSeries, Optional> externalIDList, Optional data) { cancelRecordProgram(callback, programIdentifier, shouldRecordSeries, externalIDList, data, 0); } - public void cancelRecordProgram(DefaultClusterCallback callback, String programIdentifier, Boolean shouldRecordSeries, ArrayList externalIDList, byte[] data, int timedInvokeTimeoutMs) { + public void cancelRecordProgram(DefaultClusterCallback callback, String programIdentifier, Boolean shouldRecordSeries, Optional> externalIDList, Optional data, int timedInvokeTimeoutMs) { final long commandId = 7L; ArrayList elements = new ArrayList<>(); @@ -53290,11 +53290,11 @@ public void cancelRecordProgram(DefaultClusterCallback callback, String programI elements.add(new StructElement(shouldRecordSeriesFieldID, shouldRecordSeriestlvValue)); final long externalIDListFieldID = 2L; - BaseTLVType externalIDListtlvValue = ArrayType.generateArrayType(externalIDList, (elementexternalIDList) -> elementexternalIDList.encodeTlv()); + BaseTLVType externalIDListtlvValue = externalIDList.map((nonOptionalexternalIDList) -> ArrayType.generateArrayType(nonOptionalexternalIDList, (elementnonOptionalexternalIDList) -> elementnonOptionalexternalIDList.encodeTlv())).orElse(new EmptyType()); elements.add(new StructElement(externalIDListFieldID, externalIDListtlvValue)); final long dataFieldID = 3L; - BaseTLVType datatlvValue = new ByteArrayType(data); + BaseTLVType datatlvValue = data.map((nonOptionaldata) -> new ByteArrayType(nonOptionaldata)).orElse(new EmptyType()); elements.add(new StructElement(dataFieldID, datatlvValue)); StructType commandArgs = new StructType(elements); @@ -54286,11 +54286,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void activateAudioTrack(DefaultClusterCallback callback, String trackID, Integer audioOutputIndex) { + public void activateAudioTrack(DefaultClusterCallback callback, String trackID, @Nullable Optional audioOutputIndex) { activateAudioTrack(callback, trackID, audioOutputIndex, 0); } - public void activateAudioTrack(DefaultClusterCallback callback, String trackID, Integer audioOutputIndex, int timedInvokeTimeoutMs) { + public void activateAudioTrack(DefaultClusterCallback callback, String trackID, @Nullable Optional audioOutputIndex, int timedInvokeTimeoutMs) { final long commandId = 12L; ArrayList elements = new ArrayList<>(); @@ -54299,7 +54299,7 @@ public void activateAudioTrack(DefaultClusterCallback callback, String trackID, elements.add(new StructElement(trackIDFieldID, trackIDtlvValue)); final long audioOutputIndexFieldID = 1L; - BaseTLVType audioOutputIndextlvValue = new UIntType(audioOutputIndex); + BaseTLVType audioOutputIndextlvValue = audioOutputIndex != null ? audioOutputIndex.map((nonOptionalaudioOutputIndex) -> new UIntType(nonOptionalaudioOutputIndex)).orElse(new EmptyType()) : new NullType(); elements.add(new StructElement(audioOutputIndexFieldID, audioOutputIndextlvValue)); StructType commandArgs = new StructType(elements); @@ -55683,11 +55683,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void launchURL(LauncherResponseCallback callback, String contentURL, Optional displayString, Optional brandingInformation) { - launchURL(callback, contentURL, displayString, brandingInformation, 0); + public void launchURL(LauncherResponseCallback callback, String contentURL, Optional displayString, Optional brandingInformation, Optional playbackPreferences) { + launchURL(callback, contentURL, displayString, brandingInformation, playbackPreferences, 0); } - public void launchURL(LauncherResponseCallback callback, String contentURL, Optional displayString, Optional brandingInformation, int timedInvokeTimeoutMs) { + public void launchURL(LauncherResponseCallback callback, String contentURL, Optional displayString, Optional brandingInformation, Optional playbackPreferences, int timedInvokeTimeoutMs) { final long commandId = 1L; ArrayList elements = new ArrayList<>(); @@ -55703,6 +55703,10 @@ public void launchURL(LauncherResponseCallback callback, String contentURL, Opti BaseTLVType brandingInformationtlvValue = brandingInformation.map((nonOptionalbrandingInformation) -> nonOptionalbrandingInformation.encodeTlv()).orElse(new EmptyType()); elements.add(new StructElement(brandingInformationFieldID, brandingInformationtlvValue)); + final long playbackPreferencesFieldID = 3L; + BaseTLVType playbackPreferencestlvValue = playbackPreferences.map((nonOptionalplaybackPreferences) -> nonOptionalplaybackPreferences.encodeTlv()).orElse(new EmptyType()); + elements.add(new StructElement(playbackPreferencesFieldID, playbackPreferencestlvValue)); + StructType commandArgs = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -57324,6 +57328,9 @@ public static class ContentControlCluster extends BaseChipCluster { private static final long SCREEN_DAILY_TIME_ATTRIBUTE_ID = 5L; private static final long REMAINING_SCREEN_TIME_ATTRIBUTE_ID = 6L; private static final long BLOCK_UNRATED_ATTRIBUTE_ID = 7L; + private static final long BLOCK_CHANNEL_LIST_ATTRIBUTE_ID = 8L; + private static final long BLOCK_APPLICATION_LIST_ATTRIBUTE_ID = 9L; + private static final long BLOCK_CONTENT_TIME_WINDOW_ATTRIBUTE_ID = 10L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -57341,16 +57348,13 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void updatePIN(DefaultClusterCallback callback, Optional oldPIN, String newPIN) { - updatePIN(callback, oldPIN, newPIN, 0); - } - public void updatePIN(DefaultClusterCallback callback, Optional oldPIN, String newPIN, int timedInvokeTimeoutMs) { + public void updatePIN(DefaultClusterCallback callback, String oldPIN, String newPIN, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); final long oldPINFieldID = 0L; - BaseTLVType oldPINtlvValue = oldPIN.map((nonOptionaloldPIN) -> new StringType(nonOptionaloldPIN)).orElse(new EmptyType()); + BaseTLVType oldPINtlvValue = new StringType(oldPIN); elements.add(new StructElement(oldPINFieldID, oldPINtlvValue)); final long newPINFieldID = 1L; @@ -57365,9 +57369,6 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void resetPIN(ResetPINResponseCallback callback) { - resetPIN(callback, 0); - } public void resetPIN(ResetPINResponseCallback callback, int timedInvokeTimeoutMs) { final long commandId = 1L; @@ -57391,9 +57392,6 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void enable(DefaultClusterCallback callback) { - enable(callback, 0); - } public void enable(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { final long commandId = 3L; @@ -57407,9 +57405,6 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void disable(DefaultClusterCallback callback) { - disable(callback, 0); - } public void disable(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { final long commandId = 4L; @@ -57423,11 +57418,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void addBonusTime(DefaultClusterCallback callback, Optional PINCode, Optional bonusTime) { + public void addBonusTime(DefaultClusterCallback callback, Optional PINCode, Long bonusTime) { addBonusTime(callback, PINCode, bonusTime, 0); } - public void addBonusTime(DefaultClusterCallback callback, Optional PINCode, Optional bonusTime, int timedInvokeTimeoutMs) { + public void addBonusTime(DefaultClusterCallback callback, Optional PINCode, Long bonusTime, int timedInvokeTimeoutMs) { final long commandId = 5L; ArrayList elements = new ArrayList<>(); @@ -57436,7 +57431,7 @@ public void addBonusTime(DefaultClusterCallback callback, Optional PINCo elements.add(new StructElement(PINCodeFieldID, PINCodetlvValue)); final long bonusTimeFieldID = 1L; - BaseTLVType bonusTimetlvValue = bonusTime.map((nonOptionalbonusTime) -> new UIntType(nonOptionalbonusTime)).orElse(new EmptyType()); + BaseTLVType bonusTimetlvValue = new UIntType(bonusTime); elements.add(new StructElement(bonusTimeFieldID, bonusTimetlvValue)); StructType commandArgs = new StructType(elements); @@ -57539,6 +57534,126 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } + public void addBlockChannels(DefaultClusterCallback callback, ArrayList channels) { + addBlockChannels(callback, channels, 0); + } + + public void addBlockChannels(DefaultClusterCallback callback, ArrayList channels, int timedInvokeTimeoutMs) { + final long commandId = 11L; + + ArrayList elements = new ArrayList<>(); + final long channelsFieldID = 0L; + BaseTLVType channelstlvValue = ArrayType.generateArrayType(channels, (elementchannels) -> elementchannels.encodeTlv()); + elements.add(new StructElement(channelsFieldID, channelstlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void removeBlockChannels(DefaultClusterCallback callback, ArrayList channelIndexes) { + removeBlockChannels(callback, channelIndexes, 0); + } + + public void removeBlockChannels(DefaultClusterCallback callback, ArrayList channelIndexes, int timedInvokeTimeoutMs) { + final long commandId = 12L; + + ArrayList elements = new ArrayList<>(); + final long channelIndexesFieldID = 0L; + BaseTLVType channelIndexestlvValue = ArrayType.generateArrayType(channelIndexes, (elementchannelIndexes) -> new UIntType(elementchannelIndexes)); + elements.add(new StructElement(channelIndexesFieldID, channelIndexestlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void addBlockApplications(DefaultClusterCallback callback, ArrayList applications) { + addBlockApplications(callback, applications, 0); + } + + public void addBlockApplications(DefaultClusterCallback callback, ArrayList applications, int timedInvokeTimeoutMs) { + final long commandId = 13L; + + ArrayList elements = new ArrayList<>(); + final long applicationsFieldID = 0L; + BaseTLVType applicationstlvValue = ArrayType.generateArrayType(applications, (elementapplications) -> elementapplications.encodeTlv()); + elements.add(new StructElement(applicationsFieldID, applicationstlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void removeBlockApplications(DefaultClusterCallback callback, ArrayList applications) { + removeBlockApplications(callback, applications, 0); + } + + public void removeBlockApplications(DefaultClusterCallback callback, ArrayList applications, int timedInvokeTimeoutMs) { + final long commandId = 14L; + + ArrayList elements = new ArrayList<>(); + final long applicationsFieldID = 0L; + BaseTLVType applicationstlvValue = ArrayType.generateArrayType(applications, (elementapplications) -> elementapplications.encodeTlv()); + elements.add(new StructElement(applicationsFieldID, applicationstlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void setBlockContentTimeWindow(DefaultClusterCallback callback, ChipStructs.ContentControlClusterTimeWindowStruct timeWindow) { + setBlockContentTimeWindow(callback, timeWindow, 0); + } + + public void setBlockContentTimeWindow(DefaultClusterCallback callback, ChipStructs.ContentControlClusterTimeWindowStruct timeWindow, int timedInvokeTimeoutMs) { + final long commandId = 15L; + + ArrayList elements = new ArrayList<>(); + final long timeWindowFieldID = 0L; + BaseTLVType timeWindowtlvValue = timeWindow.encodeTlv(); + elements.add(new StructElement(timeWindowFieldID, timeWindowtlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void removeBlockContentTimeWindow(DefaultClusterCallback callback, ArrayList timeWindowIndexes) { + removeBlockContentTimeWindow(callback, timeWindowIndexes, 0); + } + + public void removeBlockContentTimeWindow(DefaultClusterCallback callback, ArrayList timeWindowIndexes, int timedInvokeTimeoutMs) { + final long commandId = 16L; + + ArrayList elements = new ArrayList<>(); + final long timeWindowIndexesFieldID = 0L; + BaseTLVType timeWindowIndexestlvValue = ArrayType.generateArrayType(timeWindowIndexes, (elementtimeWindowIndexes) -> new UIntType(elementtimeWindowIndexes)); + elements.add(new StructElement(timeWindowIndexesFieldID, timeWindowIndexestlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + public interface ResetPINResponseCallback extends BaseClusterCallback { void onSuccess(String PINCode); } @@ -57551,6 +57666,18 @@ public interface ScheduledContentRatingsAttributeCallback extends BaseAttributeC void onSuccess(List value); } + public interface BlockChannelListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface BlockApplicationListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface BlockContentTimeWindowAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -57775,6 +57902,84 @@ public void onSuccess(byte[] tlv) { }, BLOCK_UNRATED_ATTRIBUTE_ID, minInterval, maxInterval); } + public void readBlockChannelListAttribute( + BlockChannelListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BLOCK_CHANNEL_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, BLOCK_CHANNEL_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeBlockChannelListAttribute( + BlockChannelListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BLOCK_CHANNEL_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, BLOCK_CHANNEL_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readBlockApplicationListAttribute( + BlockApplicationListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BLOCK_APPLICATION_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, BLOCK_APPLICATION_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeBlockApplicationListAttribute( + BlockApplicationListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BLOCK_APPLICATION_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, BLOCK_APPLICATION_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readBlockContentTimeWindowAttribute( + BlockContentTimeWindowAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BLOCK_CONTENT_TIME_WINDOW_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, BLOCK_CONTENT_TIME_WINDOW_ATTRIBUTE_ID, true); + } + + public void subscribeBlockContentTimeWindowAttribute( + BlockContentTimeWindowAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BLOCK_CONTENT_TIME_WINDOW_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, BLOCK_CONTENT_TIME_WINDOW_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -57952,20 +58157,20 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void contentAppMessage(ContentAppMessageResponseCallback callback, Optional data, String encodingHint) { + public void contentAppMessage(ContentAppMessageResponseCallback callback, String data, Optional encodingHint) { contentAppMessage(callback, data, encodingHint, 0); } - public void contentAppMessage(ContentAppMessageResponseCallback callback, Optional data, String encodingHint, int timedInvokeTimeoutMs) { + public void contentAppMessage(ContentAppMessageResponseCallback callback, String data, Optional encodingHint, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); final long dataFieldID = 0L; - BaseTLVType datatlvValue = data.map((nonOptionaldata) -> new StringType(nonOptionaldata)).orElse(new EmptyType()); + BaseTLVType datatlvValue = new StringType(data); elements.add(new StructElement(dataFieldID, datatlvValue)); final long encodingHintFieldID = 1L; - BaseTLVType encodingHinttlvValue = new StringType(encodingHint); + BaseTLVType encodingHinttlvValue = encodingHint.map((nonOptionalencodingHint) -> new StringType(nonOptionalencodingHint)).orElse(new EmptyType()); elements.add(new StructElement(encodingHintFieldID, encodingHinttlvValue)); StructType commandArgs = new StructType(elements); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index ce1a79c5a4a710..efeecc2a147290 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java @@ -5585,17 +5585,17 @@ public String toString() { } } public static class TargetNavigatorClusterTargetUpdatedEvent { - public ArrayList targetList; - public Integer currentTarget; - public byte[] data; + public Optional> targetList; + public Optional currentTarget; + public Optional data; private static final long TARGET_LIST_ID = 0L; private static final long CURRENT_TARGET_ID = 1L; private static final long DATA_ID = 2L; public TargetNavigatorClusterTargetUpdatedEvent( - ArrayList targetList, - Integer currentTarget, - byte[] data + Optional> targetList, + Optional currentTarget, + Optional data ) { this.targetList = targetList; this.currentTarget = currentTarget; @@ -5604,9 +5604,9 @@ public TargetNavigatorClusterTargetUpdatedEvent( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); - values.add(new StructElement(TARGET_LIST_ID, ArrayType.generateArrayType(targetList, (elementtargetList) -> elementtargetList.encodeTlv()))); - values.add(new StructElement(CURRENT_TARGET_ID, new UIntType(currentTarget))); - values.add(new StructElement(DATA_ID, new ByteArrayType(data))); + values.add(new StructElement(TARGET_LIST_ID, targetList.map((nonOptionaltargetList) -> ArrayType.generateArrayType(nonOptionaltargetList, (elementnonOptionaltargetList) -> elementnonOptionaltargetList.encodeTlv())).orElse(new EmptyType()))); + values.add(new StructElement(CURRENT_TARGET_ID, currentTarget.map((nonOptionalcurrentTarget) -> new UIntType(nonOptionalcurrentTarget)).orElse(new EmptyType()))); + values.add(new StructElement(DATA_ID, data.map((nonOptionaldata) -> new ByteArrayType(nonOptionaldata)).orElse(new EmptyType()))); return new StructType(values); } @@ -5615,24 +5615,24 @@ public static TargetNavigatorClusterTargetUpdatedEvent decodeTlv(BaseTLVType tlv if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } - ArrayList targetList = null; - Integer currentTarget = null; - byte[] data = null; + Optional> targetList = Optional.empty(); + Optional currentTarget = Optional.empty(); + Optional data = Optional.empty(); for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == TARGET_LIST_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Array) { ArrayType castingValue = element.value(ArrayType.class); - targetList = castingValue.map((elementcastingValue) -> ChipStructs.TargetNavigatorClusterTargetInfoStruct.decodeTlv(elementcastingValue)); + targetList = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.TargetNavigatorClusterTargetInfoStruct.decodeTlv(elementcastingValue))); } } else if (element.contextTagNum() == CURRENT_TARGET_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - currentTarget = castingValue.value(Integer.class); + currentTarget = Optional.of(castingValue.value(Integer.class)); } } else if (element.contextTagNum() == DATA_ID) { if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { ByteArrayType castingValue = element.value(ByteArrayType.class); - data = castingValue.value(byte[].class); + data = Optional.of(castingValue.value(byte[].class)); } } } @@ -5654,7 +5654,7 @@ public String toString() { output.append(currentTarget); output.append("\n"); output.append("\tdata: "); - output.append(Arrays.toString(data)); + output.append(data.isPresent() ? Arrays.toString(data.get()) : ""); output.append("\n"); output.append("}\n"); return output.toString(); @@ -5662,14 +5662,14 @@ public String toString() { } public static class MediaPlaybackClusterStateChangedEvent { public Integer currentState; - public Long startTime; - public Long duration; - public ChipStructs.MediaPlaybackClusterPlaybackPositionStruct sampledPosition; - public Float playbackSpeed; - public Long seekRangeEnd; - public Long seekRangeStart; + public Optional startTime; + public Optional duration; + public Optional sampledPosition; + public Optional playbackSpeed; + public Optional seekRangeEnd; + public Optional seekRangeStart; public Optional data; - public Boolean audioAdvanceUnmuted; + public Optional audioAdvanceUnmuted; private static final long CURRENT_STATE_ID = 0L; private static final long START_TIME_ID = 1L; private static final long DURATION_ID = 2L; @@ -5682,14 +5682,14 @@ public static class MediaPlaybackClusterStateChangedEvent { public MediaPlaybackClusterStateChangedEvent( Integer currentState, - Long startTime, - Long duration, - ChipStructs.MediaPlaybackClusterPlaybackPositionStruct sampledPosition, - Float playbackSpeed, - Long seekRangeEnd, - Long seekRangeStart, + Optional startTime, + Optional duration, + Optional sampledPosition, + Optional playbackSpeed, + Optional seekRangeEnd, + Optional seekRangeStart, Optional data, - Boolean audioAdvanceUnmuted + Optional audioAdvanceUnmuted ) { this.currentState = currentState; this.startTime = startTime; @@ -5705,14 +5705,14 @@ public MediaPlaybackClusterStateChangedEvent( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(CURRENT_STATE_ID, new UIntType(currentState))); - values.add(new StructElement(START_TIME_ID, new UIntType(startTime))); - values.add(new StructElement(DURATION_ID, new UIntType(duration))); - values.add(new StructElement(SAMPLED_POSITION_ID, sampledPosition.encodeTlv())); - values.add(new StructElement(PLAYBACK_SPEED_ID, new FloatType(playbackSpeed))); - values.add(new StructElement(SEEK_RANGE_END_ID, new UIntType(seekRangeEnd))); - values.add(new StructElement(SEEK_RANGE_START_ID, new UIntType(seekRangeStart))); + values.add(new StructElement(START_TIME_ID, startTime.map((nonOptionalstartTime) -> new UIntType(nonOptionalstartTime)).orElse(new EmptyType()))); + values.add(new StructElement(DURATION_ID, duration.map((nonOptionalduration) -> new UIntType(nonOptionalduration)).orElse(new EmptyType()))); + values.add(new StructElement(SAMPLED_POSITION_ID, sampledPosition.map((nonOptionalsampledPosition) -> nonOptionalsampledPosition.encodeTlv()).orElse(new EmptyType()))); + values.add(new StructElement(PLAYBACK_SPEED_ID, playbackSpeed.map((nonOptionalplaybackSpeed) -> new FloatType(nonOptionalplaybackSpeed)).orElse(new EmptyType()))); + values.add(new StructElement(SEEK_RANGE_END_ID, seekRangeEnd.map((nonOptionalseekRangeEnd) -> new UIntType(nonOptionalseekRangeEnd)).orElse(new EmptyType()))); + values.add(new StructElement(SEEK_RANGE_START_ID, seekRangeStart.map((nonOptionalseekRangeStart) -> new UIntType(nonOptionalseekRangeStart)).orElse(new EmptyType()))); values.add(new StructElement(DATA_ID, data.map((nonOptionaldata) -> new ByteArrayType(nonOptionaldata)).orElse(new EmptyType()))); - values.add(new StructElement(AUDIO_ADVANCE_UNMUTED_ID, new BooleanType(audioAdvanceUnmuted))); + values.add(new StructElement(AUDIO_ADVANCE_UNMUTED_ID, audioAdvanceUnmuted.map((nonOptionalaudioAdvanceUnmuted) -> new BooleanType(nonOptionalaudioAdvanceUnmuted)).orElse(new EmptyType()))); return new StructType(values); } @@ -5722,14 +5722,14 @@ public static MediaPlaybackClusterStateChangedEvent decodeTlv(BaseTLVType tlvVal return null; } Integer currentState = null; - Long startTime = null; - Long duration = null; - ChipStructs.MediaPlaybackClusterPlaybackPositionStruct sampledPosition = null; - Float playbackSpeed = null; - Long seekRangeEnd = null; - Long seekRangeStart = null; + Optional startTime = Optional.empty(); + Optional duration = Optional.empty(); + Optional sampledPosition = Optional.empty(); + Optional playbackSpeed = Optional.empty(); + Optional seekRangeEnd = Optional.empty(); + Optional seekRangeStart = Optional.empty(); Optional data = Optional.empty(); - Boolean audioAdvanceUnmuted = null; + Optional audioAdvanceUnmuted = Optional.empty(); for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == CURRENT_STATE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -5739,32 +5739,32 @@ public static MediaPlaybackClusterStateChangedEvent decodeTlv(BaseTLVType tlvVal } else if (element.contextTagNum() == START_TIME_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - startTime = castingValue.value(Long.class); + startTime = Optional.of(castingValue.value(Long.class)); } } else if (element.contextTagNum() == DURATION_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - duration = castingValue.value(Long.class); + duration = Optional.of(castingValue.value(Long.class)); } } else if (element.contextTagNum() == SAMPLED_POSITION_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { StructType castingValue = element.value(StructType.class); - sampledPosition = ChipStructs.MediaPlaybackClusterPlaybackPositionStruct.decodeTlv(castingValue); + sampledPosition = Optional.of(ChipStructs.MediaPlaybackClusterPlaybackPositionStruct.decodeTlv(castingValue)); } } else if (element.contextTagNum() == PLAYBACK_SPEED_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Float) { FloatType castingValue = element.value(FloatType.class); - playbackSpeed = castingValue.value(Float.class); + playbackSpeed = Optional.of(castingValue.value(Float.class)); } } else if (element.contextTagNum() == SEEK_RANGE_END_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - seekRangeEnd = castingValue.value(Long.class); + seekRangeEnd = Optional.of(castingValue.value(Long.class)); } } else if (element.contextTagNum() == SEEK_RANGE_START_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - seekRangeStart = castingValue.value(Long.class); + seekRangeStart = Optional.of(castingValue.value(Long.class)); } } else if (element.contextTagNum() == DATA_ID) { if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { @@ -5774,7 +5774,7 @@ public static MediaPlaybackClusterStateChangedEvent decodeTlv(BaseTLVType tlvVal } else if (element.contextTagNum() == AUDIO_ADVANCE_UNMUTED_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { BooleanType castingValue = element.value(BooleanType.class); - audioAdvanceUnmuted = castingValue.value(Boolean.class); + audioAdvanceUnmuted = Optional.of(castingValue.value(Boolean.class)); } } } @@ -5828,17 +5828,22 @@ public String toString() { } public static class AccountLoginClusterLoggedOutEvent { public Optional node; + public Integer fabricIndex; private static final long NODE_ID = 0L; + private static final long FABRIC_INDEX_ID = 254L; public AccountLoginClusterLoggedOutEvent( - Optional node + Optional node, + Integer fabricIndex ) { this.node = node; + this.fabricIndex = fabricIndex; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(NODE_ID, node.map((nonOptionalnode) -> new UIntType(nonOptionalnode)).orElse(new EmptyType()))); + values.add(new StructElement(FABRIC_INDEX_ID, new UIntType(fabricIndex))); return new StructType(values); } @@ -5848,16 +5853,23 @@ public static AccountLoginClusterLoggedOutEvent decodeTlv(BaseTLVType tlvValue) return null; } Optional node = Optional.empty(); + Integer fabricIndex = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == NODE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); node = Optional.of(castingValue.value(Long.class)); } + } else if (element.contextTagNum() == FABRIC_INDEX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + fabricIndex = castingValue.value(Integer.class); + } } } return new AccountLoginClusterLoggedOutEvent( - node + node, + fabricIndex ); } @@ -5868,6 +5880,9 @@ public String toString() { output.append("\tnode: "); output.append(node); output.append("\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); output.append("}\n"); return output.toString(); } @@ -5900,6 +5915,34 @@ public String toString() { return output.toString(); } } +public static class ContentControlClusterEnteringBlockContentTimeWindowEvent { + + public ContentControlClusterEnteringBlockContentTimeWindowEvent( + ) { + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + + return new StructType(values); + } + + public static ContentControlClusterEnteringBlockContentTimeWindowEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + return new ContentControlClusterEnteringBlockContentTimeWindowEvent( + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentControlClusterEnteringBlockContentTimeWindowEvent {\n"); + output.append("}\n"); + return output.toString(); + } +} public static class UnitTestingClusterTestEventEvent { public Integer arg1; public Integer arg2; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index 7730f05efe734a..1959f449815ef3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -9277,6 +9277,67 @@ public String toString() { return output.toString(); } } +public static class ChannelClusterAdditionalInfoStruct { + public String name; + public String value; + private static final long NAME_ID = 0L; + private static final long VALUE_ID = 1L; + + public ChannelClusterAdditionalInfoStruct( + String name, + String value + ) { + this.name = name; + this.value = value; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(NAME_ID, new StringType(name))); + values.add(new StructElement(VALUE_ID, new StringType(value))); + + return new StructType(values); + } + + public static ChannelClusterAdditionalInfoStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + String name = null; + String value = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == NAME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + name = castingValue.value(String.class); + } + } else if (element.contextTagNum() == VALUE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + value = castingValue.value(String.class); + } + } + } + return new ChannelClusterAdditionalInfoStruct( + name, + value + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ChannelClusterAdditionalInfoStruct {\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class ChannelClusterProgramCastStruct { public String name; public String role; @@ -9611,11 +9672,11 @@ public static class ChannelClusterProgramStruct { public Optional dvbiUrl; public Optional releaseDate; public Optional parentalGuidanceText; - public Optional recordingFlag; + public Optional recordingFlag; public @Nullable Optional seriesInfo; public Optional> categoryList; public Optional> castList; - public Optional> externalIDList; + public Optional> externalIDList; private static final long IDENTIFIER_ID = 0L; private static final long CHANNEL_ID = 1L; private static final long START_TIME_ID = 2L; @@ -9651,11 +9712,11 @@ public ChannelClusterProgramStruct( Optional dvbiUrl, Optional releaseDate, Optional parentalGuidanceText, - Optional recordingFlag, + Optional recordingFlag, @Nullable Optional seriesInfo, Optional> categoryList, Optional> castList, - Optional> externalIDList + Optional> externalIDList ) { this.identifier = identifier; this.channel = channel; @@ -9721,11 +9782,11 @@ public static ChannelClusterProgramStruct decodeTlv(BaseTLVType tlvValue) { Optional dvbiUrl = Optional.empty(); Optional releaseDate = Optional.empty(); Optional parentalGuidanceText = Optional.empty(); - Optional recordingFlag = Optional.empty(); + Optional recordingFlag = Optional.empty(); @Nullable Optional seriesInfo = null; Optional> categoryList = Optional.empty(); Optional> castList = Optional.empty(); - Optional> externalIDList = Optional.empty(); + Optional> externalIDList = Optional.empty(); for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == IDENTIFIER_ID) { if (element.value(BaseTLVType.class).type() == TLVType.String) { @@ -9800,7 +9861,7 @@ public static ChannelClusterProgramStruct decodeTlv(BaseTLVType tlvValue) { } else if (element.contextTagNum() == RECORDING_FLAG_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - recordingFlag = Optional.of(castingValue.value(Long.class)); + recordingFlag = Optional.of(castingValue.value(Integer.class)); } } else if (element.contextTagNum() == SERIES_INFO_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { @@ -9820,7 +9881,7 @@ public static ChannelClusterProgramStruct decodeTlv(BaseTLVType tlvValue) { } else if (element.contextTagNum() == EXTERNAL_I_D_LIST_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Array) { ArrayType castingValue = element.value(ArrayType.class); - externalIDList = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.ChannelClusterProgramCastStruct.decodeTlv(elementcastingValue))); + externalIDList = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.ChannelClusterAdditionalInfoStruct.decodeTlv(elementcastingValue))); } } } @@ -10049,67 +10110,6 @@ public String toString() { return output.toString(); } } -public static class ChannelClusterAdditionalInfoStruct { - public String name; - public String value; - private static final long NAME_ID = 0L; - private static final long VALUE_ID = 1L; - - public ChannelClusterAdditionalInfoStruct( - String name, - String value - ) { - this.name = name; - this.value = value; - } - - public StructType encodeTlv() { - ArrayList values = new ArrayList<>(); - values.add(new StructElement(NAME_ID, new StringType(name))); - values.add(new StructElement(VALUE_ID, new StringType(value))); - - return new StructType(values); - } - - public static ChannelClusterAdditionalInfoStruct decodeTlv(BaseTLVType tlvValue) { - if (tlvValue == null || tlvValue.type() != TLVType.Struct) { - return null; - } - String name = null; - String value = null; - for (StructElement element: ((StructType)tlvValue).value()) { - if (element.contextTagNum() == NAME_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - name = castingValue.value(String.class); - } - } else if (element.contextTagNum() == VALUE_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - value = castingValue.value(String.class); - } - } - } - return new ChannelClusterAdditionalInfoStruct( - name, - value - ); - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("ChannelClusterAdditionalInfoStruct {\n"); - output.append("\tname: "); - output.append(name); - output.append("\n"); - output.append("\tvalue: "); - output.append(value); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } -} public static class ChannelClusterLineupInfoStruct { public String operatorName; public Optional lineupName; @@ -10264,21 +10264,26 @@ public String toString() { } public static class MediaPlaybackClusterTrackAttributesStruct { public String languageCode; + public @Nullable Optional> characteristics; public @Nullable Optional displayName; private static final long LANGUAGE_CODE_ID = 0L; - private static final long DISPLAY_NAME_ID = 1L; + private static final long CHARACTERISTICS_ID = 1L; + private static final long DISPLAY_NAME_ID = 2L; public MediaPlaybackClusterTrackAttributesStruct( String languageCode, + @Nullable Optional> characteristics, @Nullable Optional displayName ) { this.languageCode = languageCode; + this.characteristics = characteristics; this.displayName = displayName; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(LANGUAGE_CODE_ID, new StringType(languageCode))); + values.add(new StructElement(CHARACTERISTICS_ID, characteristics != null ? characteristics.map((nonOptionalcharacteristics) -> ArrayType.generateArrayType(nonOptionalcharacteristics, (elementnonOptionalcharacteristics) -> new UIntType(elementnonOptionalcharacteristics))).orElse(new EmptyType()) : new NullType())); values.add(new StructElement(DISPLAY_NAME_ID, displayName != null ? displayName.map((nonOptionaldisplayName) -> new StringType(nonOptionaldisplayName)).orElse(new EmptyType()) : new NullType())); return new StructType(values); @@ -10289,6 +10294,7 @@ public static MediaPlaybackClusterTrackAttributesStruct decodeTlv(BaseTLVType tl return null; } String languageCode = null; + @Nullable Optional> characteristics = null; @Nullable Optional displayName = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == LANGUAGE_CODE_ID) { @@ -10296,6 +10302,11 @@ public static MediaPlaybackClusterTrackAttributesStruct decodeTlv(BaseTLVType tl StringType castingValue = element.value(StringType.class); languageCode = castingValue.value(String.class); } + } else if (element.contextTagNum() == CHARACTERISTICS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + characteristics = Optional.of(castingValue.map((elementcastingValue) -> elementcastingValue.value(Integer.class))); + } } else if (element.contextTagNum() == DISPLAY_NAME_ID) { if (element.value(BaseTLVType.class).type() == TLVType.String) { StringType castingValue = element.value(StringType.class); @@ -10305,6 +10316,7 @@ public static MediaPlaybackClusterTrackAttributesStruct decodeTlv(BaseTLVType tl } return new MediaPlaybackClusterTrackAttributesStruct( languageCode, + characteristics, displayName ); } @@ -10316,6 +10328,9 @@ public String toString() { output.append("\tlanguageCode: "); output.append(languageCode); output.append("\n"); + output.append("\tcharacteristics: "); + output.append(characteristics); + output.append("\n"); output.append("\tdisplayName: "); output.append(displayName); output.append("\n"); @@ -10325,13 +10340,13 @@ public String toString() { } public static class MediaPlaybackClusterTrackStruct { public String id; - public @Nullable ChipStructs.MediaPlaybackClusterTrackAttributesStruct trackAttributes; + public ChipStructs.MediaPlaybackClusterTrackAttributesStruct trackAttributes; private static final long ID_ID = 0L; private static final long TRACK_ATTRIBUTES_ID = 1L; public MediaPlaybackClusterTrackStruct( String id, - @Nullable ChipStructs.MediaPlaybackClusterTrackAttributesStruct trackAttributes + ChipStructs.MediaPlaybackClusterTrackAttributesStruct trackAttributes ) { this.id = id; this.trackAttributes = trackAttributes; @@ -10340,7 +10355,7 @@ public MediaPlaybackClusterTrackStruct( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(ID_ID, new StringType(id))); - values.add(new StructElement(TRACK_ATTRIBUTES_ID, trackAttributes != null ? trackAttributes.encodeTlv() : new NullType())); + values.add(new StructElement(TRACK_ATTRIBUTES_ID, trackAttributes.encodeTlv())); return new StructType(values); } @@ -10350,7 +10365,7 @@ public static MediaPlaybackClusterTrackStruct decodeTlv(BaseTLVType tlvValue) { return null; } String id = null; - @Nullable ChipStructs.MediaPlaybackClusterTrackAttributesStruct trackAttributes = null; + ChipStructs.MediaPlaybackClusterTrackAttributesStruct trackAttributes = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == ID_ID) { if (element.value(BaseTLVType.class).type() == TLVType.String) { @@ -10614,16 +10629,16 @@ public String toString() { } public static class ContentLauncherClusterTrackPreferenceStruct { public String languageCode; - public Optional> characteristics; - public Integer audioOutputIndex; + public @Nullable Optional> characteristics; + public @Nullable Optional audioOutputIndex; private static final long LANGUAGE_CODE_ID = 0L; private static final long CHARACTERISTICS_ID = 1L; private static final long AUDIO_OUTPUT_INDEX_ID = 2L; public ContentLauncherClusterTrackPreferenceStruct( String languageCode, - Optional> characteristics, - Integer audioOutputIndex + @Nullable Optional> characteristics, + @Nullable Optional audioOutputIndex ) { this.languageCode = languageCode; this.characteristics = characteristics; @@ -10633,8 +10648,8 @@ public ContentLauncherClusterTrackPreferenceStruct( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(LANGUAGE_CODE_ID, new StringType(languageCode))); - values.add(new StructElement(CHARACTERISTICS_ID, characteristics.map((nonOptionalcharacteristics) -> ArrayType.generateArrayType(nonOptionalcharacteristics, (elementnonOptionalcharacteristics) -> new UIntType(elementnonOptionalcharacteristics))).orElse(new EmptyType()))); - values.add(new StructElement(AUDIO_OUTPUT_INDEX_ID, new UIntType(audioOutputIndex))); + values.add(new StructElement(CHARACTERISTICS_ID, characteristics != null ? characteristics.map((nonOptionalcharacteristics) -> ArrayType.generateArrayType(nonOptionalcharacteristics, (elementnonOptionalcharacteristics) -> new UIntType(elementnonOptionalcharacteristics))).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(AUDIO_OUTPUT_INDEX_ID, audioOutputIndex != null ? audioOutputIndex.map((nonOptionalaudioOutputIndex) -> new UIntType(nonOptionalaudioOutputIndex)).orElse(new EmptyType()) : new NullType())); return new StructType(values); } @@ -10644,8 +10659,8 @@ public static ContentLauncherClusterTrackPreferenceStruct decodeTlv(BaseTLVType return null; } String languageCode = null; - Optional> characteristics = Optional.empty(); - Integer audioOutputIndex = null; + @Nullable Optional> characteristics = null; + @Nullable Optional audioOutputIndex = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == LANGUAGE_CODE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.String) { @@ -10660,7 +10675,7 @@ public static ContentLauncherClusterTrackPreferenceStruct decodeTlv(BaseTLVType } else if (element.contextTagNum() == AUDIO_OUTPUT_INDEX_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - audioOutputIndex = castingValue.value(Integer.class); + audioOutputIndex = Optional.of(castingValue.value(Integer.class)); } } } @@ -10689,17 +10704,17 @@ public String toString() { } } public static class ContentLauncherClusterPlaybackPreferencesStruct { - public Long playbackPosition; - public ChipStructs.ContentLauncherClusterTrackPreferenceStruct textTrack; - public Optional> audioTracks; + public @Nullable Optional playbackPosition; + public @Nullable Optional textTrack; + public @Nullable Optional> audioTracks; private static final long PLAYBACK_POSITION_ID = 0L; private static final long TEXT_TRACK_ID = 1L; private static final long AUDIO_TRACKS_ID = 2L; public ContentLauncherClusterPlaybackPreferencesStruct( - Long playbackPosition, - ChipStructs.ContentLauncherClusterTrackPreferenceStruct textTrack, - Optional> audioTracks + @Nullable Optional playbackPosition, + @Nullable Optional textTrack, + @Nullable Optional> audioTracks ) { this.playbackPosition = playbackPosition; this.textTrack = textTrack; @@ -10708,9 +10723,9 @@ public ContentLauncherClusterPlaybackPreferencesStruct( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); - values.add(new StructElement(PLAYBACK_POSITION_ID, new UIntType(playbackPosition))); - values.add(new StructElement(TEXT_TRACK_ID, textTrack.encodeTlv())); - values.add(new StructElement(AUDIO_TRACKS_ID, audioTracks.map((nonOptionalaudioTracks) -> ArrayType.generateArrayType(nonOptionalaudioTracks, (elementnonOptionalaudioTracks) -> elementnonOptionalaudioTracks.encodeTlv())).orElse(new EmptyType()))); + values.add(new StructElement(PLAYBACK_POSITION_ID, playbackPosition != null ? playbackPosition.map((nonOptionalplaybackPosition) -> new UIntType(nonOptionalplaybackPosition)).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(TEXT_TRACK_ID, textTrack != null ? textTrack.map((nonOptionaltextTrack) -> nonOptionaltextTrack.encodeTlv()).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(AUDIO_TRACKS_ID, audioTracks != null ? audioTracks.map((nonOptionalaudioTracks) -> ArrayType.generateArrayType(nonOptionalaudioTracks, (elementnonOptionalaudioTracks) -> elementnonOptionalaudioTracks.encodeTlv())).orElse(new EmptyType()) : new NullType())); return new StructType(values); } @@ -10719,19 +10734,19 @@ public static ContentLauncherClusterPlaybackPreferencesStruct decodeTlv(BaseTLVT if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } - Long playbackPosition = null; - ChipStructs.ContentLauncherClusterTrackPreferenceStruct textTrack = null; - Optional> audioTracks = Optional.empty(); + @Nullable Optional playbackPosition = null; + @Nullable Optional textTrack = null; + @Nullable Optional> audioTracks = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == PLAYBACK_POSITION_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - playbackPosition = castingValue.value(Long.class); + playbackPosition = Optional.of(castingValue.value(Long.class)); } } else if (element.contextTagNum() == TEXT_TRACK_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { StructType castingValue = element.value(StructType.class); - textTrack = ChipStructs.ContentLauncherClusterTrackPreferenceStruct.decodeTlv(castingValue); + textTrack = Optional.of(ChipStructs.ContentLauncherClusterTrackPreferenceStruct.decodeTlv(castingValue)); } } else if (element.contextTagNum() == AUDIO_TRACKS_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Array) { @@ -11403,6 +11418,325 @@ public String toString() { return output.toString(); } } +public static class ContentControlClusterTimePeriodStruct { + public Integer startHour; + public Integer startMinute; + public Integer endHour; + public Integer endMinute; + private static final long START_HOUR_ID = 0L; + private static final long START_MINUTE_ID = 1L; + private static final long END_HOUR_ID = 2L; + private static final long END_MINUTE_ID = 3L; + + public ContentControlClusterTimePeriodStruct( + Integer startHour, + Integer startMinute, + Integer endHour, + Integer endMinute + ) { + this.startHour = startHour; + this.startMinute = startMinute; + this.endHour = endHour; + this.endMinute = endMinute; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(START_HOUR_ID, new UIntType(startHour))); + values.add(new StructElement(START_MINUTE_ID, new UIntType(startMinute))); + values.add(new StructElement(END_HOUR_ID, new UIntType(endHour))); + values.add(new StructElement(END_MINUTE_ID, new UIntType(endMinute))); + + return new StructType(values); + } + + public static ContentControlClusterTimePeriodStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer startHour = null; + Integer startMinute = null; + Integer endHour = null; + Integer endMinute = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == START_HOUR_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + startHour = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == START_MINUTE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + startMinute = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == END_HOUR_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + endHour = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == END_MINUTE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + endMinute = castingValue.value(Integer.class); + } + } + } + return new ContentControlClusterTimePeriodStruct( + startHour, + startMinute, + endHour, + endMinute + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentControlClusterTimePeriodStruct {\n"); + output.append("\tstartHour: "); + output.append(startHour); + output.append("\n"); + output.append("\tstartMinute: "); + output.append(startMinute); + output.append("\n"); + output.append("\tendHour: "); + output.append(endHour); + output.append("\n"); + output.append("\tendMinute: "); + output.append(endMinute); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ContentControlClusterTimeWindowStruct { + public @Nullable Integer timeWindowIndex; + public Integer dayOfWeek; + public ArrayList timePeriod; + private static final long TIME_WINDOW_INDEX_ID = 0L; + private static final long DAY_OF_WEEK_ID = 1L; + private static final long TIME_PERIOD_ID = 2L; + + public ContentControlClusterTimeWindowStruct( + @Nullable Integer timeWindowIndex, + Integer dayOfWeek, + ArrayList timePeriod + ) { + this.timeWindowIndex = timeWindowIndex; + this.dayOfWeek = dayOfWeek; + this.timePeriod = timePeriod; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(TIME_WINDOW_INDEX_ID, timeWindowIndex != null ? new UIntType(timeWindowIndex) : new NullType())); + values.add(new StructElement(DAY_OF_WEEK_ID, new UIntType(dayOfWeek))); + values.add(new StructElement(TIME_PERIOD_ID, ArrayType.generateArrayType(timePeriod, (elementtimePeriod) -> elementtimePeriod.encodeTlv()))); + + return new StructType(values); + } + + public static ContentControlClusterTimeWindowStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + @Nullable Integer timeWindowIndex = null; + Integer dayOfWeek = null; + ArrayList timePeriod = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == TIME_WINDOW_INDEX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + timeWindowIndex = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == DAY_OF_WEEK_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + dayOfWeek = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == TIME_PERIOD_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + timePeriod = castingValue.map((elementcastingValue) -> ChipStructs.ContentControlClusterTimePeriodStruct.decodeTlv(elementcastingValue)); + } + } + } + return new ContentControlClusterTimeWindowStruct( + timeWindowIndex, + dayOfWeek, + timePeriod + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentControlClusterTimeWindowStruct {\n"); + output.append("\ttimeWindowIndex: "); + output.append(timeWindowIndex); + output.append("\n"); + output.append("\tdayOfWeek: "); + output.append(dayOfWeek); + output.append("\n"); + output.append("\ttimePeriod: "); + output.append(timePeriod); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ContentControlClusterAppInfoStruct { + public Integer catalogVendorID; + public String applicationID; + private static final long CATALOG_VENDOR_I_D_ID = 0L; + private static final long APPLICATION_I_D_ID = 1L; + + public ContentControlClusterAppInfoStruct( + Integer catalogVendorID, + String applicationID + ) { + this.catalogVendorID = catalogVendorID; + this.applicationID = applicationID; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(CATALOG_VENDOR_I_D_ID, new UIntType(catalogVendorID))); + values.add(new StructElement(APPLICATION_I_D_ID, new StringType(applicationID))); + + return new StructType(values); + } + + public static ContentControlClusterAppInfoStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer catalogVendorID = null; + String applicationID = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == CATALOG_VENDOR_I_D_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + catalogVendorID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == APPLICATION_I_D_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + applicationID = castingValue.value(String.class); + } + } + } + return new ContentControlClusterAppInfoStruct( + catalogVendorID, + applicationID + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentControlClusterAppInfoStruct {\n"); + output.append("\tcatalogVendorID: "); + output.append(catalogVendorID); + output.append("\n"); + output.append("\tapplicationID: "); + output.append(applicationID); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ContentControlClusterBlockChannelStruct { + public @Nullable Integer blockChannelIndex; + public Integer majorNumber; + public Integer minorNumber; + public Optional identifier; + private static final long BLOCK_CHANNEL_INDEX_ID = 0L; + private static final long MAJOR_NUMBER_ID = 1L; + private static final long MINOR_NUMBER_ID = 2L; + private static final long IDENTIFIER_ID = 3L; + + public ContentControlClusterBlockChannelStruct( + @Nullable Integer blockChannelIndex, + Integer majorNumber, + Integer minorNumber, + Optional identifier + ) { + this.blockChannelIndex = blockChannelIndex; + this.majorNumber = majorNumber; + this.minorNumber = minorNumber; + this.identifier = identifier; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(BLOCK_CHANNEL_INDEX_ID, blockChannelIndex != null ? new UIntType(blockChannelIndex) : new NullType())); + values.add(new StructElement(MAJOR_NUMBER_ID, new UIntType(majorNumber))); + values.add(new StructElement(MINOR_NUMBER_ID, new UIntType(minorNumber))); + values.add(new StructElement(IDENTIFIER_ID, identifier.map((nonOptionalidentifier) -> new StringType(nonOptionalidentifier)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static ContentControlClusterBlockChannelStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + @Nullable Integer blockChannelIndex = null; + Integer majorNumber = null; + Integer minorNumber = null; + Optional identifier = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == BLOCK_CHANNEL_INDEX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + blockChannelIndex = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == MAJOR_NUMBER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + majorNumber = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == MINOR_NUMBER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + minorNumber = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == IDENTIFIER_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + identifier = Optional.of(castingValue.value(String.class)); + } + } + } + return new ContentControlClusterBlockChannelStruct( + blockChannelIndex, + majorNumber, + minorNumber, + identifier + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentControlClusterBlockChannelStruct {\n"); + output.append("\tblockChannelIndex: "); + output.append(blockChannelIndex); + output.append("\n"); + output.append("\tmajorNumber: "); + output.append(majorNumber); + output.append("\n"); + output.append("\tminorNumber: "); + output.append(minorNumber); + output.append("\n"); + output.append("\tidentifier: "); + output.append(identifier); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class ContentControlClusterRatingNameStruct { public String ratingName; public Optional ratingNameDesc; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 3437b8a981e476..bc14ef465032bc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -15442,7 +15442,7 @@ public static LaunchContentCommandField value(int id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum LaunchURLCommandField {ContentURL(0),DisplayString(1),BrandingInformation(2),; + }public enum LaunchURLCommandField {ContentURL(0),DisplayString(1),BrandingInformation(2),PlaybackPreferences(3),; private final int id; LaunchURLCommandField(int id) { this.id = id; @@ -16061,6 +16061,9 @@ public enum Attribute { ScreenDailyTime(5L), RemainingScreenTime(6L), BlockUnrated(7L), + BlockChannelList(8L), + BlockApplicationList(9L), + BlockContentTimeWindow(10L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -16087,7 +16090,8 @@ public static Attribute value(long id) throws NoSuchFieldError { } public enum Event { - RemainingScreenTimeExpired(0L),; + RemainingScreenTimeExpired(0L), + EnteringBlockContentTimeWindow(1L),; private final long id; Event(long id) { this.id = id; @@ -16117,7 +16121,13 @@ public enum Command { BlockUnratedContent(7L), UnblockUnratedContent(8L), SetOnDemandRatingThreshold(9L), - SetScheduledContentRatingThreshold(10L),; + SetScheduledContentRatingThreshold(10L), + AddBlockChannels(11L), + RemoveBlockChannels(12L), + AddBlockApplications(13L), + RemoveBlockApplications(14L), + SetBlockContentTimeWindow(15L), + RemoveBlockContentTimeWindow(16L),; private final long id; Command(long id) { this.id = id; @@ -16220,6 +16230,108 @@ public static SetScheduledContentRatingThresholdCommandField value(int id) throw } throw new NoSuchFieldError(); } + }public enum AddBlockChannelsCommandField {Channels(0),; + private final int id; + AddBlockChannelsCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static AddBlockChannelsCommandField value(int id) throws NoSuchFieldError { + for (AddBlockChannelsCommandField field : AddBlockChannelsCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum RemoveBlockChannelsCommandField {ChannelIndexes(0),; + private final int id; + RemoveBlockChannelsCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static RemoveBlockChannelsCommandField value(int id) throws NoSuchFieldError { + for (RemoveBlockChannelsCommandField field : RemoveBlockChannelsCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum AddBlockApplicationsCommandField {Applications(0),; + private final int id; + AddBlockApplicationsCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static AddBlockApplicationsCommandField value(int id) throws NoSuchFieldError { + for (AddBlockApplicationsCommandField field : AddBlockApplicationsCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum RemoveBlockApplicationsCommandField {Applications(0),; + private final int id; + RemoveBlockApplicationsCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static RemoveBlockApplicationsCommandField value(int id) throws NoSuchFieldError { + for (RemoveBlockApplicationsCommandField field : RemoveBlockApplicationsCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SetBlockContentTimeWindowCommandField {TimeWindow(0),; + private final int id; + SetBlockContentTimeWindowCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetBlockContentTimeWindowCommandField value(int id) throws NoSuchFieldError { + for (SetBlockContentTimeWindowCommandField field : SetBlockContentTimeWindowCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum RemoveBlockContentTimeWindowCommandField {TimeWindowIndexes(0),; + private final int id; + RemoveBlockContentTimeWindowCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static RemoveBlockContentTimeWindowCommandField value(int id) throws NoSuchFieldError { + for (RemoveBlockContentTimeWindowCommandField field : RemoveBlockContentTimeWindowCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 4ded328fad6ed5..80ba6c11f2668b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -18980,6 +18980,69 @@ public void onError(Exception ex) { } } + public static class DelegatedContentControlClusterBlockChannelListAttributeCallback implements ChipClusters.ContentControlCluster.BlockChannelListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentControlClusterBlockApplicationListAttributeCallback implements ChipClusters.ContentControlCluster.BlockApplicationListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedContentControlClusterBlockContentTimeWindowAttributeCallback implements ChipClusters.ContentControlCluster.BlockContentTimeWindowAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedContentControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.ContentControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -26424,15 +26487,15 @@ public Map> getCommandMap() { Map channelgetProgramGuideCommandParams = new LinkedHashMap(); - CommandParameterInfo channelgetProgramGuidestartTimeCommandParameterInfo = new CommandParameterInfo("startTime", Optional.class, Long.class); + CommandParameterInfo channelgetProgramGuidestartTimeCommandParameterInfo = new CommandParameterInfo("startTime", Long.class, Long.class); channelgetProgramGuideCommandParams.put("startTime",channelgetProgramGuidestartTimeCommandParameterInfo); - CommandParameterInfo channelgetProgramGuideendTimeCommandParameterInfo = new CommandParameterInfo("endTime", Optional.class, Long.class); + CommandParameterInfo channelgetProgramGuideendTimeCommandParameterInfo = new CommandParameterInfo("endTime", Long.class, Long.class); channelgetProgramGuideCommandParams.put("endTime",channelgetProgramGuideendTimeCommandParameterInfo); - CommandParameterInfo channelgetProgramGuiderecordingFlagCommandParameterInfo = new CommandParameterInfo("recordingFlag", Optional.class, Long.class); + CommandParameterInfo channelgetProgramGuiderecordingFlagCommandParameterInfo = new CommandParameterInfo("recordingFlag", Optional.class, Integer.class); channelgetProgramGuideCommandParams.put("recordingFlag",channelgetProgramGuiderecordingFlagCommandParameterInfo); @@ -26442,10 +26505,10 @@ public Map> getCommandMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.ChannelCluster) cluster) .getProgramGuide((ChipClusters.ChannelCluster.ProgramGuideResponseCallback) callback - , (Optional) + , (Long) commandArguments.get("startTime") - , (Optional) + , (Long) commandArguments.get("endTime") , (Optional>) @@ -26454,7 +26517,7 @@ public Map> getCommandMap() { , (Optional) commandArguments.get("pageToken") - , (Optional) + , (Optional) commandArguments.get("recordingFlag") , (Optional>) @@ -26479,7 +26542,7 @@ public Map> getCommandMap() { channelrecordProgramCommandParams.put("shouldRecordSeries",channelrecordProgramshouldRecordSeriesCommandParameterInfo); - CommandParameterInfo channelrecordProgramdataCommandParameterInfo = new CommandParameterInfo("data", byte[].class, byte[].class); + CommandParameterInfo channelrecordProgramdataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, byte[].class); channelrecordProgramCommandParams.put("data",channelrecordProgramdataCommandParameterInfo); InteractionInfo channelrecordProgramInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -26489,9 +26552,9 @@ public Map> getCommandMap() { commandArguments.get("programIdentifier") , (Boolean) commandArguments.get("shouldRecordSeries") - , (ArrayList) + , (Optional>) commandArguments.get("externalIDList") - , (byte[]) + , (Optional) commandArguments.get("data") ); }, @@ -26509,7 +26572,7 @@ public Map> getCommandMap() { channelcancelRecordProgramCommandParams.put("shouldRecordSeries",channelcancelRecordProgramshouldRecordSeriesCommandParameterInfo); - CommandParameterInfo channelcancelRecordProgramdataCommandParameterInfo = new CommandParameterInfo("data", byte[].class, byte[].class); + CommandParameterInfo channelcancelRecordProgramdataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, byte[].class); channelcancelRecordProgramCommandParams.put("data",channelcancelRecordProgramdataCommandParameterInfo); InteractionInfo channelcancelRecordProgramInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -26519,9 +26582,9 @@ public Map> getCommandMap() { commandArguments.get("programIdentifier") , (Boolean) commandArguments.get("shouldRecordSeries") - , (ArrayList) + , (Optional>) commandArguments.get("externalIDList") - , (byte[]) + , (Optional) commandArguments.get("data") ); }, @@ -26729,7 +26792,7 @@ public Map> getCommandMap() { CommandParameterInfo mediaPlaybackactivateAudioTracktrackIDCommandParameterInfo = new CommandParameterInfo("trackID", String.class, String.class); mediaPlaybackactivateAudioTrackCommandParams.put("trackID",mediaPlaybackactivateAudioTracktrackIDCommandParameterInfo); - CommandParameterInfo mediaPlaybackactivateAudioTrackaudioOutputIndexCommandParameterInfo = new CommandParameterInfo("audioOutputIndex", Integer.class, Integer.class); + CommandParameterInfo mediaPlaybackactivateAudioTrackaudioOutputIndexCommandParameterInfo = new CommandParameterInfo("audioOutputIndex", Optional.class, Integer.class); mediaPlaybackactivateAudioTrackCommandParams.put("audioOutputIndex",mediaPlaybackactivateAudioTrackaudioOutputIndexCommandParameterInfo); InteractionInfo mediaPlaybackactivateAudioTrackInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -26737,7 +26800,7 @@ public Map> getCommandMap() { .activateAudioTrack((DefaultClusterCallback) callback , (String) commandArguments.get("trackID") - , (Integer) + , (Optional) commandArguments.get("audioOutputIndex") ); }, @@ -26930,6 +26993,7 @@ public Map> getCommandMap() { CommandParameterInfo contentLauncherlaunchURLdisplayStringCommandParameterInfo = new CommandParameterInfo("displayString", Optional.class, String.class); contentLauncherlaunchURLCommandParams.put("displayString",contentLauncherlaunchURLdisplayStringCommandParameterInfo); + InteractionInfo contentLauncherlaunchURLInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ContentLauncherCluster) cluster) @@ -26943,6 +27007,9 @@ public Map> getCommandMap() { , (Optional) commandArguments.get("brandingInformation") + , (Optional) + commandArguments.get("playbackPreferences") + ); }, () -> new DelegatedContentLauncherClusterLauncherResponseCallback(), @@ -27127,7 +27194,7 @@ public Map> getCommandMap() { Map contentControlupdatePINCommandParams = new LinkedHashMap(); - CommandParameterInfo contentControlupdatePINoldPINCommandParameterInfo = new CommandParameterInfo("oldPIN", Optional.class, String.class); + CommandParameterInfo contentControlupdatePINoldPINCommandParameterInfo = new CommandParameterInfo("oldPIN", String.class, String.class); contentControlupdatePINCommandParams.put("oldPIN",contentControlupdatePINoldPINCommandParameterInfo); CommandParameterInfo contentControlupdatePINnewPINCommandParameterInfo = new CommandParameterInfo("newPIN", String.class, String.class); @@ -27136,10 +27203,10 @@ public Map> getCommandMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.ContentControlCluster) cluster) .updatePIN((DefaultClusterCallback) callback - , (Optional) + , (String) commandArguments.get("oldPIN") , (String) - commandArguments.get("newPIN") + commandArguments.get("newPIN"), 10000 ); }, () -> new DelegatedDefaultClusterCallback(), @@ -27152,7 +27219,7 @@ public Map> getCommandMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.ContentControlCluster) cluster) .resetPIN((ChipClusters.ContentControlCluster.ResetPINResponseCallback) callback - ); + , 10000); }, () -> new DelegatedContentControlClusterResetPINResponseCallback(), contentControlresetPINCommandParams @@ -27163,7 +27230,7 @@ public Map> getCommandMap() { InteractionInfo contentControlenableInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ContentControlCluster) cluster) - .enable((DefaultClusterCallback) callback + .enable((DefaultClusterCallback) callback, 10000 ); }, () -> new DelegatedDefaultClusterCallback(), @@ -27175,7 +27242,7 @@ public Map> getCommandMap() { InteractionInfo contentControldisableInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ContentControlCluster) cluster) - .disable((DefaultClusterCallback) callback + .disable((DefaultClusterCallback) callback, 10000 ); }, () -> new DelegatedDefaultClusterCallback(), @@ -27188,7 +27255,7 @@ public Map> getCommandMap() { CommandParameterInfo contentControladdBonusTimePINCodeCommandParameterInfo = new CommandParameterInfo("PINCode", Optional.class, String.class); contentControladdBonusTimeCommandParams.put("PINCode",contentControladdBonusTimePINCodeCommandParameterInfo); - CommandParameterInfo contentControladdBonusTimebonusTimeCommandParameterInfo = new CommandParameterInfo("bonusTime", Optional.class, Long.class); + CommandParameterInfo contentControladdBonusTimebonusTimeCommandParameterInfo = new CommandParameterInfo("bonusTime", Long.class, Long.class); contentControladdBonusTimeCommandParams.put("bonusTime",contentControladdBonusTimebonusTimeCommandParameterInfo); InteractionInfo contentControladdBonusTimeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -27196,7 +27263,7 @@ public Map> getCommandMap() { .addBonusTime((DefaultClusterCallback) callback , (Optional) commandArguments.get("PINCode") - , (Optional) + , (Long) commandArguments.get("bonusTime") ); }, @@ -27280,25 +27347,119 @@ public Map> getCommandMap() { ); contentControlClusterInteractionInfoMap.put("setScheduledContentRatingThreshold", contentControlsetScheduledContentRatingThresholdInteractionInfo); + Map contentControladdBlockChannelsCommandParams = new LinkedHashMap(); + + InteractionInfo contentControladdBlockChannelsInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .addBlockChannels((DefaultClusterCallback) callback + , (ArrayList) + commandArguments.get("channels") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControladdBlockChannelsCommandParams + ); + contentControlClusterInteractionInfoMap.put("addBlockChannels", contentControladdBlockChannelsInteractionInfo); + + Map contentControlremoveBlockChannelsCommandParams = new LinkedHashMap(); + + CommandParameterInfo contentControlremoveBlockChannelschannelIndexesCommandParameterInfo = new CommandParameterInfo("channelIndexes", ArrayList.class, ArrayList.class); + contentControlremoveBlockChannelsCommandParams.put("channelIndexes",contentControlremoveBlockChannelschannelIndexesCommandParameterInfo); + InteractionInfo contentControlremoveBlockChannelsInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .removeBlockChannels((DefaultClusterCallback) callback + , (ArrayList) + commandArguments.get("channelIndexes") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControlremoveBlockChannelsCommandParams + ); + contentControlClusterInteractionInfoMap.put("removeBlockChannels", contentControlremoveBlockChannelsInteractionInfo); + + Map contentControladdBlockApplicationsCommandParams = new LinkedHashMap(); + + InteractionInfo contentControladdBlockApplicationsInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .addBlockApplications((DefaultClusterCallback) callback + , (ArrayList) + commandArguments.get("applications") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControladdBlockApplicationsCommandParams + ); + contentControlClusterInteractionInfoMap.put("addBlockApplications", contentControladdBlockApplicationsInteractionInfo); + + Map contentControlremoveBlockApplicationsCommandParams = new LinkedHashMap(); + + InteractionInfo contentControlremoveBlockApplicationsInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .removeBlockApplications((DefaultClusterCallback) callback + , (ArrayList) + commandArguments.get("applications") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControlremoveBlockApplicationsCommandParams + ); + contentControlClusterInteractionInfoMap.put("removeBlockApplications", contentControlremoveBlockApplicationsInteractionInfo); + + Map contentControlsetBlockContentTimeWindowCommandParams = new LinkedHashMap(); + + InteractionInfo contentControlsetBlockContentTimeWindowInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .setBlockContentTimeWindow((DefaultClusterCallback) callback + , (ChipStructs.ContentControlClusterTimeWindowStruct) + commandArguments.get("timeWindow") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControlsetBlockContentTimeWindowCommandParams + ); + contentControlClusterInteractionInfoMap.put("setBlockContentTimeWindow", contentControlsetBlockContentTimeWindowInteractionInfo); + + Map contentControlremoveBlockContentTimeWindowCommandParams = new LinkedHashMap(); + + CommandParameterInfo contentControlremoveBlockContentTimeWindowtimeWindowIndexesCommandParameterInfo = new CommandParameterInfo("timeWindowIndexes", ArrayList.class, ArrayList.class); + contentControlremoveBlockContentTimeWindowCommandParams.put("timeWindowIndexes",contentControlremoveBlockContentTimeWindowtimeWindowIndexesCommandParameterInfo); + InteractionInfo contentControlremoveBlockContentTimeWindowInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .removeBlockContentTimeWindow((DefaultClusterCallback) callback + , (ArrayList) + commandArguments.get("timeWindowIndexes") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControlremoveBlockContentTimeWindowCommandParams + ); + contentControlClusterInteractionInfoMap.put("removeBlockContentTimeWindow", contentControlremoveBlockContentTimeWindowInteractionInfo); + commandMap.put("contentControl", contentControlClusterInteractionInfoMap); Map contentAppObserverClusterInteractionInfoMap = new LinkedHashMap<>(); Map contentAppObservercontentAppMessageCommandParams = new LinkedHashMap(); - CommandParameterInfo contentAppObservercontentAppMessagedataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, String.class); + CommandParameterInfo contentAppObservercontentAppMessagedataCommandParameterInfo = new CommandParameterInfo("data", String.class, String.class); contentAppObservercontentAppMessageCommandParams.put("data",contentAppObservercontentAppMessagedataCommandParameterInfo); - CommandParameterInfo contentAppObservercontentAppMessageencodingHintCommandParameterInfo = new CommandParameterInfo("encodingHint", String.class, String.class); + CommandParameterInfo contentAppObservercontentAppMessageencodingHintCommandParameterInfo = new CommandParameterInfo("encodingHint", Optional.class, String.class); contentAppObservercontentAppMessageCommandParams.put("encodingHint",contentAppObservercontentAppMessageencodingHintCommandParameterInfo); InteractionInfo contentAppObservercontentAppMessageInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ContentAppObserverCluster) cluster) .contentAppMessage((ChipClusters.ContentAppObserverCluster.ContentAppMessageResponseCallback) callback - , (Optional) + , (String) commandArguments.get("data") - , (String) + , (Optional) commandArguments.get("encodingHint") ); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index cc18af0810cc10..6d4f9d58515c26 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -17755,6 +17755,39 @@ private static Map readContentControlInteractionInfo() readContentControlBlockUnratedCommandParams ); result.put("readBlockUnratedAttribute", readContentControlBlockUnratedAttributeInteractionInfo); + Map readContentControlBlockChannelListCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlBlockChannelListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readBlockChannelListAttribute( + (ChipClusters.ContentControlCluster.BlockChannelListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedContentControlClusterBlockChannelListAttributeCallback(), + readContentControlBlockChannelListCommandParams + ); + result.put("readBlockChannelListAttribute", readContentControlBlockChannelListAttributeInteractionInfo); + Map readContentControlBlockApplicationListCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlBlockApplicationListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readBlockApplicationListAttribute( + (ChipClusters.ContentControlCluster.BlockApplicationListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedContentControlClusterBlockApplicationListAttributeCallback(), + readContentControlBlockApplicationListCommandParams + ); + result.put("readBlockApplicationListAttribute", readContentControlBlockApplicationListAttributeInteractionInfo); + Map readContentControlBlockContentTimeWindowCommandParams = new LinkedHashMap(); + InteractionInfo readContentControlBlockContentTimeWindowAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster).readBlockContentTimeWindowAttribute( + (ChipClusters.ContentControlCluster.BlockContentTimeWindowAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedContentControlClusterBlockContentTimeWindowAttributeCallback(), + readContentControlBlockContentTimeWindowCommandParams + ); + result.put("readBlockContentTimeWindowAttribute", readContentControlBlockContentTimeWindowAttributeInteractionInfo); Map readContentControlGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readContentControlGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt index 5c1bf98d9c4f79..be23b49bba7aa5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt @@ -23,10 +23,11 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class AccountLoginClusterLoggedOutEvent(val node: Optional) { +class AccountLoginClusterLoggedOutEvent(val node: Optional, val fabricIndex: UInt) { override fun toString(): String = buildString { append("AccountLoginClusterLoggedOutEvent {\n") append("\tnode : $node\n") + append("\tfabricIndex : $fabricIndex\n") append("}\n") } @@ -37,12 +38,14 @@ class AccountLoginClusterLoggedOutEvent(val node: Optional) { val optnode = node.get() put(ContextSpecificTag(TAG_NODE), optnode) } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } } companion object { private const val TAG_NODE = 0 + private const val TAG_FABRIC_INDEX = 254 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AccountLoginClusterLoggedOutEvent { tlvReader.enterStructure(tlvTag) @@ -52,10 +55,11 @@ class AccountLoginClusterLoggedOutEvent(val node: Optional) { } else { Optional.empty() } + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() - return AccountLoginClusterLoggedOutEvent(node) + return AccountLoginClusterLoggedOutEvent(node, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MediaPlaybackClusterStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MediaPlaybackClusterStateChangedEvent.kt index 8626f9daed4e01..d446494bb3501b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MediaPlaybackClusterStateChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MediaPlaybackClusterStateChangedEvent.kt @@ -25,15 +25,15 @@ import matter.tlv.TlvWriter class MediaPlaybackClusterStateChangedEvent( val currentState: UInt, - val startTime: ULong, - val duration: ULong, + val startTime: Optional, + val duration: Optional, val sampledPosition: - chip.devicecontroller.cluster.structs.MediaPlaybackClusterPlaybackPositionStruct, - val playbackSpeed: Float, - val seekRangeEnd: ULong, - val seekRangeStart: ULong, + Optional, + val playbackSpeed: Optional, + val seekRangeEnd: Optional, + val seekRangeStart: Optional, val data: Optional, - val audioAdvanceUnmuted: Boolean + val audioAdvanceUnmuted: Optional ) { override fun toString(): String = buildString { append("MediaPlaybackClusterStateChangedEvent {\n") @@ -53,17 +53,38 @@ class MediaPlaybackClusterStateChangedEvent( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_CURRENT_STATE), currentState) - put(ContextSpecificTag(TAG_START_TIME), startTime) - put(ContextSpecificTag(TAG_DURATION), duration) - sampledPosition.toTlv(ContextSpecificTag(TAG_SAMPLED_POSITION), this) - put(ContextSpecificTag(TAG_PLAYBACK_SPEED), playbackSpeed) - put(ContextSpecificTag(TAG_SEEK_RANGE_END), seekRangeEnd) - put(ContextSpecificTag(TAG_SEEK_RANGE_START), seekRangeStart) + if (startTime.isPresent) { + val optstartTime = startTime.get() + put(ContextSpecificTag(TAG_START_TIME), optstartTime) + } + if (duration.isPresent) { + val optduration = duration.get() + put(ContextSpecificTag(TAG_DURATION), optduration) + } + if (sampledPosition.isPresent) { + val optsampledPosition = sampledPosition.get() + optsampledPosition.toTlv(ContextSpecificTag(TAG_SAMPLED_POSITION), this) + } + if (playbackSpeed.isPresent) { + val optplaybackSpeed = playbackSpeed.get() + put(ContextSpecificTag(TAG_PLAYBACK_SPEED), optplaybackSpeed) + } + if (seekRangeEnd.isPresent) { + val optseekRangeEnd = seekRangeEnd.get() + put(ContextSpecificTag(TAG_SEEK_RANGE_END), optseekRangeEnd) + } + if (seekRangeStart.isPresent) { + val optseekRangeStart = seekRangeStart.get() + put(ContextSpecificTag(TAG_SEEK_RANGE_START), optseekRangeStart) + } if (data.isPresent) { val optdata = data.get() put(ContextSpecificTag(TAG_DATA), optdata) } - put(ContextSpecificTag(TAG_AUDIO_ADVANCE_UNMUTED), audioAdvanceUnmuted) + if (audioAdvanceUnmuted.isPresent) { + val optaudioAdvanceUnmuted = audioAdvanceUnmuted.get() + put(ContextSpecificTag(TAG_AUDIO_ADVANCE_UNMUTED), optaudioAdvanceUnmuted) + } endStructure() } } @@ -82,23 +103,57 @@ class MediaPlaybackClusterStateChangedEvent( fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaPlaybackClusterStateChangedEvent { tlvReader.enterStructure(tlvTag) val currentState = tlvReader.getUInt(ContextSpecificTag(TAG_CURRENT_STATE)) - val startTime = tlvReader.getULong(ContextSpecificTag(TAG_START_TIME)) - val duration = tlvReader.getULong(ContextSpecificTag(TAG_DURATION)) + val startTime = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_START_TIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_START_TIME))) + } else { + Optional.empty() + } + val duration = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_DURATION))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_DURATION))) + } else { + Optional.empty() + } val sampledPosition = - chip.devicecontroller.cluster.structs.MediaPlaybackClusterPlaybackPositionStruct.fromTlv( - ContextSpecificTag(TAG_SAMPLED_POSITION), - tlvReader - ) - val playbackSpeed = tlvReader.getFloat(ContextSpecificTag(TAG_PLAYBACK_SPEED)) - val seekRangeEnd = tlvReader.getULong(ContextSpecificTag(TAG_SEEK_RANGE_END)) - val seekRangeStart = tlvReader.getULong(ContextSpecificTag(TAG_SEEK_RANGE_START)) + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SAMPLED_POSITION))) { + Optional.of( + chip.devicecontroller.cluster.structs.MediaPlaybackClusterPlaybackPositionStruct + .fromTlv(ContextSpecificTag(TAG_SAMPLED_POSITION), tlvReader) + ) + } else { + Optional.empty() + } + val playbackSpeed = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PLAYBACK_SPEED))) { + Optional.of(tlvReader.getFloat(ContextSpecificTag(TAG_PLAYBACK_SPEED))) + } else { + Optional.empty() + } + val seekRangeEnd = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SEEK_RANGE_END))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_SEEK_RANGE_END))) + } else { + Optional.empty() + } + val seekRangeStart = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SEEK_RANGE_START))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_SEEK_RANGE_START))) + } else { + Optional.empty() + } val data = if (tlvReader.isNextTag(ContextSpecificTag(TAG_DATA))) { Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_DATA))) } else { Optional.empty() } - val audioAdvanceUnmuted = tlvReader.getBoolean(ContextSpecificTag(TAG_AUDIO_ADVANCE_UNMUTED)) + val audioAdvanceUnmuted = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_ADVANCE_UNMUTED))) { + Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_AUDIO_ADVANCE_UNMUTED))) + } else { + Optional.empty() + } tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TargetNavigatorClusterTargetUpdatedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TargetNavigatorClusterTargetUpdatedEvent.kt index ce5bbb1df841c9..da2499868e4d68 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TargetNavigatorClusterTargetUpdatedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TargetNavigatorClusterTargetUpdatedEvent.kt @@ -17,6 +17,7 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag @@ -25,9 +26,9 @@ import matter.tlv.TlvWriter class TargetNavigatorClusterTargetUpdatedEvent( val targetList: - List, - val currentTarget: UInt, - val data: ByteArray + Optional>, + val currentTarget: Optional, + val data: Optional ) { override fun toString(): String = buildString { append("TargetNavigatorClusterTargetUpdatedEvent {\n") @@ -40,13 +41,22 @@ class TargetNavigatorClusterTargetUpdatedEvent( fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - startArray(ContextSpecificTag(TAG_TARGET_LIST)) - for (item in targetList.iterator()) { - item.toTlv(AnonymousTag, this) + if (targetList.isPresent) { + val opttargetList = targetList.get() + startArray(ContextSpecificTag(TAG_TARGET_LIST)) + for (item in opttargetList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + } + if (currentTarget.isPresent) { + val optcurrentTarget = currentTarget.get() + put(ContextSpecificTag(TAG_CURRENT_TARGET), optcurrentTarget) + } + if (data.isPresent) { + val optdata = data.get() + put(ContextSpecificTag(TAG_DATA), optdata) } - endArray() - put(ContextSpecificTag(TAG_CURRENT_TARGET), currentTarget) - put(ContextSpecificTag(TAG_DATA), data) endStructure() } } @@ -59,20 +69,36 @@ class TargetNavigatorClusterTargetUpdatedEvent( fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetUpdatedEvent { tlvReader.enterStructure(tlvTag) val targetList = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_TARGET_LIST)) - while (!tlvReader.isEndOfContainer()) { - this.add( - chip.devicecontroller.cluster.structs.TargetNavigatorClusterTargetInfoStruct.fromTlv( - AnonymousTag, - tlvReader - ) - ) - } - tlvReader.exitContainer() + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TARGET_LIST))) { + Optional.of( + buildList< + chip.devicecontroller.cluster.structs.TargetNavigatorClusterTargetInfoStruct + > { + tlvReader.enterArray(ContextSpecificTag(TAG_TARGET_LIST)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.TargetNavigatorClusterTargetInfoStruct + .fromTlv(AnonymousTag, tlvReader) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + val currentTarget = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CURRENT_TARGET))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_CURRENT_TARGET))) + } else { + Optional.empty() + } + val data = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_DATA))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_DATA))) + } else { + Optional.empty() } - val currentTarget = tlvReader.getUInt(ContextSpecificTag(TAG_CURRENT_TARGET)) - val data = tlvReader.getByteArray(ContextSpecificTag(TAG_DATA)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index 34fd21bb27d770..1110784ae8c1ff 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -25,7 +25,11 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramCategoryStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterSeriesInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterAppInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterBlockChannelStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterRatingNameStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterTimePeriodStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterTimeWindowStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt", diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramStruct.kt index 5f5a7e48d1b8dc..7f03b44547a4a5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramStruct.kt @@ -39,11 +39,11 @@ class ChannelClusterProgramStruct( val dvbiUrl: Optional, val releaseDate: Optional, val parentalGuidanceText: Optional, - val recordingFlag: Optional, + val recordingFlag: Optional, val seriesInfo: Optional?, val categoryList: Optional>, val castList: Optional>, - val externalIDList: Optional> + val externalIDList: Optional> ) { override fun toString(): String = buildString { append("ChannelClusterProgramStruct {\n") @@ -262,7 +262,7 @@ class ChannelClusterProgramStruct( } val recordingFlag = if (tlvReader.isNextTag(ContextSpecificTag(TAG_RECORDING_FLAG))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_RECORDING_FLAG))) + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_RECORDING_FLAG))) } else { Optional.empty() } @@ -310,10 +310,10 @@ class ChannelClusterProgramStruct( val externalIDList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { Optional.of( - buildList { + buildList { tlvReader.enterArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) while (!tlvReader.isEndOfContainer()) { - add(ChannelClusterProgramCastStruct.fromTlv(AnonymousTag, tlvReader)) + add(ChannelClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterAppInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterAppInfoStruct.kt new file mode 100644 index 00000000000000..efa9bde3388df6 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterAppInfoStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentControlClusterAppInfoStruct(val catalogVendorID: UInt, val applicationID: String) { + override fun toString(): String = buildString { + append("ContentControlClusterAppInfoStruct {\n") + append("\tcatalogVendorID : $catalogVendorID\n") + append("\tapplicationID : $applicationID\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D), catalogVendorID) + put(ContextSpecificTag(TAG_APPLICATION_I_D), applicationID) + endStructure() + } + } + + companion object { + private const val TAG_CATALOG_VENDOR_I_D = 0 + private const val TAG_APPLICATION_I_D = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentControlClusterAppInfoStruct { + tlvReader.enterStructure(tlvTag) + val catalogVendorID = tlvReader.getUInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) + val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) + + tlvReader.exitContainer() + + return ContentControlClusterAppInfoStruct(catalogVendorID, applicationID) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterBlockChannelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterBlockChannelStruct.kt new file mode 100644 index 00000000000000..dc77f2d200863c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterBlockChannelStruct.kt @@ -0,0 +1,93 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import java.util.Optional +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentControlClusterBlockChannelStruct( + val blockChannelIndex: UInt?, + val majorNumber: UInt, + val minorNumber: UInt, + val identifier: Optional +) { + override fun toString(): String = buildString { + append("ContentControlClusterBlockChannelStruct {\n") + append("\tblockChannelIndex : $blockChannelIndex\n") + append("\tmajorNumber : $majorNumber\n") + append("\tminorNumber : $minorNumber\n") + append("\tidentifier : $identifier\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (blockChannelIndex != null) { + put(ContextSpecificTag(TAG_BLOCK_CHANNEL_INDEX), blockChannelIndex) + } else { + putNull(ContextSpecificTag(TAG_BLOCK_CHANNEL_INDEX)) + } + put(ContextSpecificTag(TAG_MAJOR_NUMBER), majorNumber) + put(ContextSpecificTag(TAG_MINOR_NUMBER), minorNumber) + if (identifier.isPresent) { + val optidentifier = identifier.get() + put(ContextSpecificTag(TAG_IDENTIFIER), optidentifier) + } + endStructure() + } + } + + companion object { + private const val TAG_BLOCK_CHANNEL_INDEX = 0 + private const val TAG_MAJOR_NUMBER = 1 + private const val TAG_MINOR_NUMBER = 2 + private const val TAG_IDENTIFIER = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentControlClusterBlockChannelStruct { + tlvReader.enterStructure(tlvTag) + val blockChannelIndex = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_BLOCK_CHANNEL_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_BLOCK_CHANNEL_INDEX)) + null + } + val majorNumber = tlvReader.getUInt(ContextSpecificTag(TAG_MAJOR_NUMBER)) + val minorNumber = tlvReader.getUInt(ContextSpecificTag(TAG_MINOR_NUMBER)) + val identifier = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_IDENTIFIER))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IDENTIFIER))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ContentControlClusterBlockChannelStruct( + blockChannelIndex, + majorNumber, + minorNumber, + identifier + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterTimePeriodStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterTimePeriodStruct.kt new file mode 100644 index 00000000000000..94e9e4963c6e9e --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterTimePeriodStruct.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentControlClusterTimePeriodStruct( + val startHour: UInt, + val startMinute: UInt, + val endHour: UInt, + val endMinute: UInt +) { + override fun toString(): String = buildString { + append("ContentControlClusterTimePeriodStruct {\n") + append("\tstartHour : $startHour\n") + append("\tstartMinute : $startMinute\n") + append("\tendHour : $endHour\n") + append("\tendMinute : $endMinute\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_START_HOUR), startHour) + put(ContextSpecificTag(TAG_START_MINUTE), startMinute) + put(ContextSpecificTag(TAG_END_HOUR), endHour) + put(ContextSpecificTag(TAG_END_MINUTE), endMinute) + endStructure() + } + } + + companion object { + private const val TAG_START_HOUR = 0 + private const val TAG_START_MINUTE = 1 + private const val TAG_END_HOUR = 2 + private const val TAG_END_MINUTE = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentControlClusterTimePeriodStruct { + tlvReader.enterStructure(tlvTag) + val startHour = tlvReader.getUInt(ContextSpecificTag(TAG_START_HOUR)) + val startMinute = tlvReader.getUInt(ContextSpecificTag(TAG_START_MINUTE)) + val endHour = tlvReader.getUInt(ContextSpecificTag(TAG_END_HOUR)) + val endMinute = tlvReader.getUInt(ContextSpecificTag(TAG_END_MINUTE)) + + tlvReader.exitContainer() + + return ContentControlClusterTimePeriodStruct(startHour, startMinute, endHour, endMinute) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterTimeWindowStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterTimeWindowStruct.kt new file mode 100644 index 00000000000000..94f8ec33ef4430 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterTimeWindowStruct.kt @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentControlClusterTimeWindowStruct( + val timeWindowIndex: UInt?, + val dayOfWeek: UInt, + val timePeriod: List +) { + override fun toString(): String = buildString { + append("ContentControlClusterTimeWindowStruct {\n") + append("\ttimeWindowIndex : $timeWindowIndex\n") + append("\tdayOfWeek : $dayOfWeek\n") + append("\ttimePeriod : $timePeriod\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (timeWindowIndex != null) { + put(ContextSpecificTag(TAG_TIME_WINDOW_INDEX), timeWindowIndex) + } else { + putNull(ContextSpecificTag(TAG_TIME_WINDOW_INDEX)) + } + put(ContextSpecificTag(TAG_DAY_OF_WEEK), dayOfWeek) + startArray(ContextSpecificTag(TAG_TIME_PERIOD)) + for (item in timePeriod.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_TIME_WINDOW_INDEX = 0 + private const val TAG_DAY_OF_WEEK = 1 + private const val TAG_TIME_PERIOD = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentControlClusterTimeWindowStruct { + tlvReader.enterStructure(tlvTag) + val timeWindowIndex = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_TIME_WINDOW_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TIME_WINDOW_INDEX)) + null + } + val dayOfWeek = tlvReader.getUInt(ContextSpecificTag(TAG_DAY_OF_WEEK)) + val timePeriod = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_TIME_PERIOD)) + while (!tlvReader.isEndOfContainer()) { + add(ContentControlClusterTimePeriodStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ContentControlClusterTimeWindowStruct(timeWindowIndex, dayOfWeek, timePeriod) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterPlaybackPreferencesStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterPlaybackPreferencesStruct.kt index 4199602517911f..ec7de8fc0d3781 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterPlaybackPreferencesStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterPlaybackPreferencesStruct.kt @@ -25,9 +25,9 @@ import matter.tlv.TlvReader import matter.tlv.TlvWriter class ContentLauncherClusterPlaybackPreferencesStruct( - val playbackPosition: ULong, - val textTrack: ContentLauncherClusterTrackPreferenceStruct, - val audioTracks: Optional> + val playbackPosition: Optional?, + val textTrack: Optional?, + val audioTracks: Optional>? ) { override fun toString(): String = buildString { append("ContentLauncherClusterPlaybackPreferencesStruct {\n") @@ -40,15 +40,33 @@ class ContentLauncherClusterPlaybackPreferencesStruct( fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - put(ContextSpecificTag(TAG_PLAYBACK_POSITION), playbackPosition) - textTrack.toTlv(ContextSpecificTag(TAG_TEXT_TRACK), this) - if (audioTracks.isPresent) { - val optaudioTracks = audioTracks.get() - startArray(ContextSpecificTag(TAG_AUDIO_TRACKS)) - for (item in optaudioTracks.iterator()) { - item.toTlv(AnonymousTag, this) + if (playbackPosition != null) { + if (playbackPosition.isPresent) { + val optplaybackPosition = playbackPosition.get() + put(ContextSpecificTag(TAG_PLAYBACK_POSITION), optplaybackPosition) } - endArray() + } else { + putNull(ContextSpecificTag(TAG_PLAYBACK_POSITION)) + } + if (textTrack != null) { + if (textTrack.isPresent) { + val opttextTrack = textTrack.get() + opttextTrack.toTlv(ContextSpecificTag(TAG_TEXT_TRACK), this) + } + } else { + putNull(ContextSpecificTag(TAG_TEXT_TRACK)) + } + if (audioTracks != null) { + if (audioTracks.isPresent) { + val optaudioTracks = audioTracks.get() + startArray(ContextSpecificTag(TAG_AUDIO_TRACKS)) + for (item in optaudioTracks.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + } + } else { + putNull(ContextSpecificTag(TAG_AUDIO_TRACKS)) } endStructure() } @@ -64,25 +82,51 @@ class ContentLauncherClusterPlaybackPreferencesStruct( tlvReader: TlvReader ): ContentLauncherClusterPlaybackPreferencesStruct { tlvReader.enterStructure(tlvTag) - val playbackPosition = tlvReader.getULong(ContextSpecificTag(TAG_PLAYBACK_POSITION)) + val playbackPosition = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PLAYBACK_POSITION))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_PLAYBACK_POSITION))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PLAYBACK_POSITION)) + null + } val textTrack = - ContentLauncherClusterTrackPreferenceStruct.fromTlv( - ContextSpecificTag(TAG_TEXT_TRACK), - tlvReader - ) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TEXT_TRACK))) { + Optional.of( + ContentLauncherClusterTrackPreferenceStruct.fromTlv( + ContextSpecificTag(TAG_TEXT_TRACK), + tlvReader + ) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TEXT_TRACK)) + null + } val audioTracks = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_TRACKS))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_AUDIO_TRACKS)) - while (!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterTrackPreferenceStruct.fromTlv(AnonymousTag, tlvReader)) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_TRACKS))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_AUDIO_TRACKS)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterTrackPreferenceStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() } - tlvReader.exitContainer() - } - ) + ) + } else { + Optional.empty() + } } else { - Optional.empty() + tlvReader.getNull(ContextSpecificTag(TAG_AUDIO_TRACKS)) + null } tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterTrackPreferenceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterTrackPreferenceStruct.kt index d5a3e09a859f73..2bc88c2130b41f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterTrackPreferenceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterTrackPreferenceStruct.kt @@ -26,8 +26,8 @@ import matter.tlv.TlvWriter class ContentLauncherClusterTrackPreferenceStruct( val languageCode: String, - val characteristics: Optional>, - val audioOutputIndex: UInt + val characteristics: Optional>?, + val audioOutputIndex: Optional? ) { override fun toString(): String = buildString { append("ContentLauncherClusterTrackPreferenceStruct {\n") @@ -41,15 +41,26 @@ class ContentLauncherClusterTrackPreferenceStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_LANGUAGE_CODE), languageCode) - if (characteristics.isPresent) { - val optcharacteristics = characteristics.get() - startArray(ContextSpecificTag(TAG_CHARACTERISTICS)) - for (item in optcharacteristics.iterator()) { - put(AnonymousTag, item) + if (characteristics != null) { + if (characteristics.isPresent) { + val optcharacteristics = characteristics.get() + startArray(ContextSpecificTag(TAG_CHARACTERISTICS)) + for (item in optcharacteristics.iterator()) { + put(AnonymousTag, item) + } + endArray() } - endArray() + } else { + putNull(ContextSpecificTag(TAG_CHARACTERISTICS)) + } + if (audioOutputIndex != null) { + if (audioOutputIndex.isPresent) { + val optaudioOutputIndex = audioOutputIndex.get() + put(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX), optaudioOutputIndex) + } + } else { + putNull(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX)) } - put(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX), audioOutputIndex) endStructure() } } @@ -63,20 +74,35 @@ class ContentLauncherClusterTrackPreferenceStruct( tlvReader.enterStructure(tlvTag) val languageCode = tlvReader.getString(ContextSpecificTag(TAG_LANGUAGE_CODE)) val characteristics = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CHARACTERISTICS))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CHARACTERISTICS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CHARACTERISTICS))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CHARACTERISTICS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() } - tlvReader.exitContainer() - } - ) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CHARACTERISTICS)) + null + } + val audioOutputIndex = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX))) + } else { + Optional.empty() + } } else { - Optional.empty() + tlvReader.getNull(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX)) + null } - val audioOutputIndex = tlvReader.getUInt(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackAttributesStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackAttributesStruct.kt index 1b991a4a051864..63dc90c3a6ebbd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackAttributesStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackAttributesStruct.kt @@ -18,6 +18,7 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag import matter.tlv.TlvReader @@ -25,11 +26,13 @@ import matter.tlv.TlvWriter class MediaPlaybackClusterTrackAttributesStruct( val languageCode: String, + val characteristics: Optional>?, val displayName: Optional? ) { override fun toString(): String = buildString { append("MediaPlaybackClusterTrackAttributesStruct {\n") append("\tlanguageCode : $languageCode\n") + append("\tcharacteristics : $characteristics\n") append("\tdisplayName : $displayName\n") append("}\n") } @@ -38,6 +41,18 @@ class MediaPlaybackClusterTrackAttributesStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_LANGUAGE_CODE), languageCode) + if (characteristics != null) { + if (characteristics.isPresent) { + val optcharacteristics = characteristics.get() + startArray(ContextSpecificTag(TAG_CHARACTERISTICS)) + for (item in optcharacteristics.iterator()) { + put(AnonymousTag, item) + } + endArray() + } + } else { + putNull(ContextSpecificTag(TAG_CHARACTERISTICS)) + } if (displayName != null) { if (displayName.isPresent) { val optdisplayName = displayName.get() @@ -52,11 +67,31 @@ class MediaPlaybackClusterTrackAttributesStruct( companion object { private const val TAG_LANGUAGE_CODE = 0 - private const val TAG_DISPLAY_NAME = 1 + private const val TAG_CHARACTERISTICS = 1 + private const val TAG_DISPLAY_NAME = 2 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaPlaybackClusterTrackAttributesStruct { tlvReader.enterStructure(tlvTag) val languageCode = tlvReader.getString(ContextSpecificTag(TAG_LANGUAGE_CODE)) + val characteristics = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CHARACTERISTICS))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CHARACTERISTICS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CHARACTERISTICS)) + null + } val displayName = if (!tlvReader.isNull()) { if (tlvReader.isNextTag(ContextSpecificTag(TAG_DISPLAY_NAME))) { @@ -71,7 +106,7 @@ class MediaPlaybackClusterTrackAttributesStruct( tlvReader.exitContainer() - return MediaPlaybackClusterTrackAttributesStruct(languageCode, displayName) + return MediaPlaybackClusterTrackAttributesStruct(languageCode, characteristics, displayName) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackStruct.kt index 087bc437a2a754..24ed7832fb6efc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackStruct.kt @@ -24,7 +24,7 @@ import matter.tlv.TlvWriter class MediaPlaybackClusterTrackStruct( val id: String, - val trackAttributes: MediaPlaybackClusterTrackAttributesStruct? + val trackAttributes: MediaPlaybackClusterTrackAttributesStruct ) { override fun toString(): String = buildString { append("MediaPlaybackClusterTrackStruct {\n") @@ -37,11 +37,7 @@ class MediaPlaybackClusterTrackStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_ID), id) - if (trackAttributes != null) { - trackAttributes.toTlv(ContextSpecificTag(TAG_TRACK_ATTRIBUTES), this) - } else { - putNull(ContextSpecificTag(TAG_TRACK_ATTRIBUTES)) - } + trackAttributes.toTlv(ContextSpecificTag(TAG_TRACK_ATTRIBUTES), this) endStructure() } } @@ -54,15 +50,10 @@ class MediaPlaybackClusterTrackStruct( tlvReader.enterStructure(tlvTag) val id = tlvReader.getString(ContextSpecificTag(TAG_ID)) val trackAttributes = - if (!tlvReader.isNull()) { - MediaPlaybackClusterTrackAttributesStruct.fromTlv( - ContextSpecificTag(TAG_TRACK_ATTRIBUTES), - tlvReader - ) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TRACK_ATTRIBUTES)) - null - } + MediaPlaybackClusterTrackAttributesStruct.fromTlv( + ContextSpecificTag(TAG_TRACK_ATTRIBUTES), + tlvReader + ) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/ChannelCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ChannelCluster.kt index 653f118fc66440..328f3c7f52dddc 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/ChannelCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/ChannelCluster.kt @@ -234,11 +234,11 @@ class ChannelCluster(private val controller: MatterController, private val endpo } suspend fun getProgramGuide( - startTime: UInt?, - endTime: UInt?, + startTime: UInt, + endTime: UInt, channelList: List?, pageToken: ChannelClusterPageTokenStruct?, - recordingFlag: UInt?, + recordingFlag: UByte?, externalIDList: List?, data: ByteArray?, timedInvokeTimeout: Duration? = null @@ -249,10 +249,10 @@ class ChannelCluster(private val controller: MatterController, private val endpo tlvWriter.startStructure(AnonymousTag) val TAG_START_TIME_REQ: Int = 0 - startTime?.let { tlvWriter.put(ContextSpecificTag(TAG_START_TIME_REQ), startTime) } + tlvWriter.put(ContextSpecificTag(TAG_START_TIME_REQ), startTime) val TAG_END_TIME_REQ: Int = 1 - endTime?.let { tlvWriter.put(ContextSpecificTag(TAG_END_TIME_REQ), endTime) } + tlvWriter.put(ContextSpecificTag(TAG_END_TIME_REQ), endTime) val TAG_CHANNEL_LIST_REQ: Int = 2 channelList?.let { @@ -337,8 +337,8 @@ class ChannelCluster(private val controller: MatterController, private val endpo suspend fun recordProgram( programIdentifier: String, shouldRecordSeries: Boolean, - externalIDList: List, - data: ByteArray, + externalIDList: List?, + data: ByteArray?, timedInvokeTimeout: Duration? = null ) { val commandId: UInt = 6u @@ -353,14 +353,16 @@ class ChannelCluster(private val controller: MatterController, private val endpo tlvWriter.put(ContextSpecificTag(TAG_SHOULD_RECORD_SERIES_REQ), shouldRecordSeries) val TAG_EXTERNAL_I_D_LIST_REQ: Int = 2 - tlvWriter.startArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST_REQ)) - for (item in externalIDList.iterator()) { - item.toTlv(AnonymousTag, tlvWriter) + externalIDList?.let { + tlvWriter.startArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST_REQ)) + for (item in externalIDList.iterator()) { + item.toTlv(AnonymousTag, tlvWriter) + } + tlvWriter.endArray() } - tlvWriter.endArray() val TAG_DATA_REQ: Int = 3 - tlvWriter.put(ContextSpecificTag(TAG_DATA_REQ), data) + data?.let { tlvWriter.put(ContextSpecificTag(TAG_DATA_REQ), data) } tlvWriter.endStructure() val request: InvokeRequest = @@ -377,8 +379,8 @@ class ChannelCluster(private val controller: MatterController, private val endpo suspend fun cancelRecordProgram( programIdentifier: String, shouldRecordSeries: Boolean, - externalIDList: List, - data: ByteArray, + externalIDList: List?, + data: ByteArray?, timedInvokeTimeout: Duration? = null ) { val commandId: UInt = 7u @@ -393,14 +395,16 @@ class ChannelCluster(private val controller: MatterController, private val endpo tlvWriter.put(ContextSpecificTag(TAG_SHOULD_RECORD_SERIES_REQ), shouldRecordSeries) val TAG_EXTERNAL_I_D_LIST_REQ: Int = 2 - tlvWriter.startArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST_REQ)) - for (item in externalIDList.iterator()) { - item.toTlv(AnonymousTag, tlvWriter) + externalIDList?.let { + tlvWriter.startArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST_REQ)) + for (item in externalIDList.iterator()) { + item.toTlv(AnonymousTag, tlvWriter) + } + tlvWriter.endArray() } - tlvWriter.endArray() val TAG_DATA_REQ: Int = 3 - tlvWriter.put(ContextSpecificTag(TAG_DATA_REQ), data) + data?.let { tlvWriter.put(ContextSpecificTag(TAG_DATA_REQ), data) } tlvWriter.endStructure() val request: InvokeRequest = diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentAppObserverCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentAppObserverCluster.kt index 4c08eb6499a918..dbab60048d70e2 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentAppObserverCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentAppObserverCluster.kt @@ -86,8 +86,8 @@ class ContentAppObserverCluster( } suspend fun contentAppMessage( - data: String?, - encodingHint: String, + data: String, + encodingHint: String?, timedInvokeTimeout: Duration? = null ): ContentAppMessageResponse { val commandId: UInt = 0u @@ -96,10 +96,10 @@ class ContentAppObserverCluster( tlvWriter.startStructure(AnonymousTag) val TAG_DATA_REQ: Int = 0 - data?.let { tlvWriter.put(ContextSpecificTag(TAG_DATA_REQ), data) } + tlvWriter.put(ContextSpecificTag(TAG_DATA_REQ), data) val TAG_ENCODING_HINT_REQ: Int = 1 - tlvWriter.put(ContextSpecificTag(TAG_ENCODING_HINT_REQ), encodingHint) + encodingHint?.let { tlvWriter.put(ContextSpecificTag(TAG_ENCODING_HINT_REQ), encodingHint) } tlvWriter.endStructure() val request: InvokeRequest = diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentControlCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentControlCluster.kt index 327d7b9645c408..2ebf03ccf2b6e4 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentControlCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentControlCluster.kt @@ -70,6 +70,39 @@ class ContentControlCluster( object SubscriptionEstablished : ScheduledContentRatingsAttributeSubscriptionState() } + class BlockChannelListAttribute(val value: List?) + + sealed class BlockChannelListAttributeSubscriptionState { + data class Success(val value: List?) : + BlockChannelListAttributeSubscriptionState() + + data class Error(val exception: Exception) : BlockChannelListAttributeSubscriptionState() + + object SubscriptionEstablished : BlockChannelListAttributeSubscriptionState() + } + + class BlockApplicationListAttribute(val value: List?) + + sealed class BlockApplicationListAttributeSubscriptionState { + data class Success(val value: List?) : + BlockApplicationListAttributeSubscriptionState() + + data class Error(val exception: Exception) : BlockApplicationListAttributeSubscriptionState() + + object SubscriptionEstablished : BlockApplicationListAttributeSubscriptionState() + } + + class BlockContentTimeWindowAttribute(val value: List?) + + sealed class BlockContentTimeWindowAttributeSubscriptionState { + data class Success(val value: List?) : + BlockContentTimeWindowAttributeSubscriptionState() + + data class Error(val exception: Exception) : BlockContentTimeWindowAttributeSubscriptionState() + + object SubscriptionEstablished : BlockContentTimeWindowAttributeSubscriptionState() + } + class GeneratedCommandListAttribute(val value: List) sealed class GeneratedCommandListAttributeSubscriptionState { @@ -110,14 +143,14 @@ class ContentControlCluster( object SubscriptionEstablished : AttributeListAttributeSubscriptionState() } - suspend fun updatePIN(oldPIN: String?, newPIN: String, timedInvokeTimeout: Duration? = null) { + suspend fun updatePIN(oldPIN: String, newPIN: String, timedInvokeTimeout: Duration) { val commandId: UInt = 0u val tlvWriter = TlvWriter() tlvWriter.startStructure(AnonymousTag) val TAG_OLD_P_I_N_REQ: Int = 0 - oldPIN?.let { tlvWriter.put(ContextSpecificTag(TAG_OLD_P_I_N_REQ), oldPIN) } + tlvWriter.put(ContextSpecificTag(TAG_OLD_P_I_N_REQ), oldPIN) val TAG_NEW_P_I_N_REQ: Int = 1 tlvWriter.put(ContextSpecificTag(TAG_NEW_P_I_N_REQ), newPIN) @@ -134,7 +167,7 @@ class ContentControlCluster( logger.log(Level.FINE, "Invoke command succeeded: ${response}") } - suspend fun resetPIN(timedInvokeTimeout: Duration? = null): ResetPINResponse { + suspend fun resetPIN(timedInvokeTimeout: Duration): ResetPINResponse { val commandId: UInt = 1u val tlvWriter = TlvWriter() @@ -175,7 +208,7 @@ class ContentControlCluster( return ResetPINResponse(PINCode_decoded) } - suspend fun enable(timedInvokeTimeout: Duration? = null) { + suspend fun enable(timedInvokeTimeout: Duration) { val commandId: UInt = 3u val tlvWriter = TlvWriter() @@ -193,7 +226,7 @@ class ContentControlCluster( logger.log(Level.FINE, "Invoke command succeeded: ${response}") } - suspend fun disable(timedInvokeTimeout: Duration? = null) { + suspend fun disable(timedInvokeTimeout: Duration) { val commandId: UInt = 4u val tlvWriter = TlvWriter() @@ -213,7 +246,7 @@ class ContentControlCluster( suspend fun addBonusTime( PINCode: String?, - bonusTime: UInt?, + bonusTime: UInt, timedInvokeTimeout: Duration? = null ) { val commandId: UInt = 5u @@ -225,7 +258,7 @@ class ContentControlCluster( PINCode?.let { tlvWriter.put(ContextSpecificTag(TAG_P_I_N_CODE_REQ), PINCode) } val TAG_BONUS_TIME_REQ: Int = 1 - bonusTime?.let { tlvWriter.put(ContextSpecificTag(TAG_BONUS_TIME_REQ), bonusTime) } + tlvWriter.put(ContextSpecificTag(TAG_BONUS_TIME_REQ), bonusTime) tlvWriter.endStructure() val request: InvokeRequest = @@ -341,6 +374,170 @@ class ContentControlCluster( logger.log(Level.FINE, "Invoke command succeeded: ${response}") } + suspend fun addBlockChannels( + channels: List, + timedInvokeTimeout: Duration? = null + ) { + val commandId: UInt = 11u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_CHANNELS_REQ: Int = 0 + tlvWriter.startArray(ContextSpecificTag(TAG_CHANNELS_REQ)) + for (item in channels.iterator()) { + item.toTlv(AnonymousTag, tlvWriter) + } + tlvWriter.endArray() + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun removeBlockChannels( + channelIndexes: List, + timedInvokeTimeout: Duration? = null + ) { + val commandId: UInt = 12u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_CHANNEL_INDEXES_REQ: Int = 0 + tlvWriter.startArray(ContextSpecificTag(TAG_CHANNEL_INDEXES_REQ)) + for (item in channelIndexes.iterator()) { + tlvWriter.put(AnonymousTag, item) + } + tlvWriter.endArray() + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun addBlockApplications( + applications: List, + timedInvokeTimeout: Duration? = null + ) { + val commandId: UInt = 13u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_APPLICATIONS_REQ: Int = 0 + tlvWriter.startArray(ContextSpecificTag(TAG_APPLICATIONS_REQ)) + for (item in applications.iterator()) { + item.toTlv(AnonymousTag, tlvWriter) + } + tlvWriter.endArray() + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun removeBlockApplications( + applications: List, + timedInvokeTimeout: Duration? = null + ) { + val commandId: UInt = 14u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_APPLICATIONS_REQ: Int = 0 + tlvWriter.startArray(ContextSpecificTag(TAG_APPLICATIONS_REQ)) + for (item in applications.iterator()) { + item.toTlv(AnonymousTag, tlvWriter) + } + tlvWriter.endArray() + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun setBlockContentTimeWindow( + timeWindow: ContentControlClusterTimeWindowStruct, + timedInvokeTimeout: Duration? = null + ) { + val commandId: UInt = 15u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_TIME_WINDOW_REQ: Int = 0 + timeWindow.toTlv(ContextSpecificTag(TAG_TIME_WINDOW_REQ), tlvWriter) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun removeBlockContentTimeWindow( + timeWindowIndexes: List, + timedInvokeTimeout: Duration? = null + ) { + val commandId: UInt = 16u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_TIME_WINDOW_INDEXES_REQ: Int = 0 + tlvWriter.startArray(ContextSpecificTag(TAG_TIME_WINDOW_INDEXES_REQ)) + for (item in timeWindowIndexes.iterator()) { + tlvWriter.put(AnonymousTag, item) + } + tlvWriter.endArray() + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + suspend fun readEnabledAttribute(): Boolean { val ATTRIBUTE_ID: UInt = 0u @@ -1006,7 +1203,7 @@ class ContentControlCluster( } } - suspend fun readBlockUnratedAttribute(): Boolean { + suspend fun readBlockUnratedAttribute(): Boolean? { val ATTRIBUTE_ID: UInt = 7u val attributePath = @@ -1032,7 +1229,12 @@ class ContentControlCluster( // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: Boolean = tlvReader.getBoolean(AnonymousTag) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } return decodedValue } @@ -1076,9 +1278,14 @@ class ContentControlCluster( // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: Boolean = tlvReader.getBoolean(AnonymousTag) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } - emit(BooleanSubscriptionState.Success(decodedValue)) + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } } SubscriptionState.SubscriptionEstablished -> { emit(BooleanSubscriptionState.SubscriptionEstablished) @@ -1087,6 +1294,321 @@ class ContentControlCluster( } } + suspend fun readBlockChannelListAttribute(): BlockChannelListAttribute { + val ATTRIBUTE_ID: UInt = 8u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Blockchannellist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ContentControlClusterBlockChannelStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return BlockChannelListAttribute(decodedValue) + } + + suspend fun subscribeBlockChannelListAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 8u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BlockChannelListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Blockchannellist attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ContentControlClusterBlockChannelStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(BlockChannelListAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BlockChannelListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readBlockApplicationListAttribute(): BlockApplicationListAttribute { + val ATTRIBUTE_ID: UInt = 9u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Blockapplicationlist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ContentControlClusterAppInfoStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return BlockApplicationListAttribute(decodedValue) + } + + suspend fun subscribeBlockApplicationListAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 9u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BlockApplicationListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Blockapplicationlist attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ContentControlClusterAppInfoStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(BlockApplicationListAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BlockApplicationListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readBlockContentTimeWindowAttribute(): BlockContentTimeWindowAttribute { + val ATTRIBUTE_ID: UInt = 10u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Blockcontenttimewindow attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ContentControlClusterTimeWindowStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return BlockContentTimeWindowAttribute(decodedValue) + } + + suspend fun subscribeBlockContentTimeWindowAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 10u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BlockContentTimeWindowAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Blockcontenttimewindow attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ContentControlClusterTimeWindowStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(BlockContentTimeWindowAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BlockContentTimeWindowAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentLauncherCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentLauncherCluster.kt index ae50ff527a8e2c..767ef9e64256f9 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentLauncherCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentLauncherCluster.kt @@ -183,6 +183,7 @@ class ContentLauncherCluster( contentURL: String, displayString: String?, brandingInformation: ContentLauncherClusterBrandingInformationStruct?, + playbackPreferences: ContentLauncherClusterPlaybackPreferencesStruct?, timedInvokeTimeout: Duration? = null ): LauncherResponse { val commandId: UInt = 1u @@ -200,6 +201,11 @@ class ContentLauncherCluster( brandingInformation?.let { brandingInformation.toTlv(ContextSpecificTag(TAG_BRANDING_INFORMATION_REQ), tlvWriter) } + + val TAG_PLAYBACK_PREFERENCES_REQ: Int = 3 + playbackPreferences?.let { + playbackPreferences.toTlv(ContextSpecificTag(TAG_PLAYBACK_PREFERENCES_REQ), tlvWriter) + } tlvWriter.endStructure() val request: InvokeRequest = diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/MediaPlaybackCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/MediaPlaybackCluster.kt index 12b2afd339765b..73563d47fbc1a3 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/MediaPlaybackCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/MediaPlaybackCluster.kt @@ -859,7 +859,7 @@ class MediaPlaybackCluster( suspend fun activateAudioTrack( trackID: String, - audioOutputIndex: UByte, + audioOutputIndex: UByte?, timedInvokeTimeout: Duration? = null ) { val commandId: UInt = 12u @@ -871,7 +871,9 @@ class MediaPlaybackCluster( tlvWriter.put(ContextSpecificTag(TAG_TRACK_I_D_REQ), trackID) val TAG_AUDIO_OUTPUT_INDEX_REQ: Int = 1 - tlvWriter.put(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX_REQ), audioOutputIndex) + audioOutputIndex?.let { + tlvWriter.put(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX_REQ), audioOutputIndex) + } tlvWriter.endStructure() val request: InvokeRequest = diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt index 81e55baf4fe4f7..99d4358411bb50 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt @@ -23,10 +23,11 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class AccountLoginClusterLoggedOutEvent(val node: Optional) { +class AccountLoginClusterLoggedOutEvent(val node: Optional, val fabricIndex: UByte) { override fun toString(): String = buildString { append("AccountLoginClusterLoggedOutEvent {\n") append("\tnode : $node\n") + append("\tfabricIndex : $fabricIndex\n") append("}\n") } @@ -37,12 +38,14 @@ class AccountLoginClusterLoggedOutEvent(val node: Optional) { val optnode = node.get() put(ContextSpecificTag(TAG_NODE), optnode) } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } } companion object { private const val TAG_NODE = 0 + private const val TAG_FABRIC_INDEX = 254 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AccountLoginClusterLoggedOutEvent { tlvReader.enterStructure(tlvTag) @@ -52,10 +55,11 @@ class AccountLoginClusterLoggedOutEvent(val node: Optional) { } else { Optional.empty() } + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() - return AccountLoginClusterLoggedOutEvent(node) + return AccountLoginClusterLoggedOutEvent(node, fabricIndex) } } } diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/MediaPlaybackClusterStateChangedEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/MediaPlaybackClusterStateChangedEvent.kt index 3326660b5e35d0..1fa4ac4748f3c5 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/MediaPlaybackClusterStateChangedEvent.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/MediaPlaybackClusterStateChangedEvent.kt @@ -25,14 +25,15 @@ import matter.tlv.TlvWriter class MediaPlaybackClusterStateChangedEvent( val currentState: UByte, - val startTime: ULong, - val duration: ULong, - val sampledPosition: matter.controller.cluster.structs.MediaPlaybackClusterPlaybackPositionStruct, - val playbackSpeed: Float, - val seekRangeEnd: ULong, - val seekRangeStart: ULong, + val startTime: Optional, + val duration: Optional, + val sampledPosition: + Optional, + val playbackSpeed: Optional, + val seekRangeEnd: Optional, + val seekRangeStart: Optional, val data: Optional, - val audioAdvanceUnmuted: Boolean + val audioAdvanceUnmuted: Optional ) { override fun toString(): String = buildString { append("MediaPlaybackClusterStateChangedEvent {\n") @@ -52,17 +53,38 @@ class MediaPlaybackClusterStateChangedEvent( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_CURRENT_STATE), currentState) - put(ContextSpecificTag(TAG_START_TIME), startTime) - put(ContextSpecificTag(TAG_DURATION), duration) - sampledPosition.toTlv(ContextSpecificTag(TAG_SAMPLED_POSITION), this) - put(ContextSpecificTag(TAG_PLAYBACK_SPEED), playbackSpeed) - put(ContextSpecificTag(TAG_SEEK_RANGE_END), seekRangeEnd) - put(ContextSpecificTag(TAG_SEEK_RANGE_START), seekRangeStart) + if (startTime.isPresent) { + val optstartTime = startTime.get() + put(ContextSpecificTag(TAG_START_TIME), optstartTime) + } + if (duration.isPresent) { + val optduration = duration.get() + put(ContextSpecificTag(TAG_DURATION), optduration) + } + if (sampledPosition.isPresent) { + val optsampledPosition = sampledPosition.get() + optsampledPosition.toTlv(ContextSpecificTag(TAG_SAMPLED_POSITION), this) + } + if (playbackSpeed.isPresent) { + val optplaybackSpeed = playbackSpeed.get() + put(ContextSpecificTag(TAG_PLAYBACK_SPEED), optplaybackSpeed) + } + if (seekRangeEnd.isPresent) { + val optseekRangeEnd = seekRangeEnd.get() + put(ContextSpecificTag(TAG_SEEK_RANGE_END), optseekRangeEnd) + } + if (seekRangeStart.isPresent) { + val optseekRangeStart = seekRangeStart.get() + put(ContextSpecificTag(TAG_SEEK_RANGE_START), optseekRangeStart) + } if (data.isPresent) { val optdata = data.get() put(ContextSpecificTag(TAG_DATA), optdata) } - put(ContextSpecificTag(TAG_AUDIO_ADVANCE_UNMUTED), audioAdvanceUnmuted) + if (audioAdvanceUnmuted.isPresent) { + val optaudioAdvanceUnmuted = audioAdvanceUnmuted.get() + put(ContextSpecificTag(TAG_AUDIO_ADVANCE_UNMUTED), optaudioAdvanceUnmuted) + } endStructure() } } @@ -81,23 +103,59 @@ class MediaPlaybackClusterStateChangedEvent( fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaPlaybackClusterStateChangedEvent { tlvReader.enterStructure(tlvTag) val currentState = tlvReader.getUByte(ContextSpecificTag(TAG_CURRENT_STATE)) - val startTime = tlvReader.getULong(ContextSpecificTag(TAG_START_TIME)) - val duration = tlvReader.getULong(ContextSpecificTag(TAG_DURATION)) + val startTime = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_START_TIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_START_TIME))) + } else { + Optional.empty() + } + val duration = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_DURATION))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_DURATION))) + } else { + Optional.empty() + } val sampledPosition = - matter.controller.cluster.structs.MediaPlaybackClusterPlaybackPositionStruct.fromTlv( - ContextSpecificTag(TAG_SAMPLED_POSITION), - tlvReader - ) - val playbackSpeed = tlvReader.getFloat(ContextSpecificTag(TAG_PLAYBACK_SPEED)) - val seekRangeEnd = tlvReader.getULong(ContextSpecificTag(TAG_SEEK_RANGE_END)) - val seekRangeStart = tlvReader.getULong(ContextSpecificTag(TAG_SEEK_RANGE_START)) + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SAMPLED_POSITION))) { + Optional.of( + matter.controller.cluster.structs.MediaPlaybackClusterPlaybackPositionStruct.fromTlv( + ContextSpecificTag(TAG_SAMPLED_POSITION), + tlvReader + ) + ) + } else { + Optional.empty() + } + val playbackSpeed = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PLAYBACK_SPEED))) { + Optional.of(tlvReader.getFloat(ContextSpecificTag(TAG_PLAYBACK_SPEED))) + } else { + Optional.empty() + } + val seekRangeEnd = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SEEK_RANGE_END))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_SEEK_RANGE_END))) + } else { + Optional.empty() + } + val seekRangeStart = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SEEK_RANGE_START))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_SEEK_RANGE_START))) + } else { + Optional.empty() + } val data = if (tlvReader.isNextTag(ContextSpecificTag(TAG_DATA))) { Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_DATA))) } else { Optional.empty() } - val audioAdvanceUnmuted = tlvReader.getBoolean(ContextSpecificTag(TAG_AUDIO_ADVANCE_UNMUTED)) + val audioAdvanceUnmuted = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_ADVANCE_UNMUTED))) { + Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_AUDIO_ADVANCE_UNMUTED))) + } else { + Optional.empty() + } tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/TargetNavigatorClusterTargetUpdatedEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/TargetNavigatorClusterTargetUpdatedEvent.kt index 0d56be60d4b36e..45105d3ea12384 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/TargetNavigatorClusterTargetUpdatedEvent.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/TargetNavigatorClusterTargetUpdatedEvent.kt @@ -16,6 +16,7 @@ */ package matter.controller.cluster.eventstructs +import java.util.Optional import matter.controller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag @@ -24,9 +25,10 @@ import matter.tlv.TlvReader import matter.tlv.TlvWriter class TargetNavigatorClusterTargetUpdatedEvent( - val targetList: List, - val currentTarget: UByte, - val data: ByteArray + val targetList: + Optional>, + val currentTarget: Optional, + val data: Optional ) { override fun toString(): String = buildString { append("TargetNavigatorClusterTargetUpdatedEvent {\n") @@ -39,13 +41,22 @@ class TargetNavigatorClusterTargetUpdatedEvent( fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - startArray(ContextSpecificTag(TAG_TARGET_LIST)) - for (item in targetList.iterator()) { - item.toTlv(AnonymousTag, this) + if (targetList.isPresent) { + val opttargetList = targetList.get() + startArray(ContextSpecificTag(TAG_TARGET_LIST)) + for (item in opttargetList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + } + if (currentTarget.isPresent) { + val optcurrentTarget = currentTarget.get() + put(ContextSpecificTag(TAG_CURRENT_TARGET), optcurrentTarget) + } + if (data.isPresent) { + val optdata = data.get() + put(ContextSpecificTag(TAG_DATA), optdata) } - endArray() - put(ContextSpecificTag(TAG_CURRENT_TARGET), currentTarget) - put(ContextSpecificTag(TAG_DATA), data) endStructure() } } @@ -58,20 +69,36 @@ class TargetNavigatorClusterTargetUpdatedEvent( fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetUpdatedEvent { tlvReader.enterStructure(tlvTag) val targetList = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_TARGET_LIST)) - while (!tlvReader.isEndOfContainer()) { - this.add( - matter.controller.cluster.structs.TargetNavigatorClusterTargetInfoStruct.fromTlv( - AnonymousTag, - tlvReader - ) - ) - } - tlvReader.exitContainer() + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TARGET_LIST))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_TARGET_LIST)) + while (!tlvReader.isEndOfContainer()) { + this.add( + matter.controller.cluster.structs.TargetNavigatorClusterTargetInfoStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + val currentTarget = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CURRENT_TARGET))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_CURRENT_TARGET))) + } else { + Optional.empty() + } + val data = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_DATA))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_DATA))) + } else { + Optional.empty() } - val currentTarget = tlvReader.getUByte(ContextSpecificTag(TAG_CURRENT_TARGET)) - val data = tlvReader.getByteArray(ContextSpecificTag(TAG_DATA)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni index f62cee23bdd5b3..325c3e1ca125dc 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni @@ -25,7 +25,11 @@ matter_structs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ChannelClusterProgramCategoryStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ChannelClusterProgramStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ChannelClusterSeriesInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterAppInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterBlockChannelStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterRatingNameStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterTimePeriodStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterTimeWindowStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt", diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ChannelClusterProgramStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ChannelClusterProgramStruct.kt index f40e13d0894446..4f6f9f9d4193f9 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ChannelClusterProgramStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ChannelClusterProgramStruct.kt @@ -39,11 +39,11 @@ class ChannelClusterProgramStruct( val dvbiUrl: Optional, val releaseDate: Optional, val parentalGuidanceText: Optional, - val recordingFlag: Optional, + val recordingFlag: Optional, val seriesInfo: Optional?, val categoryList: Optional>, val castList: Optional>, - val externalIDList: Optional> + val externalIDList: Optional> ) { override fun toString(): String = buildString { append("ChannelClusterProgramStruct {\n") @@ -262,7 +262,7 @@ class ChannelClusterProgramStruct( } val recordingFlag = if (tlvReader.isNextTag(ContextSpecificTag(TAG_RECORDING_FLAG))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_RECORDING_FLAG))) + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_RECORDING_FLAG))) } else { Optional.empty() } @@ -310,10 +310,10 @@ class ChannelClusterProgramStruct( val externalIDList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { Optional.of( - buildList { + buildList { tlvReader.enterArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) while (!tlvReader.isEndOfContainer()) { - add(ChannelClusterProgramCastStruct.fromTlv(AnonymousTag, tlvReader)) + add(ChannelClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterAppInfoStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterAppInfoStruct.kt new file mode 100644 index 00000000000000..3ae533b938605e --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterAppInfoStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentControlClusterAppInfoStruct(val catalogVendorID: UShort, val applicationID: String) { + override fun toString(): String = buildString { + append("ContentControlClusterAppInfoStruct {\n") + append("\tcatalogVendorID : $catalogVendorID\n") + append("\tapplicationID : $applicationID\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D), catalogVendorID) + put(ContextSpecificTag(TAG_APPLICATION_I_D), applicationID) + endStructure() + } + } + + companion object { + private const val TAG_CATALOG_VENDOR_I_D = 0 + private const val TAG_APPLICATION_I_D = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentControlClusterAppInfoStruct { + tlvReader.enterStructure(tlvTag) + val catalogVendorID = tlvReader.getUShort(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) + val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) + + tlvReader.exitContainer() + + return ContentControlClusterAppInfoStruct(catalogVendorID, applicationID) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterBlockChannelStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterBlockChannelStruct.kt new file mode 100644 index 00000000000000..da2f6960829741 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterBlockChannelStruct.kt @@ -0,0 +1,93 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.controller.cluster.structs + +import java.util.Optional +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentControlClusterBlockChannelStruct( + val blockChannelIndex: UShort?, + val majorNumber: UShort, + val minorNumber: UShort, + val identifier: Optional +) { + override fun toString(): String = buildString { + append("ContentControlClusterBlockChannelStruct {\n") + append("\tblockChannelIndex : $blockChannelIndex\n") + append("\tmajorNumber : $majorNumber\n") + append("\tminorNumber : $minorNumber\n") + append("\tidentifier : $identifier\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (blockChannelIndex != null) { + put(ContextSpecificTag(TAG_BLOCK_CHANNEL_INDEX), blockChannelIndex) + } else { + putNull(ContextSpecificTag(TAG_BLOCK_CHANNEL_INDEX)) + } + put(ContextSpecificTag(TAG_MAJOR_NUMBER), majorNumber) + put(ContextSpecificTag(TAG_MINOR_NUMBER), minorNumber) + if (identifier.isPresent) { + val optidentifier = identifier.get() + put(ContextSpecificTag(TAG_IDENTIFIER), optidentifier) + } + endStructure() + } + } + + companion object { + private const val TAG_BLOCK_CHANNEL_INDEX = 0 + private const val TAG_MAJOR_NUMBER = 1 + private const val TAG_MINOR_NUMBER = 2 + private const val TAG_IDENTIFIER = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentControlClusterBlockChannelStruct { + tlvReader.enterStructure(tlvTag) + val blockChannelIndex = + if (!tlvReader.isNull()) { + tlvReader.getUShort(ContextSpecificTag(TAG_BLOCK_CHANNEL_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_BLOCK_CHANNEL_INDEX)) + null + } + val majorNumber = tlvReader.getUShort(ContextSpecificTag(TAG_MAJOR_NUMBER)) + val minorNumber = tlvReader.getUShort(ContextSpecificTag(TAG_MINOR_NUMBER)) + val identifier = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_IDENTIFIER))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IDENTIFIER))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ContentControlClusterBlockChannelStruct( + blockChannelIndex, + majorNumber, + minorNumber, + identifier + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterTimePeriodStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterTimePeriodStruct.kt new file mode 100644 index 00000000000000..27e9bb9016a9f3 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterTimePeriodStruct.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentControlClusterTimePeriodStruct( + val startHour: UByte, + val startMinute: UByte, + val endHour: UByte, + val endMinute: UByte +) { + override fun toString(): String = buildString { + append("ContentControlClusterTimePeriodStruct {\n") + append("\tstartHour : $startHour\n") + append("\tstartMinute : $startMinute\n") + append("\tendHour : $endHour\n") + append("\tendMinute : $endMinute\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_START_HOUR), startHour) + put(ContextSpecificTag(TAG_START_MINUTE), startMinute) + put(ContextSpecificTag(TAG_END_HOUR), endHour) + put(ContextSpecificTag(TAG_END_MINUTE), endMinute) + endStructure() + } + } + + companion object { + private const val TAG_START_HOUR = 0 + private const val TAG_START_MINUTE = 1 + private const val TAG_END_HOUR = 2 + private const val TAG_END_MINUTE = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentControlClusterTimePeriodStruct { + tlvReader.enterStructure(tlvTag) + val startHour = tlvReader.getUByte(ContextSpecificTag(TAG_START_HOUR)) + val startMinute = tlvReader.getUByte(ContextSpecificTag(TAG_START_MINUTE)) + val endHour = tlvReader.getUByte(ContextSpecificTag(TAG_END_HOUR)) + val endMinute = tlvReader.getUByte(ContextSpecificTag(TAG_END_MINUTE)) + + tlvReader.exitContainer() + + return ContentControlClusterTimePeriodStruct(startHour, startMinute, endHour, endMinute) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterTimeWindowStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterTimeWindowStruct.kt new file mode 100644 index 00000000000000..fc1939ad7f5af7 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterTimeWindowStruct.kt @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentControlClusterTimeWindowStruct( + val timeWindowIndex: UShort?, + val dayOfWeek: UByte, + val timePeriod: List +) { + override fun toString(): String = buildString { + append("ContentControlClusterTimeWindowStruct {\n") + append("\ttimeWindowIndex : $timeWindowIndex\n") + append("\tdayOfWeek : $dayOfWeek\n") + append("\ttimePeriod : $timePeriod\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (timeWindowIndex != null) { + put(ContextSpecificTag(TAG_TIME_WINDOW_INDEX), timeWindowIndex) + } else { + putNull(ContextSpecificTag(TAG_TIME_WINDOW_INDEX)) + } + put(ContextSpecificTag(TAG_DAY_OF_WEEK), dayOfWeek) + startArray(ContextSpecificTag(TAG_TIME_PERIOD)) + for (item in timePeriod.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_TIME_WINDOW_INDEX = 0 + private const val TAG_DAY_OF_WEEK = 1 + private const val TAG_TIME_PERIOD = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentControlClusterTimeWindowStruct { + tlvReader.enterStructure(tlvTag) + val timeWindowIndex = + if (!tlvReader.isNull()) { + tlvReader.getUShort(ContextSpecificTag(TAG_TIME_WINDOW_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TIME_WINDOW_INDEX)) + null + } + val dayOfWeek = tlvReader.getUByte(ContextSpecificTag(TAG_DAY_OF_WEEK)) + val timePeriod = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_TIME_PERIOD)) + while (!tlvReader.isEndOfContainer()) { + add(ContentControlClusterTimePeriodStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ContentControlClusterTimeWindowStruct(timeWindowIndex, dayOfWeek, timePeriod) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterPlaybackPreferencesStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterPlaybackPreferencesStruct.kt index 694f35fc4364d1..1ed3af14c66ea1 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterPlaybackPreferencesStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterPlaybackPreferencesStruct.kt @@ -25,9 +25,9 @@ import matter.tlv.TlvReader import matter.tlv.TlvWriter class ContentLauncherClusterPlaybackPreferencesStruct( - val playbackPosition: ULong, - val textTrack: ContentLauncherClusterTrackPreferenceStruct, - val audioTracks: Optional> + val playbackPosition: Optional?, + val textTrack: Optional?, + val audioTracks: Optional>? ) { override fun toString(): String = buildString { append("ContentLauncherClusterPlaybackPreferencesStruct {\n") @@ -40,15 +40,33 @@ class ContentLauncherClusterPlaybackPreferencesStruct( fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - put(ContextSpecificTag(TAG_PLAYBACK_POSITION), playbackPosition) - textTrack.toTlv(ContextSpecificTag(TAG_TEXT_TRACK), this) - if (audioTracks.isPresent) { - val optaudioTracks = audioTracks.get() - startArray(ContextSpecificTag(TAG_AUDIO_TRACKS)) - for (item in optaudioTracks.iterator()) { - item.toTlv(AnonymousTag, this) + if (playbackPosition != null) { + if (playbackPosition.isPresent) { + val optplaybackPosition = playbackPosition.get() + put(ContextSpecificTag(TAG_PLAYBACK_POSITION), optplaybackPosition) } - endArray() + } else { + putNull(ContextSpecificTag(TAG_PLAYBACK_POSITION)) + } + if (textTrack != null) { + if (textTrack.isPresent) { + val opttextTrack = textTrack.get() + opttextTrack.toTlv(ContextSpecificTag(TAG_TEXT_TRACK), this) + } + } else { + putNull(ContextSpecificTag(TAG_TEXT_TRACK)) + } + if (audioTracks != null) { + if (audioTracks.isPresent) { + val optaudioTracks = audioTracks.get() + startArray(ContextSpecificTag(TAG_AUDIO_TRACKS)) + for (item in optaudioTracks.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + } + } else { + putNull(ContextSpecificTag(TAG_AUDIO_TRACKS)) } endStructure() } @@ -64,25 +82,51 @@ class ContentLauncherClusterPlaybackPreferencesStruct( tlvReader: TlvReader ): ContentLauncherClusterPlaybackPreferencesStruct { tlvReader.enterStructure(tlvTag) - val playbackPosition = tlvReader.getULong(ContextSpecificTag(TAG_PLAYBACK_POSITION)) + val playbackPosition = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PLAYBACK_POSITION))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_PLAYBACK_POSITION))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PLAYBACK_POSITION)) + null + } val textTrack = - ContentLauncherClusterTrackPreferenceStruct.fromTlv( - ContextSpecificTag(TAG_TEXT_TRACK), - tlvReader - ) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TEXT_TRACK))) { + Optional.of( + ContentLauncherClusterTrackPreferenceStruct.fromTlv( + ContextSpecificTag(TAG_TEXT_TRACK), + tlvReader + ) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TEXT_TRACK)) + null + } val audioTracks = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_TRACKS))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_AUDIO_TRACKS)) - while (!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterTrackPreferenceStruct.fromTlv(AnonymousTag, tlvReader)) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_TRACKS))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_AUDIO_TRACKS)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterTrackPreferenceStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() } - tlvReader.exitContainer() - } - ) + ) + } else { + Optional.empty() + } } else { - Optional.empty() + tlvReader.getNull(ContextSpecificTag(TAG_AUDIO_TRACKS)) + null } tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterTrackPreferenceStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterTrackPreferenceStruct.kt index 74c3088d135bcc..8e312b0dababa6 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterTrackPreferenceStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterTrackPreferenceStruct.kt @@ -26,8 +26,8 @@ import matter.tlv.TlvWriter class ContentLauncherClusterTrackPreferenceStruct( val languageCode: String, - val characteristics: Optional>, - val audioOutputIndex: UByte + val characteristics: Optional>?, + val audioOutputIndex: Optional? ) { override fun toString(): String = buildString { append("ContentLauncherClusterTrackPreferenceStruct {\n") @@ -41,15 +41,26 @@ class ContentLauncherClusterTrackPreferenceStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_LANGUAGE_CODE), languageCode) - if (characteristics.isPresent) { - val optcharacteristics = characteristics.get() - startArray(ContextSpecificTag(TAG_CHARACTERISTICS)) - for (item in optcharacteristics.iterator()) { - put(AnonymousTag, item) + if (characteristics != null) { + if (characteristics.isPresent) { + val optcharacteristics = characteristics.get() + startArray(ContextSpecificTag(TAG_CHARACTERISTICS)) + for (item in optcharacteristics.iterator()) { + put(AnonymousTag, item) + } + endArray() } - endArray() + } else { + putNull(ContextSpecificTag(TAG_CHARACTERISTICS)) + } + if (audioOutputIndex != null) { + if (audioOutputIndex.isPresent) { + val optaudioOutputIndex = audioOutputIndex.get() + put(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX), optaudioOutputIndex) + } + } else { + putNull(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX)) } - put(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX), audioOutputIndex) endStructure() } } @@ -63,20 +74,35 @@ class ContentLauncherClusterTrackPreferenceStruct( tlvReader.enterStructure(tlvTag) val languageCode = tlvReader.getString(ContextSpecificTag(TAG_LANGUAGE_CODE)) val characteristics = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CHARACTERISTICS))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CHARACTERISTICS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUByte(AnonymousTag)) + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CHARACTERISTICS))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CHARACTERISTICS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() } - tlvReader.exitContainer() - } - ) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CHARACTERISTICS)) + null + } + val audioOutputIndex = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX))) + } else { + Optional.empty() + } } else { - Optional.empty() + tlvReader.getNull(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX)) + null } - val audioOutputIndex = tlvReader.getUByte(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/MediaPlaybackClusterTrackAttributesStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/MediaPlaybackClusterTrackAttributesStruct.kt index dfd99da8565408..aed06d7cf8f3de 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/MediaPlaybackClusterTrackAttributesStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/MediaPlaybackClusterTrackAttributesStruct.kt @@ -18,6 +18,7 @@ package matter.controller.cluster.structs import java.util.Optional import matter.controller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag import matter.tlv.TlvReader @@ -25,11 +26,13 @@ import matter.tlv.TlvWriter class MediaPlaybackClusterTrackAttributesStruct( val languageCode: String, + val characteristics: Optional>?, val displayName: Optional? ) { override fun toString(): String = buildString { append("MediaPlaybackClusterTrackAttributesStruct {\n") append("\tlanguageCode : $languageCode\n") + append("\tcharacteristics : $characteristics\n") append("\tdisplayName : $displayName\n") append("}\n") } @@ -38,6 +41,18 @@ class MediaPlaybackClusterTrackAttributesStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_LANGUAGE_CODE), languageCode) + if (characteristics != null) { + if (characteristics.isPresent) { + val optcharacteristics = characteristics.get() + startArray(ContextSpecificTag(TAG_CHARACTERISTICS)) + for (item in optcharacteristics.iterator()) { + put(AnonymousTag, item) + } + endArray() + } + } else { + putNull(ContextSpecificTag(TAG_CHARACTERISTICS)) + } if (displayName != null) { if (displayName.isPresent) { val optdisplayName = displayName.get() @@ -52,11 +67,31 @@ class MediaPlaybackClusterTrackAttributesStruct( companion object { private const val TAG_LANGUAGE_CODE = 0 - private const val TAG_DISPLAY_NAME = 1 + private const val TAG_CHARACTERISTICS = 1 + private const val TAG_DISPLAY_NAME = 2 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaPlaybackClusterTrackAttributesStruct { tlvReader.enterStructure(tlvTag) val languageCode = tlvReader.getString(ContextSpecificTag(TAG_LANGUAGE_CODE)) + val characteristics = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CHARACTERISTICS))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CHARACTERISTICS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CHARACTERISTICS)) + null + } val displayName = if (!tlvReader.isNull()) { if (tlvReader.isNextTag(ContextSpecificTag(TAG_DISPLAY_NAME))) { @@ -71,7 +106,7 @@ class MediaPlaybackClusterTrackAttributesStruct( tlvReader.exitContainer() - return MediaPlaybackClusterTrackAttributesStruct(languageCode, displayName) + return MediaPlaybackClusterTrackAttributesStruct(languageCode, characteristics, displayName) } } } diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/MediaPlaybackClusterTrackStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/MediaPlaybackClusterTrackStruct.kt index 0571df7456c16e..c8040dd50fa153 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/MediaPlaybackClusterTrackStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/MediaPlaybackClusterTrackStruct.kt @@ -24,7 +24,7 @@ import matter.tlv.TlvWriter class MediaPlaybackClusterTrackStruct( val id: String, - val trackAttributes: MediaPlaybackClusterTrackAttributesStruct? + val trackAttributes: MediaPlaybackClusterTrackAttributesStruct ) { override fun toString(): String = buildString { append("MediaPlaybackClusterTrackStruct {\n") @@ -37,11 +37,7 @@ class MediaPlaybackClusterTrackStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_ID), id) - if (trackAttributes != null) { - trackAttributes.toTlv(ContextSpecificTag(TAG_TRACK_ATTRIBUTES), this) - } else { - putNull(ContextSpecificTag(TAG_TRACK_ATTRIBUTES)) - } + trackAttributes.toTlv(ContextSpecificTag(TAG_TRACK_ATTRIBUTES), this) endStructure() } } @@ -54,15 +50,10 @@ class MediaPlaybackClusterTrackStruct( tlvReader.enterStructure(tlvTag) val id = tlvReader.getString(ContextSpecificTag(TAG_ID)) val trackAttributes = - if (!tlvReader.isNull()) { - MediaPlaybackClusterTrackAttributesStruct.fromTlv( - ContextSpecificTag(TAG_TRACK_ATTRIBUTES), - tlvReader - ) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TRACK_ATTRIBUTES)) - null - } + MediaPlaybackClusterTrackAttributesStruct.fromTlv( + ContextSpecificTag(TAG_TRACK_ATTRIBUTES), + tlvReader + ) tlvReader.exitContainer() diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 2400ba818c7cb9..0ee46fe5a91beb 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -38205,61 +38205,89 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_id; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().id, value_id)); jobject value_trackAttributes; - if (cppValue.Value().trackAttributes.IsNull()) + jobject value_trackAttributes_languageCode; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().trackAttributes.languageCode, + value_trackAttributes_languageCode)); + jobject value_trackAttributes_characteristics; + if (!cppValue.Value().trackAttributes.characteristics.HasValue()) { - value_trackAttributes = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_trackAttributes_characteristics); } else { - jobject value_trackAttributes_languageCode; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - cppValue.Value().trackAttributes.Value().languageCode, value_trackAttributes_languageCode)); - jobject value_trackAttributes_displayName; - if (!cppValue.Value().trackAttributes.Value().displayName.HasValue()) + jobject value_trackAttributes_characteristicsInsideOptional; + if (cppValue.Value().trackAttributes.characteristics.Value().IsNull()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_trackAttributes_displayName); + value_trackAttributes_characteristicsInsideOptional = nullptr; } else { - jobject value_trackAttributes_displayNameInsideOptional; - if (cppValue.Value().trackAttributes.Value().displayName.Value().IsNull()) - { - value_trackAttributes_displayNameInsideOptional = nullptr; - } - else + chip::JniReferences::GetInstance().CreateArrayList(value_trackAttributes_characteristicsInsideOptional); + + auto iter_value_trackAttributes_characteristicsInsideOptional_5 = + cppValue.Value().trackAttributes.characteristics.Value().Value().begin(); + while (iter_value_trackAttributes_characteristicsInsideOptional_5.Next()) { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - cppValue.Value().trackAttributes.Value().displayName.Value().Value(), - value_trackAttributes_displayNameInsideOptional)); + auto & entry_5 = iter_value_trackAttributes_characteristicsInsideOptional_5.GetValue(); + jobject newElement_5; + std::string newElement_5ClassName = "java/lang/Integer"; + std::string newElement_5CtorSignature = "(I)V"; + jint jninewElement_5 = static_cast(entry_5); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_5ClassName.c_str(), newElement_5CtorSignature.c_str(), jninewElement_5, newElement_5); + chip::JniReferences::GetInstance().AddToList(value_trackAttributes_characteristicsInsideOptional, + newElement_5); } - chip::JniReferences::GetInstance().CreateOptional(value_trackAttributes_displayNameInsideOptional, - value_trackAttributes_displayName); } - - jclass trackAttributesStructStructClass_3; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", - trackAttributesStructStructClass_3); - if (err != CHIP_NO_ERROR) + chip::JniReferences::GetInstance().CreateOptional(value_trackAttributes_characteristicsInsideOptional, + value_trackAttributes_characteristics); + } + jobject value_trackAttributes_displayName; + if (!cppValue.Value().trackAttributes.displayName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_trackAttributes_displayName); + } + else + { + jobject value_trackAttributes_displayNameInsideOptional; + if (cppValue.Value().trackAttributes.displayName.Value().IsNull()) { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); - return nullptr; + value_trackAttributes_displayNameInsideOptional = nullptr; } - - jmethodID trackAttributesStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_3, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &trackAttributesStructStructCtor_3); - if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_3 == nullptr) + else { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); - return nullptr; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + cppValue.Value().trackAttributes.displayName.Value().Value(), + value_trackAttributes_displayNameInsideOptional)); } + chip::JniReferences::GetInstance().CreateOptional(value_trackAttributes_displayNameInsideOptional, + value_trackAttributes_displayName); + } - value_trackAttributes = env->NewObject(trackAttributesStructStructClass_3, trackAttributesStructStructCtor_3, - value_trackAttributes_languageCode, value_trackAttributes_displayName); + jclass trackAttributesStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return nullptr; } + jmethodID trackAttributesStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_2, "", + "(Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;)V", + &trackAttributesStructStructCtor_2); + if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return nullptr; + } + + value_trackAttributes = env->NewObject(trackAttributesStructStructClass_2, trackAttributesStructStructCtor_2, + value_trackAttributes_languageCode, value_trackAttributes_characteristics, + value_trackAttributes_displayName); + jclass trackStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_1); @@ -38309,62 +38337,93 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_1_id; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.id, newElement_1_id)); jobject newElement_1_trackAttributes; - if (entry_1.trackAttributes.IsNull()) + jobject newElement_1_trackAttributes_languageCode; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_1.trackAttributes.languageCode, newElement_1_trackAttributes_languageCode)); + jobject newElement_1_trackAttributes_characteristics; + if (!entry_1.trackAttributes.characteristics.HasValue()) { - newElement_1_trackAttributes = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_characteristics); } else { - jobject newElement_1_trackAttributes_languageCode; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - entry_1.trackAttributes.Value().languageCode, newElement_1_trackAttributes_languageCode)); - jobject newElement_1_trackAttributes_displayName; - if (!entry_1.trackAttributes.Value().displayName.HasValue()) + jobject newElement_1_trackAttributes_characteristicsInsideOptional; + if (entry_1.trackAttributes.characteristics.Value().IsNull()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_displayName); + newElement_1_trackAttributes_characteristicsInsideOptional = nullptr; } else { - jobject newElement_1_trackAttributes_displayNameInsideOptional; - if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) - { - newElement_1_trackAttributes_displayNameInsideOptional = nullptr; - } - else + chip::JniReferences::GetInstance().CreateArrayList( + newElement_1_trackAttributes_characteristicsInsideOptional); + + auto iter_newElement_1_trackAttributes_characteristicsInsideOptional_6 = + entry_1.trackAttributes.characteristics.Value().Value().begin(); + while (iter_newElement_1_trackAttributes_characteristicsInsideOptional_6.Next()) { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - entry_1.trackAttributes.Value().displayName.Value().Value(), - newElement_1_trackAttributes_displayNameInsideOptional)); + auto & entry_6 = iter_newElement_1_trackAttributes_characteristicsInsideOptional_6.GetValue(); + jobject newElement_6; + std::string newElement_6ClassName = "java/lang/Integer"; + std::string newElement_6CtorSignature = "(I)V"; + jint jninewElement_6 = static_cast(entry_6); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_6ClassName.c_str(), + newElement_6CtorSignature.c_str(), + jninewElement_6, newElement_6); + chip::JniReferences::GetInstance().AddToList( + newElement_1_trackAttributes_characteristicsInsideOptional, newElement_6); } - chip::JniReferences::GetInstance().CreateOptional( - newElement_1_trackAttributes_displayNameInsideOptional, newElement_1_trackAttributes_displayName); } - - jclass trackAttributesStructStructClass_4; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", - trackAttributesStructStructClass_4); - if (err != CHIP_NO_ERROR) + chip::JniReferences::GetInstance().CreateOptional( + newElement_1_trackAttributes_characteristicsInsideOptional, + newElement_1_trackAttributes_characteristics); + } + jobject newElement_1_trackAttributes_displayName; + if (!entry_1.trackAttributes.displayName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_displayName); + } + else + { + jobject newElement_1_trackAttributes_displayNameInsideOptional; + if (entry_1.trackAttributes.displayName.Value().IsNull()) { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); - return nullptr; + newElement_1_trackAttributes_displayNameInsideOptional = nullptr; } - - jmethodID trackAttributesStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_4, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &trackAttributesStructStructCtor_4); - if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_4 == nullptr) + else { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); - return nullptr; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_1.trackAttributes.displayName.Value().Value(), + newElement_1_trackAttributes_displayNameInsideOptional)); } + chip::JniReferences::GetInstance().CreateOptional(newElement_1_trackAttributes_displayNameInsideOptional, + newElement_1_trackAttributes_displayName); + } + + jclass trackAttributesStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return nullptr; + } - newElement_1_trackAttributes = - env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, - newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); + jmethodID trackAttributesStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod( + env, trackAttributesStructStructClass_3, "", + "(Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;)V", &trackAttributesStructStructCtor_3); + if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return nullptr; } + newElement_1_trackAttributes = + env->NewObject(trackAttributesStructStructClass_3, trackAttributesStructStructCtor_3, + newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_characteristics, + newElement_1_trackAttributes_displayName); + jclass trackStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); @@ -38410,61 +38469,89 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_id; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().id, value_id)); jobject value_trackAttributes; - if (cppValue.Value().trackAttributes.IsNull()) + jobject value_trackAttributes_languageCode; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().trackAttributes.languageCode, + value_trackAttributes_languageCode)); + jobject value_trackAttributes_characteristics; + if (!cppValue.Value().trackAttributes.characteristics.HasValue()) { - value_trackAttributes = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_trackAttributes_characteristics); } else { - jobject value_trackAttributes_languageCode; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - cppValue.Value().trackAttributes.Value().languageCode, value_trackAttributes_languageCode)); - jobject value_trackAttributes_displayName; - if (!cppValue.Value().trackAttributes.Value().displayName.HasValue()) + jobject value_trackAttributes_characteristicsInsideOptional; + if (cppValue.Value().trackAttributes.characteristics.Value().IsNull()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_trackAttributes_displayName); + value_trackAttributes_characteristicsInsideOptional = nullptr; } else { - jobject value_trackAttributes_displayNameInsideOptional; - if (cppValue.Value().trackAttributes.Value().displayName.Value().IsNull()) - { - value_trackAttributes_displayNameInsideOptional = nullptr; - } - else + chip::JniReferences::GetInstance().CreateArrayList(value_trackAttributes_characteristicsInsideOptional); + + auto iter_value_trackAttributes_characteristicsInsideOptional_5 = + cppValue.Value().trackAttributes.characteristics.Value().Value().begin(); + while (iter_value_trackAttributes_characteristicsInsideOptional_5.Next()) { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - cppValue.Value().trackAttributes.Value().displayName.Value().Value(), - value_trackAttributes_displayNameInsideOptional)); + auto & entry_5 = iter_value_trackAttributes_characteristicsInsideOptional_5.GetValue(); + jobject newElement_5; + std::string newElement_5ClassName = "java/lang/Integer"; + std::string newElement_5CtorSignature = "(I)V"; + jint jninewElement_5 = static_cast(entry_5); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_5ClassName.c_str(), newElement_5CtorSignature.c_str(), jninewElement_5, newElement_5); + chip::JniReferences::GetInstance().AddToList(value_trackAttributes_characteristicsInsideOptional, + newElement_5); } - chip::JniReferences::GetInstance().CreateOptional(value_trackAttributes_displayNameInsideOptional, - value_trackAttributes_displayName); } - - jclass trackAttributesStructStructClass_3; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", - trackAttributesStructStructClass_3); - if (err != CHIP_NO_ERROR) + chip::JniReferences::GetInstance().CreateOptional(value_trackAttributes_characteristicsInsideOptional, + value_trackAttributes_characteristics); + } + jobject value_trackAttributes_displayName; + if (!cppValue.Value().trackAttributes.displayName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_trackAttributes_displayName); + } + else + { + jobject value_trackAttributes_displayNameInsideOptional; + if (cppValue.Value().trackAttributes.displayName.Value().IsNull()) { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); - return nullptr; + value_trackAttributes_displayNameInsideOptional = nullptr; } - - jmethodID trackAttributesStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_3, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &trackAttributesStructStructCtor_3); - if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_3 == nullptr) + else { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); - return nullptr; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + cppValue.Value().trackAttributes.displayName.Value().Value(), + value_trackAttributes_displayNameInsideOptional)); } + chip::JniReferences::GetInstance().CreateOptional(value_trackAttributes_displayNameInsideOptional, + value_trackAttributes_displayName); + } - value_trackAttributes = env->NewObject(trackAttributesStructStructClass_3, trackAttributesStructStructCtor_3, - value_trackAttributes_languageCode, value_trackAttributes_displayName); + jclass trackAttributesStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return nullptr; + } + + jmethodID trackAttributesStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_2, "", + "(Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;)V", + &trackAttributesStructStructCtor_2); + if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return nullptr; } + value_trackAttributes = env->NewObject(trackAttributesStructStructClass_2, trackAttributesStructStructCtor_2, + value_trackAttributes_languageCode, value_trackAttributes_characteristics, + value_trackAttributes_displayName); + jclass trackStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_1); @@ -38514,62 +38601,93 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_1_id; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.id, newElement_1_id)); jobject newElement_1_trackAttributes; - if (entry_1.trackAttributes.IsNull()) + jobject newElement_1_trackAttributes_languageCode; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_1.trackAttributes.languageCode, newElement_1_trackAttributes_languageCode)); + jobject newElement_1_trackAttributes_characteristics; + if (!entry_1.trackAttributes.characteristics.HasValue()) { - newElement_1_trackAttributes = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_characteristics); } else { - jobject newElement_1_trackAttributes_languageCode; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - entry_1.trackAttributes.Value().languageCode, newElement_1_trackAttributes_languageCode)); - jobject newElement_1_trackAttributes_displayName; - if (!entry_1.trackAttributes.Value().displayName.HasValue()) + jobject newElement_1_trackAttributes_characteristicsInsideOptional; + if (entry_1.trackAttributes.characteristics.Value().IsNull()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_displayName); + newElement_1_trackAttributes_characteristicsInsideOptional = nullptr; } else { - jobject newElement_1_trackAttributes_displayNameInsideOptional; - if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) - { - newElement_1_trackAttributes_displayNameInsideOptional = nullptr; - } - else + chip::JniReferences::GetInstance().CreateArrayList( + newElement_1_trackAttributes_characteristicsInsideOptional); + + auto iter_newElement_1_trackAttributes_characteristicsInsideOptional_6 = + entry_1.trackAttributes.characteristics.Value().Value().begin(); + while (iter_newElement_1_trackAttributes_characteristicsInsideOptional_6.Next()) { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - entry_1.trackAttributes.Value().displayName.Value().Value(), - newElement_1_trackAttributes_displayNameInsideOptional)); + auto & entry_6 = iter_newElement_1_trackAttributes_characteristicsInsideOptional_6.GetValue(); + jobject newElement_6; + std::string newElement_6ClassName = "java/lang/Integer"; + std::string newElement_6CtorSignature = "(I)V"; + jint jninewElement_6 = static_cast(entry_6); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_6ClassName.c_str(), + newElement_6CtorSignature.c_str(), + jninewElement_6, newElement_6); + chip::JniReferences::GetInstance().AddToList( + newElement_1_trackAttributes_characteristicsInsideOptional, newElement_6); } - chip::JniReferences::GetInstance().CreateOptional( - newElement_1_trackAttributes_displayNameInsideOptional, newElement_1_trackAttributes_displayName); } - - jclass trackAttributesStructStructClass_4; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", - trackAttributesStructStructClass_4); - if (err != CHIP_NO_ERROR) + chip::JniReferences::GetInstance().CreateOptional( + newElement_1_trackAttributes_characteristicsInsideOptional, + newElement_1_trackAttributes_characteristics); + } + jobject newElement_1_trackAttributes_displayName; + if (!entry_1.trackAttributes.displayName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_displayName); + } + else + { + jobject newElement_1_trackAttributes_displayNameInsideOptional; + if (entry_1.trackAttributes.displayName.Value().IsNull()) { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); - return nullptr; + newElement_1_trackAttributes_displayNameInsideOptional = nullptr; } - - jmethodID trackAttributesStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_4, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &trackAttributesStructStructCtor_4); - if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_4 == nullptr) + else { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); - return nullptr; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_1.trackAttributes.displayName.Value().Value(), + newElement_1_trackAttributes_displayNameInsideOptional)); } + chip::JniReferences::GetInstance().CreateOptional(newElement_1_trackAttributes_displayNameInsideOptional, + newElement_1_trackAttributes_displayName); + } - newElement_1_trackAttributes = - env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, - newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); + jclass trackAttributesStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return nullptr; } + jmethodID trackAttributesStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod( + env, trackAttributesStructStructClass_3, "", + "(Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;)V", &trackAttributesStructStructCtor_3); + if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return nullptr; + } + + newElement_1_trackAttributes = + env->NewObject(trackAttributesStructStructClass_3, trackAttributesStructStructCtor_3, + newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_characteristics, + newElement_1_trackAttributes_displayName); + jclass trackStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); @@ -40533,6 +40651,270 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jnivalue, value); return value; } + case Attributes::BlockChannelList::Id: { + using TypeInfo = Attributes::BlockChannelList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_blockChannelIndex; + if (entry_0.blockChannelIndex.IsNull()) + { + newElement_0_blockChannelIndex = nullptr; + } + else + { + std::string newElement_0_blockChannelIndexClassName = "java/lang/Integer"; + std::string newElement_0_blockChannelIndexCtorSignature = "(I)V"; + jint jninewElement_0_blockChannelIndex = static_cast(entry_0.blockChannelIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_blockChannelIndexClassName.c_str(), newElement_0_blockChannelIndexCtorSignature.c_str(), + jninewElement_0_blockChannelIndex, newElement_0_blockChannelIndex); + } + jobject newElement_0_majorNumber; + std::string newElement_0_majorNumberClassName = "java/lang/Integer"; + std::string newElement_0_majorNumberCtorSignature = "(I)V"; + jint jninewElement_0_majorNumber = static_cast(entry_0.majorNumber); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_majorNumberClassName.c_str(), + newElement_0_majorNumberCtorSignature.c_str(), + jninewElement_0_majorNumber, newElement_0_majorNumber); + jobject newElement_0_minorNumber; + std::string newElement_0_minorNumberClassName = "java/lang/Integer"; + std::string newElement_0_minorNumberCtorSignature = "(I)V"; + jint jninewElement_0_minorNumber = static_cast(entry_0.minorNumber); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minorNumberClassName.c_str(), + newElement_0_minorNumberCtorSignature.c_str(), + jninewElement_0_minorNumber, newElement_0_minorNumber); + jobject newElement_0_identifier; + if (!entry_0.identifier.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_identifier); + } + else + { + jobject newElement_0_identifierInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.identifier.Value(), + newElement_0_identifierInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_identifierInsideOptional, + newElement_0_identifier); + } + + jclass blockChannelStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ContentControlClusterBlockChannelStruct", + blockChannelStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterBlockChannelStruct"); + return nullptr; + } + + jmethodID blockChannelStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, blockChannelStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;)V", + &blockChannelStructStructCtor_1); + if (err != CHIP_NO_ERROR || blockChannelStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterBlockChannelStruct constructor"); + return nullptr; + } + + newElement_0 = + env->NewObject(blockChannelStructStructClass_1, blockChannelStructStructCtor_1, newElement_0_blockChannelIndex, + newElement_0_majorNumber, newElement_0_minorNumber, newElement_0_identifier); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::BlockApplicationList::Id: { + using TypeInfo = Attributes::BlockApplicationList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_catalogVendorID; + std::string newElement_0_catalogVendorIDClassName = "java/lang/Integer"; + std::string newElement_0_catalogVendorIDCtorSignature = "(I)V"; + jint jninewElement_0_catalogVendorID = static_cast(entry_0.catalogVendorID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_catalogVendorIDClassName.c_str(), newElement_0_catalogVendorIDCtorSignature.c_str(), + jninewElement_0_catalogVendorID, newElement_0_catalogVendorID); + jobject newElement_0_applicationID; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(entry_0.applicationID, newElement_0_applicationID)); + + jclass appInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ContentControlClusterAppInfoStruct", appInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterAppInfoStruct"); + return nullptr; + } + + jmethodID appInfoStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, appInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/String;)V", + &appInfoStructStructCtor_1); + if (err != CHIP_NO_ERROR || appInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterAppInfoStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(appInfoStructStructClass_1, appInfoStructStructCtor_1, newElement_0_catalogVendorID, + newElement_0_applicationID); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::BlockContentTimeWindow::Id: { + using TypeInfo = Attributes::BlockContentTimeWindow::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_timeWindowIndex; + if (entry_0.timeWindowIndex.IsNull()) + { + newElement_0_timeWindowIndex = nullptr; + } + else + { + std::string newElement_0_timeWindowIndexClassName = "java/lang/Integer"; + std::string newElement_0_timeWindowIndexCtorSignature = "(I)V"; + jint jninewElement_0_timeWindowIndex = static_cast(entry_0.timeWindowIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_timeWindowIndexClassName.c_str(), newElement_0_timeWindowIndexCtorSignature.c_str(), + jninewElement_0_timeWindowIndex, newElement_0_timeWindowIndex); + } + jobject newElement_0_dayOfWeek; + std::string newElement_0_dayOfWeekClassName = "java/lang/Integer"; + std::string newElement_0_dayOfWeekCtorSignature = "(I)V"; + jint jninewElement_0_dayOfWeek = static_cast(entry_0.dayOfWeek.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_dayOfWeekClassName.c_str(), + newElement_0_dayOfWeekCtorSignature.c_str(), + jninewElement_0_dayOfWeek, newElement_0_dayOfWeek); + jobject newElement_0_timePeriod; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_timePeriod); + + auto iter_newElement_0_timePeriod_2 = entry_0.timePeriod.begin(); + while (iter_newElement_0_timePeriod_2.Next()) + { + auto & entry_2 = iter_newElement_0_timePeriod_2.GetValue(); + jobject newElement_2; + jobject newElement_2_startHour; + std::string newElement_2_startHourClassName = "java/lang/Integer"; + std::string newElement_2_startHourCtorSignature = "(I)V"; + jint jninewElement_2_startHour = static_cast(entry_2.startHour); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_startHourClassName.c_str(), + newElement_2_startHourCtorSignature.c_str(), + jninewElement_2_startHour, newElement_2_startHour); + jobject newElement_2_startMinute; + std::string newElement_2_startMinuteClassName = "java/lang/Integer"; + std::string newElement_2_startMinuteCtorSignature = "(I)V"; + jint jninewElement_2_startMinute = static_cast(entry_2.startMinute); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_startMinuteClassName.c_str(), newElement_2_startMinuteCtorSignature.c_str(), + jninewElement_2_startMinute, newElement_2_startMinute); + jobject newElement_2_endHour; + std::string newElement_2_endHourClassName = "java/lang/Integer"; + std::string newElement_2_endHourCtorSignature = "(I)V"; + jint jninewElement_2_endHour = static_cast(entry_2.endHour); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_endHourClassName.c_str(), + newElement_2_endHourCtorSignature.c_str(), + jninewElement_2_endHour, newElement_2_endHour); + jobject newElement_2_endMinute; + std::string newElement_2_endMinuteClassName = "java/lang/Integer"; + std::string newElement_2_endMinuteCtorSignature = "(I)V"; + jint jninewElement_2_endMinute = static_cast(entry_2.endMinute); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_endMinuteClassName.c_str(), + newElement_2_endMinuteCtorSignature.c_str(), + jninewElement_2_endMinute, newElement_2_endMinute); + + jclass timePeriodStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ContentControlClusterTimePeriodStruct", + timePeriodStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterTimePeriodStruct"); + return nullptr; + } + + jmethodID timePeriodStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod( + env, timePeriodStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &timePeriodStructStructCtor_3); + if (err != CHIP_NO_ERROR || timePeriodStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterTimePeriodStruct constructor"); + return nullptr; + } + + newElement_2 = + env->NewObject(timePeriodStructStructClass_3, timePeriodStructStructCtor_3, newElement_2_startHour, + newElement_2_startMinute, newElement_2_endHour, newElement_2_endMinute); + chip::JniReferences::GetInstance().AddToList(newElement_0_timePeriod, newElement_2); + } + + jclass timeWindowStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ContentControlClusterTimeWindowStruct", timeWindowStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterTimeWindowStruct"); + return nullptr; + } + + jmethodID timeWindowStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, timeWindowStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &timeWindowStructStructCtor_1); + if (err != CHIP_NO_ERROR || timeWindowStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterTimeWindowStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(timeWindowStructStructClass_1, timeWindowStructStructCtor_1, + newElement_0_timeWindowIndex, newElement_0_dayOfWeek, newElement_0_timePeriod); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 370e510894c121..e2636519e25306 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -7421,60 +7421,88 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & return nullptr; } jobject value_targetList; - chip::JniReferences::GetInstance().CreateArrayList(value_targetList); - - auto iter_value_targetList_0 = cppValue.targetList.begin(); - while (iter_value_targetList_0.Next()) + if (!cppValue.targetList.HasValue()) { - auto & entry_0 = iter_value_targetList_0.GetValue(); - jobject newElement_0; - jobject newElement_0_identifier; - std::string newElement_0_identifierClassName = "java/lang/Integer"; - std::string newElement_0_identifierCtorSignature = "(I)V"; - jint jninewElement_0_identifier = static_cast(entry_0.identifier); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), - newElement_0_identifierCtorSignature.c_str(), - jninewElement_0_identifier, newElement_0_identifier); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - - jclass targetInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", targetInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); - return nullptr; - } + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_targetList); + } + else + { + jobject value_targetListInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(value_targetListInsideOptional); - jmethodID targetInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, targetInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;)V", - &targetInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || targetInfoStructStructCtor_1 == nullptr) + auto iter_value_targetListInsideOptional_1 = cppValue.targetList.Value().begin(); + while (iter_value_targetListInsideOptional_1.Next()) { - ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); - return nullptr; - } + auto & entry_1 = iter_value_targetListInsideOptional_1.GetValue(); + jobject newElement_1; + jobject newElement_1_identifier; + std::string newElement_1_identifierClassName = "java/lang/Integer"; + std::string newElement_1_identifierCtorSignature = "(I)V"; + jint jninewElement_1_identifier = static_cast(entry_1.identifier); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_identifierClassName.c_str(), + newElement_1_identifierCtorSignature.c_str(), + jninewElement_1_identifier, newElement_1_identifier); + jobject newElement_1_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.name, newElement_1_name)); + + jclass targetInfoStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", + targetInfoStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); + return nullptr; + } - newElement_0 = env->NewObject(targetInfoStructStructClass_1, targetInfoStructStructCtor_1, newElement_0_identifier, - newElement_0_name); - chip::JniReferences::GetInstance().AddToList(value_targetList, newElement_0); + jmethodID targetInfoStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, targetInfoStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/String;)V", + &targetInfoStructStructCtor_2); + if (err != CHIP_NO_ERROR || targetInfoStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); + return nullptr; + } + + newElement_1 = env->NewObject(targetInfoStructStructClass_2, targetInfoStructStructCtor_2, + newElement_1_identifier, newElement_1_name); + chip::JniReferences::GetInstance().AddToList(value_targetListInsideOptional, newElement_1); + } + chip::JniReferences::GetInstance().CreateOptional(value_targetListInsideOptional, value_targetList); } jobject value_currentTarget; - std::string value_currentTargetClassName = "java/lang/Integer"; - std::string value_currentTargetCtorSignature = "(I)V"; - jint jnivalue_currentTarget = static_cast(cppValue.currentTarget); - chip::JniReferences::GetInstance().CreateBoxedObject(value_currentTargetClassName.c_str(), - value_currentTargetCtorSignature.c_str(), - jnivalue_currentTarget, value_currentTarget); + if (!cppValue.currentTarget.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_currentTarget); + } + else + { + jobject value_currentTargetInsideOptional; + std::string value_currentTargetInsideOptionalClassName = "java/lang/Integer"; + std::string value_currentTargetInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_currentTargetInsideOptional = static_cast(cppValue.currentTarget.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_currentTargetInsideOptionalClassName.c_str(), value_currentTargetInsideOptionalCtorSignature.c_str(), + jnivalue_currentTargetInsideOptional, value_currentTargetInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_currentTargetInsideOptional, value_currentTarget); + } jobject value_data; - jbyteArray value_dataByteArray = env->NewByteArray(static_cast(cppValue.data.size())); - env->SetByteArrayRegion(value_dataByteArray, 0, static_cast(cppValue.data.size()), - reinterpret_cast(cppValue.data.data())); - value_data = value_dataByteArray; + if (!cppValue.data.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_data); + } + else + { + jobject value_dataInsideOptional; + jbyteArray value_dataInsideOptionalByteArray = env->NewByteArray(static_cast(cppValue.data.Value().size())); + env->SetByteArrayRegion(value_dataInsideOptionalByteArray, 0, static_cast(cppValue.data.Value().size()), + reinterpret_cast(cppValue.data.Value().data())); + value_dataInsideOptional = value_dataInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(value_dataInsideOptional, value_data); + } jclass targetUpdatedStructClass; err = chip::JniReferences::GetInstance().GetLocalClassRef( @@ -7486,8 +7514,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } jmethodID targetUpdatedStructCtor; - err = chip::JniReferences::GetInstance().FindMethod( - env, targetUpdatedStructClass, "", "(Ljava/util/ArrayList;Ljava/lang/Integer;[B)V", &targetUpdatedStructCtor); + err = chip::JniReferences::GetInstance().FindMethod(env, targetUpdatedStructClass, "", + "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &targetUpdatedStructCtor); if (err != CHIP_NO_ERROR || targetUpdatedStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipEventStructs$TargetNavigatorClusterTargetUpdatedEvent constructor"); @@ -7525,88 +7554,149 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jnivalue_currentState, value_currentState); jobject value_startTime; - std::string value_startTimeClassName = "java/lang/Long"; - std::string value_startTimeCtorSignature = "(J)V"; - jlong jnivalue_startTime = static_cast(cppValue.startTime); - chip::JniReferences::GetInstance().CreateBoxedObject( - value_startTimeClassName.c_str(), value_startTimeCtorSignature.c_str(), jnivalue_startTime, value_startTime); - - jobject value_duration; - std::string value_durationClassName = "java/lang/Long"; - std::string value_durationCtorSignature = "(J)V"; - jlong jnivalue_duration = static_cast(cppValue.duration); - chip::JniReferences::GetInstance().CreateBoxedObject( - value_durationClassName.c_str(), value_durationCtorSignature.c_str(), jnivalue_duration, value_duration); - - jobject value_sampledPosition; - jobject value_sampledPosition_updatedAt; - std::string value_sampledPosition_updatedAtClassName = "java/lang/Long"; - std::string value_sampledPosition_updatedAtCtorSignature = "(J)V"; - jlong jnivalue_sampledPosition_updatedAt = static_cast(cppValue.sampledPosition.updatedAt); - chip::JniReferences::GetInstance().CreateBoxedObject( - value_sampledPosition_updatedAtClassName.c_str(), value_sampledPosition_updatedAtCtorSignature.c_str(), - jnivalue_sampledPosition_updatedAt, value_sampledPosition_updatedAt); - jobject value_sampledPosition_position; - if (cppValue.sampledPosition.position.IsNull()) + if (!cppValue.startTime.HasValue()) { - value_sampledPosition_position = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startTime); } else { - std::string value_sampledPosition_positionClassName = "java/lang/Long"; - std::string value_sampledPosition_positionCtorSignature = "(J)V"; - jlong jnivalue_sampledPosition_position = static_cast(cppValue.sampledPosition.position.Value()); + jobject value_startTimeInsideOptional; + std::string value_startTimeInsideOptionalClassName = "java/lang/Long"; + std::string value_startTimeInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_startTimeInsideOptional = static_cast(cppValue.startTime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( - value_sampledPosition_positionClassName.c_str(), value_sampledPosition_positionCtorSignature.c_str(), - jnivalue_sampledPosition_position, value_sampledPosition_position); + value_startTimeInsideOptionalClassName.c_str(), value_startTimeInsideOptionalCtorSignature.c_str(), + jnivalue_startTimeInsideOptional, value_startTimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_startTimeInsideOptional, value_startTime); } - jclass playbackPositionStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterPlaybackPositionStruct", - playbackPositionStructStructClass_0); - if (err != CHIP_NO_ERROR) + jobject value_duration; + if (!cppValue.duration.HasValue()) { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterPlaybackPositionStruct"); - return nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_duration); + } + else + { + jobject value_durationInsideOptional; + std::string value_durationInsideOptionalClassName = "java/lang/Long"; + std::string value_durationInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_durationInsideOptional = static_cast(cppValue.duration.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_durationInsideOptionalClassName.c_str(), value_durationInsideOptionalCtorSignature.c_str(), + jnivalue_durationInsideOptional, value_durationInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_durationInsideOptional, value_duration); } - jmethodID playbackPositionStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, playbackPositionStructStructClass_0, "", - "(Ljava/lang/Long;Ljava/lang/Long;)V", - &playbackPositionStructStructCtor_0); - if (err != CHIP_NO_ERROR || playbackPositionStructStructCtor_0 == nullptr) + jobject value_sampledPosition; + if (!cppValue.sampledPosition.HasValue()) { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterPlaybackPositionStruct constructor"); - return nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_sampledPosition); } + else + { + jobject value_sampledPositionInsideOptional; + jobject value_sampledPositionInsideOptional_updatedAt; + std::string value_sampledPositionInsideOptional_updatedAtClassName = "java/lang/Long"; + std::string value_sampledPositionInsideOptional_updatedAtCtorSignature = "(J)V"; + jlong jnivalue_sampledPositionInsideOptional_updatedAt = + static_cast(cppValue.sampledPosition.Value().updatedAt); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_sampledPositionInsideOptional_updatedAtClassName.c_str(), + value_sampledPositionInsideOptional_updatedAtCtorSignature.c_str(), + jnivalue_sampledPositionInsideOptional_updatedAt, value_sampledPositionInsideOptional_updatedAt); + jobject value_sampledPositionInsideOptional_position; + if (cppValue.sampledPosition.Value().position.IsNull()) + { + value_sampledPositionInsideOptional_position = nullptr; + } + else + { + std::string value_sampledPositionInsideOptional_positionClassName = "java/lang/Long"; + std::string value_sampledPositionInsideOptional_positionCtorSignature = "(J)V"; + jlong jnivalue_sampledPositionInsideOptional_position = + static_cast(cppValue.sampledPosition.Value().position.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_sampledPositionInsideOptional_positionClassName.c_str(), + value_sampledPositionInsideOptional_positionCtorSignature.c_str(), + jnivalue_sampledPositionInsideOptional_position, value_sampledPositionInsideOptional_position); + } - value_sampledPosition = env->NewObject(playbackPositionStructStructClass_0, playbackPositionStructStructCtor_0, - value_sampledPosition_updatedAt, value_sampledPosition_position); + jclass playbackPositionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterPlaybackPositionStruct", + playbackPositionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterPlaybackPositionStruct"); + return nullptr; + } + + jmethodID playbackPositionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, playbackPositionStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Long;)V", + &playbackPositionStructStructCtor_1); + if (err != CHIP_NO_ERROR || playbackPositionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterPlaybackPositionStruct constructor"); + return nullptr; + } + + value_sampledPositionInsideOptional = + env->NewObject(playbackPositionStructStructClass_1, playbackPositionStructStructCtor_1, + value_sampledPositionInsideOptional_updatedAt, value_sampledPositionInsideOptional_position); + chip::JniReferences::GetInstance().CreateOptional(value_sampledPositionInsideOptional, value_sampledPosition); + } jobject value_playbackSpeed; - std::string value_playbackSpeedClassName = "java/lang/Float"; - std::string value_playbackSpeedCtorSignature = "(F)V"; - jfloat jnivalue_playbackSpeed = static_cast(cppValue.playbackSpeed); - chip::JniReferences::GetInstance().CreateBoxedObject(value_playbackSpeedClassName.c_str(), - value_playbackSpeedCtorSignature.c_str(), - jnivalue_playbackSpeed, value_playbackSpeed); + if (!cppValue.playbackSpeed.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_playbackSpeed); + } + else + { + jobject value_playbackSpeedInsideOptional; + std::string value_playbackSpeedInsideOptionalClassName = "java/lang/Float"; + std::string value_playbackSpeedInsideOptionalCtorSignature = "(F)V"; + jfloat jnivalue_playbackSpeedInsideOptional = static_cast(cppValue.playbackSpeed.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_playbackSpeedInsideOptionalClassName.c_str(), value_playbackSpeedInsideOptionalCtorSignature.c_str(), + jnivalue_playbackSpeedInsideOptional, value_playbackSpeedInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_playbackSpeedInsideOptional, value_playbackSpeed); + } jobject value_seekRangeEnd; - std::string value_seekRangeEndClassName = "java/lang/Long"; - std::string value_seekRangeEndCtorSignature = "(J)V"; - jlong jnivalue_seekRangeEnd = static_cast(cppValue.seekRangeEnd); - chip::JniReferences::GetInstance().CreateBoxedObject(value_seekRangeEndClassName.c_str(), - value_seekRangeEndCtorSignature.c_str(), - jnivalue_seekRangeEnd, value_seekRangeEnd); + if (!cppValue.seekRangeEnd.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_seekRangeEnd); + } + else + { + jobject value_seekRangeEndInsideOptional; + std::string value_seekRangeEndInsideOptionalClassName = "java/lang/Long"; + std::string value_seekRangeEndInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_seekRangeEndInsideOptional = static_cast(cppValue.seekRangeEnd.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_seekRangeEndInsideOptionalClassName.c_str(), value_seekRangeEndInsideOptionalCtorSignature.c_str(), + jnivalue_seekRangeEndInsideOptional, value_seekRangeEndInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_seekRangeEndInsideOptional, value_seekRangeEnd); + } jobject value_seekRangeStart; - std::string value_seekRangeStartClassName = "java/lang/Long"; - std::string value_seekRangeStartCtorSignature = "(J)V"; - jlong jnivalue_seekRangeStart = static_cast(cppValue.seekRangeStart); - chip::JniReferences::GetInstance().CreateBoxedObject(value_seekRangeStartClassName.c_str(), - value_seekRangeStartCtorSignature.c_str(), - jnivalue_seekRangeStart, value_seekRangeStart); + if (!cppValue.seekRangeStart.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_seekRangeStart); + } + else + { + jobject value_seekRangeStartInsideOptional; + std::string value_seekRangeStartInsideOptionalClassName = "java/lang/Long"; + std::string value_seekRangeStartInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_seekRangeStartInsideOptional = static_cast(cppValue.seekRangeStart.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_seekRangeStartInsideOptionalClassName.c_str(), value_seekRangeStartInsideOptionalCtorSignature.c_str(), + jnivalue_seekRangeStartInsideOptional, value_seekRangeStartInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_seekRangeStartInsideOptional, value_seekRangeStart); + } jobject value_data; if (!cppValue.data.HasValue()) @@ -7624,12 +7714,23 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } jobject value_audioAdvanceUnmuted; - std::string value_audioAdvanceUnmutedClassName = "java/lang/Boolean"; - std::string value_audioAdvanceUnmutedCtorSignature = "(Z)V"; - jboolean jnivalue_audioAdvanceUnmuted = static_cast(cppValue.audioAdvanceUnmuted); - chip::JniReferences::GetInstance().CreateBoxedObject(value_audioAdvanceUnmutedClassName.c_str(), - value_audioAdvanceUnmutedCtorSignature.c_str(), - jnivalue_audioAdvanceUnmuted, value_audioAdvanceUnmuted); + if (!cppValue.audioAdvanceUnmuted.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_audioAdvanceUnmuted); + } + else + { + jobject value_audioAdvanceUnmutedInsideOptional; + std::string value_audioAdvanceUnmutedInsideOptionalClassName = "java/lang/Boolean"; + std::string value_audioAdvanceUnmutedInsideOptionalCtorSignature = "(Z)V"; + jboolean jnivalue_audioAdvanceUnmutedInsideOptional = static_cast(cppValue.audioAdvanceUnmuted.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_audioAdvanceUnmutedInsideOptionalClassName.c_str(), + value_audioAdvanceUnmutedInsideOptionalCtorSignature.c_str(), jnivalue_audioAdvanceUnmutedInsideOptional, + value_audioAdvanceUnmutedInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_audioAdvanceUnmutedInsideOptional, + value_audioAdvanceUnmuted); + } jclass stateChangedStructClass; err = chip::JniReferences::GetInstance().GetLocalClassRef( @@ -7643,9 +7744,8 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jmethodID stateChangedStructCtor; err = chip::JniReferences::GetInstance().FindMethod( env, stateChangedStructClass, "", - "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Lchip/devicecontroller/" - "ChipStructs$MediaPlaybackClusterPlaybackPositionStruct;Ljava/lang/Float;Ljava/lang/Long;Ljava/lang/Long;Ljava/" - "util/Optional;Ljava/lang/Boolean;)V", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &stateChangedStructCtor); if (err != CHIP_NO_ERROR || stateChangedStructCtor == nullptr) { @@ -7763,6 +7863,14 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & chip::JniReferences::GetInstance().CreateOptional(value_nodeInsideOptional, value_node); } + jobject value_fabricIndex; + std::string value_fabricIndexClassName = "java/lang/Integer"; + std::string value_fabricIndexCtorSignature = "(I)V"; + jint jnivalue_fabricIndex = static_cast(cppValue.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), jnivalue_fabricIndex, + value_fabricIndex); + jclass loggedOutStructClass; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipEventStructs$AccountLoginClusterLoggedOutEvent", loggedOutStructClass); @@ -7773,15 +7881,15 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } jmethodID loggedOutStructCtor; - err = chip::JniReferences::GetInstance().FindMethod(env, loggedOutStructClass, "", "(Ljava/util/Optional;)V", - &loggedOutStructCtor); + err = chip::JniReferences::GetInstance().FindMethod(env, loggedOutStructClass, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", &loggedOutStructCtor); if (err != CHIP_NO_ERROR || loggedOutStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipEventStructs$AccountLoginClusterLoggedOutEvent constructor"); return nullptr; } - jobject value = env->NewObject(loggedOutStructClass, loggedOutStructCtor, value_node); + jobject value = env->NewObject(loggedOutStructClass, loggedOutStructCtor, value_node, value_fabricIndex); return value; } @@ -7826,6 +7934,37 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & return value; } + case Events::EnteringBlockContentTimeWindow::Id: { + Events::EnteringBlockContentTimeWindow::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jclass enteringBlockContentTimeWindowStructClass; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipEventStructs$ContentControlClusterEnteringBlockContentTimeWindowEvent", + enteringBlockContentTimeWindowStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$ContentControlClusterEnteringBlockContentTimeWindowEvent"); + return nullptr; + } + + jmethodID enteringBlockContentTimeWindowStructCtor; + err = chip::JniReferences::GetInstance().FindMethod(env, enteringBlockContentTimeWindowStructClass, "", "()V", + &enteringBlockContentTimeWindowStructCtor); + if (err != CHIP_NO_ERROR || enteringBlockContentTimeWindowStructCtor == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipEventStructs$ContentControlClusterEnteringBlockContentTimeWindowEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(enteringBlockContentTimeWindowStructClass, enteringBlockContentTimeWindowStructCtor); + + return value; + } default: *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; break; diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 3bc715829f27db..f014871f8c9513 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -12180,6 +12180,7 @@ class ChipClusters: "contentURL": "str", "displayString": "str", "brandingInformation": "BrandingInformationStruct", + "playbackPreferences": "PlaybackPreferencesStruct", }, }, }, @@ -12613,6 +12614,48 @@ class ChipClusters: "rating": "str", }, }, + 0x0000000B: { + "commandId": 0x0000000B, + "commandName": "AddBlockChannels", + "args": { + "channels": "BlockChannelStruct", + }, + }, + 0x0000000C: { + "commandId": 0x0000000C, + "commandName": "RemoveBlockChannels", + "args": { + "channelIndexes": "int", + }, + }, + 0x0000000D: { + "commandId": 0x0000000D, + "commandName": "AddBlockApplications", + "args": { + "applications": "AppInfoStruct", + }, + }, + 0x0000000E: { + "commandId": 0x0000000E, + "commandName": "RemoveBlockApplications", + "args": { + "applications": "AppInfoStruct", + }, + }, + 0x0000000F: { + "commandId": 0x0000000F, + "commandName": "SetBlockContentTimeWindow", + "args": { + "timeWindow": "TimeWindowStruct", + }, + }, + 0x00000010: { + "commandId": 0x00000010, + "commandName": "RemoveBlockContentTimeWindow", + "args": { + "timeWindowIndexes": "int", + }, + }, }, "attributes": { 0x00000000: { @@ -12663,6 +12706,24 @@ class ChipClusters: "type": "bool", "reportable": True, }, + 0x00000008: { + "attributeName": "BlockChannelList", + "attributeId": 0x00000008, + "type": "", + "reportable": True, + }, + 0x00000009: { + "attributeName": "BlockApplicationList", + "attributeId": 0x00000009, + "type": "", + "reportable": True, + }, + 0x0000000A: { + "attributeName": "BlockContentTimeWindow", + "attributeId": 0x0000000A, + "type": "", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index cd411b93d43301..80d622f8d78856 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -40459,6 +40459,19 @@ class RecordingFlagBitmap(IntFlag): kRecorded = 0x4 class Structs: + @dataclass + class AdditionalInfoStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="name", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=str), + ]) + + name: 'str' = "" + value: 'str' = "" + @dataclass class ProgramCastStruct(ClusterObject): @ChipUtility.classproperty @@ -40545,7 +40558,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="seriesInfo", Tag=15, Type=typing.Union[None, Nullable, Channel.Structs.SeriesInfoStruct]), ClusterObjectFieldDescriptor(Label="categoryList", Tag=16, Type=typing.Optional[typing.List[Channel.Structs.ProgramCategoryStruct]]), ClusterObjectFieldDescriptor(Label="castList", Tag=17, Type=typing.Optional[typing.List[Channel.Structs.ProgramCastStruct]]), - ClusterObjectFieldDescriptor(Label="externalIDList", Tag=18, Type=typing.Optional[typing.List[Channel.Structs.ProgramCastStruct]]), + ClusterObjectFieldDescriptor(Label="externalIDList", Tag=18, Type=typing.Optional[typing.List[Channel.Structs.AdditionalInfoStruct]]), ]) identifier: 'str' = "" @@ -40566,7 +40579,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: seriesInfo: 'typing.Union[None, Nullable, Channel.Structs.SeriesInfoStruct]' = None categoryList: 'typing.Optional[typing.List[Channel.Structs.ProgramCategoryStruct]]' = None castList: 'typing.Optional[typing.List[Channel.Structs.ProgramCastStruct]]' = None - externalIDList: 'typing.Optional[typing.List[Channel.Structs.ProgramCastStruct]]' = None + externalIDList: 'typing.Optional[typing.List[Channel.Structs.AdditionalInfoStruct]]' = None @dataclass class PageTokenStruct(ClusterObject): @@ -40596,19 +40609,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: previousToken: 'typing.Union[None, Nullable, Channel.Structs.PageTokenStruct]' = None nextToken: 'typing.Union[None, Nullable, Channel.Structs.PageTokenStruct]' = None - @dataclass - class AdditionalInfoStruct(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="name", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=str), - ]) - - name: 'str' = "" - value: 'str' = "" - @dataclass class LineupInfoStruct(ClusterObject): @ChipUtility.classproperty @@ -40706,20 +40706,20 @@ class GetProgramGuide(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="startTime", Tag=0, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="endTime", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="startTime", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="endTime", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="channelList", Tag=2, Type=typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]), - ClusterObjectFieldDescriptor(Label="pageToken", Tag=3, Type=typing.Optional[Channel.Structs.PageTokenStruct]), - ClusterObjectFieldDescriptor(Label="recordingFlag", Tag=4, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="pageToken", Tag=3, Type=typing.Union[None, Nullable, Channel.Structs.PageTokenStruct]), + ClusterObjectFieldDescriptor(Label="recordingFlag", Tag=4, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="externalIDList", Tag=5, Type=typing.Optional[typing.List[Channel.Structs.AdditionalInfoStruct]]), ClusterObjectFieldDescriptor(Label="data", Tag=6, Type=typing.Optional[bytes]), ]) - startTime: 'typing.Optional[uint]' = None - endTime: 'typing.Optional[uint]' = None + startTime: 'uint' = 0 + endTime: 'uint' = 0 channelList: 'typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]' = None - pageToken: 'typing.Optional[Channel.Structs.PageTokenStruct]' = None - recordingFlag: 'typing.Optional[uint]' = None + pageToken: 'typing.Union[None, Nullable, Channel.Structs.PageTokenStruct]' = None + recordingFlag: 'typing.Union[None, Nullable, uint]' = None externalIDList: 'typing.Optional[typing.List[Channel.Structs.AdditionalInfoStruct]]' = None data: 'typing.Optional[bytes]' = None @@ -40754,14 +40754,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="programIdentifier", Tag=0, Type=str), ClusterObjectFieldDescriptor(Label="shouldRecordSeries", Tag=1, Type=bool), - ClusterObjectFieldDescriptor(Label="externalIDList", Tag=2, Type=typing.List[Channel.Structs.AdditionalInfoStruct]), - ClusterObjectFieldDescriptor(Label="data", Tag=3, Type=bytes), + ClusterObjectFieldDescriptor(Label="externalIDList", Tag=2, Type=typing.Optional[typing.List[Channel.Structs.AdditionalInfoStruct]]), + ClusterObjectFieldDescriptor(Label="data", Tag=3, Type=typing.Optional[bytes]), ]) programIdentifier: 'str' = "" shouldRecordSeries: 'bool' = False - externalIDList: 'typing.List[Channel.Structs.AdditionalInfoStruct]' = field(default_factory=lambda: []) - data: 'bytes' = b"" + externalIDList: 'typing.Optional[typing.List[Channel.Structs.AdditionalInfoStruct]]' = None + data: 'typing.Optional[bytes]' = None @dataclass class CancelRecordProgram(ClusterCommand): @@ -40776,14 +40776,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="programIdentifier", Tag=0, Type=str), ClusterObjectFieldDescriptor(Label="shouldRecordSeries", Tag=1, Type=bool), - ClusterObjectFieldDescriptor(Label="externalIDList", Tag=2, Type=typing.List[Channel.Structs.AdditionalInfoStruct]), - ClusterObjectFieldDescriptor(Label="data", Tag=3, Type=bytes), + ClusterObjectFieldDescriptor(Label="externalIDList", Tag=2, Type=typing.Optional[typing.List[Channel.Structs.AdditionalInfoStruct]]), + ClusterObjectFieldDescriptor(Label="data", Tag=3, Type=typing.Optional[bytes]), ]) programIdentifier: 'str' = "" shouldRecordSeries: 'bool' = False - externalIDList: 'typing.List[Channel.Structs.AdditionalInfoStruct]' = field(default_factory=lambda: []) - data: 'bytes' = b"" + externalIDList: 'typing.Optional[typing.List[Channel.Structs.AdditionalInfoStruct]]' = None + data: 'typing.Optional[bytes]' = None class Attributes: @dataclass @@ -41164,14 +41164,14 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="targetList", Tag=0, Type=typing.List[TargetNavigator.Structs.TargetInfoStruct]), - ClusterObjectFieldDescriptor(Label="currentTarget", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="data", Tag=2, Type=bytes), + ClusterObjectFieldDescriptor(Label="targetList", Tag=0, Type=typing.Optional[typing.List[TargetNavigator.Structs.TargetInfoStruct]]), + ClusterObjectFieldDescriptor(Label="currentTarget", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="data", Tag=2, Type=typing.Optional[bytes]), ]) - targetList: 'typing.List[TargetNavigator.Structs.TargetInfoStruct]' = field(default_factory=lambda: []) - currentTarget: 'uint' = 0 - data: 'bytes' = b"" + targetList: 'typing.Optional[typing.List[TargetNavigator.Structs.TargetInfoStruct]]' = None + currentTarget: 'typing.Optional[uint]' = None + data: 'typing.Optional[bytes]' = None @dataclass @@ -41285,10 +41285,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="languageCode", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="displayName", Tag=1, Type=typing.Union[None, Nullable, str]), + ClusterObjectFieldDescriptor(Label="characteristics", Tag=1, Type=typing.Union[None, Nullable, typing.List[MediaPlayback.Enums.CharacteristicEnum]]), + ClusterObjectFieldDescriptor(Label="displayName", Tag=2, Type=typing.Union[None, Nullable, str]), ]) languageCode: 'str' = "" + characteristics: 'typing.Union[None, Nullable, typing.List[MediaPlayback.Enums.CharacteristicEnum]]' = None displayName: 'typing.Union[None, Nullable, str]' = None @dataclass @@ -41298,11 +41300,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="id", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="trackAttributes", Tag=1, Type=typing.Union[Nullable, MediaPlayback.Structs.TrackAttributesStruct]), + ClusterObjectFieldDescriptor(Label="trackAttributes", Tag=1, Type=MediaPlayback.Structs.TrackAttributesStruct), ]) id: 'str' = "" - trackAttributes: 'typing.Union[Nullable, MediaPlayback.Structs.TrackAttributesStruct]' = NullValue + trackAttributes: 'MediaPlayback.Structs.TrackAttributesStruct' = field(default_factory=lambda: MediaPlayback.Structs.TrackAttributesStruct()) @dataclass class PlaybackPositionStruct(ClusterObject): @@ -41506,11 +41508,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="trackID", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="audioOutputIndex", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="audioOutputIndex", Tag=1, Type=typing.Union[None, Nullable, uint]), ]) trackID: 'str' = "" - audioOutputIndex: 'uint' = 0 + audioOutputIndex: 'typing.Union[None, Nullable, uint]' = None @dataclass class ActivateTextTrack(ClusterCommand): @@ -41830,25 +41832,25 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="currentState", Tag=0, Type=MediaPlayback.Enums.PlaybackStateEnum), - ClusterObjectFieldDescriptor(Label="startTime", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="sampledPosition", Tag=3, Type=MediaPlayback.Structs.PlaybackPositionStruct), - ClusterObjectFieldDescriptor(Label="playbackSpeed", Tag=4, Type=float32), - ClusterObjectFieldDescriptor(Label="seekRangeEnd", Tag=5, Type=uint), - ClusterObjectFieldDescriptor(Label="seekRangeStart", Tag=6, Type=uint), + ClusterObjectFieldDescriptor(Label="startTime", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="sampledPosition", Tag=3, Type=typing.Optional[MediaPlayback.Structs.PlaybackPositionStruct]), + ClusterObjectFieldDescriptor(Label="playbackSpeed", Tag=4, Type=typing.Optional[float32]), + ClusterObjectFieldDescriptor(Label="seekRangeEnd", Tag=5, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="seekRangeStart", Tag=6, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="data", Tag=7, Type=typing.Optional[bytes]), - ClusterObjectFieldDescriptor(Label="audioAdvanceUnmuted", Tag=8, Type=bool), + ClusterObjectFieldDescriptor(Label="audioAdvanceUnmuted", Tag=8, Type=typing.Optional[bool]), ]) currentState: 'MediaPlayback.Enums.PlaybackStateEnum' = 0 - startTime: 'uint' = 0 - duration: 'uint' = 0 - sampledPosition: 'MediaPlayback.Structs.PlaybackPositionStruct' = field(default_factory=lambda: MediaPlayback.Structs.PlaybackPositionStruct()) - playbackSpeed: 'float32' = 0.0 - seekRangeEnd: 'uint' = 0 - seekRangeStart: 'uint' = 0 + startTime: 'typing.Optional[uint]' = None + duration: 'typing.Optional[uint]' = None + sampledPosition: 'typing.Optional[MediaPlayback.Structs.PlaybackPositionStruct]' = None + playbackSpeed: 'typing.Optional[float32]' = None + seekRangeEnd: 'typing.Optional[uint]' = None + seekRangeStart: 'typing.Optional[uint]' = None data: 'typing.Optional[bytes]' = None - audioAdvanceUnmuted: 'bool' = False + audioAdvanceUnmuted: 'typing.Optional[bool]' = None @dataclass @@ -42612,9 +42614,9 @@ class Bitmaps: class Feature(IntFlag): kContentSearch = 0x1 kURLPlayback = 0x2 - kAdvancedSeek = 0x3 - kTextTracks = 0x4 - kAudioTracks = 0x5 + kAdvancedSeek = 0x4 + kTextTracks = 0x8 + kAudioTracks = 0x10 class SupportedProtocolsBitmap(IntFlag): kDash = 0x1 @@ -42643,13 +42645,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="languageCode", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="characteristics", Tag=1, Type=typing.Optional[typing.List[ContentLauncher.Enums.CharacteristicEnum]]), - ClusterObjectFieldDescriptor(Label="audioOutputIndex", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="characteristics", Tag=1, Type=typing.Union[None, Nullable, typing.List[ContentLauncher.Enums.CharacteristicEnum]]), + ClusterObjectFieldDescriptor(Label="audioOutputIndex", Tag=2, Type=typing.Union[None, Nullable, uint]), ]) languageCode: 'str' = "" - characteristics: 'typing.Optional[typing.List[ContentLauncher.Enums.CharacteristicEnum]]' = None - audioOutputIndex: 'uint' = 0 + characteristics: 'typing.Union[None, Nullable, typing.List[ContentLauncher.Enums.CharacteristicEnum]]' = None + audioOutputIndex: 'typing.Union[None, Nullable, uint]' = None @dataclass class PlaybackPreferencesStruct(ClusterObject): @@ -42657,14 +42659,14 @@ class PlaybackPreferencesStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="playbackPosition", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="textTrack", Tag=1, Type=ContentLauncher.Structs.TrackPreferenceStruct), - ClusterObjectFieldDescriptor(Label="audioTracks", Tag=2, Type=typing.Optional[typing.List[ContentLauncher.Structs.TrackPreferenceStruct]]), + ClusterObjectFieldDescriptor(Label="playbackPosition", Tag=0, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="textTrack", Tag=1, Type=typing.Union[None, Nullable, ContentLauncher.Structs.TrackPreferenceStruct]), + ClusterObjectFieldDescriptor(Label="audioTracks", Tag=2, Type=typing.Union[None, Nullable, typing.List[ContentLauncher.Structs.TrackPreferenceStruct]]), ]) - playbackPosition: 'uint' = 0 - textTrack: 'ContentLauncher.Structs.TrackPreferenceStruct' = field(default_factory=lambda: ContentLauncher.Structs.TrackPreferenceStruct()) - audioTracks: 'typing.Optional[typing.List[ContentLauncher.Structs.TrackPreferenceStruct]]' = None + playbackPosition: 'typing.Union[None, Nullable, uint]' = None + textTrack: 'typing.Union[None, Nullable, ContentLauncher.Structs.TrackPreferenceStruct]' = None + audioTracks: 'typing.Union[None, Nullable, typing.List[ContentLauncher.Structs.TrackPreferenceStruct]]' = None @dataclass class AdditionalInfoStruct(ClusterObject): @@ -42780,11 +42782,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="contentURL", Tag=0, Type=str), ClusterObjectFieldDescriptor(Label="displayString", Tag=1, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="brandingInformation", Tag=2, Type=typing.Optional[ContentLauncher.Structs.BrandingInformationStruct]), + ClusterObjectFieldDescriptor(Label="playbackPreferences", Tag=3, Type=typing.Optional[ContentLauncher.Structs.PlaybackPreferencesStruct]), ]) contentURL: 'str' = "" displayString: 'typing.Optional[str]' = None brandingInformation: 'typing.Optional[ContentLauncher.Structs.BrandingInformationStruct]' = None + playbackPreferences: 'typing.Optional[ContentLauncher.Structs.PlaybackPreferencesStruct]' = None @dataclass class LauncherResponse(ClusterCommand): @@ -43936,9 +43940,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="node", Tag=0, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) node: 'typing.Optional[uint]' = None + fabricIndex: 'uint' = 0 @dataclass @@ -43956,7 +43962,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="scheduledContentRatingThreshold", Tag=0x00000004, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="screenDailyTime", Tag=0x00000005, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="remainingScreenTime", Tag=0x00000006, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="blockUnrated", Tag=0x00000007, Type=bool), + ClusterObjectFieldDescriptor(Label="blockUnrated", Tag=0x00000007, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="blockChannelList", Tag=0x00000008, Type=typing.Optional[typing.List[ContentControl.Structs.BlockChannelStruct]]), + ClusterObjectFieldDescriptor(Label="blockApplicationList", Tag=0x00000009, Type=typing.Optional[typing.List[ContentControl.Structs.AppInfoStruct]]), + ClusterObjectFieldDescriptor(Label="blockContentTimeWindow", Tag=0x0000000A, Type=typing.Optional[typing.List[ContentControl.Structs.TimeWindowStruct]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -43972,7 +43981,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: scheduledContentRatingThreshold: 'typing.Optional[str]' = None screenDailyTime: 'typing.Optional[uint]' = None remainingScreenTime: 'typing.Optional[uint]' = None - blockUnrated: 'bool' = None + blockUnrated: 'typing.Optional[bool]' = None + blockChannelList: 'typing.Optional[typing.List[ContentControl.Structs.BlockChannelStruct]]' = None + blockApplicationList: 'typing.Optional[typing.List[ContentControl.Structs.AppInfoStruct]]' = None + blockContentTimeWindow: 'typing.Optional[typing.List[ContentControl.Structs.TimeWindowStruct]]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -43981,6 +43993,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Bitmaps: + class DayOfWeekBitmap(IntFlag): + kSunday = 0x1 + kMonday = 0x2 + kTuesday = 0x4 + kWednesday = 0x8 + kThursday = 0x10 + kFriday = 0x20 + kSaturday = 0x40 + class Feature(IntFlag): kScreenTime = 0x1 kPINManagement = 0x2 @@ -43989,6 +44010,68 @@ class Feature(IntFlag): kScheduledContentRating = 0x10 class Structs: + @dataclass + class TimePeriodStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="startHour", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="startMinute", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="endHour", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="endMinute", Tag=3, Type=uint), + ]) + + startHour: 'uint' = 0 + startMinute: 'uint' = 0 + endHour: 'uint' = 0 + endMinute: 'uint' = 0 + + @dataclass + class TimeWindowStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="timeWindowIndex", Tag=0, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="dayOfWeek", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="timePeriod", Tag=2, Type=typing.List[ContentControl.Structs.TimePeriodStruct]), + ]) + + timeWindowIndex: 'typing.Union[Nullable, uint]' = NullValue + dayOfWeek: 'uint' = 0 + timePeriod: 'typing.List[ContentControl.Structs.TimePeriodStruct]' = field(default_factory=lambda: []) + + @dataclass + class AppInfoStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="catalogVendorID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="applicationID", Tag=1, Type=str), + ]) + + catalogVendorID: 'uint' = 0 + applicationID: 'str' = "" + + @dataclass + class BlockChannelStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="blockChannelIndex", Tag=0, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="majorNumber", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="minorNumber", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="identifier", Tag=3, Type=typing.Optional[str]), + ]) + + blockChannelIndex: 'typing.Union[Nullable, uint]' = NullValue + majorNumber: 'uint' = 0 + minorNumber: 'uint' = 0 + identifier: 'typing.Optional[str]' = None + @dataclass class RatingNameStruct(ClusterObject): @ChipUtility.classproperty @@ -44014,11 +44097,15 @@ class UpdatePIN(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="oldPIN", Tag=0, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="oldPIN", Tag=0, Type=str), ClusterObjectFieldDescriptor(Label="newPIN", Tag=1, Type=str), ]) - oldPIN: 'typing.Optional[str]' = None + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + oldPIN: 'str' = "" newPIN: 'str' = "" @dataclass @@ -44034,6 +44121,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ]) + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + @dataclass class ResetPINResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050F @@ -44063,6 +44154,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ]) + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + @dataclass class Disable(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050F @@ -44076,6 +44171,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ]) + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + @dataclass class AddBonusTime(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050F @@ -44088,11 +44187,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="PINCode", Tag=0, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="bonusTime", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="bonusTime", Tag=1, Type=uint), ]) PINCode: 'typing.Optional[str]' = None - bonusTime: 'typing.Optional[uint]' = None + bonusTime: 'uint' = 0 @dataclass class SetScreenDailyTime(ClusterCommand): @@ -44168,6 +44267,102 @@ def descriptor(cls) -> ClusterObjectDescriptor: rating: 'str' = "" + @dataclass + class AddBlockChannels(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x0000000B + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="channels", Tag=0, Type=typing.List[ContentControl.Structs.BlockChannelStruct]), + ]) + + channels: 'typing.List[ContentControl.Structs.BlockChannelStruct]' = field(default_factory=lambda: []) + + @dataclass + class RemoveBlockChannels(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x0000000C + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="channelIndexes", Tag=0, Type=typing.List[uint]), + ]) + + channelIndexes: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AddBlockApplications(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x0000000D + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="applications", Tag=0, Type=typing.List[ContentControl.Structs.AppInfoStruct]), + ]) + + applications: 'typing.List[ContentControl.Structs.AppInfoStruct]' = field(default_factory=lambda: []) + + @dataclass + class RemoveBlockApplications(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x0000000E + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="applications", Tag=0, Type=typing.List[ContentControl.Structs.AppInfoStruct]), + ]) + + applications: 'typing.List[ContentControl.Structs.AppInfoStruct]' = field(default_factory=lambda: []) + + @dataclass + class SetBlockContentTimeWindow(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x0000000F + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="timeWindow", Tag=0, Type=ContentControl.Structs.TimeWindowStruct), + ]) + + timeWindow: 'ContentControl.Structs.TimeWindowStruct' = field(default_factory=lambda: ContentControl.Structs.TimeWindowStruct()) + + @dataclass + class RemoveBlockContentTimeWindow(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000050F + command_id: typing.ClassVar[int] = 0x00000010 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="timeWindowIndexes", Tag=0, Type=typing.List[uint]), + ]) + + timeWindowIndexes: 'typing.List[uint]' = field(default_factory=lambda: []) + class Attributes: @dataclass class Enabled(ClusterAttributeDescriptor): @@ -44293,9 +44488,57 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=bool) + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'bool' = False + value: 'typing.Optional[bool]' = None + + @dataclass + class BlockChannelList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000008 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[ContentControl.Structs.BlockChannelStruct]]) + + value: 'typing.Optional[typing.List[ContentControl.Structs.BlockChannelStruct]]' = None + + @dataclass + class BlockApplicationList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000009 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[ContentControl.Structs.AppInfoStruct]]) + + value: 'typing.Optional[typing.List[ContentControl.Structs.AppInfoStruct]]' = None + + @dataclass + class BlockContentTimeWindow(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000000A + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[ContentControl.Structs.TimeWindowStruct]]) + + value: 'typing.Optional[typing.List[ContentControl.Structs.TimeWindowStruct]]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -44410,6 +44653,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ]) + @dataclass + class EnteringBlockContentTimeWindow(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000050F + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + @dataclass class ContentAppObserver(Cluster): @@ -44456,12 +44715,12 @@ class ContentAppMessage(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="data", Tag=0, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="encodingHint", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="data", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="encodingHint", Tag=1, Type=typing.Optional[str]), ]) - data: 'typing.Optional[str]' = None - encodingHint: 'str' = "" + data: 'str' = "" + encodingHint: 'typing.Optional[str]' = None @dataclass class ContentAppMessageResponse(ClusterCommand): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index cb98d807f3495d..bc76cc0c771020 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -5742,6 +5742,15 @@ static BOOL AttributeIsSpecifiedInContentControlCluster(AttributeId aAttributeId case Attributes::BlockUnrated::Id: { return YES; } + case Attributes::BlockChannelList::Id: { + return YES; + } + case Attributes::BlockApplicationList::Id: { + return YES; + } + case Attributes::BlockContentTimeWindow::Id: { + return YES; + } case Attributes::GeneratedCommandList::Id: { return YES; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index bae1643f3beb39..cb2df8e5c99ece 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -15628,30 +15628,50 @@ static id _Nullable DecodeAttributeValueForMediaPlaybackCluster(AttributeId aAtt *aError = err; return nil; } - if (cppValue.Value().trackAttributes.IsNull()) { - value.trackAttributes = nil; - } else { - value.trackAttributes = [MTRMediaPlaybackClusterTrackAttributesStruct new]; - value.trackAttributes.languageCode = AsString(cppValue.Value().trackAttributes.Value().languageCode); - if (value.trackAttributes.languageCode == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - if (cppValue.Value().trackAttributes.Value().displayName.HasValue()) { - if (cppValue.Value().trackAttributes.Value().displayName.Value().IsNull()) { - value.trackAttributes.displayName = nil; - } else { - value.trackAttributes.displayName = AsString(cppValue.Value().trackAttributes.Value().displayName.Value().Value()); - if (value.trackAttributes.displayName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + value.trackAttributes = [MTRMediaPlaybackClusterTrackAttributesStruct new]; + value.trackAttributes.languageCode = AsString(cppValue.Value().trackAttributes.languageCode); + if (value.trackAttributes.languageCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (cppValue.Value().trackAttributes.characteristics.HasValue()) { + if (cppValue.Value().trackAttributes.characteristics.Value().IsNull()) { + value.trackAttributes.characteristics = nil; + } else { + { // Scope for our temporary variables + auto * array_5 = [NSMutableArray new]; + auto iter_5 = cppValue.Value().trackAttributes.characteristics.Value().Value().begin(); + while (iter_5.Next()) { + auto & entry_5 = iter_5.GetValue(); + NSNumber * newElement_5; + newElement_5 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_5)]; + [array_5 addObject:newElement_5]; + } + CHIP_ERROR err = iter_5.GetStatus(); + if (err != CHIP_NO_ERROR) { *aError = err; return nil; } + value.trackAttributes.characteristics = array_5; } - } else { + } + } else { + value.trackAttributes.characteristics = nil; + } + if (cppValue.Value().trackAttributes.displayName.HasValue()) { + if (cppValue.Value().trackAttributes.displayName.Value().IsNull()) { value.trackAttributes.displayName = nil; + } else { + value.trackAttributes.displayName = AsString(cppValue.Value().trackAttributes.displayName.Value().Value()); + if (value.trackAttributes.displayName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } } + } else { + value.trackAttributes.displayName = nil; } } return value; @@ -15680,30 +15700,50 @@ static id _Nullable DecodeAttributeValueForMediaPlaybackCluster(AttributeId aAtt *aError = err; return nil; } - if (entry_1.trackAttributes.IsNull()) { - newElement_1.trackAttributes = nil; - } else { - newElement_1.trackAttributes = [MTRMediaPlaybackClusterTrackAttributesStruct new]; - newElement_1.trackAttributes.languageCode = AsString(entry_1.trackAttributes.Value().languageCode); - if (newElement_1.trackAttributes.languageCode == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - if (entry_1.trackAttributes.Value().displayName.HasValue()) { - if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) { - newElement_1.trackAttributes.displayName = nil; - } else { - newElement_1.trackAttributes.displayName = AsString(entry_1.trackAttributes.Value().displayName.Value().Value()); - if (newElement_1.trackAttributes.displayName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + newElement_1.trackAttributes = [MTRMediaPlaybackClusterTrackAttributesStruct new]; + newElement_1.trackAttributes.languageCode = AsString(entry_1.trackAttributes.languageCode); + if (newElement_1.trackAttributes.languageCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (entry_1.trackAttributes.characteristics.HasValue()) { + if (entry_1.trackAttributes.characteristics.Value().IsNull()) { + newElement_1.trackAttributes.characteristics = nil; + } else { + { // Scope for our temporary variables + auto * array_6 = [NSMutableArray new]; + auto iter_6 = entry_1.trackAttributes.characteristics.Value().Value().begin(); + while (iter_6.Next()) { + auto & entry_6 = iter_6.GetValue(); + NSNumber * newElement_6; + newElement_6 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_6)]; + [array_6 addObject:newElement_6]; + } + CHIP_ERROR err = iter_6.GetStatus(); + if (err != CHIP_NO_ERROR) { *aError = err; return nil; } + newElement_1.trackAttributes.characteristics = array_6; } - } else { + } + } else { + newElement_1.trackAttributes.characteristics = nil; + } + if (entry_1.trackAttributes.displayName.HasValue()) { + if (entry_1.trackAttributes.displayName.Value().IsNull()) { newElement_1.trackAttributes.displayName = nil; + } else { + newElement_1.trackAttributes.displayName = AsString(entry_1.trackAttributes.displayName.Value().Value()); + if (newElement_1.trackAttributes.displayName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } } + } else { + newElement_1.trackAttributes.displayName = nil; } [array_1 addObject:newElement_1]; } @@ -15735,30 +15775,50 @@ static id _Nullable DecodeAttributeValueForMediaPlaybackCluster(AttributeId aAtt *aError = err; return nil; } - if (cppValue.Value().trackAttributes.IsNull()) { - value.trackAttributes = nil; - } else { - value.trackAttributes = [MTRMediaPlaybackClusterTrackAttributesStruct new]; - value.trackAttributes.languageCode = AsString(cppValue.Value().trackAttributes.Value().languageCode); - if (value.trackAttributes.languageCode == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - if (cppValue.Value().trackAttributes.Value().displayName.HasValue()) { - if (cppValue.Value().trackAttributes.Value().displayName.Value().IsNull()) { - value.trackAttributes.displayName = nil; - } else { - value.trackAttributes.displayName = AsString(cppValue.Value().trackAttributes.Value().displayName.Value().Value()); - if (value.trackAttributes.displayName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + value.trackAttributes = [MTRMediaPlaybackClusterTrackAttributesStruct new]; + value.trackAttributes.languageCode = AsString(cppValue.Value().trackAttributes.languageCode); + if (value.trackAttributes.languageCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (cppValue.Value().trackAttributes.characteristics.HasValue()) { + if (cppValue.Value().trackAttributes.characteristics.Value().IsNull()) { + value.trackAttributes.characteristics = nil; + } else { + { // Scope for our temporary variables + auto * array_5 = [NSMutableArray new]; + auto iter_5 = cppValue.Value().trackAttributes.characteristics.Value().Value().begin(); + while (iter_5.Next()) { + auto & entry_5 = iter_5.GetValue(); + NSNumber * newElement_5; + newElement_5 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_5)]; + [array_5 addObject:newElement_5]; + } + CHIP_ERROR err = iter_5.GetStatus(); + if (err != CHIP_NO_ERROR) { *aError = err; return nil; } + value.trackAttributes.characteristics = array_5; } - } else { + } + } else { + value.trackAttributes.characteristics = nil; + } + if (cppValue.Value().trackAttributes.displayName.HasValue()) { + if (cppValue.Value().trackAttributes.displayName.Value().IsNull()) { value.trackAttributes.displayName = nil; + } else { + value.trackAttributes.displayName = AsString(cppValue.Value().trackAttributes.displayName.Value().Value()); + if (value.trackAttributes.displayName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } } + } else { + value.trackAttributes.displayName = nil; } } return value; @@ -15787,30 +15847,50 @@ static id _Nullable DecodeAttributeValueForMediaPlaybackCluster(AttributeId aAtt *aError = err; return nil; } - if (entry_1.trackAttributes.IsNull()) { - newElement_1.trackAttributes = nil; - } else { - newElement_1.trackAttributes = [MTRMediaPlaybackClusterTrackAttributesStruct new]; - newElement_1.trackAttributes.languageCode = AsString(entry_1.trackAttributes.Value().languageCode); - if (newElement_1.trackAttributes.languageCode == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - if (entry_1.trackAttributes.Value().displayName.HasValue()) { - if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) { - newElement_1.trackAttributes.displayName = nil; - } else { - newElement_1.trackAttributes.displayName = AsString(entry_1.trackAttributes.Value().displayName.Value().Value()); - if (newElement_1.trackAttributes.displayName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + newElement_1.trackAttributes = [MTRMediaPlaybackClusterTrackAttributesStruct new]; + newElement_1.trackAttributes.languageCode = AsString(entry_1.trackAttributes.languageCode); + if (newElement_1.trackAttributes.languageCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (entry_1.trackAttributes.characteristics.HasValue()) { + if (entry_1.trackAttributes.characteristics.Value().IsNull()) { + newElement_1.trackAttributes.characteristics = nil; + } else { + { // Scope for our temporary variables + auto * array_6 = [NSMutableArray new]; + auto iter_6 = entry_1.trackAttributes.characteristics.Value().Value().begin(); + while (iter_6.Next()) { + auto & entry_6 = iter_6.GetValue(); + NSNumber * newElement_6; + newElement_6 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_6)]; + [array_6 addObject:newElement_6]; + } + CHIP_ERROR err = iter_6.GetStatus(); + if (err != CHIP_NO_ERROR) { *aError = err; return nil; } + newElement_1.trackAttributes.characteristics = array_6; } - } else { + } + } else { + newElement_1.trackAttributes.characteristics = nil; + } + if (entry_1.trackAttributes.displayName.HasValue()) { + if (entry_1.trackAttributes.displayName.Value().IsNull()) { newElement_1.trackAttributes.displayName = nil; + } else { + newElement_1.trackAttributes.displayName = AsString(entry_1.trackAttributes.displayName.Value().Value()); + if (newElement_1.trackAttributes.displayName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } } + } else { + newElement_1.trackAttributes.displayName = nil; } [array_1 addObject:newElement_1]; } @@ -16409,6 +16489,134 @@ static id _Nullable DecodeAttributeValueForContentControlCluster(AttributeId aAt value = [NSNumber numberWithBool:cppValue]; return value; } + case Attributes::BlockChannelList::Id: { + using TypeInfo = Attributes::BlockChannelList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRContentControlClusterBlockChannelStruct * newElement_0; + newElement_0 = [MTRContentControlClusterBlockChannelStruct new]; + if (entry_0.blockChannelIndex.IsNull()) { + newElement_0.blockChannelIndex = nil; + } else { + newElement_0.blockChannelIndex = [NSNumber numberWithUnsignedShort:entry_0.blockChannelIndex.Value()]; + } + newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; + newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; + if (entry_0.identifier.HasValue()) { + newElement_0.identifier = AsString(entry_0.identifier.Value()); + if (newElement_0.identifier == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.identifier = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::BlockApplicationList::Id: { + using TypeInfo = Attributes::BlockApplicationList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRContentControlClusterAppInfoStruct * newElement_0; + newElement_0 = [MTRContentControlClusterAppInfoStruct new]; + newElement_0.catalogVendorID = [NSNumber numberWithUnsignedShort:entry_0.catalogVendorID]; + newElement_0.applicationID = AsString(entry_0.applicationID); + if (newElement_0.applicationID == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::BlockContentTimeWindow::Id: { + using TypeInfo = Attributes::BlockContentTimeWindow::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRContentControlClusterTimeWindowStruct * newElement_0; + newElement_0 = [MTRContentControlClusterTimeWindowStruct new]; + if (entry_0.timeWindowIndex.IsNull()) { + newElement_0.timeWindowIndex = nil; + } else { + newElement_0.timeWindowIndex = [NSNumber numberWithUnsignedShort:entry_0.timeWindowIndex.Value()]; + } + newElement_0.dayOfWeek = [NSNumber numberWithUnsignedChar:entry_0.dayOfWeek.Raw()]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.timePeriod.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRContentControlClusterTimePeriodStruct * newElement_2; + newElement_2 = [MTRContentControlClusterTimePeriodStruct new]; + newElement_2.startHour = [NSNumber numberWithUnsignedChar:entry_2.startHour]; + newElement_2.startMinute = [NSNumber numberWithUnsignedChar:entry_2.startMinute]; + newElement_2.endHour = [NSNumber numberWithUnsignedChar:entry_2.endHour]; + newElement_2.endMinute = [NSNumber numberWithUnsignedChar:entry_2.endMinute]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.timePeriod = array_2; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } default: { break; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 3c7624201d0484..9bffb05a404110 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -13093,9 +13093,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * * This command retrieves the program guide. It accepts several filter parameters to return specific schedule and program information from a content app. The command shall receive in response a ProgramGuideResponse. */ -- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams * _Nullable)params completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)getProgramGuideWithCompletion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; +- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams *)params completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; /** * Command RecordProgram * @@ -14238,9 +14236,7 @@ MTR_PROVISIONALLY_AVAILABLE * * The purpose of this command is to add the extra screen time for the user. If a client with Operate privilege invokes this command, the media device SHALL check whether the PINCode passed in the command matches the current PINCode value. If these match, then the RemainingScreenTime attribute SHALL be increased by the specified BonusTime value. If the PINs do not match, then a response with InvalidPINCode error status SHALL be returned, and no changes SHALL be made to RemainingScreenTime. If a client with Manage privilege or greater invokes this command, the media device SHALL ignore the PINCode field and directly increase the RemainingScreenTime attribute by the specified BonusTime value. A server that does not support the PM feature SHALL respond with InvalidPINCode to clients that only have Operate privilege unless: It has been provided with the PIN value to expect via an out of band mechanism, and The client has provided a PINCode that matches the expected PIN value. */ -- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)addBonusTimeWithCompletion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; +- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; /** * Command SetScreenDailyTime * @@ -14275,6 +14271,42 @@ MTR_PROVISIONALLY_AVAILABLE * The purpose of this command is to set ScheduledContentRatingThreshold attribute. On receipt of the SetScheduledContentRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the ScheduledContentRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. */ - (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSetScheduledContentRatingThresholdParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command AddBlockChannels + * + * The purpose of this command is to set BlockChannelList attribute. + */ +- (void)addBlockChannelsWithParams:(MTRContentControlClusterAddBlockChannelsParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command RemoveBlockChannels + * + * The purpose of this command is to remove channels from the BlockChannelList attribute. + */ +- (void)removeBlockChannelsWithParams:(MTRContentControlClusterRemoveBlockChannelsParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command AddBlockApplications + * + * The purpose of this command is to set applications to the BlockApplicationList attribute. + */ +- (void)addBlockApplicationsWithParams:(MTRContentControlClusterAddBlockApplicationsParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command RemoveBlockApplications + * + * The purpose of this command is to remove applications from the BlockApplicationList attribute. + */ +- (void)removeBlockApplicationsWithParams:(MTRContentControlClusterRemoveBlockApplicationsParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetBlockContentTimeWindow + * + * The purpose of this command is to set the BlockContentTimeWindow attribute. + */ +- (void)setBlockContentTimeWindowWithParams:(MTRContentControlClusterSetBlockContentTimeWindowParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command RemoveBlockContentTimeWindow + * + * The purpose of this command is to remove the selected time windows from the BlockContentTimeWindow attribute. + */ +- (void)removeBlockContentTimeWindowWithParams:(MTRContentControlClusterRemoveBlockContentTimeWindowParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeEnabledWithParams:(MTRSubscribeParams *)params @@ -14324,6 +14356,24 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeBlockUnratedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeBlockChannelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeBlockChannelListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeBlockChannelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeBlockApplicationListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeBlockApplicationListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeBlockApplicationListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeBlockContentTimeWindowWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeBlockContentTimeWindowWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeBlockContentTimeWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -19508,7 +19558,7 @@ typedef NS_OPTIONS(uint32_t, MTRChannelFeature) { MTRChannelFeatureRecordProgram MTR_PROVISIONALLY_AVAILABLE = 0x8, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_OPTIONS(uint32_t, MTRChannelRecordingFlagBitmap) { +typedef NS_OPTIONS(uint8_t, MTRChannelRecordingFlagBitmap) { MTRChannelRecordingFlagBitmapScheduled MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRChannelRecordingFlagBitmapRecordSeries MTR_PROVISIONALLY_AVAILABLE = 0x2, MTRChannelRecordingFlagBitmapRecorded MTR_PROVISIONALLY_AVAILABLE = 0x4, @@ -19842,9 +19892,9 @@ typedef NS_ENUM(uint8_t, MTRContentLauncherContentLaunchStatus) { typedef NS_OPTIONS(uint32_t, MTRContentLauncherFeature) { MTRContentLauncherFeatureContentSearch MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, MTRContentLauncherFeatureURLPlayback MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRContentLauncherFeatureAdvancedSeek MTR_PROVISIONALLY_AVAILABLE = 0x3, - MTRContentLauncherFeatureTextTracks MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRContentLauncherFeatureAudioTracks MTR_PROVISIONALLY_AVAILABLE = 0x5, + MTRContentLauncherFeatureAdvancedSeek MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRContentLauncherFeatureTextTracks MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRContentLauncherFeatureAudioTracks MTR_PROVISIONALLY_AVAILABLE = 0x10, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint32_t, MTRContentLauncherSupportedProtocolsBitmap) { @@ -19889,6 +19939,16 @@ typedef NS_ENUM(uint8_t, MTRApplicationBasicApplicationStatus) { MTRApplicationBasicApplicationStatusActiveVisibleNotFocus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint8_t, MTRContentControlDayOfWeekBitmap) { + MTRContentControlDayOfWeekBitmapSunday MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRContentControlDayOfWeekBitmapMonday MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRContentControlDayOfWeekBitmapTuesday MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRContentControlDayOfWeekBitmapWednesday MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRContentControlDayOfWeekBitmapThursday MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRContentControlDayOfWeekBitmapFriday MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRContentControlDayOfWeekBitmapSaturday MTR_PROVISIONALLY_AVAILABLE = 0x40, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_OPTIONS(uint32_t, MTRContentControlFeature) { MTRContentControlFeatureScreenTime MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRContentControlFeaturePINManagement MTR_PROVISIONALLY_AVAILABLE = 0x2, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index b375488f292fc8..3a4b56a490a1c6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -93484,11 +93484,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params compl queue:self.callbackQueue completion:responseHandler]; } -- (void)getProgramGuideWithCompletion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self getProgramGuideWithParams:nil completion:completion]; -} -- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams * _Nullable)params completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams *)params completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTRChannelClusterGetProgramGuideParams @@ -101352,6 +101348,9 @@ - (void)updatePINWithParams:(MTRContentControlClusterUpdatePINParams *)params co }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } using RequestType = ContentControl::Commands::UpdatePIN::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID @@ -101380,6 +101379,9 @@ - (void)resetPINWithParams:(MTRContentControlClusterResetPINParams * _Nullable)p }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } using RequestType = ContentControl::Commands::ResetPIN::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID @@ -101408,6 +101410,9 @@ - (void)enableWithParams:(MTRContentControlClusterEnableParams * _Nullable)param }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } using RequestType = ContentControl::Commands::Enable::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID @@ -101436,6 +101441,9 @@ - (void)disableWithParams:(MTRContentControlClusterDisableParams * _Nullable)par }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } using RequestType = ContentControl::Commands::Disable::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID @@ -101448,11 +101456,7 @@ - (void)disableWithParams:(MTRContentControlClusterDisableParams * _Nullable)par queue:self.callbackQueue completion:responseHandler]; } -- (void)addBonusTimeWithCompletion:(MTRStatusCompletion)completion -{ - [self addBonusTimeWithParams:nil completion:completion]; -} -- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { params = [[MTRContentControlClusterAddBonusTimeParams @@ -101604,6 +101608,150 @@ - (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSe queue:self.callbackQueue completion:responseHandler]; } +- (void)addBlockChannelsWithParams:(MTRContentControlClusterAddBlockChannelsParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterAddBlockChannelsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::AddBlockChannels::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)removeBlockChannelsWithParams:(MTRContentControlClusterRemoveBlockChannelsParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterRemoveBlockChannelsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::RemoveBlockChannels::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)addBlockApplicationsWithParams:(MTRContentControlClusterAddBlockApplicationsParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterAddBlockApplicationsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::AddBlockApplications::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)removeBlockApplicationsWithParams:(MTRContentControlClusterRemoveBlockApplicationsParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterRemoveBlockApplicationsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::RemoveBlockApplications::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setBlockContentTimeWindowWithParams:(MTRContentControlClusterSetBlockContentTimeWindowParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterSetBlockContentTimeWindowParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::SetBlockContentTimeWindow::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)removeBlockContentTimeWindowWithParams:(MTRContentControlClusterRemoveBlockContentTimeWindowParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterRemoveBlockContentTimeWindowParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::RemoveBlockContentTimeWindow::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} - (void)readAttributeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { @@ -101893,6 +102041,114 @@ + (void)readAttributeBlockUnratedWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } +- (void)readAttributeBlockChannelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::BlockChannelList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeBlockChannelListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ContentControl::Attributes::BlockChannelList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBlockChannelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::BlockChannelList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBlockApplicationListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::BlockApplicationList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeBlockApplicationListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ContentControl::Attributes::BlockApplicationList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBlockApplicationListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::BlockApplicationList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBlockContentTimeWindowWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::BlockContentTimeWindow::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeBlockContentTimeWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ContentControl::Attributes::BlockContentTimeWindow::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBlockContentTimeWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ContentControl::Attributes::BlockContentTimeWindow::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::GeneratedCommandList::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 5c3f6a080fdd7b..ac2ff01c6852b9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -4791,6 +4791,9 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterContentControlAttributeScreenDailyTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, MTRAttributeIDTypeClusterContentControlAttributeRemainingScreenTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, MTRAttributeIDTypeClusterContentControlAttributeBlockUnratedID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterContentControlAttributeBlockChannelListID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, + MTRAttributeIDTypeClusterContentControlAttributeBlockApplicationListID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, + MTRAttributeIDTypeClusterContentControlAttributeBlockContentTimeWindowID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, MTRAttributeIDTypeClusterContentControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterContentControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterContentControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -6786,6 +6789,12 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterContentControlCommandUnblockUnratedContentID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, MTRCommandIDTypeClusterContentControlCommandSetOnDemandRatingThresholdID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, MTRCommandIDTypeClusterContentControlCommandSetScheduledContentRatingThresholdID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, + MTRCommandIDTypeClusterContentControlCommandAddBlockChannelsID MTR_PROVISIONALLY_AVAILABLE = 0x0000000B, + MTRCommandIDTypeClusterContentControlCommandRemoveBlockChannelsID MTR_PROVISIONALLY_AVAILABLE = 0x0000000C, + MTRCommandIDTypeClusterContentControlCommandAddBlockApplicationsID MTR_PROVISIONALLY_AVAILABLE = 0x0000000D, + MTRCommandIDTypeClusterContentControlCommandRemoveBlockApplicationsID MTR_PROVISIONALLY_AVAILABLE = 0x0000000E, + MTRCommandIDTypeClusterContentControlCommandSetBlockContentTimeWindowID MTR_PROVISIONALLY_AVAILABLE = 0x0000000F, + MTRCommandIDTypeClusterContentControlCommandRemoveBlockContentTimeWindowID MTR_PROVISIONALLY_AVAILABLE = 0x00000010, // Cluster ContentAppObserver commands MTRCommandIDTypeClusterContentAppObserverCommandContentAppMessageID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -7340,6 +7349,7 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { // Cluster ContentControl events MTREventIDTypeClusterContentControlEventRemainingScreenTimeExpiredID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterContentControlEventEnteringBlockContentTimeWindowID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, // Cluster TestCluster deprecated event names MTRClusterTestClusterEventTestEventID diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index 474c5cacf47679..6f7deadd8126d8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -7793,6 +7793,18 @@ result = @"BlockUnrated"; break; + case MTRAttributeIDTypeClusterContentControlAttributeBlockChannelListID: + result = @"BlockChannelList"; + break; + + case MTRAttributeIDTypeClusterContentControlAttributeBlockApplicationListID: + result = @"BlockApplicationList"; + break; + + case MTRAttributeIDTypeClusterContentControlAttributeBlockContentTimeWindowID: + result = @"BlockContentTimeWindow"; + break; + case MTRAttributeIDTypeClusterContentControlAttributeGeneratedCommandListID: result = @"GeneratedCommandList"; break; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 6e4e0f80b44d00..3e87c07967cea8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -6043,9 +6043,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)getProgramGuideWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; +- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)recordProgramWithParams:(MTRChannelClusterRecordProgramParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)cancelRecordProgramWithParams:(MTRChannelClusterCancelRecordProgramParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; @@ -6595,9 +6593,7 @@ MTR_PROVISIONALLY_AVAILABLE - (void)disableWithParams:(MTRContentControlClusterDisableParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)disableWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)addBonusTimeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; +- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)setScreenDailyTimeWithParams:(MTRContentControlClusterSetScreenDailyTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)blockUnratedContentWithParams:(MTRContentControlClusterBlockUnratedContentParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)blockUnratedContentWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion @@ -6607,6 +6603,12 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE; - (void)setOnDemandRatingThresholdWithParams:(MTRContentControlClusterSetOnDemandRatingThresholdParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSetScheduledContentRatingThresholdParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)addBlockChannelsWithParams:(MTRContentControlClusterAddBlockChannelsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)removeBlockChannelsWithParams:(MTRContentControlClusterRemoveBlockChannelsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)addBlockApplicationsWithParams:(MTRContentControlClusterAddBlockApplicationsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)removeBlockApplicationsWithParams:(MTRContentControlClusterRemoveBlockApplicationsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setBlockContentTimeWindowWithParams:(MTRContentControlClusterSetBlockContentTimeWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)removeBlockContentTimeWindowWithParams:(MTRContentControlClusterRemoveBlockContentTimeWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -6624,6 +6626,12 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeBlockUnratedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeBlockChannelListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeBlockApplicationListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeBlockContentTimeWindowWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index db279250cac8bf..e2bf6e82f6bf6d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -16906,11 +16906,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params expec completion:responseHandler]; } -- (void)getProgramGuideWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self getProgramGuideWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTRChannelClusterGetProgramGuideParams @@ -18831,6 +18827,9 @@ - (void)updatePINWithParams:(MTRContentControlClusterUpdatePINParams *)params ex }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } using RequestType = ContentControl::Commands::UpdatePIN::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID @@ -18862,6 +18861,9 @@ - (void)resetPINWithParams:(MTRContentControlClusterResetPINParams * _Nullable)p }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } using RequestType = ContentControl::Commands::ResetPIN::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID @@ -18893,6 +18895,9 @@ - (void)enableWithParams:(MTRContentControlClusterEnableParams * _Nullable)param }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } using RequestType = ContentControl::Commands::Enable::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID @@ -18924,6 +18929,9 @@ - (void)disableWithParams:(MTRContentControlClusterDisableParams * _Nullable)par }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } using RequestType = ContentControl::Commands::Disable::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID @@ -18939,11 +18947,7 @@ - (void)disableWithParams:(MTRContentControlClusterDisableParams * _Nullable)par completion:responseHandler]; } -- (void)addBonusTimeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - [self addBonusTimeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { params = [[MTRContentControlClusterAddBonusTimeParams @@ -19113,6 +19117,168 @@ - (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSe completion:responseHandler]; } +- (void)addBlockChannelsWithParams:(MTRContentControlClusterAddBlockChannelsParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterAddBlockChannelsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::AddBlockChannels::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)removeBlockChannelsWithParams:(MTRContentControlClusterRemoveBlockChannelsParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterRemoveBlockChannelsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::RemoveBlockChannels::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)addBlockApplicationsWithParams:(MTRContentControlClusterAddBlockApplicationsParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterAddBlockApplicationsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::AddBlockApplications::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)removeBlockApplicationsWithParams:(MTRContentControlClusterRemoveBlockApplicationsParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterRemoveBlockApplicationsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::RemoveBlockApplications::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)setBlockContentTimeWindowWithParams:(MTRContentControlClusterSetBlockContentTimeWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterSetBlockContentTimeWindowParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::SetBlockContentTimeWindow::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)removeBlockContentTimeWindowWithParams:(MTRContentControlClusterRemoveBlockContentTimeWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterRemoveBlockContentTimeWindowParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::RemoveBlockContentTimeWindow::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + - (NSDictionary * _Nullable)readAttributeEnabledWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeEnabledID) params:params]; @@ -19153,6 +19319,21 @@ - (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSe return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeBlockUnratedID) params:params]; } +- (NSDictionary * _Nullable)readAttributeBlockChannelListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeBlockChannelListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeBlockApplicationListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeBlockApplicationListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeBlockContentTimeWindowWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeBlockContentTimeWindowID) params:params]; +} + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeGeneratedCommandListID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 1d1552200b5b1c..25e645958f270b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -8643,9 +8643,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_PROVISIONALLY_AVAILABLE @interface MTRChannelClusterGetProgramGuideParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable startTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull startTime MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable endTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull endTime MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSArray * _Nullable channelList MTR_PROVISIONALLY_AVAILABLE; @@ -8710,9 +8710,9 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nonnull shouldRecordSeries MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull externalIDList MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable externalIDList MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nonnull data MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable data MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -8746,9 +8746,9 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nonnull shouldRecordSeries MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull externalIDList MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable externalIDList MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nonnull data MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable data MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -9230,7 +9230,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSString * _Nonnull trackID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull audioOutputIndex MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable audioOutputIndex MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -9571,6 +9571,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSString * _Nullable displayString MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) MTRContentLauncherClusterBrandingInformationStruct * _Nullable brandingInformation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) MTRContentLauncherClusterPlaybackPreferencesStruct * _Nullable playbackPreferences MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -9977,7 +9979,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_PROVISIONALLY_AVAILABLE @interface MTRContentControlClusterUpdatePINParams : NSObject -@property (nonatomic, copy) NSString * _Nullable oldPIN MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull oldPIN MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy, getter=getNewPIN) NSString * _Nonnull newPIN MTR_PROVISIONALLY_AVAILABLE; /** @@ -10114,7 +10116,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSString * _Nullable pinCode MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable bonusTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull bonusTime MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -10287,12 +10289,192 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterAddBlockChannelsParams : NSObject + +@property (nonatomic, copy) NSArray * _Nonnull channels MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterRemoveBlockChannelsParams : NSObject + +@property (nonatomic, copy) NSArray * _Nonnull channelIndexes MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterAddBlockApplicationsParams : NSObject + +@property (nonatomic, copy) NSArray * _Nonnull applications MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterRemoveBlockApplicationsParams : NSObject + +@property (nonatomic, copy) NSArray * _Nonnull applications MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterSetBlockContentTimeWindowParams : NSObject + +@property (nonatomic, copy) MTRContentControlClusterTimeWindowStruct * _Nonnull timeWindow MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterRemoveBlockContentTimeWindowParams : NSObject + +@property (nonatomic, copy) NSArray * _Nonnull timeWindowIndexes MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRContentAppObserverClusterContentAppMessageParams : NSObject -@property (nonatomic, copy) NSString * _Nullable data MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull data MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nonnull encodingHint MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable encodingHint MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 3105c9a9d21f80..40de6d4b8473ff 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -24311,9 +24311,9 @@ - (instancetype)init { if (self = [super init]) { - _startTime = nil; + _startTime = @(0); - _endTime = nil; + _endTime = @(0); _channelList = nil; @@ -24362,16 +24362,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader chip::app::Clusters::Channel::Commands::GetProgramGuide::Type encodableStruct; ListFreer listFreer; { - if (self.startTime != nil) { - auto & definedValue_0 = encodableStruct.startTime.Emplace(); - definedValue_0 = self.startTime.unsignedIntValue; - } + encodableStruct.startTime = self.startTime.unsignedIntValue; } { - if (self.endTime != nil) { - auto & definedValue_0 = encodableStruct.endTime.Emplace(); - definedValue_0 = self.endTime.unsignedIntValue; - } + encodableStruct.endTime = self.endTime.unsignedIntValue; } { if (self.channelList != nil) { @@ -24424,24 +24418,34 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { if (self.pageToken != nil) { auto & definedValue_0 = encodableStruct.pageToken.Emplace(); - if (self.pageToken.limit != nil) { - auto & definedValue_2 = definedValue_0.limit.Emplace(); - definedValue_2 = self.pageToken.limit.unsignedShortValue; - } - if (self.pageToken.after != nil) { - auto & definedValue_2 = definedValue_0.after.Emplace(); - definedValue_2 = AsCharSpan(self.pageToken.after); - } - if (self.pageToken.before != nil) { - auto & definedValue_2 = definedValue_0.before.Emplace(); - definedValue_2 = AsCharSpan(self.pageToken.before); + if (self.pageToken == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + if (self.pageToken.limit != nil) { + auto & definedValue_3 = nonNullValue_1.limit.Emplace(); + definedValue_3 = self.pageToken.limit.unsignedShortValue; + } + if (self.pageToken.after != nil) { + auto & definedValue_3 = nonNullValue_1.after.Emplace(); + definedValue_3 = AsCharSpan(self.pageToken.after); + } + if (self.pageToken.before != nil) { + auto & definedValue_3 = nonNullValue_1.before.Emplace(); + definedValue_3 = AsCharSpan(self.pageToken.before); + } } } } { if (self.recordingFlag != nil) { auto & definedValue_0 = encodableStruct.recordingFlag.Emplace(); - definedValue_0 = static_cast>(self.recordingFlag.unsignedIntValue); + if (self.recordingFlag == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = static_cast>(self.recordingFlag.unsignedCharValue); + } } } { @@ -24832,7 +24836,7 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Channel: newElement_0.parentalGuidanceText = nil; } if (entry_0.recordingFlag.HasValue()) { - newElement_0.recordingFlag = [NSNumber numberWithUnsignedInt:entry_0.recordingFlag.Value().Raw()]; + newElement_0.recordingFlag = [NSNumber numberWithUnsignedChar:entry_0.recordingFlag.Value().Raw()]; } else { newElement_0.recordingFlag = nil; } @@ -24923,15 +24927,15 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Channel: auto iter_3 = entry_0.externalIDList.Value().begin(); while (iter_3.Next()) { auto & entry_3 = iter_3.GetValue(); - MTRChannelClusterProgramCastStruct * newElement_3; - newElement_3 = [MTRChannelClusterProgramCastStruct new]; + MTRChannelClusterAdditionalInfoStruct * newElement_3; + newElement_3 = [MTRChannelClusterAdditionalInfoStruct new]; newElement_3.name = AsString(entry_3.name); if (newElement_3.name == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; return err; } - newElement_3.role = AsString(entry_3.role); - if (newElement_3.role == nil) { + newElement_3.value = AsString(entry_3.value); + if (newElement_3.value == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; return err; } @@ -24969,9 +24973,9 @@ - (instancetype)init _shouldRecordSeries = @(0); - _externalIDList = [NSArray array]; + _externalIDList = nil; - _data = [NSData data]; + _data = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -25013,32 +25017,38 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.shouldRecordSeries = self.shouldRecordSeries.boolValue; } { - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (self.externalIDList.count != 0) { - auto * listHolder_0 = new ListHolder(self.externalIDList.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < self.externalIDList.count; ++i_0) { - if (![self.externalIDList[i_0] isKindOfClass:[MTRChannelClusterAdditionalInfoStruct class]]) { - // Wrong kind of value. + if (self.externalIDList != nil) { + auto & definedValue_0 = encodableStruct.externalIDList.Emplace(); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (self.externalIDList.count != 0) { + auto * listHolder_1 = new ListHolder(self.externalIDList.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (MTRChannelClusterAdditionalInfoStruct *) self.externalIDList[i_0]; - listHolder_0->mList[i_0].name = AsCharSpan(element_0.name); - listHolder_0->mList[i_0].value = AsCharSpan(element_0.value); + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < self.externalIDList.count; ++i_1) { + if (![self.externalIDList[i_1] isKindOfClass:[MTRChannelClusterAdditionalInfoStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_1 = (MTRChannelClusterAdditionalInfoStruct *) self.externalIDList[i_1]; + listHolder_1->mList[i_1].name = AsCharSpan(element_1.name); + listHolder_1->mList[i_1].value = AsCharSpan(element_1.value); + } + definedValue_0 = ListType_1(listHolder_1->mList, self.externalIDList.count); + } else { + definedValue_0 = ListType_1(); } - encodableStruct.externalIDList = ListType_0(listHolder_0->mList, self.externalIDList.count); - } else { - encodableStruct.externalIDList = ListType_0(); } } } { - encodableStruct.data = AsByteSpan(self.data); + if (self.data != nil) { + auto & definedValue_0 = encodableStruct.data.Emplace(); + definedValue_0 = AsByteSpan(self.data); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -25088,9 +25098,9 @@ - (instancetype)init _shouldRecordSeries = @(0); - _externalIDList = [NSArray array]; + _externalIDList = nil; - _data = [NSData data]; + _data = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -25132,32 +25142,38 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.shouldRecordSeries = self.shouldRecordSeries.boolValue; } { - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (self.externalIDList.count != 0) { - auto * listHolder_0 = new ListHolder(self.externalIDList.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < self.externalIDList.count; ++i_0) { - if (![self.externalIDList[i_0] isKindOfClass:[MTRChannelClusterAdditionalInfoStruct class]]) { - // Wrong kind of value. + if (self.externalIDList != nil) { + auto & definedValue_0 = encodableStruct.externalIDList.Emplace(); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (self.externalIDList.count != 0) { + auto * listHolder_1 = new ListHolder(self.externalIDList.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (MTRChannelClusterAdditionalInfoStruct *) self.externalIDList[i_0]; - listHolder_0->mList[i_0].name = AsCharSpan(element_0.name); - listHolder_0->mList[i_0].value = AsCharSpan(element_0.value); + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < self.externalIDList.count; ++i_1) { + if (![self.externalIDList[i_1] isKindOfClass:[MTRChannelClusterAdditionalInfoStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_1 = (MTRChannelClusterAdditionalInfoStruct *) self.externalIDList[i_1]; + listHolder_1->mList[i_1].name = AsCharSpan(element_1.name); + listHolder_1->mList[i_1].value = AsCharSpan(element_1.value); + } + definedValue_0 = ListType_1(listHolder_1->mList, self.externalIDList.count); + } else { + definedValue_0 = ListType_1(); } - encodableStruct.externalIDList = ListType_0(listHolder_0->mList, self.externalIDList.count); - } else { - encodableStruct.externalIDList = ListType_0(); } } } { - encodableStruct.data = AsByteSpan(self.data); + if (self.data != nil) { + auto & definedValue_0 = encodableStruct.data.Emplace(); + definedValue_0 = AsByteSpan(self.data); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -26327,7 +26343,7 @@ - (instancetype)init _trackID = @""; - _audioOutputIndex = @(0); + _audioOutputIndex = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -26364,7 +26380,15 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.trackID = AsCharSpan(self.trackID); } { - encodableStruct.audioOutputIndex = self.audioOutputIndex.unsignedCharValue; + if (self.audioOutputIndex != nil) { + auto & definedValue_0 = encodableStruct.audioOutputIndex.Emplace(); + if (self.audioOutputIndex == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = self.audioOutputIndex.unsignedCharValue; + } + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -27212,82 +27236,129 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { if (self.playbackPreferences != nil) { auto & definedValue_0 = encodableStruct.playbackPreferences.Emplace(); - definedValue_0.playbackPosition = self.playbackPreferences.playbackPosition.unsignedLongLongValue; - definedValue_0.textTrack.languageCode = AsCharSpan(self.playbackPreferences.textTrack.languageCode); - if (self.playbackPreferences.textTrack.characteristics != nil) { - auto & definedValue_3 = definedValue_0.textTrack.characteristics.Emplace(); - { - using ListType_4 = std::remove_reference_t; - using ListMemberType_4 = ListMemberTypeGetter::Type; - if (self.playbackPreferences.textTrack.characteristics.count != 0) { - auto * listHolder_4 = new ListHolder(self.playbackPreferences.textTrack.characteristics.count); - if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_4); - for (size_t i_4 = 0; i_4 < self.playbackPreferences.textTrack.characteristics.count; ++i_4) { - if (![self.playbackPreferences.textTrack.characteristics[i_4] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; + if (self.playbackPreferences.playbackPosition != nil) { + auto & definedValue_2 = definedValue_0.playbackPosition.Emplace(); + if (self.playbackPreferences.playbackPosition == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = self.playbackPreferences.playbackPosition.unsignedLongLongValue; + } + } + if (self.playbackPreferences.textTrack != nil) { + auto & definedValue_2 = definedValue_0.textTrack.Emplace(); + if (self.playbackPreferences.textTrack == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3.languageCode = AsCharSpan(self.playbackPreferences.textTrack.languageCode); + if (self.playbackPreferences.textTrack.characteristics != nil) { + auto & definedValue_5 = nonNullValue_3.characteristics.Emplace(); + if (self.playbackPreferences.textTrack.characteristics == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + { + using ListType_7 = std::remove_reference_t; + using ListMemberType_7 = ListMemberTypeGetter::Type; + if (self.playbackPreferences.textTrack.characteristics.count != 0) { + auto * listHolder_7 = new ListHolder(self.playbackPreferences.textTrack.characteristics.count); + if (listHolder_7 == nullptr || listHolder_7->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_7); + for (size_t i_7 = 0; i_7 < self.playbackPreferences.textTrack.characteristics.count; ++i_7) { + if (![self.playbackPreferences.textTrack.characteristics[i_7] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_7 = (NSNumber *) self.playbackPreferences.textTrack.characteristics[i_7]; + listHolder_7->mList[i_7] = static_castmList[i_7])>>(element_7.unsignedCharValue); + } + nonNullValue_6 = ListType_7(listHolder_7->mList, self.playbackPreferences.textTrack.characteristics.count); + } else { + nonNullValue_6 = ListType_7(); + } } - auto element_4 = (NSNumber *) self.playbackPreferences.textTrack.characteristics[i_4]; - listHolder_4->mList[i_4] = static_castmList[i_4])>>(element_4.unsignedCharValue); } - definedValue_3 = ListType_4(listHolder_4->mList, self.playbackPreferences.textTrack.characteristics.count); - } else { - definedValue_3 = ListType_4(); + } + if (self.playbackPreferences.textTrack.audioOutputIndex != nil) { + auto & definedValue_5 = nonNullValue_3.audioOutputIndex.Emplace(); + if (self.playbackPreferences.textTrack.audioOutputIndex == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + nonNullValue_6 = self.playbackPreferences.textTrack.audioOutputIndex.unsignedCharValue; + } } } } - definedValue_0.textTrack.audioOutputIndex = self.playbackPreferences.textTrack.audioOutputIndex.unsignedCharValue; if (self.playbackPreferences.audioTracks != nil) { auto & definedValue_2 = definedValue_0.audioTracks.Emplace(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - if (self.playbackPreferences.audioTracks.count != 0) { - auto * listHolder_3 = new ListHolder(self.playbackPreferences.audioTracks.count); - if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_3); - for (size_t i_3 = 0; i_3 < self.playbackPreferences.audioTracks.count; ++i_3) { - if (![self.playbackPreferences.audioTracks[i_3] isKindOfClass:[MTRContentLauncherClusterTrackPreferenceStruct class]]) { - // Wrong kind of value. + if (self.playbackPreferences.audioTracks == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + { + using ListType_4 = std::remove_reference_t; + using ListMemberType_4 = ListMemberTypeGetter::Type; + if (self.playbackPreferences.audioTracks.count != 0) { + auto * listHolder_4 = new ListHolder(self.playbackPreferences.audioTracks.count); + if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_3 = (MTRContentLauncherClusterTrackPreferenceStruct *) self.playbackPreferences.audioTracks[i_3]; - listHolder_3->mList[i_3].languageCode = AsCharSpan(element_3.languageCode); - if (element_3.characteristics != nil) { - auto & definedValue_5 = listHolder_3->mList[i_3].characteristics.Emplace(); - { - using ListType_6 = std::remove_reference_t; - using ListMemberType_6 = ListMemberTypeGetter::Type; - if (element_3.characteristics.count != 0) { - auto * listHolder_6 = new ListHolder(element_3.characteristics.count); - if (listHolder_6 == nullptr || listHolder_6->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_6); - for (size_t i_6 = 0; i_6 < element_3.characteristics.count; ++i_6) { - if (![element_3.characteristics[i_6] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; + listFreer.add(listHolder_4); + for (size_t i_4 = 0; i_4 < self.playbackPreferences.audioTracks.count; ++i_4) { + if (![self.playbackPreferences.audioTracks[i_4] isKindOfClass:[MTRContentLauncherClusterTrackPreferenceStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_4 = (MTRContentLauncherClusterTrackPreferenceStruct *) self.playbackPreferences.audioTracks[i_4]; + listHolder_4->mList[i_4].languageCode = AsCharSpan(element_4.languageCode); + if (element_4.characteristics != nil) { + auto & definedValue_6 = listHolder_4->mList[i_4].characteristics.Emplace(); + if (element_4.characteristics == nil) { + definedValue_6.SetNull(); + } else { + auto & nonNullValue_7 = definedValue_6.SetNonNull(); + { + using ListType_8 = std::remove_reference_t; + using ListMemberType_8 = ListMemberTypeGetter::Type; + if (element_4.characteristics.count != 0) { + auto * listHolder_8 = new ListHolder(element_4.characteristics.count); + if (listHolder_8 == nullptr || listHolder_8->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_8); + for (size_t i_8 = 0; i_8 < element_4.characteristics.count; ++i_8) { + if (![element_4.characteristics[i_8] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_8 = (NSNumber *) element_4.characteristics[i_8]; + listHolder_8->mList[i_8] = static_castmList[i_8])>>(element_8.unsignedCharValue); + } + nonNullValue_7 = ListType_8(listHolder_8->mList, element_4.characteristics.count); + } else { + nonNullValue_7 = ListType_8(); } - auto element_6 = (NSNumber *) element_3.characteristics[i_6]; - listHolder_6->mList[i_6] = static_castmList[i_6])>>(element_6.unsignedCharValue); } - definedValue_5 = ListType_6(listHolder_6->mList, element_3.characteristics.count); + } + } + if (element_4.audioOutputIndex != nil) { + auto & definedValue_6 = listHolder_4->mList[i_4].audioOutputIndex.Emplace(); + if (element_4.audioOutputIndex == nil) { + definedValue_6.SetNull(); } else { - definedValue_5 = ListType_6(); + auto & nonNullValue_7 = definedValue_6.SetNonNull(); + nonNullValue_7 = element_4.audioOutputIndex.unsignedCharValue; } } } - listHolder_3->mList[i_3].audioOutputIndex = element_3.audioOutputIndex.unsignedCharValue; + nonNullValue_3 = ListType_4(listHolder_4->mList, self.playbackPreferences.audioTracks.count); + } else { + nonNullValue_3 = ListType_4(); } - definedValue_2 = ListType_3(listHolder_3->mList, self.playbackPreferences.audioTracks.count); - } else { - definedValue_2 = ListType_3(); } } } @@ -27348,6 +27419,8 @@ - (instancetype)init _displayString = nil; _brandingInformation = nil; + + _playbackPreferences = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -27361,6 +27434,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.contentURL = self.contentURL; other.displayString = self.displayString; other.brandingInformation = self.brandingInformation; + other.playbackPreferences = self.playbackPreferences; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -27369,7 +27443,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: contentURL:%@; displayString:%@; brandingInformation:%@; >", NSStringFromClass([self class]), _contentURL, _displayString, _brandingInformation]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: contentURL:%@; displayString:%@; brandingInformation:%@; playbackPreferences:%@; >", NSStringFromClass([self class]), _contentURL, _displayString, _brandingInformation, _playbackPreferences]; return descriptionString; } @@ -27481,6 +27555,137 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } } } + { + if (self.playbackPreferences != nil) { + auto & definedValue_0 = encodableStruct.playbackPreferences.Emplace(); + if (self.playbackPreferences.playbackPosition != nil) { + auto & definedValue_2 = definedValue_0.playbackPosition.Emplace(); + if (self.playbackPreferences.playbackPosition == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = self.playbackPreferences.playbackPosition.unsignedLongLongValue; + } + } + if (self.playbackPreferences.textTrack != nil) { + auto & definedValue_2 = definedValue_0.textTrack.Emplace(); + if (self.playbackPreferences.textTrack == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3.languageCode = AsCharSpan(self.playbackPreferences.textTrack.languageCode); + if (self.playbackPreferences.textTrack.characteristics != nil) { + auto & definedValue_5 = nonNullValue_3.characteristics.Emplace(); + if (self.playbackPreferences.textTrack.characteristics == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + { + using ListType_7 = std::remove_reference_t; + using ListMemberType_7 = ListMemberTypeGetter::Type; + if (self.playbackPreferences.textTrack.characteristics.count != 0) { + auto * listHolder_7 = new ListHolder(self.playbackPreferences.textTrack.characteristics.count); + if (listHolder_7 == nullptr || listHolder_7->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_7); + for (size_t i_7 = 0; i_7 < self.playbackPreferences.textTrack.characteristics.count; ++i_7) { + if (![self.playbackPreferences.textTrack.characteristics[i_7] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_7 = (NSNumber *) self.playbackPreferences.textTrack.characteristics[i_7]; + listHolder_7->mList[i_7] = static_castmList[i_7])>>(element_7.unsignedCharValue); + } + nonNullValue_6 = ListType_7(listHolder_7->mList, self.playbackPreferences.textTrack.characteristics.count); + } else { + nonNullValue_6 = ListType_7(); + } + } + } + } + if (self.playbackPreferences.textTrack.audioOutputIndex != nil) { + auto & definedValue_5 = nonNullValue_3.audioOutputIndex.Emplace(); + if (self.playbackPreferences.textTrack.audioOutputIndex == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + nonNullValue_6 = self.playbackPreferences.textTrack.audioOutputIndex.unsignedCharValue; + } + } + } + } + if (self.playbackPreferences.audioTracks != nil) { + auto & definedValue_2 = definedValue_0.audioTracks.Emplace(); + if (self.playbackPreferences.audioTracks == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + { + using ListType_4 = std::remove_reference_t; + using ListMemberType_4 = ListMemberTypeGetter::Type; + if (self.playbackPreferences.audioTracks.count != 0) { + auto * listHolder_4 = new ListHolder(self.playbackPreferences.audioTracks.count); + if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_4); + for (size_t i_4 = 0; i_4 < self.playbackPreferences.audioTracks.count; ++i_4) { + if (![self.playbackPreferences.audioTracks[i_4] isKindOfClass:[MTRContentLauncherClusterTrackPreferenceStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_4 = (MTRContentLauncherClusterTrackPreferenceStruct *) self.playbackPreferences.audioTracks[i_4]; + listHolder_4->mList[i_4].languageCode = AsCharSpan(element_4.languageCode); + if (element_4.characteristics != nil) { + auto & definedValue_6 = listHolder_4->mList[i_4].characteristics.Emplace(); + if (element_4.characteristics == nil) { + definedValue_6.SetNull(); + } else { + auto & nonNullValue_7 = definedValue_6.SetNonNull(); + { + using ListType_8 = std::remove_reference_t; + using ListMemberType_8 = ListMemberTypeGetter::Type; + if (element_4.characteristics.count != 0) { + auto * listHolder_8 = new ListHolder(element_4.characteristics.count); + if (listHolder_8 == nullptr || listHolder_8->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_8); + for (size_t i_8 = 0; i_8 < element_4.characteristics.count; ++i_8) { + if (![element_4.characteristics[i_8] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_8 = (NSNumber *) element_4.characteristics[i_8]; + listHolder_8->mList[i_8] = static_castmList[i_8])>>(element_8.unsignedCharValue); + } + nonNullValue_7 = ListType_8(listHolder_8->mList, element_4.characteristics.count); + } else { + nonNullValue_7 = ListType_8(); + } + } + } + } + if (element_4.audioOutputIndex != nil) { + auto & definedValue_6 = listHolder_4->mList[i_4].audioOutputIndex.Emplace(); + if (element_4.audioOutputIndex == nil) { + definedValue_6.SetNull(); + } else { + auto & nonNullValue_7 = definedValue_6.SetNonNull(); + nonNullValue_7 = element_4.audioOutputIndex.unsignedCharValue; + } + } + } + nonNullValue_3 = ListType_4(listHolder_4->mList, self.playbackPreferences.audioTracks.count); + } else { + nonNullValue_3 = ListType_4(); + } + } + } + } + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -28479,7 +28684,7 @@ - (instancetype)init { if (self = [super init]) { - _oldPIN = nil; + _oldPIN = @""; _newPIN = @""; _timedInvokeTimeoutMs = nil; @@ -28515,10 +28720,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader chip::app::Clusters::ContentControl::Commands::UpdatePIN::Type encodableStruct; ListFreer listFreer; { - if (self.oldPIN != nil) { - auto & definedValue_0 = encodableStruct.oldPIN.Emplace(); - definedValue_0 = AsCharSpan(self.oldPIN); - } + encodableStruct.oldPIN = AsCharSpan(self.oldPIN); } { encodableStruct.newPIN = AsCharSpan(self.newPIN); @@ -28871,7 +29073,7 @@ - (instancetype)init _pinCode = nil; - _bonusTime = nil; + _bonusTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -28911,10 +29113,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } } { - if (self.bonusTime != nil) { - auto & definedValue_0 = encodableStruct.bonusTime.Emplace(); - definedValue_0 = self.bonusTime.unsignedIntValue; - } + encodableStruct.bonusTime = self.bonusTime.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -29338,14 +29537,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRContentAppObserverClusterContentAppMessageParams +@implementation MTRContentControlClusterAddBlockChannelsParams - (instancetype)init { if (self = [super init]) { - _data = nil; - - _encodingHint = @""; + _channels = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -29354,10 +29551,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRContentAppObserverClusterContentAppMessageParams alloc] init]; + auto other = [[MTRContentControlClusterAddBlockChannelsParams alloc] init]; - other.data = self.data; - other.encodingHint = self.encodingHint; + other.channels = self.channels; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -29366,26 +29562,652 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: data:%@; encodingHint:%@; >", NSStringFromClass([self class]), _data, _encodingHint]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: channels:%@; >", NSStringFromClass([self class]), _channels]; return descriptionString; } @end -@implementation MTRContentAppObserverClusterContentAppMessageParams (InternalMethods) +@implementation MTRContentControlClusterAddBlockChannelsParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::Type encodableStruct; + chip::app::Clusters::ContentControl::Commands::AddBlockChannels::Type encodableStruct; ListFreer listFreer; { - if (self.data != nil) { - auto & definedValue_0 = encodableStruct.data.Emplace(); - definedValue_0 = AsCharSpan(self.data); + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.channels.count != 0) { + auto * listHolder_0 = new ListHolder(self.channels.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.channels.count; ++i_0) { + if (![self.channels[i_0] isKindOfClass:[MTRContentControlClusterBlockChannelStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRContentControlClusterBlockChannelStruct *) self.channels[i_0]; + if (element_0.blockChannelIndex == nil) { + listHolder_0->mList[i_0].blockChannelIndex.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].blockChannelIndex.SetNonNull(); + nonNullValue_2 = element_0.blockChannelIndex.unsignedShortValue; + } + listHolder_0->mList[i_0].majorNumber = element_0.majorNumber.unsignedShortValue; + listHolder_0->mList[i_0].minorNumber = element_0.minorNumber.unsignedShortValue; + if (element_0.identifier != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].identifier.Emplace(); + definedValue_2 = AsCharSpan(element_0.identifier); + } + } + encodableStruct.channels = ListType_0(listHolder_0->mList, self.channels.count); + } else { + encodableStruct.channels = ListType_0(); + } } } - { - encodableStruct.encodingHint = AsCharSpan(self.encodingHint); + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRContentControlClusterRemoveBlockChannelsParams +- (instancetype)init +{ + if (self = [super init]) { + + _channelIndexes = [NSArray array]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRContentControlClusterRemoveBlockChannelsParams alloc] init]; + + other.channelIndexes = self.channelIndexes; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: channelIndexes:%@; >", NSStringFromClass([self class]), _channelIndexes]; + return descriptionString; +} + +@end + +@implementation MTRContentControlClusterRemoveBlockChannelsParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ContentControl::Commands::RemoveBlockChannels::Type encodableStruct; + ListFreer listFreer; + { + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.channelIndexes.count != 0) { + auto * listHolder_0 = new ListHolder(self.channelIndexes.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.channelIndexes.count; ++i_0) { + if (![self.channelIndexes[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) self.channelIndexes[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedShortValue; + } + encodableStruct.channelIndexes = ListType_0(listHolder_0->mList, self.channelIndexes.count); + } else { + encodableStruct.channelIndexes = ListType_0(); + } + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRContentControlClusterAddBlockApplicationsParams +- (instancetype)init +{ + if (self = [super init]) { + + _applications = [NSArray array]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRContentControlClusterAddBlockApplicationsParams alloc] init]; + + other.applications = self.applications; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: applications:%@; >", NSStringFromClass([self class]), _applications]; + return descriptionString; +} + +@end + +@implementation MTRContentControlClusterAddBlockApplicationsParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ContentControl::Commands::AddBlockApplications::Type encodableStruct; + ListFreer listFreer; + { + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.applications.count != 0) { + auto * listHolder_0 = new ListHolder(self.applications.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.applications.count; ++i_0) { + if (![self.applications[i_0] isKindOfClass:[MTRContentControlClusterAppInfoStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRContentControlClusterAppInfoStruct *) self.applications[i_0]; + listHolder_0->mList[i_0].catalogVendorID = element_0.catalogVendorID.unsignedShortValue; + listHolder_0->mList[i_0].applicationID = AsCharSpan(element_0.applicationID); + } + encodableStruct.applications = ListType_0(listHolder_0->mList, self.applications.count); + } else { + encodableStruct.applications = ListType_0(); + } + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRContentControlClusterRemoveBlockApplicationsParams +- (instancetype)init +{ + if (self = [super init]) { + + _applications = [NSArray array]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRContentControlClusterRemoveBlockApplicationsParams alloc] init]; + + other.applications = self.applications; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: applications:%@; >", NSStringFromClass([self class]), _applications]; + return descriptionString; +} + +@end + +@implementation MTRContentControlClusterRemoveBlockApplicationsParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ContentControl::Commands::RemoveBlockApplications::Type encodableStruct; + ListFreer listFreer; + { + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.applications.count != 0) { + auto * listHolder_0 = new ListHolder(self.applications.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.applications.count; ++i_0) { + if (![self.applications[i_0] isKindOfClass:[MTRContentControlClusterAppInfoStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRContentControlClusterAppInfoStruct *) self.applications[i_0]; + listHolder_0->mList[i_0].catalogVendorID = element_0.catalogVendorID.unsignedShortValue; + listHolder_0->mList[i_0].applicationID = AsCharSpan(element_0.applicationID); + } + encodableStruct.applications = ListType_0(listHolder_0->mList, self.applications.count); + } else { + encodableStruct.applications = ListType_0(); + } + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRContentControlClusterSetBlockContentTimeWindowParams +- (instancetype)init +{ + if (self = [super init]) { + + _timeWindow = [MTRContentControlClusterTimeWindowStruct new]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRContentControlClusterSetBlockContentTimeWindowParams alloc] init]; + + other.timeWindow = self.timeWindow; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeWindow:%@; >", NSStringFromClass([self class]), _timeWindow]; + return descriptionString; +} + +@end + +@implementation MTRContentControlClusterSetBlockContentTimeWindowParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ContentControl::Commands::SetBlockContentTimeWindow::Type encodableStruct; + ListFreer listFreer; + { + if (self.timeWindow.timeWindowIndex == nil) { + encodableStruct.timeWindow.timeWindowIndex.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.timeWindow.timeWindowIndex.SetNonNull(); + nonNullValue_1 = self.timeWindow.timeWindowIndex.unsignedShortValue; + } + encodableStruct.timeWindow.dayOfWeek = static_cast>(self.timeWindow.dayOfWeek.unsignedCharValue); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (self.timeWindow.timePeriod.count != 0) { + auto * listHolder_1 = new ListHolder(self.timeWindow.timePeriod.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < self.timeWindow.timePeriod.count; ++i_1) { + if (![self.timeWindow.timePeriod[i_1] isKindOfClass:[MTRContentControlClusterTimePeriodStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_1 = (MTRContentControlClusterTimePeriodStruct *) self.timeWindow.timePeriod[i_1]; + listHolder_1->mList[i_1].startHour = element_1.startHour.unsignedCharValue; + listHolder_1->mList[i_1].startMinute = element_1.startMinute.unsignedCharValue; + listHolder_1->mList[i_1].endHour = element_1.endHour.unsignedCharValue; + listHolder_1->mList[i_1].endMinute = element_1.endMinute.unsignedCharValue; + } + encodableStruct.timeWindow.timePeriod = ListType_1(listHolder_1->mList, self.timeWindow.timePeriod.count); + } else { + encodableStruct.timeWindow.timePeriod = ListType_1(); + } + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRContentControlClusterRemoveBlockContentTimeWindowParams +- (instancetype)init +{ + if (self = [super init]) { + + _timeWindowIndexes = [NSArray array]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRContentControlClusterRemoveBlockContentTimeWindowParams alloc] init]; + + other.timeWindowIndexes = self.timeWindowIndexes; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeWindowIndexes:%@; >", NSStringFromClass([self class]), _timeWindowIndexes]; + return descriptionString; +} + +@end + +@implementation MTRContentControlClusterRemoveBlockContentTimeWindowParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ContentControl::Commands::RemoveBlockContentTimeWindow::Type encodableStruct; + ListFreer listFreer; + { + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.timeWindowIndexes.count != 0) { + auto * listHolder_0 = new ListHolder(self.timeWindowIndexes.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.timeWindowIndexes.count; ++i_0) { + if (![self.timeWindowIndexes[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) self.timeWindowIndexes[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedShortValue; + } + encodableStruct.timeWindowIndexes = ListType_0(listHolder_0->mList, self.timeWindowIndexes.count); + } else { + encodableStruct.timeWindowIndexes = ListType_0(); + } + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRContentAppObserverClusterContentAppMessageParams +- (instancetype)init +{ + if (self = [super init]) { + + _data = @""; + + _encodingHint = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRContentAppObserverClusterContentAppMessageParams alloc] init]; + + other.data = self.data; + other.encodingHint = self.encodingHint; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: data:%@; encodingHint:%@; >", NSStringFromClass([self class]), _data, _encodingHint]; + return descriptionString; +} + +@end + +@implementation MTRContentAppObserverClusterContentAppMessageParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.data = AsCharSpan(self.data); + } + { + if (self.encodingHint != nil) { + auto & definedValue_0 = encodableStruct.encodingHint.Emplace(); + definedValue_0 = AsCharSpan(self.encodingHint); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 2579d3bc49a9bd..7426a70c96a6fc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -1906,6 +1906,42 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRContentControlClusterAddBlockChannelsParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterRemoveBlockChannelsParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterAddBlockApplicationsParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterRemoveBlockApplicationsParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterSetBlockContentTimeWindowParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRContentControlClusterRemoveBlockContentTimeWindowParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + @interface MTRContentAppObserverClusterContentAppMessageParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm index 685ca8f4f035a9..a61dbfb9c60b8e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm @@ -1077,6 +1077,18 @@ static BOOL CommandNeedsTimedInvokeInContentControlCluster(AttributeId aAttribut { using namespace Clusters::ContentControl; switch (aAttributeId) { + case Commands::UpdatePIN::Id: { + return YES; + } + case Commands::ResetPIN::Id: { + return YES; + } + case Commands::Enable::Id: { + return YES; + } + case Commands::Disable::Id: { + return YES; + } default: { return NO; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 3e36773ffebd99..e665b0160f3fa1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -4073,40 +4073,52 @@ static id _Nullable DecodeEventPayloadForTargetNavigatorCluster(EventId aEventId __auto_type * value = [MTRTargetNavigatorClusterTargetUpdatedEvent new]; do { - NSArray * _Nonnull memberValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.targetList.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRTargetNavigatorClusterTargetInfoStruct * newElement_0; - newElement_0 = [MTRTargetNavigatorClusterTargetInfoStruct new]; - newElement_0.identifier = [NSNumber numberWithUnsignedChar:entry_0.identifier]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + NSArray * _Nullable memberValue; + if (cppValue.targetList.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = cppValue.targetList.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + MTRTargetNavigatorClusterTargetInfoStruct * newElement_1; + newElement_1 = [MTRTargetNavigatorClusterTargetInfoStruct new]; + newElement_1.identifier = [NSNumber numberWithUnsignedChar:entry_1.identifier]; + newElement_1.name = AsString(entry_1.name); + if (newElement_1.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { *aError = err; return nil; } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; + memberValue = array_1; } - memberValue = array_0; + } else { + memberValue = nil; } value.targetList = memberValue; } while (0); do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedChar:cppValue.currentTarget]; + NSNumber * _Nullable memberValue; + if (cppValue.currentTarget.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:cppValue.currentTarget.Value()]; + } else { + memberValue = nil; + } value.currentTarget = memberValue; } while (0); do { - NSData * _Nonnull memberValue; - memberValue = AsData(cppValue.data); + NSData * _Nullable memberValue; + if (cppValue.data.HasValue()) { + memberValue = AsData(cppValue.data.Value()); + } else { + memberValue = nil; + } value.data = memberValue; } while (0); @@ -4139,39 +4151,63 @@ static id _Nullable DecodeEventPayloadForMediaPlaybackCluster(EventId aEventId, value.currentState = memberValue; } while (0); do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.startTime]; + NSNumber * _Nullable memberValue; + if (cppValue.startTime.HasValue()) { + memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.startTime.Value()]; + } else { + memberValue = nil; + } value.startTime = memberValue; } while (0); do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.duration]; + NSNumber * _Nullable memberValue; + if (cppValue.duration.HasValue()) { + memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.duration.Value()]; + } else { + memberValue = nil; + } value.duration = memberValue; } while (0); do { - MTRMediaPlaybackClusterPlaybackPositionStruct * _Nonnull memberValue; - memberValue = [MTRMediaPlaybackClusterPlaybackPositionStruct new]; - memberValue.updatedAt = [NSNumber numberWithUnsignedLongLong:cppValue.sampledPosition.updatedAt]; - if (cppValue.sampledPosition.position.IsNull()) { - memberValue.position = nil; + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable memberValue; + if (cppValue.sampledPosition.HasValue()) { + memberValue = [MTRMediaPlaybackClusterPlaybackPositionStruct new]; + memberValue.updatedAt = [NSNumber numberWithUnsignedLongLong:cppValue.sampledPosition.Value().updatedAt]; + if (cppValue.sampledPosition.Value().position.IsNull()) { + memberValue.position = nil; + } else { + memberValue.position = [NSNumber numberWithUnsignedLongLong:cppValue.sampledPosition.Value().position.Value()]; + } } else { - memberValue.position = [NSNumber numberWithUnsignedLongLong:cppValue.sampledPosition.position.Value()]; + memberValue = nil; } value.sampledPosition = memberValue; } while (0); do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithFloat:cppValue.playbackSpeed]; + NSNumber * _Nullable memberValue; + if (cppValue.playbackSpeed.HasValue()) { + memberValue = [NSNumber numberWithFloat:cppValue.playbackSpeed.Value()]; + } else { + memberValue = nil; + } value.playbackSpeed = memberValue; } while (0); do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.seekRangeEnd]; + NSNumber * _Nullable memberValue; + if (cppValue.seekRangeEnd.HasValue()) { + memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.seekRangeEnd.Value()]; + } else { + memberValue = nil; + } value.seekRangeEnd = memberValue; } while (0); do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.seekRangeStart]; + NSNumber * _Nullable memberValue; + if (cppValue.seekRangeStart.HasValue()) { + memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.seekRangeStart.Value()]; + } else { + memberValue = nil; + } value.seekRangeStart = memberValue; } while (0); do { @@ -4184,8 +4220,12 @@ static id _Nullable DecodeEventPayloadForMediaPlaybackCluster(EventId aEventId, value.data = memberValue; } while (0); do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithBool:cppValue.audioAdvanceUnmuted]; + NSNumber * _Nullable memberValue; + if (cppValue.audioAdvanceUnmuted.HasValue()) { + memberValue = [NSNumber numberWithBool:cppValue.audioAdvanceUnmuted.Value()]; + } else { + memberValue = nil; + } value.audioAdvanceUnmuted = memberValue; } while (0); @@ -4305,6 +4345,11 @@ static id _Nullable DecodeEventPayloadForAccountLoginCluster(EventId aEventId, T } value.node = memberValue; } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.fabricIndex]; + value.fabricIndex = memberValue; + } while (0); return value; } @@ -4331,6 +4376,17 @@ static id _Nullable DecodeEventPayloadForContentControlCluster(EventId aEventId, return value; } + case Events::EnteringBlockContentTimeWindow::Id: { + Events::EnteringBlockContentTimeWindow::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRContentControlClusterEnteringBlockContentTimeWindowEvent new]; + + return value; + } default: { break; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 92bd095b954393..ec7ea7e5a88945 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1637,6 +1637,12 @@ MTR_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct", @property (nonatomic, copy) NSNumber * _Nullable coolSetpoint MTR_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRChannelClusterAdditionalInfoStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull name MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull value MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRChannelClusterProgramCastStruct : NSObject @property (nonatomic, copy) NSString * _Nonnull name MTR_PROVISIONALLY_AVAILABLE; @@ -1711,12 +1717,6 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) MTRChannelClusterPageTokenStruct * _Nullable nextToken MTR_PROVISIONALLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRChannelClusterAdditionalInfoStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull name MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nonnull value MTR_PROVISIONALLY_AVAILABLE; -@end - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRChannelClusterLineupInfoStruct : NSObject @property (nonatomic, copy) NSString * _Nonnull operatorName MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1747,21 +1747,22 @@ MTR_DEPRECATED("Please use MTRTargetNavigatorClusterTargetInfoStruct", ios(16.1, MTR_PROVISIONALLY_AVAILABLE @interface MTRTargetNavigatorClusterTargetUpdatedEvent : NSObject -@property (nonatomic, copy) NSArray * _Nonnull targetList MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull currentTarget MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nonnull data MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable targetList MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable currentTarget MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable data MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE @interface MTRMediaPlaybackClusterTrackAttributesStruct : NSObject @property (nonatomic, copy) NSString * _Nonnull languageCode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable characteristics MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSString * _Nullable displayName MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE @interface MTRMediaPlaybackClusterTrackStruct : NSObject @property (nonatomic, copy) NSString * _Nonnull id MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) MTRMediaPlaybackClusterTrackAttributesStruct * _Nullable trackAttributes MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRMediaPlaybackClusterTrackAttributesStruct * _Nonnull trackAttributes MTR_PROVISIONALLY_AVAILABLE; @end MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1779,14 +1780,14 @@ MTR_DEPRECATED("Please use MTRMediaPlaybackClusterPlaybackPositionStruct", ios(1 MTR_PROVISIONALLY_AVAILABLE @interface MTRMediaPlaybackClusterStateChangedEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull currentState MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull startTime MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) MTRMediaPlaybackClusterPlaybackPositionStruct * _Nonnull sampledPosition MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull playbackSpeed MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull seekRangeEnd MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull seekRangeStart MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable startTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable duration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable sampledPosition MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable playbackSpeed MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable seekRangeEnd MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable seekRangeStart MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSData * _Nullable data MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull audioAdvanceUnmuted MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable audioAdvanceUnmuted MTR_PROVISIONALLY_AVAILABLE; @end MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1823,13 +1824,13 @@ MTR_PROVISIONALLY_AVAILABLE @interface MTRContentLauncherClusterTrackPreferenceStruct : NSObject @property (nonatomic, copy) NSString * _Nonnull languageCode MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSArray * _Nullable characteristics MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull audioOutputIndex MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable audioOutputIndex MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE @interface MTRContentLauncherClusterPlaybackPreferencesStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull playbackPosition MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) MTRContentLauncherClusterTrackPreferenceStruct * _Nonnull textTrack MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable playbackPosition MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRContentLauncherClusterTrackPreferenceStruct * _Nullable textTrack MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSArray * _Nullable audioTracks MTR_PROVISIONALLY_AVAILABLE; @end @@ -1956,6 +1957,36 @@ MTR_DEPRECATED("Please use MTRApplicationBasicClusterApplicationStruct", ios(16. MTR_PROVISIONALLY_AVAILABLE @interface MTRAccountLoginClusterLoggedOutEvent : NSObject @property (nonatomic, copy) NSNumber * _Nullable node MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterTimePeriodStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull startHour MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull startMinute MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull endHour MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull endMinute MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterTimeWindowStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nullable timeWindowIndex MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeek MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull timePeriod MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterAppInfoStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull catalogVendorID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull applicationID MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterBlockChannelStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nullable blockChannelIndex MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull majorNumber MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull minorNumber MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable identifier MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE @@ -1968,6 +1999,10 @@ MTR_PROVISIONALLY_AVAILABLE @interface MTRContentControlClusterRemainingScreenTimeExpiredEvent : NSObject @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRContentControlClusterEnteringBlockContentTimeWindowEvent : NSObject +@end + MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRUnitTestingClusterSimpleStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull a MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index c9c38c72710756..d15b815d9008cf 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -6884,6 +6884,36 @@ @implementation MTRThermostatClusterThermostatScheduleTransition : MTRThermostat @dynamic coolSetpoint; @end +@implementation MTRChannelClusterAdditionalInfoStruct +- (instancetype)init +{ + if (self = [super init]) { + + _name = @""; + + _value = @""; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRChannelClusterAdditionalInfoStruct alloc] init]; + + other.name = self.name; + other.value = self.value; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: name:%@; value:%@; >", NSStringFromClass([self class]), _name, _value]; + return descriptionString; +} + +@end + @implementation MTRChannelClusterProgramCastStruct - (instancetype)init { @@ -7171,36 +7201,6 @@ - (NSString *)description @end -@implementation MTRChannelClusterAdditionalInfoStruct -- (instancetype)init -{ - if (self = [super init]) { - - _name = @""; - - _value = @""; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRChannelClusterAdditionalInfoStruct alloc] init]; - - other.name = self.name; - other.value = self.value; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: name:%@; value:%@; >", NSStringFromClass([self class]), _name, _value]; - return descriptionString; -} - -@end - @implementation MTRChannelClusterLineupInfoStruct - (instancetype)init { @@ -7284,11 +7284,11 @@ - (instancetype)init { if (self = [super init]) { - _targetList = [NSArray array]; + _targetList = nil; - _currentTarget = @(0); + _currentTarget = nil; - _data = [NSData data]; + _data = nil; } return self; } @@ -7319,6 +7319,8 @@ - (instancetype)init _languageCode = @""; + _characteristics = nil; + _displayName = nil; } return self; @@ -7329,6 +7331,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone auto other = [[MTRMediaPlaybackClusterTrackAttributesStruct alloc] init]; other.languageCode = self.languageCode; + other.characteristics = self.characteristics; other.displayName = self.displayName; return other; @@ -7336,7 +7339,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: languageCode:%@; displayName:%@; >", NSStringFromClass([self class]), _languageCode, _displayName]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: languageCode:%@; characteristics:%@; displayName:%@; >", NSStringFromClass([self class]), _languageCode, _characteristics, _displayName]; return descriptionString; } @@ -7349,7 +7352,7 @@ - (instancetype)init _id = @""; - _trackAttributes = nil; + _trackAttributes = [MTRMediaPlaybackClusterTrackAttributesStruct new]; } return self; } @@ -7414,21 +7417,21 @@ - (instancetype)init _currentState = @(0); - _startTime = @(0); + _startTime = nil; - _duration = @(0); + _duration = nil; - _sampledPosition = [MTRMediaPlaybackClusterPlaybackPositionStruct new]; + _sampledPosition = nil; - _playbackSpeed = @(0); + _playbackSpeed = nil; - _seekRangeEnd = @(0); + _seekRangeEnd = nil; - _seekRangeStart = @(0); + _seekRangeStart = nil; _data = nil; - _audioAdvanceUnmuted = @(0); + _audioAdvanceUnmuted = nil; } return self; } @@ -7549,7 +7552,7 @@ - (instancetype)init _characteristics = nil; - _audioOutputIndex = @(0); + _audioOutputIndex = nil; } return self; } @@ -7578,9 +7581,9 @@ - (instancetype)init { if (self = [super init]) { - _playbackPosition = @(0); + _playbackPosition = nil; - _textTrack = [MTRContentLauncherClusterTrackPreferenceStruct new]; + _textTrack = nil; _audioTracks = nil; } @@ -7996,6 +7999,8 @@ - (instancetype)init if (self = [super init]) { _node = nil; + + _fabricIndex = @(0); } return self; } @@ -8005,13 +8010,149 @@ - (id)copyWithZone:(NSZone * _Nullable)zone auto other = [[MTRAccountLoginClusterLoggedOutEvent alloc] init]; other.node = self.node; + other.fabricIndex = self.fabricIndex; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: node:%@; >", NSStringFromClass([self class]), _node]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: node:%@; fabricIndex:%@; >", NSStringFromClass([self class]), _node, _fabricIndex]; + return descriptionString; +} + +@end + +@implementation MTRContentControlClusterTimePeriodStruct +- (instancetype)init +{ + if (self = [super init]) { + + _startHour = @(0); + + _startMinute = @(0); + + _endHour = @(0); + + _endMinute = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRContentControlClusterTimePeriodStruct alloc] init]; + + other.startHour = self.startHour; + other.startMinute = self.startMinute; + other.endHour = self.endHour; + other.endMinute = self.endMinute; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: startHour:%@; startMinute:%@; endHour:%@; endMinute:%@; >", NSStringFromClass([self class]), _startHour, _startMinute, _endHour, _endMinute]; + return descriptionString; +} + +@end + +@implementation MTRContentControlClusterTimeWindowStruct +- (instancetype)init +{ + if (self = [super init]) { + + _timeWindowIndex = nil; + + _dayOfWeek = @(0); + + _timePeriod = [NSArray array]; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRContentControlClusterTimeWindowStruct alloc] init]; + + other.timeWindowIndex = self.timeWindowIndex; + other.dayOfWeek = self.dayOfWeek; + other.timePeriod = self.timePeriod; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeWindowIndex:%@; dayOfWeek:%@; timePeriod:%@; >", NSStringFromClass([self class]), _timeWindowIndex, _dayOfWeek, _timePeriod]; + return descriptionString; +} + +@end + +@implementation MTRContentControlClusterAppInfoStruct +- (instancetype)init +{ + if (self = [super init]) { + + _catalogVendorID = @(0); + + _applicationID = @""; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRContentControlClusterAppInfoStruct alloc] init]; + + other.catalogVendorID = self.catalogVendorID; + other.applicationID = self.applicationID; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: catalogVendorID:%@; applicationID:%@; >", NSStringFromClass([self class]), _catalogVendorID, _applicationID]; + return descriptionString; +} + +@end + +@implementation MTRContentControlClusterBlockChannelStruct +- (instancetype)init +{ + if (self = [super init]) { + + _blockChannelIndex = nil; + + _majorNumber = @(0); + + _minorNumber = @(0); + + _identifier = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRContentControlClusterBlockChannelStruct alloc] init]; + + other.blockChannelIndex = self.blockChannelIndex; + other.majorNumber = self.majorNumber; + other.minorNumber = self.minorNumber; + other.identifier = self.identifier; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: blockChannelIndex:%@; majorNumber:%@; minorNumber:%@; identifier:%@; >", NSStringFromClass([self class]), _blockChannelIndex, _majorNumber, _minorNumber, _identifier]; return descriptionString; } @@ -8070,6 +8211,29 @@ - (NSString *)description @end +@implementation MTRContentControlClusterEnteringBlockContentTimeWindowEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRContentControlClusterEnteringBlockContentTimeWindowEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + @implementation MTRUnitTestingClusterSimpleStruct - (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 350190a22e5762..aa85515034bf07 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -6396,6 +6396,42 @@ bool emberAfContentControlClusterSetOnDemandRatingThresholdCallback( bool emberAfContentControlClusterSetScheduledContentRatingThresholdCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::ContentControl::Commands::SetScheduledContentRatingThreshold::DecodableType & commandData); +/** + * @brief Content Control Cluster AddBlockChannels Command callback (from client) + */ +bool emberAfContentControlClusterAddBlockChannelsCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::AddBlockChannels::DecodableType & commandData); +/** + * @brief Content Control Cluster RemoveBlockChannels Command callback (from client) + */ +bool emberAfContentControlClusterRemoveBlockChannelsCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::RemoveBlockChannels::DecodableType & commandData); +/** + * @brief Content Control Cluster AddBlockApplications Command callback (from client) + */ +bool emberAfContentControlClusterAddBlockApplicationsCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::AddBlockApplications::DecodableType & commandData); +/** + * @brief Content Control Cluster RemoveBlockApplications Command callback (from client) + */ +bool emberAfContentControlClusterRemoveBlockApplicationsCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::RemoveBlockApplications::DecodableType & commandData); +/** + * @brief Content Control Cluster SetBlockContentTimeWindow Command callback (from client) + */ +bool emberAfContentControlClusterSetBlockContentTimeWindowCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::SetBlockContentTimeWindow::DecodableType & commandData); +/** + * @brief Content Control Cluster RemoveBlockContentTimeWindow Command callback (from client) + */ +bool emberAfContentControlClusterRemoveBlockContentTimeWindowCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentControl::Commands::RemoveBlockContentTimeWindow::DecodableType & commandData); /** * @brief Content App Observer Cluster ContentAppMessage Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 42a54b95ee944f..a354d2af0beca9 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -4361,7 +4361,7 @@ enum class Feature : uint32_t }; // Bitmap for RecordingFlagBitmap -enum class RecordingFlagBitmap : uint32_t +enum class RecordingFlagBitmap : uint8_t { kScheduled = 0x1, kRecordSeries = 0x2, @@ -4698,9 +4698,9 @@ enum class Feature : uint32_t { kContentSearch = 0x1, kURLPlayback = 0x2, - kAdvancedSeek = 0x3, - kTextTracks = 0x4, - kAudioTracks = 0x5, + kAdvancedSeek = 0x4, + kTextTracks = 0x8, + kAudioTracks = 0x10, }; // Bitmap for SupportedProtocolsBitmap @@ -4779,6 +4779,18 @@ namespace AccountLogin {} // namespace AccountLogin namespace ContentControl { +// Bitmap for DayOfWeekBitmap +enum class DayOfWeekBitmap : uint8_t +{ + kSunday = 0x1, + kMonday = 0x2, + kTuesday = 0x4, + kWednesday = 0x8, + kThursday = 0x10, + kFriday = 0x20, + kSaturday = 0x40, +}; + // Bitmap for Feature enum class Feature : uint32_t { 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 32b62631ed30fd..0f1170121488f3 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 @@ -22902,6 +22902,47 @@ namespace Events {} // namespace Events namespace Channel { namespace Structs { +namespace AdditionalInfoStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kValue), value); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kName)) + { + err = DataModel::Decode(reader, name); + } + else if (__context_tag == to_underlying(Fields::kValue)) + { + err = DataModel::Decode(reader, value); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace AdditionalInfoStruct + namespace ProgramCastStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { @@ -23304,47 +23345,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace ChannelPagingStruct -namespace AdditionalInfoStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kName), name); - encoder.Encode(to_underlying(Fields::kValue), value); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kName)) - { - err = DataModel::Decode(reader, name); - } - else if (__context_tag == to_underlying(Fields::kValue)) - { - err = DataModel::Decode(reader, value); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} - -} // namespace AdditionalInfoStruct - namespace LineupInfoStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { @@ -23989,6 +23989,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kLanguageCode), languageCode); + encoder.Encode(to_underlying(Fields::kCharacteristics), characteristics); encoder.Encode(to_underlying(Fields::kDisplayName), displayName); return encoder.Finalize(); } @@ -24011,6 +24012,10 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, languageCode); } + else if (__context_tag == to_underlying(Fields::kCharacteristics)) + { + err = DataModel::Decode(reader, characteristics); + } else if (__context_tag == to_underlying(Fields::kDisplayName)) { err = DataModel::Decode(reader, displayName); @@ -25442,6 +25447,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const encoder.Encode(to_underlying(Fields::kContentURL), contentURL); encoder.Encode(to_underlying(Fields::kDisplayString), displayString); encoder.Encode(to_underlying(Fields::kBrandingInformation), brandingInformation); + encoder.Encode(to_underlying(Fields::kPlaybackPreferences), playbackPreferences); return encoder.Finalize(); } @@ -25471,6 +25477,10 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, brandingInformation); } + else if (__context_tag == to_underlying(Fields::kPlaybackPreferences)) + { + err = DataModel::Decode(reader, playbackPreferences); + } else { } @@ -26158,6 +26168,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNode), node)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); return aWriter.EndContainer(outer); } @@ -26179,6 +26190,10 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, node); } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); + } else { } @@ -26193,6 +26208,195 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace ContentControl { namespace Structs { +namespace TimePeriodStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStartHour), startHour); + encoder.Encode(to_underlying(Fields::kStartMinute), startMinute); + encoder.Encode(to_underlying(Fields::kEndHour), endHour); + encoder.Encode(to_underlying(Fields::kEndMinute), endMinute); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kStartHour)) + { + err = DataModel::Decode(reader, startHour); + } + else if (__context_tag == to_underlying(Fields::kStartMinute)) + { + err = DataModel::Decode(reader, startMinute); + } + else if (__context_tag == to_underlying(Fields::kEndHour)) + { + err = DataModel::Decode(reader, endHour); + } + else if (__context_tag == to_underlying(Fields::kEndMinute)) + { + err = DataModel::Decode(reader, endMinute); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace TimePeriodStruct + +namespace TimeWindowStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTimeWindowIndex), timeWindowIndex); + encoder.Encode(to_underlying(Fields::kDayOfWeek), dayOfWeek); + encoder.Encode(to_underlying(Fields::kTimePeriod), timePeriod); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kTimeWindowIndex)) + { + err = DataModel::Decode(reader, timeWindowIndex); + } + else if (__context_tag == to_underlying(Fields::kDayOfWeek)) + { + err = DataModel::Decode(reader, dayOfWeek); + } + else if (__context_tag == to_underlying(Fields::kTimePeriod)) + { + err = DataModel::Decode(reader, timePeriod); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace TimeWindowStruct + +namespace AppInfoStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kCatalogVendorID), catalogVendorID); + encoder.Encode(to_underlying(Fields::kApplicationID), applicationID); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kCatalogVendorID)) + { + err = DataModel::Decode(reader, catalogVendorID); + } + else if (__context_tag == to_underlying(Fields::kApplicationID)) + { + err = DataModel::Decode(reader, applicationID); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace AppInfoStruct + +namespace BlockChannelStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kBlockChannelIndex), blockChannelIndex); + encoder.Encode(to_underlying(Fields::kMajorNumber), majorNumber); + encoder.Encode(to_underlying(Fields::kMinorNumber), minorNumber); + encoder.Encode(to_underlying(Fields::kIdentifier), identifier); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kBlockChannelIndex)) + { + err = DataModel::Decode(reader, blockChannelIndex); + } + else if (__context_tag == to_underlying(Fields::kMajorNumber)) + { + err = DataModel::Decode(reader, majorNumber); + } + else if (__context_tag == to_underlying(Fields::kMinorNumber)) + { + err = DataModel::Decode(reader, minorNumber); + } + else if (__context_tag == to_underlying(Fields::kIdentifier)) + { + err = DataModel::Decode(reader, identifier); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace BlockChannelStruct + namespace RatingNameStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { @@ -26550,6 +26754,210 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace SetScheduledContentRatingThreshold. +namespace AddBlockChannels { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kChannels), channels); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kChannels)) + { + err = DataModel::Decode(reader, channels); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace AddBlockChannels. +namespace RemoveBlockChannels { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kChannelIndexes), channelIndexes); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kChannelIndexes)) + { + err = DataModel::Decode(reader, channelIndexes); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace RemoveBlockChannels. +namespace AddBlockApplications { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kApplications), applications); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kApplications)) + { + err = DataModel::Decode(reader, applications); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace AddBlockApplications. +namespace RemoveBlockApplications { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kApplications), applications); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kApplications)) + { + err = DataModel::Decode(reader, applications); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace RemoveBlockApplications. +namespace SetBlockContentTimeWindow { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTimeWindow), timeWindow); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kTimeWindow)) + { + err = DataModel::Decode(reader, timeWindow); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace SetBlockContentTimeWindow. +namespace RemoveBlockContentTimeWindow { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTimeWindowIndexes), timeWindowIndexes); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kTimeWindowIndexes)) + { + err = DataModel::Decode(reader, timeWindowIndexes); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace RemoveBlockContentTimeWindow. } // namespace Commands namespace Attributes { @@ -26573,6 +26981,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, remainingScreenTime); case Attributes::BlockUnrated::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, blockUnrated); + case Attributes::BlockChannelList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, blockChannelList); + case Attributes::BlockApplicationList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, blockApplicationList); + case Attributes::BlockContentTimeWindow::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, blockContentTimeWindow); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -26613,6 +27027,27 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace RemainingScreenTimeExpired. +namespace EnteringBlockContentTimeWindow { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace EnteringBlockContentTimeWindow. } // namespace Events } // namespace ContentControl @@ -29900,6 +30335,18 @@ bool CommandNeedsTimedInvoke(ClusterId aCluster, CommandId aCommand) return false; } } + case Clusters::ContentControl::Id: { + switch (aCommand) + { + case Clusters::ContentControl::Commands::UpdatePIN::Id: + case Clusters::ContentControl::Commands::ResetPIN::Id: + case Clusters::ContentControl::Commands::Enable::Id: + case Clusters::ContentControl::Commands::Disable::Id: + return true; + default: + return false; + } + } case Clusters::UnitTesting::Id: { switch (aCommand) { @@ -30413,6 +30860,8 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) { case Clusters::AccountLogin::Commands::GetSetupPIN::Id: return true; + case Clusters::AccountLogin::Commands::GetSetupPINResponse::Id: + return true; case Clusters::AccountLogin::Commands::Login::Id: return true; case Clusters::AccountLogin::Commands::Logout::Id: 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 89c36f3c6f147d..bc73a21c5db76c 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 @@ -34935,6 +34935,29 @@ struct TypeInfo } // namespace WakeOnLan namespace Channel { namespace Structs { +namespace AdditionalInfoStruct { +enum class Fields : uint8_t +{ + kName = 0, + kValue = 1, +}; + +struct Type +{ +public: + chip::CharSpan name; + chip::CharSpan value; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace AdditionalInfoStruct namespace ProgramCastStruct { enum class Fields : uint8_t { @@ -35082,7 +35105,7 @@ struct Type Optional> seriesInfo; Optional> categoryList; Optional> castList; - Optional> externalIDList; + Optional> externalIDList; static constexpr bool kIsFabricScoped = false; @@ -35110,7 +35133,7 @@ struct DecodableType Optional> seriesInfo; Optional> categoryList; Optional> castList; - Optional> externalIDList; + Optional> externalIDList; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -35166,29 +35189,6 @@ struct Type using DecodableType = Type; } // namespace ChannelPagingStruct -namespace AdditionalInfoStruct { -enum class Fields : uint8_t -{ - kName = 0, - kValue = 1, -}; - -struct Type -{ -public: - chip::CharSpan name; - chip::CharSpan value; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; - -} // namespace AdditionalInfoStruct namespace LineupInfoStruct { enum class Fields : uint8_t { @@ -35417,11 +35417,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetProgramGuide::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - Optional startTime; - Optional endTime; + uint32_t startTime = static_cast(0); + uint32_t endTime = static_cast(0); Optional> channelList; - Optional pageToken; - Optional> recordingFlag; + Optional> pageToken; + Optional>> recordingFlag; Optional> externalIDList; Optional data; @@ -35438,11 +35438,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetProgramGuide::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - Optional startTime; - Optional endTime; + uint32_t startTime = static_cast(0); + uint32_t endTime = static_cast(0); Optional> channelList; - Optional pageToken; - Optional> recordingFlag; + Optional> pageToken; + Optional>> recordingFlag; Optional> externalIDList; Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -35501,8 +35501,8 @@ struct Type chip::CharSpan programIdentifier; bool shouldRecordSeries = static_cast(0); - DataModel::List externalIDList; - chip::ByteSpan data; + Optional> externalIDList; + Optional data; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -35519,8 +35519,8 @@ struct DecodableType chip::CharSpan programIdentifier; bool shouldRecordSeries = static_cast(0); - DataModel::DecodableList externalIDList; - chip::ByteSpan data; + Optional> externalIDList; + Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RecordProgram @@ -35542,8 +35542,8 @@ struct Type chip::CharSpan programIdentifier; bool shouldRecordSeries = static_cast(0); - DataModel::List externalIDList; - chip::ByteSpan data; + Optional> externalIDList; + Optional data; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -35560,8 +35560,8 @@ struct DecodableType chip::CharSpan programIdentifier; bool shouldRecordSeries = static_cast(0); - DataModel::DecodableList externalIDList; - chip::ByteSpan data; + Optional> externalIDList; + Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace CancelRecordProgram @@ -35885,9 +35885,9 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } static constexpr bool kIsFabricScoped = false; - DataModel::List targetList; - uint8_t currentTarget = static_cast(0); - chip::ByteSpan data; + Optional> targetList; + Optional currentTarget; + Optional data; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -35899,9 +35899,9 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::TargetUpdated::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - DataModel::DecodableList targetList; - uint8_t currentTarget = static_cast(0); - chip::ByteSpan data; + Optional> targetList; + Optional currentTarget; + Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -35913,24 +35913,34 @@ namespace Structs { namespace TrackAttributesStruct { enum class Fields : uint8_t { - kLanguageCode = 0, - kDisplayName = 1, + kLanguageCode = 0, + kCharacteristics = 1, + kDisplayName = 2, }; struct Type { public: chip::CharSpan languageCode; + Optional>> characteristics; Optional> displayName; - CHIP_ERROR Decode(TLV::TLVReader & reader); - static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -using DecodableType = Type; +struct DecodableType +{ +public: + chip::CharSpan languageCode; + Optional>> characteristics; + Optional> displayName; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; +}; } // namespace TrackAttributesStruct namespace TrackStruct { @@ -35944,7 +35954,7 @@ struct Type { public: chip::CharSpan id; - DataModel::Nullable trackAttributes; + Structs::TrackAttributesStruct::Type trackAttributes; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -36440,7 +36450,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } chip::CharSpan trackID; - uint8_t audioOutputIndex = static_cast(0); + Optional> audioOutputIndex; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -36456,7 +36466,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } chip::CharSpan trackID; - uint8_t audioOutputIndex = static_cast(0); + Optional> audioOutputIndex; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ActivateAudioTrack @@ -36758,14 +36768,14 @@ struct Type static constexpr bool kIsFabricScoped = false; PlaybackStateEnum currentState = static_cast(0); - uint64_t startTime = static_cast(0); - uint64_t duration = static_cast(0); - Structs::PlaybackPositionStruct::Type sampledPosition; - float playbackSpeed = static_cast(0); - uint64_t seekRangeEnd = static_cast(0); - uint64_t seekRangeStart = static_cast(0); + Optional startTime; + Optional duration; + Optional sampledPosition; + Optional playbackSpeed; + Optional seekRangeEnd; + Optional seekRangeStart; Optional data; - bool audioAdvanceUnmuted = static_cast(0); + Optional audioAdvanceUnmuted; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -36778,14 +36788,14 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } PlaybackStateEnum currentState = static_cast(0); - uint64_t startTime = static_cast(0); - uint64_t duration = static_cast(0); - Structs::PlaybackPositionStruct::DecodableType sampledPosition; - float playbackSpeed = static_cast(0); - uint64_t seekRangeEnd = static_cast(0); - uint64_t seekRangeStart = static_cast(0); + Optional startTime; + Optional duration; + Optional sampledPosition; + Optional playbackSpeed; + Optional seekRangeEnd; + Optional seekRangeStart; Optional data; - bool audioAdvanceUnmuted = static_cast(0); + Optional audioAdvanceUnmuted; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -37339,8 +37349,8 @@ struct Type { public: chip::CharSpan languageCode; - Optional> characteristics; - uint8_t audioOutputIndex = static_cast(0); + Optional>> characteristics; + Optional> audioOutputIndex; static constexpr bool kIsFabricScoped = false; @@ -37351,8 +37361,8 @@ struct DecodableType { public: chip::CharSpan languageCode; - Optional> characteristics; - uint8_t audioOutputIndex = static_cast(0); + Optional>> characteristics; + Optional> audioOutputIndex; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -37371,9 +37381,9 @@ enum class Fields : uint8_t struct Type { public: - uint64_t playbackPosition = static_cast(0); - Structs::TrackPreferenceStruct::Type textTrack; - Optional> audioTracks; + Optional> playbackPosition; + Optional> textTrack; + Optional>> audioTracks; static constexpr bool kIsFabricScoped = false; @@ -37383,9 +37393,9 @@ struct Type struct DecodableType { public: - uint64_t playbackPosition = static_cast(0); - Structs::TrackPreferenceStruct::DecodableType textTrack; - Optional> audioTracks; + Optional> playbackPosition; + Optional> textTrack; + Optional>> audioTracks; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -37605,6 +37615,7 @@ enum class Fields : uint8_t kContentURL = 0, kDisplayString = 1, kBrandingInformation = 2, + kPlaybackPreferences = 3, }; struct Type @@ -37617,6 +37628,7 @@ struct Type chip::CharSpan contentURL; Optional displayString; Optional brandingInformation; + Optional playbackPreferences; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -37634,6 +37646,7 @@ struct DecodableType chip::CharSpan contentURL; Optional displayString; Optional brandingInformation; + Optional playbackPreferences; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace LaunchURL @@ -38628,7 +38641,8 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { - kNode = 0, + kNode = 0, + kFabricIndex = 254, }; struct Type @@ -38637,9 +38651,12 @@ struct Type static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } static constexpr EventId GetEventId() { return Events::LoggedOut::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } - static constexpr bool kIsFabricScoped = false; + static constexpr bool kIsFabricScoped = true; Optional node; + chip::FabricIndex fabricIndex = static_cast(0); + + auto GetFabricIndex() const { return fabricIndex; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -38652,6 +38669,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } Optional node; + chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -38660,6 +38678,116 @@ struct DecodableType } // namespace AccountLogin namespace ContentControl { namespace Structs { +namespace TimePeriodStruct { +enum class Fields : uint8_t +{ + kStartHour = 0, + kStartMinute = 1, + kEndHour = 2, + kEndMinute = 3, +}; + +struct Type +{ +public: + uint8_t startHour = static_cast(0); + uint8_t startMinute = static_cast(0); + uint8_t endHour = static_cast(0); + uint8_t endMinute = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace TimePeriodStruct +namespace TimeWindowStruct { +enum class Fields : uint8_t +{ + kTimeWindowIndex = 0, + kDayOfWeek = 1, + kTimePeriod = 2, +}; + +struct Type +{ +public: + DataModel::Nullable timeWindowIndex; + chip::BitMask dayOfWeek = static_cast>(0); + DataModel::List timePeriod; + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + DataModel::Nullable timeWindowIndex; + chip::BitMask dayOfWeek = static_cast>(0); + DataModel::DecodableList timePeriod; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; +}; + +} // namespace TimeWindowStruct +namespace AppInfoStruct { +enum class Fields : uint8_t +{ + kCatalogVendorID = 0, + kApplicationID = 1, +}; + +struct Type +{ +public: + uint16_t catalogVendorID = static_cast(0); + chip::CharSpan applicationID; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace AppInfoStruct +namespace BlockChannelStruct { +enum class Fields : uint8_t +{ + kBlockChannelIndex = 0, + kMajorNumber = 1, + kMinorNumber = 2, + kIdentifier = 3, +}; + +struct Type +{ +public: + DataModel::Nullable blockChannelIndex; + uint16_t majorNumber = static_cast(0); + uint16_t minorNumber = static_cast(0); + Optional identifier; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace BlockChannelStruct namespace RatingNameStruct { enum class Fields : uint8_t { @@ -38743,6 +38871,36 @@ struct Type; struct DecodableType; } // namespace SetScheduledContentRatingThreshold +namespace AddBlockChannels { +struct Type; +struct DecodableType; +} // namespace AddBlockChannels + +namespace RemoveBlockChannels { +struct Type; +struct DecodableType; +} // namespace RemoveBlockChannels + +namespace AddBlockApplications { +struct Type; +struct DecodableType; +} // namespace AddBlockApplications + +namespace RemoveBlockApplications { +struct Type; +struct DecodableType; +} // namespace RemoveBlockApplications + +namespace SetBlockContentTimeWindow { +struct Type; +struct DecodableType; +} // namespace SetBlockContentTimeWindow + +namespace RemoveBlockContentTimeWindow { +struct Type; +struct DecodableType; +} // namespace RemoveBlockContentTimeWindow + } // namespace Commands namespace Commands { @@ -38760,14 +38918,14 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::UpdatePIN::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - Optional oldPIN; + chip::CharSpan oldPIN; chip::CharSpan newPIN; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType @@ -38776,7 +38934,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::UpdatePIN::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } - Optional oldPIN; + chip::CharSpan oldPIN; chip::CharSpan newPIN; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -38797,7 +38955,7 @@ struct Type using ResponseType = Clusters::ContentControl::Commands::ResetPINResponse::DecodableType; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType @@ -38857,7 +39015,7 @@ struct Type using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType @@ -38885,7 +39043,7 @@ struct Type using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType @@ -38912,7 +39070,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } Optional PINCode; - Optional bonusTime; + uint32_t bonusTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -38928,7 +39086,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } Optional PINCode; - Optional bonusTime; + uint32_t bonusTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AddBonusTime @@ -39084,6 +39242,198 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetScheduledContentRatingThreshold +namespace AddBlockChannels { +enum class Fields : uint8_t +{ + kChannels = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::AddBlockChannels::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + DataModel::List channels; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::AddBlockChannels::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + DataModel::DecodableList channels; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace AddBlockChannels +namespace RemoveBlockChannels { +enum class Fields : uint8_t +{ + kChannelIndexes = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::RemoveBlockChannels::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + DataModel::List channelIndexes; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::RemoveBlockChannels::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + DataModel::DecodableList channelIndexes; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace RemoveBlockChannels +namespace AddBlockApplications { +enum class Fields : uint8_t +{ + kApplications = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::AddBlockApplications::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + DataModel::List applications; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::AddBlockApplications::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + DataModel::DecodableList applications; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace AddBlockApplications +namespace RemoveBlockApplications { +enum class Fields : uint8_t +{ + kApplications = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::RemoveBlockApplications::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + DataModel::List applications; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::RemoveBlockApplications::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + DataModel::DecodableList applications; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace RemoveBlockApplications +namespace SetBlockContentTimeWindow { +enum class Fields : uint8_t +{ + kTimeWindow = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetBlockContentTimeWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + Structs::TimeWindowStruct::Type timeWindow; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SetBlockContentTimeWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + Structs::TimeWindowStruct::DecodableType timeWindow; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetBlockContentTimeWindow +namespace RemoveBlockContentTimeWindow { +enum class Fields : uint8_t +{ + kTimeWindowIndexes = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::RemoveBlockContentTimeWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + DataModel::List timeWindowIndexes; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::RemoveBlockContentTimeWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + DataModel::DecodableList timeWindowIndexes; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace RemoveBlockContentTimeWindow } // namespace Commands namespace Attributes { @@ -39190,6 +39540,48 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace BlockUnrated +namespace BlockChannelList { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::ContentControl::Structs::BlockChannelStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BlockChannelList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace BlockChannelList +namespace BlockApplicationList { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BlockApplicationList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace BlockApplicationList +namespace BlockContentTimeWindow { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BlockContentTimeWindow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace BlockContentTimeWindow namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -39243,6 +39635,9 @@ struct TypeInfo Attributes::ScreenDailyTime::TypeInfo::DecodableType screenDailyTime = static_cast(0); Attributes::RemainingScreenTime::TypeInfo::DecodableType remainingScreenTime = static_cast(0); Attributes::BlockUnrated::TypeInfo::DecodableType blockUnrated = static_cast(0); + Attributes::BlockChannelList::TypeInfo::DecodableType blockChannelList; + Attributes::BlockApplicationList::TypeInfo::DecodableType blockApplicationList; + Attributes::BlockContentTimeWindow::TypeInfo::DecodableType blockContentTimeWindow; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -39281,6 +39676,34 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; } // namespace RemainingScreenTimeExpired +namespace EnteringBlockContentTimeWindow { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::EnteringBlockContentTimeWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::EnteringBlockContentTimeWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ContentControl::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace EnteringBlockContentTimeWindow } // namespace Events } // namespace ContentControl namespace ContentAppObserver { @@ -39315,8 +39738,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ContentAppMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentAppObserver::Id; } - Optional data; - chip::CharSpan encodingHint; + chip::CharSpan data; + Optional encodingHint; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -39331,8 +39754,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ContentAppMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentAppObserver::Id; } - Optional data; - chip::CharSpan encodingHint; + chip::CharSpan data; + Optional encodingHint; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ContentAppMessage diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 8ff6313abe5940..c3c12b1baaf7a8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -7114,6 +7114,18 @@ namespace BlockUnrated { static constexpr AttributeId Id = 0x00000007; } // namespace BlockUnrated +namespace BlockChannelList { +static constexpr AttributeId Id = 0x00000008; +} // namespace BlockChannelList + +namespace BlockApplicationList { +static constexpr AttributeId Id = 0x00000009; +} // namespace BlockApplicationList + +namespace BlockContentTimeWindow { +static constexpr AttributeId Id = 0x0000000A; +} // namespace BlockContentTimeWindow + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList 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 da8b04c98c1963..4bc3f5f36e31eb 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 @@ -1668,6 +1668,30 @@ namespace SetScheduledContentRatingThreshold { static constexpr CommandId Id = 0x0000000A; } // namespace SetScheduledContentRatingThreshold +namespace AddBlockChannels { +static constexpr CommandId Id = 0x0000000B; +} // namespace AddBlockChannels + +namespace RemoveBlockChannels { +static constexpr CommandId Id = 0x0000000C; +} // namespace RemoveBlockChannels + +namespace AddBlockApplications { +static constexpr CommandId Id = 0x0000000D; +} // namespace AddBlockApplications + +namespace RemoveBlockApplications { +static constexpr CommandId Id = 0x0000000E; +} // namespace RemoveBlockApplications + +namespace SetBlockContentTimeWindow { +static constexpr CommandId Id = 0x0000000F; +} // namespace SetBlockContentTimeWindow + +namespace RemoveBlockContentTimeWindow { +static constexpr CommandId Id = 0x00000010; +} // namespace RemoveBlockContentTimeWindow + } // namespace Commands } // namespace ContentControl diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h index 28e5799188e843..f63a9f6c478b15 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h @@ -648,6 +648,10 @@ namespace RemainingScreenTimeExpired { static constexpr EventId Id = 0x00000000; } // namespace RemainingScreenTimeExpired +namespace EnteringBlockContentTimeWindow { +static constexpr EventId Id = 0x00000001; +} // namespace EnteringBlockContentTimeWindow + } // namespace Events } // namespace ContentControl diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 8a3081edc0dc1b..b075e7bfe4b9fa 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -11187,7 +11187,7 @@ class ChannelGetProgramGuide : public ClusterCommand AddArgument("EndTime", 0, UINT32_MAX, &mRequest.endTime); AddArgument("ChannelList", &mComplex_ChannelList, "", Argument::kOptional); AddArgument("PageToken", &mComplex_PageToken, "", Argument::kOptional); - AddArgument("RecordingFlag", 0, UINT32_MAX, &mRequest.recordingFlag); + AddArgument("RecordingFlag", 0, UINT8_MAX, &mRequest.recordingFlag); AddArgument("ExternalIDList", &mComplex_ExternalIDList, "", Argument::kOptional); AddArgument("Data", &mRequest.data); ClusterCommand::AddArguments(); @@ -11219,7 +11219,9 @@ class ChannelGetProgramGuide : public ClusterCommand TypedComplexArgument< chip::Optional>> mComplex_ChannelList; - TypedComplexArgument> mComplex_PageToken; + TypedComplexArgument< + chip::Optional>> + mComplex_PageToken; TypedComplexArgument< chip::Optional>> mComplex_ExternalIDList; @@ -11236,7 +11238,7 @@ class ChannelRecordProgram : public ClusterCommand { AddArgument("ProgramIdentifier", &mRequest.programIdentifier); AddArgument("ShouldRecordSeries", 0, 1, &mRequest.shouldRecordSeries); - AddArgument("ExternalIDList", &mComplex_ExternalIDList); + AddArgument("ExternalIDList", &mComplex_ExternalIDList, "", Argument::kOptional); AddArgument("Data", &mRequest.data); ClusterCommand::AddArguments(); } @@ -11264,7 +11266,8 @@ class ChannelRecordProgram : public ClusterCommand private: chip::app::Clusters::Channel::Commands::RecordProgram::Type mRequest; - TypedComplexArgument> + TypedComplexArgument< + chip::Optional>> mComplex_ExternalIDList; }; @@ -11279,7 +11282,7 @@ class ChannelCancelRecordProgram : public ClusterCommand { AddArgument("ProgramIdentifier", &mRequest.programIdentifier); AddArgument("ShouldRecordSeries", 0, 1, &mRequest.shouldRecordSeries); - AddArgument("ExternalIDList", &mComplex_ExternalIDList); + AddArgument("ExternalIDList", &mComplex_ExternalIDList, "", Argument::kOptional); AddArgument("Data", &mRequest.data); ClusterCommand::AddArguments(); } @@ -11307,7 +11310,8 @@ class ChannelCancelRecordProgram : public ClusterCommand private: chip::app::Clusters::Channel::Commands::CancelRecordProgram::Type mRequest; - TypedComplexArgument> + TypedComplexArgument< + chip::Optional>> mComplex_ExternalIDList; }; @@ -12276,11 +12280,13 @@ class ContentLauncherLaunchURL : public ClusterCommand { public: ContentLauncherLaunchURL(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("launch-url", credsIssuerConfig), mComplex_BrandingInformation(&mRequest.brandingInformation) + ClusterCommand("launch-url", credsIssuerConfig), mComplex_BrandingInformation(&mRequest.brandingInformation), + mComplex_PlaybackPreferences(&mRequest.playbackPreferences) { AddArgument("ContentURL", &mRequest.contentURL); AddArgument("DisplayString", &mRequest.displayString); AddArgument("BrandingInformation", &mComplex_BrandingInformation, "", Argument::kOptional); + AddArgument("PlaybackPreferences", &mComplex_PlaybackPreferences, "", Argument::kOptional); ClusterCommand::AddArguments(); } @@ -12309,6 +12315,8 @@ class ContentLauncherLaunchURL : public ClusterCommand chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type mRequest; TypedComplexArgument> mComplex_BrandingInformation; + TypedComplexArgument> + mComplex_PlaybackPreferences; }; /*----------------------------------------------------------------------------*\ @@ -12719,6 +12727,12 @@ class AccountLoginLogout : public ClusterCommand | * UnblockUnratedContent | 0x08 | | * SetOnDemandRatingThreshold | 0x09 | | * SetScheduledContentRatingThreshold | 0x0A | +| * AddBlockChannels | 0x0B | +| * RemoveBlockChannels | 0x0C | +| * AddBlockApplications | 0x0D | +| * RemoveBlockApplications | 0x0E | +| * SetBlockContentTimeWindow | 0x0F | +| * RemoveBlockContentTimeWindow | 0x10 | |------------------------------------------------------------------------------| | Attributes: | | | * Enabled | 0x0000 | @@ -12729,6 +12743,9 @@ class AccountLoginLogout : public ClusterCommand | * ScreenDailyTime | 0x0005 | | * RemainingScreenTime | 0x0006 | | * BlockUnrated | 0x0007 | +| * BlockChannelList | 0x0008 | +| * BlockApplicationList | 0x0009 | +| * BlockContentTimeWindow | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -12738,6 +12755,7 @@ class AccountLoginLogout : public ClusterCommand |------------------------------------------------------------------------------| | Events: | | | * RemainingScreenTimeExpired | 0x0000 | +| * EnteringBlockContentTimeWindow | 0x0001 | \*----------------------------------------------------------------------------*/ /* @@ -13112,6 +13130,244 @@ class ContentControlSetScheduledContentRatingThreshold : public ClusterCommand chip::app::Clusters::ContentControl::Commands::SetScheduledContentRatingThreshold::Type mRequest; }; +/* + * Command AddBlockChannels + */ +class ContentControlAddBlockChannels : public ClusterCommand +{ +public: + ContentControlAddBlockChannels(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-block-channels", credsIssuerConfig), mComplex_Channels(&mRequest.channels) + { + AddArgument("Channels", &mComplex_Channels); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::AddBlockChannels::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::AddBlockChannels::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::ContentControl::Commands::AddBlockChannels::Type mRequest; + TypedComplexArgument> + mComplex_Channels; +}; + +/* + * Command RemoveBlockChannels + */ +class ContentControlRemoveBlockChannels : public ClusterCommand +{ +public: + ContentControlRemoveBlockChannels(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("remove-block-channels", credsIssuerConfig), mComplex_ChannelIndexes(&mRequest.channelIndexes) + { + AddArgument("ChannelIndexes", &mComplex_ChannelIndexes); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::RemoveBlockChannels::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::RemoveBlockChannels::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::ContentControl::Commands::RemoveBlockChannels::Type mRequest; + TypedComplexArgument> mComplex_ChannelIndexes; +}; + +/* + * Command AddBlockApplications + */ +class ContentControlAddBlockApplications : public ClusterCommand +{ +public: + ContentControlAddBlockApplications(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-block-applications", credsIssuerConfig), mComplex_Applications(&mRequest.applications) + { + AddArgument("Applications", &mComplex_Applications); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::AddBlockApplications::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::AddBlockApplications::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::ContentControl::Commands::AddBlockApplications::Type mRequest; + TypedComplexArgument> + mComplex_Applications; +}; + +/* + * Command RemoveBlockApplications + */ +class ContentControlRemoveBlockApplications : public ClusterCommand +{ +public: + ContentControlRemoveBlockApplications(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("remove-block-applications", credsIssuerConfig), mComplex_Applications(&mRequest.applications) + { + AddArgument("Applications", &mComplex_Applications); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::RemoveBlockApplications::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::RemoveBlockApplications::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::ContentControl::Commands::RemoveBlockApplications::Type mRequest; + TypedComplexArgument> + mComplex_Applications; +}; + +/* + * Command SetBlockContentTimeWindow + */ +class ContentControlSetBlockContentTimeWindow : public ClusterCommand +{ +public: + ContentControlSetBlockContentTimeWindow(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-block-content-time-window", credsIssuerConfig), mComplex_TimeWindow(&mRequest.timeWindow) + { + AddArgument("TimeWindow", &mComplex_TimeWindow); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetBlockContentTimeWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetBlockContentTimeWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::ContentControl::Commands::SetBlockContentTimeWindow::Type mRequest; + TypedComplexArgument mComplex_TimeWindow; +}; + +/* + * Command RemoveBlockContentTimeWindow + */ +class ContentControlRemoveBlockContentTimeWindow : public ClusterCommand +{ +public: + ContentControlRemoveBlockContentTimeWindow(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("remove-block-content-time-window", credsIssuerConfig), + mComplex_TimeWindowIndexes(&mRequest.timeWindowIndexes) + { + AddArgument("TimeWindowIndexes", &mComplex_TimeWindowIndexes); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::RemoveBlockContentTimeWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::RemoveBlockContentTimeWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::ContentControl::Commands::RemoveBlockContentTimeWindow::Type mRequest; + TypedComplexArgument> mComplex_TimeWindowIndexes; +}; + /*----------------------------------------------------------------------------*\ | Cluster ContentAppObserver | 0x0510 | |------------------------------------------------------------------------------| @@ -25337,6 +25593,12 @@ void registerClusterContentControl(Commands & commands, CredentialIssuerCommands make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // @@ -25346,17 +25608,20 @@ void registerClusterContentControl(Commands & commands, CredentialIssuerCommands make_unique(Id, "on-demand-rating-threshold", Attributes::OnDemandRatingThreshold::Id, credsIssuerConfig), // make_unique(Id, "scheduled-content-ratings", Attributes::ScheduledContentRatings::Id, credsIssuerConfig), // make_unique(Id, "scheduled-content-rating-threshold", Attributes::ScheduledContentRatingThreshold::Id, - credsIssuerConfig), // - make_unique(Id, "screen-daily-time", Attributes::ScreenDailyTime::Id, credsIssuerConfig), // - make_unique(Id, "remaining-screen-time", Attributes::RemainingScreenTime::Id, credsIssuerConfig), // - make_unique(Id, "block-unrated", Attributes::BlockUnrated::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // + credsIssuerConfig), // + make_unique(Id, "screen-daily-time", Attributes::ScreenDailyTime::Id, credsIssuerConfig), // + make_unique(Id, "remaining-screen-time", Attributes::RemainingScreenTime::Id, credsIssuerConfig), // + make_unique(Id, "block-unrated", Attributes::BlockUnrated::Id, credsIssuerConfig), // + make_unique(Id, "block-channel-list", Attributes::BlockChannelList::Id, credsIssuerConfig), // + make_unique(Id, "block-application-list", Attributes::BlockApplicationList::Id, credsIssuerConfig), // + make_unique(Id, "block-content-time-window", Attributes::BlockContentTimeWindow::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique>(Id, "enabled", 0, 1, Attributes::Enabled::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "block-unrated", 0, 1, Attributes::BlockUnrated::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "block-channel-list", Attributes::BlockChannelList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "block-application-list", Attributes::BlockApplicationList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "block-content-time-window", Attributes::BlockContentTimeWindow::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -25402,6 +25678,10 @@ void registerClusterContentControl(Commands & commands, CredentialIssuerCommands make_unique(Id, "screen-daily-time", Attributes::ScreenDailyTime::Id, credsIssuerConfig), // make_unique(Id, "remaining-screen-time", Attributes::RemainingScreenTime::Id, credsIssuerConfig), // make_unique(Id, "block-unrated", Attributes::BlockUnrated::Id, credsIssuerConfig), // + make_unique(Id, "block-channel-list", Attributes::BlockChannelList::Id, credsIssuerConfig), // + make_unique(Id, "block-application-list", Attributes::BlockApplicationList::Id, credsIssuerConfig), // + make_unique(Id, "block-content-time-window", Attributes::BlockContentTimeWindow::Id, + credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -25413,9 +25693,13 @@ void registerClusterContentControl(Commands & commands, CredentialIssuerCommands // make_unique(Id, credsIssuerConfig), // make_unique(Id, "remaining-screen-time-expired", Events::RemainingScreenTimeExpired::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, "entering-block-content-time-window", Events::EnteringBlockContentTimeWindow::Id, + credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // make_unique(Id, "remaining-screen-time-expired", Events::RemainingScreenTimeExpired::Id, credsIssuerConfig), // + make_unique(Id, "entering-block-content-time-window", Events::EnteringBlockContentTimeWindow::Id, + credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 89f34d0cee3714..9867d045f66192 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -3986,6 +3986,36 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::W ComplexArgumentParser::Finalize(request.coolSetpoint); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::Channel::Structs::AdditionalInfoStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AdditionalInfoStruct.name", "name", value.isMember("name"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AdditionalInfoStruct.value", "value", value.isMember("value"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "name"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.name, value["name"])); + valueCopy.removeMember("name"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "value"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.value, value["value"])); + valueCopy.removeMember("value"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::Channel::Structs::AdditionalInfoStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.name); + ComplexArgumentParser::Finalize(request.value); +} + CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Channel::Structs::ProgramCastStruct::Type & request, Json::Value & value) @@ -4386,36 +4416,6 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::Channel::Structs::Chan ComplexArgumentParser::Finalize(request.nextToken); } -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::Channel::Structs::AdditionalInfoStruct::Type & request, - Json::Value & value) -{ - VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - - // Copy to track which members we already processed. - Json::Value valueCopy(value); - - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AdditionalInfoStruct.name", "name", value.isMember("name"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AdditionalInfoStruct.value", "value", value.isMember("value"))); - - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "name"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.name, value["name"])); - valueCopy.removeMember("name"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "value"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.value, value["value"])); - valueCopy.removeMember("value"); - - return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); -} - -void ComplexArgumentParser::Finalize(chip::app::Clusters::Channel::Structs::AdditionalInfoStruct::Type & request) -{ - ComplexArgumentParser::Finalize(request.name); - ComplexArgumentParser::Finalize(request.value); -} - CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Channel::Structs::LineupInfoStruct::Type & request, Json::Value & value) { @@ -4511,6 +4511,13 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.languageCode, value["languageCode"])); valueCopy.removeMember("languageCode"); + if (value.isMember("characteristics")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "characteristics"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.characteristics, value["characteristics"])); + } + valueCopy.removeMember("characteristics"); + if (value.isMember("displayName")) { snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "displayName"); @@ -4524,6 +4531,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, void ComplexArgumentParser::Finalize(chip::app::Clusters::MediaPlayback::Structs::TrackAttributesStruct::Type & request) { ComplexArgumentParser::Finalize(request.languageCode); + ComplexArgumentParser::Finalize(request.characteristics); ComplexArgumentParser::Finalize(request.displayName); } @@ -4681,8 +4689,6 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TrackPreferenceStruct.languageCode", "languageCode", value.isMember("languageCode"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TrackPreferenceStruct.audioOutputIndex", "audioOutputIndex", - value.isMember("audioOutputIndex"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "languageCode"); @@ -4696,8 +4702,11 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, } valueCopy.removeMember("characteristics"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "audioOutputIndex"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.audioOutputIndex, value["audioOutputIndex"])); + if (value.isMember("audioOutputIndex")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "audioOutputIndex"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.audioOutputIndex, value["audioOutputIndex"])); + } valueCopy.removeMember("audioOutputIndex"); return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); @@ -4719,18 +4728,19 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, // Copy to track which members we already processed. Json::Value valueCopy(value); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PlaybackPreferencesStruct.playbackPosition", "playbackPosition", - value.isMember("playbackPosition"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("PlaybackPreferencesStruct.textTrack", "textTrack", value.isMember("textTrack"))); - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "playbackPosition"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.playbackPosition, value["playbackPosition"])); + if (value.isMember("playbackPosition")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "playbackPosition"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.playbackPosition, value["playbackPosition"])); + } valueCopy.removeMember("playbackPosition"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "textTrack"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.textTrack, value["textTrack"])); + if (value.isMember("textTrack")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "textTrack"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.textTrack, value["textTrack"])); + } valueCopy.removeMember("textTrack"); if (value.isMember("audioTracks")) @@ -5019,6 +5029,170 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::ApplicationLauncher::S ComplexArgumentParser::Finalize(request.endpoint); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::ContentControl::Structs::TimePeriodStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("TimePeriodStruct.startHour", "startHour", value.isMember("startHour"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("TimePeriodStruct.startMinute", "startMinute", value.isMember("startMinute"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("TimePeriodStruct.endHour", "endHour", value.isMember("endHour"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("TimePeriodStruct.endMinute", "endMinute", value.isMember("endMinute"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "startHour"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.startHour, value["startHour"])); + valueCopy.removeMember("startHour"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "startMinute"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.startMinute, value["startMinute"])); + valueCopy.removeMember("startMinute"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "endHour"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.endHour, value["endHour"])); + valueCopy.removeMember("endHour"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "endMinute"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.endMinute, value["endMinute"])); + valueCopy.removeMember("endMinute"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::ContentControl::Structs::TimePeriodStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.startHour); + ComplexArgumentParser::Finalize(request.startMinute); + ComplexArgumentParser::Finalize(request.endHour); + ComplexArgumentParser::Finalize(request.endMinute); +} + +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::ContentControl::Structs::TimeWindowStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TimeWindowStruct.timeWindowIndex", "timeWindowIndex", + value.isMember("timeWindowIndex"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("TimeWindowStruct.dayOfWeek", "dayOfWeek", value.isMember("dayOfWeek"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("TimeWindowStruct.timePeriod", "timePeriod", value.isMember("timePeriod"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "timeWindowIndex"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.timeWindowIndex, value["timeWindowIndex"])); + valueCopy.removeMember("timeWindowIndex"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "dayOfWeek"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.dayOfWeek, value["dayOfWeek"])); + valueCopy.removeMember("dayOfWeek"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "timePeriod"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.timePeriod, value["timePeriod"])); + valueCopy.removeMember("timePeriod"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::ContentControl::Structs::TimeWindowStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.timeWindowIndex); + ComplexArgumentParser::Finalize(request.dayOfWeek); + ComplexArgumentParser::Finalize(request.timePeriod); +} + +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::ContentControl::Structs::AppInfoStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AppInfoStruct.catalogVendorID", "catalogVendorID", + value.isMember("catalogVendorID"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("AppInfoStruct.applicationID", "applicationID", value.isMember("applicationID"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "catalogVendorID"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.catalogVendorID, value["catalogVendorID"])); + valueCopy.removeMember("catalogVendorID"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "applicationID"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.applicationID, value["applicationID"])); + valueCopy.removeMember("applicationID"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::ContentControl::Structs::AppInfoStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.catalogVendorID); + ComplexArgumentParser::Finalize(request.applicationID); +} + +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::ContentControl::Structs::BlockChannelStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BlockChannelStruct.blockChannelIndex", "blockChannelIndex", + value.isMember("blockChannelIndex"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("BlockChannelStruct.majorNumber", "majorNumber", value.isMember("majorNumber"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("BlockChannelStruct.minorNumber", "minorNumber", value.isMember("minorNumber"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "blockChannelIndex"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.blockChannelIndex, value["blockChannelIndex"])); + valueCopy.removeMember("blockChannelIndex"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "majorNumber"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.majorNumber, value["majorNumber"])); + valueCopy.removeMember("majorNumber"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "minorNumber"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.minorNumber, value["minorNumber"])); + valueCopy.removeMember("minorNumber"); + + if (value.isMember("identifier")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "identifier"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.identifier, value["identifier"])); + } + valueCopy.removeMember("identifier"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::ContentControl::Structs::BlockChannelStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.blockChannelIndex); + ComplexArgumentParser::Finalize(request.majorNumber); + ComplexArgumentParser::Finalize(request.minorNumber); + ComplexArgumentParser::Finalize(request.identifier); +} + CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::ContentControl::Structs::RatingNameStruct::Type & request, Json::Value & value) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index a9ac94c6cecb77..58bddc468c2bd1 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -455,6 +455,11 @@ static CHIP_ERROR Setup(const char * label, static void Finalize(chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Channel::Structs::AdditionalInfoStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::Channel::Structs::AdditionalInfoStruct::Type & request); + static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Channel::Structs::ProgramCastStruct::Type & request, Json::Value & value); @@ -490,11 +495,6 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Channel::Struct static void Finalize(chip::app::Clusters::Channel::Structs::ChannelPagingStruct::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Channel::Structs::AdditionalInfoStruct::Type & request, - Json::Value & value); - -static void Finalize(chip::app::Clusters::Channel::Structs::AdditionalInfoStruct::Type & request); - static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Channel::Structs::LineupInfoStruct::Type & request, Json::Value & value); @@ -577,6 +577,26 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ApplicationLaun static void Finalize(chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ContentControl::Structs::TimePeriodStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::ContentControl::Structs::TimePeriodStruct::Type & request); + +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ContentControl::Structs::TimeWindowStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::ContentControl::Structs::TimeWindowStruct::Type & request); + +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ContentControl::Structs::AppInfoStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::ContentControl::Structs::AppInfoStruct::Type & request); + +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ContentControl::Structs::BlockChannelStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::ContentControl::Structs::BlockChannelStruct::Type & request); + static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ContentControl::Structs::RatingNameStruct::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 fde5089bab8a7c..94f68087fb7bd6 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -3528,6 +3528,31 @@ 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::Channel::Structs::AdditionalInfoStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Value", indent + 1, value.value); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Value'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::Channel::Structs::ProgramCastStruct::DecodableType & value) { @@ -3887,31 +3912,6 @@ 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::Channel::Structs::AdditionalInfoStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = LogValue("Name", indent + 1, value.name); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("Value", indent + 1, value.value); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Value'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::Channel::Structs::LineupInfoStruct::DecodableType & value) { @@ -3991,6 +3991,14 @@ DataModelLogger::LogValue(const char * label, size_t indent, return err; } } + { + CHIP_ERROR err = LogValue("Characteristics", indent + 1, value.characteristics); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Characteristics'"); + return err; + } + } { CHIP_ERROR err = LogValue("DisplayName", indent + 1, value.displayName); if (err != CHIP_NO_ERROR) @@ -4425,6 +4433,146 @@ 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::ContentControl::Structs::TimePeriodStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("StartHour", indent + 1, value.startHour); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StartHour'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("StartMinute", indent + 1, value.startMinute); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StartMinute'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("EndHour", indent + 1, value.endHour); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'EndHour'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("EndMinute", indent + 1, value.endMinute); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'EndMinute'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentControl::Structs::TimeWindowStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("TimeWindowIndex", indent + 1, value.timeWindowIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TimeWindowIndex'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("DayOfWeek", indent + 1, value.dayOfWeek); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DayOfWeek'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("TimePeriod", indent + 1, value.timePeriod); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TimePeriod'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentControl::Structs::AppInfoStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("CatalogVendorID", indent + 1, value.catalogVendorID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CatalogVendorID'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("ApplicationID", indent + 1, value.applicationID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ApplicationID'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentControl::Structs::BlockChannelStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("BlockChannelIndex", indent + 1, value.blockChannelIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'BlockChannelIndex'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("MajorNumber", indent + 1, value.majorNumber); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MajorNumber'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("MinorNumber", indent + 1, value.minorNumber); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinorNumber'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Identifier", indent + 1, value.identifier); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Identifier'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentControl::Structs::RatingNameStruct::DecodableType & value) { @@ -7093,6 +7241,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return err; } } + { + CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -7105,6 +7261,14 @@ 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 ContentControl::Events::EnteringBlockContentTimeWindow::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const UnitTesting::Events::TestEvent::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); @@ -16743,6 +16907,23 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("BlockUnrated", 1, value); } + case ContentControl::Attributes::BlockChannelList::Id: { + chip::app::DataModel::DecodableList + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("BlockChannelList", 1, value); + } + case ContentControl::Attributes::BlockApplicationList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("BlockApplicationList", 1, value); + } + case ContentControl::Attributes::BlockContentTimeWindow::Id: { + chip::app::DataModel::DecodableList + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("BlockContentTimeWindow", 1, value); + } case ContentControl::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -19410,6 +19591,11 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("RemainingScreenTimeExpired", 1, value); } + case ContentControl::Events::EnteringBlockContentTimeWindow::Id: { + chip::app::Clusters::ContentControl::Events::EnteringBlockContentTimeWindow::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EnteringBlockContentTimeWindow", 1, value); + } } break; } 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 1c790b5e002039..569b95a1a5dfea 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -284,6 +284,9 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Channel::Structs::AdditionalInfoStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Channel::Structs::ProgramCastStruct::DecodableType & value); @@ -305,9 +308,6 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Channel::Structs::ChannelPagingStruct::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Channel::Structs::AdditionalInfoStruct::DecodableType & value); - static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Channel::Structs::LineupInfoStruct::DecodableType & value); @@ -356,6 +356,18 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentControl::Structs::TimePeriodStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentControl::Structs::TimeWindowStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentControl::Structs::AppInfoStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentControl::Structs::BlockChannelStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentControl::Structs::RatingNameStruct::DecodableType & value); @@ -610,6 +622,9 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::AccountLogin::Events::LoggedOut::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentControl::Events::RemainingScreenTimeExpired::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::ContentControl::Events::EnteringBlockContentTimeWindow::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, 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 c3034217db9c05..8c633844e841fe 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -143921,7 +143921,7 @@ class ChannelGetProgramGuide : public ClusterCommand { AddArgument("PageToken", &mComplex_PageToken); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - AddArgument("RecordingFlag", 0, UINT32_MAX, &mRequest.recordingFlag); + AddArgument("RecordingFlag", 0, UINT8_MAX, &mRequest.recordingFlag); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL AddArgument("ExternalIDList", &mComplex_ExternalIDList); @@ -143944,18 +143944,10 @@ class ChannelGetProgramGuide : public ClusterCommand { __auto_type * params = [[MTRChannelClusterGetProgramGuideParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - if (mRequest.startTime.HasValue()) { - params.startTime = [NSNumber numberWithUnsignedInt:mRequest.startTime.Value()]; - } else { - params.startTime = nil; - } + params.startTime = [NSNumber numberWithUnsignedInt:mRequest.startTime]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - if (mRequest.endTime.HasValue()) { - params.endTime = [NSNumber numberWithUnsignedInt:mRequest.endTime.Value()]; - } else { - params.endTime = nil; - } + params.endTime = [NSNumber numberWithUnsignedInt:mRequest.endTime]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL if (mRequest.channelList.HasValue()) { @@ -144001,21 +143993,25 @@ class ChannelGetProgramGuide : public ClusterCommand { #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL if (mRequest.pageToken.HasValue()) { - params.pageToken = [MTRChannelClusterPageTokenStruct new]; - if (mRequest.pageToken.Value().limit.HasValue()) { - params.pageToken.limit = [NSNumber numberWithUnsignedShort:mRequest.pageToken.Value().limit.Value()]; - } else { - params.pageToken.limit = nil; - } - if (mRequest.pageToken.Value().after.HasValue()) { - params.pageToken.after = [[NSString alloc] initWithBytes:mRequest.pageToken.Value().after.Value().data() length:mRequest.pageToken.Value().after.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.pageToken.after = nil; - } - if (mRequest.pageToken.Value().before.HasValue()) { - params.pageToken.before = [[NSString alloc] initWithBytes:mRequest.pageToken.Value().before.Value().data() length:mRequest.pageToken.Value().before.Value().size() encoding:NSUTF8StringEncoding]; + if (mRequest.pageToken.Value().IsNull()) { + params.pageToken = nil; } else { - params.pageToken.before = nil; + params.pageToken = [MTRChannelClusterPageTokenStruct new]; + if (mRequest.pageToken.Value().Value().limit.HasValue()) { + params.pageToken.limit = [NSNumber numberWithUnsignedShort:mRequest.pageToken.Value().Value().limit.Value()]; + } else { + params.pageToken.limit = nil; + } + if (mRequest.pageToken.Value().Value().after.HasValue()) { + params.pageToken.after = [[NSString alloc] initWithBytes:mRequest.pageToken.Value().Value().after.Value().data() length:mRequest.pageToken.Value().Value().after.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.pageToken.after = nil; + } + if (mRequest.pageToken.Value().Value().before.HasValue()) { + params.pageToken.before = [[NSString alloc] initWithBytes:mRequest.pageToken.Value().Value().before.Value().data() length:mRequest.pageToken.Value().Value().before.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.pageToken.before = nil; + } } } else { params.pageToken = nil; @@ -144023,7 +144019,11 @@ class ChannelGetProgramGuide : public ClusterCommand { #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL if (mRequest.recordingFlag.HasValue()) { - params.recordingFlag = [NSNumber numberWithUnsignedInt:mRequest.recordingFlag.Value().Raw()]; + if (mRequest.recordingFlag.Value().IsNull()) { + params.recordingFlag = nil; + } else { + params.recordingFlag = [NSNumber numberWithUnsignedChar:mRequest.recordingFlag.Value().Value().Raw()]; + } } else { params.recordingFlag = nil; } @@ -144080,7 +144080,7 @@ class ChannelGetProgramGuide : public ClusterCommand { private: chip::app::Clusters::Channel::Commands::GetProgramGuide::Type mRequest; TypedComplexArgument>> mComplex_ChannelList; - TypedComplexArgument> mComplex_PageToken; + TypedComplexArgument>> mComplex_PageToken; TypedComplexArgument>> mComplex_ExternalIDList; }; @@ -144128,20 +144128,28 @@ class ChannelRecordProgram : public ClusterCommand { params.shouldRecordSeries = [NSNumber numberWithBool:mRequest.shouldRecordSeries]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.externalIDList) { - MTRChannelClusterAdditionalInfoStruct * newElement_0; - newElement_0 = [MTRChannelClusterAdditionalInfoStruct new]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; - [array_0 addObject:newElement_0]; + if (mRequest.externalIDList.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + for (auto & entry_1 : mRequest.externalIDList.Value()) { + MTRChannelClusterAdditionalInfoStruct * newElement_1; + newElement_1 = [MTRChannelClusterAdditionalInfoStruct new]; + newElement_1.name = [[NSString alloc] initWithBytes:entry_1.name.data() length:entry_1.name.size() encoding:NSUTF8StringEncoding]; + newElement_1.value = [[NSString alloc] initWithBytes:entry_1.value.data() length:entry_1.value.size() encoding:NSUTF8StringEncoding]; + [array_1 addObject:newElement_1]; + } + params.externalIDList = array_1; } - params.externalIDList = array_0; + } else { + params.externalIDList = nil; } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.data = [NSData dataWithBytes:mRequest.data.data() length:mRequest.data.size()]; + if (mRequest.data.HasValue()) { + params.data = [NSData dataWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size()]; + } else { + params.data = nil; + } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -144164,7 +144172,7 @@ class ChannelRecordProgram : public ClusterCommand { private: chip::app::Clusters::Channel::Commands::RecordProgram::Type mRequest; - TypedComplexArgument> mComplex_ExternalIDList; + TypedComplexArgument>> mComplex_ExternalIDList; }; #endif // MTR_ENABLE_PROVISIONAL @@ -144211,20 +144219,28 @@ class ChannelCancelRecordProgram : public ClusterCommand { params.shouldRecordSeries = [NSNumber numberWithBool:mRequest.shouldRecordSeries]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.externalIDList) { - MTRChannelClusterAdditionalInfoStruct * newElement_0; - newElement_0 = [MTRChannelClusterAdditionalInfoStruct new]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; - [array_0 addObject:newElement_0]; + if (mRequest.externalIDList.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + for (auto & entry_1 : mRequest.externalIDList.Value()) { + MTRChannelClusterAdditionalInfoStruct * newElement_1; + newElement_1 = [MTRChannelClusterAdditionalInfoStruct new]; + newElement_1.name = [[NSString alloc] initWithBytes:entry_1.name.data() length:entry_1.name.size() encoding:NSUTF8StringEncoding]; + newElement_1.value = [[NSString alloc] initWithBytes:entry_1.value.data() length:entry_1.value.size() encoding:NSUTF8StringEncoding]; + [array_1 addObject:newElement_1]; + } + params.externalIDList = array_1; } - params.externalIDList = array_0; + } else { + params.externalIDList = nil; } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.data = [NSData dataWithBytes:mRequest.data.data() length:mRequest.data.size()]; + if (mRequest.data.HasValue()) { + params.data = [NSData dataWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size()]; + } else { + params.data = nil; + } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -144247,7 +144263,7 @@ class ChannelCancelRecordProgram : public ClusterCommand { private: chip::app::Clusters::Channel::Commands::CancelRecordProgram::Type mRequest; - TypedComplexArgument> mComplex_ExternalIDList; + TypedComplexArgument>> mComplex_ExternalIDList; }; #endif // MTR_ENABLE_PROVISIONAL @@ -146389,7 +146405,15 @@ class MediaPlaybackActivateAudioTrack : public ClusterCommand { params.trackID = [[NSString alloc] initWithBytes:mRequest.trackID.data() length:mRequest.trackID.size() encoding:NSUTF8StringEncoding]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.audioOutputIndex = [NSNumber numberWithUnsignedChar:mRequest.audioOutputIndex]; + if (mRequest.audioOutputIndex.HasValue()) { + if (mRequest.audioOutputIndex.Value().IsNull()) { + params.audioOutputIndex = nil; + } else { + params.audioOutputIndex = [NSNumber numberWithUnsignedChar:mRequest.audioOutputIndex.Value().Value()]; + } + } else { + params.audioOutputIndex = nil; + } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -150004,47 +150028,91 @@ class ContentLauncherLaunchContent : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL if (mRequest.playbackPreferences.HasValue()) { params.playbackPreferences = [MTRContentLauncherClusterPlaybackPreferencesStruct new]; - params.playbackPreferences.playbackPosition = [NSNumber numberWithUnsignedLongLong:mRequest.playbackPreferences.Value().playbackPosition]; - params.playbackPreferences.textTrack = [MTRContentLauncherClusterTrackPreferenceStruct new]; - params.playbackPreferences.textTrack.languageCode = [[NSString alloc] initWithBytes:mRequest.playbackPreferences.Value().textTrack.languageCode.data() length:mRequest.playbackPreferences.Value().textTrack.languageCode.size() encoding:NSUTF8StringEncoding]; - if (mRequest.playbackPreferences.Value().textTrack.characteristics.HasValue()) { - { // Scope for our temporary variables - auto * array_4 = [NSMutableArray new]; - for (auto & entry_4 : mRequest.playbackPreferences.Value().textTrack.characteristics.Value()) { - NSNumber * newElement_4; - newElement_4 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_4)]; - [array_4 addObject:newElement_4]; - } - params.playbackPreferences.textTrack.characteristics = array_4; + if (mRequest.playbackPreferences.Value().playbackPosition.HasValue()) { + if (mRequest.playbackPreferences.Value().playbackPosition.Value().IsNull()) { + params.playbackPreferences.playbackPosition = nil; + } else { + params.playbackPreferences.playbackPosition = [NSNumber numberWithUnsignedLongLong:mRequest.playbackPreferences.Value().playbackPosition.Value().Value()]; } } else { - params.playbackPreferences.textTrack.characteristics = nil; + params.playbackPreferences.playbackPosition = nil; } - params.playbackPreferences.textTrack.audioOutputIndex = [NSNumber numberWithUnsignedChar:mRequest.playbackPreferences.Value().textTrack.audioOutputIndex]; - if (mRequest.playbackPreferences.Value().audioTracks.HasValue()) { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - for (auto & entry_3 : mRequest.playbackPreferences.Value().audioTracks.Value()) { - MTRContentLauncherClusterTrackPreferenceStruct * newElement_3; - newElement_3 = [MTRContentLauncherClusterTrackPreferenceStruct new]; - newElement_3.languageCode = [[NSString alloc] initWithBytes:entry_3.languageCode.data() length:entry_3.languageCode.size() encoding:NSUTF8StringEncoding]; - if (entry_3.characteristics.HasValue()) { + if (mRequest.playbackPreferences.Value().textTrack.HasValue()) { + if (mRequest.playbackPreferences.Value().textTrack.Value().IsNull()) { + params.playbackPreferences.textTrack = nil; + } else { + params.playbackPreferences.textTrack = [MTRContentLauncherClusterTrackPreferenceStruct new]; + params.playbackPreferences.textTrack.languageCode = [[NSString alloc] initWithBytes:mRequest.playbackPreferences.Value().textTrack.Value().Value().languageCode.data() length:mRequest.playbackPreferences.Value().textTrack.Value().Value().languageCode.size() encoding:NSUTF8StringEncoding]; + if (mRequest.playbackPreferences.Value().textTrack.Value().Value().characteristics.HasValue()) { + if (mRequest.playbackPreferences.Value().textTrack.Value().Value().characteristics.Value().IsNull()) { + params.playbackPreferences.textTrack.characteristics = nil; + } else { { // Scope for our temporary variables - auto * array_6 = [NSMutableArray new]; - for (auto & entry_6 : entry_3.characteristics.Value()) { - NSNumber * newElement_6; - newElement_6 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_6)]; - [array_6 addObject:newElement_6]; + auto * array_7 = [NSMutableArray new]; + for (auto & entry_7 : mRequest.playbackPreferences.Value().textTrack.Value().Value().characteristics.Value().Value()) { + NSNumber * newElement_7; + newElement_7 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_7)]; + [array_7 addObject:newElement_7]; } - newElement_3.characteristics = array_6; + params.playbackPreferences.textTrack.characteristics = array_7; } + } + } else { + params.playbackPreferences.textTrack.characteristics = nil; + } + if (mRequest.playbackPreferences.Value().textTrack.Value().Value().audioOutputIndex.HasValue()) { + if (mRequest.playbackPreferences.Value().textTrack.Value().Value().audioOutputIndex.Value().IsNull()) { + params.playbackPreferences.textTrack.audioOutputIndex = nil; } else { - newElement_3.characteristics = nil; + params.playbackPreferences.textTrack.audioOutputIndex = [NSNumber numberWithUnsignedChar:mRequest.playbackPreferences.Value().textTrack.Value().Value().audioOutputIndex.Value().Value()]; + } + } else { + params.playbackPreferences.textTrack.audioOutputIndex = nil; + } + } + } else { + params.playbackPreferences.textTrack = nil; + } + if (mRequest.playbackPreferences.Value().audioTracks.HasValue()) { + if (mRequest.playbackPreferences.Value().audioTracks.Value().IsNull()) { + params.playbackPreferences.audioTracks = nil; + } else { + { // Scope for our temporary variables + auto * array_4 = [NSMutableArray new]; + for (auto & entry_4 : mRequest.playbackPreferences.Value().audioTracks.Value().Value()) { + MTRContentLauncherClusterTrackPreferenceStruct * newElement_4; + newElement_4 = [MTRContentLauncherClusterTrackPreferenceStruct new]; + newElement_4.languageCode = [[NSString alloc] initWithBytes:entry_4.languageCode.data() length:entry_4.languageCode.size() encoding:NSUTF8StringEncoding]; + if (entry_4.characteristics.HasValue()) { + if (entry_4.characteristics.Value().IsNull()) { + newElement_4.characteristics = nil; + } else { + { // Scope for our temporary variables + auto * array_8 = [NSMutableArray new]; + for (auto & entry_8 : entry_4.characteristics.Value().Value()) { + NSNumber * newElement_8; + newElement_8 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_8)]; + [array_8 addObject:newElement_8]; + } + newElement_4.characteristics = array_8; + } + } + } else { + newElement_4.characteristics = nil; + } + if (entry_4.audioOutputIndex.HasValue()) { + if (entry_4.audioOutputIndex.Value().IsNull()) { + newElement_4.audioOutputIndex = nil; + } else { + newElement_4.audioOutputIndex = [NSNumber numberWithUnsignedChar:entry_4.audioOutputIndex.Value().Value()]; + } + } else { + newElement_4.audioOutputIndex = nil; + } + [array_4 addObject:newElement_4]; } - newElement_3.audioOutputIndex = [NSNumber numberWithUnsignedChar:entry_3.audioOutputIndex]; - [array_3 addObject:newElement_3]; + params.playbackPreferences.audioTracks = array_4; } - params.playbackPreferences.audioTracks = array_3; } } else { params.playbackPreferences.audioTracks = nil; @@ -150099,10 +150167,14 @@ class ContentLauncherLaunchURL : public ClusterCommand { ContentLauncherLaunchURL() : ClusterCommand("launch-url") , mComplex_BrandingInformation(&mRequest.brandingInformation) + , mComplex_PlaybackPreferences(&mRequest.playbackPreferences) { AddArgument("ContentURL", &mRequest.contentURL); AddArgument("DisplayString", &mRequest.displayString); AddArgument("BrandingInformation", &mComplex_BrandingInformation); +#if MTR_ENABLE_PROVISIONAL + AddArgument("PlaybackPreferences", &mComplex_PlaybackPreferences); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -150244,6 +150316,102 @@ class ContentLauncherLaunchURL : public ClusterCommand { } else { params.brandingInformation = nil; } +#if MTR_ENABLE_PROVISIONAL + if (mRequest.playbackPreferences.HasValue()) { + params.playbackPreferences = [MTRContentLauncherClusterPlaybackPreferencesStruct new]; + if (mRequest.playbackPreferences.Value().playbackPosition.HasValue()) { + if (mRequest.playbackPreferences.Value().playbackPosition.Value().IsNull()) { + params.playbackPreferences.playbackPosition = nil; + } else { + params.playbackPreferences.playbackPosition = [NSNumber numberWithUnsignedLongLong:mRequest.playbackPreferences.Value().playbackPosition.Value().Value()]; + } + } else { + params.playbackPreferences.playbackPosition = nil; + } + if (mRequest.playbackPreferences.Value().textTrack.HasValue()) { + if (mRequest.playbackPreferences.Value().textTrack.Value().IsNull()) { + params.playbackPreferences.textTrack = nil; + } else { + params.playbackPreferences.textTrack = [MTRContentLauncherClusterTrackPreferenceStruct new]; + params.playbackPreferences.textTrack.languageCode = [[NSString alloc] initWithBytes:mRequest.playbackPreferences.Value().textTrack.Value().Value().languageCode.data() length:mRequest.playbackPreferences.Value().textTrack.Value().Value().languageCode.size() encoding:NSUTF8StringEncoding]; + if (mRequest.playbackPreferences.Value().textTrack.Value().Value().characteristics.HasValue()) { + if (mRequest.playbackPreferences.Value().textTrack.Value().Value().characteristics.Value().IsNull()) { + params.playbackPreferences.textTrack.characteristics = nil; + } else { + { // Scope for our temporary variables + auto * array_7 = [NSMutableArray new]; + for (auto & entry_7 : mRequest.playbackPreferences.Value().textTrack.Value().Value().characteristics.Value().Value()) { + NSNumber * newElement_7; + newElement_7 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_7)]; + [array_7 addObject:newElement_7]; + } + params.playbackPreferences.textTrack.characteristics = array_7; + } + } + } else { + params.playbackPreferences.textTrack.characteristics = nil; + } + if (mRequest.playbackPreferences.Value().textTrack.Value().Value().audioOutputIndex.HasValue()) { + if (mRequest.playbackPreferences.Value().textTrack.Value().Value().audioOutputIndex.Value().IsNull()) { + params.playbackPreferences.textTrack.audioOutputIndex = nil; + } else { + params.playbackPreferences.textTrack.audioOutputIndex = [NSNumber numberWithUnsignedChar:mRequest.playbackPreferences.Value().textTrack.Value().Value().audioOutputIndex.Value().Value()]; + } + } else { + params.playbackPreferences.textTrack.audioOutputIndex = nil; + } + } + } else { + params.playbackPreferences.textTrack = nil; + } + if (mRequest.playbackPreferences.Value().audioTracks.HasValue()) { + if (mRequest.playbackPreferences.Value().audioTracks.Value().IsNull()) { + params.playbackPreferences.audioTracks = nil; + } else { + { // Scope for our temporary variables + auto * array_4 = [NSMutableArray new]; + for (auto & entry_4 : mRequest.playbackPreferences.Value().audioTracks.Value().Value()) { + MTRContentLauncherClusterTrackPreferenceStruct * newElement_4; + newElement_4 = [MTRContentLauncherClusterTrackPreferenceStruct new]; + newElement_4.languageCode = [[NSString alloc] initWithBytes:entry_4.languageCode.data() length:entry_4.languageCode.size() encoding:NSUTF8StringEncoding]; + if (entry_4.characteristics.HasValue()) { + if (entry_4.characteristics.Value().IsNull()) { + newElement_4.characteristics = nil; + } else { + { // Scope for our temporary variables + auto * array_8 = [NSMutableArray new]; + for (auto & entry_8 : entry_4.characteristics.Value().Value()) { + NSNumber * newElement_8; + newElement_8 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_8)]; + [array_8 addObject:newElement_8]; + } + newElement_4.characteristics = array_8; + } + } + } else { + newElement_4.characteristics = nil; + } + if (entry_4.audioOutputIndex.HasValue()) { + if (entry_4.audioOutputIndex.Value().IsNull()) { + newElement_4.audioOutputIndex = nil; + } else { + newElement_4.audioOutputIndex = [NSNumber numberWithUnsignedChar:entry_4.audioOutputIndex.Value().Value()]; + } + } else { + newElement_4.audioOutputIndex = nil; + } + [array_4 addObject:newElement_4]; + } + params.playbackPreferences.audioTracks = array_4; + } + } + } else { + params.playbackPreferences.audioTracks = nil; + } + } else { + params.playbackPreferences = nil; + } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -150272,6 +150440,7 @@ class ContentLauncherLaunchURL : public ClusterCommand { private: chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type mRequest; TypedComplexArgument> mComplex_BrandingInformation; + TypedComplexArgument> mComplex_PlaybackPreferences; }; /* @@ -154454,6 +154623,12 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute | * UnblockUnratedContent | 0x08 | | * SetOnDemandRatingThreshold | 0x09 | | * SetScheduledContentRatingThreshold | 0x0A | +| * AddBlockChannels | 0x0B | +| * RemoveBlockChannels | 0x0C | +| * AddBlockApplications | 0x0D | +| * RemoveBlockApplications | 0x0E | +| * SetBlockContentTimeWindow | 0x0F | +| * RemoveBlockContentTimeWindow | 0x10 | |------------------------------------------------------------------------------| | Attributes: | | | * Enabled | 0x0000 | @@ -154464,6 +154639,9 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute | * ScreenDailyTime | 0x0005 | | * RemainingScreenTime | 0x0006 | | * BlockUnrated | 0x0007 | +| * BlockChannelList | 0x0008 | +| * BlockApplicationList | 0x0009 | +| * BlockContentTimeWindow | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -154473,6 +154651,7 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute |------------------------------------------------------------------------------| | Events: | | | * RemainingScreenTimeExpired | 0x0000 | +| * EnteringBlockContentTimeWindow | 0x0001 | \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL @@ -154505,11 +154684,7 @@ class ContentControlUpdatePIN : public ClusterCommand { __auto_type * params = [[MTRContentControlClusterUpdatePINParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - if (mRequest.oldPIN.HasValue()) { - params.oldPIN = [[NSString alloc] initWithBytes:mRequest.oldPIN.Value().data() length:mRequest.oldPIN.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.oldPIN = nil; - } + params.oldPIN = [[NSString alloc] initWithBytes:mRequest.oldPIN.data() length:mRequest.oldPIN.size() encoding:NSUTF8StringEncoding]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL params.newPIN = [[NSString alloc] initWithBytes:mRequest.newPIN.data() length:mRequest.newPIN.size() encoding:NSUTF8StringEncoding]; @@ -154719,11 +154894,7 @@ class ContentControlAddBonusTime : public ClusterCommand { } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - if (mRequest.bonusTime.HasValue()) { - params.bonusTime = [NSNumber numberWithUnsignedInt:mRequest.bonusTime.Value()]; - } else { - params.bonusTime = nil; - } + params.bonusTime = [NSNumber numberWithUnsignedInt:mRequest.bonusTime]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -154999,6 +155170,411 @@ class ContentControlSetScheduledContentRatingThreshold : public ClusterCommand { chip::app::Clusters::ContentControl::Commands::SetScheduledContentRatingThreshold::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command AddBlockChannels + */ +class ContentControlAddBlockChannels : public ClusterCommand { +public: + ContentControlAddBlockChannels() + : ClusterCommand("add-block-channels") + , mComplex_Channels(&mRequest.channels) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Channels", &mComplex_Channels); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::AddBlockChannels::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterAddBlockChannelsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.channels) { + MTRContentControlClusterBlockChannelStruct * newElement_0; + newElement_0 = [MTRContentControlClusterBlockChannelStruct new]; + if (entry_0.blockChannelIndex.IsNull()) { + newElement_0.blockChannelIndex = nil; + } else { + newElement_0.blockChannelIndex = [NSNumber numberWithUnsignedShort:entry_0.blockChannelIndex.Value()]; + } + newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; + newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; + if (entry_0.identifier.HasValue()) { + newElement_0.identifier = [[NSString alloc] initWithBytes:entry_0.identifier.Value().data() length:entry_0.identifier.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_0.identifier = nil; + } + [array_0 addObject:newElement_0]; + } + params.channels = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addBlockChannelsWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ContentControl::Commands::AddBlockChannels::Type mRequest; + TypedComplexArgument> mComplex_Channels; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RemoveBlockChannels + */ +class ContentControlRemoveBlockChannels : public ClusterCommand { +public: + ContentControlRemoveBlockChannels() + : ClusterCommand("remove-block-channels") + , mComplex_ChannelIndexes(&mRequest.channelIndexes) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("ChannelIndexes", &mComplex_ChannelIndexes); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::RemoveBlockChannels::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterRemoveBlockChannelsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.channelIndexes) { + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + [array_0 addObject:newElement_0]; + } + params.channelIndexes = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeBlockChannelsWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ContentControl::Commands::RemoveBlockChannels::Type mRequest; + TypedComplexArgument> mComplex_ChannelIndexes; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command AddBlockApplications + */ +class ContentControlAddBlockApplications : public ClusterCommand { +public: + ContentControlAddBlockApplications() + : ClusterCommand("add-block-applications") + , mComplex_Applications(&mRequest.applications) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Applications", &mComplex_Applications); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::AddBlockApplications::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterAddBlockApplicationsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.applications) { + MTRContentControlClusterAppInfoStruct * newElement_0; + newElement_0 = [MTRContentControlClusterAppInfoStruct new]; + newElement_0.catalogVendorID = [NSNumber numberWithUnsignedShort:entry_0.catalogVendorID]; + newElement_0.applicationID = [[NSString alloc] initWithBytes:entry_0.applicationID.data() length:entry_0.applicationID.size() encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + params.applications = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addBlockApplicationsWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ContentControl::Commands::AddBlockApplications::Type mRequest; + TypedComplexArgument> mComplex_Applications; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RemoveBlockApplications + */ +class ContentControlRemoveBlockApplications : public ClusterCommand { +public: + ContentControlRemoveBlockApplications() + : ClusterCommand("remove-block-applications") + , mComplex_Applications(&mRequest.applications) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Applications", &mComplex_Applications); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::RemoveBlockApplications::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterRemoveBlockApplicationsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.applications) { + MTRContentControlClusterAppInfoStruct * newElement_0; + newElement_0 = [MTRContentControlClusterAppInfoStruct new]; + newElement_0.catalogVendorID = [NSNumber numberWithUnsignedShort:entry_0.catalogVendorID]; + newElement_0.applicationID = [[NSString alloc] initWithBytes:entry_0.applicationID.data() length:entry_0.applicationID.size() encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + params.applications = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeBlockApplicationsWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ContentControl::Commands::RemoveBlockApplications::Type mRequest; + TypedComplexArgument> mComplex_Applications; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetBlockContentTimeWindow + */ +class ContentControlSetBlockContentTimeWindow : public ClusterCommand { +public: + ContentControlSetBlockContentTimeWindow() + : ClusterCommand("set-block-content-time-window") + , mComplex_TimeWindow(&mRequest.timeWindow) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TimeWindow", &mComplex_TimeWindow); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetBlockContentTimeWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterSetBlockContentTimeWindowParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.timeWindow = [MTRContentControlClusterTimeWindowStruct new]; + if (mRequest.timeWindow.timeWindowIndex.IsNull()) { + params.timeWindow.timeWindowIndex = nil; + } else { + params.timeWindow.timeWindowIndex = [NSNumber numberWithUnsignedShort:mRequest.timeWindow.timeWindowIndex.Value()]; + } + params.timeWindow.dayOfWeek = [NSNumber numberWithUnsignedChar:mRequest.timeWindow.dayOfWeek.Raw()]; + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + for (auto & entry_1 : mRequest.timeWindow.timePeriod) { + MTRContentControlClusterTimePeriodStruct * newElement_1; + newElement_1 = [MTRContentControlClusterTimePeriodStruct new]; + newElement_1.startHour = [NSNumber numberWithUnsignedChar:entry_1.startHour]; + newElement_1.startMinute = [NSNumber numberWithUnsignedChar:entry_1.startMinute]; + newElement_1.endHour = [NSNumber numberWithUnsignedChar:entry_1.endHour]; + newElement_1.endMinute = [NSNumber numberWithUnsignedChar:entry_1.endMinute]; + [array_1 addObject:newElement_1]; + } + params.timeWindow.timePeriod = array_1; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setBlockContentTimeWindowWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ContentControl::Commands::SetBlockContentTimeWindow::Type mRequest; + TypedComplexArgument mComplex_TimeWindow; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RemoveBlockContentTimeWindow + */ +class ContentControlRemoveBlockContentTimeWindow : public ClusterCommand { +public: + ContentControlRemoveBlockContentTimeWindow() + : ClusterCommand("remove-block-content-time-window") + , mComplex_TimeWindowIndexes(&mRequest.timeWindowIndexes) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TimeWindowIndexes", &mComplex_TimeWindowIndexes); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::RemoveBlockContentTimeWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterRemoveBlockContentTimeWindowParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.timeWindowIndexes) { + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + [array_0 addObject:newElement_0]; + } + params.timeWindowIndexes = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeBlockContentTimeWindowWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ContentControl::Commands::RemoveBlockContentTimeWindow::Type mRequest; + TypedComplexArgument> mComplex_TimeWindowIndexes; +}; + #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL @@ -155683,6 +156259,261 @@ class SubscribeAttributeContentControlBlockUnrated : public SubscribeAttribute { #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/* + * Attribute BlockChannelList + */ +class ReadContentControlBlockChannelList : public ReadAttribute { +public: + ReadContentControlBlockChannelList() + : ReadAttribute("block-channel-list") + { + } + + ~ReadContentControlBlockChannelList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::BlockChannelList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBlockChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.BlockChannelList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ContentControl BlockChannelList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeContentControlBlockChannelList : public SubscribeAttribute { +public: + SubscribeAttributeContentControlBlockChannelList() + : SubscribeAttribute("block-channel-list") + { + } + + ~SubscribeAttributeContentControlBlockChannelList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::BlockChannelList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeBlockChannelListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.BlockChannelList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute BlockApplicationList + */ +class ReadContentControlBlockApplicationList : public ReadAttribute { +public: + ReadContentControlBlockApplicationList() + : ReadAttribute("block-application-list") + { + } + + ~ReadContentControlBlockApplicationList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::BlockApplicationList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBlockApplicationListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.BlockApplicationList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ContentControl BlockApplicationList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeContentControlBlockApplicationList : public SubscribeAttribute { +public: + SubscribeAttributeContentControlBlockApplicationList() + : SubscribeAttribute("block-application-list") + { + } + + ~SubscribeAttributeContentControlBlockApplicationList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::BlockApplicationList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeBlockApplicationListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.BlockApplicationList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute BlockContentTimeWindow + */ +class ReadContentControlBlockContentTimeWindow : public ReadAttribute { +public: + ReadContentControlBlockContentTimeWindow() + : ReadAttribute("block-content-time-window") + { + } + + ~ReadContentControlBlockContentTimeWindow() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::BlockContentTimeWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBlockContentTimeWindowWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.BlockContentTimeWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ContentControl BlockContentTimeWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeContentControlBlockContentTimeWindow : public SubscribeAttribute { +public: + SubscribeAttributeContentControlBlockContentTimeWindow() + : SubscribeAttribute("block-content-time-window") + { + } + + ~SubscribeAttributeContentControlBlockContentTimeWindow() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::BlockContentTimeWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeBlockContentTimeWindowWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.BlockContentTimeWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ @@ -156240,14 +157071,14 @@ class ContentAppObserverContentAppMessage : public ClusterCommand { __auto_type * params = [[MTRContentAppObserverClusterContentAppMessageParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - if (mRequest.data.HasValue()) { - params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.data = nil; - } + params.data = [[NSString alloc] initWithBytes:mRequest.data.data() length:mRequest.data.size() encoding:NSUTF8StringEncoding]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.encodingHint = [[NSString alloc] initWithBytes:mRequest.encodingHint.data() length:mRequest.encodingHint.size() encoding:NSUTF8StringEncoding]; + if (mRequest.encodingHint.HasValue()) { + params.encodingHint = [[NSString alloc] initWithBytes:mRequest.encodingHint.Value().data() length:mRequest.encodingHint.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.encodingHint = nil; + } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -188410,6 +189241,24 @@ void registerClusterContentControl(Commands & commands) #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // @@ -188446,6 +189295,18 @@ void registerClusterContentControl(Commands & commands) make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), //