From f2a7f9ee7789808f6deb8f9ba317a8807166b670 Mon Sep 17 00:00:00 2001 From: Cecille Freeman Date: Mon, 15 May 2023 11:04:39 -0400 Subject: [PATCH] ZAP. --- .../data_model/controller-clusters.matter | 133 +- .../devicecontroller/ClusterReadMapping.java | 413 + .../devicecontroller/ClusterWriteMapping.java | 4 + .../CHIPAttributeTLVValueDecoder.cpp | 740 ++ .../CHIPEventTLVValueDecoder.cpp | 181 + .../zap-generated/CHIPInvokeCallbacks.cpp | 138 + .../java/zap-generated/CHIPInvokeCallbacks.h | 31 + .../java/zap-generated/CHIPReadCallbacks.cpp | 8335 ++++++++++------- .../chip/devicecontroller/ChipClusters.java | 723 ++ .../devicecontroller/ChipEventStructs.java | 82 + .../chip/devicecontroller/ChipIdLookup.java | 123 + .../chip/devicecontroller/ChipStructs.java | 145 + .../devicecontroller/ClusterInfoMapping.java | 508 + .../python/chip/clusters/CHIPClusters.py | 250 + .../cluster/logging/DataModelLogger.cpp | 238 + .../cluster/logging/DataModelLogger.h | 5 + .../zap-generated/CHIPClientCallbacks.h | 28 + .../zap-generated/CHIPClusters.h | 18 + .../zap-generated/endpoint_config.h | 30 +- .../zap-generated/gen_config.h | 10 + 20 files changed, 8488 insertions(+), 3647 deletions(-) diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 5820406efdb571..e1cdfff56e1434 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -172,7 +172,7 @@ client cluster Scenes = 5 { } response struct AddSceneResponse = 0 { - ENUM8 status = 0; + status status = 0; group_id groupID = 1; INT8U sceneID = 2; } @@ -183,7 +183,7 @@ client cluster Scenes = 5 { } response struct ViewSceneResponse = 1 { - ENUM8 status = 0; + status status = 0; group_id groupID = 1; INT8U sceneID = 2; optional INT16U transitionTime = 3; @@ -197,7 +197,7 @@ client cluster Scenes = 5 { } response struct RemoveSceneResponse = 2 { - ENUM8 status = 0; + status status = 0; group_id groupID = 1; INT8U sceneID = 2; } @@ -207,7 +207,7 @@ client cluster Scenes = 5 { } response struct RemoveAllScenesResponse = 3 { - ENUM8 status = 0; + status status = 0; group_id groupID = 1; } @@ -217,7 +217,7 @@ client cluster Scenes = 5 { } response struct StoreSceneResponse = 4 { - ENUM8 status = 0; + status status = 0; group_id groupID = 1; INT8U sceneID = 2; } @@ -233,7 +233,7 @@ client cluster Scenes = 5 { } response struct GetSceneMembershipResponse = 6 { - ENUM8 status = 0; + status status = 0; nullable INT8U capacity = 1; group_id groupID = 2; optional INT8U sceneList[] = 3; @@ -248,7 +248,7 @@ client cluster Scenes = 5 { } response struct EnhancedAddSceneResponse = 64 { - ENUM8 status = 0; + status status = 0; group_id groupID = 1; INT8U sceneID = 2; } @@ -259,7 +259,7 @@ client cluster Scenes = 5 { } response struct EnhancedViewSceneResponse = 65 { - ENUM8 status = 0; + status status = 0; group_Id groupID = 1; INT8U sceneID = 2; optional INT16U transitionTime = 3; @@ -276,7 +276,7 @@ client cluster Scenes = 5 { } response struct CopySceneResponse = 66 { - ENUM8 status = 0; + status status = 0; group_Id groupIdentifierFrom = 1; INT8U sceneIdentifierFrom = 2; } @@ -815,11 +815,49 @@ client cluster Actions = 37 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ client cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } @@ -855,6 +893,7 @@ client cluster BasicInformation = 40 { readonly attribute optional boolean reachable = 17; readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2124,7 +2163,7 @@ client cluster TimeSynchronization = 56 { readonly attribute nullable epoch_us UTCTime = 0; readonly attribute GranularityEnum granularity = 1; readonly attribute optional TimeSourceEnum timeSource = 2; - readonly attribute nullable TrustedTimeSourceStruct trustedTimeSource = 3; + readonly attribute optional nullable TrustedTimeSourceStruct trustedTimeSource = 3; readonly attribute optional nullable char_string<128> defaultNTP = 4; readonly attribute optional TimeZoneStruct timeZone[] = 5; readonly attribute optional DSTOffsetStruct DSTOffset[] = 6; @@ -2141,8 +2180,8 @@ client cluster TimeSynchronization = 56 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct SetUtcTimeRequest { - epoch_us utcTime = 0; + request struct SetUTCTimeRequest { + epoch_us UTCTime = 0; GranularityEnum granularity = 1; optional TimeSourceEnum timeSource = 2; } @@ -2168,7 +2207,7 @@ client cluster TimeSynchronization = 56 { } /** This command MAY be issued by Administrator to set the time. */ - command access(invoke: administer) SetUtcTime(SetUtcTimeRequest): DefaultSuccess = 0; + command access(invoke: administer) SetUTCTime(SetUTCTimeRequest): DefaultSuccess = 0; /** This command SHALL set TrustedTimeSource. */ fabric command access(invoke: administer) SetTrustedTimeSource(SetTrustedTimeSourceRequest): DefaultSuccess = 1; /** This command SHALL set TimeZone. */ @@ -2184,6 +2223,44 @@ client cluster TimeSynchronization = 56 { collection of attributes that the Node MAY collect to aid in conveying information regarding the Bridged Device to a user, such as the vendor name, the model name, or user-assigned name. */ client cluster BridgedDeviceBasicInformation = 57 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } @@ -2213,6 +2290,7 @@ client cluster BridgedDeviceBasicInformation = 57 { readonly attribute optional char_string<32> serialNumber = 15; readonly attribute boolean reachable = 17; readonly attribute optional char_string<32> uniqueID = 18; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5038,18 +5116,19 @@ client cluster ElectricalMeasurement = 2820 { command GetMeasurementProfileCommand(GetMeasurementProfileCommandRequest): DefaultSuccess = 1; } -/** Client Monitoring allows for ensuring that listed clients meet the required monitoring conditions on the server. */ +/** Client Monitoring allows servers to ensure that listed clients are notified when a server is available for communication. */ client cluster ClientMonitoring = 4166 { - fabric_scoped struct MonitoringRegistration { - node_id clientNodeId = 1; - int64u ICid = 2; + fabric_scoped struct MonitoringRegistrationStruct { + fabric_sensitive node_id clientNodeID = 1; + fabric_sensitive octet_string<16> key = 2; fabric_idx fabricIndex = 254; } readonly attribute int32u idleModeInterval = 0; readonly attribute int32u activeModeInterval = 1; readonly attribute int16u activeModeThreshold = 2; - readonly attribute MonitoringRegistration expectedClients[] = 3; + readonly attribute access(read: administer) MonitoringRegistrationStruct expectedClients[] = 3; + readonly attribute access(read: administer) int32u ICDCounter = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5058,21 +5137,25 @@ client cluster ClientMonitoring = 4166 { readonly attribute int16u clusterRevision = 65533; request struct RegisterClientMonitoringRequest { - node_id clientNodeId = 0; - INT64U ICid = 1; + node_id clientNodeID = 0; + OCTET_STRING<16> key = 1; + } + + response struct RegisterClientMonitoringResponse = 1 { + ENUM8 status = 0; + nullable INT32U ICDCounter = 1; } request struct UnregisterClientMonitoringRequest { - node_id clientNodeId = 0; - INT64U ICid = 1; + node_id clientNodeID = 0; } /** Register a client to the end device */ - command access(invoke: manage) RegisterClientMonitoring(RegisterClientMonitoringRequest): DefaultSuccess = 0; + fabric command access(invoke: manage) RegisterClientMonitoring(RegisterClientMonitoringRequest): RegisterClientMonitoringResponse = 0; /** Unregister a client from an end device */ - command access(invoke: manage) UnregisterClientMonitoring(UnregisterClientMonitoringRequest): DefaultSuccess = 1; + fabric command access(invoke: manage) UnregisterClientMonitoring(UnregisterClientMonitoringRequest): DefaultSuccess = 2; /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ - command access(invoke: manage) StayAwakeRequest(): DefaultSuccess = 2; + command access(invoke: manage) StayAwakeRequest(): DefaultSuccess = 3; } /** The Test Cluster is meant to validate the generated code */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 7f6ec70bd29dc8..9c7832c4fcb8e2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -5609,6 +5609,271 @@ public Map> getReadAttributeMap() { readEthernetNetworkDiagnosticsClusterRevisionAttributeInteractionInfo); readAttributeMap.put( "ethernetNetworkDiagnostics", readEthernetNetworkDiagnosticsInteractionInfo); + Map readTimeSynchronizationInteractionInfo = new LinkedHashMap<>(); + Map readTimeSynchronizationUTCTimeCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationUTCTimeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readUTCTimeAttribute( + (ChipClusters.TimeSynchronizationCluster.UTCTimeAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping + .DelegatedTimeSynchronizationClusterUTCTimeAttributeCallback(), + readTimeSynchronizationUTCTimeCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readUTCTimeAttribute", readTimeSynchronizationUTCTimeAttributeInteractionInfo); + Map readTimeSynchronizationGranularityCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationGranularityAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readGranularityAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readTimeSynchronizationGranularityCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readGranularityAttribute", readTimeSynchronizationGranularityAttributeInteractionInfo); + Map readTimeSynchronizationTimeSourceCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationTimeSourceAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readTimeSourceAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readTimeSynchronizationTimeSourceCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readTimeSourceAttribute", readTimeSynchronizationTimeSourceAttributeInteractionInfo); + Map readTimeSynchronizationDefaultNTPCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationDefaultNTPAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readDefaultNTPAttribute( + (ChipClusters.TimeSynchronizationCluster.DefaultNTPAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedTimeSynchronizationClusterDefaultNTPAttributeCallback(), + readTimeSynchronizationDefaultNTPCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readDefaultNTPAttribute", readTimeSynchronizationDefaultNTPAttributeInteractionInfo); + Map readTimeSynchronizationTimeZoneCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationTimeZoneAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readTimeZoneAttribute( + (ChipClusters.TimeSynchronizationCluster.TimeZoneAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping + .DelegatedTimeSynchronizationClusterTimeZoneAttributeCallback(), + readTimeSynchronizationTimeZoneCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readTimeZoneAttribute", readTimeSynchronizationTimeZoneAttributeInteractionInfo); + Map readTimeSynchronizationDSTOffsetCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationDSTOffsetAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readDSTOffsetAttribute( + (ChipClusters.TimeSynchronizationCluster.DSTOffsetAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedTimeSynchronizationClusterDSTOffsetAttributeCallback(), + readTimeSynchronizationDSTOffsetCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readDSTOffsetAttribute", readTimeSynchronizationDSTOffsetAttributeInteractionInfo); + Map readTimeSynchronizationLocalTimeCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationLocalTimeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readLocalTimeAttribute( + (ChipClusters.TimeSynchronizationCluster.LocalTimeAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedTimeSynchronizationClusterLocalTimeAttributeCallback(), + readTimeSynchronizationLocalTimeCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readLocalTimeAttribute", readTimeSynchronizationLocalTimeAttributeInteractionInfo); + Map readTimeSynchronizationTimeZoneDatabaseCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationTimeZoneDatabaseAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readTimeZoneDatabaseAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readTimeSynchronizationTimeZoneDatabaseCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readTimeZoneDatabaseAttribute", + readTimeSynchronizationTimeZoneDatabaseAttributeInteractionInfo); + Map readTimeSynchronizationNTPServerAvailableCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationNTPServerAvailableAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readNTPServerAvailableAttribute( + (ChipClusters.BooleanAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readTimeSynchronizationNTPServerAvailableCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readNTPServerAvailableAttribute", + readTimeSynchronizationNTPServerAvailableAttributeInteractionInfo); + Map readTimeSynchronizationTimeZoneListMaxSizeCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationTimeZoneListMaxSizeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readTimeZoneListMaxSizeAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readTimeSynchronizationTimeZoneListMaxSizeCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readTimeZoneListMaxSizeAttribute", + readTimeSynchronizationTimeZoneListMaxSizeAttributeInteractionInfo); + Map readTimeSynchronizationDSTOffsetListMaxSizeCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationDSTOffsetListMaxSizeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readDSTOffsetListMaxSizeAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readTimeSynchronizationDSTOffsetListMaxSizeCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readDSTOffsetListMaxSizeAttribute", + readTimeSynchronizationDSTOffsetListMaxSizeAttributeInteractionInfo); + Map readTimeSynchronizationSupportsDNSResolveCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationSupportsDNSResolveAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readSupportsDNSResolveAttribute( + (ChipClusters.BooleanAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readTimeSynchronizationSupportsDNSResolveCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readSupportsDNSResolveAttribute", + readTimeSynchronizationSupportsDNSResolveAttributeInteractionInfo); + Map readTimeSynchronizationGeneratedCommandListCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationGeneratedCommandListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readGeneratedCommandListAttribute( + (ChipClusters.TimeSynchronizationCluster + .GeneratedCommandListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedTimeSynchronizationClusterGeneratedCommandListAttributeCallback(), + readTimeSynchronizationGeneratedCommandListCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readGeneratedCommandListAttribute", + readTimeSynchronizationGeneratedCommandListAttributeInteractionInfo); + Map readTimeSynchronizationAcceptedCommandListCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationAcceptedCommandListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readAcceptedCommandListAttribute( + (ChipClusters.TimeSynchronizationCluster.AcceptedCommandListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedTimeSynchronizationClusterAcceptedCommandListAttributeCallback(), + readTimeSynchronizationAcceptedCommandListCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readAcceptedCommandListAttribute", + readTimeSynchronizationAcceptedCommandListAttributeInteractionInfo); + Map readTimeSynchronizationEventListCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationEventListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readEventListAttribute( + (ChipClusters.TimeSynchronizationCluster.EventListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedTimeSynchronizationClusterEventListAttributeCallback(), + readTimeSynchronizationEventListCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readEventListAttribute", readTimeSynchronizationEventListAttributeInteractionInfo); + Map readTimeSynchronizationAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.TimeSynchronizationCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedTimeSynchronizationClusterAttributeListAttributeCallback(), + readTimeSynchronizationAttributeListCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readAttributeListAttribute", readTimeSynchronizationAttributeListAttributeInteractionInfo); + Map readTimeSynchronizationFeatureMapCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationFeatureMapAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readFeatureMapAttribute((ChipClusters.LongAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readTimeSynchronizationFeatureMapCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readFeatureMapAttribute", readTimeSynchronizationFeatureMapAttributeInteractionInfo); + Map readTimeSynchronizationClusterRevisionCommandParams = + new LinkedHashMap(); + InteractionInfo readTimeSynchronizationClusterRevisionAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .readClusterRevisionAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readTimeSynchronizationClusterRevisionCommandParams); + readTimeSynchronizationInteractionInfo.put( + "readClusterRevisionAttribute", + readTimeSynchronizationClusterRevisionAttributeInteractionInfo); + readAttributeMap.put("timeSynchronization", readTimeSynchronizationInteractionInfo); Map readBridgedDeviceBasicInformationInteractionInfo = new LinkedHashMap<>(); Map readBridgedDeviceBasicInformationVendorNameCommandParams = @@ -15312,6 +15577,154 @@ public Map> getReadAttributeMap() { "readClusterRevisionAttribute", readElectricalMeasurementClusterRevisionAttributeInteractionInfo); readAttributeMap.put("electricalMeasurement", readElectricalMeasurementInteractionInfo); + Map readClientMonitoringInteractionInfo = new LinkedHashMap<>(); + Map readClientMonitoringIdleModeIntervalCommandParams = + new LinkedHashMap(); + InteractionInfo readClientMonitoringIdleModeIntervalAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ClientMonitoringCluster) cluster) + .readIdleModeIntervalAttribute((ChipClusters.LongAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readClientMonitoringIdleModeIntervalCommandParams); + readClientMonitoringInteractionInfo.put( + "readIdleModeIntervalAttribute", + readClientMonitoringIdleModeIntervalAttributeInteractionInfo); + Map readClientMonitoringActiveModeIntervalCommandParams = + new LinkedHashMap(); + InteractionInfo readClientMonitoringActiveModeIntervalAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ClientMonitoringCluster) cluster) + .readActiveModeIntervalAttribute((ChipClusters.LongAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readClientMonitoringActiveModeIntervalCommandParams); + readClientMonitoringInteractionInfo.put( + "readActiveModeIntervalAttribute", + readClientMonitoringActiveModeIntervalAttributeInteractionInfo); + Map readClientMonitoringActiveModeThresholdCommandParams = + new LinkedHashMap(); + InteractionInfo readClientMonitoringActiveModeThresholdAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ClientMonitoringCluster) cluster) + .readActiveModeThresholdAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readClientMonitoringActiveModeThresholdCommandParams); + readClientMonitoringInteractionInfo.put( + "readActiveModeThresholdAttribute", + readClientMonitoringActiveModeThresholdAttributeInteractionInfo); + Map readClientMonitoringExpectedClientsCommandParams = + new LinkedHashMap(); + InteractionInfo readClientMonitoringExpectedClientsAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ClientMonitoringCluster) cluster) + .readExpectedClientsAttribute( + (ChipClusters.ClientMonitoringCluster.ExpectedClientsAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedClientMonitoringClusterExpectedClientsAttributeCallback(), + readClientMonitoringExpectedClientsCommandParams); + readClientMonitoringInteractionInfo.put( + "readExpectedClientsAttribute", + readClientMonitoringExpectedClientsAttributeInteractionInfo); + Map readClientMonitoringGeneratedCommandListCommandParams = + new LinkedHashMap(); + InteractionInfo readClientMonitoringGeneratedCommandListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ClientMonitoringCluster) cluster) + .readGeneratedCommandListAttribute( + (ChipClusters.ClientMonitoringCluster.GeneratedCommandListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedClientMonitoringClusterGeneratedCommandListAttributeCallback(), + readClientMonitoringGeneratedCommandListCommandParams); + readClientMonitoringInteractionInfo.put( + "readGeneratedCommandListAttribute", + readClientMonitoringGeneratedCommandListAttributeInteractionInfo); + Map readClientMonitoringAcceptedCommandListCommandParams = + new LinkedHashMap(); + InteractionInfo readClientMonitoringAcceptedCommandListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ClientMonitoringCluster) cluster) + .readAcceptedCommandListAttribute( + (ChipClusters.ClientMonitoringCluster.AcceptedCommandListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedClientMonitoringClusterAcceptedCommandListAttributeCallback(), + readClientMonitoringAcceptedCommandListCommandParams); + readClientMonitoringInteractionInfo.put( + "readAcceptedCommandListAttribute", + readClientMonitoringAcceptedCommandListAttributeInteractionInfo); + Map readClientMonitoringEventListCommandParams = + new LinkedHashMap(); + InteractionInfo readClientMonitoringEventListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ClientMonitoringCluster) cluster) + .readEventListAttribute( + (ChipClusters.ClientMonitoringCluster.EventListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping.DelegatedClientMonitoringClusterEventListAttributeCallback(), + readClientMonitoringEventListCommandParams); + readClientMonitoringInteractionInfo.put( + "readEventListAttribute", readClientMonitoringEventListAttributeInteractionInfo); + Map readClientMonitoringAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readClientMonitoringAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ClientMonitoringCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.ClientMonitoringCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedClientMonitoringClusterAttributeListAttributeCallback(), + readClientMonitoringAttributeListCommandParams); + readClientMonitoringInteractionInfo.put( + "readAttributeListAttribute", readClientMonitoringAttributeListAttributeInteractionInfo); + Map readClientMonitoringFeatureMapCommandParams = + new LinkedHashMap(); + InteractionInfo readClientMonitoringFeatureMapAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ClientMonitoringCluster) cluster) + .readFeatureMapAttribute((ChipClusters.LongAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readClientMonitoringFeatureMapCommandParams); + readClientMonitoringInteractionInfo.put( + "readFeatureMapAttribute", readClientMonitoringFeatureMapAttributeInteractionInfo); + Map readClientMonitoringClusterRevisionCommandParams = + new LinkedHashMap(); + InteractionInfo readClientMonitoringClusterRevisionAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ClientMonitoringCluster) cluster) + .readClusterRevisionAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readClientMonitoringClusterRevisionCommandParams); + readClientMonitoringInteractionInfo.put( + "readClusterRevisionAttribute", + readClientMonitoringClusterRevisionAttributeInteractionInfo); + readAttributeMap.put("clientMonitoring", readClientMonitoringInteractionInfo); Map readUnitTestingInteractionInfo = new LinkedHashMap<>(); Map readUnitTestingBooleanCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index e50aed4bfa0f08..d62958b7e4a3ef 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -553,6 +553,8 @@ public Map> getWriteAttributeMap() { new LinkedHashMap<>(); writeAttributeMap.put( "ethernetNetworkDiagnostics", writeEthernetNetworkDiagnosticsInteractionInfo); + Map writeTimeSynchronizationInteractionInfo = new LinkedHashMap<>(); + writeAttributeMap.put("timeSynchronization", writeTimeSynchronizationInteractionInfo); Map writeBridgedDeviceBasicInformationInteractionInfo = new LinkedHashMap<>(); Map writeBridgedDeviceBasicInformationNodeLabelCommandParams = @@ -2593,6 +2595,8 @@ public Map> getWriteAttributeMap() { "writeAcOverloadAlarmsMaskAttribute", writeElectricalMeasurementAcOverloadAlarmsMaskAttributeInteractionInfo); writeAttributeMap.put("electricalMeasurement", writeElectricalMeasurementInteractionInfo); + Map writeClientMonitoringInteractionInfo = new LinkedHashMap<>(); + writeAttributeMap.put("clientMonitoring", writeClientMonitoringInteractionInfo); Map writeUnitTestingInteractionInfo = new LinkedHashMap<>(); Map writeUnitTestingBooleanCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 9790f0e75b3306..3c86fd46fb91f1 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -8643,6 +8643,493 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } + case app::Clusters::TimeSynchronization::Id: { + using namespace app::Clusters::TimeSynchronization; + switch (aPath.mAttributeId) + { + case Attributes::UTCTime::Id: { + using TypeInfo = Attributes::UTCTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::Granularity::Id: { + using TypeInfo = Attributes::Granularity::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"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + static_cast(cppValue), value); + return value; + } + case Attributes::TimeSource::Id: { + using TypeInfo = Attributes::TimeSource::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"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + static_cast(cppValue), value); + return value; + } + case Attributes::TrustedTimeSource::Id: { + using TypeInfo = Attributes::TrustedTimeSource::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jobject value_fabricIndex; + std::string value_fabricIndexClassName = "java/lang/Integer"; + std::string value_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), + cppValue.Value().fabricIndex, value_fabricIndex); + jobject value_nodeID; + std::string value_nodeIDClassName = "java/lang/Long"; + std::string value_nodeIDCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_nodeIDClassName.c_str(), value_nodeIDCtorSignature.c_str(), cppValue.Value().nodeID, value_nodeID); + jobject value_endpoint; + std::string value_endpointClassName = "java/lang/Integer"; + std::string value_endpointCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_endpointClassName.c_str(), + value_endpointCtorSignature.c_str(), + cppValue.Value().endpoint, value_endpoint); + + jclass trustedTimeSourceStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct", + trustedTimeSourceStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct"); + return nullptr; + } + jmethodID trustedTimeSourceStructStructCtor_1 = env->GetMethodID( + trustedTimeSourceStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;)V"); + if (trustedTimeSourceStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct constructor"); + return nullptr; + } + + value = env->NewObject(trustedTimeSourceStructStructClass_1, trustedTimeSourceStructStructCtor_1, value_fabricIndex, + value_nodeID, value_endpoint); + } + return value; + } + case Attributes::DefaultNTP::Id: { + using TypeInfo = Attributes::DefaultNTP::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value(), value)); + } + return value; + } + case Attributes::TimeZone::Id: { + using TypeInfo = Attributes::TimeZone::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_offset; + std::string newElement_0_offsetClassName = "java/lang/Long"; + std::string newElement_0_offsetCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), + newElement_0_offsetCtorSignature.c_str(), + entry_0.offset, newElement_0_offset); + jobject newElement_0_validAt; + std::string newElement_0_validAtClassName = "java/lang/Long"; + std::string newElement_0_validAtCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validAtClassName.c_str(), + newElement_0_validAtCtorSignature.c_str(), + entry_0.validAt, newElement_0_validAt); + jobject newElement_0_name; + if (!entry_0.name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); + } + else + { + jobject newElement_0_nameInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); + } + + jclass timeZoneStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTimeZoneStruct", timeZoneStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTimeZoneStruct"); + return nullptr; + } + jmethodID timeZoneStructStructCtor_1 = env->GetMethodID(timeZoneStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;)V"); + if (timeZoneStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterTimeZoneStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(timeZoneStructStructClass_1, timeZoneStructStructCtor_1, newElement_0_offset, + newElement_0_validAt, newElement_0_name); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::DSTOffset::Id: { + using TypeInfo = Attributes::DSTOffset::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_offset; + std::string newElement_0_offsetClassName = "java/lang/Long"; + std::string newElement_0_offsetCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), + newElement_0_offsetCtorSignature.c_str(), + entry_0.offset, newElement_0_offset); + jobject newElement_0_validStarting; + std::string newElement_0_validStartingClassName = "java/lang/Long"; + std::string newElement_0_validStartingCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validStartingClassName.c_str(), + newElement_0_validStartingCtorSignature.c_str(), + entry_0.validStarting, newElement_0_validStarting); + jobject newElement_0_validUntil; + if (entry_0.validUntil.IsNull()) + { + newElement_0_validUntil = nullptr; + } + else + { + std::string newElement_0_validUntilClassName = "java/lang/Long"; + std::string newElement_0_validUntilCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_validUntilClassName.c_str(), newElement_0_validUntilCtorSignature.c_str(), + entry_0.validUntil.Value(), newElement_0_validUntil); + } + + jclass DSTOffsetStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterDSTOffsetStruct", + DSTOffsetStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterDSTOffsetStruct"); + return nullptr; + } + jmethodID DSTOffsetStructStructCtor_1 = + env->GetMethodID(DSTOffsetStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V"); + if (DSTOffsetStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterDSTOffsetStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(DSTOffsetStructStructClass_1, DSTOffsetStructStructCtor_1, newElement_0_offset, + newElement_0_validStarting, newElement_0_validUntil); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::LocalTime::Id: { + using TypeInfo = Attributes::LocalTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::TimeZoneDatabase::Id: { + using TypeInfo = Attributes::TimeZoneDatabase::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"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + static_cast(cppValue), value); + return value; + } + case Attributes::NTPServerAvailable::Id: { + using TypeInfo = Attributes::NTPServerAvailable::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, + value); + return value; + } + case Attributes::TimeZoneListMaxSize::Id: { + using TypeInfo = Attributes::TimeZoneListMaxSize::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"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::DSTOffsetListMaxSize::Id: { + using TypeInfo = Attributes::DSTOffsetListMaxSize::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"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::SupportsDNSResolve::Id: { + using TypeInfo = Attributes::SupportsDNSResolve::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, + value); + 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"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_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"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_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"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_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"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_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"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, 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"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } case app::Clusters::BridgedDeviceBasicInformation::Id: { using namespace app::Clusters::BridgedDeviceBasicInformation; switch (aPath.mAttributeId) @@ -21909,6 +22396,259 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } + case app::Clusters::ClientMonitoring::Id: { + using namespace app::Clusters::ClientMonitoring; + switch (aPath.mAttributeId) + { + case Attributes::IdleModeInterval::Id: { + using TypeInfo = Attributes::IdleModeInterval::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"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ActiveModeInterval::Id: { + using TypeInfo = Attributes::ActiveModeInterval::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"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ActiveModeThreshold::Id: { + using TypeInfo = Attributes::ActiveModeThreshold::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"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ExpectedClients::Id: { + using TypeInfo = Attributes::ExpectedClients::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_clientNodeID; + std::string newElement_0_clientNodeIDClassName = "java/lang/Long"; + std::string newElement_0_clientNodeIDCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_clientNodeIDClassName.c_str(), + newElement_0_clientNodeIDCtorSignature.c_str(), + entry_0.clientNodeID, newElement_0_clientNodeID); + jobject newElement_0_key; + jbyteArray newElement_0_keyByteArray = env->NewByteArray(static_cast(entry_0.key.size())); + env->SetByteArrayRegion(newElement_0_keyByteArray, 0, static_cast(entry_0.key.size()), + reinterpret_cast(entry_0.key.data())); + newElement_0_key = newElement_0_keyByteArray; + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + entry_0.fabricIndex, newElement_0_fabricIndex); + + jclass monitoringRegistrationStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ClientMonitoringClusterMonitoringRegistrationStruct", + monitoringRegistrationStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ClientMonitoringClusterMonitoringRegistrationStruct"); + return nullptr; + } + jmethodID monitoringRegistrationStructStructCtor_1 = env->GetMethodID( + monitoringRegistrationStructStructClass_1, "", "(Ljava/lang/Long;[BLjava/lang/Integer;)V"); + if (monitoringRegistrationStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ClientMonitoringClusterMonitoringRegistrationStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(monitoringRegistrationStructStructClass_1, monitoringRegistrationStructStructCtor_1, + newElement_0_clientNodeID, newElement_0_key, newElement_0_fabricIndex); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::ICDCounter::Id: { + using TypeInfo = Attributes::ICDCounter::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"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + 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"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_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"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_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"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_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"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_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"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, 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"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } case app::Clusters::UnitTesting::Id: { using namespace app::Clusters::UnitTesting; switch (aPath.mAttributeId) diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 71c20ae30036fe..0a85838133294e 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -1707,6 +1707,177 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } + case app::Clusters::TimeSynchronization::Id: { + using namespace app::Clusters::TimeSynchronization; + switch (aPath.mEventId) + { + case Events::DSTTableEmpty::Id: { + Events::DSTTableEmpty::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jclass DSTTableEmptyStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$TimeSynchronizationClusterDSTTableEmptyEvent", + DSTTableEmptyStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$TimeSynchronizationClusterDSTTableEmptyEvent"); + return nullptr; + } + jmethodID DSTTableEmptyStructCtor = env->GetMethodID(DSTTableEmptyStructClass, "", "()V"); + if (DSTTableEmptyStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$TimeSynchronizationClusterDSTTableEmptyEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(DSTTableEmptyStructClass, DSTTableEmptyStructCtor); + + return value; + } + case Events::DSTStatus::Id: { + Events::DSTStatus::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_DSTOffsetActive; + std::string value_DSTOffsetActiveClassName = "java/lang/Boolean"; + std::string value_DSTOffsetActiveCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_DSTOffsetActiveClassName.c_str(), + value_DSTOffsetActiveCtorSignature.c_str(), + cppValue.DSTOffsetActive, value_DSTOffsetActive); + + jclass DSTStatusStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$TimeSynchronizationClusterDSTStatusEvent", DSTStatusStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$TimeSynchronizationClusterDSTStatusEvent"); + return nullptr; + } + jmethodID DSTStatusStructCtor = env->GetMethodID(DSTStatusStructClass, "", "(Ljava/lang/Boolean;)V"); + if (DSTStatusStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$TimeSynchronizationClusterDSTStatusEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(DSTStatusStructClass, DSTStatusStructCtor, value_DSTOffsetActive); + + return value; + } + case Events::TimeZoneStatus::Id: { + Events::TimeZoneStatus::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_offset; + std::string value_offsetClassName = "java/lang/Long"; + std::string value_offsetCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_offsetClassName.c_str(), value_offsetCtorSignature.c_str(), cppValue.offset, value_offset); + + jobject value_name; + if (!cppValue.name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_name); + } + else + { + jobject value_nameInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(cppValue.name.Value(), value_nameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(value_nameInsideOptional, value_name); + } + + jclass timeZoneStatusStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$TimeSynchronizationClusterTimeZoneStatusEvent", + timeZoneStatusStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$TimeSynchronizationClusterTimeZoneStatusEvent"); + return nullptr; + } + jmethodID timeZoneStatusStructCtor = + env->GetMethodID(timeZoneStatusStructClass, "", "(Ljava/lang/Long;Ljava/util/Optional;)V"); + if (timeZoneStatusStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$TimeSynchronizationClusterTimeZoneStatusEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(timeZoneStatusStructClass, timeZoneStatusStructCtor, value_offset, value_name); + + return value; + } + case Events::TimeFailure::Id: { + Events::TimeFailure::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jclass timeFailureStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$TimeSynchronizationClusterTimeFailureEvent", timeFailureStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$TimeSynchronizationClusterTimeFailureEvent"); + return nullptr; + } + jmethodID timeFailureStructCtor = env->GetMethodID(timeFailureStructClass, "", "()V"); + if (timeFailureStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$TimeSynchronizationClusterTimeFailureEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(timeFailureStructClass, timeFailureStructCtor); + + return value; + } + case Events::MissingTrustedTimeSource::Id: { + Events::MissingTrustedTimeSource::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jclass missingTrustedTimeSourceStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$TimeSynchronizationClusterMissingTrustedTimeSourceEvent", + missingTrustedTimeSourceStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$TimeSynchronizationClusterMissingTrustedTimeSourceEvent"); + return nullptr; + } + jmethodID missingTrustedTimeSourceStructCtor = env->GetMethodID(missingTrustedTimeSourceStructClass, "", "()V"); + if (missingTrustedTimeSourceStructCtor == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipEventStructs$TimeSynchronizationClusterMissingTrustedTimeSourceEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(missingTrustedTimeSourceStructClass, missingTrustedTimeSourceStructCtor); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } case app::Clusters::BridgedDeviceBasicInformation::Id: { using namespace app::Clusters::BridgedDeviceBasicInformation; switch (aPath.mEventId) @@ -3436,6 +3607,16 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } + case app::Clusters::ClientMonitoring::Id: { + using namespace app::Clusters::ClientMonitoring; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } case app::Clusters::UnitTesting::Id: { using namespace app::Clusters::UnitTesting; switch (aPath.mEventId) diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 2fb5e13227f298..a8c39ff26c2cf8 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -2174,6 +2174,68 @@ void CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, Status, LogContent, UTCTimeStamp, TimeSinceBoot); } +CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::~CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject DSTOffsetRequired; + std::string DSTOffsetRequiredClassName = "java/lang/Boolean"; + std::string DSTOffsetRequiredCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(DSTOffsetRequiredClassName.c_str(), + DSTOffsetRequiredCtorSignature.c_str(), + dataResponse.DSTOffsetRequired, DSTOffsetRequired); + + env->CallVoidMethod(javaCallbackRef, javaMethod, DSTOffsetRequired); +} CHIPOperationalCredentialsClusterAttestationResponseCallback::CHIPOperationalCredentialsClusterAttestationResponseCallback( jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -4288,6 +4350,82 @@ void CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallbac env->CallVoidMethod(javaCallbackRef, javaMethod, startTime, status, profileIntervalPeriod, numberOfIntervalsDelivered, attributeId, intervals); } +CHIPClientMonitoringClusterRegisterClientMonitoringResponseCallback:: + CHIPClientMonitoringClusterRegisterClientMonitoringResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPClientMonitoringClusterRegisterClientMonitoringResponseCallback:: + ~CHIPClientMonitoringClusterRegisterClientMonitoringResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPClientMonitoringClusterRegisterClientMonitoringResponseCallback::CallbackFn( + void * context, + const chip::app::Clusters::ClientMonitoring::Commands::RegisterClientMonitoringResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Long;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + dataResponse.status, Status); + jobject ICDCounter; + if (dataResponse.ICDCounter.IsNull()) + { + ICDCounter = nullptr; + } + else + { + std::string ICDCounterClassName = "java/lang/Long"; + std::string ICDCounterCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(ICDCounterClassName.c_str(), ICDCounterCtorSignature.c_str(), + dataResponse.ICDCounter.Value(), ICDCounter); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, ICDCounter); +} CHIPUnitTestingClusterTestSpecificResponseCallback::CHIPUnitTestingClusterTestSpecificResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) { diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index 5a264fb1994368..a71886f7dea882 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -342,6 +342,21 @@ class CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback jobject javaCallbackRef; }; +class CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback + : public Callback::Callback +{ +public: + CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback(jobject javaCallback); + + ~CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPOperationalCredentialsClusterAttestationResponseCallback : public Callback::Callback { @@ -672,6 +687,22 @@ class CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallba jobject javaCallbackRef; }; +class CHIPClientMonitoringClusterRegisterClientMonitoringResponseCallback + : public Callback::Callback +{ +public: + CHIPClientMonitoringClusterRegisterClientMonitoringResponseCallback(jobject javaCallback); + + ~CHIPClientMonitoringClusterRegisterClientMonitoringResponseCallback(); + + static void + CallbackFn(void * context, + const chip::app::Clusters::ClientMonitoring::Commands::RegisterClientMonitoringResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPUnitTestingClusterTestSpecificResponseCallback : public Callback::Callback { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 198aa3b31806bc..737503e2bce571 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -14287,9 +14287,9 @@ void CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: - CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTimeSynchronizationUTCTimeAttributeCallback::CHIPTimeSynchronizationUTCTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -14306,8 +14306,7 @@ CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: } } -CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: - ~CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback() +CHIPTimeSynchronizationUTCTimeAttributeCallback::~CHIPTimeSynchronizationUTCTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14318,8 +14317,8 @@ CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTimeSynchronizationUTCTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14327,9 +14326,8 @@ void CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback::Cal jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -14337,31 +14335,28 @@ void CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback::Cal ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: - CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTimeSynchronizationDefaultNTPAttributeCallback::CHIPTimeSynchronizationDefaultNTPAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -14378,8 +14373,7 @@ CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: } } -CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: - ~CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback() +CHIPTimeSynchronizationDefaultNTPAttributeCallback::~CHIPTimeSynchronizationDefaultNTPAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14390,8 +14384,8 @@ CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTimeSynchronizationDefaultNTPAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14399,9 +14393,8 @@ void CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback::Call jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -14409,31 +14402,25 @@ void CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback::Call ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(value.Value(), javaValue)); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CHIPBridgedDeviceBasicInformationEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTimeSynchronizationTimeZoneAttributeCallback::CHIPTimeSynchronizationTimeZoneAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -14450,7 +14437,7 @@ CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CHIPBridgedDeviceBa } } -CHIPBridgedDeviceBasicInformationEventListAttributeCallback::~CHIPBridgedDeviceBasicInformationEventListAttributeCallback() +CHIPTimeSynchronizationTimeZoneAttributeCallback::~CHIPTimeSynchronizationTimeZoneAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14461,8 +14448,10 @@ CHIPBridgedDeviceBasicInformationEventListAttributeCallback::~CHIPBridgedDeviceB env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTimeSynchronizationTimeZoneAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14471,8 +14460,8 @@ void CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -14491,10 +14480,48 @@ void CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jobject newElement_0_offset; + std::string newElement_0_offsetClassName = "java/lang/Long"; + std::string newElement_0_offsetCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_offsetClassName.c_str(), newElement_0_offsetCtorSignature.c_str(), entry_0.offset, newElement_0_offset); + jobject newElement_0_validAt; + std::string newElement_0_validAtClassName = "java/lang/Long"; + std::string newElement_0_validAtCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validAtClassName.c_str(), + newElement_0_validAtCtorSignature.c_str(), entry_0.validAt, + newElement_0_validAt); + jobject newElement_0_name; + if (!entry_0.name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); + } + else + { + jobject newElement_0_nameInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); + } + + jclass timeZoneStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTimeZoneStruct", timeZoneStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTimeZoneStruct"); + return; + } + jmethodID timeZoneStructStructCtor_1 = + env->GetMethodID(timeZoneStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;)V"); + if (timeZoneStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterTimeZoneStruct constructor"); + return; + } + + newElement_0 = env->NewObject(timeZoneStructStructClass_1, timeZoneStructStructCtor_1, newElement_0_offset, + newElement_0_validAt, newElement_0_name); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14502,9 +14529,9 @@ void CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTimeSynchronizationDSTOffsetAttributeCallback::CHIPTimeSynchronizationDSTOffsetAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -14521,7 +14548,7 @@ CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CHIPBridgedDevi } } -CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::~CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback() +CHIPTimeSynchronizationDSTOffsetAttributeCallback::~CHIPTimeSynchronizationDSTOffsetAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14532,8 +14559,10 @@ CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::~CHIPBridgedDev env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTimeSynchronizationDSTOffsetAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14542,8 +14571,8 @@ void CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CallbackFn VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -14562,10 +14591,49 @@ void CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CallbackFn { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jobject newElement_0_offset; + std::string newElement_0_offsetClassName = "java/lang/Long"; + std::string newElement_0_offsetCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_offsetClassName.c_str(), newElement_0_offsetCtorSignature.c_str(), entry_0.offset, newElement_0_offset); + jobject newElement_0_validStarting; + std::string newElement_0_validStartingClassName = "java/lang/Long"; + std::string newElement_0_validStartingCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validStartingClassName.c_str(), + newElement_0_validStartingCtorSignature.c_str(), + entry_0.validStarting, newElement_0_validStarting); + jobject newElement_0_validUntil; + if (entry_0.validUntil.IsNull()) + { + newElement_0_validUntil = nullptr; + } + else + { + std::string newElement_0_validUntilClassName = "java/lang/Long"; + std::string newElement_0_validUntilCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validUntilClassName.c_str(), + newElement_0_validUntilCtorSignature.c_str(), + entry_0.validUntil.Value(), newElement_0_validUntil); + } + + jclass DSTOffsetStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterDSTOffsetStruct", DSTOffsetStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterDSTOffsetStruct"); + return; + } + jmethodID DSTOffsetStructStructCtor_1 = + env->GetMethodID(DSTOffsetStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V"); + if (DSTOffsetStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterDSTOffsetStruct constructor"); + return; + } + + newElement_0 = env->NewObject(DSTOffsetStructStructClass_1, DSTOffsetStructStructCtor_1, newElement_0_offset, + newElement_0_validStarting, newElement_0_validUntil); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14573,9 +14641,9 @@ void CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSwitchGeneratedCommandListAttributeCallback::CHIPSwitchGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTimeSynchronizationLocalTimeAttributeCallback::CHIPTimeSynchronizationLocalTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -14592,7 +14660,7 @@ CHIPSwitchGeneratedCommandListAttributeCallback::CHIPSwitchGeneratedCommandListA } } -CHIPSwitchGeneratedCommandListAttributeCallback::~CHIPSwitchGeneratedCommandListAttributeCallback() +CHIPTimeSynchronizationLocalTimeAttributeCallback::~CHIPTimeSynchronizationLocalTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14603,8 +14671,8 @@ CHIPSwitchGeneratedCommandListAttributeCallback::~CHIPSwitchGeneratedCommandList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSwitchGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTimeSynchronizationLocalTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14612,9 +14680,8 @@ void CHIPSwitchGeneratedCommandListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -14622,31 +14689,28 @@ void CHIPSwitchGeneratedCommandListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPSwitchAcceptedCommandListAttributeCallback::CHIPSwitchAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::CHIPTimeSynchronizationGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -14663,7 +14727,7 @@ CHIPSwitchAcceptedCommandListAttributeCallback::CHIPSwitchAcceptedCommandListAtt } } -CHIPSwitchAcceptedCommandListAttributeCallback::~CHIPSwitchAcceptedCommandListAttributeCallback() +CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::~CHIPTimeSynchronizationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14674,8 +14738,8 @@ CHIPSwitchAcceptedCommandListAttributeCallback::~CHIPSwitchAcceptedCommandListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSwitchAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14684,8 +14748,8 @@ void CHIPSwitchAcceptedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -14715,8 +14779,10 @@ void CHIPSwitchAcceptedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSwitchEventListAttributeCallback::CHIPSwitchEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::CHIPTimeSynchronizationAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14732,7 +14798,7 @@ CHIPSwitchEventListAttributeCallback::CHIPSwitchEventListAttributeCallback(jobje } } -CHIPSwitchEventListAttributeCallback::~CHIPSwitchEventListAttributeCallback() +CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::~CHIPTimeSynchronizationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14743,8 +14809,8 @@ CHIPSwitchEventListAttributeCallback::~CHIPSwitchEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSwitchEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14753,8 +14819,8 @@ void CHIPSwitchEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -14784,8 +14850,10 @@ void CHIPSwitchEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSwitchAttributeListAttributeCallback::CHIPSwitchAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTimeSynchronizationEventListAttributeCallback::CHIPTimeSynchronizationEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14801,7 +14869,7 @@ CHIPSwitchAttributeListAttributeCallback::CHIPSwitchAttributeListAttributeCallba } } -CHIPSwitchAttributeListAttributeCallback::~CHIPSwitchAttributeListAttributeCallback() +CHIPTimeSynchronizationEventListAttributeCallback::~CHIPTimeSynchronizationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14812,8 +14880,8 @@ CHIPSwitchAttributeListAttributeCallback::~CHIPSwitchAttributeListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTimeSynchronizationEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14822,8 +14890,8 @@ void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -14853,9 +14921,9 @@ void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTimeSynchronizationAttributeListAttributeCallback::CHIPTimeSynchronizationAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -14872,7 +14940,7 @@ CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CHIPAdministrat } } -CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::~CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback() +CHIPTimeSynchronizationAttributeListAttributeCallback::~CHIPTimeSynchronizationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14883,8 +14951,8 @@ CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::~CHIPAdministra env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPTimeSynchronizationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14892,8 +14960,9 @@ void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -14901,28 +14970,31 @@ void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CHIPAdministratorCommissioningAdminVendorIdAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: + CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -14939,7 +15011,8 @@ CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CHIPAdministratorC } } -CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::~CHIPAdministratorCommissioningAdminVendorIdAttributeCallback() +CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: + ~CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14950,8 +15023,8 @@ CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::~CHIPAdministrator env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14959,8 +15032,9 @@ void CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -14968,28 +15042,31 @@ void CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: - CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: + CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15006,8 +15083,8 @@ CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: } } -CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: - ~CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback() +CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: + ~CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15018,7 +15095,7 @@ CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -15028,8 +15105,8 @@ void CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback::Callba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -15059,9 +15136,9 @@ void CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback::Callba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: - CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CHIPBridgedDeviceBasicInformationEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15078,8 +15155,7 @@ CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: } } -CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: - ~CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback() +CHIPBridgedDeviceBasicInformationEventListAttributeCallback::~CHIPBridgedDeviceBasicInformationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15090,8 +15166,8 @@ CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15100,8 +15176,8 @@ void CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -15131,9 +15207,9 @@ void CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAdministratorCommissioningEventListAttributeCallback::CHIPAdministratorCommissioningEventListAttributeCallback( +CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15150,7 +15226,7 @@ CHIPAdministratorCommissioningEventListAttributeCallback::CHIPAdministratorCommi } } -CHIPAdministratorCommissioningEventListAttributeCallback::~CHIPAdministratorCommissioningEventListAttributeCallback() +CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::~CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15161,8 +15237,8 @@ CHIPAdministratorCommissioningEventListAttributeCallback::~CHIPAdministratorComm env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAdministratorCommissioningEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15171,8 +15247,8 @@ void CHIPAdministratorCommissioningEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -15202,9 +15278,9 @@ void CHIPAdministratorCommissioningEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAdministratorCommissioningAttributeListAttributeCallback::CHIPAdministratorCommissioningAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPSwitchGeneratedCommandListAttributeCallback::CHIPSwitchGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15221,7 +15297,7 @@ CHIPAdministratorCommissioningAttributeListAttributeCallback::CHIPAdministratorC } } -CHIPAdministratorCommissioningAttributeListAttributeCallback::~CHIPAdministratorCommissioningAttributeListAttributeCallback() +CHIPSwitchGeneratedCommandListAttributeCallback::~CHIPSwitchGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15232,8 +15308,8 @@ CHIPAdministratorCommissioningAttributeListAttributeCallback::~CHIPAdministrator env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAdministratorCommissioningAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPSwitchGeneratedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15242,8 +15318,8 @@ void CHIPAdministratorCommissioningAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -15273,9 +15349,9 @@ void CHIPAdministratorCommissioningAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsNOCsAttributeCallback::CHIPOperationalCredentialsNOCsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPSwitchAcceptedCommandListAttributeCallback::CHIPSwitchAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15292,7 +15368,7 @@ CHIPOperationalCredentialsNOCsAttributeCallback::CHIPOperationalCredentialsNOCsA } } -CHIPOperationalCredentialsNOCsAttributeCallback::~CHIPOperationalCredentialsNOCsAttributeCallback() +CHIPSwitchAcceptedCommandListAttributeCallback::~CHIPSwitchAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15303,10 +15379,8 @@ CHIPOperationalCredentialsNOCsAttributeCallback::~CHIPOperationalCredentialsNOCs env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPSwitchAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15315,8 +15389,8 @@ void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -15335,47 +15409,10 @@ void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_noc; - jbyteArray newElement_0_nocByteArray = env->NewByteArray(static_cast(entry_0.noc.size())); - env->SetByteArrayRegion(newElement_0_nocByteArray, 0, static_cast(entry_0.noc.size()), - reinterpret_cast(entry_0.noc.data())); - newElement_0_noc = newElement_0_nocByteArray; - jobject newElement_0_icac; - if (entry_0.icac.IsNull()) - { - newElement_0_icac = nullptr; - } - else - { - jbyteArray newElement_0_icacByteArray = env->NewByteArray(static_cast(entry_0.icac.Value().size())); - env->SetByteArrayRegion(newElement_0_icacByteArray, 0, static_cast(entry_0.icac.Value().size()), - reinterpret_cast(entry_0.icac.Value().data())); - newElement_0_icac = newElement_0_icacByteArray; - } - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); - - jclass NOCStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterNOCStruct", NOCStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterNOCStruct"); - return; - } - jmethodID NOCStructStructCtor_1 = env->GetMethodID(NOCStructStructClass_1, "", "([B[BLjava/lang/Integer;)V"); - if (NOCStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterNOCStruct constructor"); - return; - } - - newElement_0 = env->NewObject(NOCStructStructClass_1, NOCStructStructCtor_1, newElement_0_noc, newElement_0_icac, - newElement_0_fabricIndex); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15383,10 +15420,8 @@ void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsFabricsAttributeCallback::CHIPOperationalCredentialsFabricsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPSwitchEventListAttributeCallback::CHIPSwitchEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15402,7 +15437,7 @@ CHIPOperationalCredentialsFabricsAttributeCallback::CHIPOperationalCredentialsFa } } -CHIPOperationalCredentialsFabricsAttributeCallback::~CHIPOperationalCredentialsFabricsAttributeCallback() +CHIPSwitchEventListAttributeCallback::~CHIPSwitchEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15413,10 +15448,8 @@ CHIPOperationalCredentialsFabricsAttributeCallback::~CHIPOperationalCredentialsF env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & list) +void CHIPSwitchEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15425,8 +15458,8 @@ void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -15445,58 +15478,10 @@ void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_rootPublicKey; - jbyteArray newElement_0_rootPublicKeyByteArray = env->NewByteArray(static_cast(entry_0.rootPublicKey.size())); - env->SetByteArrayRegion(newElement_0_rootPublicKeyByteArray, 0, static_cast(entry_0.rootPublicKey.size()), - reinterpret_cast(entry_0.rootPublicKey.data())); - newElement_0_rootPublicKey = newElement_0_rootPublicKeyByteArray; - jobject newElement_0_vendorID; - std::string newElement_0_vendorIDClassName = "java/lang/Integer"; - std::string newElement_0_vendorIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_vendorIDClassName.c_str(), newElement_0_vendorIDCtorSignature.c_str(), - static_cast(entry_0.vendorID), newElement_0_vendorID); - jobject newElement_0_fabricID; - std::string newElement_0_fabricIDClassName = "java/lang/Long"; - std::string newElement_0_fabricIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIDClassName.c_str(), - newElement_0_fabricIDCtorSignature.c_str(), entry_0.fabricID, - newElement_0_fabricID); - jobject newElement_0_nodeID; - std::string newElement_0_nodeIDClassName = "java/lang/Long"; - std::string newElement_0_nodeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nodeIDClassName.c_str(), newElement_0_nodeIDCtorSignature.c_str(), entry_0.nodeID, newElement_0_nodeID); - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); - - jclass fabricDescriptorStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct", - fabricDescriptorStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct"); - return; - } - jmethodID fabricDescriptorStructStructCtor_1 = - env->GetMethodID(fabricDescriptorStructStructClass_1, "", - "([BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)V"); - if (fabricDescriptorStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct constructor"); - return; - } - - newElement_0 = env->NewObject(fabricDescriptorStructStructClass_1, fabricDescriptorStructStructCtor_1, - newElement_0_rootPublicKey, newElement_0_vendorID, newElement_0_fabricID, newElement_0_nodeID, - newElement_0_label, newElement_0_fabricIndex); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15504,10 +15489,8 @@ void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: - CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPSwitchAttributeListAttributeCallback::CHIPSwitchAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15523,8 +15506,7 @@ CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: } } -CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: - ~CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback() +CHIPSwitchAttributeListAttributeCallback::~CHIPSwitchAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15535,8 +15517,8 @@ CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15545,8 +15527,8 @@ void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -15565,10 +15547,10 @@ void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::Callbac { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); - env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), - reinterpret_cast(entry_0.data())); - newElement_0 = newElement_0ByteArray; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15576,9 +15558,9 @@ void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CHIPOperationalCredentialsGeneratedCommandListAttributeCallback( +CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15595,7 +15577,7 @@ CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CHIPOperational } } -CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::~CHIPOperationalCredentialsGeneratedCommandListAttributeCallback() +CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::~CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15606,8 +15588,8 @@ CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::~CHIPOperationa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15615,9 +15597,8 @@ void CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -15625,31 +15606,28 @@ void CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CHIPOperationalCredentialsAcceptedCommandListAttributeCallback( +CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CHIPAdministratorCommissioningAdminVendorIdAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15666,7 +15644,7 @@ CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CHIPOperationalC } } -CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::~CHIPOperationalCredentialsAcceptedCommandListAttributeCallback() +CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::~CHIPAdministratorCommissioningAdminVendorIdAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15677,7 +15655,75 @@ CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::~CHIPOperational env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: + CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: + ~CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -15687,8 +15733,8 @@ void CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -15718,9 +15764,9 @@ void CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsEventListAttributeCallback::CHIPOperationalCredentialsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: + CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15737,7 +15783,8 @@ CHIPOperationalCredentialsEventListAttributeCallback::CHIPOperationalCredentials } } -CHIPOperationalCredentialsEventListAttributeCallback::~CHIPOperationalCredentialsEventListAttributeCallback() +CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: + ~CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15748,8 +15795,8 @@ CHIPOperationalCredentialsEventListAttributeCallback::~CHIPOperationalCredential env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15758,8 +15805,8 @@ void CHIPOperationalCredentialsEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -15789,9 +15836,9 @@ void CHIPOperationalCredentialsEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsAttributeListAttributeCallback::CHIPOperationalCredentialsAttributeListAttributeCallback( +CHIPAdministratorCommissioningEventListAttributeCallback::CHIPAdministratorCommissioningEventListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15808,7 +15855,7 @@ CHIPOperationalCredentialsAttributeListAttributeCallback::CHIPOperationalCredent } } -CHIPOperationalCredentialsAttributeListAttributeCallback::~CHIPOperationalCredentialsAttributeListAttributeCallback() +CHIPAdministratorCommissioningEventListAttributeCallback::~CHIPAdministratorCommissioningEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15819,8 +15866,8 @@ CHIPOperationalCredentialsAttributeListAttributeCallback::~CHIPOperationalCreden env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAdministratorCommissioningEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15829,8 +15876,8 @@ void CHIPOperationalCredentialsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -15860,9 +15907,9 @@ void CHIPOperationalCredentialsAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CHIPGroupKeyManagementGroupKeyMapAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPAdministratorCommissioningAttributeListAttributeCallback::CHIPAdministratorCommissioningAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15879,7 +15926,7 @@ CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CHIPGroupKeyManagementGroupK } } -CHIPGroupKeyManagementGroupKeyMapAttributeCallback::~CHIPGroupKeyManagementGroupKeyMapAttributeCallback() +CHIPAdministratorCommissioningAttributeListAttributeCallback::~CHIPAdministratorCommissioningAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15890,10 +15937,8 @@ CHIPGroupKeyManagementGroupKeyMapAttributeCallback::~CHIPGroupKeyManagementGroup env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPAdministratorCommissioningAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15902,8 +15947,8 @@ void CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -15922,43 +15967,10 @@ void CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_groupId; - std::string newElement_0_groupIdClassName = "java/lang/Integer"; - std::string newElement_0_groupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), - newElement_0_groupIdCtorSignature.c_str(), entry_0.groupId, - newElement_0_groupId); - jobject newElement_0_groupKeySetID; - std::string newElement_0_groupKeySetIDClassName = "java/lang/Integer"; - std::string newElement_0_groupKeySetIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupKeySetIDClassName.c_str(), - newElement_0_groupKeySetIDCtorSignature.c_str(), - entry_0.groupKeySetID, newElement_0_groupKeySetID); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); - - jclass groupKeyMapStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct", groupKeyMapStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct"); - return; - } - jmethodID groupKeyMapStructStructCtor_1 = env->GetMethodID(groupKeyMapStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); - if (groupKeyMapStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct constructor"); - return; - } - - newElement_0 = env->NewObject(groupKeyMapStructStructClass_1, groupKeyMapStructStructCtor_1, newElement_0_groupId, - newElement_0_groupKeySetID, newElement_0_fabricIndex); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15966,9 +15978,9 @@ void CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementGroupTableAttributeCallback::CHIPGroupKeyManagementGroupTableAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOperationalCredentialsNOCsAttributeCallback::CHIPOperationalCredentialsNOCsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15985,7 +15997,7 @@ CHIPGroupKeyManagementGroupTableAttributeCallback::CHIPGroupKeyManagementGroupTa } } -CHIPGroupKeyManagementGroupTableAttributeCallback::~CHIPGroupKeyManagementGroupTableAttributeCallback() +CHIPOperationalCredentialsNOCsAttributeCallback::~CHIPOperationalCredentialsNOCsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15996,9 +16008,9 @@ CHIPGroupKeyManagementGroupTableAttributeCallback::~CHIPGroupKeyManagementGroupT env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( +void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -16008,8 +16020,8 @@ void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -16028,37 +16040,22 @@ void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_groupId; - std::string newElement_0_groupIdClassName = "java/lang/Integer"; - std::string newElement_0_groupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), - newElement_0_groupIdCtorSignature.c_str(), entry_0.groupId, - newElement_0_groupId); - jobject newElement_0_endpoints; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); - - auto iter_newElement_0_endpoints_2 = entry_0.endpoints.begin(); - while (iter_newElement_0_endpoints_2.Next()) + jobject newElement_0_noc; + jbyteArray newElement_0_nocByteArray = env->NewByteArray(static_cast(entry_0.noc.size())); + env->SetByteArrayRegion(newElement_0_nocByteArray, 0, static_cast(entry_0.noc.size()), + reinterpret_cast(entry_0.noc.data())); + newElement_0_noc = newElement_0_nocByteArray; + jobject newElement_0_icac; + if (entry_0.icac.IsNull()) { - auto & entry_2 = iter_newElement_0_endpoints_2.GetValue(); - jobject newElement_2; - std::string newElement_2ClassName = "java/lang/Integer"; - std::string newElement_2CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), entry_2, newElement_2); - chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); - } - jobject newElement_0_groupName; - if (!entry_0.groupName.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_groupName); + newElement_0_icac = nullptr; } else { - jobject newElement_0_groupNameInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.groupName.Value(), - newElement_0_groupNameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupNameInsideOptional, newElement_0_groupName); + jbyteArray newElement_0_icacByteArray = env->NewByteArray(static_cast(entry_0.icac.Value().size())); + env->SetByteArrayRegion(newElement_0_icacByteArray, 0, static_cast(entry_0.icac.Value().size()), + reinterpret_cast(entry_0.icac.Value().data())); + newElement_0_icac = newElement_0_icacByteArray; } jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; @@ -16067,25 +16064,23 @@ void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( newElement_0_fabricIndexCtorSignature.c_str(), entry_0.fabricIndex, newElement_0_fabricIndex); - jclass groupInfoMapStructStructClass_1; + jclass NOCStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct", groupInfoMapStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterNOCStruct", NOCStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterNOCStruct"); return; } - jmethodID groupInfoMapStructStructCtor_1 = - env->GetMethodID(groupInfoMapStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (groupInfoMapStructStructCtor_1 == nullptr) + jmethodID NOCStructStructCtor_1 = env->GetMethodID(NOCStructStructClass_1, "", "([B[BLjava/lang/Integer;)V"); + if (NOCStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterNOCStruct constructor"); return; } - newElement_0 = env->NewObject(groupInfoMapStructStructClass_1, groupInfoMapStructStructCtor_1, newElement_0_groupId, - newElement_0_endpoints, newElement_0_groupName, newElement_0_fabricIndex); + newElement_0 = env->NewObject(NOCStructStructClass_1, NOCStructStructCtor_1, newElement_0_noc, newElement_0_icac, + newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16093,9 +16088,9 @@ void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CHIPGroupKeyManagementGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOperationalCredentialsFabricsAttributeCallback::CHIPOperationalCredentialsFabricsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16112,7 +16107,7 @@ CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CHIPGroupKeyManagem } } -CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::~CHIPGroupKeyManagementGeneratedCommandListAttributeCallback() +CHIPOperationalCredentialsFabricsAttributeCallback::~CHIPOperationalCredentialsFabricsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16123,8 +16118,10 @@ CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::~CHIPGroupKeyManage env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16133,8 +16130,8 @@ void CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -16153,10 +16150,58 @@ void CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jobject newElement_0_rootPublicKey; + jbyteArray newElement_0_rootPublicKeyByteArray = env->NewByteArray(static_cast(entry_0.rootPublicKey.size())); + env->SetByteArrayRegion(newElement_0_rootPublicKeyByteArray, 0, static_cast(entry_0.rootPublicKey.size()), + reinterpret_cast(entry_0.rootPublicKey.data())); + newElement_0_rootPublicKey = newElement_0_rootPublicKeyByteArray; + jobject newElement_0_vendorID; + std::string newElement_0_vendorIDClassName = "java/lang/Integer"; + std::string newElement_0_vendorIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_vendorIDClassName.c_str(), newElement_0_vendorIDCtorSignature.c_str(), + static_cast(entry_0.vendorID), newElement_0_vendorID); + jobject newElement_0_fabricID; + std::string newElement_0_fabricIDClassName = "java/lang/Long"; + std::string newElement_0_fabricIDCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIDClassName.c_str(), + newElement_0_fabricIDCtorSignature.c_str(), entry_0.fabricID, + newElement_0_fabricID); + jobject newElement_0_nodeID; + std::string newElement_0_nodeIDClassName = "java/lang/Long"; + std::string newElement_0_nodeIDCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nodeIDClassName.c_str(), newElement_0_nodeIDCtorSignature.c_str(), entry_0.nodeID, newElement_0_nodeID); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + entry_0.fabricIndex, newElement_0_fabricIndex); + + jclass fabricDescriptorStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct", + fabricDescriptorStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct"); + return; + } + jmethodID fabricDescriptorStructStructCtor_1 = + env->GetMethodID(fabricDescriptorStructStructClass_1, "", + "([BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)V"); + if (fabricDescriptorStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct constructor"); + return; + } + + newElement_0 = env->NewObject(fabricDescriptorStructStructClass_1, fabricDescriptorStructStructCtor_1, + newElement_0_rootPublicKey, newElement_0_vendorID, newElement_0_fabricID, newElement_0_nodeID, + newElement_0_label, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16164,9 +16209,9 @@ void CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CHIPGroupKeyManagementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: + CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16183,7 +16228,8 @@ CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CHIPGroupKeyManageme } } -CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::~CHIPGroupKeyManagementAcceptedCommandListAttributeCallback() +CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: + ~CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16194,8 +16240,8 @@ CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::~CHIPGroupKeyManagem env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16204,8 +16250,8 @@ void CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -16224,10 +16270,10 @@ void CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); + env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), + reinterpret_cast(entry_0.data())); + newElement_0 = newElement_0ByteArray; chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16235,9 +16281,9 @@ void CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementEventListAttributeCallback::CHIPGroupKeyManagementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CHIPOperationalCredentialsGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16254,7 +16300,7 @@ CHIPGroupKeyManagementEventListAttributeCallback::CHIPGroupKeyManagementEventLis } } -CHIPGroupKeyManagementEventListAttributeCallback::~CHIPGroupKeyManagementEventListAttributeCallback() +CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::~CHIPOperationalCredentialsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16265,8 +16311,8 @@ CHIPGroupKeyManagementEventListAttributeCallback::~CHIPGroupKeyManagementEventLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16275,8 +16321,8 @@ void CHIPGroupKeyManagementEventListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -16306,9 +16352,9 @@ void CHIPGroupKeyManagementEventListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementAttributeListAttributeCallback::CHIPGroupKeyManagementAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CHIPOperationalCredentialsAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16325,7 +16371,7 @@ CHIPGroupKeyManagementAttributeListAttributeCallback::CHIPGroupKeyManagementAttr } } -CHIPGroupKeyManagementAttributeListAttributeCallback::~CHIPGroupKeyManagementAttributeListAttributeCallback() +CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::~CHIPOperationalCredentialsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16336,8 +16382,8 @@ CHIPGroupKeyManagementAttributeListAttributeCallback::~CHIPGroupKeyManagementAtt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16346,8 +16392,8 @@ void CHIPGroupKeyManagementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -16377,8 +16423,10 @@ void CHIPGroupKeyManagementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFixedLabelLabelListAttributeCallback::CHIPFixedLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOperationalCredentialsEventListAttributeCallback::CHIPOperationalCredentialsEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16394,7 +16442,7 @@ CHIPFixedLabelLabelListAttributeCallback::CHIPFixedLabelLabelListAttributeCallba } } -CHIPFixedLabelLabelListAttributeCallback::~CHIPFixedLabelLabelListAttributeCallback() +CHIPOperationalCredentialsEventListAttributeCallback::~CHIPOperationalCredentialsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16405,9 +16453,8 @@ CHIPFixedLabelLabelListAttributeCallback::~CHIPFixedLabelLabelListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOperationalCredentialsEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16416,8 +16463,8 @@ void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -16436,28 +16483,10 @@ void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_value; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); - - jclass labelStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$FixedLabelClusterLabelStruct", - labelStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$FixedLabelClusterLabelStruct"); - return; - } - jmethodID labelStructStructCtor_1 = - env->GetMethodID(labelStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/String;)V"); - if (labelStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$FixedLabelClusterLabelStruct constructor"); - return; - } - - newElement_0 = env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16465,9 +16494,9 @@ void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFixedLabelGeneratedCommandListAttributeCallback::CHIPFixedLabelGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOperationalCredentialsAttributeListAttributeCallback::CHIPOperationalCredentialsAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16484,7 +16513,7 @@ CHIPFixedLabelGeneratedCommandListAttributeCallback::CHIPFixedLabelGeneratedComm } } -CHIPFixedLabelGeneratedCommandListAttributeCallback::~CHIPFixedLabelGeneratedCommandListAttributeCallback() +CHIPOperationalCredentialsAttributeListAttributeCallback::~CHIPOperationalCredentialsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16495,8 +16524,8 @@ CHIPFixedLabelGeneratedCommandListAttributeCallback::~CHIPFixedLabelGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFixedLabelGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalCredentialsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16505,8 +16534,8 @@ void CHIPFixedLabelGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -16536,9 +16565,9 @@ void CHIPFixedLabelGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFixedLabelAcceptedCommandListAttributeCallback::CHIPFixedLabelAcceptedCommandListAttributeCallback(jobject javaCallback, +CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CHIPGroupKeyManagementGroupKeyMapAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16555,7 +16584,7 @@ CHIPFixedLabelAcceptedCommandListAttributeCallback::CHIPFixedLabelAcceptedComman } } -CHIPFixedLabelAcceptedCommandListAttributeCallback::~CHIPFixedLabelAcceptedCommandListAttributeCallback() +CHIPGroupKeyManagementGroupKeyMapAttributeCallback::~CHIPGroupKeyManagementGroupKeyMapAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16566,8 +16595,10 @@ CHIPFixedLabelAcceptedCommandListAttributeCallback::~CHIPFixedLabelAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFixedLabelAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16576,8 +16607,8 @@ void CHIPFixedLabelAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -16596,23 +16627,58 @@ void CHIPFixedLabelAcceptedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFixedLabelEventListAttributeCallback::CHIPFixedLabelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { + jobject newElement_0_groupId; + std::string newElement_0_groupIdClassName = "java/lang/Integer"; + std::string newElement_0_groupIdCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), + newElement_0_groupIdCtorSignature.c_str(), entry_0.groupId, + newElement_0_groupId); + jobject newElement_0_groupKeySetID; + std::string newElement_0_groupKeySetIDClassName = "java/lang/Integer"; + std::string newElement_0_groupKeySetIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupKeySetIDClassName.c_str(), + newElement_0_groupKeySetIDCtorSignature.c_str(), + entry_0.groupKeySetID, newElement_0_groupKeySetID); + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + entry_0.fabricIndex, newElement_0_fabricIndex); + + jclass groupKeyMapStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct", groupKeyMapStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct"); + return; + } + jmethodID groupKeyMapStructStructCtor_1 = env->GetMethodID(groupKeyMapStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (groupKeyMapStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct constructor"); + return; + } + + newElement_0 = env->NewObject(groupKeyMapStructStructClass_1, groupKeyMapStructStructCtor_1, newElement_0_groupId, + newElement_0_groupKeySetID, newElement_0_fabricIndex); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPGroupKeyManagementGroupTableAttributeCallback::CHIPGroupKeyManagementGroupTableAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { ChipLogError(Zcl, "Could not create global reference for Java callback"); return; } @@ -16624,7 +16690,7 @@ CHIPFixedLabelEventListAttributeCallback::CHIPFixedLabelEventListAttributeCallba } } -CHIPFixedLabelEventListAttributeCallback::~CHIPFixedLabelEventListAttributeCallback() +CHIPGroupKeyManagementGroupTableAttributeCallback::~CHIPGroupKeyManagementGroupTableAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16635,8 +16701,10 @@ CHIPFixedLabelEventListAttributeCallback::~CHIPFixedLabelEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFixedLabelEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16645,8 +16713,8 @@ void CHIPFixedLabelEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -16665,10 +16733,64 @@ void CHIPFixedLabelEventListAttributeCallback::CallbackFn(void * context, { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jobject newElement_0_groupId; + std::string newElement_0_groupIdClassName = "java/lang/Integer"; + std::string newElement_0_groupIdCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), + newElement_0_groupIdCtorSignature.c_str(), entry_0.groupId, + newElement_0_groupId); + jobject newElement_0_endpoints; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); + + auto iter_newElement_0_endpoints_2 = entry_0.endpoints.begin(); + while (iter_newElement_0_endpoints_2.Next()) + { + auto & entry_2 = iter_newElement_0_endpoints_2.GetValue(); + jobject newElement_2; + std::string newElement_2ClassName = "java/lang/Integer"; + std::string newElement_2CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), entry_2, newElement_2); + chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); + } + jobject newElement_0_groupName; + if (!entry_0.groupName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_groupName); + } + else + { + jobject newElement_0_groupNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.groupName.Value(), + newElement_0_groupNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupNameInsideOptional, newElement_0_groupName); + } + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + entry_0.fabricIndex, newElement_0_fabricIndex); + + jclass groupInfoMapStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct", groupInfoMapStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct"); + return; + } + jmethodID groupInfoMapStructStructCtor_1 = + env->GetMethodID(groupInfoMapStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (groupInfoMapStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct constructor"); + return; + } + + newElement_0 = env->NewObject(groupInfoMapStructStructClass_1, groupInfoMapStructStructCtor_1, newElement_0_groupId, + newElement_0_endpoints, newElement_0_groupName, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16676,8 +16798,10 @@ void CHIPFixedLabelEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFixedLabelAttributeListAttributeCallback::CHIPFixedLabelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CHIPGroupKeyManagementGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16693,7 +16817,7 @@ CHIPFixedLabelAttributeListAttributeCallback::CHIPFixedLabelAttributeListAttribu } } -CHIPFixedLabelAttributeListAttributeCallback::~CHIPFixedLabelAttributeListAttributeCallback() +CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::~CHIPGroupKeyManagementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16704,8 +16828,8 @@ CHIPFixedLabelAttributeListAttributeCallback::~CHIPFixedLabelAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFixedLabelAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16714,8 +16838,8 @@ void CHIPFixedLabelAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -16745,8 +16869,10 @@ void CHIPFixedLabelAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPUserLabelLabelListAttributeCallback::CHIPUserLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CHIPGroupKeyManagementAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16762,7 +16888,7 @@ CHIPUserLabelLabelListAttributeCallback::CHIPUserLabelLabelListAttributeCallback } } -CHIPUserLabelLabelListAttributeCallback::~CHIPUserLabelLabelListAttributeCallback() +CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::~CHIPGroupKeyManagementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16773,9 +16899,8 @@ CHIPUserLabelLabelListAttributeCallback::~CHIPUserLabelLabelListAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUserLabelLabelListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16784,8 +16909,8 @@ void CHIPUserLabelLabelListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -16804,28 +16929,10 @@ void CHIPUserLabelLabelListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_value; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); - - jclass labelStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$UserLabelClusterLabelStruct", - labelStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UserLabelClusterLabelStruct"); - return; - } - jmethodID labelStructStructCtor_1 = - env->GetMethodID(labelStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/String;)V"); - if (labelStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UserLabelClusterLabelStruct constructor"); - return; - } - - newElement_0 = env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16833,9 +16940,9 @@ void CHIPUserLabelLabelListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPUserLabelGeneratedCommandListAttributeCallback::CHIPUserLabelGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPGroupKeyManagementEventListAttributeCallback::CHIPGroupKeyManagementEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16852,7 +16959,7 @@ CHIPUserLabelGeneratedCommandListAttributeCallback::CHIPUserLabelGeneratedComman } } -CHIPUserLabelGeneratedCommandListAttributeCallback::~CHIPUserLabelGeneratedCommandListAttributeCallback() +CHIPGroupKeyManagementEventListAttributeCallback::~CHIPGroupKeyManagementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16863,8 +16970,8 @@ CHIPUserLabelGeneratedCommandListAttributeCallback::~CHIPUserLabelGeneratedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUserLabelGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPGroupKeyManagementEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16873,8 +16980,8 @@ void CHIPUserLabelGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -16904,9 +17011,9 @@ void CHIPUserLabelGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPUserLabelAcceptedCommandListAttributeCallback::CHIPUserLabelAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPGroupKeyManagementAttributeListAttributeCallback::CHIPGroupKeyManagementAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16923,7 +17030,7 @@ CHIPUserLabelAcceptedCommandListAttributeCallback::CHIPUserLabelAcceptedCommandL } } -CHIPUserLabelAcceptedCommandListAttributeCallback::~CHIPUserLabelAcceptedCommandListAttributeCallback() +CHIPGroupKeyManagementAttributeListAttributeCallback::~CHIPGroupKeyManagementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16934,8 +17041,8 @@ CHIPUserLabelAcceptedCommandListAttributeCallback::~CHIPUserLabelAcceptedCommand env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUserLabelAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPGroupKeyManagementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16944,8 +17051,8 @@ void CHIPUserLabelAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -16975,8 +17082,8 @@ void CHIPUserLabelAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPUserLabelEventListAttributeCallback::CHIPUserLabelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPFixedLabelLabelListAttributeCallback::CHIPFixedLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16992,7 +17099,7 @@ CHIPUserLabelEventListAttributeCallback::CHIPUserLabelEventListAttributeCallback } } -CHIPUserLabelEventListAttributeCallback::~CHIPUserLabelEventListAttributeCallback() +CHIPFixedLabelLabelListAttributeCallback::~CHIPFixedLabelLabelListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17003,8 +17110,9 @@ CHIPUserLabelEventListAttributeCallback::~CHIPUserLabelEventListAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUserLabelEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17013,8 +17121,8 @@ void CHIPUserLabelEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -17033,26 +17141,46 @@ void CHIPUserLabelEventListAttributeCallback::CallbackFn(void * context, { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPUserLabelAttributeListAttributeCallback::CHIPUserLabelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_value; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); + + jclass labelStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$FixedLabelClusterLabelStruct", + labelStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$FixedLabelClusterLabelStruct"); + return; + } + jmethodID labelStructStructCtor_1 = + env->GetMethodID(labelStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/String;)V"); + if (labelStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$FixedLabelClusterLabelStruct constructor"); + return; + } + + newElement_0 = env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPFixedLabelGeneratedCommandListAttributeCallback::CHIPFixedLabelGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } javaCallbackRef = env->NewGlobalRef(javaCallback); if (javaCallbackRef == nullptr) @@ -17061,7 +17189,7 @@ CHIPUserLabelAttributeListAttributeCallback::CHIPUserLabelAttributeListAttribute } } -CHIPUserLabelAttributeListAttributeCallback::~CHIPUserLabelAttributeListAttributeCallback() +CHIPFixedLabelGeneratedCommandListAttributeCallback::~CHIPFixedLabelGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17072,8 +17200,8 @@ CHIPUserLabelAttributeListAttributeCallback::~CHIPUserLabelAttributeListAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUserLabelAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPFixedLabelGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17082,8 +17210,8 @@ void CHIPUserLabelAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -17113,9 +17241,9 @@ void CHIPUserLabelAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBooleanStateGeneratedCommandListAttributeCallback::CHIPBooleanStateGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFixedLabelAcceptedCommandListAttributeCallback::CHIPFixedLabelAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -17132,7 +17260,7 @@ CHIPBooleanStateGeneratedCommandListAttributeCallback::CHIPBooleanStateGenerated } } -CHIPBooleanStateGeneratedCommandListAttributeCallback::~CHIPBooleanStateGeneratedCommandListAttributeCallback() +CHIPFixedLabelAcceptedCommandListAttributeCallback::~CHIPFixedLabelAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17143,7 +17271,7 @@ CHIPBooleanStateGeneratedCommandListAttributeCallback::~CHIPBooleanStateGenerate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBooleanStateGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPFixedLabelAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -17153,8 +17281,8 @@ void CHIPBooleanStateGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -17184,10 +17312,8 @@ void CHIPBooleanStateGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBooleanStateAcceptedCommandListAttributeCallback::CHIPBooleanStateAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPFixedLabelEventListAttributeCallback::CHIPFixedLabelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17203,7 +17329,7 @@ CHIPBooleanStateAcceptedCommandListAttributeCallback::CHIPBooleanStateAcceptedCo } } -CHIPBooleanStateAcceptedCommandListAttributeCallback::~CHIPBooleanStateAcceptedCommandListAttributeCallback() +CHIPFixedLabelEventListAttributeCallback::~CHIPFixedLabelEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17214,8 +17340,8 @@ CHIPBooleanStateAcceptedCommandListAttributeCallback::~CHIPBooleanStateAcceptedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBooleanStateAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPFixedLabelEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17224,8 +17350,8 @@ void CHIPBooleanStateAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -17255,8 +17381,8 @@ void CHIPBooleanStateAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBooleanStateEventListAttributeCallback::CHIPBooleanStateEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPFixedLabelAttributeListAttributeCallback::CHIPFixedLabelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17272,7 +17398,7 @@ CHIPBooleanStateEventListAttributeCallback::CHIPBooleanStateEventListAttributeCa } } -CHIPBooleanStateEventListAttributeCallback::~CHIPBooleanStateEventListAttributeCallback() +CHIPFixedLabelAttributeListAttributeCallback::~CHIPFixedLabelAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17283,8 +17409,8 @@ CHIPBooleanStateEventListAttributeCallback::~CHIPBooleanStateEventListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBooleanStateEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPFixedLabelAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17293,8 +17419,8 @@ void CHIPBooleanStateEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -17324,9 +17450,97 @@ void CHIPBooleanStateEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBooleanStateAttributeListAttributeCallback::CHIPBooleanStateAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPUserLabelLabelListAttributeCallback::CHIPUserLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPUserLabelLabelListAttributeCallback::~CHIPUserLabelLabelListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPUserLabelLabelListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_value; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); + + jclass labelStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$UserLabelClusterLabelStruct", + labelStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UserLabelClusterLabelStruct"); + return; + } + jmethodID labelStructStructCtor_1 = + env->GetMethodID(labelStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/String;)V"); + if (labelStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UserLabelClusterLabelStruct constructor"); + return; + } + + newElement_0 = env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPUserLabelGeneratedCommandListAttributeCallback::CHIPUserLabelGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -17343,7 +17557,7 @@ CHIPBooleanStateAttributeListAttributeCallback::CHIPBooleanStateAttributeListAtt } } -CHIPBooleanStateAttributeListAttributeCallback::~CHIPBooleanStateAttributeListAttributeCallback() +CHIPUserLabelGeneratedCommandListAttributeCallback::~CHIPUserLabelGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17354,8 +17568,8 @@ CHIPBooleanStateAttributeListAttributeCallback::~CHIPBooleanStateAttributeListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBooleanStateAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPUserLabelGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17364,8 +17578,8 @@ void CHIPBooleanStateAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -17395,9 +17609,9 @@ void CHIPBooleanStateAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectStandardNamespaceAttributeCallback::CHIPModeSelectStandardNamespaceAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPUserLabelAcceptedCommandListAttributeCallback::CHIPUserLabelAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -17414,7 +17628,7 @@ CHIPModeSelectStandardNamespaceAttributeCallback::CHIPModeSelectStandardNamespac } } -CHIPModeSelectStandardNamespaceAttributeCallback::~CHIPModeSelectStandardNamespaceAttributeCallback() +CHIPUserLabelAcceptedCommandListAttributeCallback::~CHIPUserLabelAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17425,8 +17639,8 @@ CHIPModeSelectStandardNamespaceAttributeCallback::~CHIPModeSelectStandardNamespa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPUserLabelAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17434,8 +17648,9 @@ void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -17443,27 +17658,30 @@ void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPUserLabelEventListAttributeCallback::CHIPUserLabelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17479,7 +17697,7 @@ CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttri } } -CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttributeCallback() +CHIPUserLabelEventListAttributeCallback::~CHIPUserLabelEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17490,9 +17708,8 @@ CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPUserLabelEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17501,8 +17718,8 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -17521,72 +17738,10 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); - jobject newElement_0_semanticTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); - - auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); - while (iter_newElement_0_semanticTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeClassName.c_str(), newElement_2_mfgCodeCtorSignature.c_str(), - static_cast(entry_2.mfgCode), newElement_2_mfgCode); - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); - - jclass semanticTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", semanticTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); - return; - } - jmethodID semanticTagStructStructCtor_3 = - env->GetMethodID(semanticTagStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); - if (semanticTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); - return; - } - - newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); - return; - } - jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); - if (modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_semanticTags); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17594,8 +17749,8 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectStartUpModeAttributeCallback::CHIPModeSelectStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPUserLabelAttributeListAttributeCallback::CHIPUserLabelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17611,7 +17766,7 @@ CHIPModeSelectStartUpModeAttributeCallback::CHIPModeSelectStartUpModeAttributeCa } } -CHIPModeSelectStartUpModeAttributeCallback::~CHIPModeSelectStartUpModeAttributeCallback() +CHIPUserLabelAttributeListAttributeCallback::~CHIPUserLabelAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17622,7 +17777,8 @@ CHIPModeSelectStartUpModeAttributeCallback::~CHIPModeSelectStartUpModeAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPUserLabelAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17630,72 +17786,9 @@ void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, cons jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPModeSelectOnModeAttributeCallback::CHIPModeSelectOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPModeSelectOnModeAttributeCallback::~CHIPModeSelectOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -17703,28 +17796,31 @@ void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chi ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectGeneratedCommandListAttributeCallback::CHIPModeSelectGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBooleanStateGeneratedCommandListAttributeCallback::CHIPBooleanStateGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -17741,7 +17837,7 @@ CHIPModeSelectGeneratedCommandListAttributeCallback::CHIPModeSelectGeneratedComm } } -CHIPModeSelectGeneratedCommandListAttributeCallback::~CHIPModeSelectGeneratedCommandListAttributeCallback() +CHIPBooleanStateGeneratedCommandListAttributeCallback::~CHIPBooleanStateGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17752,7 +17848,7 @@ CHIPModeSelectGeneratedCommandListAttributeCallback::~CHIPModeSelectGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPBooleanStateGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -17762,8 +17858,8 @@ void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -17793,9 +17889,9 @@ void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectAcceptedCommandListAttributeCallback::CHIPModeSelectAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBooleanStateAcceptedCommandListAttributeCallback::CHIPBooleanStateAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -17812,7 +17908,7 @@ CHIPModeSelectAcceptedCommandListAttributeCallback::CHIPModeSelectAcceptedComman } } -CHIPModeSelectAcceptedCommandListAttributeCallback::~CHIPModeSelectAcceptedCommandListAttributeCallback() +CHIPBooleanStateAcceptedCommandListAttributeCallback::~CHIPBooleanStateAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17823,7 +17919,7 @@ CHIPModeSelectAcceptedCommandListAttributeCallback::~CHIPModeSelectAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPBooleanStateAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -17833,8 +17929,8 @@ void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -17864,8 +17960,8 @@ void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectEventListAttributeCallback::CHIPModeSelectEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBooleanStateEventListAttributeCallback::CHIPBooleanStateEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17881,7 +17977,7 @@ CHIPModeSelectEventListAttributeCallback::CHIPModeSelectEventListAttributeCallba } } -CHIPModeSelectEventListAttributeCallback::~CHIPModeSelectEventListAttributeCallback() +CHIPBooleanStateEventListAttributeCallback::~CHIPBooleanStateEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17892,8 +17988,8 @@ CHIPModeSelectEventListAttributeCallback::~CHIPModeSelectEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBooleanStateEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17902,8 +17998,8 @@ void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -17933,8 +18029,10 @@ void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBooleanStateAttributeListAttributeCallback::CHIPBooleanStateAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17950,7 +18048,7 @@ CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttribu } } -CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttributeCallback() +CHIPBooleanStateAttributeListAttributeCallback::~CHIPBooleanStateAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17961,8 +18059,8 @@ CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBooleanStateAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17971,8 +18069,8 @@ void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18002,8 +18100,10 @@ void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDoorLockLockStateAttributeCallback::CHIPDoorLockLockStateAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPModeSelectStandardNamespaceAttributeCallback::CHIPModeSelectStandardNamespaceAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18019,7 +18119,7 @@ CHIPDoorLockLockStateAttributeCallback::CHIPDoorLockLockStateAttributeCallback(j } } -CHIPDoorLockLockStateAttributeCallback::~CHIPDoorLockLockStateAttributeCallback() +CHIPModeSelectStandardNamespaceAttributeCallback::~CHIPModeSelectStandardNamespaceAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18030,8 +18130,8 @@ CHIPDoorLockLockStateAttributeCallback::~CHIPDoorLockLockStateAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDoorLockLockStateAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18039,8 +18139,8 @@ void CHIPDoorLockLockStateAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18060,15 +18160,15 @@ void CHIPDoorLockLockStateAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - static_cast(value.Value()), javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPDoorLockDoorStateAttributeCallback::CHIPDoorLockDoorStateAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18084,7 +18184,7 @@ CHIPDoorLockDoorStateAttributeCallback::CHIPDoorLockDoorStateAttributeCallback(j } } -CHIPDoorLockDoorStateAttributeCallback::~CHIPDoorLockDoorStateAttributeCallback() +CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18095,8 +18195,9 @@ CHIPDoorLockDoorStateAttributeCallback::~CHIPDoorLockDoorStateAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDoorLockDoorStateAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18104,8 +18205,138 @@ void CHIPDoorLockDoorStateAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jobject newElement_0_semanticTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); + + auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); + while (iter_newElement_0_semanticTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeClassName.c_str(), newElement_2_mfgCodeCtorSignature.c_str(), + static_cast(entry_2.mfgCode), newElement_2_mfgCode); + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + + jclass semanticTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", semanticTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); + return; + } + jmethodID semanticTagStructStructCtor_3 = + env->GetMethodID(semanticTagStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (semanticTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); + return; + } + + newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); + return; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_semanticTags); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPModeSelectStartUpModeAttributeCallback::CHIPModeSelectStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPModeSelectStartUpModeAttributeCallback::~CHIPModeSelectStartUpModeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18126,16 +18357,14 @@ void CHIPDoorLockDoorStateAttributeCallback::CallbackFn( std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - static_cast(value.Value()), javaValue); + value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPDoorLockGeneratedCommandListAttributeCallback::CHIPDoorLockGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectOnModeAttributeCallback::CHIPModeSelectOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18151,7 +18380,7 @@ CHIPDoorLockGeneratedCommandListAttributeCallback::CHIPDoorLockGeneratedCommandL } } -CHIPDoorLockGeneratedCommandListAttributeCallback::~CHIPDoorLockGeneratedCommandListAttributeCallback() +CHIPModeSelectOnModeAttributeCallback::~CHIPModeSelectOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18162,8 +18391,7 @@ CHIPDoorLockGeneratedCommandListAttributeCallback::~CHIPDoorLockGeneratedCommand env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDoorLockGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18171,9 +18399,8 @@ void CHIPDoorLockGeneratedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18181,31 +18408,28 @@ void CHIPDoorLockGeneratedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPDoorLockAcceptedCommandListAttributeCallback::CHIPDoorLockAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPModeSelectGeneratedCommandListAttributeCallback::CHIPModeSelectGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -18222,7 +18446,7 @@ CHIPDoorLockAcceptedCommandListAttributeCallback::CHIPDoorLockAcceptedCommandLis } } -CHIPDoorLockAcceptedCommandListAttributeCallback::~CHIPDoorLockAcceptedCommandListAttributeCallback() +CHIPModeSelectGeneratedCommandListAttributeCallback::~CHIPModeSelectGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18233,8 +18457,8 @@ CHIPDoorLockAcceptedCommandListAttributeCallback::~CHIPDoorLockAcceptedCommandLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDoorLockAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18243,8 +18467,8 @@ void CHIPDoorLockAcceptedCommandListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18274,8 +18498,10 @@ void CHIPDoorLockAcceptedCommandListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDoorLockEventListAttributeCallback::CHIPDoorLockEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPModeSelectAcceptedCommandListAttributeCallback::CHIPModeSelectAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18291,7 +18517,7 @@ CHIPDoorLockEventListAttributeCallback::CHIPDoorLockEventListAttributeCallback(j } } -CHIPDoorLockEventListAttributeCallback::~CHIPDoorLockEventListAttributeCallback() +CHIPModeSelectAcceptedCommandListAttributeCallback::~CHIPModeSelectAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18302,8 +18528,8 @@ CHIPDoorLockEventListAttributeCallback::~CHIPDoorLockEventListAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDoorLockEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18312,8 +18538,8 @@ void CHIPDoorLockEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18343,8 +18569,8 @@ void CHIPDoorLockEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDoorLockAttributeListAttributeCallback::CHIPDoorLockAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPModeSelectEventListAttributeCallback::CHIPModeSelectEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18360,7 +18586,7 @@ CHIPDoorLockAttributeListAttributeCallback::CHIPDoorLockAttributeListAttributeCa } } -CHIPDoorLockAttributeListAttributeCallback::~CHIPDoorLockAttributeListAttributeCallback() +CHIPModeSelectEventListAttributeCallback::~CHIPModeSelectEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18371,8 +18597,8 @@ CHIPDoorLockAttributeListAttributeCallback::~CHIPDoorLockAttributeListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDoorLockAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18381,8 +18607,8 @@ void CHIPDoorLockAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18412,10 +18638,8 @@ void CHIPDoorLockAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CHIPWindowCoveringCurrentPositionLiftAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18431,7 +18655,7 @@ CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CHIPWindowCoveringCurren } } -CHIPWindowCoveringCurrentPositionLiftAttributeCallback::~CHIPWindowCoveringCurrentPositionLiftAttributeCallback() +CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18442,8 +18666,8 @@ CHIPWindowCoveringCurrentPositionLiftAttributeCallback::~CHIPWindowCoveringCurre env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18451,8 +18675,9 @@ void CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CallbackFn(void * c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18460,29 +18685,30 @@ void CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CallbackFn(void * c ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CHIPWindowCoveringCurrentPositionTiltAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDoorLockLockStateAttributeCallback::CHIPDoorLockLockStateAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18498,7 +18724,7 @@ CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CHIPWindowCoveringCurren } } -CHIPWindowCoveringCurrentPositionTiltAttributeCallback::~CHIPWindowCoveringCurrentPositionTiltAttributeCallback() +CHIPDoorLockLockStateAttributeCallback::~CHIPDoorLockLockStateAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18509,8 +18735,8 @@ CHIPWindowCoveringCurrentPositionTiltAttributeCallback::~CHIPWindowCoveringCurre env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPDoorLockLockStateAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18518,8 +18744,8 @@ void CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CallbackFn(void * c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18539,17 +18765,15 @@ void CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CallbackFn(void * c { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + static_cast(value.Value()), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDoorLockDoorStateAttributeCallback::CHIPDoorLockDoorStateAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18565,8 +18789,7 @@ CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CHIPWindowCove } } -CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback:: - ~CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback() +CHIPDoorLockDoorStateAttributeCallback::~CHIPDoorLockDoorStateAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18577,8 +18800,8 @@ CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPDoorLockDoorStateAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18586,8 +18809,8 @@ void CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18608,15 +18831,15 @@ void CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CallbackF std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + static_cast(value.Value()), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPDoorLockGeneratedCommandListAttributeCallback::CHIPDoorLockGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -18633,8 +18856,7 @@ CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CHIPWindowCove } } -CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback:: - ~CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback() +CHIPDoorLockGeneratedCommandListAttributeCallback::~CHIPDoorLockGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18645,8 +18867,8 @@ CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPDoorLockGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18654,8 +18876,9 @@ void CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18663,28 +18886,31 @@ void CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CallbackF ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback:: - CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPDoorLockAcceptedCommandListAttributeCallback::CHIPDoorLockAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -18701,8 +18927,7 @@ CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback:: } } -CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback:: - ~CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback() +CHIPDoorLockAcceptedCommandListAttributeCallback::~CHIPDoorLockAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18713,8 +18938,8 @@ CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPDoorLockAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18722,8 +18947,9 @@ void CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::Callbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18731,29 +18957,30 @@ void CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::Callbac ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback:: - CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDoorLockEventListAttributeCallback::CHIPDoorLockEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18769,8 +18996,7 @@ CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback:: } } -CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback:: - ~CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback() +CHIPDoorLockEventListAttributeCallback::~CHIPDoorLockEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18781,8 +19007,8 @@ CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPDoorLockEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18790,8 +19016,9 @@ void CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::Callbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18799,29 +19026,30 @@ void CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::Callbac ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback:: - CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDoorLockAttributeListAttributeCallback::CHIPDoorLockAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18837,8 +19065,7 @@ CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback:: } } -CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback:: - ~CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback() +CHIPDoorLockAttributeListAttributeCallback::~CHIPDoorLockAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18849,8 +19076,8 @@ CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPDoorLockAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18858,8 +19085,9 @@ void CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::Callba jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18867,28 +19095,31 @@ void CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::Callba ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback:: - CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CHIPWindowCoveringCurrentPositionLiftAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -18905,8 +19136,7 @@ CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback:: } } -CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback:: - ~CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback() +CHIPWindowCoveringCurrentPositionLiftAttributeCallback::~CHIPWindowCoveringCurrentPositionLiftAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18917,8 +19147,8 @@ CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18926,8 +19156,8 @@ void CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::Callba jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -18954,10 +19184,767 @@ void CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::Callba env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWindowCoveringGeneratedCommandListAttributeCallback::CHIPWindowCoveringGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CHIPWindowCoveringCurrentPositionTiltAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionTiltAttributeCallback::~CHIPWindowCoveringCurrentPositionTiltAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback:: + ~CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback:: + ~CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback:: + CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback:: + ~CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback:: + CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback:: + ~CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback:: + CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback:: + ~CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback:: + CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback:: + ~CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPWindowCoveringGeneratedCommandListAttributeCallback::CHIPWindowCoveringGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringGeneratedCommandListAttributeCallback::~CHIPWindowCoveringGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWindowCoveringAcceptedCommandListAttributeCallback::CHIPWindowCoveringAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringAcceptedCommandListAttributeCallback::~CHIPWindowCoveringAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWindowCoveringEventListAttributeCallback::CHIPWindowCoveringEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringEventListAttributeCallback::~CHIPWindowCoveringEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPWindowCoveringAttributeListAttributeCallback::CHIPWindowCoveringAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPWindowCoveringAttributeListAttributeCallback::~CHIPWindowCoveringAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPWindowCoveringAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPBarrierControlGeneratedCommandListAttributeCallback::CHIPBarrierControlGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18973,7 +19960,7 @@ CHIPWindowCoveringGeneratedCommandListAttributeCallback::CHIPWindowCoveringGener } } -CHIPWindowCoveringGeneratedCommandListAttributeCallback::~CHIPWindowCoveringGeneratedCommandListAttributeCallback() +CHIPBarrierControlGeneratedCommandListAttributeCallback::~CHIPBarrierControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18984,7 +19971,7 @@ CHIPWindowCoveringGeneratedCommandListAttributeCallback::~CHIPWindowCoveringGene env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPBarrierControlGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -18994,8 +19981,8 @@ void CHIPWindowCoveringGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19025,9 +20012,9 @@ void CHIPWindowCoveringGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringAcceptedCommandListAttributeCallback::CHIPWindowCoveringAcceptedCommandListAttributeCallback(jobject javaCallback, +CHIPBarrierControlAcceptedCommandListAttributeCallback::CHIPBarrierControlAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19044,7 +20031,7 @@ CHIPWindowCoveringAcceptedCommandListAttributeCallback::CHIPWindowCoveringAccept } } -CHIPWindowCoveringAcceptedCommandListAttributeCallback::~CHIPWindowCoveringAcceptedCommandListAttributeCallback() +CHIPBarrierControlAcceptedCommandListAttributeCallback::~CHIPBarrierControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19055,7 +20042,7 @@ CHIPWindowCoveringAcceptedCommandListAttributeCallback::~CHIPWindowCoveringAccep env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPBarrierControlAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -19065,8 +20052,8 @@ void CHIPWindowCoveringAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19096,8 +20083,8 @@ void CHIPWindowCoveringAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringEventListAttributeCallback::CHIPWindowCoveringEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBarrierControlEventListAttributeCallback::CHIPBarrierControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19113,7 +20100,7 @@ CHIPWindowCoveringEventListAttributeCallback::CHIPWindowCoveringEventListAttribu } } -CHIPWindowCoveringEventListAttributeCallback::~CHIPWindowCoveringEventListAttributeCallback() +CHIPBarrierControlEventListAttributeCallback::~CHIPBarrierControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19124,7 +20111,7 @@ CHIPWindowCoveringEventListAttributeCallback::~CHIPWindowCoveringEventListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringEventListAttributeCallback::CallbackFn(void * context, +void CHIPBarrierControlEventListAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -19134,8 +20121,8 @@ void CHIPWindowCoveringEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19165,9 +20152,9 @@ void CHIPWindowCoveringEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWindowCoveringAttributeListAttributeCallback::CHIPWindowCoveringAttributeListAttributeCallback(jobject javaCallback, +CHIPBarrierControlAttributeListAttributeCallback::CHIPBarrierControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19184,7 +20171,7 @@ CHIPWindowCoveringAttributeListAttributeCallback::CHIPWindowCoveringAttributeLis } } -CHIPWindowCoveringAttributeListAttributeCallback::~CHIPWindowCoveringAttributeListAttributeCallback() +CHIPBarrierControlAttributeListAttributeCallback::~CHIPBarrierControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19195,7 +20182,7 @@ CHIPWindowCoveringAttributeListAttributeCallback::~CHIPWindowCoveringAttributeLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWindowCoveringAttributeListAttributeCallback::CallbackFn( +void CHIPBarrierControlAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -19205,8 +20192,8 @@ void CHIPWindowCoveringAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19223,22 +20210,223 @@ void CHIPWindowCoveringAttributeListAttributeCallback::CallbackFn( auto iter_arrayListObj_0 = list.begin(); while (iter_arrayListObj_0.Next()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxPressureAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::~CHIPPumpConfigurationAndControlMaxPressureAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CHIPPumpConfigurationAndControlMaxFlowAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::~CHIPPumpConfigurationAndControlMaxFlowAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBarrierControlGeneratedCommandListAttributeCallback::CHIPBarrierControlGeneratedCommandListAttributeCallback( +CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19255,7 +20443,8 @@ CHIPBarrierControlGeneratedCommandListAttributeCallback::CHIPBarrierControlGener } } -CHIPBarrierControlGeneratedCommandListAttributeCallback::~CHIPBarrierControlGeneratedCommandListAttributeCallback() +CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback:: + ~CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19266,8 +20455,8 @@ CHIPBarrierControlGeneratedCommandListAttributeCallback::~CHIPBarrierControlGene env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBarrierControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19275,9 +20464,8 @@ void CHIPBarrierControlGeneratedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19285,31 +20473,28 @@ void CHIPBarrierControlGeneratedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBarrierControlAcceptedCommandListAttributeCallback::CHIPBarrierControlAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19326,7 +20511,8 @@ CHIPBarrierControlAcceptedCommandListAttributeCallback::CHIPBarrierControlAccept } } -CHIPBarrierControlAcceptedCommandListAttributeCallback::~CHIPBarrierControlAcceptedCommandListAttributeCallback() +CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback:: + ~CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19337,8 +20523,8 @@ CHIPBarrierControlAcceptedCommandListAttributeCallback::~CHIPBarrierControlAccep env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBarrierControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19346,9 +20532,8 @@ void CHIPBarrierControlAcceptedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19356,30 +20541,29 @@ void CHIPBarrierControlAcceptedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBarrierControlEventListAttributeCallback::CHIPBarrierControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19395,7 +20579,7 @@ CHIPBarrierControlEventListAttributeCallback::CHIPBarrierControlEventListAttribu } } -CHIPBarrierControlEventListAttributeCallback::~CHIPBarrierControlEventListAttributeCallback() +CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::~CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19406,8 +20590,8 @@ CHIPBarrierControlEventListAttributeCallback::~CHIPBarrierControlEventListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBarrierControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19415,9 +20599,8 @@ void CHIPBarrierControlEventListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19425,31 +20608,28 @@ void CHIPBarrierControlEventListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBarrierControlAttributeListAttributeCallback::CHIPBarrierControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19466,7 +20646,7 @@ CHIPBarrierControlAttributeListAttributeCallback::CHIPBarrierControlAttributeLis } } -CHIPBarrierControlAttributeListAttributeCallback::~CHIPBarrierControlAttributeListAttributeCallback() +CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::~CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19477,8 +20657,8 @@ CHIPBarrierControlAttributeListAttributeCallback::~CHIPBarrierControlAttributeLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBarrierControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19486,9 +20666,8 @@ void CHIPBarrierControlAttributeListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19496,31 +20675,28 @@ void CHIPBarrierControlAttributeListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxPressureAttributeCallback( +CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19537,7 +20713,7 @@ CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CHIPPumpConfigurati } } -CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::~CHIPPumpConfigurationAndControlMaxPressureAttributeCallback() +CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19548,8 +20724,8 @@ CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::~CHIPPumpConfigurat env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19557,8 +20733,8 @@ void CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19578,16 +20754,16 @@ void CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CallbackFn(voi { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback( +CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19604,7 +20780,7 @@ CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CHIPPumpConfigurationA } } -CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback() +CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19615,8 +20791,8 @@ CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::~CHIPPumpConfiguration env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19624,8 +20800,8 @@ void CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19652,9 +20828,9 @@ void CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CallbackFn(void * env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CHIPPumpConfigurationAndControlMaxFlowAttributeCallback( +CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19671,7 +20847,7 @@ CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CHIPPumpConfigurationAn } } -CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::~CHIPPumpConfigurationAndControlMaxFlowAttributeCallback() +CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::~CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19682,8 +20858,8 @@ CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::~CHIPPumpConfigurationA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19691,8 +20867,8 @@ void CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19719,9 +20895,9 @@ void CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CallbackFn(void * env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback( +CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19738,8 +20914,7 @@ CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CHIPPumpConfig } } -CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback:: - ~CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback() +CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19750,8 +20925,8 @@ CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19759,8 +20934,8 @@ void CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19780,16 +20955,16 @@ void CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CallbackF { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback( +CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CHIPPumpConfigurationAndControlMinConstTempAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19806,8 +20981,7 @@ CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CHIPPumpConfig } } -CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback:: - ~CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback() +CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::~CHIPPumpConfigurationAndControlMinConstTempAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19818,8 +20992,8 @@ CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19827,8 +21001,8 @@ void CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19855,9 +21029,9 @@ void CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CallbackF env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback( +CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19874,7 +21048,7 @@ CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CHIPPumpConfigu } } -CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::~CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback() +CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19885,8 +21059,8 @@ CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::~CHIPPumpConfig env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19894,8 +21068,8 @@ void CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19922,9 +21096,9 @@ void CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback( +CHIPPumpConfigurationAndControlCapacityAttributeCallback::CHIPPumpConfigurationAndControlCapacityAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19941,7 +21115,7 @@ CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CHIPPumpConfigu } } -CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::~CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback() +CHIPPumpConfigurationAndControlCapacityAttributeCallback::~CHIPPumpConfigurationAndControlCapacityAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19952,8 +21126,8 @@ CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::~CHIPPumpConfig env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlCapacityAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19961,8 +21135,8 @@ void CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19989,9 +21163,9 @@ void CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPumpConfigurationAndControlSpeedAttributeCallback::CHIPPumpConfigurationAndControlSpeedAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20008,7 +21182,7 @@ CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CHIPPumpConfigura } } -CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback() +CHIPPumpConfigurationAndControlSpeedAttributeCallback::~CHIPPumpConfigurationAndControlSpeedAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20019,8 +21193,8 @@ CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::~CHIPPumpConfigur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlSpeedAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20028,8 +21202,8 @@ void CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20056,9 +21230,9 @@ void CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: + CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20075,7 +21249,8 @@ CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CHIPPumpConfigura } } -CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback() +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: + ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20086,8 +21261,8 @@ CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::~CHIPPumpConfigur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20095,8 +21270,8 @@ void CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20104,7 +21279,7 @@ void CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -20114,18 +21289,18 @@ void CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CallbackFn( } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPumpConfigurationAndControlPowerAttributeCallback::CHIPPumpConfigurationAndControlPowerAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20142,7 +21317,7 @@ CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CHIPPumpConfigurat } } -CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::~CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback() +CHIPPumpConfigurationAndControlPowerAttributeCallback::~CHIPPumpConfigurationAndControlPowerAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20153,8 +21328,8 @@ CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::~CHIPPumpConfigura env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlPowerAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20162,8 +21337,8 @@ void CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20171,7 +21346,7 @@ void CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -20181,18 +21356,18 @@ void CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CallbackFn( } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: + CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20209,7 +21384,8 @@ CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CHIPPumpConfigurat } } -CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback() +CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: + ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20220,8 +21396,8 @@ CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::~CHIPPumpConfigura env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20229,8 +21405,8 @@ void CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20238,7 +21414,7 @@ void CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -20248,18 +21424,18 @@ void CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CallbackFn( } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CHIPPumpConfigurationAndControlMinConstTempAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback:: + CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20276,7 +21452,8 @@ CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CHIPPumpConfigurat } } -CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::~CHIPPumpConfigurationAndControlMinConstTempAttributeCallback() +CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback:: + ~CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20287,8 +21464,8 @@ CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::~CHIPPumpConfigura env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20296,8 +21473,9 @@ void CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CallbackFn(vo jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20305,28 +21483,31 @@ void CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CallbackFn(vo ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback:: + CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20343,7 +21524,8 @@ CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CHIPPumpConfigurat } } -CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback() +CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback:: + ~CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20354,8 +21536,8 @@ CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::~CHIPPumpConfigura env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20363,8 +21545,9 @@ void CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CallbackFn(vo jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20372,28 +21555,31 @@ void CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CallbackFn(vo ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlCapacityAttributeCallback::CHIPPumpConfigurationAndControlCapacityAttributeCallback( +CHIPPumpConfigurationAndControlEventListAttributeCallback::CHIPPumpConfigurationAndControlEventListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20410,7 +21596,7 @@ CHIPPumpConfigurationAndControlCapacityAttributeCallback::CHIPPumpConfigurationA } } -CHIPPumpConfigurationAndControlCapacityAttributeCallback::~CHIPPumpConfigurationAndControlCapacityAttributeCallback() +CHIPPumpConfigurationAndControlEventListAttributeCallback::~CHIPPumpConfigurationAndControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20421,8 +21607,8 @@ CHIPPumpConfigurationAndControlCapacityAttributeCallback::~CHIPPumpConfiguration env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlCapacityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20430,8 +21616,9 @@ void CHIPPumpConfigurationAndControlCapacityAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20439,28 +21626,31 @@ void CHIPPumpConfigurationAndControlCapacityAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlSpeedAttributeCallback::CHIPPumpConfigurationAndControlSpeedAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPumpConfigurationAndControlAttributeListAttributeCallback::CHIPPumpConfigurationAndControlAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20477,7 +21667,7 @@ CHIPPumpConfigurationAndControlSpeedAttributeCallback::CHIPPumpConfigurationAndC } } -CHIPPumpConfigurationAndControlSpeedAttributeCallback::~CHIPPumpConfigurationAndControlSpeedAttributeCallback() +CHIPPumpConfigurationAndControlAttributeListAttributeCallback::~CHIPPumpConfigurationAndControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20488,8 +21678,8 @@ CHIPPumpConfigurationAndControlSpeedAttributeCallback::~CHIPPumpConfigurationAnd env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlSpeedAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20497,8 +21687,9 @@ void CHIPPumpConfigurationAndControlSpeedAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20506,28 +21697,31 @@ void CHIPPumpConfigurationAndControlSpeedAttributeCallback::CallbackFn(void * co ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: - CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatLocalTemperatureAttributeCallback::CHIPThermostatLocalTemperatureAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20544,8 +21738,7 @@ CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: } } -CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: - ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback() +CHIPThermostatLocalTemperatureAttributeCallback::~CHIPThermostatLocalTemperatureAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20556,8 +21749,8 @@ CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPThermostatLocalTemperatureAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20565,8 +21758,8 @@ void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::Callb jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20574,7 +21767,7 @@ void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::Callb ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -20584,18 +21777,18 @@ void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::Callb } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlPowerAttributeCallback::CHIPPumpConfigurationAndControlPowerAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatOutdoorTemperatureAttributeCallback::CHIPThermostatOutdoorTemperatureAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20612,7 +21805,7 @@ CHIPPumpConfigurationAndControlPowerAttributeCallback::CHIPPumpConfigurationAndC } } -CHIPPumpConfigurationAndControlPowerAttributeCallback::~CHIPPumpConfigurationAndControlPowerAttributeCallback() +CHIPThermostatOutdoorTemperatureAttributeCallback::~CHIPThermostatOutdoorTemperatureAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20623,8 +21816,8 @@ CHIPPumpConfigurationAndControlPowerAttributeCallback::~CHIPPumpConfigurationAnd env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlPowerAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThermostatOutdoorTemperatureAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20632,8 +21825,8 @@ void CHIPPumpConfigurationAndControlPowerAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20641,7 +21834,7 @@ void CHIPPumpConfigurationAndControlPowerAttributeCallback::CallbackFn(void * co ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -20651,18 +21844,18 @@ void CHIPPumpConfigurationAndControlPowerAttributeCallback::CallbackFn(void * co } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: - CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20679,8 +21872,7 @@ CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: } } -CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: - ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback() +CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::~CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20691,8 +21883,8 @@ CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20700,8 +21892,8 @@ void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::Cal jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20709,7 +21901,7 @@ void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::Cal ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -20719,18 +21911,18 @@ void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::Cal } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback:: - CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatSetpointChangeAmountAttributeCallback::CHIPThermostatSetpointChangeAmountAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20747,8 +21939,7 @@ CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback:: } } -CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback:: - ~CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback() +CHIPThermostatSetpointChangeAmountAttributeCallback::~CHIPThermostatSetpointChangeAmountAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20759,8 +21950,8 @@ CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPThermostatSetpointChangeAmountAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20768,9 +21959,8 @@ void CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback::Callb jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20778,31 +21968,28 @@ void CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback::Callb ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback:: - CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatOccupiedSetbackAttributeCallback::CHIPThermostatOccupiedSetbackAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20819,8 +22006,7 @@ CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback:: } } -CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback:: - ~CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback() +CHIPThermostatOccupiedSetbackAttributeCallback::~CHIPThermostatOccupiedSetbackAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20831,8 +22017,8 @@ CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPThermostatOccupiedSetbackAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20840,9 +22026,8 @@ void CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback::Callba jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20850,31 +22035,28 @@ void CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback::Callba ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlEventListAttributeCallback::CHIPPumpConfigurationAndControlEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatOccupiedSetbackMinAttributeCallback::CHIPThermostatOccupiedSetbackMinAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20891,7 +22073,7 @@ CHIPPumpConfigurationAndControlEventListAttributeCallback::CHIPPumpConfiguration } } -CHIPPumpConfigurationAndControlEventListAttributeCallback::~CHIPPumpConfigurationAndControlEventListAttributeCallback() +CHIPThermostatOccupiedSetbackMinAttributeCallback::~CHIPThermostatOccupiedSetbackMinAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20902,8 +22084,8 @@ CHIPPumpConfigurationAndControlEventListAttributeCallback::~CHIPPumpConfiguratio env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPThermostatOccupiedSetbackMinAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20911,9 +22093,8 @@ void CHIPPumpConfigurationAndControlEventListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20921,31 +22102,28 @@ void CHIPPumpConfigurationAndControlEventListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPumpConfigurationAndControlAttributeListAttributeCallback::CHIPPumpConfigurationAndControlAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatOccupiedSetbackMaxAttributeCallback::CHIPThermostatOccupiedSetbackMaxAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20962,7 +22140,7 @@ CHIPPumpConfigurationAndControlAttributeListAttributeCallback::CHIPPumpConfigura } } -CHIPPumpConfigurationAndControlAttributeListAttributeCallback::~CHIPPumpConfigurationAndControlAttributeListAttributeCallback() +CHIPThermostatOccupiedSetbackMaxAttributeCallback::~CHIPThermostatOccupiedSetbackMaxAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20973,8 +22151,8 @@ CHIPPumpConfigurationAndControlAttributeListAttributeCallback::~CHIPPumpConfigur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPThermostatOccupiedSetbackMaxAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20982,9 +22160,8 @@ void CHIPPumpConfigurationAndControlAttributeListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20992,31 +22169,28 @@ void CHIPPumpConfigurationAndControlAttributeListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThermostatLocalTemperatureAttributeCallback::CHIPThermostatLocalTemperatureAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatUnoccupiedSetbackAttributeCallback::CHIPThermostatUnoccupiedSetbackAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21033,7 +22207,7 @@ CHIPThermostatLocalTemperatureAttributeCallback::CHIPThermostatLocalTemperatureA } } -CHIPThermostatLocalTemperatureAttributeCallback::~CHIPThermostatLocalTemperatureAttributeCallback() +CHIPThermostatUnoccupiedSetbackAttributeCallback::~CHIPThermostatUnoccupiedSetbackAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21044,8 +22218,8 @@ CHIPThermostatLocalTemperatureAttributeCallback::~CHIPThermostatLocalTemperature env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatLocalTemperatureAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThermostatUnoccupiedSetbackAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21053,8 +22227,8 @@ void CHIPThermostatLocalTemperatureAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21074,16 +22248,16 @@ void CHIPThermostatLocalTemperatureAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThermostatOutdoorTemperatureAttributeCallback::CHIPThermostatOutdoorTemperatureAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatUnoccupiedSetbackMinAttributeCallback::CHIPThermostatUnoccupiedSetbackMinAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21100,7 +22274,7 @@ CHIPThermostatOutdoorTemperatureAttributeCallback::CHIPThermostatOutdoorTemperat } } -CHIPThermostatOutdoorTemperatureAttributeCallback::~CHIPThermostatOutdoorTemperatureAttributeCallback() +CHIPThermostatUnoccupiedSetbackMinAttributeCallback::~CHIPThermostatUnoccupiedSetbackMinAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21111,8 +22285,8 @@ CHIPThermostatOutdoorTemperatureAttributeCallback::~CHIPThermostatOutdoorTempera env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatOutdoorTemperatureAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThermostatUnoccupiedSetbackMinAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21120,8 +22294,8 @@ void CHIPThermostatOutdoorTemperatureAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21141,16 +22315,16 @@ void CHIPThermostatOutdoorTemperatureAttributeCallback::CallbackFn(void * contex { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::CHIPThermostatUnoccupiedSetbackMaxAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21167,7 +22341,7 @@ CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::CHIPThermostatTe } } -CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::~CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback() +CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::~CHIPThermostatUnoccupiedSetbackMaxAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21178,8 +22352,8 @@ CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::~CHIPThermostatT env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21187,8 +22361,8 @@ void CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21208,16 +22382,16 @@ void CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThermostatSetpointChangeAmountAttributeCallback::CHIPThermostatSetpointChangeAmountAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatACCoilTemperatureAttributeCallback::CHIPThermostatACCoilTemperatureAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21234,7 +22408,7 @@ CHIPThermostatSetpointChangeAmountAttributeCallback::CHIPThermostatSetpointChang } } -CHIPThermostatSetpointChangeAmountAttributeCallback::~CHIPThermostatSetpointChangeAmountAttributeCallback() +CHIPThermostatACCoilTemperatureAttributeCallback::~CHIPThermostatACCoilTemperatureAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21245,8 +22419,8 @@ CHIPThermostatSetpointChangeAmountAttributeCallback::~CHIPThermostatSetpointChan env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatSetpointChangeAmountAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThermostatACCoilTemperatureAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21254,8 +22428,8 @@ void CHIPThermostatSetpointChangeAmountAttributeCallback::CallbackFn(void * cont jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21282,9 +22456,9 @@ void CHIPThermostatSetpointChangeAmountAttributeCallback::CallbackFn(void * cont env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThermostatOccupiedSetbackAttributeCallback::CHIPThermostatOccupiedSetbackAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatGeneratedCommandListAttributeCallback::CHIPThermostatGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21301,7 +22475,7 @@ CHIPThermostatOccupiedSetbackAttributeCallback::CHIPThermostatOccupiedSetbackAtt } } -CHIPThermostatOccupiedSetbackAttributeCallback::~CHIPThermostatOccupiedSetbackAttributeCallback() +CHIPThermostatGeneratedCommandListAttributeCallback::~CHIPThermostatGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21312,8 +22486,8 @@ CHIPThermostatOccupiedSetbackAttributeCallback::~CHIPThermostatOccupiedSetbackAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatOccupiedSetbackAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThermostatGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21321,8 +22495,9 @@ void CHIPThermostatOccupiedSetbackAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21330,28 +22505,31 @@ void CHIPThermostatOccupiedSetbackAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThermostatOccupiedSetbackMinAttributeCallback::CHIPThermostatOccupiedSetbackMinAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatAcceptedCommandListAttributeCallback::CHIPThermostatAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21368,7 +22546,7 @@ CHIPThermostatOccupiedSetbackMinAttributeCallback::CHIPThermostatOccupiedSetback } } -CHIPThermostatOccupiedSetbackMinAttributeCallback::~CHIPThermostatOccupiedSetbackMinAttributeCallback() +CHIPThermostatAcceptedCommandListAttributeCallback::~CHIPThermostatAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21379,8 +22557,8 @@ CHIPThermostatOccupiedSetbackMinAttributeCallback::~CHIPThermostatOccupiedSetbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatOccupiedSetbackMinAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThermostatAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21388,8 +22566,9 @@ void CHIPThermostatOccupiedSetbackMinAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21397,29 +22576,30 @@ void CHIPThermostatOccupiedSetbackMinAttributeCallback::CallbackFn(void * contex ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThermostatOccupiedSetbackMaxAttributeCallback::CHIPThermostatOccupiedSetbackMaxAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPThermostatEventListAttributeCallback::CHIPThermostatEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21435,7 +22615,7 @@ CHIPThermostatOccupiedSetbackMaxAttributeCallback::CHIPThermostatOccupiedSetback } } -CHIPThermostatOccupiedSetbackMaxAttributeCallback::~CHIPThermostatOccupiedSetbackMaxAttributeCallback() +CHIPThermostatEventListAttributeCallback::~CHIPThermostatEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21446,8 +22626,8 @@ CHIPThermostatOccupiedSetbackMaxAttributeCallback::~CHIPThermostatOccupiedSetbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatOccupiedSetbackMaxAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThermostatEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21455,8 +22635,9 @@ void CHIPThermostatOccupiedSetbackMaxAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21464,29 +22645,30 @@ void CHIPThermostatOccupiedSetbackMaxAttributeCallback::CallbackFn(void * contex ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThermostatUnoccupiedSetbackAttributeCallback::CHIPThermostatUnoccupiedSetbackAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPThermostatAttributeListAttributeCallback::CHIPThermostatAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21502,7 +22684,7 @@ CHIPThermostatUnoccupiedSetbackAttributeCallback::CHIPThermostatUnoccupiedSetbac } } -CHIPThermostatUnoccupiedSetbackAttributeCallback::~CHIPThermostatUnoccupiedSetbackAttributeCallback() +CHIPThermostatAttributeListAttributeCallback::~CHIPThermostatAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21513,8 +22695,8 @@ CHIPThermostatUnoccupiedSetbackAttributeCallback::~CHIPThermostatUnoccupiedSetba env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatUnoccupiedSetbackAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThermostatAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21522,8 +22704,9 @@ void CHIPThermostatUnoccupiedSetbackAttributeCallback::CallbackFn(void * context jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21531,29 +22714,30 @@ void CHIPThermostatUnoccupiedSetbackAttributeCallback::CallbackFn(void * context ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThermostatUnoccupiedSetbackMinAttributeCallback::CHIPThermostatUnoccupiedSetbackMinAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPFanControlPercentSettingAttributeCallback::CHIPFanControlPercentSettingAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21569,7 +22753,7 @@ CHIPThermostatUnoccupiedSetbackMinAttributeCallback::CHIPThermostatUnoccupiedSet } } -CHIPThermostatUnoccupiedSetbackMinAttributeCallback::~CHIPThermostatUnoccupiedSetbackMinAttributeCallback() +CHIPFanControlPercentSettingAttributeCallback::~CHIPFanControlPercentSettingAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21580,8 +22764,8 @@ CHIPThermostatUnoccupiedSetbackMinAttributeCallback::~CHIPThermostatUnoccupiedSe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatUnoccupiedSetbackMinAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPFanControlPercentSettingAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21589,8 +22773,8 @@ void CHIPThermostatUnoccupiedSetbackMinAttributeCallback::CallbackFn(void * cont jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21617,10 +22801,8 @@ void CHIPThermostatUnoccupiedSetbackMinAttributeCallback::CallbackFn(void * cont env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::CHIPThermostatUnoccupiedSetbackMaxAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPFanControlSpeedSettingAttributeCallback::CHIPFanControlSpeedSettingAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21636,7 +22818,7 @@ CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::CHIPThermostatUnoccupiedSet } } -CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::~CHIPThermostatUnoccupiedSetbackMaxAttributeCallback() +CHIPFanControlSpeedSettingAttributeCallback::~CHIPFanControlSpeedSettingAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21647,8 +22829,7 @@ CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::~CHIPThermostatUnoccupiedSe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPFanControlSpeedSettingAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21656,8 +22837,8 @@ void CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::CallbackFn(void * cont jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21684,9 +22865,9 @@ void CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::CallbackFn(void * cont env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThermostatACCoilTemperatureAttributeCallback::CHIPThermostatACCoilTemperatureAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFanControlGeneratedCommandListAttributeCallback::CHIPFanControlGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21703,7 +22884,7 @@ CHIPThermostatACCoilTemperatureAttributeCallback::CHIPThermostatACCoilTemperatur } } -CHIPThermostatACCoilTemperatureAttributeCallback::~CHIPThermostatACCoilTemperatureAttributeCallback() +CHIPFanControlGeneratedCommandListAttributeCallback::~CHIPFanControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21714,8 +22895,8 @@ CHIPThermostatACCoilTemperatureAttributeCallback::~CHIPThermostatACCoilTemperatu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatACCoilTemperatureAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPFanControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21723,8 +22904,9 @@ void CHIPThermostatACCoilTemperatureAttributeCallback::CallbackFn(void * context jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21732,28 +22914,31 @@ void CHIPThermostatACCoilTemperatureAttributeCallback::CallbackFn(void * context ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThermostatGeneratedCommandListAttributeCallback::CHIPThermostatGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFanControlAcceptedCommandListAttributeCallback::CHIPFanControlAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21770,7 +22955,7 @@ CHIPThermostatGeneratedCommandListAttributeCallback::CHIPThermostatGeneratedComm } } -CHIPThermostatGeneratedCommandListAttributeCallback::~CHIPThermostatGeneratedCommandListAttributeCallback() +CHIPFanControlAcceptedCommandListAttributeCallback::~CHIPFanControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21781,7 +22966,7 @@ CHIPThermostatGeneratedCommandListAttributeCallback::~CHIPThermostatGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPFanControlAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21791,8 +22976,8 @@ void CHIPThermostatGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21822,10 +23007,8 @@ void CHIPThermostatGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThermostatAcceptedCommandListAttributeCallback::CHIPThermostatAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPFanControlEventListAttributeCallback::CHIPFanControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21841,7 +23024,7 @@ CHIPThermostatAcceptedCommandListAttributeCallback::CHIPThermostatAcceptedComman } } -CHIPThermostatAcceptedCommandListAttributeCallback::~CHIPThermostatAcceptedCommandListAttributeCallback() +CHIPFanControlEventListAttributeCallback::~CHIPFanControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21852,8 +23035,8 @@ CHIPThermostatAcceptedCommandListAttributeCallback::~CHIPThermostatAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPFanControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21862,8 +23045,8 @@ void CHIPThermostatAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21893,8 +23076,8 @@ void CHIPThermostatAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThermostatEventListAttributeCallback::CHIPThermostatEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPFanControlAttributeListAttributeCallback::CHIPFanControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21910,7 +23093,7 @@ CHIPThermostatEventListAttributeCallback::CHIPThermostatEventListAttributeCallba } } -CHIPThermostatEventListAttributeCallback::~CHIPThermostatEventListAttributeCallback() +CHIPFanControlAttributeListAttributeCallback::~CHIPFanControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21921,8 +23104,8 @@ CHIPThermostatEventListAttributeCallback::~CHIPThermostatEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPFanControlAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21931,8 +23114,8 @@ void CHIPThermostatEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21962,8 +23145,11 @@ void CHIPThermostatEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThermostatAttributeListAttributeCallback::CHIPThermostatAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback:: + CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21979,7 +23165,8 @@ CHIPThermostatAttributeListAttributeCallback::CHIPThermostatAttributeListAttribu } } -CHIPThermostatAttributeListAttributeCallback::~CHIPThermostatAttributeListAttributeCallback() +CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback:: + ~CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21990,8 +23177,8 @@ CHIPThermostatAttributeListAttributeCallback::~CHIPThermostatAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22000,8 +23187,9 @@ void CHIPThermostatAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22031,8 +23219,11 @@ void CHIPThermostatAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFanControlPercentSettingAttributeCallback::CHIPFanControlPercentSettingAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback:: + CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22048,7 +23239,8 @@ CHIPFanControlPercentSettingAttributeCallback::CHIPFanControlPercentSettingAttri } } -CHIPFanControlPercentSettingAttributeCallback::~CHIPFanControlPercentSettingAttributeCallback() +CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback:: + ~CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22059,8 +23251,8 @@ CHIPFanControlPercentSettingAttributeCallback::~CHIPFanControlPercentSettingAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFanControlPercentSettingAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22068,8 +23260,10 @@ void CHIPFanControlPercentSettingAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22077,27 +23271,32 @@ void CHIPFanControlPercentSettingAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFanControlSpeedSettingAttributeCallback::CHIPFanControlSpeedSettingAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback:: + CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22113,7 +23312,8 @@ CHIPFanControlSpeedSettingAttributeCallback::CHIPFanControlSpeedSettingAttribute } } -CHIPFanControlSpeedSettingAttributeCallback::~CHIPFanControlSpeedSettingAttributeCallback() +CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback:: + ~CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22124,7 +23324,8 @@ CHIPFanControlSpeedSettingAttributeCallback::~CHIPFanControlSpeedSettingAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFanControlSpeedSettingAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22132,8 +23333,9 @@ void CHIPFanControlSpeedSettingAttributeCallback::CallbackFn(void * context, con jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22141,28 +23343,31 @@ void CHIPFanControlSpeedSettingAttributeCallback::CallbackFn(void * context, con ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFanControlGeneratedCommandListAttributeCallback::CHIPFanControlGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback:: + CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22179,7 +23384,8 @@ CHIPFanControlGeneratedCommandListAttributeCallback::CHIPFanControlGeneratedComm } } -CHIPFanControlGeneratedCommandListAttributeCallback::~CHIPFanControlGeneratedCommandListAttributeCallback() +CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback:: + ~CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22190,8 +23396,8 @@ CHIPFanControlGeneratedCommandListAttributeCallback::~CHIPFanControlGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFanControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22200,8 +23406,8 @@ void CHIPFanControlGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22231,9 +23437,9 @@ void CHIPFanControlGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFanControlAcceptedCommandListAttributeCallback::CHIPFanControlAcceptedCommandListAttributeCallback(jobject javaCallback, +CHIPColorControlNumberOfPrimariesAttributeCallback::CHIPColorControlNumberOfPrimariesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22250,7 +23456,7 @@ CHIPFanControlAcceptedCommandListAttributeCallback::CHIPFanControlAcceptedComman } } -CHIPFanControlAcceptedCommandListAttributeCallback::~CHIPFanControlAcceptedCommandListAttributeCallback() +CHIPColorControlNumberOfPrimariesAttributeCallback::~CHIPColorControlNumberOfPrimariesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22261,8 +23467,8 @@ CHIPFanControlAcceptedCommandListAttributeCallback::~CHIPFanControlAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFanControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPColorControlNumberOfPrimariesAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22270,9 +23476,8 @@ void CHIPFanControlAcceptedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22280,30 +23485,29 @@ void CHIPFanControlAcceptedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPFanControlEventListAttributeCallback::CHIPFanControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPColorControlPrimary1IntensityAttributeCallback::CHIPColorControlPrimary1IntensityAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22319,7 +23523,7 @@ CHIPFanControlEventListAttributeCallback::CHIPFanControlEventListAttributeCallba } } -CHIPFanControlEventListAttributeCallback::~CHIPFanControlEventListAttributeCallback() +CHIPColorControlPrimary1IntensityAttributeCallback::~CHIPColorControlPrimary1IntensityAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22330,8 +23534,8 @@ CHIPFanControlEventListAttributeCallback::~CHIPFanControlEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFanControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPColorControlPrimary1IntensityAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22339,9 +23543,8 @@ void CHIPFanControlEventListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22349,30 +23552,29 @@ void CHIPFanControlEventListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPFanControlAttributeListAttributeCallback::CHIPFanControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPColorControlPrimary2IntensityAttributeCallback::CHIPColorControlPrimary2IntensityAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22388,7 +23590,7 @@ CHIPFanControlAttributeListAttributeCallback::CHIPFanControlAttributeListAttribu } } -CHIPFanControlAttributeListAttributeCallback::~CHIPFanControlAttributeListAttributeCallback() +CHIPColorControlPrimary2IntensityAttributeCallback::~CHIPColorControlPrimary2IntensityAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22399,8 +23601,8 @@ CHIPFanControlAttributeListAttributeCallback::~CHIPFanControlAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFanControlAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPColorControlPrimary2IntensityAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22408,9 +23610,8 @@ void CHIPFanControlAttributeListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22418,32 +23619,28 @@ void CHIPFanControlAttributeListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback:: - CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPColorControlPrimary3IntensityAttributeCallback::CHIPColorControlPrimary3IntensityAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22460,8 +23657,7 @@ CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback:: } } -CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback:: - ~CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback() +CHIPColorControlPrimary3IntensityAttributeCallback::~CHIPColorControlPrimary3IntensityAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22472,8 +23668,8 @@ CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPColorControlPrimary3IntensityAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22481,10 +23677,8 @@ void CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallba jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22492,32 +23686,28 @@ void CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallba ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback:: - CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPColorControlPrimary4IntensityAttributeCallback::CHIPColorControlPrimary4IntensityAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22534,8 +23724,7 @@ CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback:: } } -CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback:: - ~CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback() +CHIPColorControlPrimary4IntensityAttributeCallback::~CHIPColorControlPrimary4IntensityAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22546,8 +23735,8 @@ CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPColorControlPrimary4IntensityAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22555,10 +23744,8 @@ void CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22566,31 +23753,28 @@ void CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallbac ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback:: - CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPColorControlPrimary5IntensityAttributeCallback::CHIPColorControlPrimary5IntensityAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22607,8 +23791,7 @@ CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback:: } } -CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback:: - ~CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback() +CHIPColorControlPrimary5IntensityAttributeCallback::~CHIPColorControlPrimary5IntensityAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22619,8 +23802,8 @@ CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPColorControlPrimary5IntensityAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22628,9 +23811,8 @@ void CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback::Callbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22638,31 +23820,28 @@ void CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback::Callbac ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback:: - CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPColorControlPrimary6IntensityAttributeCallback::CHIPColorControlPrimary6IntensityAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22679,8 +23858,7 @@ CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback:: } } -CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback:: - ~CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback() +CHIPColorControlPrimary6IntensityAttributeCallback::~CHIPColorControlPrimary6IntensityAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22691,8 +23869,8 @@ CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPColorControlPrimary6IntensityAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22700,9 +23878,8 @@ void CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback::Cal jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22710,31 +23887,28 @@ void CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback::Cal ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPColorControlNumberOfPrimariesAttributeCallback::CHIPColorControlNumberOfPrimariesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPColorControlColorPointRIntensityAttributeCallback::CHIPColorControlColorPointRIntensityAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22751,7 +23925,7 @@ CHIPColorControlNumberOfPrimariesAttributeCallback::CHIPColorControlNumberOfPrim } } -CHIPColorControlNumberOfPrimariesAttributeCallback::~CHIPColorControlNumberOfPrimariesAttributeCallback() +CHIPColorControlColorPointRIntensityAttributeCallback::~CHIPColorControlColorPointRIntensityAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22762,8 +23936,8 @@ CHIPColorControlNumberOfPrimariesAttributeCallback::~CHIPColorControlNumberOfPri env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlNumberOfPrimariesAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPColorControlColorPointRIntensityAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22771,8 +23945,8 @@ void CHIPColorControlNumberOfPrimariesAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22799,9 +23973,9 @@ void CHIPColorControlNumberOfPrimariesAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPColorControlPrimary1IntensityAttributeCallback::CHIPColorControlPrimary1IntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPColorControlColorPointGIntensityAttributeCallback::CHIPColorControlColorPointGIntensityAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22818,7 +23992,7 @@ CHIPColorControlPrimary1IntensityAttributeCallback::CHIPColorControlPrimary1Inte } } -CHIPColorControlPrimary1IntensityAttributeCallback::~CHIPColorControlPrimary1IntensityAttributeCallback() +CHIPColorControlColorPointGIntensityAttributeCallback::~CHIPColorControlColorPointGIntensityAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22829,8 +24003,8 @@ CHIPColorControlPrimary1IntensityAttributeCallback::~CHIPColorControlPrimary1Int env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlPrimary1IntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPColorControlColorPointGIntensityAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22838,8 +24012,8 @@ void CHIPColorControlPrimary1IntensityAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22866,9 +24040,9 @@ void CHIPColorControlPrimary1IntensityAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPColorControlPrimary2IntensityAttributeCallback::CHIPColorControlPrimary2IntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPColorControlColorPointBIntensityAttributeCallback::CHIPColorControlColorPointBIntensityAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22885,7 +24059,7 @@ CHIPColorControlPrimary2IntensityAttributeCallback::CHIPColorControlPrimary2Inte } } -CHIPColorControlPrimary2IntensityAttributeCallback::~CHIPColorControlPrimary2IntensityAttributeCallback() +CHIPColorControlColorPointBIntensityAttributeCallback::~CHIPColorControlColorPointBIntensityAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22896,8 +24070,8 @@ CHIPColorControlPrimary2IntensityAttributeCallback::~CHIPColorControlPrimary2Int env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlPrimary2IntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPColorControlColorPointBIntensityAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22905,8 +24079,8 @@ void CHIPColorControlPrimary2IntensityAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22933,9 +24107,9 @@ void CHIPColorControlPrimary2IntensityAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPColorControlPrimary3IntensityAttributeCallback::CHIPColorControlPrimary3IntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22952,7 +24126,7 @@ CHIPColorControlPrimary3IntensityAttributeCallback::CHIPColorControlPrimary3Inte } } -CHIPColorControlPrimary3IntensityAttributeCallback::~CHIPColorControlPrimary3IntensityAttributeCallback() +CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::~CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22963,8 +24137,8 @@ CHIPColorControlPrimary3IntensityAttributeCallback::~CHIPColorControlPrimary3Int env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlPrimary3IntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22972,8 +24146,8 @@ void CHIPColorControlPrimary3IntensityAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22993,16 +24167,16 @@ void CHIPColorControlPrimary3IntensityAttributeCallback::CallbackFn(void * conte { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPColorControlPrimary4IntensityAttributeCallback::CHIPColorControlPrimary4IntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPColorControlGeneratedCommandListAttributeCallback::CHIPColorControlGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23019,7 +24193,7 @@ CHIPColorControlPrimary4IntensityAttributeCallback::CHIPColorControlPrimary4Inte } } -CHIPColorControlPrimary4IntensityAttributeCallback::~CHIPColorControlPrimary4IntensityAttributeCallback() +CHIPColorControlGeneratedCommandListAttributeCallback::~CHIPColorControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23030,8 +24204,8 @@ CHIPColorControlPrimary4IntensityAttributeCallback::~CHIPColorControlPrimary4Int env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlPrimary4IntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPColorControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23039,8 +24213,9 @@ void CHIPColorControlPrimary4IntensityAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23048,28 +24223,31 @@ void CHIPColorControlPrimary4IntensityAttributeCallback::CallbackFn(void * conte ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPColorControlPrimary5IntensityAttributeCallback::CHIPColorControlPrimary5IntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPColorControlAcceptedCommandListAttributeCallback::CHIPColorControlAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23086,7 +24264,7 @@ CHIPColorControlPrimary5IntensityAttributeCallback::CHIPColorControlPrimary5Inte } } -CHIPColorControlPrimary5IntensityAttributeCallback::~CHIPColorControlPrimary5IntensityAttributeCallback() +CHIPColorControlAcceptedCommandListAttributeCallback::~CHIPColorControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23097,8 +24275,8 @@ CHIPColorControlPrimary5IntensityAttributeCallback::~CHIPColorControlPrimary5Int env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlPrimary5IntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPColorControlAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23106,8 +24284,9 @@ void CHIPColorControlPrimary5IntensityAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23115,29 +24294,30 @@ void CHIPColorControlPrimary5IntensityAttributeCallback::CallbackFn(void * conte ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPColorControlPrimary6IntensityAttributeCallback::CHIPColorControlPrimary6IntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPColorControlEventListAttributeCallback::CHIPColorControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23153,7 +24333,7 @@ CHIPColorControlPrimary6IntensityAttributeCallback::CHIPColorControlPrimary6Inte } } -CHIPColorControlPrimary6IntensityAttributeCallback::~CHIPColorControlPrimary6IntensityAttributeCallback() +CHIPColorControlEventListAttributeCallback::~CHIPColorControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23164,8 +24344,8 @@ CHIPColorControlPrimary6IntensityAttributeCallback::~CHIPColorControlPrimary6Int env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlPrimary6IntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPColorControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23173,8 +24353,9 @@ void CHIPColorControlPrimary6IntensityAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23182,28 +24363,31 @@ void CHIPColorControlPrimary6IntensityAttributeCallback::CallbackFn(void * conte ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPColorControlColorPointRIntensityAttributeCallback::CHIPColorControlColorPointRIntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPColorControlAttributeListAttributeCallback::CHIPColorControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23220,7 +24404,7 @@ CHIPColorControlColorPointRIntensityAttributeCallback::CHIPColorControlColorPoin } } -CHIPColorControlColorPointRIntensityAttributeCallback::~CHIPColorControlColorPointRIntensityAttributeCallback() +CHIPColorControlAttributeListAttributeCallback::~CHIPColorControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23231,8 +24415,8 @@ CHIPColorControlColorPointRIntensityAttributeCallback::~CHIPColorControlColorPoi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlColorPointRIntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPColorControlAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23240,8 +24424,9 @@ void CHIPColorControlColorPointRIntensityAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23249,28 +24434,31 @@ void CHIPColorControlColorPointRIntensityAttributeCallback::CallbackFn(void * co ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPColorControlColorPointGIntensityAttributeCallback::CHIPColorControlColorPointGIntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23287,7 +24475,7 @@ CHIPColorControlColorPointGIntensityAttributeCallback::CHIPColorControlColorPoin } } -CHIPColorControlColorPointGIntensityAttributeCallback::~CHIPColorControlColorPointGIntensityAttributeCallback() +CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::~CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23298,8 +24486,8 @@ CHIPColorControlColorPointGIntensityAttributeCallback::~CHIPColorControlColorPoi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlColorPointGIntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23307,8 +24495,8 @@ void CHIPColorControlColorPointGIntensityAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23335,9 +24523,9 @@ void CHIPColorControlColorPointGIntensityAttributeCallback::CallbackFn(void * co env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPColorControlColorPointBIntensityAttributeCallback::CHIPColorControlColorPointBIntensityAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23354,7 +24542,8 @@ CHIPColorControlColorPointBIntensityAttributeCallback::CHIPColorControlColorPoin } } -CHIPColorControlColorPointBIntensityAttributeCallback::~CHIPColorControlColorPointBIntensityAttributeCallback() +CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback:: + ~CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23365,8 +24554,8 @@ CHIPColorControlColorPointBIntensityAttributeCallback::~CHIPColorControlColorPoi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlColorPointBIntensityAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23374,8 +24563,8 @@ void CHIPColorControlColorPointBIntensityAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23402,9 +24591,9 @@ void CHIPColorControlColorPointBIntensityAttributeCallback::CallbackFn(void * co env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback( +CHIPBallastConfigurationLampRatedHoursAttributeCallback::CHIPBallastConfigurationLampRatedHoursAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23421,7 +24610,7 @@ CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CHIPColorControl } } -CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::~CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback() +CHIPBallastConfigurationLampRatedHoursAttributeCallback::~CHIPBallastConfigurationLampRatedHoursAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23432,8 +24621,8 @@ CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::~CHIPColorContro env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPBallastConfigurationLampRatedHoursAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23441,8 +24630,8 @@ void CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23450,7 +24639,7 @@ void CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -23460,18 +24649,18 @@ void CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CallbackFn( } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPColorControlGeneratedCommandListAttributeCallback::CHIPColorControlGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBallastConfigurationLampBurnHoursAttributeCallback::CHIPBallastConfigurationLampBurnHoursAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23488,7 +24677,7 @@ CHIPColorControlGeneratedCommandListAttributeCallback::CHIPColorControlGenerated } } -CHIPColorControlGeneratedCommandListAttributeCallback::~CHIPColorControlGeneratedCommandListAttributeCallback() +CHIPBallastConfigurationLampBurnHoursAttributeCallback::~CHIPBallastConfigurationLampBurnHoursAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23499,8 +24688,8 @@ CHIPColorControlGeneratedCommandListAttributeCallback::~CHIPColorControlGenerate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBallastConfigurationLampBurnHoursAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23508,9 +24697,8 @@ void CHIPColorControlGeneratedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23518,31 +24706,28 @@ void CHIPColorControlGeneratedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPColorControlAcceptedCommandListAttributeCallback::CHIPColorControlAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23559,7 +24744,7 @@ CHIPColorControlAcceptedCommandListAttributeCallback::CHIPColorControlAcceptedCo } } -CHIPColorControlAcceptedCommandListAttributeCallback::~CHIPColorControlAcceptedCommandListAttributeCallback() +CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::~CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23570,8 +24755,8 @@ CHIPColorControlAcceptedCommandListAttributeCallback::~CHIPColorControlAcceptedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23579,9 +24764,8 @@ void CHIPColorControlAcceptedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23589,30 +24773,29 @@ void CHIPColorControlAcceptedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPColorControlEventListAttributeCallback::CHIPColorControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CHIPBallastConfigurationGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23628,7 +24811,7 @@ CHIPColorControlEventListAttributeCallback::CHIPColorControlEventListAttributeCa } } -CHIPColorControlEventListAttributeCallback::~CHIPColorControlEventListAttributeCallback() +CHIPBallastConfigurationGeneratedCommandListAttributeCallback::~CHIPBallastConfigurationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23639,8 +24822,8 @@ CHIPColorControlEventListAttributeCallback::~CHIPColorControlEventListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23649,8 +24832,8 @@ void CHIPColorControlEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23680,9 +24863,9 @@ void CHIPColorControlEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPColorControlAttributeListAttributeCallback::CHIPColorControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CHIPBallastConfigurationAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23699,7 +24882,7 @@ CHIPColorControlAttributeListAttributeCallback::CHIPColorControlAttributeListAtt } } -CHIPColorControlAttributeListAttributeCallback::~CHIPColorControlAttributeListAttributeCallback() +CHIPBallastConfigurationAcceptedCommandListAttributeCallback::~CHIPBallastConfigurationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23710,8 +24893,8 @@ CHIPColorControlAttributeListAttributeCallback::~CHIPColorControlAttributeListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPColorControlAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23720,8 +24903,8 @@ void CHIPColorControlAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23751,9 +24934,9 @@ void CHIPColorControlAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBallastConfigurationEventListAttributeCallback::CHIPBallastConfigurationEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23770,7 +24953,7 @@ CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CHIPBallastConf } } -CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::~CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback() +CHIPBallastConfigurationEventListAttributeCallback::~CHIPBallastConfigurationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23781,8 +24964,8 @@ CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::~CHIPBallastCon env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPBallastConfigurationEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23790,8 +24973,9 @@ void CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23799,28 +24983,31 @@ void CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBallastConfigurationAttributeListAttributeCallback::CHIPBallastConfigurationAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23837,8 +25024,7 @@ CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CHIPBallastCon } } -CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback:: - ~CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback() +CHIPBallastConfigurationAttributeListAttributeCallback::~CHIPBallastConfigurationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23849,8 +25035,8 @@ CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPBallastConfigurationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23858,8 +25044,9 @@ void CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23867,28 +25054,31 @@ void CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CallbackF ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBallastConfigurationLampRatedHoursAttributeCallback::CHIPBallastConfigurationLampRatedHoursAttributeCallback( +CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23905,7 +25095,7 @@ CHIPBallastConfigurationLampRatedHoursAttributeCallback::CHIPBallastConfiguratio } } -CHIPBallastConfigurationLampRatedHoursAttributeCallback::~CHIPBallastConfigurationLampRatedHoursAttributeCallback() +CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23916,8 +25106,8 @@ CHIPBallastConfigurationLampRatedHoursAttributeCallback::~CHIPBallastConfigurati env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationLampRatedHoursAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23925,8 +25115,8 @@ void CHIPBallastConfigurationLampRatedHoursAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23934,7 +25124,7 @@ void CHIPBallastConfigurationLampRatedHoursAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -23944,18 +25134,18 @@ void CHIPBallastConfigurationLampRatedHoursAttributeCallback::CallbackFn(void * } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBallastConfigurationLampBurnHoursAttributeCallback::CHIPBallastConfigurationLampBurnHoursAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23972,7 +25162,7 @@ CHIPBallastConfigurationLampBurnHoursAttributeCallback::CHIPBallastConfiguration } } -CHIPBallastConfigurationLampBurnHoursAttributeCallback::~CHIPBallastConfigurationLampBurnHoursAttributeCallback() +CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23983,8 +25173,8 @@ CHIPBallastConfigurationLampBurnHoursAttributeCallback::~CHIPBallastConfiguratio env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationLampBurnHoursAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23992,8 +25182,8 @@ void CHIPBallastConfigurationLampBurnHoursAttributeCallback::CallbackFn(void * c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24001,7 +25191,7 @@ void CHIPBallastConfigurationLampBurnHoursAttributeCallback::CallbackFn(void * c ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -24011,18 +25201,18 @@ void CHIPBallastConfigurationLampBurnHoursAttributeCallback::CallbackFn(void * c } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback( +CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24039,7 +25229,7 @@ CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CHIPBallastConf } } -CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::~CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback() +CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24050,8 +25240,8 @@ CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::~CHIPBallastCon env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24059,8 +25249,8 @@ void CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24068,7 +25258,7 @@ void CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -24078,18 +25268,18 @@ void CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CallbackFn } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CHIPBallastConfigurationGeneratedCommandListAttributeCallback( +CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24106,7 +25296,7 @@ CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CHIPBallastConfig } } -CHIPBallastConfigurationGeneratedCommandListAttributeCallback::~CHIPBallastConfigurationGeneratedCommandListAttributeCallback() +CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::~CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24117,8 +25307,8 @@ CHIPBallastConfigurationGeneratedCommandListAttributeCallback::~CHIPBallastConfi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24126,9 +25316,8 @@ void CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24136,31 +25325,28 @@ void CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CHIPBallastConfigurationAcceptedCommandListAttributeCallback( +CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24177,7 +25363,7 @@ CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CHIPBallastConfigu } } -CHIPBallastConfigurationAcceptedCommandListAttributeCallback::~CHIPBallastConfigurationAcceptedCommandListAttributeCallback() +CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::~CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24188,7 +25374,7 @@ CHIPBallastConfigurationAcceptedCommandListAttributeCallback::~CHIPBallastConfig env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -24198,8 +25384,8 @@ void CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24229,9 +25415,9 @@ void CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBallastConfigurationEventListAttributeCallback::CHIPBallastConfigurationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24248,7 +25434,7 @@ CHIPBallastConfigurationEventListAttributeCallback::CHIPBallastConfigurationEven } } -CHIPBallastConfigurationEventListAttributeCallback::~CHIPBallastConfigurationEventListAttributeCallback() +CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::~CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24259,8 +25445,8 @@ CHIPBallastConfigurationEventListAttributeCallback::~CHIPBallastConfigurationEve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24269,8 +25455,8 @@ void CHIPBallastConfigurationEventListAttributeCallback::CallbackFn(void * conte VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24300,9 +25486,9 @@ void CHIPBallastConfigurationEventListAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBallastConfigurationAttributeListAttributeCallback::CHIPBallastConfigurationAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPIlluminanceMeasurementEventListAttributeCallback::CHIPIlluminanceMeasurementEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24319,7 +25505,7 @@ CHIPBallastConfigurationAttributeListAttributeCallback::CHIPBallastConfiguration } } -CHIPBallastConfigurationAttributeListAttributeCallback::~CHIPBallastConfigurationAttributeListAttributeCallback() +CHIPIlluminanceMeasurementEventListAttributeCallback::~CHIPIlluminanceMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24330,8 +25516,8 @@ CHIPBallastConfigurationAttributeListAttributeCallback::~CHIPBallastConfiguratio env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBallastConfigurationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPIlluminanceMeasurementEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24340,8 +25526,8 @@ void CHIPBallastConfigurationAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24371,9 +25557,9 @@ void CHIPBallastConfigurationAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMeasuredValueAttributeCallback( +CHIPIlluminanceMeasurementAttributeListAttributeCallback::CHIPIlluminanceMeasurementAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24390,7 +25576,7 @@ CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CHIPIlluminanceMeasure } } -CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMeasuredValueAttributeCallback() +CHIPIlluminanceMeasurementAttributeListAttributeCallback::~CHIPIlluminanceMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24401,17 +25587,18 @@ CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::~CHIPIlluminanceMeasur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPIlluminanceMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); jobject javaCallbackRef; - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24419,28 +25606,31 @@ void CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback( +CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24457,7 +25647,7 @@ CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CHIPIlluminanceMeas } } -CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback() +CHIPTemperatureMeasurementMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24468,8 +25658,8 @@ CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::~CHIPIlluminanceMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24477,8 +25667,8 @@ void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24498,16 +25688,16 @@ void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(voi { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback( +CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24524,7 +25714,7 @@ CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CHIPIlluminanceMeas } } -CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback() +CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24535,8 +25725,8 @@ CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::~CHIPIlluminanceMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24544,8 +25734,8 @@ void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24565,16 +25755,16 @@ void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(voi { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback( +CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24591,7 +25781,7 @@ CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CHIPIlluminanceMeasu } } -CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::~CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback() +CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24602,8 +25792,8 @@ CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::~CHIPIlluminanceMeas env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24611,8 +25801,8 @@ void CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CallbackFn(void jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24632,16 +25822,16 @@ void CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CallbackFn(void { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback( +CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24658,7 +25848,7 @@ CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CHIPIlluminance } } -CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::~CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback() +CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::~CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24669,7 +25859,7 @@ CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::~CHIPIlluminanc env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -24679,8 +25869,8 @@ void CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CallbackFn VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24710,9 +25900,9 @@ void CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback( +CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24729,7 +25919,7 @@ CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CHIPIlluminanceM } } -CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::~CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback() +CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::~CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24740,7 +25930,7 @@ CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::~CHIPIlluminance env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -24750,8 +25940,8 @@ void CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24781,9 +25971,9 @@ void CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIlluminanceMeasurementEventListAttributeCallback::CHIPIlluminanceMeasurementEventListAttributeCallback(jobject javaCallback, +CHIPTemperatureMeasurementEventListAttributeCallback::CHIPTemperatureMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24800,7 +25990,7 @@ CHIPIlluminanceMeasurementEventListAttributeCallback::CHIPIlluminanceMeasurement } } -CHIPIlluminanceMeasurementEventListAttributeCallback::~CHIPIlluminanceMeasurementEventListAttributeCallback() +CHIPTemperatureMeasurementEventListAttributeCallback::~CHIPTemperatureMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24811,7 +26001,7 @@ CHIPIlluminanceMeasurementEventListAttributeCallback::~CHIPIlluminanceMeasuremen env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementEventListAttributeCallback::CallbackFn( +void CHIPTemperatureMeasurementEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -24821,8 +26011,8 @@ void CHIPIlluminanceMeasurementEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24852,9 +26042,9 @@ void CHIPIlluminanceMeasurementEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIlluminanceMeasurementAttributeListAttributeCallback::CHIPIlluminanceMeasurementAttributeListAttributeCallback( +CHIPTemperatureMeasurementAttributeListAttributeCallback::CHIPTemperatureMeasurementAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24871,7 +26061,7 @@ CHIPIlluminanceMeasurementAttributeListAttributeCallback::CHIPIlluminanceMeasure } } -CHIPIlluminanceMeasurementAttributeListAttributeCallback::~CHIPIlluminanceMeasurementAttributeListAttributeCallback() +CHIPTemperatureMeasurementAttributeListAttributeCallback::~CHIPTemperatureMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24882,7 +26072,7 @@ CHIPIlluminanceMeasurementAttributeListAttributeCallback::~CHIPIlluminanceMeasur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementAttributeListAttributeCallback::CallbackFn( +void CHIPTemperatureMeasurementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -24892,8 +26082,8 @@ void CHIPIlluminanceMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24923,9 +26113,9 @@ void CHIPIlluminanceMeasurementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPressureMeasurementMeasuredValueAttributeCallback::CHIPPressureMeasurementMeasuredValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24942,7 +26132,7 @@ CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CHIPTemperatureMeasure } } -CHIPTemperatureMeasurementMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMeasuredValueAttributeCallback() +CHIPPressureMeasurementMeasuredValueAttributeCallback::~CHIPPressureMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24953,8 +26143,8 @@ CHIPTemperatureMeasurementMeasuredValueAttributeCallback::~CHIPTemperatureMeasur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPressureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24962,8 +26152,8 @@ void CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24990,9 +26180,9 @@ void CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback( +CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CHIPPressureMeasurementMinMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25009,7 +26199,7 @@ CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CHIPTemperatureMeas } } -CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback() +CHIPPressureMeasurementMinMeasuredValueAttributeCallback::~CHIPPressureMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25020,8 +26210,8 @@ CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::~CHIPTemperatureMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25029,8 +26219,8 @@ void CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25057,9 +26247,9 @@ void CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(voi env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback( +CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CHIPPressureMeasurementMaxMeasuredValueAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25076,7 +26266,7 @@ CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CHIPTemperatureMeas } } -CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::~CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback() +CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::~CHIPPressureMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25087,8 +26277,8 @@ CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::~CHIPTemperatureMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25096,8 +26286,8 @@ void CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25124,9 +26314,9 @@ void CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(voi env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPressureMeasurementScaledValueAttributeCallback::CHIPPressureMeasurementScaledValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25143,7 +26333,7 @@ CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CHIPTemperature } } -CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::~CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback() +CHIPPressureMeasurementScaledValueAttributeCallback::~CHIPPressureMeasurementScaledValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25154,8 +26344,8 @@ CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::~CHIPTemperatur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPressureMeasurementScaledValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25163,9 +26353,8 @@ void CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25173,31 +26362,28 @@ void CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPressureMeasurementMinScaledValueAttributeCallback::CHIPPressureMeasurementMinScaledValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25214,7 +26400,7 @@ CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CHIPTemperatureM } } -CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::~CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback() +CHIPPressureMeasurementMinScaledValueAttributeCallback::~CHIPPressureMeasurementMinScaledValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25225,8 +26411,8 @@ CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::~CHIPTemperature env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPressureMeasurementMinScaledValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25234,9 +26420,8 @@ void CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25244,31 +26429,28 @@ void CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureMeasurementEventListAttributeCallback::CHIPTemperatureMeasurementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPressureMeasurementMaxScaledValueAttributeCallback::CHIPPressureMeasurementMaxScaledValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25285,7 +26467,7 @@ CHIPTemperatureMeasurementEventListAttributeCallback::CHIPTemperatureMeasurement } } -CHIPTemperatureMeasurementEventListAttributeCallback::~CHIPTemperatureMeasurementEventListAttributeCallback() +CHIPPressureMeasurementMaxScaledValueAttributeCallback::~CHIPPressureMeasurementMaxScaledValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25296,8 +26478,8 @@ CHIPTemperatureMeasurementEventListAttributeCallback::~CHIPTemperatureMeasuremen env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPressureMeasurementMaxScaledValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25305,9 +26487,8 @@ void CHIPTemperatureMeasurementEventListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25315,31 +26496,28 @@ void CHIPTemperatureMeasurementEventListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureMeasurementAttributeListAttributeCallback::CHIPTemperatureMeasurementAttributeListAttributeCallback( +CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CHIPPressureMeasurementGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25356,7 +26534,7 @@ CHIPTemperatureMeasurementAttributeListAttributeCallback::CHIPTemperatureMeasure } } -CHIPTemperatureMeasurementAttributeListAttributeCallback::~CHIPTemperatureMeasurementAttributeListAttributeCallback() +CHIPPressureMeasurementGeneratedCommandListAttributeCallback::~CHIPPressureMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25367,8 +26545,8 @@ CHIPTemperatureMeasurementAttributeListAttributeCallback::~CHIPTemperatureMeasur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25377,8 +26555,8 @@ void CHIPTemperatureMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25408,9 +26586,9 @@ void CHIPTemperatureMeasurementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPressureMeasurementMeasuredValueAttributeCallback::CHIPPressureMeasurementMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CHIPPressureMeasurementAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25427,7 +26605,7 @@ CHIPPressureMeasurementMeasuredValueAttributeCallback::CHIPPressureMeasurementMe } } -CHIPPressureMeasurementMeasuredValueAttributeCallback::~CHIPPressureMeasurementMeasuredValueAttributeCallback() +CHIPPressureMeasurementAcceptedCommandListAttributeCallback::~CHIPPressureMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25438,8 +26616,8 @@ CHIPPressureMeasurementMeasuredValueAttributeCallback::~CHIPPressureMeasurementM env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25447,8 +26625,9 @@ void CHIPPressureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25456,28 +26635,31 @@ void CHIPPressureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * co ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CHIPPressureMeasurementMinMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPressureMeasurementEventListAttributeCallback::CHIPPressureMeasurementEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25494,7 +26676,7 @@ CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CHIPPressureMeasuremen } } -CHIPPressureMeasurementMinMeasuredValueAttributeCallback::~CHIPPressureMeasurementMinMeasuredValueAttributeCallback() +CHIPPressureMeasurementEventListAttributeCallback::~CHIPPressureMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25505,8 +26687,8 @@ CHIPPressureMeasurementMinMeasuredValueAttributeCallback::~CHIPPressureMeasureme env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPressureMeasurementEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25514,8 +26696,9 @@ void CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25523,28 +26706,31 @@ void CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CHIPPressureMeasurementMaxMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPressureMeasurementAttributeListAttributeCallback::CHIPPressureMeasurementAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25561,7 +26747,7 @@ CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CHIPPressureMeasuremen } } -CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::~CHIPPressureMeasurementMaxMeasuredValueAttributeCallback() +CHIPPressureMeasurementAttributeListAttributeCallback::~CHIPPressureMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25572,8 +26758,8 @@ CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::~CHIPPressureMeasureme env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPressureMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25581,8 +26767,9 @@ void CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25590,28 +26777,31 @@ void CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPressureMeasurementScaledValueAttributeCallback::CHIPPressureMeasurementScaledValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFlowMeasurementMeasuredValueAttributeCallback::CHIPFlowMeasurementMeasuredValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25628,7 +26818,7 @@ CHIPPressureMeasurementScaledValueAttributeCallback::CHIPPressureMeasurementScal } } -CHIPPressureMeasurementScaledValueAttributeCallback::~CHIPPressureMeasurementScaledValueAttributeCallback() +CHIPFlowMeasurementMeasuredValueAttributeCallback::~CHIPFlowMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25639,8 +26829,8 @@ CHIPPressureMeasurementScaledValueAttributeCallback::~CHIPPressureMeasurementSca env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementScaledValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPFlowMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25648,8 +26838,8 @@ void CHIPPressureMeasurementScaledValueAttributeCallback::CallbackFn(void * cont jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25669,16 +26859,16 @@ void CHIPPressureMeasurementScaledValueAttributeCallback::CallbackFn(void * cont { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPressureMeasurementMinScaledValueAttributeCallback::CHIPPressureMeasurementMinScaledValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CHIPFlowMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25695,7 +26885,7 @@ CHIPPressureMeasurementMinScaledValueAttributeCallback::CHIPPressureMeasurementM } } -CHIPPressureMeasurementMinScaledValueAttributeCallback::~CHIPPressureMeasurementMinScaledValueAttributeCallback() +CHIPFlowMeasurementMinMeasuredValueAttributeCallback::~CHIPFlowMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25706,8 +26896,8 @@ CHIPPressureMeasurementMinScaledValueAttributeCallback::~CHIPPressureMeasurement env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementMinScaledValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25715,8 +26905,8 @@ void CHIPPressureMeasurementMinScaledValueAttributeCallback::CallbackFn(void * c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25736,16 +26926,16 @@ void CHIPPressureMeasurementMinScaledValueAttributeCallback::CallbackFn(void * c { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPressureMeasurementMaxScaledValueAttributeCallback::CHIPPressureMeasurementMaxScaledValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CHIPFlowMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25762,7 +26952,7 @@ CHIPPressureMeasurementMaxScaledValueAttributeCallback::CHIPPressureMeasurementM } } -CHIPPressureMeasurementMaxScaledValueAttributeCallback::~CHIPPressureMeasurementMaxScaledValueAttributeCallback() +CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::~CHIPFlowMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25773,8 +26963,8 @@ CHIPPressureMeasurementMaxScaledValueAttributeCallback::~CHIPPressureMeasurement env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementMaxScaledValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25782,8 +26972,8 @@ void CHIPPressureMeasurementMaxScaledValueAttributeCallback::CallbackFn(void * c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25802,17 +26992,17 @@ void CHIPPressureMeasurementMaxScaledValueAttributeCallback::CallbackFn(void * c else { std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CHIPPressureMeasurementGeneratedCommandListAttributeCallback( +CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CHIPFlowMeasurementGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25829,7 +27019,7 @@ CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CHIPPressureMeasur } } -CHIPPressureMeasurementGeneratedCommandListAttributeCallback::~CHIPPressureMeasurementGeneratedCommandListAttributeCallback() +CHIPFlowMeasurementGeneratedCommandListAttributeCallback::~CHIPFlowMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25840,7 +27030,7 @@ CHIPPressureMeasurementGeneratedCommandListAttributeCallback::~CHIPPressureMeasu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -25850,8 +27040,8 @@ void CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25881,9 +27071,9 @@ void CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CHIPPressureMeasurementAcceptedCommandListAttributeCallback( +CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CHIPFlowMeasurementAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25900,7 +27090,7 @@ CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CHIPPressureMeasure } } -CHIPPressureMeasurementAcceptedCommandListAttributeCallback::~CHIPPressureMeasurementAcceptedCommandListAttributeCallback() +CHIPFlowMeasurementAcceptedCommandListAttributeCallback::~CHIPFlowMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25911,7 +27101,7 @@ CHIPPressureMeasurementAcceptedCommandListAttributeCallback::~CHIPPressureMeasur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -25921,8 +27111,8 @@ void CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25952,10 +27142,8 @@ void CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPressureMeasurementEventListAttributeCallback::CHIPPressureMeasurementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPFlowMeasurementEventListAttributeCallback::CHIPFlowMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25971,7 +27159,7 @@ CHIPPressureMeasurementEventListAttributeCallback::CHIPPressureMeasurementEventL } } -CHIPPressureMeasurementEventListAttributeCallback::~CHIPPressureMeasurementEventListAttributeCallback() +CHIPFlowMeasurementEventListAttributeCallback::~CHIPFlowMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25982,8 +27170,8 @@ CHIPPressureMeasurementEventListAttributeCallback::~CHIPPressureMeasurementEvent env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPFlowMeasurementEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25992,8 +27180,8 @@ void CHIPPressureMeasurementEventListAttributeCallback::CallbackFn(void * contex VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26023,9 +27211,9 @@ void CHIPPressureMeasurementEventListAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPressureMeasurementAttributeListAttributeCallback::CHIPPressureMeasurementAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFlowMeasurementAttributeListAttributeCallback::CHIPFlowMeasurementAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26042,7 +27230,7 @@ CHIPPressureMeasurementAttributeListAttributeCallback::CHIPPressureMeasurementAt } } -CHIPPressureMeasurementAttributeListAttributeCallback::~CHIPPressureMeasurementAttributeListAttributeCallback() +CHIPFlowMeasurementAttributeListAttributeCallback::~CHIPFlowMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26053,7 +27241,7 @@ CHIPPressureMeasurementAttributeListAttributeCallback::~CHIPPressureMeasurementA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPressureMeasurementAttributeListAttributeCallback::CallbackFn( +void CHIPFlowMeasurementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -26063,8 +27251,8 @@ void CHIPPressureMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26094,9 +27282,9 @@ void CHIPPressureMeasurementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFlowMeasurementMeasuredValueAttributeCallback::CHIPFlowMeasurementMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26113,7 +27301,7 @@ CHIPFlowMeasurementMeasuredValueAttributeCallback::CHIPFlowMeasurementMeasuredVa } } -CHIPFlowMeasurementMeasuredValueAttributeCallback::~CHIPFlowMeasurementMeasuredValueAttributeCallback() +CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::~CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26124,8 +27312,8 @@ CHIPFlowMeasurementMeasuredValueAttributeCallback::~CHIPFlowMeasurementMeasuredV env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFlowMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26133,8 +27321,8 @@ void CHIPFlowMeasurementMeasuredValueAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26161,9 +27349,9 @@ void CHIPFlowMeasurementMeasuredValueAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CHIPFlowMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26180,7 +27368,8 @@ CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CHIPFlowMeasurementMinMeas } } -CHIPFlowMeasurementMinMeasuredValueAttributeCallback::~CHIPFlowMeasurementMinMeasuredValueAttributeCallback() +CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback:: + ~CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26191,8 +27380,8 @@ CHIPFlowMeasurementMinMeasuredValueAttributeCallback::~CHIPFlowMeasurementMinMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26200,8 +27389,8 @@ void CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * con jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26228,9 +27417,9 @@ void CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * con env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CHIPFlowMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26247,7 +27436,8 @@ CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CHIPFlowMeasurementMaxMeas } } -CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::~CHIPFlowMeasurementMaxMeasuredValueAttributeCallback() +CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback:: + ~CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26258,8 +27448,8 @@ CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::~CHIPFlowMeasurementMaxMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26267,8 +27457,8 @@ void CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * con jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26282,163 +27472,23 @@ void CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * con jobject javaValue; if (value.IsNull()) { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CHIPFlowMeasurementGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFlowMeasurementGeneratedCommandListAttributeCallback::~CHIPFlowMeasurementGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CHIPFlowMeasurementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPFlowMeasurementAcceptedCommandListAttributeCallback::~CHIPFlowMeasurementAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPFlowMeasurementEventListAttributeCallback::CHIPFlowMeasurementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback:: + CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26454,7 +27504,8 @@ CHIPFlowMeasurementEventListAttributeCallback::CHIPFlowMeasurementEventListAttri } } -CHIPFlowMeasurementEventListAttributeCallback::~CHIPFlowMeasurementEventListAttributeCallback() +CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback:: + ~CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26465,8 +27516,8 @@ CHIPFlowMeasurementEventListAttributeCallback::~CHIPFlowMeasurementEventListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFlowMeasurementEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26475,8 +27526,8 @@ void CHIPFlowMeasurementEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26506,9 +27557,9 @@ void CHIPFlowMeasurementEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFlowMeasurementAttributeListAttributeCallback::CHIPFlowMeasurementAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback:: + CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26525,7 +27576,8 @@ CHIPFlowMeasurementAttributeListAttributeCallback::CHIPFlowMeasurementAttributeL } } -CHIPFlowMeasurementAttributeListAttributeCallback::~CHIPFlowMeasurementAttributeListAttributeCallback() +CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback:: + ~CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26536,8 +27588,8 @@ CHIPFlowMeasurementAttributeListAttributeCallback::~CHIPFlowMeasurementAttribute env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFlowMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26546,8 +27598,8 @@ void CHIPFlowMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26577,9 +27629,9 @@ void CHIPFlowMeasurementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback( +CHIPRelativeHumidityMeasurementEventListAttributeCallback::CHIPRelativeHumidityMeasurementEventListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26596,7 +27648,7 @@ CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CHIPRelativeHumid } } -CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::~CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback() +CHIPRelativeHumidityMeasurementEventListAttributeCallback::~CHIPRelativeHumidityMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26607,8 +27659,8 @@ CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::~CHIPRelativeHumi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPRelativeHumidityMeasurementEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26616,8 +27668,9 @@ void CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26625,28 +27678,31 @@ void CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback( +CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CHIPRelativeHumidityMeasurementAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26663,8 +27719,7 @@ CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CHIPRelativeHu } } -CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback:: - ~CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback() +CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::~CHIPRelativeHumidityMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26675,8 +27730,8 @@ CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26684,8 +27739,9 @@ void CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26693,28 +27749,31 @@ void CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CallbackF ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback( +CHIPOccupancySensingGeneratedCommandListAttributeCallback::CHIPOccupancySensingGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26731,8 +27790,7 @@ CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CHIPRelativeHu } } -CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback:: - ~CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback() +CHIPOccupancySensingGeneratedCommandListAttributeCallback::~CHIPOccupancySensingGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26743,8 +27801,8 @@ CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPOccupancySensingGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26752,8 +27810,9 @@ void CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26761,28 +27820,31 @@ void CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CallbackF ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback:: - CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOccupancySensingAcceptedCommandListAttributeCallback::CHIPOccupancySensingAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26799,8 +27861,7 @@ CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback:: } } -CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback:: - ~CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback() +CHIPOccupancySensingAcceptedCommandListAttributeCallback::~CHIPOccupancySensingAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26811,7 +27872,7 @@ CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPOccupancySensingAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -26821,8 +27882,8 @@ void CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback::Callb VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26852,9 +27913,9 @@ void CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback::Callb env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback:: - CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOccupancySensingEventListAttributeCallback::CHIPOccupancySensingEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26871,8 +27932,7 @@ CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback:: } } -CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback:: - ~CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback() +CHIPOccupancySensingEventListAttributeCallback::~CHIPOccupancySensingEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26883,8 +27943,8 @@ CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOccupancySensingEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26893,8 +27953,8 @@ void CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback::Callba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26924,9 +27984,9 @@ void CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback::Callba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRelativeHumidityMeasurementEventListAttributeCallback::CHIPRelativeHumidityMeasurementEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOccupancySensingAttributeListAttributeCallback::CHIPOccupancySensingAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26943,7 +28003,7 @@ CHIPRelativeHumidityMeasurementEventListAttributeCallback::CHIPRelativeHumidityM } } -CHIPRelativeHumidityMeasurementEventListAttributeCallback::~CHIPRelativeHumidityMeasurementEventListAttributeCallback() +CHIPOccupancySensingAttributeListAttributeCallback::~CHIPOccupancySensingAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26954,8 +28014,8 @@ CHIPRelativeHumidityMeasurementEventListAttributeCallback::~CHIPRelativeHumidity env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOccupancySensingAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26964,8 +28024,8 @@ void CHIPRelativeHumidityMeasurementEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26995,9 +28055,9 @@ void CHIPRelativeHumidityMeasurementEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CHIPRelativeHumidityMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPWakeOnLanGeneratedCommandListAttributeCallback::CHIPWakeOnLanGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27014,7 +28074,7 @@ CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CHIPRelativeHumid } } -CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::~CHIPRelativeHumidityMeasurementAttributeListAttributeCallback() +CHIPWakeOnLanGeneratedCommandListAttributeCallback::~CHIPWakeOnLanGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27025,8 +28085,8 @@ CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::~CHIPRelativeHumi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPWakeOnLanGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27035,8 +28095,8 @@ void CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27066,9 +28126,9 @@ void CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOccupancySensingGeneratedCommandListAttributeCallback::CHIPOccupancySensingGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPWakeOnLanAcceptedCommandListAttributeCallback::CHIPWakeOnLanAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27085,7 +28145,7 @@ CHIPOccupancySensingGeneratedCommandListAttributeCallback::CHIPOccupancySensingG } } -CHIPOccupancySensingGeneratedCommandListAttributeCallback::~CHIPOccupancySensingGeneratedCommandListAttributeCallback() +CHIPWakeOnLanAcceptedCommandListAttributeCallback::~CHIPWakeOnLanAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27096,7 +28156,7 @@ CHIPOccupancySensingGeneratedCommandListAttributeCallback::~CHIPOccupancySensing env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOccupancySensingGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPWakeOnLanAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -27106,8 +28166,8 @@ void CHIPOccupancySensingGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27137,10 +28197,8 @@ void CHIPOccupancySensingGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOccupancySensingAcceptedCommandListAttributeCallback::CHIPOccupancySensingAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPWakeOnLanEventListAttributeCallback::CHIPWakeOnLanEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27156,7 +28214,7 @@ CHIPOccupancySensingAcceptedCommandListAttributeCallback::CHIPOccupancySensingAc } } -CHIPOccupancySensingAcceptedCommandListAttributeCallback::~CHIPOccupancySensingAcceptedCommandListAttributeCallback() +CHIPWakeOnLanEventListAttributeCallback::~CHIPWakeOnLanEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27167,8 +28225,8 @@ CHIPOccupancySensingAcceptedCommandListAttributeCallback::~CHIPOccupancySensingA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOccupancySensingAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPWakeOnLanEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27177,8 +28235,8 @@ void CHIPOccupancySensingAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27208,10 +28266,8 @@ void CHIPOccupancySensingAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOccupancySensingEventListAttributeCallback::CHIPOccupancySensingEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPWakeOnLanAttributeListAttributeCallback::CHIPWakeOnLanAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27227,7 +28283,7 @@ CHIPOccupancySensingEventListAttributeCallback::CHIPOccupancySensingEventListAtt } } -CHIPOccupancySensingEventListAttributeCallback::~CHIPOccupancySensingEventListAttributeCallback() +CHIPWakeOnLanAttributeListAttributeCallback::~CHIPWakeOnLanAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27238,8 +28294,8 @@ CHIPOccupancySensingEventListAttributeCallback::~CHIPOccupancySensingEventListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOccupancySensingEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPWakeOnLanAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27248,8 +28304,8 @@ void CHIPOccupancySensingEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27279,10 +28335,8 @@ void CHIPOccupancySensingEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOccupancySensingAttributeListAttributeCallback::CHIPOccupancySensingAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPChannelChannelListAttributeCallback::CHIPChannelChannelListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27298,7 +28352,7 @@ CHIPOccupancySensingAttributeListAttributeCallback::CHIPOccupancySensingAttribut } } -CHIPOccupancySensingAttributeListAttributeCallback::~CHIPOccupancySensingAttributeListAttributeCallback() +CHIPChannelChannelListAttributeCallback::~CHIPChannelChannelListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27309,8 +28363,9 @@ CHIPOccupancySensingAttributeListAttributeCallback::~CHIPOccupancySensingAttribu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOccupancySensingAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPChannelChannelListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27319,8 +28374,8 @@ void CHIPOccupancySensingAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27339,10 +28394,76 @@ void CHIPOccupancySensingAttributeListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jobject newElement_0_majorNumber; + std::string newElement_0_majorNumberClassName = "java/lang/Integer"; + std::string newElement_0_majorNumberCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_majorNumberClassName.c_str(), + newElement_0_majorNumberCtorSignature.c_str(), + entry_0.majorNumber, newElement_0_majorNumber); + jobject newElement_0_minorNumber; + std::string newElement_0_minorNumberClassName = "java/lang/Integer"; + std::string newElement_0_minorNumberCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minorNumberClassName.c_str(), + newElement_0_minorNumberCtorSignature.c_str(), + entry_0.minorNumber, newElement_0_minorNumber); + jobject newElement_0_name; + if (!entry_0.name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); + } + else + { + jobject newElement_0_nameInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); + } + jobject newElement_0_callSign; + if (!entry_0.callSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_callSign); + } + else + { + jobject newElement_0_callSignInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(entry_0.callSign.Value(), newElement_0_callSignInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_callSignInsideOptional, newElement_0_callSign); + } + jobject newElement_0_affiliateCallSign; + if (!entry_0.affiliateCallSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_affiliateCallSign); + } + else + { + jobject newElement_0_affiliateCallSignInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.affiliateCallSign.Value(), + newElement_0_affiliateCallSignInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_affiliateCallSignInsideOptional, + newElement_0_affiliateCallSign); + } + + jclass channelInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); + return; + } + jmethodID channelInfoStructStructCtor_1 = env->GetMethodID( + channelInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (channelInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); + return; + } + + newElement_0 = + env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, newElement_0_majorNumber, + newElement_0_minorNumber, newElement_0_name, newElement_0_callSign, newElement_0_affiliateCallSign); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -27350,9 +28471,9 @@ void CHIPOccupancySensingAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWakeOnLanGeneratedCommandListAttributeCallback::CHIPWakeOnLanGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPChannelGeneratedCommandListAttributeCallback::CHIPChannelGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27369,7 +28490,7 @@ CHIPWakeOnLanGeneratedCommandListAttributeCallback::CHIPWakeOnLanGeneratedComman } } -CHIPWakeOnLanGeneratedCommandListAttributeCallback::~CHIPWakeOnLanGeneratedCommandListAttributeCallback() +CHIPChannelGeneratedCommandListAttributeCallback::~CHIPChannelGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27380,8 +28501,8 @@ CHIPWakeOnLanGeneratedCommandListAttributeCallback::~CHIPWakeOnLanGeneratedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWakeOnLanGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPChannelGeneratedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27390,8 +28511,8 @@ void CHIPWakeOnLanGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27421,9 +28542,9 @@ void CHIPWakeOnLanGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWakeOnLanAcceptedCommandListAttributeCallback::CHIPWakeOnLanAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPChannelAcceptedCommandListAttributeCallback::CHIPChannelAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27440,7 +28561,7 @@ CHIPWakeOnLanAcceptedCommandListAttributeCallback::CHIPWakeOnLanAcceptedCommandL } } -CHIPWakeOnLanAcceptedCommandListAttributeCallback::~CHIPWakeOnLanAcceptedCommandListAttributeCallback() +CHIPChannelAcceptedCommandListAttributeCallback::~CHIPChannelAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27451,8 +28572,8 @@ CHIPWakeOnLanAcceptedCommandListAttributeCallback::~CHIPWakeOnLanAcceptedCommand env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWakeOnLanAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPChannelAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27461,8 +28582,8 @@ void CHIPWakeOnLanAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27492,8 +28613,8 @@ void CHIPWakeOnLanAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWakeOnLanEventListAttributeCallback::CHIPWakeOnLanEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPChannelEventListAttributeCallback::CHIPChannelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27509,7 +28630,7 @@ CHIPWakeOnLanEventListAttributeCallback::CHIPWakeOnLanEventListAttributeCallback } } -CHIPWakeOnLanEventListAttributeCallback::~CHIPWakeOnLanEventListAttributeCallback() +CHIPChannelEventListAttributeCallback::~CHIPChannelEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27520,8 +28641,8 @@ CHIPWakeOnLanEventListAttributeCallback::~CHIPWakeOnLanEventListAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWakeOnLanEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPChannelEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27530,8 +28651,8 @@ void CHIPWakeOnLanEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27561,8 +28682,8 @@ void CHIPWakeOnLanEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWakeOnLanAttributeListAttributeCallback::CHIPWakeOnLanAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPChannelAttributeListAttributeCallback::CHIPChannelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27578,7 +28699,7 @@ CHIPWakeOnLanAttributeListAttributeCallback::CHIPWakeOnLanAttributeListAttribute } } -CHIPWakeOnLanAttributeListAttributeCallback::~CHIPWakeOnLanAttributeListAttributeCallback() +CHIPChannelAttributeListAttributeCallback::~CHIPChannelAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27589,8 +28710,8 @@ CHIPWakeOnLanAttributeListAttributeCallback::~CHIPWakeOnLanAttributeListAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWakeOnLanAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPChannelAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27599,8 +28720,8 @@ void CHIPWakeOnLanAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27630,8 +28751,10 @@ void CHIPWakeOnLanAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPChannelChannelListAttributeCallback::CHIPChannelChannelListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTargetNavigatorTargetListAttributeCallback::CHIPTargetNavigatorTargetListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27647,7 +28770,7 @@ CHIPChannelChannelListAttributeCallback::CHIPChannelChannelListAttributeCallback } } -CHIPChannelChannelListAttributeCallback::~CHIPChannelChannelListAttributeCallback() +CHIPTargetNavigatorTargetListAttributeCallback::~CHIPTargetNavigatorTargetListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27658,9 +28781,10 @@ CHIPChannelChannelListAttributeCallback::~CHIPChannelChannelListAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPChannelChannelListAttributeCallback::CallbackFn( +void CHIPTargetNavigatorTargetListAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27669,8 +28793,8 @@ void CHIPChannelChannelListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27689,76 +28813,33 @@ void CHIPChannelChannelListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_majorNumber; - std::string newElement_0_majorNumberClassName = "java/lang/Integer"; - std::string newElement_0_majorNumberCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_majorNumberClassName.c_str(), - newElement_0_majorNumberCtorSignature.c_str(), - entry_0.majorNumber, newElement_0_majorNumber); - jobject newElement_0_minorNumber; - std::string newElement_0_minorNumberClassName = "java/lang/Integer"; - std::string newElement_0_minorNumberCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minorNumberClassName.c_str(), - newElement_0_minorNumberCtorSignature.c_str(), - entry_0.minorNumber, newElement_0_minorNumber); + jobject newElement_0_identifier; + std::string newElement_0_identifierClassName = "java/lang/Integer"; + std::string newElement_0_identifierCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), + newElement_0_identifierCtorSignature.c_str(), + entry_0.identifier, newElement_0_identifier); jobject newElement_0_name; - if (!entry_0.name.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); - } - else - { - jobject newElement_0_nameInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); - } - jobject newElement_0_callSign; - if (!entry_0.callSign.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_callSign); - } - else - { - jobject newElement_0_callSignInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.callSign.Value(), newElement_0_callSignInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_callSignInsideOptional, newElement_0_callSign); - } - jobject newElement_0_affiliateCallSign; - if (!entry_0.affiliateCallSign.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_affiliateCallSign); - } - else - { - jobject newElement_0_affiliateCallSignInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.affiliateCallSign.Value(), - newElement_0_affiliateCallSignInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_affiliateCallSignInsideOptional, - newElement_0_affiliateCallSign); - } + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jclass channelInfoStructStructClass_1; + jclass targetInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", targetInfoStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); return; } - jmethodID channelInfoStructStructCtor_1 = env->GetMethodID( - channelInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); - if (channelInfoStructStructCtor_1 == nullptr) + jmethodID targetInfoStructStructCtor_1 = + env->GetMethodID(targetInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + if (targetInfoStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); return; } newElement_0 = - env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, newElement_0_majorNumber, - newElement_0_minorNumber, newElement_0_name, newElement_0_callSign, newElement_0_affiliateCallSign); + env->NewObject(targetInfoStructStructClass_1, targetInfoStructStructCtor_1, newElement_0_identifier, newElement_0_name); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -27766,9 +28847,9 @@ void CHIPChannelChannelListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPChannelGeneratedCommandListAttributeCallback::CHIPChannelGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CHIPTargetNavigatorGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27785,7 +28866,7 @@ CHIPChannelGeneratedCommandListAttributeCallback::CHIPChannelGeneratedCommandLis } } -CHIPChannelGeneratedCommandListAttributeCallback::~CHIPChannelGeneratedCommandListAttributeCallback() +CHIPTargetNavigatorGeneratedCommandListAttributeCallback::~CHIPTargetNavigatorGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27796,8 +28877,8 @@ CHIPChannelGeneratedCommandListAttributeCallback::~CHIPChannelGeneratedCommandLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPChannelGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27806,8 +28887,8 @@ void CHIPChannelGeneratedCommandListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27837,9 +28918,9 @@ void CHIPChannelGeneratedCommandListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPChannelAcceptedCommandListAttributeCallback::CHIPChannelAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CHIPTargetNavigatorAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27856,7 +28937,7 @@ CHIPChannelAcceptedCommandListAttributeCallback::CHIPChannelAcceptedCommandListA } } -CHIPChannelAcceptedCommandListAttributeCallback::~CHIPChannelAcceptedCommandListAttributeCallback() +CHIPTargetNavigatorAcceptedCommandListAttributeCallback::~CHIPTargetNavigatorAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27867,8 +28948,8 @@ CHIPChannelAcceptedCommandListAttributeCallback::~CHIPChannelAcceptedCommandList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPChannelAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27877,8 +28958,8 @@ void CHIPChannelAcceptedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27908,8 +28989,8 @@ void CHIPChannelAcceptedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPChannelEventListAttributeCallback::CHIPChannelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTargetNavigatorEventListAttributeCallback::CHIPTargetNavigatorEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27925,7 +29006,7 @@ CHIPChannelEventListAttributeCallback::CHIPChannelEventListAttributeCallback(job } } -CHIPChannelEventListAttributeCallback::~CHIPChannelEventListAttributeCallback() +CHIPTargetNavigatorEventListAttributeCallback::~CHIPTargetNavigatorEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27936,8 +29017,8 @@ CHIPChannelEventListAttributeCallback::~CHIPChannelEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPChannelEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTargetNavigatorEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27946,8 +29027,8 @@ void CHIPChannelEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27977,8 +29058,10 @@ void CHIPChannelEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPChannelAttributeListAttributeCallback::CHIPChannelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTargetNavigatorAttributeListAttributeCallback::CHIPTargetNavigatorAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27994,7 +29077,7 @@ CHIPChannelAttributeListAttributeCallback::CHIPChannelAttributeListAttributeCall } } -CHIPChannelAttributeListAttributeCallback::~CHIPChannelAttributeListAttributeCallback() +CHIPTargetNavigatorAttributeListAttributeCallback::~CHIPTargetNavigatorAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28005,8 +29088,8 @@ CHIPChannelAttributeListAttributeCallback::~CHIPChannelAttributeListAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPChannelAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTargetNavigatorAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28015,8 +29098,8 @@ void CHIPChannelAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28046,10 +29129,8 @@ void CHIPChannelAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTargetNavigatorTargetListAttributeCallback::CHIPTargetNavigatorTargetListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPMediaPlaybackStartTimeAttributeCallback::CHIPMediaPlaybackStartTimeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28065,7 +29146,7 @@ CHIPTargetNavigatorTargetListAttributeCallback::CHIPTargetNavigatorTargetListAtt } } -CHIPTargetNavigatorTargetListAttributeCallback::~CHIPTargetNavigatorTargetListAttributeCallback() +CHIPMediaPlaybackStartTimeAttributeCallback::~CHIPMediaPlaybackStartTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28076,10 +29157,7 @@ CHIPTargetNavigatorTargetListAttributeCallback::~CHIPTargetNavigatorTargetListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTargetNavigatorTargetListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPMediaPlaybackStartTimeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28087,9 +29165,8 @@ void CHIPTargetNavigatorTargetListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28097,55 +29174,27 @@ void CHIPTargetNavigatorTargetListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_identifier; - std::string newElement_0_identifierClassName = "java/lang/Integer"; - std::string newElement_0_identifierCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), - newElement_0_identifierCtorSignature.c_str(), - entry_0.identifier, newElement_0_identifier); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - - jclass targetInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", targetInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); - return; - } - jmethodID targetInfoStructStructCtor_1 = - env->GetMethodID(targetInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - if (targetInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); - return; - } - - newElement_0 = - env->NewObject(targetInfoStructStructClass_1, targetInfoStructStructCtor_1, newElement_0_identifier, newElement_0_name); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CHIPTargetNavigatorGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPMediaPlaybackDurationAttributeCallback::CHIPMediaPlaybackDurationAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28161,7 +29210,7 @@ CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CHIPTargetNavigatorGen } } -CHIPTargetNavigatorGeneratedCommandListAttributeCallback::~CHIPTargetNavigatorGeneratedCommandListAttributeCallback() +CHIPMediaPlaybackDurationAttributeCallback::~CHIPMediaPlaybackDurationAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28172,8 +29221,7 @@ CHIPTargetNavigatorGeneratedCommandListAttributeCallback::~CHIPTargetNavigatorGe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMediaPlaybackDurationAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28181,9 +29229,8 @@ void CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28191,31 +29238,28 @@ void CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CHIPTargetNavigatorAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPMediaPlaybackSeekRangeEndAttributeCallback::CHIPMediaPlaybackSeekRangeEndAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28232,7 +29276,7 @@ CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CHIPTargetNavigatorAcce } } -CHIPTargetNavigatorAcceptedCommandListAttributeCallback::~CHIPTargetNavigatorAcceptedCommandListAttributeCallback() +CHIPMediaPlaybackSeekRangeEndAttributeCallback::~CHIPMediaPlaybackSeekRangeEndAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28243,8 +29287,8 @@ CHIPTargetNavigatorAcceptedCommandListAttributeCallback::~CHIPTargetNavigatorAcc env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMediaPlaybackSeekRangeEndAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28252,9 +29296,8 @@ void CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28262,30 +29305,29 @@ void CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTargetNavigatorEventListAttributeCallback::CHIPTargetNavigatorEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaPlaybackSeekRangeStartAttributeCallback::CHIPMediaPlaybackSeekRangeStartAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28301,7 +29343,7 @@ CHIPTargetNavigatorEventListAttributeCallback::CHIPTargetNavigatorEventListAttri } } -CHIPTargetNavigatorEventListAttributeCallback::~CHIPTargetNavigatorEventListAttributeCallback() +CHIPMediaPlaybackSeekRangeStartAttributeCallback::~CHIPMediaPlaybackSeekRangeStartAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28312,8 +29354,8 @@ CHIPTargetNavigatorEventListAttributeCallback::~CHIPTargetNavigatorEventListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTargetNavigatorEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMediaPlaybackSeekRangeStartAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28321,9 +29363,8 @@ void CHIPTargetNavigatorEventListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28331,31 +29372,28 @@ void CHIPTargetNavigatorEventListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTargetNavigatorAttributeListAttributeCallback::CHIPTargetNavigatorAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CHIPMediaPlaybackGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28372,7 +29410,7 @@ CHIPTargetNavigatorAttributeListAttributeCallback::CHIPTargetNavigatorAttributeL } } -CHIPTargetNavigatorAttributeListAttributeCallback::~CHIPTargetNavigatorAttributeListAttributeCallback() +CHIPMediaPlaybackGeneratedCommandListAttributeCallback::~CHIPMediaPlaybackGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28383,8 +29421,8 @@ CHIPTargetNavigatorAttributeListAttributeCallback::~CHIPTargetNavigatorAttribute env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTargetNavigatorAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28393,8 +29431,8 @@ void CHIPTargetNavigatorAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28424,8 +29462,10 @@ void CHIPTargetNavigatorAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackStartTimeAttributeCallback::CHIPMediaPlaybackStartTimeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CHIPMediaPlaybackAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28441,7 +29481,7 @@ CHIPMediaPlaybackStartTimeAttributeCallback::CHIPMediaPlaybackStartTimeAttribute } } -CHIPMediaPlaybackStartTimeAttributeCallback::~CHIPMediaPlaybackStartTimeAttributeCallback() +CHIPMediaPlaybackAcceptedCommandListAttributeCallback::~CHIPMediaPlaybackAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28452,7 +29492,8 @@ CHIPMediaPlaybackStartTimeAttributeCallback::~CHIPMediaPlaybackStartTimeAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackStartTimeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28460,8 +29501,9 @@ void CHIPMediaPlaybackStartTimeAttributeCallback::CallbackFn(void * context, con jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28469,27 +29511,30 @@ void CHIPMediaPlaybackStartTimeAttributeCallback::CallbackFn(void * context, con ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackDurationAttributeCallback::CHIPMediaPlaybackDurationAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaPlaybackEventListAttributeCallback::CHIPMediaPlaybackEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28505,7 +29550,7 @@ CHIPMediaPlaybackDurationAttributeCallback::CHIPMediaPlaybackDurationAttributeCa } } -CHIPMediaPlaybackDurationAttributeCallback::~CHIPMediaPlaybackDurationAttributeCallback() +CHIPMediaPlaybackEventListAttributeCallback::~CHIPMediaPlaybackEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28516,7 +29561,8 @@ CHIPMediaPlaybackDurationAttributeCallback::~CHIPMediaPlaybackDurationAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackDurationAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPMediaPlaybackEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28524,8 +29570,9 @@ void CHIPMediaPlaybackDurationAttributeCallback::CallbackFn(void * context, cons jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28533,28 +29580,31 @@ void CHIPMediaPlaybackDurationAttributeCallback::CallbackFn(void * context, cons ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackSeekRangeEndAttributeCallback::CHIPMediaPlaybackSeekRangeEndAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPMediaPlaybackAttributeListAttributeCallback::CHIPMediaPlaybackAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28571,7 +29621,7 @@ CHIPMediaPlaybackSeekRangeEndAttributeCallback::CHIPMediaPlaybackSeekRangeEndAtt } } -CHIPMediaPlaybackSeekRangeEndAttributeCallback::~CHIPMediaPlaybackSeekRangeEndAttributeCallback() +CHIPMediaPlaybackAttributeListAttributeCallback::~CHIPMediaPlaybackAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28582,8 +29632,8 @@ CHIPMediaPlaybackSeekRangeEndAttributeCallback::~CHIPMediaPlaybackSeekRangeEndAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackSeekRangeEndAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPMediaPlaybackAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28591,8 +29641,9 @@ void CHIPMediaPlaybackSeekRangeEndAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28600,29 +29651,30 @@ void CHIPMediaPlaybackSeekRangeEndAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackSeekRangeStartAttributeCallback::CHIPMediaPlaybackSeekRangeStartAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPMediaInputInputListAttributeCallback::CHIPMediaInputInputListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28638,7 +29690,7 @@ CHIPMediaPlaybackSeekRangeStartAttributeCallback::CHIPMediaPlaybackSeekRangeStar } } -CHIPMediaPlaybackSeekRangeStartAttributeCallback::~CHIPMediaPlaybackSeekRangeStartAttributeCallback() +CHIPMediaInputInputListAttributeCallback::~CHIPMediaInputInputListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28649,8 +29701,9 @@ CHIPMediaPlaybackSeekRangeStartAttributeCallback::~CHIPMediaPlaybackSeekRangeSta env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackSeekRangeStartAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPMediaInputInputListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28658,8 +29711,9 @@ void CHIPMediaPlaybackSeekRangeStartAttributeCallback::CallbackFn(void * context jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28667,28 +29721,62 @@ void CHIPMediaPlaybackSeekRangeStartAttributeCallback::CallbackFn(void * context ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_index; + std::string newElement_0_indexClassName = "java/lang/Integer"; + std::string newElement_0_indexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_indexClassName.c_str(), newElement_0_indexCtorSignature.c_str(), entry_0.index, newElement_0_index); + jobject newElement_0_inputType; + std::string newElement_0_inputTypeClassName = "java/lang/Integer"; + std::string newElement_0_inputTypeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_inputTypeClassName.c_str(), newElement_0_inputTypeCtorSignature.c_str(), + static_cast(entry_0.inputType), newElement_0_inputType); + jobject newElement_0_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); + jobject newElement_0_description; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.description, newElement_0_description)); + + jclass inputInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MediaInputClusterInputInfoStruct", inputInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaInputClusterInputInfoStruct"); + return; + } + jmethodID inputInfoStructStructCtor_1 = + env->GetMethodID(inputInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;)V"); + if (inputInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaInputClusterInputInfoStruct constructor"); + return; + } + + newElement_0 = env->NewObject(inputInfoStructStructClass_1, inputInfoStructStructCtor_1, newElement_0_index, + newElement_0_inputType, newElement_0_name, newElement_0_description); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CHIPMediaPlaybackGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPMediaInputGeneratedCommandListAttributeCallback::CHIPMediaInputGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28705,7 +29793,7 @@ CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CHIPMediaPlaybackGenerat } } -CHIPMediaPlaybackGeneratedCommandListAttributeCallback::~CHIPMediaPlaybackGeneratedCommandListAttributeCallback() +CHIPMediaInputGeneratedCommandListAttributeCallback::~CHIPMediaInputGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28716,7 +29804,7 @@ CHIPMediaPlaybackGeneratedCommandListAttributeCallback::~CHIPMediaPlaybackGenera env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPMediaInputGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -28726,8 +29814,8 @@ void CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28757,9 +29845,9 @@ void CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CHIPMediaPlaybackAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPMediaInputAcceptedCommandListAttributeCallback::CHIPMediaInputAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28776,7 +29864,7 @@ CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CHIPMediaPlaybackAccepted } } -CHIPMediaPlaybackAcceptedCommandListAttributeCallback::~CHIPMediaPlaybackAcceptedCommandListAttributeCallback() +CHIPMediaInputAcceptedCommandListAttributeCallback::~CHIPMediaInputAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28787,7 +29875,7 @@ CHIPMediaPlaybackAcceptedCommandListAttributeCallback::~CHIPMediaPlaybackAccepte env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPMediaInputAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -28797,8 +29885,8 @@ void CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28828,8 +29916,8 @@ void CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackEventListAttributeCallback::CHIPMediaPlaybackEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMediaInputEventListAttributeCallback::CHIPMediaInputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28845,7 +29933,7 @@ CHIPMediaPlaybackEventListAttributeCallback::CHIPMediaPlaybackEventListAttribute } } -CHIPMediaPlaybackEventListAttributeCallback::~CHIPMediaPlaybackEventListAttributeCallback() +CHIPMediaInputEventListAttributeCallback::~CHIPMediaInputEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28856,8 +29944,8 @@ CHIPMediaPlaybackEventListAttributeCallback::~CHIPMediaPlaybackEventListAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMediaInputEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28866,8 +29954,8 @@ void CHIPMediaPlaybackEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28897,10 +29985,8 @@ void CHIPMediaPlaybackEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaPlaybackAttributeListAttributeCallback::CHIPMediaPlaybackAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPMediaInputAttributeListAttributeCallback::CHIPMediaInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28916,7 +30002,7 @@ CHIPMediaPlaybackAttributeListAttributeCallback::CHIPMediaPlaybackAttributeListA } } -CHIPMediaPlaybackAttributeListAttributeCallback::~CHIPMediaPlaybackAttributeListAttributeCallback() +CHIPMediaInputAttributeListAttributeCallback::~CHIPMediaInputAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28927,8 +30013,8 @@ CHIPMediaPlaybackAttributeListAttributeCallback::~CHIPMediaPlaybackAttributeList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaPlaybackAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMediaInputAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28937,8 +30023,8 @@ void CHIPMediaPlaybackAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -28968,8 +30054,10 @@ void CHIPMediaPlaybackAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaInputInputListAttributeCallback::CHIPMediaInputInputListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLowPowerGeneratedCommandListAttributeCallback::CHIPLowPowerGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28985,7 +30073,7 @@ CHIPMediaInputInputListAttributeCallback::CHIPMediaInputInputListAttributeCallba } } -CHIPMediaInputInputListAttributeCallback::~CHIPMediaInputInputListAttributeCallback() +CHIPLowPowerGeneratedCommandListAttributeCallback::~CHIPLowPowerGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28996,9 +30084,8 @@ CHIPMediaInputInputListAttributeCallback::~CHIPMediaInputInputListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaInputInputListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLowPowerGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29007,8 +30094,8 @@ void CHIPMediaInputInputListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29027,41 +30114,10 @@ void CHIPMediaInputInputListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_index; - std::string newElement_0_indexClassName = "java/lang/Integer"; - std::string newElement_0_indexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_indexClassName.c_str(), newElement_0_indexCtorSignature.c_str(), entry_0.index, newElement_0_index); - jobject newElement_0_inputType; - std::string newElement_0_inputTypeClassName = "java/lang/Integer"; - std::string newElement_0_inputTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_inputTypeClassName.c_str(), newElement_0_inputTypeCtorSignature.c_str(), - static_cast(entry_0.inputType), newElement_0_inputType); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jobject newElement_0_description; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.description, newElement_0_description)); - - jclass inputInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MediaInputClusterInputInfoStruct", inputInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaInputClusterInputInfoStruct"); - return; - } - jmethodID inputInfoStructStructCtor_1 = - env->GetMethodID(inputInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;)V"); - if (inputInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaInputClusterInputInfoStruct constructor"); - return; - } - - newElement_0 = env->NewObject(inputInfoStructStructClass_1, inputInfoStructStructCtor_1, newElement_0_index, - newElement_0_inputType, newElement_0_name, newElement_0_description); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -29069,9 +30125,9 @@ void CHIPMediaInputInputListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaInputGeneratedCommandListAttributeCallback::CHIPMediaInputGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLowPowerAcceptedCommandListAttributeCallback::CHIPLowPowerAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29088,7 +30144,7 @@ CHIPMediaInputGeneratedCommandListAttributeCallback::CHIPMediaInputGeneratedComm } } -CHIPMediaInputGeneratedCommandListAttributeCallback::~CHIPMediaInputGeneratedCommandListAttributeCallback() +CHIPLowPowerAcceptedCommandListAttributeCallback::~CHIPLowPowerAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29099,8 +30155,8 @@ CHIPMediaInputGeneratedCommandListAttributeCallback::~CHIPMediaInputGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaInputGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLowPowerAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29109,8 +30165,8 @@ void CHIPMediaInputGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29140,10 +30196,8 @@ void CHIPMediaInputGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaInputAcceptedCommandListAttributeCallback::CHIPMediaInputAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPLowPowerEventListAttributeCallback::CHIPLowPowerEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29159,7 +30213,7 @@ CHIPMediaInputAcceptedCommandListAttributeCallback::CHIPMediaInputAcceptedComman } } -CHIPMediaInputAcceptedCommandListAttributeCallback::~CHIPMediaInputAcceptedCommandListAttributeCallback() +CHIPLowPowerEventListAttributeCallback::~CHIPLowPowerEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29170,8 +30224,8 @@ CHIPMediaInputAcceptedCommandListAttributeCallback::~CHIPMediaInputAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaInputAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLowPowerEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29180,8 +30234,8 @@ void CHIPMediaInputAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29211,8 +30265,8 @@ void CHIPMediaInputAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaInputEventListAttributeCallback::CHIPMediaInputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLowPowerAttributeListAttributeCallback::CHIPLowPowerAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29228,7 +30282,7 @@ CHIPMediaInputEventListAttributeCallback::CHIPMediaInputEventListAttributeCallba } } -CHIPMediaInputEventListAttributeCallback::~CHIPMediaInputEventListAttributeCallback() +CHIPLowPowerAttributeListAttributeCallback::~CHIPLowPowerAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29239,8 +30293,8 @@ CHIPMediaInputEventListAttributeCallback::~CHIPMediaInputEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaInputEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29249,8 +30303,8 @@ void CHIPMediaInputEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29280,8 +30334,10 @@ void CHIPMediaInputEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaInputAttributeListAttributeCallback::CHIPMediaInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPKeypadInputGeneratedCommandListAttributeCallback::CHIPKeypadInputGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29297,7 +30353,7 @@ CHIPMediaInputAttributeListAttributeCallback::CHIPMediaInputAttributeListAttribu } } -CHIPMediaInputAttributeListAttributeCallback::~CHIPMediaInputAttributeListAttributeCallback() +CHIPKeypadInputGeneratedCommandListAttributeCallback::~CHIPKeypadInputGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29308,8 +30364,8 @@ CHIPMediaInputAttributeListAttributeCallback::~CHIPMediaInputAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaInputAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPKeypadInputGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29318,8 +30374,8 @@ void CHIPMediaInputAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29349,9 +30405,9 @@ void CHIPMediaInputAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLowPowerGeneratedCommandListAttributeCallback::CHIPLowPowerGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPKeypadInputAcceptedCommandListAttributeCallback::CHIPKeypadInputAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29368,7 +30424,7 @@ CHIPLowPowerGeneratedCommandListAttributeCallback::CHIPLowPowerGeneratedCommandL } } -CHIPLowPowerGeneratedCommandListAttributeCallback::~CHIPLowPowerGeneratedCommandListAttributeCallback() +CHIPKeypadInputAcceptedCommandListAttributeCallback::~CHIPKeypadInputAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29379,7 +30435,7 @@ CHIPLowPowerGeneratedCommandListAttributeCallback::~CHIPLowPowerGeneratedCommand env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLowPowerGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPKeypadInputAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29389,8 +30445,8 @@ void CHIPLowPowerGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29420,10 +30476,8 @@ void CHIPLowPowerGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLowPowerAcceptedCommandListAttributeCallback::CHIPLowPowerAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPKeypadInputEventListAttributeCallback::CHIPKeypadInputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29439,7 +30493,7 @@ CHIPLowPowerAcceptedCommandListAttributeCallback::CHIPLowPowerAcceptedCommandLis } } -CHIPLowPowerAcceptedCommandListAttributeCallback::~CHIPLowPowerAcceptedCommandListAttributeCallback() +CHIPKeypadInputEventListAttributeCallback::~CHIPKeypadInputEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29450,8 +30504,8 @@ CHIPLowPowerAcceptedCommandListAttributeCallback::~CHIPLowPowerAcceptedCommandLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLowPowerAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPKeypadInputEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29460,8 +30514,8 @@ void CHIPLowPowerAcceptedCommandListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29491,8 +30545,8 @@ void CHIPLowPowerAcceptedCommandListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLowPowerEventListAttributeCallback::CHIPLowPowerEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPKeypadInputAttributeListAttributeCallback::CHIPKeypadInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29508,7 +30562,7 @@ CHIPLowPowerEventListAttributeCallback::CHIPLowPowerEventListAttributeCallback(j } } -CHIPLowPowerEventListAttributeCallback::~CHIPLowPowerEventListAttributeCallback() +CHIPKeypadInputAttributeListAttributeCallback::~CHIPKeypadInputAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29519,8 +30573,8 @@ CHIPLowPowerEventListAttributeCallback::~CHIPLowPowerEventListAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLowPowerEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPKeypadInputAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29529,8 +30583,8 @@ void CHIPLowPowerEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29560,8 +30614,10 @@ void CHIPLowPowerEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLowPowerAttributeListAttributeCallback::CHIPLowPowerAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPContentLauncherAcceptHeaderAttributeCallback::CHIPContentLauncherAcceptHeaderAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29577,7 +30633,7 @@ CHIPLowPowerAttributeListAttributeCallback::CHIPLowPowerAttributeListAttributeCa } } -CHIPLowPowerAttributeListAttributeCallback::~CHIPLowPowerAttributeListAttributeCallback() +CHIPContentLauncherAcceptHeaderAttributeCallback::~CHIPContentLauncherAcceptHeaderAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29588,8 +30644,8 @@ CHIPLowPowerAttributeListAttributeCallback::~CHIPLowPowerAttributeListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPContentLauncherAcceptHeaderAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29598,8 +30654,8 @@ void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29618,10 +30674,7 @@ void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -29629,9 +30682,9 @@ void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPKeypadInputGeneratedCommandListAttributeCallback::CHIPKeypadInputGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPContentLauncherGeneratedCommandListAttributeCallback::CHIPContentLauncherGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29648,7 +30701,7 @@ CHIPKeypadInputGeneratedCommandListAttributeCallback::CHIPKeypadInputGeneratedCo } } -CHIPKeypadInputGeneratedCommandListAttributeCallback::~CHIPKeypadInputGeneratedCommandListAttributeCallback() +CHIPContentLauncherGeneratedCommandListAttributeCallback::~CHIPContentLauncherGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29659,7 +30712,7 @@ CHIPKeypadInputGeneratedCommandListAttributeCallback::~CHIPKeypadInputGeneratedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPKeypadInputGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPContentLauncherGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29669,8 +30722,8 @@ void CHIPKeypadInputGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29700,9 +30753,9 @@ void CHIPKeypadInputGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPKeypadInputAcceptedCommandListAttributeCallback::CHIPKeypadInputAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPContentLauncherAcceptedCommandListAttributeCallback::CHIPContentLauncherAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29719,7 +30772,7 @@ CHIPKeypadInputAcceptedCommandListAttributeCallback::CHIPKeypadInputAcceptedComm } } -CHIPKeypadInputAcceptedCommandListAttributeCallback::~CHIPKeypadInputAcceptedCommandListAttributeCallback() +CHIPContentLauncherAcceptedCommandListAttributeCallback::~CHIPContentLauncherAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29730,7 +30783,7 @@ CHIPKeypadInputAcceptedCommandListAttributeCallback::~CHIPKeypadInputAcceptedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPKeypadInputAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPContentLauncherAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29740,8 +30793,8 @@ void CHIPKeypadInputAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29771,8 +30824,8 @@ void CHIPKeypadInputAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPKeypadInputEventListAttributeCallback::CHIPKeypadInputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPContentLauncherEventListAttributeCallback::CHIPContentLauncherEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29788,7 +30841,7 @@ CHIPKeypadInputEventListAttributeCallback::CHIPKeypadInputEventListAttributeCall } } -CHIPKeypadInputEventListAttributeCallback::~CHIPKeypadInputEventListAttributeCallback() +CHIPContentLauncherEventListAttributeCallback::~CHIPContentLauncherEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29799,8 +30852,8 @@ CHIPKeypadInputEventListAttributeCallback::~CHIPKeypadInputEventListAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPKeypadInputEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPContentLauncherEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29809,8 +30862,8 @@ void CHIPKeypadInputEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29840,8 +30893,10 @@ void CHIPKeypadInputEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPKeypadInputAttributeListAttributeCallback::CHIPKeypadInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPContentLauncherAttributeListAttributeCallback::CHIPContentLauncherAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29857,7 +30912,7 @@ CHIPKeypadInputAttributeListAttributeCallback::CHIPKeypadInputAttributeListAttri } } -CHIPKeypadInputAttributeListAttributeCallback::~CHIPKeypadInputAttributeListAttributeCallback() +CHIPContentLauncherAttributeListAttributeCallback::~CHIPContentLauncherAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29868,8 +30923,8 @@ CHIPKeypadInputAttributeListAttributeCallback::~CHIPKeypadInputAttributeListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPKeypadInputAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPContentLauncherAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29878,8 +30933,8 @@ void CHIPKeypadInputAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29909,10 +30964,8 @@ void CHIPKeypadInputAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPContentLauncherAcceptHeaderAttributeCallback::CHIPContentLauncherAcceptHeaderAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPAudioOutputOutputListAttributeCallback::CHIPAudioOutputOutputListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29928,7 +30981,7 @@ CHIPContentLauncherAcceptHeaderAttributeCallback::CHIPContentLauncherAcceptHeade } } -CHIPContentLauncherAcceptHeaderAttributeCallback::~CHIPContentLauncherAcceptHeaderAttributeCallback() +CHIPAudioOutputOutputListAttributeCallback::~CHIPAudioOutputOutputListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29939,8 +30992,9 @@ CHIPContentLauncherAcceptHeaderAttributeCallback::~CHIPContentLauncherAcceptHead env->DeleteGlobalRef(javaCallbackRef); } -void CHIPContentLauncherAcceptHeaderAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAudioOutputOutputListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29949,8 +31003,8 @@ void CHIPContentLauncherAcceptHeaderAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29969,7 +31023,38 @@ void CHIPContentLauncherAcceptHeaderAttributeCallback::CallbackFn(void * context { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + jobject newElement_0_index; + std::string newElement_0_indexClassName = "java/lang/Integer"; + std::string newElement_0_indexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_indexClassName.c_str(), newElement_0_indexCtorSignature.c_str(), entry_0.index, newElement_0_index); + jobject newElement_0_outputType; + std::string newElement_0_outputTypeClassName = "java/lang/Integer"; + std::string newElement_0_outputTypeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_outputTypeClassName.c_str(), newElement_0_outputTypeCtorSignature.c_str(), + static_cast(entry_0.outputType), newElement_0_outputType); + jobject newElement_0_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); + + jclass outputInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$AudioOutputClusterOutputInfoStruct", outputInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AudioOutputClusterOutputInfoStruct"); + return; + } + jmethodID outputInfoStructStructCtor_1 = env->GetMethodID(outputInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V"); + if (outputInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$AudioOutputClusterOutputInfoStruct constructor"); + return; + } + + newElement_0 = env->NewObject(outputInfoStructStructClass_1, outputInfoStructStructCtor_1, newElement_0_index, + newElement_0_outputType, newElement_0_name); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -29977,9 +31062,9 @@ void CHIPContentLauncherAcceptHeaderAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPContentLauncherGeneratedCommandListAttributeCallback::CHIPContentLauncherGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPAudioOutputGeneratedCommandListAttributeCallback::CHIPAudioOutputGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29996,7 +31081,7 @@ CHIPContentLauncherGeneratedCommandListAttributeCallback::CHIPContentLauncherGen } } -CHIPContentLauncherGeneratedCommandListAttributeCallback::~CHIPContentLauncherGeneratedCommandListAttributeCallback() +CHIPAudioOutputGeneratedCommandListAttributeCallback::~CHIPAudioOutputGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30007,7 +31092,7 @@ CHIPContentLauncherGeneratedCommandListAttributeCallback::~CHIPContentLauncherGe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPContentLauncherGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPAudioOutputGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -30017,8 +31102,8 @@ void CHIPContentLauncherGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30048,9 +31133,9 @@ void CHIPContentLauncherGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPContentLauncherAcceptedCommandListAttributeCallback::CHIPContentLauncherAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPAudioOutputAcceptedCommandListAttributeCallback::CHIPAudioOutputAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30067,7 +31152,7 @@ CHIPContentLauncherAcceptedCommandListAttributeCallback::CHIPContentLauncherAcce } } -CHIPContentLauncherAcceptedCommandListAttributeCallback::~CHIPContentLauncherAcceptedCommandListAttributeCallback() +CHIPAudioOutputAcceptedCommandListAttributeCallback::~CHIPAudioOutputAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30078,7 +31163,7 @@ CHIPContentLauncherAcceptedCommandListAttributeCallback::~CHIPContentLauncherAcc env->DeleteGlobalRef(javaCallbackRef); } -void CHIPContentLauncherAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPAudioOutputAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -30088,8 +31173,8 @@ void CHIPContentLauncherAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30119,8 +31204,8 @@ void CHIPContentLauncherAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPContentLauncherEventListAttributeCallback::CHIPContentLauncherEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAudioOutputEventListAttributeCallback::CHIPAudioOutputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30136,7 +31221,7 @@ CHIPContentLauncherEventListAttributeCallback::CHIPContentLauncherEventListAttri } } -CHIPContentLauncherEventListAttributeCallback::~CHIPContentLauncherEventListAttributeCallback() +CHIPAudioOutputEventListAttributeCallback::~CHIPAudioOutputEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30147,8 +31232,8 @@ CHIPContentLauncherEventListAttributeCallback::~CHIPContentLauncherEventListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPContentLauncherEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAudioOutputEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30157,8 +31242,8 @@ void CHIPContentLauncherEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30188,10 +31273,8 @@ void CHIPContentLauncherEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPContentLauncherAttributeListAttributeCallback::CHIPContentLauncherAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPAudioOutputAttributeListAttributeCallback::CHIPAudioOutputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30207,7 +31290,7 @@ CHIPContentLauncherAttributeListAttributeCallback::CHIPContentLauncherAttributeL } } -CHIPContentLauncherAttributeListAttributeCallback::~CHIPContentLauncherAttributeListAttributeCallback() +CHIPAudioOutputAttributeListAttributeCallback::~CHIPAudioOutputAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30218,8 +31301,8 @@ CHIPContentLauncherAttributeListAttributeCallback::~CHIPContentLauncherAttribute env->DeleteGlobalRef(javaCallbackRef); } -void CHIPContentLauncherAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAudioOutputAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30228,8 +31311,8 @@ void CHIPContentLauncherAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30259,8 +31342,10 @@ void CHIPContentLauncherAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAudioOutputOutputListAttributeCallback::CHIPAudioOutputOutputListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPApplicationLauncherCatalogListAttributeCallback::CHIPApplicationLauncherCatalogListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30276,7 +31361,7 @@ CHIPAudioOutputOutputListAttributeCallback::CHIPAudioOutputOutputListAttributeCa } } -CHIPAudioOutputOutputListAttributeCallback::~CHIPAudioOutputOutputListAttributeCallback() +CHIPApplicationLauncherCatalogListAttributeCallback::~CHIPApplicationLauncherCatalogListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30287,9 +31372,8 @@ CHIPAudioOutputOutputListAttributeCallback::~CHIPAudioOutputOutputListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAudioOutputOutputListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPApplicationLauncherCatalogListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30298,8 +31382,8 @@ void CHIPAudioOutputOutputListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30318,38 +31402,10 @@ void CHIPAudioOutputOutputListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_index; - std::string newElement_0_indexClassName = "java/lang/Integer"; - std::string newElement_0_indexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_indexClassName.c_str(), newElement_0_indexCtorSignature.c_str(), entry_0.index, newElement_0_index); - jobject newElement_0_outputType; - std::string newElement_0_outputTypeClassName = "java/lang/Integer"; - std::string newElement_0_outputTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_outputTypeClassName.c_str(), newElement_0_outputTypeCtorSignature.c_str(), - static_cast(entry_0.outputType), newElement_0_outputType); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - - jclass outputInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AudioOutputClusterOutputInfoStruct", outputInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$AudioOutputClusterOutputInfoStruct"); - return; - } - jmethodID outputInfoStructStructCtor_1 = env->GetMethodID(outputInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V"); - if (outputInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AudioOutputClusterOutputInfoStruct constructor"); - return; - } - - newElement_0 = env->NewObject(outputInfoStructStructClass_1, outputInfoStructStructCtor_1, newElement_0_index, - newElement_0_outputType, newElement_0_name); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -30357,9 +31413,9 @@ void CHIPAudioOutputOutputListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAudioOutputGeneratedCommandListAttributeCallback::CHIPAudioOutputGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CHIPApplicationLauncherGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30376,7 +31432,7 @@ CHIPAudioOutputGeneratedCommandListAttributeCallback::CHIPAudioOutputGeneratedCo } } -CHIPAudioOutputGeneratedCommandListAttributeCallback::~CHIPAudioOutputGeneratedCommandListAttributeCallback() +CHIPApplicationLauncherGeneratedCommandListAttributeCallback::~CHIPApplicationLauncherGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30387,7 +31443,7 @@ CHIPAudioOutputGeneratedCommandListAttributeCallback::~CHIPAudioOutputGeneratedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAudioOutputGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -30397,8 +31453,8 @@ void CHIPAudioOutputGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30428,9 +31484,9 @@ void CHIPAudioOutputGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAudioOutputAcceptedCommandListAttributeCallback::CHIPAudioOutputAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CHIPApplicationLauncherAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30447,7 +31503,7 @@ CHIPAudioOutputAcceptedCommandListAttributeCallback::CHIPAudioOutputAcceptedComm } } -CHIPAudioOutputAcceptedCommandListAttributeCallback::~CHIPAudioOutputAcceptedCommandListAttributeCallback() +CHIPApplicationLauncherAcceptedCommandListAttributeCallback::~CHIPApplicationLauncherAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30458,7 +31514,7 @@ CHIPAudioOutputAcceptedCommandListAttributeCallback::~CHIPAudioOutputAcceptedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAudioOutputAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -30468,8 +31524,8 @@ void CHIPAudioOutputAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30499,8 +31555,10 @@ void CHIPAudioOutputAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAudioOutputEventListAttributeCallback::CHIPAudioOutputEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPApplicationLauncherEventListAttributeCallback::CHIPApplicationLauncherEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30516,7 +31574,7 @@ CHIPAudioOutputEventListAttributeCallback::CHIPAudioOutputEventListAttributeCall } } -CHIPAudioOutputEventListAttributeCallback::~CHIPAudioOutputEventListAttributeCallback() +CHIPApplicationLauncherEventListAttributeCallback::~CHIPApplicationLauncherEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30527,8 +31585,8 @@ CHIPAudioOutputEventListAttributeCallback::~CHIPAudioOutputEventListAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAudioOutputEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPApplicationLauncherEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30537,8 +31595,8 @@ void CHIPAudioOutputEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30568,8 +31626,10 @@ void CHIPAudioOutputEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAudioOutputAttributeListAttributeCallback::CHIPAudioOutputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPApplicationLauncherAttributeListAttributeCallback::CHIPApplicationLauncherAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30585,7 +31645,7 @@ CHIPAudioOutputAttributeListAttributeCallback::CHIPAudioOutputAttributeListAttri } } -CHIPAudioOutputAttributeListAttributeCallback::~CHIPAudioOutputAttributeListAttributeCallback() +CHIPApplicationLauncherAttributeListAttributeCallback::~CHIPApplicationLauncherAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30596,8 +31656,8 @@ CHIPAudioOutputAttributeListAttributeCallback::~CHIPAudioOutputAttributeListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAudioOutputAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30606,8 +31666,8 @@ void CHIPAudioOutputAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30637,9 +31697,9 @@ void CHIPAudioOutputAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationLauncherCatalogListAttributeCallback::CHIPApplicationLauncherCatalogListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPApplicationBasicAllowedVendorListAttributeCallback::CHIPApplicationBasicAllowedVendorListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30656,7 +31716,7 @@ CHIPApplicationLauncherCatalogListAttributeCallback::CHIPApplicationLauncherCata } } -CHIPApplicationLauncherCatalogListAttributeCallback::~CHIPApplicationLauncherCatalogListAttributeCallback() +CHIPApplicationBasicAllowedVendorListAttributeCallback::~CHIPApplicationBasicAllowedVendorListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30666,9 +31726,9 @@ CHIPApplicationLauncherCatalogListAttributeCallback::~CHIPApplicationLauncherCat } env->DeleteGlobalRef(javaCallbackRef); } - -void CHIPApplicationLauncherCatalogListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) + +void CHIPApplicationBasicAllowedVendorListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30677,8 +31737,8 @@ void CHIPApplicationLauncherCatalogListAttributeCallback::CallbackFn(void * cont VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30699,8 +31759,8 @@ void CHIPApplicationLauncherCatalogListAttributeCallback::CallbackFn(void * cont jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -30708,9 +31768,9 @@ void CHIPApplicationLauncherCatalogListAttributeCallback::CallbackFn(void * cont env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CHIPApplicationLauncherGeneratedCommandListAttributeCallback( +CHIPApplicationBasicGeneratedCommandListAttributeCallback::CHIPApplicationBasicGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30727,7 +31787,7 @@ CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CHIPApplicationLau } } -CHIPApplicationLauncherGeneratedCommandListAttributeCallback::~CHIPApplicationLauncherGeneratedCommandListAttributeCallback() +CHIPApplicationBasicGeneratedCommandListAttributeCallback::~CHIPApplicationBasicGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30738,7 +31798,7 @@ CHIPApplicationLauncherGeneratedCommandListAttributeCallback::~CHIPApplicationLa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPApplicationBasicGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -30748,8 +31808,8 @@ void CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30779,9 +31839,9 @@ void CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CHIPApplicationLauncherAcceptedCommandListAttributeCallback( +CHIPApplicationBasicAcceptedCommandListAttributeCallback::CHIPApplicationBasicAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30798,7 +31858,7 @@ CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CHIPApplicationLaun } } -CHIPApplicationLauncherAcceptedCommandListAttributeCallback::~CHIPApplicationLauncherAcceptedCommandListAttributeCallback() +CHIPApplicationBasicAcceptedCommandListAttributeCallback::~CHIPApplicationBasicAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30809,7 +31869,7 @@ CHIPApplicationLauncherAcceptedCommandListAttributeCallback::~CHIPApplicationLau env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPApplicationBasicAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -30819,8 +31879,8 @@ void CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30850,9 +31910,9 @@ void CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationLauncherEventListAttributeCallback::CHIPApplicationLauncherEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPApplicationBasicEventListAttributeCallback::CHIPApplicationBasicEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30869,7 +31929,7 @@ CHIPApplicationLauncherEventListAttributeCallback::CHIPApplicationLauncherEventL } } -CHIPApplicationLauncherEventListAttributeCallback::~CHIPApplicationLauncherEventListAttributeCallback() +CHIPApplicationBasicEventListAttributeCallback::~CHIPApplicationBasicEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30880,8 +31940,8 @@ CHIPApplicationLauncherEventListAttributeCallback::~CHIPApplicationLauncherEvent env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationLauncherEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPApplicationBasicEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -30890,8 +31950,8 @@ void CHIPApplicationLauncherEventListAttributeCallback::CallbackFn(void * contex VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30921,9 +31981,9 @@ void CHIPApplicationLauncherEventListAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationLauncherAttributeListAttributeCallback::CHIPApplicationLauncherAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPApplicationBasicAttributeListAttributeCallback::CHIPApplicationBasicAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -30940,7 +32000,7 @@ CHIPApplicationLauncherAttributeListAttributeCallback::CHIPApplicationLauncherAt } } -CHIPApplicationLauncherAttributeListAttributeCallback::~CHIPApplicationLauncherAttributeListAttributeCallback() +CHIPApplicationBasicAttributeListAttributeCallback::~CHIPApplicationBasicAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -30951,7 +32011,7 @@ CHIPApplicationLauncherAttributeListAttributeCallback::~CHIPApplicationLauncherA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( +void CHIPApplicationBasicAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -30961,8 +32021,8 @@ void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -30992,9 +32052,9 @@ void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationBasicAllowedVendorListAttributeCallback::CHIPApplicationBasicAllowedVendorListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPAccountLoginGeneratedCommandListAttributeCallback::CHIPAccountLoginGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -31011,7 +32071,7 @@ CHIPApplicationBasicAllowedVendorListAttributeCallback::CHIPApplicationBasicAllo } } -CHIPApplicationBasicAllowedVendorListAttributeCallback::~CHIPApplicationBasicAllowedVendorListAttributeCallback() +CHIPAccountLoginGeneratedCommandListAttributeCallback::~CHIPAccountLoginGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31022,8 +32082,8 @@ CHIPApplicationBasicAllowedVendorListAttributeCallback::~CHIPApplicationBasicAll env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationBasicAllowedVendorListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAccountLoginGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -31032,8 +32092,8 @@ void CHIPApplicationBasicAllowedVendorListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -31052,10 +32112,10 @@ void CHIPApplicationBasicAllowedVendorListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -31063,9 +32123,9 @@ void CHIPApplicationBasicAllowedVendorListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationBasicGeneratedCommandListAttributeCallback::CHIPApplicationBasicGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPAccountLoginAcceptedCommandListAttributeCallback::CHIPAccountLoginAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -31082,7 +32142,7 @@ CHIPApplicationBasicGeneratedCommandListAttributeCallback::CHIPApplicationBasicG } } -CHIPApplicationBasicGeneratedCommandListAttributeCallback::~CHIPApplicationBasicGeneratedCommandListAttributeCallback() +CHIPAccountLoginAcceptedCommandListAttributeCallback::~CHIPAccountLoginAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31093,7 +32153,7 @@ CHIPApplicationBasicGeneratedCommandListAttributeCallback::~CHIPApplicationBasic env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationBasicGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPAccountLoginAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -31103,8 +32163,8 @@ void CHIPApplicationBasicGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -31134,10 +32194,8 @@ void CHIPApplicationBasicGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationBasicAcceptedCommandListAttributeCallback::CHIPApplicationBasicAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPAccountLoginEventListAttributeCallback::CHIPAccountLoginEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31153,7 +32211,7 @@ CHIPApplicationBasicAcceptedCommandListAttributeCallback::CHIPApplicationBasicAc } } -CHIPApplicationBasicAcceptedCommandListAttributeCallback::~CHIPApplicationBasicAcceptedCommandListAttributeCallback() +CHIPAccountLoginEventListAttributeCallback::~CHIPAccountLoginEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31164,8 +32222,8 @@ CHIPApplicationBasicAcceptedCommandListAttributeCallback::~CHIPApplicationBasicA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationBasicAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAccountLoginEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -31174,8 +32232,8 @@ void CHIPApplicationBasicAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -31205,9 +32263,9 @@ void CHIPApplicationBasicAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationBasicEventListAttributeCallback::CHIPApplicationBasicEventListAttributeCallback(jobject javaCallback, +CHIPAccountLoginAttributeListAttributeCallback::CHIPAccountLoginAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -31224,7 +32282,7 @@ CHIPApplicationBasicEventListAttributeCallback::CHIPApplicationBasicEventListAtt } } -CHIPApplicationBasicEventListAttributeCallback::~CHIPApplicationBasicEventListAttributeCallback() +CHIPAccountLoginAttributeListAttributeCallback::~CHIPAccountLoginAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31235,8 +32293,8 @@ CHIPApplicationBasicEventListAttributeCallback::~CHIPApplicationBasicEventListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationBasicEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAccountLoginAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -31245,8 +32303,8 @@ void CHIPApplicationBasicEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -31276,9 +32334,9 @@ void CHIPApplicationBasicEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationBasicAttributeListAttributeCallback::CHIPApplicationBasicAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::CHIPElectricalMeasurementGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -31295,7 +32353,7 @@ CHIPApplicationBasicAttributeListAttributeCallback::CHIPApplicationBasicAttribut } } -CHIPApplicationBasicAttributeListAttributeCallback::~CHIPApplicationBasicAttributeListAttributeCallback() +CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::~CHIPElectricalMeasurementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31306,8 +32364,8 @@ CHIPApplicationBasicAttributeListAttributeCallback::~CHIPApplicationBasicAttribu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationBasicAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -31316,8 +32374,8 @@ void CHIPApplicationBasicAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -31347,9 +32405,9 @@ void CHIPApplicationBasicAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccountLoginGeneratedCommandListAttributeCallback::CHIPAccountLoginGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::CHIPElectricalMeasurementAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -31366,7 +32424,7 @@ CHIPAccountLoginGeneratedCommandListAttributeCallback::CHIPAccountLoginGenerated } } -CHIPAccountLoginGeneratedCommandListAttributeCallback::~CHIPAccountLoginGeneratedCommandListAttributeCallback() +CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::~CHIPElectricalMeasurementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31377,7 +32435,7 @@ CHIPAccountLoginGeneratedCommandListAttributeCallback::~CHIPAccountLoginGenerate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccountLoginGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -31387,8 +32445,8 @@ void CHIPAccountLoginGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -31418,9 +32476,9 @@ void CHIPAccountLoginGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccountLoginAcceptedCommandListAttributeCallback::CHIPAccountLoginAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPElectricalMeasurementEventListAttributeCallback::CHIPElectricalMeasurementEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -31437,7 +32495,7 @@ CHIPAccountLoginAcceptedCommandListAttributeCallback::CHIPAccountLoginAcceptedCo } } -CHIPAccountLoginAcceptedCommandListAttributeCallback::~CHIPAccountLoginAcceptedCommandListAttributeCallback() +CHIPElectricalMeasurementEventListAttributeCallback::~CHIPElectricalMeasurementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31448,8 +32506,8 @@ CHIPAccountLoginAcceptedCommandListAttributeCallback::~CHIPAccountLoginAcceptedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccountLoginAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPElectricalMeasurementEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -31458,8 +32516,8 @@ void CHIPAccountLoginAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -31489,8 +32547,10 @@ void CHIPAccountLoginAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccountLoginEventListAttributeCallback::CHIPAccountLoginEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPElectricalMeasurementAttributeListAttributeCallback::CHIPElectricalMeasurementAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31506,7 +32566,7 @@ CHIPAccountLoginEventListAttributeCallback::CHIPAccountLoginEventListAttributeCa } } -CHIPAccountLoginEventListAttributeCallback::~CHIPAccountLoginEventListAttributeCallback() +CHIPElectricalMeasurementAttributeListAttributeCallback::~CHIPElectricalMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31517,8 +32577,8 @@ CHIPAccountLoginEventListAttributeCallback::~CHIPAccountLoginEventListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccountLoginEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPElectricalMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -31527,8 +32587,8 @@ void CHIPAccountLoginEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -31558,9 +32618,9 @@ void CHIPAccountLoginEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccountLoginAttributeListAttributeCallback::CHIPAccountLoginAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPClientMonitoringExpectedClientsAttributeCallback::CHIPClientMonitoringExpectedClientsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -31577,7 +32637,7 @@ CHIPAccountLoginAttributeListAttributeCallback::CHIPAccountLoginAttributeListAtt } } -CHIPAccountLoginAttributeListAttributeCallback::~CHIPAccountLoginAttributeListAttributeCallback() +CHIPClientMonitoringExpectedClientsAttributeCallback::~CHIPClientMonitoringExpectedClientsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31588,8 +32648,10 @@ CHIPAccountLoginAttributeListAttributeCallback::~CHIPAccountLoginAttributeListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccountLoginAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPClientMonitoringExpectedClientsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistrationStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -31598,8 +32660,8 @@ void CHIPAccountLoginAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -31618,10 +32680,43 @@ void CHIPAccountLoginAttributeListAttributeCallback::CallbackFn(void * context, { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jobject newElement_0_clientNodeID; + std::string newElement_0_clientNodeIDClassName = "java/lang/Long"; + std::string newElement_0_clientNodeIDCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_clientNodeIDClassName.c_str(), + newElement_0_clientNodeIDCtorSignature.c_str(), + entry_0.clientNodeID, newElement_0_clientNodeID); + jobject newElement_0_key; + jbyteArray newElement_0_keyByteArray = env->NewByteArray(static_cast(entry_0.key.size())); + env->SetByteArrayRegion(newElement_0_keyByteArray, 0, static_cast(entry_0.key.size()), + reinterpret_cast(entry_0.key.data())); + newElement_0_key = newElement_0_keyByteArray; + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + entry_0.fabricIndex, newElement_0_fabricIndex); + + jclass monitoringRegistrationStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ClientMonitoringClusterMonitoringRegistrationStruct", + monitoringRegistrationStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ClientMonitoringClusterMonitoringRegistrationStruct"); + return; + } + jmethodID monitoringRegistrationStructStructCtor_1 = + env->GetMethodID(monitoringRegistrationStructStructClass_1, "", "(Ljava/lang/Long;[BLjava/lang/Integer;)V"); + if (monitoringRegistrationStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ClientMonitoringClusterMonitoringRegistrationStruct constructor"); + return; + } + + newElement_0 = env->NewObject(monitoringRegistrationStructStructClass_1, monitoringRegistrationStructStructCtor_1, + newElement_0_clientNodeID, newElement_0_key, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -31629,9 +32724,9 @@ void CHIPAccountLoginAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::CHIPElectricalMeasurementGeneratedCommandListAttributeCallback( +CHIPClientMonitoringGeneratedCommandListAttributeCallback::CHIPClientMonitoringGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -31648,7 +32743,7 @@ CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::CHIPElectricalMe } } -CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::~CHIPElectricalMeasurementGeneratedCommandListAttributeCallback() +CHIPClientMonitoringGeneratedCommandListAttributeCallback::~CHIPClientMonitoringGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31659,7 +32754,7 @@ CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::~CHIPElectricalM env->DeleteGlobalRef(javaCallbackRef); } -void CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPClientMonitoringGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -31669,8 +32764,8 @@ void CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -31700,9 +32795,9 @@ void CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::CHIPElectricalMeasurementAcceptedCommandListAttributeCallback( +CHIPClientMonitoringAcceptedCommandListAttributeCallback::CHIPClientMonitoringAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -31719,7 +32814,7 @@ CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::CHIPElectricalMea } } -CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::~CHIPElectricalMeasurementAcceptedCommandListAttributeCallback() +CHIPClientMonitoringAcceptedCommandListAttributeCallback::~CHIPClientMonitoringAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31730,7 +32825,7 @@ CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::~CHIPElectricalMe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPClientMonitoringAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -31740,8 +32835,8 @@ void CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -31771,9 +32866,9 @@ void CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPElectricalMeasurementEventListAttributeCallback::CHIPElectricalMeasurementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPClientMonitoringEventListAttributeCallback::CHIPClientMonitoringEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -31790,7 +32885,7 @@ CHIPElectricalMeasurementEventListAttributeCallback::CHIPElectricalMeasurementEv } } -CHIPElectricalMeasurementEventListAttributeCallback::~CHIPElectricalMeasurementEventListAttributeCallback() +CHIPClientMonitoringEventListAttributeCallback::~CHIPClientMonitoringEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31801,8 +32896,8 @@ CHIPElectricalMeasurementEventListAttributeCallback::~CHIPElectricalMeasurementE env->DeleteGlobalRef(javaCallbackRef); } -void CHIPElectricalMeasurementEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPClientMonitoringEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -31811,8 +32906,8 @@ void CHIPElectricalMeasurementEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -31842,9 +32937,9 @@ void CHIPElectricalMeasurementEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPElectricalMeasurementAttributeListAttributeCallback::CHIPElectricalMeasurementAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPClientMonitoringAttributeListAttributeCallback::CHIPClientMonitoringAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -31861,7 +32956,7 @@ CHIPElectricalMeasurementAttributeListAttributeCallback::CHIPElectricalMeasureme } } -CHIPElectricalMeasurementAttributeListAttributeCallback::~CHIPElectricalMeasurementAttributeListAttributeCallback() +CHIPClientMonitoringAttributeListAttributeCallback::~CHIPClientMonitoringAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -31872,7 +32967,7 @@ CHIPElectricalMeasurementAttributeListAttributeCallback::~CHIPElectricalMeasurem env->DeleteGlobalRef(javaCallbackRef); } -void CHIPElectricalMeasurementAttributeListAttributeCallback::CallbackFn( +void CHIPClientMonitoringAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -31882,8 +32977,8 @@ void CHIPElectricalMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 9bf694f16f5f5a..184891a635adad 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -10171,6 +10171,480 @@ private native void subscribeClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); } + public static class TimeSynchronizationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 56L; + + public TimeSynchronizationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void setUTCTime( + DefaultClusterCallback callback, + Long UTCTime, + Integer granularity, + Optional timeSource) { + setUTCTime(chipClusterPtr, callback, UTCTime, granularity, timeSource, null); + } + + public void setUTCTime( + DefaultClusterCallback callback, + Long UTCTime, + Integer granularity, + Optional timeSource, + int timedInvokeTimeoutMs) { + setUTCTime(chipClusterPtr, callback, UTCTime, granularity, timeSource, timedInvokeTimeoutMs); + } + + public void setTrustedTimeSource( + DefaultClusterCallback callback, + @Nullable + ChipStructs.TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct + trustedTimeSource) { + setTrustedTimeSource(chipClusterPtr, callback, trustedTimeSource, null); + } + + public void setTrustedTimeSource( + DefaultClusterCallback callback, + @Nullable + ChipStructs.TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct + trustedTimeSource, + int timedInvokeTimeoutMs) { + setTrustedTimeSource(chipClusterPtr, callback, trustedTimeSource, timedInvokeTimeoutMs); + } + + public void setTimeZone( + SetTimeZoneResponseCallback callback, + ArrayList timeZone) { + setTimeZone(chipClusterPtr, callback, timeZone, null); + } + + public void setTimeZone( + SetTimeZoneResponseCallback callback, + ArrayList timeZone, + int timedInvokeTimeoutMs) { + setTimeZone(chipClusterPtr, callback, timeZone, timedInvokeTimeoutMs); + } + + public void setDSTOffset( + DefaultClusterCallback callback, + ArrayList DSTOffset) { + setDSTOffset(chipClusterPtr, callback, DSTOffset, null); + } + + public void setDSTOffset( + DefaultClusterCallback callback, + ArrayList DSTOffset, + int timedInvokeTimeoutMs) { + setDSTOffset(chipClusterPtr, callback, DSTOffset, timedInvokeTimeoutMs); + } + + public void setDefaultNTP(DefaultClusterCallback callback, @Nullable String defaultNTP) { + setDefaultNTP(chipClusterPtr, callback, defaultNTP, null); + } + + public void setDefaultNTP( + DefaultClusterCallback callback, @Nullable String defaultNTP, int timedInvokeTimeoutMs) { + setDefaultNTP(chipClusterPtr, callback, defaultNTP, timedInvokeTimeoutMs); + } + + private native void setUTCTime( + long chipClusterPtr, + DefaultClusterCallback Callback, + Long UTCTime, + Integer granularity, + Optional timeSource, + @Nullable Integer timedInvokeTimeoutMs); + + private native void setTrustedTimeSource( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable + ChipStructs.TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct + trustedTimeSource, + @Nullable Integer timedInvokeTimeoutMs); + + private native void setTimeZone( + long chipClusterPtr, + SetTimeZoneResponseCallback Callback, + ArrayList timeZone, + @Nullable Integer timedInvokeTimeoutMs); + + private native void setDSTOffset( + long chipClusterPtr, + DefaultClusterCallback Callback, + ArrayList DSTOffset, + @Nullable Integer timedInvokeTimeoutMs); + + private native void setDefaultNTP( + long chipClusterPtr, + DefaultClusterCallback Callback, + @Nullable String defaultNTP, + @Nullable Integer timedInvokeTimeoutMs); + + public interface SetTimeZoneResponseCallback { + void onSuccess(Boolean DSTOffsetRequired); + + void onError(Exception error); + } + + public interface UTCTimeAttributeCallback { + void onSuccess(@Nullable Long value); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface DefaultNTPAttributeCallback { + void onSuccess(@Nullable String value); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface TimeZoneAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface DSTOffsetAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface LocalTimeAttributeCallback { + void onSuccess(@Nullable Long value); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface GeneratedCommandListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface AcceptedCommandListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface EventListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readUTCTimeAttribute(UTCTimeAttributeCallback callback) { + readUTCTimeAttribute(chipClusterPtr, callback); + } + + public void subscribeUTCTimeAttribute( + UTCTimeAttributeCallback callback, int minInterval, int maxInterval) { + subscribeUTCTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGranularityAttribute(IntegerAttributeCallback callback) { + readGranularityAttribute(chipClusterPtr, callback); + } + + public void subscribeGranularityAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeGranularityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTimeSourceAttribute(IntegerAttributeCallback callback) { + readTimeSourceAttribute(chipClusterPtr, callback); + } + + public void subscribeTimeSourceAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeTimeSourceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDefaultNTPAttribute(DefaultNTPAttributeCallback callback) { + readDefaultNTPAttribute(chipClusterPtr, callback); + } + + public void subscribeDefaultNTPAttribute( + DefaultNTPAttributeCallback callback, int minInterval, int maxInterval) { + subscribeDefaultNTPAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTimeZoneAttribute(TimeZoneAttributeCallback callback) { + readTimeZoneAttribute(chipClusterPtr, callback); + } + + public void subscribeTimeZoneAttribute( + TimeZoneAttributeCallback callback, int minInterval, int maxInterval) { + subscribeTimeZoneAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDSTOffsetAttribute(DSTOffsetAttributeCallback callback) { + readDSTOffsetAttribute(chipClusterPtr, callback); + } + + public void subscribeDSTOffsetAttribute( + DSTOffsetAttributeCallback callback, int minInterval, int maxInterval) { + subscribeDSTOffsetAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLocalTimeAttribute(LocalTimeAttributeCallback callback) { + readLocalTimeAttribute(chipClusterPtr, callback); + } + + public void subscribeLocalTimeAttribute( + LocalTimeAttributeCallback callback, int minInterval, int maxInterval) { + subscribeLocalTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTimeZoneDatabaseAttribute(IntegerAttributeCallback callback) { + readTimeZoneDatabaseAttribute(chipClusterPtr, callback); + } + + public void subscribeTimeZoneDatabaseAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeTimeZoneDatabaseAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNTPServerAvailableAttribute(BooleanAttributeCallback callback) { + readNTPServerAvailableAttribute(chipClusterPtr, callback); + } + + public void subscribeNTPServerAvailableAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + subscribeNTPServerAvailableAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTimeZoneListMaxSizeAttribute(IntegerAttributeCallback callback) { + readTimeZoneListMaxSizeAttribute(chipClusterPtr, callback); + } + + public void subscribeTimeZoneListMaxSizeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeTimeZoneListMaxSizeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDSTOffsetListMaxSizeAttribute(IntegerAttributeCallback callback) { + readDSTOffsetListMaxSizeAttribute(chipClusterPtr, callback); + } + + public void subscribeDSTOffsetListMaxSizeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeDSTOffsetListMaxSizeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportsDNSResolveAttribute(BooleanAttributeCallback callback) { + readSupportsDNSResolveAttribute(chipClusterPtr, callback); + } + + public void subscribeSupportsDNSResolveAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + subscribeSupportsDNSResolveAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute(GeneratedCommandListAttributeCallback callback) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute(AcceptedCommandListAttributeCallback callback) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute(EventListAttributeCallback callback) { + readEventListAttribute(chipClusterPtr, callback); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute(LongAttributeCallback callback) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readUTCTimeAttribute( + long chipClusterPtr, UTCTimeAttributeCallback callback); + + private native void subscribeUTCTimeAttribute( + long chipClusterPtr, UTCTimeAttributeCallback callback, int minInterval, int maxInterval); + + private native void readGranularityAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeGranularityAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readTimeSourceAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeTimeSourceAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readDefaultNTPAttribute( + long chipClusterPtr, DefaultNTPAttributeCallback callback); + + private native void subscribeDefaultNTPAttribute( + long chipClusterPtr, + DefaultNTPAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readTimeZoneAttribute( + long chipClusterPtr, TimeZoneAttributeCallback callback); + + private native void subscribeTimeZoneAttribute( + long chipClusterPtr, TimeZoneAttributeCallback callback, int minInterval, int maxInterval); + + private native void readDSTOffsetAttribute( + long chipClusterPtr, DSTOffsetAttributeCallback callback); + + private native void subscribeDSTOffsetAttribute( + long chipClusterPtr, DSTOffsetAttributeCallback callback, int minInterval, int maxInterval); + + private native void readLocalTimeAttribute( + long chipClusterPtr, LocalTimeAttributeCallback callback); + + private native void subscribeLocalTimeAttribute( + long chipClusterPtr, LocalTimeAttributeCallback callback, int minInterval, int maxInterval); + + private native void readTimeZoneDatabaseAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeTimeZoneDatabaseAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readNTPServerAvailableAttribute( + long chipClusterPtr, BooleanAttributeCallback callback); + + private native void subscribeNTPServerAvailableAttribute( + long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); + + private native void readTimeZoneListMaxSizeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeTimeZoneListMaxSizeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readDSTOffsetListMaxSizeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeDSTOffsetListMaxSizeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readSupportsDNSResolveAttribute( + long chipClusterPtr, BooleanAttributeCallback callback); + + private native void subscribeSupportsDNSResolveAttribute( + long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute( + long chipClusterPtr, GeneratedCommandListAttributeCallback callback); + + private native void subscribeGeneratedCommandListAttribute( + long chipClusterPtr, + GeneratedCommandListAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readAcceptedCommandListAttribute( + long chipClusterPtr, AcceptedCommandListAttributeCallback callback); + + private native void subscribeAcceptedCommandListAttribute( + long chipClusterPtr, + AcceptedCommandListAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readEventListAttribute( + long chipClusterPtr, EventListAttributeCallback callback); + + private native void subscribeEventListAttribute( + long chipClusterPtr, EventListAttributeCallback callback, int minInterval, int maxInterval); + + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void subscribeFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + } + public static class BridgedDeviceBasicInformationCluster extends BaseChipCluster { public static final long CLUSTER_ID = 57L; @@ -27560,6 +28034,255 @@ private native void subscribeClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); } + public static class ClientMonitoringCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 4166L; + + public ClientMonitoringCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void registerClientMonitoring( + RegisterClientMonitoringResponseCallback callback, Long clientNodeID, byte[] key) { + registerClientMonitoring(chipClusterPtr, callback, clientNodeID, key, null); + } + + public void registerClientMonitoring( + RegisterClientMonitoringResponseCallback callback, + Long clientNodeID, + byte[] key, + int timedInvokeTimeoutMs) { + registerClientMonitoring(chipClusterPtr, callback, clientNodeID, key, timedInvokeTimeoutMs); + } + + private native void registerClientMonitoring( + long chipClusterPtr, + RegisterClientMonitoringResponseCallback Callback, + Long clientNodeID, + byte[] key, + @Nullable Integer timedInvokeTimeoutMs); + + public interface ExpectedClientsAttributeCallback { + void onSuccess( + List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface GeneratedCommandListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface AcceptedCommandListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface EventListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readIdleModeIntervalAttribute(LongAttributeCallback callback) { + readIdleModeIntervalAttribute(chipClusterPtr, callback); + } + + public void subscribeIdleModeIntervalAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeIdleModeIntervalAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveModeIntervalAttribute(LongAttributeCallback callback) { + readActiveModeIntervalAttribute(chipClusterPtr, callback); + } + + public void subscribeActiveModeIntervalAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeActiveModeIntervalAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveModeThresholdAttribute(IntegerAttributeCallback callback) { + readActiveModeThresholdAttribute(chipClusterPtr, callback); + } + + public void subscribeActiveModeThresholdAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeActiveModeThresholdAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readExpectedClientsAttribute(ExpectedClientsAttributeCallback callback) { + readExpectedClientsAttribute(chipClusterPtr, callback); + } + + public void subscribeExpectedClientsAttribute( + ExpectedClientsAttributeCallback callback, int minInterval, int maxInterval) { + subscribeExpectedClientsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readICDCounterAttribute(LongAttributeCallback callback) { + readICDCounterAttribute(chipClusterPtr, callback); + } + + public void subscribeICDCounterAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeICDCounterAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute(GeneratedCommandListAttributeCallback callback) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute(AcceptedCommandListAttributeCallback callback) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute(EventListAttributeCallback callback) { + readEventListAttribute(chipClusterPtr, callback); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute(LongAttributeCallback callback) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readIdleModeIntervalAttribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void subscribeIdleModeIntervalAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + + private native void readActiveModeIntervalAttribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void subscribeActiveModeIntervalAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + + private native void readActiveModeThresholdAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeActiveModeThresholdAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readExpectedClientsAttribute( + long chipClusterPtr, ExpectedClientsAttributeCallback callback); + + private native void subscribeExpectedClientsAttribute( + long chipClusterPtr, + ExpectedClientsAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readICDCounterAttribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void subscribeICDCounterAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute( + long chipClusterPtr, GeneratedCommandListAttributeCallback callback); + + private native void subscribeGeneratedCommandListAttribute( + long chipClusterPtr, + GeneratedCommandListAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readAcceptedCommandListAttribute( + long chipClusterPtr, AcceptedCommandListAttributeCallback callback); + + private native void subscribeAcceptedCommandListAttribute( + long chipClusterPtr, + AcceptedCommandListAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readEventListAttribute( + long chipClusterPtr, EventListAttributeCallback callback); + + private native void subscribeEventListAttribute( + long chipClusterPtr, EventListAttributeCallback callback, int minInterval, int maxInterval); + + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void subscribeFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + } + public static class UnitTestingCluster extends BaseChipCluster { public static final long CLUSTER_ID = 4294048773L; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java index 9f079111c14841..222ed166cc4333 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java @@ -653,6 +653,88 @@ public String toString() { } } + public static class TimeSynchronizationClusterDSTTableEmptyEvent { + + public TimeSynchronizationClusterDSTTableEmptyEvent() {} + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TimeSynchronizationClusterDSTTableEmptyEvent {\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TimeSynchronizationClusterDSTStatusEvent { + public Boolean DSTOffsetActive; + + public TimeSynchronizationClusterDSTStatusEvent(Boolean DSTOffsetActive) { + this.DSTOffsetActive = DSTOffsetActive; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TimeSynchronizationClusterDSTStatusEvent {\n"); + output.append("\tDSTOffsetActive: "); + output.append(DSTOffsetActive); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TimeSynchronizationClusterTimeZoneStatusEvent { + public Long offset; + public Optional name; + + public TimeSynchronizationClusterTimeZoneStatusEvent(Long offset, Optional name) { + this.offset = offset; + this.name = name; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TimeSynchronizationClusterTimeZoneStatusEvent {\n"); + output.append("\toffset: "); + output.append(offset); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TimeSynchronizationClusterTimeFailureEvent { + + public TimeSynchronizationClusterTimeFailureEvent() {} + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TimeSynchronizationClusterTimeFailureEvent {\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TimeSynchronizationClusterMissingTrustedTimeSourceEvent { + + public TimeSynchronizationClusterMissingTrustedTimeSourceEvent() {} + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TimeSynchronizationClusterMissingTrustedTimeSourceEvent {\n"); + output.append("}\n"); + return output.toString(); + } + } + public static class BridgedDeviceBasicInformationClusterStartUpEvent { public Long softwareVersion; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index b50c4ff62cc48e..b14f33ed935d1b 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -106,6 +106,9 @@ public static String clusterIdToName(long clusterId) { if (clusterId == 55L) { return "EthernetNetworkDiagnostics"; } + if (clusterId == 56L) { + return "TimeSynchronization"; + } if (clusterId == 57L) { return "BridgedDeviceBasicInformation"; } @@ -217,6 +220,9 @@ public static String clusterIdToName(long clusterId) { if (clusterId == 2820L) { return "ElectricalMeasurement"; } + if (clusterId == 4166L) { + return "ClientMonitoring"; + } if (clusterId == 4294048773L) { return "UnitTesting"; } @@ -1473,6 +1479,66 @@ public static String attributeIdToName(long clusterId, long attributeId) { } return ""; } + if (clusterId == 56L) { + if (attributeId == 0L) { + return "UTCTime"; + } + if (attributeId == 1L) { + return "Granularity"; + } + if (attributeId == 2L) { + return "TimeSource"; + } + if (attributeId == 3L) { + return "TrustedTimeSource"; + } + if (attributeId == 4L) { + return "DefaultNTP"; + } + if (attributeId == 5L) { + return "TimeZone"; + } + if (attributeId == 6L) { + return "DSTOffset"; + } + if (attributeId == 7L) { + return "LocalTime"; + } + if (attributeId == 8L) { + return "TimeZoneDatabase"; + } + if (attributeId == 9L) { + return "NTPServerAvailable"; + } + if (attributeId == 10L) { + return "TimeZoneListMaxSize"; + } + if (attributeId == 11L) { + return "DSTOffsetListMaxSize"; + } + if (attributeId == 12L) { + return "SupportsDNSResolve"; + } + if (attributeId == 65528L) { + return "GeneratedCommandList"; + } + if (attributeId == 65529L) { + return "AcceptedCommandList"; + } + if (attributeId == 65530L) { + return "EventList"; + } + if (attributeId == 65531L) { + return "AttributeList"; + } + if (attributeId == 65532L) { + return "FeatureMap"; + } + if (attributeId == 65533L) { + return "ClusterRevision"; + } + return ""; + } if (clusterId == 57L) { if (attributeId == 1L) { return "VendorName"; @@ -3618,6 +3684,42 @@ public static String attributeIdToName(long clusterId, long attributeId) { } return ""; } + if (clusterId == 4166L) { + if (attributeId == 0L) { + return "IdleModeInterval"; + } + if (attributeId == 1L) { + return "ActiveModeInterval"; + } + if (attributeId == 2L) { + return "ActiveModeThreshold"; + } + if (attributeId == 3L) { + return "ExpectedClients"; + } + if (attributeId == 4L) { + return "ICDCounter"; + } + if (attributeId == 65528L) { + return "GeneratedCommandList"; + } + if (attributeId == 65529L) { + return "AcceptedCommandList"; + } + if (attributeId == 65530L) { + return "EventList"; + } + if (attributeId == 65531L) { + return "AttributeList"; + } + if (attributeId == 65532L) { + return "FeatureMap"; + } + if (attributeId == 65533L) { + return "ClusterRevision"; + } + return ""; + } if (clusterId == 4294048773L) { if (attributeId == 0L) { return "Boolean"; @@ -4046,6 +4148,24 @@ public static String eventIdToName(long clusterId, long eventId) { if (clusterId == 55L) { return ""; } + if (clusterId == 56L) { + if (eventId == 0L) { + return "DSTTableEmpty"; + } + if (eventId == 1L) { + return "DSTStatus"; + } + if (eventId == 2L) { + return "TimeZoneStatus"; + } + if (eventId == 3L) { + return "TimeFailure"; + } + if (eventId == 4L) { + return "MissingTrustedTimeSource"; + } + return ""; + } if (clusterId == 57L) { if (eventId == 0L) { return "StartUp"; @@ -4259,6 +4379,9 @@ public static String eventIdToName(long clusterId, long eventId) { if (clusterId == 2820L) { return ""; } + if (clusterId == 4166L) { + return ""; + } if (clusterId == 4294048773L) { if (eventId == 1L) { return "TestEvent"; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java index 18d55b362c7b68..56d6db04196f79 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -1029,6 +1029,121 @@ public String toString() { } } + public static class TimeSynchronizationClusterDSTOffsetStruct { + public Long offset; + public Long validStarting; + public @Nullable Long validUntil; + + public TimeSynchronizationClusterDSTOffsetStruct( + Long offset, Long validStarting, @Nullable Long validUntil) { + this.offset = offset; + this.validStarting = validStarting; + this.validUntil = validUntil; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TimeSynchronizationClusterDSTOffsetStruct {\n"); + output.append("\toffset: "); + output.append(offset); + output.append("\n"); + output.append("\tvalidStarting: "); + output.append(validStarting); + output.append("\n"); + output.append("\tvalidUntil: "); + output.append(validUntil); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { + public Long nodeID; + public Integer endpoint; + + public TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( + Long nodeID, Integer endpoint) { + this.nodeID = nodeID; + this.endpoint = endpoint; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct {\n"); + output.append("\tnodeID: "); + output.append(nodeID); + output.append("\n"); + output.append("\tendpoint: "); + output.append(endpoint); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TimeSynchronizationClusterTimeZoneStruct { + public Long offset; + public Long validAt; + public Optional name; + + public TimeSynchronizationClusterTimeZoneStruct( + Long offset, Long validAt, Optional name) { + this.offset = offset; + this.validAt = validAt; + this.name = name; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TimeSynchronizationClusterTimeZoneStruct {\n"); + output.append("\toffset: "); + output.append(offset); + output.append("\n"); + output.append("\tvalidAt: "); + output.append(validAt); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TimeSynchronizationClusterTrustedTimeSourceStruct { + public Integer fabricIndex; + public Long nodeID; + public Integer endpoint; + + public TimeSynchronizationClusterTrustedTimeSourceStruct( + Integer fabricIndex, Long nodeID, Integer endpoint) { + this.fabricIndex = fabricIndex; + this.nodeID = nodeID; + this.endpoint = endpoint; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TimeSynchronizationClusterTrustedTimeSourceStruct {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("\tnodeID: "); + output.append(nodeID); + output.append("\n"); + output.append("\tendpoint: "); + output.append(endpoint); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + public static class BridgedDeviceBasicInformationClusterProductAppearanceStruct { public Integer finish; public @Nullable Integer primaryColor; @@ -1880,6 +1995,36 @@ public String toString() { } } + public static class ClientMonitoringClusterMonitoringRegistrationStruct { + public Long clientNodeID; + public byte[] key; + public Integer fabricIndex; + + public ClientMonitoringClusterMonitoringRegistrationStruct( + Long clientNodeID, byte[] key, Integer fabricIndex) { + this.clientNodeID = clientNodeID; + this.key = key; + this.fabricIndex = fabricIndex; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ClientMonitoringClusterMonitoringRegistrationStruct {\n"); + output.append("\tclientNodeID: "); + output.append(clientNodeID); + output.append("\n"); + output.append("\tkey: "); + output.append(Arrays.toString(key)); + output.append("\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + public static class UnitTestingClusterSimpleStruct { public Integer a; public Boolean b; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 8a8a431885d0f2..50652f79758d51 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -5258,6 +5258,251 @@ public void onError(Exception ex) { } } + public static class DelegatedTimeSynchronizationClusterSetTimeZoneResponseCallback + implements ChipClusters.TimeSynchronizationCluster.SetTimeZoneResponseCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Boolean DSTOffsetRequired) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo DSTOffsetRequiredResponseValue = + new CommandResponseInfo("DSTOffsetRequired", "Boolean"); + responseValues.put(DSTOffsetRequiredResponseValue, DSTOffsetRequired); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedTimeSynchronizationClusterUTCTimeAttributeCallback + implements ChipClusters.TimeSynchronizationCluster.UTCTimeAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTimeSynchronizationClusterDefaultNTPAttributeCallback + implements ChipClusters.TimeSynchronizationCluster.DefaultNTPAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable String value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "String"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTimeSynchronizationClusterTimeZoneAttributeCallback + implements ChipClusters.TimeSynchronizationCluster.TimeZoneAttributeCallback, + 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 DelegatedTimeSynchronizationClusterDSTOffsetAttributeCallback + implements ChipClusters.TimeSynchronizationCluster.DSTOffsetAttributeCallback, + 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 DelegatedTimeSynchronizationClusterLocalTimeAttributeCallback + implements ChipClusters.TimeSynchronizationCluster.LocalTimeAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTimeSynchronizationClusterGeneratedCommandListAttributeCallback + implements ChipClusters.TimeSynchronizationCluster.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 DelegatedTimeSynchronizationClusterAcceptedCommandListAttributeCallback + implements ChipClusters.TimeSynchronizationCluster.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 DelegatedTimeSynchronizationClusterEventListAttributeCallback + implements ChipClusters.TimeSynchronizationCluster.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 DelegatedTimeSynchronizationClusterAttributeListAttributeCallback + implements ChipClusters.TimeSynchronizationCluster.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 DelegatedBridgedDeviceBasicInformationClusterGeneratedCommandListAttributeCallback implements ChipClusters.BridgedDeviceBasicInformationCluster @@ -11897,6 +12142,129 @@ public void onError(Exception ex) { } } + public static class DelegatedClientMonitoringClusterExpectedClientsAttributeCallback + implements ChipClusters.ClientMonitoringCluster.ExpectedClientsAttributeCallback, + 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 DelegatedClientMonitoringClusterGeneratedCommandListAttributeCallback + implements ChipClusters.ClientMonitoringCluster.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 DelegatedClientMonitoringClusterAcceptedCommandListAttributeCallback + implements ChipClusters.ClientMonitoringCluster.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 DelegatedClientMonitoringClusterEventListAttributeCallback + implements ChipClusters.ClientMonitoringCluster.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 DelegatedClientMonitoringClusterAttributeListAttributeCallback + implements ChipClusters.ClientMonitoringCluster.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 DelegatedUnitTestingClusterTestSpecificResponseCallback implements ChipClusters.UnitTestingCluster.TestSpecificResponseCallback, DelegatedClusterCallback { @@ -13271,6 +13639,11 @@ public Map initializeClusterMap() { new ChipClusters.EthernetNetworkDiagnosticsCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("ethernetNetworkDiagnostics", ethernetNetworkDiagnosticsClusterInfo); + ClusterInfo timeSynchronizationClusterInfo = + new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.TimeSynchronizationCluster(ptr, endpointId), + new HashMap<>()); + clusterMap.put("timeSynchronization", timeSynchronizationClusterInfo); ClusterInfo bridgedDeviceBasicInformationClusterInfo = new ClusterInfo( (ptr, endpointId) -> @@ -13460,6 +13833,11 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.ElectricalMeasurementCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("electricalMeasurement", electricalMeasurementClusterInfo); + ClusterInfo clientMonitoringClusterInfo = + new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.ClientMonitoringCluster(ptr, endpointId), + new HashMap<>()); + clusterMap.put("clientMonitoring", clientMonitoringClusterInfo); ClusterInfo unitTestingClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.UnitTestingCluster(ptr, endpointId), @@ -13511,6 +13889,7 @@ public void combineCommand( destination .get("ethernetNetworkDiagnostics") .combineCommands(source.get("ethernetNetworkDiagnostics")); + destination.get("timeSynchronization").combineCommands(source.get("timeSynchronization")); destination .get("bridgedDeviceBasicInformation") .combineCommands(source.get("bridgedDeviceBasicInformation")); @@ -13558,6 +13937,7 @@ public void combineCommand( destination.get("applicationBasic").combineCommands(source.get("applicationBasic")); destination.get("accountLogin").combineCommands(source.get("accountLogin")); destination.get("electricalMeasurement").combineCommands(source.get("electricalMeasurement")); + destination.get("clientMonitoring").combineCommands(source.get("clientMonitoring")); destination.get("unitTesting").combineCommands(source.get("unitTesting")); } @@ -15166,6 +15546,105 @@ public Map> getCommandMap() { "resetCounts", ethernetNetworkDiagnosticsresetCountsInteractionInfo); commandMap.put( "ethernetNetworkDiagnostics", ethernetNetworkDiagnosticsClusterInteractionInfoMap); + Map timeSynchronizationClusterInteractionInfoMap = + new LinkedHashMap<>(); + Map timeSynchronizationsetUTCTimeCommandParams = + new LinkedHashMap(); + CommandParameterInfo timeSynchronizationsetUTCTimeUTCTimeCommandParameterInfo = + new CommandParameterInfo("UTCTime", Long.class, Long.class); + timeSynchronizationsetUTCTimeCommandParams.put( + "UTCTime", timeSynchronizationsetUTCTimeUTCTimeCommandParameterInfo); + + CommandParameterInfo timeSynchronizationsetUTCTimegranularityCommandParameterInfo = + new CommandParameterInfo("granularity", Integer.class, Integer.class); + timeSynchronizationsetUTCTimeCommandParams.put( + "granularity", timeSynchronizationsetUTCTimegranularityCommandParameterInfo); + + CommandParameterInfo timeSynchronizationsetUTCTimetimeSourceCommandParameterInfo = + new CommandParameterInfo("timeSource", Optional.class, Integer.class); + timeSynchronizationsetUTCTimeCommandParams.put( + "timeSource", timeSynchronizationsetUTCTimetimeSourceCommandParameterInfo); + + InteractionInfo timeSynchronizationsetUTCTimeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .setUTCTime( + (DefaultClusterCallback) callback, + (Long) commandArguments.get("UTCTime"), + (Integer) commandArguments.get("granularity"), + (Optional) commandArguments.get("timeSource")); + }, + () -> new DelegatedDefaultClusterCallback(), + timeSynchronizationsetUTCTimeCommandParams); + timeSynchronizationClusterInteractionInfoMap.put( + "setUTCTime", timeSynchronizationsetUTCTimeInteractionInfo); + Map timeSynchronizationsetTrustedTimeSourceCommandParams = + new LinkedHashMap(); + InteractionInfo timeSynchronizationsetTrustedTimeSourceInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .setTrustedTimeSource( + (DefaultClusterCallback) callback, + (ChipStructs.TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct) + commandArguments.get("trustedTimeSource")); + }, + () -> new DelegatedDefaultClusterCallback(), + timeSynchronizationsetTrustedTimeSourceCommandParams); + timeSynchronizationClusterInteractionInfoMap.put( + "setTrustedTimeSource", timeSynchronizationsetTrustedTimeSourceInteractionInfo); + Map timeSynchronizationsetTimeZoneCommandParams = + new LinkedHashMap(); + InteractionInfo timeSynchronizationsetTimeZoneInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .setTimeZone( + (ChipClusters.TimeSynchronizationCluster.SetTimeZoneResponseCallback) + callback, + (ArrayList) + commandArguments.get("timeZone")); + }, + () -> new DelegatedTimeSynchronizationClusterSetTimeZoneResponseCallback(), + timeSynchronizationsetTimeZoneCommandParams); + timeSynchronizationClusterInteractionInfoMap.put( + "setTimeZone", timeSynchronizationsetTimeZoneInteractionInfo); + Map timeSynchronizationsetDSTOffsetCommandParams = + new LinkedHashMap(); + InteractionInfo timeSynchronizationsetDSTOffsetInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .setDSTOffset( + (DefaultClusterCallback) callback, + (ArrayList) + commandArguments.get("DSTOffset")); + }, + () -> new DelegatedDefaultClusterCallback(), + timeSynchronizationsetDSTOffsetCommandParams); + timeSynchronizationClusterInteractionInfoMap.put( + "setDSTOffset", timeSynchronizationsetDSTOffsetInteractionInfo); + Map timeSynchronizationsetDefaultNTPCommandParams = + new LinkedHashMap(); + CommandParameterInfo timeSynchronizationsetDefaultNTPdefaultNTPCommandParameterInfo = + new CommandParameterInfo("defaultNTP", String.class, String.class); + timeSynchronizationsetDefaultNTPCommandParams.put( + "defaultNTP", timeSynchronizationsetDefaultNTPdefaultNTPCommandParameterInfo); + + InteractionInfo timeSynchronizationsetDefaultNTPInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TimeSynchronizationCluster) cluster) + .setDefaultNTP( + (DefaultClusterCallback) callback, + (String) commandArguments.get("defaultNTP")); + }, + () -> new DelegatedDefaultClusterCallback(), + timeSynchronizationsetDefaultNTPCommandParams); + timeSynchronizationClusterInteractionInfoMap.put( + "setDefaultNTP", timeSynchronizationsetDefaultNTPInteractionInfo); + commandMap.put("timeSynchronization", timeSynchronizationClusterInteractionInfoMap); Map bridgedDeviceBasicInformationClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put( @@ -17691,6 +18170,35 @@ public Map> getCommandMap() { Map electricalMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("electricalMeasurement", electricalMeasurementClusterInteractionInfoMap); + Map clientMonitoringClusterInteractionInfoMap = new LinkedHashMap<>(); + Map clientMonitoringregisterClientMonitoringCommandParams = + new LinkedHashMap(); + CommandParameterInfo clientMonitoringregisterClientMonitoringclientNodeIDCommandParameterInfo = + new CommandParameterInfo("clientNodeID", Long.class, Long.class); + clientMonitoringregisterClientMonitoringCommandParams.put( + "clientNodeID", clientMonitoringregisterClientMonitoringclientNodeIDCommandParameterInfo); + + CommandParameterInfo clientMonitoringregisterClientMonitoringkeyCommandParameterInfo = + new CommandParameterInfo("key", byte[].class, byte[].class); + clientMonitoringregisterClientMonitoringCommandParams.put( + "key", clientMonitoringregisterClientMonitoringkeyCommandParameterInfo); + + InteractionInfo clientMonitoringregisterClientMonitoringInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ClientMonitoringCluster) cluster) + .registerClientMonitoring( + (ChipClusters.ClientMonitoringCluster + .RegisterClientMonitoringResponseCallback) + callback, + (Long) commandArguments.get("clientNodeID"), + (byte[]) commandArguments.get("key")); + }, + () -> new DelegatedClientMonitoringClusterRegisterClientMonitoringResponseCallback(), + clientMonitoringregisterClientMonitoringCommandParams); + clientMonitoringClusterInteractionInfoMap.put( + "registerClientMonitoring", clientMonitoringregisterClientMonitoringInteractionInfo); + commandMap.put("clientMonitoring", clientMonitoringClusterInteractionInfoMap); Map unitTestingClusterInteractionInfoMap = new LinkedHashMap<>(); Map unitTestingtestCommandParams = new LinkedHashMap(); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index ed20a2b7b89283..4a5a2dbe0fa744 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3097,6 +3097,170 @@ class ChipClusters: }, }, } + _TIME_SYNCHRONIZATION_CLUSTER_INFO = { + "clusterName": "TimeSynchronization", + "clusterId": 0x00000038, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "SetUTCTime", + "args": { + "UTCTime": "int", + "granularity": "int", + "timeSource": "int", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "SetTrustedTimeSource", + "args": { + "nodeID": "int", + "endpoint": "int", + }, + }, + 0x00000002: { + "commandId": 0x00000002, + "commandName": "SetTimeZone", + "args": { + "offset": "int", + "validAt": "int", + "name": "str", + }, + }, + 0x00000004: { + "commandId": 0x00000004, + "commandName": "SetDSTOffset", + "args": { + "offset": "int", + "validStarting": "int", + "validUntil": "int", + }, + }, + 0x00000005: { + "commandId": 0x00000005, + "commandName": "SetDefaultNTP", + "args": { + "defaultNTP": "str", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "UTCTime", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "Granularity", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "TimeSource", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x00000003: { + "attributeName": "TrustedTimeSource", + "attributeId": 0x00000003, + "type": "", + "reportable": True, + }, + 0x00000004: { + "attributeName": "DefaultNTP", + "attributeId": 0x00000004, + "type": "str", + "reportable": True, + }, + 0x00000005: { + "attributeName": "TimeZone", + "attributeId": 0x00000005, + "type": "", + "reportable": True, + }, + 0x00000006: { + "attributeName": "DSTOffset", + "attributeId": 0x00000006, + "type": "", + "reportable": True, + }, + 0x00000007: { + "attributeName": "LocalTime", + "attributeId": 0x00000007, + "type": "int", + "reportable": True, + }, + 0x00000008: { + "attributeName": "TimeZoneDatabase", + "attributeId": 0x00000008, + "type": "int", + "reportable": True, + }, + 0x00000009: { + "attributeName": "NTPServerAvailable", + "attributeId": 0x00000009, + "type": "bool", + "reportable": True, + }, + 0x0000000A: { + "attributeName": "TimeZoneListMaxSize", + "attributeId": 0x0000000A, + "type": "int", + "reportable": True, + }, + 0x0000000B: { + "attributeName": "DSTOffsetListMaxSize", + "attributeId": 0x0000000B, + "type": "int", + "reportable": True, + }, + 0x0000000C: { + "attributeName": "SupportsDNSResolve", + "attributeId": 0x0000000C, + "type": "bool", + "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, + }, + }, + } _BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_INFO = { "clusterName": "BridgedDeviceBasicInformation", "clusterId": 0x00000039, @@ -8379,6 +8543,88 @@ class ChipClusters: }, }, } + _CLIENT_MONITORING_CLUSTER_INFO = { + "clusterName": "ClientMonitoring", + "clusterId": 0x00001046, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "RegisterClientMonitoring", + "args": { + "clientNodeID": "int", + "key": "bytes", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "IdleModeInterval", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "ActiveModeInterval", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "ActiveModeThreshold", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x00000003: { + "attributeName": "ExpectedClients", + "attributeId": 0x00000003, + "type": "", + "reportable": True, + }, + 0x00000004: { + "attributeName": "ICDCounter", + "attributeId": 0x00000004, + "type": "int", + "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, + }, + }, + } _UNIT_TESTING_CLUSTER_INFO = { "clusterName": "UnitTesting", "clusterId": 0xFFF1FC05, @@ -9186,6 +9432,7 @@ class ChipClusters: 0x00000035: _THREAD_NETWORK_DIAGNOSTICS_CLUSTER_INFO, 0x00000036: _WI_FI_NETWORK_DIAGNOSTICS_CLUSTER_INFO, 0x00000037: _ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_INFO, + 0x00000038: _TIME_SYNCHRONIZATION_CLUSTER_INFO, 0x00000039: _BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_INFO, 0x0000003B: _SWITCH_CLUSTER_INFO, 0x0000003C: _ADMINISTRATOR_COMMISSIONING_CLUSTER_INFO, @@ -9223,6 +9470,7 @@ class ChipClusters: 0x0000050D: _APPLICATION_BASIC_CLUSTER_INFO, 0x0000050E: _ACCOUNT_LOGIN_CLUSTER_INFO, 0x00000B04: _ELECTRICAL_MEASUREMENT_CLUSTER_INFO, + 0x00001046: _CLIENT_MONITORING_CLUSTER_INFO, 0xFFF1FC05: _UNIT_TESTING_CLUSTER_INFO, } @@ -9254,6 +9502,7 @@ class ChipClusters: "ThreadNetworkDiagnostics": _THREAD_NETWORK_DIAGNOSTICS_CLUSTER_INFO, "WiFiNetworkDiagnostics": _WI_FI_NETWORK_DIAGNOSTICS_CLUSTER_INFO, "EthernetNetworkDiagnostics": _ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_INFO, + "TimeSynchronization": _TIME_SYNCHRONIZATION_CLUSTER_INFO, "BridgedDeviceBasicInformation": _BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_INFO, "Switch": _SWITCH_CLUSTER_INFO, "AdministratorCommissioning": _ADMINISTRATOR_COMMISSIONING_CLUSTER_INFO, @@ -9291,6 +9540,7 @@ class ChipClusters: "ApplicationBasic": _APPLICATION_BASIC_CLUSTER_INFO, "AccountLogin": _ACCOUNT_LOGIN_CLUSTER_INFO, "ElectricalMeasurement": _ELECTRICAL_MEASUREMENT_CLUSTER_INFO, + "ClientMonitoring": _CLIENT_MONITORING_CLUSTER_INFO, "UnitTesting": _UNIT_TESTING_CLUSTER_INFO, } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index c46841fe3ea27f..373616ad1b1f5c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -4112,6 +4112,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("DSTOffsetRequired", indent + 1, value.DSTOffsetRequired)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const OperationalCredentials::Commands::AttestationResponse::DecodableType & value) { @@ -4340,6 +4348,15 @@ DataModelLogger::LogValue(const char * label, size_t indent, DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const ClientMonitoring::Commands::RegisterClientMonitoringResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("ICDCounter", indent + 1, value.ICDCounter)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const UnitTesting::Commands::TestSpecificResponse::DecodableType & value) { @@ -6605,6 +6622,111 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } + case TimeSynchronization::Id: { + switch (path.mAttributeId) + { + case TimeSynchronization::Attributes::UTCTime::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("UTCTime", 1, value); + } + case TimeSynchronization::Attributes::Granularity::Id: { + chip::app::Clusters::TimeSynchronization::GranularityEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Granularity", 1, value); + } + case TimeSynchronization::Attributes::TimeSource::Id: { + chip::app::Clusters::TimeSynchronization::TimeSourceEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TimeSource", 1, value); + } + case TimeSynchronization::Attributes::TrustedTimeSource::Id: { + chip::app::DataModel::Nullable< + chip::app::Clusters::TimeSynchronization::Structs::TrustedTimeSourceStruct::DecodableType> + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TrustedTimeSource", 1, value); + } + case TimeSynchronization::Attributes::DefaultNTP::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("DefaultNTP", 1, value); + } + case TimeSynchronization::Attributes::TimeZone::Id: { + chip::app::DataModel::DecodableList + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TimeZone", 1, value); + } + case TimeSynchronization::Attributes::DSTOffset::Id: { + chip::app::DataModel::DecodableList + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("DSTOffset", 1, value); + } + case TimeSynchronization::Attributes::LocalTime::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("LocalTime", 1, value); + } + case TimeSynchronization::Attributes::TimeZoneDatabase::Id: { + chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TimeZoneDatabase", 1, value); + } + case TimeSynchronization::Attributes::NTPServerAvailable::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NTPServerAvailable", 1, value); + } + case TimeSynchronization::Attributes::TimeZoneListMaxSize::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TimeZoneListMaxSize", 1, value); + } + case TimeSynchronization::Attributes::DSTOffsetListMaxSize::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("DSTOffsetListMaxSize", 1, value); + } + case TimeSynchronization::Attributes::SupportsDNSResolve::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportsDNSResolve", 1, value); + } + case TimeSynchronization::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case TimeSynchronization::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case TimeSynchronization::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case TimeSynchronization::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case TimeSynchronization::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case TimeSynchronization::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } case BridgedDeviceBasicInformation::Id: { switch (path.mAttributeId) { @@ -10225,6 +10347,69 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } + case ClientMonitoring::Id: { + switch (path.mAttributeId) + { + case ClientMonitoring::Attributes::IdleModeInterval::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("IdleModeInterval", 1, value); + } + case ClientMonitoring::Attributes::ActiveModeInterval::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ActiveModeInterval", 1, value); + } + case ClientMonitoring::Attributes::ActiveModeThreshold::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ActiveModeThreshold", 1, value); + } + case ClientMonitoring::Attributes::ExpectedClients::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistrationStruct::DecodableType> + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ExpectedClients", 1, value); + } + case ClientMonitoring::Attributes::ICDCounter::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ICDCounter", 1, value); + } + case ClientMonitoring::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case ClientMonitoring::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case ClientMonitoring::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case ClientMonitoring::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case ClientMonitoring::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case ClientMonitoring::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } case UnitTesting::Id: { switch (path.mAttributeId) { @@ -10834,6 +11019,17 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa } break; } + case TimeSynchronization::Id: { + switch (path.mCommandId) + { + case TimeSynchronization::Commands::SetTimeZoneResponse::Id: { + TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SetTimeZoneResponse", 1, value); + } + } + break; + } case OperationalCredentials::Id: { switch (path.mCommandId) { @@ -11016,6 +11212,17 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa } break; } + case ClientMonitoring::Id: { + switch (path.mCommandId) + { + case ClientMonitoring::Commands::RegisterClientMonitoringResponse::Id: { + ClientMonitoring::Commands::RegisterClientMonitoringResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RegisterClientMonitoringResponse", 1, value); + } + } + break; + } case UnitTesting::Id: { switch (path.mCommandId) { @@ -11291,6 +11498,37 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip } break; } + case TimeSynchronization::Id: { + switch (header.mPath.mEventId) + { + case TimeSynchronization::Events::DSTTableEmpty::Id: { + chip::app::Clusters::TimeSynchronization::Events::DSTTableEmpty::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("DSTTableEmpty", 1, value); + } + case TimeSynchronization::Events::DSTStatus::Id: { + chip::app::Clusters::TimeSynchronization::Events::DSTStatus::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("DSTStatus", 1, value); + } + case TimeSynchronization::Events::TimeZoneStatus::Id: { + chip::app::Clusters::TimeSynchronization::Events::TimeZoneStatus::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TimeZoneStatus", 1, value); + } + case TimeSynchronization::Events::TimeFailure::Id: { + chip::app::Clusters::TimeSynchronization::Events::TimeFailure::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TimeFailure", 1, value); + } + case TimeSynchronization::Events::MissingTrustedTimeSource::Id: { + chip::app::Clusters::TimeSynchronization::Events::MissingTrustedTimeSource::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("MissingTrustedTimeSource", 1, value); + } + } + break; + } case BridgedDeviceBasicInformation::Id: { switch (header.mPath.mEventId) { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index a1a038ba506b0b..56b6d369f2984a 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -403,6 +403,8 @@ LogValue(const char * label, size_t indent, const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & value); static CHIP_ERROR @@ -451,6 +453,9 @@ LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::ClientMonitoring::Commands::RegisterClientMonitoringResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h index 4c52eb1bf23c89..03d92f0cb41d19 100644 --- a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -316,6 +316,22 @@ typedef void (*EthernetNetworkDiagnosticsEventListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*EthernetNetworkDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TimeSynchronizationTimeZoneListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*TimeSynchronizationDSTOffsetListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*TimeSynchronizationGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TimeSynchronizationAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TimeSynchronizationEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*TimeSynchronizationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BridgedDeviceBasicInformationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BridgedDeviceBasicInformationAcceptedCommandListListAttributeCallback)( @@ -658,6 +674,18 @@ typedef void (*ElectricalMeasurementEventListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ElectricalMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ClientMonitoringExpectedClientsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistrationStruct::DecodableType> & data); +typedef void (*ClientMonitoringGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ClientMonitoringAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ClientMonitoringEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ClientMonitoringAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UnitTestingListInt8uListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UnitTestingListOctetStringListAttributeCallback)(void * context, diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h index b08f6b47236de9..b32bf9444e0f5a 100644 --- a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h @@ -282,6 +282,15 @@ class DLL_EXPORT EthernetNetworkDiagnosticsCluster : public ClusterBase ~EthernetNetworkDiagnosticsCluster() {} }; +class DLL_EXPORT TimeSynchronizationCluster : public ClusterBase +{ +public: + TimeSynchronizationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, endpoint) + {} + ~TimeSynchronizationCluster() {} +}; + class DLL_EXPORT BridgedDeviceBasicInformationCluster : public ClusterBase { public: @@ -623,6 +632,15 @@ class DLL_EXPORT ElectricalMeasurementCluster : public ClusterBase ~ElectricalMeasurementCluster() {} }; +class DLL_EXPORT ClientMonitoringCluster : public ClusterBase +{ +public: + ClientMonitoringCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, endpoint) + {} + ~ClientMonitoringCluster() {} +}; + class DLL_EXPORT UnitTestingCluster : public ClusterBase { public: diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h index 7e8e00618681b5..82f4c19043b4f0 100644 --- a/zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h @@ -59,7 +59,7 @@ #define GENERATED_FUNCTION_ARRAYS // This is an array of EmberAfCluster structures. -#define GENERATED_CLUSTER_COUNT 65 +#define GENERATED_CLUSTER_COUNT 67 // clang-format off #define GENERATED_CLUSTERS { \ { \ @@ -413,6 +413,19 @@ .eventList = nullptr, \ .eventCount = 0, \ },\ + { \ + /* Endpoint: 1, Cluster: Time Synchronization (client) */ \ + .clusterId = 0x00000038, \ + .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .acceptedCommandList = nullptr, \ + .generatedCommandList = nullptr, \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ { \ /* Endpoint: 1, Cluster: Bridged Device Basic Information (client) */ \ .clusterId = 0x00000039, \ @@ -894,6 +907,19 @@ .eventList = nullptr, \ .eventCount = 0, \ },\ + { \ + /* Endpoint: 1, Cluster: Client Monitoring (client) */ \ + .clusterId = 0x00001046, \ + .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .acceptedCommandList = nullptr, \ + .generatedCommandList = nullptr, \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ { \ /* Endpoint: 1, Cluster: Unit Testing (client) */ \ .clusterId = 0xFFF1FC05, \ @@ -916,7 +942,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 65, 0 }, \ + { ZAP_CLUSTER_INDEX(0), 67, 0 }, \ } // Largest attribute size is needed for various buffers diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/gen_config.h b/zzz_generated/darwin/controller-clusters/zap-generated/gen_config.h index 1800d8c39bb740..9d024369df58c9 100644 --- a/zzz_generated/darwin/controller-clusters/zap-generated/gen_config.h +++ b/zzz_generated/darwin/controller-clusters/zap-generated/gen_config.h @@ -48,6 +48,7 @@ #define EMBER_AF_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_TIME_SYNCHRONIZATION_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_SWITCH_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_ADMINISTRATOR_COMMISSIONING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -85,6 +86,7 @@ #define EMBER_AF_APPLICATION_BASIC_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_ACCOUNT_LOGIN_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_ELECTRICAL_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_CLIENT_MONITORING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_UNIT_TESTING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) /**** Cluster Plugins ****/ @@ -197,6 +199,10 @@ #define ZCL_USING_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_ETHERNET_NETWORK_DIAGNOSTICS_CLIENT +// Use this macro to check if the client side of the Time Synchronization cluster is included +#define ZCL_USING_TIME_SYNCHRONIZATION_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_TIME_SYNCHRONIZATION_CLIENT + // Use this macro to check if the client side of the Bridged Device Basic Information cluster is included #define ZCL_USING_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_BRIDGED_DEVICE_BASIC_INFORMATION_CLIENT @@ -345,6 +351,10 @@ #define ZCL_USING_ELECTRICAL_MEASUREMENT_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_ELECTRICAL_MEASUREMENT_CLIENT +// Use this macro to check if the client side of the Client Monitoring cluster is included +#define ZCL_USING_CLIENT_MONITORING_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_CLIENT_MONITORING_CLIENT + // Use this macro to check if the client side of the Unit Testing cluster is included #define ZCL_USING_UNIT_TESTING_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_UNIT_TESTING_CLIENT