diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 180d374b40e83b..e0904bb5162998 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -198,6 +198,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml \
+ src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \
diff --git a/docs/zap_clusters.md b/docs/zap_clusters.md
index 94fe851dcdda21..1250a60b71302e 100644
--- a/docs/zap_clusters.md
+++ b/docs/zap_clusters.md
@@ -129,6 +129,7 @@ Generally regenerate using one of:
| 1294 | 0x50E | AccountLogin |
| 1295 | 0x50F | ContentControl |
| 1296 | 0x510 | ContentAppObserver |
+| 1363 | 0x553 | WebRTCTransportProvider |
| 1366 | 0x556 | Chime |
| 1872 | 0x750 | EcosystemInformation |
| 1873 | 0x751 | CommissionerControl |
diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint
index c1e2e48cde9498..1573cc7065764e 100644
--- a/scripts/rules.matterlint
+++ b/scripts/rules.matterlint
@@ -108,6 +108,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml";
+load "../src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/window-covering.xml";
diff --git a/src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml
new file mode 100644
index 00000000000000..9e338efee7f7ce
--- /dev/null
+++ b/src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ WebRTC Transport Provider
+ 0x0553
+ WEBRTC_TRANSPORT_PROVIDER_CLUSTER
+ The WebRTC transport provider cluster provides a way for stream providers (e.g. Cameras) to stream or receive their data through WebRTC.
+ true
+ true
+
+ CurrentSessions
+
+ Requests that the Provider initiates a new session with the Offer / Answer flow in a way that allows for options to be passed and work with devices needing the standby flow.
+
+
+
+
+
+
+
+
+
+ This command SHALL be generated in response to a SolicitOffer command.
+
+
+
+
+
+
+
+ This command allows an SDP Offer to be set and start a new session.
+
+
+
+
+
+
+
+
+
+
+
+ This command contains information about the stream created as a response to the requestor's offer.
+
+
+
+
+
+
+ This command SHALL be initiated from a Node in response to an Offer that was previously received from a remote peer.
+
+
+
+
+
+ This command allows for https://www.rfc-editor.org/rfc/rfc8839#section-4.2.1.2 nominated after the initial Offer / Answer exchange to be added to a session during the gathering phase.
+
+
+
+
+
+ This command instructs the stream provider to end the WebRTC session.
+
+
+
+
+
+
diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
index dbb08dd6748bc0..e4c9a18e6c817b 100644
--- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json
+++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
@@ -131,6 +131,7 @@
"washer-controls-cluster.xml",
"water-heater-management-cluster.xml",
"water-heater-mode-cluster.xml",
+ "webrtc-provider-cluster.xml",
"wifi-network-diagnostics-cluster.xml",
"wifi-network-management-cluster.xml",
"window-covering.xml",
@@ -286,8 +287,7 @@
"ActiveModeThreshold",
"RegisteredClients",
"ICDCounter",
- "ClientsSupportedPerFabric",
- "MaximumCheckInBackOff"
+ "ClientsSupportedPerFabric"
],
"Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"],
"Operational Credentials": [
@@ -416,13 +416,7 @@
"DSTOffsetListMaxSize"
],
"Temperature Control": ["SupportedTemperatureLevels"],
- "Dishwasher Mode": [
- "SupportedModes",
- "CurrentMode",
- "StartUpMode",
- "OnMode",
- "FeatureMap"
- ],
+ "Dishwasher Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Microwave Oven Control": [
"CookTime",
@@ -436,18 +430,10 @@
"WattRating",
"FeatureMap"
],
- "Laundry Washer Mode": [
- "SupportedModes",
- "CurrentMode",
- "StartUpMode",
- "OnMode",
- "FeatureMap"
- ],
+ "Laundry Washer Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Refrigerator And Temperature Controlled Cabinet Mode": [
"SupportedModes",
"CurrentMode",
- "StartUpMode",
- "OnMode",
"FeatureMap"
],
"RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json
index 261a87d842b223..b306dba2239540 100644
--- a/src/app/zap-templates/zcl/zcl.json
+++ b/src/app/zap-templates/zcl/zcl.json
@@ -125,6 +125,7 @@
"washer-controls-cluster.xml",
"water-heater-management-cluster.xml",
"water-heater-mode-cluster.xml",
+ "webrtc-provider-cluster.xml",
"wifi-network-diagnostics-cluster.xml",
"wifi-network-management-cluster.xml",
"window-covering.xml",
@@ -280,8 +281,7 @@
"ActiveModeThreshold",
"RegisteredClients",
"ICDCounter",
- "ClientsSupportedPerFabric",
- "MaximumCheckInBackOff"
+ "ClientsSupportedPerFabric"
],
"Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"],
"Operational Credentials": [
@@ -410,13 +410,7 @@
"DSTOffsetListMaxSize"
],
"Temperature Control": ["SupportedTemperatureLevels"],
- "Dishwasher Mode": [
- "SupportedModes",
- "CurrentMode",
- "StartUpMode",
- "OnMode",
- "FeatureMap"
- ],
+ "Dishwasher Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Microwave Oven Control": [
"CookTime",
@@ -430,18 +424,10 @@
"WattRating",
"FeatureMap"
],
- "Laundry Washer Mode": [
- "SupportedModes",
- "CurrentMode",
- "StartUpMode",
- "OnMode",
- "FeatureMap"
- ],
+ "Laundry Washer Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Refrigerator And Temperature Controlled Cabinet Mode": [
"SupportedModes",
"CurrentMode",
- "StartUpMode",
- "OnMode",
"FeatureMap"
],
"RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json
index fa76c0e9a2f767..c240008e1c31c9 100644
--- a/src/app/zap_cluster_list.json
+++ b/src/app/zap_cluster_list.json
@@ -131,6 +131,7 @@
"LAUNDRY_DRYER_CONTROLS_CLUSTER": [],
"WATER_HEATER_MANAGEMENT_CLUSTER": [],
"WATER_HEATER_MODE_CLUSTER": [],
+ "WEB_RTC_PROVIDER_CLUSTER": [],
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [],
"WINDOW_COVERING_CLUSTER": []
},
@@ -310,6 +311,7 @@
"WAKE_ON_LAN_CLUSTER": ["wake-on-lan-server"],
"LAUNDRY_WASHER_CONTROLS_CLUSTER": ["laundry-washer-controls-server"],
"LAUNDRY_DRYER_CONTROLS_CLUSTER": ["laundry-dryer-controls-server"],
+ "WEB_RTC_PROVIDER_CLUSTER": [],
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": ["wifi-network-diagnostics-server"],
"WIFI_NETWORK_MANAGEMENT_CLUSTER": ["wifi-network-management-server"],
"WINDOW_COVERING_CLUSTER": ["window-covering-server"],
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index 2f7263bb321af1..7f5d7fda8698e3 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -9415,6 +9415,121 @@ provisional cluster ContentAppObserver = 1296 {
command ContentAppMessage(ContentAppMessageRequest): ContentAppMessageResponse = 0;
}
+/** The WebRTC transport provider cluster provides a way for stream providers (e.g. Cameras) to stream or receive their data through WebRTC. */
+provisional cluster WebRTCTransportProvider = 1363 {
+ revision 1;
+
+ enum StreamTypeEnum : enum8 {
+ kInternal = 0;
+ kRecording = 1;
+ kAnalysis = 2;
+ kLiveView = 3;
+ }
+
+ enum WebRTCEndReasonEnum : enum8 {
+ kIceFailed = 0;
+ kIceTimeout = 1;
+ kUserHangup = 2;
+ kUserBusy = 3;
+ kReplaced = 4;
+ kNoUserMedia = 5;
+ kInviteTimeout = 6;
+ kAnsweredElsewhere = 7;
+ kOutOfResources = 8;
+ kMediaTimeout = 9;
+ kLowPower = 10;
+ kUnknownReason = 11;
+ }
+
+ bitmap WebRTCMetadataOptions : bitmap8 {
+ kDataTLV = 0x1;
+ }
+
+ struct ICEServerStruct {
+ char_string urls[] = 1;
+ optional char_string username = 2;
+ optional char_string credential = 3;
+ optional int16u caid = 4;
+ }
+
+ struct WebRTCSessionStruct {
+ int16u id = 1;
+ node_id peerNodeID = 2;
+ fabric_idx peerFabricIndex = 3;
+ StreamTypeEnum streamType = 4;
+ nullable int16u videoStreamID = 5;
+ nullable int16u audioStreamID = 6;
+ WebRTCMetadataOptions metadataOptions = 7;
+ }
+
+ readonly attribute WebRTCSessionStruct currentSessions[] = 0;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct SolicitOfferRequest {
+ StreamTypeEnum streamType = 0;
+ optional nullable int16u videoStreamID = 1;
+ optional nullable int16u audioStreamID = 2;
+ optional ICEServerStruct ICEServers[] = 3;
+ optional char_string ICETransportPolicy = 4;
+ optional WebRTCMetadataOptions metadataOptions = 5;
+ }
+
+ response struct SolicitOfferResponse = 2 {
+ int16u webRTCSessionID = 0;
+ boolean deferredOffer = 1;
+ optional nullable int16u videoStreamID = 2;
+ optional nullable int16u audioStreamID = 3;
+ }
+
+ request struct ProvideOfferRequest {
+ nullable int16u webRTCSessionID = 0;
+ char_string sdp = 1;
+ StreamTypeEnum streamType = 2;
+ optional nullable int16u videoStreamID = 3;
+ optional nullable int16u audioStreamID = 4;
+ optional ICEServerStruct ICEServers[] = 5;
+ optional char_string ICETransportPolicy = 6;
+ optional WebRTCMetadataOptions metadataOptions = 7;
+ }
+
+ response struct ProvideOfferResponse = 4 {
+ int16u webRTCSessionID = 0;
+ int16u videoStreamID = 1;
+ int16u audioStreamID = 2;
+ }
+
+ request struct ProvideAnswerRequest {
+ int16u webRTCSessionID = 0;
+ char_string sdp = 1;
+ }
+
+ request struct ProvideICECandidateRequest {
+ int16u webRTCSessionID = 0;
+ char_string ICECandidate = 1;
+ }
+
+ request struct EndSessionRequest {
+ int16u webRTCSessionID = 0;
+ WebRTCEndReasonEnum reason = 1;
+ }
+
+ /** Requests that the Provider initiates a new session with the Offer / Answer flow in a way that allows for options to be passed and work with devices needing the standby flow. */
+ command SolicitOffer(SolicitOfferRequest): SolicitOfferResponse = 1;
+ /** This command allows an SDP Offer to be set and start a new session. */
+ command ProvideOffer(ProvideOfferRequest): ProvideOfferResponse = 3;
+ /** This command SHALL be initiated from a Node in response to an Offer that was previously received from a remote peer. */
+ command ProvideAnswer(ProvideAnswerRequest): DefaultSuccess = 5;
+ /** This command allows for https://www.rfc-editor.org/rfc/rfc8839#section-4.2.1.2 nominated after the initial Offer / Answer exchange to be added to a session during the gathering phase. */
+ command ProvideICECandidate(ProvideICECandidateRequest): DefaultSuccess = 6;
+ /** This command instructs the stream provider to end the WebRTC session. */
+ command EndSession(EndSessionRequest): DefaultSuccess = 7;
+}
+
/** This cluster provides facilities to configure and play Chime sounds, such as those used in a doorbell. */
provisional cluster Chime = 1366 {
revision 1;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
index dbc26ae23c7a10..88e4e0fb901447 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -59491,6 +59491,453 @@ public void onSuccess(byte[] tlv) {
}
}
+ public static class WebRTCTransportProviderCluster extends BaseChipCluster {
+ public static final long CLUSTER_ID = 1363L;
+
+ private static final long CURRENT_SESSIONS_ATTRIBUTE_ID = 0L;
+ 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;
+ private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L;
+ private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L;
+ private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L;
+
+ public WebRTCTransportProviderCluster(long devicePtr, int endpointId) {
+ super(devicePtr, endpointId, CLUSTER_ID);
+ }
+
+ @Override
+ @Deprecated
+ public long initWithDevice(long devicePtr, int endpointId) {
+ return 0L;
+ }
+
+ public void solicitOffer(SolicitOfferResponseCallback callback, Integer streamType, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID, Optional> ICEServers, Optional ICETransportPolicy, Optional metadataOptions) {
+ solicitOffer(callback, streamType, videoStreamID, audioStreamID, ICEServers, ICETransportPolicy, metadataOptions, 0);
+ }
+
+ public void solicitOffer(SolicitOfferResponseCallback callback, Integer streamType, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID, Optional> ICEServers, Optional ICETransportPolicy, Optional metadataOptions, int timedInvokeTimeoutMs) {
+ final long commandId = 1L;
+
+ ArrayList elements = new ArrayList<>();
+ final long streamTypeFieldID = 0L;
+ BaseTLVType streamTypetlvValue = new UIntType(streamType);
+ elements.add(new StructElement(streamTypeFieldID, streamTypetlvValue));
+
+ final long videoStreamIDFieldID = 1L;
+ BaseTLVType videoStreamIDtlvValue = videoStreamID != null ? videoStreamID.map((nonOptionalvideoStreamID) -> new UIntType(nonOptionalvideoStreamID)).orElse(new EmptyType()) : new NullType();
+ elements.add(new StructElement(videoStreamIDFieldID, videoStreamIDtlvValue));
+
+ final long audioStreamIDFieldID = 2L;
+ BaseTLVType audioStreamIDtlvValue = audioStreamID != null ? audioStreamID.map((nonOptionalaudioStreamID) -> new UIntType(nonOptionalaudioStreamID)).orElse(new EmptyType()) : new NullType();
+ elements.add(new StructElement(audioStreamIDFieldID, audioStreamIDtlvValue));
+
+ final long ICEServersFieldID = 3L;
+ BaseTLVType ICEServerstlvValue = ICEServers.map((nonOptionalICEServers) -> ArrayType.generateArrayType(nonOptionalICEServers, (elementnonOptionalICEServers) -> elementnonOptionalICEServers.encodeTlv())).orElse(new EmptyType());
+ elements.add(new StructElement(ICEServersFieldID, ICEServerstlvValue));
+
+ final long ICETransportPolicyFieldID = 4L;
+ BaseTLVType ICETransportPolicytlvValue = ICETransportPolicy.map((nonOptionalICETransportPolicy) -> new StringType(nonOptionalICETransportPolicy)).orElse(new EmptyType());
+ elements.add(new StructElement(ICETransportPolicyFieldID, ICETransportPolicytlvValue));
+
+ final long metadataOptionsFieldID = 5L;
+ BaseTLVType metadataOptionstlvValue = metadataOptions.map((nonOptionalmetadataOptions) -> new UIntType(nonOptionalmetadataOptions)).orElse(new EmptyType());
+ elements.add(new StructElement(metadataOptionsFieldID, metadataOptionstlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long webRTCSessionIDFieldID = 0L;
+ Integer webRTCSessionID = null;
+ final long deferredOfferFieldID = 1L;
+ Boolean deferredOffer = null;
+ final long videoStreamIDFieldID = 2L;
+ @Nullable Optional videoStreamID = null;
+ final long audioStreamIDFieldID = 3L;
+ @Nullable Optional audioStreamID = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == webRTCSessionIDFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ webRTCSessionID = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == deferredOfferFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Boolean) {
+ BooleanType castingValue = element.value(BooleanType.class);
+ deferredOffer = castingValue.value(Boolean.class);
+ }
+ } else if (element.contextTagNum() == videoStreamIDFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ videoStreamID = Optional.of(castingValue.value(Integer.class));
+ }
+ } else if (element.contextTagNum() == audioStreamIDFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ audioStreamID = Optional.of(castingValue.value(Integer.class));
+ }
+ }
+ }
+ callback.onSuccess(webRTCSessionID, deferredOffer, videoStreamID, audioStreamID);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void provideOffer(ProvideOfferResponseCallback callback, @Nullable Integer webRTCSessionID, String sdp, Integer streamType, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID, Optional> ICEServers, Optional ICETransportPolicy, Optional metadataOptions) {
+ provideOffer(callback, webRTCSessionID, sdp, streamType, videoStreamID, audioStreamID, ICEServers, ICETransportPolicy, metadataOptions, 0);
+ }
+
+ public void provideOffer(ProvideOfferResponseCallback callback, @Nullable Integer webRTCSessionID, String sdp, Integer streamType, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID, Optional> ICEServers, Optional ICETransportPolicy, Optional metadataOptions, int timedInvokeTimeoutMs) {
+ final long commandId = 3L;
+
+ ArrayList elements = new ArrayList<>();
+ final long webRTCSessionIDFieldID = 0L;
+ BaseTLVType webRTCSessionIDtlvValue = webRTCSessionID != null ? new UIntType(webRTCSessionID) : new NullType();
+ elements.add(new StructElement(webRTCSessionIDFieldID, webRTCSessionIDtlvValue));
+
+ final long sdpFieldID = 1L;
+ BaseTLVType sdptlvValue = new StringType(sdp);
+ elements.add(new StructElement(sdpFieldID, sdptlvValue));
+
+ final long streamTypeFieldID = 2L;
+ BaseTLVType streamTypetlvValue = new UIntType(streamType);
+ elements.add(new StructElement(streamTypeFieldID, streamTypetlvValue));
+
+ final long videoStreamIDFieldID = 3L;
+ BaseTLVType videoStreamIDtlvValue = videoStreamID != null ? videoStreamID.map((nonOptionalvideoStreamID) -> new UIntType(nonOptionalvideoStreamID)).orElse(new EmptyType()) : new NullType();
+ elements.add(new StructElement(videoStreamIDFieldID, videoStreamIDtlvValue));
+
+ final long audioStreamIDFieldID = 4L;
+ BaseTLVType audioStreamIDtlvValue = audioStreamID != null ? audioStreamID.map((nonOptionalaudioStreamID) -> new UIntType(nonOptionalaudioStreamID)).orElse(new EmptyType()) : new NullType();
+ elements.add(new StructElement(audioStreamIDFieldID, audioStreamIDtlvValue));
+
+ final long ICEServersFieldID = 5L;
+ BaseTLVType ICEServerstlvValue = ICEServers.map((nonOptionalICEServers) -> ArrayType.generateArrayType(nonOptionalICEServers, (elementnonOptionalICEServers) -> elementnonOptionalICEServers.encodeTlv())).orElse(new EmptyType());
+ elements.add(new StructElement(ICEServersFieldID, ICEServerstlvValue));
+
+ final long ICETransportPolicyFieldID = 6L;
+ BaseTLVType ICETransportPolicytlvValue = ICETransportPolicy.map((nonOptionalICETransportPolicy) -> new StringType(nonOptionalICETransportPolicy)).orElse(new EmptyType());
+ elements.add(new StructElement(ICETransportPolicyFieldID, ICETransportPolicytlvValue));
+
+ final long metadataOptionsFieldID = 7L;
+ BaseTLVType metadataOptionstlvValue = metadataOptions.map((nonOptionalmetadataOptions) -> new UIntType(nonOptionalmetadataOptions)).orElse(new EmptyType());
+ elements.add(new StructElement(metadataOptionsFieldID, metadataOptionstlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long webRTCSessionIDFieldID = 0L;
+ Integer webRTCSessionID = null;
+ final long videoStreamIDFieldID = 1L;
+ Integer videoStreamID = null;
+ final long audioStreamIDFieldID = 2L;
+ Integer audioStreamID = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == webRTCSessionIDFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ webRTCSessionID = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == videoStreamIDFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ videoStreamID = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == audioStreamIDFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ audioStreamID = castingValue.value(Integer.class);
+ }
+ }
+ }
+ callback.onSuccess(webRTCSessionID, videoStreamID, audioStreamID);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void provideAnswer(DefaultClusterCallback callback, Integer webRTCSessionID, String sdp) {
+ provideAnswer(callback, webRTCSessionID, sdp, 0);
+ }
+
+ public void provideAnswer(DefaultClusterCallback callback, Integer webRTCSessionID, String sdp, int timedInvokeTimeoutMs) {
+ final long commandId = 5L;
+
+ ArrayList elements = new ArrayList<>();
+ final long webRTCSessionIDFieldID = 0L;
+ BaseTLVType webRTCSessionIDtlvValue = new UIntType(webRTCSessionID);
+ elements.add(new StructElement(webRTCSessionIDFieldID, webRTCSessionIDtlvValue));
+
+ final long sdpFieldID = 1L;
+ BaseTLVType sdptlvValue = new StringType(sdp);
+ elements.add(new StructElement(sdpFieldID, sdptlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void provideICECandidate(DefaultClusterCallback callback, Integer webRTCSessionID, String ICECandidate) {
+ provideICECandidate(callback, webRTCSessionID, ICECandidate, 0);
+ }
+
+ public void provideICECandidate(DefaultClusterCallback callback, Integer webRTCSessionID, String ICECandidate, int timedInvokeTimeoutMs) {
+ final long commandId = 6L;
+
+ ArrayList elements = new ArrayList<>();
+ final long webRTCSessionIDFieldID = 0L;
+ BaseTLVType webRTCSessionIDtlvValue = new UIntType(webRTCSessionID);
+ elements.add(new StructElement(webRTCSessionIDFieldID, webRTCSessionIDtlvValue));
+
+ final long ICECandidateFieldID = 1L;
+ BaseTLVType ICECandidatetlvValue = new StringType(ICECandidate);
+ elements.add(new StructElement(ICECandidateFieldID, ICECandidatetlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void endSession(DefaultClusterCallback callback, Integer webRTCSessionID, Integer reason) {
+ endSession(callback, webRTCSessionID, reason, 0);
+ }
+
+ public void endSession(DefaultClusterCallback callback, Integer webRTCSessionID, Integer reason, int timedInvokeTimeoutMs) {
+ final long commandId = 7L;
+
+ ArrayList elements = new ArrayList<>();
+ final long webRTCSessionIDFieldID = 0L;
+ BaseTLVType webRTCSessionIDtlvValue = new UIntType(webRTCSessionID);
+ elements.add(new StructElement(webRTCSessionIDFieldID, webRTCSessionIDtlvValue));
+
+ final long reasonFieldID = 1L;
+ BaseTLVType reasontlvValue = new UIntType(reason);
+ elements.add(new StructElement(reasonFieldID, reasontlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public interface SolicitOfferResponseCallback extends BaseClusterCallback {
+ void onSuccess(Integer webRTCSessionID, Boolean deferredOffer, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID);
+ }
+
+ public interface ProvideOfferResponseCallback extends BaseClusterCallback {
+ void onSuccess(Integer webRTCSessionID, Integer videoStreamID, Integer audioStreamID);
+ }
+
+ public interface CurrentSessionsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface EventListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface AttributeListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public void readCurrentSessionsAttribute(
+ CurrentSessionsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SESSIONS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_SESSIONS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeCurrentSessionsAttribute(
+ CurrentSessionsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SESSIONS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_SESSIONS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readEventListAttribute(
+ EventListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeEventListAttribute(
+ EventListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAttributeListAttribute(
+ AttributeListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAttributeListAttribute(
+ AttributeListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readFeatureMapAttribute(
+ LongAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeFeatureMapAttribute(
+ LongAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readClusterRevisionAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeClusterRevisionAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+ }
+
public static class ChimeCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 1366L;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
index dc9a94cae7cb37..4c04d0ec0eb056 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
@@ -12724,6 +12724,233 @@ public String toString() {
return output.toString();
}
}
+public static class WebRTCTransportProviderClusterICEServerStruct {
+ public ArrayList urls;
+ public Optional username;
+ public Optional credential;
+ public Optional caid;
+ private static final long URLS_ID = 1L;
+ private static final long USERNAME_ID = 2L;
+ private static final long CREDENTIAL_ID = 3L;
+ private static final long CAID_ID = 4L;
+
+ public WebRTCTransportProviderClusterICEServerStruct(
+ ArrayList urls,
+ Optional username,
+ Optional credential,
+ Optional caid
+ ) {
+ this.urls = urls;
+ this.username = username;
+ this.credential = credential;
+ this.caid = caid;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(URLS_ID, ArrayType.generateArrayType(urls, (elementurls) -> new StringType(elementurls))));
+ values.add(new StructElement(USERNAME_ID, username.map((nonOptionalusername) -> new StringType(nonOptionalusername)).orElse(new EmptyType())));
+ values.add(new StructElement(CREDENTIAL_ID, credential.map((nonOptionalcredential) -> new StringType(nonOptionalcredential)).orElse(new EmptyType())));
+ values.add(new StructElement(CAID_ID, caid.map((nonOptionalcaid) -> new UIntType(nonOptionalcaid)).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static WebRTCTransportProviderClusterICEServerStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ ArrayList urls = null;
+ Optional username = Optional.empty();
+ Optional credential = Optional.empty();
+ Optional caid = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == URLS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ urls = castingValue.map((elementcastingValue) -> elementcastingValue.value(String.class));
+ }
+ } else if (element.contextTagNum() == USERNAME_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.String) {
+ StringType castingValue = element.value(StringType.class);
+ username = Optional.of(castingValue.value(String.class));
+ }
+ } else if (element.contextTagNum() == CREDENTIAL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.String) {
+ StringType castingValue = element.value(StringType.class);
+ credential = Optional.of(castingValue.value(String.class));
+ }
+ } else if (element.contextTagNum() == CAID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ caid = Optional.of(castingValue.value(Integer.class));
+ }
+ }
+ }
+ return new WebRTCTransportProviderClusterICEServerStruct(
+ urls,
+ username,
+ credential,
+ caid
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("WebRTCTransportProviderClusterICEServerStruct {\n");
+ output.append("\turls: ");
+ output.append(urls);
+ output.append("\n");
+ output.append("\tusername: ");
+ output.append(username);
+ output.append("\n");
+ output.append("\tcredential: ");
+ output.append(credential);
+ output.append("\n");
+ output.append("\tcaid: ");
+ output.append(caid);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class WebRTCTransportProviderClusterWebRTCSessionStruct {
+ public Integer id;
+ public Long peerNodeID;
+ public Integer peerFabricIndex;
+ public Integer streamType;
+ public @Nullable Integer videoStreamID;
+ public @Nullable Integer audioStreamID;
+ public Integer metadataOptions;
+ private static final long ID_ID = 1L;
+ private static final long PEER_NODE_ID_ID = 2L;
+ private static final long PEER_FABRIC_INDEX_ID = 3L;
+ private static final long STREAM_TYPE_ID = 4L;
+ private static final long VIDEO_STREAM_ID_ID = 5L;
+ private static final long AUDIO_STREAM_ID_ID = 6L;
+ private static final long METADATA_OPTIONS_ID = 7L;
+
+ public WebRTCTransportProviderClusterWebRTCSessionStruct(
+ Integer id,
+ Long peerNodeID,
+ Integer peerFabricIndex,
+ Integer streamType,
+ @Nullable Integer videoStreamID,
+ @Nullable Integer audioStreamID,
+ Integer metadataOptions
+ ) {
+ this.id = id;
+ this.peerNodeID = peerNodeID;
+ this.peerFabricIndex = peerFabricIndex;
+ this.streamType = streamType;
+ this.videoStreamID = videoStreamID;
+ this.audioStreamID = audioStreamID;
+ this.metadataOptions = metadataOptions;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(ID_ID, new UIntType(id)));
+ values.add(new StructElement(PEER_NODE_ID_ID, new UIntType(peerNodeID)));
+ values.add(new StructElement(PEER_FABRIC_INDEX_ID, new UIntType(peerFabricIndex)));
+ values.add(new StructElement(STREAM_TYPE_ID, new UIntType(streamType)));
+ values.add(new StructElement(VIDEO_STREAM_ID_ID, videoStreamID != null ? new UIntType(videoStreamID) : new NullType()));
+ values.add(new StructElement(AUDIO_STREAM_ID_ID, audioStreamID != null ? new UIntType(audioStreamID) : new NullType()));
+ values.add(new StructElement(METADATA_OPTIONS_ID, new UIntType(metadataOptions)));
+
+ return new StructType(values);
+ }
+
+ public static WebRTCTransportProviderClusterWebRTCSessionStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer id = null;
+ Long peerNodeID = null;
+ Integer peerFabricIndex = null;
+ Integer streamType = null;
+ @Nullable Integer videoStreamID = null;
+ @Nullable Integer audioStreamID = null;
+ Integer metadataOptions = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ id = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == PEER_NODE_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ peerNodeID = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == PEER_FABRIC_INDEX_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ peerFabricIndex = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == STREAM_TYPE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ streamType = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == VIDEO_STREAM_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ videoStreamID = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == AUDIO_STREAM_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ audioStreamID = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == METADATA_OPTIONS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ metadataOptions = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new WebRTCTransportProviderClusterWebRTCSessionStruct(
+ id,
+ peerNodeID,
+ peerFabricIndex,
+ streamType,
+ videoStreamID,
+ audioStreamID,
+ metadataOptions
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("WebRTCTransportProviderClusterWebRTCSessionStruct {\n");
+ output.append("\tid: ");
+ output.append(id);
+ output.append("\n");
+ output.append("\tpeerNodeID: ");
+ output.append(peerNodeID);
+ output.append("\n");
+ output.append("\tpeerFabricIndex: ");
+ output.append(peerFabricIndex);
+ output.append("\n");
+ output.append("\tstreamType: ");
+ output.append(streamType);
+ output.append("\n");
+ output.append("\tvideoStreamID: ");
+ output.append(videoStreamID);
+ output.append("\n");
+ output.append("\taudioStreamID: ");
+ output.append(audioStreamID);
+ output.append("\n");
+ output.append("\tmetadataOptions: ");
+ output.append(metadataOptions);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class ChimeClusterChimeSoundStruct {
public Integer chimeID;
public String name;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index 56ed2c4629cff4..af30b0eb3453ca 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -379,6 +379,9 @@ public static BaseCluster getCluster(long clusterId) {
if (clusterId == ContentAppObserver.ID) {
return new ContentAppObserver();
}
+ if (clusterId == WebRTCTransportProvider.ID) {
+ return new WebRTCTransportProvider();
+ }
if (clusterId == Chime.ID) {
return new Chime();
}
@@ -16881,6 +16884,197 @@ public long getCommandID(String name) throws IllegalArgumentException {
return Command.valueOf(name).getID();
}
}
+ public static class WebRTCTransportProvider implements BaseCluster {
+ public static final long ID = 1363L;
+ public long getID() {
+ return ID;
+ }
+
+ public enum Attribute {
+ CurrentSessions(0L),
+ GeneratedCommandList(65528L),
+ AcceptedCommandList(65529L),
+ EventList(65530L),
+ AttributeList(65531L),
+ FeatureMap(65532L),
+ ClusterRevision(65533L),;
+ private final long id;
+ Attribute(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Attribute value(long id) throws NoSuchFieldError {
+ for (Attribute attribute : Attribute.values()) {
+ if (attribute.getID() == id) {
+ return attribute;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Event {;
+ private final long id;
+ Event(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Event value(long id) throws NoSuchFieldError {
+ for (Event event : Event.values()) {
+ if (event.getID() == id) {
+ return event;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Command {
+ SolicitOffer(1L),
+ ProvideOffer(3L),
+ ProvideAnswer(5L),
+ ProvideICECandidate(6L),
+ EndSession(7L),;
+ private final long id;
+ Command(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Command value(long id) throws NoSuchFieldError {
+ for (Command command : Command.values()) {
+ if (command.getID() == id) {
+ return command;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum SolicitOfferCommandField {StreamType(0),VideoStreamID(1),AudioStreamID(2),ICEServers(3),ICETransportPolicy(4),MetadataOptions(5),;
+ private final int id;
+ SolicitOfferCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static SolicitOfferCommandField value(int id) throws NoSuchFieldError {
+ for (SolicitOfferCommandField field : SolicitOfferCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum ProvideOfferCommandField {WebRTCSessionID(0),Sdp(1),StreamType(2),VideoStreamID(3),AudioStreamID(4),ICEServers(5),ICETransportPolicy(6),MetadataOptions(7),;
+ private final int id;
+ ProvideOfferCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static ProvideOfferCommandField value(int id) throws NoSuchFieldError {
+ for (ProvideOfferCommandField field : ProvideOfferCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum ProvideAnswerCommandField {WebRTCSessionID(0),Sdp(1),;
+ private final int id;
+ ProvideAnswerCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static ProvideAnswerCommandField value(int id) throws NoSuchFieldError {
+ for (ProvideAnswerCommandField field : ProvideAnswerCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum ProvideICECandidateCommandField {WebRTCSessionID(0),ICECandidate(1),;
+ private final int id;
+ ProvideICECandidateCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static ProvideICECandidateCommandField value(int id) throws NoSuchFieldError {
+ for (ProvideICECandidateCommandField field : ProvideICECandidateCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum EndSessionCommandField {WebRTCSessionID(0),Reason(1),;
+ private final int id;
+ EndSessionCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static EndSessionCommandField value(int id) throws NoSuchFieldError {
+ for (EndSessionCommandField field : EndSessionCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }@Override
+ public String getAttributeName(long id) throws NoSuchFieldError {
+ return Attribute.value(id).toString();
+ }
+
+ @Override
+ public String getEventName(long id) throws NoSuchFieldError {
+ return Event.value(id).toString();
+ }
+
+ @Override
+ public String getCommandName(long id) throws NoSuchFieldError {
+ return Command.value(id).toString();
+ }
+
+ @Override
+ public long getAttributeID(String name) throws IllegalArgumentException {
+ return Attribute.valueOf(name).getID();
+ }
+
+ @Override
+ public long getEventID(String name) throws IllegalArgumentException {
+ return Event.valueOf(name).getID();
+ }
+
+ @Override
+ public long getCommandID(String name) throws IllegalArgumentException {
+ return Command.valueOf(name).getID();
+ }
+ }
public static class Chime implements BaseCluster {
public static final long ID = 1366L;
public long getID() {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
index 3025c268521b80..295ada1c577b89 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
@@ -19994,6 +19994,165 @@ public void onError(Exception ex) {
}
}
+
+ public static class DelegatedWebRTCTransportProviderClusterSolicitOfferResponseCallback implements ChipClusters.WebRTCTransportProviderCluster.SolicitOfferResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(Integer webRTCSessionID, Boolean deferredOffer, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID) {
+ Map responseValues = new LinkedHashMap<>();
+
+ CommandResponseInfo webRTCSessionIDResponseValue = new CommandResponseInfo("webRTCSessionID", "Integer");
+ responseValues.put(webRTCSessionIDResponseValue, webRTCSessionID);
+ CommandResponseInfo deferredOfferResponseValue = new CommandResponseInfo("deferredOffer", "Boolean");
+ responseValues.put(deferredOfferResponseValue, deferredOffer);
+ CommandResponseInfo videoStreamIDResponseValue = new CommandResponseInfo("videoStreamID", "Optional");
+ responseValues.put(videoStreamIDResponseValue, videoStreamID);
+ CommandResponseInfo audioStreamIDResponseValue = new CommandResponseInfo("audioStreamID", "Optional");
+ responseValues.put(audioStreamIDResponseValue, audioStreamID);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+
+ public static class DelegatedWebRTCTransportProviderClusterProvideOfferResponseCallback implements ChipClusters.WebRTCTransportProviderCluster.ProvideOfferResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(Integer webRTCSessionID, Integer videoStreamID, Integer audioStreamID) {
+ Map responseValues = new LinkedHashMap<>();
+
+ CommandResponseInfo webRTCSessionIDResponseValue = new CommandResponseInfo("webRTCSessionID", "Integer");
+ responseValues.put(webRTCSessionIDResponseValue, webRTCSessionID);
+ CommandResponseInfo videoStreamIDResponseValue = new CommandResponseInfo("videoStreamID", "Integer");
+ responseValues.put(videoStreamIDResponseValue, videoStreamID);
+ CommandResponseInfo audioStreamIDResponseValue = new CommandResponseInfo("audioStreamID", "Integer");
+ responseValues.put(audioStreamIDResponseValue, audioStreamID);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+ public static class DelegatedWebRTCTransportProviderClusterCurrentSessionsAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.CurrentSessionsAttributeCallback, 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 DelegatedWebRTCTransportProviderClusterGeneratedCommandListAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.GeneratedCommandListAttributeCallback, 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 DelegatedWebRTCTransportProviderClusterAcceptedCommandListAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.AcceptedCommandListAttributeCallback, 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 DelegatedWebRTCTransportProviderClusterEventListAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.EventListAttributeCallback, 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 DelegatedWebRTCTransportProviderClusterAttributeListAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.AttributeListAttributeCallback, 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 DelegatedChimeClusterInstalledChimeSoundsAttributeCallback implements ChipClusters.ChimeCluster.InstalledChimeSoundsAttributeCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
@@ -22435,6 +22594,10 @@ public Map initializeClusterMap() {
(ptr, endpointId) -> new ChipClusters.ContentAppObserverCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("contentAppObserver", contentAppObserverClusterInfo);
+ ClusterInfo webRTCTransportProviderClusterInfo = new ClusterInfo(
+ (ptr, endpointId) -> new ChipClusters.WebRTCTransportProviderCluster(ptr, endpointId), new HashMap<>());
+ clusterMap.put("webRTCTransportProvider", webRTCTransportProviderClusterInfo);
+
ClusterInfo chimeClusterInfo = new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.ChimeCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("chime", chimeClusterInfo);
@@ -22580,6 +22743,7 @@ public void combineCommand(Map destination, Map> getCommandMap() {
commandMap.put("contentAppObserver", contentAppObserverClusterInteractionInfoMap);
+ Map webRTCTransportProviderClusterInteractionInfoMap = new LinkedHashMap<>();
+
+ Map webRTCTransportProvidersolicitOfferCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo webRTCTransportProvidersolicitOfferstreamTypeCommandParameterInfo = new CommandParameterInfo("streamType", Integer.class, Integer.class);
+ webRTCTransportProvidersolicitOfferCommandParams.put("streamType",webRTCTransportProvidersolicitOfferstreamTypeCommandParameterInfo);
+
+ CommandParameterInfo webRTCTransportProvidersolicitOffervideoStreamIDCommandParameterInfo = new CommandParameterInfo("videoStreamID", Optional.class, Integer.class);
+ webRTCTransportProvidersolicitOfferCommandParams.put("videoStreamID",webRTCTransportProvidersolicitOffervideoStreamIDCommandParameterInfo);
+
+ CommandParameterInfo webRTCTransportProvidersolicitOfferaudioStreamIDCommandParameterInfo = new CommandParameterInfo("audioStreamID", Optional.class, Integer.class);
+ webRTCTransportProvidersolicitOfferCommandParams.put("audioStreamID",webRTCTransportProvidersolicitOfferaudioStreamIDCommandParameterInfo);
+
+
+ CommandParameterInfo webRTCTransportProvidersolicitOfferICETransportPolicyCommandParameterInfo = new CommandParameterInfo("ICETransportPolicy", Optional.class, String.class);
+ webRTCTransportProvidersolicitOfferCommandParams.put("ICETransportPolicy",webRTCTransportProvidersolicitOfferICETransportPolicyCommandParameterInfo);
+
+ CommandParameterInfo webRTCTransportProvidersolicitOffermetadataOptionsCommandParameterInfo = new CommandParameterInfo("metadataOptions", Optional.class, Integer.class);
+ webRTCTransportProvidersolicitOfferCommandParams.put("metadataOptions",webRTCTransportProvidersolicitOffermetadataOptionsCommandParameterInfo);
+ InteractionInfo webRTCTransportProvidersolicitOfferInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.WebRTCTransportProviderCluster) cluster)
+ .solicitOffer((ChipClusters.WebRTCTransportProviderCluster.SolicitOfferResponseCallback) callback
+ , (Integer)
+ commandArguments.get("streamType")
+
+ , (Optional)
+ commandArguments.get("videoStreamID")
+
+ , (Optional)
+ commandArguments.get("audioStreamID")
+
+ , (Optional>)
+ commandArguments.get("ICEServers")
+
+ , (Optional)
+ commandArguments.get("ICETransportPolicy")
+
+ , (Optional)
+ commandArguments.get("metadataOptions")
+
+ );
+ },
+ () -> new DelegatedWebRTCTransportProviderClusterSolicitOfferResponseCallback(),
+ webRTCTransportProvidersolicitOfferCommandParams
+ );
+ webRTCTransportProviderClusterInteractionInfoMap.put("solicitOffer", webRTCTransportProvidersolicitOfferInteractionInfo);
+
+ Map webRTCTransportProviderprovideOfferCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo webRTCTransportProviderprovideOfferwebRTCSessionIDCommandParameterInfo = new CommandParameterInfo("webRTCSessionID", Integer.class, Integer.class);
+ webRTCTransportProviderprovideOfferCommandParams.put("webRTCSessionID",webRTCTransportProviderprovideOfferwebRTCSessionIDCommandParameterInfo);
+
+ CommandParameterInfo webRTCTransportProviderprovideOffersdpCommandParameterInfo = new CommandParameterInfo("sdp", String.class, String.class);
+ webRTCTransportProviderprovideOfferCommandParams.put("sdp",webRTCTransportProviderprovideOffersdpCommandParameterInfo);
+
+ CommandParameterInfo webRTCTransportProviderprovideOfferstreamTypeCommandParameterInfo = new CommandParameterInfo("streamType", Integer.class, Integer.class);
+ webRTCTransportProviderprovideOfferCommandParams.put("streamType",webRTCTransportProviderprovideOfferstreamTypeCommandParameterInfo);
+
+ CommandParameterInfo webRTCTransportProviderprovideOffervideoStreamIDCommandParameterInfo = new CommandParameterInfo("videoStreamID", Optional.class, Integer.class);
+ webRTCTransportProviderprovideOfferCommandParams.put("videoStreamID",webRTCTransportProviderprovideOffervideoStreamIDCommandParameterInfo);
+
+ CommandParameterInfo webRTCTransportProviderprovideOfferaudioStreamIDCommandParameterInfo = new CommandParameterInfo("audioStreamID", Optional.class, Integer.class);
+ webRTCTransportProviderprovideOfferCommandParams.put("audioStreamID",webRTCTransportProviderprovideOfferaudioStreamIDCommandParameterInfo);
+
+
+ CommandParameterInfo webRTCTransportProviderprovideOfferICETransportPolicyCommandParameterInfo = new CommandParameterInfo("ICETransportPolicy", Optional.class, String.class);
+ webRTCTransportProviderprovideOfferCommandParams.put("ICETransportPolicy",webRTCTransportProviderprovideOfferICETransportPolicyCommandParameterInfo);
+
+ CommandParameterInfo webRTCTransportProviderprovideOffermetadataOptionsCommandParameterInfo = new CommandParameterInfo("metadataOptions", Optional.class, Integer.class);
+ webRTCTransportProviderprovideOfferCommandParams.put("metadataOptions",webRTCTransportProviderprovideOffermetadataOptionsCommandParameterInfo);
+ InteractionInfo webRTCTransportProviderprovideOfferInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.WebRTCTransportProviderCluster) cluster)
+ .provideOffer((ChipClusters.WebRTCTransportProviderCluster.ProvideOfferResponseCallback) callback
+ , (Integer)
+ commandArguments.get("webRTCSessionID")
+
+ , (String)
+ commandArguments.get("sdp")
+
+ , (Integer)
+ commandArguments.get("streamType")
+
+ , (Optional)
+ commandArguments.get("videoStreamID")
+
+ , (Optional)
+ commandArguments.get("audioStreamID")
+
+ , (Optional>)
+ commandArguments.get("ICEServers")
+
+ , (Optional)
+ commandArguments.get("ICETransportPolicy")
+
+ , (Optional)
+ commandArguments.get("metadataOptions")
+
+ );
+ },
+ () -> new DelegatedWebRTCTransportProviderClusterProvideOfferResponseCallback(),
+ webRTCTransportProviderprovideOfferCommandParams
+ );
+ webRTCTransportProviderClusterInteractionInfoMap.put("provideOffer", webRTCTransportProviderprovideOfferInteractionInfo);
+
+ Map webRTCTransportProviderprovideAnswerCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo webRTCTransportProviderprovideAnswerwebRTCSessionIDCommandParameterInfo = new CommandParameterInfo("webRTCSessionID", Integer.class, Integer.class);
+ webRTCTransportProviderprovideAnswerCommandParams.put("webRTCSessionID",webRTCTransportProviderprovideAnswerwebRTCSessionIDCommandParameterInfo);
+
+ CommandParameterInfo webRTCTransportProviderprovideAnswersdpCommandParameterInfo = new CommandParameterInfo("sdp", String.class, String.class);
+ webRTCTransportProviderprovideAnswerCommandParams.put("sdp",webRTCTransportProviderprovideAnswersdpCommandParameterInfo);
+ InteractionInfo webRTCTransportProviderprovideAnswerInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.WebRTCTransportProviderCluster) cluster)
+ .provideAnswer((DefaultClusterCallback) callback
+ , (Integer)
+ commandArguments.get("webRTCSessionID")
+ , (String)
+ commandArguments.get("sdp")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ webRTCTransportProviderprovideAnswerCommandParams
+ );
+ webRTCTransportProviderClusterInteractionInfoMap.put("provideAnswer", webRTCTransportProviderprovideAnswerInteractionInfo);
+
+ Map webRTCTransportProviderprovideICECandidateCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo webRTCTransportProviderprovideICECandidatewebRTCSessionIDCommandParameterInfo = new CommandParameterInfo("webRTCSessionID", Integer.class, Integer.class);
+ webRTCTransportProviderprovideICECandidateCommandParams.put("webRTCSessionID",webRTCTransportProviderprovideICECandidatewebRTCSessionIDCommandParameterInfo);
+
+ CommandParameterInfo webRTCTransportProviderprovideICECandidateICECandidateCommandParameterInfo = new CommandParameterInfo("ICECandidate", String.class, String.class);
+ webRTCTransportProviderprovideICECandidateCommandParams.put("ICECandidate",webRTCTransportProviderprovideICECandidateICECandidateCommandParameterInfo);
+ InteractionInfo webRTCTransportProviderprovideICECandidateInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.WebRTCTransportProviderCluster) cluster)
+ .provideICECandidate((DefaultClusterCallback) callback
+ , (Integer)
+ commandArguments.get("webRTCSessionID")
+ , (String)
+ commandArguments.get("ICECandidate")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ webRTCTransportProviderprovideICECandidateCommandParams
+ );
+ webRTCTransportProviderClusterInteractionInfoMap.put("provideICECandidate", webRTCTransportProviderprovideICECandidateInteractionInfo);
+
+ Map webRTCTransportProviderendSessionCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo webRTCTransportProviderendSessionwebRTCSessionIDCommandParameterInfo = new CommandParameterInfo("webRTCSessionID", Integer.class, Integer.class);
+ webRTCTransportProviderendSessionCommandParams.put("webRTCSessionID",webRTCTransportProviderendSessionwebRTCSessionIDCommandParameterInfo);
+
+ CommandParameterInfo webRTCTransportProviderendSessionreasonCommandParameterInfo = new CommandParameterInfo("reason", Integer.class, Integer.class);
+ webRTCTransportProviderendSessionCommandParams.put("reason",webRTCTransportProviderendSessionreasonCommandParameterInfo);
+ InteractionInfo webRTCTransportProviderendSessionInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.WebRTCTransportProviderCluster) cluster)
+ .endSession((DefaultClusterCallback) callback
+ , (Integer)
+ commandArguments.get("webRTCSessionID")
+ , (Integer)
+ commandArguments.get("reason")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ webRTCTransportProviderendSessionCommandParams
+ );
+ webRTCTransportProviderClusterInteractionInfoMap.put("endSession", webRTCTransportProviderendSessionInteractionInfo);
+
+ commandMap.put("webRTCTransportProvider", webRTCTransportProviderClusterInteractionInfoMap);
+
Map chimeClusterInteractionInfoMap = new LinkedHashMap<>();
Map chimeplayChimeSoundCommandParams = new LinkedHashMap();
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
index b4ef81d615022b..05036e0391bb0f 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
@@ -18236,6 +18236,87 @@ private static Map readContentAppObserverInteractionInf
return result;
}
+ private static Map readWebRTCTransportProviderInteractionInfo() {
+ Map result = new LinkedHashMap<>();Map readWebRTCTransportProviderCurrentSessionsCommandParams = new LinkedHashMap();
+ InteractionInfo readWebRTCTransportProviderCurrentSessionsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.WebRTCTransportProviderCluster) cluster).readCurrentSessionsAttribute(
+ (ChipClusters.WebRTCTransportProviderCluster.CurrentSessionsAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedWebRTCTransportProviderClusterCurrentSessionsAttributeCallback(),
+ readWebRTCTransportProviderCurrentSessionsCommandParams
+ );
+ result.put("readCurrentSessionsAttribute", readWebRTCTransportProviderCurrentSessionsAttributeInteractionInfo);
+ Map readWebRTCTransportProviderGeneratedCommandListCommandParams = new LinkedHashMap();
+ InteractionInfo readWebRTCTransportProviderGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.WebRTCTransportProviderCluster) cluster).readGeneratedCommandListAttribute(
+ (ChipClusters.WebRTCTransportProviderCluster.GeneratedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedWebRTCTransportProviderClusterGeneratedCommandListAttributeCallback(),
+ readWebRTCTransportProviderGeneratedCommandListCommandParams
+ );
+ result.put("readGeneratedCommandListAttribute", readWebRTCTransportProviderGeneratedCommandListAttributeInteractionInfo);
+ Map readWebRTCTransportProviderAcceptedCommandListCommandParams = new LinkedHashMap();
+ InteractionInfo readWebRTCTransportProviderAcceptedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.WebRTCTransportProviderCluster) cluster).readAcceptedCommandListAttribute(
+ (ChipClusters.WebRTCTransportProviderCluster.AcceptedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedWebRTCTransportProviderClusterAcceptedCommandListAttributeCallback(),
+ readWebRTCTransportProviderAcceptedCommandListCommandParams
+ );
+ result.put("readAcceptedCommandListAttribute", readWebRTCTransportProviderAcceptedCommandListAttributeInteractionInfo);
+ Map readWebRTCTransportProviderEventListCommandParams = new LinkedHashMap();
+ InteractionInfo readWebRTCTransportProviderEventListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.WebRTCTransportProviderCluster) cluster).readEventListAttribute(
+ (ChipClusters.WebRTCTransportProviderCluster.EventListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedWebRTCTransportProviderClusterEventListAttributeCallback(),
+ readWebRTCTransportProviderEventListCommandParams
+ );
+ result.put("readEventListAttribute", readWebRTCTransportProviderEventListAttributeInteractionInfo);
+ Map readWebRTCTransportProviderAttributeListCommandParams = new LinkedHashMap();
+ InteractionInfo readWebRTCTransportProviderAttributeListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.WebRTCTransportProviderCluster) cluster).readAttributeListAttribute(
+ (ChipClusters.WebRTCTransportProviderCluster.AttributeListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedWebRTCTransportProviderClusterAttributeListAttributeCallback(),
+ readWebRTCTransportProviderAttributeListCommandParams
+ );
+ result.put("readAttributeListAttribute", readWebRTCTransportProviderAttributeListAttributeInteractionInfo);
+ Map readWebRTCTransportProviderFeatureMapCommandParams = new LinkedHashMap();
+ InteractionInfo readWebRTCTransportProviderFeatureMapAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.WebRTCTransportProviderCluster) cluster).readFeatureMapAttribute(
+ (ChipClusters.LongAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
+ readWebRTCTransportProviderFeatureMapCommandParams
+ );
+ result.put("readFeatureMapAttribute", readWebRTCTransportProviderFeatureMapAttributeInteractionInfo);
+ Map readWebRTCTransportProviderClusterRevisionCommandParams = new LinkedHashMap();
+ InteractionInfo readWebRTCTransportProviderClusterRevisionAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.WebRTCTransportProviderCluster) cluster).readClusterRevisionAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readWebRTCTransportProviderClusterRevisionCommandParams
+ );
+ result.put("readClusterRevisionAttribute", readWebRTCTransportProviderClusterRevisionAttributeInteractionInfo);
+
+ return result;
+ }
private static Map readChimeInteractionInfo() {
Map result = new LinkedHashMap<>();Map readChimeInstalledChimeSoundsCommandParams = new LinkedHashMap();
InteractionInfo readChimeInstalledChimeSoundsAttributeInteractionInfo = new InteractionInfo(
@@ -19789,6 +19870,7 @@ public Map> getReadAttributeMap() {
put("accountLogin", readAccountLoginInteractionInfo());
put("contentControl", readContentControlInteractionInfo());
put("contentAppObserver", readContentAppObserverInteractionInfo());
+ put("webRTCTransportProvider", readWebRTCTransportProviderInteractionInfo());
put("chime", readChimeInteractionInfo());
put("ecosystemInformation", readEcosystemInformationInteractionInfo());
put("commissionerControl", readCommissionerControlInteractionInfo());
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
index fce8cee5598ec6..0d561c36e77174 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
@@ -3472,6 +3472,8 @@ public Map> getWriteAttributeMap() {
writeAttributeMap.put("contentControl", writeContentControlInteractionInfo);
Map writeContentAppObserverInteractionInfo = new LinkedHashMap<>();
writeAttributeMap.put("contentAppObserver", writeContentAppObserverInteractionInfo);
+ Map writeWebRTCTransportProviderInteractionInfo = new LinkedHashMap<>();
+ writeAttributeMap.put("webRTCTransportProvider", writeWebRTCTransportProviderInteractionInfo);
Map writeChimeInteractionInfo = new LinkedHashMap<>();
Map writeChimeActiveChimeIDCommandParams = new LinkedHashMap();
CommandParameterInfo chimeactiveChimeIDCommandParameterInfo =
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 397c26ee3dc9e5..6187cfbe7c2d44 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
@@ -160,6 +160,8 @@ structs_sources = [
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterHeaterManagementClusterWaterHeaterBoostInfoStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterHeaterModeClusterModeOptionStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterHeaterModeClusterModeTagStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterICEServerStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt",
]
eventstructs_sources = [
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterICEServerStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterICEServerStruct.kt
new file mode 100644
index 00000000000000..e98bab218300f0
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterICEServerStruct.kt
@@ -0,0 +1,106 @@
+/*
+ *
+ * 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.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class WebRTCTransportProviderClusterICEServerStruct(
+ val urls: List,
+ val username: Optional,
+ val credential: Optional,
+ val caid: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("WebRTCTransportProviderClusterICEServerStruct {\n")
+ append("\turls : $urls\n")
+ append("\tusername : $username\n")
+ append("\tcredential : $credential\n")
+ append("\tcaid : $caid\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ startArray(ContextSpecificTag(TAG_URLS))
+ for (item in urls.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ if (username.isPresent) {
+ val optusername = username.get()
+ put(ContextSpecificTag(TAG_USERNAME), optusername)
+ }
+ if (credential.isPresent) {
+ val optcredential = credential.get()
+ put(ContextSpecificTag(TAG_CREDENTIAL), optcredential)
+ }
+ if (caid.isPresent) {
+ val optcaid = caid.get()
+ put(ContextSpecificTag(TAG_CAID), optcaid)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_URLS = 1
+ private const val TAG_USERNAME = 2
+ private const val TAG_CREDENTIAL = 3
+ private const val TAG_CAID = 4
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): WebRTCTransportProviderClusterICEServerStruct {
+ tlvReader.enterStructure(tlvTag)
+ val urls =
+ buildList {
+ tlvReader.enterArray(ContextSpecificTag(TAG_URLS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getString(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+ val username =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_USERNAME))) {
+ Optional.of(tlvReader.getString(ContextSpecificTag(TAG_USERNAME)))
+ } else {
+ Optional.empty()
+ }
+ val credential =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIAL))) {
+ Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CREDENTIAL)))
+ } else {
+ Optional.empty()
+ }
+ val caid =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_CAID))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_CAID)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return WebRTCTransportProviderClusterICEServerStruct(urls, username, credential, caid)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt
new file mode 100644
index 00000000000000..645c9a779bb57d
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt
@@ -0,0 +1,115 @@
+/*
+ *
+ * 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 WebRTCTransportProviderClusterWebRTCSessionStruct(
+ val id: UInt,
+ val peerNodeID: ULong,
+ val peerFabricIndex: UInt,
+ val streamType: UInt,
+ val videoStreamID: UInt?,
+ val audioStreamID: UInt?,
+ val metadataOptions: UInt,
+) {
+ override fun toString(): String = buildString {
+ append("WebRTCTransportProviderClusterWebRTCSessionStruct {\n")
+ append("\tid : $id\n")
+ append("\tpeerNodeID : $peerNodeID\n")
+ append("\tpeerFabricIndex : $peerFabricIndex\n")
+ append("\tstreamType : $streamType\n")
+ append("\tvideoStreamID : $videoStreamID\n")
+ append("\taudioStreamID : $audioStreamID\n")
+ append("\tmetadataOptions : $metadataOptions\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_ID), id)
+ put(ContextSpecificTag(TAG_PEER_NODE_ID), peerNodeID)
+ put(ContextSpecificTag(TAG_PEER_FABRIC_INDEX), peerFabricIndex)
+ put(ContextSpecificTag(TAG_STREAM_TYPE), streamType)
+ if (videoStreamID != null) {
+ put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID)
+ } else {
+ putNull(ContextSpecificTag(TAG_VIDEO_STREAM_ID))
+ }
+ if (audioStreamID != null) {
+ put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), audioStreamID)
+ } else {
+ putNull(ContextSpecificTag(TAG_AUDIO_STREAM_ID))
+ }
+ put(ContextSpecificTag(TAG_METADATA_OPTIONS), metadataOptions)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_ID = 1
+ private const val TAG_PEER_NODE_ID = 2
+ private const val TAG_PEER_FABRIC_INDEX = 3
+ private const val TAG_STREAM_TYPE = 4
+ private const val TAG_VIDEO_STREAM_ID = 5
+ private const val TAG_AUDIO_STREAM_ID = 6
+ private const val TAG_METADATA_OPTIONS = 7
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): WebRTCTransportProviderClusterWebRTCSessionStruct {
+ tlvReader.enterStructure(tlvTag)
+ val id = tlvReader.getUInt(ContextSpecificTag(TAG_ID))
+ val peerNodeID = tlvReader.getULong(ContextSpecificTag(TAG_PEER_NODE_ID))
+ val peerFabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_PEER_FABRIC_INDEX))
+ val streamType = tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_TYPE))
+ val videoStreamID =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_VIDEO_STREAM_ID))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_VIDEO_STREAM_ID))
+ null
+ }
+ val audioStreamID =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_AUDIO_STREAM_ID))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_AUDIO_STREAM_ID))
+ null
+ }
+ val metadataOptions = tlvReader.getUInt(ContextSpecificTag(TAG_METADATA_OPTIONS))
+
+ tlvReader.exitContainer()
+
+ return WebRTCTransportProviderClusterWebRTCSessionStruct(
+ id,
+ peerNodeID,
+ peerFabricIndex,
+ streamType,
+ videoStreamID,
+ audioStreamID,
+ metadataOptions,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/WebRTCTransportProviderCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/WebRTCTransportProviderCluster.kt
new file mode 100644
index 00000000000000..6fee15959f507e
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/WebRTCTransportProviderCluster.kt
@@ -0,0 +1,1097 @@
+/*
+ *
+ * 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.clusters
+
+import java.time.Duration
+import java.util.logging.Level
+import java.util.logging.Logger
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.transform
+import matter.controller.InvokeRequest
+import matter.controller.InvokeResponse
+import matter.controller.MatterController
+import matter.controller.ReadData
+import matter.controller.ReadRequest
+import matter.controller.SubscribeRequest
+import matter.controller.SubscriptionState
+import matter.controller.UIntSubscriptionState
+import matter.controller.UShortSubscriptionState
+import matter.controller.cluster.structs.*
+import matter.controller.model.AttributePath
+import matter.controller.model.CommandPath
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class WebRTCTransportProviderCluster(
+ private val controller: MatterController,
+ private val endpointId: UShort,
+) {
+ class SolicitOfferResponse(
+ val webRTCSessionID: UShort,
+ val deferredOffer: Boolean,
+ val videoStreamID: UShort?,
+ val audioStreamID: UShort?,
+ )
+
+ class ProvideOfferResponse(
+ val webRTCSessionID: UShort,
+ val videoStreamID: UShort,
+ val audioStreamID: UShort,
+ )
+
+ class CurrentSessionsAttribute(
+ val value: List
+ )
+
+ sealed class CurrentSessionsAttributeSubscriptionState {
+ data class Success(val value: List) :
+ CurrentSessionsAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : CurrentSessionsAttributeSubscriptionState()
+
+ object SubscriptionEstablished : CurrentSessionsAttributeSubscriptionState()
+ }
+
+ class GeneratedCommandListAttribute(val value: List)
+
+ sealed class GeneratedCommandListAttributeSubscriptionState {
+ data class Success(val value: List) : GeneratedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState()
+ }
+
+ class AcceptedCommandListAttribute(val value: List)
+
+ sealed class AcceptedCommandListAttributeSubscriptionState {
+ data class Success(val value: List) : AcceptedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState()
+ }
+
+ class EventListAttribute(val value: List)
+
+ sealed class EventListAttributeSubscriptionState {
+ data class Success(val value: List) : EventListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : EventListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : EventListAttributeSubscriptionState()
+ }
+
+ class AttributeListAttribute(val value: List)
+
+ sealed class AttributeListAttributeSubscriptionState {
+ data class Success(val value: List) : AttributeListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AttributeListAttributeSubscriptionState()
+ }
+
+ suspend fun solicitOffer(
+ streamType: UByte,
+ videoStreamID: UShort?,
+ audioStreamID: UShort?,
+ ICEServers: List?,
+ ICETransportPolicy: String?,
+ metadataOptions: UByte?,
+ timedInvokeTimeout: Duration? = null,
+ ): SolicitOfferResponse {
+ val commandId: UInt = 1u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_STREAM_TYPE_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_STREAM_TYPE_REQ), streamType)
+
+ val TAG_VIDEO_STREAM_ID_REQ: Int = 1
+ videoStreamID?.let { tlvWriter.put(ContextSpecificTag(TAG_VIDEO_STREAM_ID_REQ), videoStreamID) }
+
+ val TAG_AUDIO_STREAM_ID_REQ: Int = 2
+ audioStreamID?.let { tlvWriter.put(ContextSpecificTag(TAG_AUDIO_STREAM_ID_REQ), audioStreamID) }
+
+ val TAG_ICE_SERVERS_REQ: Int = 3
+ ICEServers?.let {
+ tlvWriter.startArray(ContextSpecificTag(TAG_ICE_SERVERS_REQ))
+ for (item in ICEServers.iterator()) {
+ item.toTlv(AnonymousTag, tlvWriter)
+ }
+ tlvWriter.endArray()
+ }
+
+ val TAG_ICE_TRANSPORT_POLICY_REQ: Int = 4
+ ICETransportPolicy?.let {
+ tlvWriter.put(ContextSpecificTag(TAG_ICE_TRANSPORT_POLICY_REQ), ICETransportPolicy)
+ }
+
+ val TAG_METADATA_OPTIONS_REQ: Int = 5
+ metadataOptions?.let {
+ tlvWriter.put(ContextSpecificTag(TAG_METADATA_OPTIONS_REQ), metadataOptions)
+ }
+ 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}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_WEB_RTC_SESSION_ID: Int = 0
+ var webRTCSessionID_decoded: UShort? = null
+
+ val TAG_DEFERRED_OFFER: Int = 1
+ var deferredOffer_decoded: Boolean? = null
+
+ val TAG_VIDEO_STREAM_ID: Int = 2
+ var videoStreamID_decoded: UShort? = null
+
+ val TAG_AUDIO_STREAM_ID: Int = 3
+ var audioStreamID_decoded: UShort? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_WEB_RTC_SESSION_ID)) {
+ webRTCSessionID_decoded = tlvReader.getUShort(tag)
+ }
+
+ if (tag == ContextSpecificTag(TAG_DEFERRED_OFFER)) {
+ deferredOffer_decoded = tlvReader.getBoolean(tag)
+ }
+
+ if (tag == ContextSpecificTag(TAG_VIDEO_STREAM_ID)) {
+ videoStreamID_decoded =
+ if (tlvReader.isNull()) {
+ tlvReader.getNull(tag)
+ null
+ } else {
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(tag)) {
+ tlvReader.getUShort(tag)
+ } else {
+ null
+ }
+ } else {
+ tlvReader.getNull(tag)
+ null
+ }
+ }
+ }
+
+ if (tag == ContextSpecificTag(TAG_AUDIO_STREAM_ID)) {
+ audioStreamID_decoded =
+ if (tlvReader.isNull()) {
+ tlvReader.getNull(tag)
+ null
+ } else {
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(tag)) {
+ tlvReader.getUShort(tag)
+ } else {
+ null
+ }
+ } else {
+ tlvReader.getNull(tag)
+ null
+ }
+ }
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (webRTCSessionID_decoded == null) {
+ throw IllegalStateException("webRTCSessionID not found in TLV")
+ }
+
+ if (deferredOffer_decoded == null) {
+ throw IllegalStateException("deferredOffer not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return SolicitOfferResponse(
+ webRTCSessionID_decoded,
+ deferredOffer_decoded,
+ videoStreamID_decoded,
+ audioStreamID_decoded,
+ )
+ }
+
+ suspend fun provideOffer(
+ webRTCSessionID: UShort?,
+ sdp: String,
+ streamType: UByte,
+ videoStreamID: UShort?,
+ audioStreamID: UShort?,
+ ICEServers: List?,
+ ICETransportPolicy: String?,
+ metadataOptions: UByte?,
+ timedInvokeTimeout: Duration? = null,
+ ): ProvideOfferResponse {
+ val commandId: UInt = 3u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_WEB_RTC_SESSION_ID_REQ: Int = 0
+ webRTCSessionID?.let {
+ tlvWriter.put(ContextSpecificTag(TAG_WEB_RTC_SESSION_ID_REQ), webRTCSessionID)
+ }
+
+ val TAG_SDP_REQ: Int = 1
+ tlvWriter.put(ContextSpecificTag(TAG_SDP_REQ), sdp)
+
+ val TAG_STREAM_TYPE_REQ: Int = 2
+ tlvWriter.put(ContextSpecificTag(TAG_STREAM_TYPE_REQ), streamType)
+
+ val TAG_VIDEO_STREAM_ID_REQ: Int = 3
+ videoStreamID?.let { tlvWriter.put(ContextSpecificTag(TAG_VIDEO_STREAM_ID_REQ), videoStreamID) }
+
+ val TAG_AUDIO_STREAM_ID_REQ: Int = 4
+ audioStreamID?.let { tlvWriter.put(ContextSpecificTag(TAG_AUDIO_STREAM_ID_REQ), audioStreamID) }
+
+ val TAG_ICE_SERVERS_REQ: Int = 5
+ ICEServers?.let {
+ tlvWriter.startArray(ContextSpecificTag(TAG_ICE_SERVERS_REQ))
+ for (item in ICEServers.iterator()) {
+ item.toTlv(AnonymousTag, tlvWriter)
+ }
+ tlvWriter.endArray()
+ }
+
+ val TAG_ICE_TRANSPORT_POLICY_REQ: Int = 6
+ ICETransportPolicy?.let {
+ tlvWriter.put(ContextSpecificTag(TAG_ICE_TRANSPORT_POLICY_REQ), ICETransportPolicy)
+ }
+
+ val TAG_METADATA_OPTIONS_REQ: Int = 7
+ metadataOptions?.let {
+ tlvWriter.put(ContextSpecificTag(TAG_METADATA_OPTIONS_REQ), metadataOptions)
+ }
+ 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}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_WEB_RTC_SESSION_ID: Int = 0
+ var webRTCSessionID_decoded: UShort? = null
+
+ val TAG_VIDEO_STREAM_ID: Int = 1
+ var videoStreamID_decoded: UShort? = null
+
+ val TAG_AUDIO_STREAM_ID: Int = 2
+ var audioStreamID_decoded: UShort? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_WEB_RTC_SESSION_ID)) {
+ webRTCSessionID_decoded = tlvReader.getUShort(tag)
+ }
+
+ if (tag == ContextSpecificTag(TAG_VIDEO_STREAM_ID)) {
+ videoStreamID_decoded = tlvReader.getUShort(tag)
+ }
+
+ if (tag == ContextSpecificTag(TAG_AUDIO_STREAM_ID)) {
+ audioStreamID_decoded = tlvReader.getUShort(tag)
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (webRTCSessionID_decoded == null) {
+ throw IllegalStateException("webRTCSessionID not found in TLV")
+ }
+
+ if (videoStreamID_decoded == null) {
+ throw IllegalStateException("videoStreamID not found in TLV")
+ }
+
+ if (audioStreamID_decoded == null) {
+ throw IllegalStateException("audioStreamID not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return ProvideOfferResponse(
+ webRTCSessionID_decoded,
+ videoStreamID_decoded,
+ audioStreamID_decoded,
+ )
+ }
+
+ suspend fun provideAnswer(
+ webRTCSessionID: UShort,
+ sdp: String,
+ timedInvokeTimeout: Duration? = null,
+ ) {
+ val commandId: UInt = 5u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_WEB_RTC_SESSION_ID_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_WEB_RTC_SESSION_ID_REQ), webRTCSessionID)
+
+ val TAG_SDP_REQ: Int = 1
+ tlvWriter.put(ContextSpecificTag(TAG_SDP_REQ), sdp)
+ 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 provideICECandidate(
+ webRTCSessionID: UShort,
+ ICECandidate: String,
+ timedInvokeTimeout: Duration? = null,
+ ) {
+ val commandId: UInt = 6u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_WEB_RTC_SESSION_ID_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_WEB_RTC_SESSION_ID_REQ), webRTCSessionID)
+
+ val TAG_ICE_CANDIDATE_REQ: Int = 1
+ tlvWriter.put(ContextSpecificTag(TAG_ICE_CANDIDATE_REQ), ICECandidate)
+ 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 endSession(
+ webRTCSessionID: UShort,
+ reason: UByte,
+ timedInvokeTimeout: Duration? = null,
+ ) {
+ val commandId: UInt = 7u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_WEB_RTC_SESSION_ID_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_WEB_RTC_SESSION_ID_REQ), webRTCSessionID)
+
+ val TAG_REASON_REQ: Int = 1
+ tlvWriter.put(ContextSpecificTag(TAG_REASON_REQ), reason)
+ 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 readCurrentSessionsAttribute(): CurrentSessionsAttribute {
+ val ATTRIBUTE_ID: UInt = 0u
+
+ 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) { "Currentsessions attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(WebRTCTransportProviderClusterWebRTCSessionStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return CurrentSessionsAttribute(decodedValue)
+ }
+
+ suspend fun subscribeCurrentSessionsAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 0u
+ 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(
+ CurrentSessionsAttributeSubscriptionState.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) {
+ "Currentsessions attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(
+ WebRTCTransportProviderClusterWebRTCSessionStruct.fromTlv(AnonymousTag, tlvReader)
+ )
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(CurrentSessionsAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(CurrentSessionsAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65528u
+
+ 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) { "Generatedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return GeneratedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeGeneratedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65528u
+ 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(
+ GeneratedCommandListAttributeSubscriptionState.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) {
+ "Generatedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(GeneratedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(GeneratedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65529u
+
+ 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) { "Acceptedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AcceptedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAcceptedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65529u
+ 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(
+ AcceptedCommandListAttributeSubscriptionState.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) {
+ "Acceptedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AcceptedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AcceptedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readEventListAttribute(): EventListAttribute {
+ val ATTRIBUTE_ID: UInt = 65530u
+
+ 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) { "Eventlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return EventListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeEventListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65530u
+ 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(
+ EventListAttributeSubscriptionState.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) { "Eventlist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(EventListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(EventListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAttributeListAttribute(): AttributeListAttribute {
+ val ATTRIBUTE_ID: UInt = 65531u
+
+ 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) { "Attributelist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AttributeListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAttributeListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65531u
+ 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(
+ AttributeListAttributeSubscriptionState.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) { "Attributelist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AttributeListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AttributeListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readFeatureMapAttribute(): UInt {
+ val ATTRIBUTE_ID: UInt = 65532u
+
+ 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) { "Featuremap attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeFeatureMapAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65532u
+ 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(
+ UIntSubscriptionState.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) { "Featuremap attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ emit(UIntSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UIntSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readClusterRevisionAttribute(): UShort {
+ val ATTRIBUTE_ID: UInt = 65533u
+
+ 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) { "Clusterrevision attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeClusterRevisionAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65533u
+ 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(
+ UShortSubscriptionState.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) {
+ "Clusterrevision attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ emit(UShortSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UShortSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ companion object {
+ private val logger = Logger.getLogger(WebRTCTransportProviderCluster::class.java.name)
+ const val CLUSTER_ID: UInt = 1363u
+ }
+}
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 42e2b95b02028f..6a7e5b317e3fee 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/files.gni
+++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni
@@ -160,6 +160,8 @@ matter_structs_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/WaterHeaterManagementClusterWaterHeaterBoostInfoStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/WaterHeaterModeClusterModeOptionStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/WaterHeaterModeClusterModeTagStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterICEServerStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt",
]
matter_eventstructs_sources = [
@@ -370,6 +372,7 @@ matter_clusters_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WakeOnLanCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WaterHeaterManagementCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WaterHeaterModeCluster.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WebRTCTransportProviderCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WiFiNetworkDiagnosticsCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WiFiNetworkManagementCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WindowCoveringCluster.kt",
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterICEServerStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterICEServerStruct.kt
new file mode 100644
index 00000000000000..fd9e75a62147fc
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterICEServerStruct.kt
@@ -0,0 +1,106 @@
+/*
+ *
+ * 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.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class WebRTCTransportProviderClusterICEServerStruct(
+ val urls: List,
+ val username: Optional,
+ val credential: Optional,
+ val caid: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("WebRTCTransportProviderClusterICEServerStruct {\n")
+ append("\turls : $urls\n")
+ append("\tusername : $username\n")
+ append("\tcredential : $credential\n")
+ append("\tcaid : $caid\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ startArray(ContextSpecificTag(TAG_URLS))
+ for (item in urls.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ if (username.isPresent) {
+ val optusername = username.get()
+ put(ContextSpecificTag(TAG_USERNAME), optusername)
+ }
+ if (credential.isPresent) {
+ val optcredential = credential.get()
+ put(ContextSpecificTag(TAG_CREDENTIAL), optcredential)
+ }
+ if (caid.isPresent) {
+ val optcaid = caid.get()
+ put(ContextSpecificTag(TAG_CAID), optcaid)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_URLS = 1
+ private const val TAG_USERNAME = 2
+ private const val TAG_CREDENTIAL = 3
+ private const val TAG_CAID = 4
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): WebRTCTransportProviderClusterICEServerStruct {
+ tlvReader.enterStructure(tlvTag)
+ val urls =
+ buildList {
+ tlvReader.enterArray(ContextSpecificTag(TAG_URLS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getString(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+ val username =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_USERNAME))) {
+ Optional.of(tlvReader.getString(ContextSpecificTag(TAG_USERNAME)))
+ } else {
+ Optional.empty()
+ }
+ val credential =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIAL))) {
+ Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CREDENTIAL)))
+ } else {
+ Optional.empty()
+ }
+ val caid =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_CAID))) {
+ Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_CAID)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return WebRTCTransportProviderClusterICEServerStruct(urls, username, credential, caid)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt
new file mode 100644
index 00000000000000..564f52c520b476
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt
@@ -0,0 +1,115 @@
+/*
+ *
+ * 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 WebRTCTransportProviderClusterWebRTCSessionStruct(
+ val id: UShort,
+ val peerNodeID: ULong,
+ val peerFabricIndex: UByte,
+ val streamType: UByte,
+ val videoStreamID: UShort?,
+ val audioStreamID: UShort?,
+ val metadataOptions: UByte,
+) {
+ override fun toString(): String = buildString {
+ append("WebRTCTransportProviderClusterWebRTCSessionStruct {\n")
+ append("\tid : $id\n")
+ append("\tpeerNodeID : $peerNodeID\n")
+ append("\tpeerFabricIndex : $peerFabricIndex\n")
+ append("\tstreamType : $streamType\n")
+ append("\tvideoStreamID : $videoStreamID\n")
+ append("\taudioStreamID : $audioStreamID\n")
+ append("\tmetadataOptions : $metadataOptions\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_ID), id)
+ put(ContextSpecificTag(TAG_PEER_NODE_ID), peerNodeID)
+ put(ContextSpecificTag(TAG_PEER_FABRIC_INDEX), peerFabricIndex)
+ put(ContextSpecificTag(TAG_STREAM_TYPE), streamType)
+ if (videoStreamID != null) {
+ put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID)
+ } else {
+ putNull(ContextSpecificTag(TAG_VIDEO_STREAM_ID))
+ }
+ if (audioStreamID != null) {
+ put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), audioStreamID)
+ } else {
+ putNull(ContextSpecificTag(TAG_AUDIO_STREAM_ID))
+ }
+ put(ContextSpecificTag(TAG_METADATA_OPTIONS), metadataOptions)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_ID = 1
+ private const val TAG_PEER_NODE_ID = 2
+ private const val TAG_PEER_FABRIC_INDEX = 3
+ private const val TAG_STREAM_TYPE = 4
+ private const val TAG_VIDEO_STREAM_ID = 5
+ private const val TAG_AUDIO_STREAM_ID = 6
+ private const val TAG_METADATA_OPTIONS = 7
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): WebRTCTransportProviderClusterWebRTCSessionStruct {
+ tlvReader.enterStructure(tlvTag)
+ val id = tlvReader.getUShort(ContextSpecificTag(TAG_ID))
+ val peerNodeID = tlvReader.getULong(ContextSpecificTag(TAG_PEER_NODE_ID))
+ val peerFabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_PEER_FABRIC_INDEX))
+ val streamType = tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_TYPE))
+ val videoStreamID =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUShort(ContextSpecificTag(TAG_VIDEO_STREAM_ID))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_VIDEO_STREAM_ID))
+ null
+ }
+ val audioStreamID =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUShort(ContextSpecificTag(TAG_AUDIO_STREAM_ID))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_AUDIO_STREAM_ID))
+ null
+ }
+ val metadataOptions = tlvReader.getUByte(ContextSpecificTag(TAG_METADATA_OPTIONS))
+
+ tlvReader.exitContainer()
+
+ return WebRTCTransportProviderClusterWebRTCSessionStruct(
+ id,
+ peerNodeID,
+ peerFabricIndex,
+ streamType,
+ videoStreamID,
+ audioStreamID,
+ metadataOptions,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index 0cf7ce8b652c68..741e40567fd091 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -42220,6 +42220,256 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR
}
break;
}
+ case app::Clusters::WebRTCTransportProvider::Id: {
+ using namespace app::Clusters::WebRTCTransportProvider;
+ switch (aPath.mAttributeId)
+ {
+ case Attributes::CurrentSessions::Id: {
+ using TypeInfo = Attributes::CurrentSessions::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_id;
+ std::string newElement_0_idClassName = "java/lang/Integer";
+ std::string newElement_0_idCtorSignature = "(I)V";
+ jint jninewElement_0_id = static_cast(entry_0.id);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), jninewElement_0_id, newElement_0_id);
+ jobject newElement_0_peerNodeID;
+ std::string newElement_0_peerNodeIDClassName = "java/lang/Long";
+ std::string newElement_0_peerNodeIDCtorSignature = "(J)V";
+ jlong jninewElement_0_peerNodeID = static_cast(entry_0.peerNodeID);
+ chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_peerNodeIDClassName.c_str(),
+ newElement_0_peerNodeIDCtorSignature.c_str(),
+ jninewElement_0_peerNodeID, newElement_0_peerNodeID);
+ jobject newElement_0_peerFabricIndex;
+ std::string newElement_0_peerFabricIndexClassName = "java/lang/Integer";
+ std::string newElement_0_peerFabricIndexCtorSignature = "(I)V";
+ jint jninewElement_0_peerFabricIndex = static_cast(entry_0.peerFabricIndex);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0_peerFabricIndexClassName.c_str(), newElement_0_peerFabricIndexCtorSignature.c_str(),
+ jninewElement_0_peerFabricIndex, newElement_0_peerFabricIndex);
+ jobject newElement_0_streamType;
+ std::string newElement_0_streamTypeClassName = "java/lang/Integer";
+ std::string newElement_0_streamTypeCtorSignature = "(I)V";
+ jint jninewElement_0_streamType = static_cast(entry_0.streamType);
+ chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamTypeClassName.c_str(),
+ newElement_0_streamTypeCtorSignature.c_str(),
+ jninewElement_0_streamType, newElement_0_streamType);
+ jobject newElement_0_videoStreamID;
+ if (entry_0.videoStreamID.IsNull())
+ {
+ newElement_0_videoStreamID = nullptr;
+ }
+ else
+ {
+ std::string newElement_0_videoStreamIDClassName = "java/lang/Integer";
+ std::string newElement_0_videoStreamIDCtorSignature = "(I)V";
+ jint jninewElement_0_videoStreamID = static_cast(entry_0.videoStreamID.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0_videoStreamIDClassName.c_str(), newElement_0_videoStreamIDCtorSignature.c_str(),
+ jninewElement_0_videoStreamID, newElement_0_videoStreamID);
+ }
+ jobject newElement_0_audioStreamID;
+ if (entry_0.audioStreamID.IsNull())
+ {
+ newElement_0_audioStreamID = nullptr;
+ }
+ else
+ {
+ std::string newElement_0_audioStreamIDClassName = "java/lang/Integer";
+ std::string newElement_0_audioStreamIDCtorSignature = "(I)V";
+ jint jninewElement_0_audioStreamID = static_cast(entry_0.audioStreamID.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0_audioStreamIDClassName.c_str(), newElement_0_audioStreamIDCtorSignature.c_str(),
+ jninewElement_0_audioStreamID, newElement_0_audioStreamID);
+ }
+ jobject newElement_0_metadataOptions;
+ std::string newElement_0_metadataOptionsClassName = "java/lang/Integer";
+ std::string newElement_0_metadataOptionsCtorSignature = "(I)V";
+ jint jninewElement_0_metadataOptions = static_cast(entry_0.metadataOptions.Raw());
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0_metadataOptionsClassName.c_str(), newElement_0_metadataOptionsCtorSignature.c_str(),
+ jninewElement_0_metadataOptions, newElement_0_metadataOptions);
+
+ jclass webRTCSessionStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$WebRTCTransportProviderClusterWebRTCSessionStruct",
+ webRTCSessionStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$WebRTCTransportProviderClusterWebRTCSessionStruct");
+ return nullptr;
+ }
+
+ jmethodID webRTCSessionStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, webRTCSessionStructStructClass_1, "",
+ "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/"
+ "Integer;Ljava/lang/Integer;)V",
+ &webRTCSessionStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || webRTCSessionStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$WebRTCTransportProviderClusterWebRTCSessionStruct constructor");
+ return nullptr;
+ }
+
+ newElement_0 = env->NewObject(webRTCSessionStructStructClass_1, webRTCSessionStructStructCtor_1, newElement_0_id,
+ newElement_0_peerNodeID, newElement_0_peerFabricIndex, newElement_0_streamType,
+ newElement_0_videoStreamID, newElement_0_audioStreamID, newElement_0_metadataOptions);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ using TypeInfo = Attributes::GeneratedCommandList::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;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ using TypeInfo = Attributes::AcceptedCommandList::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;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::EventList::Id: {
+ using TypeInfo = Attributes::EventList::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;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AttributeList::Id: {
+ using TypeInfo = Attributes::AttributeList::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;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::FeatureMap::Id: {
+ using TypeInfo = Attributes::FeatureMap::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ return value;
+ }
+ case Attributes::ClusterRevision::Id: {
+ using TypeInfo = Attributes::ClusterRevision::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::Chime::Id: {
using namespace app::Clusters::Chime;
switch (aPath.mAttributeId)
diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
index 2dc46ab844d25e..9da4b9690ecdb6 100644
--- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
@@ -8248,6 +8248,16 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader &
}
break;
}
+ case app::Clusters::WebRTCTransportProvider::Id: {
+ using namespace app::Clusters::WebRTCTransportProvider;
+ switch (aPath.mEventId)
+ {
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::Chime::Id: {
using namespace app::Clusters::Chime;
switch (aPath.mEventId)
diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py
index 1105faa9caf211..1df4d9c9f6d565 100644
--- a/src/controller/python/chip/clusters/CHIPClusters.py
+++ b/src/controller/python/chip/clusters/CHIPClusters.py
@@ -13029,6 +13029,106 @@ class ChipClusters:
},
},
}
+ _WEB_RTC_TRANSPORT_PROVIDER_CLUSTER_INFO = {
+ "clusterName": "WebRTCTransportProvider",
+ "clusterId": 0x00000553,
+ "commands": {
+ 0x00000001: {
+ "commandId": 0x00000001,
+ "commandName": "SolicitOffer",
+ "args": {
+ "streamType": "int",
+ "videoStreamID": "int",
+ "audioStreamID": "int",
+ "ICEServers": "ICEServerStruct",
+ "ICETransportPolicy": "str",
+ "metadataOptions": "int",
+ },
+ },
+ 0x00000003: {
+ "commandId": 0x00000003,
+ "commandName": "ProvideOffer",
+ "args": {
+ "webRTCSessionID": "int",
+ "sdp": "str",
+ "streamType": "int",
+ "videoStreamID": "int",
+ "audioStreamID": "int",
+ "ICEServers": "ICEServerStruct",
+ "ICETransportPolicy": "str",
+ "metadataOptions": "int",
+ },
+ },
+ 0x00000005: {
+ "commandId": 0x00000005,
+ "commandName": "ProvideAnswer",
+ "args": {
+ "webRTCSessionID": "int",
+ "sdp": "str",
+ },
+ },
+ 0x00000006: {
+ "commandId": 0x00000006,
+ "commandName": "ProvideICECandidate",
+ "args": {
+ "webRTCSessionID": "int",
+ "ICECandidate": "str",
+ },
+ },
+ 0x00000007: {
+ "commandId": 0x00000007,
+ "commandName": "EndSession",
+ "args": {
+ "webRTCSessionID": "int",
+ "reason": "int",
+ },
+ },
+ },
+ "attributes": {
+ 0x00000000: {
+ "attributeName": "CurrentSessions",
+ "attributeId": 0x00000000,
+ "type": "",
+ "reportable": True,
+ },
+ 0x0000FFF8: {
+ "attributeName": "GeneratedCommandList",
+ "attributeId": 0x0000FFF8,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFF9: {
+ "attributeName": "AcceptedCommandList",
+ "attributeId": 0x0000FFF9,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFA: {
+ "attributeName": "EventList",
+ "attributeId": 0x0000FFFA,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFB: {
+ "attributeName": "AttributeList",
+ "attributeId": 0x0000FFFB,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFC: {
+ "attributeName": "FeatureMap",
+ "attributeId": 0x0000FFFC,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFD: {
+ "attributeName": "ClusterRevision",
+ "attributeId": 0x0000FFFD,
+ "type": "int",
+ "reportable": True,
+ },
+ },
+ }
_CHIME_CLUSTER_INFO = {
"clusterName": "Chime",
"clusterId": 0x00000556,
@@ -14347,6 +14447,7 @@ class ChipClusters:
0x0000050E: _ACCOUNT_LOGIN_CLUSTER_INFO,
0x0000050F: _CONTENT_CONTROL_CLUSTER_INFO,
0x00000510: _CONTENT_APP_OBSERVER_CLUSTER_INFO,
+ 0x00000553: _WEB_RTC_TRANSPORT_PROVIDER_CLUSTER_INFO,
0x00000556: _CHIME_CLUSTER_INFO,
0x00000750: _ECOSYSTEM_INFORMATION_CLUSTER_INFO,
0x00000751: _COMMISSIONER_CONTROL_CLUSTER_INFO,
@@ -14473,6 +14574,7 @@ class ChipClusters:
"AccountLogin": _ACCOUNT_LOGIN_CLUSTER_INFO,
"ContentControl": _CONTENT_CONTROL_CLUSTER_INFO,
"ContentAppObserver": _CONTENT_APP_OBSERVER_CLUSTER_INFO,
+ "WebRTCTransportProvider": _WEB_RTC_TRANSPORT_PROVIDER_CLUSTER_INFO,
"Chime": _CHIME_CLUSTER_INFO,
"EcosystemInformation": _ECOSYSTEM_INFORMATION_CLUSTER_INFO,
"CommissionerControl": _COMMISSIONER_CONTROL_CLUSTER_INFO,
diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py
index 9752185e29103b..b11ad8e725290d 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -156,6 +156,7 @@
"AccountLogin",
"ContentControl",
"ContentAppObserver",
+ "WebRTCTransportProvider",
"Chime",
"EcosystemInformation",
"CommissionerControl",
@@ -46517,6 +46518,374 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
value: 'uint' = 0
+@dataclass
+class WebRTCTransportProvider(Cluster):
+ id: typing.ClassVar[int] = 0x00000553
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="currentSessions", Tag=0x00000000, Type=typing.List[WebRTCTransportProvider.Structs.WebRTCSessionStruct]),
+ 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]),
+ ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint),
+ ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint),
+ ])
+
+ currentSessions: 'typing.List[WebRTCTransportProvider.Structs.WebRTCSessionStruct]' = None
+ generatedCommandList: 'typing.List[uint]' = None
+ acceptedCommandList: 'typing.List[uint]' = None
+ eventList: 'typing.List[uint]' = None
+ attributeList: 'typing.List[uint]' = None
+ featureMap: 'uint' = None
+ clusterRevision: 'uint' = None
+
+ class Enums:
+ class StreamTypeEnum(MatterIntEnum):
+ kInternal = 0x00
+ kRecording = 0x01
+ kAnalysis = 0x02
+ kLiveView = 0x03
+ # All received enum values that are not listed above will be mapped
+ # to kUnknownEnumValue. This is a helper enum value that should only
+ # be used by code to process how it handles receiving an unknown
+ # enum value. This specific value should never be transmitted.
+ kUnknownEnumValue = 4,
+
+ class WebRTCEndReasonEnum(MatterIntEnum):
+ kIceFailed = 0x00
+ kIceTimeout = 0x01
+ kUserHangup = 0x02
+ kUserBusy = 0x03
+ kReplaced = 0x04
+ kNoUserMedia = 0x05
+ kInviteTimeout = 0x06
+ kAnsweredElsewhere = 0x07
+ kOutOfResources = 0x08
+ kMediaTimeout = 0x09
+ kLowPower = 0x0A
+ kUnknownReason = 0x0B
+ # All received enum values that are not listed above will be mapped
+ # to kUnknownEnumValue. This is a helper enum value that should only
+ # be used by code to process how it handles receiving an unknown
+ # enum value. This specific value should never be transmitted.
+ kUnknownEnumValue = 12,
+
+ class Bitmaps:
+ class WebRTCMetadataOptions(IntFlag):
+ kDataTLV = 0x1
+
+ class Structs:
+ @dataclass
+ class ICEServerStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="urls", Tag=1, Type=typing.List[str]),
+ ClusterObjectFieldDescriptor(Label="username", Tag=2, Type=typing.Optional[str]),
+ ClusterObjectFieldDescriptor(Label="credential", Tag=3, Type=typing.Optional[str]),
+ ClusterObjectFieldDescriptor(Label="caid", Tag=4, Type=typing.Optional[uint]),
+ ])
+
+ urls: 'typing.List[str]' = field(default_factory=lambda: [])
+ username: 'typing.Optional[str]' = None
+ credential: 'typing.Optional[str]' = None
+ caid: 'typing.Optional[uint]' = None
+
+ @dataclass
+ class WebRTCSessionStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="id", Tag=1, Type=uint),
+ ClusterObjectFieldDescriptor(Label="peerNodeID", Tag=2, Type=uint),
+ ClusterObjectFieldDescriptor(Label="peerFabricIndex", Tag=3, Type=uint),
+ ClusterObjectFieldDescriptor(Label="streamType", Tag=4, Type=WebRTCTransportProvider.Enums.StreamTypeEnum),
+ ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=5, Type=typing.Union[Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=6, Type=typing.Union[Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="metadataOptions", Tag=7, Type=uint),
+ ])
+
+ id: 'uint' = 0
+ peerNodeID: 'uint' = 0
+ peerFabricIndex: 'uint' = 0
+ streamType: 'WebRTCTransportProvider.Enums.StreamTypeEnum' = 0
+ videoStreamID: 'typing.Union[Nullable, uint]' = NullValue
+ audioStreamID: 'typing.Union[Nullable, uint]' = NullValue
+ metadataOptions: 'uint' = 0
+
+ class Commands:
+ @dataclass
+ class SolicitOffer(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000553
+ command_id: typing.ClassVar[int] = 0x00000001
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'SolicitOfferResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="streamType", Tag=0, Type=WebRTCTransportProvider.Enums.StreamTypeEnum),
+ ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=1, Type=typing.Union[None, Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=2, Type=typing.Union[None, Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="ICEServers", Tag=3, Type=typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]]),
+ ClusterObjectFieldDescriptor(Label="ICETransportPolicy", Tag=4, Type=typing.Optional[str]),
+ ClusterObjectFieldDescriptor(Label="metadataOptions", Tag=5, Type=typing.Optional[uint]),
+ ])
+
+ streamType: 'WebRTCTransportProvider.Enums.StreamTypeEnum' = 0
+ videoStreamID: 'typing.Union[None, Nullable, uint]' = None
+ audioStreamID: 'typing.Union[None, Nullable, uint]' = None
+ ICEServers: 'typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]]' = None
+ ICETransportPolicy: 'typing.Optional[str]' = None
+ metadataOptions: 'typing.Optional[uint]' = None
+
+ @dataclass
+ class SolicitOfferResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000553
+ command_id: typing.ClassVar[int] = 0x00000002
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[str] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="deferredOffer", Tag=1, Type=bool),
+ ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=2, Type=typing.Union[None, Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=3, Type=typing.Union[None, Nullable, uint]),
+ ])
+
+ webRTCSessionID: 'uint' = 0
+ deferredOffer: 'bool' = False
+ videoStreamID: 'typing.Union[None, Nullable, uint]' = None
+ audioStreamID: 'typing.Union[None, Nullable, uint]' = None
+
+ @dataclass
+ class ProvideOffer(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000553
+ command_id: typing.ClassVar[int] = 0x00000003
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'ProvideOfferResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=typing.Union[Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="sdp", Tag=1, Type=str),
+ ClusterObjectFieldDescriptor(Label="streamType", Tag=2, Type=WebRTCTransportProvider.Enums.StreamTypeEnum),
+ ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=3, Type=typing.Union[None, Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=4, Type=typing.Union[None, Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="ICEServers", Tag=5, Type=typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]]),
+ ClusterObjectFieldDescriptor(Label="ICETransportPolicy", Tag=6, Type=typing.Optional[str]),
+ ClusterObjectFieldDescriptor(Label="metadataOptions", Tag=7, Type=typing.Optional[uint]),
+ ])
+
+ webRTCSessionID: 'typing.Union[Nullable, uint]' = NullValue
+ sdp: 'str' = ""
+ streamType: 'WebRTCTransportProvider.Enums.StreamTypeEnum' = 0
+ videoStreamID: 'typing.Union[None, Nullable, uint]' = None
+ audioStreamID: 'typing.Union[None, Nullable, uint]' = None
+ ICEServers: 'typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]]' = None
+ ICETransportPolicy: 'typing.Optional[str]' = None
+ metadataOptions: 'typing.Optional[uint]' = None
+
+ @dataclass
+ class ProvideOfferResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000553
+ command_id: typing.ClassVar[int] = 0x00000004
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[str] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=1, Type=uint),
+ ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=2, Type=uint),
+ ])
+
+ webRTCSessionID: 'uint' = 0
+ videoStreamID: 'uint' = 0
+ audioStreamID: 'uint' = 0
+
+ @dataclass
+ class ProvideAnswer(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000553
+ command_id: typing.ClassVar[int] = 0x00000005
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="sdp", Tag=1, Type=str),
+ ])
+
+ webRTCSessionID: 'uint' = 0
+ sdp: 'str' = ""
+
+ @dataclass
+ class ProvideICECandidate(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000553
+ command_id: typing.ClassVar[int] = 0x00000006
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="ICECandidate", Tag=1, Type=str),
+ ])
+
+ webRTCSessionID: 'uint' = 0
+ ICECandidate: 'str' = ""
+
+ @dataclass
+ class EndSession(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000553
+ command_id: typing.ClassVar[int] = 0x00000007
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="reason", Tag=1, Type=WebRTCTransportProvider.Enums.WebRTCEndReasonEnum),
+ ])
+
+ webRTCSessionID: 'uint' = 0
+ reason: 'WebRTCTransportProvider.Enums.WebRTCEndReasonEnum' = 0
+
+ class Attributes:
+ @dataclass
+ class CurrentSessions(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000553
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000000
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[WebRTCTransportProvider.Structs.WebRTCSessionStruct])
+
+ value: 'typing.List[WebRTCTransportProvider.Structs.WebRTCSessionStruct]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class GeneratedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000553
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF8
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class AcceptedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000553
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF9
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class EventList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000553
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFA
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class AttributeList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000553
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFB
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class FeatureMap(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000553
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFC
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: 'uint' = 0
+
+ @dataclass
+ class ClusterRevision(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000553
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFD
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: 'uint' = 0
+
+
@dataclass
class Chime(Cluster):
id: typing.ClassVar[int] = 0x00000556
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
index 986f9776bab5d5..a2878cf511996c 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
@@ -5912,6 +5912,36 @@ static BOOL AttributeIsSpecifiedInContentAppObserverCluster(AttributeId aAttribu
}
}
}
+static BOOL AttributeIsSpecifiedInWebRTCTransportProviderCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::WebRTCTransportProvider;
+ switch (aAttributeId) {
+ case Attributes::CurrentSessions::Id: {
+ return YES;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::EventList::Id: {
+ return YES;
+ }
+ case Attributes::AttributeList::Id: {
+ return YES;
+ }
+ case Attributes::FeatureMap::Id: {
+ return YES;
+ }
+ case Attributes::ClusterRevision::Id: {
+ return YES;
+ }
+ default: {
+ return NO;
+ }
+ }
+}
static BOOL AttributeIsSpecifiedInChimeCluster(AttributeId aAttributeId)
{
using namespace Clusters::Chime;
@@ -6681,6 +6711,9 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId)
case Clusters::ContentAppObserver::Id: {
return AttributeIsSpecifiedInContentAppObserverCluster(aAttributeId);
}
+ case Clusters::WebRTCTransportProvider::Id: {
+ return AttributeIsSpecifiedInWebRTCTransportProviderCluster(aAttributeId);
+ }
case Clusters::Chime::Id: {
return AttributeIsSpecifiedInChimeCluster(aAttributeId);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
index 630c612e707b41..ae289578994178 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
@@ -16899,6 +16899,59 @@ static id _Nullable DecodeAttributeValueForContentAppObserverCluster(AttributeId
*aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
return nil;
}
+static id _Nullable DecodeAttributeValueForWebRTCTransportProviderCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::WebRTCTransportProvider;
+ switch (aAttributeId) {
+ case Attributes::CurrentSessions::Id: {
+ using TypeInfo = Attributes::CurrentSessions::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();
+ MTRWebRTCTransportProviderClusterWebRTCSessionStruct * newElement_0;
+ newElement_0 = [MTRWebRTCTransportProviderClusterWebRTCSessionStruct new];
+ newElement_0.id = [NSNumber numberWithUnsignedShort:entry_0.id];
+ newElement_0.peerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.peerNodeID];
+ newElement_0.peerFabricIndex = [NSNumber numberWithUnsignedChar:entry_0.peerFabricIndex];
+ newElement_0.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamType)];
+ if (entry_0.videoStreamID.IsNull()) {
+ newElement_0.videoStreamID = nil;
+ } else {
+ newElement_0.videoStreamID = [NSNumber numberWithUnsignedShort:entry_0.videoStreamID.Value()];
+ }
+ if (entry_0.audioStreamID.IsNull()) {
+ newElement_0.audioStreamID = nil;
+ } else {
+ newElement_0.audioStreamID = [NSNumber numberWithUnsignedShort:entry_0.audioStreamID.Value()];
+ }
+ newElement_0.metadataOptions = [NSNumber numberWithUnsignedChar:entry_0.metadataOptions.Raw()];
+ [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;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ return nil;
+}
static id _Nullable DecodeAttributeValueForChimeCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
{
using namespace Clusters::Chime;
@@ -19075,6 +19128,9 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T
case Clusters::ContentAppObserver::Id: {
return DecodeAttributeValueForContentAppObserverCluster(aPath.mAttributeId, aReader, aError);
}
+ case Clusters::WebRTCTransportProvider::Id: {
+ return DecodeAttributeValueForWebRTCTransportProviderCluster(aPath.mAttributeId, aReader, aError);
+ }
case Clusters::Chime::Id: {
return DecodeAttributeValueForChimeCluster(aPath.mAttributeId, aReader, aError);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
index 7bbdbbee2038f2..36c879b528aa18 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
@@ -14756,6 +14756,104 @@ MTR_PROVISIONALLY_AVAILABLE
@end
+/**
+ * Cluster WebRTC Transport Provider
+ *
+ * The WebRTC transport provider cluster provides a way for stream providers (e.g. Cameras) to stream or receive their data through WebRTC.
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRBaseClusterWebRTCTransportProvider : MTRGenericBaseCluster
+
+/**
+ * Command SolicitOffer
+ *
+ * Requests that the Provider initiates a new session with the Offer / Answer flow in a way that allows for options to be passed and work with devices needing the standby flow.
+ */
+- (void)solicitOfferWithParams:(MTRWebRTCTransportProviderClusterSolicitOfferParams *)params completion:(void (^)(MTRWebRTCTransportProviderClusterSolicitOfferResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command ProvideOffer
+ *
+ * This command allows an SDP Offer to be set and start a new session.
+ */
+- (void)provideOfferWithParams:(MTRWebRTCTransportProviderClusterProvideOfferParams *)params completion:(void (^)(MTRWebRTCTransportProviderClusterProvideOfferResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command ProvideAnswer
+ *
+ * This command SHALL be initiated from a Node in response to an Offer that was previously received from a remote peer.
+ */
+- (void)provideAnswerWithParams:(MTRWebRTCTransportProviderClusterProvideAnswerParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command ProvideICECandidate
+ *
+ * This command allows for https://www.rfc-editor.org/rfc/rfc8839#section-4.2.1.2 nominated after the initial Offer / Answer exchange to be added to a session during the gathering phase.
+ */
+- (void)provideICECandidateWithParams:(MTRWebRTCTransportProviderClusterProvideICECandidateParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command EndSession
+ *
+ * This command instructs the stream provider to end the WebRTC session.
+ */
+- (void)endSessionWithParams:(MTRWebRTCTransportProviderClusterEndSessionParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeCurrentSessionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeCurrentSessionsWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeCurrentSessionsWithClusterStateCache:(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
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRBaseClusterWebRTCTransportProvider (Availability)
+
+/**
+ * For all instance methods (reads, writes, commands) that take a completion,
+ * the completion will be called on the provided queue.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
/**
* Cluster Chime
*
@@ -20174,6 +20272,32 @@ typedef NS_ENUM(uint8_t, MTRContentAppObserverStatus) {
MTRContentAppObserverStatusUnexpectedData MTR_PROVISIONALLY_AVAILABLE = 0x01,
} MTR_PROVISIONALLY_AVAILABLE;
+typedef NS_ENUM(uint8_t, MTRWebRTCTransportProviderStreamType) {
+ MTRWebRTCTransportProviderStreamTypeInternal MTR_PROVISIONALLY_AVAILABLE = 0x00,
+ MTRWebRTCTransportProviderStreamTypeRecording MTR_PROVISIONALLY_AVAILABLE = 0x01,
+ MTRWebRTCTransportProviderStreamTypeAnalysis MTR_PROVISIONALLY_AVAILABLE = 0x02,
+ MTRWebRTCTransportProviderStreamTypeLiveView MTR_PROVISIONALLY_AVAILABLE = 0x03,
+} MTR_PROVISIONALLY_AVAILABLE;
+
+typedef NS_ENUM(uint8_t, MTRWebRTCTransportProviderWebRTCEndReason) {
+ MTRWebRTCTransportProviderWebRTCEndReasonIceFailed MTR_PROVISIONALLY_AVAILABLE = 0x00,
+ MTRWebRTCTransportProviderWebRTCEndReasonIceTimeout MTR_PROVISIONALLY_AVAILABLE = 0x01,
+ MTRWebRTCTransportProviderWebRTCEndReasonUserHangup MTR_PROVISIONALLY_AVAILABLE = 0x02,
+ MTRWebRTCTransportProviderWebRTCEndReasonUserBusy MTR_PROVISIONALLY_AVAILABLE = 0x03,
+ MTRWebRTCTransportProviderWebRTCEndReasonReplaced MTR_PROVISIONALLY_AVAILABLE = 0x04,
+ MTRWebRTCTransportProviderWebRTCEndReasonNoUserMedia MTR_PROVISIONALLY_AVAILABLE = 0x05,
+ MTRWebRTCTransportProviderWebRTCEndReasonInviteTimeout MTR_PROVISIONALLY_AVAILABLE = 0x06,
+ MTRWebRTCTransportProviderWebRTCEndReasonAnsweredElsewhere MTR_PROVISIONALLY_AVAILABLE = 0x07,
+ MTRWebRTCTransportProviderWebRTCEndReasonOutOfResources MTR_PROVISIONALLY_AVAILABLE = 0x08,
+ MTRWebRTCTransportProviderWebRTCEndReasonMediaTimeout MTR_PROVISIONALLY_AVAILABLE = 0x09,
+ MTRWebRTCTransportProviderWebRTCEndReasonLowPower MTR_PROVISIONALLY_AVAILABLE = 0x0A,
+ MTRWebRTCTransportProviderWebRTCEndReasonUnknownReason MTR_PROVISIONALLY_AVAILABLE = 0x0B,
+} MTR_PROVISIONALLY_AVAILABLE;
+
+typedef NS_OPTIONS(uint8_t, MTRWebRTCTransportProviderWebRTCMetadataOptions) {
+ MTRWebRTCTransportProviderWebRTCMetadataOptionsDataTLV MTR_PROVISIONALLY_AVAILABLE = 0x1,
+} MTR_PROVISIONALLY_AVAILABLE;
+
typedef NS_OPTIONS(uint32_t, MTRCommissionerControlSupportedDeviceCategoryBitmap) {
MTRCommissionerControlSupportedDeviceCategoryBitmapFabricSynchronization MTR_PROVISIONALLY_AVAILABLE = 0x1,
} MTR_PROVISIONALLY_AVAILABLE;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
index f6899e092056a2..5bee560bd030a6 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
@@ -102085,6 +102085,383 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC
@end
+@implementation MTRBaseClusterWebRTCTransportProvider
+
+- (void)solicitOfferWithParams:(MTRWebRTCTransportProviderClusterSolicitOfferParams *)params completion:(void (^)(MTRWebRTCTransportProviderClusterSolicitOfferResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRWebRTCTransportProviderClusterSolicitOfferParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = WebRTCTransportProvider::Commands::SolicitOffer::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRWebRTCTransportProviderClusterSolicitOfferResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)provideOfferWithParams:(MTRWebRTCTransportProviderClusterProvideOfferParams *)params completion:(void (^)(MTRWebRTCTransportProviderClusterProvideOfferResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRWebRTCTransportProviderClusterProvideOfferParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = WebRTCTransportProvider::Commands::ProvideOffer::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRWebRTCTransportProviderClusterProvideOfferResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)provideAnswerWithParams:(MTRWebRTCTransportProviderClusterProvideAnswerParams *)params completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRWebRTCTransportProviderClusterProvideAnswerParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = WebRTCTransportProvider::Commands::ProvideAnswer::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)provideICECandidateWithParams:(MTRWebRTCTransportProviderClusterProvideICECandidateParams *)params completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRWebRTCTransportProviderClusterProvideICECandidateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = WebRTCTransportProvider::Commands::ProvideICECandidate::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)endSessionWithParams:(MTRWebRTCTransportProviderClusterEndSessionParams *)params completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRWebRTCTransportProviderClusterEndSessionParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = WebRTCTransportProvider::Commands::EndSession::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)readAttributeCurrentSessionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::CurrentSessions::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeCurrentSessionsWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::CurrentSessions::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeCurrentSessionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::CurrentSessions::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 = WebRTCTransportProvider::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::GeneratedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::AcceptedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::EventList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::EventList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::EventList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::AttributeList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::AttributeList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::AttributeList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::FeatureMap::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::FeatureMap::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::FeatureMap::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::ClusterRevision::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::ClusterRevision::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = WebRTCTransportProvider::Attributes::ClusterRevision::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+@end
+
@implementation MTRBaseClusterChime
- (void)playChimeSoundWithCompletion:(MTRStatusCompletion)completion
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
index 2b1d5e5dbf8c0d..97e0c30e92f812 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
@@ -197,6 +197,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) {
MTRClusterIDTypeAccountLoginID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050E,
MTRClusterIDTypeContentControlID MTR_PROVISIONALLY_AVAILABLE = 0x0000050F,
MTRClusterIDTypeContentAppObserverID MTR_PROVISIONALLY_AVAILABLE = 0x00000510,
+ MTRClusterIDTypeWebRTCTransportProviderID MTR_PROVISIONALLY_AVAILABLE = 0x00000553,
MTRClusterIDTypeChimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000556,
MTRClusterIDTypeEcosystemInformationID MTR_PROVISIONALLY_AVAILABLE = 0x00000750,
MTRClusterIDTypeCommissionerControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000751,
@@ -4739,6 +4740,15 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) {
MTRAttributeIDTypeClusterContentAppObserverAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
MTRAttributeIDTypeClusterContentAppObserverAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+ // Cluster WebRTCTransportProvider attributes
+ MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeCurrentSessionsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID,
+ MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID,
+ MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID,
+ MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID,
+ MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
+ MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+
// Cluster Chime attributes
MTRAttributeIDTypeClusterChimeAttributeInstalledChimeSoundsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
MTRAttributeIDTypeClusterChimeAttributeActiveChimeIDID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
@@ -6943,6 +6953,15 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) {
MTRCommandIDTypeClusterContentAppObserverCommandContentAppMessageID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
MTRCommandIDTypeClusterContentAppObserverCommandContentAppMessageResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ // Cluster WebRTCTransportProvider commands
+ MTRCommandIDTypeClusterWebRTCTransportProviderCommandSolicitOfferID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ MTRCommandIDTypeClusterWebRTCTransportProviderCommandSolicitOfferResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000002,
+ MTRCommandIDTypeClusterWebRTCTransportProviderCommandProvideOfferID MTR_PROVISIONALLY_AVAILABLE = 0x00000003,
+ MTRCommandIDTypeClusterWebRTCTransportProviderCommandProvideOfferResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000004,
+ MTRCommandIDTypeClusterWebRTCTransportProviderCommandProvideAnswerID MTR_PROVISIONALLY_AVAILABLE = 0x00000005,
+ MTRCommandIDTypeClusterWebRTCTransportProviderCommandProvideICECandidateID MTR_PROVISIONALLY_AVAILABLE = 0x00000006,
+ MTRCommandIDTypeClusterWebRTCTransportProviderCommandEndSessionID MTR_PROVISIONALLY_AVAILABLE = 0x00000007,
+
// Cluster Chime commands
MTRCommandIDTypeClusterChimeCommandPlayChimeSoundID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
index 51fa18894a5d20..46791f9c12aab9 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
@@ -369,6 +369,9 @@
case MTRClusterIDTypeContentAppObserverID:
result = @"ContentAppObserver";
break;
+ case MTRClusterIDTypeWebRTCTransportProviderID:
+ result = @"WebRTCTransportProvider";
+ break;
case MTRClusterIDTypeChimeID:
result = @"Chime";
break;
@@ -8139,6 +8142,45 @@
}
break;
+ case MTRClusterIDTypeWebRTCTransportProviderID:
+
+ switch (attributeID) {
+
+ // Cluster WebRTCTransportProvider attributes
+ case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeCurrentSessionsID:
+ result = @"CurrentSessions";
+ break;
+
+ case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeGeneratedCommandListID:
+ result = @"GeneratedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeAcceptedCommandListID:
+ result = @"AcceptedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeEventListID:
+ result = @"EventList";
+ break;
+
+ case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeAttributeListID:
+ result = @"AttributeList";
+ break;
+
+ case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeFeatureMapID:
+ result = @"FeatureMap";
+ break;
+
+ case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeClusterRevisionID:
+ result = @"ClusterRevision";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"", attributeID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeChimeID:
switch (attributeID) {
@@ -10914,6 +10956,36 @@
}
break;
+ case MTRClusterIDTypeWebRTCTransportProviderID:
+
+ switch (commandID) {
+
+ case MTRCommandIDTypeClusterWebRTCTransportProviderCommandSolicitOfferID:
+ result = @"SolicitOffer";
+ break;
+
+ case MTRCommandIDTypeClusterWebRTCTransportProviderCommandProvideOfferID:
+ result = @"ProvideOffer";
+ break;
+
+ case MTRCommandIDTypeClusterWebRTCTransportProviderCommandProvideAnswerID:
+ result = @"ProvideAnswer";
+ break;
+
+ case MTRCommandIDTypeClusterWebRTCTransportProviderCommandProvideICECandidateID:
+ result = @"ProvideICECandidate";
+ break;
+
+ case MTRCommandIDTypeClusterWebRTCTransportProviderCommandEndSessionID:
+ result = @"EndSession";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"", commandID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeChimeID:
switch (commandID) {
@@ -12526,6 +12598,24 @@
}
break;
+ case MTRClusterIDTypeWebRTCTransportProviderID:
+
+ switch (commandID) {
+
+ case MTRCommandIDTypeClusterWebRTCTransportProviderCommandSolicitOfferResponseID:
+ result = @"SolicitOfferResponse";
+ break;
+
+ case MTRCommandIDTypeClusterWebRTCTransportProviderCommandProvideOfferResponseID:
+ result = @"ProvideOfferResponse";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"", commandID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeChimeID:
switch (commandID) {
@@ -14287,6 +14377,16 @@
}
break;
+ case MTRClusterIDTypeWebRTCTransportProviderID:
+
+ switch (eventID) {
+
+ default:
+ result = [NSString stringWithFormat:@"", eventID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeChimeID:
switch (eventID) {
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
index 964282c1ceab8e..43a909b7e46356 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
@@ -6824,6 +6824,50 @@ MTR_PROVISIONALLY_AVAILABLE
@end
+/**
+ * Cluster WebRTC Transport Provider
+ * The WebRTC transport provider cluster provides a way for stream providers (e.g. Cameras) to stream or receive their data through WebRTC.
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRClusterWebRTCTransportProvider : MTRGenericCluster
+
+- (void)solicitOfferWithParams:(MTRWebRTCTransportProviderClusterSolicitOfferParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRWebRTCTransportProviderClusterSolicitOfferResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)provideOfferWithParams:(MTRWebRTCTransportProviderClusterProvideOfferParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRWebRTCTransportProviderClusterProvideOfferResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)provideAnswerWithParams:(MTRWebRTCTransportProviderClusterProvideAnswerParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)provideICECandidateWithParams:(MTRWebRTCTransportProviderClusterProvideICECandidateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)endSessionWithParams:(MTRWebRTCTransportProviderClusterEndSessionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeCurrentSessionsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary